teodor-new-chat-ui 4.3.521 → 4.3.523
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 +515 -506
- package/dist/index.umd.js +1 -1
- package/package.json +1 -1
package/dist/index.esm.js
CHANGED
|
@@ -2,12 +2,12 @@ var Ag = Object.defineProperty;
|
|
|
2
2
|
var jg = (e, t, n) => t in e ? Ag(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n;
|
|
3
3
|
var Wl = (e, t, n) => jg(e, typeof t != "symbol" ? t + "" : t, n);
|
|
4
4
|
import * as h from "react";
|
|
5
|
-
import $, { useMemo as
|
|
5
|
+
import $, { useMemo as ze, createContext as Or, useContext as Dr, useState as de, useRef as _e, useCallback as ie, useEffect as Qe, useReducer as Pg, useLayoutEffect as _g, createElement as Qo, memo as Mg, useImperativeHandle as Og, forwardRef as Dg, isValidElement as wa } from "react";
|
|
6
6
|
import { Slot as Lg, createSlot as Ir, createSlottable as $g } from "@radix-ui/react-slot";
|
|
7
7
|
import { cva as wo } from "class-variance-authority";
|
|
8
8
|
import { clsx as Fg } from "clsx";
|
|
9
|
-
import { twMerge as
|
|
10
|
-
import { ChevronRight as _u, Check as js, Circle as
|
|
9
|
+
import { twMerge as zg } from "tailwind-merge";
|
|
10
|
+
import { ChevronRight as _u, Check as js, Circle as Bg, Square as Hg, Send as Ug, Paperclip as Vl, X as rr, Loader2 as Zn, Plus as Wg, FileSpreadsheet as Vg, ExternalLink as Kg, Download as qg, Image as Gg, FileText as Kl, Loader as fs, ChevronUp as Ai, ChevronDown as Ps, ChevronLeft as Yg, Copy as Mu, Edit as Ou, RotateCcw as Du, Bot as zo, Wrench as Xg, User as Jg, Edit3 as bo, Search as Zg, Calendar as Qg, MoreHorizontal as Lu, Share2 as ex, Trash2 as tx, MessageSquare as $u, Maximize2 as nx, Minimize2 as rx, History as ox } from "lucide-react";
|
|
11
11
|
import * as yo from "react-dom";
|
|
12
12
|
import ji from "react-dom";
|
|
13
13
|
const ql = 120;
|
|
@@ -132,7 +132,7 @@ function ZI(e, t) {
|
|
|
132
132
|
return e ? t.getCheckpoint(e) ?? null : null;
|
|
133
133
|
}
|
|
134
134
|
function lx(e) {
|
|
135
|
-
return
|
|
135
|
+
return ze(() => ax(e), [e]);
|
|
136
136
|
}
|
|
137
137
|
function Qn(e) {
|
|
138
138
|
if (!(!e || typeof e != "object" || Array.isArray(e)))
|
|
@@ -415,14 +415,14 @@ function vx() {
|
|
|
415
415
|
}
|
|
416
416
|
return null;
|
|
417
417
|
}
|
|
418
|
-
var M = Object.assign, V = 0, K,
|
|
418
|
+
var M = Object.assign, V = 0, K, B, A, k, G, X, O;
|
|
419
419
|
function W() {
|
|
420
420
|
}
|
|
421
421
|
W.__reactDisabledLog = !0;
|
|
422
422
|
function P() {
|
|
423
423
|
{
|
|
424
424
|
if (V === 0) {
|
|
425
|
-
K = console.log,
|
|
425
|
+
K = console.log, B = console.info, A = console.warn, k = console.error, G = console.group, X = console.groupCollapsed, O = console.groupEnd;
|
|
426
426
|
var I = {
|
|
427
427
|
configurable: !0,
|
|
428
428
|
enumerable: !0,
|
|
@@ -442,7 +442,7 @@ function vx() {
|
|
|
442
442
|
V++;
|
|
443
443
|
}
|
|
444
444
|
}
|
|
445
|
-
function
|
|
445
|
+
function z() {
|
|
446
446
|
{
|
|
447
447
|
if (V--, V === 0) {
|
|
448
448
|
var I = {
|
|
@@ -455,7 +455,7 @@ function vx() {
|
|
|
455
455
|
value: K
|
|
456
456
|
}),
|
|
457
457
|
info: M({}, I, {
|
|
458
|
-
value:
|
|
458
|
+
value: B
|
|
459
459
|
}),
|
|
460
460
|
warn: M({}, I, {
|
|
461
461
|
value: A
|
|
@@ -545,14 +545,14 @@ function vx() {
|
|
|
545
545
|
} catch (Wt) {
|
|
546
546
|
if (Wt && le && typeof Wt.stack == "string") {
|
|
547
547
|
for (var Te = Wt.stack.split(`
|
|
548
|
-
`),
|
|
549
|
-
`), gt = Te.length - 1, Tt =
|
|
548
|
+
`), zt = le.stack.split(`
|
|
549
|
+
`), gt = Te.length - 1, Tt = zt.length - 1; gt >= 1 && Tt >= 0 && Te[gt] !== zt[Tt]; )
|
|
550
550
|
Tt--;
|
|
551
551
|
for (; gt >= 1 && Tt >= 0; gt--, Tt--)
|
|
552
|
-
if (Te[gt] !==
|
|
552
|
+
if (Te[gt] !== zt[Tt]) {
|
|
553
553
|
if (gt !== 1 || Tt !== 1)
|
|
554
554
|
do
|
|
555
|
-
if (gt--, Tt--, Tt < 0 || Te[gt] !==
|
|
555
|
+
if (gt--, Tt--, Tt < 0 || Te[gt] !== zt[Tt]) {
|
|
556
556
|
var nn = `
|
|
557
557
|
` + Te[gt].replace(" at new ", " at ");
|
|
558
558
|
return I.displayName && nn.includes("<anonymous>") && (nn = nn.replace("<anonymous>", I.displayName)), typeof I == "function" && J.set(I, nn), nn;
|
|
@@ -562,7 +562,7 @@ function vx() {
|
|
|
562
562
|
}
|
|
563
563
|
}
|
|
564
564
|
} finally {
|
|
565
|
-
H = !1, Y.current = Re,
|
|
565
|
+
H = !1, Y.current = Re, z(), Error.prepareStackTrace = xe;
|
|
566
566
|
}
|
|
567
567
|
var gr = I ? I.displayName || I.name : "", Gn = gr ? _(gr) : "";
|
|
568
568
|
return typeof I == "function" && J.set(I, Gn), Gn;
|
|
@@ -603,7 +603,7 @@ function vx() {
|
|
|
603
603
|
}
|
|
604
604
|
return "";
|
|
605
605
|
}
|
|
606
|
-
var Ke = Object.prototype.hasOwnProperty,
|
|
606
|
+
var Ke = Object.prototype.hasOwnProperty, Be = {}, Xe = b.ReactDebugCurrentFrame;
|
|
607
607
|
function Ue(I) {
|
|
608
608
|
if (I) {
|
|
609
609
|
var Q = I._owner, Z = Ae(I.type, I._source, Q ? Q.type : null);
|
|
@@ -619,14 +619,14 @@ function vx() {
|
|
|
619
619
|
var Te = void 0;
|
|
620
620
|
try {
|
|
621
621
|
if (typeof I[Pe] != "function") {
|
|
622
|
-
var
|
|
623
|
-
throw
|
|
622
|
+
var zt = Error((le || "React class") + ": " + Z + " type `" + Pe + "` is invalid; it must be a function, usually from the `prop-types` package, but received `" + typeof I[Pe] + "`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");
|
|
623
|
+
throw zt.name = "Invariant Violation", zt;
|
|
624
624
|
}
|
|
625
625
|
Te = I[Pe](Q, Pe, le, Z, null, "SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED");
|
|
626
626
|
} catch (gt) {
|
|
627
627
|
Te = gt;
|
|
628
628
|
}
|
|
629
|
-
Te && !(Te instanceof Error) && (Ue(xe), w("%s: type specification of %s `%s` is invalid; the type checker function must return `null` or an `Error` but returned a %s. You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument).", le || "React class", Z, Pe, typeof Te), Ue(null)), Te instanceof Error && !(Te.message in
|
|
629
|
+
Te && !(Te instanceof Error) && (Ue(xe), w("%s: type specification of %s `%s` is invalid; the type checker function must return `null` or an `Error` but returned a %s. You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument).", le || "React class", Z, Pe, typeof Te), Ue(null)), Te instanceof Error && !(Te.message in Be) && (Be[Te.message] = !0, Ue(xe), w("Failed %s type: %s", Z, Te.message), Ue(null));
|
|
630
630
|
}
|
|
631
631
|
}
|
|
632
632
|
}
|
|
@@ -732,8 +732,8 @@ function vx() {
|
|
|
732
732
|
};
|
|
733
733
|
function Rt(I, Q, Z, le, xe) {
|
|
734
734
|
{
|
|
735
|
-
var Re, Pe = {}, Te = null,
|
|
736
|
-
Z !== void 0 && (je(Z), Te = "" + Z), mt(Q) && (je(Q.key), Te = "" + Q.key), St(Q) && (
|
|
735
|
+
var Re, Pe = {}, Te = null, zt = null;
|
|
736
|
+
Z !== void 0 && (je(Z), Te = "" + Z), mt(Q) && (je(Q.key), Te = "" + Q.key), St(Q) && (zt = Q.ref, Et(Q, xe));
|
|
737
737
|
for (Re in Q)
|
|
738
738
|
Ke.call(Q, Re) && !et.hasOwnProperty(Re) && (Pe[Re] = Q[Re]);
|
|
739
739
|
if (I && I.defaultProps) {
|
|
@@ -741,11 +741,11 @@ function vx() {
|
|
|
741
741
|
for (Re in gt)
|
|
742
742
|
Pe[Re] === void 0 && (Pe[Re] = gt[Re]);
|
|
743
743
|
}
|
|
744
|
-
if (Te ||
|
|
744
|
+
if (Te || zt) {
|
|
745
745
|
var Tt = typeof I == "function" ? I.displayName || I.name || "Unknown" : I;
|
|
746
|
-
Te && kt(Pe, Tt),
|
|
746
|
+
Te && kt(Pe, Tt), zt && Mt(Pe, Tt);
|
|
747
747
|
}
|
|
748
|
-
return _t(I, Te,
|
|
748
|
+
return _t(I, Te, zt, xe, le, He.current, Pe);
|
|
749
749
|
}
|
|
750
750
|
}
|
|
751
751
|
var Ut = b.ReactCurrentOwner, We = b.ReactDebugCurrentFrame;
|
|
@@ -865,8 +865,8 @@ Check the top-level render call using <` + Z + ">.");
|
|
|
865
865
|
if (!Pe) {
|
|
866
866
|
var Te = "";
|
|
867
867
|
(I === void 0 || typeof I == "object" && I !== null && Object.keys(I).length === 0) && (Te += " You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.");
|
|
868
|
-
var
|
|
869
|
-
|
|
868
|
+
var zt = nt();
|
|
869
|
+
zt ? Te += zt : Te += pe();
|
|
870
870
|
var gt;
|
|
871
871
|
I === null ? gt = "null" : ht(I) ? gt = "array" : I !== void 0 && I.$$typeof === t ? (gt = "<" + (q(I.type) || "Unknown") + " />", Te = " Did you accidentally export a JSX literal instead of a component?") : gt = typeof I, w("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s", gt, Te);
|
|
872
872
|
}
|
|
@@ -924,7 +924,7 @@ const QI = ({
|
|
|
924
924
|
onHoverStart: s,
|
|
925
925
|
onHoverEnd: a
|
|
926
926
|
}) => {
|
|
927
|
-
const i = e ?? [], l = i.length > 0, c =
|
|
927
|
+
const i = e ?? [], l = i.length > 0, c = ze(() => l ? [...i].reverse() : [], [i, l]), d = t ?? (i.length ? i[i.length - 1].id : null);
|
|
928
928
|
if (!l)
|
|
929
929
|
return null;
|
|
930
930
|
const m = ["w-32 flex-shrink-0 flex-col border-r border-border/40 pr-2 flex bg-white text-gray-900 dark:bg-slate-900 dark:text-slate-100", o].filter(Boolean).join(" ");
|
|
@@ -989,12 +989,12 @@ const QI = ({
|
|
|
989
989
|
}
|
|
990
990
|
);
|
|
991
991
|
};
|
|
992
|
-
function
|
|
992
|
+
function zu(e, t) {
|
|
993
993
|
return function() {
|
|
994
994
|
return e.apply(t, arguments);
|
|
995
995
|
};
|
|
996
996
|
}
|
|
997
|
-
const { toString: wx } = Object.prototype, { getPrototypeOf: Pi } = Object, { iterator: _s, toStringTag:
|
|
997
|
+
const { toString: wx } = Object.prototype, { getPrototypeOf: Pi } = Object, { iterator: _s, toStringTag: Bu } = Symbol, Ms = /* @__PURE__ */ ((e) => (t) => {
|
|
998
998
|
const n = wx.call(t);
|
|
999
999
|
return e[n] || (e[n] = n.slice(8, -1).toLowerCase());
|
|
1000
1000
|
})(/* @__PURE__ */ Object.create(null)), gn = (e) => (e = e.toLowerCase(), (t) => Ms(t) === e), Os = (e) => (t) => typeof t === e, { isArray: Lr } = Array, Nr = Os("undefined");
|
|
@@ -1010,7 +1010,7 @@ const yx = Os("string"), qt = Os("function"), Uu = Os("number"), To = (e) => e !
|
|
|
1010
1010
|
if (Ms(e) !== "object")
|
|
1011
1011
|
return !1;
|
|
1012
1012
|
const t = Pi(e);
|
|
1013
|
-
return (t === null || t === Object.prototype || Object.getPrototypeOf(t) === null) && !(
|
|
1013
|
+
return (t === null || t === Object.prototype || Object.getPrototypeOf(t) === null) && !(Bu in e) && !(_s in e);
|
|
1014
1014
|
}, Tx = (e) => {
|
|
1015
1015
|
if (!To(e) || So(e))
|
|
1016
1016
|
return !1;
|
|
@@ -1062,7 +1062,7 @@ function qa() {
|
|
|
1062
1062
|
return n;
|
|
1063
1063
|
}
|
|
1064
1064
|
const Dx = (e, t, n, { allOwnKeys: r } = {}) => (Co(t, (o, s) => {
|
|
1065
|
-
n && qt(o) ? e[s] =
|
|
1065
|
+
n && qt(o) ? e[s] = zu(o, n) : e[s] = o;
|
|
1066
1066
|
}, { allOwnKeys: r }), e), Lx = (e) => (e.charCodeAt(0) === 65279 && (e = e.slice(1)), e), $x = (e, t, n, r) => {
|
|
1067
1067
|
e.prototype = Object.create(t.prototype, r), e.prototype.constructor = e, Object.defineProperty(e, "super", {
|
|
1068
1068
|
value: t.prototype
|
|
@@ -1077,11 +1077,11 @@ const Dx = (e, t, n, { allOwnKeys: r } = {}) => (Co(t, (o, s) => {
|
|
|
1077
1077
|
e = n !== !1 && Pi(e);
|
|
1078
1078
|
} while (e && (!n || n(e, t)) && e !== Object.prototype);
|
|
1079
1079
|
return t;
|
|
1080
|
-
},
|
|
1080
|
+
}, zx = (e, t, n) => {
|
|
1081
1081
|
e = String(e), (n === void 0 || n > e.length) && (n = e.length), n -= t.length;
|
|
1082
1082
|
const r = e.indexOf(t, n);
|
|
1083
1083
|
return r !== -1 && r === n;
|
|
1084
|
-
},
|
|
1084
|
+
}, Bx = (e) => {
|
|
1085
1085
|
if (!e) return null;
|
|
1086
1086
|
if (Lr(e)) return e;
|
|
1087
1087
|
let t = e.length;
|
|
@@ -1139,7 +1139,7 @@ const Dx = (e, t, n, { allOwnKeys: r } = {}) => (Co(t, (o, s) => {
|
|
|
1139
1139
|
}, Xx = () => {
|
|
1140
1140
|
}, Jx = (e, t) => e != null && Number.isFinite(e = +e) ? e : t;
|
|
1141
1141
|
function Zx(e) {
|
|
1142
|
-
return !!(e && qt(e.append) && e[
|
|
1142
|
+
return !!(e && qt(e.append) && e[Bu] === "FormData" && e[_s]);
|
|
1143
1143
|
}
|
|
1144
1144
|
const Qx = (e) => {
|
|
1145
1145
|
const t = new Array(10), n = (r, o) => {
|
|
@@ -1202,8 +1202,8 @@ const Qx = (e) => {
|
|
|
1202
1202
|
toFlatObject: Fx,
|
|
1203
1203
|
kindOf: Ms,
|
|
1204
1204
|
kindOfTest: gn,
|
|
1205
|
-
endsWith:
|
|
1206
|
-
toArray:
|
|
1205
|
+
endsWith: zx,
|
|
1206
|
+
toArray: Bx,
|
|
1207
1207
|
forEachEntry: Ux,
|
|
1208
1208
|
matchAll: Wx,
|
|
1209
1209
|
isHTMLForm: Vx,
|
|
@@ -2148,7 +2148,7 @@ const od = (e) => {
|
|
|
2148
2148
|
}, {
|
|
2149
2149
|
highWaterMark: 2
|
|
2150
2150
|
});
|
|
2151
|
-
}, ic = 64 * 1024, { isFunction:
|
|
2151
|
+
}, ic = 64 * 1024, { isFunction: Bo } = U, Fv = (({ Request: e, Response: t }) => ({
|
|
2152
2152
|
Request: e,
|
|
2153
2153
|
Response: t
|
|
2154
2154
|
}))(U.global), {
|
|
@@ -2160,14 +2160,14 @@ const od = (e) => {
|
|
|
2160
2160
|
} catch {
|
|
2161
2161
|
return !1;
|
|
2162
2162
|
}
|
|
2163
|
-
},
|
|
2163
|
+
}, zv = (e) => {
|
|
2164
2164
|
e = U.merge.call({
|
|
2165
2165
|
skipUndefined: !0
|
|
2166
2166
|
}, Fv, e);
|
|
2167
|
-
const { fetch: t, Request: n, Response: r } = e, o = t ?
|
|
2167
|
+
const { fetch: t, Request: n, Response: r } = e, o = t ? Bo(t) : typeof fetch == "function", s = Bo(n), a = Bo(r);
|
|
2168
2168
|
if (!o)
|
|
2169
2169
|
return !1;
|
|
2170
|
-
const i = o &&
|
|
2170
|
+
const i = o && Bo(lc), l = o && (typeof cc == "function" ? /* @__PURE__ */ ((v) => (g) => v.encode(g))(new cc()) : async (v) => new Uint8Array(await new n(v).arrayBuffer())), c = s && i && uc(() => {
|
|
2171
2171
|
let v = !1;
|
|
2172
2172
|
const g = new n(Dt.origin, {
|
|
2173
2173
|
body: new lc(),
|
|
@@ -2243,7 +2243,7 @@ const od = (e) => {
|
|
|
2243
2243
|
}
|
|
2244
2244
|
}
|
|
2245
2245
|
U.isString(j) || (j = j ? "include" : "omit");
|
|
2246
|
-
const K = s && "credentials" in n.prototype,
|
|
2246
|
+
const K = s && "credentials" in n.prototype, B = {
|
|
2247
2247
|
...L,
|
|
2248
2248
|
signal: F,
|
|
2249
2249
|
method: x.toUpperCase(),
|
|
@@ -2252,13 +2252,13 @@ const od = (e) => {
|
|
|
2252
2252
|
duplex: "half",
|
|
2253
2253
|
credentials: K ? j : void 0
|
|
2254
2254
|
};
|
|
2255
|
-
q = s && new n(g,
|
|
2256
|
-
let A = await (s ? D(q, L) : D(g,
|
|
2255
|
+
q = s && new n(g, B);
|
|
2256
|
+
let A = await (s ? D(q, L) : D(g, B));
|
|
2257
2257
|
const k = d && (E === "stream" || E === "response");
|
|
2258
2258
|
if (d && (y || k && M)) {
|
|
2259
2259
|
const X = {};
|
|
2260
|
-
["status", "statusText", "headers"].forEach((
|
|
2261
|
-
X[
|
|
2260
|
+
["status", "statusText", "headers"].forEach((z) => {
|
|
2261
|
+
X[z] = A[z];
|
|
2262
2262
|
});
|
|
2263
2263
|
const O = U.toFiniteNumber(A.headers.get("content-length")), [W, P] = y && rc(
|
|
2264
2264
|
O,
|
|
@@ -2292,16 +2292,16 @@ const od = (e) => {
|
|
|
2292
2292
|
) : Me.from(K, K && K.code, v, q);
|
|
2293
2293
|
}
|
|
2294
2294
|
};
|
|
2295
|
-
},
|
|
2295
|
+
}, Bv = /* @__PURE__ */ new Map(), sd = (e) => {
|
|
2296
2296
|
let t = e ? e.env : {};
|
|
2297
2297
|
const { fetch: n, Request: r, Response: o } = t, s = [
|
|
2298
2298
|
r,
|
|
2299
2299
|
o,
|
|
2300
2300
|
n
|
|
2301
2301
|
];
|
|
2302
|
-
let a = s.length, i = a, l, c, d =
|
|
2302
|
+
let a = s.length, i = a, l, c, d = Bv;
|
|
2303
2303
|
for (; i--; )
|
|
2304
|
-
l = s[i], c = d.get(l), c === void 0 && d.set(l, c = i ? /* @__PURE__ */ new Map() :
|
|
2304
|
+
l = s[i], c = d.get(l), c === void 0 && d.set(l, c = i ? /* @__PURE__ */ new Map() : zv(t)), d = c;
|
|
2305
2305
|
return c;
|
|
2306
2306
|
};
|
|
2307
2307
|
sd();
|
|
@@ -2697,7 +2697,7 @@ Object.entries(Ja).forEach(([e, t]) => {
|
|
|
2697
2697
|
Ja[t] = e;
|
|
2698
2698
|
});
|
|
2699
2699
|
function cd(e) {
|
|
2700
|
-
const t = new er(e), n =
|
|
2700
|
+
const t = new er(e), n = zu(er.prototype.request, t);
|
|
2701
2701
|
return U.extend(n, er.prototype, t, { allOwnKeys: !0 }), U.extend(n, t, null, { allOwnKeys: !0 }), n.create = function(o) {
|
|
2702
2702
|
return cd(or(e, o));
|
|
2703
2703
|
}, n;
|
|
@@ -3078,12 +3078,12 @@ function pd(e) {
|
|
|
3078
3078
|
return t[t.length - 1] || null;
|
|
3079
3079
|
}
|
|
3080
3080
|
function lw(e = {}) {
|
|
3081
|
-
const t =
|
|
3081
|
+
const t = ze(() => An(e.baseUrl), [e.baseUrl]), n = e.streamPath ?? "/runs/stream", [r, o] = de(e.token ?? null), s = _e(e.headers ?? {}), a = e.credentials ?? "include", [i, l] = de(!1), [c, d] = de(null), [p, m] = de(""), [f, v] = de(null), [g, x] = de(0), [b, w] = de(!1), [S, C] = de(null), y = _e(null), T = _e(!0), E = _e(0), N = _e(null), j = _e(null), L = _e(null), D = _e(null), F = _e({
|
|
3082
3082
|
messageId: null,
|
|
3083
3083
|
lastSeq: null,
|
|
3084
3084
|
lastText: ""
|
|
3085
|
-
}), q = ie((
|
|
3086
|
-
o(
|
|
3085
|
+
}), q = ie((B) => {
|
|
3086
|
+
o(B);
|
|
3087
3087
|
}, []), M = ie(() => {
|
|
3088
3088
|
m(""), v(null), d(null), j.current = null, L.current = null, D.current = null, C(null), F.current = {
|
|
3089
3089
|
messageId: null,
|
|
@@ -3093,15 +3093,15 @@ function lw(e = {}) {
|
|
|
3093
3093
|
}, []), V = ie(() => {
|
|
3094
3094
|
var G;
|
|
3095
3095
|
console.debug("[use-chat] stop() invoked - aborting stream");
|
|
3096
|
-
const
|
|
3096
|
+
const B = (G = N.current) == null ? void 0 : G.threadId, A = () => {
|
|
3097
3097
|
var X;
|
|
3098
3098
|
(X = y.current) == null || X.abort(), y.current = null, N.current = null, l(!1), w(!1), E.current = 0, x(0);
|
|
3099
3099
|
};
|
|
3100
|
-
(
|
|
3100
|
+
(B ? Mn.cancelRun(B).catch((X) => {
|
|
3101
3101
|
console.warn("[use-chat] cancel run failed:", X);
|
|
3102
3102
|
}) : Promise.resolve()).finally(A);
|
|
3103
3103
|
}, []), K = ie(
|
|
3104
|
-
(
|
|
3104
|
+
(B, A, k) => {
|
|
3105
3105
|
y.current && (y.current.abort(), y.current = null), l(!0), d(null), e.autoAppendAssistant !== !1 && m(""), v(null), j.current = null, L.current = null, D.current = null, C(null), F.current = {
|
|
3106
3106
|
messageId: null,
|
|
3107
3107
|
lastSeq: null,
|
|
@@ -3111,10 +3111,10 @@ function lw(e = {}) {
|
|
|
3111
3111
|
y.current = G;
|
|
3112
3112
|
let X = null, O = null, W = !1;
|
|
3113
3113
|
return N.current = {
|
|
3114
|
-
threadId:
|
|
3114
|
+
threadId: B.threadId ?? null,
|
|
3115
3115
|
headers: {}
|
|
3116
3116
|
}, (async () => {
|
|
3117
|
-
var
|
|
3117
|
+
var z, Y, R, _, H, J, re, se, Se, we, Ae, Ke, Be, Xe, Ue, bt, yt, ht;
|
|
3118
3118
|
const P = (qe) => {
|
|
3119
3119
|
var Ne;
|
|
3120
3120
|
try {
|
|
@@ -3133,7 +3133,7 @@ function lw(e = {}) {
|
|
|
3133
3133
|
if (r)
|
|
3134
3134
|
qe = { Authorization: `Bearer ${r}` };
|
|
3135
3135
|
else if (typeof window < "u") {
|
|
3136
|
-
const Fe = window.__AUTH_TOKEN__, ft = ((
|
|
3136
|
+
const Fe = window.__AUTH_TOKEN__, ft = ((z = window.localStorage) == null ? void 0 : z.getItem("authToken")) || null;
|
|
3137
3137
|
let te = null;
|
|
3138
3138
|
try {
|
|
3139
3139
|
const nt = (Y = window.localStorage) == null ? void 0 : Y.getItem("chat-settings");
|
|
@@ -3148,7 +3148,7 @@ function lw(e = {}) {
|
|
|
3148
3148
|
console.debug(
|
|
3149
3149
|
"[use-chat] POST",
|
|
3150
3150
|
t + n,
|
|
3151
|
-
P(
|
|
3151
|
+
P(B)
|
|
3152
3152
|
);
|
|
3153
3153
|
let Ne = {};
|
|
3154
3154
|
if (typeof window < "u")
|
|
@@ -3168,7 +3168,7 @@ function lw(e = {}) {
|
|
|
3168
3168
|
}, He = await fetch(t + n, {
|
|
3169
3169
|
method: "POST",
|
|
3170
3170
|
headers: je,
|
|
3171
|
-
body: JSON.stringify(
|
|
3171
|
+
body: JSON.stringify(B),
|
|
3172
3172
|
signal: G.signal,
|
|
3173
3173
|
credentials: a
|
|
3174
3174
|
});
|
|
@@ -3313,7 +3313,7 @@ function lw(e = {}) {
|
|
|
3313
3313
|
if (d(be.message), X = "error", O = be.message, be.error_type === "auth_error" || be.code === "TOKEN_EXPIRED" || ((Se = be.message) == null ? void 0 : Se.includes("token")) || ((we = be.message) == null ? void 0 : we.includes("401")) || ((Ae = be.message) == null ? void 0 : Ae.includes("unauthorized")) || ((Ke = be.message) == null ? void 0 : Ke.includes("Unauthorized"))) {
|
|
3314
3314
|
console.error("[use-chat] Auth error detected:", be.message);
|
|
3315
3315
|
try {
|
|
3316
|
-
(
|
|
3316
|
+
(Be = k == null ? void 0 : k.onAuthError) == null || Be.call(k, be.message);
|
|
3317
3317
|
} catch (jt) {
|
|
3318
3318
|
console.warn("[use-chat] onAuthError handler failed", jt);
|
|
3319
3319
|
}
|
|
@@ -3367,8 +3367,8 @@ function lw(e = {}) {
|
|
|
3367
3367
|
[t, n, r, e.autoAppendAssistant]
|
|
3368
3368
|
);
|
|
3369
3369
|
return Qe(() => () => {
|
|
3370
|
-
var
|
|
3371
|
-
T.current = !1, (
|
|
3370
|
+
var B;
|
|
3371
|
+
T.current = !1, (B = y.current) == null || B.abort();
|
|
3372
3372
|
}, []), {
|
|
3373
3373
|
isStreaming: i,
|
|
3374
3374
|
error: c,
|
|
@@ -3527,7 +3527,7 @@ function dw({
|
|
|
3527
3527
|
}
|
|
3528
3528
|
},
|
|
3529
3529
|
[e, n, j]
|
|
3530
|
-
), V =
|
|
3530
|
+
), V = ze(
|
|
3531
3531
|
() => ({
|
|
3532
3532
|
createThread: L,
|
|
3533
3533
|
deleteThread: D,
|
|
@@ -3557,7 +3557,7 @@ function dw({
|
|
|
3557
3557
|
}) : W);
|
|
3558
3558
|
return X ? O : (console.debug("[useThreadsState] thread_info: adding thread to list", k.threadId), [k, ...G]);
|
|
3559
3559
|
});
|
|
3560
|
-
}, []),
|
|
3560
|
+
}, []), B = ie(() => S(null), []);
|
|
3561
3561
|
return {
|
|
3562
3562
|
threads: s,
|
|
3563
3563
|
currentThreadId: i,
|
|
@@ -3571,7 +3571,7 @@ function dw({
|
|
|
3571
3571
|
addThreadFromEvent: K,
|
|
3572
3572
|
shareInFlight: C,
|
|
3573
3573
|
shareStatus: w,
|
|
3574
|
-
clearShareStatus:
|
|
3574
|
+
clearShareStatus: B
|
|
3575
3575
|
};
|
|
3576
3576
|
}
|
|
3577
3577
|
const hd = Or(null);
|
|
@@ -3600,7 +3600,7 @@ function fw({
|
|
|
3600
3600
|
initialThreadId: t,
|
|
3601
3601
|
onError: n,
|
|
3602
3602
|
onThreadChange: r
|
|
3603
|
-
}), w =
|
|
3603
|
+
}), w = ze(
|
|
3604
3604
|
() => ({
|
|
3605
3605
|
threads: s,
|
|
3606
3606
|
currentThreadId: a,
|
|
@@ -3935,7 +3935,7 @@ function kw(e = []) {
|
|
|
3935
3935
|
Qe(() => () => {
|
|
3936
3936
|
o.current !== null && typeof window < "u" && window.cancelAnimationFrame(o.current), s.current !== null && clearTimeout(s.current), r.current = [];
|
|
3937
3937
|
}, []);
|
|
3938
|
-
const c =
|
|
3938
|
+
const c = ze(() => ({
|
|
3939
3939
|
reset: (d) => n({ type: "reset", payload: { messages: d } }),
|
|
3940
3940
|
seed: (d, p) => n({ type: "seed", payload: { messages: d, ...p ?? {} } }),
|
|
3941
3941
|
prepend: (d) => n({ type: "prepend", payload: { messages: d } }),
|
|
@@ -4165,7 +4165,7 @@ function jw({
|
|
|
4165
4165
|
isStreaming: l,
|
|
4166
4166
|
getMessages: c
|
|
4167
4167
|
}) {
|
|
4168
|
-
const [d, p] = de(null), f =
|
|
4168
|
+
const [d, p] = de(null), f = ze(
|
|
4169
4169
|
() => Sr(d),
|
|
4170
4170
|
[d]
|
|
4171
4171
|
).checkpoints, v = lx(f), g = v.timeline, [x, b] = de(!1), [w, S] = de(!1), [C, y] = de(null), T = _e(r), E = _e(null), N = _e(null), j = _e(null), L = _e(null), D = _e(null), F = _e(/* @__PURE__ */ new Map()), q = _e(null);
|
|
@@ -4176,12 +4176,12 @@ function jw({
|
|
|
4176
4176
|
async (P) => {
|
|
4177
4177
|
var Y, R;
|
|
4178
4178
|
if (!P.threadId) return;
|
|
4179
|
-
const
|
|
4179
|
+
const z = P.threadId;
|
|
4180
4180
|
(Y = P.onStart) == null || Y.call(P), P.setLoading(!0);
|
|
4181
4181
|
try {
|
|
4182
|
-
await P.action(
|
|
4182
|
+
await P.action(z);
|
|
4183
4183
|
} catch (_) {
|
|
4184
|
-
if (!hc(_) && T.current ===
|
|
4184
|
+
if (!hc(_) && T.current === z) {
|
|
4185
4185
|
const J = String(_);
|
|
4186
4186
|
(R = P.handleError) == null || R.call(P, J), n == null || n(J);
|
|
4187
4187
|
}
|
|
@@ -4192,10 +4192,10 @@ function jw({
|
|
|
4192
4192
|
},
|
|
4193
4193
|
[n]
|
|
4194
4194
|
), V = ie(
|
|
4195
|
-
async (P,
|
|
4195
|
+
async (P, z) => {
|
|
4196
4196
|
var J;
|
|
4197
4197
|
if (!P) return;
|
|
4198
|
-
const Y = `${P}:${
|
|
4198
|
+
const Y = `${P}:${z ?? "latest"}`, R = F.current.get(Y);
|
|
4199
4199
|
if (R)
|
|
4200
4200
|
return R;
|
|
4201
4201
|
(J = q.current) == null || J.abort();
|
|
@@ -4209,7 +4209,7 @@ function jw({
|
|
|
4209
4209
|
action: async (re) => {
|
|
4210
4210
|
const se = await e.getStateHistory({
|
|
4211
4211
|
threadId: re,
|
|
4212
|
-
checkpointId:
|
|
4212
|
+
checkpointId: z ?? void 0,
|
|
4213
4213
|
signal: _.signal
|
|
4214
4214
|
});
|
|
4215
4215
|
if (T.current !== re) {
|
|
@@ -4218,7 +4218,7 @@ function jw({
|
|
|
4218
4218
|
);
|
|
4219
4219
|
return;
|
|
4220
4220
|
}
|
|
4221
|
-
const { checkpoints: Se } = Sr(se), we = Se.find((Ae) => Ae.messages && Ae.messages.length > 0) ?? (
|
|
4221
|
+
const { checkpoints: Se } = Sr(se), we = Se.find((Ae) => Ae.messages && Ae.messages.length > 0) ?? (z ? Se.find((Ae) => Ae.checkpointId === z) : null) ?? Se[0];
|
|
4222
4222
|
t((we == null ? void 0 : we.messages) ?? [], {
|
|
4223
4223
|
checkpointId: (we == null ? void 0 : we.checkpointId) ?? null,
|
|
4224
4224
|
checkpointNs: (we == null ? void 0 : we.checkpointNs) ?? null,
|
|
@@ -4236,10 +4236,10 @@ function jw({
|
|
|
4236
4236
|
},
|
|
4237
4237
|
[e, t, M]
|
|
4238
4238
|
), K = ie(
|
|
4239
|
-
async (P,
|
|
4239
|
+
async (P, z) => {
|
|
4240
4240
|
L.current = P;
|
|
4241
4241
|
try {
|
|
4242
|
-
await V(P,
|
|
4242
|
+
await V(P, z);
|
|
4243
4243
|
} catch (Y) {
|
|
4244
4244
|
if (!hc(Y))
|
|
4245
4245
|
throw Y;
|
|
@@ -4248,28 +4248,28 @@ function jw({
|
|
|
4248
4248
|
}
|
|
4249
4249
|
},
|
|
4250
4250
|
[V]
|
|
4251
|
-
),
|
|
4251
|
+
), B = ie((P) => {
|
|
4252
4252
|
N.current = P;
|
|
4253
4253
|
}, []), A = ie((P) => {
|
|
4254
4254
|
j.current = P;
|
|
4255
4255
|
}, []), k = ie(
|
|
4256
4256
|
(P) => {
|
|
4257
|
-
const
|
|
4258
|
-
if (!
|
|
4257
|
+
const z = P.threadId ?? T.current;
|
|
4258
|
+
if (!z || T.current && T.current !== z)
|
|
4259
4259
|
return;
|
|
4260
4260
|
const { checkpoints: Y } = Sr(P);
|
|
4261
4261
|
if (!Y.length)
|
|
4262
4262
|
return;
|
|
4263
|
-
const R = Y.find((H) => H.messages && H.messages.length > 0) ?? Y.find((H) => !!H.checkpointId) ?? Y[0], _ = j.current ===
|
|
4263
|
+
const R = Y.find((H) => H.messages && H.messages.length > 0) ?? Y.find((H) => !!H.checkpointId) ?? Y[0], _ = j.current === z;
|
|
4264
4264
|
!l && !_ && t((R == null ? void 0 : R.messages) ?? [], {
|
|
4265
4265
|
checkpointId: (R == null ? void 0 : R.checkpointId) ?? null,
|
|
4266
4266
|
checkpointNs: (R == null ? void 0 : R.checkpointNs) ?? null,
|
|
4267
4267
|
pendingInterrupt: (R == null ? void 0 : R.interrupt) ?? null
|
|
4268
|
-
}), p(P), D.current = `${
|
|
4268
|
+
}), p(P), D.current = `${z}:latest`, N.current = null, j.current === z && (j.current = null);
|
|
4269
4269
|
},
|
|
4270
4270
|
[t, l]
|
|
4271
4271
|
), G = ie(
|
|
4272
|
-
async (P,
|
|
4272
|
+
async (P, z) => {
|
|
4273
4273
|
const Y = T.current;
|
|
4274
4274
|
await M({
|
|
4275
4275
|
threadId: Y,
|
|
@@ -4278,15 +4278,15 @@ function jw({
|
|
|
4278
4278
|
const _ = await e.getStateHistory({
|
|
4279
4279
|
threadId: R,
|
|
4280
4280
|
checkpointId: P,
|
|
4281
|
-
checkpointNs:
|
|
4281
|
+
checkpointNs: z ?? void 0
|
|
4282
4282
|
});
|
|
4283
4283
|
if (T.current !== R)
|
|
4284
4284
|
return;
|
|
4285
4285
|
const { checkpoints: H } = Sr(_), J = H.find(
|
|
4286
|
-
(re) => re.checkpointId === P && (
|
|
4286
|
+
(re) => re.checkpointId === P && (z ? re.checkpointNs === z : !0)
|
|
4287
4287
|
);
|
|
4288
4288
|
if (!J) {
|
|
4289
|
-
console.warn("[useThreadHistoryState] Requested checkpoint not found:", { checkpointId: P, checkpointNs:
|
|
4289
|
+
console.warn("[useThreadHistoryState] Requested checkpoint not found:", { checkpointId: P, checkpointNs: z });
|
|
4290
4290
|
return;
|
|
4291
4291
|
}
|
|
4292
4292
|
p(_), t(J.messages ?? [], {
|
|
@@ -4299,10 +4299,10 @@ function jw({
|
|
|
4299
4299
|
},
|
|
4300
4300
|
[e, t, M]
|
|
4301
4301
|
), X = ie(
|
|
4302
|
-
(P,
|
|
4302
|
+
(P, z) => {
|
|
4303
4303
|
t(c(), {
|
|
4304
4304
|
checkpointId: P ?? null,
|
|
4305
|
-
checkpointNs:
|
|
4305
|
+
checkpointNs: z ?? null
|
|
4306
4306
|
});
|
|
4307
4307
|
},
|
|
4308
4308
|
[c, t]
|
|
@@ -4328,8 +4328,8 @@ function jw({
|
|
|
4328
4328
|
return;
|
|
4329
4329
|
E.current = r;
|
|
4330
4330
|
let P;
|
|
4331
|
-
const
|
|
4332
|
-
D.current !==
|
|
4331
|
+
const z = `${r}:latest`;
|
|
4332
|
+
D.current !== z && K(r, P);
|
|
4333
4333
|
}, [
|
|
4334
4334
|
i,
|
|
4335
4335
|
r,
|
|
@@ -4355,7 +4355,7 @@ function jw({
|
|
|
4355
4355
|
setCurrentCheckpointId: X,
|
|
4356
4356
|
returnToLatest: O,
|
|
4357
4357
|
handleStateHistoryEvent: k,
|
|
4358
|
-
markSkipNextLoad:
|
|
4358
|
+
markSkipNextLoad: B,
|
|
4359
4359
|
markStreamPendingThread: A,
|
|
4360
4360
|
resetHistoryState: W
|
|
4361
4361
|
};
|
|
@@ -4425,7 +4425,7 @@ function _w({
|
|
|
4425
4425
|
), K = ie(
|
|
4426
4426
|
(G) => M(() => G),
|
|
4427
4427
|
[]
|
|
4428
|
-
),
|
|
4428
|
+
), B = ze(() => ({ assemblingMessageId: c.assemblingId ?? null }), [c.assemblingId]), A = ze(
|
|
4429
4429
|
() => ({
|
|
4430
4430
|
threadId: l,
|
|
4431
4431
|
messages: c.messages,
|
|
@@ -4437,7 +4437,7 @@ function _w({
|
|
|
4437
4437
|
checkpoints: f,
|
|
4438
4438
|
checkpointIndex: g,
|
|
4439
4439
|
timelineCheckpoints: v,
|
|
4440
|
-
metadata:
|
|
4440
|
+
metadata: B,
|
|
4441
4441
|
isLoading: x,
|
|
4442
4442
|
isLoadingCheckpoint: b,
|
|
4443
4443
|
error: w,
|
|
@@ -4462,7 +4462,7 @@ function _w({
|
|
|
4462
4462
|
f,
|
|
4463
4463
|
v,
|
|
4464
4464
|
g,
|
|
4465
|
-
|
|
4465
|
+
B,
|
|
4466
4466
|
x,
|
|
4467
4467
|
b,
|
|
4468
4468
|
w,
|
|
@@ -4480,7 +4480,7 @@ function _w({
|
|
|
4480
4480
|
p,
|
|
4481
4481
|
m
|
|
4482
4482
|
]
|
|
4483
|
-
), k =
|
|
4483
|
+
), k = ze(
|
|
4484
4484
|
() => ({
|
|
4485
4485
|
registerClearThread: V,
|
|
4486
4486
|
registerRespondToInterrupt: K
|
|
@@ -4532,7 +4532,7 @@ function Lw({
|
|
|
4532
4532
|
onConnectionError: l,
|
|
4533
4533
|
onToolEnd: c
|
|
4534
4534
|
}) {
|
|
4535
|
-
const { api: d, baseUrl: p } = $s(), m =
|
|
4535
|
+
const { api: d, baseUrl: p } = $s(), m = ze(() => An(p), [p]), { stream: f, stop: v, isStreaming: g, error: x, setToken: b } = lw({ baseUrl: m }), [w, S] = de(!1);
|
|
4536
4536
|
return Qe(() => {
|
|
4537
4537
|
S(g);
|
|
4538
4538
|
}, [g]), /* @__PURE__ */ u.jsx(
|
|
@@ -4586,18 +4586,18 @@ function $w({
|
|
|
4586
4586
|
pushUser: y,
|
|
4587
4587
|
onEvent: T
|
|
4588
4588
|
} = Fs(), { registerClearThread: E, registerRespondToInterrupt: N } = Pw(), j = ie(
|
|
4589
|
-
(
|
|
4590
|
-
v(
|
|
4589
|
+
(B) => {
|
|
4590
|
+
v(B), f.current !== B.threadId && ((B.created ?? !f.current) && w(B.threadId), S(B.threadId), m(B.threadId));
|
|
4591
4591
|
},
|
|
4592
4592
|
[v, w, S, m, f]
|
|
4593
4593
|
), L = ie(
|
|
4594
|
-
(
|
|
4595
|
-
|
|
4594
|
+
(B) => {
|
|
4595
|
+
B.type === "thread_info" ? j(B) : B.type === "state_history" ? b(B) : B.type === "tool.end" ? a == null || a(B) : T(B);
|
|
4596
4596
|
},
|
|
4597
4597
|
[j, b, T, a]
|
|
4598
4598
|
), D = ie(
|
|
4599
|
-
(
|
|
4600
|
-
i(
|
|
4599
|
+
(B) => {
|
|
4600
|
+
i(B, L, {
|
|
4601
4601
|
onError: (A) => {
|
|
4602
4602
|
console.error("[StreamingProvider] Stream error:", A), r == null || r(A);
|
|
4603
4603
|
},
|
|
@@ -4615,11 +4615,11 @@ function $w({
|
|
|
4615
4615
|
F.current = g;
|
|
4616
4616
|
}, [g]);
|
|
4617
4617
|
const q = ie(
|
|
4618
|
-
async (
|
|
4618
|
+
async (B, A, k) => {
|
|
4619
4619
|
const G = f.current;
|
|
4620
4620
|
if (!G)
|
|
4621
4621
|
throw new Error("No active thread to handle interrupt");
|
|
4622
|
-
const X =
|
|
4622
|
+
const X = B ? A ?? !0 : !1, O = F.current, W = {
|
|
4623
4623
|
threadId: G,
|
|
4624
4624
|
checkpointId: O.id ?? void 0,
|
|
4625
4625
|
checkpointNs: O.namespace ?? void 0,
|
|
@@ -4645,19 +4645,19 @@ function $w({
|
|
|
4645
4645
|
E(M);
|
|
4646
4646
|
}, [M, E]);
|
|
4647
4647
|
const V = ie(
|
|
4648
|
-
async (
|
|
4648
|
+
async (B, A) => {
|
|
4649
4649
|
let k = f.current;
|
|
4650
|
-
const G = (
|
|
4650
|
+
const G = (B == null ? void 0 : B.text) ?? "", X = (B == null ? void 0 : B.attachments) ?? [], O = (G == null ? void 0 : G.trim()) ?? "", W = { ...(B == null ? void 0 : B.payload) ?? {} }, P = Array.isArray(W.messages) ? W.messages : void 0;
|
|
4651
4651
|
P && delete W.messages;
|
|
4652
|
-
const
|
|
4653
|
-
if (!k && !O && X.length === 0 && !
|
|
4652
|
+
const z = !!(P && P.length);
|
|
4653
|
+
if (!k && !O && X.length === 0 && !z) return;
|
|
4654
4654
|
if (!k) {
|
|
4655
4655
|
const Xe = Math.floor(Date.now() / 1e3).toString(16).padStart(8, "0"), Ue = Array.from({ length: 4 }, () => Math.floor(Math.random() * 4294967295).toString(16).padStart(8, "0")).join("").slice(0, 16);
|
|
4656
4656
|
k = `${Xe}${Ue}`, w(k), m(k);
|
|
4657
4657
|
}
|
|
4658
4658
|
const { contentParts: Y, filesInfo: R } = await nw(X), _ = [...Y];
|
|
4659
4659
|
O && _.push({ type: "text", text: G });
|
|
4660
|
-
const H = A == null ? void 0 : A.originalMessageId, J = !!(A != null && A.edit && H), re = !
|
|
4660
|
+
const H = A == null ? void 0 : A.originalMessageId, J = !!(A != null && A.edit && H), re = !z && _.length > 0;
|
|
4661
4661
|
let se = null;
|
|
4662
4662
|
re && (se = {
|
|
4663
4663
|
id: J ? H : `msg-${Date.now()}`,
|
|
@@ -4665,7 +4665,7 @@ function $w({
|
|
|
4665
4665
|
content: _,
|
|
4666
4666
|
createdAt: (/* @__PURE__ */ new Date()).toISOString()
|
|
4667
4667
|
}, J ? y(se, H) : y(se));
|
|
4668
|
-
const Se =
|
|
4668
|
+
const Se = z ? P : se ? [se] : [], we = {
|
|
4669
4669
|
...W,
|
|
4670
4670
|
...R.length ? { files_info: R } : {}
|
|
4671
4671
|
};
|
|
@@ -4675,17 +4675,17 @@ function $w({
|
|
|
4675
4675
|
const Xe = Dw(x, H);
|
|
4676
4676
|
Ae = Xe.checkpointId, Ke = Xe.checkpointNs ?? void 0;
|
|
4677
4677
|
}
|
|
4678
|
-
const
|
|
4678
|
+
const Be = {
|
|
4679
4679
|
threadId: k,
|
|
4680
4680
|
payload: we,
|
|
4681
4681
|
checkpointId: Ae,
|
|
4682
4682
|
checkpointNs: Ke,
|
|
4683
4683
|
edit: !!(A != null && A.edit)
|
|
4684
4684
|
};
|
|
4685
|
-
D(
|
|
4685
|
+
D(Be);
|
|
4686
4686
|
},
|
|
4687
4687
|
[g, f, w, y, D, x]
|
|
4688
|
-
), K =
|
|
4688
|
+
), K = ze(
|
|
4689
4689
|
() => ({
|
|
4690
4690
|
isStreaming: c,
|
|
4691
4691
|
error: d,
|
|
@@ -4710,7 +4710,7 @@ function yN() {
|
|
|
4710
4710
|
function Cc(e) {
|
|
4711
4711
|
return typeof e == "object" && e !== null;
|
|
4712
4712
|
}
|
|
4713
|
-
function
|
|
4713
|
+
function zw(e, t) {
|
|
4714
4714
|
if (Object.is(e, t)) return !0;
|
|
4715
4715
|
if (!Cc(e) || !Cc(t)) return !1;
|
|
4716
4716
|
const n = Object.keys(e), r = Object.keys(t);
|
|
@@ -4721,9 +4721,9 @@ function Bw(e, t) {
|
|
|
4721
4721
|
return !1;
|
|
4722
4722
|
return !0;
|
|
4723
4723
|
}
|
|
4724
|
-
function
|
|
4724
|
+
function Bw(e) {
|
|
4725
4725
|
const t = _e(e), n = _e(e);
|
|
4726
|
-
return
|
|
4726
|
+
return zw(t.current, e) || (t.current = e, n.current = e), n.current;
|
|
4727
4727
|
}
|
|
4728
4728
|
function no({
|
|
4729
4729
|
children: e,
|
|
@@ -4738,7 +4738,7 @@ function no({
|
|
|
4738
4738
|
onThreadChange: c,
|
|
4739
4739
|
onToolEnd: d
|
|
4740
4740
|
}) {
|
|
4741
|
-
const p =
|
|
4741
|
+
const p = Bw(t), m = Xr(i), f = Xr(l), v = Xr(a), g = Xr(c), x = Xr(d), b = ze(
|
|
4742
4742
|
() => ({
|
|
4743
4743
|
initialThreadId: n,
|
|
4744
4744
|
initialCheckpointId: r,
|
|
@@ -4877,7 +4877,7 @@ function TN(e) {
|
|
|
4877
4877
|
}), Kw(e);
|
|
4878
4878
|
}
|
|
4879
4879
|
function ne(...e) {
|
|
4880
|
-
return
|
|
4880
|
+
return zg(Fg(e));
|
|
4881
4881
|
}
|
|
4882
4882
|
const qw = wo(
|
|
4883
4883
|
"inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium ring-offset-background transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0",
|
|
@@ -5086,10 +5086,10 @@ var Qw = [
|
|
|
5086
5086
|
});
|
|
5087
5087
|
return r.displayName = `Primitive.${t}`, { ...e, [t]: r };
|
|
5088
5088
|
}, {});
|
|
5089
|
-
function
|
|
5089
|
+
function zi(e, t) {
|
|
5090
5090
|
e && yo.flushSync(() => e.dispatchEvent(t));
|
|
5091
5091
|
}
|
|
5092
|
-
function
|
|
5092
|
+
function zs(e) {
|
|
5093
5093
|
const t = e + "CollectionProvider", [n, r] = xn(t), [o, s] = n(
|
|
5094
5094
|
t,
|
|
5095
5095
|
{ collectionRef: { current: null }, itemMap: /* @__PURE__ */ new Map() }
|
|
@@ -5130,7 +5130,7 @@ function Bs(e) {
|
|
|
5130
5130
|
];
|
|
5131
5131
|
}
|
|
5132
5132
|
var eb = h.createContext(void 0);
|
|
5133
|
-
function
|
|
5133
|
+
function Bs(e) {
|
|
5134
5134
|
const t = h.useContext(eb);
|
|
5135
5135
|
return e || t || "ltr";
|
|
5136
5136
|
}
|
|
@@ -5156,7 +5156,7 @@ var nb = "DismissableLayer", ei = "dismissableLayer.update", rb = "dismissableLa
|
|
|
5156
5156
|
layers: /* @__PURE__ */ new Set(),
|
|
5157
5157
|
layersWithOutsidePointerEventsDisabled: /* @__PURE__ */ new Set(),
|
|
5158
5158
|
branches: /* @__PURE__ */ new Set()
|
|
5159
|
-
}),
|
|
5159
|
+
}), zr = h.forwardRef(
|
|
5160
5160
|
(e, t) => {
|
|
5161
5161
|
const {
|
|
5162
5162
|
disableOutsidePointerEvents: n = !1,
|
|
@@ -5204,7 +5204,7 @@ var nb = "DismissableLayer", ei = "dismissableLayer.update", rb = "dismissableLa
|
|
|
5204
5204
|
);
|
|
5205
5205
|
}
|
|
5206
5206
|
);
|
|
5207
|
-
|
|
5207
|
+
zr.displayName = nb;
|
|
5208
5208
|
var sb = "DismissableLayerBranch", Nd = h.forwardRef((e, t) => {
|
|
5209
5209
|
const n = h.useContext(Id), r = h.useRef(null), o = $e(t, r);
|
|
5210
5210
|
return h.useEffect(() => {
|
|
@@ -5266,10 +5266,10 @@ function Rc() {
|
|
|
5266
5266
|
}
|
|
5267
5267
|
function Ad(e, t, n, { discrete: r }) {
|
|
5268
5268
|
const o = n.originalEvent.target, s = new CustomEvent(e, { bubbles: !1, cancelable: !0, detail: n });
|
|
5269
|
-
t && o.addEventListener(e, t, { once: !0 }), r ?
|
|
5269
|
+
t && o.addEventListener(e, t, { once: !0 }), r ? zi(o, s) : o.dispatchEvent(s);
|
|
5270
5270
|
}
|
|
5271
|
-
var lb =
|
|
5272
|
-
function
|
|
5271
|
+
var lb = zr, cb = Nd, Ea = 0;
|
|
5272
|
+
function Bi() {
|
|
5273
5273
|
h.useEffect(() => {
|
|
5274
5274
|
const e = document.querySelectorAll("[data-radix-focus-guard]");
|
|
5275
5275
|
return document.body.insertAdjacentElement("afterbegin", e[0] ?? Ic()), document.body.insertAdjacentElement("beforeend", e[1] ?? Ic()), Ea++, () => {
|
|
@@ -5439,7 +5439,7 @@ function jn(e, t) {
|
|
|
5439
5439
|
function Pn(e) {
|
|
5440
5440
|
return e.split("-")[0];
|
|
5441
5441
|
}
|
|
5442
|
-
function
|
|
5442
|
+
function Br(e) {
|
|
5443
5443
|
return e.split("-")[1];
|
|
5444
5444
|
}
|
|
5445
5445
|
function Hi(e) {
|
|
@@ -5457,7 +5457,7 @@ function Wi(e) {
|
|
|
5457
5457
|
}
|
|
5458
5458
|
function Tb(e, t, n) {
|
|
5459
5459
|
n === void 0 && (n = !1);
|
|
5460
|
-
const r =
|
|
5460
|
+
const r = Br(e), o = Wi(e), s = Ui(o);
|
|
5461
5461
|
let a = o === "x" ? r === (n ? "end" : "start") ? "right" : "left" : r === "start" ? "bottom" : "top";
|
|
5462
5462
|
return t.reference[s] > t.floating[s] && (a = gs(a)), [a, gs(a)];
|
|
5463
5463
|
}
|
|
@@ -5482,7 +5482,7 @@ function Rb(e, t, n) {
|
|
|
5482
5482
|
}
|
|
5483
5483
|
}
|
|
5484
5484
|
function Ib(e, t, n, r) {
|
|
5485
|
-
const o =
|
|
5485
|
+
const o = Br(e);
|
|
5486
5486
|
let s = Rb(Pn(e), n === "start", r);
|
|
5487
5487
|
return o && (s = s.map((a) => a + "-" + o), t && (s = s.concat(s.map(ni)))), s;
|
|
5488
5488
|
}
|
|
@@ -5562,7 +5562,7 @@ function Oc(e, t, n) {
|
|
|
5562
5562
|
y: r.y
|
|
5563
5563
|
};
|
|
5564
5564
|
}
|
|
5565
|
-
switch (
|
|
5565
|
+
switch (Br(t)) {
|
|
5566
5566
|
case "start":
|
|
5567
5567
|
f[a] -= m * (n && c ? -1 : 1);
|
|
5568
5568
|
break;
|
|
@@ -5702,14 +5702,14 @@ const jb = (e) => ({
|
|
|
5702
5702
|
}, f = Wi(o), v = Ui(f), g = await a.getDimensions(c), x = f === "y", b = x ? "top" : "left", w = x ? "bottom" : "right", S = x ? "clientHeight" : "clientWidth", C = s.reference[v] + s.reference[f] - m[f] - s.floating[v], y = m[f] - s.reference[f], T = await (a.getOffsetParent == null ? void 0 : a.getOffsetParent(c));
|
|
5703
5703
|
let E = T ? T[S] : 0;
|
|
5704
5704
|
(!E || !await (a.isElement == null ? void 0 : a.isElement(T))) && (E = i.floating[S] || s.floating[v]);
|
|
5705
|
-
const N = C / 2 - y / 2, j = E / 2 - g[v] / 2 - 1, L = Ln(p[b], j), D = Ln(p[w], j), F = L, q = E - g[v] - D, M = E / 2 - g[v] / 2 + N, V = ti(F, M, q), K = !l.arrow &&
|
|
5705
|
+
const N = C / 2 - y / 2, j = E / 2 - g[v] / 2 - 1, L = Ln(p[b], j), D = Ln(p[w], j), F = L, q = E - g[v] - D, M = E / 2 - g[v] / 2 + N, V = ti(F, M, q), K = !l.arrow && Br(o) != null && M !== V && s.reference[v] / 2 - (M < F ? L : D) - g[v] / 2 < 0, B = K ? M < F ? M - F : M - q : 0;
|
|
5706
5706
|
return {
|
|
5707
|
-
[f]: m[f] +
|
|
5707
|
+
[f]: m[f] + B,
|
|
5708
5708
|
data: {
|
|
5709
5709
|
[f]: V,
|
|
5710
|
-
centerOffset: M - V -
|
|
5710
|
+
centerOffset: M - V - B,
|
|
5711
5711
|
...K && {
|
|
5712
|
-
alignmentOffset:
|
|
5712
|
+
alignmentOffset: B
|
|
5713
5713
|
}
|
|
5714
5714
|
},
|
|
5715
5715
|
reset: K
|
|
@@ -5765,12 +5765,12 @@ const jb = (e) => ({
|
|
|
5765
5765
|
placement: V
|
|
5766
5766
|
}
|
|
5767
5767
|
};
|
|
5768
|
-
let K = (F = L.filter((
|
|
5768
|
+
let K = (F = L.filter((B) => B.overflows[0] <= 0).sort((B, A) => B.overflows[1] - A.overflows[1])[0]) == null ? void 0 : F.placement;
|
|
5769
5769
|
if (!K)
|
|
5770
5770
|
switch (f) {
|
|
5771
5771
|
case "bestFit": {
|
|
5772
5772
|
var q;
|
|
5773
|
-
const
|
|
5773
|
+
const B = (q = L.filter((A) => {
|
|
5774
5774
|
if (T) {
|
|
5775
5775
|
const k = Sn(A.placement);
|
|
5776
5776
|
return k === w || // Create a bias to the `y` side axis due to horizontal
|
|
@@ -5779,7 +5779,7 @@ const jb = (e) => ({
|
|
|
5779
5779
|
}
|
|
5780
5780
|
return !0;
|
|
5781
5781
|
}).map((A) => [A.placement, A.overflows.filter((k) => k > 0).reduce((k, G) => k + G, 0)]).sort((A, k) => A[1] - k[1])[0]) == null ? void 0 : q[0];
|
|
5782
|
-
|
|
5782
|
+
B && (K = B);
|
|
5783
5783
|
break;
|
|
5784
5784
|
}
|
|
5785
5785
|
case "initialPlacement":
|
|
@@ -5855,7 +5855,7 @@ async function Mb(e, t) {
|
|
|
5855
5855
|
placement: n,
|
|
5856
5856
|
platform: r,
|
|
5857
5857
|
elements: o
|
|
5858
|
-
} = e, s = await (r.isRTL == null ? void 0 : r.isRTL(o.floating)), a = Pn(n), i =
|
|
5858
|
+
} = e, s = await (r.isRTL == null ? void 0 : r.isRTL(o.floating)), a = Pn(n), i = Br(n), l = Sn(n) === "y", c = _d.has(a) ? -1 : 1, d = s && l ? -1 : 1, p = jn(t, e);
|
|
5859
5859
|
let {
|
|
5860
5860
|
mainAxis: m,
|
|
5861
5861
|
crossAxis: f,
|
|
@@ -6012,7 +6012,7 @@ const Ob = function(e) {
|
|
|
6012
6012
|
apply: l = () => {
|
|
6013
6013
|
},
|
|
6014
6014
|
...c
|
|
6015
|
-
} = jn(e, t), d = await lo(t, c), p = Pn(o), m =
|
|
6015
|
+
} = jn(e, t), d = await lo(t, c), p = Pn(o), m = Br(o), f = Sn(o) === "y", {
|
|
6016
6016
|
width: v,
|
|
6017
6017
|
height: g
|
|
6018
6018
|
} = s.floating;
|
|
@@ -6074,9 +6074,9 @@ function Io(e) {
|
|
|
6074
6074
|
} = hn(e);
|
|
6075
6075
|
return /auto|scroll|overlay|hidden|clip/.test(t + r + n) && !Fb.has(o);
|
|
6076
6076
|
}
|
|
6077
|
-
const
|
|
6078
|
-
function
|
|
6079
|
-
return
|
|
6077
|
+
const zb = /* @__PURE__ */ new Set(["table", "td", "th"]);
|
|
6078
|
+
function Bb(e) {
|
|
6079
|
+
return zb.has(Hr(e));
|
|
6080
6080
|
}
|
|
6081
6081
|
const Hb = [":popover-open", ":modal"];
|
|
6082
6082
|
function Ws(e) {
|
|
@@ -6296,7 +6296,7 @@ function ty(e, t) {
|
|
|
6296
6296
|
y: c
|
|
6297
6297
|
};
|
|
6298
6298
|
}
|
|
6299
|
-
function
|
|
6299
|
+
function zc(e, t, n) {
|
|
6300
6300
|
let r;
|
|
6301
6301
|
if (t === "viewport")
|
|
6302
6302
|
r = Qb(e, n);
|
|
@@ -6340,9 +6340,9 @@ function ry(e) {
|
|
|
6340
6340
|
strategy: o
|
|
6341
6341
|
} = e;
|
|
6342
6342
|
const a = [...n === "clippingAncestors" ? Ws(t) ? [] : ny(t, this._c) : [].concat(n), r], i = a[0], l = a.reduce((c, d) => {
|
|
6343
|
-
const p =
|
|
6343
|
+
const p = zc(t, d, o);
|
|
6344
6344
|
return c.top = Zt(p.top, c.top), c.right = Ln(p.right, c.right), c.bottom = Ln(p.bottom, c.bottom), c.left = Zt(p.left, c.left), c;
|
|
6345
|
-
},
|
|
6345
|
+
}, zc(t, i, o));
|
|
6346
6346
|
return {
|
|
6347
6347
|
width: l.right - l.left,
|
|
6348
6348
|
height: l.bottom - l.top,
|
|
@@ -6387,7 +6387,7 @@ function sy(e, t, n) {
|
|
|
6387
6387
|
function Ia(e) {
|
|
6388
6388
|
return hn(e).position === "static";
|
|
6389
6389
|
}
|
|
6390
|
-
function
|
|
6390
|
+
function Bc(e, t) {
|
|
6391
6391
|
if (!En(e) || hn(e).position === "fixed")
|
|
6392
6392
|
return null;
|
|
6393
6393
|
if (t)
|
|
@@ -6395,7 +6395,7 @@ function zc(e, t) {
|
|
|
6395
6395
|
let n = e.offsetParent;
|
|
6396
6396
|
return kn(e) === n && (n = n.ownerDocument.body), n;
|
|
6397
6397
|
}
|
|
6398
|
-
function
|
|
6398
|
+
function zd(e, t) {
|
|
6399
6399
|
const n = en(e);
|
|
6400
6400
|
if (Ws(e))
|
|
6401
6401
|
return n;
|
|
@@ -6408,13 +6408,13 @@ function Bd(e, t) {
|
|
|
6408
6408
|
}
|
|
6409
6409
|
return n;
|
|
6410
6410
|
}
|
|
6411
|
-
let r =
|
|
6412
|
-
for (; r &&
|
|
6413
|
-
r =
|
|
6411
|
+
let r = Bc(e, t);
|
|
6412
|
+
for (; r && Bb(r) && Ia(r); )
|
|
6413
|
+
r = Bc(r, t);
|
|
6414
6414
|
return r && Pr(r) && Ia(r) && !Vi(r) ? n : r || Kb(e) || n;
|
|
6415
6415
|
}
|
|
6416
6416
|
const ay = async function(e) {
|
|
6417
|
-
const t = this.getOffsetParent ||
|
|
6417
|
+
const t = this.getOffsetParent || zd, n = this.getDimensions, r = await n(e.floating);
|
|
6418
6418
|
return {
|
|
6419
6419
|
reference: sy(e.reference, await t(e.floating), e.strategy),
|
|
6420
6420
|
floating: {
|
|
@@ -6432,7 +6432,7 @@ const ly = {
|
|
|
6432
6432
|
convertOffsetParentRelativeRectToViewportRelativeRect: Xb,
|
|
6433
6433
|
getDocumentElement: kn,
|
|
6434
6434
|
getClippingRect: ry,
|
|
6435
|
-
getOffsetParent:
|
|
6435
|
+
getOffsetParent: zd,
|
|
6436
6436
|
getElementRects: ay,
|
|
6437
6437
|
getClientRects: Jb,
|
|
6438
6438
|
getDimensions: oy,
|
|
@@ -6440,7 +6440,7 @@ const ly = {
|
|
|
6440
6440
|
isElement: pn,
|
|
6441
6441
|
isRTL: iy
|
|
6442
6442
|
};
|
|
6443
|
-
function
|
|
6443
|
+
function Bd(e, t) {
|
|
6444
6444
|
return e.x === t.x && e.y === t.y && e.width === t.width && e.height === t.height;
|
|
6445
6445
|
}
|
|
6446
6446
|
function cy(e, t) {
|
|
@@ -6474,7 +6474,7 @@ function cy(e, t) {
|
|
|
6474
6474
|
a(!1, 1e-7);
|
|
6475
6475
|
}, 1e3);
|
|
6476
6476
|
}
|
|
6477
|
-
E === 1 && !
|
|
6477
|
+
E === 1 && !Bd(c, e.getBoundingClientRect()) && a(), C = !1;
|
|
6478
6478
|
}
|
|
6479
6479
|
try {
|
|
6480
6480
|
n = new IntersectionObserver(y, {
|
|
@@ -6516,7 +6516,7 @@ function uy(e, t, n, r) {
|
|
|
6516
6516
|
l && x();
|
|
6517
6517
|
function x() {
|
|
6518
6518
|
const b = sr(e);
|
|
6519
|
-
g && !
|
|
6519
|
+
g && !Bd(g, b) && n(), g = b, v = requestAnimationFrame(x);
|
|
6520
6520
|
}
|
|
6521
6521
|
return n(), () => {
|
|
6522
6522
|
var b;
|
|
@@ -6656,7 +6656,7 @@ function by(e) {
|
|
|
6656
6656
|
}), [w, S]), K = h.useMemo(() => ({
|
|
6657
6657
|
reference: C,
|
|
6658
6658
|
floating: y
|
|
6659
|
-
}), [C, y]),
|
|
6659
|
+
}), [C, y]), B = h.useMemo(() => {
|
|
6660
6660
|
const A = {
|
|
6661
6661
|
position: n,
|
|
6662
6662
|
left: 0,
|
|
@@ -6682,8 +6682,8 @@ function by(e) {
|
|
|
6682
6682
|
update: q,
|
|
6683
6683
|
refs: V,
|
|
6684
6684
|
elements: K,
|
|
6685
|
-
floatingStyles:
|
|
6686
|
-
}), [d, q, V, K,
|
|
6685
|
+
floatingStyles: B
|
|
6686
|
+
}), [d, q, V, K, B]);
|
|
6687
6687
|
}
|
|
6688
6688
|
const yy = (e) => {
|
|
6689
6689
|
function t(n) {
|
|
@@ -6805,7 +6805,7 @@ var Yi = "PopperContent", [Py, _y] = Vd(Yi), Xd = h.forwardRef(
|
|
|
6805
6805
|
boundary: D.filter(Oy),
|
|
6806
6806
|
// with `strategy: 'fixed'`, this is the only way to get it to respect boundaries
|
|
6807
6807
|
altBoundary: F
|
|
6808
|
-
}, { refs: M, floatingStyles: V, placement: K, isPositioned:
|
|
6808
|
+
}, { refs: M, floatingStyles: V, placement: K, isPositioned: B, middlewareData: A } = by({
|
|
6809
6809
|
// default to `fixed` strategy so users don't have to pick and we also avoid focus scroll issues
|
|
6810
6810
|
strategy: "fixed",
|
|
6811
6811
|
placement: j,
|
|
@@ -6827,8 +6827,8 @@ var Yi = "PopperContent", [Py, _y] = Vd(Yi), Xd = h.forwardRef(
|
|
|
6827
6827
|
ky({
|
|
6828
6828
|
...q,
|
|
6829
6829
|
apply: ({ elements: Se, rects: we, availableWidth: Ae, availableHeight: Ke }) => {
|
|
6830
|
-
const { width:
|
|
6831
|
-
Ue.setProperty("--radix-popper-available-width", `${Ae}px`), Ue.setProperty("--radix-popper-available-height", `${Ke}px`), Ue.setProperty("--radix-popper-anchor-width", `${
|
|
6830
|
+
const { width: Be, height: Xe } = we.reference, Ue = Se.floating.style;
|
|
6831
|
+
Ue.setProperty("--radix-popper-available-width", `${Ae}px`), Ue.setProperty("--radix-popper-available-height", `${Ke}px`), Ue.setProperty("--radix-popper-anchor-width", `${Be}px`), Ue.setProperty("--radix-popper-anchor-height", `${Xe}px`);
|
|
6832
6832
|
}
|
|
6833
6833
|
}),
|
|
6834
6834
|
C && Iy({ element: C, padding: i }),
|
|
@@ -6837,9 +6837,9 @@ var Yi = "PopperContent", [Py, _y] = Vd(Yi), Xd = h.forwardRef(
|
|
|
6837
6837
|
]
|
|
6838
6838
|
}), [k, G] = Qd(K), X = vt(v);
|
|
6839
6839
|
Pt(() => {
|
|
6840
|
-
|
|
6841
|
-
}, [
|
|
6842
|
-
const O = (R = A.arrow) == null ? void 0 : R.x, W = (_ = A.arrow) == null ? void 0 : _.y, P = ((H = A.arrow) == null ? void 0 : H.centerOffset) !== 0, [
|
|
6840
|
+
B && (X == null || X());
|
|
6841
|
+
}, [B, X]);
|
|
6842
|
+
const O = (R = A.arrow) == null ? void 0 : R.x, W = (_ = A.arrow) == null ? void 0 : _.y, P = ((H = A.arrow) == null ? void 0 : H.centerOffset) !== 0, [z, Y] = h.useState();
|
|
6843
6843
|
return Pt(() => {
|
|
6844
6844
|
b && Y(window.getComputedStyle(b).zIndex);
|
|
6845
6845
|
}, [b]), /* @__PURE__ */ u.jsx(
|
|
@@ -6849,10 +6849,10 @@ var Yi = "PopperContent", [Py, _y] = Vd(Yi), Xd = h.forwardRef(
|
|
|
6849
6849
|
"data-radix-popper-content-wrapper": "",
|
|
6850
6850
|
style: {
|
|
6851
6851
|
...V,
|
|
6852
|
-
transform:
|
|
6852
|
+
transform: B ? V.transform : "translate(0, -200%)",
|
|
6853
6853
|
// keep off the page when measuring
|
|
6854
6854
|
minWidth: "max-content",
|
|
6855
|
-
zIndex:
|
|
6855
|
+
zIndex: z,
|
|
6856
6856
|
"--radix-popper-transform-origin": [
|
|
6857
6857
|
(J = A.transformOrigin) == null ? void 0 : J.x,
|
|
6858
6858
|
(re = A.transformOrigin) == null ? void 0 : re.y
|
|
@@ -6886,7 +6886,7 @@ var Yi = "PopperContent", [Py, _y] = Vd(Yi), Xd = h.forwardRef(
|
|
|
6886
6886
|
...g.style,
|
|
6887
6887
|
// if the PopperContent hasn't been placed yet (not all measurements done)
|
|
6888
6888
|
// we prevent animations so that users's animation don't kick in too early referring wrong sides
|
|
6889
|
-
animation:
|
|
6889
|
+
animation: B ? void 0 : "none"
|
|
6890
6890
|
}
|
|
6891
6891
|
}
|
|
6892
6892
|
)
|
|
@@ -6977,7 +6977,7 @@ function $y(e, t) {
|
|
|
6977
6977
|
return h.useReducer((n, r) => t[n][r] ?? n, e);
|
|
6978
6978
|
}
|
|
6979
6979
|
var Xt = (e) => {
|
|
6980
|
-
const { present: t, children: n } = e, r = Fy(t), o = typeof n == "function" ? n({ present: r.isPresent }) : h.Children.only(n), s = $e(r.ref,
|
|
6980
|
+
const { present: t, children: n } = e, r = Fy(t), o = typeof n == "function" ? n({ present: r.isPresent }) : h.Children.only(n), s = $e(r.ref, zy(o));
|
|
6981
6981
|
return typeof n == "function" || r.isPresent ? h.cloneElement(o, { ref: s }) : null;
|
|
6982
6982
|
};
|
|
6983
6983
|
Xt.displayName = "Presence";
|
|
@@ -7033,12 +7033,12 @@ function Fy(e) {
|
|
|
7033
7033
|
function Uo(e) {
|
|
7034
7034
|
return (e == null ? void 0 : e.animationName) || "none";
|
|
7035
7035
|
}
|
|
7036
|
-
function
|
|
7036
|
+
function zy(e) {
|
|
7037
7037
|
var r, o;
|
|
7038
7038
|
let t = (r = Object.getOwnPropertyDescriptor(e.props, "ref")) == null ? void 0 : r.get, n = t && "isReactWarning" in t && t.isReactWarning;
|
|
7039
7039
|
return n ? e.ref : (t = (o = Object.getOwnPropertyDescriptor(e, "ref")) == null ? void 0 : o.get, n = t && "isReactWarning" in t && t.isReactWarning, n ? e.props.ref : e.props.ref || e.ref);
|
|
7040
7040
|
}
|
|
7041
|
-
var Aa = "rovingFocusGroup.onEntryFocus",
|
|
7041
|
+
var Aa = "rovingFocusGroup.onEntryFocus", By = { bubbles: !1, cancelable: !0 }, Ao = "RovingFocusGroup", [oi, ef, Hy] = zs(Ao), [Uy, tf] = xn(
|
|
7042
7042
|
Ao,
|
|
7043
7043
|
[Hy]
|
|
7044
7044
|
), [Wy, Vy] = Uy(Ao), nf = h.forwardRef(
|
|
@@ -7057,7 +7057,7 @@ var Ky = h.forwardRef((e, t) => {
|
|
|
7057
7057
|
onEntryFocus: c,
|
|
7058
7058
|
preventScrollOnEntryFocus: d = !1,
|
|
7059
7059
|
...p
|
|
7060
|
-
} = e, m = h.useRef(null), f = $e(t, m), v =
|
|
7060
|
+
} = e, m = h.useRef(null), f = $e(t, m), v = Bs(s), [g, x] = Dn({
|
|
7061
7061
|
prop: a,
|
|
7062
7062
|
defaultProp: i ?? null,
|
|
7063
7063
|
onChange: l,
|
|
@@ -7102,7 +7102,7 @@ var Ky = h.forwardRef((e, t) => {
|
|
|
7102
7102
|
onFocus: ae(e.onFocus, (N) => {
|
|
7103
7103
|
const j = !y.current;
|
|
7104
7104
|
if (N.target === N.currentTarget && j && !b) {
|
|
7105
|
-
const L = new CustomEvent(Aa,
|
|
7105
|
+
const L = new CustomEvent(Aa, By);
|
|
7106
7106
|
if (N.currentTarget.dispatchEvent(L), !L.defaultPrevented) {
|
|
7107
7107
|
const D = C().filter((K) => K.focusable), F = D.find((K) => K.active), q = D.find((K) => K.id === g), V = [F, q, ...D].filter(
|
|
7108
7108
|
Boolean
|
|
@@ -7722,18 +7722,18 @@ var Gs = h.forwardRef(function(e, t) {
|
|
|
7722
7722
|
return h.createElement(qs, yn({}, e, { ref: t, sideCar: L0 }));
|
|
7723
7723
|
});
|
|
7724
7724
|
Gs.classNames = qs.classNames;
|
|
7725
|
-
var ai = ["Enter", " "], $0 = ["ArrowDown", "PageUp", "Home"], mf = ["ArrowUp", "PageDown", "End"], F0 = [...$0, ...mf],
|
|
7725
|
+
var ai = ["Enter", " "], $0 = ["ArrowDown", "PageUp", "Home"], mf = ["ArrowUp", "PageDown", "End"], F0 = [...$0, ...mf], z0 = {
|
|
7726
7726
|
ltr: [...ai, "ArrowRight"],
|
|
7727
7727
|
rtl: [...ai, "ArrowLeft"]
|
|
7728
|
-
},
|
|
7728
|
+
}, B0 = {
|
|
7729
7729
|
ltr: ["ArrowLeft"],
|
|
7730
7730
|
rtl: ["ArrowRight"]
|
|
7731
|
-
}, jo = "Menu", [uo, H0, U0] =
|
|
7731
|
+
}, jo = "Menu", [uo, H0, U0] = zs(jo), [dr, gf] = xn(jo, [
|
|
7732
7732
|
U0,
|
|
7733
7733
|
Ur,
|
|
7734
7734
|
tf
|
|
7735
7735
|
]), Ys = Ur(), xf = tf(), [W0, fr] = dr(jo), [V0, Po] = dr(jo), vf = (e) => {
|
|
7736
|
-
const { __scopeMenu: t, open: n = !1, children: r, dir: o, onOpenChange: s, modal: a = !0 } = e, i = Ys(t), [l, c] = h.useState(null), d = h.useRef(!1), p = vt(s), m =
|
|
7736
|
+
const { __scopeMenu: t, open: n = !1, children: r, dir: o, onOpenChange: s, modal: a = !0 } = e, i = Ys(t), [l, c] = h.useState(null), d = h.useRef(!1), p = vt(s), m = Bs(o);
|
|
7737
7737
|
return h.useEffect(() => {
|
|
7738
7738
|
const f = () => {
|
|
7739
7739
|
d.current = !0, document.addEventListener("pointerdown", v, { capture: !0, once: !0 }), document.addEventListener("pointermove", v, { capture: !0, once: !0 });
|
|
@@ -7836,14 +7836,14 @@ var an = "MenuContent", [G0, rl] = dr(an), yf = h.forwardRef(
|
|
|
7836
7836
|
onDismiss: f,
|
|
7837
7837
|
disableOutsideScroll: v,
|
|
7838
7838
|
...g
|
|
7839
|
-
} = e, x = fr(an, n), b = Po(an, n), w = Ys(n), S = xf(n), C = H0(n), [y, T] = h.useState(null), E = h.useRef(null), N = $e(t, E, x.onContentChange), j = h.useRef(0), L = h.useRef(""), D = h.useRef(0), F = h.useRef(null), q = h.useRef("right"), M = h.useRef(0), V = v ? Gs : h.Fragment, K = v ? { as: J0, allowPinchZoom: !0 } : void 0,
|
|
7839
|
+
} = e, x = fr(an, n), b = Po(an, n), w = Ys(n), S = xf(n), C = H0(n), [y, T] = h.useState(null), E = h.useRef(null), N = $e(t, E, x.onContentChange), j = h.useRef(0), L = h.useRef(""), D = h.useRef(0), F = h.useRef(null), q = h.useRef("right"), M = h.useRef(0), V = v ? Gs : h.Fragment, K = v ? { as: J0, allowPinchZoom: !0 } : void 0, B = (k) => {
|
|
7840
7840
|
var R, _;
|
|
7841
|
-
const G = L.current + k, X = C().filter((H) => !H.disabled), O = document.activeElement, W = (R = X.find((H) => H.ref.current === O)) == null ? void 0 : R.textValue, P = X.map((H) => H.textValue),
|
|
7841
|
+
const G = L.current + k, X = C().filter((H) => !H.disabled), O = document.activeElement, W = (R = X.find((H) => H.ref.current === O)) == null ? void 0 : R.textValue, P = X.map((H) => H.textValue), z = cS(P, G, W), Y = (_ = X.find((H) => H.textValue === z)) == null ? void 0 : _.ref.current;
|
|
7842
7842
|
(function H(J) {
|
|
7843
7843
|
L.current = J, window.clearTimeout(j.current), J !== "" && (j.current = window.setTimeout(() => H(""), 1e3));
|
|
7844
7844
|
})(G), Y && setTimeout(() => Y.focus());
|
|
7845
7845
|
};
|
|
7846
|
-
h.useEffect(() => () => window.clearTimeout(j.current), []),
|
|
7846
|
+
h.useEffect(() => () => window.clearTimeout(j.current), []), Bi();
|
|
7847
7847
|
const A = h.useCallback((k) => {
|
|
7848
7848
|
var X, O;
|
|
7849
7849
|
return q.current === ((X = F.current) == null ? void 0 : X.side) && dS(k, (O = F.current) == null ? void 0 : O.area);
|
|
@@ -7887,7 +7887,7 @@ var an = "MenuContent", [G0, rl] = dr(an), yf = h.forwardRef(
|
|
|
7887
7887
|
}),
|
|
7888
7888
|
onUnmountAutoFocus: a,
|
|
7889
7889
|
children: /* @__PURE__ */ u.jsx(
|
|
7890
|
-
|
|
7890
|
+
zr,
|
|
7891
7891
|
{
|
|
7892
7892
|
asChild: !0,
|
|
7893
7893
|
disableOutsidePointerEvents: i,
|
|
@@ -7924,7 +7924,7 @@ var an = "MenuContent", [G0, rl] = dr(an), yf = h.forwardRef(
|
|
|
7924
7924
|
style: { outline: "none", ...g.style },
|
|
7925
7925
|
onKeyDown: ae(g.onKeyDown, (k) => {
|
|
7926
7926
|
const X = k.target.closest("[data-radix-menu-content]") === k.currentTarget, O = k.ctrlKey || k.altKey || k.metaKey, W = k.key.length === 1;
|
|
7927
|
-
X && (k.key === "Tab" && k.preventDefault(), !O && W &&
|
|
7927
|
+
X && (k.key === "Tab" && k.preventDefault(), !O && W && B(k.key));
|
|
7928
7928
|
const P = E.current;
|
|
7929
7929
|
if (k.target !== P || !F0.includes(k.key)) return;
|
|
7930
7930
|
k.preventDefault();
|
|
@@ -7977,7 +7977,7 @@ var ws = "MenuItem", Yc = "menu.itemSelect", Xs = h.forwardRef(
|
|
|
7977
7977
|
const p = s.current;
|
|
7978
7978
|
if (!n && p) {
|
|
7979
7979
|
const m = new CustomEvent(Yc, { bubbles: !0, cancelable: !0 });
|
|
7980
|
-
p.addEventListener(Yc, (f) => r == null ? void 0 : r(f), { once: !0 }),
|
|
7980
|
+
p.addEventListener(Yc, (f) => r == null ? void 0 : r(f), { once: !0 }), zi(p, m), m.defaultPrevented ? c.current = !1 : a.onClose();
|
|
7981
7981
|
}
|
|
7982
7982
|
};
|
|
7983
7983
|
return /* @__PURE__ */ u.jsx(
|
|
@@ -8207,7 +8207,7 @@ var aS = "MenuSub", [CN, _f] = dr(aS), Qr = "MenuSubTrigger", Mf = h.forwardRef(
|
|
|
8207
8207
|
onKeyDown: ae(e.onKeyDown, (p) => {
|
|
8208
8208
|
var f;
|
|
8209
8209
|
const m = s.searchRef.current !== "";
|
|
8210
|
-
e.disabled || m && p.key === " " ||
|
|
8210
|
+
e.disabled || m && p.key === " " || z0[r.dir].includes(p.key) && (n.onOpenChange(!0), (f = n.content) == null || f.focus(), p.preventDefault());
|
|
8211
8211
|
})
|
|
8212
8212
|
}
|
|
8213
8213
|
) });
|
|
@@ -8242,7 +8242,7 @@ var Of = "MenuSubContent", Df = h.forwardRef(
|
|
|
8242
8242
|
}),
|
|
8243
8243
|
onKeyDown: ae(e.onKeyDown, (d) => {
|
|
8244
8244
|
var f;
|
|
8245
|
-
const p = d.currentTarget.contains(d.target), m =
|
|
8245
|
+
const p = d.currentTarget.contains(d.target), m = B0[a.dir].includes(d.key);
|
|
8246
8246
|
p && m && (s.onOpenChange(!1), (f = i.trigger) == null || f.focus(), d.preventDefault());
|
|
8247
8247
|
})
|
|
8248
8248
|
}
|
|
@@ -8296,7 +8296,7 @@ function fo(e) {
|
|
|
8296
8296
|
var fS = vf, pS = tl, hS = bf, mS = yf, gS = sl, xS = Sf, vS = Xs, wS = Cf, bS = kf, yS = If, SS = Af, TS = jf, CS = Pf, ES = Mf, kS = Df, Js = "DropdownMenu", [RS, EN] = xn(
|
|
8297
8297
|
Js,
|
|
8298
8298
|
[gf]
|
|
8299
|
-
),
|
|
8299
|
+
), Bt = gf(), [IS, $f] = RS(Js), Ff = (e) => {
|
|
8300
8300
|
const {
|
|
8301
8301
|
__scopeDropdownMenu: t,
|
|
8302
8302
|
children: n,
|
|
@@ -8305,7 +8305,7 @@ var fS = vf, pS = tl, hS = bf, mS = yf, gS = sl, xS = Sf, vS = Xs, wS = Cf, bS =
|
|
|
8305
8305
|
defaultOpen: s,
|
|
8306
8306
|
onOpenChange: a,
|
|
8307
8307
|
modal: i = !0
|
|
8308
|
-
} = e, l =
|
|
8308
|
+
} = e, l = Bt(t), c = h.useRef(null), [d, p] = Dn({
|
|
8309
8309
|
prop: o,
|
|
8310
8310
|
defaultProp: s ?? !1,
|
|
8311
8311
|
onChange: a,
|
|
@@ -8327,9 +8327,9 @@ var fS = vf, pS = tl, hS = bf, mS = yf, gS = sl, xS = Sf, vS = Xs, wS = Cf, bS =
|
|
|
8327
8327
|
);
|
|
8328
8328
|
};
|
|
8329
8329
|
Ff.displayName = Js;
|
|
8330
|
-
var
|
|
8330
|
+
var zf = "DropdownMenuTrigger", Bf = h.forwardRef(
|
|
8331
8331
|
(e, t) => {
|
|
8332
|
-
const { __scopeDropdownMenu: n, disabled: r = !1, ...o } = e, s = $f(
|
|
8332
|
+
const { __scopeDropdownMenu: n, disabled: r = !1, ...o } = e, s = $f(zf, n), a = Bt(n);
|
|
8333
8333
|
return /* @__PURE__ */ u.jsx(pS, { asChild: !0, ...a, children: /* @__PURE__ */ u.jsx(
|
|
8334
8334
|
fe.button,
|
|
8335
8335
|
{
|
|
@@ -8353,15 +8353,15 @@ var Bf = "DropdownMenuTrigger", zf = h.forwardRef(
|
|
|
8353
8353
|
) });
|
|
8354
8354
|
}
|
|
8355
8355
|
);
|
|
8356
|
-
|
|
8356
|
+
Bf.displayName = zf;
|
|
8357
8357
|
var NS = "DropdownMenuPortal", Hf = (e) => {
|
|
8358
|
-
const { __scopeDropdownMenu: t, ...n } = e, r =
|
|
8358
|
+
const { __scopeDropdownMenu: t, ...n } = e, r = Bt(t);
|
|
8359
8359
|
return /* @__PURE__ */ u.jsx(hS, { ...r, ...n });
|
|
8360
8360
|
};
|
|
8361
8361
|
Hf.displayName = NS;
|
|
8362
8362
|
var Uf = "DropdownMenuContent", Wf = h.forwardRef(
|
|
8363
8363
|
(e, t) => {
|
|
8364
|
-
const { __scopeDropdownMenu: n, ...r } = e, o = $f(Uf, n), s =
|
|
8364
|
+
const { __scopeDropdownMenu: n, ...r } = e, o = $f(Uf, n), s = Bt(n), a = h.useRef(!1);
|
|
8365
8365
|
return /* @__PURE__ */ u.jsx(
|
|
8366
8366
|
mS,
|
|
8367
8367
|
{
|
|
@@ -8393,64 +8393,64 @@ var Uf = "DropdownMenuContent", Wf = h.forwardRef(
|
|
|
8393
8393
|
Wf.displayName = Uf;
|
|
8394
8394
|
var AS = "DropdownMenuGroup", jS = h.forwardRef(
|
|
8395
8395
|
(e, t) => {
|
|
8396
|
-
const { __scopeDropdownMenu: n, ...r } = e, o =
|
|
8396
|
+
const { __scopeDropdownMenu: n, ...r } = e, o = Bt(n);
|
|
8397
8397
|
return /* @__PURE__ */ u.jsx(gS, { ...o, ...r, ref: t });
|
|
8398
8398
|
}
|
|
8399
8399
|
);
|
|
8400
8400
|
jS.displayName = AS;
|
|
8401
8401
|
var PS = "DropdownMenuLabel", Vf = h.forwardRef(
|
|
8402
8402
|
(e, t) => {
|
|
8403
|
-
const { __scopeDropdownMenu: n, ...r } = e, o =
|
|
8403
|
+
const { __scopeDropdownMenu: n, ...r } = e, o = Bt(n);
|
|
8404
8404
|
return /* @__PURE__ */ u.jsx(xS, { ...o, ...r, ref: t });
|
|
8405
8405
|
}
|
|
8406
8406
|
);
|
|
8407
8407
|
Vf.displayName = PS;
|
|
8408
8408
|
var _S = "DropdownMenuItem", Kf = h.forwardRef(
|
|
8409
8409
|
(e, t) => {
|
|
8410
|
-
const { __scopeDropdownMenu: n, ...r } = e, o =
|
|
8410
|
+
const { __scopeDropdownMenu: n, ...r } = e, o = Bt(n);
|
|
8411
8411
|
return /* @__PURE__ */ u.jsx(vS, { ...o, ...r, ref: t });
|
|
8412
8412
|
}
|
|
8413
8413
|
);
|
|
8414
8414
|
Kf.displayName = _S;
|
|
8415
8415
|
var MS = "DropdownMenuCheckboxItem", qf = h.forwardRef((e, t) => {
|
|
8416
|
-
const { __scopeDropdownMenu: n, ...r } = e, o =
|
|
8416
|
+
const { __scopeDropdownMenu: n, ...r } = e, o = Bt(n);
|
|
8417
8417
|
return /* @__PURE__ */ u.jsx(wS, { ...o, ...r, ref: t });
|
|
8418
8418
|
});
|
|
8419
8419
|
qf.displayName = MS;
|
|
8420
8420
|
var OS = "DropdownMenuRadioGroup", DS = h.forwardRef((e, t) => {
|
|
8421
|
-
const { __scopeDropdownMenu: n, ...r } = e, o =
|
|
8421
|
+
const { __scopeDropdownMenu: n, ...r } = e, o = Bt(n);
|
|
8422
8422
|
return /* @__PURE__ */ u.jsx(bS, { ...o, ...r, ref: t });
|
|
8423
8423
|
});
|
|
8424
8424
|
DS.displayName = OS;
|
|
8425
8425
|
var LS = "DropdownMenuRadioItem", Gf = h.forwardRef((e, t) => {
|
|
8426
|
-
const { __scopeDropdownMenu: n, ...r } = e, o =
|
|
8426
|
+
const { __scopeDropdownMenu: n, ...r } = e, o = Bt(n);
|
|
8427
8427
|
return /* @__PURE__ */ u.jsx(yS, { ...o, ...r, ref: t });
|
|
8428
8428
|
});
|
|
8429
8429
|
Gf.displayName = LS;
|
|
8430
8430
|
var $S = "DropdownMenuItemIndicator", Yf = h.forwardRef((e, t) => {
|
|
8431
|
-
const { __scopeDropdownMenu: n, ...r } = e, o =
|
|
8431
|
+
const { __scopeDropdownMenu: n, ...r } = e, o = Bt(n);
|
|
8432
8432
|
return /* @__PURE__ */ u.jsx(SS, { ...o, ...r, ref: t });
|
|
8433
8433
|
});
|
|
8434
8434
|
Yf.displayName = $S;
|
|
8435
8435
|
var FS = "DropdownMenuSeparator", Xf = h.forwardRef((e, t) => {
|
|
8436
|
-
const { __scopeDropdownMenu: n, ...r } = e, o =
|
|
8436
|
+
const { __scopeDropdownMenu: n, ...r } = e, o = Bt(n);
|
|
8437
8437
|
return /* @__PURE__ */ u.jsx(TS, { ...o, ...r, ref: t });
|
|
8438
8438
|
});
|
|
8439
8439
|
Xf.displayName = FS;
|
|
8440
|
-
var
|
|
8440
|
+
var zS = "DropdownMenuArrow", BS = h.forwardRef(
|
|
8441
8441
|
(e, t) => {
|
|
8442
|
-
const { __scopeDropdownMenu: n, ...r } = e, o =
|
|
8442
|
+
const { __scopeDropdownMenu: n, ...r } = e, o = Bt(n);
|
|
8443
8443
|
return /* @__PURE__ */ u.jsx(CS, { ...o, ...r, ref: t });
|
|
8444
8444
|
}
|
|
8445
8445
|
);
|
|
8446
|
-
|
|
8446
|
+
BS.displayName = zS;
|
|
8447
8447
|
var HS = "DropdownMenuSubTrigger", Jf = h.forwardRef((e, t) => {
|
|
8448
|
-
const { __scopeDropdownMenu: n, ...r } = e, o =
|
|
8448
|
+
const { __scopeDropdownMenu: n, ...r } = e, o = Bt(n);
|
|
8449
8449
|
return /* @__PURE__ */ u.jsx(ES, { ...o, ...r, ref: t });
|
|
8450
8450
|
});
|
|
8451
8451
|
Jf.displayName = HS;
|
|
8452
8452
|
var US = "DropdownMenuSubContent", Zf = h.forwardRef((e, t) => {
|
|
8453
|
-
const { __scopeDropdownMenu: n, ...r } = e, o =
|
|
8453
|
+
const { __scopeDropdownMenu: n, ...r } = e, o = Bt(n);
|
|
8454
8454
|
return /* @__PURE__ */ u.jsx(
|
|
8455
8455
|
kS,
|
|
8456
8456
|
{
|
|
@@ -8469,7 +8469,7 @@ var US = "DropdownMenuSubContent", Zf = h.forwardRef((e, t) => {
|
|
|
8469
8469
|
);
|
|
8470
8470
|
});
|
|
8471
8471
|
Zf.displayName = US;
|
|
8472
|
-
var WS = Ff, VS =
|
|
8472
|
+
var WS = Ff, VS = Bf, KS = Hf, Qf = Wf, ep = Vf, tp = Kf, np = qf, rp = Gf, op = Yf, sp = Xf, ap = Jf, ip = Zf;
|
|
8473
8473
|
const ll = WS, cl = VS, qS = h.forwardRef(({ className: e, inset: t, children: n, ...r }, o) => /* @__PURE__ */ u.jsxs(
|
|
8474
8474
|
ap,
|
|
8475
8475
|
{
|
|
@@ -8552,7 +8552,7 @@ const XS = h.forwardRef(({ className: e, children: t, ...n }, r) => /* @__PURE__
|
|
|
8552
8552
|
),
|
|
8553
8553
|
...n,
|
|
8554
8554
|
children: [
|
|
8555
|
-
/* @__PURE__ */ u.jsx("span", { className: "absolute left-2 flex h-3.5 w-3.5 items-center justify-center", children: /* @__PURE__ */ u.jsx(op, { children: /* @__PURE__ */ u.jsx(
|
|
8555
|
+
/* @__PURE__ */ u.jsx("span", { className: "absolute left-2 flex h-3.5 w-3.5 items-center justify-center", children: /* @__PURE__ */ u.jsx(op, { children: /* @__PURE__ */ u.jsx(Bg, { className: "h-2 w-2 fill-current" }) }) }),
|
|
8556
8556
|
t
|
|
8557
8557
|
]
|
|
8558
8558
|
}
|
|
@@ -8623,8 +8623,8 @@ function eT({
|
|
|
8623
8623
|
[s]
|
|
8624
8624
|
), M = $.useMemo(() => g ?? q, [g, q]), V = $.useCallback(
|
|
8625
8625
|
(P) => {
|
|
8626
|
-
const
|
|
8627
|
-
return F(
|
|
8626
|
+
const z = M(P);
|
|
8627
|
+
return F(z), x == null || x(z), L.current = P, z;
|
|
8628
8628
|
},
|
|
8629
8629
|
[M, x]
|
|
8630
8630
|
), K = $.useCallback(() => {
|
|
@@ -8639,16 +8639,16 @@ function eT({
|
|
|
8639
8639
|
const P = (C ?? "").trim();
|
|
8640
8640
|
L.current !== P && V(P);
|
|
8641
8641
|
}, [C, D, V]);
|
|
8642
|
-
const
|
|
8643
|
-
(P, { fromUser:
|
|
8644
|
-
b || S(P),
|
|
8642
|
+
const B = $.useCallback(
|
|
8643
|
+
(P, { fromUser: z }) => {
|
|
8644
|
+
b || S(P), z && (i == null || i(P));
|
|
8645
8645
|
},
|
|
8646
8646
|
[b, i]
|
|
8647
8647
|
), A = $.useCallback(
|
|
8648
8648
|
async (P) => {
|
|
8649
8649
|
P && P.preventDefault();
|
|
8650
|
-
const
|
|
8651
|
-
if (!
|
|
8650
|
+
const z = (C ?? "").trim();
|
|
8651
|
+
if (!z && !f || V(z))
|
|
8652
8652
|
return;
|
|
8653
8653
|
const Y = ++N.current;
|
|
8654
8654
|
j.current = {
|
|
@@ -8657,7 +8657,7 @@ function eT({
|
|
|
8657
8657
|
}, T(() => {
|
|
8658
8658
|
var R, _, H;
|
|
8659
8659
|
try {
|
|
8660
|
-
const J = l(
|
|
8660
|
+
const J = l(z);
|
|
8661
8661
|
J && typeof J.then == "function" ? J.then(() => {
|
|
8662
8662
|
var re, se;
|
|
8663
8663
|
((re = j.current) == null ? void 0 : re.id) === Y && j.current.shouldClear && (b || (S(""), E.current && (E.current.style.height = "auto"), i == null || i(""))), ((se = j.current) == null ? void 0 : se.id) === Y && (j.current = null);
|
|
@@ -8672,9 +8672,9 @@ function eT({
|
|
|
8672
8672
|
},
|
|
8673
8673
|
[C, l, f, b, i, V]
|
|
8674
8674
|
), k = $.useCallback((P) => {
|
|
8675
|
-
const
|
|
8676
|
-
z
|
|
8677
|
-
}, [
|
|
8675
|
+
const z = P.target.value;
|
|
8676
|
+
B(z, { fromUser: !0 }), j.current && (j.current.shouldClear = !1), E.current && (E.current.style.height = "auto", E.current.style.height = `${E.current.scrollHeight}px`), D && V(z.trim());
|
|
8677
|
+
}, [B, V, D]), G = $.useCallback(
|
|
8678
8678
|
(P) => {
|
|
8679
8679
|
P.key === "Enter" && !P.shiftKey ? (P.preventDefault(), A()) : P.key === "Escape" && t && (P.preventDefault(), c == null || c());
|
|
8680
8680
|
},
|
|
@@ -8750,26 +8750,26 @@ function nT({
|
|
|
8750
8750
|
}) {
|
|
8751
8751
|
const [w, S] = de([]), C = _e(null), y = _e(null), [T, E] = de(0), [N, j] = de(0), [L, D] = de(!1), [F, q] = de(null), [M, V] = de(null), K = ie(() => {
|
|
8752
8752
|
C.current && (C.current.value = ""), y.current && (y.current.value = ""), E((P) => P + 1), j((P) => P + 1);
|
|
8753
|
-
}, []),
|
|
8754
|
-
S((
|
|
8753
|
+
}, []), B = ie((P) => {
|
|
8754
|
+
S((z) => [...z, ...P]);
|
|
8755
8755
|
}, []), A = ie(
|
|
8756
8756
|
(P) => {
|
|
8757
|
-
const
|
|
8758
|
-
z
|
|
8757
|
+
const z = Array.from(P.target.files || []);
|
|
8758
|
+
B(z), P.target.value = "";
|
|
8759
8759
|
},
|
|
8760
|
-
[
|
|
8760
|
+
[B]
|
|
8761
8761
|
), k = ie((P) => {
|
|
8762
|
-
S((
|
|
8763
|
-
const Y =
|
|
8762
|
+
S((z) => {
|
|
8763
|
+
const Y = z.filter((R, _) => _ !== P);
|
|
8764
8764
|
return Y.length === 0 && K(), Y;
|
|
8765
8765
|
});
|
|
8766
8766
|
}, [K]), G = ie(
|
|
8767
8767
|
async (P) => {
|
|
8768
|
-
const
|
|
8769
|
-
if (
|
|
8768
|
+
const z = (P.target.files || [])[0];
|
|
8769
|
+
if (z && (q(null), V(null), !!v)) {
|
|
8770
8770
|
D(!0);
|
|
8771
8771
|
try {
|
|
8772
|
-
await v(
|
|
8772
|
+
await v(z), q(`Uploaded ${z.name} - processing through chat stream`);
|
|
8773
8773
|
} catch (Y) {
|
|
8774
8774
|
const R = Y instanceof Error ? Y.message : "Failed to upload Excel file";
|
|
8775
8775
|
V(R), g == null || g(R);
|
|
@@ -8779,7 +8779,7 @@ function nT({
|
|
|
8779
8779
|
}
|
|
8780
8780
|
},
|
|
8781
8781
|
[v, g, K]
|
|
8782
|
-
), X =
|
|
8782
|
+
), X = ze(() => x || w.length > 0, [x, w]), O = ie(
|
|
8783
8783
|
async (P) => {
|
|
8784
8784
|
const Y = await n(P, w);
|
|
8785
8785
|
return w.length > 0 && (S([]), K()), Y;
|
|
@@ -8800,7 +8800,7 @@ function nT({
|
|
|
8800
8800
|
},
|
|
8801
8801
|
T
|
|
8802
8802
|
),
|
|
8803
|
-
w.length > 0 && /* @__PURE__ */ u.jsx("div", { className: "flex flex-wrap gap-2", children: w.map((P,
|
|
8803
|
+
w.length > 0 && /* @__PURE__ */ u.jsx("div", { className: "flex flex-wrap gap-2", children: w.map((P, z) => /* @__PURE__ */ u.jsxs(
|
|
8804
8804
|
"div",
|
|
8805
8805
|
{
|
|
8806
8806
|
className: "flex items-center gap-2 bg-gray-100 dark:bg-gray-800 rounded-lg px-3 py-2 text-sm text-gray-900 dark:text-gray-100",
|
|
@@ -8812,7 +8812,7 @@ function nT({
|
|
|
8812
8812
|
{
|
|
8813
8813
|
variant: "ghost",
|
|
8814
8814
|
size: "sm",
|
|
8815
|
-
onClick: () => k(
|
|
8815
|
+
onClick: () => k(z),
|
|
8816
8816
|
className: "h-4 w-4 p-0 text-gray-500 dark:text-gray-400 hover:text-red-500 dark:hover:text-red-400",
|
|
8817
8817
|
"aria-label": `Remove ${P.name}`,
|
|
8818
8818
|
children: /* @__PURE__ */ u.jsx(rr, { size: 12 })
|
|
@@ -8820,7 +8820,7 @@ function nT({
|
|
|
8820
8820
|
)
|
|
8821
8821
|
]
|
|
8822
8822
|
},
|
|
8823
|
-
|
|
8823
|
+
z
|
|
8824
8824
|
)) })
|
|
8825
8825
|
] }),
|
|
8826
8826
|
f && /* @__PURE__ */ u.jsxs(u.Fragment, { children: [
|
|
@@ -9761,8 +9761,8 @@ const RT = {
|
|
|
9761
9761
|
const q = Jn(T.sizeTree);
|
|
9762
9762
|
return D !== y && q.shift(), q.reduce(
|
|
9763
9763
|
(M, { k: V, v: K }) => {
|
|
9764
|
-
let
|
|
9765
|
-
return M.prevSize !== 0 && (
|
|
9764
|
+
let B = M.ranges;
|
|
9765
|
+
return M.prevSize !== 0 && (B = [
|
|
9766
9766
|
...M.ranges,
|
|
9767
9767
|
{
|
|
9768
9768
|
endIndex: V + y - 1,
|
|
@@ -9772,7 +9772,7 @@ const RT = {
|
|
|
9772
9772
|
]), {
|
|
9773
9773
|
prevIndex: V + y,
|
|
9774
9774
|
prevSize: K,
|
|
9775
|
-
ranges:
|
|
9775
|
+
ranges: B
|
|
9776
9776
|
};
|
|
9777
9777
|
},
|
|
9778
9778
|
{
|
|
@@ -9959,13 +9959,13 @@ const _o = Ze(
|
|
|
9959
9959
|
q,
|
|
9960
9960
|
M
|
|
9961
9961
|
]) => {
|
|
9962
|
-
const V = Tp(C), { align: K, behavior:
|
|
9962
|
+
const V = Tp(C), { align: K, behavior: B, offset: A } = V, k = E - 1, G = yp(V, y, k);
|
|
9963
9963
|
let X = go(G, y.offsetTree, F) + j;
|
|
9964
9964
|
K === "end" ? (X += q + mn(y.sizeTree, G)[1] - T + M, G === k && (X += L)) : K === "center" ? X += (q + mn(y.sizeTree, G)[1] - T + M) / 2 : X -= N, A && (X += A);
|
|
9965
9965
|
const O = (W) => {
|
|
9966
9966
|
S(), W ? (D("retrying to scroll to", { location: C }, Yt.DEBUG), De(f, C)) : (De(v, !0), D("list did not change, scroll successful", {}, Yt.DEBUG));
|
|
9967
9967
|
};
|
|
9968
|
-
if (S(),
|
|
9968
|
+
if (S(), B === "smooth") {
|
|
9969
9969
|
let W = !1;
|
|
9970
9970
|
w = rt(t, (P) => {
|
|
9971
9971
|
W = W || P;
|
|
@@ -9976,7 +9976,7 @@ const _o = Ze(
|
|
|
9976
9976
|
x = fn(ee(t, AT(150)), O);
|
|
9977
9977
|
return b = setTimeout(() => {
|
|
9978
9978
|
S();
|
|
9979
|
-
}, 1200), De(l, !0), D("scrolling from index to", { behavior:
|
|
9979
|
+
}, 1200), De(l, !0), D("scrolling from index to", { behavior: B, index: G, top: X }, Yt.DEBUG), { behavior: B, top: X };
|
|
9980
9980
|
}
|
|
9981
9981
|
)
|
|
9982
9982
|
),
|
|
@@ -10389,7 +10389,7 @@ const hr = Ze(
|
|
|
10389
10389
|
M,
|
|
10390
10390
|
V
|
|
10391
10391
|
]) => {
|
|
10392
|
-
const K = j, { offsetTree:
|
|
10392
|
+
const K = j, { offsetTree: B, sizeTree: A } = K, k = xt(x);
|
|
10393
10393
|
if (N === 0)
|
|
10394
10394
|
return { ...Da, totalCount: N };
|
|
10395
10395
|
if (T === 0 && E === 0)
|
|
@@ -10405,20 +10405,20 @@ const hr = Ze(
|
|
|
10405
10405
|
);
|
|
10406
10406
|
const G = [];
|
|
10407
10407
|
if (F.length > 0) {
|
|
10408
|
-
const
|
|
10408
|
+
const z = F[0], Y = F[F.length - 1];
|
|
10409
10409
|
let R = 0;
|
|
10410
|
-
for (const _ of ta(A,
|
|
10411
|
-
const H = _.value, J = Math.max(_.start,
|
|
10410
|
+
for (const _ of ta(A, z, Y)) {
|
|
10411
|
+
const H = _.value, J = Math.max(_.start, z), re = Math.min(_.end, Y);
|
|
10412
10412
|
for (let se = J; se <= re; se++)
|
|
10413
10413
|
G.push({ data: V == null ? void 0 : V[se], index: se, offset: R, size: H }), R += H;
|
|
10414
10414
|
}
|
|
10415
10415
|
}
|
|
10416
10416
|
if (!D)
|
|
10417
10417
|
return ls([], G, N, M, K, q);
|
|
10418
|
-
const X = F.length > 0 ? F[F.length - 1] + 1 : 0, O = ST(
|
|
10418
|
+
const X = F.length > 0 ? F[F.length - 1] + 1 : 0, O = ST(B, T, E, X);
|
|
10419
10419
|
if (O.length === 0)
|
|
10420
10420
|
return null;
|
|
10421
|
-
const W = N - 1, P = ea([], (
|
|
10421
|
+
const W = N - 1, P = ea([], (z) => {
|
|
10422
10422
|
for (const Y of O) {
|
|
10423
10423
|
const R = Y.value;
|
|
10424
10424
|
let _ = R.offset, H = Y.start;
|
|
@@ -10431,7 +10431,7 @@ const hr = Ze(
|
|
|
10431
10431
|
H < X && (_ += (X - H) * J, H = X);
|
|
10432
10432
|
const re = Math.min(Y.end, W);
|
|
10433
10433
|
for (let se = H; se <= re && !(_ >= E); se++)
|
|
10434
|
-
|
|
10434
|
+
z.push({ data: V == null ? void 0 : V[se], index: se, offset: _, size: J }), _ += J + M;
|
|
10435
10435
|
}
|
|
10436
10436
|
});
|
|
10437
10437
|
return ls(P, G, N, M, K, q);
|
|
@@ -10717,7 +10717,7 @@ const LT = (e, t) => typeof e == "function" ? au(e(t)) : t && au(e), $T = Ze(
|
|
|
10717
10717
|
), {}),
|
|
10718
10718
|
lt(Rn, Mo, hr, Vn),
|
|
10719
10719
|
{ singleton: !0 }
|
|
10720
|
-
),
|
|
10720
|
+
), zT = Ze(
|
|
10721
10721
|
([{ didMount: e }, { scrollTo: t }, { listState: n }]) => {
|
|
10722
10722
|
const r = oe(0);
|
|
10723
10723
|
return rt(
|
|
@@ -10808,7 +10808,7 @@ const LT = (e, t) => typeof e == "function" ? au(e(t)) : t && au(e), $T = Ze(
|
|
|
10808
10808
|
windowScrollTo: o,
|
|
10809
10809
|
windowViewportRect: r
|
|
10810
10810
|
};
|
|
10811
|
-
}, lt(Ht)),
|
|
10811
|
+
}, lt(Ht)), BT = Ze(
|
|
10812
10812
|
([
|
|
10813
10813
|
{ sizeRanges: e, sizes: t },
|
|
10814
10814
|
{ headerHeight: n, scrollTop: r },
|
|
@@ -10971,7 +10971,7 @@ const WT = Ap(() => /iP(ad|od|hone)/i.test(navigator.userAgent) && /WebKit/i.tes
|
|
|
10971
10971
|
Vn,
|
|
10972
10972
|
Np,
|
|
10973
10973
|
kp,
|
|
10974
|
-
|
|
10974
|
+
zT,
|
|
10975
10975
|
OT,
|
|
10976
10976
|
vl,
|
|
10977
10977
|
Ip,
|
|
@@ -11045,7 +11045,7 @@ const WT = Ap(() => /iP(ad|od|hone)/i.test(navigator.userAgent) && /WebKit/i.tes
|
|
|
11045
11045
|
Rn,
|
|
11046
11046
|
Mo,
|
|
11047
11047
|
Ht,
|
|
11048
|
-
|
|
11048
|
+
BT,
|
|
11049
11049
|
$T,
|
|
11050
11050
|
hr,
|
|
11051
11051
|
_o,
|
|
@@ -11596,7 +11596,7 @@ const vC = /* @__PURE__ */ Ze(
|
|
|
11596
11596
|
{ customScrollParent: x, useWindowScroll: b, windowScrollContainerState: w, windowScrollTo: S, windowViewportRect: C },
|
|
11597
11597
|
y
|
|
11598
11598
|
]) => {
|
|
11599
|
-
const T = oe(0), E = oe(0), N = oe(cu), j = oe({ height: 0, width: 0 }), L = oe({ height: 0, width: 0 }), D = Ve(), F = Ve(), q = oe(0), M = oe(null), V = oe({ column: 0, row: 0 }), K = Ve(),
|
|
11599
|
+
const T = oe(0), E = oe(0), N = oe(cu), j = oe({ height: 0, width: 0 }), L = oe({ height: 0, width: 0 }), D = Ve(), F = Ve(), q = oe(0), M = oe(null), V = oe({ column: 0, row: 0 }), K = Ve(), B = Ve(), A = oe(!1), k = oe(0), G = oe(!0), X = oe(!1), O = oe(!1);
|
|
11600
11600
|
rt(
|
|
11601
11601
|
ee(
|
|
11602
11602
|
v,
|
|
@@ -11620,7 +11620,7 @@ const vC = /* @__PURE__ */ Ze(
|
|
|
11620
11620
|
}
|
|
11621
11621
|
), me(
|
|
11622
11622
|
ee(
|
|
11623
|
-
|
|
11623
|
+
B,
|
|
11624
11624
|
Ce((_) => _ != null && _.scrollTop > 0),
|
|
11625
11625
|
bn(0)
|
|
11626
11626
|
),
|
|
@@ -11628,7 +11628,7 @@ const vC = /* @__PURE__ */ Ze(
|
|
|
11628
11628
|
), rt(
|
|
11629
11629
|
ee(
|
|
11630
11630
|
v,
|
|
11631
|
-
Le(
|
|
11631
|
+
Le(B),
|
|
11632
11632
|
Ce(([, _]) => _ != null)
|
|
11633
11633
|
),
|
|
11634
11634
|
([, _]) => {
|
|
@@ -11684,16 +11684,16 @@ const vC = /* @__PURE__ */ Ze(
|
|
|
11684
11684
|
Ae,
|
|
11685
11685
|
,
|
|
11686
11686
|
Ke,
|
|
11687
|
-
|
|
11687
|
+
Be
|
|
11688
11688
|
]) => {
|
|
11689
11689
|
const { column: Xe, row: Ue } = re, { height: bt, width: yt } = se, { width: ht } = Se;
|
|
11690
11690
|
if (Ae === 0 && (_ === 0 || ht === 0))
|
|
11691
11691
|
return cu;
|
|
11692
11692
|
if (yt === 0) {
|
|
11693
|
-
const St = gl(
|
|
11693
|
+
const St = gl(Be, _), mt = St + Math.max(Ae - 1, 0);
|
|
11694
11694
|
return gC(fu(St, mt, we));
|
|
11695
11695
|
}
|
|
11696
|
-
const qe =
|
|
11696
|
+
const qe = zp(ht, yt, Xe);
|
|
11697
11697
|
let Ne, Ge;
|
|
11698
11698
|
Ke ? H === 0 && J === 0 && Ae > 0 ? (Ne = 0, Ge = Ae - 1) : (Ne = qe * Cs((H + Ue) / (bt + Ue)), Ge = qe * uu((J + Ue) / (bt + Ue)) - 1, Ge = Fa(_ - 1, oo(Ge, qe - 1)), Ne = Fa(Ge, oo(0, Ne))) : (Ne = 0, Ge = -1);
|
|
11699
11699
|
const je = fu(Ne, Ge, we), { bottom: He, top: et } = pu(Se, re, se, je), At = uu(_ / qe), tt = At * bt + (At - 1) * Ue - He;
|
|
@@ -11742,7 +11742,7 @@ const vC = /* @__PURE__ */ Ze(
|
|
|
11742
11742
|
ce(([[, _]]) => _ - 1),
|
|
11743
11743
|
it()
|
|
11744
11744
|
)
|
|
11745
|
-
),
|
|
11745
|
+
), z = tn(
|
|
11746
11746
|
ee(
|
|
11747
11747
|
ye(N),
|
|
11748
11748
|
Ce(({ items: _ }) => _.length > 0 && _[0].index === 0),
|
|
@@ -11768,9 +11768,9 @@ const vC = /* @__PURE__ */ Ze(
|
|
|
11768
11768
|
Le(j, L, T, V),
|
|
11769
11769
|
ce(([_, H, J, re, se]) => {
|
|
11770
11770
|
const Se = Tp(_), { align: we, behavior: Ae, offset: Ke } = Se;
|
|
11771
|
-
let
|
|
11772
|
-
|
|
11773
|
-
let Xe = fi(H, se, J,
|
|
11771
|
+
let Be = Se.index;
|
|
11772
|
+
Be === "LAST" && (Be = re - 1), Be = oo(0, Be, Fa(re - 1, Be));
|
|
11773
|
+
let Xe = fi(H, se, J, Be);
|
|
11774
11774
|
return we === "end" ? Xe = du(Xe - H.height + J.height) : we === "center" && (Xe = du(Xe - H.height / 2 + J.height / 2)), Ke && (Xe += Ke), { behavior: Ae, top: Xe };
|
|
11775
11775
|
})
|
|
11776
11776
|
),
|
|
@@ -11801,7 +11801,7 @@ const vC = /* @__PURE__ */ Ze(
|
|
|
11801
11801
|
initialItemCount: E,
|
|
11802
11802
|
itemDimensions: L,
|
|
11803
11803
|
overscan: n,
|
|
11804
|
-
restoreStateFrom:
|
|
11804
|
+
restoreStateFrom: B,
|
|
11805
11805
|
scrollBy: a,
|
|
11806
11806
|
scrollContainerState: i,
|
|
11807
11807
|
scrollHeight: F,
|
|
@@ -11825,7 +11825,7 @@ const vC = /* @__PURE__ */ Ze(
|
|
|
11825
11825
|
endReached: P,
|
|
11826
11826
|
propsReady: g,
|
|
11827
11827
|
rangeChanged: Y,
|
|
11828
|
-
startReached:
|
|
11828
|
+
startReached: z,
|
|
11829
11829
|
stateChanged: K,
|
|
11830
11830
|
stateRestoreInProgress: A,
|
|
11831
11831
|
...y
|
|
@@ -11833,7 +11833,7 @@ const vC = /* @__PURE__ */ Ze(
|
|
|
11833
11833
|
},
|
|
11834
11834
|
lt(xl, Ht, Oo, Np, Vn, vl, Wn)
|
|
11835
11835
|
);
|
|
11836
|
-
function
|
|
11836
|
+
function zp(e, t, n) {
|
|
11837
11837
|
return oo(1, Cs((e + n) / (Cs(t) + n)));
|
|
11838
11838
|
}
|
|
11839
11839
|
function pu(e, t, n, r) {
|
|
@@ -11844,7 +11844,7 @@ function pu(e, t, n, r) {
|
|
|
11844
11844
|
return { bottom: fi(e, t, n, r[r.length - 1].index) + o, top: s };
|
|
11845
11845
|
}
|
|
11846
11846
|
function fi(e, t, n, r) {
|
|
11847
|
-
const o =
|
|
11847
|
+
const o = zp(e.width, n.width, t.column), s = Cs(r / o), a = s * n.height + oo(0, s - 1) * t.row;
|
|
11848
11848
|
return a > 0 ? a + t.row : a;
|
|
11849
11849
|
}
|
|
11850
11850
|
const wC = /* @__PURE__ */ Ze(() => {
|
|
@@ -11983,7 +11983,7 @@ const wC = /* @__PURE__ */ Ze(() => {
|
|
|
11983
11983
|
/* @__PURE__ */ u.jsx(TC, {})
|
|
11984
11984
|
] }) });
|
|
11985
11985
|
}), {
|
|
11986
|
-
useEmitter:
|
|
11986
|
+
useEmitter: Bp,
|
|
11987
11987
|
useEmitterValue: dt,
|
|
11988
11988
|
usePublisher: sn
|
|
11989
11989
|
} = /* @__PURE__ */ Pp(
|
|
@@ -12027,7 +12027,7 @@ const wC = /* @__PURE__ */ Ze(() => {
|
|
|
12027
12027
|
}
|
|
12028
12028
|
},
|
|
12029
12029
|
kC
|
|
12030
|
-
), RC = /* @__PURE__ */ $p({ useEmitter:
|
|
12030
|
+
), RC = /* @__PURE__ */ $p({ useEmitter: Bp, useEmitterValue: dt, usePublisher: sn }), IC = /* @__PURE__ */ Fp({ useEmitter: Bp, useEmitterValue: dt, usePublisher: sn });
|
|
12031
12031
|
function hu(e, t, n) {
|
|
12032
12032
|
return t !== "normal" && !(t != null && t.endsWith("px")) && n(`${e} was not resolved to pixel value correctly`, t, Yt.WARN), t === "normal" ? 0 : parseInt(t ?? "0", 10);
|
|
12033
12033
|
}
|
|
@@ -12174,7 +12174,7 @@ var _C = h.forwardRef(
|
|
|
12174
12174
|
), Xp = h.forwardRef(
|
|
12175
12175
|
(e, t) => {
|
|
12176
12176
|
const { __scopeDialog: n, trapFocus: r, onOpenAutoFocus: o, onCloseAutoFocus: s, ...a } = e, i = vn(ir, n), l = h.useRef(null), c = $e(t, l);
|
|
12177
|
-
return
|
|
12177
|
+
return Bi(), /* @__PURE__ */ u.jsxs(u.Fragment, { children: [
|
|
12178
12178
|
/* @__PURE__ */ u.jsx(
|
|
12179
12179
|
Hs,
|
|
12180
12180
|
{
|
|
@@ -12184,7 +12184,7 @@ var _C = h.forwardRef(
|
|
|
12184
12184
|
onMountAutoFocus: o,
|
|
12185
12185
|
onUnmountAutoFocus: s,
|
|
12186
12186
|
children: /* @__PURE__ */ u.jsx(
|
|
12187
|
-
|
|
12187
|
+
zr,
|
|
12188
12188
|
{
|
|
12189
12189
|
role: "dialog",
|
|
12190
12190
|
id: i.contentId,
|
|
@@ -12335,7 +12335,7 @@ const Nl = h.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ u.jsx(
|
|
|
12335
12335
|
}
|
|
12336
12336
|
));
|
|
12337
12337
|
Nl.displayName = nr.displayName;
|
|
12338
|
-
const
|
|
12338
|
+
const zC = h.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ u.jsx(
|
|
12339
12339
|
sa,
|
|
12340
12340
|
{
|
|
12341
12341
|
ref: n,
|
|
@@ -12343,28 +12343,28 @@ const BC = h.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ u.jsx(
|
|
|
12343
12343
|
...t
|
|
12344
12344
|
}
|
|
12345
12345
|
));
|
|
12346
|
-
|
|
12347
|
-
const
|
|
12348
|
-
let
|
|
12346
|
+
zC.displayName = sa.displayName;
|
|
12347
|
+
const BC = 1, HC = 1e6;
|
|
12348
|
+
let za = 0;
|
|
12349
12349
|
function UC() {
|
|
12350
|
-
return
|
|
12350
|
+
return za = (za + 1) % Number.MAX_SAFE_INTEGER, za.toString();
|
|
12351
12351
|
}
|
|
12352
|
-
const
|
|
12353
|
-
if (
|
|
12352
|
+
const Ba = /* @__PURE__ */ new Map(), mu = (e) => {
|
|
12353
|
+
if (Ba.has(e))
|
|
12354
12354
|
return;
|
|
12355
12355
|
const t = setTimeout(() => {
|
|
12356
|
-
|
|
12356
|
+
Ba.delete(e), so({
|
|
12357
12357
|
type: "REMOVE_TOAST",
|
|
12358
12358
|
toastId: e
|
|
12359
12359
|
});
|
|
12360
12360
|
}, HC);
|
|
12361
|
-
|
|
12361
|
+
Ba.set(e, t);
|
|
12362
12362
|
}, WC = (e, t) => {
|
|
12363
12363
|
switch (t.type) {
|
|
12364
12364
|
case "ADD_TOAST":
|
|
12365
12365
|
return {
|
|
12366
12366
|
...e,
|
|
12367
|
-
toasts: [t.toast, ...e.toasts].slice(0,
|
|
12367
|
+
toasts: [t.toast, ...e.toasts].slice(0, BC)
|
|
12368
12368
|
};
|
|
12369
12369
|
case "UPDATE_TOAST":
|
|
12370
12370
|
return {
|
|
@@ -13271,7 +13271,7 @@ function yu(e) {
|
|
|
13271
13271
|
r = e.charCodeAt(n), Math.random() > 0.5 && (r = "x" + r.toString(16)), t += "&#" + r + ";";
|
|
13272
13272
|
return t;
|
|
13273
13273
|
}
|
|
13274
|
-
class
|
|
13274
|
+
class zn {
|
|
13275
13275
|
constructor(t) {
|
|
13276
13276
|
this.tokens = [], this.tokens.links = /* @__PURE__ */ Object.create(null), this.options = t || mr, this.options.tokenizer = this.options.tokenizer || new jl(), this.tokenizer = this.options.tokenizer, this.tokenizer.options = this.options, this.tokenizer.lexer = this, this.inlineQueue = [], this.state = {
|
|
13277
13277
|
inLink: !1,
|
|
@@ -13297,13 +13297,13 @@ class Bn {
|
|
|
13297
13297
|
* Static Lex Method
|
|
13298
13298
|
*/
|
|
13299
13299
|
static lex(t, n) {
|
|
13300
|
-
return new
|
|
13300
|
+
return new zn(n).lex(t);
|
|
13301
13301
|
}
|
|
13302
13302
|
/**
|
|
13303
13303
|
* Static Lex Inline Method
|
|
13304
13304
|
*/
|
|
13305
13305
|
static lexInline(t, n) {
|
|
13306
|
-
return new
|
|
13306
|
+
return new zn(n).inlineTokens(t);
|
|
13307
13307
|
}
|
|
13308
13308
|
/**
|
|
13309
13309
|
* Preprocessing
|
|
@@ -13704,7 +13704,7 @@ class fh {
|
|
|
13704
13704
|
return this.getNextSafeSlug(r, n.dryrun);
|
|
13705
13705
|
}
|
|
13706
13706
|
}
|
|
13707
|
-
class
|
|
13707
|
+
class Bn {
|
|
13708
13708
|
constructor(t) {
|
|
13709
13709
|
this.options = t || mr, this.options.renderer = this.options.renderer || new Pl(), this.renderer = this.options.renderer, this.renderer.options = this.options, this.textRenderer = new dh(), this.slugger = new fh();
|
|
13710
13710
|
}
|
|
@@ -13712,13 +13712,13 @@ class zn {
|
|
|
13712
13712
|
* Static Parse Method
|
|
13713
13713
|
*/
|
|
13714
13714
|
static parse(t, n) {
|
|
13715
|
-
return new
|
|
13715
|
+
return new Bn(n).parse(t);
|
|
13716
13716
|
}
|
|
13717
13717
|
/**
|
|
13718
13718
|
* Static Parse Inline Method
|
|
13719
13719
|
*/
|
|
13720
13720
|
static parseInline(t, n) {
|
|
13721
|
-
return new
|
|
13721
|
+
return new Bn(n).parseInline(t);
|
|
13722
13722
|
}
|
|
13723
13723
|
/**
|
|
13724
13724
|
* Parse Loop
|
|
@@ -13976,7 +13976,7 @@ function ph(e, t) {
|
|
|
13976
13976
|
};
|
|
13977
13977
|
}
|
|
13978
13978
|
function ge(e, t, n) {
|
|
13979
|
-
return ph(
|
|
13979
|
+
return ph(zn.lex, Bn.parse)(e, t, n);
|
|
13980
13980
|
}
|
|
13981
13981
|
ge.options = ge.setOptions = function(e) {
|
|
13982
13982
|
return ge.defaults = { ...ge.defaults, ...e }, qC(ge.defaults), ge;
|
|
@@ -14074,13 +14074,13 @@ ge.walkTokens = function(e, t) {
|
|
|
14074
14074
|
}
|
|
14075
14075
|
return n;
|
|
14076
14076
|
};
|
|
14077
|
-
ge.parseInline = ph(
|
|
14078
|
-
ge.Parser =
|
|
14079
|
-
ge.parser =
|
|
14077
|
+
ge.parseInline = ph(zn.lexInline, Bn.parseInline);
|
|
14078
|
+
ge.Parser = Bn;
|
|
14079
|
+
ge.parser = Bn.parse;
|
|
14080
14080
|
ge.Renderer = Pl;
|
|
14081
14081
|
ge.TextRenderer = dh;
|
|
14082
|
-
ge.Lexer =
|
|
14083
|
-
ge.lexer =
|
|
14082
|
+
ge.Lexer = zn;
|
|
14083
|
+
ge.lexer = zn.lex;
|
|
14084
14084
|
ge.Tokenizer = jl;
|
|
14085
14085
|
ge.Slugger = fh;
|
|
14086
14086
|
ge.Hooks = Rs;
|
|
@@ -14090,15 +14090,15 @@ ge.setOptions;
|
|
|
14090
14090
|
ge.use;
|
|
14091
14091
|
ge.walkTokens;
|
|
14092
14092
|
ge.parseInline;
|
|
14093
|
-
|
|
14094
|
-
|
|
14093
|
+
Bn.parse;
|
|
14094
|
+
zn.lex;
|
|
14095
14095
|
function Rr({
|
|
14096
14096
|
content: e,
|
|
14097
14097
|
className: t = "",
|
|
14098
14098
|
allowHtml: n = !1,
|
|
14099
14099
|
style: r
|
|
14100
14100
|
}) {
|
|
14101
|
-
const o =
|
|
14101
|
+
const o = ze(() => {
|
|
14102
14102
|
if (!e || typeof e != "string" || e.trim().length === 0)
|
|
14103
14103
|
return "";
|
|
14104
14104
|
try {
|
|
@@ -14110,7 +14110,7 @@ function Rr({
|
|
|
14110
14110
|
} catch (a) {
|
|
14111
14111
|
return console.error("[MarkdownContent] parse error", a), `<pre class="font-mono text-xs bg-background/50 rounded border p-2 whitespace-pre-wrap break-words">Error rendering markdown: ${String(a)}</pre>`;
|
|
14112
14112
|
}
|
|
14113
|
-
}, [e, n]), s =
|
|
14113
|
+
}, [e, n]), s = ze(() => {
|
|
14114
14114
|
const a = {
|
|
14115
14115
|
color: "currentColor",
|
|
14116
14116
|
...r
|
|
@@ -14186,7 +14186,7 @@ function uE({ preview: e, idx: t }) {
|
|
|
14186
14186
|
] });
|
|
14187
14187
|
}
|
|
14188
14188
|
function dE({ artifact: e, idx: t = 0 }) {
|
|
14189
|
-
const n =
|
|
14189
|
+
const n = ze(() => e ? (Array.isArray(e.plots) ? e.plots : []).map((o) => Sw(o)).filter((o) => o !== null) : [], [e]);
|
|
14190
14190
|
return n.length > 0 ? /* @__PURE__ */ u.jsx("div", { className: "space-y-2", children: n.map((r, o) => /* @__PURE__ */ u.jsx(uE, { preview: r, idx: o }, `${t}-plot-${o}`)) }) : e && typeof e == "object" ? /* @__PURE__ */ u.jsx("div", { className: "rounded-lg border border-gray-200 dark:border-gray-800 bg-gray-50 dark:bg-gray-900/20 p-4", children: /* @__PURE__ */ u.jsxs("p", { className: "text-sm text-gray-600 dark:text-gray-400", children: [
|
|
14191
14191
|
"Unknown artifact type: ",
|
|
14192
14192
|
/* @__PURE__ */ u.jsx("code", { className: "font-mono", children: e.type || "unknown" })
|
|
@@ -14197,7 +14197,7 @@ function pi({ data: e }) {
|
|
|
14197
14197
|
return Array.isArray(e) ? e.every((n) => n === null || ["string", "number", "boolean"].includes(typeof n)) ? /* @__PURE__ */ u.jsx("div", { className: fE, children: /* @__PURE__ */ u.jsx("ul", { className: "list-disc pl-5", children: e.map((n, r) => /* @__PURE__ */ u.jsx("li", { children: String(n) }, r)) }) }) : /* @__PURE__ */ u.jsx("pre", { className: "font-mono text-xs bg-background/50 rounded border p-2 whitespace-pre-wrap break-words", children: Ar(e) }) : /* @__PURE__ */ u.jsx("pre", { className: "font-mono text-xs bg-background/50 rounded border p-2 whitespace-pre-wrap break-words", children: Ar(e) });
|
|
14198
14198
|
}
|
|
14199
14199
|
function pE({ message: e, isStreaming: t = !1 }) {
|
|
14200
|
-
const n = e.name ?? "tool", r =
|
|
14200
|
+
const n = e.name ?? "tool", r = ze(() => {
|
|
14201
14201
|
const i = e.additionalKwargs ?? {};
|
|
14202
14202
|
return Array.isArray(i.toolProgress) ? [...i.toolProgress] : [];
|
|
14203
14203
|
}, [e]), s = r.some(
|
|
@@ -14502,7 +14502,7 @@ function xE(e) {
|
|
|
14502
14502
|
};
|
|
14503
14503
|
}
|
|
14504
14504
|
function vE(e, t) {
|
|
14505
|
-
return
|
|
14505
|
+
return ze(() => {
|
|
14506
14506
|
if (t)
|
|
14507
14507
|
return {
|
|
14508
14508
|
contentParts: [],
|
|
@@ -14552,7 +14552,7 @@ function bE(e) {
|
|
|
14552
14552
|
return null;
|
|
14553
14553
|
}
|
|
14554
14554
|
function yE(e) {
|
|
14555
|
-
return
|
|
14555
|
+
return ze(() => {
|
|
14556
14556
|
const t = e.content.filter(
|
|
14557
14557
|
(c) => c.type === "text"
|
|
14558
14558
|
);
|
|
@@ -14698,7 +14698,7 @@ const TE = {
|
|
|
14698
14698
|
getInterruptOptions: x,
|
|
14699
14699
|
toolConfig: b
|
|
14700
14700
|
}) {
|
|
14701
|
-
const w = bh(t, n), S = t.role === "default_message", T = !!t.__syntheticStreaming || o === t.id && t.role === "assistant", E = f ?? TE, N = !S && "checkpointId" in t ? t.checkpointId ?? null : null, { attemptCount: j, attemptIndex: L, attempts: D } =
|
|
14701
|
+
const w = bh(t, n), S = t.role === "default_message", T = !!t.__syntheticStreaming || o === t.id && t.role === "assistant", E = f ?? TE, N = !S && "checkpointId" in t ? t.checkpointId ?? null : null, { attemptCount: j, attemptIndex: L, attempts: D } = ze(
|
|
14702
14702
|
() => ix(t.id, N, E),
|
|
14703
14703
|
[t.id, N, E]
|
|
14704
14704
|
), F = g == null ? void 0 : g(t);
|
|
@@ -14795,17 +14795,17 @@ function EE({
|
|
|
14795
14795
|
const V = ie(() => /* @__PURE__ */ u.jsxs("div", { className: "flex items-center gap-2 p-2 bg-muted/30 rounded", children: [
|
|
14796
14796
|
/* @__PURE__ */ u.jsx(fs, { className: "h-4 w-4 text-muted-foreground" }),
|
|
14797
14797
|
/* @__PURE__ */ u.jsx("span", { className: "text-sm text-muted-foreground", children: "File upload" })
|
|
14798
|
-
] }), []),
|
|
14798
|
+
] }), []), B = CE(
|
|
14799
14799
|
a,
|
|
14800
14800
|
(f ?? !0) && p,
|
|
14801
14801
|
m ?? 0
|
|
14802
|
-
), A =
|
|
14803
|
-
() =>
|
|
14804
|
-
[
|
|
14805
|
-
), k =
|
|
14802
|
+
), A = ze(
|
|
14803
|
+
() => B.filter((R) => R.type === "text"),
|
|
14804
|
+
[B]
|
|
14805
|
+
), k = ze(
|
|
14806
14806
|
() => A.map((R) => R.text ?? "").join(""),
|
|
14807
14807
|
[A]
|
|
14808
|
-
), G =
|
|
14808
|
+
), G = ze(() => {
|
|
14809
14809
|
if (!v)
|
|
14810
14810
|
return null;
|
|
14811
14811
|
const R = RE(k);
|
|
@@ -14813,19 +14813,19 @@ function EE({
|
|
|
14813
14813
|
stablePart: k.slice(0, R),
|
|
14814
14814
|
tailPart: k.slice(R)
|
|
14815
14815
|
};
|
|
14816
|
-
}, [k, v]), X =
|
|
14816
|
+
}, [k, v]), X = ze(() => {
|
|
14817
14817
|
if (!G) return null;
|
|
14818
14818
|
const { stablePart: R, tailPart: _ } = G;
|
|
14819
14819
|
return !R && !_ ? null : /* @__PURE__ */ u.jsxs("div", { className: "space-y-2", children: [
|
|
14820
14820
|
R ? /* @__PURE__ */ u.jsx(Rr, { content: R, allowHtml: !1 }) : null,
|
|
14821
14821
|
_ ? /* @__PURE__ */ u.jsx(Rr, { content: _, allowHtml: !1 }) : null
|
|
14822
14822
|
] });
|
|
14823
|
-
}, [G]), O =
|
|
14823
|
+
}, [G]), O = ze(() => {
|
|
14824
14824
|
if (!v)
|
|
14825
|
-
return
|
|
14825
|
+
return B;
|
|
14826
14826
|
const R = [];
|
|
14827
14827
|
let _ = !1;
|
|
14828
|
-
for (const H of
|
|
14828
|
+
for (const H of B) {
|
|
14829
14829
|
if (H.type === "text") {
|
|
14830
14830
|
_ || (R.push({
|
|
14831
14831
|
type: "text",
|
|
@@ -14837,7 +14837,7 @@ function EE({
|
|
|
14837
14837
|
R.push(H);
|
|
14838
14838
|
}
|
|
14839
14839
|
return R;
|
|
14840
|
-
}, [
|
|
14840
|
+
}, [B, v]), P = (v ? O : B).filter((R) => R.type !== "interrupt"), z = ie(({ part: R, i: _ }) => {
|
|
14841
14841
|
if (R.type === "text") {
|
|
14842
14842
|
if (v)
|
|
14843
14843
|
return null;
|
|
@@ -14935,7 +14935,7 @@ function EE({
|
|
|
14935
14935
|
);
|
|
14936
14936
|
}
|
|
14937
14937
|
if (!g) {
|
|
14938
|
-
const R = /* @__PURE__ */ u.jsx("div", { className: "space-y-2", children: P.map((_, H) => v && IE(_) ? X ? /* @__PURE__ */ u.jsx("div", { className: "space-y-2", children: X }, `streaming-md-${H}`) : null : /* @__PURE__ */ u.jsx(
|
|
14938
|
+
const R = /* @__PURE__ */ u.jsx("div", { className: "space-y-2", children: P.map((_, H) => v && IE(_) ? X ? /* @__PURE__ */ u.jsx("div", { className: "space-y-2", children: X }, `streaming-md-${H}`) : null : /* @__PURE__ */ u.jsx(z, { part: _, i: H }, H)) });
|
|
14939
14939
|
return p ? /* @__PURE__ */ u.jsxs("div", { "aria-busy": "true", role: "status", children: [
|
|
14940
14940
|
R,
|
|
14941
14941
|
/* @__PURE__ */ u.jsx(mE, { className: N })
|
|
@@ -15163,7 +15163,7 @@ const _l = Mg(function({
|
|
|
15163
15163
|
toolConfig: m,
|
|
15164
15164
|
customStyles: f = {},
|
|
15165
15165
|
streamingDebounceMs: v = 300,
|
|
15166
|
-
renderStreamingMarkdown: g = !
|
|
15166
|
+
renderStreamingMarkdown: g = !0,
|
|
15167
15167
|
enableStreamingMarkdownBuffer: x,
|
|
15168
15168
|
onEdit: b,
|
|
15169
15169
|
onRegenerate: w,
|
|
@@ -15174,17 +15174,17 @@ const _l = Mg(function({
|
|
|
15174
15174
|
onSelectCheckpoint: E,
|
|
15175
15175
|
attemptMetas: N = []
|
|
15176
15176
|
}) {
|
|
15177
|
-
const [j, L] = de(!1), [D, F] = de(!1), { currentThreadId: q } = Ro(), { respondToInterrupt: M } = Fs(), [V, K] = de(!1),
|
|
15177
|
+
const [j, L] = de(!1), [D, F] = de(!1), { currentThreadId: q } = Ro(), { respondToInterrupt: M } = Fs(), [V, K] = de(!1), B = l === "phone" || l === "half-screen", A = t.role, k = A === "interrupt", G = A === "tool" || k, O = !(t.role === "default_message") && t.expandable !== void 0 ? t.expandable !== !1 : !0, { toolRenderers: W, toolArtifactRenderers: P, getToolExpandable: z } = m ?? {}, Y = ze(() => !z || t.role !== "tool" ? !1 : z(t), [z, t.id, t.role]), [R, _] = de(Y ? "preview" : "expanded");
|
|
15178
15178
|
Qe(() => {
|
|
15179
15179
|
_(Y ? "preview" : "expanded");
|
|
15180
15180
|
}, [Y, t.id]);
|
|
15181
|
-
const H =
|
|
15181
|
+
const H = ze(() => t.role === "default_message" ? t : null, [t]), J = !!H, re = !(r && A !== "user"), {
|
|
15182
15182
|
uploadingFiles: se,
|
|
15183
15183
|
handleFileClick: Se,
|
|
15184
15184
|
fileViewerOpen: we,
|
|
15185
15185
|
currentFileInfo: Ae,
|
|
15186
15186
|
closeFileViewer: Ke
|
|
15187
|
-
} = xE({ allowFileOpen: re, currentThreadId: q }),
|
|
15187
|
+
} = xE({ allowFileOpen: re, currentThreadId: q }), Be = ze(() => {
|
|
15188
15188
|
switch (A) {
|
|
15189
15189
|
case "user":
|
|
15190
15190
|
return "text-[hsl(var(--chat-bubble-user-text))]";
|
|
@@ -15208,7 +15208,7 @@ const _l = Mg(function({
|
|
|
15208
15208
|
toolRaw: Ne,
|
|
15209
15209
|
isToolStreaming: Ge,
|
|
15210
15210
|
interruptParts: je
|
|
15211
|
-
} = Xe, He = x ?? v !== 0, et =
|
|
15211
|
+
} = Xe, He = x ?? v !== 0, et = ze(() => je.length ? je[0] : null, [je]), At = ie(async () => {
|
|
15212
15212
|
const ke = G ? Ne : ht;
|
|
15213
15213
|
async function be(Je) {
|
|
15214
15214
|
if (navigator.clipboard && typeof navigator.clipboard.writeText == "function") {
|
|
@@ -15277,20 +15277,20 @@ const _l = Mg(function({
|
|
|
15277
15277
|
}, [b, G, Ne, ht, t]), Mt = ie(() => {
|
|
15278
15278
|
w == null || w(n);
|
|
15279
15279
|
}, [w, n]), _t = ie(() => {
|
|
15280
|
-
const be = ne(
|
|
15280
|
+
const be = ne(B ? "h-3 w-3" : "h-4 w-4", "opacity-60 flex-shrink-0", Be);
|
|
15281
15281
|
switch (A) {
|
|
15282
15282
|
case "user":
|
|
15283
15283
|
return /* @__PURE__ */ u.jsx(Jg, { className: be });
|
|
15284
15284
|
case "assistant":
|
|
15285
|
-
return /* @__PURE__ */ u.jsx(
|
|
15285
|
+
return /* @__PURE__ */ u.jsx(zo, { className: be });
|
|
15286
15286
|
case "tool":
|
|
15287
15287
|
return /* @__PURE__ */ u.jsx(Xg, { className: be });
|
|
15288
15288
|
case "interrupt":
|
|
15289
|
-
return /* @__PURE__ */ u.jsx(
|
|
15289
|
+
return /* @__PURE__ */ u.jsx(zo, { className: be });
|
|
15290
15290
|
default:
|
|
15291
|
-
return /* @__PURE__ */ u.jsx(
|
|
15291
|
+
return /* @__PURE__ */ u.jsx(zo, { className: be });
|
|
15292
15292
|
}
|
|
15293
|
-
}, [
|
|
15293
|
+
}, [B, Be, A]), Rt = ie(() => {
|
|
15294
15294
|
const ke = "group relative mb-4 flex w-full";
|
|
15295
15295
|
switch (A) {
|
|
15296
15296
|
case "user":
|
|
@@ -15306,7 +15306,7 @@ const _l = Mg(function({
|
|
|
15306
15306
|
}, [A]), Ut = ie(() => {
|
|
15307
15307
|
const ke = ne(
|
|
15308
15308
|
"rounded-lg px-4 py-3 relative min-w-0 max-w-full break-words",
|
|
15309
|
-
|
|
15309
|
+
B && "px-3 py-2 text-sm"
|
|
15310
15310
|
);
|
|
15311
15311
|
if (J)
|
|
15312
15312
|
return ne(
|
|
@@ -15343,7 +15343,7 @@ const _l = Mg(function({
|
|
|
15343
15343
|
"border border-border/60 dark:border-border/40"
|
|
15344
15344
|
);
|
|
15345
15345
|
}
|
|
15346
|
-
}, [
|
|
15346
|
+
}, [B, J, A]), We = Y && !k && O, Fe = ie(() => {
|
|
15347
15347
|
We && _((ke) => ke === "expanded" ? "preview" : "expanded");
|
|
15348
15348
|
}, [We]), te = k ? "expanded" : R, pe = (p || k) && O, nt = /* @__PURE__ */ u.jsx(
|
|
15349
15349
|
EE,
|
|
@@ -15356,7 +15356,7 @@ const _l = Mg(function({
|
|
|
15356
15356
|
toolConfig: {
|
|
15357
15357
|
toolRenderers: W,
|
|
15358
15358
|
toolArtifactRenderers: P,
|
|
15359
|
-
getToolExpandable:
|
|
15359
|
+
getToolExpandable: z
|
|
15360
15360
|
},
|
|
15361
15361
|
isToolStreaming: Ge,
|
|
15362
15362
|
contentParts: Ue,
|
|
@@ -15375,8 +15375,8 @@ const _l = Mg(function({
|
|
|
15375
15375
|
userMessagePreviewLength: d,
|
|
15376
15376
|
isUserExpanded: D,
|
|
15377
15377
|
setIsUserExpanded: F,
|
|
15378
|
-
isCompactLayout:
|
|
15379
|
-
iconForeground:
|
|
15378
|
+
isCompactLayout: B,
|
|
15379
|
+
iconForeground: Be,
|
|
15380
15380
|
interruptPart: et,
|
|
15381
15381
|
handleInterruptApprove: St,
|
|
15382
15382
|
handleInterruptReject: mt,
|
|
@@ -15384,14 +15384,14 @@ const _l = Mg(function({
|
|
|
15384
15384
|
disableInterruptActions: V,
|
|
15385
15385
|
isInterruptMessage: k
|
|
15386
15386
|
}
|
|
15387
|
-
), he =
|
|
15387
|
+
), he = ze(() => H ? "Assistant" : vw(t), [H, t]), Oe = _t(), Ye = A === "user" && (y ?? 1) > 1 && typeof E == "function", pt = (N == null ? void 0 : N.length) ?? 0, ct = pt > 0 && T < pt - 1 ? N[T + 1] : void 0, ut = pt > 0 && T > 0 ? N[T - 1] : void 0, It = ie(() => {
|
|
15388
15388
|
!ct || !E || E(ct.id, void 0, !!ct.isLatestAttempt);
|
|
15389
15389
|
}, [ct, E]), Ee = ie(() => {
|
|
15390
15390
|
!ut || !E || E(ut.id, void 0, !!ut.isLatestAttempt);
|
|
15391
15391
|
}, [ut, E]);
|
|
15392
15392
|
return G && !p ? null : J && H ? /* @__PURE__ */ u.jsx("div", { className: ne(Rt(), f.container), children: /* @__PURE__ */ u.jsxs("div", { className: ne(Ut(), f.content), children: [
|
|
15393
15393
|
/* @__PURE__ */ u.jsxs("div", { className: "flex items-center gap-2 mb-2 pb-2 border-b border-current/10", children: [
|
|
15394
|
-
/* @__PURE__ */ u.jsx(
|
|
15394
|
+
/* @__PURE__ */ u.jsx(zo, { className: ne("h-4 w-4", Be) }),
|
|
15395
15395
|
i && /* @__PURE__ */ u.jsx("span", { className: "font-medium text-sm", children: "Assistant" })
|
|
15396
15396
|
] }),
|
|
15397
15397
|
/* @__PURE__ */ u.jsx(
|
|
@@ -15409,12 +15409,12 @@ const _l = Mg(function({
|
|
|
15409
15409
|
showTimestamp: a,
|
|
15410
15410
|
showAgentName: i,
|
|
15411
15411
|
isToolMessage: G,
|
|
15412
|
-
iconForeground:
|
|
15412
|
+
iconForeground: Be,
|
|
15413
15413
|
agentName: he,
|
|
15414
15414
|
messageIcon: Oe,
|
|
15415
15415
|
customHeaderClass: f.header,
|
|
15416
15416
|
customActionsClass: f.actions,
|
|
15417
|
-
isCompactLayout:
|
|
15417
|
+
isCompactLayout: B,
|
|
15418
15418
|
showActions: s,
|
|
15419
15419
|
isEditing: o,
|
|
15420
15420
|
messageRole: A,
|
|
@@ -15451,8 +15451,8 @@ const _l = Mg(function({
|
|
|
15451
15451
|
variant: "ghost",
|
|
15452
15452
|
size: "sm",
|
|
15453
15453
|
onClick: () => At(),
|
|
15454
|
-
className: ne("h-6 w-6 p-0 hover:bg-background/50 text-current",
|
|
15455
|
-
children: /* @__PURE__ */ u.jsx(Mu, { className: ne(j ? "text-success" : "text-current",
|
|
15454
|
+
className: ne("h-6 w-6 p-0 hover:bg-background/50 text-current", B && "h-5 w-5"),
|
|
15455
|
+
children: /* @__PURE__ */ u.jsx(Mu, { className: ne(j ? "text-success" : "text-current", B ? "h-3 w-3" : "h-4 w-4") })
|
|
15456
15456
|
}
|
|
15457
15457
|
),
|
|
15458
15458
|
A === "user" && b && /* @__PURE__ */ u.jsx(
|
|
@@ -15461,8 +15461,8 @@ const _l = Mg(function({
|
|
|
15461
15461
|
variant: "ghost",
|
|
15462
15462
|
size: "sm",
|
|
15463
15463
|
onClick: kt,
|
|
15464
|
-
className: ne("h-6 w-6 p-0 hover:bg-background/50 text-current",
|
|
15465
|
-
children: /* @__PURE__ */ u.jsx(Ou, { className: ne("text-current",
|
|
15464
|
+
className: ne("h-6 w-6 p-0 hover:bg-background/50 text-current", B && "h-5 w-5"),
|
|
15465
|
+
children: /* @__PURE__ */ u.jsx(Ou, { className: ne("text-current", B ? "h-3 w-3" : "h-4 w-4") })
|
|
15466
15466
|
}
|
|
15467
15467
|
),
|
|
15468
15468
|
A === "assistant" && w && /* @__PURE__ */ u.jsx(
|
|
@@ -15471,8 +15471,8 @@ const _l = Mg(function({
|
|
|
15471
15471
|
variant: "ghost",
|
|
15472
15472
|
size: "sm",
|
|
15473
15473
|
onClick: Mt,
|
|
15474
|
-
className: ne("h-6 w-6 p-0 hover:bg-background/50 text-current",
|
|
15475
|
-
children: /* @__PURE__ */ u.jsx(Du, { className: ne("text-current",
|
|
15474
|
+
className: ne("h-6 w-6 p-0 hover:bg-background/50 text-current", B && "h-5 w-5"),
|
|
15475
|
+
children: /* @__PURE__ */ u.jsx(Du, { className: ne("text-current", B ? "h-3 w-3" : "h-4 w-4") })
|
|
15476
15476
|
}
|
|
15477
15477
|
)
|
|
15478
15478
|
]
|
|
@@ -15539,7 +15539,7 @@ const Sh = $.forwardRef(({
|
|
|
15539
15539
|
getMessageCustomStyles: j,
|
|
15540
15540
|
getInterruptOptions: L
|
|
15541
15541
|
}, D) => {
|
|
15542
|
-
const F = _e(null), q = _e(null), M = _e(!1), V = _e(!1), K = e,
|
|
15542
|
+
const F = _e(null), q = _e(null), M = _e(!1), V = _e(!1), K = e, B = ze(() => {
|
|
15543
15543
|
const R = n && K.some((H) => H.id === n);
|
|
15544
15544
|
return E && (t || N) && !R && K.length > 0 ? [
|
|
15545
15545
|
...K,
|
|
@@ -15551,9 +15551,9 @@ const Sh = $.forwardRef(({
|
|
|
15551
15551
|
__syntheticStreaming: !0
|
|
15552
15552
|
}
|
|
15553
15553
|
] : K;
|
|
15554
|
-
}, [K, t, n, E, N]), A =
|
|
15554
|
+
}, [K, t, n, E, N]), A = ze(() => w ? B : B.filter((R) => (R == null ? void 0 : R.role) !== "tool"), [B, w]), k = ie((R) => {
|
|
15555
15555
|
x && x(!R), b && b(R);
|
|
15556
|
-
}, [x, b]), G =
|
|
15556
|
+
}, [x, b]), G = ze(() => {
|
|
15557
15557
|
if (i)
|
|
15558
15558
|
return async () => {
|
|
15559
15559
|
if (!M.current) {
|
|
@@ -15565,7 +15565,7 @@ const Sh = $.forwardRef(({
|
|
|
15565
15565
|
}
|
|
15566
15566
|
}
|
|
15567
15567
|
};
|
|
15568
|
-
}, [i]), X =
|
|
15568
|
+
}, [i]), X = ze(() => !v || g ? !1 : "auto", [v, g]), O = ze(() => {
|
|
15569
15569
|
if (typeof f != "string") return null;
|
|
15570
15570
|
const R = f.trim();
|
|
15571
15571
|
return !R || A && A.length > 0 ? null : {
|
|
@@ -15599,10 +15599,10 @@ const Sh = $.forwardRef(({
|
|
|
15599
15599
|
) }) });
|
|
15600
15600
|
}
|
|
15601
15601
|
return /* @__PURE__ */ u.jsx("div", { className: "flex h-full items-center justify-center py-8 text-center text-muted-foreground", children: f ?? "No messages yet. Start a conversation!" });
|
|
15602
|
-
},
|
|
15602
|
+
}, z = A.length, Y = z > 0;
|
|
15603
15603
|
return Qe(() => {
|
|
15604
15604
|
var R, _;
|
|
15605
|
-
if (
|
|
15605
|
+
if (z === 0) {
|
|
15606
15606
|
V.current = !1;
|
|
15607
15607
|
return;
|
|
15608
15608
|
}
|
|
@@ -15611,7 +15611,7 @@ const Sh = $.forwardRef(({
|
|
|
15611
15611
|
const H = A.length - 1;
|
|
15612
15612
|
(_ = (R = F.current).scrollToIndex) == null || _.call(R, { index: H, align: "end", behavior: "auto" });
|
|
15613
15613
|
} else q.current && (q.current.scrollTop = q.current.scrollHeight);
|
|
15614
|
-
}, [
|
|
15614
|
+
}, [z, A.length]), Og(
|
|
15615
15615
|
D,
|
|
15616
15616
|
() => ({
|
|
15617
15617
|
scrollToLatest: () => {
|
|
@@ -15719,8 +15719,8 @@ function ao({
|
|
|
15719
15719
|
interrupt: M,
|
|
15720
15720
|
metadata: V,
|
|
15721
15721
|
checkpointIndex: K,
|
|
15722
|
-
respondToInterrupt:
|
|
15723
|
-
} = Fs(), { isStreaming: A, error: k, connectionState: G, submit: X, stop: O } = Fw(), W = E ?? T ?? null, P = (F == null ? void 0 : F.id) ?? null,
|
|
15722
|
+
respondToInterrupt: B
|
|
15723
|
+
} = Fs(), { isStreaming: A, error: k, connectionState: G, submit: X, stop: O } = Fw(), W = E ?? T ?? null, P = (F == null ? void 0 : F.id) ?? null, z = (F == null ? void 0 : F.namespace) ?? null, Y = (V == null ? void 0 : V.assemblingMessageId) ?? null, R = M, _ = R ? gd(R.id) : null, H = _ !== null ? { type: "interrupt", id: _ } : null, [J, re] = de(!1), [se, Se] = de(!1);
|
|
15724
15724
|
Qe(() => {
|
|
15725
15725
|
R || re(!1);
|
|
15726
15726
|
}, [R]);
|
|
@@ -15732,24 +15732,24 @@ function ao({
|
|
|
15732
15732
|
(Z) => {
|
|
15733
15733
|
},
|
|
15734
15734
|
[]
|
|
15735
|
-
),
|
|
15735
|
+
), Be = ie(
|
|
15736
15736
|
(Z) => Z.name !== "ask_user_choice",
|
|
15737
15737
|
[]
|
|
15738
15738
|
), Xe = d ?? {
|
|
15739
15739
|
toolRenderers: p,
|
|
15740
15740
|
toolArtifactRenderers: m,
|
|
15741
|
-
getToolExpandable:
|
|
15741
|
+
getToolExpandable: Be
|
|
15742
15742
|
}, Ue = ie(
|
|
15743
15743
|
async (Z, le, xe) => {
|
|
15744
15744
|
try {
|
|
15745
|
-
we(), await
|
|
15745
|
+
we(), await B(Z, le, xe);
|
|
15746
15746
|
} catch (Re) {
|
|
15747
15747
|
console.error("Failed to respond to interrupt:", Re);
|
|
15748
15748
|
} finally {
|
|
15749
15749
|
Ae();
|
|
15750
15750
|
}
|
|
15751
15751
|
},
|
|
15752
|
-
[Ae, we,
|
|
15752
|
+
[Ae, we, B]
|
|
15753
15753
|
), bt = ie(
|
|
15754
15754
|
() => Ue(!0),
|
|
15755
15755
|
[Ue]
|
|
@@ -15813,7 +15813,7 @@ function ao({
|
|
|
15813
15813
|
const xe = Z.trim();
|
|
15814
15814
|
if (!(!xe && le.length === 0))
|
|
15815
15815
|
try {
|
|
15816
|
-
const Re = Ne ? (et == null ? void 0 : et.checkpointId) ?? P ?? void 0 : P ?? void 0, Pe = Ne ? (et == null ? void 0 : et.checkpointNs) ??
|
|
15816
|
+
const Re = Ne ? (et == null ? void 0 : et.checkpointId) ?? P ?? void 0 : P ?? void 0, Pe = Ne ? (et == null ? void 0 : et.checkpointNs) ?? z ?? void 0 : z ?? void 0;
|
|
15817
15817
|
await X(
|
|
15818
15818
|
{
|
|
15819
15819
|
text: xe || "",
|
|
@@ -15837,11 +15837,11 @@ function ao({
|
|
|
15837
15837
|
{ attachments: [Z], payload: f },
|
|
15838
15838
|
{
|
|
15839
15839
|
checkpointId: P ?? void 0,
|
|
15840
|
-
checkpointNs:
|
|
15840
|
+
checkpointNs: z ?? void 0
|
|
15841
15841
|
}
|
|
15842
15842
|
), b == null || b({ file: Z });
|
|
15843
15843
|
},
|
|
15844
|
-
[P,
|
|
15844
|
+
[P, z, f, b, X]
|
|
15845
15845
|
), ut = $.useCallback(
|
|
15846
15846
|
(Z, le, xe) => {
|
|
15847
15847
|
l && (Fe.current = Rt, Ge(Z), He(le), ft(le), St(null), At({
|
|
@@ -15876,12 +15876,12 @@ function ao({
|
|
|
15876
15876
|
{ text: Pe, payload: f },
|
|
15877
15877
|
{
|
|
15878
15878
|
checkpointId: P ?? void 0,
|
|
15879
|
-
checkpointNs:
|
|
15879
|
+
checkpointNs: z ?? void 0,
|
|
15880
15880
|
edit: !0,
|
|
15881
15881
|
originalMessageId: le.id
|
|
15882
15882
|
}
|
|
15883
15883
|
);
|
|
15884
|
-
}, [N, X, P,
|
|
15884
|
+
}, [N, X, P, z, f]), be = ie(
|
|
15885
15885
|
async (Z) => {
|
|
15886
15886
|
if (T) {
|
|
15887
15887
|
pe(!0);
|
|
@@ -16050,10 +16050,10 @@ function mi(e, t, n, r, o, s, a) {
|
|
|
16050
16050
|
function Eu(e) {
|
|
16051
16051
|
return e.toLowerCase().replace(Th, " ");
|
|
16052
16052
|
}
|
|
16053
|
-
function
|
|
16053
|
+
function zE(e, t, n) {
|
|
16054
16054
|
return e = n && n.length > 0 ? `${e + " " + n.join(" ")}` : e, mi(e, t, Eu(e), Eu(t), 0, 0, {});
|
|
16055
16055
|
}
|
|
16056
|
-
var Zr = '[cmdk-group=""]', Wa = '[cmdk-group-items=""]',
|
|
16056
|
+
var Zr = '[cmdk-group=""]', Wa = '[cmdk-group-items=""]', BE = '[cmdk-group-heading=""]', Ch = '[cmdk-item=""]', ku = `${Ch}:not([aria-disabled="true"])`, gi = "cmdk-item-select", br = "data-value", HE = (e, t, n) => zE(e, t, n), Eh = h.createContext(void 0), $o = () => h.useContext(Eh), kh = h.createContext(void 0), Ml = () => h.useContext(kh), Rh = h.createContext(void 0), Ih = h.forwardRef((e, t) => {
|
|
16057
16057
|
let n = yr(() => {
|
|
16058
16058
|
var O, W;
|
|
16059
16059
|
return { search: "", value: (W = (O = e.value) != null ? O : e.defaultValue) != null ? W : "", selectedItemId: void 0, filtered: { count: 0, items: /* @__PURE__ */ new Map(), groups: /* @__PURE__ */ new Set() } };
|
|
@@ -16067,13 +16067,13 @@ var Zr = '[cmdk-group=""]', Wa = '[cmdk-group-items=""]', zE = '[cmdk-group-head
|
|
|
16067
16067
|
T(6, q);
|
|
16068
16068
|
}, []);
|
|
16069
16069
|
let E = h.useMemo(() => ({ subscribe: (O) => (a.current.add(O), () => a.current.delete(O)), snapshot: () => n.current, setState: (O, W, P) => {
|
|
16070
|
-
var
|
|
16070
|
+
var z, Y, R, _;
|
|
16071
16071
|
if (!Object.is(n.current[O], W)) {
|
|
16072
16072
|
if (n.current[O] = W, O === "search") F(), L(), T(1, D);
|
|
16073
16073
|
else if (O === "value") {
|
|
16074
16074
|
if (document.activeElement.hasAttribute("cmdk-input") || document.activeElement.hasAttribute("cmdk-root")) {
|
|
16075
16075
|
let H = document.getElementById(C);
|
|
16076
|
-
H ? H.focus() : (
|
|
16076
|
+
H ? H.focus() : (z = document.getElementById(w)) == null || z.focus();
|
|
16077
16077
|
}
|
|
16078
16078
|
if (T(7, () => {
|
|
16079
16079
|
var H;
|
|
@@ -16089,8 +16089,8 @@ var Zr = '[cmdk-group=""]', Wa = '[cmdk-group-items=""]', zE = '[cmdk-group-head
|
|
|
16089
16089
|
}, emit: () => {
|
|
16090
16090
|
a.current.forEach((O) => O());
|
|
16091
16091
|
} }), []), N = h.useMemo(() => ({ value: (O, W, P) => {
|
|
16092
|
-
var
|
|
16093
|
-
W !== ((
|
|
16092
|
+
var z;
|
|
16093
|
+
W !== ((z = s.current.get(O)) == null ? void 0 : z.value) && (s.current.set(O, { value: W, keywords: P }), n.current.filtered.items.set(O, j(W, P)), T(2, () => {
|
|
16094
16094
|
L(), E.emit();
|
|
16095
16095
|
}));
|
|
16096
16096
|
}, item: (O, W) => (r.current.add(O), W && (o.current.has(W) ? o.current.get(W).add(O) : o.current.set(W, /* @__PURE__ */ new Set([O]))), T(3, () => {
|
|
@@ -16105,31 +16105,31 @@ var Zr = '[cmdk-group=""]', Wa = '[cmdk-group-items=""]', zE = '[cmdk-group-head
|
|
|
16105
16105
|
s.current.delete(O), o.current.delete(O);
|
|
16106
16106
|
}), filter: () => i.current.shouldFilter, label: l || e["aria-label"], getDisablePointerSelection: () => i.current.disablePointerSelection, listId: w, inputId: C, labelId: S, listInnerRef: y }), []);
|
|
16107
16107
|
function j(O, W) {
|
|
16108
|
-
var P,
|
|
16109
|
-
let Y = (
|
|
16108
|
+
var P, z;
|
|
16109
|
+
let Y = (z = (P = i.current) == null ? void 0 : P.filter) != null ? z : HE;
|
|
16110
16110
|
return O ? Y(O, n.current.search, W) : 0;
|
|
16111
16111
|
}
|
|
16112
16112
|
function L() {
|
|
16113
16113
|
if (!n.current.search || i.current.shouldFilter === !1) return;
|
|
16114
16114
|
let O = n.current.filtered.items, W = [];
|
|
16115
|
-
n.current.filtered.groups.forEach((
|
|
16116
|
-
let Y = o.current.get(
|
|
16115
|
+
n.current.filtered.groups.forEach((z) => {
|
|
16116
|
+
let Y = o.current.get(z), R = 0;
|
|
16117
16117
|
Y.forEach((_) => {
|
|
16118
16118
|
let H = O.get(_);
|
|
16119
16119
|
R = Math.max(H, R);
|
|
16120
|
-
}), W.push([
|
|
16120
|
+
}), W.push([z, R]);
|
|
16121
16121
|
});
|
|
16122
16122
|
let P = y.current;
|
|
16123
|
-
V().sort((
|
|
16123
|
+
V().sort((z, Y) => {
|
|
16124
16124
|
var R, _;
|
|
16125
|
-
let H =
|
|
16125
|
+
let H = z.getAttribute("id"), J = Y.getAttribute("id");
|
|
16126
16126
|
return ((R = O.get(J)) != null ? R : 0) - ((_ = O.get(H)) != null ? _ : 0);
|
|
16127
|
-
}).forEach((
|
|
16128
|
-
let Y =
|
|
16129
|
-
Y ? Y.appendChild(
|
|
16130
|
-
}), W.sort((
|
|
16127
|
+
}).forEach((z) => {
|
|
16128
|
+
let Y = z.closest(Wa);
|
|
16129
|
+
Y ? Y.appendChild(z.parentElement === Y ? z : z.closest(`${Wa} > *`)) : P.appendChild(z.parentElement === P ? z : z.closest(`${Wa} > *`));
|
|
16130
|
+
}), W.sort((z, Y) => Y[1] - z[1]).forEach((z) => {
|
|
16131
16131
|
var Y;
|
|
16132
|
-
let R = (Y = y.current) == null ? void 0 : Y.querySelector(`${Zr}[${br}="${encodeURIComponent(
|
|
16132
|
+
let R = (Y = y.current) == null ? void 0 : Y.querySelector(`${Zr}[${br}="${encodeURIComponent(z[0])}"]`);
|
|
16133
16133
|
R == null || R.parentElement.appendChild(R);
|
|
16134
16134
|
});
|
|
16135
16135
|
}
|
|
@@ -16138,7 +16138,7 @@ var Zr = '[cmdk-group=""]', Wa = '[cmdk-group-items=""]', zE = '[cmdk-group-head
|
|
|
16138
16138
|
E.setState("value", W || void 0);
|
|
16139
16139
|
}
|
|
16140
16140
|
function F() {
|
|
16141
|
-
var O, W, P,
|
|
16141
|
+
var O, W, P, z;
|
|
16142
16142
|
if (!n.current.search || i.current.shouldFilter === !1) {
|
|
16143
16143
|
n.current.filtered.count = r.current.size;
|
|
16144
16144
|
return;
|
|
@@ -16146,7 +16146,7 @@ var Zr = '[cmdk-group=""]', Wa = '[cmdk-group-items=""]', zE = '[cmdk-group-head
|
|
|
16146
16146
|
n.current.filtered.groups = /* @__PURE__ */ new Set();
|
|
16147
16147
|
let Y = 0;
|
|
16148
16148
|
for (let R of r.current) {
|
|
16149
|
-
let _ = (W = (O = s.current.get(R)) == null ? void 0 : O.value) != null ? W : "", H = (
|
|
16149
|
+
let _ = (W = (O = s.current.get(R)) == null ? void 0 : O.value) != null ? W : "", H = (z = (P = s.current.get(R)) == null ? void 0 : P.keywords) != null ? z : [], J = j(_, H);
|
|
16150
16150
|
n.current.filtered.items.set(R, J), J > 0 && Y++;
|
|
16151
16151
|
}
|
|
16152
16152
|
for (let [R, _] of o.current) for (let H of _) if (n.current.filtered.items.get(H) > 0) {
|
|
@@ -16157,8 +16157,8 @@ var Zr = '[cmdk-group=""]', Wa = '[cmdk-group-items=""]', zE = '[cmdk-group-head
|
|
|
16157
16157
|
}
|
|
16158
16158
|
function q() {
|
|
16159
16159
|
var O, W, P;
|
|
16160
|
-
let
|
|
16161
|
-
|
|
16160
|
+
let z = M();
|
|
16161
|
+
z && (((O = z.parentElement) == null ? void 0 : O.firstChild) === z && ((P = (W = z.closest(Zr)) == null ? void 0 : W.querySelector(BE)) == null || P.scrollIntoView({ block: "nearest" })), z.scrollIntoView({ block: "nearest" }));
|
|
16162
16162
|
}
|
|
16163
16163
|
function M() {
|
|
16164
16164
|
var O;
|
|
@@ -16172,20 +16172,20 @@ var Zr = '[cmdk-group=""]', Wa = '[cmdk-group-items=""]', zE = '[cmdk-group-head
|
|
|
16172
16172
|
let W = V()[O];
|
|
16173
16173
|
W && E.setState("value", W.getAttribute(br));
|
|
16174
16174
|
}
|
|
16175
|
-
function
|
|
16175
|
+
function B(O) {
|
|
16176
16176
|
var W;
|
|
16177
|
-
let P = M(),
|
|
16178
|
-
(W = i.current) != null && W.loop && (R = Y + O < 0 ?
|
|
16177
|
+
let P = M(), z = V(), Y = z.findIndex((_) => _ === P), R = z[Y + O];
|
|
16178
|
+
(W = i.current) != null && W.loop && (R = Y + O < 0 ? z[z.length - 1] : Y + O === z.length ? z[0] : z[Y + O]), R && E.setState("value", R.getAttribute(br));
|
|
16179
16179
|
}
|
|
16180
16180
|
function A(O) {
|
|
16181
|
-
let W = M(), P = W == null ? void 0 : W.closest(Zr),
|
|
16182
|
-
for (; P && !
|
|
16183
|
-
|
|
16181
|
+
let W = M(), P = W == null ? void 0 : W.closest(Zr), z;
|
|
16182
|
+
for (; P && !z; ) P = O > 0 ? JE(P, Zr) : ZE(P, Zr), z = P == null ? void 0 : P.querySelector(ku);
|
|
16183
|
+
z ? E.setState("value", z.getAttribute(br)) : B(O);
|
|
16184
16184
|
}
|
|
16185
16185
|
let k = () => K(V().length - 1), G = (O) => {
|
|
16186
|
-
O.preventDefault(), O.metaKey ? k() : O.altKey ? A(1) :
|
|
16186
|
+
O.preventDefault(), O.metaKey ? k() : O.altKey ? A(1) : B(1);
|
|
16187
16187
|
}, X = (O) => {
|
|
16188
|
-
O.preventDefault(), O.metaKey ? K(0) : O.altKey ? A(-1) :
|
|
16188
|
+
O.preventDefault(), O.metaKey ? K(0) : O.altKey ? A(-1) : B(-1);
|
|
16189
16189
|
};
|
|
16190
16190
|
return h.createElement(fe.div, { ref: t, tabIndex: -1, ...b, "cmdk-root": "", onKeyDown: (O) => {
|
|
16191
16191
|
var W;
|
|
@@ -16220,10 +16220,10 @@ var Zr = '[cmdk-group=""]', Wa = '[cmdk-group-items=""]', zE = '[cmdk-group-head
|
|
|
16220
16220
|
}
|
|
16221
16221
|
case "Enter": {
|
|
16222
16222
|
O.preventDefault();
|
|
16223
|
-
let
|
|
16224
|
-
if (
|
|
16223
|
+
let z = M();
|
|
16224
|
+
if (z) {
|
|
16225
16225
|
let Y = new Event(gi);
|
|
16226
|
-
|
|
16226
|
+
z.dispatchEvent(Y);
|
|
16227
16227
|
}
|
|
16228
16228
|
}
|
|
16229
16229
|
}
|
|
@@ -16437,7 +16437,7 @@ var Ol = "ScrollArea", [Lh, IN] = xn(Ol), [ok, cn] = Lh(Ol), $h = h.forwardRef(
|
|
|
16437
16437
|
dir: o,
|
|
16438
16438
|
scrollHideDelay: s = 600,
|
|
16439
16439
|
...a
|
|
16440
|
-
} = e, [i, l] = h.useState(null), [c, d] = h.useState(null), [p, m] = h.useState(null), [f, v] = h.useState(null), [g, x] = h.useState(null), [b, w] = h.useState(0), [S, C] = h.useState(0), [y, T] = h.useState(!1), [E, N] = h.useState(!1), j = $e(t, (D) => l(D)), L =
|
|
16440
|
+
} = e, [i, l] = h.useState(null), [c, d] = h.useState(null), [p, m] = h.useState(null), [f, v] = h.useState(null), [g, x] = h.useState(null), [b, w] = h.useState(0), [S, C] = h.useState(0), [y, T] = h.useState(!1), [E, N] = h.useState(!1), j = $e(t, (D) => l(D)), L = Bs(o);
|
|
16441
16441
|
return /* @__PURE__ */ u.jsx(
|
|
16442
16442
|
ok,
|
|
16443
16443
|
{
|
|
@@ -16480,7 +16480,7 @@ var Ol = "ScrollArea", [Lh, IN] = xn(Ol), [ok, cn] = Lh(Ol), $h = h.forwardRef(
|
|
|
16480
16480
|
}
|
|
16481
16481
|
);
|
|
16482
16482
|
$h.displayName = Ol;
|
|
16483
|
-
var Fh = "ScrollAreaViewport",
|
|
16483
|
+
var Fh = "ScrollAreaViewport", zh = h.forwardRef(
|
|
16484
16484
|
(e, t) => {
|
|
16485
16485
|
const { __scopeScrollArea: n, children: r, nonce: o, ...s } = e, a = cn(Fh, n), i = h.useRef(null), l = $e(t, i, a.onViewportChange);
|
|
16486
16486
|
return /* @__PURE__ */ u.jsxs(u.Fragment, { children: [
|
|
@@ -16521,13 +16521,13 @@ var Fh = "ScrollAreaViewport", Bh = h.forwardRef(
|
|
|
16521
16521
|
] });
|
|
16522
16522
|
}
|
|
16523
16523
|
);
|
|
16524
|
-
|
|
16524
|
+
zh.displayName = Fh;
|
|
16525
16525
|
var In = "ScrollAreaScrollbar", Dl = h.forwardRef(
|
|
16526
16526
|
(e, t) => {
|
|
16527
16527
|
const { forceMount: n, ...r } = e, o = cn(In, e.__scopeScrollArea), { onScrollbarXEnabledChange: s, onScrollbarYEnabledChange: a } = o, i = e.orientation === "horizontal";
|
|
16528
16528
|
return h.useEffect(() => (i ? s(!0) : a(!0), () => {
|
|
16529
16529
|
i ? s(!1) : a(!1);
|
|
16530
|
-
}), [i, s, a]), o.type === "hover" ? /* @__PURE__ */ u.jsx(sk, { ...r, ref: t, forceMount: n }) : o.type === "scroll" ? /* @__PURE__ */ u.jsx(ak, { ...r, ref: t, forceMount: n }) : o.type === "auto" ? /* @__PURE__ */ u.jsx(
|
|
16530
|
+
}), [i, s, a]), o.type === "hover" ? /* @__PURE__ */ u.jsx(sk, { ...r, ref: t, forceMount: n }) : o.type === "scroll" ? /* @__PURE__ */ u.jsx(ak, { ...r, ref: t, forceMount: n }) : o.type === "auto" ? /* @__PURE__ */ u.jsx(Bh, { ...r, ref: t, forceMount: n }) : o.type === "always" ? /* @__PURE__ */ u.jsx(Ll, { ...r, ref: t }) : null;
|
|
16531
16531
|
}
|
|
16532
16532
|
);
|
|
16533
16533
|
Dl.displayName = In;
|
|
@@ -16547,7 +16547,7 @@ var sk = h.forwardRef((e, t) => {
|
|
|
16547
16547
|
};
|
|
16548
16548
|
}
|
|
16549
16549
|
}, [o.scrollArea, o.scrollHideDelay]), /* @__PURE__ */ u.jsx(Xt, { present: n || s, children: /* @__PURE__ */ u.jsx(
|
|
16550
|
-
|
|
16550
|
+
Bh,
|
|
16551
16551
|
{
|
|
16552
16552
|
"data-state": s ? "visible" : "hidden",
|
|
16553
16553
|
...r,
|
|
@@ -16598,7 +16598,7 @@ var sk = h.forwardRef((e, t) => {
|
|
|
16598
16598
|
onPointerLeave: ae(e.onPointerLeave, () => l("POINTER_LEAVE"))
|
|
16599
16599
|
}
|
|
16600
16600
|
) });
|
|
16601
|
-
}),
|
|
16601
|
+
}), Bh = h.forwardRef((e, t) => {
|
|
16602
16602
|
const n = cn(In, e.__scopeScrollArea), { forceMount: r, ...o } = e, [s, a] = h.useState(!1), i = e.orientation === "horizontal", l = la(() => {
|
|
16603
16603
|
if (n.viewport) {
|
|
16604
16604
|
const c = n.viewport.offsetWidth < n.viewport.scrollWidth, d = n.viewport.offsetHeight < n.viewport.scrollHeight;
|
|
@@ -16936,7 +16936,7 @@ function _r(e, t) {
|
|
|
16936
16936
|
}
|
|
16937
16937
|
}, [e, n]);
|
|
16938
16938
|
}
|
|
16939
|
-
var Yh = $h, hk =
|
|
16939
|
+
var Yh = $h, hk = zh, mk = Vh;
|
|
16940
16940
|
const Xh = h.forwardRef(({ className: e, children: t, ...n }, r) => /* @__PURE__ */ u.jsxs(
|
|
16941
16941
|
Yh,
|
|
16942
16942
|
{
|
|
@@ -17047,45 +17047,54 @@ function wk({
|
|
|
17047
17047
|
] }) }),
|
|
17048
17048
|
/* @__PURE__ */ u.jsx("div", { className: "flex items-center gap-1 opacity-0 group-hover:opacity-100 transition-opacity ml-2", children: /* @__PURE__ */ u.jsxs(ll, { children: [
|
|
17049
17049
|
/* @__PURE__ */ u.jsx(cl, { asChild: !0, children: /* @__PURE__ */ u.jsx(ot, { variant: "ghost", size: "sm", className: "h-6 w-6 p-0", children: /* @__PURE__ */ u.jsx(Lu, { size: 12 }) }) }),
|
|
17050
|
-
/* @__PURE__ */ u.jsxs(
|
|
17051
|
-
|
|
17052
|
-
|
|
17053
|
-
|
|
17054
|
-
|
|
17055
|
-
|
|
17056
|
-
|
|
17057
|
-
|
|
17058
|
-
|
|
17059
|
-
|
|
17060
|
-
|
|
17061
|
-
|
|
17062
|
-
|
|
17063
|
-
|
|
17064
|
-
|
|
17065
|
-
|
|
17066
|
-
|
|
17067
|
-
|
|
17068
|
-
|
|
17069
|
-
|
|
17070
|
-
|
|
17071
|
-
|
|
17072
|
-
|
|
17073
|
-
|
|
17074
|
-
|
|
17075
|
-
|
|
17076
|
-
|
|
17077
|
-
|
|
17078
|
-
|
|
17079
|
-
|
|
17080
|
-
|
|
17081
|
-
|
|
17082
|
-
|
|
17083
|
-
|
|
17084
|
-
|
|
17085
|
-
|
|
17086
|
-
|
|
17087
|
-
|
|
17088
|
-
|
|
17050
|
+
/* @__PURE__ */ u.jsxs(
|
|
17051
|
+
Zs,
|
|
17052
|
+
{
|
|
17053
|
+
align: "end",
|
|
17054
|
+
sideOffset: 6,
|
|
17055
|
+
className: "w-44",
|
|
17056
|
+
style: { zIndex: 9999 },
|
|
17057
|
+
children: [
|
|
17058
|
+
/* @__PURE__ */ u.jsxs(
|
|
17059
|
+
tr,
|
|
17060
|
+
{
|
|
17061
|
+
onClick: (y) => {
|
|
17062
|
+
y.preventDefault(), c(e.threadId);
|
|
17063
|
+
},
|
|
17064
|
+
children: [
|
|
17065
|
+
/* @__PURE__ */ u.jsx(ex, { className: "mr-2 h-4 w-4" }),
|
|
17066
|
+
"Share thread"
|
|
17067
|
+
]
|
|
17068
|
+
}
|
|
17069
|
+
),
|
|
17070
|
+
p && n !== e.threadId && /* @__PURE__ */ u.jsxs(
|
|
17071
|
+
tr,
|
|
17072
|
+
{
|
|
17073
|
+
onClick: (y) => {
|
|
17074
|
+
y.preventDefault(), s(e, y);
|
|
17075
|
+
},
|
|
17076
|
+
children: [
|
|
17077
|
+
/* @__PURE__ */ u.jsx(bo, { className: "mr-2 h-4 w-4" }),
|
|
17078
|
+
"Rename"
|
|
17079
|
+
]
|
|
17080
|
+
}
|
|
17081
|
+
),
|
|
17082
|
+
m && d && /* @__PURE__ */ u.jsxs(
|
|
17083
|
+
tr,
|
|
17084
|
+
{
|
|
17085
|
+
className: "text-red-400 hover:text-red-300",
|
|
17086
|
+
onClick: (y) => {
|
|
17087
|
+
y.preventDefault(), d(e.threadId, y);
|
|
17088
|
+
},
|
|
17089
|
+
children: [
|
|
17090
|
+
/* @__PURE__ */ u.jsx(tx, { className: "mr-2 h-4 w-4" }),
|
|
17091
|
+
"Delete"
|
|
17092
|
+
]
|
|
17093
|
+
}
|
|
17094
|
+
)
|
|
17095
|
+
]
|
|
17096
|
+
}
|
|
17097
|
+
)
|
|
17089
17098
|
] }) })
|
|
17090
17099
|
] }),
|
|
17091
17100
|
t && /* @__PURE__ */ u.jsx("div", { className: "absolute left-0 top-1/2 -translate-y-1/2 w-1 h-8 bg-blue-400 rounded-r" })
|
|
@@ -17157,12 +17166,12 @@ function vi({
|
|
|
17157
17166
|
shareInFlight: D,
|
|
17158
17167
|
shareStatus: F,
|
|
17159
17168
|
clearShareStatus: q
|
|
17160
|
-
} = Ro(), { createThread: M, deleteThread: V, renameThread: K, shareThread:
|
|
17169
|
+
} = Ro(), { createThread: M, deleteThread: V, renameThread: K, shareThread: B } = L, { loadThread: A } = Fs(), k = a ?? T, [G, X] = de(Array.isArray(C) ? C : []), O = _e(G.length > 0), W = _e(null), P = _e(0), [z, Y] = de(null), [R, _] = de(""), [H, J] = de(!1), [re, se] = de(!1), [Se, we] = de(null), [Ae, Ke] = de(""), Be = v && v.length > 0 ? v : Tk, Xe = Sk({ defaultView: m }), Ue = g ?? Xe, bt = p ?? Ue.view, yt = ie(
|
|
17161
17170
|
(te) => {
|
|
17162
17171
|
p || Ue.setView(te), f == null || f(te);
|
|
17163
17172
|
},
|
|
17164
17173
|
[p, f, Ue]
|
|
17165
|
-
), ht =
|
|
17174
|
+
), ht = Be.find((te) => te.key === bt) ?? Be[0], qe = (te) => {
|
|
17166
17175
|
we(te), Ke(""), se(!0);
|
|
17167
17176
|
}, Ne = () => {
|
|
17168
17177
|
se(!1), we(null), Ke(""), q();
|
|
@@ -17170,13 +17179,13 @@ function vi({
|
|
|
17170
17179
|
async (te) => {
|
|
17171
17180
|
if (!(!Se || D) && te.id)
|
|
17172
17181
|
try {
|
|
17173
|
-
await
|
|
17182
|
+
await B(Se, te.id), setTimeout(() => Ne(), 600);
|
|
17174
17183
|
} catch (pe) {
|
|
17175
17184
|
console.error("Failed to share thread:", pe);
|
|
17176
17185
|
}
|
|
17177
17186
|
},
|
|
17178
|
-
[Ne, D, Se,
|
|
17179
|
-
), je =
|
|
17187
|
+
[Ne, D, Se, B]
|
|
17188
|
+
), je = ze(() => {
|
|
17180
17189
|
const te = b ?? [], pe = Ae.trim().toLowerCase();
|
|
17181
17190
|
return pe ? S ? te.filter((nt) => S(nt, pe)) : te.filter((nt) => `${nt.label} ${nt.secondaryLabel ?? ""}`.toLowerCase().includes(pe)) : te;
|
|
17182
17191
|
}, [b, Ae, S]), He = bt === "shared", et = He ? y : G, At = He ? j : N, tt = He ? "No shared conversations yet" : "No conversations yet", St = (te) => {
|
|
@@ -17289,7 +17298,7 @@ function vi({
|
|
|
17289
17298
|
children: ht.label
|
|
17290
17299
|
}
|
|
17291
17300
|
) }),
|
|
17292
|
-
/* @__PURE__ */ u.jsx(Zs, { align: "start", sideOffset: 6, className: "w-40", children:
|
|
17301
|
+
/* @__PURE__ */ u.jsx(Zs, { align: "start", sideOffset: 6, className: "w-40", children: Be.map((te) => /* @__PURE__ */ u.jsxs(
|
|
17293
17302
|
tr,
|
|
17294
17303
|
{
|
|
17295
17304
|
className: "justify-between text-[12px]",
|
|
@@ -17325,7 +17334,7 @@ function vi({
|
|
|
17325
17334
|
{
|
|
17326
17335
|
thread: te,
|
|
17327
17336
|
isActive: k === te.threadId,
|
|
17328
|
-
editingThreadId:
|
|
17337
|
+
editingThreadId: z,
|
|
17329
17338
|
editingTitle: R,
|
|
17330
17339
|
onSelect: Et,
|
|
17331
17340
|
onStartEditing: _t,
|
|
@@ -17654,7 +17663,7 @@ var rm = Object.freeze({
|
|
|
17654
17663
|
)
|
|
17655
17664
|
);
|
|
17656
17665
|
ca.displayName = Ik;
|
|
17657
|
-
var Nk = ca, Ak = [" ", "Enter", "ArrowUp", "ArrowDown"], jk = [" ", "Enter"], cr = "Select", [ua, da, Pk] =
|
|
17666
|
+
var Nk = ca, Ak = [" ", "Enter", "ArrowUp", "ArrowDown"], jk = [" ", "Enter"], cr = "Select", [ua, da, Pk] = zs(cr), [Kr, _N] = xn(cr, [
|
|
17658
17667
|
Pk,
|
|
17659
17668
|
Ur
|
|
17660
17669
|
]), fa = Ur(), [_k, Kn] = Kr(cr), [Mk, Ok] = Kr(cr), om = (e) => {
|
|
@@ -17673,7 +17682,7 @@ var Nk = ca, Ak = [" ", "Enter", "ArrowUp", "ArrowDown"], jk = [" ", "Enter"], c
|
|
|
17673
17682
|
disabled: m,
|
|
17674
17683
|
required: f,
|
|
17675
17684
|
form: v
|
|
17676
|
-
} = e, g = fa(t), [x, b] = h.useState(null), [w, S] = h.useState(null), [C, y] = h.useState(!1), T =
|
|
17685
|
+
} = e, g = fa(t), [x, b] = h.useState(null), [w, S] = h.useState(null), [C, y] = h.useState(!1), T = Bs(c), [E, N] = Dn({
|
|
17677
17686
|
prop: r,
|
|
17678
17687
|
defaultProp: o ?? !1,
|
|
17679
17688
|
onChange: s,
|
|
@@ -17709,11 +17718,11 @@ var Nk = ca, Ak = [" ", "Enter", "ArrowUp", "ArrowDown"], jk = [" ", "Enter"], c
|
|
|
17709
17718
|
{
|
|
17710
17719
|
scope: e.__scopeSelect,
|
|
17711
17720
|
onNativeOptionAdd: h.useCallback((K) => {
|
|
17712
|
-
M((
|
|
17721
|
+
M((B) => new Set(B).add(K));
|
|
17713
17722
|
}, []),
|
|
17714
17723
|
onNativeOptionRemove: h.useCallback((K) => {
|
|
17715
|
-
M((
|
|
17716
|
-
const A = new Set(
|
|
17724
|
+
M((B) => {
|
|
17725
|
+
const A = new Set(B);
|
|
17717
17726
|
return A.delete(K), A;
|
|
17718
17727
|
});
|
|
17719
17728
|
}, []),
|
|
@@ -17857,7 +17866,7 @@ var dn = 10, [fm, qn] = Kr(ur), $k = "SelectContentImpl", Fk = Ir("SelectContent
|
|
|
17857
17866
|
), F = da(n), [q, M] = h.useState(!1), V = h.useRef(!1);
|
|
17858
17867
|
h.useEffect(() => {
|
|
17859
17868
|
if (S) return el(S);
|
|
17860
|
-
}, [S]),
|
|
17869
|
+
}, [S]), Bi();
|
|
17861
17870
|
const K = h.useCallback(
|
|
17862
17871
|
(R) => {
|
|
17863
17872
|
const [_, ...H] = F().map((se) => se.ref.current), [J] = H.slice(-1), re = document.activeElement;
|
|
@@ -17865,13 +17874,13 @@ var dn = 10, [fm, qn] = Kr(ur), $k = "SelectContentImpl", Fk = Ir("SelectContent
|
|
|
17865
17874
|
if (se === re || (se == null || se.scrollIntoView({ block: "nearest" }), se === _ && y && (y.scrollTop = 0), se === J && y && (y.scrollTop = y.scrollHeight), se == null || se.focus(), document.activeElement !== re)) return;
|
|
17866
17875
|
},
|
|
17867
17876
|
[F, y]
|
|
17868
|
-
),
|
|
17877
|
+
), B = h.useCallback(
|
|
17869
17878
|
() => K([N, S]),
|
|
17870
17879
|
[K, N, S]
|
|
17871
17880
|
);
|
|
17872
17881
|
h.useEffect(() => {
|
|
17873
|
-
q &&
|
|
17874
|
-
}, [q,
|
|
17882
|
+
q && B();
|
|
17883
|
+
}, [q, B]);
|
|
17875
17884
|
const { onOpenChange: A, triggerPointerDownPosRef: k } = w;
|
|
17876
17885
|
h.useEffect(() => {
|
|
17877
17886
|
if (S) {
|
|
@@ -17910,7 +17919,7 @@ var dn = 10, [fm, qn] = Kr(ur), $k = "SelectContentImpl", Fk = Ir("SelectContent
|
|
|
17910
17919
|
(w.value !== void 0 && w.value === _ || J) && D(R);
|
|
17911
17920
|
},
|
|
17912
17921
|
[w.value]
|
|
17913
|
-
),
|
|
17922
|
+
), z = r === "popper" ? wi : hm, Y = z === wi ? {
|
|
17914
17923
|
side: i,
|
|
17915
17924
|
sideOffset: l,
|
|
17916
17925
|
align: c,
|
|
@@ -17933,7 +17942,7 @@ var dn = 10, [fm, qn] = Kr(ur), $k = "SelectContentImpl", Fk = Ir("SelectContent
|
|
|
17933
17942
|
selectedItem: N,
|
|
17934
17943
|
onItemLeave: W,
|
|
17935
17944
|
itemTextRefCallback: P,
|
|
17936
|
-
focusSelectedItem:
|
|
17945
|
+
focusSelectedItem: B,
|
|
17937
17946
|
selectedItemText: L,
|
|
17938
17947
|
position: r,
|
|
17939
17948
|
isPositioned: q,
|
|
@@ -17951,7 +17960,7 @@ var dn = 10, [fm, qn] = Kr(ur), $k = "SelectContentImpl", Fk = Ir("SelectContent
|
|
|
17951
17960
|
(_ = w.trigger) == null || _.focus({ preventScroll: !0 }), R.preventDefault();
|
|
17952
17961
|
}),
|
|
17953
17962
|
children: /* @__PURE__ */ u.jsx(
|
|
17954
|
-
|
|
17963
|
+
zr,
|
|
17955
17964
|
{
|
|
17956
17965
|
asChild: !0,
|
|
17957
17966
|
disableOutsidePointerEvents: !0,
|
|
@@ -17960,7 +17969,7 @@ var dn = 10, [fm, qn] = Kr(ur), $k = "SelectContentImpl", Fk = Ir("SelectContent
|
|
|
17960
17969
|
onFocusOutside: (R) => R.preventDefault(),
|
|
17961
17970
|
onDismiss: () => w.onOpenChange(!1),
|
|
17962
17971
|
children: /* @__PURE__ */ u.jsx(
|
|
17963
|
-
|
|
17972
|
+
z,
|
|
17964
17973
|
{
|
|
17965
17974
|
role: "listbox",
|
|
17966
17975
|
id: w.contentId,
|
|
@@ -18001,12 +18010,12 @@ var dn = 10, [fm, qn] = Kr(ur), $k = "SelectContentImpl", Fk = Ir("SelectContent
|
|
|
18001
18010
|
}
|
|
18002
18011
|
);
|
|
18003
18012
|
pm.displayName = $k;
|
|
18004
|
-
var
|
|
18013
|
+
var zk = "SelectItemAlignedPosition", hm = h.forwardRef((e, t) => {
|
|
18005
18014
|
const { __scopeSelect: n, onPlaced: r, ...o } = e, s = Kn(ur, n), a = qn(ur, n), [i, l] = h.useState(null), [c, d] = h.useState(null), p = $e(t, (E) => d(E)), m = da(n), f = h.useRef(!1), v = h.useRef(!0), { viewport: g, selectedItem: x, selectedItemText: b, focusSelectedItem: w } = a, S = h.useCallback(() => {
|
|
18006
18015
|
if (s.trigger && s.valueNode && i && c && g && x && b) {
|
|
18007
18016
|
const E = s.trigger.getBoundingClientRect(), N = c.getBoundingClientRect(), j = s.valueNode.getBoundingClientRect(), L = b.getBoundingClientRect();
|
|
18008
18017
|
if (s.dir !== "rtl") {
|
|
18009
|
-
const re = L.left - N.left, se = j.left - re, Se = E.left - se, we = E.width + Se, Ae = Math.max(we, N.width), Ke = window.innerWidth - dn,
|
|
18018
|
+
const re = L.left - N.left, se = j.left - re, Se = E.left - se, we = E.width + Se, Ae = Math.max(we, N.width), Ke = window.innerWidth - dn, Be = xi(se, [
|
|
18010
18019
|
dn,
|
|
18011
18020
|
// Prevents the content from going off the starting edge of the
|
|
18012
18021
|
// viewport. It may still go off the ending edge, but this can be
|
|
@@ -18015,22 +18024,22 @@ var Bk = "SelectItemAlignedPosition", hm = h.forwardRef((e, t) => {
|
|
|
18015
18024
|
// https://github.com/radix-ui/primitives/issues/2049
|
|
18016
18025
|
Math.max(dn, Ke - Ae)
|
|
18017
18026
|
]);
|
|
18018
|
-
i.style.minWidth = we + "px", i.style.left =
|
|
18027
|
+
i.style.minWidth = we + "px", i.style.left = Be + "px";
|
|
18019
18028
|
} else {
|
|
18020
|
-
const re = N.right - L.right, se = window.innerWidth - j.right - re, Se = window.innerWidth - E.right - se, we = E.width + Se, Ae = Math.max(we, N.width), Ke = window.innerWidth - dn,
|
|
18029
|
+
const re = N.right - L.right, se = window.innerWidth - j.right - re, Se = window.innerWidth - E.right - se, we = E.width + Se, Ae = Math.max(we, N.width), Ke = window.innerWidth - dn, Be = xi(se, [
|
|
18021
18030
|
dn,
|
|
18022
18031
|
Math.max(dn, Ke - Ae)
|
|
18023
18032
|
]);
|
|
18024
|
-
i.style.minWidth = we + "px", i.style.right =
|
|
18033
|
+
i.style.minWidth = we + "px", i.style.right = Be + "px";
|
|
18025
18034
|
}
|
|
18026
|
-
const D = m(), F = window.innerHeight - dn * 2, q = g.scrollHeight, M = window.getComputedStyle(c), V = parseInt(M.borderTopWidth, 10), K = parseInt(M.paddingTop, 10),
|
|
18035
|
+
const D = m(), F = window.innerHeight - dn * 2, q = g.scrollHeight, M = window.getComputedStyle(c), V = parseInt(M.borderTopWidth, 10), K = parseInt(M.paddingTop, 10), B = parseInt(M.borderBottomWidth, 10), A = parseInt(M.paddingBottom, 10), k = V + K + q + A + B, G = Math.min(x.offsetHeight * 5, k), X = window.getComputedStyle(g), O = parseInt(X.paddingTop, 10), W = parseInt(X.paddingBottom, 10), P = E.top + E.height / 2 - dn, z = F - P, Y = x.offsetHeight / 2, R = x.offsetTop + Y, _ = V + K + R, H = k - _;
|
|
18027
18036
|
if (_ <= P) {
|
|
18028
18037
|
const re = D.length > 0 && x === D[D.length - 1].ref.current;
|
|
18029
18038
|
i.style.bottom = "0px";
|
|
18030
18039
|
const se = c.clientHeight - g.offsetTop - g.offsetHeight, Se = Math.max(
|
|
18031
|
-
|
|
18040
|
+
z,
|
|
18032
18041
|
Y + // viewport might have padding bottom, include it to avoid a scrollable viewport
|
|
18033
|
-
(re ? W : 0) + se +
|
|
18042
|
+
(re ? W : 0) + se + B
|
|
18034
18043
|
), we = _ + Se;
|
|
18035
18044
|
i.style.height = we + "px";
|
|
18036
18045
|
} else {
|
|
@@ -18105,8 +18114,8 @@ var Bk = "SelectItemAlignedPosition", hm = h.forwardRef((e, t) => {
|
|
|
18105
18114
|
}
|
|
18106
18115
|
);
|
|
18107
18116
|
});
|
|
18108
|
-
hm.displayName =
|
|
18109
|
-
var
|
|
18117
|
+
hm.displayName = zk;
|
|
18118
|
+
var Bk = "SelectPopperPosition", wi = h.forwardRef((e, t) => {
|
|
18110
18119
|
const {
|
|
18111
18120
|
__scopeSelect: n,
|
|
18112
18121
|
align: r = "start",
|
|
@@ -18134,7 +18143,7 @@ var zk = "SelectPopperPosition", wi = h.forwardRef((e, t) => {
|
|
|
18134
18143
|
}
|
|
18135
18144
|
);
|
|
18136
18145
|
});
|
|
18137
|
-
wi.displayName =
|
|
18146
|
+
wi.displayName = Bk;
|
|
18138
18147
|
var [Hk, Fl] = Kr(ur, {}), bi = "SelectViewport", mm = h.forwardRef(
|
|
18139
18148
|
(e, t) => {
|
|
18140
18149
|
const { __scopeSelect: n, nonce: r, ...o } = e, s = qn(bi, n), a = Fl(bi, n), i = $e(t, s.onViewportChange), l = h.useRef(0);
|
|
@@ -18488,7 +18497,7 @@ const Fm = h.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ u.jsx(
|
|
|
18488
18497
|
}
|
|
18489
18498
|
));
|
|
18490
18499
|
Fm.displayName = Dm.displayName;
|
|
18491
|
-
const
|
|
18500
|
+
const zm = h.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ u.jsx(
|
|
18492
18501
|
Lm,
|
|
18493
18502
|
{
|
|
18494
18503
|
ref: n,
|
|
@@ -18500,7 +18509,7 @@ const Bm = h.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ u.jsx(
|
|
|
18500
18509
|
children: /* @__PURE__ */ u.jsx(Ps, { className: "h-4 w-4" })
|
|
18501
18510
|
}
|
|
18502
18511
|
));
|
|
18503
|
-
|
|
18512
|
+
zm.displayName = Lm.displayName;
|
|
18504
18513
|
const sR = h.forwardRef(({ className: e, children: t, position: n = "popper", ...r }, o) => /* @__PURE__ */ u.jsx(eR, { children: /* @__PURE__ */ u.jsxs(
|
|
18505
18514
|
_m,
|
|
18506
18515
|
{
|
|
@@ -18524,7 +18533,7 @@ const sR = h.forwardRef(({ className: e, children: t, position: n = "popper", ..
|
|
|
18524
18533
|
children: t
|
|
18525
18534
|
}
|
|
18526
18535
|
),
|
|
18527
|
-
/* @__PURE__ */ u.jsx(
|
|
18536
|
+
/* @__PURE__ */ u.jsx(zm, {})
|
|
18528
18537
|
]
|
|
18529
18538
|
}
|
|
18530
18539
|
) }));
|
|
@@ -18563,7 +18572,7 @@ const lR = h.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ u.jsx(
|
|
|
18563
18572
|
}
|
|
18564
18573
|
));
|
|
18565
18574
|
lR.displayName = $m.displayName;
|
|
18566
|
-
var cR = "Separator", Nu = "horizontal", uR = ["horizontal", "vertical"],
|
|
18575
|
+
var cR = "Separator", Nu = "horizontal", uR = ["horizontal", "vertical"], Bm = h.forwardRef((e, t) => {
|
|
18567
18576
|
const { decorative: n, orientation: r = Nu, ...o } = e, s = dR(r) ? r : Nu, i = n ? { role: "none" } : { "aria-orientation": s === "vertical" ? s : void 0, role: "separator" };
|
|
18568
18577
|
return /* @__PURE__ */ u.jsx(
|
|
18569
18578
|
fe.div,
|
|
@@ -18575,11 +18584,11 @@ var cR = "Separator", Nu = "horizontal", uR = ["horizontal", "vertical"], zm = h
|
|
|
18575
18584
|
}
|
|
18576
18585
|
);
|
|
18577
18586
|
});
|
|
18578
|
-
|
|
18587
|
+
Bm.displayName = cR;
|
|
18579
18588
|
function dR(e) {
|
|
18580
18589
|
return uR.includes(e);
|
|
18581
18590
|
}
|
|
18582
|
-
var Hm =
|
|
18591
|
+
var Hm = Bm;
|
|
18583
18592
|
const fR = h.forwardRef(
|
|
18584
18593
|
({ className: e, orientation: t = "horizontal", decorative: n = !0, ...r }, o) => /* @__PURE__ */ u.jsx(
|
|
18585
18594
|
Hm,
|
|
@@ -18814,7 +18823,7 @@ const CR = h.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ u.jsx(
|
|
|
18814
18823
|
CR.displayName = sa.displayName;
|
|
18815
18824
|
var [ha, FN] = xn("Tooltip", [
|
|
18816
18825
|
Ur
|
|
18817
|
-
]), ma = Ur(), Xm = "TooltipProvider", ER = 700, Ci = "tooltip.open", [kR,
|
|
18826
|
+
]), ma = Ur(), Xm = "TooltipProvider", ER = 700, Ci = "tooltip.open", [kR, zl] = ha(Xm), Jm = (e) => {
|
|
18818
18827
|
const {
|
|
18819
18828
|
__scopeTooltip: t,
|
|
18820
18829
|
delayDuration: n = ER,
|
|
@@ -18859,7 +18868,7 @@ var vo = "Tooltip", [RR, ga] = ha(vo), Zm = (e) => {
|
|
|
18859
18868
|
onOpenChange: s,
|
|
18860
18869
|
disableHoverableContent: a,
|
|
18861
18870
|
delayDuration: i
|
|
18862
|
-
} = e, l =
|
|
18871
|
+
} = e, l = zl(vo, e.__scopeTooltip), c = ma(t), [d, p] = h.useState(null), m = Ft(), f = h.useRef(0), v = a ?? l.disableHoverableContent, g = i ?? l.delayDuration, x = h.useRef(!1), [b, w] = Dn({
|
|
18863
18872
|
prop: r,
|
|
18864
18873
|
defaultProp: o ?? !1,
|
|
18865
18874
|
onChange: (E) => {
|
|
@@ -18902,7 +18911,7 @@ var vo = "Tooltip", [RR, ga] = ha(vo), Zm = (e) => {
|
|
|
18902
18911
|
Zm.displayName = vo;
|
|
18903
18912
|
var Ei = "TooltipTrigger", Qm = h.forwardRef(
|
|
18904
18913
|
(e, t) => {
|
|
18905
|
-
const { __scopeTooltip: n, ...r } = e, o = ga(Ei, n), s =
|
|
18914
|
+
const { __scopeTooltip: n, ...r } = e, o = ga(Ei, n), s = zl(Ei, n), a = ma(n), i = h.useRef(null), l = $e(t, i, o.onTriggerChange), c = h.useRef(!1), d = h.useRef(!1), p = h.useCallback(() => c.current = !1, []);
|
|
18906
18915
|
return h.useEffect(() => () => document.removeEventListener("pointerup", p), [p]), /* @__PURE__ */ u.jsx(Ji, { asChild: !0, ...a, children: /* @__PURE__ */ u.jsx(
|
|
18907
18916
|
fe.button,
|
|
18908
18917
|
{
|
|
@@ -18929,7 +18938,7 @@ var Ei = "TooltipTrigger", Qm = h.forwardRef(
|
|
|
18929
18938
|
}
|
|
18930
18939
|
);
|
|
18931
18940
|
Qm.displayName = Ei;
|
|
18932
|
-
var IR = "TooltipPortal", [
|
|
18941
|
+
var IR = "TooltipPortal", [zN, NR] = ha(IR, {
|
|
18933
18942
|
forceMount: void 0
|
|
18934
18943
|
}), Mr = "TooltipContent", eg = h.forwardRef(
|
|
18935
18944
|
(e, t) => {
|
|
@@ -18937,7 +18946,7 @@ var IR = "TooltipPortal", [BN, NR] = ha(IR, {
|
|
|
18937
18946
|
return /* @__PURE__ */ u.jsx(Xt, { present: r || a.open, children: a.disableHoverableContent ? /* @__PURE__ */ u.jsx(tg, { side: o, ...s, ref: t }) : /* @__PURE__ */ u.jsx(AR, { side: o, ...s, ref: t }) });
|
|
18938
18947
|
}
|
|
18939
18948
|
), AR = h.forwardRef((e, t) => {
|
|
18940
|
-
const n = ga(Mr, e.__scopeTooltip), r =
|
|
18949
|
+
const n = ga(Mr, e.__scopeTooltip), r = zl(Mr, e.__scopeTooltip), o = h.useRef(null), s = $e(t, o), [a, i] = h.useState(null), { trigger: l, onClose: c } = n, d = o.current, { onPointerInTransitChange: p } = r, m = h.useCallback(() => {
|
|
18941
18950
|
i(null), p(!1);
|
|
18942
18951
|
}, [p]), f = h.useCallback(
|
|
18943
18952
|
(v, g) => {
|
|
@@ -18981,7 +18990,7 @@ var IR = "TooltipPortal", [BN, NR] = ha(IR, {
|
|
|
18981
18990
|
return window.addEventListener("scroll", p, { capture: !0 }), () => window.removeEventListener("scroll", p, { capture: !0 });
|
|
18982
18991
|
}
|
|
18983
18992
|
}, [l.trigger, d]), /* @__PURE__ */ u.jsx(
|
|
18984
|
-
|
|
18993
|
+
zr,
|
|
18985
18994
|
{
|
|
18986
18995
|
asChild: !0,
|
|
18987
18996
|
disableOutsidePointerEvents: !1,
|
|
@@ -19090,9 +19099,9 @@ function $R(e, t) {
|
|
|
19090
19099
|
}
|
|
19091
19100
|
function FR(e) {
|
|
19092
19101
|
const t = e.slice();
|
|
19093
|
-
return t.sort((n, r) => n.x < r.x ? -1 : n.x > r.x ? 1 : n.y < r.y ? -1 : n.y > r.y ? 1 : 0),
|
|
19102
|
+
return t.sort((n, r) => n.x < r.x ? -1 : n.x > r.x ? 1 : n.y < r.y ? -1 : n.y > r.y ? 1 : 0), zR(t);
|
|
19094
19103
|
}
|
|
19095
|
-
function
|
|
19104
|
+
function zR(e) {
|
|
19096
19105
|
if (e.length <= 1) return e.slice();
|
|
19097
19106
|
const t = [];
|
|
19098
19107
|
for (let r = 0; r < e.length; r++) {
|
|
@@ -19117,8 +19126,8 @@ function BR(e) {
|
|
|
19117
19126
|
}
|
|
19118
19127
|
return n.pop(), t.length === 1 && n.length === 1 && t[0].x === n[0].x && t[0].y === n[0].y ? t : t.concat(n);
|
|
19119
19128
|
}
|
|
19120
|
-
var
|
|
19121
|
-
const
|
|
19129
|
+
var BR = Jm, HR = Zm, UR = Qm, rg = eg;
|
|
19130
|
+
const BN = BR, HN = HR, UN = UR, WR = h.forwardRef(({ className: e, sideOffset: t = 4, ...n }, r) => /* @__PURE__ */ u.jsx(
|
|
19122
19131
|
rg,
|
|
19123
19132
|
{
|
|
19124
19133
|
ref: r,
|
|
@@ -19131,7 +19140,7 @@ const zN = zR, HN = HR, UN = UR, WR = h.forwardRef(({ className: e, sideOffset:
|
|
|
19131
19140
|
}
|
|
19132
19141
|
));
|
|
19133
19142
|
WR.displayName = rg.displayName;
|
|
19134
|
-
var
|
|
19143
|
+
var Bl = "ToastProvider", [Hl, VR, KR] = zs("Toast"), [og, WN] = xn("Toast", [KR]), [qR, xa] = og(Bl), sg = (e) => {
|
|
19135
19144
|
const {
|
|
19136
19145
|
__scopeToast: t,
|
|
19137
19146
|
label: n = "Notification",
|
|
@@ -19141,7 +19150,7 @@ var zl = "ToastProvider", [Hl, VR, KR] = Bs("Toast"), [og, WN] = xn("Toast", [KR
|
|
|
19141
19150
|
children: a
|
|
19142
19151
|
} = e, [i, l] = h.useState(null), [c, d] = h.useState(0), p = h.useRef(!1), m = h.useRef(!1);
|
|
19143
19152
|
return n.trim() || console.error(
|
|
19144
|
-
`Invalid prop \`label\` supplied to \`${
|
|
19153
|
+
`Invalid prop \`label\` supplied to \`${Bl}\`. Expected non-empty \`string\`.`
|
|
19145
19154
|
), /* @__PURE__ */ u.jsx(Hl.Provider, { scope: t, children: /* @__PURE__ */ u.jsx(
|
|
19146
19155
|
qR,
|
|
19147
19156
|
{
|
|
@@ -19161,7 +19170,7 @@ var zl = "ToastProvider", [Hl, VR, KR] = Bs("Toast"), [og, WN] = xn("Toast", [KR
|
|
|
19161
19170
|
}
|
|
19162
19171
|
) });
|
|
19163
19172
|
};
|
|
19164
|
-
sg.displayName =
|
|
19173
|
+
sg.displayName = Bl;
|
|
19165
19174
|
var ag = "ToastViewport", GR = ["F8"], ki = "toast.viewportPause", Ri = "toast.viewportResume", ig = h.forwardRef(
|
|
19166
19175
|
(e, t) => {
|
|
19167
19176
|
const {
|
|
@@ -19357,8 +19366,8 @@ var [QR, eI] = og(Fo, {
|
|
|
19357
19366
|
const V = () => {
|
|
19358
19367
|
F(E.current), c == null || c();
|
|
19359
19368
|
}, K = () => {
|
|
19360
|
-
const
|
|
19361
|
-
E.current = E.current -
|
|
19369
|
+
const B = (/* @__PURE__ */ new Date()).getTime() - T.current;
|
|
19370
|
+
E.current = E.current - B, window.clearTimeout(N.current), l == null || l();
|
|
19362
19371
|
};
|
|
19363
19372
|
return M.addEventListener(ki, K), M.addEventListener(Ri, V), () => {
|
|
19364
19373
|
M.removeEventListener(ki, K), M.removeEventListener(Ri, V);
|
|
@@ -19403,8 +19412,8 @@ var [QR, eI] = og(Fo, {
|
|
|
19403
19412
|
}),
|
|
19404
19413
|
onPointerMove: ae(e.onPointerMove, (M) => {
|
|
19405
19414
|
if (!S.current) return;
|
|
19406
|
-
const V = M.clientX - S.current.x, K = M.clientY - S.current.y,
|
|
19407
|
-
|
|
19415
|
+
const V = M.clientX - S.current.x, K = M.clientY - S.current.y, B = !!C.current, A = ["left", "right"].includes(g.swipeDirection), k = ["left", "up"].includes(g.swipeDirection) ? Math.min : Math.max, G = A ? k(0, V) : 0, X = A ? 0 : k(0, K), O = M.pointerType === "touch" ? 10 : 2, W = { x: G, y: X }, P = { originalEvent: M, delta: W };
|
|
19416
|
+
B ? (C.current = W, Jo(XR, p, P, {
|
|
19408
19417
|
discrete: !1
|
|
19409
19418
|
})) : Au(W, g.swipeDirection, O) ? (C.current = W, Jo(YR, d, P, {
|
|
19410
19419
|
discrete: !1
|
|
@@ -19413,7 +19422,7 @@ var [QR, eI] = og(Fo, {
|
|
|
19413
19422
|
onPointerUp: ae(e.onPointerUp, (M) => {
|
|
19414
19423
|
const V = C.current, K = M.target;
|
|
19415
19424
|
if (K.hasPointerCapture(M.pointerId) && K.releasePointerCapture(M.pointerId), C.current = null, S.current = null, V) {
|
|
19416
|
-
const
|
|
19425
|
+
const B = M.currentTarget, A = { originalEvent: M, delta: V };
|
|
19417
19426
|
Au(V, g.swipeDirection, g.swipeThreshold) ? Jo(ZR, f, A, {
|
|
19418
19427
|
discrete: !0
|
|
19419
19428
|
}) : Jo(
|
|
@@ -19423,7 +19432,7 @@ var [QR, eI] = og(Fo, {
|
|
|
19423
19432
|
{
|
|
19424
19433
|
discrete: !0
|
|
19425
19434
|
}
|
|
19426
|
-
),
|
|
19435
|
+
), B.addEventListener("click", (k) => k.preventDefault(), {
|
|
19427
19436
|
once: !0
|
|
19428
19437
|
});
|
|
19429
19438
|
}
|
|
@@ -19512,7 +19521,7 @@ function gg(e) {
|
|
|
19512
19521
|
}
|
|
19513
19522
|
function Jo(e, t, n, { discrete: r }) {
|
|
19514
19523
|
const o = n.originalEvent.currentTarget, s = new CustomEvent(e, { bubbles: !0, cancelable: !0, detail: n });
|
|
19515
|
-
t && o.addEventListener(e, t, { once: !0 }), r ?
|
|
19524
|
+
t && o.addEventListener(e, t, { once: !0 }), r ? zi(o, s) : o.dispatchEvent(s);
|
|
19516
19525
|
}
|
|
19517
19526
|
var Au = (e, t, n = 0) => {
|
|
19518
19527
|
const r = Math.abs(e.x), o = Math.abs(e.y), s = r > o;
|
|
@@ -19759,9 +19768,9 @@ function FI(e) {
|
|
|
19759
19768
|
let [t, n] = e.split("-"), r = [];
|
|
19760
19769
|
return t && r.push(t), n && r.push(n), r;
|
|
19761
19770
|
}
|
|
19762
|
-
var
|
|
19771
|
+
var zI = (e) => {
|
|
19763
19772
|
var t, n, r, o, s, a, i, l, c, d, p;
|
|
19764
|
-
let { invert: m, toast: f, unstyled: v, interacting: g, setHeights: x, visibleToasts: b, heights: w, index: S, toasts: C, expanded: y, removeToast: T, defaultRichColors: E, closeButton: N, style: j, cancelButtonStyle: L, actionButtonStyle: D, className: F = "", descriptionClassName: q = "", duration: M, position: V, gap: K, loadingIcon:
|
|
19773
|
+
let { invert: m, toast: f, unstyled: v, interacting: g, setHeights: x, visibleToasts: b, heights: w, index: S, toasts: C, expanded: y, removeToast: T, defaultRichColors: E, closeButton: N, style: j, cancelButtonStyle: L, actionButtonStyle: D, className: F = "", descriptionClassName: q = "", duration: M, position: V, gap: K, loadingIcon: B, expandByDefault: A, classNames: k, icons: G, closeButtonAriaLabel: X = "Close toast", pauseWhenPageIsHidden: O } = e, [W, P] = $.useState(null), [z, Y] = $.useState(null), [R, _] = $.useState(!1), [H, J] = $.useState(!1), [re, se] = $.useState(!1), [Se, we] = $.useState(!1), [Ae, Ke] = $.useState(!1), [Be, Xe] = $.useState(0), [Ue, bt] = $.useState(0), yt = $.useRef(f.duration || M || ju), ht = $.useRef(null), qe = $.useRef(null), Ne = S === 0, Ge = S + 1 <= b, je = f.type, He = f.dismissible !== !1, et = f.className || "", At = f.descriptionClassName || "", tt = $.useMemo(() => w.findIndex((he) => he.toastId === f.id) || 0, [w, f.id]), St = $.useMemo(() => {
|
|
19765
19774
|
var he;
|
|
19766
19775
|
return (he = f.closeButton) != null ? he : N;
|
|
19767
19776
|
}, [f.closeButton, N]), mt = $.useMemo(() => f.duration || M || ju, [f.duration, M]), Et = $.useRef(0), kt = $.useRef(0), Mt = $.useRef(0), _t = $.useRef(null), [Rt, Ut] = V.split("-"), We = $.useMemo(() => w.reduce((he, Oe, Ye) => Ye >= tt ? he : he + Oe.height, 0), [w, tt]), Fe = CI(), ft = f.invert || m, te = je === "loading";
|
|
@@ -19805,9 +19814,9 @@ var BI = (e) => {
|
|
|
19805
19814
|
}, [pe, f.delete]);
|
|
19806
19815
|
function nt() {
|
|
19807
19816
|
var he, Oe, Ye;
|
|
19808
|
-
return G != null && G.loading ? $.createElement("div", { className: un(k == null ? void 0 : k.loader, (he = f == null ? void 0 : f.classNames) == null ? void 0 : he.loader, "sonner-loader"), "data-visible": je === "loading" }, G.loading) :
|
|
19817
|
+
return G != null && G.loading ? $.createElement("div", { className: un(k == null ? void 0 : k.loader, (he = f == null ? void 0 : f.classNames) == null ? void 0 : he.loader, "sonner-loader"), "data-visible": je === "loading" }, G.loading) : B ? $.createElement("div", { className: un(k == null ? void 0 : k.loader, (Oe = f == null ? void 0 : f.classNames) == null ? void 0 : Oe.loader, "sonner-loader"), "data-visible": je === "loading" }, B) : $.createElement(vI, { className: un(k == null ? void 0 : k.loader, (Ye = f == null ? void 0 : f.classNames) == null ? void 0 : Ye.loader), visible: je === "loading" });
|
|
19809
19818
|
}
|
|
19810
|
-
return $.createElement("li", { tabIndex: 0, ref: qe, className: un(F, et, k == null ? void 0 : k.toast, (t = f == null ? void 0 : f.classNames) == null ? void 0 : t.toast, k == null ? void 0 : k.default, k == null ? void 0 : k[je], (n = f == null ? void 0 : f.classNames) == null ? void 0 : n[je]), "data-sonner-toast": "", "data-rich-colors": (r = f.richColors) != null ? r : E, "data-styled": !(f.jsx || f.unstyled || v), "data-mounted": R, "data-promise": !!f.promise, "data-swiped": Ae, "data-removed": H, "data-visible": Ge, "data-y-position": Rt, "data-x-position": Ut, "data-index": S, "data-front": Ne, "data-swiping": re, "data-dismissible": He, "data-type": je, "data-invert": ft, "data-swipe-out": Se, "data-swipe-direction":
|
|
19819
|
+
return $.createElement("li", { tabIndex: 0, ref: qe, className: un(F, et, k == null ? void 0 : k.toast, (t = f == null ? void 0 : f.classNames) == null ? void 0 : t.toast, k == null ? void 0 : k.default, k == null ? void 0 : k[je], (n = f == null ? void 0 : f.classNames) == null ? void 0 : n[je]), "data-sonner-toast": "", "data-rich-colors": (r = f.richColors) != null ? r : E, "data-styled": !(f.jsx || f.unstyled || v), "data-mounted": R, "data-promise": !!f.promise, "data-swiped": Ae, "data-removed": H, "data-visible": Ge, "data-y-position": Rt, "data-x-position": Ut, "data-index": S, "data-front": Ne, "data-swiping": re, "data-dismissible": He, "data-type": je, "data-invert": ft, "data-swipe-out": Se, "data-swipe-direction": z, "data-expanded": !!(y || A && R), style: { "--index": S, "--toasts-before": S, "--z-index": C.length - S, "--offset": `${H ? Be : kt.current}px`, "--initial-height": A ? "auto" : `${Ue}px`, ...j, ...f.style }, onDragEnd: () => {
|
|
19811
19820
|
se(!1), P(null), _t.current = null;
|
|
19812
19821
|
}, onPointerDown: (he) => {
|
|
19813
19822
|
te || !He || (ht.current = /* @__PURE__ */ new Date(), Xe(kt.current), he.target.setPointerCapture(he.pointerId), he.target.tagName !== "BUTTON" && (se(!0), _t.current = { x: he.clientX, y: he.clientY }));
|
|
@@ -19845,7 +19854,7 @@ function Pu() {
|
|
|
19845
19854
|
let e = document.documentElement.getAttribute("dir");
|
|
19846
19855
|
return e === "auto" || !e ? window.getComputedStyle(document.documentElement).direction : e;
|
|
19847
19856
|
}
|
|
19848
|
-
function
|
|
19857
|
+
function BI(e, t) {
|
|
19849
19858
|
let n = {};
|
|
19850
19859
|
return [e, t].forEach((r, o) => {
|
|
19851
19860
|
let s = o === 1, a = s ? "--mobile-offset" : "--offset", i = s ? MI : _I;
|
|
@@ -19860,10 +19869,10 @@ function zI(e, t) {
|
|
|
19860
19869
|
}), n;
|
|
19861
19870
|
}
|
|
19862
19871
|
var HI = Dg(function(e, t) {
|
|
19863
|
-
let { invert: n, position: r = "bottom-right", hotkey: o = ["altKey", "KeyT"], expand: s, closeButton: a, className: i, offset: l, mobileOffset: c, theme: d = "light", richColors: p, duration: m, style: f, visibleToasts: v = PI, toastOptions: g, dir: x = Pu(), gap: b = DI, loadingIcon: w, icons: S, containerAriaLabel: C = "Notifications", pauseWhenPageIsHidden: y } = e, [T, E] = $.useState([]), N = $.useMemo(() => Array.from(new Set([r].concat(T.filter((O) => O.position).map((O) => O.position)))), [T, r]), [j, L] = $.useState([]), [D, F] = $.useState(!1), [q, M] = $.useState(!1), [V, K] = $.useState(d !== "system" ? d : typeof window < "u" && window.matchMedia && window.matchMedia("(prefers-color-scheme: dark)").matches ? "dark" : "light"),
|
|
19872
|
+
let { invert: n, position: r = "bottom-right", hotkey: o = ["altKey", "KeyT"], expand: s, closeButton: a, className: i, offset: l, mobileOffset: c, theme: d = "light", richColors: p, duration: m, style: f, visibleToasts: v = PI, toastOptions: g, dir: x = Pu(), gap: b = DI, loadingIcon: w, icons: S, containerAriaLabel: C = "Notifications", pauseWhenPageIsHidden: y } = e, [T, E] = $.useState([]), N = $.useMemo(() => Array.from(new Set([r].concat(T.filter((O) => O.position).map((O) => O.position)))), [T, r]), [j, L] = $.useState([]), [D, F] = $.useState(!1), [q, M] = $.useState(!1), [V, K] = $.useState(d !== "system" ? d : typeof window < "u" && window.matchMedia && window.matchMedia("(prefers-color-scheme: dark)").matches ? "dark" : "light"), B = $.useRef(null), A = o.join("+").replace(/Key/g, "").replace(/Digit/g, ""), k = $.useRef(null), G = $.useRef(!1), X = $.useCallback((O) => {
|
|
19864
19873
|
E((W) => {
|
|
19865
19874
|
var P;
|
|
19866
|
-
return (P = W.find((
|
|
19875
|
+
return (P = W.find((z) => z.id === O.id)) != null && P.delete || Kt.dismiss(O.id), W.filter(({ id: z }) => z !== O.id);
|
|
19867
19876
|
});
|
|
19868
19877
|
}, []);
|
|
19869
19878
|
return $.useEffect(() => Kt.subscribe((O) => {
|
|
@@ -19874,7 +19883,7 @@ var HI = Dg(function(e, t) {
|
|
|
19874
19883
|
setTimeout(() => {
|
|
19875
19884
|
ji.flushSync(() => {
|
|
19876
19885
|
E((W) => {
|
|
19877
|
-
let P = W.findIndex((
|
|
19886
|
+
let P = W.findIndex((z) => z.id === O.id);
|
|
19878
19887
|
return P !== -1 ? [...W.slice(0, P), { ...W[P], ...O }, ...W.slice(P + 1)] : [O, ...W];
|
|
19879
19888
|
});
|
|
19880
19889
|
});
|
|
@@ -19894,8 +19903,8 @@ var HI = Dg(function(e, t) {
|
|
|
19894
19903
|
O.addListener(({ matches: P }) => {
|
|
19895
19904
|
try {
|
|
19896
19905
|
K(P ? "dark" : "light");
|
|
19897
|
-
} catch (
|
|
19898
|
-
console.error(
|
|
19906
|
+
} catch (z) {
|
|
19907
|
+
console.error(z);
|
|
19899
19908
|
}
|
|
19900
19909
|
});
|
|
19901
19910
|
}
|
|
@@ -19903,18 +19912,18 @@ var HI = Dg(function(e, t) {
|
|
|
19903
19912
|
T.length <= 1 && F(!1);
|
|
19904
19913
|
}, [T]), $.useEffect(() => {
|
|
19905
19914
|
let O = (W) => {
|
|
19906
|
-
var P,
|
|
19907
|
-
o.every((Y) => W[Y] || W.code === Y) && (F(!0), (P =
|
|
19915
|
+
var P, z;
|
|
19916
|
+
o.every((Y) => W[Y] || W.code === Y) && (F(!0), (P = B.current) == null || P.focus()), W.code === "Escape" && (document.activeElement === B.current || (z = B.current) != null && z.contains(document.activeElement)) && F(!1);
|
|
19908
19917
|
};
|
|
19909
19918
|
return document.addEventListener("keydown", O), () => document.removeEventListener("keydown", O);
|
|
19910
19919
|
}, [o]), $.useEffect(() => {
|
|
19911
|
-
if (
|
|
19920
|
+
if (B.current) return () => {
|
|
19912
19921
|
k.current && (k.current.focus({ preventScroll: !0 }), k.current = null, G.current = !1);
|
|
19913
19922
|
};
|
|
19914
|
-
}, [
|
|
19923
|
+
}, [B.current]), $.createElement("section", { ref: t, "aria-label": `${C} ${A}`, tabIndex: -1, "aria-live": "polite", "aria-relevant": "additions text", "aria-atomic": "false", suppressHydrationWarning: !0 }, N.map((O, W) => {
|
|
19915
19924
|
var P;
|
|
19916
|
-
let [
|
|
19917
|
-
return T.length ? $.createElement("ol", { key: O, dir: x === "auto" ? Pu() : x, tabIndex: -1, ref:
|
|
19925
|
+
let [z, Y] = O.split("-");
|
|
19926
|
+
return T.length ? $.createElement("ol", { key: O, dir: x === "auto" ? Pu() : x, tabIndex: -1, ref: B, className: i, "data-sonner-toaster": !0, "data-theme": V, "data-y-position": z, "data-lifted": D && T.length > 1 && !s, "data-x-position": Y, style: { "--front-toast-height": `${((P = j[0]) == null ? void 0 : P.height) || 0}px`, "--width": `${OI}px`, "--gap": `${b}px`, ...f, ...BI(l, c) }, onBlur: (R) => {
|
|
19918
19927
|
G.current && !R.currentTarget.contains(R.relatedTarget) && (G.current = !1, k.current && (k.current.focus({ preventScroll: !0 }), k.current = null));
|
|
19919
19928
|
}, onFocus: (R) => {
|
|
19920
19929
|
R.target instanceof HTMLElement && R.target.dataset.dismissible === "false" || G.current || (G.current = !0, k.current = R.relatedTarget);
|
|
@@ -19924,7 +19933,7 @@ var HI = Dg(function(e, t) {
|
|
|
19924
19933
|
R.target instanceof HTMLElement && R.target.dataset.dismissible === "false" || M(!0);
|
|
19925
19934
|
}, onPointerUp: () => M(!1) }, T.filter((R) => !R.position && W === 0 || R.position === O).map((R, _) => {
|
|
19926
19935
|
var H, J;
|
|
19927
|
-
return $.createElement(
|
|
19936
|
+
return $.createElement(zI, { key: R.id, icons: S, index: _, toast: R, defaultRichColors: p, duration: (H = g == null ? void 0 : g.duration) != null ? H : m, className: g == null ? void 0 : g.className, descriptionClassName: g == null ? void 0 : g.descriptionClassName, invert: n, visibleToasts: v, closeButton: (J = g == null ? void 0 : g.closeButton) != null ? J : a, interacting: q, position: O, style: g == null ? void 0 : g.style, unstyled: g == null ? void 0 : g.unstyled, classNames: g == null ? void 0 : g.classNames, cancelButtonStyle: g == null ? void 0 : g.cancelButtonStyle, actionButtonStyle: g == null ? void 0 : g.actionButtonStyle, removeToast: X, toasts: T.filter((re) => re.position == R.position), heights: j.filter((re) => re.position == R.position), setHeights: L, expandByDefault: s, gap: b, loadingIcon: w, expanded: D, pauseWhenPageIsHidden: y, swipeDirections: e.swipeDirections });
|
|
19928
19937
|
})) : null;
|
|
19929
19938
|
}));
|
|
19930
19939
|
});
|
|
@@ -20022,7 +20031,7 @@ export {
|
|
|
20022
20031
|
SE as ToolContent,
|
|
20023
20032
|
HN as Tooltip,
|
|
20024
20033
|
WR as TooltipContent,
|
|
20025
|
-
|
|
20034
|
+
BN as TooltipProvider,
|
|
20026
20035
|
UN as TooltipTrigger,
|
|
20027
20036
|
gE as UserTextContent,
|
|
20028
20037
|
TN as applySettings,
|
|
@@ -20085,7 +20094,7 @@ export {
|
|
|
20085
20094
|
xE as useFilePreview,
|
|
20086
20095
|
yN as useHasChatSession,
|
|
20087
20096
|
vE as useParsedMessageContent,
|
|
20088
|
-
|
|
20097
|
+
Bw as useShallowStableValue,
|
|
20089
20098
|
Fw as useStream,
|
|
20090
20099
|
Fw as useStreamingHook,
|
|
20091
20100
|
jw as useThreadHistoryState,
|