teodor-new-chat-ui 3.0.186 → 3.0.188
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 +265 -261
- package/dist/index.umd.js +12 -12
- package/package.json +1 -1
package/dist/index.esm.js
CHANGED
|
@@ -2,7 +2,7 @@ var vp = Object.defineProperty;
|
|
|
2
2
|
var wp = (e, t, n) => t in e ? vp(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n;
|
|
3
3
|
var Oa = (e, t, n) => wp(e, typeof t != "symbol" ? t + "" : t, n);
|
|
4
4
|
import * as p from "react";
|
|
5
|
-
import B, { useState as me, useRef as rt, useCallback as Ye, useEffect as ct, useReducer as bp, useMemo as
|
|
5
|
+
import B, { useState as me, useRef as rt, useCallback as Ye, useEffect as ct, useReducer as bp, useMemo as Yt, createContext as yp, useContext as Sp, createElement as co, useLayoutEffect as Cp } from "react";
|
|
6
6
|
import { Square as Tp, Send as Rp, X as rr, ExternalLink as kp, Download as Ep, Image as Ip, FileText as Ma, Loader as gc, Bot as Da, Wrench as Np, User as Ap, Paperclip as ni, ChevronUp as kr, ChevronDown as nr, Copy as La, Edit as $a, RotateCcw as ri, ChevronRight as _p, Check as Mi, Circle as jp, Edit3 as xc, Loader2 as Pp, Plus as Op, FileSpreadsheet as Mp, MessageSquarePlus as Dp, MessageSquare as Lp, Calendar as $p, Trash2 as Fp, Settings as zp, Server as Bp, EyeOff as Hp, Eye as Up, Layout as Wp, MessageCircle as Vp, Save as Kp } from "lucide-react";
|
|
7
7
|
import { Slot as qp, createSlot as lr } from "@radix-ui/react-slot";
|
|
8
8
|
import { cva as qo } from "class-variance-authority";
|
|
@@ -274,9 +274,9 @@ function Jp() {
|
|
|
274
274
|
if (ot !== 1 || lt !== 1)
|
|
275
275
|
do
|
|
276
276
|
if (ot--, lt--, lt < 0 || Oe[ot] !== St[lt]) {
|
|
277
|
-
var
|
|
277
|
+
var Ft = `
|
|
278
278
|
` + Oe[ot].replace(" at new ", " at ");
|
|
279
|
-
return T.displayName &&
|
|
279
|
+
return T.displayName && Ft.includes("<anonymous>") && (Ft = Ft.replace("<anonymous>", T.displayName)), typeof T == "function" && Q.set(T, Ft), Ft;
|
|
280
280
|
}
|
|
281
281
|
while (ot >= 1 && lt >= 0);
|
|
282
282
|
break;
|
|
@@ -400,7 +400,7 @@ function Jp() {
|
|
|
400
400
|
function at(T, U) {
|
|
401
401
|
typeof T.ref == "string" && Ue.current;
|
|
402
402
|
}
|
|
403
|
-
function
|
|
403
|
+
function Lt(T, U) {
|
|
404
404
|
{
|
|
405
405
|
var ne = function() {
|
|
406
406
|
Y || (Y = !0, w("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)", U));
|
|
@@ -464,7 +464,7 @@ function Jp() {
|
|
|
464
464
|
}
|
|
465
465
|
if (Oe || St) {
|
|
466
466
|
var lt = typeof T == "function" ? T.displayName || T.name || "Unknown" : T;
|
|
467
|
-
Oe &&
|
|
467
|
+
Oe && Lt(ze, lt), St && _n(ze, lt);
|
|
468
468
|
}
|
|
469
469
|
return xt(T, Oe, St, Ve, Se, Ue.current, ze);
|
|
470
470
|
}
|
|
@@ -494,10 +494,10 @@ Check the render method of \`` + T + "`.";
|
|
|
494
494
|
return "";
|
|
495
495
|
}
|
|
496
496
|
}
|
|
497
|
-
function
|
|
497
|
+
function $t(T) {
|
|
498
498
|
return "";
|
|
499
499
|
}
|
|
500
|
-
var
|
|
500
|
+
var _t = {};
|
|
501
501
|
function wr(T) {
|
|
502
502
|
{
|
|
503
503
|
var U = Fe();
|
|
@@ -516,9 +516,9 @@ Check the top-level render call using <` + ne + ">.");
|
|
|
516
516
|
return;
|
|
517
517
|
T._store.validated = !0;
|
|
518
518
|
var ne = wr(U);
|
|
519
|
-
if (
|
|
519
|
+
if (_t[ne])
|
|
520
520
|
return;
|
|
521
|
-
|
|
521
|
+
_t[ne] = !0;
|
|
522
522
|
var Se = "";
|
|
523
523
|
T && T._owner && T._owner !== ht.current && (Se = " It was passed a child from " + V(T._owner.type) + "."), te(T), w('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.', ne, Se), te(null);
|
|
524
524
|
}
|
|
@@ -586,7 +586,7 @@ Check the top-level render call using <` + ne + ">.");
|
|
|
586
586
|
if (!ze) {
|
|
587
587
|
var Oe = "";
|
|
588
588
|
(T === void 0 || typeof T == "object" && T !== null && Object.keys(T).length === 0) && (Oe += " You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.");
|
|
589
|
-
var St =
|
|
589
|
+
var St = $t();
|
|
590
590
|
St ? Oe += St : Oe += Fe();
|
|
591
591
|
var ot;
|
|
592
592
|
T === null ? ot = "null" : ce(T) ? ot = "array" : T !== void 0 && T.$$typeof === t ? (ot = "<" + (V(T.type) || "Unknown") + " />", Oe = " Did you accidentally export a JSX literal instead of a component?") : ot = typeof T, w("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s", ot, Oe);
|
|
@@ -595,17 +595,17 @@ Check the top-level render call using <` + ne + ">.");
|
|
|
595
595
|
if (lt == null)
|
|
596
596
|
return lt;
|
|
597
597
|
if (ze) {
|
|
598
|
-
var
|
|
599
|
-
if (
|
|
598
|
+
var Ft = U.children;
|
|
599
|
+
if (Ft !== void 0)
|
|
600
600
|
if (Se)
|
|
601
|
-
if (ce(
|
|
602
|
-
for (var Zn = 0; Zn <
|
|
603
|
-
yr(
|
|
604
|
-
Object.freeze && Object.freeze(
|
|
601
|
+
if (ce(Ft)) {
|
|
602
|
+
for (var Zn = 0; Zn < Ft.length; Zn++)
|
|
603
|
+
yr(Ft[Zn], T);
|
|
604
|
+
Object.freeze && Object.freeze(Ft);
|
|
605
605
|
} else
|
|
606
606
|
w("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");
|
|
607
607
|
else
|
|
608
|
-
yr(
|
|
608
|
+
yr(Ft, T);
|
|
609
609
|
}
|
|
610
610
|
if (ke.call(U, "key")) {
|
|
611
611
|
var jn = V(T), kt = Object.keys(U).filter(function(xp) {
|
|
@@ -644,11 +644,11 @@ function wc(e, t) {
|
|
|
644
644
|
const { toString: Zp } = Object.prototype, { getPrototypeOf: Di } = Object, { iterator: Yo, toStringTag: bc } = Symbol, Xo = /* @__PURE__ */ ((e) => (t) => {
|
|
645
645
|
const n = Zp.call(t);
|
|
646
646
|
return e[n] || (e[n] = n.slice(8, -1).toLowerCase());
|
|
647
|
-
})(/* @__PURE__ */ Object.create(null)),
|
|
647
|
+
})(/* @__PURE__ */ Object.create(null)), en = (e) => (e = e.toLowerCase(), (t) => Xo(t) === e), Jo = (e) => (t) => typeof t === e, { isArray: fr } = Array, cr = Jo("undefined");
|
|
648
648
|
function Hr(e) {
|
|
649
649
|
return e !== null && !cr(e) && e.constructor !== null && !cr(e.constructor) && Et(e.constructor.isBuffer) && e.constructor.isBuffer(e);
|
|
650
650
|
}
|
|
651
|
-
const yc =
|
|
651
|
+
const yc = en("ArrayBuffer");
|
|
652
652
|
function Qp(e) {
|
|
653
653
|
let t;
|
|
654
654
|
return typeof ArrayBuffer < "u" && ArrayBuffer.isView ? t = ArrayBuffer.isView(e) : t = e && e.buffer && yc(e.buffer), t;
|
|
@@ -666,11 +666,11 @@ const em = Jo("string"), Et = Jo("function"), Sc = Jo("number"), Ur = (e) => e !
|
|
|
666
666
|
} catch {
|
|
667
667
|
return !1;
|
|
668
668
|
}
|
|
669
|
-
}, rm =
|
|
669
|
+
}, rm = en("Date"), om = en("File"), sm = en("Blob"), im = en("FileList"), am = (e) => Ur(e) && Et(e.pipe), lm = (e) => {
|
|
670
670
|
let t;
|
|
671
671
|
return e && (typeof FormData == "function" && e instanceof FormData || Et(e.append) && ((t = Xo(e)) === "formdata" || // detect form-data instance
|
|
672
672
|
t === "object" && Et(e.toString) && e.toString() === "[object FormData]"));
|
|
673
|
-
}, cm =
|
|
673
|
+
}, cm = en("URLSearchParams"), [um, dm, fm, hm] = ["ReadableStream", "Request", "Response", "Headers"].map(en), pm = (e) => e.trim ? e.trim() : e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g, "");
|
|
674
674
|
function Wr(e, t, { allOwnKeys: n = !1 } = {}) {
|
|
675
675
|
if (e === null || typeof e > "u")
|
|
676
676
|
return;
|
|
@@ -750,12 +750,12 @@ const mm = (e, t, n, { allOwnKeys: r } = {}) => (Wr(t, (o, s) => {
|
|
|
750
750
|
for (; (n = e.exec(t)) !== null; )
|
|
751
751
|
r.push(n);
|
|
752
752
|
return r;
|
|
753
|
-
}, Tm =
|
|
753
|
+
}, Tm = en("HTMLFormElement"), Rm = (e) => e.toLowerCase().replace(
|
|
754
754
|
/[-_\s]([a-z\d])(\w*)/g,
|
|
755
755
|
function(n, r, o) {
|
|
756
756
|
return r.toUpperCase() + o;
|
|
757
757
|
}
|
|
758
|
-
), Ba = (({ hasOwnProperty: e }) => (t, n) => e.call(t, n))(Object.prototype), km =
|
|
758
|
+
), Ba = (({ hasOwnProperty: e }) => (t, n) => e.call(t, n))(Object.prototype), km = en("RegExp"), Rc = (e, t) => {
|
|
759
759
|
const n = Object.getOwnPropertyDescriptors(e), r = {};
|
|
760
760
|
Wr(n, (o, s) => {
|
|
761
761
|
let i;
|
|
@@ -807,7 +807,7 @@ const jm = (e) => {
|
|
|
807
807
|
return r;
|
|
808
808
|
};
|
|
809
809
|
return n(e, 0);
|
|
810
|
-
}, Pm =
|
|
810
|
+
}, Pm = en("AsyncFunction"), Om = (e) => e && (Ur(e) || Et(e)) && Et(e.then) && Et(e.catch), kc = ((e, t) => e ? setImmediate : t ? ((n, r) => (Mn.addEventListener("message", ({ source: o, data: s }) => {
|
|
811
811
|
o === Mn && s === n && r.length && r.shift()();
|
|
812
812
|
}, !1), (o) => {
|
|
813
813
|
r.push(o), Mn.postMessage(n, "*");
|
|
@@ -848,7 +848,7 @@ const jm = (e) => {
|
|
|
848
848
|
inherits: xm,
|
|
849
849
|
toFlatObject: vm,
|
|
850
850
|
kindOf: Xo,
|
|
851
|
-
kindOfTest:
|
|
851
|
+
kindOfTest: en,
|
|
852
852
|
endsWith: wm,
|
|
853
853
|
toArray: bm,
|
|
854
854
|
forEachEntry: Sm,
|
|
@@ -2398,41 +2398,41 @@ function sl(e) {
|
|
|
2398
2398
|
function Eg(e) {
|
|
2399
2399
|
return ui.add(e), () => ui.delete(e);
|
|
2400
2400
|
}
|
|
2401
|
-
const
|
|
2401
|
+
const Kt = it.create({
|
|
2402
2402
|
// Only set baseURL when configured — do NOT fall back to localhost. Falling back causes
|
|
2403
2403
|
// noisy network requests to the frontend Dev server when the backend isn't configured.
|
|
2404
2404
|
...ol ? { baseURL: ol } : {},
|
|
2405
2405
|
timeout: 3e4,
|
|
2406
2406
|
withCredentials: !0
|
|
2407
2407
|
});
|
|
2408
|
-
|
|
2409
|
-
|
|
2408
|
+
Kt.interceptors.request.use((e) => (No && (e.headers.Authorization = `Bearer ${No}`), e));
|
|
2409
|
+
Kt.interceptors.response.use(
|
|
2410
2410
|
(e) => e,
|
|
2411
2411
|
(e) => Promise.reject(e)
|
|
2412
2412
|
);
|
|
2413
|
-
async function
|
|
2414
|
-
return
|
|
2413
|
+
async function Ht(e, t) {
|
|
2414
|
+
return Kt.defaults.baseURL ? (await Kt.get(e, t)).data : Promise.reject(new Error("API base URL is not configured"));
|
|
2415
2415
|
}
|
|
2416
2416
|
async function Ig(e, t, n) {
|
|
2417
|
-
return
|
|
2417
|
+
return Kt.defaults.baseURL ? (await Kt.post(e, t, n)).data : Promise.reject(new Error("API base URL is not configured"));
|
|
2418
2418
|
}
|
|
2419
2419
|
async function Ng(e, t, n) {
|
|
2420
|
-
return
|
|
2420
|
+
return Kt.defaults.baseURL ? (await Kt.put(e, t, n)).data : Promise.reject(new Error("API base URL is not configured"));
|
|
2421
2421
|
}
|
|
2422
2422
|
async function Ag(e, t) {
|
|
2423
|
-
return
|
|
2423
|
+
return Kt.defaults.baseURL ? (await Kt.delete(e, t)).data : Promise.reject(new Error("API base URL is not configured"));
|
|
2424
2424
|
}
|
|
2425
|
-
function
|
|
2425
|
+
function zt(e) {
|
|
2426
2426
|
return e && typeof e == "object" && "data" in e ? e.data : e;
|
|
2427
2427
|
}
|
|
2428
2428
|
class _g {
|
|
2429
2429
|
// ---- Configuration ----
|
|
2430
2430
|
get baseUrl() {
|
|
2431
|
-
const t =
|
|
2431
|
+
const t = Kt.defaults.baseURL || "";
|
|
2432
2432
|
return String(t).replace(/\/+$|^\s+|\s+$/g, "");
|
|
2433
2433
|
}
|
|
2434
2434
|
updateConfig(t) {
|
|
2435
|
-
t.baseUrl && (
|
|
2435
|
+
t.baseUrl && (Kt.defaults.baseURL = String(t.baseUrl).replace(/\/+$/g, "")), t.authToken !== void 0 && sl(t.authToken);
|
|
2436
2436
|
}
|
|
2437
2437
|
// ---- Token Management ----
|
|
2438
2438
|
getAuthToken() {
|
|
@@ -2446,41 +2446,41 @@ class _g {
|
|
|
2446
2446
|
}
|
|
2447
2447
|
// ---- Thread Management ----
|
|
2448
2448
|
async listThreads() {
|
|
2449
|
-
const t = await
|
|
2449
|
+
const t = await Ht("/chat/threads"), n = zt(t);
|
|
2450
2450
|
return (n == null ? void 0 : n.items) ?? (t == null ? void 0 : t.items) ?? [];
|
|
2451
2451
|
}
|
|
2452
2452
|
async createThread(t) {
|
|
2453
2453
|
const r = await Ig("/chat/threads", t ? { title: t } : void 0);
|
|
2454
|
-
return
|
|
2454
|
+
return zt(r);
|
|
2455
2455
|
}
|
|
2456
2456
|
async updateThread(t, n) {
|
|
2457
2457
|
const r = await Ng(`/chat/threads/${t}`, { title: n });
|
|
2458
|
-
return
|
|
2458
|
+
return zt(r);
|
|
2459
2459
|
}
|
|
2460
2460
|
async deleteThread(t) {
|
|
2461
2461
|
const n = await Ag(`/chat/threads/${t}`);
|
|
2462
|
-
return
|
|
2462
|
+
return zt(n);
|
|
2463
2463
|
}
|
|
2464
2464
|
async threadInfo(t) {
|
|
2465
|
-
const n = await
|
|
2466
|
-
return
|
|
2465
|
+
const n = await Ht(`/chat/threads/${t}/info`);
|
|
2466
|
+
return zt(n);
|
|
2467
2467
|
}
|
|
2468
2468
|
// ---- Agents ----
|
|
2469
2469
|
async listAgents() {
|
|
2470
|
-
const t = await
|
|
2470
|
+
const t = await Ht("/chat/agents"), n = zt(t);
|
|
2471
2471
|
return (n == null ? void 0 : n.items) ?? [];
|
|
2472
2472
|
}
|
|
2473
2473
|
async getAgent(t) {
|
|
2474
|
-
const n = await
|
|
2475
|
-
return
|
|
2474
|
+
const n = await Ht(`/chat/agents/${t}`);
|
|
2475
|
+
return zt(n);
|
|
2476
2476
|
}
|
|
2477
2477
|
async getAgentSchema(t) {
|
|
2478
|
-
const n = await
|
|
2479
|
-
return
|
|
2478
|
+
const n = await Ht(`/chat/agents/${t}/schema`);
|
|
2479
|
+
return zt(n);
|
|
2480
2480
|
}
|
|
2481
2481
|
// ---- Messages & State ----
|
|
2482
2482
|
async getMessages(t) {
|
|
2483
|
-
const n = await
|
|
2483
|
+
const n = await Ht(`/chat/threads/${t.threadId}/messages`, {
|
|
2484
2484
|
params: {
|
|
2485
2485
|
thread_id: t.threadId,
|
|
2486
2486
|
checkpoint_id: t.checkpointId,
|
|
@@ -2489,34 +2489,34 @@ class _g {
|
|
|
2489
2489
|
before_id: t.beforeId ?? void 0
|
|
2490
2490
|
}
|
|
2491
2491
|
});
|
|
2492
|
-
return
|
|
2492
|
+
return zt(n);
|
|
2493
2493
|
}
|
|
2494
2494
|
async getState(t) {
|
|
2495
|
-
const n = await
|
|
2495
|
+
const n = await Ht(`/chat/threads/${t.threadId}/state`, {
|
|
2496
2496
|
params: {
|
|
2497
2497
|
thread_id: t.threadId,
|
|
2498
2498
|
checkpoint_id: t.checkpointId,
|
|
2499
2499
|
checkpoint_ns: t.checkpointNs
|
|
2500
2500
|
}
|
|
2501
2501
|
});
|
|
2502
|
-
return
|
|
2502
|
+
return zt(n);
|
|
2503
2503
|
}
|
|
2504
2504
|
async getStateHistory(t) {
|
|
2505
|
-
const n = await
|
|
2505
|
+
const n = await Ht(`/chat/threads/${t.threadId}/state/history`, {
|
|
2506
2506
|
params: {
|
|
2507
2507
|
thread_id: t.threadId,
|
|
2508
2508
|
checkpoint_id: t.checkpointId,
|
|
2509
2509
|
checkpoint_ns: t.checkpointNs
|
|
2510
2510
|
}
|
|
2511
2511
|
});
|
|
2512
|
-
return
|
|
2512
|
+
return zt(n);
|
|
2513
2513
|
}
|
|
2514
2514
|
// ---- Checkpoints ----
|
|
2515
2515
|
async listCheckpoints(t) {
|
|
2516
|
-
const n = await
|
|
2516
|
+
const n = await Ht(`/chat/threads/${t}/checkpoints`, {
|
|
2517
2517
|
params: { thread_id: t }
|
|
2518
2518
|
});
|
|
2519
|
-
return
|
|
2519
|
+
return zt(n);
|
|
2520
2520
|
}
|
|
2521
2521
|
}
|
|
2522
2522
|
const zn = new _g();
|
|
@@ -2783,7 +2783,7 @@ function Lg(e = []) {
|
|
|
2783
2783
|
ct(() => () => {
|
|
2784
2784
|
o.current !== null && typeof window < "u" && window.cancelAnimationFrame(o.current), s.current !== null && clearTimeout(s.current), r.current = [];
|
|
2785
2785
|
}, []);
|
|
2786
|
-
const u =
|
|
2786
|
+
const u = Yt(() => ({
|
|
2787
2787
|
reset: (d) => n({ type: "reset", payload: { messages: d } }),
|
|
2788
2788
|
seed: (d, f) => n({ type: "seed", payload: { messages: d, ...f ?? {} } }),
|
|
2789
2789
|
prepend: (d) => n({ type: "prepend", payload: { messages: d } }),
|
|
@@ -3047,7 +3047,7 @@ function Ms({ children: e, apiConfig: t, onError: n, onThreadChange: r, initialT
|
|
|
3047
3047
|
// root
|
|
3048
3048
|
"/api/v2/health",
|
|
3049
3049
|
"/api/v2/chat/health"
|
|
3050
|
-
],
|
|
3050
|
+
], Lt = async (xt) => {
|
|
3051
3051
|
try {
|
|
3052
3052
|
const At = new AbortController(), ht = setTimeout(() => At.abort(), tt), Rt = await fetch(xt, { method: "GET", signal: At.signal });
|
|
3053
3053
|
return clearTimeout(ht), Rt.ok;
|
|
@@ -3068,7 +3068,7 @@ function Ms({ children: e, apiConfig: t, onError: n, onThreadChange: r, initialT
|
|
|
3068
3068
|
let Rt = ht;
|
|
3069
3069
|
Ne.endsWith("/api") && ht.startsWith("/api") && (Rt = ht.replace(/^\/api/, "") || "/");
|
|
3070
3070
|
const te = Rt === "/" ? Ne + "/" : Ne + Rt;
|
|
3071
|
-
if (console.debug(`[ChatProvider] checking ${te}`), await
|
|
3071
|
+
if (console.debug(`[ChatProvider] checking ${te}`), await Lt(te) || ht === "/" && await _n(Ne + "/"))
|
|
3072
3072
|
return le(!0), !0;
|
|
3073
3073
|
}
|
|
3074
3074
|
const At = Ae * Math.pow(2, xt);
|
|
@@ -3145,7 +3145,7 @@ function Ms({ children: e, apiConfig: t, onError: n, onThreadChange: r, initialT
|
|
|
3145
3145
|
console.log("[ChatProvider] Loading thread with", at.length, "messages"), y(at, {
|
|
3146
3146
|
checkpointId: (Ne == null ? void 0 : Ne.checkpointId) ?? null,
|
|
3147
3147
|
checkpointNs: (Ne == null ? void 0 : Ne.checkpointNs) ?? null
|
|
3148
|
-
}), P((Ne == null ? void 0 : Ne.nextCursor) ?? null), _(!!(Ne != null && Ne.hasMore)), W((
|
|
3148
|
+
}), P((Ne == null ? void 0 : Ne.nextCursor) ?? null), _(!!(Ne != null && Ne.hasMore)), W((Lt) => (Ne == null ? void 0 : Ne.checkpointId) ?? Lt ?? void 0), D((Lt) => (Ne == null ? void 0 : Ne.checkpointNs) ?? Lt ?? void 0);
|
|
3149
3149
|
} finally {
|
|
3150
3150
|
De.current = null;
|
|
3151
3151
|
}
|
|
@@ -3209,7 +3209,7 @@ function Ms({ children: e, apiConfig: t, onError: n, onThreadChange: r, initialT
|
|
|
3209
3209
|
t == null ? void 0 : t.uploadPath
|
|
3210
3210
|
), at = [];
|
|
3211
3211
|
$ && $.trim() && at.push({ type: "text", text: $.trim() });
|
|
3212
|
-
const
|
|
3212
|
+
const Lt = {
|
|
3213
3213
|
id: ((je = crypto.randomUUID) == null ? void 0 : je.call(crypto)) || `user-${Date.now()}`,
|
|
3214
3214
|
role: "user",
|
|
3215
3215
|
content: at,
|
|
@@ -3217,9 +3217,9 @@ function Ms({ children: e, apiConfig: t, onError: n, onThreadChange: r, initialT
|
|
|
3217
3217
|
checkpointId: (Y == null ? void 0 : Y.checkpointId) ?? w.lastCheckpointId ?? void 0,
|
|
3218
3218
|
checkpointNs: (Y == null ? void 0 : Y.checkpointNs) ?? w.lastCheckpointNs ?? void 0
|
|
3219
3219
|
};
|
|
3220
|
-
S(
|
|
3220
|
+
S(Lt);
|
|
3221
3221
|
const _n = {
|
|
3222
|
-
...
|
|
3222
|
+
...Lt,
|
|
3223
3223
|
content: at
|
|
3224
3224
|
}, xt = { ...(Y == null ? void 0 : Y.payloadExtras) ?? {} }, At = !!xt.edit, ht = xt.originalMessageId, Rt = typeof ht == "string" ? ht : void 0, te = Ae && Ae.length > 0, pe = {
|
|
3225
3225
|
...L ? { threadId: L } : {},
|
|
@@ -3241,12 +3241,16 @@ function Ms({ children: e, apiConfig: t, onError: n, onThreadChange: r, initialT
|
|
|
3241
3241
|
(Fe) => C(Fe),
|
|
3242
3242
|
{
|
|
3243
3243
|
onError: (Fe) => console.warn("stream error", Fe),
|
|
3244
|
-
onOpen: ({ threadId: Fe }) => {
|
|
3245
|
-
!L && Fe
|
|
3244
|
+
onOpen: ({ threadId: Fe, created: $t }) => {
|
|
3245
|
+
if (!L && Fe) {
|
|
3246
|
+
const _t = w.messages.length <= 1;
|
|
3247
|
+
_t && (J.current = Fe), j(Fe), ($t || _t) && H().catch(() => {
|
|
3248
|
+
});
|
|
3249
|
+
}
|
|
3246
3250
|
}
|
|
3247
3251
|
}
|
|
3248
3252
|
);
|
|
3249
|
-
}, [L, S, h, C, w.lastCheckpointId, w.lastCheckpointNs, u, t == null ? void 0 : t.uploadPath, H, j, a, c]), Pe = Ye(
|
|
3253
|
+
}, [L, S, h, C, w.lastCheckpointId, w.lastCheckpointNs, u, t == null ? void 0 : t.uploadPath, H, j, a, c, w.messages.length]), Pe = Ye(
|
|
3250
3254
|
async ($) => {
|
|
3251
3255
|
if (!L) throw new Error("No active thread");
|
|
3252
3256
|
if (I || !N) return;
|
|
@@ -3503,7 +3507,7 @@ function st(e) {
|
|
|
3503
3507
|
function de(e, t) {
|
|
3504
3508
|
return Ke(e, Xg(t, es));
|
|
3505
3509
|
}
|
|
3506
|
-
function
|
|
3510
|
+
function Xt(e, t) {
|
|
3507
3511
|
const n = e(kn, (r) => {
|
|
3508
3512
|
n(), t(r);
|
|
3509
3513
|
});
|
|
@@ -3643,7 +3647,7 @@ function Le() {
|
|
|
3643
3647
|
}
|
|
3644
3648
|
};
|
|
3645
3649
|
}
|
|
3646
|
-
function
|
|
3650
|
+
function Ot(e) {
|
|
3647
3651
|
return ts(Le(), (t) => de(e, t));
|
|
3648
3652
|
}
|
|
3649
3653
|
function He(e, t = [], { singleton: n } = { singleton: !0 }) {
|
|
@@ -3890,19 +3894,19 @@ function Pr(e, t) {
|
|
|
3890
3894
|
if (!Xe(e))
|
|
3891
3895
|
return t === e.k ? e.v : t < e.k ? Pr(e.l, t) : Pr(e.r, t);
|
|
3892
3896
|
}
|
|
3893
|
-
function
|
|
3897
|
+
function Jt(e, t, n = "k") {
|
|
3894
3898
|
if (Xe(e))
|
|
3895
3899
|
return [-1 / 0, void 0];
|
|
3896
3900
|
if (Number(e[n]) === t)
|
|
3897
3901
|
return [e.k, e.v];
|
|
3898
3902
|
if (Number(e[n]) < t) {
|
|
3899
|
-
const r =
|
|
3903
|
+
const r = Jt(e.r, t, n);
|
|
3900
3904
|
return r[0] === -1 / 0 ? [e.k, e.v] : r;
|
|
3901
3905
|
}
|
|
3902
|
-
return
|
|
3906
|
+
return Jt(e.l, t, n);
|
|
3903
3907
|
}
|
|
3904
|
-
function
|
|
3905
|
-
return Xe(e) ? Qc(t, n, 1) : t === e.k ? pt(e, { k: t, v: n }) : t < e.k ? fl(pt(e, { l:
|
|
3908
|
+
function Pt(e, t, n) {
|
|
3909
|
+
return Xe(e) ? Qc(t, n, 1) : t === e.k ? pt(e, { k: t, v: n }) : t < e.k ? fl(pt(e, { l: Pt(e.l, t, n) })) : fl(pt(e, { r: Pt(e.r, t, n) }));
|
|
3906
3910
|
}
|
|
3907
3911
|
function or() {
|
|
3908
3912
|
return jr;
|
|
@@ -3910,7 +3914,7 @@ function or() {
|
|
|
3910
3914
|
function ns(e, t, n) {
|
|
3911
3915
|
if (Xe(e))
|
|
3912
3916
|
return [];
|
|
3913
|
-
const r =
|
|
3917
|
+
const r = Jt(e, t)[0];
|
|
3914
3918
|
return ax(hi(e, r, n));
|
|
3915
3919
|
}
|
|
3916
3920
|
function fi(e, t) {
|
|
@@ -4067,7 +4071,7 @@ function ux(e, t) {
|
|
|
4067
4071
|
for (const r of t) {
|
|
4068
4072
|
const { endIndex: o, size: s, startIndex: i } = r;
|
|
4069
4073
|
if (n = Math.min(n, i), Xe(e)) {
|
|
4070
|
-
e =
|
|
4074
|
+
e = Pt(e, 0, s);
|
|
4071
4075
|
continue;
|
|
4072
4076
|
}
|
|
4073
4077
|
const a = ns(e, i - 1, o + 1);
|
|
@@ -4075,8 +4079,8 @@ function ux(e, t) {
|
|
|
4075
4079
|
continue;
|
|
4076
4080
|
let c = !1, u = !1;
|
|
4077
4081
|
for (const { end: d, start: f, value: h } of a)
|
|
4078
|
-
c ? (o >= f || s === h) && (e = fi(e, f)) : (u = h !== s, c = !0), d > o && o >= f && h !== s && (e =
|
|
4079
|
-
u && (e =
|
|
4082
|
+
c ? (o >= f || s === h) && (e = fi(e, f)) : (u = h !== s, c = !0), d > o && o >= f && h !== s && (e = Pt(e, o + 1, h));
|
|
4083
|
+
u && (e = Pt(e, i, s));
|
|
4080
4084
|
}
|
|
4081
4085
|
return [e, n];
|
|
4082
4086
|
}
|
|
@@ -4118,7 +4122,7 @@ function px(e, [t, n, r, o]) {
|
|
|
4118
4122
|
let i = s, a = 0;
|
|
4119
4123
|
if (n.length > 0 && Xe(s) && t.length === 2) {
|
|
4120
4124
|
const h = t[0].size, m = t[1].size;
|
|
4121
|
-
i = n.reduce((b, v) =>
|
|
4125
|
+
i = n.reduce((b, v) => Pt(Pt(b, v, h), v + 1, m), i);
|
|
4122
4126
|
} else
|
|
4123
4127
|
[i, a] = ux(i, t);
|
|
4124
4128
|
if (i === s)
|
|
@@ -4126,7 +4130,7 @@ function px(e, [t, n, r, o]) {
|
|
|
4126
4130
|
const { lastIndex: c, lastOffset: u, lastSize: d, offsetTree: f } = mi(e.offsetTree, a, i, o);
|
|
4127
4131
|
return {
|
|
4128
4132
|
groupIndices: n,
|
|
4129
|
-
groupOffsetTree: n.reduce((h, m) =>
|
|
4133
|
+
groupOffsetTree: n.reduce((h, m) => Pt(h, m, Mr(m, f, o)), or()),
|
|
4130
4134
|
lastIndex: c,
|
|
4131
4135
|
lastOffset: u,
|
|
4132
4136
|
lastSize: d,
|
|
@@ -4150,8 +4154,8 @@ function mi(e, t, n, r) {
|
|
|
4150
4154
|
let o = e, s = 0, i = 0, a = 0, c = 0;
|
|
4151
4155
|
if (t !== 0) {
|
|
4152
4156
|
c = Ao(o, t - 1, Wi), a = o[c].offset;
|
|
4153
|
-
const u =
|
|
4154
|
-
s = u[0], i = u[1], o.length && o[c].size ===
|
|
4157
|
+
const u = Jt(n, t - 1);
|
|
4158
|
+
s = u[0], i = u[1], o.length && o[c].size === Jt(n, t)[1] && (c -= 1), o = o.slice(0, c + 1);
|
|
4155
4159
|
} else
|
|
4156
4160
|
o = [];
|
|
4157
4161
|
for (const { start: u, value: d } of ns(n, t, 1 / 0)) {
|
|
@@ -4202,7 +4206,7 @@ const vx = {
|
|
|
4202
4206
|
be((S) => S.length > 0),
|
|
4203
4207
|
_e(v, m),
|
|
4204
4208
|
re(([S, C, k]) => {
|
|
4205
|
-
const E = S.reduce((N, _, I) =>
|
|
4209
|
+
const E = S.reduce((N, _, I) => Pt(N, _, Mr(_, C.offsetTree, k) || I), or());
|
|
4206
4210
|
return {
|
|
4207
4211
|
...C,
|
|
4208
4212
|
groupIndices: S,
|
|
@@ -4241,7 +4245,7 @@ const vx = {
|
|
|
4241
4245
|
),
|
|
4242
4246
|
n
|
|
4243
4247
|
);
|
|
4244
|
-
const w =
|
|
4248
|
+
const w = Ot(
|
|
4245
4249
|
z(
|
|
4246
4250
|
n,
|
|
4247
4251
|
_e(v),
|
|
@@ -4280,7 +4284,7 @@ const vx = {
|
|
|
4280
4284
|
Nt.ERROR
|
|
4281
4285
|
);
|
|
4282
4286
|
});
|
|
4283
|
-
const y =
|
|
4287
|
+
const y = Ot(s);
|
|
4284
4288
|
de(
|
|
4285
4289
|
z(
|
|
4286
4290
|
s,
|
|
@@ -4342,7 +4346,7 @@ const vx = {
|
|
|
4342
4346
|
),
|
|
4343
4347
|
n
|
|
4344
4348
|
);
|
|
4345
|
-
const R =
|
|
4349
|
+
const R = Ot(
|
|
4346
4350
|
z(
|
|
4347
4351
|
i,
|
|
4348
4352
|
_e(v, m),
|
|
@@ -4368,11 +4372,11 @@ const vx = {
|
|
|
4368
4372
|
const V = N[I + 1] - F - 1;
|
|
4369
4373
|
I++, _ += V + 1;
|
|
4370
4374
|
}
|
|
4371
|
-
if (E = Dn(C.sizeTree).reduce((V, { k: P, v: G }) =>
|
|
4375
|
+
if (E = Dn(C.sizeTree).reduce((V, { k: P, v: G }) => Pt(V, Math.max(0, P + S), G), E), _ !== -S) {
|
|
4372
4376
|
const V = Pr(C.sizeTree, F);
|
|
4373
|
-
E =
|
|
4374
|
-
const P =
|
|
4375
|
-
E =
|
|
4377
|
+
E = Pt(E, 0, V);
|
|
4378
|
+
const P = Jt(C.sizeTree, -S + 1)[1];
|
|
4379
|
+
E = Pt(E, 1, P);
|
|
4376
4380
|
}
|
|
4377
4381
|
return {
|
|
4378
4382
|
...C,
|
|
@@ -4380,7 +4384,7 @@ const vx = {
|
|
|
4380
4384
|
...mi(C.offsetTree, 0, E, k)
|
|
4381
4385
|
};
|
|
4382
4386
|
} else {
|
|
4383
|
-
const E = Dn(C.sizeTree).reduce((N, { k: _, v: I }) =>
|
|
4387
|
+
const E = Dn(C.sizeTree).reduce((N, { k: _, v: I }) => Pt(N, Math.max(0, _ + S), I), or());
|
|
4384
4388
|
return {
|
|
4385
4389
|
...C,
|
|
4386
4390
|
sizeTree: E,
|
|
@@ -4426,7 +4430,7 @@ function wx(e) {
|
|
|
4426
4430
|
}
|
|
4427
4431
|
const su = He(
|
|
4428
4432
|
([{ groupIndices: e, sizes: t, totalCount: n }, { headerHeight: r, scrollTop: o }]) => {
|
|
4429
|
-
const s = Le(), i = Le(), a =
|
|
4433
|
+
const s = Le(), i = Le(), a = Ot(z(s, re(wx)));
|
|
4430
4434
|
return de(
|
|
4431
4435
|
z(
|
|
4432
4436
|
a,
|
|
@@ -4443,7 +4447,7 @@ const su = He(
|
|
|
4443
4447
|
z(
|
|
4444
4448
|
ut(o, t, r),
|
|
4445
4449
|
be(([c, u]) => rs(u)),
|
|
4446
|
-
re(([c, u, d]) =>
|
|
4450
|
+
re(([c, u, d]) => Jt(u.groupOffsetTree, Math.max(c - d, 0), "v")[0]),
|
|
4447
4451
|
Qe(),
|
|
4448
4452
|
re((c) => [c])
|
|
4449
4453
|
),
|
|
@@ -4453,7 +4457,7 @@ const su = He(
|
|
|
4453
4457
|
et(dn, Ct)
|
|
4454
4458
|
), In = He(
|
|
4455
4459
|
([{ log: e }]) => {
|
|
4456
|
-
const t = q(!1), n =
|
|
4460
|
+
const t = q(!1), n = Ot(
|
|
4457
4461
|
z(
|
|
4458
4462
|
t,
|
|
4459
4463
|
be((r) => r),
|
|
@@ -4505,7 +4509,7 @@ const Kr = He(
|
|
|
4505
4509
|
]) => {
|
|
4506
4510
|
const G = iu(R), { align: W, behavior: K, offset: D } = G, O = k - 1, ie = ou(G, S, O);
|
|
4507
4511
|
let J = Mr(ie, S.offsetTree, F) + N;
|
|
4508
|
-
W === "end" ? (J += V +
|
|
4512
|
+
W === "end" ? (J += V + Jt(S.sizeTree, ie)[1] - C + P, ie === O && (J += _)) : W === "center" ? J += (V + Jt(S.sizeTree, ie)[1] - C + P) / 2 : J -= E, D && (J += D);
|
|
4509
4513
|
const ee = (M) => {
|
|
4510
4514
|
y(), M ? (I("retrying to scroll to", { location: R }, Nt.DEBUG), Ie(m, R)) : (Ie(b, !0), I("list did not change, scroll successful", {}, Nt.DEBUG));
|
|
4511
4515
|
};
|
|
@@ -4513,11 +4517,11 @@ const Kr = He(
|
|
|
4513
4517
|
let M = !1;
|
|
4514
4518
|
w = Ke(t, (Z) => {
|
|
4515
4519
|
M = M || Z;
|
|
4516
|
-
}), g =
|
|
4520
|
+
}), g = Xt(d, () => {
|
|
4517
4521
|
ee(M);
|
|
4518
4522
|
});
|
|
4519
4523
|
} else
|
|
4520
|
-
g =
|
|
4524
|
+
g = Xt(z(t, yx(150)), ee);
|
|
4521
4525
|
return x = setTimeout(() => {
|
|
4522
4526
|
y();
|
|
4523
4527
|
}, 1200), Ie(c, !0), I("scrolling from index to", { behavior: K, index: ie, top: J }, Nt.DEBUG), { behavior: K, top: J };
|
|
@@ -4580,10 +4584,10 @@ const qr = He(
|
|
|
4580
4584
|
_e(c)
|
|
4581
4585
|
),
|
|
4582
4586
|
([, d]) => {
|
|
4583
|
-
|
|
4587
|
+
Xt(o, () => {
|
|
4584
4588
|
Ie(u, !0);
|
|
4585
4589
|
}), Vi(4, () => {
|
|
4586
|
-
|
|
4590
|
+
Xt(r, () => {
|
|
4587
4591
|
Ie(a, !0);
|
|
4588
4592
|
}), Ie(s, d);
|
|
4589
4593
|
});
|
|
@@ -4628,7 +4632,7 @@ const Dr = "up", Nr = "down", Sx = "none", Cx = {
|
|
|
4628
4632
|
),
|
|
4629
4633
|
a
|
|
4630
4634
|
), de(z(a, gn(50)), u);
|
|
4631
|
-
const b =
|
|
4635
|
+
const b = Ot(
|
|
4632
4636
|
z(
|
|
4633
4637
|
ut(r, we(s), we(t), we(e), we(d)),
|
|
4634
4638
|
sn((w, [{ scrollHeight: y, scrollTop: R }, S, C, k, E]) => {
|
|
@@ -4807,7 +4811,7 @@ function Rx(e, t, n) {
|
|
|
4807
4811
|
if (rs(t)) {
|
|
4808
4812
|
const r = ru(e, t);
|
|
4809
4813
|
return [
|
|
4810
|
-
{ index:
|
|
4814
|
+
{ index: Jt(t.groupOffsetTree, r)[0], offset: 0, size: 0 },
|
|
4811
4815
|
{ data: n == null ? void 0 : n[0], index: r, offset: 0, size: 0 }
|
|
4812
4816
|
];
|
|
4813
4817
|
}
|
|
@@ -5013,7 +5017,7 @@ const Gn = He(
|
|
|
5013
5017
|
),
|
|
5014
5018
|
x
|
|
5015
5019
|
);
|
|
5016
|
-
const y =
|
|
5020
|
+
const y = Ot(
|
|
5017
5021
|
z(
|
|
5018
5022
|
w,
|
|
5019
5023
|
be(({ items: C }) => C.length > 0),
|
|
@@ -5023,7 +5027,7 @@ const Gn = He(
|
|
|
5023
5027
|
Qe(Or),
|
|
5024
5028
|
re(([C]) => C)
|
|
5025
5029
|
)
|
|
5026
|
-
), R =
|
|
5030
|
+
), R = Ot(
|
|
5027
5031
|
z(
|
|
5028
5032
|
w,
|
|
5029
5033
|
gn(200),
|
|
@@ -5031,7 +5035,7 @@ const Gn = He(
|
|
|
5031
5035
|
re(({ items: C }) => C[0].index),
|
|
5032
5036
|
Qe()
|
|
5033
5037
|
)
|
|
5034
|
-
), S =
|
|
5038
|
+
), S = Ot(
|
|
5035
5039
|
z(
|
|
5036
5040
|
w,
|
|
5037
5041
|
be(({ items: C }) => C.length > 0),
|
|
@@ -5112,14 +5116,14 @@ const Gn = He(
|
|
|
5112
5116
|
_e(t, c, n, s, o, r, a),
|
|
5113
5117
|
_e(e),
|
|
5114
5118
|
re(([[f, h, m, b, v, g, x, w], y]) => {
|
|
5115
|
-
const { align: R, behavior: S, calculateViewLocation: C = Ex, done: k, ...E } = f, N = ou(f, h, b - 1), _ = Mr(N, h.offsetTree, y) + v + g, I = _ +
|
|
5119
|
+
const { align: R, behavior: S, calculateViewLocation: C = Ex, done: k, ...E } = f, N = ou(f, h, b - 1), _ = Mr(N, h.offsetTree, y) + v + g, I = _ + Jt(h.sizeTree, N)[1], F = w + g, V = w + m - x, P = C({
|
|
5116
5120
|
itemBottom: I,
|
|
5117
5121
|
itemTop: _,
|
|
5118
5122
|
locationParams: { align: R, behavior: S, ...E },
|
|
5119
5123
|
viewportBottom: V,
|
|
5120
5124
|
viewportTop: F
|
|
5121
5125
|
});
|
|
5122
|
-
return P ? k &&
|
|
5126
|
+
return P ? k && Xt(
|
|
5123
5127
|
z(
|
|
5124
5128
|
i,
|
|
5125
5129
|
be((G) => !G),
|
|
@@ -5177,13 +5181,13 @@ const Ix = (e, t) => typeof e == "function" ? vl(e(t)) : t && vl(e), Nx = He(
|
|
|
5177
5181
|
({ followOutputBehavior: S, totalCount: C }) => {
|
|
5178
5182
|
g && (g(), g = null), st(n) ? requestAnimationFrame(() => {
|
|
5179
5183
|
st(d)("following output to ", { totalCount: C }, Nt.DEBUG), x(S);
|
|
5180
|
-
}) : g =
|
|
5184
|
+
}) : g = Xt(e, () => {
|
|
5181
5185
|
st(d)("following output to ", { totalCount: C }, Nt.DEBUG), x(S), g = null;
|
|
5182
5186
|
});
|
|
5183
5187
|
}
|
|
5184
5188
|
);
|
|
5185
5189
|
function w(S) {
|
|
5186
|
-
const C =
|
|
5190
|
+
const C = Xt(o, (k) => {
|
|
5187
5191
|
S && !k.atBottom && k.notAtBottomBecause === "SIZE_INCREASED" && !g && (st(d)("scrolling to bottom due to increased size", {}, Nt.DEBUG), x("auto"));
|
|
5188
5192
|
});
|
|
5189
5193
|
setTimeout(C, 100);
|
|
@@ -5231,7 +5235,7 @@ const Ix = (e, t) => typeof e == "function" ? vl(e(t)) : t && vl(e), Nx = He(
|
|
|
5231
5235
|
(S) => {
|
|
5232
5236
|
g && (g(), g = null), st(n) ? requestAnimationFrame(() => {
|
|
5233
5237
|
st(d)("scrolling into view", {}), Ie(m, S);
|
|
5234
|
-
}) : g =
|
|
5238
|
+
}) : g = Xt(e, () => {
|
|
5235
5239
|
st(d)("scrolling into view", {}), Ie(m, S), g = null;
|
|
5236
5240
|
});
|
|
5237
5241
|
}
|
|
@@ -5272,7 +5276,7 @@ const Ix = (e, t) => typeof e == "function" ? vl(e(t)) : t && vl(e), Nx = He(
|
|
|
5272
5276
|
re(([, o]) => ({ top: o }))
|
|
5273
5277
|
),
|
|
5274
5278
|
(o) => {
|
|
5275
|
-
|
|
5279
|
+
Xt(
|
|
5276
5280
|
z(
|
|
5277
5281
|
n,
|
|
5278
5282
|
Bn(1),
|
|
@@ -5413,7 +5417,7 @@ const Mx = hu(() => /iP(ad|od|hone)/i.test(navigator.userAgent) && /WebKit/i.tes
|
|
|
5413
5417
|
{ log: m },
|
|
5414
5418
|
{ recalcInProgress: b }
|
|
5415
5419
|
]) => {
|
|
5416
|
-
const v =
|
|
5420
|
+
const v = Ot(
|
|
5417
5421
|
z(
|
|
5418
5422
|
c,
|
|
5419
5423
|
_e(i),
|
|
@@ -5783,7 +5787,7 @@ const zx = /* @__PURE__ */ He(() => {
|
|
|
5783
5787
|
([e, t]) => ({ ...e, ...t }),
|
|
5784
5788
|
et(pu, zx)
|
|
5785
5789
|
), Hx = ({ height: e }) => /* @__PURE__ */ l.jsx("div", { style: { height: e } }), Ux = { overflowAnchor: "none", position: Yi(), zIndex: 1 }, bu = { overflowAnchor: "none" }, Wx = { ...bu, display: "inline-block", height: "100%" }, bl = /* @__PURE__ */ B.memo(function({ showTopList: e = !1 }) {
|
|
5786
|
-
const t = Te("listState"), n =
|
|
5790
|
+
const t = Te("listState"), n = Ut("sizeRanges"), r = Te("useWindowScroll"), o = Te("customScrollParent"), s = Ut("windowScrollContainerState"), i = Ut("scrollContainerState"), a = o || r ? s : i, c = Te("itemContent"), u = Te("context"), d = Te("groupContent"), f = Te("trackItemSizes"), h = Te("itemSize"), m = Te("log"), b = Ut("gap"), v = Te("horizontalDirection"), { callbackRef: g } = sx(
|
|
5787
5791
|
n,
|
|
5788
5792
|
h,
|
|
5789
5793
|
f,
|
|
@@ -5890,7 +5894,7 @@ function Gx(e, t) {
|
|
|
5890
5894
|
return { item: typeof e == "string" ? void 0 : t };
|
|
5891
5895
|
}
|
|
5892
5896
|
const Yx = /* @__PURE__ */ B.memo(function() {
|
|
5893
|
-
const e = Te("HeaderComponent"), t =
|
|
5897
|
+
const e = Te("HeaderComponent"), t = Ut("headerHeight"), n = Te("HeaderFooterTag"), r = qn(
|
|
5894
5898
|
B.useMemo(
|
|
5895
5899
|
() => (s) => {
|
|
5896
5900
|
t(yn(s, "height"));
|
|
@@ -5902,7 +5906,7 @@ const Yx = /* @__PURE__ */ B.memo(function() {
|
|
|
5902
5906
|
), o = Te("context");
|
|
5903
5907
|
return e ? /* @__PURE__ */ l.jsx(n, { ref: r, children: /* @__PURE__ */ l.jsx(e, { ...bt(e, o) }) }) : null;
|
|
5904
5908
|
}), Xx = /* @__PURE__ */ B.memo(function() {
|
|
5905
|
-
const e = Te("FooterComponent"), t =
|
|
5909
|
+
const e = Te("FooterComponent"), t = Ut("footerHeight"), n = Te("HeaderFooterTag"), r = qn(
|
|
5906
5910
|
B.useMemo(
|
|
5907
5911
|
() => (s) => {
|
|
5908
5912
|
t(yn(s, "height"));
|
|
@@ -5967,7 +5971,7 @@ function Su({ useEmitter: e, useEmitterValue: t, usePublisher: n }) {
|
|
|
5967
5971
|
});
|
|
5968
5972
|
}
|
|
5969
5973
|
const Jx = ({ children: e }) => {
|
|
5970
|
-
const t = B.useContext(gu), n =
|
|
5974
|
+
const t = B.useContext(gu), n = Ut("viewportHeight"), r = Ut("fixedItemHeight"), o = Te("alignToBottom"), s = Te("horizontalDirection"), i = B.useMemo(
|
|
5971
5975
|
() => qc(n, (c) => yn(c, s ? "width" : "height")),
|
|
5972
5976
|
[n, s]
|
|
5973
5977
|
), a = qn(i, !0, Te("skipAnimationFrameInResizeObserver"));
|
|
@@ -5975,7 +5979,7 @@ const Jx = ({ children: e }) => {
|
|
|
5975
5979
|
t && (n(t.viewportHeight), r(t.itemHeight));
|
|
5976
5980
|
}, [t, n, r]), /* @__PURE__ */ l.jsx("div", { "data-viewport-type": "element", ref: a, style: os(o), children: e });
|
|
5977
5981
|
}, Zx = ({ children: e }) => {
|
|
5978
|
-
const t = B.useContext(gu), n =
|
|
5982
|
+
const t = B.useContext(gu), n = Ut("windowViewportRect"), r = Ut("fixedItemHeight"), o = Te("customScrollParent"), s = Yc(
|
|
5979
5983
|
n,
|
|
5980
5984
|
o,
|
|
5981
5985
|
Te("skipAnimationFrameInResizeObserver")
|
|
@@ -6000,7 +6004,7 @@ const Jx = ({ children: e }) => {
|
|
|
6000
6004
|
Component: tv,
|
|
6001
6005
|
useEmitter: Ji,
|
|
6002
6006
|
useEmitterValue: Te,
|
|
6003
|
-
usePublisher:
|
|
6007
|
+
usePublisher: Ut
|
|
6004
6008
|
} = /* @__PURE__ */ mu(
|
|
6005
6009
|
Bx,
|
|
6006
6010
|
{
|
|
@@ -6060,7 +6064,7 @@ const Jx = ({ children: e }) => {
|
|
|
6060
6064
|
}
|
|
6061
6065
|
},
|
|
6062
6066
|
ev
|
|
6063
|
-
), nv = /* @__PURE__ */ yu({ useEmitter: Ji, useEmitterValue: Te, usePublisher:
|
|
6067
|
+
), nv = /* @__PURE__ */ yu({ useEmitter: Ji, useEmitterValue: Te, usePublisher: Ut }), rv = /* @__PURE__ */ Su({ useEmitter: Ji, useEmitterValue: Te, usePublisher: Ut }), ov = tv, sv = /* @__PURE__ */ He(() => {
|
|
6064
6068
|
const e = q((u) => /* @__PURE__ */ l.jsxs("td", { children: [
|
|
6065
6069
|
"Item $",
|
|
6066
6070
|
u
|
|
@@ -6158,7 +6162,7 @@ const cv = /* @__PURE__ */ He(
|
|
|
6158
6162
|
([, , , , j]) => {
|
|
6159
6163
|
Ie(J, !0), Vi(1, () => {
|
|
6160
6164
|
Ie(I, j);
|
|
6161
|
-
}),
|
|
6165
|
+
}), Xt(z(u), () => {
|
|
6162
6166
|
Ie(t, [0, 0]), Ie(ie, !0);
|
|
6163
6167
|
});
|
|
6164
6168
|
}
|
|
@@ -6176,7 +6180,7 @@ const cv = /* @__PURE__ */ He(
|
|
|
6176
6180
|
be(([, j]) => j != null)
|
|
6177
6181
|
),
|
|
6178
6182
|
([, j]) => {
|
|
6179
|
-
j && (Ie(N, j.viewport), Ie(_, j.item), Ie(G, j.gap), j.scrollTop > 0 && (Ie(D, !0),
|
|
6183
|
+
j && (Ie(N, j.viewport), Ie(_, j.item), Ie(G, j.gap), j.scrollTop > 0 && (Ie(D, !0), Xt(z(u, Bn(1)), (H) => {
|
|
6180
6184
|
Ie(D, !1);
|
|
6181
6185
|
}), Ie(c, { top: j.scrollTop })));
|
|
6182
6186
|
}
|
|
@@ -6274,7 +6278,7 @@ const cv = /* @__PURE__ */ He(
|
|
|
6274
6278
|
),
|
|
6275
6279
|
M
|
|
6276
6280
|
);
|
|
6277
|
-
const Z =
|
|
6281
|
+
const Z = Ot(
|
|
6278
6282
|
z(
|
|
6279
6283
|
ut(E, C),
|
|
6280
6284
|
be(([{ items: j }]) => j.length > 0),
|
|
@@ -6286,14 +6290,14 @@ const cv = /* @__PURE__ */ He(
|
|
|
6286
6290
|
re(([[, j]]) => j - 1),
|
|
6287
6291
|
Qe()
|
|
6288
6292
|
)
|
|
6289
|
-
), Re =
|
|
6293
|
+
), Re = Ot(
|
|
6290
6294
|
z(
|
|
6291
6295
|
we(E),
|
|
6292
6296
|
be(({ items: j }) => j.length > 0 && j[0].index === 0),
|
|
6293
6297
|
rn(0),
|
|
6294
6298
|
Qe()
|
|
6295
6299
|
)
|
|
6296
|
-
), fe =
|
|
6300
|
+
), fe = Ot(
|
|
6297
6301
|
z(
|
|
6298
6302
|
we(E),
|
|
6299
6303
|
_e(D),
|
|
@@ -6422,7 +6426,7 @@ const uv = /* @__PURE__ */ He(() => {
|
|
|
6422
6426
|
([e, t]) => ({ ...e, ...t }),
|
|
6423
6427
|
et(cv, uv)
|
|
6424
6428
|
), fv = /* @__PURE__ */ B.memo(function() {
|
|
6425
|
-
const e = nt("gridState"), t = nt("listClassName"), n = nt("itemClassName"), r = nt("itemContent"), o = nt("computeItemKey"), s = nt("isSeeking"), i =
|
|
6429
|
+
const e = nt("gridState"), t = nt("listClassName"), n = nt("itemClassName"), r = nt("itemContent"), o = nt("computeItemKey"), s = nt("isSeeking"), i = Wt("scrollHeight"), a = nt("ItemComponent"), c = nt("ListComponent"), u = nt("ScrollSeekPlaceholder"), d = nt("context"), f = Wt("itemDimensions"), h = Wt("gap"), m = nt("log"), b = nt("stateRestoreInProgress"), v = Wt("reportReadyState"), g = qn(
|
|
6426
6430
|
B.useMemo(
|
|
6427
6431
|
() => (x) => {
|
|
6428
6432
|
const w = x.parentElement.parentElement.scrollHeight;
|
|
@@ -6477,7 +6481,7 @@ const uv = /* @__PURE__ */ He(() => {
|
|
|
6477
6481
|
}
|
|
6478
6482
|
);
|
|
6479
6483
|
}), hv = B.memo(function() {
|
|
6480
|
-
const e = nt("HeaderComponent"), t =
|
|
6484
|
+
const e = nt("HeaderComponent"), t = Wt("headerHeight"), n = nt("headerFooterTag"), r = qn(
|
|
6481
6485
|
B.useMemo(
|
|
6482
6486
|
() => (s) => {
|
|
6483
6487
|
t(yn(s, "height"));
|
|
@@ -6489,7 +6493,7 @@ const uv = /* @__PURE__ */ He(() => {
|
|
|
6489
6493
|
), o = nt("context");
|
|
6490
6494
|
return e ? /* @__PURE__ */ l.jsx(n, { ref: r, children: /* @__PURE__ */ l.jsx(e, { ...bt(e, o) }) }) : null;
|
|
6491
6495
|
}), pv = B.memo(function() {
|
|
6492
|
-
const e = nt("FooterComponent"), t =
|
|
6496
|
+
const e = nt("FooterComponent"), t = Wt("footerHeight"), n = nt("headerFooterTag"), r = qn(
|
|
6493
6497
|
B.useMemo(
|
|
6494
6498
|
() => (s) => {
|
|
6495
6499
|
t(yn(s, "height"));
|
|
@@ -6501,7 +6505,7 @@ const uv = /* @__PURE__ */ He(() => {
|
|
|
6501
6505
|
), o = nt("context");
|
|
6502
6506
|
return e ? /* @__PURE__ */ l.jsx(n, { ref: r, children: /* @__PURE__ */ l.jsx(e, { ...bt(e, o) }) }) : null;
|
|
6503
6507
|
}), mv = ({ children: e }) => {
|
|
6504
|
-
const t = B.useContext(xu), n =
|
|
6508
|
+
const t = B.useContext(xu), n = Wt("itemDimensions"), r = Wt("viewportDimensions"), o = qn(
|
|
6505
6509
|
B.useMemo(
|
|
6506
6510
|
() => (s) => {
|
|
6507
6511
|
r(s.getBoundingClientRect());
|
|
@@ -6515,7 +6519,7 @@ const uv = /* @__PURE__ */ He(() => {
|
|
|
6515
6519
|
t && (r({ height: t.viewportHeight, width: t.viewportWidth }), n({ height: t.itemHeight, width: t.itemWidth }));
|
|
6516
6520
|
}, [t, r, n]), /* @__PURE__ */ l.jsx("div", { ref: o, style: os(!1), children: e });
|
|
6517
6521
|
}, gv = ({ children: e }) => {
|
|
6518
|
-
const t = B.useContext(xu), n =
|
|
6522
|
+
const t = B.useContext(xu), n = Wt("windowViewportRect"), r = Wt("itemDimensions"), o = nt("customScrollParent"), s = Yc(n, o, !1);
|
|
6519
6523
|
return B.useEffect(() => {
|
|
6520
6524
|
t && (r({ height: t.itemHeight, width: t.itemWidth }), n({ offsetTop: 0, visibleHeight: t.viewportHeight, visibleWidth: t.viewportWidth }));
|
|
6521
6525
|
}, [t, n, r]), /* @__PURE__ */ l.jsx("div", { ref: s, style: os(!1), children: e });
|
|
@@ -6529,7 +6533,7 @@ const uv = /* @__PURE__ */ He(() => {
|
|
|
6529
6533
|
}), {
|
|
6530
6534
|
useEmitter: Tu,
|
|
6531
6535
|
useEmitterValue: nt,
|
|
6532
|
-
usePublisher:
|
|
6536
|
+
usePublisher: Wt
|
|
6533
6537
|
} = /* @__PURE__ */ mu(
|
|
6534
6538
|
dv,
|
|
6535
6539
|
{
|
|
@@ -6571,7 +6575,7 @@ const uv = /* @__PURE__ */ He(() => {
|
|
|
6571
6575
|
}
|
|
6572
6576
|
},
|
|
6573
6577
|
xv
|
|
6574
|
-
), vv = /* @__PURE__ */ yu({ useEmitter: Tu, useEmitterValue: nt, usePublisher:
|
|
6578
|
+
), vv = /* @__PURE__ */ yu({ useEmitter: Tu, useEmitterValue: nt, usePublisher: Wt }), wv = /* @__PURE__ */ Su({ useEmitter: Tu, useEmitterValue: nt, usePublisher: Wt });
|
|
6575
6579
|
function kl(e, t, n) {
|
|
6576
6580
|
return t !== "normal" && !(t != null && t.endsWith("px")) && n(`${e} was not resolved to pixel value correctly`, t, Nt.WARN), t === "normal" ? 0 : parseInt(t ?? "0", 10);
|
|
6577
6581
|
}
|
|
@@ -6769,11 +6773,11 @@ function Ru(e, t) {
|
|
|
6769
6773
|
function Ev(e, t) {
|
|
6770
6774
|
return p.useReducer((n, r) => t[n][r] ?? n, e);
|
|
6771
6775
|
}
|
|
6772
|
-
var
|
|
6776
|
+
var Dt = (e) => {
|
|
6773
6777
|
const { present: t, children: n } = e, r = Iv(t), o = typeof n == "function" ? n({ present: r.isPresent }) : p.Children.only(n), s = Me(r.ref, Nv(o));
|
|
6774
6778
|
return typeof n == "function" || r.isPresent ? p.cloneElement(o, { ref: s }) : null;
|
|
6775
6779
|
};
|
|
6776
|
-
|
|
6780
|
+
Dt.displayName = "Presence";
|
|
6777
6781
|
function Iv(e) {
|
|
6778
6782
|
const [t, n] = p.useState(), r = p.useRef(null), o = p.useRef(e), s = p.useRef("none"), i = e ? "mounted" : "unmounted", [a, c] = Ev(i, {
|
|
6779
6783
|
mounted: {
|
|
@@ -6899,7 +6903,7 @@ Iu.displayName = Eu;
|
|
|
6899
6903
|
var ea = "CollapsibleContent", Ov = p.forwardRef(
|
|
6900
6904
|
(e, t) => {
|
|
6901
6905
|
const { forceMount: n, ...r } = e, o = Qi(ea, e.__scopeCollapsible);
|
|
6902
|
-
return /* @__PURE__ */ l.jsx(
|
|
6906
|
+
return /* @__PURE__ */ l.jsx(Dt, { present: n || o.open, children: ({ present: s }) => /* @__PURE__ */ l.jsx(Mv, { ...r, ref: t, present: s }) });
|
|
6903
6907
|
}
|
|
6904
6908
|
);
|
|
6905
6909
|
Ov.displayName = ea;
|
|
@@ -8495,7 +8499,7 @@ function Bs({
|
|
|
8495
8499
|
className: t = "",
|
|
8496
8500
|
allowHtml: n = !1
|
|
8497
8501
|
}) {
|
|
8498
|
-
const r =
|
|
8502
|
+
const r = Yt(() => {
|
|
8499
8503
|
try {
|
|
8500
8504
|
if (!n) {
|
|
8501
8505
|
const o = e.replace(/<script\b[^<]*(?:(?!<\/script>)<[^<]*)*<\/script>/gi, "").replace(/<iframe\b[^<]*(?:(?!<\/iframe>)<[^<]*)*<\/iframe>/gi, "").replace(/javascript:/gi, "").replace(/on\w+\s*=/gi, "");
|
|
@@ -8515,7 +8519,7 @@ function Bs({
|
|
|
8515
8519
|
);
|
|
8516
8520
|
}
|
|
8517
8521
|
async function Du(e, t) {
|
|
8518
|
-
return await
|
|
8522
|
+
return await Ht(e, {
|
|
8519
8523
|
responseType: "blob",
|
|
8520
8524
|
onDownloadProgress: (r) => {
|
|
8521
8525
|
try {
|
|
@@ -8534,7 +8538,7 @@ async function ew(e, t) {
|
|
|
8534
8538
|
const n = await Du(`/chat/files/${e}/download`, t), r = URL.createObjectURL(n);
|
|
8535
8539
|
let o = `file_${e}`;
|
|
8536
8540
|
try {
|
|
8537
|
-
const i = await
|
|
8541
|
+
const i = await Ht(`/chat/files/${e}`);
|
|
8538
8542
|
o = (i == null ? void 0 : i.filename) ?? o;
|
|
8539
8543
|
} catch {
|
|
8540
8544
|
}
|
|
@@ -8543,7 +8547,7 @@ async function ew(e, t) {
|
|
|
8543
8547
|
}
|
|
8544
8548
|
async function tw(e, t = 50, n = 0) {
|
|
8545
8549
|
const r = { limit: t, offset: n };
|
|
8546
|
-
return e && (r.thread_id = e), await
|
|
8550
|
+
return e && (r.thread_id = e), await Ht("/chat/files", { params: r });
|
|
8547
8551
|
}
|
|
8548
8552
|
const nw = 1, rw = 1e6;
|
|
8549
8553
|
let Hs = 0;
|
|
@@ -9440,7 +9444,7 @@ var sb = function(e) {
|
|
|
9440
9444
|
return o ? (r.push.apply(r, Array.from(o.querySelectorAll("[aria-live], script"))), ab(r, o, n, "aria-hidden")) : function() {
|
|
9441
9445
|
return null;
|
|
9442
9446
|
};
|
|
9443
|
-
}, ds = "Dialog", [Gu, wT] = fn(ds), [lb,
|
|
9447
|
+
}, ds = "Dialog", [Gu, wT] = fn(ds), [lb, tn] = Gu(ds), Yu = (e) => {
|
|
9444
9448
|
const {
|
|
9445
9449
|
__scopeDialog: t,
|
|
9446
9450
|
children: n,
|
|
@@ -9474,7 +9478,7 @@ var sb = function(e) {
|
|
|
9474
9478
|
Yu.displayName = ds;
|
|
9475
9479
|
var Xu = "DialogTrigger", Ju = p.forwardRef(
|
|
9476
9480
|
(e, t) => {
|
|
9477
|
-
const { __scopeDialog: n, ...r } = e, o =
|
|
9481
|
+
const { __scopeDialog: n, ...r } = e, o = tn(Xu, n), s = Me(t, o.triggerRef);
|
|
9478
9482
|
return /* @__PURE__ */ l.jsx(
|
|
9479
9483
|
Ce.button,
|
|
9480
9484
|
{
|
|
@@ -9494,20 +9498,20 @@ Ju.displayName = Xu;
|
|
|
9494
9498
|
var aa = "DialogPortal", [cb, Zu] = Gu(aa, {
|
|
9495
9499
|
forceMount: void 0
|
|
9496
9500
|
}), Qu = (e) => {
|
|
9497
|
-
const { __scopeDialog: t, forceMount: n, children: r, container: o } = e, s =
|
|
9498
|
-
return /* @__PURE__ */ l.jsx(cb, { scope: t, forceMount: n, children: p.Children.map(r, (i) => /* @__PURE__ */ l.jsx(
|
|
9501
|
+
const { __scopeDialog: t, forceMount: n, children: r, container: o } = e, s = tn(aa, t);
|
|
9502
|
+
return /* @__PURE__ */ l.jsx(cb, { scope: t, forceMount: n, children: p.Children.map(r, (i) => /* @__PURE__ */ l.jsx(Dt, { present: n || s.open, children: /* @__PURE__ */ l.jsx(ls, { asChild: !0, container: o, children: i }) })) });
|
|
9499
9503
|
};
|
|
9500
9504
|
Qu.displayName = aa;
|
|
9501
9505
|
var Do = "DialogOverlay", ed = p.forwardRef(
|
|
9502
9506
|
(e, t) => {
|
|
9503
|
-
const n = Zu(Do, e.__scopeDialog), { forceMount: r = n.forceMount, ...o } = e, s =
|
|
9504
|
-
return s.modal ? /* @__PURE__ */ l.jsx(
|
|
9507
|
+
const n = Zu(Do, e.__scopeDialog), { forceMount: r = n.forceMount, ...o } = e, s = tn(Do, e.__scopeDialog);
|
|
9508
|
+
return s.modal ? /* @__PURE__ */ l.jsx(Dt, { present: r || s.open, children: /* @__PURE__ */ l.jsx(db, { ...o, ref: t }) }) : null;
|
|
9505
9509
|
}
|
|
9506
9510
|
);
|
|
9507
9511
|
ed.displayName = Do;
|
|
9508
9512
|
var ub = lr("DialogOverlay.RemoveScroll"), db = p.forwardRef(
|
|
9509
9513
|
(e, t) => {
|
|
9510
|
-
const { __scopeDialog: n, ...r } = e, o =
|
|
9514
|
+
const { __scopeDialog: n, ...r } = e, o = tn(Do, n);
|
|
9511
9515
|
return (
|
|
9512
9516
|
// Make sure `Content` is scrollable even when it doesn't live inside `RemoveScroll`
|
|
9513
9517
|
// ie. when `Overlay` and `Content` are siblings
|
|
@@ -9524,14 +9528,14 @@ var ub = lr("DialogOverlay.RemoveScroll"), db = p.forwardRef(
|
|
|
9524
9528
|
}
|
|
9525
9529
|
), Un = "DialogContent", td = p.forwardRef(
|
|
9526
9530
|
(e, t) => {
|
|
9527
|
-
const n = Zu(Un, e.__scopeDialog), { forceMount: r = n.forceMount, ...o } = e, s =
|
|
9528
|
-
return /* @__PURE__ */ l.jsx(
|
|
9531
|
+
const n = Zu(Un, e.__scopeDialog), { forceMount: r = n.forceMount, ...o } = e, s = tn(Un, e.__scopeDialog);
|
|
9532
|
+
return /* @__PURE__ */ l.jsx(Dt, { present: r || s.open, children: s.modal ? /* @__PURE__ */ l.jsx(fb, { ...o, ref: t }) : /* @__PURE__ */ l.jsx(hb, { ...o, ref: t }) });
|
|
9529
9533
|
}
|
|
9530
9534
|
);
|
|
9531
9535
|
td.displayName = Un;
|
|
9532
9536
|
var fb = p.forwardRef(
|
|
9533
9537
|
(e, t) => {
|
|
9534
|
-
const n =
|
|
9538
|
+
const n = tn(Un, e.__scopeDialog), r = p.useRef(null), o = Me(t, n.contentRef, r);
|
|
9535
9539
|
return p.useEffect(() => {
|
|
9536
9540
|
const s = r.current;
|
|
9537
9541
|
if (s) return ia(s);
|
|
@@ -9559,7 +9563,7 @@ var fb = p.forwardRef(
|
|
|
9559
9563
|
}
|
|
9560
9564
|
), hb = p.forwardRef(
|
|
9561
9565
|
(e, t) => {
|
|
9562
|
-
const n =
|
|
9566
|
+
const n = tn(Un, e.__scopeDialog), r = p.useRef(!1), o = p.useRef(!1);
|
|
9563
9567
|
return /* @__PURE__ */ l.jsx(
|
|
9564
9568
|
nd,
|
|
9565
9569
|
{
|
|
@@ -9582,7 +9586,7 @@ var fb = p.forwardRef(
|
|
|
9582
9586
|
}
|
|
9583
9587
|
), nd = p.forwardRef(
|
|
9584
9588
|
(e, t) => {
|
|
9585
|
-
const { __scopeDialog: n, trapFocus: r, onOpenAutoFocus: o, onCloseAutoFocus: s, ...i } = e, a =
|
|
9589
|
+
const { __scopeDialog: n, trapFocus: r, onOpenAutoFocus: o, onCloseAutoFocus: s, ...i } = e, a = tn(Un, n), c = p.useRef(null), u = Me(t, c);
|
|
9586
9590
|
return sa(), /* @__PURE__ */ l.jsxs(l.Fragment, { children: [
|
|
9587
9591
|
/* @__PURE__ */ l.jsx(
|
|
9588
9592
|
as,
|
|
@@ -9615,21 +9619,21 @@ var fb = p.forwardRef(
|
|
|
9615
9619
|
}
|
|
9616
9620
|
), la = "DialogTitle", rd = p.forwardRef(
|
|
9617
9621
|
(e, t) => {
|
|
9618
|
-
const { __scopeDialog: n, ...r } = e, o =
|
|
9622
|
+
const { __scopeDialog: n, ...r } = e, o = tn(la, n);
|
|
9619
9623
|
return /* @__PURE__ */ l.jsx(Ce.h2, { id: o.titleId, ...r, ref: t });
|
|
9620
9624
|
}
|
|
9621
9625
|
);
|
|
9622
9626
|
rd.displayName = la;
|
|
9623
9627
|
var od = "DialogDescription", sd = p.forwardRef(
|
|
9624
9628
|
(e, t) => {
|
|
9625
|
-
const { __scopeDialog: n, ...r } = e, o =
|
|
9629
|
+
const { __scopeDialog: n, ...r } = e, o = tn(od, n);
|
|
9626
9630
|
return /* @__PURE__ */ l.jsx(Ce.p, { id: o.descriptionId, ...r, ref: t });
|
|
9627
9631
|
}
|
|
9628
9632
|
);
|
|
9629
9633
|
sd.displayName = od;
|
|
9630
9634
|
var id = "DialogClose", ad = p.forwardRef(
|
|
9631
9635
|
(e, t) => {
|
|
9632
|
-
const { __scopeDialog: n, ...r } = e, o =
|
|
9636
|
+
const { __scopeDialog: n, ...r } = e, o = tn(id, n);
|
|
9633
9637
|
return /* @__PURE__ */ l.jsx(
|
|
9634
9638
|
Ce.button,
|
|
9635
9639
|
{
|
|
@@ -10100,15 +10104,15 @@ const jb = B.memo(function({
|
|
|
10100
10104
|
default:
|
|
10101
10105
|
return "text-[hsl(var(--chat-bubble-ai-text))]";
|
|
10102
10106
|
}
|
|
10103
|
-
}, [D]), ee =
|
|
10107
|
+
}, [D]), ee = Yt(() => Tb(t.content), [t.content]), M = Yt(() => Rb(t.content), [t.content]), Z = Yt(
|
|
10104
10108
|
() => t.content.filter((ce) => ce.type === "image_url"),
|
|
10105
10109
|
[t.content]
|
|
10106
|
-
), Re =
|
|
10110
|
+
), Re = Yt(
|
|
10107
10111
|
() => t.content.filter((ce) => ce.type === "file"),
|
|
10108
10112
|
[t.content]
|
|
10109
|
-
), fe =
|
|
10110
|
-
|
|
10111
|
-
const L =
|
|
10113
|
+
), fe = Yt(() => Eb(t.content), [t.content]);
|
|
10114
|
+
Yt(() => Ib(t.content), [t.content]);
|
|
10115
|
+
const L = Yt(() => fe.length <= Pn ? fe : `${fe.slice(0, Pn)}
|
|
10112
10116
|
… [truncated ${fe.length - Pn} chars]`, [fe]), j = Ab(ee, r, o), H = B.useCallback(async (ce = "all") => {
|
|
10113
10117
|
const he = ce === "visible" && O ? L : O ? fe : ee;
|
|
10114
10118
|
async function ye(Pe) {
|
|
@@ -10380,7 +10384,7 @@ const jb = B.memo(function({
|
|
|
10380
10384
|
Ze,
|
|
10381
10385
|
qe,
|
|
10382
10386
|
J
|
|
10383
|
-
]), ft =
|
|
10387
|
+
]), ft = Yt(() => Nb(t), [t]);
|
|
10384
10388
|
return /* @__PURE__ */ l.jsxs(l.Fragment, { children: [
|
|
10385
10389
|
/* @__PURE__ */ l.jsx("div", { className: X(De(), b.container), children: /* @__PURE__ */ l.jsxs("div", { className: X(ve(), b.content), children: [
|
|
10386
10390
|
(a || c || O) && /* @__PURE__ */ l.jsxs(
|
|
@@ -10691,7 +10695,7 @@ const Ql = (e, t) => (e == null ? void 0 : e.id) ?? `message-${t}`, wd = B.forwa
|
|
|
10691
10695
|
}, w) => {
|
|
10692
10696
|
const y = rt(null), R = rt(null), S = rt(!1), [C, k] = me(!0), E = Ye((I) => {
|
|
10693
10697
|
k(I), g && g(!I), x && x(I);
|
|
10694
|
-
}, [g, x]), N =
|
|
10698
|
+
}, [g, x]), N = Yt(() => {
|
|
10695
10699
|
if (a)
|
|
10696
10700
|
return async () => {
|
|
10697
10701
|
if (!S.current) {
|
|
@@ -10709,9 +10713,9 @@ const Ql = (e, t) => (e == null ? void 0 : e.id) ?? `message-${t}`, wd = B.forwa
|
|
|
10709
10713
|
_.current !== !1 && (_.current = !1);
|
|
10710
10714
|
return;
|
|
10711
10715
|
}
|
|
10712
|
-
const I =
|
|
10716
|
+
const I = C ? "auto" : !1;
|
|
10713
10717
|
_.current !== I && (_.current = I);
|
|
10714
|
-
}, [
|
|
10718
|
+
}, [C, b, v]), e.length === 0 ? /* @__PURE__ */ l.jsx("div", { className: f, style: h, children: /* @__PURE__ */ l.jsx("div", { className: "flex items-center justify-center py-8 text-muted-foreground text-center max-w-md mx-auto", children: m || "No messages yet. Start a conversation!" }) }) : /* @__PURE__ */ l.jsx("div", { className: f, style: h, children: /* @__PURE__ */ l.jsx(
|
|
10715
10719
|
ov,
|
|
10716
10720
|
{
|
|
10717
10721
|
ref: (I) => {
|
|
@@ -10854,7 +10858,7 @@ function ms(e) {
|
|
|
10854
10858
|
const t = p.useContext(Fb);
|
|
10855
10859
|
return e || t || "ltr";
|
|
10856
10860
|
}
|
|
10857
|
-
const zb = ["top", "right", "bottom", "left"], Tn = Math.min,
|
|
10861
|
+
const zb = ["top", "right", "bottom", "left"], Tn = Math.min, jt = Math.max, Lo = Math.round, lo = Math.floor, cn = (e) => ({
|
|
10858
10862
|
x: e,
|
|
10859
10863
|
y: e
|
|
10860
10864
|
}), Bb = {
|
|
@@ -10867,7 +10871,7 @@ const zb = ["top", "right", "bottom", "left"], Tn = Math.min, _t = Math.max, Lo
|
|
|
10867
10871
|
end: "start"
|
|
10868
10872
|
};
|
|
10869
10873
|
function yi(e, t, n) {
|
|
10870
|
-
return
|
|
10874
|
+
return jt(e, Tn(t, n));
|
|
10871
10875
|
}
|
|
10872
10876
|
function xn(e, t) {
|
|
10873
10877
|
return typeof e == "function" ? e(t) : e;
|
|
@@ -11457,8 +11461,8 @@ const ny = function(e) {
|
|
|
11457
11461
|
const w = v - d.top - d.bottom, y = b - d.left - d.right, R = Tn(v - d[g], w), S = Tn(b - d[x], y), C = !t.middlewareData.shift;
|
|
11458
11462
|
let k = R, E = S;
|
|
11459
11463
|
if ((n = t.middlewareData.shift) != null && n.enabled.x && (E = y), (r = t.middlewareData.shift) != null && r.enabled.y && (k = w), C && !h) {
|
|
11460
|
-
const _ =
|
|
11461
|
-
m ? E = b - 2 * (_ !== 0 || I !== 0 ? _ + I :
|
|
11464
|
+
const _ = jt(d.left, 0), I = jt(d.right, 0), F = jt(d.top, 0), V = jt(d.bottom, 0);
|
|
11465
|
+
m ? E = b - 2 * (_ !== 0 || I !== 0 ? _ + I : jt(d.left, d.right)) : k = v - 2 * (F !== 0 || V !== 0 ? F + V : jt(d.top, d.bottom));
|
|
11462
11466
|
}
|
|
11463
11467
|
await c({
|
|
11464
11468
|
...t,
|
|
@@ -11480,7 +11484,7 @@ function gs() {
|
|
|
11480
11484
|
function xr(e) {
|
|
11481
11485
|
return Sd(e) ? (e.nodeName || "").toLowerCase() : "#document";
|
|
11482
11486
|
}
|
|
11483
|
-
function
|
|
11487
|
+
function Mt(e) {
|
|
11484
11488
|
var t;
|
|
11485
11489
|
return (e == null || (t = e.ownerDocument) == null ? void 0 : t.defaultView) || window;
|
|
11486
11490
|
}
|
|
@@ -11489,16 +11493,16 @@ function hn(e) {
|
|
|
11489
11493
|
return (t = (Sd(e) ? e.ownerDocument : e.document) || window.document) == null ? void 0 : t.documentElement;
|
|
11490
11494
|
}
|
|
11491
11495
|
function Sd(e) {
|
|
11492
|
-
return gs() ? e instanceof Node || e instanceof
|
|
11496
|
+
return gs() ? e instanceof Node || e instanceof Mt(e).Node : !1;
|
|
11493
11497
|
}
|
|
11494
|
-
function
|
|
11495
|
-
return gs() ? e instanceof Element || e instanceof
|
|
11498
|
+
function Zt(e) {
|
|
11499
|
+
return gs() ? e instanceof Element || e instanceof Mt(e).Element : !1;
|
|
11496
11500
|
}
|
|
11497
11501
|
function un(e) {
|
|
11498
|
-
return gs() ? e instanceof HTMLElement || e instanceof
|
|
11502
|
+
return gs() ? e instanceof HTMLElement || e instanceof Mt(e).HTMLElement : !1;
|
|
11499
11503
|
}
|
|
11500
11504
|
function sc(e) {
|
|
11501
|
-
return !gs() || typeof ShadowRoot > "u" ? !1 : e instanceof ShadowRoot || e instanceof
|
|
11505
|
+
return !gs() || typeof ShadowRoot > "u" ? !1 : e instanceof ShadowRoot || e instanceof Mt(e).ShadowRoot;
|
|
11502
11506
|
}
|
|
11503
11507
|
const iy = /* @__PURE__ */ new Set(["inline", "contents"]);
|
|
11504
11508
|
function Yr(e) {
|
|
@@ -11507,7 +11511,7 @@ function Yr(e) {
|
|
|
11507
11511
|
overflowX: n,
|
|
11508
11512
|
overflowY: r,
|
|
11509
11513
|
display: o
|
|
11510
|
-
} =
|
|
11514
|
+
} = Qt(e);
|
|
11511
11515
|
return /auto|scroll|overlay|hidden|clip/.test(t + r + n) && !iy.has(o);
|
|
11512
11516
|
}
|
|
11513
11517
|
const ay = /* @__PURE__ */ new Set(["table", "td", "th"]);
|
|
@@ -11526,7 +11530,7 @@ function xs(e) {
|
|
|
11526
11530
|
}
|
|
11527
11531
|
const uy = ["transform", "translate", "scale", "rotate", "perspective"], dy = ["transform", "translate", "scale", "rotate", "perspective", "filter"], fy = ["paint", "layout", "strict", "content"];
|
|
11528
11532
|
function pa(e) {
|
|
11529
|
-
const t = ma(), n =
|
|
11533
|
+
const t = ma(), n = Zt(e) ? Qt(e) : e;
|
|
11530
11534
|
return uy.some((r) => n[r] ? n[r] !== "none" : !1) || (n.containerType ? n.containerType !== "normal" : !1) || !t && (n.backdropFilter ? n.backdropFilter !== "none" : !1) || !t && (n.filter ? n.filter !== "none" : !1) || dy.some((r) => (n.willChange || "").includes(r)) || fy.some((r) => (n.contain || "").includes(r));
|
|
11531
11535
|
}
|
|
11532
11536
|
function hy(e) {
|
|
@@ -11547,11 +11551,11 @@ const py = /* @__PURE__ */ new Set(["html", "body", "#document"]);
|
|
|
11547
11551
|
function ur(e) {
|
|
11548
11552
|
return py.has(xr(e));
|
|
11549
11553
|
}
|
|
11550
|
-
function
|
|
11551
|
-
return
|
|
11554
|
+
function Qt(e) {
|
|
11555
|
+
return Mt(e).getComputedStyle(e);
|
|
11552
11556
|
}
|
|
11553
11557
|
function vs(e) {
|
|
11554
|
-
return
|
|
11558
|
+
return Zt(e) ? {
|
|
11555
11559
|
scrollLeft: e.scrollLeft,
|
|
11556
11560
|
scrollTop: e.scrollTop
|
|
11557
11561
|
} : {
|
|
@@ -11578,7 +11582,7 @@ function Cd(e) {
|
|
|
11578
11582
|
function Fr(e, t, n) {
|
|
11579
11583
|
var r;
|
|
11580
11584
|
t === void 0 && (t = []), n === void 0 && (n = !0);
|
|
11581
|
-
const o = Cd(e), s = o === ((r = e.ownerDocument) == null ? void 0 : r.body), i =
|
|
11585
|
+
const o = Cd(e), s = o === ((r = e.ownerDocument) == null ? void 0 : r.body), i = Mt(o);
|
|
11582
11586
|
if (s) {
|
|
11583
11587
|
const a = Ci(i);
|
|
11584
11588
|
return t.concat(i, i.visualViewport || [], Yr(o) ? o : [], a && n ? Fr(a) : []);
|
|
@@ -11589,7 +11593,7 @@ function Ci(e) {
|
|
|
11589
11593
|
return e.parent && Object.getPrototypeOf(e.parent) ? e.frameElement : null;
|
|
11590
11594
|
}
|
|
11591
11595
|
function Td(e) {
|
|
11592
|
-
const t =
|
|
11596
|
+
const t = Qt(e);
|
|
11593
11597
|
let n = parseFloat(t.width) || 0, r = parseFloat(t.height) || 0;
|
|
11594
11598
|
const o = un(e), s = o ? e.offsetWidth : n, i = o ? e.offsetHeight : r, a = Lo(n) !== s || Lo(r) !== i;
|
|
11595
11599
|
return a && (n = s, r = i), {
|
|
@@ -11599,7 +11603,7 @@ function Td(e) {
|
|
|
11599
11603
|
};
|
|
11600
11604
|
}
|
|
11601
11605
|
function ga(e) {
|
|
11602
|
-
return
|
|
11606
|
+
return Zt(e) ? e : e.contextElement;
|
|
11603
11607
|
}
|
|
11604
11608
|
function ir(e) {
|
|
11605
11609
|
const t = ga(e);
|
|
@@ -11618,28 +11622,28 @@ function ir(e) {
|
|
|
11618
11622
|
}
|
|
11619
11623
|
const my = /* @__PURE__ */ cn(0);
|
|
11620
11624
|
function Rd(e) {
|
|
11621
|
-
const t =
|
|
11625
|
+
const t = Mt(e);
|
|
11622
11626
|
return !ma() || !t.visualViewport ? my : {
|
|
11623
11627
|
x: t.visualViewport.offsetLeft,
|
|
11624
11628
|
y: t.visualViewport.offsetTop
|
|
11625
11629
|
};
|
|
11626
11630
|
}
|
|
11627
11631
|
function gy(e, t, n) {
|
|
11628
|
-
return t === void 0 && (t = !1), !n || t && n !==
|
|
11632
|
+
return t === void 0 && (t = !1), !n || t && n !== Mt(e) ? !1 : t;
|
|
11629
11633
|
}
|
|
11630
11634
|
function Wn(e, t, n, r) {
|
|
11631
11635
|
t === void 0 && (t = !1), n === void 0 && (n = !1);
|
|
11632
11636
|
const o = e.getBoundingClientRect(), s = ga(e);
|
|
11633
11637
|
let i = cn(1);
|
|
11634
|
-
t && (r ?
|
|
11638
|
+
t && (r ? Zt(r) && (i = ir(r)) : i = ir(e));
|
|
11635
11639
|
const a = gy(s, n, r) ? Rd(s) : cn(0);
|
|
11636
11640
|
let c = (o.left + a.x) / i.x, u = (o.top + a.y) / i.y, d = o.width / i.x, f = o.height / i.y;
|
|
11637
11641
|
if (s) {
|
|
11638
|
-
const h =
|
|
11642
|
+
const h = Mt(s), m = r && Zt(r) ? Mt(r) : r;
|
|
11639
11643
|
let b = h, v = Ci(b);
|
|
11640
11644
|
for (; v && r && m !== b; ) {
|
|
11641
|
-
const g = ir(v), x = v.getBoundingClientRect(), w =
|
|
11642
|
-
c *= g.x, u *= g.y, d *= g.x, f *= g.y, c += y, u += R, b =
|
|
11645
|
+
const g = ir(v), x = v.getBoundingClientRect(), w = Qt(v), y = x.left + (v.clientLeft + parseFloat(w.paddingLeft)) * g.x, R = x.top + (v.clientTop + parseFloat(w.paddingTop)) * g.y;
|
|
11646
|
+
c *= g.x, u *= g.y, d *= g.x, f *= g.y, c += y, u += R, b = Mt(v), v = Ci(b);
|
|
11643
11647
|
}
|
|
11644
11648
|
}
|
|
11645
11649
|
return Fo({
|
|
@@ -11695,10 +11699,10 @@ function vy(e) {
|
|
|
11695
11699
|
return Array.from(e.getClientRects());
|
|
11696
11700
|
}
|
|
11697
11701
|
function wy(e) {
|
|
11698
|
-
const t = hn(e), n = vs(e), r = e.ownerDocument.body, o =
|
|
11702
|
+
const t = hn(e), n = vs(e), r = e.ownerDocument.body, o = jt(t.scrollWidth, t.clientWidth, r.scrollWidth, r.clientWidth), s = jt(t.scrollHeight, t.clientHeight, r.scrollHeight, r.clientHeight);
|
|
11699
11703
|
let i = -n.scrollLeft + xa(e);
|
|
11700
11704
|
const a = -n.scrollTop;
|
|
11701
|
-
return
|
|
11705
|
+
return Qt(r).direction === "rtl" && (i += jt(t.clientWidth, r.clientWidth) - o), {
|
|
11702
11706
|
width: o,
|
|
11703
11707
|
height: s,
|
|
11704
11708
|
x: i,
|
|
@@ -11706,7 +11710,7 @@ function wy(e) {
|
|
|
11706
11710
|
};
|
|
11707
11711
|
}
|
|
11708
11712
|
function by(e, t) {
|
|
11709
|
-
const n =
|
|
11713
|
+
const n = Mt(e), r = hn(e), o = n.visualViewport;
|
|
11710
11714
|
let s = r.clientWidth, i = r.clientHeight, a = 0, c = 0;
|
|
11711
11715
|
if (o) {
|
|
11712
11716
|
s = o.width, i = o.height;
|
|
@@ -11736,7 +11740,7 @@ function ic(e, t, n) {
|
|
|
11736
11740
|
r = by(e, n);
|
|
11737
11741
|
else if (t === "document")
|
|
11738
11742
|
r = wy(hn(e));
|
|
11739
|
-
else if (
|
|
11743
|
+
else if (Zt(t))
|
|
11740
11744
|
r = Sy(t, n);
|
|
11741
11745
|
else {
|
|
11742
11746
|
const o = Rd(e);
|
|
@@ -11751,17 +11755,17 @@ function ic(e, t, n) {
|
|
|
11751
11755
|
}
|
|
11752
11756
|
function Ed(e, t) {
|
|
11753
11757
|
const n = Rn(e);
|
|
11754
|
-
return n === t || !
|
|
11758
|
+
return n === t || !Zt(n) || ur(n) ? !1 : Qt(n).position === "fixed" || Ed(n, t);
|
|
11755
11759
|
}
|
|
11756
11760
|
function Cy(e, t) {
|
|
11757
11761
|
const n = t.get(e);
|
|
11758
11762
|
if (n)
|
|
11759
11763
|
return n;
|
|
11760
|
-
let r = Fr(e, [], !1).filter((a) =>
|
|
11761
|
-
const s =
|
|
11764
|
+
let r = Fr(e, [], !1).filter((a) => Zt(a) && xr(a) !== "body"), o = null;
|
|
11765
|
+
const s = Qt(e).position === "fixed";
|
|
11762
11766
|
let i = s ? Rn(e) : e;
|
|
11763
|
-
for (;
|
|
11764
|
-
const a =
|
|
11767
|
+
for (; Zt(i) && !ur(i); ) {
|
|
11768
|
+
const a = Qt(i), c = pa(i);
|
|
11765
11769
|
!c && a.position === "fixed" && (o = null), (s ? !c && !o : !c && a.position === "static" && !!o && yy.has(o.position) || Yr(i) && !c && Ed(e, i)) ? r = r.filter((d) => d !== i) : o = a, i = Rn(i);
|
|
11766
11770
|
}
|
|
11767
11771
|
return t.set(e, r), r;
|
|
@@ -11775,7 +11779,7 @@ function Ty(e) {
|
|
|
11775
11779
|
} = e;
|
|
11776
11780
|
const i = [...n === "clippingAncestors" ? xs(t) ? [] : Cy(t, this._c) : [].concat(n), r], a = i[0], c = i.reduce((u, d) => {
|
|
11777
11781
|
const f = ic(t, d, o);
|
|
11778
|
-
return u.top =
|
|
11782
|
+
return u.top = jt(f.top, u.top), u.right = Tn(f.right, u.right), u.bottom = Tn(f.bottom, u.bottom), u.left = jt(f.left, u.left), u;
|
|
11779
11783
|
}, ic(t, a, o));
|
|
11780
11784
|
return {
|
|
11781
11785
|
width: c.right - c.left,
|
|
@@ -11819,10 +11823,10 @@ function ky(e, t, n) {
|
|
|
11819
11823
|
};
|
|
11820
11824
|
}
|
|
11821
11825
|
function Zs(e) {
|
|
11822
|
-
return
|
|
11826
|
+
return Qt(e).position === "static";
|
|
11823
11827
|
}
|
|
11824
11828
|
function ac(e, t) {
|
|
11825
|
-
if (!un(e) ||
|
|
11829
|
+
if (!un(e) || Qt(e).position === "fixed")
|
|
11826
11830
|
return null;
|
|
11827
11831
|
if (t)
|
|
11828
11832
|
return t(e);
|
|
@@ -11830,13 +11834,13 @@ function ac(e, t) {
|
|
|
11830
11834
|
return hn(e) === n && (n = n.ownerDocument.body), n;
|
|
11831
11835
|
}
|
|
11832
11836
|
function Id(e, t) {
|
|
11833
|
-
const n =
|
|
11837
|
+
const n = Mt(e);
|
|
11834
11838
|
if (xs(e))
|
|
11835
11839
|
return n;
|
|
11836
11840
|
if (!un(e)) {
|
|
11837
11841
|
let o = Rn(e);
|
|
11838
11842
|
for (; o && !ur(o); ) {
|
|
11839
|
-
if (
|
|
11843
|
+
if (Zt(o) && !Zs(o))
|
|
11840
11844
|
return o;
|
|
11841
11845
|
o = Rn(o);
|
|
11842
11846
|
}
|
|
@@ -11860,7 +11864,7 @@ const Ey = async function(e) {
|
|
|
11860
11864
|
};
|
|
11861
11865
|
};
|
|
11862
11866
|
function Iy(e) {
|
|
11863
|
-
return
|
|
11867
|
+
return Qt(e).direction === "rtl";
|
|
11864
11868
|
}
|
|
11865
11869
|
const Ny = {
|
|
11866
11870
|
convertOffsetParentRelativeRectToViewportRelativeRect: xy,
|
|
@@ -11871,7 +11875,7 @@ const Ny = {
|
|
|
11871
11875
|
getClientRects: vy,
|
|
11872
11876
|
getDimensions: Ry,
|
|
11873
11877
|
getScale: ir,
|
|
11874
|
-
isElement:
|
|
11878
|
+
isElement: Zt,
|
|
11875
11879
|
isRTL: Iy
|
|
11876
11880
|
};
|
|
11877
11881
|
function Nd(e, t) {
|
|
@@ -11896,7 +11900,7 @@ function Ay(e, t) {
|
|
|
11896
11900
|
return;
|
|
11897
11901
|
const b = lo(f), v = lo(o.clientWidth - (d + h)), g = lo(o.clientHeight - (f + m)), x = lo(d), y = {
|
|
11898
11902
|
rootMargin: -b + "px " + -v + "px " + -g + "px " + -x + "px",
|
|
11899
|
-
threshold:
|
|
11903
|
+
threshold: jt(0, Tn(1, c)) || 1
|
|
11900
11904
|
};
|
|
11901
11905
|
let R = !0;
|
|
11902
11906
|
function S(C) {
|
|
@@ -12616,17 +12620,17 @@ var ya = "MenuPortal", [R0, nf] = Xn(ya, {
|
|
|
12616
12620
|
forceMount: void 0
|
|
12617
12621
|
}), rf = (e) => {
|
|
12618
12622
|
const { __scopeMenu: t, forceMount: n, children: r, container: o } = e, s = Jn(ya, t);
|
|
12619
|
-
return /* @__PURE__ */ l.jsx(R0, { scope: t, forceMount: n, children: /* @__PURE__ */ l.jsx(
|
|
12623
|
+
return /* @__PURE__ */ l.jsx(R0, { scope: t, forceMount: n, children: /* @__PURE__ */ l.jsx(Dt, { present: n || s.open, children: /* @__PURE__ */ l.jsx(ls, { asChild: !0, container: o, children: r }) }) });
|
|
12620
12624
|
};
|
|
12621
12625
|
rf.displayName = ya;
|
|
12622
|
-
var
|
|
12626
|
+
var Vt = "MenuContent", [k0, Sa] = Xn(Vt), of = p.forwardRef(
|
|
12623
12627
|
(e, t) => {
|
|
12624
|
-
const n = nf(
|
|
12625
|
-
return /* @__PURE__ */ l.jsx(zr.Provider, { scope: e.__scopeMenu, children: /* @__PURE__ */ l.jsx(
|
|
12628
|
+
const n = nf(Vt, e.__scopeMenu), { forceMount: r = n.forceMount, ...o } = e, s = Jn(Vt, e.__scopeMenu), i = Zr(Vt, e.__scopeMenu);
|
|
12629
|
+
return /* @__PURE__ */ l.jsx(zr.Provider, { scope: e.__scopeMenu, children: /* @__PURE__ */ l.jsx(Dt, { present: r || s.open, children: /* @__PURE__ */ l.jsx(zr.Slot, { scope: e.__scopeMenu, children: i.modal ? /* @__PURE__ */ l.jsx(E0, { ...o, ref: t }) : /* @__PURE__ */ l.jsx(I0, { ...o, ref: t }) }) }) });
|
|
12626
12630
|
}
|
|
12627
12631
|
), E0 = p.forwardRef(
|
|
12628
12632
|
(e, t) => {
|
|
12629
|
-
const n = Jn(
|
|
12633
|
+
const n = Jn(Vt, e.__scopeMenu), r = p.useRef(null), o = Me(t, r);
|
|
12630
12634
|
return p.useEffect(() => {
|
|
12631
12635
|
const s = r.current;
|
|
12632
12636
|
if (s) return ia(s);
|
|
@@ -12648,7 +12652,7 @@ var Ut = "MenuContent", [k0, Sa] = Xn(Ut), of = p.forwardRef(
|
|
|
12648
12652
|
);
|
|
12649
12653
|
}
|
|
12650
12654
|
), I0 = p.forwardRef((e, t) => {
|
|
12651
|
-
const n = Jn(
|
|
12655
|
+
const n = Jn(Vt, e.__scopeMenu);
|
|
12652
12656
|
return /* @__PURE__ */ l.jsx(
|
|
12653
12657
|
Ca,
|
|
12654
12658
|
{
|
|
@@ -12677,7 +12681,7 @@ var Ut = "MenuContent", [k0, Sa] = Xn(Ut), of = p.forwardRef(
|
|
|
12677
12681
|
onDismiss: m,
|
|
12678
12682
|
disableOutsideScroll: b,
|
|
12679
12683
|
...v
|
|
12680
|
-
} = e, g = Jn(
|
|
12684
|
+
} = e, g = Jn(Vt, n), x = Zr(Vt, n), w = bs(n), y = ef(n), R = b0(n), [S, C] = p.useState(null), k = p.useRef(null), E = Me(t, k, g.onContentChange), N = p.useRef(0), _ = p.useRef(""), I = p.useRef(0), F = p.useRef(null), V = p.useRef("right"), P = p.useRef(0), G = b ? us : p.Fragment, W = b ? { as: N0, allowPinchZoom: !0 } : void 0, K = (O) => {
|
|
12681
12685
|
var L, j;
|
|
12682
12686
|
const ie = _.current + O, J = R().filter((H) => !H.disabled), ee = document.activeElement, M = (L = J.find((H) => H.ref.current === ee)) == null ? void 0 : L.textValue, Z = J.map((H) => H.textValue), Re = B0(Z, ie, M), fe = (j = J.find((H) => H.textValue === Re)) == null ? void 0 : j.ref.current;
|
|
12683
12687
|
(function H(Q) {
|
|
@@ -12797,7 +12801,7 @@ var Ut = "MenuContent", [k0, Sa] = Xn(Ut), of = p.forwardRef(
|
|
|
12797
12801
|
);
|
|
12798
12802
|
}
|
|
12799
12803
|
);
|
|
12800
|
-
of.displayName =
|
|
12804
|
+
of.displayName = Vt;
|
|
12801
12805
|
var A0 = "MenuGroup", Ta = p.forwardRef(
|
|
12802
12806
|
(e, t) => {
|
|
12803
12807
|
const { __scopeMenu: n, ...r } = e;
|
|
@@ -12946,7 +12950,7 @@ var Ra = "MenuItemIndicator", [hf, M0] = Xn(
|
|
|
12946
12950
|
(e, t) => {
|
|
12947
12951
|
const { __scopeMenu: n, forceMount: r, ...o } = e, s = M0(Ra, n);
|
|
12948
12952
|
return /* @__PURE__ */ l.jsx(
|
|
12949
|
-
|
|
12953
|
+
Dt,
|
|
12950
12954
|
{
|
|
12951
12955
|
present: r || Ho(s.checked) || s.checked === !0,
|
|
12952
12956
|
children: /* @__PURE__ */ l.jsx(
|
|
@@ -13057,8 +13061,8 @@ var $0 = "MenuSub", [yT, xf] = Xn($0), Er = "MenuSubTrigger", vf = p.forwardRef(
|
|
|
13057
13061
|
vf.displayName = Er;
|
|
13058
13062
|
var wf = "MenuSubContent", bf = p.forwardRef(
|
|
13059
13063
|
(e, t) => {
|
|
13060
|
-
const n = nf(
|
|
13061
|
-
return /* @__PURE__ */ l.jsx(zr.Provider, { scope: e.__scopeMenu, children: /* @__PURE__ */ l.jsx(
|
|
13064
|
+
const n = nf(Vt, e.__scopeMenu), { forceMount: r = n.forceMount, ...o } = e, s = Jn(Vt, e.__scopeMenu), i = Zr(Vt, e.__scopeMenu), a = xf(wf, e.__scopeMenu), c = p.useRef(null), u = Me(t, c);
|
|
13065
|
+
return /* @__PURE__ */ l.jsx(zr.Provider, { scope: e.__scopeMenu, children: /* @__PURE__ */ l.jsx(Dt, { present: r || s.open, children: /* @__PURE__ */ l.jsx(zr.Slot, { scope: e.__scopeMenu, children: /* @__PURE__ */ l.jsx(
|
|
13062
13066
|
Ca,
|
|
13063
13067
|
{
|
|
13064
13068
|
id: a.contentId,
|
|
@@ -13476,12 +13480,12 @@ function ti({
|
|
|
13476
13480
|
return k(b).then((Fe) => {
|
|
13477
13481
|
var yr;
|
|
13478
13482
|
if (te) return;
|
|
13479
|
-
const
|
|
13480
|
-
$e(
|
|
13481
|
-
const
|
|
13483
|
+
const $t = ((Fe == null ? void 0 : Fe.checkpoints) ?? []).slice().sort((mn, Sr) => new Date(Sr.createdAt).getTime() - new Date(mn.createdAt).getTime());
|
|
13484
|
+
$e($t);
|
|
13485
|
+
const _t = De, wr = _t && $t.some((mn) => mn.checkpointId === _t) ? _t : ((yr = $t[0]) == null ? void 0 : yr.checkpointId) ?? null;
|
|
13482
13486
|
let br = null;
|
|
13483
13487
|
if (wr) {
|
|
13484
|
-
const mn =
|
|
13488
|
+
const mn = $t.find((Sr) => Sr.checkpointId === wr);
|
|
13485
13489
|
br = (mn == null ? void 0 : mn.checkpointNs) ?? null;
|
|
13486
13490
|
}
|
|
13487
13491
|
ve(wr), Be(br), ce.current = pe;
|
|
@@ -13555,8 +13559,8 @@ function ti({
|
|
|
13555
13559
|
$(te, pe);
|
|
13556
13560
|
}, [$]), tt = Ye((te) => {
|
|
13557
13561
|
const pe = (je) => {
|
|
13558
|
-
const Fe = je.content || [],
|
|
13559
|
-
if (
|
|
13562
|
+
const Fe = je.content || [], $t = Fe.filter((_t) => _t.type === "text").map((_t) => _t.text).join("");
|
|
13563
|
+
if ($t) return $t;
|
|
13560
13564
|
try {
|
|
13561
13565
|
return JSON.stringify(Fe, null, 2);
|
|
13562
13566
|
} catch {
|
|
@@ -13575,7 +13579,7 @@ function ti({
|
|
|
13575
13579
|
}, [v, y, De, ke, S, C]), Ne = (te) => {
|
|
13576
13580
|
const pe = Array.from(te.target.files || []);
|
|
13577
13581
|
J((je) => [...je, ...pe]);
|
|
13578
|
-
}, at = (te) => J((pe) => pe.filter((je, Fe) => te !== Fe)),
|
|
13582
|
+
}, at = (te) => J((pe) => pe.filter((je, Fe) => te !== Fe)), Lt = async (te) => {
|
|
13579
13583
|
const pe = (te.target.files || [])[0];
|
|
13580
13584
|
if (pe) {
|
|
13581
13585
|
Re(null), L(null), M(!0);
|
|
@@ -13724,7 +13728,7 @@ function ti({
|
|
|
13724
13728
|
ref: ft,
|
|
13725
13729
|
type: "file",
|
|
13726
13730
|
accept: ".xls,.xlsx,.xlsm",
|
|
13727
|
-
onChange:
|
|
13731
|
+
onChange: Lt,
|
|
13728
13732
|
className: "hidden"
|
|
13729
13733
|
}
|
|
13730
13734
|
),
|
|
@@ -13816,7 +13820,7 @@ function Ei(e, [t, n]) {
|
|
|
13816
13820
|
function PS(e, t) {
|
|
13817
13821
|
return p.useReducer((n, r) => t[n][r] ?? n, e);
|
|
13818
13822
|
}
|
|
13819
|
-
var Ea = "ScrollArea", [qf, CT] = fn(Ea), [OS,
|
|
13823
|
+
var Ea = "ScrollArea", [qf, CT] = fn(Ea), [OS, qt] = qf(Ea), Gf = p.forwardRef(
|
|
13820
13824
|
(e, t) => {
|
|
13821
13825
|
const {
|
|
13822
13826
|
__scopeScrollArea: n,
|
|
@@ -13869,7 +13873,7 @@ var Ea = "ScrollArea", [qf, CT] = fn(Ea), [OS, Vt] = qf(Ea), Gf = p.forwardRef(
|
|
|
13869
13873
|
Gf.displayName = Ea;
|
|
13870
13874
|
var Yf = "ScrollAreaViewport", Xf = p.forwardRef(
|
|
13871
13875
|
(e, t) => {
|
|
13872
|
-
const { __scopeScrollArea: n, children: r, nonce: o, ...s } = e, i =
|
|
13876
|
+
const { __scopeScrollArea: n, children: r, nonce: o, ...s } = e, i = qt(Yf, n), a = p.useRef(null), c = Me(t, a, i.onViewportChange);
|
|
13873
13877
|
return /* @__PURE__ */ l.jsxs(l.Fragment, { children: [
|
|
13874
13878
|
/* @__PURE__ */ l.jsx(
|
|
13875
13879
|
"style",
|
|
@@ -13911,7 +13915,7 @@ var Yf = "ScrollAreaViewport", Xf = p.forwardRef(
|
|
|
13911
13915
|
Xf.displayName = Yf;
|
|
13912
13916
|
var pn = "ScrollAreaScrollbar", Ia = p.forwardRef(
|
|
13913
13917
|
(e, t) => {
|
|
13914
|
-
const { forceMount: n, ...r } = e, o =
|
|
13918
|
+
const { forceMount: n, ...r } = e, o = qt(pn, e.__scopeScrollArea), { onScrollbarXEnabledChange: s, onScrollbarYEnabledChange: i } = o, a = e.orientation === "horizontal";
|
|
13915
13919
|
return p.useEffect(() => (a ? s(!0) : i(!0), () => {
|
|
13916
13920
|
a ? s(!1) : i(!1);
|
|
13917
13921
|
}), [a, s, i]), o.type === "hover" ? /* @__PURE__ */ l.jsx(MS, { ...r, ref: t, forceMount: n }) : o.type === "scroll" ? /* @__PURE__ */ l.jsx(DS, { ...r, ref: t, forceMount: n }) : o.type === "auto" ? /* @__PURE__ */ l.jsx(Jf, { ...r, ref: t, forceMount: n }) : o.type === "always" ? /* @__PURE__ */ l.jsx(Na, { ...r, ref: t }) : null;
|
|
@@ -13919,7 +13923,7 @@ var pn = "ScrollAreaScrollbar", Ia = p.forwardRef(
|
|
|
13919
13923
|
);
|
|
13920
13924
|
Ia.displayName = pn;
|
|
13921
13925
|
var MS = p.forwardRef((e, t) => {
|
|
13922
|
-
const { forceMount: n, ...r } = e, o =
|
|
13926
|
+
const { forceMount: n, ...r } = e, o = qt(pn, e.__scopeScrollArea), [s, i] = p.useState(!1);
|
|
13923
13927
|
return p.useEffect(() => {
|
|
13924
13928
|
const a = o.scrollArea;
|
|
13925
13929
|
let c = 0;
|
|
@@ -13933,7 +13937,7 @@ var MS = p.forwardRef((e, t) => {
|
|
|
13933
13937
|
window.clearTimeout(c), a.removeEventListener("pointerenter", u), a.removeEventListener("pointerleave", d);
|
|
13934
13938
|
};
|
|
13935
13939
|
}
|
|
13936
|
-
}, [o.scrollArea, o.scrollHideDelay]), /* @__PURE__ */ l.jsx(
|
|
13940
|
+
}, [o.scrollArea, o.scrollHideDelay]), /* @__PURE__ */ l.jsx(Dt, { present: n || s, children: /* @__PURE__ */ l.jsx(
|
|
13937
13941
|
Jf,
|
|
13938
13942
|
{
|
|
13939
13943
|
"data-state": s ? "visible" : "hidden",
|
|
@@ -13942,7 +13946,7 @@ var MS = p.forwardRef((e, t) => {
|
|
|
13942
13946
|
}
|
|
13943
13947
|
) });
|
|
13944
13948
|
}), DS = p.forwardRef((e, t) => {
|
|
13945
|
-
const { forceMount: n, ...r } = e, o =
|
|
13949
|
+
const { forceMount: n, ...r } = e, o = qt(pn, e.__scopeScrollArea), s = e.orientation === "horizontal", i = Ts(() => c("SCROLL_END"), 100), [a, c] = PS("hidden", {
|
|
13946
13950
|
hidden: {
|
|
13947
13951
|
SCROLL: "scrolling"
|
|
13948
13952
|
},
|
|
@@ -13975,7 +13979,7 @@ var MS = p.forwardRef((e, t) => {
|
|
|
13975
13979
|
};
|
|
13976
13980
|
return u.addEventListener("scroll", h), () => u.removeEventListener("scroll", h);
|
|
13977
13981
|
}
|
|
13978
|
-
}, [o.viewport, s, c, i]), /* @__PURE__ */ l.jsx(
|
|
13982
|
+
}, [o.viewport, s, c, i]), /* @__PURE__ */ l.jsx(Dt, { present: n || a !== "hidden", children: /* @__PURE__ */ l.jsx(
|
|
13979
13983
|
Na,
|
|
13980
13984
|
{
|
|
13981
13985
|
"data-state": a === "hidden" ? "hidden" : "visible",
|
|
@@ -13986,13 +13990,13 @@ var MS = p.forwardRef((e, t) => {
|
|
|
13986
13990
|
}
|
|
13987
13991
|
) });
|
|
13988
13992
|
}), Jf = p.forwardRef((e, t) => {
|
|
13989
|
-
const n =
|
|
13993
|
+
const n = qt(pn, e.__scopeScrollArea), { forceMount: r, ...o } = e, [s, i] = p.useState(!1), a = e.orientation === "horizontal", c = Ts(() => {
|
|
13990
13994
|
if (n.viewport) {
|
|
13991
13995
|
const u = n.viewport.offsetWidth < n.viewport.scrollWidth, d = n.viewport.offsetHeight < n.viewport.scrollHeight;
|
|
13992
13996
|
i(a ? u : d);
|
|
13993
13997
|
}
|
|
13994
13998
|
}, 10);
|
|
13995
|
-
return dr(n.viewport, c), dr(n.content, c), /* @__PURE__ */ l.jsx(
|
|
13999
|
+
return dr(n.viewport, c), dr(n.content, c), /* @__PURE__ */ l.jsx(Dt, { present: r || s, children: /* @__PURE__ */ l.jsx(
|
|
13996
14000
|
Na,
|
|
13997
14001
|
{
|
|
13998
14002
|
"data-state": s ? "visible" : "hidden",
|
|
@@ -14001,7 +14005,7 @@ var MS = p.forwardRef((e, t) => {
|
|
|
14001
14005
|
}
|
|
14002
14006
|
) });
|
|
14003
14007
|
}), Na = p.forwardRef((e, t) => {
|
|
14004
|
-
const { orientation: n = "vertical", ...r } = e, o =
|
|
14008
|
+
const { orientation: n = "vertical", ...r } = e, o = qt(pn, e.__scopeScrollArea), s = p.useRef(null), i = p.useRef(0), [a, c] = p.useState({
|
|
14005
14009
|
content: 0,
|
|
14006
14010
|
viewport: 0,
|
|
14007
14011
|
scrollbar: { size: 0, paddingStart: 0, paddingEnd: 0 }
|
|
@@ -14055,7 +14059,7 @@ var MS = p.forwardRef((e, t) => {
|
|
|
14055
14059
|
}
|
|
14056
14060
|
) : null;
|
|
14057
14061
|
}), LS = p.forwardRef((e, t) => {
|
|
14058
|
-
const { sizes: n, onSizesChange: r, ...o } = e, s =
|
|
14062
|
+
const { sizes: n, onSizesChange: r, ...o } = e, s = qt(pn, e.__scopeScrollArea), [i, a] = p.useState(), c = p.useRef(null), u = Me(t, c, s.onScrollbarXChange);
|
|
14059
14063
|
return p.useEffect(() => {
|
|
14060
14064
|
c.current && a(getComputedStyle(c.current));
|
|
14061
14065
|
}, [c]), /* @__PURE__ */ l.jsx(
|
|
@@ -14094,7 +14098,7 @@ var MS = p.forwardRef((e, t) => {
|
|
|
14094
14098
|
}
|
|
14095
14099
|
);
|
|
14096
14100
|
}), $S = p.forwardRef((e, t) => {
|
|
14097
|
-
const { sizes: n, onSizesChange: r, ...o } = e, s =
|
|
14101
|
+
const { sizes: n, onSizesChange: r, ...o } = e, s = qt(pn, e.__scopeScrollArea), [i, a] = p.useState(), c = p.useRef(null), u = Me(t, c, s.onScrollbarYChange);
|
|
14098
14102
|
return p.useEffect(() => {
|
|
14099
14103
|
c.current && a(getComputedStyle(c.current));
|
|
14100
14104
|
}, [c]), /* @__PURE__ */ l.jsx(
|
|
@@ -14146,7 +14150,7 @@ var MS = p.forwardRef((e, t) => {
|
|
|
14146
14150
|
onWheelScroll: d,
|
|
14147
14151
|
onResize: f,
|
|
14148
14152
|
...h
|
|
14149
|
-
} = e, m =
|
|
14153
|
+
} = e, m = qt(pn, n), [b, v] = p.useState(null), g = Me(t, (N) => v(N)), x = p.useRef(null), w = p.useRef(""), y = m.viewport, R = r.content - r.viewport, S = gt(d), C = gt(c), k = Ts(f, 10);
|
|
14150
14154
|
function E(N) {
|
|
14151
14155
|
if (x.current) {
|
|
14152
14156
|
const _ = N.clientX - x.current.left, I = N.clientY - x.current.top;
|
|
@@ -14190,11 +14194,11 @@ var MS = p.forwardRef((e, t) => {
|
|
|
14190
14194
|
}), Wo = "ScrollAreaThumb", eh = p.forwardRef(
|
|
14191
14195
|
(e, t) => {
|
|
14192
14196
|
const { forceMount: n, ...r } = e, o = Zf(Wo, e.__scopeScrollArea);
|
|
14193
|
-
return /* @__PURE__ */ l.jsx(
|
|
14197
|
+
return /* @__PURE__ */ l.jsx(Dt, { present: n || o.hasThumb, children: /* @__PURE__ */ l.jsx(zS, { ref: t, ...r }) });
|
|
14194
14198
|
}
|
|
14195
14199
|
), zS = p.forwardRef(
|
|
14196
14200
|
(e, t) => {
|
|
14197
|
-
const { __scopeScrollArea: n, style: r, ...o } = e, s =
|
|
14201
|
+
const { __scopeScrollArea: n, style: r, ...o } = e, s = qt(Wo, n), i = Zf(Wo, n), { onThumbPositionChange: a } = i, c = Me(
|
|
14198
14202
|
t,
|
|
14199
14203
|
(f) => i.onThumbChange(f)
|
|
14200
14204
|
), u = p.useRef(void 0), d = Ts(() => {
|
|
@@ -14234,13 +14238,13 @@ var MS = p.forwardRef((e, t) => {
|
|
|
14234
14238
|
eh.displayName = Wo;
|
|
14235
14239
|
var Aa = "ScrollAreaCorner", th = p.forwardRef(
|
|
14236
14240
|
(e, t) => {
|
|
14237
|
-
const n =
|
|
14241
|
+
const n = qt(Aa, e.__scopeScrollArea), r = !!(n.scrollbarX && n.scrollbarY);
|
|
14238
14242
|
return n.type !== "scroll" && r ? /* @__PURE__ */ l.jsx(BS, { ...e, ref: t }) : null;
|
|
14239
14243
|
}
|
|
14240
14244
|
);
|
|
14241
14245
|
th.displayName = Aa;
|
|
14242
14246
|
var BS = p.forwardRef((e, t) => {
|
|
14243
|
-
const { __scopeScrollArea: n, ...r } = e, o =
|
|
14247
|
+
const { __scopeScrollArea: n, ...r } = e, o = qt(Aa, n), [s, i] = p.useState(0), [a, c] = p.useState(0), u = !!(s && a);
|
|
14244
14248
|
return dr(o.scrollbarX, () => {
|
|
14245
14249
|
var f;
|
|
14246
14250
|
const d = ((f = o.scrollbarX) == null ? void 0 : f.offsetHeight) || 0;
|
|
@@ -14585,7 +14589,7 @@ dh.displayName = JS;
|
|
|
14585
14589
|
var fh = dh;
|
|
14586
14590
|
const ZS = qo(
|
|
14587
14591
|
"text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70"
|
|
14588
|
-
),
|
|
14592
|
+
), Bt = p.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ l.jsx(
|
|
14589
14593
|
fh,
|
|
14590
14594
|
{
|
|
14591
14595
|
ref: n,
|
|
@@ -14593,7 +14597,7 @@ const ZS = qo(
|
|
|
14593
14597
|
...t
|
|
14594
14598
|
}
|
|
14595
14599
|
));
|
|
14596
|
-
|
|
14600
|
+
Bt.displayName = fh.displayName;
|
|
14597
14601
|
function hh(e) {
|
|
14598
14602
|
const t = p.useRef({ value: e, previous: e });
|
|
14599
14603
|
return p.useMemo(() => (t.current.value !== e && (t.current.previous = t.current.value, t.current.value = e), t.current.previous), [e]);
|
|
@@ -14934,7 +14938,7 @@ var Kn = "SelectContent", Ih = p.forwardRef(
|
|
|
14934
14938
|
}
|
|
14935
14939
|
);
|
|
14936
14940
|
Ih.displayName = Kn;
|
|
14937
|
-
var
|
|
14941
|
+
var Gt = 10, [Nh, An] = vr(Kn), pC = "SelectContentImpl", mC = lr("SelectContent.RemoveScroll"), Ah = p.forwardRef(
|
|
14938
14942
|
(e, t) => {
|
|
14939
14943
|
const {
|
|
14940
14944
|
__scopeSelect: n,
|
|
@@ -15110,24 +15114,24 @@ var gC = "SelectItemAlignedPosition", _h = p.forwardRef((e, t) => {
|
|
|
15110
15114
|
if (s.trigger && s.valueNode && a && u && v && g && x) {
|
|
15111
15115
|
const k = s.trigger.getBoundingClientRect(), E = u.getBoundingClientRect(), N = s.valueNode.getBoundingClientRect(), _ = x.getBoundingClientRect();
|
|
15112
15116
|
if (s.dir !== "rtl") {
|
|
15113
|
-
const le = _.left - E.left, oe = N.left - le, $e = k.left - oe, De = k.width + $e, ve = Math.max(De, E.width), ke = window.innerWidth -
|
|
15114
|
-
|
|
15117
|
+
const le = _.left - E.left, oe = N.left - le, $e = k.left - oe, De = k.width + $e, ve = Math.max(De, E.width), ke = window.innerWidth - Gt, Be = Ei(oe, [
|
|
15118
|
+
Gt,
|
|
15115
15119
|
// Prevents the content from going off the starting edge of the
|
|
15116
15120
|
// viewport. It may still go off the ending edge, but this can be
|
|
15117
15121
|
// controlled by the user since they may want to manage overflow in a
|
|
15118
15122
|
// specific way.
|
|
15119
15123
|
// https://github.com/radix-ui/primitives/issues/2049
|
|
15120
|
-
Math.max(
|
|
15124
|
+
Math.max(Gt, ke - ve)
|
|
15121
15125
|
]);
|
|
15122
15126
|
a.style.minWidth = De + "px", a.style.left = Be + "px";
|
|
15123
15127
|
} else {
|
|
15124
|
-
const le = E.right - _.right, oe = window.innerWidth - N.right - le, $e = window.innerWidth - k.right - oe, De = k.width + $e, ve = Math.max(De, E.width), ke = window.innerWidth -
|
|
15125
|
-
|
|
15126
|
-
Math.max(
|
|
15128
|
+
const le = E.right - _.right, oe = window.innerWidth - N.right - le, $e = window.innerWidth - k.right - oe, De = k.width + $e, ve = Math.max(De, E.width), ke = window.innerWidth - Gt, Be = Ei(oe, [
|
|
15129
|
+
Gt,
|
|
15130
|
+
Math.max(Gt, ke - ve)
|
|
15127
15131
|
]);
|
|
15128
15132
|
a.style.minWidth = De + "px", a.style.right = Be + "px";
|
|
15129
15133
|
}
|
|
15130
|
-
const I = h(), F = window.innerHeight -
|
|
15134
|
+
const I = h(), F = window.innerHeight - Gt * 2, V = v.scrollHeight, P = window.getComputedStyle(u), G = parseInt(P.borderTopWidth, 10), W = parseInt(P.paddingTop, 10), K = parseInt(P.borderBottomWidth, 10), D = parseInt(P.paddingBottom, 10), O = G + W + V + D + K, ie = Math.min(g.offsetHeight * 5, O), J = window.getComputedStyle(v), ee = parseInt(J.paddingTop, 10), M = parseInt(J.paddingBottom, 10), Z = k.top + k.height / 2 - Gt, Re = F - Z, fe = g.offsetHeight / 2, L = g.offsetTop + fe, j = G + W + L, H = O - j;
|
|
15131
15135
|
if (j <= Z) {
|
|
15132
15136
|
const le = I.length > 0 && g === I[I.length - 1].ref.current;
|
|
15133
15137
|
a.style.bottom = "0px";
|
|
@@ -15147,7 +15151,7 @@ var gC = "SelectItemAlignedPosition", _h = p.forwardRef((e, t) => {
|
|
|
15147
15151
|
) + H;
|
|
15148
15152
|
a.style.height = $e + "px", v.scrollTop = j - Z + v.offsetTop;
|
|
15149
15153
|
}
|
|
15150
|
-
a.style.margin = `${
|
|
15154
|
+
a.style.margin = `${Gt}px 0`, a.style.minHeight = ie + "px", a.style.maxHeight = F + "px", r == null || r(), requestAnimationFrame(() => m.current = !0);
|
|
15151
15155
|
}
|
|
15152
15156
|
}, [
|
|
15153
15157
|
h,
|
|
@@ -15214,7 +15218,7 @@ var xC = "SelectPopperPosition", Ii = p.forwardRef((e, t) => {
|
|
|
15214
15218
|
const {
|
|
15215
15219
|
__scopeSelect: n,
|
|
15216
15220
|
align: r = "start",
|
|
15217
|
-
collisionPadding: o =
|
|
15221
|
+
collisionPadding: o = Gt,
|
|
15218
15222
|
...s
|
|
15219
15223
|
} = e, i = Is(n);
|
|
15220
15224
|
return /* @__PURE__ */ l.jsx(
|
|
@@ -15277,7 +15281,7 @@ var [vC, _a] = vr(Kn, {}), Ni = "SelectViewport", jh = p.forwardRef(
|
|
|
15277
15281
|
if (h != null && h.current && f) {
|
|
15278
15282
|
const m = Math.abs(c.current - d.scrollTop);
|
|
15279
15283
|
if (m > 0) {
|
|
15280
|
-
const b = window.innerHeight -
|
|
15284
|
+
const b = window.innerHeight - Gt * 2, v = parseFloat(f.style.minHeight), g = parseFloat(f.style.height), x = Math.max(v, g);
|
|
15281
15285
|
if (x < b) {
|
|
15282
15286
|
const w = x + m, y = Math.min(b, w), R = w - y;
|
|
15283
15287
|
f.style.height = y + "px", f.style.bottom === "0px" && (d.scrollTop = R > 0 ? R : 0, f.style.justifyContent = "flex-end");
|
|
@@ -15905,7 +15909,7 @@ function IT({ settings: e, onSettingsChange: t, className: n = "" }) {
|
|
|
15905
15909
|
] }) }),
|
|
15906
15910
|
/* @__PURE__ */ l.jsxs(Eo, { className: "space-y-4", children: [
|
|
15907
15911
|
/* @__PURE__ */ l.jsxs("div", { className: "space-y-2", children: [
|
|
15908
|
-
/* @__PURE__ */ l.jsx(
|
|
15912
|
+
/* @__PURE__ */ l.jsx(Bt, { htmlFor: "api-url", children: "API Base URL" }),
|
|
15909
15913
|
/* @__PURE__ */ l.jsxs("div", { className: "flex gap-2", children: [
|
|
15910
15914
|
/* @__PURE__ */ l.jsx(
|
|
15911
15915
|
Uo,
|
|
@@ -15923,7 +15927,7 @@ function IT({ settings: e, onSettingsChange: t, className: n = "" }) {
|
|
|
15923
15927
|
] })
|
|
15924
15928
|
] }),
|
|
15925
15929
|
/* @__PURE__ */ l.jsxs("div", { className: "flex items-center justify-between", children: [
|
|
15926
|
-
/* @__PURE__ */ l.jsx(
|
|
15930
|
+
/* @__PURE__ */ l.jsx(Bt, { htmlFor: "enable-auth", children: "Enable Authentication" }),
|
|
15927
15931
|
/* @__PURE__ */ l.jsx(
|
|
15928
15932
|
bn,
|
|
15929
15933
|
{
|
|
@@ -15937,7 +15941,7 @@ function IT({ settings: e, onSettingsChange: t, className: n = "" }) {
|
|
|
15937
15941
|
)
|
|
15938
15942
|
] }),
|
|
15939
15943
|
a.api.enableAuth && /* @__PURE__ */ l.jsxs("div", { className: "space-y-2", children: [
|
|
15940
|
-
/* @__PURE__ */ l.jsx(
|
|
15944
|
+
/* @__PURE__ */ l.jsx(Bt, { htmlFor: "auth-token", children: "Authentication Token" }),
|
|
15941
15945
|
/* @__PURE__ */ l.jsxs("div", { className: "flex gap-2", children: [
|
|
15942
15946
|
/* @__PURE__ */ l.jsx(
|
|
15943
15947
|
Uo,
|
|
@@ -15972,7 +15976,7 @@ function IT({ settings: e, onSettingsChange: t, className: n = "" }) {
|
|
|
15972
15976
|
] }) }),
|
|
15973
15977
|
/* @__PURE__ */ l.jsxs(Eo, { className: "space-y-4", children: [
|
|
15974
15978
|
/* @__PURE__ */ l.jsxs("div", { className: "space-y-2", children: [
|
|
15975
|
-
/* @__PURE__ */ l.jsx(
|
|
15979
|
+
/* @__PURE__ */ l.jsx(Bt, { htmlFor: "layout", children: "Layout Style" }),
|
|
15976
15980
|
/* @__PURE__ */ l.jsxs(
|
|
15977
15981
|
hc,
|
|
15978
15982
|
{
|
|
@@ -15993,7 +15997,7 @@ function IT({ settings: e, onSettingsChange: t, className: n = "" }) {
|
|
|
15993
15997
|
)
|
|
15994
15998
|
] }),
|
|
15995
15999
|
/* @__PURE__ */ l.jsxs("div", { className: "space-y-2", children: [
|
|
15996
|
-
/* @__PURE__ */ l.jsx(
|
|
16000
|
+
/* @__PURE__ */ l.jsx(Bt, { htmlFor: "theme", children: "Theme" }),
|
|
15997
16001
|
/* @__PURE__ */ l.jsxs(
|
|
15998
16002
|
hc,
|
|
15999
16003
|
{
|
|
@@ -16016,7 +16020,7 @@ function IT({ settings: e, onSettingsChange: t, className: n = "" }) {
|
|
|
16016
16020
|
/* @__PURE__ */ l.jsx(ip, {}),
|
|
16017
16021
|
/* @__PURE__ */ l.jsxs("div", { className: "space-y-3", children: [
|
|
16018
16022
|
/* @__PURE__ */ l.jsxs("div", { className: "flex items-center justify-between", children: [
|
|
16019
|
-
/* @__PURE__ */ l.jsx(
|
|
16023
|
+
/* @__PURE__ */ l.jsx(Bt, { htmlFor: "show-timestamps", children: "Show Timestamps" }),
|
|
16020
16024
|
/* @__PURE__ */ l.jsx(
|
|
16021
16025
|
bn,
|
|
16022
16026
|
{
|
|
@@ -16030,7 +16034,7 @@ function IT({ settings: e, onSettingsChange: t, className: n = "" }) {
|
|
|
16030
16034
|
)
|
|
16031
16035
|
] }),
|
|
16032
16036
|
/* @__PURE__ */ l.jsxs("div", { className: "flex items-center justify-between", children: [
|
|
16033
|
-
/* @__PURE__ */ l.jsx(
|
|
16037
|
+
/* @__PURE__ */ l.jsx(Bt, { htmlFor: "show-agent-names", children: "Show Agent Names" }),
|
|
16034
16038
|
/* @__PURE__ */ l.jsx(
|
|
16035
16039
|
bn,
|
|
16036
16040
|
{
|
|
@@ -16044,7 +16048,7 @@ function IT({ settings: e, onSettingsChange: t, className: n = "" }) {
|
|
|
16044
16048
|
)
|
|
16045
16049
|
] }),
|
|
16046
16050
|
/* @__PURE__ */ l.jsxs("div", { className: "flex items-center justify-between", children: [
|
|
16047
|
-
/* @__PURE__ */ l.jsx(
|
|
16051
|
+
/* @__PURE__ */ l.jsx(Bt, { htmlFor: "compact-messages", children: "Compact Messages" }),
|
|
16048
16052
|
/* @__PURE__ */ l.jsx(
|
|
16049
16053
|
bn,
|
|
16050
16054
|
{
|
|
@@ -16068,7 +16072,7 @@ function IT({ settings: e, onSettingsChange: t, className: n = "" }) {
|
|
|
16068
16072
|
/* @__PURE__ */ l.jsxs(Eo, { className: "space-y-4", children: [
|
|
16069
16073
|
/* @__PURE__ */ l.jsxs("div", { className: "flex items-center justify-between", children: [
|
|
16070
16074
|
/* @__PURE__ */ l.jsxs("div", { children: [
|
|
16071
|
-
/* @__PURE__ */ l.jsx(
|
|
16075
|
+
/* @__PURE__ */ l.jsx(Bt, { htmlFor: "auto-save", children: "Auto-save Conversations" }),
|
|
16072
16076
|
/* @__PURE__ */ l.jsx("p", { className: "text-sm text-muted-foreground", children: "Automatically save messages to threads" })
|
|
16073
16077
|
] }),
|
|
16074
16078
|
/* @__PURE__ */ l.jsx(
|
|
@@ -16085,7 +16089,7 @@ function IT({ settings: e, onSettingsChange: t, className: n = "" }) {
|
|
|
16085
16089
|
] }),
|
|
16086
16090
|
/* @__PURE__ */ l.jsxs("div", { className: "flex items-center justify-between", children: [
|
|
16087
16091
|
/* @__PURE__ */ l.jsxs("div", { children: [
|
|
16088
|
-
/* @__PURE__ */ l.jsx(
|
|
16092
|
+
/* @__PURE__ */ l.jsx(Bt, { htmlFor: "enable-streaming", children: "Enable Streaming" }),
|
|
16089
16093
|
/* @__PURE__ */ l.jsx("p", { className: "text-sm text-muted-foreground", children: "Stream responses in real-time" })
|
|
16090
16094
|
] }),
|
|
16091
16095
|
/* @__PURE__ */ l.jsx(
|
|
@@ -16102,7 +16106,7 @@ function IT({ settings: e, onSettingsChange: t, className: n = "" }) {
|
|
|
16102
16106
|
] }),
|
|
16103
16107
|
/* @__PURE__ */ l.jsxs("div", { className: "flex items-center justify-between", children: [
|
|
16104
16108
|
/* @__PURE__ */ l.jsxs("div", { children: [
|
|
16105
|
-
/* @__PURE__ */ l.jsx(
|
|
16109
|
+
/* @__PURE__ */ l.jsx(Bt, { htmlFor: "typing-indicator", children: "Typing Indicator" }),
|
|
16106
16110
|
/* @__PURE__ */ l.jsx("p", { className: "text-sm text-muted-foreground", children: "Show typing indicator during responses" })
|
|
16107
16111
|
] }),
|
|
16108
16112
|
/* @__PURE__ */ l.jsx(
|
|
@@ -16223,7 +16227,7 @@ export {
|
|
|
16223
16227
|
zn as chatApiClient,
|
|
16224
16228
|
NT as default,
|
|
16225
16229
|
Ag as del,
|
|
16226
|
-
|
|
16230
|
+
Ht as get,
|
|
16227
16231
|
kg as getChatToken,
|
|
16228
16232
|
TT as getCurrentSettings,
|
|
16229
16233
|
qS as getDefaultApiConfig,
|