@versini/sassysaint 8.33.4 → 8.33.5
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/{AboutChangelog.ORkq454o.js → AboutChangelog.DaPMOsYg.js} +2 -2
- package/dist/chunks/{AboutEntry.BGlGd-JE.js → AboutEntry.nDJqOOii.js} +8 -8
- package/dist/chunks/{App.B8I-Bynx.js → App.HkhGwSuN.js} +792 -787
- package/dist/chunks/{Chart.AapZuIW5.js → Chart.C00a9mBD.js} +2 -2
- package/dist/chunks/{ChatBubbleAssistant.DF4lsIZY.js → ChatBubbleAssistant.ob8UickE.js} +3 -3
- package/dist/chunks/{HistoryEntry.I611L02L.js → HistoryEntry.BVkVfmMS.js} +2 -2
- package/dist/chunks/{LNWAZHJI.C6kP9Qzn.js → LNWAZHJI.BA8xEJS9.js} +1 -1
- package/dist/chunks/{ProfileEntry.CK-4l2mc.js → ProfileEntry.CYDZFShl.js} +2 -2
- package/dist/chunks/{SettingsEntry.CRrXxfN_.js → SettingsEntry.DuDxToUb.js} +2 -2
- package/dist/chunks/{UsageEntry.id6voo6W.js → UsageEntry.CkDPuqmA.js} +3 -3
- package/dist/chunks/{index.Czf9axok.js → index.B8_rjxw5.js} +2 -2
- package/dist/chunks/{index.DLzHD9rm.js → index.Cpj3pXr5.js} +1 -1
- package/dist/chunks/{index.B9xSfw2G.js → index.DBys9y5Q.js} +3 -3
- package/dist/chunks/{index.DCBiERjz.js → index.DZ1qvog4.js} +2 -2
- package/dist/chunks/{index.Der377Cc.js → index.DcWfjwBJ.js} +1 -1
- package/dist/chunks/{index.DnwBNBLb.js → index.M53gDba0.js} +1 -1
- package/dist/chunks/{useMarkdown.C30sAbJt.js → useMarkdown.DdL1VDPQ.js} +6 -6
- package/dist/components/SassySaint/SassySaint.js +1 -1
- package/dist/index.js +4 -4
- package/package.json +3 -3
@@ -1,12 +1,12 @@
|
|
1
1
|
import { jsx as i, jsxs as T, Fragment as ue } from "react/jsx-runtime";
|
2
|
-
import { Subscribable as ho, pendingThenable as
|
2
|
+
import { Subscribable as ho, pendingThenable as Ea, resolveEnabled as ke, shallowEqualObjects as kr, resolveStaleTime as gt, noop as _r, isServer as Sr, isValidTimeout as ka, focusManager as fo, fetchState as mo, replaceData as _a, notifyManager as Sn, timeUntilStale as po, shouldThrowError as go, useQueryClient as yo, I as re, ACTION_SORT as bo, ACTION_SEARCH as vo, ACTION_RESET_PROMPT as Tn, ACTION_TOGGLE_PROMPT as Cn, le as Ce, DEFAULT_ICON_ACTION_SIZE as Te, isTauri as Wt, n as Ve, isProbablyiPhone as Ae, L as In, j as yt, C as Sa, LOCAL_STORAGE_PREFIX as jt, LOCAL_STORAGE_PRIVATE_DISCLOSURE as wo, LOCAL_STORAGE_REASONING_DISCLOSURE as Eo, TOAST_CHAT_SAVED as ko, TOAST_PROVIDER_CHANGED as _o, PROMPT_CLASSNAME as So, PROMPT_EDITABLE_AREA_CLASSNAME as To, ERROR_MESSAGE as Co, ROLE_INTERNAL as Tr, CLIPBOARD_PROMPT as Ta, isProbablyMobile as Je, INPUT_PLACEHOLDER_TEXT_MOBILE as Ca, INPUT_PLACEHOLDER_TEXT_ENTER as Ia, INPUT_PLACEHOLDER_TEXT_CMD_ENTER as xa, FOOTER_DISCLAIMERS as Ra, INPUT_BOTTOM_OFFSET_EXTRA as Io, INPUT_BOTTOM_OFFSET_IPHONE as xo, INPUT_BOTTOM_OFFSET as xn, LOG_OUT as Aa, getMessageContaintWrapperClass as Ro, UI_FOOTER_BUFFER as Rn, UI_BUTTON_SCROLL_BUFFER as Ao, Logo as No, UI_DEFAULT_MAIN_HEIGHT as Na, APP_CLASSNAME as Oo, getMainPaddingClass as Oa, r as $o, LOCAL_STORAGE_SORT as Po, LOCAL_STORAGE_SEARCH as Mo } from "./index.B8_rjxw5.js";
|
3
3
|
import * as Y from "react";
|
4
|
-
import Z, { useEffect as $, useRef as R, useState as z, useCallback as V, useSyncExternalStore as Lo, useMemo as he, useId as
|
4
|
+
import Z, { useEffect as $, useRef as R, useState as z, useCallback as V, useSyncExternalStore as Lo, useMemo as he, useId as Kr, useContext as X, useLayoutEffect as Oe, createContext as An, useDebugValue as Do, forwardRef as Nn, Suspense as On, lazy as it, useReducer as St } from "react";
|
5
5
|
import p from "clsx";
|
6
|
-
import { computePosition as Bo, offset as $n, flip as Pn, shift as Mn, arrow as Uo, useMergeRefs as
|
6
|
+
import { computePosition as Bo, offset as $n, flip as Pn, shift as Mn, arrow as Uo, useMergeRefs as Jr, FloatingPortal as Ln, FloatingOverlay as Ho, FloatingFocusManager as Dn, useFloating as Bn, useClick as Un, useDismiss as Hn, useRole as Vn, useInteractions as zn, FloatingTree as Vo, useFloatingTree as Fn, useFloatingNodeId as zo, useListItem as Wn, autoUpdate as Fo, useListNavigation as Wo, useTypeahead as jo, FloatingNode as Go, FloatingList as Ko } from "@floating-ui/react";
|
7
7
|
var Jo = class extends ho {
|
8
8
|
constructor(e, t) {
|
9
|
-
super(), this.options = t, this.#r = e, this.#n = null, this.#a =
|
9
|
+
super(), this.options = t, this.#r = e, this.#n = null, this.#a = Ea(), this.options.experimental_prefetchInRender || this.#a.reject(
|
10
10
|
new Error("experimental_prefetchInRender feature flag is not enabled")
|
11
11
|
), this.bindMethods(), this.setOptions(t);
|
12
12
|
}
|
@@ -31,20 +31,20 @@ var Jo = class extends ho {
|
|
31
31
|
this.refetch = this.refetch.bind(this);
|
32
32
|
}
|
33
33
|
onSubscribe() {
|
34
|
-
this.listeners.size === 1 && (this.#e.addObserver(this),
|
34
|
+
this.listeners.size === 1 && (this.#e.addObserver(this), $a(this.#e, this.options) ? this.#l() : this.updateResult(), this.#v());
|
35
35
|
}
|
36
36
|
onUnsubscribe() {
|
37
37
|
this.hasListeners() || this.destroy();
|
38
38
|
}
|
39
39
|
shouldFetchOnReconnect() {
|
40
|
-
return
|
40
|
+
return Cr(
|
41
41
|
this.#e,
|
42
42
|
this.options,
|
43
43
|
this.options.refetchOnReconnect
|
44
44
|
);
|
45
45
|
}
|
46
46
|
shouldFetchOnWindowFocus() {
|
47
|
-
return
|
47
|
+
return Cr(
|
48
48
|
this.#e,
|
49
49
|
this.options,
|
50
50
|
this.options.refetchOnWindowFocus
|
@@ -59,13 +59,13 @@ var Jo = class extends ho {
|
|
59
59
|
throw new Error(
|
60
60
|
"Expected enabled to be a boolean or a callback that returns a boolean"
|
61
61
|
);
|
62
|
-
this.#k(), this.#e.setOptions(this.options), t._defaulted && !
|
62
|
+
this.#k(), this.#e.setOptions(this.options), t._defaulted && !kr(this.options, t) && this.#r.getQueryCache().notify({
|
63
63
|
type: "observerOptionsUpdated",
|
64
64
|
query: this.#e,
|
65
65
|
observer: this
|
66
66
|
});
|
67
67
|
const a = this.hasListeners();
|
68
|
-
a &&
|
68
|
+
a && Pa(
|
69
69
|
this.#e,
|
70
70
|
r,
|
71
71
|
this.options,
|
@@ -113,7 +113,7 @@ var Jo = class extends ho {
|
|
113
113
|
this.options,
|
114
114
|
e
|
115
115
|
);
|
116
|
-
return e?.throwOnError || (t = t.catch(
|
116
|
+
return e?.throwOnError || (t = t.catch(_r)), t;
|
117
117
|
}
|
118
118
|
#g() {
|
119
119
|
this.#w();
|
@@ -121,7 +121,7 @@ var Jo = class extends ho {
|
|
121
121
|
this.options.staleTime,
|
122
122
|
this.#e
|
123
123
|
);
|
124
|
-
if (
|
124
|
+
if (Sr || this.#t.isStale || !ka(e))
|
125
125
|
return;
|
126
126
|
const r = po(this.#t.dataUpdatedAt, e) + 1;
|
127
127
|
this.#i = setTimeout(() => {
|
@@ -132,7 +132,7 @@ var Jo = class extends ho {
|
|
132
132
|
return (typeof this.options.refetchInterval == "function" ? this.options.refetchInterval(this.#e) : this.options.refetchInterval) ?? !1;
|
133
133
|
}
|
134
134
|
#b(e) {
|
135
|
-
this.#E(), this.#s = e, !(
|
135
|
+
this.#E(), this.#s = e, !(Sr || ke(this.options.enabled, this.#e) === !1 || !ka(this.#s) || this.#s === 0) && (this.#c = setInterval(() => {
|
136
136
|
(this.options.refetchIntervalInBackground || fo.isFocused()) && this.#l();
|
137
137
|
}, this.#s));
|
138
138
|
}
|
@@ -149,21 +149,21 @@ var Jo = class extends ho {
|
|
149
149
|
const r = this.#e, a = this.options, n = this.#t, s = this.#o, o = this.#d, l = e !== r ? e.state : this.#m, { state: d } = e;
|
150
150
|
let f = { ...d }, u = !1, h;
|
151
151
|
if (t._optimisticResults) {
|
152
|
-
const k = this.hasListeners(), x = !k &&
|
152
|
+
const k = this.hasListeners(), x = !k && $a(e, t), E = k && Pa(e, r, t, a);
|
153
153
|
(x || E) && (f = {
|
154
154
|
...f,
|
155
155
|
...mo(d.data, e.options)
|
156
156
|
}), t._optimisticResults === "isRestoring" && (f.fetchStatus = "idle");
|
157
157
|
}
|
158
|
-
let { error: m, errorUpdatedAt:
|
158
|
+
let { error: m, errorUpdatedAt: g, status: y } = f;
|
159
159
|
h = f.data;
|
160
160
|
let w = !1;
|
161
|
-
if (t.placeholderData !== void 0 && h === void 0 &&
|
161
|
+
if (t.placeholderData !== void 0 && h === void 0 && y === "pending") {
|
162
162
|
let k;
|
163
163
|
n?.isPlaceholderData && t.placeholderData === o?.placeholderData ? (k = n.data, w = !0) : k = typeof t.placeholderData == "function" ? t.placeholderData(
|
164
164
|
this.#h?.state.data,
|
165
165
|
this.#h
|
166
|
-
) : t.placeholderData, k !== void 0 && (
|
166
|
+
) : t.placeholderData, k !== void 0 && (y = "success", h = _a(
|
167
167
|
n?.data,
|
168
168
|
k,
|
169
169
|
t
|
@@ -174,23 +174,23 @@ var Jo = class extends ho {
|
|
174
174
|
h = this.#u;
|
175
175
|
else
|
176
176
|
try {
|
177
|
-
this.#p = t.select, h = t.select(h), h =
|
177
|
+
this.#p = t.select, h = t.select(h), h = _a(n?.data, h, t), this.#u = h, this.#n = null;
|
178
178
|
} catch (k) {
|
179
179
|
this.#n = k;
|
180
180
|
}
|
181
|
-
this.#n && (m = this.#n, h = this.#u,
|
182
|
-
const v = f.fetchStatus === "fetching", C =
|
183
|
-
status:
|
181
|
+
this.#n && (m = this.#n, h = this.#u, g = Date.now(), y = "error");
|
182
|
+
const v = f.fetchStatus === "fetching", C = y === "pending", S = y === "error", O = C && v, I = h !== void 0, _ = {
|
183
|
+
status: y,
|
184
184
|
fetchStatus: f.fetchStatus,
|
185
185
|
isPending: C,
|
186
|
-
isSuccess:
|
186
|
+
isSuccess: y === "success",
|
187
187
|
isError: S,
|
188
188
|
isInitialLoading: O,
|
189
189
|
isLoading: O,
|
190
190
|
data: h,
|
191
191
|
dataUpdatedAt: f.dataUpdatedAt,
|
192
192
|
error: m,
|
193
|
-
errorUpdatedAt:
|
193
|
+
errorUpdatedAt: g,
|
194
194
|
failureCount: f.fetchFailureCount,
|
195
195
|
failureReason: f.fetchFailureReason,
|
196
196
|
errorUpdateCount: f.errorUpdateCount,
|
@@ -202,7 +202,7 @@ var Jo = class extends ho {
|
|
202
202
|
isPaused: f.fetchStatus === "paused",
|
203
203
|
isPlaceholderData: u,
|
204
204
|
isRefetchError: S && I,
|
205
|
-
isStale:
|
205
|
+
isStale: qr(e, t),
|
206
206
|
refetch: this.refetch,
|
207
207
|
promise: this.#a,
|
208
208
|
isEnabled: ke(t.enabled, e) !== !1
|
@@ -211,7 +211,7 @@ var Jo = class extends ho {
|
|
211
211
|
const k = (F) => {
|
212
212
|
_.status === "error" ? F.reject(_.error) : _.data !== void 0 && F.resolve(_.data);
|
213
213
|
}, x = () => {
|
214
|
-
const F = this.#a = _.promise =
|
214
|
+
const F = this.#a = _.promise = Ea();
|
215
215
|
k(F);
|
216
216
|
}, E = this.#a;
|
217
217
|
switch (E.status) {
|
@@ -230,7 +230,7 @@ var Jo = class extends ho {
|
|
230
230
|
}
|
231
231
|
updateResult() {
|
232
232
|
const e = this.#t, t = this.createResult(this.#e, this.options);
|
233
|
-
if (this.#o = this.#e.state, this.#d = this.options, this.#o.data !== void 0 && (this.#h = this.#e),
|
233
|
+
if (this.#o = this.#e.state, this.#d = this.options, this.#o.data !== void 0 && (this.#h = this.#e), kr(t, e))
|
234
234
|
return;
|
235
235
|
this.#t = t;
|
236
236
|
const r = () => {
|
@@ -273,24 +273,24 @@ var Jo = class extends ho {
|
|
273
273
|
function qo(e, t) {
|
274
274
|
return ke(t.enabled, e) !== !1 && e.state.data === void 0 && !(e.state.status === "error" && t.retryOnMount === !1);
|
275
275
|
}
|
276
|
-
function
|
277
|
-
return qo(e, t) || e.state.data !== void 0 &&
|
276
|
+
function $a(e, t) {
|
277
|
+
return qo(e, t) || e.state.data !== void 0 && Cr(e, t, t.refetchOnMount);
|
278
278
|
}
|
279
|
-
function
|
279
|
+
function Cr(e, t, r) {
|
280
280
|
if (ke(t.enabled, e) !== !1 && gt(t.staleTime, e) !== "static") {
|
281
281
|
const a = typeof r == "function" ? r(e) : r;
|
282
|
-
return a === "always" || a !== !1 &&
|
282
|
+
return a === "always" || a !== !1 && qr(e, t);
|
283
283
|
}
|
284
284
|
return !1;
|
285
285
|
}
|
286
|
-
function
|
287
|
-
return (e !== t || ke(a.enabled, e) === !1) && (!r.suspense || e.state.status !== "error") &&
|
286
|
+
function Pa(e, t, r, a) {
|
287
|
+
return (e !== t || ke(a.enabled, e) === !1) && (!r.suspense || e.state.status !== "error") && qr(e, r);
|
288
288
|
}
|
289
|
-
function
|
289
|
+
function qr(e, t) {
|
290
290
|
return ke(t.enabled, e) !== !1 && e.isStaleByTime(gt(t.staleTime, e));
|
291
291
|
}
|
292
292
|
function Yo(e, t) {
|
293
|
-
return !
|
293
|
+
return !kr(e.getCurrentResult(), t);
|
294
294
|
}
|
295
295
|
var Qo = Y.createContext(!1), Xo = () => Y.useContext(Qo);
|
296
296
|
function Zo() {
|
@@ -322,7 +322,7 @@ var ei = Y.createContext(Zo()), ti = () => Y.useContext(ei), ri = (e, t) => {
|
|
322
322
|
const t = (a) => a === "static" ? a : Math.max(a ?? 1e3, 1e3), r = e.staleTime;
|
323
323
|
e.staleTime = typeof r == "function" ? (...a) => t(r(...a)) : t(r), typeof e.gcTime == "number" && (e.gcTime = Math.max(e.gcTime, 1e3));
|
324
324
|
}
|
325
|
-
}, oi = (e, t) => e.isLoading && e.isFetching && !t, ii = (e, t) => e?.suspense && t.isPending,
|
325
|
+
}, oi = (e, t) => e.isLoading && e.isFetching && !t, ii = (e, t) => e?.suspense && t.isPending, Ma = (e, t, r) => t.fetchOptimistic(e).catch(() => {
|
326
326
|
r.clearReset();
|
327
327
|
});
|
328
328
|
function ci(e, t, r) {
|
@@ -345,7 +345,7 @@ function ci(e, t, r) {
|
|
345
345
|
if (Y.useSyncExternalStore(
|
346
346
|
Y.useCallback(
|
347
347
|
(u) => {
|
348
|
-
const h = f ? l.subscribe(Sn.batchCalls(u)) :
|
348
|
+
const h = f ? l.subscribe(Sn.batchCalls(u)) : _r;
|
349
349
|
return l.updateResult(), h;
|
350
350
|
},
|
351
351
|
[l, f]
|
@@ -355,7 +355,7 @@ function ci(e, t, r) {
|
|
355
355
|
), Y.useEffect(() => {
|
356
356
|
l.setOptions(o);
|
357
357
|
}, [o, l]), ii(o, d))
|
358
|
-
throw
|
358
|
+
throw Ma(o, l, n);
|
359
359
|
if (ni({
|
360
360
|
result: d,
|
361
361
|
errorResetBoundary: n,
|
@@ -367,17 +367,17 @@ function ci(e, t, r) {
|
|
367
367
|
return s.getDefaultOptions().queries?._experimental_afterQuery?.(
|
368
368
|
o,
|
369
369
|
d
|
370
|
-
), o.experimental_prefetchInRender && !
|
370
|
+
), o.experimental_prefetchInRender && !Sr && oi(d, a) && (c ? (
|
371
371
|
// Fetch immediately on render in order to ensure `.promise` is resolved even if the component is unmounted
|
372
|
-
|
372
|
+
Ma(o, l, n)
|
373
373
|
) : (
|
374
374
|
// subscribe to the "cache promise" so that we can finalize the currentThenable once data comes in
|
375
375
|
s.getQueryCache().get(o.queryHash)?.promise
|
376
|
-
))?.catch(
|
376
|
+
))?.catch(_r).finally(() => {
|
377
377
|
l.updateResult();
|
378
378
|
}), o.notifyOnChangeProps ? d : l.trackResult(d);
|
379
379
|
}
|
380
|
-
function
|
380
|
+
function ct(e, t) {
|
381
381
|
return ci(e, Jo, t);
|
382
382
|
}
|
383
383
|
const li = ({
|
@@ -1007,7 +1007,7 @@ function Li(e) {
|
|
1007
1007
|
function Di(e, t, r = !1) {
|
1008
1008
|
return e.target instanceof HTMLElement ? (r || !e.target.isContentEditable) && !t.includes(e.target.tagName) : !0;
|
1009
1009
|
}
|
1010
|
-
function
|
1010
|
+
function Yr(e, t = ["INPUT", "TEXTAREA", "SELECT"], r = !1) {
|
1011
1011
|
$(() => {
|
1012
1012
|
const a = (n) => {
|
1013
1013
|
e.forEach(
|
@@ -1037,23 +1037,23 @@ function Ui() {
|
|
1037
1037
|
function Gn(e, t) {
|
1038
1038
|
window.dispatchEvent(new StorageEvent("storage", { key: e, newValue: t }));
|
1039
1039
|
}
|
1040
|
-
const
|
1040
|
+
const La = (e, t) => {
|
1041
1041
|
const r = JSON.stringify(
|
1042
1042
|
typeof t == "function" ? t() : t
|
1043
1043
|
);
|
1044
1044
|
window.localStorage.setItem(e, r), Gn(e, r);
|
1045
1045
|
}, Hi = (e) => {
|
1046
1046
|
window.localStorage.removeItem(e), Gn(e, null);
|
1047
|
-
},
|
1048
|
-
function
|
1047
|
+
}, Da = (e) => window.localStorage.getItem(e), Vi = (e) => (window.addEventListener("storage", e), () => window.removeEventListener("storage", e));
|
1048
|
+
function Gt({
|
1049
1049
|
key: e,
|
1050
1050
|
initialValue: t
|
1051
1051
|
}) {
|
1052
|
-
const r = Lo(Vi, () =>
|
1052
|
+
const r = Lo(Vi, () => Da(e)), a = V(
|
1053
1053
|
(o) => {
|
1054
1054
|
try {
|
1055
1055
|
const c = typeof o == "function" ? o(JSON.parse(r)) : o;
|
1056
|
-
c == null ? Hi(e) :
|
1056
|
+
c == null ? Hi(e) : La(e, c);
|
1057
1057
|
} catch (c) {
|
1058
1058
|
console.warn(c);
|
1059
1059
|
}
|
@@ -1066,7 +1066,7 @@ function jt({
|
|
1066
1066
|
}, [a]);
|
1067
1067
|
return $(() => {
|
1068
1068
|
try {
|
1069
|
-
|
1069
|
+
Da(e) === null && typeof t < "u" && La(e, t);
|
1070
1070
|
} catch (o) {
|
1071
1071
|
console.warn(o);
|
1072
1072
|
}
|
@@ -1094,9 +1094,9 @@ function Kn(e) {
|
|
1094
1094
|
}), [o, e]), [a, n];
|
1095
1095
|
}
|
1096
1096
|
function Fi(e) {
|
1097
|
-
return
|
1097
|
+
return Kr();
|
1098
1098
|
}
|
1099
|
-
function
|
1099
|
+
function Ba(e, t) {
|
1100
1100
|
$(() => (window.addEventListener(e, t, {
|
1101
1101
|
passive: !0
|
1102
1102
|
}), () => window.removeEventListener(e, t)), [e, t]);
|
@@ -1111,7 +1111,7 @@ function Wi() {
|
|
1111
1111
|
height: window.innerHeight || 0
|
1112
1112
|
});
|
1113
1113
|
}, []);
|
1114
|
-
return
|
1114
|
+
return Ba("resize", r), Ba("orientationchange", r), $(r, []), e;
|
1115
1115
|
}
|
1116
1116
|
function ji() {
|
1117
1117
|
const [e, t] = z({
|
@@ -1132,7 +1132,7 @@ function ji() {
|
|
1132
1132
|
window.visualViewport && (window.visualViewport.removeEventListener("resize", r), window.visualViewport.removeEventListener("orientationchange", r));
|
1133
1133
|
}), [r]), e;
|
1134
1134
|
}
|
1135
|
-
const
|
1135
|
+
const Qt = "thead", Qr = "tfoot", rt = "tbody", mt = {
|
1136
1136
|
ASC: "asc",
|
1137
1137
|
DESC: "desc"
|
1138
1138
|
}, Gi = ({
|
@@ -1200,7 +1200,7 @@ const Yt = "thead", Yr = "tfoot", tt = "tbody", ft = {
|
|
1200
1200
|
mode: e,
|
1201
1201
|
className: t,
|
1202
1202
|
cellWrapper: r
|
1203
|
-
}) => r ===
|
1203
|
+
}) => r === Qt || r === Qr ? p(
|
1204
1204
|
{
|
1205
1205
|
"bg-table-head-dark": e === "dark" || e === "system",
|
1206
1206
|
"bg-table-head-light": e === "light" || e === "alt-system",
|
@@ -1212,13 +1212,13 @@ const Yt = "thead", Yr = "tfoot", tt = "tbody", ft = {
|
|
1212
1212
|
"border-b last:border-0",
|
1213
1213
|
{
|
1214
1214
|
"border-table-dark": e === "dark" || e === "system",
|
1215
|
-
"odd:bg-table-dark-odd even:bg-table-dark-even": r ===
|
1215
|
+
"odd:bg-table-dark-odd even:bg-table-dark-even": r === rt && e === "dark",
|
1216
1216
|
"border-table-light": e === "light" || e === "alt-system",
|
1217
|
-
"odd:bg-table-light-odd even:bg-table-light-even": r ===
|
1217
|
+
"odd:bg-table-light-odd even:bg-table-light-even": r === rt && e === "light",
|
1218
1218
|
"dark:border-table-light": e === "system",
|
1219
|
-
"odd:bg-table-dark-odd even:bg-table-dark-even dark:odd:bg-table-light-odd dark:even:bg-table-light-even": r ===
|
1219
|
+
"odd:bg-table-dark-odd even:bg-table-dark-even dark:odd:bg-table-light-odd dark:even:bg-table-light-even": r === rt && e === "system",
|
1220
1220
|
"dark:border-table-dark": e === "alt-system",
|
1221
|
-
"odd:bg-table-light-odd even:bg-table-light-even dark:odd:bg-table-dark-odd dark:even:bg-table-dark-even": r ===
|
1221
|
+
"odd:bg-table-light-odd even:bg-table-light-even dark:odd:bg-table-dark-odd dark:even:bg-table-dark-even": r === rt && e === "alt-system"
|
1222
1222
|
},
|
1223
1223
|
t
|
1224
1224
|
), Yi = ({
|
@@ -1239,15 +1239,15 @@ const Yt = "thead", Yr = "tfoot", tt = "tbody", ft = {
|
|
1239
1239
|
"text-copy-dark": a === "light" || a === "alt-system",
|
1240
1240
|
"dark:text-copy-dark": a === "system",
|
1241
1241
|
"dark:text-copy-light": a === "alt-system",
|
1242
|
-
"px-4 py-3": !r && (e ===
|
1243
|
-
"p-4": !r && e ===
|
1242
|
+
"px-4 py-3": !r && (e === Qt || e === Qr),
|
1243
|
+
"p-4": !r && e === rt,
|
1244
1244
|
"px-2 py-1.5": r
|
1245
1245
|
},
|
1246
1246
|
t
|
1247
1247
|
)
|
1248
1248
|
}), Qi = ({
|
1249
1249
|
buttonClassName: e
|
1250
|
-
}) => p("rounded-none text-sm", e),
|
1250
|
+
}) => p("rounded-none text-sm", e), Ua = "av-button", Xr = "icon", Jn = "button", Ir = "link", Xi = ({
|
1251
1251
|
type: e,
|
1252
1252
|
size: t,
|
1253
1253
|
labelRight: r,
|
@@ -1258,13 +1258,13 @@ const Yt = "thead", Yr = "tfoot", tt = "tbody", ft = {
|
|
1258
1258
|
const o = "max-h-8 py-0 px-2", c = "max-h-9 h-8 px-3", l = "max-h-12 py-2 px-4";
|
1259
1259
|
switch (e) {
|
1260
1260
|
case Jn:
|
1261
|
-
case
|
1261
|
+
case Ir:
|
1262
1262
|
return p({
|
1263
1263
|
[o]: t === "small",
|
1264
1264
|
[c]: t === "medium",
|
1265
1265
|
[l]: t === "large"
|
1266
1266
|
});
|
1267
|
-
case
|
1267
|
+
case Xr:
|
1268
1268
|
return p("flex items-center", {
|
1269
1269
|
"justify-center": n === "center",
|
1270
1270
|
"justify-start": n === "left",
|
@@ -1292,14 +1292,14 @@ const Yt = "thead", Yr = "tfoot", tt = "tbody", ft = {
|
|
1292
1292
|
const n = "text-sm font-medium", s = "text-base font-medium", o = "text-lg font-medium";
|
1293
1293
|
switch (e) {
|
1294
1294
|
case Jn:
|
1295
|
-
case
|
1295
|
+
case Ir:
|
1296
1296
|
return p({
|
1297
|
-
"text-center": e ===
|
1297
|
+
"text-center": e === Ir,
|
1298
1298
|
[n]: t === "small",
|
1299
1299
|
[s]: t === "medium",
|
1300
1300
|
[o]: t === "large"
|
1301
1301
|
});
|
1302
|
-
case
|
1302
|
+
case Xr:
|
1303
1303
|
return p({
|
1304
1304
|
[n]: t === "small" && (r || a),
|
1305
1305
|
[s]: t === "medium" && (r || a),
|
@@ -1506,11 +1506,11 @@ const Yt = "thead", Yr = "tfoot", tt = "tbody", ft = {
|
|
1506
1506
|
noBackground: u,
|
1507
1507
|
variant: h,
|
1508
1508
|
truncate: m,
|
1509
|
-
align:
|
1510
|
-
radius:
|
1509
|
+
align: g,
|
1510
|
+
radius: y,
|
1511
1511
|
animated: w
|
1512
|
-
}) => (h || (h = "primary"), r ? p(
|
1513
|
-
|
1512
|
+
}) => (h || (h = "primary"), r ? p(Ua, t) : p(
|
1513
|
+
Ua,
|
1514
1514
|
ec({
|
1515
1515
|
mode: a,
|
1516
1516
|
variant: h,
|
@@ -1518,13 +1518,13 @@ const Yt = "thead", Yr = "tfoot", tt = "tbody", ft = {
|
|
1518
1518
|
truncate: m
|
1519
1519
|
}),
|
1520
1520
|
tc({ mode: a, noBackground: u, variant: h }),
|
1521
|
-
rc({ radius:
|
1521
|
+
rc({ radius: y }),
|
1522
1522
|
Xi({
|
1523
1523
|
type: e,
|
1524
1524
|
size: c,
|
1525
1525
|
labelRight: d,
|
1526
1526
|
labelLeft: f,
|
1527
|
-
align:
|
1527
|
+
align: g,
|
1528
1528
|
animated: w
|
1529
1529
|
}),
|
1530
1530
|
Zi({ type: e, size: c, labelRight: d, labelLeft: f }),
|
@@ -1581,7 +1581,7 @@ const fc = {
|
|
1581
1581
|
bottom: 0,
|
1582
1582
|
right: 0
|
1583
1583
|
};
|
1584
|
-
function
|
1584
|
+
function rr(e) {
|
1585
1585
|
const t = uc(), r = R(0), a = R(null), [n, s] = z(fc), o = he(() => typeof ResizeObserver > "u" ? null : new ResizeObserver((c) => {
|
1586
1586
|
const l = c[0];
|
1587
1587
|
l && (cancelAnimationFrame(r.current), r.current = requestAnimationFrame(() => {
|
@@ -1622,8 +1622,8 @@ const Tt = {
|
|
1622
1622
|
size: u = "medium",
|
1623
1623
|
labelRight: h,
|
1624
1624
|
labelLeft: m,
|
1625
|
-
noBackground:
|
1626
|
-
align:
|
1625
|
+
noBackground: g = !1,
|
1626
|
+
align: y = "center",
|
1627
1627
|
radius: w = "large",
|
1628
1628
|
variant: v = "primary",
|
1629
1629
|
iconClassName: C,
|
@@ -1631,7 +1631,7 @@ const Tt = {
|
|
1631
1631
|
...O
|
1632
1632
|
}, I) => {
|
1633
1633
|
const b = lc({
|
1634
|
-
type:
|
1634
|
+
type: Xr,
|
1635
1635
|
mode: r,
|
1636
1636
|
focusMode: a,
|
1637
1637
|
fullWidth: n,
|
@@ -1642,12 +1642,12 @@ const Tt = {
|
|
1642
1642
|
size: u,
|
1643
1643
|
labelRight: h,
|
1644
1644
|
labelLeft: m,
|
1645
|
-
noBackground:
|
1646
|
-
align:
|
1645
|
+
noBackground: g,
|
1646
|
+
align: y,
|
1647
1647
|
radius: w,
|
1648
1648
|
variant: v,
|
1649
1649
|
animated: S
|
1650
|
-
}), _ = ic({ mode: r, raw: c, iconClassName: C }), k = cc({ animated: S }), x = "flex items-center justify-center relative w-full h-full overflow-hidden", [E, F] =
|
1650
|
+
}), _ = ic({ mode: r, raw: c, iconClassName: C }), k = cc({ animated: S }), x = "flex items-center justify-center relative w-full h-full overflow-hidden", [E, F] = rr(), [A, W] = rr(), [P, J] = rr(), Q = R(0), L = R(null), M = R(null), q = hc([I, L]);
|
1651
1651
|
return Oe(() => {
|
1652
1652
|
P && P.current && S && (Q.current = J.width + mc[u] + (l ? 0 : pc), L.current && !L.current.style.width && (L.current.style.width = `${Tt[u]}px`));
|
1653
1653
|
}, [J, P, u, l, S]), Oe(() => {
|
@@ -1679,7 +1679,7 @@ const Tt = {
|
|
1679
1679
|
...O,
|
1680
1680
|
children: /* @__PURE__ */ T("div", { className: x, children: [
|
1681
1681
|
/* @__PURE__ */ i(
|
1682
|
-
|
1682
|
+
Ha,
|
1683
1683
|
{
|
1684
1684
|
label: m,
|
1685
1685
|
labelRef: A,
|
@@ -1690,7 +1690,7 @@ const Tt = {
|
|
1690
1690
|
),
|
1691
1691
|
/* @__PURE__ */ i("span", { ref: P, className: _, children: e }),
|
1692
1692
|
/* @__PURE__ */ i(
|
1693
|
-
|
1693
|
+
Ha,
|
1694
1694
|
{
|
1695
1695
|
label: h,
|
1696
1696
|
labelRef: E,
|
@@ -1703,7 +1703,7 @@ const Tt = {
|
|
1703
1703
|
}
|
1704
1704
|
);
|
1705
1705
|
}
|
1706
|
-
),
|
1706
|
+
), Ha = ({
|
1707
1707
|
labelRef: e,
|
1708
1708
|
labelClass: t,
|
1709
1709
|
label: r,
|
@@ -1771,7 +1771,7 @@ const Qn = Z.forwardRef(
|
|
1771
1771
|
}
|
1772
1772
|
);
|
1773
1773
|
Qn.displayName = "ButtonSort";
|
1774
|
-
const
|
1774
|
+
const Zr = ({
|
1775
1775
|
children: e,
|
1776
1776
|
fill: t,
|
1777
1777
|
viewBox: r,
|
@@ -1821,7 +1821,7 @@ const yc = ({
|
|
1821
1821
|
monotone: a,
|
1822
1822
|
...n
|
1823
1823
|
}) => /* @__PURE__ */ T(
|
1824
|
-
|
1824
|
+
Zr,
|
1825
1825
|
{
|
1826
1826
|
defaultViewBox: "0 0 576 512",
|
1827
1827
|
size: "size-5",
|
@@ -1847,7 +1847,7 @@ const yc = ({
|
|
1847
1847
|
monotone: a,
|
1848
1848
|
...n
|
1849
1849
|
}) => /* @__PURE__ */ T(
|
1850
|
-
|
1850
|
+
Zr,
|
1851
1851
|
{
|
1852
1852
|
defaultViewBox: "0 0 576 512",
|
1853
1853
|
size: "size-5",
|
@@ -1873,7 +1873,7 @@ const yc = ({
|
|
1873
1873
|
monotone: a,
|
1874
1874
|
...n
|
1875
1875
|
}) => /* @__PURE__ */ T(
|
1876
|
-
|
1876
|
+
Zr,
|
1877
1877
|
{
|
1878
1878
|
defaultViewBox: "0 0 576 512",
|
1879
1879
|
size: "size-5",
|
@@ -1906,7 +1906,7 @@ try {
|
|
1906
1906
|
});
|
1907
1907
|
} catch {
|
1908
1908
|
}
|
1909
|
-
const
|
1909
|
+
const lt = Z.createContext({
|
1910
1910
|
mode: "light",
|
1911
1911
|
cellWrapper: "thead",
|
1912
1912
|
stickyHeader: !1,
|
@@ -1933,7 +1933,7 @@ const ct = Z.createContext({
|
|
1933
1933
|
stickyFooter: d
|
1934
1934
|
});
|
1935
1935
|
return /* @__PURE__ */ i(
|
1936
|
-
|
1936
|
+
lt.Provider,
|
1937
1937
|
{
|
1938
1938
|
value: { mode: t, stickyHeader: l, stickyFooter: d, compact: a },
|
1939
1939
|
children: /* @__PURE__ */ i(
|
@@ -1956,8 +1956,8 @@ const ct = Z.createContext({
|
|
1956
1956
|
className: t,
|
1957
1957
|
...r
|
1958
1958
|
}) => {
|
1959
|
-
const a = X(
|
1960
|
-
a.cellWrapper =
|
1959
|
+
const a = X(lt);
|
1960
|
+
a.cellWrapper = Qt;
|
1961
1961
|
const n = Ki({
|
1962
1962
|
className: t,
|
1963
1963
|
mode: a.mode,
|
@@ -1969,8 +1969,8 @@ const ct = Z.createContext({
|
|
1969
1969
|
className: t,
|
1970
1970
|
...r
|
1971
1971
|
}) => {
|
1972
|
-
const a = X(
|
1973
|
-
a.cellWrapper =
|
1972
|
+
const a = X(lt);
|
1973
|
+
a.cellWrapper = Qr;
|
1974
1974
|
const n = Ji({
|
1975
1975
|
className: t,
|
1976
1976
|
mode: a.mode,
|
@@ -1978,14 +1978,14 @@ const ct = Z.createContext({
|
|
1978
1978
|
});
|
1979
1979
|
return /* @__PURE__ */ i("tfoot", { className: n, ...r, children: e });
|
1980
1980
|
}, Kf = ({ children: e, ...t }) => {
|
1981
|
-
const r = X(
|
1982
|
-
return r.cellWrapper =
|
1981
|
+
const r = X(lt);
|
1982
|
+
return r.cellWrapper = rt, /* @__PURE__ */ i("tbody", { ...t, children: e });
|
1983
1983
|
}, Jf = ({
|
1984
1984
|
children: e,
|
1985
1985
|
className: t,
|
1986
1986
|
...r
|
1987
1987
|
}) => {
|
1988
|
-
const a = X(
|
1988
|
+
const a = X(lt), n = qi({
|
1989
1989
|
mode: a.mode,
|
1990
1990
|
cellWrapper: a.cellWrapper,
|
1991
1991
|
className: t
|
@@ -1998,7 +1998,7 @@ const ct = Z.createContext({
|
|
1998
1998
|
align: a,
|
1999
1999
|
...n
|
2000
2000
|
}) => {
|
2001
|
-
const s = X(
|
2001
|
+
const s = X(lt), o = t || (s.cellWrapper === Qt ? "th" : "td"), { mainClasses: c, alignClasses: l } = Yi({
|
2002
2002
|
cellWrapper: s.cellWrapper,
|
2003
2003
|
className: r,
|
2004
2004
|
mode: s.mode,
|
@@ -2027,7 +2027,7 @@ const ct = Z.createContext({
|
|
2027
2027
|
component: n,
|
2028
2028
|
className: a,
|
2029
2029
|
role: "columnheader",
|
2030
|
-
"aria-sort": l ===
|
2030
|
+
"aria-sort": l === mt.ASC && d === f ? "ascending" : l === mt.DESC && d === f ? "descending" : "other",
|
2031
2031
|
...u,
|
2032
2032
|
children: /* @__PURE__ */ i(
|
2033
2033
|
Qn,
|
@@ -2041,7 +2041,7 @@ const ct = Z.createContext({
|
|
2041
2041
|
mode: o,
|
2042
2042
|
fullWidth: !0,
|
2043
2043
|
labelRight: t,
|
2044
|
-
children: l ===
|
2044
|
+
children: l === mt.ASC && d === f ? /* @__PURE__ */ i(vc, { className: "size-4", monotone: !0 }) : l === mt.DESC && d === f ? /* @__PURE__ */ i(bc, { className: "size-4", monotone: !0 }) : /* @__PURE__ */ i(yc, { className: "size-4", monotone: !0 })
|
2045
2045
|
}
|
2046
2046
|
)
|
2047
2047
|
}
|
@@ -2066,28 +2066,28 @@ for (let e = 0; e < 256; ++e)
|
|
2066
2066
|
function Ec(e, t = 0) {
|
2067
2067
|
return (ce[e[t + 0]] + ce[e[t + 1]] + ce[e[t + 2]] + ce[e[t + 3]] + "-" + ce[e[t + 4]] + ce[e[t + 5]] + "-" + ce[e[t + 6]] + ce[e[t + 7]] + "-" + ce[e[t + 8]] + ce[e[t + 9]] + "-" + ce[e[t + 10]] + ce[e[t + 11]] + ce[e[t + 12]] + ce[e[t + 13]] + ce[e[t + 14]] + ce[e[t + 15]]).toLowerCase();
|
2068
2068
|
}
|
2069
|
-
let
|
2069
|
+
let ar;
|
2070
2070
|
const kc = new Uint8Array(16);
|
2071
2071
|
function _c() {
|
2072
|
-
if (!
|
2072
|
+
if (!ar) {
|
2073
2073
|
if (typeof crypto > "u" || !crypto.getRandomValues)
|
2074
2074
|
throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");
|
2075
|
-
|
2075
|
+
ar = crypto.getRandomValues.bind(crypto);
|
2076
2076
|
}
|
2077
|
-
return
|
2077
|
+
return ar(kc);
|
2078
2078
|
}
|
2079
|
-
const Sc = typeof crypto < "u" && crypto.randomUUID && crypto.randomUUID.bind(crypto),
|
2079
|
+
const Sc = typeof crypto < "u" && crypto.randomUUID && crypto.randomUUID.bind(crypto), Va = { randomUUID: Sc };
|
2080
2080
|
function Ue(e, t, r) {
|
2081
|
-
if (
|
2082
|
-
return
|
2081
|
+
if (Va.randomUUID && !e)
|
2082
|
+
return Va.randomUUID();
|
2083
2083
|
e = e || {};
|
2084
2084
|
const a = e.random ?? e.rng?.() ?? _c();
|
2085
2085
|
if (a.length < 16)
|
2086
2086
|
throw new Error("Random bytes length must be >= 16");
|
2087
2087
|
return a[6] = a[6] & 15 | 64, a[8] = a[8] & 63 | 128, Ec(a);
|
2088
2088
|
}
|
2089
|
-
let Ct = !1,
|
2090
|
-
const
|
2089
|
+
let Ct = !1, nr = null;
|
2090
|
+
const za = ({
|
2091
2091
|
containerId: e,
|
2092
2092
|
...t
|
2093
2093
|
}) => {
|
@@ -2097,7 +2097,7 @@ const Va = ({
|
|
2097
2097
|
const n = async () => {
|
2098
2098
|
try {
|
2099
2099
|
const { ToastContainer: o } = await import("./index.B8EJY2WR.js");
|
2100
|
-
|
2100
|
+
nr = o, Ct = !0, a(!0);
|
2101
2101
|
} catch (o) {
|
2102
2102
|
console.error("Failed to load ToastContainer:", o);
|
2103
2103
|
}
|
@@ -2108,10 +2108,10 @@ const Va = ({
|
|
2108
2108
|
window.removeEventListener("toast-request", s);
|
2109
2109
|
};
|
2110
2110
|
}
|
2111
|
-
}, []), r &&
|
2112
|
-
},
|
2111
|
+
}, []), r && nr ? /* @__PURE__ */ i(nr, { containerId: e, ...t }) : null;
|
2112
|
+
}, qe = "FOOTER_BOTTOM", Kt = "FOOTER_TOP", pt = "APP_SET_FOOTER_POSITION", Xn = "APP_SET_FOOTER_HEIGHT", Tc = (e, t) => {
|
2113
2113
|
switch (t.type) {
|
2114
|
-
case
|
2114
|
+
case pt:
|
2115
2115
|
return {
|
2116
2116
|
...e,
|
2117
2117
|
footerPosition: t.payload.footerPosition,
|
@@ -2125,19 +2125,19 @@ const Va = ({
|
|
2125
2125
|
default:
|
2126
2126
|
return e;
|
2127
2127
|
}
|
2128
|
-
},
|
2128
|
+
}, at = "CHAT_SET_STATUS", Zn = "CHAT_SET_USAGE", st = "CHAT_SET_ATTACHMENTS", es = "CHAT_SET_PROVIDER", Qe = "CHAT_RESET", Cc = (e, t) => {
|
2129
2129
|
switch (t.type) {
|
2130
2130
|
case Zn:
|
2131
2131
|
return {
|
2132
2132
|
...e,
|
2133
2133
|
tokenUsage: e.tokenUsage + t.payload.tokenUsage
|
2134
2134
|
};
|
2135
|
-
case
|
2135
|
+
case st:
|
2136
2136
|
return {
|
2137
2137
|
...e,
|
2138
2138
|
attachments: t.payload.attachments
|
2139
2139
|
};
|
2140
|
-
case
|
2140
|
+
case at: {
|
2141
2141
|
let r = !1, a = !1, n = !1, s = !1, o = "", c = 0, l = e.tokenUsage;
|
2142
2142
|
return typeof t?.payload?.loading == "boolean" ? n = t.payload.loading : typeof e.loading == "boolean" && (n = e.loading), typeof t?.payload?.streaming == "boolean" ? a = t.payload.streaming : typeof e.streaming == "boolean" && (a = e.streaming), typeof t?.payload?.restoring == "boolean" ? (r = t.payload.restoring, o = t.payload.restoredModel || "", c = t.payload.restoredUsage || 0, r && (l = c)) : typeof e.restoring == "boolean" && (r = e.restoring, o = e.restoredModel || "", c = e.restoredUsage || 0), typeof t?.payload?.aborted == "boolean" ? s = t.payload.aborted : typeof e.aborted == "boolean" && (s = e.aborted), (a || n) && (r = !1, o = "", c = 0, s = !1), {
|
2143
2143
|
...e,
|
@@ -2158,7 +2158,7 @@ const Va = ({
|
|
2158
2158
|
...e,
|
2159
2159
|
provider: t.payload.provider
|
2160
2160
|
};
|
2161
|
-
case
|
2161
|
+
case Qe: {
|
2162
2162
|
let r = !1, a = !1;
|
2163
2163
|
return typeof t?.payload?.privateChat == "boolean" ? r = t.payload.privateChat : typeof e.privateChat == "boolean" && (r = e.privateChat), typeof t?.payload?.reasoning == "boolean" ? a = t.payload.reasoning : typeof e.reasoning == "boolean" && (a = e.reasoning), {
|
2164
2164
|
privateChat: r,
|
@@ -2387,12 +2387,12 @@ const Va = ({
|
|
2387
2387
|
schema: we.GET_USAGE,
|
2388
2388
|
method: "usage"
|
2389
2389
|
}
|
2390
|
-
},
|
2390
|
+
}, ea = process.env.PUBLIC_SASSY_API_SERVER_URL, Jt = async ({
|
2391
2391
|
query: e,
|
2392
2392
|
data: t,
|
2393
2393
|
headers: r = {},
|
2394
2394
|
...a
|
2395
|
-
}) => await fetch(`${
|
2395
|
+
}) => await fetch(`${ea}/graphql`, {
|
2396
2396
|
method: "POST",
|
2397
2397
|
credentials: "include",
|
2398
2398
|
headers: {
|
@@ -2410,13 +2410,13 @@ const Va = ({
|
|
2410
2410
|
try {
|
2411
2411
|
let r;
|
2412
2412
|
if (e.noAuth === !0)
|
2413
|
-
r = await
|
2413
|
+
r = await Jt({
|
2414
2414
|
query: e.type.schema,
|
2415
2415
|
data: t
|
2416
2416
|
});
|
2417
2417
|
else {
|
2418
2418
|
const s = `Bearer ${e.accessToken}`;
|
2419
|
-
r = await
|
2419
|
+
r = await Jt({
|
2420
2420
|
headers: {
|
2421
2421
|
authorization: s
|
2422
2422
|
},
|
@@ -2451,34 +2451,34 @@ const Va = ({
|
|
2451
2451
|
});
|
2452
2452
|
} catch {
|
2453
2453
|
}
|
2454
|
-
},
|
2454
|
+
}, dt = {
|
2455
2455
|
CHATS: "chats",
|
2456
2456
|
CHATS_STATS: "chatsStats",
|
2457
2457
|
CAPABILITIES: "capabilities",
|
2458
2458
|
CHANGELOGS: "changelogs",
|
2459
2459
|
PREFERENCES: "preferences",
|
2460
2460
|
USAGE: "usage"
|
2461
|
-
}, Yf = () =>
|
2462
|
-
queryKey: [
|
2463
|
-
queryFn: async () => await
|
2461
|
+
}, Yf = () => ct({
|
2462
|
+
queryKey: [dt.CAPABILITIES],
|
2463
|
+
queryFn: async () => await ut({
|
2464
2464
|
type: ze.GET_SERVER_CAPABILITIES,
|
2465
2465
|
noAuth: !0
|
2466
2466
|
})
|
2467
|
-
}), Qf = () =>
|
2468
|
-
queryKey: [
|
2469
|
-
queryFn: async () => await
|
2467
|
+
}), Qf = () => ct({
|
2468
|
+
queryKey: [dt.CHANGELOGS],
|
2469
|
+
queryFn: async () => await ut({
|
2470
2470
|
type: ze.GET_CHANGELOGS,
|
2471
2471
|
noAuth: !0,
|
2472
2472
|
params: {
|
2473
2473
|
client: !0
|
2474
2474
|
}
|
2475
2475
|
})
|
2476
|
-
}),
|
2476
|
+
}), Xt = ({
|
2477
2477
|
user: e,
|
2478
2478
|
getAccessToken: t
|
2479
|
-
}) =>
|
2480
|
-
queryKey: [
|
2481
|
-
queryFn: async () => await
|
2479
|
+
}) => ct({
|
2480
|
+
queryKey: [dt.PREFERENCES, e],
|
2481
|
+
queryFn: async () => await ut({
|
2482
2482
|
params: {
|
2483
2483
|
user: e
|
2484
2484
|
},
|
@@ -2488,9 +2488,9 @@ const Va = ({
|
|
2488
2488
|
}), Xf = ({
|
2489
2489
|
user: e,
|
2490
2490
|
getAccessToken: t
|
2491
|
-
}) =>
|
2492
|
-
queryKey: [
|
2493
|
-
queryFn: async () => await
|
2491
|
+
}) => ct({
|
2492
|
+
queryKey: [dt.CHATS_STATS, e],
|
2493
|
+
queryFn: async () => await ut({
|
2494
2494
|
params: {
|
2495
2495
|
user: e
|
2496
2496
|
},
|
@@ -2503,12 +2503,12 @@ const Va = ({
|
|
2503
2503
|
sortDirection: r,
|
2504
2504
|
getAccessToken: a,
|
2505
2505
|
enabled: n = !0
|
2506
|
-
}) =>
|
2506
|
+
}) => ct({
|
2507
2507
|
enabled: n,
|
2508
2508
|
staleTime: 60 * 1e3,
|
2509
2509
|
// 1 minute
|
2510
|
-
queryKey: [
|
2511
|
-
queryFn: async () => await
|
2510
|
+
queryKey: [dt.CHATS, e, t, r],
|
2511
|
+
queryFn: async () => await ut({
|
2512
2512
|
params: {
|
2513
2513
|
user: e,
|
2514
2514
|
searchString: t,
|
@@ -2525,10 +2525,10 @@ const Va = ({
|
|
2525
2525
|
year: r = (/* @__PURE__ */ new Date()).getFullYear().toString(),
|
2526
2526
|
getAccessToken: a,
|
2527
2527
|
enabled: n = !0
|
2528
|
-
}) =>
|
2528
|
+
}) => ct({
|
2529
2529
|
enabled: n,
|
2530
|
-
queryKey: [
|
2531
|
-
queryFn: async () => await
|
2530
|
+
queryKey: [dt.USAGE, e, t, r],
|
2531
|
+
queryFn: async () => await ut({
|
2532
2532
|
params: {
|
2533
2533
|
user: e,
|
2534
2534
|
month: t,
|
@@ -2537,7 +2537,7 @@ const Va = ({
|
|
2537
2537
|
type: ze.GET_USAGE,
|
2538
2538
|
getAccessToken: a
|
2539
2539
|
})
|
2540
|
-
}),
|
2540
|
+
}), ut = async ({
|
2541
2541
|
params: e,
|
2542
2542
|
type: t,
|
2543
2543
|
noAuth: r,
|
@@ -2547,13 +2547,13 @@ const Va = ({
|
|
2547
2547
|
const n = t?.data ? t.data(e) : e;
|
2548
2548
|
let s;
|
2549
2549
|
if (r === !0)
|
2550
|
-
s = await
|
2550
|
+
s = await Jt({
|
2551
2551
|
query: t.schema,
|
2552
2552
|
data: n
|
2553
2553
|
});
|
2554
2554
|
else if (a) {
|
2555
2555
|
const d = await a();
|
2556
|
-
s = await
|
2556
|
+
s = await Jt({
|
2557
2557
|
headers: {
|
2558
2558
|
authorization: `Bearer ${d}`
|
2559
2559
|
},
|
@@ -2604,11 +2604,11 @@ var as = "vercel.ai.error", Ac = Symbol.for(as), ns, Nc = class ss extends Error
|
|
2604
2604
|
}
|
2605
2605
|
};
|
2606
2606
|
ns = Ac;
|
2607
|
-
var
|
2607
|
+
var ot = Nc;
|
2608
2608
|
function os(e) {
|
2609
2609
|
return e == null ? "unknown error" : typeof e == "string" ? e : e instanceof Error ? e.message : JSON.stringify(e);
|
2610
2610
|
}
|
2611
|
-
var is = "AI_InvalidArgumentError", cs = `vercel.ai.error.${is}`, Oc = Symbol.for(cs), ls, $c = class extends
|
2611
|
+
var is = "AI_InvalidArgumentError", cs = `vercel.ai.error.${is}`, Oc = Symbol.for(cs), ls, $c = class extends ot {
|
2612
2612
|
constructor({
|
2613
2613
|
message: e,
|
2614
2614
|
cause: t,
|
@@ -2617,11 +2617,11 @@ var is = "AI_InvalidArgumentError", cs = `vercel.ai.error.${is}`, Oc = Symbol.fo
|
|
2617
2617
|
super({ name: is, message: e, cause: t }), this[ls] = !0, this.argument = r;
|
2618
2618
|
}
|
2619
2619
|
static isInstance(e) {
|
2620
|
-
return
|
2620
|
+
return ot.hasMarker(e, cs);
|
2621
2621
|
}
|
2622
2622
|
};
|
2623
2623
|
ls = Oc;
|
2624
|
-
var ds = "AI_JSONParseError", us = `vercel.ai.error.${ds}`, Pc = Symbol.for(us), hs,
|
2624
|
+
var ds = "AI_JSONParseError", us = `vercel.ai.error.${ds}`, Pc = Symbol.for(us), hs, Fa = class extends ot {
|
2625
2625
|
constructor({ text: e, cause: t }) {
|
2626
2626
|
super({
|
2627
2627
|
name: ds,
|
@@ -2631,11 +2631,11 @@ Error message: ${os(t)}`,
|
|
2631
2631
|
}), this[hs] = !0, this.text = e;
|
2632
2632
|
}
|
2633
2633
|
static isInstance(e) {
|
2634
|
-
return
|
2634
|
+
return ot.hasMarker(e, us);
|
2635
2635
|
}
|
2636
2636
|
};
|
2637
2637
|
hs = Pc;
|
2638
|
-
var fs = "AI_TypeValidationError", ms = `vercel.ai.error.${fs}`, Mc = Symbol.for(ms), ps, Lc = class
|
2638
|
+
var fs = "AI_TypeValidationError", ms = `vercel.ai.error.${fs}`, Mc = Symbol.for(ms), ps, Lc = class xr extends ot {
|
2639
2639
|
constructor({ value: t, cause: r }) {
|
2640
2640
|
super({
|
2641
2641
|
name: fs,
|
@@ -2645,7 +2645,7 @@ Error message: ${os(r)}`,
|
|
2645
2645
|
}), this[ps] = !0, this.value = t;
|
2646
2646
|
}
|
2647
2647
|
static isInstance(t) {
|
2648
|
-
return
|
2648
|
+
return ot.hasMarker(t, ms);
|
2649
2649
|
}
|
2650
2650
|
/**
|
2651
2651
|
* Wraps an error into a TypeValidationError.
|
@@ -2661,11 +2661,11 @@ Error message: ${os(r)}`,
|
|
2661
2661
|
value: t,
|
2662
2662
|
cause: r
|
2663
2663
|
}) {
|
2664
|
-
return
|
2664
|
+
return xr.isInstance(r) && r.value === t ? r : new xr({ value: t, cause: r });
|
2665
2665
|
}
|
2666
2666
|
};
|
2667
2667
|
ps = Mc;
|
2668
|
-
var
|
2668
|
+
var Wa = Lc;
|
2669
2669
|
let Dc = (e, t = 21) => (r = t) => {
|
2670
2670
|
let a = "", n = r | 0;
|
2671
2671
|
for (; n--; )
|
@@ -2675,10 +2675,10 @@ let Dc = (e, t = 21) => (r = t) => {
|
|
2675
2675
|
function gs(e) {
|
2676
2676
|
return e && e.__esModule && Object.prototype.hasOwnProperty.call(e, "default") ? e.default : e;
|
2677
2677
|
}
|
2678
|
-
var Ge = { exports: {} },
|
2678
|
+
var Ge = { exports: {} }, ja;
|
2679
2679
|
function Bc() {
|
2680
|
-
if (
|
2681
|
-
|
2680
|
+
if (ja) return Ge.exports;
|
2681
|
+
ja = 1;
|
2682
2682
|
const e = typeof Buffer < "u", t = /"(?:_|\\u005[Ff])(?:_|\\u005[Ff])(?:p|\\u0070)(?:r|\\u0072)(?:o|\\u006[Ff])(?:t|\\u0074)(?:o|\\u006[Ff])(?:_|\\u005[Ff])(?:_|\\u005[Ff])"\s*:/, r = /"(?:c|\\u0063)(?:o|\\u006[Ff])(?:n|\\u006[Ee])(?:s|\\u0073)(?:t|\\u0074)(?:r|\\u0072)(?:u|\\u0075)(?:c|\\u0063)(?:t|\\u0074)(?:o|\\u006[Ff])(?:r|\\u0072)"\s*:/;
|
2683
2683
|
function a(c, l, d) {
|
2684
2684
|
d == null && l !== null && typeof l == "object" && (d = l, l = void 0), e && Buffer.isBuffer(c) && (c = c.toString()), c && c.charCodeAt(0) === 65279 && (c = c.slice(1));
|
@@ -2718,9 +2718,9 @@ function Bc() {
|
|
2718
2718
|
throw new SyntaxError("Object contains forbidden prototype property");
|
2719
2719
|
delete m.constructor;
|
2720
2720
|
}
|
2721
|
-
for (const
|
2722
|
-
const
|
2723
|
-
|
2721
|
+
for (const g in m) {
|
2722
|
+
const y = m[g];
|
2723
|
+
y && typeof y == "object" && u.push(y);
|
2724
2724
|
}
|
2725
2725
|
}
|
2726
2726
|
}
|
@@ -2765,12 +2765,12 @@ var Vc = ({
|
|
2765
2765
|
message: `The separator "${a}" must not be part of the alphabet "${r}".`
|
2766
2766
|
});
|
2767
2767
|
return (s) => `${e}${a}${n(s)}`;
|
2768
|
-
},
|
2768
|
+
}, ta = Vc(), Rr = Symbol.for("vercel.ai.validator");
|
2769
2769
|
function zc(e) {
|
2770
|
-
return { [
|
2770
|
+
return { [Rr]: !0, validate: e };
|
2771
2771
|
}
|
2772
2772
|
function Fc(e) {
|
2773
|
-
return typeof e == "object" && e !== null &&
|
2773
|
+
return typeof e == "object" && e !== null && Rr in e && e[Rr] === !0 && "validate" in e;
|
2774
2774
|
}
|
2775
2775
|
function Wc(e) {
|
2776
2776
|
return Fc(e) ? e : jc(e);
|
@@ -2792,16 +2792,16 @@ function Gc({
|
|
2792
2792
|
const a = r.validate(e);
|
2793
2793
|
return a.success ? a : {
|
2794
2794
|
success: !1,
|
2795
|
-
error:
|
2795
|
+
error: Wa.wrap({ value: e, cause: a.error })
|
2796
2796
|
};
|
2797
2797
|
} catch (a) {
|
2798
2798
|
return {
|
2799
2799
|
success: !1,
|
2800
|
-
error:
|
2800
|
+
error: Wa.wrap({ value: e, cause: a })
|
2801
2801
|
};
|
2802
2802
|
}
|
2803
2803
|
}
|
2804
|
-
function
|
2804
|
+
function Ga({
|
2805
2805
|
text: e,
|
2806
2806
|
schema: t
|
2807
2807
|
}) {
|
@@ -2814,7 +2814,7 @@ function ja({
|
|
2814
2814
|
} catch (r) {
|
2815
2815
|
return {
|
2816
2816
|
success: !1,
|
2817
|
-
error:
|
2817
|
+
error: Fa.isInstance(r) ? r : new Fa({ text: e, cause: r })
|
2818
2818
|
};
|
2819
2819
|
}
|
2820
2820
|
}
|
@@ -3079,8 +3079,8 @@ function Jc(e) {
|
|
3079
3079
|
function qc(e) {
|
3080
3080
|
if (e === void 0)
|
3081
3081
|
return { value: void 0, state: "undefined-input" };
|
3082
|
-
let t =
|
3083
|
-
return t.success ? { value: t.value, state: "successful-parse" } : (t =
|
3082
|
+
let t = Ga({ text: e });
|
3083
|
+
return t.success ? { value: t.value, state: "successful-parse" } : (t = Ga({ text: Jc(e) }), t.success ? { value: t.value, state: "repaired-parse" } : { value: void 0, state: "failed-parse" });
|
3084
3084
|
}
|
3085
3085
|
var Yc = {
|
3086
3086
|
code: "0",
|
@@ -3272,7 +3272,7 @@ var Yc = {
|
|
3272
3272
|
);
|
3273
3273
|
return { type: "file", value: e };
|
3274
3274
|
}
|
3275
|
-
},
|
3275
|
+
}, ra = [
|
3276
3276
|
Yc,
|
3277
3277
|
Qc,
|
3278
3278
|
Xc,
|
@@ -3290,12 +3290,12 @@ var Yc = {
|
|
3290
3290
|
dl,
|
3291
3291
|
ul
|
3292
3292
|
], hl = Object.fromEntries(
|
3293
|
-
|
3293
|
+
ra.map((e) => [e.code, e])
|
3294
3294
|
);
|
3295
3295
|
Object.fromEntries(
|
3296
|
-
|
3296
|
+
ra.map((e) => [e.name, e.code])
|
3297
3297
|
);
|
3298
|
-
var fl =
|
3298
|
+
var fl = ra.map((e) => e.code), ml = (e) => {
|
3299
3299
|
const t = e.indexOf(":");
|
3300
3300
|
if (t === -1)
|
3301
3301
|
throw new Error("Failed to parse stream string. No separator found.");
|
@@ -3327,8 +3327,8 @@ async function yl({
|
|
3327
3327
|
onToolCallPart: u,
|
3328
3328
|
onToolResultPart: h,
|
3329
3329
|
onMessageAnnotationsPart: m,
|
3330
|
-
onFinishMessagePart:
|
3331
|
-
onFinishStepPart:
|
3330
|
+
onFinishMessagePart: g,
|
3331
|
+
onFinishStepPart: y,
|
3332
3332
|
onStartStepPart: w
|
3333
3333
|
}) {
|
3334
3334
|
const v = e.getReader(), C = new TextDecoder(), S = [];
|
@@ -3385,10 +3385,10 @@ async function yl({
|
|
3385
3385
|
await h?.(x);
|
3386
3386
|
break;
|
3387
3387
|
case "finish_message":
|
3388
|
-
await
|
3388
|
+
await g?.(x);
|
3389
3389
|
break;
|
3390
3390
|
case "finish_step":
|
3391
|
-
await
|
3391
|
+
await y?.(x);
|
3392
3392
|
break;
|
3393
3393
|
case "start_step":
|
3394
3394
|
await w?.(x);
|
@@ -3405,7 +3405,7 @@ async function bl({
|
|
3405
3405
|
update: t,
|
3406
3406
|
onToolCall: r,
|
3407
3407
|
onFinish: a,
|
3408
|
-
generateId: n =
|
3408
|
+
generateId: n = ta,
|
3409
3409
|
getCurrentDate: s = () => /* @__PURE__ */ new Date(),
|
3410
3410
|
lastMessage: o
|
3411
3411
|
}) {
|
@@ -3423,8 +3423,8 @@ async function bl({
|
|
3423
3423
|
content: "",
|
3424
3424
|
parts: []
|
3425
3425
|
};
|
3426
|
-
let h, m,
|
3427
|
-
function
|
3426
|
+
let h, m, g;
|
3427
|
+
function y(b, _) {
|
3428
3428
|
const k = u.parts.find(
|
3429
3429
|
(x) => x.type === "tool-invocation" && x.toolInvocation.toolCallId === b
|
3430
3430
|
);
|
@@ -3471,14 +3471,14 @@ async function bl({
|
|
3471
3471
|
},
|
3472
3472
|
onReasoningPart(b) {
|
3473
3473
|
var _;
|
3474
|
-
|
3474
|
+
g == null ? (g = { type: "text", text: b }, m?.details.push(g)) : g.text += b, m == null ? (m = {
|
3475
3475
|
type: "reasoning",
|
3476
3476
|
reasoning: b,
|
3477
|
-
details: [
|
3477
|
+
details: [g]
|
3478
3478
|
}, u.parts.push(m)) : m.reasoning += b, u.reasoning = ((_ = u.reasoning) != null ? _ : "") + b, I();
|
3479
3479
|
},
|
3480
3480
|
onReasoningSignaturePart(b) {
|
3481
|
-
|
3481
|
+
g != null && (g.signature = b.signature);
|
3482
3482
|
},
|
3483
3483
|
onRedactedReasoningPart(b) {
|
3484
3484
|
m == null && (m = {
|
@@ -3488,7 +3488,7 @@ async function bl({
|
|
3488
3488
|
}, u.parts.push(m)), m.details.push({
|
3489
3489
|
type: "redacted",
|
3490
3490
|
data: b.data
|
3491
|
-
}),
|
3491
|
+
}), g = void 0, I();
|
3492
3492
|
},
|
3493
3493
|
onFilePart(b) {
|
3494
3494
|
u.parts.push({
|
@@ -3517,7 +3517,7 @@ async function bl({
|
|
3517
3517
|
toolName: b.toolName,
|
3518
3518
|
args: void 0
|
3519
3519
|
};
|
3520
|
-
u.toolInvocations.push(_),
|
3520
|
+
u.toolInvocations.push(_), y(b.toolCallId, _), I();
|
3521
3521
|
},
|
3522
3522
|
onToolCallDeltaPart(b) {
|
3523
3523
|
const _ = C[b.toolCallId];
|
@@ -3529,7 +3529,7 @@ async function bl({
|
|
3529
3529
|
toolName: _.toolName,
|
3530
3530
|
args: k
|
3531
3531
|
};
|
3532
|
-
u.toolInvocations[_.index] = x,
|
3532
|
+
u.toolInvocations[_.index] = x, y(b.toolCallId, x), I();
|
3533
3533
|
},
|
3534
3534
|
async onToolCallPart(b) {
|
3535
3535
|
const _ = {
|
@@ -3537,7 +3537,7 @@ async function bl({
|
|
3537
3537
|
step: f,
|
3538
3538
|
...b
|
3539
3539
|
};
|
3540
|
-
if (C[b.toolCallId] != null ? u.toolInvocations[C[b.toolCallId].index] = _ : (u.toolInvocations == null && (u.toolInvocations = []), u.toolInvocations.push(_)),
|
3540
|
+
if (C[b.toolCallId] != null ? u.toolInvocations[C[b.toolCallId].index] = _ : (u.toolInvocations == null && (u.toolInvocations = []), u.toolInvocations.push(_)), y(b.toolCallId, _), I(), r) {
|
3541
3541
|
const k = await r({ toolCall: b });
|
3542
3542
|
if (k != null) {
|
3543
3543
|
const x = {
|
@@ -3546,7 +3546,7 @@ async function bl({
|
|
3546
3546
|
...b,
|
3547
3547
|
result: k
|
3548
3548
|
};
|
3549
|
-
u.toolInvocations[u.toolInvocations.length - 1] = x,
|
3549
|
+
u.toolInvocations[u.toolInvocations.length - 1] = x, y(b.toolCallId, x), I();
|
3550
3550
|
}
|
3551
3551
|
}
|
3552
3552
|
},
|
@@ -3566,7 +3566,7 @@ async function bl({
|
|
3566
3566
|
state: "result",
|
3567
3567
|
...b
|
3568
3568
|
};
|
3569
|
-
_[k] = x,
|
3569
|
+
_[k] = x, y(b.toolCallId, x), I();
|
3570
3570
|
},
|
3571
3571
|
onDataPart(b) {
|
3572
3572
|
w.push(...b), I();
|
@@ -3575,7 +3575,7 @@ async function bl({
|
|
3575
3575
|
v == null ? v = [...b] : v.push(...b), I();
|
3576
3576
|
},
|
3577
3577
|
onFinishStepPart(b) {
|
3578
|
-
f += 1, h = b.isContinued ? h : void 0, m = void 0,
|
3578
|
+
f += 1, h = b.isContinued ? h : void 0, m = void 0, g = void 0;
|
3579
3579
|
},
|
3580
3580
|
onStartStepPart(b) {
|
3581
3581
|
d || (u.id = b.messageId), u.parts.push({ type: "step-start" }), I();
|
@@ -3605,7 +3605,7 @@ async function wl({
|
|
3605
3605
|
update: t,
|
3606
3606
|
onFinish: r,
|
3607
3607
|
getCurrentDate: a = () => /* @__PURE__ */ new Date(),
|
3608
|
-
generateId: n =
|
3608
|
+
generateId: n = ta
|
3609
3609
|
}) {
|
3610
3610
|
const s = { type: "text", text: "" }, o = {
|
3611
3611
|
id: n(),
|
@@ -3644,16 +3644,16 @@ async function kl({
|
|
3644
3644
|
generateId: u,
|
3645
3645
|
fetch: h = El(),
|
3646
3646
|
lastMessage: m,
|
3647
|
-
requestType:
|
3647
|
+
requestType: g = "generate"
|
3648
3648
|
}) {
|
3649
|
-
var
|
3650
|
-
const S = await (
|
3649
|
+
var y, w, v;
|
3650
|
+
const S = await (g === "resume" ? h(`${e}?chatId=${t.id}`, {
|
3651
3651
|
method: "GET",
|
3652
3652
|
headers: {
|
3653
3653
|
"Content-Type": "application/json",
|
3654
3654
|
...n
|
3655
3655
|
},
|
3656
|
-
signal: (
|
3656
|
+
signal: (y = s?.()) == null ? void 0 : y.signal,
|
3657
3657
|
credentials: a
|
3658
3658
|
}) : h(e, {
|
3659
3659
|
method: "POST",
|
@@ -3708,7 +3708,7 @@ async function kl({
|
|
3708
3708
|
}
|
3709
3709
|
}
|
3710
3710
|
}
|
3711
|
-
function
|
3711
|
+
function Ar(e) {
|
3712
3712
|
return e?.reduce((t, r) => {
|
3713
3713
|
var a;
|
3714
3714
|
return Math.max(t, (a = r.step) != null ? a : 0);
|
@@ -3731,13 +3731,13 @@ function ys(e) {
|
|
3731
3731
|
...e.content ? [{ type: "text", text: e.content }] : []
|
3732
3732
|
];
|
3733
3733
|
}
|
3734
|
-
function
|
3734
|
+
function sr(e) {
|
3735
3735
|
return e.map((t) => ({
|
3736
3736
|
...t,
|
3737
3737
|
parts: ys(t)
|
3738
3738
|
}));
|
3739
3739
|
}
|
3740
|
-
function
|
3740
|
+
function Nr(e, t) {
|
3741
3741
|
if (e === t)
|
3742
3742
|
return !0;
|
3743
3743
|
if (e == null || t == null)
|
@@ -3752,7 +3752,7 @@ function Ar(e, t) {
|
|
3752
3752
|
if (e.length !== t.length)
|
3753
3753
|
return !1;
|
3754
3754
|
for (let n = 0; n < e.length; n++)
|
3755
|
-
if (!
|
3755
|
+
if (!Nr(e[n], t[n]))
|
3756
3756
|
return !1;
|
3757
3757
|
return !0;
|
3758
3758
|
}
|
@@ -3760,11 +3760,11 @@ function Ar(e, t) {
|
|
3760
3760
|
if (r.length !== a.length)
|
3761
3761
|
return !1;
|
3762
3762
|
for (const n of r)
|
3763
|
-
if (!a.includes(n) || !
|
3763
|
+
if (!a.includes(n) || !Nr(e[n], t[n]))
|
3764
3764
|
return !1;
|
3765
3765
|
return !0;
|
3766
3766
|
}
|
3767
|
-
async function
|
3767
|
+
async function Ka(e) {
|
3768
3768
|
if (!e)
|
3769
3769
|
return [];
|
3770
3770
|
if (globalThis.FileList && e instanceof globalThis.FileList)
|
@@ -3800,9 +3800,9 @@ function _l({
|
|
3800
3800
|
// check if the feature is enabled:
|
3801
3801
|
r > 1 && // ensure there is a last message:
|
3802
3802
|
s != null && // ensure we actually have new steps (to prevent infinite loops in case of errors):
|
3803
|
-
(a.length > t ||
|
3803
|
+
(a.length > t || Ar(s.toolInvocations) !== e) && // check that next step is possible:
|
3804
3804
|
bs(s) && // limit the number of automatic steps:
|
3805
|
-
((n =
|
3805
|
+
((n = Ar(s.toolInvocations)) != null ? n : 0) < r
|
3806
3806
|
);
|
3807
3807
|
}
|
3808
3808
|
function bs(e) {
|
@@ -3831,7 +3831,7 @@ function Sl({
|
|
3831
3831
|
(c) => c.toolCallId === t ? o : c
|
3832
3832
|
);
|
3833
3833
|
}
|
3834
|
-
var It = { exports: {} },
|
3834
|
+
var It = { exports: {} }, or = {};
|
3835
3835
|
/**
|
3836
3836
|
* @license React
|
3837
3837
|
* use-sync-external-store-shim.production.js
|
@@ -3841,26 +3841,26 @@ var It = { exports: {} }, sr = {};
|
|
3841
3841
|
* This source code is licensed under the MIT license found in the
|
3842
3842
|
* LICENSE file in the root directory of this source tree.
|
3843
3843
|
*/
|
3844
|
-
var
|
3844
|
+
var Ja;
|
3845
3845
|
function Tl() {
|
3846
|
-
if (
|
3847
|
-
|
3846
|
+
if (Ja) return or;
|
3847
|
+
Ja = 1;
|
3848
3848
|
var e = Z;
|
3849
3849
|
function t(u, h) {
|
3850
3850
|
return u === h && (u !== 0 || 1 / u === 1 / h) || u !== u && h !== h;
|
3851
3851
|
}
|
3852
3852
|
var r = typeof Object.is == "function" ? Object.is : t, a = e.useState, n = e.useEffect, s = e.useLayoutEffect, o = e.useDebugValue;
|
3853
3853
|
function c(u, h) {
|
3854
|
-
var m = h(),
|
3854
|
+
var m = h(), g = a({ inst: { value: m, getSnapshot: h } }), y = g[0].inst, w = g[1];
|
3855
3855
|
return s(
|
3856
3856
|
function() {
|
3857
|
-
|
3857
|
+
y.value = m, y.getSnapshot = h, l(y) && w({ inst: y });
|
3858
3858
|
},
|
3859
3859
|
[u, m, h]
|
3860
3860
|
), n(
|
3861
3861
|
function() {
|
3862
|
-
return l(
|
3863
|
-
l(
|
3862
|
+
return l(y) && w({ inst: y }), u(function() {
|
3863
|
+
l(y) && w({ inst: y });
|
3864
3864
|
});
|
3865
3865
|
},
|
3866
3866
|
[u]
|
@@ -3880,9 +3880,9 @@ function Tl() {
|
|
3880
3880
|
return h();
|
3881
3881
|
}
|
3882
3882
|
var f = typeof window > "u" || typeof window.document > "u" || typeof window.document.createElement > "u" ? d : c;
|
3883
|
-
return
|
3883
|
+
return or.useSyncExternalStore = e.useSyncExternalStore !== void 0 ? e.useSyncExternalStore : f, or;
|
3884
3884
|
}
|
3885
|
-
var
|
3885
|
+
var ir = {};
|
3886
3886
|
/**
|
3887
3887
|
* @license React
|
3888
3888
|
* use-sync-external-store-shim.development.js
|
@@ -3892,32 +3892,32 @@ var or = {};
|
|
3892
3892
|
* This source code is licensed under the MIT license found in the
|
3893
3893
|
* LICENSE file in the root directory of this source tree.
|
3894
3894
|
*/
|
3895
|
-
var
|
3895
|
+
var qa;
|
3896
3896
|
function Cl() {
|
3897
|
-
return
|
3898
|
-
function e(m,
|
3899
|
-
return m ===
|
3897
|
+
return qa || (qa = 1, process.env.NODE_ENV !== "production" && function() {
|
3898
|
+
function e(m, g) {
|
3899
|
+
return m === g && (m !== 0 || 1 / m === 1 / g) || m !== m && g !== g;
|
3900
3900
|
}
|
3901
|
-
function t(m,
|
3901
|
+
function t(m, g) {
|
3902
3902
|
f || n.startTransition === void 0 || (f = !0, console.error(
|
3903
3903
|
"You are using an outdated, pre-release alpha of React 18 that does not support useSyncExternalStore. The use-sync-external-store shim will not work correctly. Upgrade to a newer pre-release."
|
3904
3904
|
));
|
3905
|
-
var
|
3905
|
+
var y = g();
|
3906
3906
|
if (!u) {
|
3907
|
-
var w =
|
3908
|
-
s(
|
3907
|
+
var w = g();
|
3908
|
+
s(y, w) || (console.error(
|
3909
3909
|
"The result of getSnapshot should be cached to avoid an infinite loop"
|
3910
3910
|
), u = !0);
|
3911
3911
|
}
|
3912
3912
|
w = o({
|
3913
|
-
inst: { value:
|
3913
|
+
inst: { value: y, getSnapshot: g }
|
3914
3914
|
});
|
3915
3915
|
var v = w[0].inst, C = w[1];
|
3916
3916
|
return l(
|
3917
3917
|
function() {
|
3918
|
-
v.value =
|
3918
|
+
v.value = y, v.getSnapshot = g, r(v) && C({ inst: v });
|
3919
3919
|
},
|
3920
|
-
[m,
|
3920
|
+
[m, y, g]
|
3921
3921
|
), c(
|
3922
3922
|
function() {
|
3923
3923
|
return r(v) && C({ inst: v }), m(function() {
|
@@ -3925,34 +3925,34 @@ function Cl() {
|
|
3925
3925
|
});
|
3926
3926
|
},
|
3927
3927
|
[m]
|
3928
|
-
), d(
|
3928
|
+
), d(y), y;
|
3929
3929
|
}
|
3930
3930
|
function r(m) {
|
3931
|
-
var
|
3931
|
+
var g = m.getSnapshot;
|
3932
3932
|
m = m.value;
|
3933
3933
|
try {
|
3934
|
-
var
|
3935
|
-
return !s(m,
|
3934
|
+
var y = g();
|
3935
|
+
return !s(m, y);
|
3936
3936
|
} catch {
|
3937
3937
|
return !0;
|
3938
3938
|
}
|
3939
3939
|
}
|
3940
|
-
function a(m,
|
3941
|
-
return
|
3940
|
+
function a(m, g) {
|
3941
|
+
return g();
|
3942
3942
|
}
|
3943
3943
|
typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ < "u" && typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart == "function" && __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(Error());
|
3944
3944
|
var n = Z, s = typeof Object.is == "function" ? Object.is : e, o = n.useState, c = n.useEffect, l = n.useLayoutEffect, d = n.useDebugValue, f = !1, u = !1, h = typeof window > "u" || typeof window.document > "u" || typeof window.document.createElement > "u" ? a : t;
|
3945
|
-
|
3946
|
-
}()),
|
3945
|
+
ir.useSyncExternalStore = n.useSyncExternalStore !== void 0 ? n.useSyncExternalStore : h, typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ < "u" && typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop == "function" && __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(Error());
|
3946
|
+
}()), ir;
|
3947
3947
|
}
|
3948
|
-
var
|
3948
|
+
var Ya;
|
3949
3949
|
function Il() {
|
3950
|
-
return
|
3950
|
+
return Ya || (Ya = 1, process.env.NODE_ENV === "production" ? It.exports = /* @__PURE__ */ Tl() : It.exports = /* @__PURE__ */ Cl()), It.exports;
|
3951
3951
|
}
|
3952
3952
|
var xl = /* @__PURE__ */ Il();
|
3953
|
-
const vs = 0, ws = 1, Es = 2,
|
3954
|
-
var
|
3955
|
-
function
|
3953
|
+
const vs = 0, ws = 1, Es = 2, Qa = 3;
|
3954
|
+
var Xa = Object.prototype.hasOwnProperty;
|
3955
|
+
function Or(e, t) {
|
3956
3956
|
var r, a;
|
3957
3957
|
if (e === t) return !0;
|
3958
3958
|
if (e && t && (r = e.constructor) === t.constructor) {
|
@@ -3960,13 +3960,13 @@ function Nr(e, t) {
|
|
3960
3960
|
if (r === RegExp) return e.toString() === t.toString();
|
3961
3961
|
if (r === Array) {
|
3962
3962
|
if ((a = e.length) === t.length)
|
3963
|
-
for (; a-- &&
|
3963
|
+
for (; a-- && Or(e[a], t[a]); ) ;
|
3964
3964
|
return a === -1;
|
3965
3965
|
}
|
3966
3966
|
if (!r || typeof e == "object") {
|
3967
3967
|
a = 0;
|
3968
3968
|
for (r in e)
|
3969
|
-
if (
|
3969
|
+
if (Xa.call(e, r) && ++a && !Xa.call(t, r) || !(r in t) || !Or(e[r], t[r])) return !1;
|
3970
3970
|
return Object.keys(t).length === a;
|
3971
3971
|
}
|
3972
3972
|
}
|
@@ -3976,47 +3976,47 @@ const Ne = /* @__PURE__ */ new WeakMap(), Le = () => {
|
|
3976
3976
|
}, de = (
|
3977
3977
|
/*#__NOINLINE__*/
|
3978
3978
|
Le()
|
3979
|
-
),
|
3979
|
+
), $r = Object, G = (e) => e === de, Se = (e) => typeof e == "function", He = (e, t) => ({
|
3980
3980
|
...e,
|
3981
3981
|
...t
|
3982
|
-
}), ks = (e) => Se(e.then),
|
3982
|
+
}), ks = (e) => Se(e.then), cr = {}, xt = {}, aa = "undefined", wt = typeof window != aa, Pr = typeof document != aa, Rl = wt && "Deno" in window, Al = () => wt && typeof window.requestAnimationFrame != aa, _s = (e, t) => {
|
3983
3983
|
const r = Ne.get(e);
|
3984
3984
|
return [
|
3985
3985
|
// Getter
|
3986
|
-
() => !G(t) && e.get(t) ||
|
3986
|
+
() => !G(t) && e.get(t) || cr,
|
3987
3987
|
// Setter
|
3988
3988
|
(a) => {
|
3989
3989
|
if (!G(t)) {
|
3990
3990
|
const n = e.get(t);
|
3991
|
-
t in xt || (xt[t] = n), r[5](t, He(n, a), n ||
|
3991
|
+
t in xt || (xt[t] = n), r[5](t, He(n, a), n || cr);
|
3992
3992
|
}
|
3993
3993
|
},
|
3994
3994
|
// Subscriber
|
3995
3995
|
r[6],
|
3996
3996
|
// Get server cache snapshot
|
3997
|
-
() => !G(t) && t in xt ? xt[t] : !G(t) && e.get(t) ||
|
3997
|
+
() => !G(t) && t in xt ? xt[t] : !G(t) && e.get(t) || cr
|
3998
3998
|
];
|
3999
3999
|
};
|
4000
|
-
let
|
4001
|
-
const Nl = () =>
|
4000
|
+
let Mr = !0;
|
4001
|
+
const Nl = () => Mr, [Lr, Dr] = wt && window.addEventListener ? [
|
4002
4002
|
window.addEventListener.bind(window),
|
4003
4003
|
window.removeEventListener.bind(window)
|
4004
4004
|
] : [
|
4005
4005
|
Le,
|
4006
4006
|
Le
|
4007
4007
|
], Ol = () => {
|
4008
|
-
const e =
|
4008
|
+
const e = Pr && document.visibilityState;
|
4009
4009
|
return G(e) || e !== "hidden";
|
4010
|
-
}, $l = (e) => (
|
4011
|
-
|
4010
|
+
}, $l = (e) => (Pr && document.addEventListener("visibilitychange", e), Lr("focus", e), () => {
|
4011
|
+
Pr && document.removeEventListener("visibilitychange", e), Dr("focus", e);
|
4012
4012
|
}), Pl = (e) => {
|
4013
4013
|
const t = () => {
|
4014
|
-
|
4014
|
+
Mr = !0, e();
|
4015
4015
|
}, r = () => {
|
4016
|
-
|
4016
|
+
Mr = !1;
|
4017
4017
|
};
|
4018
|
-
return
|
4019
|
-
|
4018
|
+
return Lr("online", t), Lr("offline", r), () => {
|
4019
|
+
Dr("online", t), Dr("offline", r);
|
4020
4020
|
};
|
4021
4021
|
}, Ml = {
|
4022
4022
|
isOnline: Nl,
|
@@ -4024,32 +4024,32 @@ const Nl = () => Pr, [Mr, Lr] = wt && window.addEventListener ? [
|
|
4024
4024
|
}, Ll = {
|
4025
4025
|
initFocus: $l,
|
4026
4026
|
initReconnect: Pl
|
4027
|
-
},
|
4027
|
+
}, Za = !Z.useId, bt = !wt || Rl, Dl = (e) => Al() ? window.requestAnimationFrame(e) : setTimeout(e, 1), lr = bt ? $ : Oe, dr = typeof navigator < "u" && navigator.connection, en = !bt && dr && ([
|
4028
4028
|
"slow-2g",
|
4029
4029
|
"2g"
|
4030
|
-
].includes(
|
4030
|
+
].includes(dr.effectiveType) || dr.saveData), Rt = /* @__PURE__ */ new WeakMap(), Bl = (e) => $r.prototype.toString.call(e), ur = (e, t) => e === `[object ${t}]`;
|
4031
4031
|
let Ul = 0;
|
4032
|
-
const
|
4033
|
-
const t = typeof e, r = Bl(e), a =
|
4032
|
+
const Br = (e) => {
|
4033
|
+
const t = typeof e, r = Bl(e), a = ur(r, "Date"), n = ur(r, "RegExp"), s = ur(r, "Object");
|
4034
4034
|
let o, c;
|
4035
|
-
if (
|
4035
|
+
if ($r(e) === e && !a && !n) {
|
4036
4036
|
if (o = Rt.get(e), o) return o;
|
4037
4037
|
if (o = ++Ul + "~", Rt.set(e, o), Array.isArray(e)) {
|
4038
4038
|
for (o = "@", c = 0; c < e.length; c++)
|
4039
|
-
o +=
|
4039
|
+
o += Br(e[c]) + ",";
|
4040
4040
|
Rt.set(e, o);
|
4041
4041
|
}
|
4042
4042
|
if (s) {
|
4043
4043
|
o = "#";
|
4044
|
-
const l =
|
4044
|
+
const l = $r.keys(e).sort();
|
4045
4045
|
for (; !G(c = l.pop()); )
|
4046
|
-
G(e[c]) || (o += c + ":" +
|
4046
|
+
G(e[c]) || (o += c + ":" + Br(e[c]) + ",");
|
4047
4047
|
Rt.set(e, o);
|
4048
4048
|
}
|
4049
4049
|
} else
|
4050
4050
|
o = a ? e.toJSON() : t == "symbol" ? e.toString() : t == "string" ? JSON.stringify(e) : "" + e;
|
4051
4051
|
return o;
|
4052
|
-
},
|
4052
|
+
}, na = (e) => {
|
4053
4053
|
if (Se(e))
|
4054
4054
|
try {
|
4055
4055
|
e = e();
|
@@ -4057,13 +4057,13 @@ const Dr = (e) => {
|
|
4057
4057
|
e = "";
|
4058
4058
|
}
|
4059
4059
|
const t = e;
|
4060
|
-
return e = typeof e == "string" ? e : (Array.isArray(e) ? e.length : e) ?
|
4060
|
+
return e = typeof e == "string" ? e : (Array.isArray(e) ? e.length : e) ? Br(e) : "", [
|
4061
4061
|
e,
|
4062
4062
|
t
|
4063
4063
|
];
|
4064
4064
|
};
|
4065
4065
|
let Hl = 0;
|
4066
|
-
const
|
4066
|
+
const Ur = () => ++Hl;
|
4067
4067
|
async function Ss(...e) {
|
4068
4068
|
const [t, r, a, n] = e, s = He({
|
4069
4069
|
populateCache: !0,
|
@@ -4076,30 +4076,30 @@ async function Ss(...e) {
|
|
4076
4076
|
let l = s.optimisticData;
|
4077
4077
|
const d = (h) => typeof c == "function" ? c(h) : c !== !1, f = s.throwOnError;
|
4078
4078
|
if (Se(r)) {
|
4079
|
-
const h = r, m = [],
|
4080
|
-
for (const
|
4079
|
+
const h = r, m = [], g = t.keys();
|
4080
|
+
for (const y of g)
|
4081
4081
|
// Skip the special useSWRInfinite and useSWRSubscription keys.
|
4082
|
-
!/^\$(inf|sub)\$/.test(
|
4082
|
+
!/^\$(inf|sub)\$/.test(y) && h(t.get(y)._k) && m.push(y);
|
4083
4083
|
return Promise.all(m.map(u));
|
4084
4084
|
}
|
4085
4085
|
return u(r);
|
4086
4086
|
async function u(h) {
|
4087
|
-
const [m] =
|
4087
|
+
const [m] = na(h);
|
4088
4088
|
if (!m) return;
|
4089
|
-
const [
|
4089
|
+
const [g, y] = _s(t, m), [w, v, C, S] = Ne.get(t), O = () => {
|
4090
4090
|
const P = w[m];
|
4091
|
-
return (Se(s.revalidate) ? s.revalidate(
|
4091
|
+
return (Se(s.revalidate) ? s.revalidate(g().data, h) : s.revalidate !== !1) && (delete C[m], delete S[m], P && P[0]) ? P[0](Es).then(() => g().data) : g().data;
|
4092
4092
|
};
|
4093
4093
|
if (e.length < 3)
|
4094
4094
|
return O();
|
4095
4095
|
let I = a, b, _ = !1;
|
4096
|
-
const k =
|
4096
|
+
const k = Ur();
|
4097
4097
|
v[m] = [
|
4098
4098
|
k,
|
4099
4099
|
0
|
4100
4100
|
];
|
4101
|
-
const x = !G(l), E =
|
4102
|
-
if (x && (l = Se(l) ? l(W, F) : l,
|
4101
|
+
const x = !G(l), E = g(), F = E.data, A = E._c, W = G(A) ? F : A;
|
4102
|
+
if (x && (l = Se(l) ? l(W, F) : l, y({
|
4103
4103
|
data: l,
|
4104
4104
|
_c: W
|
4105
4105
|
})), Se(I))
|
@@ -4114,26 +4114,26 @@ async function Ss(...e) {
|
|
4114
4114
|
}), k !== v[m][0]) {
|
4115
4115
|
if (_) throw b;
|
4116
4116
|
return I;
|
4117
|
-
} else _ && x && d(b) && (o = !0,
|
4117
|
+
} else _ && x && d(b) && (o = !0, y({
|
4118
4118
|
data: W,
|
4119
4119
|
_c: de
|
4120
4120
|
}));
|
4121
4121
|
if (o && !_)
|
4122
4122
|
if (Se(o)) {
|
4123
4123
|
const P = o(I, W);
|
4124
|
-
|
4124
|
+
y({
|
4125
4125
|
data: P,
|
4126
4126
|
error: de,
|
4127
4127
|
_c: de
|
4128
4128
|
});
|
4129
4129
|
} else
|
4130
|
-
|
4130
|
+
y({
|
4131
4131
|
data: I,
|
4132
4132
|
error: de,
|
4133
4133
|
_c: de
|
4134
4134
|
});
|
4135
|
-
if (v[m][1] =
|
4136
|
-
|
4135
|
+
if (v[m][1] = Ur(), Promise.resolve(O()).then(() => {
|
4136
|
+
y({
|
4137
4137
|
_c: de
|
4138
4138
|
});
|
4139
4139
|
}), _) {
|
@@ -4143,7 +4143,7 @@ async function Ss(...e) {
|
|
4143
4143
|
return I;
|
4144
4144
|
}
|
4145
4145
|
}
|
4146
|
-
const
|
4146
|
+
const tn = (e, t) => {
|
4147
4147
|
for (const r in e)
|
4148
4148
|
e[r][0] && e[r][0](t);
|
4149
4149
|
}, Vl = (e, t) => {
|
@@ -4157,8 +4157,8 @@ const en = (e, t) => {
|
|
4157
4157
|
e.set(f, u);
|
4158
4158
|
const m = o[f];
|
4159
4159
|
if (m)
|
4160
|
-
for (const
|
4161
|
-
|
4160
|
+
for (const g of m)
|
4161
|
+
g(u, h);
|
4162
4162
|
}, d = () => {
|
4163
4163
|
if (!Ne.has(e) && (Ne.set(e, [
|
4164
4164
|
a,
|
@@ -4169,7 +4169,7 @@ const en = (e, t) => {
|
|
4169
4169
|
l,
|
4170
4170
|
c
|
4171
4171
|
]), !bt)) {
|
4172
|
-
const f = r.initFocus(setTimeout.bind(de,
|
4172
|
+
const f = r.initFocus(setTimeout.bind(de, tn.bind(de, a, vs))), u = r.initReconnect(setTimeout.bind(de, tn.bind(de, a, ws)));
|
4173
4173
|
s = () => {
|
4174
4174
|
f && f(), u && u(), Ne.delete(e);
|
4175
4175
|
};
|
@@ -4189,7 +4189,7 @@ const en = (e, t) => {
|
|
4189
4189
|
}, zl = (e, t, r, a, n) => {
|
4190
4190
|
const s = r.errorRetryCount, o = n.retryCount, c = ~~((Math.random() + 0.5) * (1 << (o < 8 ? o : 8))) * r.errorRetryInterval;
|
4191
4191
|
!G(s) && o > s || setTimeout(a, c, n);
|
4192
|
-
}, Fl =
|
4192
|
+
}, Fl = Or, [Ts, Wl] = Vl(/* @__PURE__ */ new Map()), jl = He(
|
4193
4193
|
{
|
4194
4194
|
// events
|
4195
4195
|
onLoadingSlow: Le,
|
@@ -4203,10 +4203,10 @@ const en = (e, t) => {
|
|
4203
4203
|
revalidateIfStale: !0,
|
4204
4204
|
shouldRetryOnError: !0,
|
4205
4205
|
// timeouts
|
4206
|
-
errorRetryInterval:
|
4206
|
+
errorRetryInterval: en ? 1e4 : 5e3,
|
4207
4207
|
focusThrottleInterval: 5 * 1e3,
|
4208
4208
|
dedupingInterval: 2 * 1e3,
|
4209
|
-
loadingTimeout:
|
4209
|
+
loadingTimeout: en ? 5e3 : 3e3,
|
4210
4210
|
// providers
|
4211
4211
|
compare: Fl,
|
4212
4212
|
isPaused: () => !1,
|
@@ -4234,7 +4234,7 @@ const en = (e, t) => {
|
|
4234
4234
|
null,
|
4235
4235
|
(e[1] === null ? e[2] : e[1]) || {}
|
4236
4236
|
], Xl = () => He(jl, X(Kl)), Zl = (e) => (t, r, a) => e(t, r && ((...s) => {
|
4237
|
-
const [o] =
|
4237
|
+
const [o] = na(t), [, , , c] = Ne.get(Ts);
|
4238
4238
|
if (o.startsWith(Jl))
|
4239
4239
|
return r(...s);
|
4240
4240
|
const l = c[o];
|
@@ -4254,7 +4254,7 @@ const en = (e, t) => {
|
|
4254
4254
|
};
|
4255
4255
|
};
|
4256
4256
|
Yl();
|
4257
|
-
const
|
4257
|
+
const hr = Z.use || // This extra generic is to avoid TypeScript mixing up the generic and JSX sytax
|
4258
4258
|
// and emitting an error.
|
4259
4259
|
// We assume that this is only for the `use(thenable)` case, not `use(context)`.
|
4260
4260
|
// https://github.com/facebook/react/blob/aed00dacfb79d17c53218404c52b1c7aa59c4a89/packages/react-server/src/ReactFizzThenable.js#L45
|
@@ -4273,10 +4273,10 @@ const ur = Z.use || // This extra generic is to avoid TypeScript mixing up the g
|
|
4273
4273
|
e.status = "rejected", e.reason = t;
|
4274
4274
|
}), e;
|
4275
4275
|
}
|
4276
|
-
}),
|
4276
|
+
}), fr = {
|
4277
4277
|
dedupe: !0
|
4278
4278
|
}, ad = (e, t, r) => {
|
4279
|
-
const { cache: a, compare: n, suspense: s, fallbackData: o, revalidateOnMount: c, revalidateIfStale: l, refreshInterval: d, refreshWhenHidden: f, refreshWhenOffline: u, keepPreviousData: h } = r, [m,
|
4279
|
+
const { cache: a, compare: n, suspense: s, fallbackData: o, revalidateOnMount: c, revalidateIfStale: l, refreshInterval: d, refreshWhenHidden: f, refreshWhenOffline: u, keepPreviousData: h } = r, [m, g, y, w] = Ne.get(a), [v, C] = na(e), S = R(!1), O = R(!1), I = R(v), b = R(t), _ = R(r), k = () => _.current, x = () => k().isVisible() && k().isOnline(), [E, F, A, W] = _s(a, v), P = R({}).current, J = G(o) ? G(r.fallback) ? de : r.fallback[v] : o, Q = (D, N) => {
|
4280
4280
|
for (const j in P) {
|
4281
4281
|
const H = j;
|
4282
4282
|
if (H === "data") {
|
@@ -4315,20 +4315,20 @@ const ur = Z.use || // This extra generic is to avoid TypeScript mixing up the g
|
|
4315
4315
|
a,
|
4316
4316
|
v
|
4317
4317
|
]
|
4318
|
-
), L[0], L[1]), q = !S.current, B = m[v] && m[v].length > 0, ge = M.data, ve = G(ge) ? J && ks(J) ?
|
4318
|
+
), L[0], L[1]), q = !S.current, B = m[v] && m[v].length > 0, ge = M.data, ve = G(ge) ? J && ks(J) ? hr(J) : J : ge, Pe = M.error, We = R(ve), Me = h ? G(ge) ? G(We.current) ? ve : We.current : ge : ve, je = B && !G(Pe) ? !1 : q && !G(c) ? c : k().isPaused() ? !1 : s ? G(ve) ? !1 : l : G(ve) || l, _e = !!(v && t && q && je), K = G(M.isValidating) ? _e : M.isValidating, se = G(M.isLoading) ? _e : M.isLoading, ie = V(
|
4319
4319
|
async (D) => {
|
4320
4320
|
const N = b.current;
|
4321
4321
|
if (!v || !N || O.current || k().isPaused())
|
4322
4322
|
return !1;
|
4323
4323
|
let j, H, ne = !0;
|
4324
|
-
const fe = D || {}, te = !
|
4324
|
+
const fe = D || {}, te = !y[v] || !fe.dedupe, ee = () => Za ? !O.current && v === I.current && S.current : v === I.current, me = {
|
4325
4325
|
isValidating: !1,
|
4326
4326
|
isLoading: !1
|
4327
4327
|
}, Et = () => {
|
4328
4328
|
F(me);
|
4329
4329
|
}, kt = () => {
|
4330
|
-
const le =
|
4331
|
-
le && le[1] === H && delete
|
4330
|
+
const le = y[v];
|
4331
|
+
le && le[1] === H && delete y[v];
|
4332
4332
|
}, _t = {
|
4333
4333
|
isValidating: !0
|
4334
4334
|
};
|
@@ -4336,13 +4336,13 @@ const ur = Z.use || // This extra generic is to avoid TypeScript mixing up the g
|
|
4336
4336
|
try {
|
4337
4337
|
if (te && (F(_t), r.loadingTimeout && G(E().data) && setTimeout(() => {
|
4338
4338
|
ne && ee() && k().onLoadingSlow(v, r);
|
4339
|
-
}, r.loadingTimeout),
|
4339
|
+
}, r.loadingTimeout), y[v] = [
|
4340
4340
|
N(C),
|
4341
|
-
|
4342
|
-
]), [j, H] =
|
4341
|
+
Ur()
|
4342
|
+
]), [j, H] = y[v], j = await j, te && setTimeout(kt, r.dedupingInterval), !y[v] || y[v][1] !== H)
|
4343
4343
|
return te && ee() && k().onDiscarded(v), !1;
|
4344
4344
|
me.error = de;
|
4345
|
-
const le =
|
4345
|
+
const le = g[v];
|
4346
4346
|
if (!G(le) && // case 1
|
4347
4347
|
(H <= le[0] || // case 2
|
4348
4348
|
H <= le[1] || // case 3
|
@@ -4353,9 +4353,9 @@ const ur = Z.use || // This extra generic is to avoid TypeScript mixing up the g
|
|
4353
4353
|
} catch (le) {
|
4354
4354
|
kt();
|
4355
4355
|
const pe = k(), { shouldRetryOnError: Ie } = pe;
|
4356
|
-
pe.isPaused() || (me.error = le, te && ee() && (pe.onError(le, v, pe), (Ie === !0 || Se(Ie) && Ie(le)) && (!k().revalidateOnFocus || !k().revalidateOnReconnect || x()) && pe.onErrorRetry(le, v, pe, (
|
4357
|
-
const
|
4358
|
-
|
4356
|
+
pe.isPaused() || (me.error = le, te && ee() && (pe.onError(le, v, pe), (Ie === !0 || Se(Ie) && Ie(le)) && (!k().revalidateOnFocus || !k().revalidateOnReconnect || x()) && pe.onErrorRetry(le, v, pe, (Ze) => {
|
4357
|
+
const et = m[v];
|
4358
|
+
et && et[0] && et[0](Qa, Ze);
|
4359
4359
|
}, {
|
4360
4360
|
retryCount: (fe.retryCount || 0) + 1,
|
4361
4361
|
dedupe: !0
|
@@ -4384,11 +4384,11 @@ const ur = Z.use || // This extra generic is to avoid TypeScript mixing up the g
|
|
4384
4384
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
4385
4385
|
[]
|
4386
4386
|
);
|
4387
|
-
if (
|
4387
|
+
if (lr(() => {
|
4388
4388
|
b.current = t, _.current = r, G(ge) || (We.current = ge);
|
4389
|
-
}),
|
4389
|
+
}), lr(() => {
|
4390
4390
|
if (!v) return;
|
4391
|
-
const D = ie.bind(de,
|
4391
|
+
const D = ie.bind(de, fr);
|
4392
4392
|
let N = 0;
|
4393
4393
|
k().revalidateOnFocus && (N = Date.now() + k().focusThrottleInterval);
|
4394
4394
|
const H = rd(v, m, (ne, fe = {}) => {
|
@@ -4400,25 +4400,25 @@ const ur = Z.use || // This extra generic is to avoid TypeScript mixing up the g
|
|
4400
4400
|
else {
|
4401
4401
|
if (ne == Es)
|
4402
4402
|
return ie();
|
4403
|
-
if (ne ==
|
4403
|
+
if (ne == Qa)
|
4404
4404
|
return ie(fe);
|
4405
4405
|
}
|
4406
4406
|
});
|
4407
4407
|
return O.current = !1, I.current = v, S.current = !0, F({
|
4408
4408
|
_k: C
|
4409
|
-
}), je && (
|
4409
|
+
}), je && (y[v] || (G(ve) || bt ? D() : Dl(D))), () => {
|
4410
4410
|
O.current = !0, H();
|
4411
4411
|
};
|
4412
4412
|
}, [
|
4413
4413
|
v
|
4414
|
-
]),
|
4414
|
+
]), lr(() => {
|
4415
4415
|
let D;
|
4416
4416
|
function N() {
|
4417
4417
|
const H = Se(d) ? d(E().data) : d;
|
4418
4418
|
H && D !== -1 && (D = setTimeout(j, H));
|
4419
4419
|
}
|
4420
4420
|
function j() {
|
4421
|
-
!E().error && (f || k().isVisible()) && (u || k().isOnline()) ? ie(
|
4421
|
+
!E().error && (f || k().isVisible()) && (u || k().isOnline()) ? ie(fr).then(N) : N();
|
4422
4422
|
}
|
4423
4423
|
return N(), () => {
|
4424
4424
|
D && (clearTimeout(D), D = -1);
|
@@ -4429,17 +4429,17 @@ const ur = Z.use || // This extra generic is to avoid TypeScript mixing up the g
|
|
4429
4429
|
u,
|
4430
4430
|
v
|
4431
4431
|
]), Do(Me), s && G(ve) && v) {
|
4432
|
-
if (!
|
4432
|
+
if (!Za && bt)
|
4433
4433
|
throw new Error("Fallback data is required when using Suspense in SSR.");
|
4434
4434
|
b.current = t, _.current = r, O.current = !1;
|
4435
4435
|
const D = w[v];
|
4436
4436
|
if (!G(D)) {
|
4437
4437
|
const N = ye(D);
|
4438
|
-
|
4438
|
+
hr(N);
|
4439
4439
|
}
|
4440
4440
|
if (G(Pe)) {
|
4441
|
-
const N = ie(
|
4442
|
-
G(Me) || (N.status = "fulfilled", N.value = !0),
|
4441
|
+
const N = ie(fr);
|
4442
|
+
G(Me) || (N.status = "fulfilled", N.value = !0), hr(N);
|
4443
4443
|
} else
|
4444
4444
|
throw Pe;
|
4445
4445
|
}
|
@@ -4459,10 +4459,10 @@ const ur = Z.use || // This extra generic is to avoid TypeScript mixing up the g
|
|
4459
4459
|
}
|
4460
4460
|
};
|
4461
4461
|
}, At = td(ad);
|
4462
|
-
var
|
4462
|
+
var mr, rn;
|
4463
4463
|
function nd() {
|
4464
|
-
if (
|
4465
|
-
|
4464
|
+
if (rn) return mr;
|
4465
|
+
rn = 1;
|
4466
4466
|
function e(t, r) {
|
4467
4467
|
if (typeof t != "function")
|
4468
4468
|
throw new TypeError(`Expected the first argument to be a \`function\`, got \`${typeof t}\`.`);
|
@@ -4475,17 +4475,17 @@ function nd() {
|
|
4475
4475
|
}, d);
|
4476
4476
|
};
|
4477
4477
|
}
|
4478
|
-
return
|
4478
|
+
return mr = e, mr;
|
4479
4479
|
}
|
4480
4480
|
var sd = /* @__PURE__ */ nd();
|
4481
4481
|
const od = /* @__PURE__ */ gs(sd);
|
4482
|
-
function
|
4482
|
+
function an(e, t) {
|
4483
4483
|
return t != null ? od(e, t) : e;
|
4484
4484
|
}
|
4485
4485
|
function id(e) {
|
4486
4486
|
const [t, r] = z(e);
|
4487
4487
|
return $(() => {
|
4488
|
-
|
4488
|
+
Nr(e, t) || r(e);
|
4489
4489
|
}, [e, t]), t;
|
4490
4490
|
}
|
4491
4491
|
function cd({
|
@@ -4503,14 +4503,14 @@ function cd({
|
|
4503
4503
|
onError: u,
|
4504
4504
|
credentials: h,
|
4505
4505
|
headers: m,
|
4506
|
-
body:
|
4507
|
-
generateId:
|
4506
|
+
body: g,
|
4507
|
+
generateId: y = ta,
|
4508
4508
|
fetch: w,
|
4509
4509
|
keepLastMessageOnError: v = !0,
|
4510
4510
|
experimental_throttle: C
|
4511
4511
|
} = {}) {
|
4512
|
-
const [S] = z(
|
4513
|
-
() =>
|
4512
|
+
const [S] = z(y), O = t ?? S, I = typeof e == "string" ? [e, O] : O, b = id(r ?? []), _ = he(
|
4513
|
+
() => sr(b),
|
4514
4514
|
[b]
|
4515
4515
|
), { data: k, mutate: x } = At(
|
4516
4516
|
[I, "messages"],
|
@@ -4527,26 +4527,26 @@ function cd({
|
|
4527
4527
|
const { data: P = "ready", mutate: J } = At([I, "status"], null), { data: Q = void 0, mutate: L } = At([I, "error"], null), M = R(null), q = R({
|
4528
4528
|
credentials: h,
|
4529
4529
|
headers: m,
|
4530
|
-
body:
|
4530
|
+
body: g
|
4531
4531
|
});
|
4532
4532
|
$(() => {
|
4533
4533
|
q.current = {
|
4534
4534
|
credentials: h,
|
4535
4535
|
headers: m,
|
4536
|
-
body:
|
4536
|
+
body: g
|
4537
4537
|
};
|
4538
|
-
}, [h, m,
|
4538
|
+
}, [h, m, g]);
|
4539
4539
|
const B = V(
|
4540
4540
|
async (U, D = "generate") => {
|
4541
4541
|
var N, j;
|
4542
4542
|
J("submitted"), L(void 0);
|
4543
|
-
const H =
|
4543
|
+
const H = sr(U.messages), ne = H.length, fe = Ar(
|
4544
4544
|
(N = H[H.length - 1]) == null ? void 0 : N.toolInvocations
|
4545
4545
|
);
|
4546
4546
|
try {
|
4547
4547
|
const ee = new AbortController();
|
4548
4548
|
M.current = ee;
|
4549
|
-
const me =
|
4549
|
+
const me = an(x, C), Et = an(
|
4550
4550
|
A,
|
4551
4551
|
C
|
4552
4552
|
), kt = E.current;
|
@@ -4555,21 +4555,21 @@ function cd({
|
|
4555
4555
|
({
|
4556
4556
|
role: pe,
|
4557
4557
|
content: Ie,
|
4558
|
-
experimental_attachments:
|
4559
|
-
data:
|
4560
|
-
annotations:
|
4561
|
-
toolInvocations:
|
4562
|
-
parts:
|
4558
|
+
experimental_attachments: Ze,
|
4559
|
+
data: et,
|
4560
|
+
annotations: ba,
|
4561
|
+
toolInvocations: va,
|
4562
|
+
parts: wa
|
4563
4563
|
}) => ({
|
4564
4564
|
role: pe,
|
4565
4565
|
content: Ie,
|
4566
|
-
...
|
4567
|
-
experimental_attachments:
|
4566
|
+
...Ze !== void 0 && {
|
4567
|
+
experimental_attachments: Ze
|
4568
4568
|
},
|
4569
|
-
...
|
4570
|
-
...
|
4571
|
-
...
|
4572
|
-
...
|
4569
|
+
...et !== void 0 && { data: et },
|
4570
|
+
...ba !== void 0 && { annotations: ba },
|
4571
|
+
...va !== void 0 && { toolInvocations: va },
|
4572
|
+
...wa !== void 0 && { parts: wa }
|
4573
4573
|
})
|
4574
4574
|
), le = W.current;
|
4575
4575
|
await kl({
|
@@ -4597,10 +4597,10 @@ function cd({
|
|
4597
4597
|
v || me(kt, !1);
|
4598
4598
|
},
|
4599
4599
|
onResponse: d,
|
4600
|
-
onUpdate({ message: pe, data: Ie, replaceLastMessage:
|
4600
|
+
onUpdate({ message: pe, data: Ie, replaceLastMessage: Ze }) {
|
4601
4601
|
J("streaming"), me(
|
4602
4602
|
[
|
4603
|
-
...
|
4603
|
+
...Ze ? H.slice(0, H.length - 1) : H,
|
4604
4604
|
pe
|
4605
4605
|
],
|
4606
4606
|
!1
|
@@ -4611,7 +4611,7 @@ function cd({
|
|
4611
4611
|
},
|
4612
4612
|
onToolCall: s,
|
4613
4613
|
onFinish: f,
|
4614
|
-
generateId:
|
4614
|
+
generateId: y,
|
4615
4615
|
fetch: w,
|
4616
4616
|
lastMessage: H[H.length - 1],
|
4617
4617
|
requestType: D
|
@@ -4647,7 +4647,7 @@ function cd({
|
|
4647
4647
|
c,
|
4648
4648
|
E,
|
4649
4649
|
M,
|
4650
|
-
|
4650
|
+
y,
|
4651
4651
|
w,
|
4652
4652
|
v,
|
4653
4653
|
C,
|
@@ -4661,18 +4661,18 @@ function cd({
|
|
4661
4661
|
experimental_attachments: H = U.experimental_attachments
|
4662
4662
|
} = {}) => {
|
4663
4663
|
var ne, fe;
|
4664
|
-
const te = await
|
4664
|
+
const te = await Ka(
|
4665
4665
|
H
|
4666
4666
|
), ee = E.current.concat({
|
4667
4667
|
...U,
|
4668
|
-
id: (ne = U.id) != null ? ne :
|
4668
|
+
id: (ne = U.id) != null ? ne : y(),
|
4669
4669
|
createdAt: (fe = U.createdAt) != null ? fe : /* @__PURE__ */ new Date(),
|
4670
4670
|
experimental_attachments: te.length > 0 ? te : void 0,
|
4671
4671
|
parts: ys(U)
|
4672
4672
|
});
|
4673
4673
|
return B({ messages: ee, headers: N, body: j, data: D });
|
4674
4674
|
},
|
4675
|
-
[B,
|
4675
|
+
[B, y]
|
4676
4676
|
), ve = V(
|
4677
4677
|
async ({ data: U, headers: D, body: N } = {}) => {
|
4678
4678
|
const j = E.current;
|
@@ -4695,7 +4695,7 @@ function cd({
|
|
4695
4695
|
}, [B]), Me = V(
|
4696
4696
|
(U) => {
|
4697
4697
|
typeof U == "function" && (U = U(E.current));
|
4698
|
-
const D =
|
4698
|
+
const D = sr(U);
|
4699
4699
|
x(D, !1), E.current = D;
|
4700
4700
|
},
|
4701
4701
|
[x]
|
@@ -4713,11 +4713,11 @@ function cd({
|
|
4713
4713
|
...q.current,
|
4714
4714
|
...N
|
4715
4715
|
});
|
4716
|
-
const H = await
|
4716
|
+
const H = await Ka(
|
4717
4717
|
D.experimental_attachments
|
4718
4718
|
), fe = {
|
4719
4719
|
messages: E.current.concat({
|
4720
|
-
id:
|
4720
|
+
id: y(),
|
4721
4721
|
createdAt: /* @__PURE__ */ new Date(),
|
4722
4722
|
role: "user",
|
4723
4723
|
content: _e,
|
@@ -4730,7 +4730,7 @@ function cd({
|
|
4730
4730
|
};
|
4731
4731
|
B(fe), K("");
|
4732
4732
|
},
|
4733
|
-
[_e,
|
4733
|
+
[_e, y, B]
|
4734
4734
|
), ie = (U) => {
|
4735
4735
|
K(U.target.value);
|
4736
4736
|
}, ye = V(
|
@@ -4773,13 +4773,13 @@ function cd({
|
|
4773
4773
|
addToolResult: ye
|
4774
4774
|
};
|
4775
4775
|
}
|
4776
|
-
const
|
4776
|
+
const nn = () => ({
|
4777
4777
|
onFinish: /* @__PURE__ */ new Set(),
|
4778
4778
|
onError: /* @__PURE__ */ new Set(),
|
4779
4779
|
onResponse: /* @__PURE__ */ new Set(),
|
4780
4780
|
onToolCall: /* @__PURE__ */ new Set()
|
4781
4781
|
}), Is = An(null);
|
4782
|
-
function
|
4782
|
+
function Xe(e = {}) {
|
4783
4783
|
const t = X(Is);
|
4784
4784
|
if (!t)
|
4785
4785
|
throw new Error("useAiChat must be used within a AiChatProvider");
|
@@ -4797,9 +4797,9 @@ function ld({
|
|
4797
4797
|
children: e,
|
4798
4798
|
value: t
|
4799
4799
|
}) {
|
4800
|
-
const r = R(
|
4800
|
+
const r = R(nn());
|
4801
4801
|
$(() => {
|
4802
|
-
r.current =
|
4802
|
+
r.current = nn();
|
4803
4803
|
}, [t]);
|
4804
4804
|
const a = V(
|
4805
4805
|
(...l) => {
|
@@ -4843,12 +4843,12 @@ function ld({
|
|
4843
4843
|
}
|
4844
4844
|
);
|
4845
4845
|
}
|
4846
|
-
const dd = "z-20", ud = "z-10", hd = "user",
|
4846
|
+
const dd = "z-20", ud = "z-10", hd = "user", qt = "assistant", sa = "OpenAI", xs = "Anthropic", Rs = "Google", fd = "Perplexity", md = sa, pd = "claude-sonnet-4", gd = "claude-3", yd = "gpt-4", bd = "o3", vd = "o4", wd = "gemini", Ed = "sonar", kd = {
|
4847
4847
|
[xs]: [
|
4848
4848
|
pd,
|
4849
4849
|
gd
|
4850
4850
|
],
|
4851
|
-
[
|
4851
|
+
[sa]: [
|
4852
4852
|
yd,
|
4853
4853
|
bd,
|
4854
4854
|
vd
|
@@ -4864,11 +4864,11 @@ const dd = "z-20", ud = "z-10", hd = "user", Jt = "assistant", na = "OpenAI", xs
|
|
4864
4864
|
if (r.some((a) => e.startsWith(a)))
|
4865
4865
|
return t;
|
4866
4866
|
return null;
|
4867
|
-
},
|
4867
|
+
}, oa = Z.createContext({
|
4868
4868
|
state: { searchString: "", sortedCell: "", sortDirection: "" },
|
4869
4869
|
dispatch: () => {
|
4870
4870
|
}
|
4871
|
-
}),
|
4871
|
+
}), ia = Z.createContext({
|
4872
4872
|
state: { prompt: "", lastTriggeredTimestamp: 0 },
|
4873
4873
|
dispatch: () => {
|
4874
4874
|
}
|
@@ -4892,9 +4892,9 @@ const dd = "z-20", ud = "z-10", hd = "user", Jt = "assistant", na = "OpenAI", xs
|
|
4892
4892
|
},
|
4893
4893
|
setInitialMessages: () => {
|
4894
4894
|
}
|
4895
|
-
}),
|
4895
|
+
}), ca = Z.createContext({
|
4896
4896
|
state: {
|
4897
|
-
footerPosition:
|
4897
|
+
footerPosition: Kt,
|
4898
4898
|
footerHeight: 0,
|
4899
4899
|
footerOffset: 0
|
4900
4900
|
},
|
@@ -4917,7 +4917,7 @@ try {
|
|
4917
4917
|
}
|
4918
4918
|
const tm = {
|
4919
4919
|
PASSKEY: "passkey"
|
4920
|
-
},
|
4920
|
+
}, nt = {
|
4921
4921
|
ALG: "RS256",
|
4922
4922
|
SCOPES_KEY: "scopes",
|
4923
4923
|
SCOPE_KEY: "scope",
|
@@ -4946,7 +4946,7 @@ function xd(e) {
|
|
4946
4946
|
r[a] = t.charCodeAt(a);
|
4947
4947
|
return r;
|
4948
4948
|
}
|
4949
|
-
function
|
4949
|
+
function Ht(e) {
|
4950
4950
|
if (Uint8Array.fromBase64)
|
4951
4951
|
return Uint8Array.fromBase64(typeof e == "string" ? e : vt.decode(e), {
|
4952
4952
|
alphabet: "base64url"
|
@@ -4972,12 +4972,12 @@ class Ee extends Fe {
|
|
4972
4972
|
}
|
4973
4973
|
}
|
4974
4974
|
ae(Ee, "code", "ERR_JWT_CLAIM_VALIDATION_FAILED");
|
4975
|
-
let
|
4975
|
+
let Hr = class extends Fe {
|
4976
4976
|
constructor(t, r, a = "unspecified", n = "unspecified") {
|
4977
4977
|
super(t, { cause: { claim: a, reason: n, payload: r } }), ae(this, "code", "ERR_JWT_EXPIRED"), ae(this, "claim"), ae(this, "reason"), ae(this, "payload"), this.claim = a, this.reason = n, this.payload = r;
|
4978
4978
|
}
|
4979
4979
|
};
|
4980
|
-
ae(
|
4980
|
+
ae(Hr, "code", "ERR_JWT_EXPIRED");
|
4981
4981
|
let Ns = class extends Fe {
|
4982
4982
|
constructor() {
|
4983
4983
|
super(...arguments), ae(this, "code", "ERR_JOSE_ALG_NOT_ALLOWED");
|
@@ -4996,12 +4996,12 @@ class oe extends Fe {
|
|
4996
4996
|
}
|
4997
4997
|
}
|
4998
4998
|
ae(oe, "code", "ERR_JWS_INVALID");
|
4999
|
-
let
|
4999
|
+
let la = class extends Fe {
|
5000
5000
|
constructor() {
|
5001
5001
|
super(...arguments), ae(this, "code", "ERR_JWT_INVALID");
|
5002
5002
|
}
|
5003
5003
|
};
|
5004
|
-
ae(
|
5004
|
+
ae(la, "code", "ERR_JWT_INVALID");
|
5005
5005
|
let Os = class extends Fe {
|
5006
5006
|
constructor(t = "signature verification failed", r) {
|
5007
5007
|
super(t, r), ae(this, "code", "ERR_JWS_SIGNATURE_VERIFICATION_FAILED");
|
@@ -5011,10 +5011,10 @@ ae(Os, "code", "ERR_JWS_SIGNATURE_VERIFICATION_FAILED");
|
|
5011
5011
|
function xe(e, t = "algorithm.name") {
|
5012
5012
|
return new TypeError(`CryptoKey does not support this operation, its ${t} must be ${e}`);
|
5013
5013
|
}
|
5014
|
-
function
|
5014
|
+
function ht(e, t) {
|
5015
5015
|
return e.name === t;
|
5016
5016
|
}
|
5017
|
-
function
|
5017
|
+
function pr(e) {
|
5018
5018
|
return parseInt(e.name.slice(4), 10);
|
5019
5019
|
}
|
5020
5020
|
function Rd(e) {
|
@@ -5038,43 +5038,43 @@ function Nd(e, t, r) {
|
|
5038
5038
|
case "HS256":
|
5039
5039
|
case "HS384":
|
5040
5040
|
case "HS512": {
|
5041
|
-
if (!
|
5041
|
+
if (!ht(e.algorithm, "HMAC"))
|
5042
5042
|
throw xe("HMAC");
|
5043
5043
|
const a = parseInt(t.slice(2), 10);
|
5044
|
-
if (
|
5044
|
+
if (pr(e.algorithm.hash) !== a)
|
5045
5045
|
throw xe(`SHA-${a}`, "algorithm.hash");
|
5046
5046
|
break;
|
5047
5047
|
}
|
5048
5048
|
case "RS256":
|
5049
5049
|
case "RS384":
|
5050
5050
|
case "RS512": {
|
5051
|
-
if (!
|
5051
|
+
if (!ht(e.algorithm, "RSASSA-PKCS1-v1_5"))
|
5052
5052
|
throw xe("RSASSA-PKCS1-v1_5");
|
5053
5053
|
const a = parseInt(t.slice(2), 10);
|
5054
|
-
if (
|
5054
|
+
if (pr(e.algorithm.hash) !== a)
|
5055
5055
|
throw xe(`SHA-${a}`, "algorithm.hash");
|
5056
5056
|
break;
|
5057
5057
|
}
|
5058
5058
|
case "PS256":
|
5059
5059
|
case "PS384":
|
5060
5060
|
case "PS512": {
|
5061
|
-
if (!
|
5061
|
+
if (!ht(e.algorithm, "RSA-PSS"))
|
5062
5062
|
throw xe("RSA-PSS");
|
5063
5063
|
const a = parseInt(t.slice(2), 10);
|
5064
|
-
if (
|
5064
|
+
if (pr(e.algorithm.hash) !== a)
|
5065
5065
|
throw xe(`SHA-${a}`, "algorithm.hash");
|
5066
5066
|
break;
|
5067
5067
|
}
|
5068
5068
|
case "Ed25519":
|
5069
5069
|
case "EdDSA": {
|
5070
|
-
if (!
|
5070
|
+
if (!ht(e.algorithm, "Ed25519"))
|
5071
5071
|
throw xe("Ed25519");
|
5072
5072
|
break;
|
5073
5073
|
}
|
5074
5074
|
case "ES256":
|
5075
5075
|
case "ES384":
|
5076
5076
|
case "ES512": {
|
5077
|
-
if (!
|
5077
|
+
if (!ht(e.algorithm, "ECDSA"))
|
5078
5078
|
throw xe("ECDSA");
|
5079
5079
|
const a = Rd(t);
|
5080
5080
|
if (e.algorithm.namedCurve !== a)
|
@@ -5126,7 +5126,7 @@ const Ds = (e) => Ms(e) || Ls(e), $d = (...e) => {
|
|
5126
5126
|
function Pd(e) {
|
5127
5127
|
return typeof e == "object" && e !== null;
|
5128
5128
|
}
|
5129
|
-
const
|
5129
|
+
const Yt = (e) => {
|
5130
5130
|
if (!Pd(e) || Object.prototype.toString.call(e) !== "[object Object]")
|
5131
5131
|
return !1;
|
5132
5132
|
if (Object.getPrototypeOf(e) === null)
|
@@ -5141,20 +5141,20 @@ const qt = (e) => {
|
|
5141
5141
|
if (typeof r != "number" || r < 2048)
|
5142
5142
|
throw new TypeError(`${e} requires key modulusLength to be 2048 bits or larger`);
|
5143
5143
|
}
|
5144
|
-
},
|
5144
|
+
}, Vt = (e, t, r = 0) => {
|
5145
5145
|
r === 0 && (t.unshift(t.length), t.unshift(6));
|
5146
5146
|
const a = e.indexOf(t[0], r);
|
5147
5147
|
if (a === -1)
|
5148
5148
|
return !1;
|
5149
5149
|
const n = e.subarray(a, a + t.length);
|
5150
|
-
return n.length !== t.length ? !1 : n.every((s, o) => s === t[o]) ||
|
5150
|
+
return n.length !== t.length ? !1 : n.every((s, o) => s === t[o]) || Vt(e, t, a + 1);
|
5151
5151
|
}, Ld = (e) => {
|
5152
5152
|
switch (!0) {
|
5153
|
-
case
|
5153
|
+
case Vt(e, [42, 134, 72, 206, 61, 3, 1, 7]):
|
5154
5154
|
return "P-256";
|
5155
|
-
case
|
5155
|
+
case Vt(e, [43, 129, 4, 0, 34]):
|
5156
5156
|
return "P-384";
|
5157
|
-
case
|
5157
|
+
case Vt(e, [43, 129, 4, 0, 35]):
|
5158
5158
|
return "P-521";
|
5159
5159
|
default:
|
5160
5160
|
return;
|
@@ -5316,8 +5316,8 @@ const zd = (e, t, r, a, n) => {
|
|
5316
5316
|
if (t)
|
5317
5317
|
return new Set(t);
|
5318
5318
|
};
|
5319
|
-
function
|
5320
|
-
return
|
5319
|
+
function da(e) {
|
5320
|
+
return Yt(e) && typeof e.kty == "string";
|
5321
5321
|
}
|
5322
5322
|
function Wd(e) {
|
5323
5323
|
return e.kty !== "oct" && typeof e.d == "string";
|
@@ -5329,7 +5329,7 @@ function Gd(e) {
|
|
5329
5329
|
return e.kty === "oct" && typeof e.k == "string";
|
5330
5330
|
}
|
5331
5331
|
let Be;
|
5332
|
-
const
|
5332
|
+
const sn = async (e, t, r, a = !1) => {
|
5333
5333
|
Be || (Be = /* @__PURE__ */ new WeakMap());
|
5334
5334
|
let n = Be.get(e);
|
5335
5335
|
if (n != null && n[r])
|
@@ -5436,12 +5436,12 @@ const nn = async (e, t, r, a = !1) => {
|
|
5436
5436
|
throw a;
|
5437
5437
|
}
|
5438
5438
|
let r = e.export({ format: "jwk" });
|
5439
|
-
return
|
5439
|
+
return sn(e, r, t);
|
5440
5440
|
}
|
5441
|
-
if (
|
5442
|
-
return e.k ?
|
5441
|
+
if (da(e))
|
5442
|
+
return e.k ? Ht(e.k) : sn(e, e, t, !0);
|
5443
5443
|
throw new Error("unreachable");
|
5444
|
-
},
|
5444
|
+
}, tt = (e) => e?.[Symbol.toStringTag], Vr = (e, t, r) => {
|
5445
5445
|
var a, n;
|
5446
5446
|
if (t.use !== void 0) {
|
5447
5447
|
let s;
|
@@ -5487,47 +5487,47 @@ const nn = async (e, t, r, a = !1) => {
|
|
5487
5487
|
return !0;
|
5488
5488
|
}, qd = (e, t, r) => {
|
5489
5489
|
if (!(t instanceof Uint8Array)) {
|
5490
|
-
if (
|
5491
|
-
if (Gd(t) &&
|
5490
|
+
if (da(t)) {
|
5491
|
+
if (Gd(t) && Vr(e, t, r))
|
5492
5492
|
return;
|
5493
5493
|
throw new TypeError('JSON Web Key for symmetric algorithms must have JWK "kty" (Key Type) equal to "oct" and the JWK "k" (Key Value) present');
|
5494
5494
|
}
|
5495
5495
|
if (!Ds(t))
|
5496
5496
|
throw new TypeError(Ps(e, t, "CryptoKey", "KeyObject", "JSON Web Key", "Uint8Array"));
|
5497
5497
|
if (t.type !== "secret")
|
5498
|
-
throw new TypeError(`${
|
5498
|
+
throw new TypeError(`${tt(t)} instances for symmetric algorithms must be of type "secret"`);
|
5499
5499
|
}
|
5500
5500
|
}, Yd = (e, t, r) => {
|
5501
|
-
if (
|
5501
|
+
if (da(t))
|
5502
5502
|
switch (r) {
|
5503
5503
|
case "decrypt":
|
5504
5504
|
case "sign":
|
5505
|
-
if (Wd(t) &&
|
5505
|
+
if (Wd(t) && Vr(e, t, r))
|
5506
5506
|
return;
|
5507
5507
|
throw new TypeError("JSON Web Key for this operation be a private JWK");
|
5508
5508
|
case "encrypt":
|
5509
5509
|
case "verify":
|
5510
|
-
if (jd(t) &&
|
5510
|
+
if (jd(t) && Vr(e, t, r))
|
5511
5511
|
return;
|
5512
5512
|
throw new TypeError("JSON Web Key for this operation be a public JWK");
|
5513
5513
|
}
|
5514
5514
|
if (!Ds(t))
|
5515
5515
|
throw new TypeError(Ps(e, t, "CryptoKey", "KeyObject", "JSON Web Key"));
|
5516
5516
|
if (t.type === "secret")
|
5517
|
-
throw new TypeError(`${
|
5517
|
+
throw new TypeError(`${tt(t)} instances for asymmetric algorithms must not be of type "secret"`);
|
5518
5518
|
if (t.type === "public")
|
5519
5519
|
switch (r) {
|
5520
5520
|
case "sign":
|
5521
|
-
throw new TypeError(`${
|
5521
|
+
throw new TypeError(`${tt(t)} instances for asymmetric algorithm signing must be of type "private"`);
|
5522
5522
|
case "decrypt":
|
5523
|
-
throw new TypeError(`${
|
5523
|
+
throw new TypeError(`${tt(t)} instances for asymmetric algorithm decryption must be of type "private"`);
|
5524
5524
|
}
|
5525
5525
|
if (t.type === "private")
|
5526
5526
|
switch (r) {
|
5527
5527
|
case "verify":
|
5528
|
-
throw new TypeError(`${
|
5528
|
+
throw new TypeError(`${tt(t)} instances for asymmetric algorithm verifying must be of type "public"`);
|
5529
5529
|
case "encrypt":
|
5530
|
-
throw new TypeError(`${
|
5530
|
+
throw new TypeError(`${tt(t)} instances for asymmetric algorithm encryption must be of type "public"`);
|
5531
5531
|
}
|
5532
5532
|
}, Qd = (e, t, r) => {
|
5533
5533
|
e.startsWith("HS") || e === "dir" || e.startsWith("PBES2") || /^A(?:128|192|256)(?:GCM)?(?:KW)?$/.test(e) || /^A(?:128|192|256)CBC-HS(?:256|384|512)$/.test(e) ? qd(e, t, r) : Yd(e, t, r);
|
@@ -5574,7 +5574,7 @@ const nn = async (e, t, r, a = !1) => {
|
|
5574
5574
|
}
|
5575
5575
|
};
|
5576
5576
|
async function tu(e, t, r) {
|
5577
|
-
if (!
|
5577
|
+
if (!Yt(e))
|
5578
5578
|
throw new oe("Flattened JWS must be an object");
|
5579
5579
|
if (e.protected === void 0 && e.header === void 0)
|
5580
5580
|
throw new oe('Flattened JWS must have either of the "protected" or "header" members');
|
@@ -5584,13 +5584,13 @@ async function tu(e, t, r) {
|
|
5584
5584
|
throw new oe("JWS Payload missing");
|
5585
5585
|
if (typeof e.signature != "string")
|
5586
5586
|
throw new oe("JWS Signature missing or incorrect type");
|
5587
|
-
if (e.header !== void 0 && !
|
5587
|
+
if (e.header !== void 0 && !Yt(e.header))
|
5588
5588
|
throw new oe("JWS Unprotected Header incorrect type");
|
5589
5589
|
let a = {};
|
5590
5590
|
if (e.protected)
|
5591
5591
|
try {
|
5592
|
-
const
|
5593
|
-
a = JSON.parse(vt.decode(
|
5592
|
+
const y = Ht(e.protected);
|
5593
|
+
a = JSON.parse(vt.decode(y));
|
5594
5594
|
} catch {
|
5595
5595
|
throw new oe("JWS Protected Header is invalid");
|
5596
5596
|
}
|
@@ -5619,7 +5619,7 @@ async function tu(e, t, r) {
|
|
5619
5619
|
const f = Id(Nt.encode(e.protected ?? ""), Nt.encode("."), typeof e.payload == "string" ? Nt.encode(e.payload) : e.payload);
|
5620
5620
|
let u;
|
5621
5621
|
try {
|
5622
|
-
u =
|
5622
|
+
u = Ht(e.signature);
|
5623
5623
|
} catch {
|
5624
5624
|
throw new oe("Failed to base64url decode the signature");
|
5625
5625
|
}
|
@@ -5629,13 +5629,13 @@ async function tu(e, t, r) {
|
|
5629
5629
|
let m;
|
5630
5630
|
if (o)
|
5631
5631
|
try {
|
5632
|
-
m =
|
5632
|
+
m = Ht(e.payload);
|
5633
5633
|
} catch {
|
5634
5634
|
throw new oe("Failed to base64url decode the payload");
|
5635
5635
|
}
|
5636
5636
|
else typeof e.payload == "string" ? m = Nt.encode(e.payload) : m = e.payload;
|
5637
|
-
const
|
5638
|
-
return e.protected !== void 0 && (
|
5637
|
+
const g = { payload: m };
|
5638
|
+
return e.protected !== void 0 && (g.protectedHeader = a), e.header !== void 0 && (g.unprotectedHeader = e.header), d ? { ...g, key: h } : g;
|
5639
5639
|
}
|
5640
5640
|
async function ru(e, t, r) {
|
5641
5641
|
if (e instanceof Uint8Array && (e = vt.decode(e)), typeof e != "string")
|
@@ -5646,7 +5646,7 @@ async function ru(e, t, r) {
|
|
5646
5646
|
const c = await tu({ payload: n, protected: a, signature: s }, t, r), l = { payload: c.payload, protectedHeader: c.protectedHeader };
|
5647
5647
|
return typeof t == "function" ? { ...l, key: c.key } : l;
|
5648
5648
|
}
|
5649
|
-
const au = (e) => Math.floor(e.getTime() / 1e3), Bs = 60, Us = Bs * 60,
|
5649
|
+
const au = (e) => Math.floor(e.getTime() / 1e3), Bs = 60, Us = Bs * 60, ua = Us * 24, nu = ua * 7, su = ua * 365.25, ou = /^(\+|\-)? ?(\d+|\d+\.\d+) ?(seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)(?: (ago|from now))?$/i, on = (e) => {
|
5650
5650
|
const t = ou.exec(e);
|
5651
5651
|
if (!t || t[4] && t[1])
|
5652
5652
|
throw new TypeError("Invalid time period format");
|
@@ -5677,7 +5677,7 @@ const au = (e) => Math.floor(e.getTime() / 1e3), Bs = 60, Us = Bs * 60, da = Us
|
|
5677
5677
|
case "day":
|
5678
5678
|
case "days":
|
5679
5679
|
case "d":
|
5680
|
-
n = Math.round(r *
|
5680
|
+
n = Math.round(r * ua);
|
5681
5681
|
break;
|
5682
5682
|
case "week":
|
5683
5683
|
case "weeks":
|
@@ -5689,23 +5689,23 @@ const au = (e) => Math.floor(e.getTime() / 1e3), Bs = 60, Us = Bs * 60, da = Us
|
|
5689
5689
|
break;
|
5690
5690
|
}
|
5691
5691
|
return t[1] === "-" || t[4] === "ago" ? -n : n;
|
5692
|
-
},
|
5692
|
+
}, cn = (e) => e.toLowerCase().replace(/^application\//, ""), iu = (e, t) => typeof e == "string" ? t.includes(e) : Array.isArray(e) ? t.some(Set.prototype.has.bind(new Set(e))) : !1;
|
5693
5693
|
function cu(e, t, r = {}) {
|
5694
5694
|
let a;
|
5695
5695
|
try {
|
5696
5696
|
a = JSON.parse(vt.decode(t));
|
5697
5697
|
} catch {
|
5698
5698
|
}
|
5699
|
-
if (!
|
5700
|
-
throw new
|
5699
|
+
if (!Yt(a))
|
5700
|
+
throw new la("JWT Claims Set must be a top-level JSON object");
|
5701
5701
|
const { typ: n } = r;
|
5702
|
-
if (n && (typeof e.typ != "string" ||
|
5702
|
+
if (n && (typeof e.typ != "string" || cn(e.typ) !== cn(n)))
|
5703
5703
|
throw new Ee('unexpected "typ" JWT header value', a, "typ", "check_failed");
|
5704
5704
|
const { requiredClaims: s = [], issuer: o, subject: c, audience: l, maxTokenAge: d } = r, f = [...s];
|
5705
5705
|
d !== void 0 && f.push("iat"), l !== void 0 && f.push("aud"), c !== void 0 && f.push("sub"), o !== void 0 && f.push("iss");
|
5706
|
-
for (const
|
5707
|
-
if (!(
|
5708
|
-
throw new Ee(`missing required "${
|
5706
|
+
for (const g of new Set(f.reverse()))
|
5707
|
+
if (!(g in a))
|
5708
|
+
throw new Ee(`missing required "${g}" claim`, a, g, "missing");
|
5709
5709
|
if (o && !(Array.isArray(o) ? o : [o]).includes(a.iss))
|
5710
5710
|
throw new Ee('unexpected "iss" claim value', a, "iss", "check_failed");
|
5711
5711
|
if (c && a.sub !== c)
|
@@ -5715,7 +5715,7 @@ function cu(e, t, r = {}) {
|
|
5715
5715
|
let u;
|
5716
5716
|
switch (typeof r.clockTolerance) {
|
5717
5717
|
case "string":
|
5718
|
-
u =
|
5718
|
+
u = on(r.clockTolerance);
|
5719
5719
|
break;
|
5720
5720
|
case "number":
|
5721
5721
|
u = r.clockTolerance;
|
@@ -5739,13 +5739,13 @@ function cu(e, t, r = {}) {
|
|
5739
5739
|
if (typeof a.exp != "number")
|
5740
5740
|
throw new Ee('"exp" claim must be a number', a, "exp", "invalid");
|
5741
5741
|
if (a.exp <= m - u)
|
5742
|
-
throw new
|
5742
|
+
throw new Hr('"exp" claim timestamp check failed', a, "exp", "check_failed");
|
5743
5743
|
}
|
5744
5744
|
if (d) {
|
5745
|
-
const
|
5746
|
-
if (
|
5747
|
-
throw new
|
5748
|
-
if (
|
5745
|
+
const g = m - a.iat, y = typeof d == "number" ? d : on(d);
|
5746
|
+
if (g - u > y)
|
5747
|
+
throw new Hr('"iat" claim timestamp check failed (too far in the past)', a, "iat", "check_failed");
|
5748
|
+
if (g < 0 - u)
|
5749
5749
|
throw new Ee('"iat" claim timestamp check failed (it should be in the past)', a, "iat", "check_failed");
|
5750
5750
|
}
|
5751
5751
|
return a;
|
@@ -5754,15 +5754,15 @@ async function lu(e, t, r) {
|
|
5754
5754
|
var a;
|
5755
5755
|
const n = await ru(e, t, r);
|
5756
5756
|
if ((a = n.protectedHeader.crit) != null && a.includes("b64") && n.protectedHeader.b64 === !1)
|
5757
|
-
throw new
|
5757
|
+
throw new la("JWTs MUST NOT use unencoded payload");
|
5758
5758
|
const s = { payload: cu(n.protectedHeader, n.payload, r), protectedHeader: n.protectedHeader };
|
5759
5759
|
return typeof t == "function" ? { ...s, key: n.key } : s;
|
5760
5760
|
}
|
5761
5761
|
const du = async (e) => {
|
5762
5762
|
try {
|
5763
|
-
const t =
|
5763
|
+
const t = nt.ALG, r = await Vd(Cd, t);
|
5764
5764
|
return await lu(e, r, {
|
5765
|
-
issuer:
|
5765
|
+
issuer: nt.ISSUER
|
5766
5766
|
});
|
5767
5767
|
} catch {
|
5768
5768
|
return;
|
@@ -5776,16 +5776,16 @@ const Hs = async (e, t) => {
|
|
5776
5776
|
if (!r || !r.payload)
|
5777
5777
|
return !1;
|
5778
5778
|
let a = [];
|
5779
|
-
if (Array.isArray(r.payload[
|
5780
|
-
a = r.payload[
|
5781
|
-
else if (typeof r.payload[
|
5782
|
-
a = r.payload[
|
5779
|
+
if (Array.isArray(r.payload[nt.SCOPES_KEY]))
|
5780
|
+
a = r.payload[nt.SCOPES_KEY];
|
5781
|
+
else if (typeof r.payload[nt.SCOPE_KEY] == "string")
|
5782
|
+
a = r.payload[nt.SCOPE_KEY].split(" ").filter((n) => n.trim() !== "");
|
5783
5783
|
else
|
5784
5784
|
return !1;
|
5785
5785
|
return Array.isArray(t) ? t.every((n) => a.includes(n)) : Object.keys(t).some(
|
5786
5786
|
(n) => t[n].every((s) => a.includes(s))
|
5787
5787
|
);
|
5788
|
-
}, hu = "av-tooltip", fu = "av-tooltip-arrow",
|
5788
|
+
}, hu = "av-tooltip", fu = "av-tooltip-arrow", ln = ["mousedown", "touchstart"];
|
5789
5789
|
function mu(e, t, r) {
|
5790
5790
|
const a = R(null);
|
5791
5791
|
return $(() => {
|
@@ -5798,10 +5798,10 @@ function mu(e, t, r) {
|
|
5798
5798
|
) && !c && e();
|
5799
5799
|
} else a.current && !a.current.contains(o) && e();
|
5800
5800
|
};
|
5801
|
-
return
|
5801
|
+
return ln.forEach(
|
5802
5802
|
(s) => document.addEventListener(s, n)
|
5803
5803
|
), () => {
|
5804
|
-
|
5804
|
+
ln.forEach(
|
5805
5805
|
(s) => document.removeEventListener(s, n)
|
5806
5806
|
);
|
5807
5807
|
};
|
@@ -5815,7 +5815,7 @@ function pu(e, t) {
|
|
5815
5815
|
}, []);
|
5816
5816
|
return $(() => (s.current = e, r && o(), c), [e, r, o, c]), { start: o, stop: c, active: r };
|
5817
5817
|
}
|
5818
|
-
const Ot = (e, t = "px") => typeof e > "u" ? "" : `${Math.round(e)}${t}`, gu = () => p("absolute top-0 left-0 w-max py-1 px-2 rounded-sm text-sm z-50"),
|
5818
|
+
const Ot = (e, t = "px") => typeof e > "u" ? "" : `${Math.round(e)}${t}`, gu = () => p("absolute top-0 left-0 w-max py-1 px-2 rounded-sm text-sm z-50"), dn = ({
|
5819
5819
|
mode: e
|
5820
5820
|
}) => p({
|
5821
5821
|
"bg-surface-darker": e === "dark" || e === "system",
|
@@ -5838,13 +5838,13 @@ const Ot = (e, t = "px") => typeof e > "u" ? "" : `${Math.round(e)}${t}`, gu = (
|
|
5838
5838
|
const n = p("relative inline-block", t), s = p(
|
5839
5839
|
hu,
|
5840
5840
|
gu(),
|
5841
|
-
|
5841
|
+
dn({ mode: e }),
|
5842
5842
|
yu({ mode: e }),
|
5843
5843
|
r
|
5844
5844
|
), o = p(
|
5845
5845
|
fu,
|
5846
5846
|
bu(),
|
5847
|
-
|
5847
|
+
dn({ mode: e }),
|
5848
5848
|
a
|
5849
5849
|
);
|
5850
5850
|
return { tooltip: s, arrow: o, wrapper: n };
|
@@ -5861,9 +5861,9 @@ const Ot = (e, t = "px") => typeof e > "u" ? "" : `${Math.round(e)}${t}`, gu = (
|
|
5861
5861
|
arrowClassName: c
|
5862
5862
|
}) => {
|
5863
5863
|
const l = mu(() => {
|
5864
|
-
|
5865
|
-
}), d = R(null), f = R(null), [u, h] = z(!1), [m,
|
5866
|
-
|
5864
|
+
y.stop(), g(!1);
|
5865
|
+
}), d = R(null), f = R(null), [u, h] = z(!1), [m, g] = z(!1), y = pu(() => {
|
5866
|
+
g(!1);
|
5867
5867
|
}, Eu), w = vu({
|
5868
5868
|
mode: a,
|
5869
5869
|
className: s,
|
@@ -5913,7 +5913,7 @@ const Ot = (e, t = "px") => typeof e > "u" ? "" : `${Math.round(e)}${t}`, gu = (
|
|
5913
5913
|
(async () => u && await C())();
|
5914
5914
|
}, [C, u]);
|
5915
5915
|
const S = () => {
|
5916
|
-
h(!1),
|
5916
|
+
h(!1), g(!0), y.start();
|
5917
5917
|
}, O = () => {
|
5918
5918
|
m || h(!0);
|
5919
5919
|
}, I = () => {
|
@@ -5983,7 +5983,7 @@ const ku = ({
|
|
5983
5983
|
);
|
5984
5984
|
function Vs(e, t) {
|
5985
5985
|
$(() => {
|
5986
|
-
if (
|
5986
|
+
if (Wt() && typeof window < "u")
|
5987
5987
|
return window.__VERSINI_CALLISTO_TAURI_EVENTS__ && (window.__VERSINI_CALLISTO_TAURI_EVENTS__[e] = t), () => {
|
5988
5988
|
window.__VERSINI_CALLISTO_TAURI_EVENTS__ && (window.__VERSINI_CALLISTO_TAURI_EVENTS__[e] = null);
|
5989
5989
|
};
|
@@ -5997,32 +5997,32 @@ const _u = ({
|
|
5997
5997
|
dispatch: n,
|
5998
5998
|
setChatId: s,
|
5999
5999
|
setInitialMessages: o
|
6000
|
-
} = X(be), { id: c, setInput: l, stop: d } =
|
6000
|
+
} = X(be), { id: c, setInput: l, stop: d } = Xe(), f = R(null), u = R(!1), h = V(() => {
|
6001
6001
|
s(Ue()), o([]), l(""), n({
|
6002
|
-
type:
|
6002
|
+
type: Qe,
|
6003
6003
|
payload: {
|
6004
6004
|
privateChat: !1,
|
6005
6005
|
reasoning: !1
|
6006
6006
|
}
|
6007
6007
|
}), n({
|
6008
|
-
type:
|
6008
|
+
type: st,
|
6009
6009
|
payload: {
|
6010
6010
|
attachments: 0
|
6011
6011
|
}
|
6012
6012
|
});
|
6013
6013
|
}, [s, o, l, n]);
|
6014
|
-
Vs("newChat", h),
|
6014
|
+
Vs("newChat", h), Yr(
|
6015
6015
|
[
|
6016
6016
|
[
|
6017
6017
|
"mod+N",
|
6018
6018
|
() => {
|
6019
|
-
|
6019
|
+
Wt() && h();
|
6020
6020
|
}
|
6021
6021
|
],
|
6022
6022
|
[
|
6023
6023
|
"mod+T",
|
6024
6024
|
() => {
|
6025
|
-
|
6025
|
+
Wt() && h();
|
6026
6026
|
}
|
6027
6027
|
]
|
6028
6028
|
],
|
@@ -6033,9 +6033,9 @@ const _u = ({
|
|
6033
6033
|
*/
|
6034
6034
|
[]
|
6035
6035
|
);
|
6036
|
-
const m = async (
|
6037
|
-
|
6038
|
-
type:
|
6036
|
+
const m = async (y) => {
|
6037
|
+
y.preventDefault(), d(), n({
|
6038
|
+
type: at,
|
6039
6039
|
payload: {
|
6040
6040
|
aborted: !0,
|
6041
6041
|
streaming: !1,
|
@@ -6044,7 +6044,7 @@ const _u = ({
|
|
6044
6044
|
});
|
6045
6045
|
try {
|
6046
6046
|
const w = await t();
|
6047
|
-
await fetch(`${
|
6047
|
+
await fetch(`${ea}/api/abort`, {
|
6048
6048
|
method: "POST",
|
6049
6049
|
headers: {
|
6050
6050
|
"Content-Type": "application/json",
|
@@ -6055,8 +6055,8 @@ const _u = ({
|
|
6055
6055
|
} catch (w) {
|
6056
6056
|
console.error("Failed to send abort signal:", w);
|
6057
6057
|
}
|
6058
|
-
},
|
6059
|
-
|
6058
|
+
}, g = (y) => {
|
6059
|
+
y.preventDefault(), h();
|
6060
6060
|
};
|
6061
6061
|
return $(() => {
|
6062
6062
|
Ae() || ((r === !0 || a === !0) && !u.current && f.current && (u.current = !0, f.current.focus()), r === !1 && u.current && (u.current = !1));
|
@@ -6075,13 +6075,13 @@ const _u = ({
|
|
6075
6075
|
focusMode: "light",
|
6076
6076
|
label: "New Chat",
|
6077
6077
|
ref: f,
|
6078
|
-
onClick: r || a ? m :
|
6078
|
+
onClick: r || a ? m : g,
|
6079
6079
|
children: r || a ? /* @__PURE__ */ i(pi, { size: Te, monotone: !0 }) : /* @__PURE__ */ i(yi, { size: Te })
|
6080
6080
|
}
|
6081
6081
|
)
|
6082
6082
|
}
|
6083
6083
|
);
|
6084
|
-
},
|
6084
|
+
}, un = "av-messagebox", $t = "av-panel", hn = "av-button", ha = "icon", zs = "button", zr = "link", Su = ({
|
6085
6085
|
type: e,
|
6086
6086
|
size: t,
|
6087
6087
|
labelRight: r,
|
@@ -6092,13 +6092,13 @@ const _u = ({
|
|
6092
6092
|
const o = "max-h-8 py-0 px-2", c = "max-h-9 h-8 px-3", l = "max-h-12 py-2 px-4";
|
6093
6093
|
switch (e) {
|
6094
6094
|
case zs:
|
6095
|
-
case
|
6095
|
+
case zr:
|
6096
6096
|
return p({
|
6097
6097
|
[o]: t === "small",
|
6098
6098
|
[c]: t === "medium",
|
6099
6099
|
[l]: t === "large"
|
6100
6100
|
});
|
6101
|
-
case
|
6101
|
+
case ha:
|
6102
6102
|
return p("flex items-center", {
|
6103
6103
|
"justify-center": n === "center",
|
6104
6104
|
"justify-start": n === "left",
|
@@ -6126,14 +6126,14 @@ const _u = ({
|
|
6126
6126
|
const n = "text-sm font-medium", s = "text-base font-medium", o = "text-lg font-medium";
|
6127
6127
|
switch (e) {
|
6128
6128
|
case zs:
|
6129
|
-
case
|
6129
|
+
case zr:
|
6130
6130
|
return p({
|
6131
|
-
"text-center": e ===
|
6131
|
+
"text-center": e === zr,
|
6132
6132
|
[n]: t === "small",
|
6133
6133
|
[s]: t === "medium",
|
6134
6134
|
[o]: t === "large"
|
6135
6135
|
});
|
6136
|
-
case
|
6136
|
+
case ha:
|
6137
6137
|
return p({
|
6138
6138
|
[n]: t === "small" && (r || a),
|
6139
6139
|
[s]: t === "medium" && (r || a),
|
@@ -6340,8 +6340,8 @@ const _u = ({
|
|
6340
6340
|
noBackground: u,
|
6341
6341
|
variant: h,
|
6342
6342
|
truncate: m,
|
6343
|
-
align:
|
6344
|
-
radius:
|
6343
|
+
align: g,
|
6344
|
+
radius: y,
|
6345
6345
|
animated: w
|
6346
6346
|
}) => (h || (h = "primary"), r ? p(hn, t) : p(
|
6347
6347
|
hn,
|
@@ -6352,13 +6352,13 @@ const _u = ({
|
|
6352
6352
|
truncate: m
|
6353
6353
|
}),
|
6354
6354
|
Iu({ mode: a, noBackground: u, variant: h }),
|
6355
|
-
xu({ radius:
|
6355
|
+
xu({ radius: y }),
|
6356
6356
|
Su({
|
6357
6357
|
type: e,
|
6358
6358
|
size: c,
|
6359
6359
|
labelRight: d,
|
6360
6360
|
labelLeft: f,
|
6361
|
-
align:
|
6361
|
+
align: g,
|
6362
6362
|
animated: w
|
6363
6363
|
}),
|
6364
6364
|
Tu({ type: e, size: c, labelRight: d, labelLeft: f }),
|
@@ -6414,7 +6414,7 @@ const Uu = {
|
|
6414
6414
|
bottom: 0,
|
6415
6415
|
right: 0
|
6416
6416
|
};
|
6417
|
-
function
|
6417
|
+
function gr(e) {
|
6418
6418
|
const t = Du(), r = R(0), a = R(null), [n, s] = z(Uu), o = he(() => typeof ResizeObserver > "u" ? null : new ResizeObserver((c) => {
|
6419
6419
|
const l = c[0];
|
6420
6420
|
l && (cancelAnimationFrame(r.current), r.current = requestAnimationFrame(() => {
|
@@ -6425,7 +6425,7 @@ function pr(e) {
|
|
6425
6425
|
o?.disconnect(), r.current && cancelAnimationFrame(r.current);
|
6426
6426
|
}), [o, e]), [a, n];
|
6427
6427
|
}
|
6428
|
-
const
|
6428
|
+
const Pt = {
|
6429
6429
|
small: 24,
|
6430
6430
|
// w-6
|
6431
6431
|
medium: 32,
|
@@ -6439,7 +6439,7 @@ const $t = {
|
|
6439
6439
|
// px-3 x 2
|
6440
6440
|
large: 32
|
6441
6441
|
// px-4 x 2
|
6442
|
-
}, Vu = 2, zu = 300,
|
6442
|
+
}, Vu = 2, zu = 300, fa = Z.forwardRef(
|
6443
6443
|
({
|
6444
6444
|
children: e,
|
6445
6445
|
disabled: t = !1,
|
@@ -6455,8 +6455,8 @@ const $t = {
|
|
6455
6455
|
size: u = "medium",
|
6456
6456
|
labelRight: h,
|
6457
6457
|
labelLeft: m,
|
6458
|
-
noBackground:
|
6459
|
-
align:
|
6458
|
+
noBackground: g = !1,
|
6459
|
+
align: y = "center",
|
6460
6460
|
radius: w = "large",
|
6461
6461
|
variant: v = "primary",
|
6462
6462
|
iconClassName: C,
|
@@ -6464,7 +6464,7 @@ const $t = {
|
|
6464
6464
|
...O
|
6465
6465
|
}, I) => {
|
6466
6466
|
const b = Mu({
|
6467
|
-
type:
|
6467
|
+
type: ha,
|
6468
6468
|
mode: r,
|
6469
6469
|
focusMode: a,
|
6470
6470
|
fullWidth: n,
|
@@ -6475,20 +6475,20 @@ const $t = {
|
|
6475
6475
|
size: u,
|
6476
6476
|
labelRight: h,
|
6477
6477
|
labelLeft: m,
|
6478
|
-
noBackground:
|
6479
|
-
align:
|
6478
|
+
noBackground: g,
|
6479
|
+
align: y,
|
6480
6480
|
radius: w,
|
6481
6481
|
variant: v,
|
6482
6482
|
animated: S
|
6483
|
-
}), _ = $u({ mode: r, raw: c, iconClassName: C }), k = Pu({ animated: S }), x = "flex items-center justify-center relative w-full h-full overflow-hidden", [E, F] =
|
6483
|
+
}), _ = $u({ mode: r, raw: c, iconClassName: C }), k = Pu({ animated: S }), x = "flex items-center justify-center relative w-full h-full overflow-hidden", [E, F] = gr(), [A, W] = gr(), [P, J] = gr(), Q = R(0), L = R(null), M = R(null), q = Bu([I, L]);
|
6484
6484
|
return Oe(() => {
|
6485
|
-
P && P.current && S && (Q.current = J.width + Hu[u] + (l ? 0 : Vu), L.current && !L.current.style.width && (L.current.style.width = `${
|
6485
|
+
P && P.current && S && (Q.current = J.width + Hu[u] + (l ? 0 : Vu), L.current && !L.current.style.width && (L.current.style.width = `${Pt[u]}px`));
|
6486
6486
|
}, [J, P, u, l, S]), Oe(() => {
|
6487
6487
|
if (L && L.current && S) {
|
6488
|
-
let B =
|
6489
|
-
h && E && F.width > 0 ? B = F.width + Q.current : m && A && W.width > 0 && (B = W.width + Q.current), M.current && clearTimeout(M.current), B !== parseInt(L.current.style.width || "0", 10) && (E.current && (E.current.style.opacity = "0"), A.current && (A.current.style.opacity = "0"), L.current.style.width = `${B}px`, B >
|
6488
|
+
let B = Pt[u];
|
6489
|
+
h && E && F.width > 0 ? B = F.width + Q.current : m && A && W.width > 0 && (B = W.width + Q.current), M.current && clearTimeout(M.current), B !== parseInt(L.current.style.width || "0", 10) && (E.current && (E.current.style.opacity = "0"), A.current && (A.current.style.opacity = "0"), L.current.style.width = `${B}px`, B > Pt[u] && (M.current = setTimeout(() => {
|
6490
6490
|
E.current && h && (E.current.style.opacity = "1"), A.current && m && (A.current.style.opacity = "1"), M.current = null;
|
6491
|
-
}, zu * 0.8))), B ===
|
6491
|
+
}, zu * 0.8))), B === Pt[u] && (E.current && (E.current.style.opacity = "0"), A.current && (A.current.style.opacity = "0"));
|
6492
6492
|
}
|
6493
6493
|
}, [
|
6494
6494
|
F,
|
@@ -6551,7 +6551,7 @@ const $t = {
|
|
6551
6551
|
children: r && /* @__PURE__ */ i("span", { className: a, children: r })
|
6552
6552
|
}
|
6553
6553
|
);
|
6554
|
-
|
6554
|
+
fa.displayName = "ButtonIcon";
|
6555
6555
|
/*!
|
6556
6556
|
@versini/ui-button v6.0.9
|
6557
6557
|
© 2025 gizmette.com
|
@@ -6559,7 +6559,7 @@ ha.displayName = "ButtonIcon";
|
|
6559
6559
|
try {
|
6560
6560
|
window.__VERSINI_UI_BUTTON__ || (window.__VERSINI_UI_BUTTON__ = {
|
6561
6561
|
version: "6.0.9",
|
6562
|
-
buildTime: "08/04/2025
|
6562
|
+
buildTime: "08/04/2025 01:24 PM EDT",
|
6563
6563
|
homepage: "https://github.com/aversini/ui-components",
|
6564
6564
|
license: "MIT"
|
6565
6565
|
});
|
@@ -6591,7 +6591,7 @@ const Fu = Z.forwardRef(
|
|
6591
6591
|
}
|
6592
6592
|
) : "";
|
6593
6593
|
return /* @__PURE__ */ i("div", { className: o, children: /* @__PURE__ */ i(
|
6594
|
-
|
6594
|
+
fa,
|
6595
6595
|
{
|
6596
6596
|
className: p("justify-center", r),
|
6597
6597
|
ref: s,
|
@@ -6695,10 +6695,10 @@ function Gu({
|
|
6695
6695
|
onOpenChange: f
|
6696
6696
|
}), h = u.context, m = Un(h, {
|
6697
6697
|
enabled: t == null
|
6698
|
-
}),
|
6698
|
+
}), g = Hn(h, {
|
6699
6699
|
outsidePress: !1,
|
6700
6700
|
outsidePressEvent: "mousedown"
|
6701
|
-
}),
|
6701
|
+
}), y = Vn(h), w = zn([m, g, y]);
|
6702
6702
|
return Y.useMemo(
|
6703
6703
|
() => ({
|
6704
6704
|
open: d,
|
@@ -6713,7 +6713,7 @@ function Gu({
|
|
6713
6713
|
[d, f, w, u, s, c]
|
6714
6714
|
);
|
6715
6715
|
}
|
6716
|
-
const
|
6716
|
+
const Zt = () => {
|
6717
6717
|
const e = Y.useContext(Ws);
|
6718
6718
|
if (e == null)
|
6719
6719
|
throw new Error("Modal components must be wrapped in <Modal />");
|
@@ -6727,7 +6727,7 @@ function Ku({
|
|
6727
6727
|
return /* @__PURE__ */ i(Ws.Provider, { value: r, children: e });
|
6728
6728
|
}
|
6729
6729
|
const Ju = Y.forwardRef(function(e, t) {
|
6730
|
-
const { context: r, ...a } =
|
6730
|
+
const { context: r, ...a } = Zt(), n = Jr([a.refs.setFloating, t]);
|
6731
6731
|
if (!r.open)
|
6732
6732
|
return null;
|
6733
6733
|
const { overlayBackground: s, ...o } = e, c = p("grid place-items-center", {
|
@@ -6745,13 +6745,13 @@ const Ju = Y.forwardRef(function(e, t) {
|
|
6745
6745
|
}
|
6746
6746
|
) }) }) });
|
6747
6747
|
}), qu = Y.forwardRef(function({ children: e, ...t }, r) {
|
6748
|
-
const { setLabelId: a } =
|
6748
|
+
const { setLabelId: a } = Zt(), n = Kr();
|
6749
6749
|
return Y.useLayoutEffect(() => (a(n), () => a(void 0)), [n, a]), /* @__PURE__ */ i("h1", { ...t, ref: r, id: n, children: e });
|
6750
6750
|
}), Yu = Y.forwardRef(function({ children: e, ...t }, r) {
|
6751
|
-
const { setDescriptionId: a } =
|
6751
|
+
const { setDescriptionId: a } = Zt(), n = Kr();
|
6752
6752
|
return Y.useLayoutEffect(() => (a(n), () => a(void 0)), [n, a]), /* @__PURE__ */ i("div", { ...t, ref: r, id: n, children: e });
|
6753
6753
|
}), Qu = Y.forwardRef(function(e, t) {
|
6754
|
-
const { setOpen: r } =
|
6754
|
+
const { setOpen: r } = Zt(), { trigger: a, className: n, ...s } = e, o = Y.useCallback(() => r(!1), [r]);
|
6755
6755
|
return /* @__PURE__ */ i("div", { className: n, children: Y.cloneElement(a, {
|
6756
6756
|
ref: t,
|
6757
6757
|
onClick: o,
|
@@ -6765,29 +6765,32 @@ const Ju = Y.forwardRef(function(e, t) {
|
|
6765
6765
|
try {
|
6766
6766
|
window.__VERSINI_UI_MODAL__ || (window.__VERSINI_UI_MODAL__ = {
|
6767
6767
|
version: "2.0.5",
|
6768
|
-
buildTime: "08/04/2025
|
6768
|
+
buildTime: "08/04/2025 01:24 PM EDT",
|
6769
6769
|
homepage: "https://github.com/aversini/ui-components",
|
6770
6770
|
license: "MIT"
|
6771
6771
|
});
|
6772
6772
|
} catch {
|
6773
6773
|
}
|
6774
|
-
const
|
6774
|
+
const Ke = "panel", Mt = "messagebox", Xu = ({
|
6775
6775
|
className: e,
|
6776
6776
|
kind: t,
|
6777
6777
|
borderMode: r,
|
6778
|
-
animation: a
|
6778
|
+
animation: a,
|
6779
|
+
maxWidth: n = "medium"
|
6779
6780
|
}) => ({
|
6780
6781
|
main: p("prose prose-lighter flex flex-col bg-surface-medium", {
|
6781
6782
|
"duration-200 ease-out": a,
|
6782
|
-
[`${
|
6783
|
-
[`${
|
6784
|
-
[`${
|
6785
|
-
[`${
|
6783
|
+
[`${$t} max-h-full sm:max-h-[95%] min-h-full sm:min-h-[10rem] sm:rounded-lg sm:border-2`]: t === Ke,
|
6784
|
+
[`${$t} w-full sm:w-[95%] md:max-w-2xl`]: t === Ke && !e && n === "small",
|
6785
|
+
[`${$t} w-full sm:w-[95%] md:max-w-3xl`]: t === Ke && !e && n === "medium",
|
6786
|
+
[`${$t} w-full sm:w-[95%] md:max-w-4xl`]: t === Ke && !e && n === "large",
|
6787
|
+
[`${un} rounded-lg border-2`]: t === Mt,
|
6788
|
+
[`${un} w-[95%] sm:w-[50%] md:max-w-2xl`]: t === Mt && !e,
|
6786
6789
|
[`${e}`]: !!e,
|
6787
|
-
"sm:border-border-dark": r === "dark" && t ===
|
6788
|
-
"sm:border-border-accent": r === "light" && t ===
|
6789
|
-
"border-border-dark": r === "dark" && t ===
|
6790
|
-
"border-border-accent": r === "light" && t ===
|
6790
|
+
"sm:border-border-dark": r === "dark" && t === Ke,
|
6791
|
+
"sm:border-border-accent": r === "light" && t === Ke,
|
6792
|
+
"border-border-dark": r === "dark" && t === Mt,
|
6793
|
+
"border-border-accent": r === "light" && t === Mt
|
6791
6794
|
}),
|
6792
6795
|
content: "flex flex-col py-2 sm:py-4 sm:px-4 px-2 overflow-y-auto",
|
6793
6796
|
footer: "flex grow flex-col sm:p-4 p-2",
|
@@ -6800,32 +6803,34 @@ const pt = "panel", Pt = "messagebox", Xu = ({
|
|
6800
6803
|
children: a,
|
6801
6804
|
footer: n,
|
6802
6805
|
borderMode: s = "light",
|
6803
|
-
kind: o =
|
6806
|
+
kind: o = Ke,
|
6804
6807
|
className: c,
|
6805
6808
|
animation: l = !1,
|
6806
|
-
animationType: d = Zu
|
6809
|
+
animationType: d = Zu,
|
6810
|
+
maxWidth: f = "medium"
|
6807
6811
|
}) => {
|
6808
|
-
const
|
6812
|
+
const u = R(""), [h, m] = z(
|
6809
6813
|
l ? d === mn ? { opacity: 0 } : {
|
6810
6814
|
transform: "translateY(-100vh)"
|
6811
6815
|
} : {}
|
6812
|
-
),
|
6816
|
+
), g = Xu({
|
6813
6817
|
className: c,
|
6814
6818
|
kind: o,
|
6815
6819
|
borderMode: s,
|
6816
|
-
animation: l
|
6820
|
+
animation: l,
|
6821
|
+
maxWidth: f
|
6817
6822
|
});
|
6818
|
-
return $(() => (e && (
|
6819
|
-
e && (document.title =
|
6823
|
+
return $(() => (e && (u.current = document.title, document.title = `${r} | ${u.current}`), () => {
|
6824
|
+
e && (document.title = u.current);
|
6820
6825
|
}), [r, e]), $(() => {
|
6821
6826
|
if (l && e) {
|
6822
|
-
|
6827
|
+
m(
|
6823
6828
|
l ? d === mn ? { opacity: 0 } : {
|
6824
6829
|
transform: "translateY(-666vh)"
|
6825
6830
|
} : {}
|
6826
6831
|
);
|
6827
6832
|
const y = setTimeout(() => {
|
6828
|
-
|
6833
|
+
m(
|
6829
6834
|
l ? d === "fade" ? { opacity: 1 } : {
|
6830
6835
|
transform: "translateY(0)"
|
6831
6836
|
} : {}
|
@@ -6833,14 +6838,14 @@ const pt = "panel", Pt = "messagebox", Xu = ({
|
|
6833
6838
|
}, 100);
|
6834
6839
|
return () => clearTimeout(y);
|
6835
6840
|
}
|
6836
|
-
}, [e, l, d]), /* @__PURE__ */ i(ue, { children: e && /* @__PURE__ */ i(Ku, { open: e, onOpenChange: t, children: /* @__PURE__ */ T(Ju, { className:
|
6841
|
+
}, [e, l, d]), /* @__PURE__ */ i(ue, { children: e && /* @__PURE__ */ i(Ku, { open: e, onOpenChange: t, children: /* @__PURE__ */ T(Ju, { className: g.main, style: h, children: [
|
6837
6842
|
/* @__PURE__ */ T("div", { className: "flex flex-row-reverse items-center justify-between", children: [
|
6838
6843
|
/* @__PURE__ */ i(
|
6839
6844
|
Qu,
|
6840
6845
|
{
|
6841
|
-
className:
|
6846
|
+
className: g.close,
|
6842
6847
|
trigger: /* @__PURE__ */ i(
|
6843
|
-
|
6848
|
+
fa,
|
6844
6849
|
{
|
6845
6850
|
mode: "dark",
|
6846
6851
|
focusMode: "light",
|
@@ -6851,26 +6856,26 @@ const pt = "panel", Pt = "messagebox", Xu = ({
|
|
6851
6856
|
)
|
6852
6857
|
}
|
6853
6858
|
),
|
6854
|
-
/* @__PURE__ */ i(qu, { className:
|
6859
|
+
/* @__PURE__ */ i(qu, { className: g.header, children: r })
|
6855
6860
|
] }),
|
6856
|
-
/* @__PURE__ */ i(Yu, { className:
|
6857
|
-
n && /* @__PURE__ */ i("div", { className:
|
6861
|
+
/* @__PURE__ */ i(Yu, { className: g.content, children: a }),
|
6862
|
+
n && /* @__PURE__ */ i("div", { className: g.footer, children: n })
|
6858
6863
|
] }) }) });
|
6859
6864
|
};
|
6860
6865
|
/*!
|
6861
|
-
@versini/ui-panel v2.1
|
6866
|
+
@versini/ui-panel v2.2.1
|
6862
6867
|
© 2025 gizmette.com
|
6863
6868
|
*/
|
6864
6869
|
try {
|
6865
6870
|
window.__VERSINI_UI_PANEL__ || (window.__VERSINI_UI_PANEL__ = {
|
6866
|
-
version: "2.1
|
6867
|
-
buildTime: "08/04/2025
|
6871
|
+
version: "2.2.1",
|
6872
|
+
buildTime: "08/04/2025 01:24 PM EDT",
|
6868
6873
|
homepage: "https://github.com/aversini/ui-components",
|
6869
6874
|
license: "MIT"
|
6870
6875
|
});
|
6871
6876
|
} catch {
|
6872
6877
|
}
|
6873
|
-
const
|
6878
|
+
const Ye = ({
|
6874
6879
|
showConfirmation: e,
|
6875
6880
|
setShowConfirmation: t,
|
6876
6881
|
action: r,
|
@@ -6887,7 +6892,7 @@ const qe = ({
|
|
6887
6892
|
title: n.title,
|
6888
6893
|
footer: /* @__PURE__ */ T(In, { columnGap: 2, alignHorizontal: "flex-end", children: [
|
6889
6894
|
/* @__PURE__ */ i(yt, { children: !s && /* @__PURE__ */ i(
|
6890
|
-
|
6895
|
+
Sa,
|
6891
6896
|
{
|
6892
6897
|
noBorder: !0,
|
6893
6898
|
mode: "dark",
|
@@ -6900,7 +6905,7 @@ const qe = ({
|
|
6900
6905
|
}
|
6901
6906
|
) }),
|
6902
6907
|
/* @__PURE__ */ i(yt, { children: /* @__PURE__ */ i(
|
6903
|
-
|
6908
|
+
Sa,
|
6904
6909
|
{
|
6905
6910
|
noBorder: !0,
|
6906
6911
|
mode: "dark",
|
@@ -6923,17 +6928,17 @@ const qe = ({
|
|
6923
6928
|
dispatch: a,
|
6924
6929
|
setChatId: n,
|
6925
6930
|
setInitialMessages: s
|
6926
|
-
} = X(be), [o, c] = z(!1), [l, d] = z(!1), [f, u] =
|
6927
|
-
key:
|
6931
|
+
} = X(be), [o, c] = z(!1), [l, d] = z(!1), [f, u] = Gt({
|
6932
|
+
key: jt + wo,
|
6928
6933
|
initialValue: ""
|
6929
|
-
}), h = (
|
6934
|
+
}), h = (g) => {
|
6930
6935
|
n(Ue()), s([]), a({
|
6931
|
-
type:
|
6936
|
+
type: Qe,
|
6932
6937
|
payload: {
|
6933
6938
|
privateChat: !t
|
6934
6939
|
}
|
6935
|
-
}),
|
6936
|
-
type:
|
6940
|
+
}), g && a({
|
6941
|
+
type: st,
|
6937
6942
|
payload: {
|
6938
6943
|
attachments: 0
|
6939
6944
|
}
|
@@ -6941,7 +6946,7 @@ const qe = ({
|
|
6941
6946
|
};
|
6942
6947
|
return /* @__PURE__ */ T(ue, { children: [
|
6943
6948
|
l && /* @__PURE__ */ i(
|
6944
|
-
|
6949
|
+
Ye,
|
6945
6950
|
{
|
6946
6951
|
showConfirmation: l,
|
6947
6952
|
setShowConfirmation: d,
|
@@ -6955,7 +6960,7 @@ const qe = ({
|
|
6955
6960
|
}
|
6956
6961
|
),
|
6957
6962
|
o && /* @__PURE__ */ i(
|
6958
|
-
|
6963
|
+
Ye,
|
6959
6964
|
{
|
6960
6965
|
showConfirmation: o,
|
6961
6966
|
setShowConfirmation: c,
|
@@ -6988,8 +6993,8 @@ const qe = ({
|
|
6988
6993
|
label: "Private Chat",
|
6989
6994
|
labelRight: t ? "private" : "",
|
6990
6995
|
variant: t ? "danger" : "primary",
|
6991
|
-
onClick: (
|
6992
|
-
|
6996
|
+
onClick: (g) => {
|
6997
|
+
g && g.preventDefault(), f ? r > 0 ? d(!l) : h() : (u("true"), c(!o));
|
6993
6998
|
},
|
6994
6999
|
className: "text-sm",
|
6995
7000
|
children: t ? /* @__PURE__ */ i(ki, { size: Te }) : /* @__PURE__ */ i(Ni, { size: Te })
|
@@ -6998,7 +7003,7 @@ const qe = ({
|
|
6998
7003
|
}
|
6999
7004
|
)
|
7000
7005
|
] });
|
7001
|
-
},
|
7006
|
+
}, Fr = Y.createContext({
|
7002
7007
|
getItemProps: () => ({}),
|
7003
7008
|
activeIndex: null,
|
7004
7009
|
/* v8 ignore next 2 */
|
@@ -7029,7 +7034,7 @@ const qe = ({
|
|
7029
7034
|
focusMode: o = "system",
|
7030
7035
|
...c
|
7031
7036
|
}, l) => {
|
7032
|
-
const [d, f] = z(!1), [u, h] = z(!1), [m,
|
7037
|
+
const [d, f] = z(!1), [u, h] = z(!1), [m, g] = z(null), y = R([]), w = R([]), v = X(Fr), C = Fn(), S = zo(), O = Wn(), { floatingStyles: I, refs: b, context: _ } = Bn({
|
7033
7038
|
nodeId: S,
|
7034
7039
|
open: d,
|
7035
7040
|
onOpenChange: (q) => {
|
@@ -7044,14 +7049,14 @@ const qe = ({
|
|
7044
7049
|
toggle: !0,
|
7045
7050
|
ignoreMouse: !1
|
7046
7051
|
}), x = Vn(_, { role: "menu" }), E = Hn(_, { bubbles: !0 }), F = Wo(_, {
|
7047
|
-
listRef:
|
7052
|
+
listRef: y,
|
7048
7053
|
activeIndex: m,
|
7049
7054
|
nested: !1,
|
7050
|
-
onNavigate:
|
7055
|
+
onNavigate: g,
|
7051
7056
|
loop: !0
|
7052
7057
|
}), A = jo(_, {
|
7053
7058
|
listRef: w,
|
7054
|
-
onMatch: d ?
|
7059
|
+
onMatch: d ? g : void 0,
|
7055
7060
|
activeIndex: m
|
7056
7061
|
}), { getReferenceProps: W, getFloatingProps: P, getItemProps: J } = zn([k, x, E, F, A]), Q = pn(e) === "Button" || pn(e) === "ButtonIcon", L = Q ? {
|
7057
7062
|
noInternalClick: Q,
|
@@ -7064,7 +7069,7 @@ const qe = ({
|
|
7064
7069
|
"aria-label": r,
|
7065
7070
|
"data-open": d ? "" : void 0,
|
7066
7071
|
"data-focus-inside": u ? "" : void 0,
|
7067
|
-
ref:
|
7072
|
+
ref: Jr([b.setReference, O.ref, l]),
|
7068
7073
|
...W(
|
7069
7074
|
v.getItemProps({
|
7070
7075
|
...c
|
@@ -7086,16 +7091,16 @@ const qe = ({
|
|
7086
7091
|
}, [C, d, S]), /* @__PURE__ */ T(Go, { id: S, children: [
|
7087
7092
|
M,
|
7088
7093
|
/* @__PURE__ */ i(
|
7089
|
-
|
7094
|
+
Fr.Provider,
|
7090
7095
|
{
|
7091
7096
|
value: {
|
7092
7097
|
activeIndex: m,
|
7093
|
-
setActiveIndex:
|
7098
|
+
setActiveIndex: g,
|
7094
7099
|
getItemProps: J,
|
7095
7100
|
setHasFocusInside: h,
|
7096
7101
|
isOpen: d
|
7097
7102
|
},
|
7098
|
-
children: /* @__PURE__ */ i(Ko, { elementsRef:
|
7103
|
+
children: /* @__PURE__ */ i(Ko, { elementsRef: y, labelsRef: w, children: d && /* @__PURE__ */ i(Ln, { children: /* @__PURE__ */ i(
|
7099
7104
|
Dn,
|
7100
7105
|
{
|
7101
7106
|
context: _,
|
@@ -7118,8 +7123,8 @@ const qe = ({
|
|
7118
7123
|
)
|
7119
7124
|
] });
|
7120
7125
|
}
|
7121
|
-
),
|
7122
|
-
|
7126
|
+
), er = Nn((e, t) => /* @__PURE__ */ i(Vo, { children: /* @__PURE__ */ i(Gs, { ...e, ref: t }) }));
|
7127
|
+
er.displayName = "Menu";
|
7123
7128
|
Gs.displayName = "MenuComponent";
|
7124
7129
|
const th = ({
|
7125
7130
|
children: e,
|
@@ -7216,23 +7221,23 @@ const Re = Y.forwardRef(
|
|
7216
7221
|
...c
|
7217
7222
|
}, l) => {
|
7218
7223
|
let d = "";
|
7219
|
-
const f = Y.useContext(
|
7224
|
+
const f = Y.useContext(Fr), u = Wn({ label: t ? null : e }), h = Fn(), m = Jr([u.ref, l]);
|
7220
7225
|
if (a && n)
|
7221
7226
|
return /* @__PURE__ */ i(
|
7222
7227
|
"div",
|
7223
7228
|
{
|
7224
7229
|
role: "menuitem",
|
7225
7230
|
...f.getItemProps({
|
7226
|
-
onClick(
|
7231
|
+
onClick(y) {
|
7227
7232
|
var w;
|
7228
|
-
s || ((w = c.onClick) == null || w.call(c,
|
7233
|
+
s || ((w = c.onClick) == null || w.call(c, y), h?.events.emit("click"));
|
7229
7234
|
}
|
7230
7235
|
}),
|
7231
7236
|
children: n
|
7232
7237
|
}
|
7233
7238
|
);
|
7234
7239
|
r && (d = "pl-2");
|
7235
|
-
const
|
7240
|
+
const g = p(
|
7236
7241
|
"items-center flex-row",
|
7237
7242
|
"m-0 first:mt-0 mt-2 sm:mt-1 px-2 py-1 flex w-full rounded-md border border-transparent text-left text-base outline-hidden focus:border focus:border-border-medium focus:bg-surface-lighter focus:underline disabled:cursor-not-allowed disabled:text-copy-medium",
|
7238
7243
|
{
|
@@ -7245,17 +7250,17 @@ const Re = Y.forwardRef(
|
|
7245
7250
|
...c,
|
7246
7251
|
ref: m,
|
7247
7252
|
role: "menuitem",
|
7248
|
-
className:
|
7253
|
+
className: g,
|
7249
7254
|
tabIndex: 0,
|
7250
7255
|
disabled: t,
|
7251
7256
|
...f.getItemProps({
|
7252
|
-
onClick(
|
7257
|
+
onClick(y) {
|
7253
7258
|
var w;
|
7254
|
-
s || ((w = c.onClick) == null || w.call(c,
|
7259
|
+
s || ((w = c.onClick) == null || w.call(c, y), h?.events.emit("click"));
|
7255
7260
|
},
|
7256
|
-
onFocus(
|
7261
|
+
onFocus(y) {
|
7257
7262
|
var w;
|
7258
|
-
(w = c.onFocus) == null || w.call(c,
|
7263
|
+
(w = c.onFocus) == null || w.call(c, y), f.setHasFocusInside(!0);
|
7259
7264
|
}
|
7260
7265
|
}),
|
7261
7266
|
children: [
|
@@ -7303,23 +7308,23 @@ const nh = (e) => {
|
|
7303
7308
|
className: e,
|
7304
7309
|
defaultPlacement: t = "top-start"
|
7305
7310
|
}) => {
|
7306
|
-
const { dispatch: r, setChatId: a, setInitialMessages: n } = X(be), { dispatch: s } = X(
|
7311
|
+
const { dispatch: r, setChatId: a, setInitialMessages: n } = X(be), { dispatch: s } = X(ia), { getAccessToken: o, user: c } = Ve(), { data: l, isSuccess: d } = Xt({
|
7307
7312
|
user: c?.username,
|
7308
7313
|
getAccessToken: o
|
7309
|
-
}), f = (m,
|
7314
|
+
}), f = (m, g, y) => {
|
7310
7315
|
m.preventDefault(), a(Ue()), n([]), r({
|
7311
|
-
type:
|
7316
|
+
type: Qe,
|
7312
7317
|
payload: {
|
7313
|
-
privateChat:
|
7318
|
+
privateChat: y
|
7314
7319
|
}
|
7315
7320
|
}), s({
|
7316
7321
|
type: Cn,
|
7317
7322
|
payload: {
|
7318
|
-
prompt:
|
7323
|
+
prompt: g
|
7319
7324
|
}
|
7320
7325
|
});
|
7321
7326
|
}, u = d && l && l.tags && nh(l.tags), h = /* @__PURE__ */ T(
|
7322
|
-
|
7327
|
+
er,
|
7323
7328
|
{
|
7324
7329
|
mode: "dark",
|
7325
7330
|
focusMode: "light",
|
@@ -7328,27 +7333,27 @@ const nh = (e) => {
|
|
7328
7333
|
children: [
|
7329
7334
|
/* @__PURE__ */ i(Ks, { children: "Prompts" }),
|
7330
7335
|
u && l.tags.map((m) => {
|
7331
|
-
let
|
7336
|
+
let g = null;
|
7332
7337
|
switch (m.slot) {
|
7333
7338
|
case 0:
|
7334
|
-
|
7339
|
+
g = /* @__PURE__ */ i(_i, {});
|
7335
7340
|
break;
|
7336
7341
|
case 1:
|
7337
|
-
|
7342
|
+
g = /* @__PURE__ */ i(Ci, {});
|
7338
7343
|
break;
|
7339
7344
|
case 2:
|
7340
|
-
|
7345
|
+
g = /* @__PURE__ */ i(Ii, {});
|
7341
7346
|
break;
|
7342
7347
|
default:
|
7343
|
-
|
7348
|
+
g = null;
|
7344
7349
|
break;
|
7345
7350
|
}
|
7346
7351
|
return m.enabled && m.label && m.content && /* @__PURE__ */ i(
|
7347
7352
|
Re,
|
7348
7353
|
{
|
7349
7354
|
label: m.label,
|
7350
|
-
icon:
|
7351
|
-
onClick: (
|
7355
|
+
icon: g,
|
7356
|
+
onClick: (y) => f(y, m.content, m?.privateChat)
|
7352
7357
|
},
|
7353
7358
|
`prompt-button-${m.slot}`
|
7354
7359
|
);
|
@@ -7373,17 +7378,17 @@ const nh = (e) => {
|
|
7373
7378
|
dispatch: a,
|
7374
7379
|
setChatId: n,
|
7375
7380
|
setInitialMessages: s
|
7376
|
-
} = X(be), [o, c] = z(!1), [l, d] = z(!1), [f, u] =
|
7377
|
-
key:
|
7381
|
+
} = X(be), [o, c] = z(!1), [l, d] = z(!1), [f, u] = Gt({
|
7382
|
+
key: jt + Eo,
|
7378
7383
|
initialValue: ""
|
7379
|
-
}), h = (
|
7384
|
+
}), h = (g) => {
|
7380
7385
|
n(Ue()), s([]), a({
|
7381
|
-
type:
|
7386
|
+
type: Qe,
|
7382
7387
|
payload: {
|
7383
7388
|
reasoning: !t
|
7384
7389
|
}
|
7385
|
-
}),
|
7386
|
-
type:
|
7390
|
+
}), g && a({
|
7391
|
+
type: st,
|
7387
7392
|
payload: {
|
7388
7393
|
attachments: 0
|
7389
7394
|
}
|
@@ -7391,7 +7396,7 @@ const nh = (e) => {
|
|
7391
7396
|
};
|
7392
7397
|
return /* @__PURE__ */ T(ue, { children: [
|
7393
7398
|
l && /* @__PURE__ */ i(
|
7394
|
-
|
7399
|
+
Ye,
|
7395
7400
|
{
|
7396
7401
|
showConfirmation: l,
|
7397
7402
|
setShowConfirmation: d,
|
@@ -7405,7 +7410,7 @@ const nh = (e) => {
|
|
7405
7410
|
}
|
7406
7411
|
),
|
7407
7412
|
o && /* @__PURE__ */ i(
|
7408
|
-
|
7413
|
+
Ye,
|
7409
7414
|
{
|
7410
7415
|
showConfirmation: o,
|
7411
7416
|
setShowConfirmation: c,
|
@@ -7438,8 +7443,8 @@ const nh = (e) => {
|
|
7438
7443
|
focusMode: "light",
|
7439
7444
|
label: "Reasoning Chat",
|
7440
7445
|
variant: t ? "selected" : "primary",
|
7441
|
-
onClick: (
|
7442
|
-
|
7446
|
+
onClick: (g) => {
|
7447
|
+
g && g.preventDefault(), f ? r > 0 ? d(!l) : h() : (u("true"), c(!o));
|
7443
7448
|
},
|
7444
7449
|
className: "text-sm",
|
7445
7450
|
children: /* @__PURE__ */ i(Ei, { size: Te })
|
@@ -7449,8 +7454,8 @@ const nh = (e) => {
|
|
7449
7454
|
)
|
7450
7455
|
] });
|
7451
7456
|
};
|
7452
|
-
let
|
7453
|
-
const qs = async () => (
|
7457
|
+
let yr = null, br = null;
|
7458
|
+
const qs = async () => (yr || (yr = import("./index.B8EJY2WR.js")), yr), Ys = async () => (br || (br = import("./index.B8_rjxw5.js").then((e) => e.utilities)), br), oh = async () => {
|
7454
7459
|
try {
|
7455
7460
|
await Promise.all([qs(), Ys()]);
|
7456
7461
|
} catch {
|
@@ -7477,13 +7482,13 @@ const qs = async () => (gr || (gr = import("./index.B8EJY2WR.js")), gr), Ys = as
|
|
7477
7482
|
const { user: t, getAccessToken: r } = Ve(), {
|
7478
7483
|
dispatch: a,
|
7479
7484
|
state: { tokenUsage: n, provider: s, privateChat: o }
|
7480
|
-
} = X(be), { messages: c, id: l } =
|
7485
|
+
} = X(be), { messages: c, id: l } = Xe(), { state: d } = X(oa), { refetch: f } = rs({
|
7481
7486
|
enabled: !1,
|
7482
7487
|
user: t?.username || "",
|
7483
7488
|
searchString: d.searchString,
|
7484
7489
|
sortDirection: d.sortDirection,
|
7485
7490
|
getAccessToken: r
|
7486
|
-
}), [u, h] = z(!1), [m,
|
7491
|
+
}), [u, h] = z(!1), [m, g] = z(!1), y = async () => {
|
7487
7492
|
try {
|
7488
7493
|
if (l && c && s) {
|
7489
7494
|
const v = c.filter(({ content: C }) => C).map(({ role: C, content: S, id: O }) => ({
|
@@ -7502,7 +7507,7 @@ const qs = async () => (gr || (gr = import("./index.B8EJY2WR.js")), gr), Ys = as
|
|
7502
7507
|
tokenUsage: n
|
7503
7508
|
}
|
7504
7509
|
}), a({
|
7505
|
-
type:
|
7510
|
+
type: Qe,
|
7506
7511
|
payload: {
|
7507
7512
|
privateChat: !1
|
7508
7513
|
}
|
@@ -7513,17 +7518,17 @@ const qs = async () => (gr || (gr = import("./index.B8EJY2WR.js")), gr), Ys = as
|
|
7513
7518
|
} catch {
|
7514
7519
|
}
|
7515
7520
|
}, w = (v) => {
|
7516
|
-
v && v.preventDefault(), n > 0 ?
|
7521
|
+
v && v.preventDefault(), n > 0 ? g(!m) : y();
|
7517
7522
|
};
|
7518
7523
|
return $(() => {
|
7519
7524
|
o && c?.length > 0 ? h(!0) : h(!1);
|
7520
7525
|
}, [o, c]), /* @__PURE__ */ T(ue, { children: [
|
7521
7526
|
m && /* @__PURE__ */ i(
|
7522
|
-
|
7527
|
+
Ye,
|
7523
7528
|
{
|
7524
7529
|
showConfirmation: m,
|
7525
|
-
setShowConfirmation:
|
7526
|
-
action:
|
7530
|
+
setShowConfirmation: g,
|
7531
|
+
action: y,
|
7527
7532
|
customStrings: {
|
7528
7533
|
confirmAction: "Continue",
|
7529
7534
|
cancelAction: "Cancel",
|
@@ -7626,9 +7631,9 @@ const qs = async () => (gr || (gr = import("./index.B8EJY2WR.js")), gr), Ys = as
|
|
7626
7631
|
)
|
7627
7632
|
}
|
7628
7633
|
);
|
7629
|
-
},
|
7634
|
+
}, Lt = [
|
7630
7635
|
{
|
7631
|
-
id:
|
7636
|
+
id: sa,
|
7632
7637
|
label: "OpenAI",
|
7633
7638
|
icon: Si
|
7634
7639
|
},
|
@@ -7648,12 +7653,12 @@ const qs = async () => (gr || (gr = import("./index.B8EJY2WR.js")), gr), Ys = as
|
|
7648
7653
|
state: { privateChat: r },
|
7649
7654
|
setChatId: a,
|
7650
7655
|
setInitialMessages: n
|
7651
|
-
} = X(be), { getAccessToken: s, user: o } = Ve(), { status: c } =
|
7656
|
+
} = X(be), { getAccessToken: s, user: o } = Ve(), { status: c } = Xe(), [l, d] = z(!1), f = V(() => {
|
7652
7657
|
l || (oh(), d(!0));
|
7653
|
-
}, [l]), { isSuccess: u, refetch: h, data: m } =
|
7658
|
+
}, [l]), { isSuccess: u, refetch: h, data: m } = Xt({
|
7654
7659
|
user: o?.username,
|
7655
7660
|
getAccessToken: s
|
7656
|
-
}),
|
7661
|
+
}), g = async (C) => {
|
7657
7662
|
try {
|
7658
7663
|
a(Ue()), n([]), C !== m?.provider && (await Rc({
|
7659
7664
|
provider: C,
|
@@ -7662,15 +7667,15 @@ const qs = async () => (gr || (gr = import("./index.B8EJY2WR.js")), gr), Ys = as
|
|
7662
7667
|
}), h(), await Xs(`${_o} ${C}`, {
|
7663
7668
|
containerId: "toggle-provider"
|
7664
7669
|
})), t({
|
7665
|
-
type:
|
7670
|
+
type: Qe,
|
7666
7671
|
payload: {
|
7667
7672
|
privateChat: r
|
7668
7673
|
}
|
7669
7674
|
});
|
7670
7675
|
} catch {
|
7671
7676
|
}
|
7672
|
-
},
|
7673
|
-
|
7677
|
+
}, y = m && u, w = y && Lt.find((C) => m.provider === C.id)?.icon || Lt[0].icon, v = /* @__PURE__ */ T(
|
7678
|
+
er,
|
7674
7679
|
{
|
7675
7680
|
mode: "dark",
|
7676
7681
|
focusMode: "light",
|
@@ -7679,13 +7684,13 @@ const qs = async () => (gr || (gr = import("./index.B8EJY2WR.js")), gr), Ys = as
|
|
7679
7684
|
{
|
7680
7685
|
noBorder: !0,
|
7681
7686
|
label: "Providers",
|
7682
|
-
disabled: !
|
7687
|
+
disabled: !y,
|
7683
7688
|
onMouseEnter: f,
|
7684
7689
|
onFocus: f,
|
7685
7690
|
children: /* @__PURE__ */ i(
|
7686
7691
|
w,
|
7687
7692
|
{
|
7688
|
-
className:
|
7693
|
+
className: y && c === "streaming" ? "av-pulsate-icon" : "",
|
7689
7694
|
size: Te
|
7690
7695
|
}
|
7691
7696
|
)
|
@@ -7694,20 +7699,20 @@ const qs = async () => (gr || (gr = import("./index.B8EJY2WR.js")), gr), Ys = as
|
|
7694
7699
|
defaultPlacement: "top-start",
|
7695
7700
|
children: [
|
7696
7701
|
/* @__PURE__ */ i(Ks, { children: "Providers" }),
|
7697
|
-
|
7702
|
+
y && Lt.map((C) => /* @__PURE__ */ i(
|
7698
7703
|
Re,
|
7699
7704
|
{
|
7700
7705
|
selected: m.provider === C.id,
|
7701
7706
|
label: C.label,
|
7702
7707
|
icon: /* @__PURE__ */ i(C.icon, {}),
|
7703
|
-
onClick: () =>
|
7708
|
+
onClick: () => g(C.id)
|
7704
7709
|
},
|
7705
7710
|
C.id
|
7706
7711
|
))
|
7707
7712
|
]
|
7708
7713
|
}
|
7709
7714
|
);
|
7710
|
-
return
|
7715
|
+
return y ? /* @__PURE__ */ i(
|
7711
7716
|
$e,
|
7712
7717
|
{
|
7713
7718
|
label: "Toggle Providers",
|
@@ -7731,10 +7736,10 @@ const qs = async () => (gr || (gr = import("./index.B8EJY2WR.js")), gr), Ys = as
|
|
7731
7736
|
".html",
|
7732
7737
|
".json",
|
7733
7738
|
".md"
|
7734
|
-
],
|
7739
|
+
], vr = [
|
7735
7740
|
...dh,
|
7736
7741
|
...uh
|
7737
|
-
],
|
7742
|
+
], Wr = 400 * 1024, hh = "text/plain", fh = () => p(
|
7738
7743
|
"relative rounded-md text-base h-auto min-w-28 overflow-hidden pt-2"
|
7739
7744
|
), gn = () => p("bg-surface-darker"), mh = () => p("text-copy-lighter caret-copy-light"), ph = () => p(
|
7740
7745
|
"has-[.av-prompt-editable:focus]:outline",
|
@@ -7762,7 +7767,7 @@ const qs = async () => (gr || (gr = import("./index.B8EJY2WR.js")), gr), Ys = as
|
|
7762
7767
|
wrapper: t,
|
7763
7768
|
textArea: r
|
7764
7769
|
};
|
7765
|
-
},
|
7770
|
+
}, zt = (e) => {
|
7766
7771
|
if (e === 0)
|
7767
7772
|
return "0 Bytes";
|
7768
7773
|
const t = 1024, r = ["Bytes", "KB", "MB", "GB"], a = Math.floor(Math.log(e) / Math.log(t));
|
@@ -7787,7 +7792,7 @@ const qs = async () => (gr || (gr = import("./index.B8EJY2WR.js")), gr), Ys = as
|
|
7787
7792
|
/* @__PURE__ */ i("span", { className: "max-w-[150px] truncate", children: r.name }),
|
7788
7793
|
/* @__PURE__ */ T("span", { className: "mx-1 text-gray-400", children: [
|
7789
7794
|
"(",
|
7790
|
-
|
7795
|
+
zt(r.size),
|
7791
7796
|
")"
|
7792
7797
|
] }),
|
7793
7798
|
/* @__PURE__ */ i(
|
@@ -7809,24 +7814,24 @@ const qs = async () => (gr || (gr = import("./index.B8EJY2WR.js")), gr), Ys = as
|
|
7809
7814
|
)) }),
|
7810
7815
|
/* @__PURE__ */ T("div", { className: "text-xs text-gray-400 mt-1 pl-1", children: [
|
7811
7816
|
"Total: ",
|
7812
|
-
|
7817
|
+
zt(eo(Array.from(e))),
|
7813
7818
|
" /",
|
7814
7819
|
" ",
|
7815
|
-
|
7820
|
+
zt(Wr)
|
7816
7821
|
] })
|
7817
|
-
] }), to = 24, wh = 500, ro = 2, Eh = 5, kh = to * ro, yn = Eh * to, _h = "ready", Sh = "streaming", Th = "error", Ch = "submitted",
|
7822
|
+
] }), to = 24, wh = 500, ro = 2, Eh = 5, kh = to * ro, yn = Eh * to, _h = "ready", Sh = "streaming", Th = "error", Ch = "submitted", Dt = (e) => {
|
7818
7823
|
e.current && (e.current.style.height = `${kh}px`);
|
7819
7824
|
}, Ih = () => {
|
7820
7825
|
const { user: e, getAccessToken: t } = Ve(), [r, a] = z(!1), [n, s] = z(null), [o, c] = z(!1), [l, d] = z(!1), {
|
7821
7826
|
dispatch: f,
|
7822
|
-
state: { reasoning: u, streaming: h, aborted: m, lastResetTimestamp:
|
7823
|
-
} = X(be), { state: w, dispatch: v } = X(
|
7827
|
+
state: { reasoning: u, streaming: h, aborted: m, lastResetTimestamp: g, attachments: y }
|
7828
|
+
} = X(be), { state: w, dispatch: v } = X(ia), { state: C } = X(oa), { refetch: S } = rs({
|
7824
7829
|
enabled: !1,
|
7825
7830
|
user: e?.username || "",
|
7826
7831
|
searchString: C.searchString,
|
7827
7832
|
sortDirection: C.sortDirection,
|
7828
7833
|
getAccessToken: t
|
7829
|
-
}), { data: O } =
|
7834
|
+
}), { data: O } = Xt({
|
7830
7835
|
user: e?.username,
|
7831
7836
|
getAccessToken: t
|
7832
7837
|
}), I = R(null), b = R(null), _ = R(!1), k = R(0), x = R(null), E = R(null), F = Fi(), A = yh({
|
@@ -7839,7 +7844,7 @@ const qs = async () => (gr || (gr = import("./index.B8EJY2WR.js")), gr), Ys = as
|
|
7839
7844
|
setMessages: L,
|
7840
7845
|
status: M,
|
7841
7846
|
id: q
|
7842
|
-
} =
|
7847
|
+
} = Xe({
|
7843
7848
|
onFinish: (K, { usage: se }) => {
|
7844
7849
|
S(), f({
|
7845
7850
|
type: Zn,
|
@@ -7851,26 +7856,26 @@ const qs = async () => (gr || (gr = import("./index.B8EJY2WR.js")), gr), Ys = as
|
|
7851
7856
|
}), B = V(
|
7852
7857
|
async (K) => {
|
7853
7858
|
K === _h && f({
|
7854
|
-
type:
|
7859
|
+
type: at,
|
7855
7860
|
payload: {
|
7856
7861
|
loading: !1,
|
7857
7862
|
streaming: !1
|
7858
7863
|
}
|
7859
7864
|
}), K === Ch && f({
|
7860
|
-
type:
|
7865
|
+
type: at,
|
7861
7866
|
payload: {
|
7862
7867
|
loading: !0,
|
7863
7868
|
streaming: !1
|
7864
7869
|
}
|
7865
7870
|
}), K === Sh && f({
|
7866
|
-
type:
|
7871
|
+
type: at,
|
7867
7872
|
payload: {
|
7868
7873
|
loading: !1,
|
7869
7874
|
streaming: !0
|
7870
7875
|
}
|
7871
7876
|
}), K === Th && setTimeout(() => {
|
7872
7877
|
m || (f({
|
7873
|
-
type:
|
7878
|
+
type: at,
|
7874
7879
|
payload: {
|
7875
7880
|
loading: !1,
|
7876
7881
|
streaming: !1
|
@@ -7879,7 +7884,7 @@ const qs = async () => (gr || (gr = import("./index.B8EJY2WR.js")), gr), Ys = as
|
|
7879
7884
|
...se,
|
7880
7885
|
{
|
7881
7886
|
id: Ue(),
|
7882
|
-
role:
|
7887
|
+
role: Tr,
|
7883
7888
|
content: Co
|
7884
7889
|
}
|
7885
7890
|
]));
|
@@ -7908,18 +7913,18 @@ const qs = async () => (gr || (gr = import("./index.B8EJY2WR.js")), gr), Ys = as
|
|
7908
7913
|
let U = !1;
|
7909
7914
|
for (const N of ie) {
|
7910
7915
|
const j = "." + N.name.split(".").pop()?.toLowerCase();
|
7911
|
-
|
7916
|
+
vr.includes(j) ? ye.some(
|
7912
7917
|
(ne) => ne.name === N.name && ne.size === N.size && ne.lastModified === N.lastModified
|
7913
7918
|
) || ye.push(N) : U = !0;
|
7914
7919
|
}
|
7915
|
-
if (b.current && (b.current.value = ""), eo(ye) >
|
7916
|
-
I.current = `Total file size exceeds the limit of ${
|
7917
|
-
|
7920
|
+
if (b.current && (b.current.value = ""), eo(ye) > Wr) {
|
7921
|
+
I.current = `Total file size exceeds the limit of ${zt(
|
7922
|
+
Wr
|
7918
7923
|
)}.`, c(!0);
|
7919
7924
|
return;
|
7920
7925
|
}
|
7921
7926
|
if (U) {
|
7922
|
-
I.current = `Only ${
|
7927
|
+
I.current = `Only ${vr.join(
|
7923
7928
|
", "
|
7924
7929
|
)} files are allowed.`, c(!0);
|
7925
7930
|
return;
|
@@ -7927,7 +7932,7 @@ const qs = async () => (gr || (gr = import("./index.B8EJY2WR.js")), gr), Ys = as
|
|
7927
7932
|
if (ye.length > 0) {
|
7928
7933
|
const N = new DataTransfer();
|
7929
7934
|
ye.forEach((j) => N.items.add(j)), s(N.files), f({
|
7930
|
-
type:
|
7935
|
+
type: st,
|
7931
7936
|
payload: {
|
7932
7937
|
attachments: N.files.length
|
7933
7938
|
}
|
@@ -7943,7 +7948,7 @@ const qs = async () => (gr || (gr = import("./index.B8EJY2WR.js")), gr), Ys = as
|
|
7943
7948
|
Array.from(n).forEach((ie) => {
|
7944
7949
|
ie !== K && se.items.add(ie);
|
7945
7950
|
}), se.files.length === 0 ? s(null) : s(se.files), f({
|
7946
|
-
type:
|
7951
|
+
type: st,
|
7947
7952
|
payload: {
|
7948
7953
|
attachments: se.files.length
|
7949
7954
|
}
|
@@ -7951,7 +7956,7 @@ const qs = async () => (gr || (gr = import("./index.B8EJY2WR.js")), gr), Ys = as
|
|
7951
7956
|
}, Me = V(() => {
|
7952
7957
|
b.current && (b.current.value = ""), s(null);
|
7953
7958
|
}, []), je = async (K) => {
|
7954
|
-
K.preventDefault(),
|
7959
|
+
K.preventDefault(), Dt(E);
|
7955
7960
|
const se = await t();
|
7956
7961
|
let ie;
|
7957
7962
|
if (n && n.length > 0) {
|
@@ -7974,7 +7979,7 @@ const qs = async () => (gr || (gr = import("./index.B8EJY2WR.js")), gr), Ys = as
|
|
7974
7979
|
}, _e = (K) => {
|
7975
7980
|
ge(), J(K);
|
7976
7981
|
};
|
7977
|
-
return
|
7982
|
+
return Yr([
|
7978
7983
|
[
|
7979
7984
|
"mod+K",
|
7980
7985
|
() => {
|
@@ -7984,36 +7989,36 @@ const qs = async () => (gr || (gr = import("./index.B8EJY2WR.js")), gr), Ys = as
|
|
7984
7989
|
]), $(() => {
|
7985
7990
|
if (w.prompt !== "") {
|
7986
7991
|
const K = w.prompt.endsWith(":") && !w.prompt.endsWith(": ") ? w.prompt + " " : w.prompt;
|
7987
|
-
K.indexOf(
|
7988
|
-
P(K.replace(
|
7992
|
+
K.indexOf(Ta) !== -1 ? navigator.clipboard.readText().then((ie) => {
|
7993
|
+
P(K.replace(Ta, ie));
|
7989
7994
|
}) : P(K), !Ae() && E.current && E.current.focus(), v({
|
7990
7995
|
type: Tn
|
7991
7996
|
});
|
7992
7997
|
}
|
7993
7998
|
}, [w, v, P]), $(() => {
|
7994
7999
|
if (_.current === !1) {
|
7995
|
-
_.current = !0, !W &&
|
8000
|
+
_.current = !0, !W && Dt(E);
|
7996
8001
|
return;
|
7997
8002
|
}
|
7998
|
-
|
7999
|
-
E.current && (!W &&
|
8000
|
-
}, wh)) : h === !1 && !W && (
|
8001
|
-
}, [
|
8003
|
+
g > 0 && g !== k.current ? (k.current = g, setTimeout(() => {
|
8004
|
+
E.current && (!W && Dt(E), E.current.focus());
|
8005
|
+
}, wh)) : h === !1 && !W && (Dt(E), !Ae() && E.current && E.current.focus());
|
8006
|
+
}, [g, h, W]), $(() => {
|
8002
8007
|
w.lastTriggeredTimestamp && setTimeout(() => {
|
8003
8008
|
ge();
|
8004
8009
|
}, 100);
|
8005
8010
|
}, [w.lastTriggeredTimestamp, ge]), $(() => {
|
8006
8011
|
(async () => {
|
8007
|
-
if (
|
8012
|
+
if (Je())
|
8008
8013
|
return;
|
8009
8014
|
const K = await t(), se = await Hs(K, [As.REASONING]);
|
8010
8015
|
a(se);
|
8011
8016
|
})();
|
8012
8017
|
}, [t]), $(() => {
|
8013
|
-
|
8014
|
-
}, [
|
8018
|
+
y === 0 && (b.current && (b.current.value = ""), s(null));
|
8019
|
+
}, [y]), /* @__PURE__ */ T(ue, { children: [
|
8015
8020
|
/* @__PURE__ */ i(
|
8016
|
-
|
8021
|
+
Ye,
|
8017
8022
|
{
|
8018
8023
|
showConfirmation: o,
|
8019
8024
|
setShowConfirmation: c,
|
@@ -8029,7 +8034,7 @@ const qs = async () => (gr || (gr = import("./index.B8EJY2WR.js")), gr), Ys = as
|
|
8029
8034
|
}
|
8030
8035
|
),
|
8031
8036
|
/* @__PURE__ */ i("div", { className: A.wrapper, ref: x, children: /* @__PURE__ */ T("form", { onSubmit: je, children: [
|
8032
|
-
/* @__PURE__ */ i("div", { id: F, className: "sr-only", children:
|
8037
|
+
/* @__PURE__ */ i("div", { id: F, className: "sr-only", children: Je() ? Ca : l ? Ia : xa }),
|
8033
8038
|
/* @__PURE__ */ T("div", { className: "relative", children: [
|
8034
8039
|
/* @__PURE__ */ i(
|
8035
8040
|
"textarea",
|
@@ -8037,7 +8042,7 @@ const qs = async () => (gr || (gr = import("./index.B8EJY2WR.js")), gr), Ys = as
|
|
8037
8042
|
required: !0,
|
8038
8043
|
rows: ro,
|
8039
8044
|
ref: E,
|
8040
|
-
placeholder:
|
8045
|
+
placeholder: Je() ? Ca : l ? Ia : xa,
|
8041
8046
|
translate: "no",
|
8042
8047
|
onChange: _e,
|
8043
8048
|
value: W,
|
@@ -8062,7 +8067,7 @@ const qs = async () => (gr || (gr = import("./index.B8EJY2WR.js")), gr), Ys = as
|
|
8062
8067
|
onChange: ve,
|
8063
8068
|
className: "hidden",
|
8064
8069
|
multiple: !0,
|
8065
|
-
accept:
|
8070
|
+
accept: vr.join(","),
|
8066
8071
|
"aria-label": "Upload files"
|
8067
8072
|
}
|
8068
8073
|
)
|
@@ -8079,7 +8084,7 @@ const qs = async () => (gr || (gr = import("./index.B8EJY2WR.js")), gr), Ys = as
|
|
8079
8084
|
onClick: Pe
|
8080
8085
|
}
|
8081
8086
|
),
|
8082
|
-
!
|
8087
|
+
!Je() && /* @__PURE__ */ T(ue, { children: [
|
8083
8088
|
r && /* @__PURE__ */ i(Js, { className: "order-4 mr-4 sm:mr-2" }),
|
8084
8089
|
/* @__PURE__ */ i(js, { className: "order-5 mr-4 sm:mr-2" }),
|
8085
8090
|
/* @__PURE__ */ i(Zs, { className: "order-6" })
|
@@ -8087,18 +8092,18 @@ const qs = async () => (gr || (gr = import("./index.B8EJY2WR.js")), gr), Ys = as
|
|
8087
8092
|
] })
|
8088
8093
|
] }) })
|
8089
8094
|
] });
|
8090
|
-
},
|
8095
|
+
}, ft = "--sassy-bottom", xh = ({ isComponent: e }) => {
|
8091
8096
|
const {
|
8092
8097
|
state: { loading: t, streaming: r, restoring: a }
|
8093
8098
|
} = X(be), {
|
8094
8099
|
state: { footerHeight: n, footerPosition: s },
|
8095
8100
|
dispatch: o
|
8096
|
-
} = X(
|
8097
|
-
() =>
|
8098
|
-
), { messages: l } =
|
8101
|
+
} = X(ca), [c] = z(
|
8102
|
+
() => Ra[Math.floor(Math.random() * Ra.length)]
|
8103
|
+
), { messages: l } = Xe(), { height: d } = Wi(), { height: f } = ji(), [u, h] = Kn(), m = he(() => Ae(), []), g = d - f, y = he(() => {
|
8099
8104
|
const w = m ? xo : xn;
|
8100
|
-
return
|
8101
|
-
}, [
|
8105
|
+
return g > 0 && g < 100 ? Io : w;
|
8106
|
+
}, [g, m]);
|
8102
8107
|
return $(() => {
|
8103
8108
|
n !== h.height && o({
|
8104
8109
|
type: Xn,
|
@@ -8109,48 +8114,48 @@ const qs = async () => (gr || (gr = import("./index.B8EJY2WR.js")), gr), Ys = as
|
|
8109
8114
|
}, [h.height, n, o]), $(() => {
|
8110
8115
|
if (!u || !u.current)
|
8111
8116
|
return;
|
8112
|
-
const w = u?.current?.style.getPropertyValue(
|
8117
|
+
const w = u?.current?.style.getPropertyValue(ft);
|
8113
8118
|
if (m) {
|
8114
|
-
w !== `${
|
8115
|
-
type:
|
8119
|
+
w !== `${y}px` && (o({
|
8120
|
+
type: pt,
|
8116
8121
|
payload: {
|
8117
|
-
footerPosition:
|
8118
|
-
footerOffset:
|
8122
|
+
footerPosition: qe,
|
8123
|
+
footerOffset: y
|
8119
8124
|
}
|
8120
8125
|
}), u.current.style.setProperty(
|
8121
|
-
|
8122
|
-
`${
|
8126
|
+
ft,
|
8127
|
+
`${y}px`
|
8123
8128
|
));
|
8124
8129
|
return;
|
8125
8130
|
}
|
8126
|
-
if (s ===
|
8127
|
-
type:
|
8131
|
+
if (s === Kt && (t && !r || a) && w !== `${y}px` && (o({
|
8132
|
+
type: pt,
|
8128
8133
|
payload: {
|
8129
|
-
footerPosition:
|
8130
|
-
footerOffset:
|
8134
|
+
footerPosition: qe,
|
8135
|
+
footerOffset: y
|
8131
8136
|
}
|
8132
8137
|
}), u.current.style.setProperty(
|
8133
|
-
|
8134
|
-
`${
|
8135
|
-
)), s ===
|
8136
|
-
type:
|
8138
|
+
ft,
|
8139
|
+
`${y}px`
|
8140
|
+
)), s === qe && w !== `${y}px` && (o({
|
8141
|
+
type: pt,
|
8137
8142
|
payload: {
|
8138
|
-
footerPosition:
|
8139
|
-
footerOffset:
|
8143
|
+
footerPosition: qe,
|
8144
|
+
footerOffset: y
|
8140
8145
|
}
|
8141
8146
|
}), u.current.style.setProperty(
|
8142
|
-
|
8143
|
-
`${
|
8147
|
+
ft,
|
8148
|
+
`${y}px`
|
8144
8149
|
)), !t && !r && !a && l.length === 0 && d > 0 && h.height > 0) {
|
8145
8150
|
const v = `${d - h.height - (e ? 300 : 245)}`;
|
8146
8151
|
w !== `${v}px` && Number(v) > 0 && (o({
|
8147
|
-
type:
|
8152
|
+
type: pt,
|
8148
8153
|
payload: {
|
8149
|
-
footerPosition:
|
8154
|
+
footerPosition: Kt,
|
8150
8155
|
footerOffset: Number(v)
|
8151
8156
|
}
|
8152
8157
|
}), u?.current?.style.setProperty(
|
8153
|
-
|
8158
|
+
ft,
|
8154
8159
|
`${v}px`
|
8155
8160
|
));
|
8156
8161
|
}
|
@@ -8165,7 +8170,7 @@ const qs = async () => (gr || (gr = import("./index.B8EJY2WR.js")), gr), Ys = as
|
|
8165
8170
|
h.height,
|
8166
8171
|
s,
|
8167
8172
|
m,
|
8168
|
-
|
8173
|
+
y,
|
8169
8174
|
o
|
8170
8175
|
]), /* @__PURE__ */ T(
|
8171
8176
|
"footer",
|
@@ -8184,18 +8189,18 @@ const qs = async () => (gr || (gr = import("./index.B8EJY2WR.js")), gr), Ys = as
|
|
8184
8189
|
]
|
8185
8190
|
}
|
8186
8191
|
);
|
8187
|
-
}, Rh =
|
8188
|
-
() => import("./ProfileEntry.
|
8189
|
-
), Ah =
|
8190
|
-
() => import("./SettingsEntry.
|
8192
|
+
}, Rh = it(
|
8193
|
+
() => import("./ProfileEntry.CYDZFShl.js").then((e) => ({ default: e.Profile }))
|
8194
|
+
), Ah = it(
|
8195
|
+
() => import("./SettingsEntry.DuDxToUb.js").then((e) => ({
|
8191
8196
|
default: e.SettingsPanel
|
8192
8197
|
}))
|
8193
|
-
), Nh =
|
8194
|
-
() => import("./HistoryEntry.
|
8195
|
-
), Oh =
|
8196
|
-
() => import("./AboutEntry.
|
8197
|
-
), $h =
|
8198
|
-
() => import("./UsageEntry.
|
8198
|
+
), Nh = it(
|
8199
|
+
() => import("./HistoryEntry.BVkVfmMS.js").then((e) => ({ default: e.HistoryPanel }))
|
8200
|
+
), Oh = it(
|
8201
|
+
() => import("./AboutEntry.nDJqOOii.js").then((e) => ({ default: e.About }))
|
8202
|
+
), $h = it(
|
8203
|
+
() => import("./UsageEntry.CkDPuqmA.js").then((e) => ({ default: e.Usage }))
|
8199
8204
|
), Ph = ({ type: e, open: t, onOpenChange: r }) => t ? /* @__PURE__ */ i(On, { fallback: /* @__PURE__ */ i("div", {}), children: (() => {
|
8200
8205
|
switch (e) {
|
8201
8206
|
case "profile":
|
@@ -8215,31 +8220,31 @@ const qs = async () => (gr || (gr = import("./index.B8EJY2WR.js")), gr), Ys = as
|
|
8215
8220
|
isComponent: e = !1
|
8216
8221
|
}) => {
|
8217
8222
|
const { logout: t, getAccessToken: r } = Ve(), [a, n] = z(null), [s, o] = z(!1), [c, l] = z(!1), [d, f] = z(!1), u = V(() => {
|
8218
|
-
d || (import("./ProfileEntry.
|
8223
|
+
d || (import("./ProfileEntry.CYDZFShl.js"), import("./SettingsEntry.DuDxToUb.js"), import("./HistoryEntry.BVkVfmMS.js"), import("./AboutEntry.nDJqOOii.js"), import("./UsageEntry.CkDPuqmA.js"), f(!0));
|
8219
8224
|
}, [d]), h = V((w) => {
|
8220
8225
|
n(w);
|
8221
8226
|
}, []), m = V(() => {
|
8222
8227
|
n(null);
|
8223
|
-
}, []),
|
8228
|
+
}, []), g = V(() => {
|
8224
8229
|
h("settings");
|
8225
8230
|
}, [h]);
|
8226
|
-
Vs("openSettings",
|
8227
|
-
const
|
8231
|
+
Vs("openSettings", g);
|
8232
|
+
const y = () => {
|
8228
8233
|
l(!c);
|
8229
8234
|
};
|
8230
8235
|
return $(() => {
|
8231
8236
|
(async () => {
|
8232
|
-
if (!
|
8237
|
+
if (!Je())
|
8233
8238
|
return;
|
8234
8239
|
const w = await r(), v = await Hs(w, [As.REASONING]);
|
8235
8240
|
o(v);
|
8236
8241
|
})();
|
8237
|
-
}, [r]),
|
8242
|
+
}, [r]), Yr(
|
8238
8243
|
[
|
8239
8244
|
[
|
8240
8245
|
"mod+,",
|
8241
8246
|
() => {
|
8242
|
-
|
8247
|
+
Wt() && h("settings");
|
8243
8248
|
}
|
8244
8249
|
]
|
8245
8250
|
],
|
@@ -8251,15 +8256,15 @@ const qs = async () => (gr || (gr = import("./index.B8EJY2WR.js")), gr), Ys = as
|
|
8251
8256
|
[]
|
8252
8257
|
), /* @__PURE__ */ T(ue, { children: [
|
8253
8258
|
/* @__PURE__ */ i(
|
8254
|
-
|
8259
|
+
Ye,
|
8255
8260
|
{
|
8256
8261
|
showConfirmation: c,
|
8257
8262
|
setShowConfirmation: l,
|
8258
8263
|
action: t,
|
8259
8264
|
customStrings: {
|
8260
|
-
confirmAction:
|
8265
|
+
confirmAction: Aa,
|
8261
8266
|
cancelAction: "Cancel",
|
8262
|
-
title:
|
8267
|
+
title: Aa
|
8263
8268
|
},
|
8264
8269
|
children: /* @__PURE__ */ i("p", { children: "Are you sure you want to log out?" })
|
8265
8270
|
}
|
@@ -8281,7 +8286,7 @@ const qs = async () => (gr || (gr = import("./index.B8EJY2WR.js")), gr), Ys = as
|
|
8281
8286
|
columnGap: 0,
|
8282
8287
|
children: [
|
8283
8288
|
/* @__PURE__ */ i(yt, { children: /* @__PURE__ */ i(lh, { className: " mr-4 sm:mr-2" }) }),
|
8284
|
-
/* @__PURE__ */ i(yt, { children:
|
8289
|
+
/* @__PURE__ */ i(yt, { children: Je() && /* @__PURE__ */ T(ue, { children: [
|
8285
8290
|
s && /* @__PURE__ */ i(Js, { className: "mr-4 sm:mr-2" }),
|
8286
8291
|
/* @__PURE__ */ i(js, { className: "mr-4 sm:mr-2" }),
|
8287
8292
|
/* @__PURE__ */ i(Zs, {})
|
@@ -8293,7 +8298,7 @@ const qs = async () => (gr || (gr = import("./index.B8EJY2WR.js")), gr), Ys = as
|
|
8293
8298
|
mode: "light",
|
8294
8299
|
placement: "left",
|
8295
8300
|
trigger: /* @__PURE__ */ T(
|
8296
|
-
|
8301
|
+
er,
|
8297
8302
|
{
|
8298
8303
|
mode: "dark",
|
8299
8304
|
focusMode: "light",
|
@@ -8354,7 +8359,7 @@ const qs = async () => (gr || (gr = import("./index.B8EJY2WR.js")), gr), Ys = as
|
|
8354
8359
|
Re,
|
8355
8360
|
{
|
8356
8361
|
label: "Log out",
|
8357
|
-
onClick:
|
8362
|
+
onClick: y,
|
8358
8363
|
icon: /* @__PURE__ */ i("div", { className: "text-red-700", children: /* @__PURE__ */ i(ui, { monotone: !0 }) })
|
8359
8364
|
}
|
8360
8365
|
)
|
@@ -8368,7 +8373,7 @@ const qs = async () => (gr || (gr = import("./index.B8EJY2WR.js")), gr), Ys = as
|
|
8368
8373
|
}
|
8369
8374
|
) })
|
8370
8375
|
] });
|
8371
|
-
},
|
8376
|
+
}, Ft = "av-bubble", bn = "av-button", ma = "icon", ao = "button", jr = "link", Lh = ({
|
8372
8377
|
type: e,
|
8373
8378
|
size: t,
|
8374
8379
|
labelRight: r,
|
@@ -8379,13 +8384,13 @@ const qs = async () => (gr || (gr = import("./index.B8EJY2WR.js")), gr), Ys = as
|
|
8379
8384
|
const o = "max-h-8 py-0 px-2", c = "max-h-9 h-8 px-3", l = "max-h-12 py-2 px-4";
|
8380
8385
|
switch (e) {
|
8381
8386
|
case ao:
|
8382
|
-
case
|
8387
|
+
case jr:
|
8383
8388
|
return p({
|
8384
8389
|
[o]: t === "small",
|
8385
8390
|
[c]: t === "medium",
|
8386
8391
|
[l]: t === "large"
|
8387
8392
|
});
|
8388
|
-
case
|
8393
|
+
case ma:
|
8389
8394
|
return p("flex items-center", {
|
8390
8395
|
"justify-center": n === "center",
|
8391
8396
|
"justify-start": n === "left",
|
@@ -8413,14 +8418,14 @@ const qs = async () => (gr || (gr = import("./index.B8EJY2WR.js")), gr), Ys = as
|
|
8413
8418
|
const n = "text-sm font-medium", s = "text-base font-medium", o = "text-lg font-medium";
|
8414
8419
|
switch (e) {
|
8415
8420
|
case ao:
|
8416
|
-
case
|
8421
|
+
case jr:
|
8417
8422
|
return p({
|
8418
|
-
"text-center": e ===
|
8423
|
+
"text-center": e === jr,
|
8419
8424
|
[n]: t === "small",
|
8420
8425
|
[s]: t === "medium",
|
8421
8426
|
[o]: t === "large"
|
8422
8427
|
});
|
8423
|
-
case
|
8428
|
+
case ma:
|
8424
8429
|
return p({
|
8425
8430
|
[n]: t === "small" && (r || a),
|
8426
8431
|
[s]: t === "medium" && (r || a),
|
@@ -8627,8 +8632,8 @@ const qs = async () => (gr || (gr = import("./index.B8EJY2WR.js")), gr), Ys = as
|
|
8627
8632
|
noBackground: u,
|
8628
8633
|
variant: h,
|
8629
8634
|
truncate: m,
|
8630
|
-
align:
|
8631
|
-
radius:
|
8635
|
+
align: g,
|
8636
|
+
radius: y,
|
8632
8637
|
animated: w
|
8633
8638
|
}) => (h || (h = "primary"), r ? p(bn, t) : p(
|
8634
8639
|
bn,
|
@@ -8639,13 +8644,13 @@ const qs = async () => (gr || (gr = import("./index.B8EJY2WR.js")), gr), Ys = as
|
|
8639
8644
|
truncate: m
|
8640
8645
|
}),
|
8641
8646
|
Uh({ mode: a, noBackground: u, variant: h }),
|
8642
|
-
Hh({ radius:
|
8647
|
+
Hh({ radius: y }),
|
8643
8648
|
Lh({
|
8644
8649
|
type: e,
|
8645
8650
|
size: c,
|
8646
8651
|
labelRight: d,
|
8647
8652
|
labelLeft: f,
|
8648
|
-
align:
|
8653
|
+
align: g,
|
8649
8654
|
animated: w
|
8650
8655
|
}),
|
8651
8656
|
Dh({ type: e, size: c, labelRight: d, labelLeft: f }),
|
@@ -8702,7 +8707,7 @@ const Qh = {
|
|
8702
8707
|
bottom: 0,
|
8703
8708
|
right: 0
|
8704
8709
|
};
|
8705
|
-
function
|
8710
|
+
function wr(e) {
|
8706
8711
|
const t = qh(), r = R(0), a = R(null), [n, s] = z(Qh), o = he(() => typeof ResizeObserver > "u" ? null : new ResizeObserver((c) => {
|
8707
8712
|
const l = c[0];
|
8708
8713
|
l && (cancelAnimationFrame(r.current), r.current = requestAnimationFrame(() => {
|
@@ -8713,7 +8718,7 @@ function vr(e) {
|
|
8713
8718
|
o?.disconnect(), r.current && cancelAnimationFrame(r.current);
|
8714
8719
|
}), [o, e]), [a, n];
|
8715
8720
|
}
|
8716
|
-
const
|
8721
|
+
const Bt = {
|
8717
8722
|
small: 24,
|
8718
8723
|
// w-6
|
8719
8724
|
medium: 32,
|
@@ -8727,7 +8732,7 @@ const Dt = {
|
|
8727
8732
|
// px-3 x 2
|
8728
8733
|
large: 32
|
8729
8734
|
// px-4 x 2
|
8730
|
-
}, Zh = 2, ef = 300,
|
8735
|
+
}, Zh = 2, ef = 300, pa = Z.forwardRef(
|
8731
8736
|
({
|
8732
8737
|
children: e,
|
8733
8738
|
disabled: t = !1,
|
@@ -8743,8 +8748,8 @@ const Dt = {
|
|
8743
8748
|
size: u = "medium",
|
8744
8749
|
labelRight: h,
|
8745
8750
|
labelLeft: m,
|
8746
|
-
noBackground:
|
8747
|
-
align:
|
8751
|
+
noBackground: g = !1,
|
8752
|
+
align: y = "center",
|
8748
8753
|
radius: w = "large",
|
8749
8754
|
variant: v = "primary",
|
8750
8755
|
iconClassName: C,
|
@@ -8752,7 +8757,7 @@ const Dt = {
|
|
8752
8757
|
...O
|
8753
8758
|
}, I) => {
|
8754
8759
|
const b = Kh({
|
8755
|
-
type:
|
8760
|
+
type: ma,
|
8756
8761
|
mode: r,
|
8757
8762
|
focusMode: a,
|
8758
8763
|
fullWidth: n,
|
@@ -8763,20 +8768,20 @@ const Dt = {
|
|
8763
8768
|
size: u,
|
8764
8769
|
labelRight: h,
|
8765
8770
|
labelLeft: m,
|
8766
|
-
noBackground:
|
8767
|
-
align:
|
8771
|
+
noBackground: g,
|
8772
|
+
align: y,
|
8768
8773
|
radius: w,
|
8769
8774
|
variant: v,
|
8770
8775
|
animated: S
|
8771
|
-
}), _ = jh({ mode: r, raw: c, iconClassName: C }), k = Gh({ animated: S }), x = "flex items-center justify-center relative w-full h-full overflow-hidden", [E, F] =
|
8776
|
+
}), _ = jh({ mode: r, raw: c, iconClassName: C }), k = Gh({ animated: S }), x = "flex items-center justify-center relative w-full h-full overflow-hidden", [E, F] = wr(), [A, W] = wr(), [P, J] = wr(), Q = R(0), L = R(null), M = R(null), q = Yh([I, L]);
|
8772
8777
|
return Oe(() => {
|
8773
|
-
P && P.current && S && (Q.current = J.width + Xh[u] + (l ? 0 : Zh), L.current && !L.current.style.width && (L.current.style.width = `${
|
8778
|
+
P && P.current && S && (Q.current = J.width + Xh[u] + (l ? 0 : Zh), L.current && !L.current.style.width && (L.current.style.width = `${Bt[u]}px`));
|
8774
8779
|
}, [J, P, u, l, S]), Oe(() => {
|
8775
8780
|
if (L && L.current && S) {
|
8776
|
-
let B =
|
8777
|
-
h && E && F.width > 0 ? B = F.width + Q.current : m && A && W.width > 0 && (B = W.width + Q.current), M.current && clearTimeout(M.current), B !== parseInt(L.current.style.width || "0", 10) && (E.current && (E.current.style.opacity = "0"), A.current && (A.current.style.opacity = "0"), L.current.style.width = `${B}px`, B >
|
8781
|
+
let B = Bt[u];
|
8782
|
+
h && E && F.width > 0 ? B = F.width + Q.current : m && A && W.width > 0 && (B = W.width + Q.current), M.current && clearTimeout(M.current), B !== parseInt(L.current.style.width || "0", 10) && (E.current && (E.current.style.opacity = "0"), A.current && (A.current.style.opacity = "0"), L.current.style.width = `${B}px`, B > Bt[u] && (M.current = setTimeout(() => {
|
8778
8783
|
E.current && h && (E.current.style.opacity = "1"), A.current && m && (A.current.style.opacity = "1"), M.current = null;
|
8779
|
-
}, ef * 0.8))), B ===
|
8784
|
+
}, ef * 0.8))), B === Bt[u] && (E.current && (E.current.style.opacity = "0"), A.current && (A.current.style.opacity = "0"));
|
8780
8785
|
}
|
8781
8786
|
}, [
|
8782
8787
|
F,
|
@@ -8839,7 +8844,7 @@ const Dt = {
|
|
8839
8844
|
children: r && /* @__PURE__ */ i("span", { className: a, children: r })
|
8840
8845
|
}
|
8841
8846
|
);
|
8842
|
-
|
8847
|
+
pa.displayName = "ButtonIcon";
|
8843
8848
|
/*!
|
8844
8849
|
@versini/ui-button v6.0.9
|
8845
8850
|
© 2025 gizmette.com
|
@@ -8879,7 +8884,7 @@ const tf = Z.forwardRef(
|
|
8879
8884
|
}
|
8880
8885
|
) : "";
|
8881
8886
|
return /* @__PURE__ */ i("div", { className: o, children: /* @__PURE__ */ i(
|
8882
|
-
|
8887
|
+
pa,
|
8883
8888
|
{
|
8884
8889
|
className: p("justify-center", r),
|
8885
8890
|
ref: s,
|
@@ -9008,7 +9013,7 @@ const nf = ({ kind: e, noMaxWidth: t }) => p("px-4 py-2", {
|
|
9008
9013
|
), cf = ({ kind: e, tail: t }) => {
|
9009
9014
|
if (t)
|
9010
9015
|
return p(
|
9011
|
-
`${
|
9016
|
+
`${Ft}-${e}-tail`,
|
9012
9017
|
"rounded-3xl",
|
9013
9018
|
"relative",
|
9014
9019
|
"before:content-['']",
|
@@ -9034,15 +9039,15 @@ const nf = ({ kind: e, noMaxWidth: t }) => p("px-4 py-2", {
|
|
9034
9039
|
tail: n
|
9035
9040
|
}) => {
|
9036
9041
|
const s = p(
|
9037
|
-
|
9038
|
-
`${
|
9042
|
+
Ft,
|
9043
|
+
`${Ft}-${e}`,
|
9039
9044
|
"flex items-start",
|
9040
9045
|
{
|
9041
9046
|
"flex-row-reverse": e === "right"
|
9042
9047
|
},
|
9043
9048
|
t
|
9044
9049
|
), o = p(
|
9045
|
-
`${
|
9050
|
+
`${Ft}-content`,
|
9046
9051
|
"flex flex-col empty:hidden",
|
9047
9052
|
nf({ kind: e, noMaxWidth: a }),
|
9048
9053
|
of({ kind: e }),
|
@@ -9080,7 +9085,7 @@ const nf = ({ kind: e, noMaxWidth: t }) => p("px-4 py-2", {
|
|
9080
9085
|
contentClassName: a,
|
9081
9086
|
noMaxWidth: d,
|
9082
9087
|
tail: f
|
9083
|
-
}),
|
9088
|
+
}), g = !!o && (typeof o == "function" || typeof o == "string" || typeof e == "string"), y = () => {
|
9084
9089
|
h(!0), typeof o == "function" ? o(e) : typeof o == "string" ? navigator.clipboard.writeText(o) : typeof e == "string" && navigator.clipboard.writeText(e);
|
9085
9090
|
};
|
9086
9091
|
return $(() => {
|
@@ -9103,8 +9108,8 @@ const nf = ({ kind: e, noMaxWidth: t }) => p("px-4 py-2", {
|
|
9103
9108
|
}),
|
9104
9109
|
s && s
|
9105
9110
|
] }),
|
9106
|
-
|
9107
|
-
|
9111
|
+
g && /* @__PURE__ */ i("div", { className: m.copyButton, children: /* @__PURE__ */ i(
|
9112
|
+
pa,
|
9108
9113
|
{
|
9109
9114
|
noBorder: !0,
|
9110
9115
|
noBackground: !0,
|
@@ -9112,7 +9117,7 @@ const nf = ({ kind: e, noMaxWidth: t }) => p("px-4 py-2", {
|
|
9112
9117
|
mode: l,
|
9113
9118
|
focusMode: c,
|
9114
9119
|
label: u ? "Copied to clipboard" : "Copy to clipboard",
|
9115
|
-
onClick:
|
9120
|
+
onClick: y,
|
9116
9121
|
disabled: u,
|
9117
9122
|
children: u ? /* @__PURE__ */ i(rf, { size: "size-3" }) : /* @__PURE__ */ i(af, { size: "size-3" })
|
9118
9123
|
}
|
@@ -9179,7 +9184,7 @@ try {
|
|
9179
9184
|
});
|
9180
9185
|
} catch {
|
9181
9186
|
}
|
9182
|
-
const En = "av-button",
|
9187
|
+
const En = "av-button", tr = "icon", ga = "button", Gr = "link", hf = ({
|
9183
9188
|
type: e,
|
9184
9189
|
size: t,
|
9185
9190
|
labelRight: r,
|
@@ -9189,14 +9194,14 @@ const En = "av-button", er = "icon", pa = "button", jr = "link", hf = ({
|
|
9189
9194
|
}) => {
|
9190
9195
|
const o = "max-h-8 py-0 px-2", c = "max-h-9 h-8 px-3", l = "max-h-12 py-2 px-4";
|
9191
9196
|
switch (e) {
|
9192
|
-
case
|
9193
|
-
case
|
9197
|
+
case ga:
|
9198
|
+
case Gr:
|
9194
9199
|
return p({
|
9195
9200
|
[o]: t === "small",
|
9196
9201
|
[c]: t === "medium",
|
9197
9202
|
[l]: t === "large"
|
9198
9203
|
});
|
9199
|
-
case
|
9204
|
+
case tr:
|
9200
9205
|
return p("flex items-center", {
|
9201
9206
|
"justify-center": n === "center",
|
9202
9207
|
"justify-start": n === "left",
|
@@ -9223,15 +9228,15 @@ const En = "av-button", er = "icon", pa = "button", jr = "link", hf = ({
|
|
9223
9228
|
}) => {
|
9224
9229
|
const n = "text-sm font-medium", s = "text-base font-medium", o = "text-lg font-medium";
|
9225
9230
|
switch (e) {
|
9226
|
-
case
|
9227
|
-
case
|
9231
|
+
case ga:
|
9232
|
+
case Gr:
|
9228
9233
|
return p({
|
9229
|
-
"text-center": e ===
|
9234
|
+
"text-center": e === Gr,
|
9230
9235
|
[n]: t === "small",
|
9231
9236
|
[s]: t === "medium",
|
9232
9237
|
[o]: t === "large"
|
9233
9238
|
});
|
9234
|
-
case
|
9239
|
+
case tr:
|
9235
9240
|
return p({
|
9236
9241
|
[n]: t === "small" && (r || a),
|
9237
9242
|
[s]: t === "medium" && (r || a),
|
@@ -9438,8 +9443,8 @@ const En = "av-button", er = "icon", pa = "button", jr = "link", hf = ({
|
|
9438
9443
|
noBackground: u,
|
9439
9444
|
variant: h,
|
9440
9445
|
truncate: m,
|
9441
|
-
align:
|
9442
|
-
radius:
|
9446
|
+
align: g,
|
9447
|
+
radius: y,
|
9443
9448
|
animated: w
|
9444
9449
|
}) => (h || (h = "primary"), r ? p(En, t) : p(
|
9445
9450
|
En,
|
@@ -9450,13 +9455,13 @@ const En = "av-button", er = "icon", pa = "button", jr = "link", hf = ({
|
|
9450
9455
|
truncate: m
|
9451
9456
|
}),
|
9452
9457
|
pf({ mode: a, noBackground: u, variant: h }),
|
9453
|
-
gf({ radius:
|
9458
|
+
gf({ radius: y }),
|
9454
9459
|
hf({
|
9455
9460
|
type: e,
|
9456
9461
|
size: c,
|
9457
9462
|
labelRight: d,
|
9458
9463
|
labelLeft: f,
|
9459
|
-
align:
|
9464
|
+
align: g,
|
9460
9465
|
animated: w
|
9461
9466
|
}),
|
9462
9467
|
ff({ type: e, size: c, labelRight: d, labelLeft: f }),
|
@@ -9469,13 +9474,13 @@ const En = "av-button", er = "icon", pa = "button", jr = "link", hf = ({
|
|
9469
9474
|
"disabled:cursor-not-allowed disabled:opacity-50": s
|
9470
9475
|
},
|
9471
9476
|
p({
|
9472
|
-
"transition-[width] duration-300 ease-in": e ===
|
9477
|
+
"transition-[width] duration-300 ease-in": e === tr && w
|
9473
9478
|
}),
|
9474
9479
|
t
|
9475
9480
|
)), _f = (e, t, r) => {
|
9476
9481
|
var a;
|
9477
9482
|
!t && (!document.activeElement || document.activeElement !== e.currentTarget) && typeof ((a = e?.currentTarget) == null ? void 0 : a.focus) == "function" && e.currentTarget.focus(), typeof r == "function" && r(e);
|
9478
|
-
},
|
9483
|
+
}, ya = Z.forwardRef((e, t) => {
|
9479
9484
|
const { onClick: r, noInternalClick: a = !1, ...n } = e;
|
9480
9485
|
return /* @__PURE__ */ i(
|
9481
9486
|
"button",
|
@@ -9488,7 +9493,7 @@ const En = "av-button", er = "icon", pa = "button", jr = "link", hf = ({
|
|
9488
9493
|
}
|
9489
9494
|
);
|
9490
9495
|
});
|
9491
|
-
|
9496
|
+
ya.displayName = "BaseButton";
|
9492
9497
|
const co = Z.forwardRef(
|
9493
9498
|
({
|
9494
9499
|
children: e,
|
@@ -9505,8 +9510,8 @@ const co = Z.forwardRef(
|
|
9505
9510
|
radius: u = "large",
|
9506
9511
|
...h
|
9507
9512
|
}, m) => {
|
9508
|
-
const
|
9509
|
-
type:
|
9513
|
+
const g = io({
|
9514
|
+
type: ga,
|
9510
9515
|
mode: r,
|
9511
9516
|
focusMode: a,
|
9512
9517
|
fullWidth: n,
|
@@ -9520,10 +9525,10 @@ const co = Z.forwardRef(
|
|
9520
9525
|
radius: u
|
9521
9526
|
});
|
9522
9527
|
return /* @__PURE__ */ i(
|
9523
|
-
|
9528
|
+
ya,
|
9524
9529
|
{
|
9525
9530
|
ref: m,
|
9526
|
-
className:
|
9531
|
+
className: g,
|
9527
9532
|
disabled: t,
|
9528
9533
|
...h,
|
9529
9534
|
children: e
|
@@ -9556,7 +9561,7 @@ const Cf = {
|
|
9556
9561
|
bottom: 0,
|
9557
9562
|
right: 0
|
9558
9563
|
};
|
9559
|
-
function
|
9564
|
+
function Er(e) {
|
9560
9565
|
const t = Sf(), r = R(0), a = R(null), [n, s] = z(Cf), o = he(() => typeof ResizeObserver > "u" ? null : new ResizeObserver((c) => {
|
9561
9566
|
const l = c[0];
|
9562
9567
|
l && (cancelAnimationFrame(r.current), r.current = requestAnimationFrame(() => {
|
@@ -9567,7 +9572,7 @@ function wr(e) {
|
|
9567
9572
|
o?.disconnect(), r.current && cancelAnimationFrame(r.current);
|
9568
9573
|
}), [o, e]), [a, n];
|
9569
9574
|
}
|
9570
|
-
const
|
9575
|
+
const Ut = {
|
9571
9576
|
small: 24,
|
9572
9577
|
// w-6
|
9573
9578
|
medium: 32,
|
@@ -9597,8 +9602,8 @@ const Bt = {
|
|
9597
9602
|
size: u = "medium",
|
9598
9603
|
labelRight: h,
|
9599
9604
|
labelLeft: m,
|
9600
|
-
noBackground:
|
9601
|
-
align:
|
9605
|
+
noBackground: g = !1,
|
9606
|
+
align: y = "center",
|
9602
9607
|
radius: w = "large",
|
9603
9608
|
variant: v = "primary",
|
9604
9609
|
iconClassName: C,
|
@@ -9606,7 +9611,7 @@ const Bt = {
|
|
9606
9611
|
...O
|
9607
9612
|
}, I) => {
|
9608
9613
|
const b = io({
|
9609
|
-
type:
|
9614
|
+
type: tr,
|
9610
9615
|
mode: r,
|
9611
9616
|
focusMode: a,
|
9612
9617
|
fullWidth: n,
|
@@ -9617,20 +9622,20 @@ const Bt = {
|
|
9617
9622
|
size: u,
|
9618
9623
|
labelRight: h,
|
9619
9624
|
labelLeft: m,
|
9620
|
-
noBackground:
|
9621
|
-
align:
|
9625
|
+
noBackground: g,
|
9626
|
+
align: y,
|
9622
9627
|
radius: w,
|
9623
9628
|
variant: v,
|
9624
9629
|
animated: S
|
9625
|
-
}), _ = Ef({ mode: r, raw: c, iconClassName: C }), k = kf({ animated: S }), x = "flex items-center justify-center relative w-full h-full overflow-hidden", [E, F] =
|
9630
|
+
}), _ = Ef({ mode: r, raw: c, iconClassName: C }), k = kf({ animated: S }), x = "flex items-center justify-center relative w-full h-full overflow-hidden", [E, F] = Er(), [A, W] = Er(), [P, J] = Er(), Q = R(0), L = R(null), M = R(null), q = Tf([I, L]);
|
9626
9631
|
return Oe(() => {
|
9627
|
-
P && P.current && S && (Q.current = J.width + If[u] + (l ? 0 : xf), L.current && !L.current.style.width && (L.current.style.width = `${
|
9632
|
+
P && P.current && S && (Q.current = J.width + If[u] + (l ? 0 : xf), L.current && !L.current.style.width && (L.current.style.width = `${Ut[u]}px`));
|
9628
9633
|
}, [J, P, u, l, S]), Oe(() => {
|
9629
9634
|
if (L && L.current && S) {
|
9630
|
-
let B =
|
9631
|
-
h && E && F.width > 0 ? B = F.width + Q.current : m && A && W.width > 0 && (B = W.width + Q.current), M.current && clearTimeout(M.current), B !== parseInt(L.current.style.width || "0", 10) && (E.current && (E.current.style.opacity = "0"), A.current && (A.current.style.opacity = "0"), L.current.style.width = `${B}px`, B >
|
9635
|
+
let B = Ut[u];
|
9636
|
+
h && E && F.width > 0 ? B = F.width + Q.current : m && A && W.width > 0 && (B = W.width + Q.current), M.current && clearTimeout(M.current), B !== parseInt(L.current.style.width || "0", 10) && (E.current && (E.current.style.opacity = "0"), A.current && (A.current.style.opacity = "0"), L.current.style.width = `${B}px`, B > Ut[u] && (M.current = setTimeout(() => {
|
9632
9637
|
E.current && h && (E.current.style.opacity = "1"), A.current && m && (A.current.style.opacity = "1"), M.current = null;
|
9633
|
-
}, Rf * 0.8))), B ===
|
9638
|
+
}, Rf * 0.8))), B === Ut[u] && (E.current && (E.current.style.opacity = "0"), A.current && (A.current.style.opacity = "0"));
|
9634
9639
|
}
|
9635
9640
|
}, [
|
9636
9641
|
F,
|
@@ -9644,7 +9649,7 @@ const Bt = {
|
|
9644
9649
|
]), $(() => () => {
|
9645
9650
|
M.current && clearTimeout(M.current);
|
9646
9651
|
}, []), /* @__PURE__ */ i(
|
9647
|
-
|
9652
|
+
ya,
|
9648
9653
|
{
|
9649
9654
|
ref: q,
|
9650
9655
|
className: b,
|
@@ -9812,10 +9817,10 @@ const Pf = ({ content: e }) => /* @__PURE__ */ i(
|
|
9812
9817
|
className: "mt-3",
|
9813
9818
|
children: /* @__PURE__ */ i($f, { mode: "light", focusMode: "light", children: e })
|
9814
9819
|
}
|
9815
|
-
), _n = 2, Mf =
|
9820
|
+
), _n = 2, Mf = it(
|
9816
9821
|
() => import(
|
9817
9822
|
/* webpackChunkName: "LazyMessageAssistant" */
|
9818
|
-
"./ChatBubbleAssistant.
|
9823
|
+
"./ChatBubbleAssistant.ob8UickE.js"
|
9819
9824
|
)
|
9820
9825
|
), Lf = Z.memo(
|
9821
9826
|
({
|
@@ -9828,7 +9833,7 @@ const Pf = ({ content: e }) => /* @__PURE__ */ i(
|
|
9828
9833
|
const {
|
9829
9834
|
state: { restoring: s, streaming: o }
|
9830
9835
|
} = X(be);
|
9831
|
-
return e === hd && t ? /* @__PURE__ */ i(Pf, { content: t }) : o && (e ===
|
9836
|
+
return e === hd && t ? /* @__PURE__ */ i(Pf, { content: t }) : o && (e === qt || e === Tr) && (!t || t && t.length < _n) ? /* @__PURE__ */ i(oo, { tail: !0, children: /* @__PURE__ */ i(uf, { type: "dots" }) }) : (e === qt || e === Tr) && t && t.length >= _n ? /* @__PURE__ */ i(On, { fallback: /* @__PURE__ */ i("span", {}), children: /* @__PURE__ */ i(
|
9832
9837
|
Mf,
|
9833
9838
|
{
|
9834
9839
|
role: e,
|
@@ -9841,7 +9846,7 @@ const Pf = ({ content: e }) => /* @__PURE__ */ i(
|
|
9841
9846
|
) }) : null;
|
9842
9847
|
}
|
9843
9848
|
), Df = () => {
|
9844
|
-
const { messages: e } =
|
9849
|
+
const { messages: e } = Xe(), t = e ? e.map((r, a) => r.role === qt ? a : -1).filter((r) => r !== -1).pop() : -1;
|
9845
9850
|
return e && e.length > 0 ? /* @__PURE__ */ i("div", { className: "space-y-6 mt-2 @container", children: e?.map((r, a) => {
|
9846
9851
|
let n;
|
9847
9852
|
const s = `${a}-${r.role}`, o = r.parts.map((d) => {
|
@@ -9854,7 +9859,7 @@ const Pf = ({ content: e }) => /* @__PURE__ */ i(
|
|
9854
9859
|
`;
|
9855
9860
|
}
|
9856
9861
|
}), c = o && o.length > 0 ? o.filter(Boolean).join(`
|
9857
|
-
`) : void 0, l = r.role ===
|
9862
|
+
`) : void 0, l = r.role === qt && a === t;
|
9858
9863
|
return /* @__PURE__ */ i(
|
9859
9864
|
Lf,
|
9860
9865
|
{
|
@@ -9870,22 +9875,22 @@ const Pf = ({ content: e }) => /* @__PURE__ */ i(
|
|
9870
9875
|
}, Bf = () => {
|
9871
9876
|
const { isAuthenticated: e } = Ve(), { ref: t, inViewport: r } = Bi(), a = R(null), n = R(null), {
|
9872
9877
|
state: { footerPosition: s, footerHeight: o, footerOffset: c }
|
9873
|
-
} = X(
|
9878
|
+
} = X(ca), {
|
9874
9879
|
state: { loading: l }
|
9875
|
-
} = X(be), { messages: d } =
|
9880
|
+
} = X(be), { messages: d } = Xe(), f = R(0), u = Ro({
|
9876
9881
|
isAuthenticated: e,
|
9877
9882
|
extraClass: "rounded-b-md relative"
|
9878
9883
|
}), m = (!d || d.length === 0) && // no current chat session OR no messages
|
9879
|
-
Ae() ? "iphone-logo-conditional" :
|
9884
|
+
Ae() ? "iphone-logo-conditional" : Je() ? "mt-4" : "", g = V(() => {
|
9880
9885
|
n.current && n.current.scrollIntoView({
|
9881
9886
|
behavior: "smooth",
|
9882
9887
|
block: "end"
|
9883
9888
|
});
|
9884
9889
|
}, []);
|
9885
9890
|
return $(() => {
|
9886
|
-
l &&
|
9887
|
-
}, [l,
|
9888
|
-
f.current = s ===
|
9891
|
+
l && g();
|
9892
|
+
}, [l, g]), $(() => {
|
9893
|
+
f.current = s === qe ? o + c + Rn + Ao : 0;
|
9889
9894
|
}, [s, o, c]), /* @__PURE__ */ T(ue, { children: [
|
9890
9895
|
/* @__PURE__ */ T("div", { className: u, ref: a, children: [
|
9891
9896
|
/* @__PURE__ */ i(No, { className: m }),
|
@@ -9896,9 +9901,9 @@ const Pf = ({ content: e }) => /* @__PURE__ */ i(
|
|
9896
9901
|
/* @__PURE__ */ i(
|
9897
9902
|
ih,
|
9898
9903
|
{
|
9899
|
-
show: !r && s ===
|
9904
|
+
show: !r && s === qe,
|
9900
9905
|
bottom: f.current,
|
9901
|
-
onClick:
|
9906
|
+
onClick: g
|
9902
9907
|
}
|
9903
9908
|
)
|
9904
9909
|
] });
|
@@ -9907,20 +9912,20 @@ function uo({
|
|
9907
9912
|
isComponent: e = !1,
|
9908
9913
|
headerHeight: t = 0
|
9909
9914
|
}) {
|
9910
|
-
const { user: r, getAccessToken: a } = Ve(), [n, s] = z(`${
|
9911
|
-
key:
|
9915
|
+
const { user: r, getAccessToken: a } = Ve(), [n, s] = z(`${Na}px`), [o, c] = Kn(), [l, d] = z(Ue()), [f, u] = z([]), [h] = Gt({
|
9916
|
+
key: jt + Mo,
|
9912
9917
|
initialValue: ""
|
9913
|
-
}), [m] =
|
9914
|
-
key:
|
9915
|
-
initialValue:
|
9916
|
-
}),
|
9918
|
+
}), [m] = Gt({
|
9919
|
+
key: jt + Po,
|
9920
|
+
initialValue: mt.ASC
|
9921
|
+
}), g = he(() => {
|
9917
9922
|
const k = Ae();
|
9918
9923
|
return {
|
9919
|
-
footerPosition: k ?
|
9924
|
+
footerPosition: k ? qe : Kt,
|
9920
9925
|
footerHeight: 0,
|
9921
9926
|
footerOffset: k ? xn : 0
|
9922
9927
|
};
|
9923
|
-
}, []), [
|
9928
|
+
}, []), [y, w] = St(Tc, g), [v, C] = St(Ic, {
|
9924
9929
|
searchString: h,
|
9925
9930
|
sortedCell: "timestamp",
|
9926
9931
|
sortDirection: m
|
@@ -9940,7 +9945,7 @@ function uo({
|
|
9940
9945
|
attachments: 0,
|
9941
9946
|
lastStreamingTimestamp: 0,
|
9942
9947
|
lastResetTimestamp: 0
|
9943
|
-
}), { data: _ } =
|
9948
|
+
}), { data: _ } = Xt({
|
9944
9949
|
user: r?.username,
|
9945
9950
|
getAccessToken: a
|
9946
9951
|
});
|
@@ -9954,22 +9959,22 @@ function uo({
|
|
9954
9959
|
}
|
9955
9960
|
});
|
9956
9961
|
}, [_]), $(() => {
|
9957
|
-
if (
|
9962
|
+
if (y.footerPosition === "FOOTER_BOTTOM") {
|
9958
9963
|
const k = `calc(${c.height}px + 20px)`;
|
9959
9964
|
s(
|
9960
|
-
`calc(100svh - ${t}px - ${k} - ${
|
9965
|
+
`calc(100svh - ${t}px - ${k} - ${y.footerHeight}px - ${y.footerOffset}px - ${Rn}px)`
|
9961
9966
|
);
|
9962
9967
|
} else
|
9963
|
-
s(`${
|
9964
|
-
}, [
|
9965
|
-
|
9968
|
+
s(`${Na}px`);
|
9969
|
+
}, [y, c, t]), /* @__PURE__ */ i(
|
9970
|
+
oa.Provider,
|
9966
9971
|
{
|
9967
9972
|
value: {
|
9968
9973
|
state: v,
|
9969
9974
|
dispatch: C
|
9970
9975
|
},
|
9971
|
-
children: /* @__PURE__ */ i(
|
9972
|
-
|
9976
|
+
children: /* @__PURE__ */ i(ca.Provider, { value: { state: y, dispatch: w }, children: /* @__PURE__ */ i(
|
9977
|
+
ia.Provider,
|
9973
9978
|
{
|
9974
9979
|
value: { state: S, dispatch: O },
|
9975
9980
|
children: /* @__PURE__ */ i(
|
@@ -9986,7 +9991,7 @@ function uo({
|
|
9986
9991
|
{
|
9987
9992
|
value: {
|
9988
9993
|
id: l,
|
9989
|
-
api: `${
|
9994
|
+
api: `${ea}/api/generate`,
|
9990
9995
|
initialMessages: f,
|
9991
9996
|
experimental_throttle: 300,
|
9992
9997
|
sendExtraMessageFields: !1,
|
@@ -10001,8 +10006,8 @@ function uo({
|
|
10001
10006
|
},
|
10002
10007
|
children: [
|
10003
10008
|
/* @__PURE__ */ T("div", { className: Oo, children: [
|
10004
|
-
/* @__PURE__ */ i(
|
10005
|
-
/* @__PURE__ */ i(
|
10009
|
+
/* @__PURE__ */ i(za, { containerId: "toggle-save" }),
|
10010
|
+
/* @__PURE__ */ i(za, { containerId: "toggle-provider" })
|
10006
10011
|
] }),
|
10007
10012
|
/* @__PURE__ */ i(
|
10008
10013
|
$i,
|
@@ -10012,7 +10017,7 @@ function uo({
|
|
10012
10017
|
noMargin: !0,
|
10013
10018
|
noPadding: !0,
|
10014
10019
|
noBorder: !0,
|
10015
|
-
className:
|
10020
|
+
className: Oa({
|
10016
10021
|
extraClass: "mt-5"
|
10017
10022
|
}),
|
10018
10023
|
children: /* @__PURE__ */ i(Mh, { isComponent: e })
|
@@ -10021,7 +10026,7 @@ function uo({
|
|
10021
10026
|
/* @__PURE__ */ i(
|
10022
10027
|
$o,
|
10023
10028
|
{
|
10024
|
-
className:
|
10029
|
+
className: Oa({
|
10025
10030
|
extraClass: "transition-all ease-in-out duration-500"
|
10026
10031
|
}),
|
10027
10032
|
noMargin: !0,
|
@@ -10050,20 +10055,20 @@ export {
|
|
10050
10055
|
im as App,
|
10051
10056
|
ih as ButtonScroll,
|
10052
10057
|
es as CHAT_SET_PROVIDER,
|
10053
|
-
|
10058
|
+
at as CHAT_SET_STATUS,
|
10054
10059
|
be as ChatContext,
|
10055
|
-
|
10056
|
-
|
10060
|
+
Ye as ConfirmationPanel,
|
10061
|
+
Gt as E,
|
10057
10062
|
Gf as Fe,
|
10058
10063
|
Kf as Ge,
|
10059
10064
|
Wf as He,
|
10060
|
-
|
10061
|
-
|
10065
|
+
oa as HistoryContext,
|
10066
|
+
za as LazyToastContainerWrapper,
|
10062
10067
|
df as Me,
|
10063
10068
|
Rs as O,
|
10064
10069
|
oo as Oe,
|
10065
10070
|
wc as Pe,
|
10066
|
-
|
10071
|
+
mt as R,
|
10067
10072
|
ze as SERVICE_TYPES,
|
10068
10073
|
qf as Ye,
|
10069
10074
|
bi as a,
|
@@ -10074,7 +10079,7 @@ export {
|
|
10074
10079
|
Fi as i,
|
10075
10080
|
em as k,
|
10076
10081
|
ts as mutateCall,
|
10077
|
-
|
10082
|
+
sa as n,
|
10078
10083
|
tm as nt,
|
10079
10084
|
xs as o,
|
10080
10085
|
Si as p,
|
@@ -10084,11 +10089,11 @@ export {
|
|
10084
10089
|
Rc as setNewProvider,
|
10085
10090
|
om as showErrorToast,
|
10086
10091
|
Xs as showSuccessToast,
|
10087
|
-
|
10092
|
+
Xe as useAiChat,
|
10088
10093
|
Qf as useChangelogs,
|
10089
10094
|
rs as useChatsHistory,
|
10090
10095
|
Zf as useChatsUsage,
|
10091
10096
|
Yf as useServerCapabilities,
|
10092
10097
|
Xf as useUserChatStats,
|
10093
|
-
|
10098
|
+
Xt as useUserPreferences
|
10094
10099
|
};
|