teodor-new-chat-ui 3.0.1 → 3.0.3
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/index.esm.js +326 -323
- package/dist/index.umd.js +6 -6
- package/package.json +1 -1
package/dist/index.esm.js
CHANGED
|
@@ -22,12 +22,12 @@ const { toString: Nd } = Object.prototype, { getPrototypeOf: Fo } = Object, { it
|
|
|
22
22
|
function fn(e) {
|
|
23
23
|
return e !== null && !Lt(e) && e.constructor !== null && !Lt(e.constructor) && Pe(e.constructor.isBuffer) && e.constructor.isBuffer(e);
|
|
24
24
|
}
|
|
25
|
-
const
|
|
25
|
+
const ka = Ve("ArrayBuffer");
|
|
26
26
|
function Rd(e) {
|
|
27
27
|
let t;
|
|
28
|
-
return typeof ArrayBuffer < "u" && ArrayBuffer.isView ? t = ArrayBuffer.isView(e) : t = e && e.buffer &&
|
|
28
|
+
return typeof ArrayBuffer < "u" && ArrayBuffer.isView ? t = ArrayBuffer.isView(e) : t = e && e.buffer && ka(e.buffer), t;
|
|
29
29
|
}
|
|
30
|
-
const Td = fr("string"), Pe = fr("function"),
|
|
30
|
+
const Td = fr("string"), Pe = fr("function"), Ma = fr("number"), pn = (e) => e !== null && typeof e == "object", Ad = (e) => e === !0 || e === !1, Ln = (e) => {
|
|
31
31
|
if (dr(e) !== "object")
|
|
32
32
|
return !1;
|
|
33
33
|
const t = Fo(e);
|
|
@@ -40,7 +40,7 @@ const Td = fr("string"), Pe = fr("function"), ka = fr("number"), pn = (e) => e !
|
|
|
40
40
|
} catch {
|
|
41
41
|
return !1;
|
|
42
42
|
}
|
|
43
|
-
}, Id = Ve("Date"), _d = Ve("File"), Od = Ve("Blob"),
|
|
43
|
+
}, Id = Ve("Date"), _d = Ve("File"), Od = Ve("Blob"), kd = Ve("FileList"), Md = (e) => pn(e) && Pe(e.pipe), Dd = (e) => {
|
|
44
44
|
let t;
|
|
45
45
|
return e && (typeof FormData == "function" && e instanceof FormData || Pe(e.append) && ((t = dr(e)) === "formdata" || // detect form-data instance
|
|
46
46
|
t === "object" && Pe(e.toString) && e.toString() === "[object FormData]"));
|
|
@@ -106,7 +106,7 @@ const zd = (e, t, n, { allOwnKeys: r } = {}) => (hn(t, (o, s) => {
|
|
|
106
106
|
if (!e) return null;
|
|
107
107
|
if (Ht(e)) return e;
|
|
108
108
|
let t = e.length;
|
|
109
|
-
if (!
|
|
109
|
+
if (!Ma(t)) return null;
|
|
110
110
|
const n = new Array(t);
|
|
111
111
|
for (; t-- > 0; )
|
|
112
112
|
n[t] = e[t];
|
|
@@ -190,12 +190,12 @@ const sf = (e) => {
|
|
|
190
190
|
Pe(bt.postMessage)
|
|
191
191
|
), lf = typeof queueMicrotask < "u" ? queueMicrotask.bind(bt) : typeof process < "u" && process.nextTick || $a, uf = (e) => e != null && Pe(e[ur]), S = {
|
|
192
192
|
isArray: Ht,
|
|
193
|
-
isArrayBuffer:
|
|
193
|
+
isArrayBuffer: ka,
|
|
194
194
|
isBuffer: fn,
|
|
195
195
|
isFormData: Dd,
|
|
196
196
|
isArrayBufferView: Rd,
|
|
197
197
|
isString: Td,
|
|
198
|
-
isNumber:
|
|
198
|
+
isNumber: Ma,
|
|
199
199
|
isBoolean: Ad,
|
|
200
200
|
isObject: pn,
|
|
201
201
|
isPlainObject: Ln,
|
|
@@ -210,10 +210,10 @@ const sf = (e) => {
|
|
|
210
210
|
isBlob: Od,
|
|
211
211
|
isRegExp: Qd,
|
|
212
212
|
isFunction: Pe,
|
|
213
|
-
isStream:
|
|
213
|
+
isStream: Md,
|
|
214
214
|
isURLSearchParams: Ld,
|
|
215
215
|
isTypedArray: qd,
|
|
216
|
-
isFileList:
|
|
216
|
+
isFileList: kd,
|
|
217
217
|
forEach: hn,
|
|
218
218
|
merge: uo,
|
|
219
219
|
extend: zd,
|
|
@@ -847,11 +847,11 @@ function Ga(e, t, n) {
|
|
|
847
847
|
n
|
|
848
848
|
));
|
|
849
849
|
}
|
|
850
|
-
function
|
|
850
|
+
function kf(e) {
|
|
851
851
|
const t = /^([-+\w]{1,25})(:?\/\/|:)/.exec(e);
|
|
852
852
|
return t && t[1] || "";
|
|
853
853
|
}
|
|
854
|
-
function
|
|
854
|
+
function Mf(e, t) {
|
|
855
855
|
e = e || 10;
|
|
856
856
|
const n = new Array(e), r = new Array(e);
|
|
857
857
|
let o = 0, s = 0, a;
|
|
@@ -881,7 +881,7 @@ function Df(e, t) {
|
|
|
881
881
|
}
|
|
882
882
|
const Jn = (e, t, n = 3) => {
|
|
883
883
|
let r = 0;
|
|
884
|
-
const o =
|
|
884
|
+
const o = Mf(50, 250);
|
|
885
885
|
return Df((s) => {
|
|
886
886
|
const a = s.loaded, i = s.lengthComputable ? s.total : void 0, l = a - r, f = o(l), d = a <= i;
|
|
887
887
|
r = a;
|
|
@@ -898,14 +898,14 @@ const Jn = (e, t, n = 3) => {
|
|
|
898
898
|
};
|
|
899
899
|
e(p);
|
|
900
900
|
}, n);
|
|
901
|
-
},
|
|
901
|
+
}, ks = (e, t) => {
|
|
902
902
|
const n = e != null;
|
|
903
903
|
return [(r) => t[0]({
|
|
904
904
|
lengthComputable: n,
|
|
905
905
|
total: e,
|
|
906
906
|
loaded: r
|
|
907
907
|
}), t[1]];
|
|
908
|
-
},
|
|
908
|
+
}, Ms = (e) => (...t) => S.asap(() => e(...t)), Lf = xe.hasStandardBrowserEnv ? /* @__PURE__ */ ((e, t) => (n) => (n = new URL(n, xe.origin), e.protocol === n.protocol && e.host === n.host && (t || e.port === n.port)))(
|
|
909
909
|
new URL(xe.origin),
|
|
910
910
|
xe.navigator && /(msie|trident)/i.test(xe.navigator.userAgent)
|
|
911
911
|
) : () => !0, Ff = xe.hasStandardBrowserEnv ? (
|
|
@@ -1082,7 +1082,7 @@ const Xa = (e) => {
|
|
|
1082
1082
|
}), S.isUndefined(o.withCredentials) || (b.withCredentials = !!o.withCredentials), i && i !== "json" && (b.responseType = o.responseType), f && ([m, g] = Jn(f, !0), b.addEventListener("progress", m)), l && b.upload && ([p, v] = Jn(l), b.upload.addEventListener("progress", p), b.upload.addEventListener("loadend", v)), (o.cancelToken || o.signal) && (d = (y) => {
|
|
1083
1083
|
b && (r(!y || y.type ? new zt(null, e, b) : y), b.abort(), b = null);
|
|
1084
1084
|
}, o.cancelToken && o.cancelToken.subscribe(d), o.signal && (o.signal.aborted ? d() : o.signal.addEventListener("abort", d)));
|
|
1085
|
-
const x =
|
|
1085
|
+
const x = kf(o.url);
|
|
1086
1086
|
if (x && xe.protocols.indexOf(x) === -1) {
|
|
1087
1087
|
r(new ne("Unsupported protocol " + x + ":", ne.ERR_BAD_REQUEST, e));
|
|
1088
1088
|
return;
|
|
@@ -1238,27 +1238,27 @@ const Xa = (e) => {
|
|
|
1238
1238
|
onDownloadProgress: R,
|
|
1239
1239
|
onUploadProgress: _,
|
|
1240
1240
|
responseType: N,
|
|
1241
|
-
headers:
|
|
1241
|
+
headers: k,
|
|
1242
1242
|
withCredentials: L = "same-origin",
|
|
1243
1243
|
fetchOptions: P
|
|
1244
1244
|
} = Xa(g), $ = t || fetch;
|
|
1245
1245
|
N = N ? (N + "").toLowerCase() : "text";
|
|
1246
1246
|
let K = zf([x, y && y.toAbortSignal()], C), B = null;
|
|
1247
|
-
const
|
|
1247
|
+
const M = K && K.unsubscribe && (() => {
|
|
1248
1248
|
K.unsubscribe();
|
|
1249
1249
|
});
|
|
1250
1250
|
let H;
|
|
1251
1251
|
try {
|
|
1252
|
-
if (_ && f && b !== "get" && b !== "head" && (H = await v(
|
|
1252
|
+
if (_ && f && b !== "get" && b !== "head" && (H = await v(k, w)) !== 0) {
|
|
1253
1253
|
let q = new n(h, {
|
|
1254
1254
|
method: "POST",
|
|
1255
1255
|
body: w,
|
|
1256
1256
|
duplex: "half"
|
|
1257
1257
|
}), ae;
|
|
1258
|
-
if (S.isFormData(w) && (ae = q.headers.get("content-type")) &&
|
|
1259
|
-
const [F, j] =
|
|
1258
|
+
if (S.isFormData(w) && (ae = q.headers.get("content-type")) && k.setContentType(ae), q.body) {
|
|
1259
|
+
const [F, j] = ks(
|
|
1260
1260
|
H,
|
|
1261
|
-
Jn(
|
|
1261
|
+
Jn(Ms(_))
|
|
1262
1262
|
);
|
|
1263
1263
|
w = Ls(q.body, Fs, F, j);
|
|
1264
1264
|
}
|
|
@@ -1268,7 +1268,7 @@ const Xa = (e) => {
|
|
|
1268
1268
|
...P,
|
|
1269
1269
|
signal: K,
|
|
1270
1270
|
method: b.toUpperCase(),
|
|
1271
|
-
headers:
|
|
1271
|
+
headers: k.normalize().toJSON(),
|
|
1272
1272
|
body: w,
|
|
1273
1273
|
duplex: "half",
|
|
1274
1274
|
credentials: O ? L : void 0
|
|
@@ -1276,27 +1276,27 @@ const Xa = (e) => {
|
|
|
1276
1276
|
B = s && new n(h, G);
|
|
1277
1277
|
let D = await (s ? $(B, P) : $(h, G));
|
|
1278
1278
|
const T = d && (N === "stream" || N === "response");
|
|
1279
|
-
if (d && (R || T &&
|
|
1279
|
+
if (d && (R || T && M)) {
|
|
1280
1280
|
const q = {};
|
|
1281
1281
|
["status", "statusText", "headers"].forEach((ce) => {
|
|
1282
1282
|
q[ce] = D[ce];
|
|
1283
1283
|
});
|
|
1284
|
-
const ae = S.toFiniteNumber(D.headers.get("content-length")), [F, j] = R &&
|
|
1284
|
+
const ae = S.toFiniteNumber(D.headers.get("content-length")), [F, j] = R && ks(
|
|
1285
1285
|
ae,
|
|
1286
|
-
Jn(
|
|
1286
|
+
Jn(Ms(R), !0)
|
|
1287
1287
|
) || [];
|
|
1288
1288
|
D = new r(
|
|
1289
1289
|
Ls(D.body, Fs, F, () => {
|
|
1290
|
-
j && j(),
|
|
1290
|
+
j && j(), M && M();
|
|
1291
1291
|
}),
|
|
1292
1292
|
q
|
|
1293
1293
|
);
|
|
1294
1294
|
}
|
|
1295
1295
|
N = N || "text";
|
|
1296
|
-
let
|
|
1297
|
-
return !T &&
|
|
1296
|
+
let ee = await p[S.findKey(p, N) || "text"](D, g);
|
|
1297
|
+
return !T && M && M(), await new Promise((q, ae) => {
|
|
1298
1298
|
Ga(q, ae, {
|
|
1299
|
-
data:
|
|
1299
|
+
data: ee,
|
|
1300
1300
|
headers: Ie.from(D.headers),
|
|
1301
1301
|
status: D.status,
|
|
1302
1302
|
statusText: D.statusText,
|
|
@@ -1305,7 +1305,7 @@ const Xa = (e) => {
|
|
|
1305
1305
|
});
|
|
1306
1306
|
});
|
|
1307
1307
|
} catch (O) {
|
|
1308
|
-
throw
|
|
1308
|
+
throw M && M(), O && O.name === "TypeError" && /Load failed|fetch/i.test(O.message) ? Object.assign(
|
|
1309
1309
|
new ne("Network Error", ne.ERR_NETWORK, g, B),
|
|
1310
1310
|
{
|
|
1311
1311
|
cause: O.cause || O
|
|
@@ -1756,8 +1756,8 @@ const {
|
|
|
1756
1756
|
spread: Iy,
|
|
1757
1757
|
toFormData: _y,
|
|
1758
1758
|
AxiosHeaders: Oy,
|
|
1759
|
-
HttpStatusCode:
|
|
1760
|
-
formToJSON:
|
|
1759
|
+
HttpStatusCode: ky,
|
|
1760
|
+
formToJSON: My,
|
|
1761
1761
|
getAdapter: Dy,
|
|
1762
1762
|
mergeConfig: Ly
|
|
1763
1763
|
} = me, jr = {};
|
|
@@ -1945,49 +1945,49 @@ function sp(e = {}) {
|
|
|
1945
1945
|
return g.current = _, (async () => {
|
|
1946
1946
|
var L, P, $, K, B;
|
|
1947
1947
|
const N = (() => {
|
|
1948
|
-
var
|
|
1948
|
+
var M;
|
|
1949
1949
|
try {
|
|
1950
|
-
return typeof window < "u" && ((
|
|
1950
|
+
return typeof window < "u" && ((M = window.localStorage) == null ? void 0 : M.getItem("chat-debug")) === "1";
|
|
1951
1951
|
} catch {
|
|
1952
1952
|
return !1;
|
|
1953
1953
|
}
|
|
1954
|
-
})(),
|
|
1954
|
+
})(), k = (M) => {
|
|
1955
1955
|
var H;
|
|
1956
1956
|
try {
|
|
1957
|
-
const O = JSON.parse(JSON.stringify(
|
|
1957
|
+
const O = JSON.parse(JSON.stringify(M));
|
|
1958
1958
|
return (H = O == null ? void 0 : O.payload) != null && H.files_info && Array.isArray(O.payload.files_info) && (O.payload.files_info = O.payload.files_info.map((G) => ({
|
|
1959
1959
|
...G,
|
|
1960
1960
|
data: G != null && G.data ? `<base64 ${String(G.data).length} chars>` : G == null ? void 0 : G.data
|
|
1961
1961
|
}))), O;
|
|
1962
1962
|
} catch {
|
|
1963
|
-
return
|
|
1963
|
+
return M;
|
|
1964
1964
|
}
|
|
1965
1965
|
};
|
|
1966
1966
|
try {
|
|
1967
|
-
let
|
|
1967
|
+
let M = {};
|
|
1968
1968
|
try {
|
|
1969
1969
|
if (r)
|
|
1970
|
-
|
|
1970
|
+
M = { Authorization: `Bearer ${r}` };
|
|
1971
1971
|
else if (typeof window < "u") {
|
|
1972
|
-
const
|
|
1972
|
+
const ee = window.__AUTH_TOKEN__, q = ((L = window.localStorage) == null ? void 0 : L.getItem("authToken")) || null;
|
|
1973
1973
|
let ae = null;
|
|
1974
1974
|
try {
|
|
1975
1975
|
const j = (P = window.localStorage) == null ? void 0 : P.getItem("chat-settings");
|
|
1976
1976
|
j && (ae = (($ = JSON.parse(j)) == null ? void 0 : $.apiKey) || null);
|
|
1977
1977
|
} catch {
|
|
1978
1978
|
}
|
|
1979
|
-
const F =
|
|
1980
|
-
F && (
|
|
1979
|
+
const F = ee || q || ae || null;
|
|
1980
|
+
F && (M = { Authorization: `Bearer ${F}` });
|
|
1981
1981
|
}
|
|
1982
1982
|
} catch {
|
|
1983
1983
|
}
|
|
1984
|
-
N && console.debug("[use-chat] POST", t + n,
|
|
1984
|
+
N && console.debug("[use-chat] POST", t + n, k(y));
|
|
1985
1985
|
const H = await fetch(t + n, {
|
|
1986
1986
|
method: "POST",
|
|
1987
1987
|
headers: {
|
|
1988
1988
|
"Content-Type": "application/json",
|
|
1989
1989
|
Accept: "text/event-stream",
|
|
1990
|
-
...
|
|
1990
|
+
...M,
|
|
1991
1991
|
...s.current
|
|
1992
1992
|
},
|
|
1993
1993
|
body: JSON.stringify(y),
|
|
@@ -1998,7 +1998,7 @@ function sp(e = {}) {
|
|
|
1998
1998
|
throw N && console.debug("[use-chat] non-OK response", H.status, T == null ? void 0 : T.slice(0, 500)), new Error(`stream ${H.status}${T ? ": " + T : ""}`);
|
|
1999
1999
|
}
|
|
2000
2000
|
try {
|
|
2001
|
-
const T = H.headers.get("X-Thread-Id") || H.headers.get("x-thread-id"),
|
|
2001
|
+
const T = H.headers.get("X-Thread-Id") || H.headers.get("x-thread-id"), ee = H.headers.get("X-Thread-Created") || H.headers.get("x-thread-created"), q = T ?? null, ae = String(ee ?? "").toLowerCase() === "true";
|
|
2002
2002
|
try {
|
|
2003
2003
|
(K = R == null ? void 0 : R.onOpen) == null || K.call(R, { threadId: q, created: ae });
|
|
2004
2004
|
} catch (F) {
|
|
@@ -2010,8 +2010,8 @@ function sp(e = {}) {
|
|
|
2010
2010
|
const O = H.body.getReader(), G = new TextDecoder();
|
|
2011
2011
|
let D = "";
|
|
2012
2012
|
for (; ; ) {
|
|
2013
|
-
const { value: T, done:
|
|
2014
|
-
if (
|
|
2013
|
+
const { value: T, done: ee } = await O.read();
|
|
2014
|
+
if (ee) break;
|
|
2015
2015
|
D += G.decode(T, { stream: !0 });
|
|
2016
2016
|
let q;
|
|
2017
2017
|
for (; (q = D.indexOf(`
|
|
@@ -2037,9 +2037,9 @@ function sp(e = {}) {
|
|
|
2037
2037
|
} else ce.type === "checkpoint" ? v(ce.checkpointId) : ce.type === "error" && f(ce.message);
|
|
2038
2038
|
}
|
|
2039
2039
|
}
|
|
2040
|
-
} catch (
|
|
2041
|
-
if ((
|
|
2042
|
-
const H = (
|
|
2040
|
+
} catch (M) {
|
|
2041
|
+
if ((M == null ? void 0 : M.name) === "AbortError") return;
|
|
2042
|
+
const H = (M == null ? void 0 : M.message) || String(M);
|
|
2043
2043
|
N && console.debug("[use-chat] error:", H), f(H), (B = R == null ? void 0 : R.onError) == null || B.call(R, H);
|
|
2044
2044
|
} finally {
|
|
2045
2045
|
i(!1), g.current = null;
|
|
@@ -2278,13 +2278,13 @@ function Bn({ children: e, apiConfig: t, onError: n, onThreadChange: r, initialT
|
|
|
2278
2278
|
}, [l, v]);
|
|
2279
2279
|
const b = be((X) => {
|
|
2280
2280
|
l.setAuthToken(X);
|
|
2281
|
-
}, [l]), { state: w, seed: x, prepend: y, pushUser: C, onEvent: R, reset: _ } = up(), N = s && s > 0 ? s : 6, [
|
|
2281
|
+
}, [l]), { state: w, seed: x, prepend: y, pushUser: C, onEvent: R, reset: _ } = up(), N = s && s > 0 ? s : 6, [k, L] = re(!1), [P, $] = re(!1), [K, B] = re(null), [M, H] = re(void 0), O = be(
|
|
2282
2282
|
(X, Y) => {
|
|
2283
2283
|
const he = Array.isArray(X == null ? void 0 : X.messages) ? X.messages : [];
|
|
2284
2284
|
Y === "replace" ? x(he) : Y === "prepend" && he.length && y(he), B((X == null ? void 0 : X.nextCursor) ?? null), L(!!(X != null && X.hasMore)), H((Fe) => (X == null ? void 0 : X.checkpointId) ?? Fe ?? void 0);
|
|
2285
2285
|
},
|
|
2286
2286
|
[x, y]
|
|
2287
|
-
), [G, D] = re([]), [T,
|
|
2287
|
+
), [G, D] = re([]), [T, ee] = re(null), q = be(async () => {
|
|
2288
2288
|
const X = await l.listThreads();
|
|
2289
2289
|
D(X);
|
|
2290
2290
|
}, [l]);
|
|
@@ -2311,7 +2311,7 @@ function Bn({ children: e, apiConfig: t, onError: n, onThreadChange: r, initialT
|
|
|
2311
2311
|
checkpointNs: he,
|
|
2312
2312
|
limit: N
|
|
2313
2313
|
});
|
|
2314
|
-
|
|
2314
|
+
ee(X), O(Fe, "replace");
|
|
2315
2315
|
} finally {
|
|
2316
2316
|
F.current = null;
|
|
2317
2317
|
}
|
|
@@ -2356,7 +2356,7 @@ function Bn({ children: e, apiConfig: t, onError: n, onThreadChange: r, initialT
|
|
|
2356
2356
|
const Y = await l.createThread(X);
|
|
2357
2357
|
return await q(), await j(Y.threadId), Y.threadId;
|
|
2358
2358
|
}, [l, q, j]), V = be(async (X) => {
|
|
2359
|
-
await l.deleteThread(X), await q(), T === X && (
|
|
2359
|
+
await l.deleteThread(X), await q(), T === X && (ee(null), _([]), L(!1), B(null), H(void 0));
|
|
2360
2360
|
}, [l, q, T, _]), Z = be(async (X, Y) => {
|
|
2361
2361
|
await l.updateThread(X, Y), await q();
|
|
2362
2362
|
}, [l, q]), J = be(async (X, Y) => {
|
|
@@ -2374,8 +2374,8 @@ function Bn({ children: e, apiConfig: t, onError: n, onThreadChange: r, initialT
|
|
|
2374
2374
|
try {
|
|
2375
2375
|
const tt = $e.result;
|
|
2376
2376
|
let Nn = "";
|
|
2377
|
-
const I = new Uint8Array(tt),
|
|
2378
|
-
for (let le = 0; le <
|
|
2377
|
+
const I = new Uint8Array(tt), Q = I.byteLength;
|
|
2378
|
+
for (let le = 0; le < Q; le++) Nn += String.fromCharCode(I[le]);
|
|
2379
2379
|
ye(btoa(Nn));
|
|
2380
2380
|
} catch (tt) {
|
|
2381
2381
|
Ne(tt);
|
|
@@ -2451,22 +2451,22 @@ function Bn({ children: e, apiConfig: t, onError: n, onThreadChange: r, initialT
|
|
|
2451
2451
|
{
|
|
2452
2452
|
onError: (se) => console.warn("stream error", se),
|
|
2453
2453
|
onOpen: ({ threadId: se, created: ye }) => {
|
|
2454
|
-
!T && se && (
|
|
2454
|
+
!T && se && (ee(se), ye && q().catch(() => {
|
|
2455
2455
|
}));
|
|
2456
2456
|
}
|
|
2457
2457
|
}
|
|
2458
2458
|
);
|
|
2459
|
-
}, [T, C, p, R, w.lastCheckpointId, l, t == null ? void 0 : t.uploadPath, q,
|
|
2459
|
+
}, [T, C, p, R, w.lastCheckpointId, l, t == null ? void 0 : t.uploadPath, q, ee]), pe = be(
|
|
2460
2460
|
async (X) => {
|
|
2461
2461
|
if (!T) throw new Error("No active thread");
|
|
2462
|
-
if (P || !
|
|
2462
|
+
if (P || !k) return;
|
|
2463
2463
|
const Y = K;
|
|
2464
2464
|
if (Y) {
|
|
2465
2465
|
$(!0);
|
|
2466
2466
|
try {
|
|
2467
2467
|
const he = await l.getMessages({
|
|
2468
2468
|
threadId: T,
|
|
2469
|
-
checkpointId:
|
|
2469
|
+
checkpointId: M,
|
|
2470
2470
|
limit: (X == null ? void 0 : X.limit) ?? N,
|
|
2471
2471
|
beforeId: Y
|
|
2472
2472
|
});
|
|
@@ -2476,7 +2476,7 @@ function Bn({ children: e, apiConfig: t, onError: n, onThreadChange: r, initialT
|
|
|
2476
2476
|
}
|
|
2477
2477
|
}
|
|
2478
2478
|
},
|
|
2479
|
-
[l, T,
|
|
2479
|
+
[l, T, M, K, k, P, O]
|
|
2480
2480
|
), Se = {
|
|
2481
2481
|
baseUrl: l.baseUrl,
|
|
2482
2482
|
token: g,
|
|
@@ -2484,13 +2484,13 @@ function Bn({ children: e, apiConfig: t, onError: n, onThreadChange: r, initialT
|
|
|
2484
2484
|
api: l,
|
|
2485
2485
|
threads: G,
|
|
2486
2486
|
currentThreadId: T,
|
|
2487
|
-
setCurrentThreadId:
|
|
2487
|
+
setCurrentThreadId: ee,
|
|
2488
2488
|
messages: w.messages,
|
|
2489
2489
|
isStreaming: f,
|
|
2490
2490
|
error: d,
|
|
2491
2491
|
lastCheckpointId: w.lastCheckpointId,
|
|
2492
2492
|
streamingAssistantId: w.assemblingId,
|
|
2493
|
-
hasMoreHistory:
|
|
2493
|
+
hasMoreHistory: k,
|
|
2494
2494
|
isLoadingHistory: P,
|
|
2495
2495
|
loadOlderMessages: pe,
|
|
2496
2496
|
historyPageSize: N,
|
|
@@ -2994,7 +2994,7 @@ function In({ content: e, className: t = "" }) {
|
|
|
2994
2994
|
return /* @__PURE__ */ c("div", { className: r, style: { wordBreak: "break-word", overflowWrap: "anywhere" }, children: /* @__PURE__ */ c(Cd, { remarkPlugins: [Ed], components: n, children: e }) });
|
|
2995
2995
|
}
|
|
2996
2996
|
const Un = "prose prose-sm max-w-none break-words dark:prose-invert prose-headings:break-words prose-p:break-words prose-li:break-words prose-td:break-words prose-th:break-words prose-a:break-all prose-code:break-words prose-blockquote:break-words";
|
|
2997
|
-
function
|
|
2997
|
+
function kp({ className: e }) {
|
|
2998
2998
|
const [t, n] = re(0);
|
|
2999
2999
|
return ge(() => {
|
|
3000
3000
|
const r = setInterval(() => n((o) => (o + 1) % 4), 500);
|
|
@@ -3011,7 +3011,7 @@ function Mp({ className: e }) {
|
|
|
3011
3011
|
}
|
|
3012
3012
|
);
|
|
3013
3013
|
}
|
|
3014
|
-
function
|
|
3014
|
+
function Mp({
|
|
3015
3015
|
message: e,
|
|
3016
3016
|
messageIndex: t,
|
|
3017
3017
|
isStreamingMessage: n = !1,
|
|
@@ -3031,7 +3031,7 @@ function kp({
|
|
|
3031
3031
|
onCancelEdit: b,
|
|
3032
3032
|
onCopy: w
|
|
3033
3033
|
}) {
|
|
3034
|
-
const [x, y] = re(!1), [C, R] = re(!1), [_, N] = re(!1), [
|
|
3034
|
+
const [x, y] = re(!1), [C, R] = re(!1), [_, N] = re(!1), [k, L] = re(!1), P = l === "phone" || l === "half-screen", $ = e.role, K = $ === "tool", B = qe.useMemo(() => {
|
|
3035
3035
|
switch ($) {
|
|
3036
3036
|
case "user":
|
|
3037
3037
|
return "text-[hsl(var(--chat-bubble-user-text))]";
|
|
@@ -3044,16 +3044,16 @@ function kp({
|
|
|
3044
3044
|
default:
|
|
3045
3045
|
return "text-foreground";
|
|
3046
3046
|
}
|
|
3047
|
-
}, [$]),
|
|
3047
|
+
}, [$]), M = gt(() => Dp(e.content), [e.content]), H = gt(() => Hp(e.content), [e.content]), O = gt(() => e.content.filter((W) => W.type === "image_url"), [e.content]), G = gt(() => e.content.filter((W) => W.type === "file"), [e.content]), D = Wp(M, n ? r : 0), T = async () => {
|
|
3048
3048
|
try {
|
|
3049
|
-
const W = K ? Tt(e.content) :
|
|
3049
|
+
const W = K ? Tt(e.content) : M;
|
|
3050
3050
|
await navigator.clipboard.writeText(W), y(!0), setTimeout(() => y(!1), 2e3), w == null || w(W);
|
|
3051
3051
|
} catch (W) {
|
|
3052
3052
|
console.error("Failed to copy:", W);
|
|
3053
3053
|
}
|
|
3054
|
-
},
|
|
3054
|
+
}, ee = () => {
|
|
3055
3055
|
if (!g) return;
|
|
3056
|
-
const W = K ? Tt(e.content) :
|
|
3056
|
+
const W = K ? Tt(e.content) : M;
|
|
3057
3057
|
g(e.id, W);
|
|
3058
3058
|
}, q = () => h == null ? void 0 : h(t), ae = () => {
|
|
3059
3059
|
const oe = A(P ? "h-3 w-3" : "h-4 w-4", "opacity-60 flex-shrink-0", B);
|
|
@@ -3115,7 +3115,7 @@ function kp({
|
|
|
3115
3115
|
}
|
|
3116
3116
|
}, fe = () => {
|
|
3117
3117
|
if (e.model === "reflection") {
|
|
3118
|
-
const V =
|
|
3118
|
+
const V = M.trim(), Z = Xr(V);
|
|
3119
3119
|
if (Z && typeof Z == "object")
|
|
3120
3120
|
return /* @__PURE__ */ c(Vp, { data: Z });
|
|
3121
3121
|
}
|
|
@@ -3159,15 +3159,15 @@ function kp({
|
|
|
3159
3159
|
const V = Xr(D);
|
|
3160
3160
|
return V !== null ? /* @__PURE__ */ c(Ys, { data: V }) : /* @__PURE__ */ c(In, { content: $p(Fp(D)) });
|
|
3161
3161
|
})(),
|
|
3162
|
-
/* @__PURE__ */ c(
|
|
3162
|
+
/* @__PURE__ */ c(kp, { className: A(B, P ? "text-xs" : "text-sm") })
|
|
3163
3163
|
] }) : (() => {
|
|
3164
|
-
const V = Xr(
|
|
3164
|
+
const V = Xr(M.trim());
|
|
3165
3165
|
if (V !== null) return /* @__PURE__ */ c(Ys, { data: V });
|
|
3166
3166
|
if ($ === "user" && p) {
|
|
3167
|
-
const Z =
|
|
3167
|
+
const Z = M.trim();
|
|
3168
3168
|
if (Z.length > m)
|
|
3169
|
-
return /* @__PURE__ */ E(qs, { open:
|
|
3170
|
-
/* @__PURE__ */ c("div", { className: A("text-sm text-[hsl(var(--chat-bubble-user-text))]", P && "text-xs"), children:
|
|
3169
|
+
return /* @__PURE__ */ E(qs, { open: k, onOpenChange: L, children: [
|
|
3170
|
+
/* @__PURE__ */ c("div", { className: A("text-sm text-[hsl(var(--chat-bubble-user-text))]", P && "text-xs"), children: k ? /* @__PURE__ */ c(In, { content: Z }) : /* @__PURE__ */ E("pre", { className: A("font-sans whitespace-pre-wrap break-words bg-transparent p-0 m-0 text-[hsl(var(--chat-bubble-user-text))]", P && "text-xs"), children: [
|
|
3171
3171
|
Z.substring(0, m),
|
|
3172
3172
|
"..."
|
|
3173
3173
|
] }) }),
|
|
@@ -3177,7 +3177,7 @@ function kp({
|
|
|
3177
3177
|
variant: "ghost",
|
|
3178
3178
|
size: "sm",
|
|
3179
3179
|
className: "h-6 text-xs !text-[hsl(var(--chat-bubble-user-text))]",
|
|
3180
|
-
children:
|
|
3180
|
+
children: k ? /* @__PURE__ */ E(Ae, { children: [
|
|
3181
3181
|
/* @__PURE__ */ c(Jt, { className: "h-3 w-3 mr-1" }),
|
|
3182
3182
|
" Show less"
|
|
3183
3183
|
] }) : /* @__PURE__ */ E(Ae, { children: [
|
|
@@ -3190,7 +3190,7 @@ function kp({
|
|
|
3190
3190
|
) })
|
|
3191
3191
|
] });
|
|
3192
3192
|
}
|
|
3193
|
-
return /* @__PURE__ */ c(In, { content:
|
|
3193
|
+
return /* @__PURE__ */ c(In, { content: M.trim() });
|
|
3194
3194
|
})(),
|
|
3195
3195
|
W && /* @__PURE__ */ c("div", { className: "mt-2 grid grid-cols-2 gap-2", children: O.map((V, Z) => /* @__PURE__ */ E("div", { className: "relative border rounded overflow-hidden", children: [
|
|
3196
3196
|
/* @__PURE__ */ c("img", { src: V.url, alt: V.alt ?? "image", className: "w-full h-auto" }),
|
|
@@ -3299,7 +3299,7 @@ function kp({
|
|
|
3299
3299
|
{
|
|
3300
3300
|
variant: "ghost",
|
|
3301
3301
|
size: "sm",
|
|
3302
|
-
onClick:
|
|
3302
|
+
onClick: ee,
|
|
3303
3303
|
className: A("h-6 w-6 p-0 hover:bg-foreground/10", B, P && "h-5 w-5"),
|
|
3304
3304
|
children: /* @__PURE__ */ c(Es, { className: A(B, P ? "h-3 w-3" : "h-4 w-4") })
|
|
3305
3305
|
}
|
|
@@ -3356,7 +3356,7 @@ function kp({
|
|
|
3356
3356
|
{
|
|
3357
3357
|
variant: "ghost",
|
|
3358
3358
|
size: "sm",
|
|
3359
|
-
onClick:
|
|
3359
|
+
onClick: ee,
|
|
3360
3360
|
className: A("h-6 w-6 p-0 hover:bg-background/50 text-current", P && "h-5 w-5"),
|
|
3361
3361
|
children: /* @__PURE__ */ c(Es, { className: A("text-current", P ? "h-3 w-3" : "h-4 w-4") })
|
|
3362
3362
|
}
|
|
@@ -3691,11 +3691,11 @@ var Jp = "DismissableLayer", bo = "dismissableLayer.update", Zp = "dismissableLa
|
|
|
3691
3691
|
onDismiss: i,
|
|
3692
3692
|
...l
|
|
3693
3693
|
} = e, f = u.useContext(di), [d, p] = u.useState(null), m = (d == null ? void 0 : d.ownerDocument) ?? (globalThis == null ? void 0 : globalThis.document), [, v] = u.useState({}), g = ie(t, (N) => p(N)), h = Array.from(f.layers), [b] = [...f.layersWithOutsidePointerEventsDisabled].slice(-1), w = h.indexOf(b), x = d ? h.indexOf(d) : -1, y = f.layersWithOutsidePointerEventsDisabled.size > 0, C = x >= w, R = nh((N) => {
|
|
3694
|
-
const
|
|
3694
|
+
const k = N.target, L = [...f.branches].some((P) => P.contains(k));
|
|
3695
3695
|
!C || L || (o == null || o(N), a == null || a(N), N.defaultPrevented || i == null || i());
|
|
3696
3696
|
}, m), _ = rh((N) => {
|
|
3697
|
-
const
|
|
3698
|
-
[...f.branches].some((P) => P.contains(
|
|
3697
|
+
const k = N.target;
|
|
3698
|
+
[...f.branches].some((P) => P.contains(k)) || (s == null || s(N), a == null || a(N), N.defaultPrevented || i == null || i());
|
|
3699
3699
|
}, m);
|
|
3700
3700
|
return Yp((N) => {
|
|
3701
3701
|
x === f.layers.size - 1 && (r == null || r(N), !N.defaultPrevented && i && (N.preventDefault(), i()));
|
|
@@ -4218,12 +4218,12 @@ const Ch = (e) => ({
|
|
|
4218
4218
|
}, v = qo(o), g = Go(v), h = await a.getDimensions(f), b = v === "y", w = b ? "top" : "left", x = b ? "bottom" : "right", y = b ? "clientHeight" : "clientWidth", C = s.reference[g] + s.reference[v] - m[v] - s.floating[g], R = m[v] - s.reference[v], _ = await (a.getOffsetParent == null ? void 0 : a.getOffsetParent(f));
|
|
4219
4219
|
let N = _ ? _[y] : 0;
|
|
4220
4220
|
(!N || !await (a.isElement == null ? void 0 : a.isElement(_))) && (N = i.floating[y] || s.floating[g]);
|
|
4221
|
-
const
|
|
4221
|
+
const k = C / 2 - R / 2, L = N / 2 - h[g] / 2 - 1, P = ut(p[w], L), $ = ut(p[x], L), K = P, B = N - h[g] - $, M = N / 2 - h[g] / 2 + k, H = vo(K, M, B), O = !l.arrow && Wt(o) != null && M !== H && s.reference[g] / 2 - (M < K ? P : $) - h[g] / 2 < 0, G = O ? M < K ? M - K : M - B : 0;
|
|
4222
4222
|
return {
|
|
4223
4223
|
[v]: m[v] + G,
|
|
4224
4224
|
data: {
|
|
4225
4225
|
[v]: H,
|
|
4226
|
-
centerOffset:
|
|
4226
|
+
centerOffset: M - H - G,
|
|
4227
4227
|
...O && {
|
|
4228
4228
|
alignmentOffset: G
|
|
4229
4229
|
}
|
|
@@ -4257,24 +4257,24 @@ const Ch = (e) => ({
|
|
|
4257
4257
|
return {};
|
|
4258
4258
|
const w = ot(o), x = Ye(i), y = ot(i) === i, C = await (l.isRTL == null ? void 0 : l.isRTL(f.floating)), R = m || (y || !h ? [er(i)] : gh(i)), _ = g !== "none";
|
|
4259
4259
|
!m && _ && R.push(...yh(i, h, g, C));
|
|
4260
|
-
const N = [i, ...R],
|
|
4260
|
+
const N = [i, ...R], k = await on(t, b), L = [];
|
|
4261
4261
|
let P = ((r = s.flip) == null ? void 0 : r.overflows) || [];
|
|
4262
|
-
if (d && L.push(
|
|
4263
|
-
const
|
|
4264
|
-
L.push(M[
|
|
4262
|
+
if (d && L.push(k[w]), p) {
|
|
4263
|
+
const M = mh(o, a, C);
|
|
4264
|
+
L.push(k[M[0]], k[M[1]]);
|
|
4265
4265
|
}
|
|
4266
4266
|
if (P = [...P, {
|
|
4267
4267
|
placement: o,
|
|
4268
4268
|
overflows: L
|
|
4269
|
-
}], !L.every((
|
|
4269
|
+
}], !L.every((M) => M <= 0)) {
|
|
4270
4270
|
var $, K;
|
|
4271
|
-
const
|
|
4271
|
+
const M = ((($ = s.flip) == null ? void 0 : $.index) || 0) + 1, H = N[M];
|
|
4272
4272
|
if (H && (!(p === "alignment" ? x !== Ye(H) : !1) || // We leave the current main axis only if every placement on that axis
|
|
4273
4273
|
// overflows the main axis.
|
|
4274
4274
|
P.every((D) => Ye(D.placement) === x ? D.overflows[0] > 0 : !0)))
|
|
4275
4275
|
return {
|
|
4276
4276
|
data: {
|
|
4277
|
-
index:
|
|
4277
|
+
index: M,
|
|
4278
4278
|
overflows: P
|
|
4279
4279
|
},
|
|
4280
4280
|
reset: {
|
|
@@ -4294,7 +4294,7 @@ const Ch = (e) => ({
|
|
|
4294
4294
|
T === "y";
|
|
4295
4295
|
}
|
|
4296
4296
|
return !0;
|
|
4297
|
-
}).map((D) => [D.placement, D.overflows.filter((T) => T > 0).reduce((T,
|
|
4297
|
+
}).map((D) => [D.placement, D.overflows.filter((T) => T > 0).reduce((T, ee) => T + ee, 0)]).sort((D, T) => D[1] - T[1])[0]) == null ? void 0 : B[0];
|
|
4298
4298
|
G && (O = G);
|
|
4299
4299
|
break;
|
|
4300
4300
|
}
|
|
@@ -4535,14 +4535,14 @@ const Th = function(e) {
|
|
|
4535
4535
|
let b, w;
|
|
4536
4536
|
p === "top" || p === "bottom" ? (b = p, w = m === (await (a.isRTL == null ? void 0 : a.isRTL(i.floating)) ? "start" : "end") ? "left" : "right") : (w = p, b = m === "end" ? "top" : "bottom");
|
|
4537
4537
|
const x = h - d.top - d.bottom, y = g - d.left - d.right, C = ut(h - d[b], x), R = ut(g - d[w], y), _ = !t.middlewareData.shift;
|
|
4538
|
-
let N = C,
|
|
4539
|
-
if ((n = t.middlewareData.shift) != null && n.enabled.x && (
|
|
4538
|
+
let N = C, k = R;
|
|
4539
|
+
if ((n = t.middlewareData.shift) != null && n.enabled.x && (k = y), (r = t.middlewareData.shift) != null && r.enabled.y && (N = x), _ && !m) {
|
|
4540
4540
|
const P = Oe(d.left, 0), $ = Oe(d.right, 0), K = Oe(d.top, 0), B = Oe(d.bottom, 0);
|
|
4541
|
-
v ?
|
|
4541
|
+
v ? k = g - 2 * (P !== 0 || $ !== 0 ? P + $ : Oe(d.left, d.right)) : N = h - 2 * (K !== 0 || B !== 0 ? K + B : Oe(d.top, d.bottom));
|
|
4542
4542
|
}
|
|
4543
4543
|
await l({
|
|
4544
4544
|
...t,
|
|
4545
|
-
availableWidth:
|
|
4545
|
+
availableWidth: k,
|
|
4546
4546
|
availableHeight: N
|
|
4547
4547
|
});
|
|
4548
4548
|
const L = await a.getDimensions(i.floating);
|
|
@@ -4560,7 +4560,7 @@ function vr() {
|
|
|
4560
4560
|
function Vt(e) {
|
|
4561
4561
|
return gi(e) ? (e.nodeName || "").toLowerCase() : "#document";
|
|
4562
4562
|
}
|
|
4563
|
-
function
|
|
4563
|
+
function ke(e) {
|
|
4564
4564
|
var t;
|
|
4565
4565
|
return (e == null || (t = e.ownerDocument) == null ? void 0 : t.defaultView) || window;
|
|
4566
4566
|
}
|
|
@@ -4569,16 +4569,16 @@ function Qe(e) {
|
|
|
4569
4569
|
return (t = (gi(e) ? e.ownerDocument : e.document) || window.document) == null ? void 0 : t.documentElement;
|
|
4570
4570
|
}
|
|
4571
4571
|
function gi(e) {
|
|
4572
|
-
return vr() ? e instanceof Node || e instanceof
|
|
4572
|
+
return vr() ? e instanceof Node || e instanceof ke(e).Node : !1;
|
|
4573
4573
|
}
|
|
4574
4574
|
function ze(e) {
|
|
4575
|
-
return vr() ? e instanceof Element || e instanceof
|
|
4575
|
+
return vr() ? e instanceof Element || e instanceof ke(e).Element : !1;
|
|
4576
4576
|
}
|
|
4577
4577
|
function Ze(e) {
|
|
4578
|
-
return vr() ? e instanceof HTMLElement || e instanceof
|
|
4578
|
+
return vr() ? e instanceof HTMLElement || e instanceof ke(e).HTMLElement : !1;
|
|
4579
4579
|
}
|
|
4580
4580
|
function la(e) {
|
|
4581
|
-
return !vr() || typeof ShadowRoot > "u" ? !1 : e instanceof ShadowRoot || e instanceof
|
|
4581
|
+
return !vr() || typeof ShadowRoot > "u" ? !1 : e instanceof ShadowRoot || e instanceof ke(e).ShadowRoot;
|
|
4582
4582
|
}
|
|
4583
4583
|
const _h = /* @__PURE__ */ new Set(["inline", "contents"]);
|
|
4584
4584
|
function bn(e) {
|
|
@@ -4591,12 +4591,12 @@ function bn(e) {
|
|
|
4591
4591
|
return /auto|scroll|overlay|hidden|clip/.test(t + r + n) && !_h.has(o);
|
|
4592
4592
|
}
|
|
4593
4593
|
const Oh = /* @__PURE__ */ new Set(["table", "td", "th"]);
|
|
4594
|
-
function
|
|
4594
|
+
function kh(e) {
|
|
4595
4595
|
return Oh.has(Vt(e));
|
|
4596
4596
|
}
|
|
4597
|
-
const
|
|
4597
|
+
const Mh = [":popover-open", ":modal"];
|
|
4598
4598
|
function wr(e) {
|
|
4599
|
-
return
|
|
4599
|
+
return Mh.some((t) => {
|
|
4600
4600
|
try {
|
|
4601
4601
|
return e.matches(t);
|
|
4602
4602
|
} catch {
|
|
@@ -4628,7 +4628,7 @@ function Ft(e) {
|
|
|
4628
4628
|
return Bh.has(Vt(e));
|
|
4629
4629
|
}
|
|
4630
4630
|
function We(e) {
|
|
4631
|
-
return
|
|
4631
|
+
return ke(e).getComputedStyle(e);
|
|
4632
4632
|
}
|
|
4633
4633
|
function yr(e) {
|
|
4634
4634
|
return ze(e) ? {
|
|
@@ -4658,7 +4658,7 @@ function bi(e) {
|
|
|
4658
4658
|
function sn(e, t, n) {
|
|
4659
4659
|
var r;
|
|
4660
4660
|
t === void 0 && (t = []), n === void 0 && (n = !0);
|
|
4661
|
-
const o = bi(e), s = o === ((r = e.ownerDocument) == null ? void 0 : r.body), a =
|
|
4661
|
+
const o = bi(e), s = o === ((r = e.ownerDocument) == null ? void 0 : r.body), a = ke(o);
|
|
4662
4662
|
if (s) {
|
|
4663
4663
|
const i = yo(a);
|
|
4664
4664
|
return t.concat(a, a.visualViewport || [], bn(o) ? o : [], i && n ? sn(i) : []);
|
|
@@ -4681,7 +4681,7 @@ function vi(e) {
|
|
|
4681
4681
|
function Jo(e) {
|
|
4682
4682
|
return ze(e) ? e : e.contextElement;
|
|
4683
4683
|
}
|
|
4684
|
-
function
|
|
4684
|
+
function kt(e) {
|
|
4685
4685
|
const t = Jo(e);
|
|
4686
4686
|
if (!Ze(t))
|
|
4687
4687
|
return Je(1);
|
|
@@ -4698,28 +4698,28 @@ function Mt(e) {
|
|
|
4698
4698
|
}
|
|
4699
4699
|
const Uh = /* @__PURE__ */ Je(0);
|
|
4700
4700
|
function wi(e) {
|
|
4701
|
-
const t =
|
|
4701
|
+
const t = ke(e);
|
|
4702
4702
|
return !Yo() || !t.visualViewport ? Uh : {
|
|
4703
4703
|
x: t.visualViewport.offsetLeft,
|
|
4704
4704
|
y: t.visualViewport.offsetTop
|
|
4705
4705
|
};
|
|
4706
4706
|
}
|
|
4707
4707
|
function Hh(e, t, n) {
|
|
4708
|
-
return t === void 0 && (t = !1), !n || t && n !==
|
|
4708
|
+
return t === void 0 && (t = !1), !n || t && n !== ke(e) ? !1 : t;
|
|
4709
4709
|
}
|
|
4710
4710
|
function xt(e, t, n, r) {
|
|
4711
4711
|
t === void 0 && (t = !1), n === void 0 && (n = !1);
|
|
4712
4712
|
const o = e.getBoundingClientRect(), s = Jo(e);
|
|
4713
4713
|
let a = Je(1);
|
|
4714
|
-
t && (r ? ze(r) && (a =
|
|
4714
|
+
t && (r ? ze(r) && (a = kt(r)) : a = kt(e));
|
|
4715
4715
|
const i = Hh(s, n, r) ? wi(s) : Je(0);
|
|
4716
4716
|
let l = (o.left + i.x) / a.x, f = (o.top + i.y) / a.y, d = o.width / a.x, p = o.height / a.y;
|
|
4717
4717
|
if (s) {
|
|
4718
|
-
const m =
|
|
4718
|
+
const m = ke(s), v = r && ze(r) ? ke(r) : r;
|
|
4719
4719
|
let g = m, h = yo(g);
|
|
4720
4720
|
for (; h && r && v !== g; ) {
|
|
4721
|
-
const b =
|
|
4722
|
-
l *= b.x, f *= b.y, d *= b.x, p *= b.y, l += y, f += C, g =
|
|
4721
|
+
const b = kt(h), w = h.getBoundingClientRect(), x = We(h), y = w.left + (h.clientLeft + parseFloat(x.paddingLeft)) * b.x, C = w.top + (h.clientTop + parseFloat(x.paddingTop)) * b.y;
|
|
4722
|
+
l *= b.x, f *= b.y, d *= b.x, p *= b.y, l += y, f += C, g = ke(h), h = yo(g);
|
|
4723
4723
|
}
|
|
4724
4724
|
}
|
|
4725
4725
|
return tr({
|
|
@@ -4757,7 +4757,7 @@ function zh(e) {
|
|
|
4757
4757
|
const d = Je(0), p = Ze(r);
|
|
4758
4758
|
if ((p || !p && !s) && ((Vt(r) !== "body" || bn(a)) && (l = yr(r)), Ze(r))) {
|
|
4759
4759
|
const v = xt(r);
|
|
4760
|
-
f =
|
|
4760
|
+
f = kt(r), d.x = v.x + r.clientLeft, d.y = v.y + r.clientTop;
|
|
4761
4761
|
}
|
|
4762
4762
|
const m = a && !p && !s ? yi(a, l) : Je(0);
|
|
4763
4763
|
return {
|
|
@@ -4783,7 +4783,7 @@ function Vh(e) {
|
|
|
4783
4783
|
}
|
|
4784
4784
|
const ua = 25;
|
|
4785
4785
|
function jh(e, t) {
|
|
4786
|
-
const n =
|
|
4786
|
+
const n = ke(e), r = Qe(e), o = n.visualViewport;
|
|
4787
4787
|
let s = r.clientWidth, a = r.clientHeight, i = 0, l = 0;
|
|
4788
4788
|
if (o) {
|
|
4789
4789
|
s = o.width, a = o.height;
|
|
@@ -4804,7 +4804,7 @@ function jh(e, t) {
|
|
|
4804
4804
|
}
|
|
4805
4805
|
const Kh = /* @__PURE__ */ new Set(["absolute", "fixed"]);
|
|
4806
4806
|
function Gh(e, t) {
|
|
4807
|
-
const n = xt(e, !0, t === "fixed"), r = n.top + e.clientTop, o = n.left + e.clientLeft, s = Ze(e) ?
|
|
4807
|
+
const n = xt(e, !0, t === "fixed"), r = n.top + e.clientTop, o = n.left + e.clientLeft, s = Ze(e) ? kt(e) : Je(1), a = e.clientWidth * s.x, i = e.clientHeight * s.y, l = o * s.x, f = r * s.y;
|
|
4808
4808
|
return {
|
|
4809
4809
|
width: a,
|
|
4810
4810
|
height: i,
|
|
@@ -4912,7 +4912,7 @@ function fa(e, t) {
|
|
|
4912
4912
|
return Qe(e) === n && (n = n.ownerDocument.body), n;
|
|
4913
4913
|
}
|
|
4914
4914
|
function Si(e, t) {
|
|
4915
|
-
const n =
|
|
4915
|
+
const n = ke(e);
|
|
4916
4916
|
if (wr(e))
|
|
4917
4917
|
return n;
|
|
4918
4918
|
if (!Ze(e)) {
|
|
@@ -4925,7 +4925,7 @@ function Si(e, t) {
|
|
|
4925
4925
|
return n;
|
|
4926
4926
|
}
|
|
4927
4927
|
let r = fa(e, t);
|
|
4928
|
-
for (; r &&
|
|
4928
|
+
for (; r && kh(r) && Qr(r); )
|
|
4929
4929
|
r = fa(r, t);
|
|
4930
4930
|
return r && Ft(r) && Qr(r) && !Xo(r) ? n : r || $h(e) || n;
|
|
4931
4931
|
}
|
|
@@ -4952,7 +4952,7 @@ const em = {
|
|
|
4952
4952
|
getElementRects: Zh,
|
|
4953
4953
|
getClientRects: Wh,
|
|
4954
4954
|
getDimensions: Yh,
|
|
4955
|
-
getScale:
|
|
4955
|
+
getScale: kt,
|
|
4956
4956
|
isElement: ze,
|
|
4957
4957
|
isRTL: Qh
|
|
4958
4958
|
};
|
|
@@ -5126,7 +5126,7 @@ function fm(e) {
|
|
|
5126
5126
|
D !== _.current && (_.current = D, h(D));
|
|
5127
5127
|
}, []), y = u.useCallback((D) => {
|
|
5128
5128
|
D !== N.current && (N.current = D, w(D));
|
|
5129
|
-
}, []), C = s || g, R = a || b, _ = u.useRef(null), N = u.useRef(null),
|
|
5129
|
+
}, []), C = s || g, R = a || b, _ = u.useRef(null), N = u.useRef(null), k = u.useRef(d), L = l != null, P = eo(l), $ = eo(o), K = eo(f), B = u.useCallback(() => {
|
|
5130
5130
|
if (!_.current || !N.current)
|
|
5131
5131
|
return;
|
|
5132
5132
|
const D = {
|
|
@@ -5135,7 +5135,7 @@ function fm(e) {
|
|
|
5135
5135
|
middleware: m
|
|
5136
5136
|
};
|
|
5137
5137
|
$.current && (D.platform = $.current), lm(_.current, N.current, D).then((T) => {
|
|
5138
|
-
const
|
|
5138
|
+
const ee = {
|
|
5139
5139
|
...T,
|
|
5140
5140
|
// The floating element's position may be recomputed while it's closed
|
|
5141
5141
|
// but still mounted (such as when transitioning out). To ensure
|
|
@@ -5143,20 +5143,20 @@ function fm(e) {
|
|
|
5143
5143
|
// setting it to `true` when `open === false` (must be specified).
|
|
5144
5144
|
isPositioned: K.current !== !1
|
|
5145
5145
|
};
|
|
5146
|
-
|
|
5147
|
-
p(
|
|
5146
|
+
M.current && !nr(k.current, ee) && (k.current = ee, lr.flushSync(() => {
|
|
5147
|
+
p(ee);
|
|
5148
5148
|
}));
|
|
5149
5149
|
});
|
|
5150
5150
|
}, [m, t, n, $, K]);
|
|
5151
5151
|
Hn(() => {
|
|
5152
|
-
f === !1 &&
|
|
5152
|
+
f === !1 && k.current.isPositioned && (k.current.isPositioned = !1, p((D) => ({
|
|
5153
5153
|
...D,
|
|
5154
5154
|
isPositioned: !1
|
|
5155
5155
|
})));
|
|
5156
5156
|
}, [f]);
|
|
5157
|
-
const
|
|
5158
|
-
Hn(() => (
|
|
5159
|
-
|
|
5157
|
+
const M = u.useRef(!1);
|
|
5158
|
+
Hn(() => (M.current = !0, () => {
|
|
5159
|
+
M.current = !1;
|
|
5160
5160
|
}), []), Hn(() => {
|
|
5161
5161
|
if (C && (_.current = C), R && (N.current = R), C && R) {
|
|
5162
5162
|
if (P.current)
|
|
@@ -5180,17 +5180,17 @@ function fm(e) {
|
|
|
5180
5180
|
};
|
|
5181
5181
|
if (!O.floating)
|
|
5182
5182
|
return D;
|
|
5183
|
-
const T = ha(O.floating, d.x),
|
|
5183
|
+
const T = ha(O.floating, d.x), ee = ha(O.floating, d.y);
|
|
5184
5184
|
return i ? {
|
|
5185
5185
|
...D,
|
|
5186
|
-
transform: "translate(" + T + "px, " +
|
|
5186
|
+
transform: "translate(" + T + "px, " + ee + "px)",
|
|
5187
5187
|
...Ei(O.floating) >= 1.5 && {
|
|
5188
5188
|
willChange: "transform"
|
|
5189
5189
|
}
|
|
5190
5190
|
} : {
|
|
5191
5191
|
position: n,
|
|
5192
5192
|
left: T,
|
|
5193
|
-
top:
|
|
5193
|
+
top: ee
|
|
5194
5194
|
};
|
|
5195
5195
|
}, [n, i, O.floating, d.x, d.y]);
|
|
5196
5196
|
return u.useMemo(() => ({
|
|
@@ -5316,12 +5316,12 @@ var Qo = "PopperContent", [Em, Nm] = Ti(Qo), Oi = u.forwardRef(
|
|
|
5316
5316
|
updatePositionStrategy: v = "optimized",
|
|
5317
5317
|
onPlaced: g,
|
|
5318
5318
|
...h
|
|
5319
|
-
} = e, b = Ai(Qo, n), [w, x] = u.useState(null), y = ie(t, (pe) => x(pe)), [C, R] = u.useState(null), _ = Ri(C), N = (_ == null ? void 0 : _.width) ?? 0,
|
|
5319
|
+
} = e, b = Ai(Qo, n), [w, x] = u.useState(null), y = ie(t, (pe) => x(pe)), [C, R] = u.useState(null), _ = Ri(C), N = (_ == null ? void 0 : _.width) ?? 0, k = (_ == null ? void 0 : _.height) ?? 0, L = r + (s !== "center" ? "-" + s : ""), P = typeof d == "number" ? d : { top: 0, right: 0, bottom: 0, left: 0, ...d }, $ = Array.isArray(f) ? f : [f], K = $.length > 0, B = {
|
|
5320
5320
|
padding: P,
|
|
5321
5321
|
boundary: $.filter(Tm),
|
|
5322
5322
|
// with `strategy: 'fixed'`, this is the only way to get it to respect boundaries
|
|
5323
5323
|
altBoundary: K
|
|
5324
|
-
}, { refs:
|
|
5324
|
+
}, { refs: M, floatingStyles: H, placement: O, isPositioned: G, middlewareData: D } = fm({
|
|
5325
5325
|
// default to `fixed` strategy so users don't have to pick and we also avoid focus scroll issues
|
|
5326
5326
|
strategy: "fixed",
|
|
5327
5327
|
placement: L,
|
|
@@ -5332,7 +5332,7 @@ var Qo = "PopperContent", [Em, Nm] = Ti(Qo), Oi = u.forwardRef(
|
|
|
5332
5332
|
reference: b.anchor
|
|
5333
5333
|
},
|
|
5334
5334
|
middleware: [
|
|
5335
|
-
hm({ mainAxis: o +
|
|
5335
|
+
hm({ mainAxis: o + k, alignmentAxis: a }),
|
|
5336
5336
|
l && mm({
|
|
5337
5337
|
mainAxis: !0,
|
|
5338
5338
|
crossAxis: !1,
|
|
@@ -5348,10 +5348,10 @@ var Qo = "PopperContent", [Em, Nm] = Ti(Qo), Oi = u.forwardRef(
|
|
|
5348
5348
|
}
|
|
5349
5349
|
}),
|
|
5350
5350
|
C && ym({ element: C, padding: i }),
|
|
5351
|
-
Am({ arrowWidth: N, arrowHeight:
|
|
5351
|
+
Am({ arrowWidth: N, arrowHeight: k }),
|
|
5352
5352
|
m && wm({ strategy: "referenceHidden", ...B })
|
|
5353
5353
|
]
|
|
5354
|
-
}), [T,
|
|
5354
|
+
}), [T, ee] = Di(O), q = we(g);
|
|
5355
5355
|
ve(() => {
|
|
5356
5356
|
G && (q == null || q());
|
|
5357
5357
|
}, [G, q]);
|
|
@@ -5361,7 +5361,7 @@ var Qo = "PopperContent", [Em, Nm] = Ti(Qo), Oi = u.forwardRef(
|
|
|
5361
5361
|
}, [w]), /* @__PURE__ */ c(
|
|
5362
5362
|
"div",
|
|
5363
5363
|
{
|
|
5364
|
-
ref:
|
|
5364
|
+
ref: M.setFloating,
|
|
5365
5365
|
"data-radix-popper-content-wrapper": "",
|
|
5366
5366
|
style: {
|
|
5367
5367
|
...H,
|
|
@@ -5395,7 +5395,7 @@ var Qo = "PopperContent", [Em, Nm] = Ti(Qo), Oi = u.forwardRef(
|
|
|
5395
5395
|
te.div,
|
|
5396
5396
|
{
|
|
5397
5397
|
"data-side": T,
|
|
5398
|
-
"data-align":
|
|
5398
|
+
"data-align": ee,
|
|
5399
5399
|
...h,
|
|
5400
5400
|
ref: y,
|
|
5401
5401
|
style: {
|
|
@@ -5413,13 +5413,13 @@ var Qo = "PopperContent", [Em, Nm] = Ti(Qo), Oi = u.forwardRef(
|
|
|
5413
5413
|
}
|
|
5414
5414
|
);
|
|
5415
5415
|
Oi.displayName = Qo;
|
|
5416
|
-
var
|
|
5416
|
+
var ki = "PopperArrow", Rm = {
|
|
5417
5417
|
top: "bottom",
|
|
5418
5418
|
right: "left",
|
|
5419
5419
|
bottom: "top",
|
|
5420
5420
|
left: "right"
|
|
5421
|
-
},
|
|
5422
|
-
const { __scopePopper: r, ...o } = t, s = Nm(
|
|
5421
|
+
}, Mi = u.forwardRef(function(t, n) {
|
|
5422
|
+
const { __scopePopper: r, ...o } = t, s = Nm(ki, r), a = Rm[s.placedSide];
|
|
5423
5423
|
return (
|
|
5424
5424
|
// we have to use an extra wrapper because `ResizeObserver` (used by `useSize`)
|
|
5425
5425
|
// doesn't report size as we'd expect on SVG elements.
|
|
@@ -5463,7 +5463,7 @@ var Mi = "PopperArrow", Rm = {
|
|
|
5463
5463
|
)
|
|
5464
5464
|
);
|
|
5465
5465
|
});
|
|
5466
|
-
|
|
5466
|
+
Mi.displayName = ki;
|
|
5467
5467
|
function Tm(e) {
|
|
5468
5468
|
return e !== null;
|
|
5469
5469
|
}
|
|
@@ -5481,7 +5481,7 @@ function Di(e) {
|
|
|
5481
5481
|
const [t, n = "center"] = e.split("-");
|
|
5482
5482
|
return [t, n];
|
|
5483
5483
|
}
|
|
5484
|
-
var es = Pi, ts = _i, ns = Oi, rs =
|
|
5484
|
+
var es = Pi, ts = _i, ns = Oi, rs = Mi, Pm = "Portal", Sr = u.forwardRef((e, t) => {
|
|
5485
5485
|
var i;
|
|
5486
5486
|
const { container: n, ...r } = e, [o, s] = u.useState(!1);
|
|
5487
5487
|
ve(() => s(!0), []);
|
|
@@ -5492,7 +5492,7 @@ Sr.displayName = Pm;
|
|
|
5492
5492
|
var to = "rovingFocusGroup.onEntryFocus", Im = { bubbles: !1, cancelable: !0 }, vn = "RovingFocusGroup", [xo, Li, _m] = Vo(vn), [Om, Fi] = je(
|
|
5493
5493
|
vn,
|
|
5494
5494
|
[_m]
|
|
5495
|
-
), [
|
|
5495
|
+
), [km, Mm] = Om(vn), $i = u.forwardRef(
|
|
5496
5496
|
(e, t) => /* @__PURE__ */ c(xo.Provider, { scope: e.__scopeRovingFocusGroup, children: /* @__PURE__ */ c(xo.Slot, { scope: e.__scopeRovingFocusGroup, children: /* @__PURE__ */ c(Dm, { ...e, ref: t }) }) })
|
|
5497
5497
|
);
|
|
5498
5498
|
$i.displayName = vn;
|
|
@@ -5515,11 +5515,11 @@ var Dm = u.forwardRef((e, t) => {
|
|
|
5515
5515
|
caller: vn
|
|
5516
5516
|
}), [w, x] = u.useState(!1), y = we(f), C = Li(n), R = u.useRef(!1), [_, N] = u.useState(0);
|
|
5517
5517
|
return u.useEffect(() => {
|
|
5518
|
-
const
|
|
5519
|
-
if (
|
|
5520
|
-
return
|
|
5518
|
+
const k = m.current;
|
|
5519
|
+
if (k)
|
|
5520
|
+
return k.addEventListener(to, y), () => k.removeEventListener(to, y);
|
|
5521
5521
|
}, [y]), /* @__PURE__ */ c(
|
|
5522
|
-
|
|
5522
|
+
km,
|
|
5523
5523
|
{
|
|
5524
5524
|
scope: n,
|
|
5525
5525
|
orientation: r,
|
|
@@ -5527,16 +5527,16 @@ var Dm = u.forwardRef((e, t) => {
|
|
|
5527
5527
|
loop: o,
|
|
5528
5528
|
currentTabStopId: h,
|
|
5529
5529
|
onItemFocus: u.useCallback(
|
|
5530
|
-
(
|
|
5530
|
+
(k) => b(k),
|
|
5531
5531
|
[b]
|
|
5532
5532
|
),
|
|
5533
5533
|
onItemShiftTab: u.useCallback(() => x(!0), []),
|
|
5534
5534
|
onFocusableItemAdd: u.useCallback(
|
|
5535
|
-
() => N((
|
|
5535
|
+
() => N((k) => k + 1),
|
|
5536
5536
|
[]
|
|
5537
5537
|
),
|
|
5538
5538
|
onFocusableItemRemove: u.useCallback(
|
|
5539
|
-
() => N((
|
|
5539
|
+
() => N((k) => k - 1),
|
|
5540
5540
|
[]
|
|
5541
5541
|
),
|
|
5542
5542
|
children: /* @__PURE__ */ c(
|
|
@@ -5550,11 +5550,11 @@ var Dm = u.forwardRef((e, t) => {
|
|
|
5550
5550
|
onMouseDown: U(e.onMouseDown, () => {
|
|
5551
5551
|
R.current = !0;
|
|
5552
5552
|
}),
|
|
5553
|
-
onFocus: U(e.onFocus, (
|
|
5553
|
+
onFocus: U(e.onFocus, (k) => {
|
|
5554
5554
|
const L = !R.current;
|
|
5555
|
-
if (
|
|
5555
|
+
if (k.target === k.currentTarget && L && !w) {
|
|
5556
5556
|
const P = new CustomEvent(to, Im);
|
|
5557
|
-
if (
|
|
5557
|
+
if (k.currentTarget.dispatchEvent(P), !P.defaultPrevented) {
|
|
5558
5558
|
const $ = C().filter((O) => O.focusable), K = $.find((O) => O.active), B = $.find((O) => O.id === h), H = [K, B, ...$].filter(
|
|
5559
5559
|
Boolean
|
|
5560
5560
|
).map((O) => O.ref.current);
|
|
@@ -5577,7 +5577,7 @@ var Dm = u.forwardRef((e, t) => {
|
|
|
5577
5577
|
tabStopId: s,
|
|
5578
5578
|
children: a,
|
|
5579
5579
|
...i
|
|
5580
|
-
} = e, l = He(), f = s || l, d =
|
|
5580
|
+
} = e, l = He(), f = s || l, d = Mm(Bi, n), p = d.currentTabStopId === f, m = Li(n), { onFocusableItemAdd: v, onFocusableItemRemove: g, currentTabStopId: h } = d;
|
|
5581
5581
|
return u.useEffect(() => {
|
|
5582
5582
|
if (r)
|
|
5583
5583
|
return v(), () => g();
|
|
@@ -5658,7 +5658,7 @@ var Um = $i, Hm = Ui, zm = function(e) {
|
|
|
5658
5658
|
return null;
|
|
5659
5659
|
var t = Array.isArray(e) ? e[0] : e;
|
|
5660
5660
|
return t.ownerDocument.body;
|
|
5661
|
-
}, At = /* @__PURE__ */ new WeakMap(), On = /* @__PURE__ */ new WeakMap(),
|
|
5661
|
+
}, At = /* @__PURE__ */ new WeakMap(), On = /* @__PURE__ */ new WeakMap(), kn = {}, no = 0, zi = function(e) {
|
|
5662
5662
|
return e && (e.host || zi(e.parentNode));
|
|
5663
5663
|
}, Wm = function(e, t) {
|
|
5664
5664
|
return t.map(function(n) {
|
|
@@ -5671,8 +5671,8 @@ var Um = $i, Hm = Ui, zm = function(e) {
|
|
|
5671
5671
|
});
|
|
5672
5672
|
}, Vm = function(e, t, n, r) {
|
|
5673
5673
|
var o = Wm(t, Array.isArray(e) ? e : [e]);
|
|
5674
|
-
|
|
5675
|
-
var s =
|
|
5674
|
+
kn[n] || (kn[n] = /* @__PURE__ */ new WeakMap());
|
|
5675
|
+
var s = kn[n], a = [], i = /* @__PURE__ */ new Set(), l = new Set(o), f = function(p) {
|
|
5676
5676
|
!p || i.has(p) || (i.add(p), f(p.parentNode));
|
|
5677
5677
|
};
|
|
5678
5678
|
o.forEach(f);
|
|
@@ -5693,7 +5693,7 @@ var Um = $i, Hm = Ui, zm = function(e) {
|
|
|
5693
5693
|
a.forEach(function(p) {
|
|
5694
5694
|
var m = At.get(p) - 1, v = s.get(p) - 1;
|
|
5695
5695
|
At.set(p, m), s.set(p, v), m || (On.has(p) || p.removeAttribute(r), On.delete(p)), v || p.removeAttribute(n);
|
|
5696
|
-
}), no--, no || (At = /* @__PURE__ */ new WeakMap(), At = /* @__PURE__ */ new WeakMap(), On = /* @__PURE__ */ new WeakMap(),
|
|
5696
|
+
}), no--, no || (At = /* @__PURE__ */ new WeakMap(), At = /* @__PURE__ */ new WeakMap(), On = /* @__PURE__ */ new WeakMap(), kn = {});
|
|
5697
5697
|
};
|
|
5698
5698
|
}, os = function(e, t, n) {
|
|
5699
5699
|
n === void 0 && (n = "data-aria-hidden");
|
|
@@ -5931,14 +5931,14 @@ var sg = function() {
|
|
|
5931
5931
|
right: t[2],
|
|
5932
5932
|
gap: Math.max(0, r - n + t[2] - t[0])
|
|
5933
5933
|
};
|
|
5934
|
-
}, ug = Ki(),
|
|
5934
|
+
}, ug = Ki(), Mt = "data-scroll-locked", dg = function(e, t, n, r) {
|
|
5935
5935
|
var o = e.left, s = e.top, a = e.right, i = e.gap;
|
|
5936
5936
|
return n === void 0 && (n = "margin"), `
|
|
5937
5937
|
.`.concat(Km, ` {
|
|
5938
5938
|
overflow: hidden `).concat(r, `;
|
|
5939
5939
|
padding-right: `).concat(i, "px ").concat(r, `;
|
|
5940
5940
|
}
|
|
5941
|
-
body[`).concat(
|
|
5941
|
+
body[`).concat(Mt, `] {
|
|
5942
5942
|
overflow: hidden `).concat(r, `;
|
|
5943
5943
|
overscroll-behavior: contain;
|
|
5944
5944
|
`).concat([
|
|
@@ -5971,18 +5971,18 @@ var sg = function() {
|
|
|
5971
5971
|
margin-right: 0 `).concat(r, `;
|
|
5972
5972
|
}
|
|
5973
5973
|
|
|
5974
|
-
body[`).concat(
|
|
5974
|
+
body[`).concat(Mt, `] {
|
|
5975
5975
|
`).concat(Gm, ": ").concat(i, `px;
|
|
5976
5976
|
}
|
|
5977
5977
|
`);
|
|
5978
5978
|
}, ga = function() {
|
|
5979
|
-
var e = parseInt(document.body.getAttribute(
|
|
5979
|
+
var e = parseInt(document.body.getAttribute(Mt) || "0", 10);
|
|
5980
5980
|
return isFinite(e) ? e : 0;
|
|
5981
5981
|
}, fg = function() {
|
|
5982
5982
|
u.useEffect(function() {
|
|
5983
|
-
return document.body.setAttribute(
|
|
5983
|
+
return document.body.setAttribute(Mt, (ga() + 1).toString()), function() {
|
|
5984
5984
|
var e = ga() - 1;
|
|
5985
|
-
e <= 0 ? document.body.removeAttribute(
|
|
5985
|
+
e <= 0 ? document.body.removeAttribute(Mt) : document.body.setAttribute(Mt, e.toString());
|
|
5986
5986
|
};
|
|
5987
5987
|
}, []);
|
|
5988
5988
|
}, pg = function(e) {
|
|
@@ -5995,12 +5995,12 @@ var sg = function() {
|
|
|
5995
5995
|
}, So = !1;
|
|
5996
5996
|
if (typeof window < "u")
|
|
5997
5997
|
try {
|
|
5998
|
-
var
|
|
5998
|
+
var Mn = Object.defineProperty({}, "passive", {
|
|
5999
5999
|
get: function() {
|
|
6000
6000
|
return So = !0, !0;
|
|
6001
6001
|
}
|
|
6002
6002
|
});
|
|
6003
|
-
window.addEventListener("test",
|
|
6003
|
+
window.addEventListener("test", Mn, Mn), window.removeEventListener("test", Mn, Mn);
|
|
6004
6004
|
} catch {
|
|
6005
6005
|
So = !1;
|
|
6006
6006
|
}
|
|
@@ -6104,10 +6104,10 @@ function Eg(e) {
|
|
|
6104
6104
|
var w = Dn(h), x = n.current, y = "deltaX" in h ? h.deltaX : x[0] - w[0], C = "deltaY" in h ? h.deltaY : x[1] - w[1], R, _ = h.target, N = Math.abs(y) > Math.abs(C) ? "h" : "v";
|
|
6105
6105
|
if ("touches" in h && N === "h" && _.type === "range")
|
|
6106
6106
|
return !1;
|
|
6107
|
-
var
|
|
6108
|
-
if (!
|
|
6107
|
+
var k = ba(N, _);
|
|
6108
|
+
if (!k)
|
|
6109
6109
|
return !0;
|
|
6110
|
-
if (
|
|
6110
|
+
if (k ? R = N : (R = N === "v" ? "h" : "v", k = ba(N, _)), !k)
|
|
6111
6111
|
return !1;
|
|
6112
6112
|
if (!r.current && "changedTouches" in h && (y || C) && (r.current = R), !R)
|
|
6113
6113
|
return !0;
|
|
@@ -6183,7 +6183,7 @@ var Co = ["Enter", " "], Tg = ["ArrowDown", "PageUp", "Home"], Yi = ["ArrowUp",
|
|
|
6183
6183
|
Og,
|
|
6184
6184
|
jt,
|
|
6185
6185
|
Fi
|
|
6186
|
-
]), Nr = jt(), Zi = Fi(), [
|
|
6186
|
+
]), Nr = jt(), Zi = Fi(), [kg, Rt] = Nt(wn), [Mg, yn] = Nt(wn), Qi = (e) => {
|
|
6187
6187
|
const { __scopeMenu: t, open: n = !1, children: r, dir: o, onOpenChange: s, modal: a = !0 } = e, i = Nr(t), [l, f] = u.useState(null), d = u.useRef(!1), p = we(s), m = gr(o);
|
|
6188
6188
|
return u.useEffect(() => {
|
|
6189
6189
|
const v = () => {
|
|
@@ -6193,7 +6193,7 @@ var Co = ["Enter", " "], Tg = ["ArrowDown", "PageUp", "Home"], Yi = ["ArrowUp",
|
|
|
6193
6193
|
document.removeEventListener("keydown", v, { capture: !0 }), document.removeEventListener("pointerdown", g, { capture: !0 }), document.removeEventListener("pointermove", g, { capture: !0 });
|
|
6194
6194
|
};
|
|
6195
6195
|
}, []), /* @__PURE__ */ c(es, { ...i, children: /* @__PURE__ */ c(
|
|
6196
|
-
|
|
6196
|
+
kg,
|
|
6197
6197
|
{
|
|
6198
6198
|
scope: t,
|
|
6199
6199
|
open: n,
|
|
@@ -6201,7 +6201,7 @@ var Co = ["Enter", " "], Tg = ["ArrowDown", "PageUp", "Home"], Yi = ["ArrowUp",
|
|
|
6201
6201
|
content: l,
|
|
6202
6202
|
onContentChange: f,
|
|
6203
6203
|
children: /* @__PURE__ */ c(
|
|
6204
|
-
|
|
6204
|
+
Mg,
|
|
6205
6205
|
{
|
|
6206
6206
|
scope: t,
|
|
6207
6207
|
onClose: u.useCallback(() => p(!1), [p]),
|
|
@@ -6287,12 +6287,12 @@ var De = "MenuContent", [Fg, is] = Nt(De), nc = u.forwardRef(
|
|
|
6287
6287
|
onDismiss: v,
|
|
6288
6288
|
disableOutsideScroll: g,
|
|
6289
6289
|
...h
|
|
6290
|
-
} = e, b = Rt(De, n), w = yn(De, n), x = Nr(n), y = Zi(n), C = _g(n), [R, _] = u.useState(null), N = u.useRef(null),
|
|
6290
|
+
} = e, b = Rt(De, n), w = yn(De, n), x = Nr(n), y = Zi(n), C = _g(n), [R, _] = u.useState(null), N = u.useRef(null), k = ie(t, N, b.onContentChange), L = u.useRef(0), P = u.useRef(""), $ = u.useRef(0), K = u.useRef(null), B = u.useRef("right"), M = u.useRef(0), H = g ? Er : u.Fragment, O = g ? { as: Ug, allowPinchZoom: !0 } : void 0, G = (T) => {
|
|
6291
6291
|
var z, W;
|
|
6292
|
-
const
|
|
6292
|
+
const ee = P.current + T, q = C().filter((oe) => !oe.disabled), ae = document.activeElement, F = (z = q.find((oe) => oe.ref.current === ae)) == null ? void 0 : z.textValue, j = q.map((oe) => oe.textValue), ce = Zg(j, ee, F), fe = (W = q.find((oe) => oe.textValue === ce)) == null ? void 0 : W.ref.current;
|
|
6293
6293
|
(function oe(V) {
|
|
6294
6294
|
P.current = V, window.clearTimeout(L.current), V !== "" && (L.current = window.setTimeout(() => oe(""), 1e3));
|
|
6295
|
-
})(
|
|
6295
|
+
})(ee), fe && setTimeout(() => fe.focus());
|
|
6296
6296
|
};
|
|
6297
6297
|
u.useEffect(() => () => window.clearTimeout(L.current), []), jo();
|
|
6298
6298
|
const D = u.useCallback((T) => {
|
|
@@ -6312,8 +6312,8 @@ var De = "MenuContent", [Fg, is] = Nt(De), nc = u.forwardRef(
|
|
|
6312
6312
|
),
|
|
6313
6313
|
onItemLeave: u.useCallback(
|
|
6314
6314
|
(T) => {
|
|
6315
|
-
var
|
|
6316
|
-
D(T) || ((
|
|
6315
|
+
var ee;
|
|
6316
|
+
D(T) || ((ee = N.current) == null || ee.focus(), _(null));
|
|
6317
6317
|
},
|
|
6318
6318
|
[D]
|
|
6319
6319
|
),
|
|
@@ -6333,8 +6333,8 @@ var De = "MenuContent", [Fg, is] = Nt(De), nc = u.forwardRef(
|
|
|
6333
6333
|
asChild: !0,
|
|
6334
6334
|
trapped: o,
|
|
6335
6335
|
onMountAutoFocus: U(s, (T) => {
|
|
6336
|
-
var
|
|
6337
|
-
T.preventDefault(), (
|
|
6336
|
+
var ee;
|
|
6337
|
+
T.preventDefault(), (ee = N.current) == null || ee.focus({ preventScroll: !0 });
|
|
6338
6338
|
}),
|
|
6339
6339
|
onUnmountAutoFocus: a,
|
|
6340
6340
|
children: /* @__PURE__ */ c(
|
|
@@ -6371,7 +6371,7 @@ var De = "MenuContent", [Fg, is] = Nt(De), nc = u.forwardRef(
|
|
|
6371
6371
|
dir: w.dir,
|
|
6372
6372
|
...x,
|
|
6373
6373
|
...h,
|
|
6374
|
-
ref:
|
|
6374
|
+
ref: k,
|
|
6375
6375
|
style: { outline: "none", ...h.style },
|
|
6376
6376
|
onKeyDown: U(h.onKeyDown, (T) => {
|
|
6377
6377
|
const q = T.target.closest("[data-radix-menu-content]") === T.currentTarget, ae = T.ctrlKey || T.altKey || T.metaKey, F = T.key.length === 1;
|
|
@@ -6388,10 +6388,10 @@ var De = "MenuContent", [Fg, is] = Nt(De), nc = u.forwardRef(
|
|
|
6388
6388
|
onPointerMove: U(
|
|
6389
6389
|
e.onPointerMove,
|
|
6390
6390
|
cn((T) => {
|
|
6391
|
-
const
|
|
6392
|
-
if (T.currentTarget.contains(
|
|
6393
|
-
const ae = T.clientX >
|
|
6394
|
-
B.current = ae,
|
|
6391
|
+
const ee = T.target, q = M.current !== T.clientX;
|
|
6392
|
+
if (T.currentTarget.contains(ee) && q) {
|
|
6393
|
+
const ae = T.clientX > M.current ? "right" : "left";
|
|
6394
|
+
B.current = ae, M.current = T.clientX;
|
|
6395
6395
|
}
|
|
6396
6396
|
})
|
|
6397
6397
|
)
|
|
@@ -6900,7 +6900,7 @@ var _b = "DropdownMenuSubTrigger", Oc = u.forwardRef((e, t) => {
|
|
|
6900
6900
|
return /* @__PURE__ */ c(hb, { ...o, ...r, ref: t });
|
|
6901
6901
|
});
|
|
6902
6902
|
Oc.displayName = _b;
|
|
6903
|
-
var Ob = "DropdownMenuSubContent",
|
|
6903
|
+
var Ob = "DropdownMenuSubContent", kc = u.forwardRef((e, t) => {
|
|
6904
6904
|
const { __scopeDropdownMenu: n, ...r } = e, o = Ce(n);
|
|
6905
6905
|
return /* @__PURE__ */ c(
|
|
6906
6906
|
mb,
|
|
@@ -6919,9 +6919,9 @@ var Ob = "DropdownMenuSubContent", Mc = u.forwardRef((e, t) => {
|
|
|
6919
6919
|
}
|
|
6920
6920
|
);
|
|
6921
6921
|
});
|
|
6922
|
-
|
|
6923
|
-
var
|
|
6924
|
-
const Lb =
|
|
6922
|
+
kc.displayName = Ob;
|
|
6923
|
+
var kb = yc, Mb = Sc, Db = Cc, Mc = Nc, Dc = Rc, Lc = Tc, Fc = Ac, $c = Pc, Bc = Ic, Uc = _c, Hc = Oc, zc = kc;
|
|
6924
|
+
const Lb = kb, Fb = Mb, $b = u.forwardRef(({ className: e, inset: t, children: n, ...r }, o) => /* @__PURE__ */ E(
|
|
6925
6925
|
Hc,
|
|
6926
6926
|
{
|
|
6927
6927
|
ref: o,
|
|
@@ -6951,7 +6951,7 @@ const Bb = u.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ c(
|
|
|
6951
6951
|
));
|
|
6952
6952
|
Bb.displayName = zc.displayName;
|
|
6953
6953
|
const Wc = u.forwardRef(({ className: e, sideOffset: t = 4, ...n }, r) => /* @__PURE__ */ c(Db, { children: /* @__PURE__ */ c(
|
|
6954
|
-
|
|
6954
|
+
Mc,
|
|
6955
6955
|
{
|
|
6956
6956
|
ref: r,
|
|
6957
6957
|
sideOffset: t,
|
|
@@ -6962,7 +6962,7 @@ const Wc = u.forwardRef(({ className: e, sideOffset: t = 4, ...n }, r) => /* @__
|
|
|
6962
6962
|
...n
|
|
6963
6963
|
}
|
|
6964
6964
|
) }));
|
|
6965
|
-
Wc.displayName =
|
|
6965
|
+
Wc.displayName = Mc.displayName;
|
|
6966
6966
|
const Eo = u.forwardRef(({ className: e, inset: t, ...n }, r) => /* @__PURE__ */ c(
|
|
6967
6967
|
Lc,
|
|
6968
6968
|
{
|
|
@@ -7058,14 +7058,14 @@ function Vn({
|
|
|
7058
7058
|
navigateToCheckpoint: R,
|
|
7059
7059
|
returnToLatest: _,
|
|
7060
7060
|
hasMoreHistory: N,
|
|
7061
|
-
isLoadingHistory:
|
|
7061
|
+
isLoadingHistory: k,
|
|
7062
7062
|
loadOlderMessages: L,
|
|
7063
7063
|
api: P
|
|
7064
|
-
} = ri(), [$, K] = re(""), [B,
|
|
7064
|
+
} = ri(), [$, K] = re(""), [B, M] = re(null), [H, O] = re(null), [G, D] = re([]), [T, ee] = re(!1), [q, ae] = re(null), [F, j] = re(null), [ce, fe] = re(!1), [z, W] = re([]), [oe, V] = re(null), Z = Te(null), J = Te(null), pe = Te(null), Se = Te(null), X = Te(null), Y = Te(!1), he = Te(!0), Fe = Te(0), Ee = Te(null), [xn, Gt] = re("desktop");
|
|
7065
7065
|
ge(() => {
|
|
7066
7066
|
const I = () => {
|
|
7067
|
-
const
|
|
7068
|
-
Gt(
|
|
7067
|
+
const Q = window.innerWidth;
|
|
7068
|
+
Gt(Q < 640 ? "phone" : Q < 1024 ? "tablet" : "desktop");
|
|
7069
7069
|
};
|
|
7070
7070
|
return I(), window.addEventListener("resize", I), () => window.removeEventListener("resize", I);
|
|
7071
7071
|
}, []), ge(() => {
|
|
@@ -7074,12 +7074,12 @@ function Vn({
|
|
|
7074
7074
|
W([]), V(null), Ee.current = null;
|
|
7075
7075
|
return;
|
|
7076
7076
|
}
|
|
7077
|
-
const
|
|
7077
|
+
const Q = {
|
|
7078
7078
|
threadId: m,
|
|
7079
7079
|
checkpointId: y ?? null
|
|
7080
7080
|
}, le = Ee.current;
|
|
7081
|
-
if (!(le && le.threadId ===
|
|
7082
|
-
return Ee.current =
|
|
7081
|
+
if (!(le && le.threadId === Q.threadId && le.checkpointId === Q.checkpointId))
|
|
7082
|
+
return Ee.current = Q, C(m).then((ue) => {
|
|
7083
7083
|
if (I) return;
|
|
7084
7084
|
const Be = ((ue == null ? void 0 : ue.checkpoints) ?? []).slice().sort((st, Rn) => new Date(Rn.createdAt).getTime() - new Date(st.createdAt).getTime());
|
|
7085
7085
|
W(Be), V((st) => {
|
|
@@ -7095,10 +7095,10 @@ function Vn({
|
|
|
7095
7095
|
y && V(y);
|
|
7096
7096
|
}, [y]);
|
|
7097
7097
|
const ht = be(async () => {
|
|
7098
|
-
if (!N ||
|
|
7098
|
+
if (!N || k) return;
|
|
7099
7099
|
const I = X.current;
|
|
7100
7100
|
if (!I) return;
|
|
7101
|
-
const
|
|
7101
|
+
const Q = I.scrollHeight, le = I.scrollTop;
|
|
7102
7102
|
Y.current = !0;
|
|
7103
7103
|
try {
|
|
7104
7104
|
await L();
|
|
@@ -7112,21 +7112,21 @@ function Vn({
|
|
|
7112
7112
|
return;
|
|
7113
7113
|
}
|
|
7114
7114
|
const Be = ue.scrollHeight;
|
|
7115
|
-
ue.scrollTop = le + (Be -
|
|
7115
|
+
ue.scrollTop = le + (Be - Q);
|
|
7116
7116
|
const st = Be - ue.scrollTop - ue.clientHeight;
|
|
7117
7117
|
he.current = st <= 32, Y.current = !1;
|
|
7118
7118
|
});
|
|
7119
7119
|
}
|
|
7120
|
-
}, [N,
|
|
7120
|
+
}, [N, k, L]);
|
|
7121
7121
|
ge(() => {
|
|
7122
7122
|
const I = X.current;
|
|
7123
7123
|
if (!I) return;
|
|
7124
|
-
const
|
|
7124
|
+
const Q = () => {
|
|
7125
7125
|
I.scrollTop <= 80 && ht();
|
|
7126
7126
|
const Be = I.scrollHeight - I.scrollTop - I.clientHeight;
|
|
7127
7127
|
he.current = Be <= 80;
|
|
7128
7128
|
};
|
|
7129
|
-
return I.addEventListener("scroll",
|
|
7129
|
+
return I.addEventListener("scroll", Q), () => I.removeEventListener("scroll", Q);
|
|
7130
7130
|
}, [ht]), ge(() => {
|
|
7131
7131
|
v.length < Fe.current && (he.current = !0), Fe.current = v.length;
|
|
7132
7132
|
}, [v.length]), ge(() => {
|
|
@@ -7143,60 +7143,63 @@ function Vn({
|
|
|
7143
7143
|
return `Message too long (${I.length}/${_t} characters)`;
|
|
7144
7144
|
try {
|
|
7145
7145
|
return qp(I), null;
|
|
7146
|
-
} catch (
|
|
7147
|
-
return (
|
|
7146
|
+
} catch (Q) {
|
|
7147
|
+
return (Q == null ? void 0 : Q.message) || "Invalid message";
|
|
7148
7148
|
}
|
|
7149
7149
|
}, qt = (I) => {
|
|
7150
|
-
const
|
|
7150
|
+
const Q = I.content || [], le = Q.filter((ue) => ue.type === "text").map((ue) => ue.text).join("");
|
|
7151
7151
|
if (le) return le;
|
|
7152
7152
|
try {
|
|
7153
|
-
return JSON.stringify(
|
|
7153
|
+
return JSON.stringify(Q, null, 2);
|
|
7154
7154
|
} catch {
|
|
7155
|
-
return String(
|
|
7155
|
+
return String(Q);
|
|
7156
7156
|
}
|
|
7157
7157
|
}, Sn = async () => {
|
|
7158
7158
|
const I = $.trim();
|
|
7159
|
-
if (!I && G.length === 0)
|
|
7160
|
-
|
|
7161
|
-
|
|
7162
|
-
|
|
7163
|
-
|
|
7164
|
-
|
|
7165
|
-
|
|
7166
|
-
|
|
7167
|
-
|
|
7168
|
-
|
|
7169
|
-
|
|
7159
|
+
if (!(!I && G.length === 0)) {
|
|
7160
|
+
if (I) {
|
|
7161
|
+
const Q = Br(I);
|
|
7162
|
+
if (Q) {
|
|
7163
|
+
O(Q);
|
|
7164
|
+
return;
|
|
7165
|
+
}
|
|
7166
|
+
}
|
|
7167
|
+
try {
|
|
7168
|
+
await w(I, { checkpointId: oe || y || void 0, payloadExtras: B ? { edit: !0, originalMessageId: B } : void 0, attachments: G }), f == null || f(I), K(""), O(null), D([]), M(null), J.current && (J.current.style.height = "auto");
|
|
7169
|
+
} catch (Q) {
|
|
7170
|
+
const le = (Q == null ? void 0 : Q.message) || "Failed to send message";
|
|
7171
|
+
O(le), p == null || p(le);
|
|
7172
|
+
}
|
|
7170
7173
|
}
|
|
7171
|
-
}, Cn = (I,
|
|
7172
|
-
i && (
|
|
7174
|
+
}, Cn = (I, Q) => {
|
|
7175
|
+
i && (M(I), K(Q), O(null), setTimeout(() => {
|
|
7173
7176
|
J.current && (J.current.focus(), J.current.style.height = "auto", J.current.style.height = J.current.scrollHeight + "px");
|
|
7174
7177
|
}, 0));
|
|
7175
7178
|
}, Xt = () => {
|
|
7176
|
-
|
|
7179
|
+
M(null), K(""), O(null), J.current && (J.current.style.height = "auto");
|
|
7177
7180
|
}, Ur = (I) => {
|
|
7178
7181
|
I.key === "Enter" && !I.shiftKey ? (I.preventDefault(), Sn()) : I.key === "Escape" && B && (I.preventDefault(), Xt());
|
|
7179
7182
|
}, Hr = (I) => {
|
|
7180
|
-
const
|
|
7181
|
-
D((le) => [...le, ...
|
|
7182
|
-
}, En = (I) => D((
|
|
7183
|
-
const
|
|
7184
|
-
if (
|
|
7185
|
-
ae(null), j(null),
|
|
7183
|
+
const Q = Array.from(I.target.files || []);
|
|
7184
|
+
D((le) => [...le, ...Q]);
|
|
7185
|
+
}, En = (I) => D((Q) => Q.filter((le, ue) => I !== ue)), se = async (I) => {
|
|
7186
|
+
const Q = (I.target.files || [])[0];
|
|
7187
|
+
if (Q) {
|
|
7188
|
+
ae(null), j(null), ee(!0);
|
|
7186
7189
|
try {
|
|
7187
|
-
const le = await P.uploadExcel(
|
|
7188
|
-
j(Be), d == null || d({ file:
|
|
7190
|
+
const le = await P.uploadExcel(Q), ue = le.sheets.map((st) => `${st.sheetName} -> ${st.tableName}`).join(", "), Be = ue ? `Uploaded ${Q.name} (${le.sheets.length} sheet${le.sheets.length === 1 ? "" : "s"}: ${ue})` : `Uploaded ${Q.name}`;
|
|
7191
|
+
j(Be), d == null || d({ file: Q, response: le });
|
|
7189
7192
|
} catch (le) {
|
|
7190
7193
|
const ue = le instanceof Error ? le.message : "Failed to upload Excel file";
|
|
7191
7194
|
console.error("Excel upload failed", le), ae(ue), p == null || p(ue);
|
|
7192
7195
|
} finally {
|
|
7193
|
-
|
|
7196
|
+
ee(!1), I.target.value = "";
|
|
7194
7197
|
}
|
|
7195
7198
|
}
|
|
7196
7199
|
}, ye = (I) => {
|
|
7197
7200
|
if (!I) return "Unknown";
|
|
7198
|
-
const
|
|
7199
|
-
return Number.isNaN(
|
|
7201
|
+
const Q = Date.parse(I);
|
|
7202
|
+
return Number.isNaN(Q) ? I : new Date(Q).toLocaleString();
|
|
7200
7203
|
}, Ne = async (I) => {
|
|
7201
7204
|
if (m) {
|
|
7202
7205
|
if (!I) {
|
|
@@ -7229,8 +7232,8 @@ function Vn({
|
|
|
7229
7232
|
className: "border border-border rounded px-2 py-1 text-xs bg-card text-foreground focus:outline-none focus:ring-1 focus:ring-ring dark:bg-secondary",
|
|
7230
7233
|
value: oe ?? "",
|
|
7231
7234
|
onChange: (I) => {
|
|
7232
|
-
const
|
|
7233
|
-
Ne(
|
|
7235
|
+
const Q = I.target.value || null;
|
|
7236
|
+
Ne(Q);
|
|
7234
7237
|
},
|
|
7235
7238
|
children: [
|
|
7236
7239
|
/* @__PURE__ */ c("option", { value: "", children: "Latest" }),
|
|
@@ -7250,12 +7253,12 @@ function Vn({
|
|
|
7250
7253
|
style: r ? { maxHeight: r } : void 0,
|
|
7251
7254
|
children: [
|
|
7252
7255
|
v.length === 0 ? /* @__PURE__ */ c("div", { className: "flex items-center justify-center py-8 text-muted-foreground", children: "No messages yet. Start a conversation!" }) : /* @__PURE__ */ E(Ae, { children: [
|
|
7253
|
-
(
|
|
7254
|
-
v.map((I,
|
|
7255
|
-
|
|
7256
|
+
(k || !N) && /* @__PURE__ */ c("div", { className: "flex justify-center py-2 text-xs text-muted-foreground", children: k ? /* @__PURE__ */ c(Rs, { className: "h-4 w-4 animate-spin" }) : "You've reached the beginning" }),
|
|
7257
|
+
v.map((I, Q) => /* @__PURE__ */ c(
|
|
7258
|
+
Mp,
|
|
7256
7259
|
{
|
|
7257
7260
|
message: I,
|
|
7258
|
-
messageIndex:
|
|
7261
|
+
messageIndex: Q,
|
|
7259
7262
|
isStreamingMessage: g && h === I.id,
|
|
7260
7263
|
streamingDebounceMs: o,
|
|
7261
7264
|
isEditing: B === I.id,
|
|
@@ -7272,7 +7275,7 @@ function Vn({
|
|
|
7272
7275
|
},
|
|
7273
7276
|
onCancelEdit: Xt
|
|
7274
7277
|
},
|
|
7275
|
-
I.id ||
|
|
7278
|
+
I.id || Q
|
|
7276
7279
|
))
|
|
7277
7280
|
] }),
|
|
7278
7281
|
/* @__PURE__ */ c("div", { ref: Z })
|
|
@@ -7308,7 +7311,7 @@ function Vn({
|
|
|
7308
7311
|
className: "hidden"
|
|
7309
7312
|
}
|
|
7310
7313
|
),
|
|
7311
|
-
G.length > 0 && /* @__PURE__ */ c("div", { className: "flex flex-wrap gap-2", children: G.map((I,
|
|
7314
|
+
G.length > 0 && /* @__PURE__ */ c("div", { className: "flex flex-wrap gap-2", children: G.map((I, Q) => /* @__PURE__ */ E("div", { className: "flex items-center gap-2 bg-gray-100 dark:bg-gray-800 rounded-lg px-3 py-2 text-sm text-gray-900 dark:text-gray-100", children: [
|
|
7312
7315
|
/* @__PURE__ */ c(Ts, { size: 14 }),
|
|
7313
7316
|
/* @__PURE__ */ c("span", { className: "truncate max-w-[150px]", children: I.name }),
|
|
7314
7317
|
/* @__PURE__ */ c(
|
|
@@ -7316,13 +7319,13 @@ function Vn({
|
|
|
7316
7319
|
{
|
|
7317
7320
|
variant: "ghost",
|
|
7318
7321
|
size: "sm",
|
|
7319
|
-
onClick: () => En(
|
|
7320
|
-
className: "h-4 w-4 p-0 text-gray-500 hover:text-red-500",
|
|
7322
|
+
onClick: () => En(Q),
|
|
7323
|
+
className: "h-4 w-4 p-0 text-gray-500 dark:text-gray-400 hover:text-red-500 dark:hover:text-red-400",
|
|
7321
7324
|
"aria-label": `Remove ${I.name}`,
|
|
7322
7325
|
children: /* @__PURE__ */ c(en, { size: 12 })
|
|
7323
7326
|
}
|
|
7324
7327
|
)
|
|
7325
|
-
] },
|
|
7328
|
+
] }, Q)) })
|
|
7326
7329
|
] }),
|
|
7327
7330
|
a && /* @__PURE__ */ E(Ae, { children: [
|
|
7328
7331
|
/* @__PURE__ */ c(
|
|
@@ -7459,7 +7462,7 @@ var fs = "ScrollArea", [Vc, Uy] = je(fs), [jb, Le] = Vc(fs), jc = u.forwardRef(
|
|
|
7459
7462
|
dir: o,
|
|
7460
7463
|
scrollHideDelay: s = 600,
|
|
7461
7464
|
...a
|
|
7462
|
-
} = e, [i, l] = u.useState(null), [f, d] = u.useState(null), [p, m] = u.useState(null), [v, g] = u.useState(null), [h, b] = u.useState(null), [w, x] = u.useState(0), [y, C] = u.useState(0), [R, _] = u.useState(!1), [N,
|
|
7465
|
+
} = e, [i, l] = u.useState(null), [f, d] = u.useState(null), [p, m] = u.useState(null), [v, g] = u.useState(null), [h, b] = u.useState(null), [w, x] = u.useState(0), [y, C] = u.useState(0), [R, _] = u.useState(!1), [N, k] = u.useState(!1), L = ie(t, ($) => l($)), P = gr(o);
|
|
7463
7466
|
return /* @__PURE__ */ c(
|
|
7464
7467
|
jb,
|
|
7465
7468
|
{
|
|
@@ -7479,7 +7482,7 @@ var fs = "ScrollArea", [Vc, Uy] = je(fs), [jb, Le] = Vc(fs), jc = u.forwardRef(
|
|
|
7479
7482
|
scrollbarY: h,
|
|
7480
7483
|
onScrollbarYChange: b,
|
|
7481
7484
|
scrollbarYEnabled: N,
|
|
7482
|
-
onScrollbarYEnabledChange:
|
|
7485
|
+
onScrollbarYEnabledChange: k,
|
|
7483
7486
|
onCornerWidthChange: x,
|
|
7484
7487
|
onCornerHeightChange: C,
|
|
7485
7488
|
children: /* @__PURE__ */ c(
|
|
@@ -7782,7 +7785,7 @@ var Kb = u.forwardRef((e, t) => {
|
|
|
7782
7785
|
onResize: p,
|
|
7783
7786
|
...m
|
|
7784
7787
|
} = e, v = Le(et, n), [g, h] = u.useState(null), b = ie(t, (L) => h(L)), w = u.useRef(null), x = u.useRef(""), y = v.viewport, C = r.content - r.viewport, R = we(d), _ = we(l), N = Pr(p, 10);
|
|
7785
|
-
function
|
|
7788
|
+
function k(L) {
|
|
7786
7789
|
if (w.current) {
|
|
7787
7790
|
const P = L.clientX - w.current.left, $ = L.clientY - w.current.top;
|
|
7788
7791
|
f({ x: P, y: $ });
|
|
@@ -7811,9 +7814,9 @@ var Kb = u.forwardRef((e, t) => {
|
|
|
7811
7814
|
ref: b,
|
|
7812
7815
|
style: { position: "absolute", ...m.style },
|
|
7813
7816
|
onPointerDown: U(e.onPointerDown, (L) => {
|
|
7814
|
-
L.button === 0 && (L.target.setPointerCapture(L.pointerId), w.current = g.getBoundingClientRect(), x.current = document.body.style.webkitUserSelect, document.body.style.webkitUserSelect = "none", v.viewport && (v.viewport.style.scrollBehavior = "auto"),
|
|
7817
|
+
L.button === 0 && (L.target.setPointerCapture(L.pointerId), w.current = g.getBoundingClientRect(), x.current = document.body.style.webkitUserSelect, document.body.style.webkitUserSelect = "none", v.viewport && (v.viewport.style.scrollBehavior = "auto"), k(L));
|
|
7815
7818
|
}),
|
|
7816
|
-
onPointerMove: U(e.onPointerMove,
|
|
7819
|
+
onPointerMove: U(e.onPointerMove, k),
|
|
7817
7820
|
onPointerUp: U(e.onPointerUp, (L) => {
|
|
7818
7821
|
const P = L.target;
|
|
7819
7822
|
P.hasPointerCapture(L.pointerId) && P.releasePointerCapture(L.pointerId), document.body.style.webkitUserSelect = x.current, v.viewport && (v.viewport.style.scrollBehavior = ""), w.current = null;
|
|
@@ -8010,11 +8013,11 @@ function Ro({
|
|
|
8010
8013
|
createThread: h,
|
|
8011
8014
|
deleteThread: b,
|
|
8012
8015
|
renameThread: w
|
|
8013
|
-
} = ri(), [x, y] = re(m ?? []), [C, R] = re(!1), [_, N] = re(null), [
|
|
8016
|
+
} = ri(), [x, y] = re(m ?? []), [C, R] = re(!1), [_, N] = re(null), [k, L] = re(null), [P, $] = re(""), [K, B] = re(!1);
|
|
8014
8017
|
ge(() => {
|
|
8015
8018
|
y(m ?? []);
|
|
8016
8019
|
}, [m]);
|
|
8017
|
-
const
|
|
8020
|
+
const M = async (F) => {
|
|
8018
8021
|
try {
|
|
8019
8022
|
await p(F), i == null || i(F), l == null || l(F);
|
|
8020
8023
|
} catch (j) {
|
|
@@ -8048,7 +8051,7 @@ function Ro({
|
|
|
8048
8051
|
}
|
|
8049
8052
|
}, T = () => {
|
|
8050
8053
|
L(null), $("");
|
|
8051
|
-
},
|
|
8054
|
+
}, ee = (F, j) => {
|
|
8052
8055
|
F.key === "Enter" ? D(j) : F.key === "Escape" && T();
|
|
8053
8056
|
}, q = (F) => {
|
|
8054
8057
|
if (!F) return "";
|
|
@@ -8083,12 +8086,12 @@ function Ro({
|
|
|
8083
8086
|
] }) : x.slice().sort((F, j) => new Date(j.updatedAt || j.createdAt || "").getTime() - new Date(F.updatedAt || F.createdAt || "").getTime()).map((F) => /* @__PURE__ */ E(
|
|
8084
8087
|
"div",
|
|
8085
8088
|
{
|
|
8086
|
-
onClick: () =>
|
|
8089
|
+
onClick: () => M(F.threadId),
|
|
8087
8090
|
className: `group relative p-3 rounded-lg cursor-pointer transition-colors border ${(a ?? g) === F.threadId ? `${s.activeThread || "bg-slate-600 border-slate-500"} ` : `${s.threadItem || "bg-slate-700 border-slate-600 hover:bg-slate-600 text-gray-900 dark:text-slate-100"}`} ${s.threadItem || ""} text-gray-900 dark:text-slate-100`,
|
|
8088
8091
|
children: [
|
|
8089
8092
|
/* @__PURE__ */ E("div", { className: "flex items-center justify-between", children: [
|
|
8090
|
-
/* @__PURE__ */ c("div", { className: "flex-1 min-w-0", children:
|
|
8091
|
-
/* @__PURE__ */ c(ln, { value: P, onChange: (j) => $(j.target.value), onKeyDown: (j) =>
|
|
8093
|
+
/* @__PURE__ */ c("div", { className: "flex-1 min-w-0", children: k === F.threadId ? /* @__PURE__ */ E("div", { className: "flex items-center gap-2", onClick: (j) => j.stopPropagation(), children: [
|
|
8094
|
+
/* @__PURE__ */ c(ln, { value: P, onChange: (j) => $(j.target.value), onKeyDown: (j) => ee(j, F.threadId), className: "h-6 text-sm", autoFocus: !0 }),
|
|
8092
8095
|
/* @__PURE__ */ c(de, { variant: "ghost", size: "sm", onClick: () => D(F.threadId), className: "h-6 w-6 p-0", children: /* @__PURE__ */ c(Lo, { size: 12 }) }),
|
|
8093
8096
|
/* @__PURE__ */ c(de, { variant: "ghost", size: "sm", onClick: T, className: "h-6 w-6 p-0", children: /* @__PURE__ */ c(en, { size: 12 }) })
|
|
8094
8097
|
] }) : /* @__PURE__ */ E(Ae, { children: [
|
|
@@ -8099,7 +8102,7 @@ function Ro({
|
|
|
8099
8102
|
] })
|
|
8100
8103
|
] }) }),
|
|
8101
8104
|
/* @__PURE__ */ E("div", { className: "flex items-center gap-1 opacity-0 group-hover:opacity-100 transition-opacity ml-2", children: [
|
|
8102
|
-
r &&
|
|
8105
|
+
r && k !== F.threadId && /* @__PURE__ */ c(de, { variant: "ghost", size: "sm", onClick: (j) => G(F, j), className: "h-6 w-6 p-0", title: "Edit title", children: /* @__PURE__ */ c(Ia, { size: 12 }) }),
|
|
8103
8106
|
n && /* @__PURE__ */ c(
|
|
8104
8107
|
de,
|
|
8105
8108
|
{
|
|
@@ -8542,7 +8545,7 @@ const Ol = u.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ c(
|
|
|
8542
8545
|
}
|
|
8543
8546
|
));
|
|
8544
8547
|
Ol.displayName = Tl.displayName;
|
|
8545
|
-
const
|
|
8548
|
+
const kl = u.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ c(
|
|
8546
8549
|
Al,
|
|
8547
8550
|
{
|
|
8548
8551
|
ref: n,
|
|
@@ -8550,7 +8553,7 @@ const Ml = u.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ c(
|
|
|
8550
8553
|
...t
|
|
8551
8554
|
}
|
|
8552
8555
|
));
|
|
8553
|
-
|
|
8556
|
+
kl.displayName = Al.displayName;
|
|
8554
8557
|
function Ea({
|
|
8555
8558
|
className: e,
|
|
8556
8559
|
...t
|
|
@@ -8563,7 +8566,7 @@ function Ea({
|
|
|
8563
8566
|
}
|
|
8564
8567
|
);
|
|
8565
8568
|
}
|
|
8566
|
-
var
|
|
8569
|
+
var Ml = Object.freeze({
|
|
8567
8570
|
// See: https://github.com/twbs/bootstrap/blob/main/scss/mixins/_visually-hidden.scss
|
|
8568
8571
|
position: "absolute",
|
|
8569
8572
|
border: 0,
|
|
@@ -8581,7 +8584,7 @@ var kl = Object.freeze({
|
|
|
8581
8584
|
{
|
|
8582
8585
|
...e,
|
|
8583
8586
|
ref: t,
|
|
8584
|
-
style: { ...
|
|
8587
|
+
style: { ...Ml, ...e.style }
|
|
8585
8588
|
}
|
|
8586
8589
|
)
|
|
8587
8590
|
);
|
|
@@ -8624,7 +8627,7 @@ var Iv = Dl, [_r, Gy] = je("Tooltip", [
|
|
|
8624
8627
|
);
|
|
8625
8628
|
};
|
|
8626
8629
|
Fl.displayName = Ll;
|
|
8627
|
-
var un = "Tooltip", [
|
|
8630
|
+
var un = "Tooltip", [kv, kr] = _r(un), $l = (e) => {
|
|
8628
8631
|
const {
|
|
8629
8632
|
__scopeTooltip: t,
|
|
8630
8633
|
children: n,
|
|
@@ -8652,7 +8655,7 @@ var un = "Tooltip", [Mv, Mr] = _r(un), $l = (e) => {
|
|
|
8652
8655
|
return u.useEffect(() => () => {
|
|
8653
8656
|
v.current && (window.clearTimeout(v.current), v.current = 0);
|
|
8654
8657
|
}, []), /* @__PURE__ */ c(es, { ...f, children: /* @__PURE__ */ c(
|
|
8655
|
-
|
|
8658
|
+
kv,
|
|
8656
8659
|
{
|
|
8657
8660
|
scope: t,
|
|
8658
8661
|
contentId: m,
|
|
@@ -8676,7 +8679,7 @@ var un = "Tooltip", [Mv, Mr] = _r(un), $l = (e) => {
|
|
|
8676
8679
|
$l.displayName = un;
|
|
8677
8680
|
var Ao = "TooltipTrigger", Bl = u.forwardRef(
|
|
8678
8681
|
(e, t) => {
|
|
8679
|
-
const { __scopeTooltip: n, ...r } = e, o =
|
|
8682
|
+
const { __scopeTooltip: n, ...r } = e, o = kr(Ao, n), s = xs(Ao, n), a = Or(n), i = u.useRef(null), l = ie(t, i, o.onTriggerChange), f = u.useRef(!1), d = u.useRef(!1), p = u.useCallback(() => f.current = !1, []);
|
|
8680
8683
|
return u.useEffect(() => () => document.removeEventListener("pointerup", p), [p]), /* @__PURE__ */ c(ts, { asChild: !0, ...a, children: /* @__PURE__ */ c(
|
|
8681
8684
|
te.button,
|
|
8682
8685
|
{
|
|
@@ -8703,15 +8706,15 @@ var Ao = "TooltipTrigger", Bl = u.forwardRef(
|
|
|
8703
8706
|
}
|
|
8704
8707
|
);
|
|
8705
8708
|
Bl.displayName = Ao;
|
|
8706
|
-
var
|
|
8709
|
+
var Mv = "TooltipPortal", [qy, Dv] = _r(Mv, {
|
|
8707
8710
|
forceMount: void 0
|
|
8708
8711
|
}), Bt = "TooltipContent", Ul = u.forwardRef(
|
|
8709
8712
|
(e, t) => {
|
|
8710
|
-
const n = Dv(Bt, e.__scopeTooltip), { forceMount: r = n.forceMount, side: o = "top", ...s } = e, a =
|
|
8713
|
+
const n = Dv(Bt, e.__scopeTooltip), { forceMount: r = n.forceMount, side: o = "top", ...s } = e, a = kr(Bt, e.__scopeTooltip);
|
|
8711
8714
|
return /* @__PURE__ */ c(_e, { present: r || a.open, children: a.disableHoverableContent ? /* @__PURE__ */ c(Hl, { side: o, ...s, ref: t }) : /* @__PURE__ */ c(Lv, { side: o, ...s, ref: t }) });
|
|
8712
8715
|
}
|
|
8713
8716
|
), Lv = u.forwardRef((e, t) => {
|
|
8714
|
-
const n =
|
|
8717
|
+
const n = kr(Bt, e.__scopeTooltip), r = xs(Bt, e.__scopeTooltip), o = u.useRef(null), s = ie(t, o), [a, i] = u.useState(null), { trigger: l, onClose: f } = n, d = o.current, { onPointerInTransitChange: p } = r, m = u.useCallback(() => {
|
|
8715
8718
|
i(null), p(!1);
|
|
8716
8719
|
}, [p]), v = u.useCallback(
|
|
8717
8720
|
(g, h) => {
|
|
@@ -8745,7 +8748,7 @@ var kv = "TooltipPortal", [qy, Dv] = _r(kv, {
|
|
|
8745
8748
|
onEscapeKeyDown: s,
|
|
8746
8749
|
onPointerDownOutside: a,
|
|
8747
8750
|
...i
|
|
8748
|
-
} = e, l =
|
|
8751
|
+
} = e, l = kr(Bt, n), f = Or(n), { onClose: d } = l;
|
|
8749
8752
|
return u.useEffect(() => (document.addEventListener(To, d), () => document.removeEventListener(To, d)), [d]), u.useEffect(() => {
|
|
8750
8753
|
if (l.trigger) {
|
|
8751
8754
|
const p = (m) => {
|
|
@@ -8906,7 +8909,7 @@ const Yv = Gv, Jv = qv, Zv = Xv, Vl = u.forwardRef(({ className: e, sideOffset:
|
|
|
8906
8909
|
));
|
|
8907
8910
|
Vl.displayName = Wl.displayName;
|
|
8908
8911
|
const Qv = "sidebar:state", ew = 60 * 60 * 24 * 7, tw = "16rem", nw = "18rem", rw = "3rem", ow = "b", jl = u.createContext(null);
|
|
8909
|
-
function
|
|
8912
|
+
function Mr() {
|
|
8910
8913
|
const e = u.useContext(jl);
|
|
8911
8914
|
if (!e)
|
|
8912
8915
|
throw new Error("useSidebar must be used within a SidebarProvider.");
|
|
@@ -8976,7 +8979,7 @@ const Gl = u.forwardRef(
|
|
|
8976
8979
|
children: o,
|
|
8977
8980
|
...s
|
|
8978
8981
|
}, a) => {
|
|
8979
|
-
const { isMobile: i, state: l, openMobile: f, setOpenMobile: d } =
|
|
8982
|
+
const { isMobile: i, state: l, openMobile: f, setOpenMobile: d } = Mr();
|
|
8980
8983
|
return n === "none" ? /* @__PURE__ */ c(
|
|
8981
8984
|
"div",
|
|
8982
8985
|
{
|
|
@@ -9049,7 +9052,7 @@ const Gl = u.forwardRef(
|
|
|
9049
9052
|
);
|
|
9050
9053
|
Gl.displayName = "Sidebar";
|
|
9051
9054
|
const ql = u.forwardRef(({ className: e, onClick: t, ...n }, r) => {
|
|
9052
|
-
const { toggleSidebar: o } =
|
|
9055
|
+
const { toggleSidebar: o } = Mr();
|
|
9053
9056
|
return /* @__PURE__ */ E(
|
|
9054
9057
|
de,
|
|
9055
9058
|
{
|
|
@@ -9071,7 +9074,7 @@ const ql = u.forwardRef(({ className: e, onClick: t, ...n }, r) => {
|
|
|
9071
9074
|
});
|
|
9072
9075
|
ql.displayName = "SidebarTrigger";
|
|
9073
9076
|
const sw = u.forwardRef(({ className: e, ...t }, n) => {
|
|
9074
|
-
const { toggleSidebar: r } =
|
|
9077
|
+
const { toggleSidebar: r } = Mr();
|
|
9075
9078
|
return /* @__PURE__ */ c(
|
|
9076
9079
|
"button",
|
|
9077
9080
|
{
|
|
@@ -9263,7 +9266,7 @@ const uw = dn(
|
|
|
9263
9266
|
className: s,
|
|
9264
9267
|
...a
|
|
9265
9268
|
}, i) => {
|
|
9266
|
-
const l = e ? Ut : "button", { isMobile: f, state: d } =
|
|
9269
|
+
const l = e ? Ut : "button", { isMobile: f, state: d } = Mr(), p = /* @__PURE__ */ c(
|
|
9267
9270
|
l,
|
|
9268
9271
|
{
|
|
9269
9272
|
ref: i,
|
|
@@ -9446,7 +9449,7 @@ ou.displayName = bw;
|
|
|
9446
9449
|
var su = ou;
|
|
9447
9450
|
const vw = dn(
|
|
9448
9451
|
"text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70"
|
|
9449
|
-
),
|
|
9452
|
+
), Me = u.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ c(
|
|
9450
9453
|
su,
|
|
9451
9454
|
{
|
|
9452
9455
|
ref: n,
|
|
@@ -9454,7 +9457,7 @@ const vw = dn(
|
|
|
9454
9457
|
...t
|
|
9455
9458
|
}
|
|
9456
9459
|
));
|
|
9457
|
-
|
|
9460
|
+
Me.displayName = su.displayName;
|
|
9458
9461
|
function au(e) {
|
|
9459
9462
|
const t = u.useRef({ value: e, previous: e });
|
|
9460
9463
|
return u.useMemo(() => (t.current.value !== e && (t.current.previous = t.current.value, t.current.value = e), t.current.previous), [e]);
|
|
@@ -9615,7 +9618,7 @@ var Ew = [" ", "Enter", "ArrowUp", "ArrowDown"], Nw = [" ", "Enter"], Ct = "Sele
|
|
|
9615
9618
|
disabled: m,
|
|
9616
9619
|
required: v,
|
|
9617
9620
|
form: g
|
|
9618
|
-
} = e, h = $r(t), [b, w] = u.useState(null), [x, y] = u.useState(null), [C, R] = u.useState(!1), _ = gr(f), [N,
|
|
9621
|
+
} = e, h = $r(t), [b, w] = u.useState(null), [x, y] = u.useState(null), [C, R] = u.useState(!1), _ = gr(f), [N, k] = lt({
|
|
9619
9622
|
prop: r,
|
|
9620
9623
|
defaultProp: o ?? !1,
|
|
9621
9624
|
onChange: s,
|
|
@@ -9625,7 +9628,7 @@ var Ew = [" ", "Enter", "ArrowUp", "ArrowDown"], Nw = [" ", "Enter"], Ct = "Sele
|
|
|
9625
9628
|
defaultProp: i,
|
|
9626
9629
|
onChange: l,
|
|
9627
9630
|
caller: Ct
|
|
9628
|
-
}), $ = u.useRef(null), K = b ? g || !!b.closest("form") : !0, [B,
|
|
9631
|
+
}), $ = u.useRef(null), K = b ? g || !!b.closest("form") : !0, [B, M] = u.useState(/* @__PURE__ */ new Set()), H = Array.from(B).map((O) => O.props.value).join(";");
|
|
9629
9632
|
return /* @__PURE__ */ c(es, { ...h, children: /* @__PURE__ */ E(
|
|
9630
9633
|
Tw,
|
|
9631
9634
|
{
|
|
@@ -9641,7 +9644,7 @@ var Ew = [" ", "Enter", "ArrowUp", "ArrowDown"], Nw = [" ", "Enter"], Ct = "Sele
|
|
|
9641
9644
|
value: L,
|
|
9642
9645
|
onValueChange: P,
|
|
9643
9646
|
open: N,
|
|
9644
|
-
onOpenChange:
|
|
9647
|
+
onOpenChange: k,
|
|
9645
9648
|
dir: _,
|
|
9646
9649
|
triggerPointerDownPosRef: $,
|
|
9647
9650
|
disabled: m,
|
|
@@ -9651,10 +9654,10 @@ var Ew = [" ", "Enter", "ArrowUp", "ArrowDown"], Nw = [" ", "Enter"], Ct = "Sele
|
|
|
9651
9654
|
{
|
|
9652
9655
|
scope: e.__scopeSelect,
|
|
9653
9656
|
onNativeOptionAdd: u.useCallback((O) => {
|
|
9654
|
-
|
|
9657
|
+
M((G) => new Set(G).add(O));
|
|
9655
9658
|
}, []),
|
|
9656
9659
|
onNativeOptionRemove: u.useCallback((O) => {
|
|
9657
|
-
|
|
9660
|
+
M((G) => {
|
|
9658
9661
|
const D = new Set(G);
|
|
9659
9662
|
return D.delete(O), D;
|
|
9660
9663
|
});
|
|
@@ -9772,7 +9775,7 @@ var Et = "SelectContent", yu = u.forwardRef(
|
|
|
9772
9775
|
}
|
|
9773
9776
|
);
|
|
9774
9777
|
yu.displayName = Et;
|
|
9775
|
-
var Ue = 10, [xu, pt] = Kt(Et), Ow = "SelectContentImpl",
|
|
9778
|
+
var Ue = 10, [xu, pt] = Kt(Et), Ow = "SelectContentImpl", kw = Dt("SelectContent.RemoveScroll"), Su = u.forwardRef(
|
|
9776
9779
|
(e, t) => {
|
|
9777
9780
|
const {
|
|
9778
9781
|
__scopeSelect: n,
|
|
@@ -9794,9 +9797,9 @@ var Ue = 10, [xu, pt] = Kt(Et), Ow = "SelectContentImpl", Mw = Dt("SelectContent
|
|
|
9794
9797
|
avoidCollisions: b,
|
|
9795
9798
|
//
|
|
9796
9799
|
...w
|
|
9797
|
-
} = e, x = ft(Et, n), [y, C] = u.useState(null), [R, _] = u.useState(null), N = ie(t, (z) => C(z)), [
|
|
9800
|
+
} = e, x = ft(Et, n), [y, C] = u.useState(null), [R, _] = u.useState(null), N = ie(t, (z) => C(z)), [k, L] = u.useState(null), [P, $] = u.useState(
|
|
9798
9801
|
null
|
|
9799
|
-
), K = Fr(n), [B,
|
|
9802
|
+
), K = Fr(n), [B, M] = u.useState(!1), H = u.useRef(!1);
|
|
9800
9803
|
u.useEffect(() => {
|
|
9801
9804
|
if (y) return os(y);
|
|
9802
9805
|
}, [y]), jo();
|
|
@@ -9808,8 +9811,8 @@ var Ue = 10, [xu, pt] = Kt(Et), Ow = "SelectContentImpl", Mw = Dt("SelectContent
|
|
|
9808
9811
|
},
|
|
9809
9812
|
[K, R]
|
|
9810
9813
|
), G = u.useCallback(
|
|
9811
|
-
() => O([
|
|
9812
|
-
[O,
|
|
9814
|
+
() => O([k, y]),
|
|
9815
|
+
[O, k, y]
|
|
9813
9816
|
);
|
|
9814
9817
|
u.useEffect(() => {
|
|
9815
9818
|
B && G();
|
|
@@ -9837,7 +9840,7 @@ var Ue = 10, [xu, pt] = Kt(Et), Ow = "SelectContentImpl", Mw = Dt("SelectContent
|
|
|
9837
9840
|
window.removeEventListener("blur", z), window.removeEventListener("resize", z);
|
|
9838
9841
|
};
|
|
9839
9842
|
}, [D]);
|
|
9840
|
-
const [
|
|
9843
|
+
const [ee, q] = Bu((z) => {
|
|
9841
9844
|
const W = K().filter((Z) => !Z.disabled), oe = W.find((Z) => Z.ref.current === document.activeElement), V = Uu(W, z, oe);
|
|
9842
9845
|
V && setTimeout(() => V.ref.current.focus());
|
|
9843
9846
|
}), ae = u.useCallback(
|
|
@@ -9872,15 +9875,15 @@ var Ue = 10, [xu, pt] = Kt(Et), Ow = "SelectContentImpl", Mw = Dt("SelectContent
|
|
|
9872
9875
|
viewport: R,
|
|
9873
9876
|
onViewportChange: _,
|
|
9874
9877
|
itemRefCallback: ae,
|
|
9875
|
-
selectedItem:
|
|
9878
|
+
selectedItem: k,
|
|
9876
9879
|
onItemLeave: F,
|
|
9877
9880
|
itemTextRefCallback: j,
|
|
9878
9881
|
focusSelectedItem: G,
|
|
9879
9882
|
selectedItemText: P,
|
|
9880
9883
|
position: r,
|
|
9881
9884
|
isPositioned: B,
|
|
9882
|
-
searchRef:
|
|
9883
|
-
children: /* @__PURE__ */ c(Er, { as:
|
|
9885
|
+
searchRef: ee,
|
|
9886
|
+
children: /* @__PURE__ */ c(Er, { as: kw, allowPinchZoom: !0, children: /* @__PURE__ */ c(
|
|
9884
9887
|
br,
|
|
9885
9888
|
{
|
|
9886
9889
|
asChild: !0,
|
|
@@ -9911,7 +9914,7 @@ var Ue = 10, [xu, pt] = Kt(Et), Ow = "SelectContentImpl", Mw = Dt("SelectContent
|
|
|
9911
9914
|
onContextMenu: (z) => z.preventDefault(),
|
|
9912
9915
|
...w,
|
|
9913
9916
|
...fe,
|
|
9914
|
-
onPlaced: () =>
|
|
9917
|
+
onPlaced: () => M(!0),
|
|
9915
9918
|
ref: N,
|
|
9916
9919
|
style: {
|
|
9917
9920
|
// flex layout so we can place the scroll buttons properly
|
|
@@ -9943,12 +9946,12 @@ var Ue = 10, [xu, pt] = Kt(Et), Ow = "SelectContentImpl", Mw = Dt("SelectContent
|
|
|
9943
9946
|
}
|
|
9944
9947
|
);
|
|
9945
9948
|
Su.displayName = Ow;
|
|
9946
|
-
var
|
|
9949
|
+
var Mw = "SelectItemAlignedPosition", Cu = u.forwardRef((e, t) => {
|
|
9947
9950
|
const { __scopeSelect: n, onPlaced: r, ...o } = e, s = ft(Et, n), a = pt(Et, n), [i, l] = u.useState(null), [f, d] = u.useState(null), p = ie(t, (N) => d(N)), m = Fr(n), v = u.useRef(!1), g = u.useRef(!0), { viewport: h, selectedItem: b, selectedItemText: w, focusSelectedItem: x } = a, y = u.useCallback(() => {
|
|
9948
9951
|
if (s.trigger && s.valueNode && i && f && h && b && w) {
|
|
9949
|
-
const N = s.trigger.getBoundingClientRect(),
|
|
9952
|
+
const N = s.trigger.getBoundingClientRect(), k = f.getBoundingClientRect(), L = s.valueNode.getBoundingClientRect(), P = w.getBoundingClientRect();
|
|
9950
9953
|
if (s.dir !== "rtl") {
|
|
9951
|
-
const Z = P.left -
|
|
9954
|
+
const Z = P.left - k.left, J = L.left - Z, pe = N.left - J, Se = N.width + pe, X = Math.max(Se, k.width), Y = window.innerWidth - Ue, he = No(J, [
|
|
9952
9955
|
Ue,
|
|
9953
9956
|
// Prevents the content from going off the starting edge of the
|
|
9954
9957
|
// viewport. It may still go off the ending edge, but this can be
|
|
@@ -9959,13 +9962,13 @@ var kw = "SelectItemAlignedPosition", Cu = u.forwardRef((e, t) => {
|
|
|
9959
9962
|
]);
|
|
9960
9963
|
i.style.minWidth = Se + "px", i.style.left = he + "px";
|
|
9961
9964
|
} else {
|
|
9962
|
-
const Z =
|
|
9965
|
+
const Z = k.right - P.right, J = window.innerWidth - L.right - Z, pe = window.innerWidth - N.right - J, Se = N.width + pe, X = Math.max(Se, k.width), Y = window.innerWidth - Ue, he = No(J, [
|
|
9963
9966
|
Ue,
|
|
9964
9967
|
Math.max(Ue, Y - X)
|
|
9965
9968
|
]);
|
|
9966
9969
|
i.style.minWidth = Se + "px", i.style.right = he + "px";
|
|
9967
9970
|
}
|
|
9968
|
-
const $ = m(), K = window.innerHeight - Ue * 2, B = h.scrollHeight,
|
|
9971
|
+
const $ = m(), K = window.innerHeight - Ue * 2, B = h.scrollHeight, M = window.getComputedStyle(f), H = parseInt(M.borderTopWidth, 10), O = parseInt(M.paddingTop, 10), G = parseInt(M.borderBottomWidth, 10), D = parseInt(M.paddingBottom, 10), T = H + O + B + D + G, ee = Math.min(b.offsetHeight * 5, T), q = window.getComputedStyle(h), ae = parseInt(q.paddingTop, 10), F = parseInt(q.paddingBottom, 10), j = N.top + N.height / 2 - Ue, ce = K - j, fe = b.offsetHeight / 2, z = b.offsetTop + fe, W = H + O + z, oe = T - W;
|
|
9969
9972
|
if (W <= j) {
|
|
9970
9973
|
const Z = $.length > 0 && b === $[$.length - 1].ref.current;
|
|
9971
9974
|
i.style.bottom = "0px";
|
|
@@ -9985,7 +9988,7 @@ var kw = "SelectItemAlignedPosition", Cu = u.forwardRef((e, t) => {
|
|
|
9985
9988
|
) + oe;
|
|
9986
9989
|
i.style.height = pe + "px", h.scrollTop = W - j + h.offsetTop;
|
|
9987
9990
|
}
|
|
9988
|
-
i.style.margin = `${Ue}px 0`, i.style.minHeight =
|
|
9991
|
+
i.style.margin = `${Ue}px 0`, i.style.minHeight = ee + "px", i.style.maxHeight = K + "px", r == null || r(), requestAnimationFrame(() => v.current = !0);
|
|
9989
9992
|
}
|
|
9990
9993
|
}, [
|
|
9991
9994
|
m,
|
|
@@ -10047,7 +10050,7 @@ var kw = "SelectItemAlignedPosition", Cu = u.forwardRef((e, t) => {
|
|
|
10047
10050
|
}
|
|
10048
10051
|
);
|
|
10049
10052
|
});
|
|
10050
|
-
Cu.displayName =
|
|
10053
|
+
Cu.displayName = Mw;
|
|
10051
10054
|
var Dw = "SelectPopperPosition", Po = u.forwardRef((e, t) => {
|
|
10052
10055
|
const {
|
|
10053
10056
|
__scopeSelect: n,
|
|
@@ -10256,7 +10259,7 @@ var _u = "SelectItemIndicator", Ou = u.forwardRef(
|
|
|
10256
10259
|
}
|
|
10257
10260
|
);
|
|
10258
10261
|
Ou.displayName = _u;
|
|
10259
|
-
var _o = "SelectScrollUpButton",
|
|
10262
|
+
var _o = "SelectScrollUpButton", ku = u.forwardRef((e, t) => {
|
|
10260
10263
|
const n = pt(_o, e.__scopeSelect), r = Ss(_o, e.__scopeSelect), [o, s] = u.useState(!1), a = ie(t, r.onScrollButtonChange);
|
|
10261
10264
|
return ve(() => {
|
|
10262
10265
|
if (n.viewport && n.isPositioned) {
|
|
@@ -10279,8 +10282,8 @@ var _o = "SelectScrollUpButton", Mu = u.forwardRef((e, t) => {
|
|
|
10279
10282
|
}
|
|
10280
10283
|
) : null;
|
|
10281
10284
|
});
|
|
10282
|
-
|
|
10283
|
-
var Oo = "SelectScrollDownButton",
|
|
10285
|
+
ku.displayName = _o;
|
|
10286
|
+
var Oo = "SelectScrollDownButton", Mu = u.forwardRef((e, t) => {
|
|
10284
10287
|
const n = pt(Oo, e.__scopeSelect), r = Ss(Oo, e.__scopeSelect), [o, s] = u.useState(!1), a = ie(t, r.onScrollButtonChange);
|
|
10285
10288
|
return ve(() => {
|
|
10286
10289
|
if (n.viewport && n.isPositioned) {
|
|
@@ -10303,7 +10306,7 @@ var Oo = "SelectScrollDownButton", ku = u.forwardRef((e, t) => {
|
|
|
10303
10306
|
}
|
|
10304
10307
|
) : null;
|
|
10305
10308
|
});
|
|
10306
|
-
|
|
10309
|
+
Mu.displayName = Oo;
|
|
10307
10310
|
var Du = u.forwardRef((e, t) => {
|
|
10308
10311
|
const { __scopeSelect: n, onAutoScroll: r, ...o } = e, s = pt("SelectScrollButton", n), a = u.useRef(null), i = Fr(n), l = u.useCallback(() => {
|
|
10309
10312
|
a.current !== null && (window.clearInterval(a.current), a.current = null);
|
|
@@ -10338,13 +10341,13 @@ var Du = u.forwardRef((e, t) => {
|
|
|
10338
10341
|
}
|
|
10339
10342
|
);
|
|
10340
10343
|
Lu.displayName = Hw;
|
|
10341
|
-
var
|
|
10344
|
+
var ko = "SelectArrow", zw = u.forwardRef(
|
|
10342
10345
|
(e, t) => {
|
|
10343
|
-
const { __scopeSelect: n, ...r } = e, o = $r(n), s = ft(
|
|
10346
|
+
const { __scopeSelect: n, ...r } = e, o = $r(n), s = ft(ko, n), a = pt(ko, n);
|
|
10344
10347
|
return s.open && a.position === "popper" ? /* @__PURE__ */ c(rs, { ...o, ...r, ref: t }) : null;
|
|
10345
10348
|
}
|
|
10346
10349
|
);
|
|
10347
|
-
zw.displayName =
|
|
10350
|
+
zw.displayName = ko;
|
|
10348
10351
|
var Ww = "SelectBubbleInput", Fu = u.forwardRef(
|
|
10349
10352
|
({ __scopeSelect: e, value: t, ...n }, r) => {
|
|
10350
10353
|
const o = u.useRef(null), s = ie(r, o), a = au(t);
|
|
@@ -10363,7 +10366,7 @@ var Ww = "SelectBubbleInput", Fu = u.forwardRef(
|
|
|
10363
10366
|
te.select,
|
|
10364
10367
|
{
|
|
10365
10368
|
...n,
|
|
10366
|
-
style: { ...
|
|
10369
|
+
style: { ...Ml, ...n.style },
|
|
10367
10370
|
ref: s,
|
|
10368
10371
|
defaultValue: t
|
|
10369
10372
|
}
|
|
@@ -10400,8 +10403,8 @@ function Uu(e, t, n) {
|
|
|
10400
10403
|
function Vw(e, t) {
|
|
10401
10404
|
return e.map((n, r) => e[(t + r) % e.length]);
|
|
10402
10405
|
}
|
|
10403
|
-
var jw = pu, Hu = mu, Kw = bu, Gw = vu, qw = wu, zu = yu, Xw = Eu, Wu = Tu, Vu = Pu, Yw = Iu, Jw = Ou, ju =
|
|
10404
|
-
const Na = jw, Ra = Kw,
|
|
10406
|
+
var jw = pu, Hu = mu, Kw = bu, Gw = vu, qw = wu, zu = yu, Xw = Eu, Wu = Tu, Vu = Pu, Yw = Iu, Jw = Ou, ju = ku, Ku = Mu, Gu = Lu;
|
|
10407
|
+
const Na = jw, Ra = Kw, Mo = u.forwardRef(({ className: e, children: t, ...n }, r) => /* @__PURE__ */ E(
|
|
10405
10408
|
Hu,
|
|
10406
10409
|
{
|
|
10407
10410
|
ref: r,
|
|
@@ -10416,7 +10419,7 @@ const Na = jw, Ra = Kw, ko = u.forwardRef(({ className: e, children: t, ...n },
|
|
|
10416
10419
|
]
|
|
10417
10420
|
}
|
|
10418
10421
|
));
|
|
10419
|
-
|
|
10422
|
+
Mo.displayName = Hu.displayName;
|
|
10420
10423
|
const qu = u.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ c(
|
|
10421
10424
|
ju,
|
|
10422
10425
|
{
|
|
@@ -10712,7 +10715,7 @@ function Zy({ settings: e, onSettingsChange: t, className: n = "" }) {
|
|
|
10712
10715
|
/* @__PURE__ */ E(ys, { className: "w-[500px] sm:w-[600px] overflow-y-auto", children: [
|
|
10713
10716
|
/* @__PURE__ */ E(_l, { children: [
|
|
10714
10717
|
/* @__PURE__ */ c(Ol, { children: "Chat Settings" }),
|
|
10715
|
-
/* @__PURE__ */ c(
|
|
10718
|
+
/* @__PURE__ */ c(kl, { children: "Configure your chat interface, API connection, and behavior preferences." })
|
|
10716
10719
|
] }),
|
|
10717
10720
|
/* @__PURE__ */ E("div", { className: "space-y-6 py-6", children: [
|
|
10718
10721
|
/* @__PURE__ */ E(jn, { children: [
|
|
@@ -10722,7 +10725,7 @@ function Zy({ settings: e, onSettingsChange: t, className: n = "" }) {
|
|
|
10722
10725
|
] }) }),
|
|
10723
10726
|
/* @__PURE__ */ E(qn, { className: "space-y-4", children: [
|
|
10724
10727
|
/* @__PURE__ */ E("div", { className: "space-y-2", children: [
|
|
10725
|
-
/* @__PURE__ */ c(
|
|
10728
|
+
/* @__PURE__ */ c(Me, { htmlFor: "api-url", children: "API Base URL" }),
|
|
10726
10729
|
/* @__PURE__ */ E("div", { className: "flex gap-2", children: [
|
|
10727
10730
|
/* @__PURE__ */ c(
|
|
10728
10731
|
ln,
|
|
@@ -10740,7 +10743,7 @@ function Zy({ settings: e, onSettingsChange: t, className: n = "" }) {
|
|
|
10740
10743
|
] })
|
|
10741
10744
|
] }),
|
|
10742
10745
|
/* @__PURE__ */ E("div", { className: "flex items-center justify-between", children: [
|
|
10743
|
-
/* @__PURE__ */ c(
|
|
10746
|
+
/* @__PURE__ */ c(Me, { htmlFor: "enable-auth", children: "Enable Authentication" }),
|
|
10744
10747
|
/* @__PURE__ */ c(
|
|
10745
10748
|
it,
|
|
10746
10749
|
{
|
|
@@ -10754,7 +10757,7 @@ function Zy({ settings: e, onSettingsChange: t, className: n = "" }) {
|
|
|
10754
10757
|
)
|
|
10755
10758
|
] }),
|
|
10756
10759
|
i.api.enableAuth && /* @__PURE__ */ E("div", { className: "space-y-2", children: [
|
|
10757
|
-
/* @__PURE__ */ c(
|
|
10760
|
+
/* @__PURE__ */ c(Me, { htmlFor: "auth-token", children: "Authentication Token" }),
|
|
10758
10761
|
/* @__PURE__ */ E("div", { className: "flex gap-2", children: [
|
|
10759
10762
|
/* @__PURE__ */ c(
|
|
10760
10763
|
ln,
|
|
@@ -10789,7 +10792,7 @@ function Zy({ settings: e, onSettingsChange: t, className: n = "" }) {
|
|
|
10789
10792
|
] }) }),
|
|
10790
10793
|
/* @__PURE__ */ E(qn, { className: "space-y-4", children: [
|
|
10791
10794
|
/* @__PURE__ */ E("div", { className: "space-y-2", children: [
|
|
10792
|
-
/* @__PURE__ */ c(
|
|
10795
|
+
/* @__PURE__ */ c(Me, { htmlFor: "layout", children: "Layout Style" }),
|
|
10793
10796
|
/* @__PURE__ */ E(
|
|
10794
10797
|
Na,
|
|
10795
10798
|
{
|
|
@@ -10799,7 +10802,7 @@ function Zy({ settings: e, onSettingsChange: t, className: n = "" }) {
|
|
|
10799
10802
|
ui: { ...w.ui, layout: b }
|
|
10800
10803
|
})),
|
|
10801
10804
|
children: [
|
|
10802
|
-
/* @__PURE__ */ c(
|
|
10805
|
+
/* @__PURE__ */ c(Mo, { children: /* @__PURE__ */ c(Ra, {}) }),
|
|
10803
10806
|
/* @__PURE__ */ E(Do, { children: [
|
|
10804
10807
|
/* @__PURE__ */ c(mt, { value: "sidebar", children: "Sidebar Layout" }),
|
|
10805
10808
|
/* @__PURE__ */ c(mt, { value: "fullscreen", children: "Fullscreen" }),
|
|
@@ -10810,7 +10813,7 @@ function Zy({ settings: e, onSettingsChange: t, className: n = "" }) {
|
|
|
10810
10813
|
)
|
|
10811
10814
|
] }),
|
|
10812
10815
|
/* @__PURE__ */ E("div", { className: "space-y-2", children: [
|
|
10813
|
-
/* @__PURE__ */ c(
|
|
10816
|
+
/* @__PURE__ */ c(Me, { htmlFor: "theme", children: "Theme" }),
|
|
10814
10817
|
/* @__PURE__ */ E(
|
|
10815
10818
|
Na,
|
|
10816
10819
|
{
|
|
@@ -10820,7 +10823,7 @@ function Zy({ settings: e, onSettingsChange: t, className: n = "" }) {
|
|
|
10820
10823
|
ui: { ...w.ui, theme: b }
|
|
10821
10824
|
})),
|
|
10822
10825
|
children: [
|
|
10823
|
-
/* @__PURE__ */ c(
|
|
10826
|
+
/* @__PURE__ */ c(Mo, { children: /* @__PURE__ */ c(Ra, {}) }),
|
|
10824
10827
|
/* @__PURE__ */ E(Do, { children: [
|
|
10825
10828
|
/* @__PURE__ */ c(mt, { value: "light", children: "Light" }),
|
|
10826
10829
|
/* @__PURE__ */ c(mt, { value: "dark", children: "Dark" }),
|
|
@@ -10833,7 +10836,7 @@ function Zy({ settings: e, onSettingsChange: t, className: n = "" }) {
|
|
|
10833
10836
|
/* @__PURE__ */ c(gs, {}),
|
|
10834
10837
|
/* @__PURE__ */ E("div", { className: "space-y-3", children: [
|
|
10835
10838
|
/* @__PURE__ */ E("div", { className: "flex items-center justify-between", children: [
|
|
10836
|
-
/* @__PURE__ */ c(
|
|
10839
|
+
/* @__PURE__ */ c(Me, { htmlFor: "show-timestamps", children: "Show Timestamps" }),
|
|
10837
10840
|
/* @__PURE__ */ c(
|
|
10838
10841
|
it,
|
|
10839
10842
|
{
|
|
@@ -10847,7 +10850,7 @@ function Zy({ settings: e, onSettingsChange: t, className: n = "" }) {
|
|
|
10847
10850
|
)
|
|
10848
10851
|
] }),
|
|
10849
10852
|
/* @__PURE__ */ E("div", { className: "flex items-center justify-between", children: [
|
|
10850
|
-
/* @__PURE__ */ c(
|
|
10853
|
+
/* @__PURE__ */ c(Me, { htmlFor: "show-agent-names", children: "Show Agent Names" }),
|
|
10851
10854
|
/* @__PURE__ */ c(
|
|
10852
10855
|
it,
|
|
10853
10856
|
{
|
|
@@ -10861,7 +10864,7 @@ function Zy({ settings: e, onSettingsChange: t, className: n = "" }) {
|
|
|
10861
10864
|
)
|
|
10862
10865
|
] }),
|
|
10863
10866
|
/* @__PURE__ */ E("div", { className: "flex items-center justify-between", children: [
|
|
10864
|
-
/* @__PURE__ */ c(
|
|
10867
|
+
/* @__PURE__ */ c(Me, { htmlFor: "compact-messages", children: "Compact Messages" }),
|
|
10865
10868
|
/* @__PURE__ */ c(
|
|
10866
10869
|
it,
|
|
10867
10870
|
{
|
|
@@ -10885,7 +10888,7 @@ function Zy({ settings: e, onSettingsChange: t, className: n = "" }) {
|
|
|
10885
10888
|
/* @__PURE__ */ E(qn, { className: "space-y-4", children: [
|
|
10886
10889
|
/* @__PURE__ */ E("div", { className: "flex items-center justify-between", children: [
|
|
10887
10890
|
/* @__PURE__ */ E("div", { children: [
|
|
10888
|
-
/* @__PURE__ */ c(
|
|
10891
|
+
/* @__PURE__ */ c(Me, { htmlFor: "auto-save", children: "Auto-save Conversations" }),
|
|
10889
10892
|
/* @__PURE__ */ c("p", { className: "text-sm text-muted-foreground", children: "Automatically save messages to threads" })
|
|
10890
10893
|
] }),
|
|
10891
10894
|
/* @__PURE__ */ c(
|
|
@@ -10902,7 +10905,7 @@ function Zy({ settings: e, onSettingsChange: t, className: n = "" }) {
|
|
|
10902
10905
|
] }),
|
|
10903
10906
|
/* @__PURE__ */ E("div", { className: "flex items-center justify-between", children: [
|
|
10904
10907
|
/* @__PURE__ */ E("div", { children: [
|
|
10905
|
-
/* @__PURE__ */ c(
|
|
10908
|
+
/* @__PURE__ */ c(Me, { htmlFor: "enable-streaming", children: "Enable Streaming" }),
|
|
10906
10909
|
/* @__PURE__ */ c("p", { className: "text-sm text-muted-foreground", children: "Stream responses in real-time" })
|
|
10907
10910
|
] }),
|
|
10908
10911
|
/* @__PURE__ */ c(
|
|
@@ -10919,7 +10922,7 @@ function Zy({ settings: e, onSettingsChange: t, className: n = "" }) {
|
|
|
10919
10922
|
] }),
|
|
10920
10923
|
/* @__PURE__ */ E("div", { className: "flex items-center justify-between", children: [
|
|
10921
10924
|
/* @__PURE__ */ E("div", { children: [
|
|
10922
|
-
/* @__PURE__ */ c(
|
|
10925
|
+
/* @__PURE__ */ c(Me, { htmlFor: "typing-indicator", children: "Typing Indicator" }),
|
|
10923
10926
|
/* @__PURE__ */ c("p", { className: "text-sm text-muted-foreground", children: "Show typing indicator during responses" })
|
|
10924
10927
|
] }),
|
|
10925
10928
|
/* @__PURE__ */ c(
|
|
@@ -11037,7 +11040,7 @@ export {
|
|
|
11037
11040
|
Hy as ChatRoutingProvider,
|
|
11038
11041
|
Zy as ChatSettings,
|
|
11039
11042
|
In as MarkdownContent,
|
|
11040
|
-
|
|
11043
|
+
Mp as MessageComponent,
|
|
11041
11044
|
Ro as ThreadManager,
|
|
11042
11045
|
yt as apiClient,
|
|
11043
11046
|
Vy as applySettings,
|