teodor-new-chat-ui 4.3.333 → 4.3.335
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 +453 -452
- package/dist/index.umd.js +25 -25
- package/dist/types/requests.d.ts +2 -1
- package/dist/types/timeline.d.ts +1 -0
- package/package.json +1 -1
package/dist/index.esm.js
CHANGED
|
@@ -136,14 +136,14 @@ function Em() {
|
|
|
136
136
|
}
|
|
137
137
|
return null;
|
|
138
138
|
}
|
|
139
|
-
var E = Object.assign, F = 0, j, Z, B, A,
|
|
139
|
+
var E = Object.assign, F = 0, j, Z, B, A, W, G, oe;
|
|
140
140
|
function ve() {
|
|
141
141
|
}
|
|
142
142
|
ve.__reactDisabledLog = !0;
|
|
143
143
|
function je() {
|
|
144
144
|
{
|
|
145
145
|
if (F === 0) {
|
|
146
|
-
j = console.log, Z = console.info, B = console.warn, A = console.error,
|
|
146
|
+
j = console.log, Z = console.info, B = console.warn, A = console.error, W = console.group, G = console.groupCollapsed, oe = console.groupEnd;
|
|
147
147
|
var k = {
|
|
148
148
|
configurable: !0,
|
|
149
149
|
enumerable: !0,
|
|
@@ -185,7 +185,7 @@ function Em() {
|
|
|
185
185
|
value: A
|
|
186
186
|
}),
|
|
187
187
|
group: E({}, k, {
|
|
188
|
-
value:
|
|
188
|
+
value: W
|
|
189
189
|
}),
|
|
190
190
|
groupCollapsed: E({}, k, {
|
|
191
191
|
value: G
|
|
@@ -212,13 +212,13 @@ function Em() {
|
|
|
212
212
|
` + Y + k;
|
|
213
213
|
}
|
|
214
214
|
}
|
|
215
|
-
var
|
|
215
|
+
var V = !1, J;
|
|
216
216
|
{
|
|
217
217
|
var ae = typeof WeakMap == "function" ? WeakMap : Map;
|
|
218
218
|
J = new ae();
|
|
219
219
|
}
|
|
220
220
|
function re(k, H) {
|
|
221
|
-
if (!k ||
|
|
221
|
+
if (!k || V)
|
|
222
222
|
return "";
|
|
223
223
|
{
|
|
224
224
|
var se = J.get(k);
|
|
@@ -226,7 +226,7 @@ function Em() {
|
|
|
226
226
|
return se;
|
|
227
227
|
}
|
|
228
228
|
var we;
|
|
229
|
-
|
|
229
|
+
V = !0;
|
|
230
230
|
var Je = Error.prepareStackTrace;
|
|
231
231
|
Error.prepareStackTrace = void 0;
|
|
232
232
|
var it;
|
|
@@ -283,7 +283,7 @@ function Em() {
|
|
|
283
283
|
}
|
|
284
284
|
}
|
|
285
285
|
} finally {
|
|
286
|
-
|
|
286
|
+
V = !1, z.current = it, q(), Error.prepareStackTrace = Je;
|
|
287
287
|
}
|
|
288
288
|
var Se = k ? k.displayName || k.name : "", Ie = Se ? D(Se) : "";
|
|
289
289
|
return typeof k == "function" && J.set(k, Ie), Ie;
|
|
@@ -470,7 +470,7 @@ function Em() {
|
|
|
470
470
|
}
|
|
471
471
|
}
|
|
472
472
|
var pt = g.ReactCurrentOwner, lt = g.ReactDebugCurrentFrame;
|
|
473
|
-
function
|
|
473
|
+
function K(k) {
|
|
474
474
|
if (k) {
|
|
475
475
|
var H = k._owner, se = Oe(k.type, k._source, H ? H.type : null);
|
|
476
476
|
lt.setExtraStackFrame(se);
|
|
@@ -520,7 +520,7 @@ Check the top-level render call using <` + se + ">.");
|
|
|
520
520
|
return;
|
|
521
521
|
Re[se] = !0;
|
|
522
522
|
var we = "";
|
|
523
|
-
k && k._owner && k._owner !== pt.current && (we = " It was passed a child from " + $(k._owner.type) + "."),
|
|
523
|
+
k && k._owner && k._owner !== pt.current && (we = " It was passed a child from " + $(k._owner.type) + "."), K(k), w('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.', se, we), K(null);
|
|
524
524
|
}
|
|
525
525
|
}
|
|
526
526
|
function Me(k, H) {
|
|
@@ -572,15 +572,15 @@ Check the top-level render call using <` + se + ">.");
|
|
|
572
572
|
for (var H = Object.keys(k.props), se = 0; se < H.length; se++) {
|
|
573
573
|
var we = H[se];
|
|
574
574
|
if (we !== "children" && we !== "key") {
|
|
575
|
-
|
|
575
|
+
K(k), w("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.", we), K(null);
|
|
576
576
|
break;
|
|
577
577
|
}
|
|
578
578
|
}
|
|
579
|
-
k.ref !== null && (
|
|
579
|
+
k.ref !== null && (K(k), w("Invalid attribute `ref` supplied to `React.Fragment`."), K(null));
|
|
580
580
|
}
|
|
581
581
|
}
|
|
582
582
|
var Tn = {};
|
|
583
|
-
function
|
|
583
|
+
function Vn(k, H, se, we, Je, it) {
|
|
584
584
|
{
|
|
585
585
|
var Be = L(k);
|
|
586
586
|
if (!Be) {
|
|
@@ -610,28 +610,28 @@ Check the top-level render call using <` + se + ">.");
|
|
|
610
610
|
if (Ye.call(H, "key")) {
|
|
611
611
|
var Ie = $(k), Ge = Object.keys(H).filter(function(Gh) {
|
|
612
612
|
return Gh !== "key";
|
|
613
|
-
}),
|
|
614
|
-
if (!Tn[Ie +
|
|
613
|
+
}), jn = Ge.length > 0 ? "{key: someKey, " + Ge.join(": ..., ") + ": ...}" : "{key: someKey}";
|
|
614
|
+
if (!Tn[Ie + jn]) {
|
|
615
615
|
var Yt = Ge.length > 0 ? "{" + Ge.join(": ..., ") + ": ...}" : "{}";
|
|
616
616
|
w(`A props object containing a "key" prop is being spread into JSX:
|
|
617
617
|
let props = %s;
|
|
618
618
|
<%s {...props} />
|
|
619
619
|
React keys must be passed directly to JSX without using spread:
|
|
620
620
|
let props = %s;
|
|
621
|
-
<%s key={someKey} {...props} />`,
|
|
621
|
+
<%s key={someKey} {...props} />`, jn, Ie, Yt, Ie), Tn[Ie + jn] = !0;
|
|
622
622
|
}
|
|
623
623
|
}
|
|
624
624
|
return k === r ? Wt(wt) : Ee(wt), wt;
|
|
625
625
|
}
|
|
626
626
|
}
|
|
627
|
-
function
|
|
628
|
-
return
|
|
627
|
+
function ur(k, H, se) {
|
|
628
|
+
return Vn(k, H, se, !0);
|
|
629
629
|
}
|
|
630
630
|
function Pr(k, H, se) {
|
|
631
|
-
return
|
|
631
|
+
return Vn(k, H, se, !1);
|
|
632
632
|
}
|
|
633
|
-
var
|
|
634
|
-
Or.Fragment = r, Or.jsx =
|
|
633
|
+
var _n = Pr, Kn = ur;
|
|
634
|
+
Or.Fragment = r, Or.jsx = _n, Or.jsxs = Kn;
|
|
635
635
|
}()), Or;
|
|
636
636
|
}
|
|
637
637
|
process.env.NODE_ENV === "production" ? Ii.exports = Rm() : Ii.exports = Em();
|
|
@@ -698,7 +698,7 @@ function qc(e, t) {
|
|
|
698
698
|
return o;
|
|
699
699
|
return null;
|
|
700
700
|
}
|
|
701
|
-
const
|
|
701
|
+
const Gn = typeof globalThis < "u" ? globalThis : typeof self < "u" ? self : typeof window < "u" ? window : global, Gc = (e) => !Sr(e) && e !== Gn;
|
|
702
702
|
function ki() {
|
|
703
703
|
const { caseless: e, skipUndefined: t } = Gc(this) && this || {}, n = {}, r = (o, s) => {
|
|
704
704
|
const i = e && qc(n, s) || s;
|
|
@@ -807,14 +807,14 @@ const cg = (e) => {
|
|
|
807
807
|
return r;
|
|
808
808
|
};
|
|
809
809
|
return n(e, 0);
|
|
810
|
-
}, ug = dn("AsyncFunction"), dg = (e) => e && (ao(e) || zt(e)) && zt(e.then) && zt(e.catch), Xc = ((e, t) => e ? setImmediate : t ? ((n, r) => (
|
|
811
|
-
o ===
|
|
810
|
+
}, ug = dn("AsyncFunction"), dg = (e) => e && (ao(e) || zt(e)) && zt(e.then) && zt(e.catch), Xc = ((e, t) => e ? setImmediate : t ? ((n, r) => (Gn.addEventListener("message", ({ source: o, data: s }) => {
|
|
811
|
+
o === Gn && s === n && r.length && r.shift()();
|
|
812
812
|
}, !1), (o) => {
|
|
813
|
-
r.push(o),
|
|
813
|
+
r.push(o), Gn.postMessage(n, "*");
|
|
814
814
|
}))(`axios@${Math.random()}`, []) : (n) => setTimeout(n))(
|
|
815
815
|
typeof setImmediate == "function",
|
|
816
|
-
zt(
|
|
817
|
-
), fg = typeof queueMicrotask < "u" ? queueMicrotask.bind(
|
|
816
|
+
zt(Gn.postMessage)
|
|
817
|
+
), fg = typeof queueMicrotask < "u" ? queueMicrotask.bind(Gn) : typeof process < "u" && process.nextTick || Xc, pg = (e) => e != null && zt(e[xs]), O = {
|
|
818
818
|
isArray: kr,
|
|
819
819
|
isArrayBuffer: Vc,
|
|
820
820
|
isBuffer: io,
|
|
@@ -864,7 +864,7 @@ const cg = (e) => {
|
|
|
864
864
|
noop: ig,
|
|
865
865
|
toFiniteNumber: ag,
|
|
866
866
|
findKey: qc,
|
|
867
|
-
global:
|
|
867
|
+
global: Gn,
|
|
868
868
|
isContextDefined: Gc,
|
|
869
869
|
isSpecCompliantForm: lg,
|
|
870
870
|
toJSONObject: cg,
|
|
@@ -1572,7 +1572,7 @@ function iu(e, t, n) {
|
|
|
1572
1572
|
return e && (r || n == !1) ? Hg(e, t) : t;
|
|
1573
1573
|
}
|
|
1574
1574
|
const hl = (e) => e instanceof Ht ? { ...e } : e;
|
|
1575
|
-
function
|
|
1575
|
+
function Zn(e, t) {
|
|
1576
1576
|
t = t || {};
|
|
1577
1577
|
const n = {};
|
|
1578
1578
|
function r(c, d, f, p) {
|
|
@@ -1637,7 +1637,7 @@ function Qn(e, t) {
|
|
|
1637
1637
|
}), n;
|
|
1638
1638
|
}
|
|
1639
1639
|
const au = (e) => {
|
|
1640
|
-
const t =
|
|
1640
|
+
const t = Zn({}, e);
|
|
1641
1641
|
let { data: n, withXSRFToken: r, xsrfHeaderName: o, xsrfCookieName: s, headers: i, auth: a } = t;
|
|
1642
1642
|
if (t.headers = i = Ht.from(i), t.url = tu(iu(t.baseURL, t.url, t.allowAbsoluteUrls), e.params, e.paramsSerializer), a && i.set(
|
|
1643
1643
|
"Authorization",
|
|
@@ -1919,10 +1919,10 @@ const au = (e) => {
|
|
|
1919
1919
|
);
|
|
1920
1920
|
}
|
|
1921
1921
|
I = I || "text";
|
|
1922
|
-
let
|
|
1922
|
+
let W = await f[O.findKey(f, I) || "text"](B, x);
|
|
1923
1923
|
return !A && E && E(), await new Promise((G, oe) => {
|
|
1924
1924
|
su(G, oe, {
|
|
1925
|
-
data:
|
|
1925
|
+
data: W,
|
|
1926
1926
|
headers: Ht.from(B.headers),
|
|
1927
1927
|
status: B.status,
|
|
1928
1928
|
statusText: B.statusText,
|
|
@@ -2070,7 +2070,7 @@ const Mo = {
|
|
|
2070
2070
|
assertOptions: Qg,
|
|
2071
2071
|
validators: bs
|
|
2072
2072
|
}, hn = Mo.validators;
|
|
2073
|
-
let
|
|
2073
|
+
let Xn = class {
|
|
2074
2074
|
constructor(t) {
|
|
2075
2075
|
this.defaults = t || {}, this.interceptors = {
|
|
2076
2076
|
request: new ul(),
|
|
@@ -2103,7 +2103,7 @@ let Jn = class {
|
|
|
2103
2103
|
}
|
|
2104
2104
|
}
|
|
2105
2105
|
_request(t, n) {
|
|
2106
|
-
typeof t == "string" ? (n = n || {}, n.url = t) : n = t || {}, n =
|
|
2106
|
+
typeof t == "string" ? (n = n || {}, n.url = t) : n = t || {}, n = Zn(this.defaults, n);
|
|
2107
2107
|
const { transitional: r, paramsSerializer: o, headers: s } = n;
|
|
2108
2108
|
r !== void 0 && Mo.assertOptions(r, {
|
|
2109
2109
|
silentJSONParsing: hn.transitional(hn.boolean),
|
|
@@ -2165,14 +2165,14 @@ let Jn = class {
|
|
|
2165
2165
|
return d;
|
|
2166
2166
|
}
|
|
2167
2167
|
getUri(t) {
|
|
2168
|
-
t =
|
|
2168
|
+
t = Zn(this.defaults, t);
|
|
2169
2169
|
const n = iu(t.baseURL, t.url, t.allowAbsoluteUrls);
|
|
2170
2170
|
return tu(n, t.params, t.paramsSerializer);
|
|
2171
2171
|
}
|
|
2172
2172
|
};
|
|
2173
2173
|
O.forEach(["delete", "get", "head", "options"], function(t) {
|
|
2174
|
-
|
|
2175
|
-
return this.request(
|
|
2174
|
+
Xn.prototype[t] = function(n, r) {
|
|
2175
|
+
return this.request(Zn(r || {}, {
|
|
2176
2176
|
method: t,
|
|
2177
2177
|
url: n,
|
|
2178
2178
|
data: (r || {}).data
|
|
@@ -2182,7 +2182,7 @@ O.forEach(["delete", "get", "head", "options"], function(t) {
|
|
|
2182
2182
|
O.forEach(["post", "put", "patch"], function(t) {
|
|
2183
2183
|
function n(r) {
|
|
2184
2184
|
return function(s, i, a) {
|
|
2185
|
-
return this.request(
|
|
2185
|
+
return this.request(Zn(a || {}, {
|
|
2186
2186
|
method: t,
|
|
2187
2187
|
headers: r ? {
|
|
2188
2188
|
"Content-Type": "multipart/form-data"
|
|
@@ -2192,7 +2192,7 @@ O.forEach(["post", "put", "patch"], function(t) {
|
|
|
2192
2192
|
}));
|
|
2193
2193
|
};
|
|
2194
2194
|
}
|
|
2195
|
-
|
|
2195
|
+
Xn.prototype[t] = n(), Xn.prototype[t + "Form"] = n(!0);
|
|
2196
2196
|
});
|
|
2197
2197
|
let ex = class du {
|
|
2198
2198
|
constructor(t) {
|
|
@@ -2344,13 +2344,13 @@ Object.entries(Ni).forEach(([e, t]) => {
|
|
|
2344
2344
|
Ni[t] = e;
|
|
2345
2345
|
});
|
|
2346
2346
|
function fu(e) {
|
|
2347
|
-
const t = new
|
|
2348
|
-
return O.extend(n,
|
|
2349
|
-
return fu(
|
|
2347
|
+
const t = new Xn(e), n = Uc(Xn.prototype.request, t);
|
|
2348
|
+
return O.extend(n, Xn.prototype, t, { allOwnKeys: !0 }), O.extend(n, t, null, { allOwnKeys: !0 }), n.create = function(o) {
|
|
2349
|
+
return fu(Zn(e, o));
|
|
2350
2350
|
}, n;
|
|
2351
2351
|
}
|
|
2352
2352
|
const Ct = fu(co);
|
|
2353
|
-
Ct.Axios =
|
|
2353
|
+
Ct.Axios = Xn;
|
|
2354
2354
|
Ct.CanceledError = Rr;
|
|
2355
2355
|
Ct.CancelToken = ex;
|
|
2356
2356
|
Ct.isCancel = ou;
|
|
@@ -2363,7 +2363,7 @@ Ct.all = function(t) {
|
|
|
2363
2363
|
};
|
|
2364
2364
|
Ct.spread = tx;
|
|
2365
2365
|
Ct.isAxiosError = nx;
|
|
2366
|
-
Ct.mergeConfig =
|
|
2366
|
+
Ct.mergeConfig = Zn;
|
|
2367
2367
|
Ct.AxiosHeaders = Ht;
|
|
2368
2368
|
Ct.formToJSON = (e) => ru(O.isHTMLForm(e) ? new FormData(e) : e);
|
|
2369
2369
|
Ct.getAdapter = cu.getAdapter;
|
|
@@ -2530,9 +2530,9 @@ class cx {
|
|
|
2530
2530
|
return (r == null ? void 0 : r.items) ?? [];
|
|
2531
2531
|
}
|
|
2532
2532
|
}
|
|
2533
|
-
const
|
|
2533
|
+
const Qn = new cx(), pu = so(null);
|
|
2534
2534
|
function ux({ children: e, apiConfig: t }) {
|
|
2535
|
-
const n =
|
|
2535
|
+
const n = Qn;
|
|
2536
2536
|
if (t) {
|
|
2537
2537
|
const o = n.baseUrl, s = n.getAuthToken();
|
|
2538
2538
|
t.baseUrl && t.baseUrl !== o && n.updateConfig({
|
|
@@ -2680,7 +2680,8 @@ function xx(e) {
|
|
|
2680
2680
|
step: l,
|
|
2681
2681
|
source: c ?? null,
|
|
2682
2682
|
createdAt: d,
|
|
2683
|
-
next: h ?? void 0
|
|
2683
|
+
next: h ?? void 0,
|
|
2684
|
+
parentConfig: o.parentConfig ?? null
|
|
2684
2685
|
});
|
|
2685
2686
|
}
|
|
2686
2687
|
return t;
|
|
@@ -3061,12 +3062,12 @@ function $x(e = {}) {
|
|
|
3061
3062
|
b.current && (b.current.abort(), b.current = null), l(!0), d(null), e.autoAppendAssistant !== !1 && p(""), x(null), I.current = null, R.current = null, _.current = null;
|
|
3062
3063
|
const Z = new AbortController();
|
|
3063
3064
|
b.current = Z;
|
|
3064
|
-
let B = null, A = null,
|
|
3065
|
+
let B = null, A = null, W = !1;
|
|
3065
3066
|
return C.current = {
|
|
3066
3067
|
threadId: E.threadId ?? null,
|
|
3067
3068
|
headers: {}
|
|
3068
3069
|
}, (async () => {
|
|
3069
|
-
var oe, ve, je, q, z, Y, D,
|
|
3070
|
+
var oe, ve, je, q, z, Y, D, V, J, ae, re, Ne, He, Oe, Ye, qe, tt, Xe;
|
|
3070
3071
|
const G = (ie) => {
|
|
3071
3072
|
var xe;
|
|
3072
3073
|
try {
|
|
@@ -3092,8 +3093,8 @@ function $x(e = {}) {
|
|
|
3092
3093
|
N && (lt = ((je = JSON.parse(N)) == null ? void 0 : je.apiKey) || null);
|
|
3093
3094
|
} catch {
|
|
3094
3095
|
}
|
|
3095
|
-
const
|
|
3096
|
-
|
|
3096
|
+
const K = et || pt || lt || null;
|
|
3097
|
+
K && (ie = { Authorization: `Bearer ${K}` });
|
|
3097
3098
|
}
|
|
3098
3099
|
} catch {
|
|
3099
3100
|
}
|
|
@@ -3132,7 +3133,7 @@ function $x(e = {}) {
|
|
|
3132
3133
|
Qe == null ? void 0 : Qe.slice(0, 500)
|
|
3133
3134
|
);
|
|
3134
3135
|
const et = `stream ${st.status}${Qe ? ": " + Qe : ""}`;
|
|
3135
|
-
throw (z = j == null ? void 0 : j.onConnectionError) == null || z.call(j, et),
|
|
3136
|
+
throw (z = j == null ? void 0 : j.onConnectionError) == null || z.call(j, et), W = !0, B = "error", A = et, new Error(et);
|
|
3136
3137
|
}
|
|
3137
3138
|
w(!0);
|
|
3138
3139
|
const at = st.body.getReader(), _t = new TextDecoder();
|
|
@@ -3162,9 +3163,9 @@ function $x(e = {}) {
|
|
|
3162
3163
|
...C.current,
|
|
3163
3164
|
threadId: pt
|
|
3164
3165
|
}), (Y = j == null ? void 0 : j.onOpen) == null || Y.call(j, { threadId: pt, created: lt }); ; ) {
|
|
3165
|
-
const { value:
|
|
3166
|
+
const { value: K, done: N } = await at.read();
|
|
3166
3167
|
if (N) break;
|
|
3167
|
-
vt += _t.decode(
|
|
3168
|
+
vt += _t.decode(K, { stream: !0 }), vt.length > pn && (vt = "", console.warn("Stream buffer reset: exceeded 1MB"));
|
|
3168
3169
|
let X;
|
|
3169
3170
|
for (; (X = vt.indexOf(`
|
|
3170
3171
|
|
|
@@ -3225,7 +3226,7 @@ function $x(e = {}) {
|
|
|
3225
3226
|
} else if (be.type === "heartbeat") {
|
|
3226
3227
|
console.debug("[use-chat] heartbeat received");
|
|
3227
3228
|
try {
|
|
3228
|
-
(
|
|
3229
|
+
(V = j == null ? void 0 : j.onHeartbeat) == null || V.call(j, be);
|
|
3229
3230
|
} catch (Me) {
|
|
3230
3231
|
console.warn("[use-chat] heartbeat callback failed", Me);
|
|
3231
3232
|
}
|
|
@@ -3267,7 +3268,7 @@ function $x(e = {}) {
|
|
|
3267
3268
|
B = B ?? "aborted";
|
|
3268
3269
|
else {
|
|
3269
3270
|
const xe = ie.message || String(ie);
|
|
3270
|
-
B = "error", A = xe, d(xe), (qe = j == null ? void 0 : j.onError) == null || qe.call(j, xe),
|
|
3271
|
+
B = "error", A = xe, d(xe), (qe = j == null ? void 0 : j.onError) == null || qe.call(j, xe), W || ((tt = j == null ? void 0 : j.onConnectionError) == null || tt.call(j, xe), W = !0);
|
|
3271
3272
|
}
|
|
3272
3273
|
} finally {
|
|
3273
3274
|
const ie = S.current, xe = I.current, Ue = R.current, We = _.current, st = B ?? (Z.signal.aborted ? "aborted" : A ? "error" : "complete");
|
|
@@ -3882,7 +3883,7 @@ function Yx({
|
|
|
3882
3883
|
}
|
|
3883
3884
|
},
|
|
3884
3885
|
onClosed: ($) => {
|
|
3885
|
-
var Z, B, A,
|
|
3886
|
+
var Z, B, A, W;
|
|
3886
3887
|
const E = ((Z = h.current) == null ? void 0 : Z.manualStop) ?? !1, F = f.current ?? ((B = h.current) == null ? void 0 : B.threadIdGuess) ?? ((A = $.lastStateHistory) == null ? void 0 : A.threadId) ?? null;
|
|
3887
3888
|
($.reason === "complete" || $.reason === "aborted" && E) && g(F);
|
|
3888
3889
|
const j = {
|
|
@@ -3898,7 +3899,7 @@ function Yx({
|
|
|
3898
3899
|
console.warn("[useChatStreamingService] onStreamClosed handler failed", G);
|
|
3899
3900
|
}
|
|
3900
3901
|
try {
|
|
3901
|
-
(
|
|
3902
|
+
(W = M == null ? void 0 : M.onClosed) == null || W.call(M, j);
|
|
3902
3903
|
} catch (G) {
|
|
3903
3904
|
console.warn("[useChatStreamingService] downstream onClosed handler failed", G);
|
|
3904
3905
|
}
|
|
@@ -3944,64 +3945,64 @@ function Xx({
|
|
|
3944
3945
|
onAuthError: i,
|
|
3945
3946
|
onThreadChange: a
|
|
3946
3947
|
}) {
|
|
3947
|
-
const { api: l, baseUrl: c } = hu(), d = De(() => Rn(c), [c]), [f, p] = me([]), [h, x] = me(t), [m, y] = me(!1), [g, w] = me(null), [b, T] = me(!1), [S, C] = me(null), { state: I, seed: R, prepend: _, pushUser: L, onEvent: P } = Wx(), [M, $] = me(!1), [E, F] = me(!1), [j, Z] = me(null), [B, A] = me([]), [
|
|
3948
|
-
() => B.flatMap((
|
|
3948
|
+
const { api: l, baseUrl: c } = hu(), d = De(() => Rn(c), [c]), [f, p] = me([]), [h, x] = me(t), [m, y] = me(!1), [g, w] = me(null), [b, T] = me(!1), [S, C] = me(null), { state: I, seed: R, prepend: _, pushUser: L, onEvent: P } = Wx(), [M, $] = me(!1), [E, F] = me(!1), [j, Z] = me(null), [B, A] = me([]), [W, G] = me([]), [oe, ve] = me(!1), je = De(
|
|
3949
|
+
() => B.flatMap((K) => K.messages ?? []),
|
|
3949
3950
|
[B]
|
|
3950
|
-
), q = De(() => Lx(je), [je]), z = Le(h), Y = Le(null), D = Le(null),
|
|
3951
|
+
), q = De(() => Lx(je), [je]), z = Le(h), Y = Le(null), D = Le(null), V = Le(null), J = Le(null), ae = Le(!1), re = Le(null), Ne = Le(/* @__PURE__ */ new Map()), He = Le(/* @__PURE__ */ new Map());
|
|
3951
3952
|
yt(() => {
|
|
3952
3953
|
z.current = h;
|
|
3953
3954
|
}, [h]);
|
|
3954
3955
|
const Oe = ge(async () => {
|
|
3955
3956
|
y(!0), w(null);
|
|
3956
3957
|
try {
|
|
3957
|
-
const
|
|
3958
|
-
p(
|
|
3959
|
-
} catch (
|
|
3960
|
-
const N = String(
|
|
3958
|
+
const K = await l.listThreads();
|
|
3959
|
+
p(K ?? []);
|
|
3960
|
+
} catch (K) {
|
|
3961
|
+
const N = String(K);
|
|
3961
3962
|
w(N), s == null || s(N);
|
|
3962
3963
|
} finally {
|
|
3963
3964
|
y(!1);
|
|
3964
3965
|
}
|
|
3965
|
-
}, [l, s]), Ye = ge((
|
|
3966
|
-
if (!(
|
|
3966
|
+
}, [l, s]), Ye = ge((K) => {
|
|
3967
|
+
if (!(K != null && K.threadId)) return;
|
|
3967
3968
|
const N = {
|
|
3968
|
-
threadId:
|
|
3969
|
-
title:
|
|
3970
|
-
createdAt:
|
|
3971
|
-
updatedAt:
|
|
3972
|
-
messageCount:
|
|
3969
|
+
threadId: K.threadId,
|
|
3970
|
+
title: K.title || `Thread ${K.threadId.slice(0, 8)}`,
|
|
3971
|
+
createdAt: K.createdAt || (/* @__PURE__ */ new Date()).toISOString(),
|
|
3972
|
+
updatedAt: K.updatedAt || (/* @__PURE__ */ new Date()).toISOString(),
|
|
3973
|
+
messageCount: K.messageCount ?? 1
|
|
3973
3974
|
};
|
|
3974
3975
|
p((X) => X.some((fe) => fe.threadId === N.threadId) ? (console.debug("[ChatSessionProvider] thread_info: thread already in list", N.threadId), X) : (console.debug("[ChatSessionProvider] thread_info: adding thread to list", N.threadId), [N, ...X]));
|
|
3975
3976
|
}, []), qe = ge(
|
|
3976
|
-
(
|
|
3977
|
-
const N =
|
|
3977
|
+
(K) => {
|
|
3978
|
+
const N = K.threadId ?? z.current;
|
|
3978
3979
|
if (!N || z.current && z.current !== N)
|
|
3979
3980
|
return;
|
|
3980
|
-
const { checkpoints: X, timeline: ne } = hr(
|
|
3981
|
+
const { checkpoints: X, timeline: ne } = hr(K);
|
|
3981
3982
|
if (!X.length)
|
|
3982
3983
|
return;
|
|
3983
3984
|
const fe = X.find((Re) => Re.messages && Re.messages.length > 0) ?? X.find((Re) => !!Re.checkpointId) ?? X[0];
|
|
3984
3985
|
R((fe == null ? void 0 : fe.messages) ?? [], {
|
|
3985
3986
|
checkpointId: (fe == null ? void 0 : fe.checkpointId) ?? null,
|
|
3986
3987
|
checkpointNs: (fe == null ? void 0 : fe.checkpointNs) ?? null
|
|
3987
|
-
}), G(ne), A(X), $(!!(fe != null && fe.nextCursor)), Z((fe == null ? void 0 : fe.nextCursor) ?? null), re.current = `${N}:latest`, D.current = null,
|
|
3988
|
+
}), G(ne), A(X), $(!!(fe != null && fe.nextCursor)), Z((fe == null ? void 0 : fe.nextCursor) ?? null), re.current = `${N}:latest`, D.current = null, V.current = null;
|
|
3988
3989
|
},
|
|
3989
3990
|
[R]
|
|
3990
|
-
), tt = ge((
|
|
3991
|
-
console.log("[ChatSessionProvider] 🎯 Received thread_info:",
|
|
3991
|
+
), tt = ge((K) => {
|
|
3992
|
+
console.log("[ChatSessionProvider] 🎯 Received thread_info:", K.threadId), Ye(K), z.current !== K.threadId && ((K.created ?? !z.current) && (D.current = K.threadId), V.current = K.threadId, console.log("[ChatSessionProvider] thread_info: marking to skip auto-load for new thread"), x(K.threadId));
|
|
3992
3993
|
}, [Ye]), { startStream: Xe, stop: ie, isStreaming: xe, error: Ue, setAuthToken: We } = Yx({
|
|
3993
3994
|
baseUrl: d,
|
|
3994
3995
|
onThreadInfo: tt,
|
|
3995
3996
|
onMessageEvent: P,
|
|
3996
3997
|
onStateHistory: qe,
|
|
3997
|
-
onUnhandledEvent: (
|
|
3998
|
-
console.warn("[ChatSessionProvider] Unhandled event:",
|
|
3998
|
+
onUnhandledEvent: (K) => {
|
|
3999
|
+
console.warn("[ChatSessionProvider] Unhandled event:", K.type);
|
|
3999
4000
|
},
|
|
4000
4001
|
onAuthError: i
|
|
4001
4002
|
}), st = ge(
|
|
4002
|
-
async (
|
|
4003
|
+
async (K) => {
|
|
4003
4004
|
try {
|
|
4004
|
-
const N = await l.createThread(
|
|
4005
|
+
const N = await l.createThread(K);
|
|
4005
4006
|
return x(N.threadId), await Oe(), N.threadId;
|
|
4006
4007
|
} catch (N) {
|
|
4007
4008
|
return s == null || s(String(N)), null;
|
|
@@ -4009,37 +4010,37 @@ function Xx({
|
|
|
4009
4010
|
},
|
|
4010
4011
|
[l, Oe, s]
|
|
4011
4012
|
), at = ge(
|
|
4012
|
-
async (
|
|
4013
|
+
async (K) => {
|
|
4013
4014
|
const N = f;
|
|
4014
|
-
p((ne) => ne.filter((fe) => fe.threadId !==
|
|
4015
|
+
p((ne) => ne.filter((fe) => fe.threadId !== K));
|
|
4015
4016
|
const X = new AbortController();
|
|
4016
|
-
He.current.set(
|
|
4017
|
+
He.current.set(K, X);
|
|
4017
4018
|
try {
|
|
4018
|
-
await l.deleteThread(
|
|
4019
|
+
await l.deleteThread(K), z.current === K && (x(null), R([], {})), console.log("[ChatSessionProvider] Thread deleted successfully:", K);
|
|
4019
4020
|
} catch (ne) {
|
|
4020
|
-
console.error("[ChatSessionProvider] Delete failed, restoring thread:",
|
|
4021
|
+
console.error("[ChatSessionProvider] Delete failed, restoring thread:", K, ne), p(N), s == null || s(`Failed to delete thread: ${String(ne)}`);
|
|
4021
4022
|
} finally {
|
|
4022
|
-
He.current.delete(
|
|
4023
|
+
He.current.delete(K);
|
|
4023
4024
|
}
|
|
4024
4025
|
},
|
|
4025
4026
|
[f, l, R, s]
|
|
4026
4027
|
), _t = ge(
|
|
4027
|
-
async (
|
|
4028
|
+
async (K, N) => {
|
|
4028
4029
|
try {
|
|
4029
|
-
await l.updateThread(
|
|
4030
|
+
await l.updateThread(K, N), await Oe();
|
|
4030
4031
|
} catch (X) {
|
|
4031
4032
|
s == null || s(String(X));
|
|
4032
4033
|
}
|
|
4033
4034
|
},
|
|
4034
4035
|
[l, Oe, s]
|
|
4035
4036
|
), vt = ge(
|
|
4036
|
-
async (
|
|
4037
|
-
if (!
|
|
4038
|
-
const X = `${
|
|
4037
|
+
async (K, N) => {
|
|
4038
|
+
if (!K) return;
|
|
4039
|
+
const X = `${K}:${N ?? "latest"}`, ne = Ne.current.get(X);
|
|
4039
4040
|
if (ne)
|
|
4040
4041
|
return ne;
|
|
4041
4042
|
const fe = (async () => {
|
|
4042
|
-
const Re =
|
|
4043
|
+
const Re = K;
|
|
4043
4044
|
T(!0), C(null);
|
|
4044
4045
|
try {
|
|
4045
4046
|
const be = await l.getStateHistory({
|
|
@@ -4070,16 +4071,16 @@ function Xx({
|
|
|
4070
4071
|
} finally {
|
|
4071
4072
|
Ne.current.delete(X);
|
|
4072
4073
|
}
|
|
4073
|
-
return z.current ===
|
|
4074
|
+
return z.current === K && (re.current = X), fe;
|
|
4074
4075
|
},
|
|
4075
4076
|
[l, R, s]
|
|
4076
4077
|
), gt = ge(
|
|
4077
|
-
async (
|
|
4078
|
-
J.current =
|
|
4078
|
+
async (K, N) => {
|
|
4079
|
+
J.current = K;
|
|
4079
4080
|
try {
|
|
4080
|
-
await vt(
|
|
4081
|
+
await vt(K, N);
|
|
4081
4082
|
} finally {
|
|
4082
|
-
J.current ===
|
|
4083
|
+
J.current === K && (J.current = null);
|
|
4083
4084
|
}
|
|
4084
4085
|
},
|
|
4085
4086
|
[vt]
|
|
@@ -4091,7 +4092,7 @@ function Xx({
|
|
|
4091
4092
|
D.current = null, Y.current = h;
|
|
4092
4093
|
return;
|
|
4093
4094
|
}
|
|
4094
|
-
if (
|
|
4095
|
+
if (V.current === h) {
|
|
4095
4096
|
Y.current = h;
|
|
4096
4097
|
return;
|
|
4097
4098
|
}
|
|
@@ -4102,9 +4103,9 @@ function Xx({
|
|
|
4102
4103
|
if (Y.current === h)
|
|
4103
4104
|
return;
|
|
4104
4105
|
Y.current = h;
|
|
4105
|
-
const
|
|
4106
|
+
const K = !ae.current && !!n && h === t;
|
|
4106
4107
|
let N;
|
|
4107
|
-
|
|
4108
|
+
K && n ? (N = n, ae.current = !0, console.log(
|
|
4108
4109
|
"[ChatSessionProvider] Loading thread with checkpoint:",
|
|
4109
4110
|
N,
|
|
4110
4111
|
r ? `(ns: ${r})` : ""
|
|
@@ -4122,7 +4123,7 @@ function Xx({
|
|
|
4122
4123
|
gt
|
|
4123
4124
|
]);
|
|
4124
4125
|
const bt = ge(
|
|
4125
|
-
async (
|
|
4126
|
+
async (K, N) => {
|
|
4126
4127
|
const X = z.current;
|
|
4127
4128
|
if (!X) return;
|
|
4128
4129
|
const ne = X;
|
|
@@ -4130,7 +4131,7 @@ function Xx({
|
|
|
4130
4131
|
try {
|
|
4131
4132
|
const fe = await l.getStateHistory({
|
|
4132
4133
|
threadId: ne,
|
|
4133
|
-
checkpointId:
|
|
4134
|
+
checkpointId: K,
|
|
4134
4135
|
checkpointNs: N ?? void 0
|
|
4135
4136
|
});
|
|
4136
4137
|
if (z.current !== ne) {
|
|
@@ -4138,10 +4139,10 @@ function Xx({
|
|
|
4138
4139
|
return;
|
|
4139
4140
|
}
|
|
4140
4141
|
const { checkpoints: Re, timeline: be } = hr(fe), ze = Re.find(
|
|
4141
|
-
(Me) => Me.checkpointId ===
|
|
4142
|
+
(Me) => Me.checkpointId === K && (N ? Me.checkpointNs === N : !0)
|
|
4142
4143
|
);
|
|
4143
4144
|
if (!ze) {
|
|
4144
|
-
console.warn("[ChatSessionProvider] Requested checkpoint not found:", { checkpointId:
|
|
4145
|
+
console.warn("[ChatSessionProvider] Requested checkpoint not found:", { checkpointId: K, checkpointNs: N });
|
|
4145
4146
|
return;
|
|
4146
4147
|
}
|
|
4147
4148
|
G(be), A(Re), R(ze.messages ?? [], {
|
|
@@ -4156,9 +4157,9 @@ function Xx({
|
|
|
4156
4157
|
},
|
|
4157
4158
|
[l, R, s]
|
|
4158
4159
|
), Tt = ge(
|
|
4159
|
-
(
|
|
4160
|
+
(K, N) => {
|
|
4160
4161
|
R(I.messages, {
|
|
4161
|
-
checkpointId:
|
|
4162
|
+
checkpointId: K ?? null,
|
|
4162
4163
|
checkpointNs: N ?? null
|
|
4163
4164
|
});
|
|
4164
4165
|
},
|
|
@@ -4167,14 +4168,14 @@ function Xx({
|
|
|
4167
4168
|
z.current && await gt(z.current);
|
|
4168
4169
|
}, [gt]), jt = ge(async () => {
|
|
4169
4170
|
if (!z.current || !j) return;
|
|
4170
|
-
const
|
|
4171
|
+
const K = z.current;
|
|
4171
4172
|
F(!0);
|
|
4172
4173
|
try {
|
|
4173
4174
|
const N = await l.getStateHistory({
|
|
4174
|
-
threadId:
|
|
4175
|
+
threadId: K,
|
|
4175
4176
|
checkpointId: j
|
|
4176
4177
|
});
|
|
4177
|
-
if (z.current !==
|
|
4178
|
+
if (z.current !== K)
|
|
4178
4179
|
return;
|
|
4179
4180
|
const { checkpoints: X } = hr(N);
|
|
4180
4181
|
if (X.length > 0) {
|
|
@@ -4182,7 +4183,7 @@ function Xx({
|
|
|
4182
4183
|
_((ne == null ? void 0 : ne.messages) ?? []), $(!!(ne != null && ne.nextCursor)), Z((ne == null ? void 0 : ne.nextCursor) ?? null);
|
|
4183
4184
|
}
|
|
4184
4185
|
} catch (N) {
|
|
4185
|
-
z.current ===
|
|
4186
|
+
z.current === K && (s == null || s(String(N)));
|
|
4186
4187
|
} finally {
|
|
4187
4188
|
F(!1);
|
|
4188
4189
|
}
|
|
@@ -4190,11 +4191,11 @@ function Xx({
|
|
|
4190
4191
|
R([], {}), x(null), ie(), A([]), G([]), $(!1), Z(null), T(!1), ve(!1), F(!1), C(null);
|
|
4191
4192
|
try {
|
|
4192
4193
|
await l.getAgent("default");
|
|
4193
|
-
} catch (
|
|
4194
|
-
console.warn("[ChatSessionProvider] Failed to refetch agent after clearing thread:",
|
|
4194
|
+
} catch (K) {
|
|
4195
|
+
console.warn("[ChatSessionProvider] Failed to refetch agent after clearing thread:", K);
|
|
4195
4196
|
}
|
|
4196
4197
|
}, [R, ie, l]), Rt = ge(
|
|
4197
|
-
async (
|
|
4198
|
+
async (K, N, X) => {
|
|
4198
4199
|
const ne = z.current;
|
|
4199
4200
|
if (!ne)
|
|
4200
4201
|
throw new Error("No active thread to handle interrupt");
|
|
@@ -4209,7 +4210,7 @@ function Xx({
|
|
|
4209
4210
|
};
|
|
4210
4211
|
Xe(Re);
|
|
4211
4212
|
} catch (Re) {
|
|
4212
|
-
throw console.error(`[ChatSessionProvider] Failed to handle interrupt ${
|
|
4213
|
+
throw console.error(`[ChatSessionProvider] Failed to handle interrupt ${K}:`, Re), Re;
|
|
4213
4214
|
}
|
|
4214
4215
|
},
|
|
4215
4216
|
[I.lastCheckpointId, I.lastCheckpointNs, Xe]
|
|
@@ -4220,9 +4221,9 @@ function Xx({
|
|
|
4220
4221
|
a == null || a(h);
|
|
4221
4222
|
}, [h, a]);
|
|
4222
4223
|
const pn = ge(
|
|
4223
|
-
async (
|
|
4224
|
+
async (K, N) => {
|
|
4224
4225
|
let X = z.current;
|
|
4225
|
-
const ne = (
|
|
4226
|
+
const ne = (K == null ? void 0 : K.text) ?? "", fe = (K == null ? void 0 : K.attachments) ?? [], Re = (ne == null ? void 0 : ne.trim()) ?? "", be = { ...(K == null ? void 0 : K.payload) ?? {} }, ze = Array.isArray(be.messages) ? be.messages : void 0;
|
|
4226
4227
|
ze && delete be.messages;
|
|
4227
4228
|
const Me = !!(ze && ze.length);
|
|
4228
4229
|
if (!X && !Re && fe.length === 0 && !Me) return;
|
|
@@ -4238,30 +4239,30 @@ function Xx({
|
|
|
4238
4239
|
fe
|
|
4239
4240
|
), Tn = [...Ee];
|
|
4240
4241
|
Re && Tn.push({ type: "text", text: ne });
|
|
4241
|
-
const
|
|
4242
|
-
let
|
|
4243
|
-
Pr && (
|
|
4244
|
-
id:
|
|
4242
|
+
const Vn = N == null ? void 0 : N.originalMessageId, ur = !!(N != null && N.edit && Vn), Pr = !Me && Tn.length > 0;
|
|
4243
|
+
let _n = null;
|
|
4244
|
+
Pr && (_n = {
|
|
4245
|
+
id: ur ? Vn : `msg-${Date.now()}`,
|
|
4245
4246
|
role: "user",
|
|
4246
4247
|
content: Tn,
|
|
4247
4248
|
createdAt: (/* @__PURE__ */ new Date()).toISOString()
|
|
4248
|
-
},
|
|
4249
|
-
const
|
|
4249
|
+
}, ur || L(_n));
|
|
4250
|
+
const Kn = Me ? ze : _n ? [_n] : [], k = {
|
|
4250
4251
|
...be,
|
|
4251
4252
|
...Wt.length ? { files_info: Wt } : {}
|
|
4252
4253
|
};
|
|
4253
|
-
|
|
4254
|
+
Kn.length ? k.messages = Kn : "messages" in k || (k.messages = []);
|
|
4254
4255
|
const H = {
|
|
4255
4256
|
threadId: X,
|
|
4256
4257
|
payload: k,
|
|
4257
4258
|
checkpointId: (N == null ? void 0 : N.checkpointId) ?? I.lastCheckpointId ?? void 0,
|
|
4258
4259
|
checkpointNs: (N == null ? void 0 : N.checkpointNs) ?? I.lastCheckpointNs ?? void 0,
|
|
4259
4260
|
edit: !!(N != null && N.edit),
|
|
4260
|
-
|
|
4261
|
+
timelineCheckpoints: W
|
|
4261
4262
|
};
|
|
4262
4263
|
Xe(H);
|
|
4263
4264
|
},
|
|
4264
|
-
[l, L, I, Xe]
|
|
4265
|
+
[l, L, I, Xe, W]
|
|
4265
4266
|
), Qe = De(
|
|
4266
4267
|
() => ({
|
|
4267
4268
|
threads: f,
|
|
@@ -4278,8 +4279,8 @@ function Xx({
|
|
|
4278
4279
|
}),
|
|
4279
4280
|
[f, h, m, g, st, at, _t, Oe]
|
|
4280
4281
|
), et = De(() => {
|
|
4281
|
-
const
|
|
4282
|
-
return
|
|
4282
|
+
const K = I.assemblingId ?? null;
|
|
4283
|
+
return K ? { assemblingMessageId: K } : null;
|
|
4283
4284
|
}, [I.assemblingId]), pt = De(
|
|
4284
4285
|
() => ({
|
|
4285
4286
|
threadId: h,
|
|
@@ -4290,7 +4291,7 @@ function Xx({
|
|
|
4290
4291
|
namespace: I.lastCheckpointNs ?? null
|
|
4291
4292
|
},
|
|
4292
4293
|
checkpoints: B,
|
|
4293
|
-
timelineCheckpoints:
|
|
4294
|
+
timelineCheckpoints: W,
|
|
4294
4295
|
metadata: et,
|
|
4295
4296
|
isLoading: b,
|
|
4296
4297
|
isHistoryLoading: E,
|
|
@@ -4311,7 +4312,7 @@ function Xx({
|
|
|
4311
4312
|
h,
|
|
4312
4313
|
I,
|
|
4313
4314
|
B,
|
|
4314
|
-
|
|
4315
|
+
W,
|
|
4315
4316
|
b,
|
|
4316
4317
|
E,
|
|
4317
4318
|
oe,
|
|
@@ -4479,7 +4480,7 @@ function Qx({
|
|
|
4479
4480
|
id: Z,
|
|
4480
4481
|
shouldClear: !0
|
|
4481
4482
|
}, b(() => {
|
|
4482
|
-
var B, A,
|
|
4483
|
+
var B, A, W;
|
|
4483
4484
|
try {
|
|
4484
4485
|
const G = l(j);
|
|
4485
4486
|
G && typeof G.then == "function" ? G.then(() => {
|
|
@@ -4490,7 +4491,7 @@ function Qx({
|
|
|
4490
4491
|
((oe = C.current) == null ? void 0 : oe.id) === Z && (C.current = null);
|
|
4491
4492
|
}) : (((B = C.current) == null ? void 0 : B.id) === Z && C.current.shouldClear && (x || (y(""), T.current && (T.current.style.height = "auto"), a == null || a(""))), ((A = C.current) == null ? void 0 : A.id) === Z && (C.current = null));
|
|
4492
4493
|
} catch {
|
|
4493
|
-
((
|
|
4494
|
+
((W = C.current) == null ? void 0 : W.id) === Z && (C.current = null);
|
|
4494
4495
|
}
|
|
4495
4496
|
});
|
|
4496
4497
|
},
|
|
@@ -4934,15 +4935,15 @@ var ii = "focusScope.autoFocusOnMount", ai = "focusScope.autoFocusOnUnmount", $l
|
|
|
4934
4935
|
let m = function(b) {
|
|
4935
4936
|
if (h.paused || !a) return;
|
|
4936
4937
|
const T = b.target;
|
|
4937
|
-
a.contains(T) ? f.current = T :
|
|
4938
|
+
a.contains(T) ? f.current = T : Pn(f.current, { select: !0 });
|
|
4938
4939
|
}, y = function(b) {
|
|
4939
4940
|
if (h.paused || !a) return;
|
|
4940
4941
|
const T = b.relatedTarget;
|
|
4941
|
-
T !== null && (a.contains(T) ||
|
|
4942
|
+
T !== null && (a.contains(T) || Pn(f.current, { select: !0 }));
|
|
4942
4943
|
}, g = function(b) {
|
|
4943
4944
|
if (document.activeElement === document.body)
|
|
4944
4945
|
for (const S of b)
|
|
4945
|
-
S.removedNodes.length > 0 &&
|
|
4946
|
+
S.removedNodes.length > 0 && Pn(a);
|
|
4946
4947
|
};
|
|
4947
4948
|
document.addEventListener("focusin", m), document.addEventListener("focusout", y);
|
|
4948
4949
|
const w = new MutationObserver(g);
|
|
@@ -4956,12 +4957,12 @@ var ii = "focusScope.autoFocusOnMount", ai = "focusScope.autoFocusOnUnmount", $l
|
|
|
4956
4957
|
const m = document.activeElement;
|
|
4957
4958
|
if (!a.contains(m)) {
|
|
4958
4959
|
const g = new CustomEvent(ii, $l);
|
|
4959
|
-
a.addEventListener(ii, c), a.dispatchEvent(g), g.defaultPrevented || (xy(Sy(Ru(a)), { select: !0 }), document.activeElement === m &&
|
|
4960
|
+
a.addEventListener(ii, c), a.dispatchEvent(g), g.defaultPrevented || (xy(Sy(Ru(a)), { select: !0 }), document.activeElement === m && Pn(a));
|
|
4960
4961
|
}
|
|
4961
4962
|
return () => {
|
|
4962
4963
|
a.removeEventListener(ii, c), setTimeout(() => {
|
|
4963
4964
|
const g = new CustomEvent(ai, $l);
|
|
4964
|
-
a.addEventListener(ai, d), a.dispatchEvent(g), g.defaultPrevented ||
|
|
4965
|
+
a.addEventListener(ai, d), a.dispatchEvent(g), g.defaultPrevented || Pn(m ?? document.body, { select: !0 }), a.removeEventListener(ai, d), Bl.remove(h);
|
|
4965
4966
|
}, 0);
|
|
4966
4967
|
};
|
|
4967
4968
|
}
|
|
@@ -4972,7 +4973,7 @@ var ii = "focusScope.autoFocusOnMount", ai = "focusScope.autoFocusOnUnmount", $l
|
|
|
4972
4973
|
const y = m.key === "Tab" && !m.altKey && !m.ctrlKey && !m.metaKey, g = document.activeElement;
|
|
4973
4974
|
if (y && g) {
|
|
4974
4975
|
const w = m.currentTarget, [b, T] = yy(w);
|
|
4975
|
-
b && T ? !m.shiftKey && g === T ? (m.preventDefault(), n &&
|
|
4976
|
+
b && T ? !m.shiftKey && g === T ? (m.preventDefault(), n && Pn(b, { select: !0 })) : m.shiftKey && g === b && (m.preventDefault(), n && Pn(T, { select: !0 })) : g === w && m.preventDefault();
|
|
4976
4977
|
}
|
|
4977
4978
|
},
|
|
4978
4979
|
[n, r, h.paused]
|
|
@@ -4983,7 +4984,7 @@ Ts.displayName = gy;
|
|
|
4983
4984
|
function xy(e, { select: t = !1 } = {}) {
|
|
4984
4985
|
const n = document.activeElement;
|
|
4985
4986
|
for (const r of e)
|
|
4986
|
-
if (
|
|
4987
|
+
if (Pn(r, { select: t }), document.activeElement !== n) return;
|
|
4987
4988
|
}
|
|
4988
4989
|
function yy(e) {
|
|
4989
4990
|
const t = Ru(e), n = Fl(t, e), r = Fl(t.reverse(), e);
|
|
@@ -5015,7 +5016,7 @@ function vy(e, { upTo: t }) {
|
|
|
5015
5016
|
function wy(e) {
|
|
5016
5017
|
return e instanceof HTMLInputElement && "select" in e;
|
|
5017
5018
|
}
|
|
5018
|
-
function
|
|
5019
|
+
function Pn(e, { select: t = !1 } = {}) {
|
|
5019
5020
|
if (e && e.focus) {
|
|
5020
5021
|
const n = document.activeElement;
|
|
5021
5022
|
e.focus({ preventScroll: !0 }), e !== n && wy(e) && t && e.select();
|
|
@@ -5050,7 +5051,7 @@ function kn(e) {
|
|
|
5050
5051
|
n((r) => r ?? String(Ty++));
|
|
5051
5052
|
}, [e]), t ? `radix-${t}` : "";
|
|
5052
5053
|
}
|
|
5053
|
-
const Iy = ["top", "right", "bottom", "left"],
|
|
5054
|
+
const Iy = ["top", "right", "bottom", "left"], On = Math.min, Vt = Math.max, Go = Math.round, bo = Math.floor, vn = (e) => ({
|
|
5054
5055
|
x: e,
|
|
5055
5056
|
y: e
|
|
5056
5057
|
}), ky = {
|
|
@@ -5063,7 +5064,7 @@ const Iy = ["top", "right", "bottom", "left"], Dn = Math.min, Vt = Math.max, Go
|
|
|
5063
5064
|
end: "start"
|
|
5064
5065
|
};
|
|
5065
5066
|
function Mi(e, t, n) {
|
|
5066
|
-
return Vt(e,
|
|
5067
|
+
return Vt(e, On(t, n));
|
|
5067
5068
|
}
|
|
5068
5069
|
function En(e, t) {
|
|
5069
5070
|
return typeof e == "function" ? e(t) : e;
|
|
@@ -5334,7 +5335,7 @@ const Ly = (e) => ({
|
|
|
5334
5335
|
}, h = ga(o), x = ma(h), m = await i.getDimensions(c), y = h === "y", g = y ? "top" : "left", w = y ? "bottom" : "right", b = y ? "clientHeight" : "clientWidth", T = s.reference[x] + s.reference[h] - p[h] - s.floating[x], S = p[h] - s.reference[h], C = await (i.getOffsetParent == null ? void 0 : i.getOffsetParent(c));
|
|
5335
5336
|
let I = C ? C[b] : 0;
|
|
5336
5337
|
(!I || !await (i.isElement == null ? void 0 : i.isElement(C))) && (I = a.floating[b] || s.floating[x]);
|
|
5337
|
-
const R = T / 2 - S / 2, _ = I / 2 - m[x] / 2 - 1, L =
|
|
5338
|
+
const R = T / 2 - S / 2, _ = I / 2 - m[x] / 2 - 1, L = On(f[g], _), P = On(f[w], _), M = L, $ = I - m[x] - P, E = I / 2 - m[x] / 2 + R, F = Mi(M, E, $), j = !l.arrow && Er(o) != null && E !== F && s.reference[x] / 2 - (E < M ? L : P) - m[x] / 2 < 0, Z = j ? E < M ? E - M : E - $ : 0;
|
|
5338
5339
|
return {
|
|
5339
5340
|
[h]: p[h] + Z,
|
|
5340
5341
|
data: {
|
|
@@ -5410,7 +5411,7 @@ const Ly = (e) => ({
|
|
|
5410
5411
|
A === "y";
|
|
5411
5412
|
}
|
|
5412
5413
|
return !0;
|
|
5413
|
-
}).map((B) => [B.placement, B.overflows.filter((A) => A > 0).reduce((A,
|
|
5414
|
+
}).map((B) => [B.placement, B.overflows.filter((A) => A > 0).reduce((A, W) => A + W, 0)]).sort((B, A) => B[1] - A[1])[0]) == null ? void 0 : $[0];
|
|
5414
5415
|
Z && (j = Z);
|
|
5415
5416
|
break;
|
|
5416
5417
|
}
|
|
@@ -5650,7 +5651,7 @@ const zy = function(e) {
|
|
|
5650
5651
|
} = s.floating;
|
|
5651
5652
|
let y, g;
|
|
5652
5653
|
f === "top" || f === "bottom" ? (y = f, g = p === (await (i.isRTL == null ? void 0 : i.isRTL(a.floating)) ? "start" : "end") ? "left" : "right") : (g = f, y = p === "end" ? "top" : "bottom");
|
|
5653
|
-
const w = m - d.top - d.bottom, b = x - d.left - d.right, T =
|
|
5654
|
+
const w = m - d.top - d.bottom, b = x - d.left - d.right, T = On(m - d[y], w), S = On(x - d[g], b), C = !t.middlewareData.shift;
|
|
5654
5655
|
let I = T, R = S;
|
|
5655
5656
|
if ((n = t.middlewareData.shift) != null && n.enabled.x && (R = b), (r = t.middlewareData.shift) != null && r.enabled.y && (I = w), C && !p) {
|
|
5656
5657
|
const L = Vt(d.left, 0), P = Vt(d.right, 0), M = Vt(d.top, 0), $ = Vt(d.bottom, 0);
|
|
@@ -5726,13 +5727,13 @@ function xa(e) {
|
|
|
5726
5727
|
return Yy.some((r) => n[r] ? n[r] !== "none" : !1) || (n.containerType ? n.containerType !== "normal" : !1) || !t && (n.backdropFilter ? n.backdropFilter !== "none" : !1) || !t && (n.filter ? n.filter !== "none" : !1) || Xy.some((r) => (n.willChange || "").includes(r)) || Jy.some((r) => (n.contain || "").includes(r));
|
|
5727
5728
|
}
|
|
5728
5729
|
function Zy(e) {
|
|
5729
|
-
let t =
|
|
5730
|
+
let t = Dn(e);
|
|
5730
5731
|
for (; wn(t) && !Tr(t); ) {
|
|
5731
5732
|
if (xa(t))
|
|
5732
5733
|
return t;
|
|
5733
5734
|
if (ks(t))
|
|
5734
5735
|
return null;
|
|
5735
|
-
t =
|
|
5736
|
+
t = Dn(t);
|
|
5736
5737
|
}
|
|
5737
5738
|
return null;
|
|
5738
5739
|
}
|
|
@@ -5755,7 +5756,7 @@ function Rs(e) {
|
|
|
5755
5756
|
scrollTop: e.scrollY
|
|
5756
5757
|
};
|
|
5757
5758
|
}
|
|
5758
|
-
function
|
|
5759
|
+
function Dn(e) {
|
|
5759
5760
|
if (Ar(e) === "html")
|
|
5760
5761
|
return e;
|
|
5761
5762
|
const t = (
|
|
@@ -5768,7 +5769,7 @@ function Ln(e) {
|
|
|
5768
5769
|
return ql(t) ? t.host : t;
|
|
5769
5770
|
}
|
|
5770
5771
|
function _u(e) {
|
|
5771
|
-
const t =
|
|
5772
|
+
const t = Dn(e);
|
|
5772
5773
|
return Tr(t) ? e.ownerDocument ? e.ownerDocument.body : e.body : wn(t) && uo(t) ? t : _u(t);
|
|
5773
5774
|
}
|
|
5774
5775
|
function Yr(e, t, n) {
|
|
@@ -5823,7 +5824,7 @@ function Pu(e) {
|
|
|
5823
5824
|
function tv(e, t, n) {
|
|
5824
5825
|
return t === void 0 && (t = !1), !n || t && n !== qt(e) ? !1 : t;
|
|
5825
5826
|
}
|
|
5826
|
-
function
|
|
5827
|
+
function er(e, t, n, r) {
|
|
5827
5828
|
t === void 0 && (t = !1), n === void 0 && (n = !1);
|
|
5828
5829
|
const o = e.getBoundingClientRect(), s = va(e);
|
|
5829
5830
|
let i = vn(1);
|
|
@@ -5847,7 +5848,7 @@ function tr(e, t, n, r) {
|
|
|
5847
5848
|
}
|
|
5848
5849
|
function Es(e, t) {
|
|
5849
5850
|
const n = Rs(e).scrollLeft;
|
|
5850
|
-
return t ? t.left + n :
|
|
5851
|
+
return t ? t.left + n : er(bn(e)).left + n;
|
|
5851
5852
|
}
|
|
5852
5853
|
function Mu(e, t) {
|
|
5853
5854
|
const n = e.getBoundingClientRect(), r = n.left + t.scrollLeft - Es(e, n), o = n.top + t.scrollTop;
|
|
@@ -5872,7 +5873,7 @@ function nv(e) {
|
|
|
5872
5873
|
}, c = vn(1);
|
|
5873
5874
|
const d = vn(0), f = wn(r);
|
|
5874
5875
|
if ((f || !f && !s) && ((Ar(r) !== "body" || uo(i)) && (l = Rs(r)), wn(r))) {
|
|
5875
|
-
const h =
|
|
5876
|
+
const h = er(r);
|
|
5876
5877
|
c = xr(r), d.x = h.x + r.clientLeft, d.y = h.y + r.clientTop;
|
|
5877
5878
|
}
|
|
5878
5879
|
const p = i && !f && !s ? Mu(i, l) : vn(0);
|
|
@@ -5920,7 +5921,7 @@ function sv(e, t) {
|
|
|
5920
5921
|
}
|
|
5921
5922
|
const iv = /* @__PURE__ */ new Set(["absolute", "fixed"]);
|
|
5922
5923
|
function av(e, t) {
|
|
5923
|
-
const n =
|
|
5924
|
+
const n = er(e, !0, t === "fixed"), r = n.top + e.clientTop, o = n.left + e.clientLeft, s = wn(e) ? xr(e) : vn(1), i = e.clientWidth * s.x, a = e.clientHeight * s.y, l = o * s.x, c = r * s.y;
|
|
5924
5925
|
return {
|
|
5925
5926
|
width: i,
|
|
5926
5927
|
height: a,
|
|
@@ -5948,7 +5949,7 @@ function Yl(e, t, n) {
|
|
|
5948
5949
|
return Xo(r);
|
|
5949
5950
|
}
|
|
5950
5951
|
function Ou(e, t) {
|
|
5951
|
-
const n =
|
|
5952
|
+
const n = Dn(e);
|
|
5952
5953
|
return n === t || !ln(n) || Tr(n) ? !1 : cn(n).position === "fixed" || Ou(n, t);
|
|
5953
5954
|
}
|
|
5954
5955
|
function lv(e, t) {
|
|
@@ -5957,10 +5958,10 @@ function lv(e, t) {
|
|
|
5957
5958
|
return n;
|
|
5958
5959
|
let r = Yr(e, [], !1).filter((a) => ln(a) && Ar(a) !== "body"), o = null;
|
|
5959
5960
|
const s = cn(e).position === "fixed";
|
|
5960
|
-
let i = s ?
|
|
5961
|
+
let i = s ? Dn(e) : e;
|
|
5961
5962
|
for (; ln(i) && !Tr(i); ) {
|
|
5962
5963
|
const a = cn(i), l = xa(i);
|
|
5963
|
-
!l && a.position === "fixed" && (o = null), (s ? !l && !o : !l && a.position === "static" && !!o && iv.has(o.position) || uo(i) && !l && Ou(e, i)) ? r = r.filter((d) => d !== i) : o = a, i =
|
|
5964
|
+
!l && a.position === "fixed" && (o = null), (s ? !l && !o : !l && a.position === "static" && !!o && iv.has(o.position) || uo(i) && !l && Ou(e, i)) ? r = r.filter((d) => d !== i) : o = a, i = Dn(i);
|
|
5964
5965
|
}
|
|
5965
5966
|
return t.set(e, r), r;
|
|
5966
5967
|
}
|
|
@@ -5973,7 +5974,7 @@ function cv(e) {
|
|
|
5973
5974
|
} = e;
|
|
5974
5975
|
const i = [...n === "clippingAncestors" ? ks(t) ? [] : lv(t, this._c) : [].concat(n), r], a = i[0], l = i.reduce((c, d) => {
|
|
5975
5976
|
const f = Yl(t, d, o);
|
|
5976
|
-
return c.top = Vt(f.top, c.top), c.right =
|
|
5977
|
+
return c.top = Vt(f.top, c.top), c.right = On(f.right, c.right), c.bottom = On(f.bottom, c.bottom), c.left = Vt(f.left, c.left), c;
|
|
5977
5978
|
}, Yl(t, a, o));
|
|
5978
5979
|
return {
|
|
5979
5980
|
width: l.right - l.left,
|
|
@@ -5993,7 +5994,7 @@ function uv(e) {
|
|
|
5993
5994
|
};
|
|
5994
5995
|
}
|
|
5995
5996
|
function dv(e, t, n) {
|
|
5996
|
-
const r = wn(t), o = bn(t), s = n === "fixed", i =
|
|
5997
|
+
const r = wn(t), o = bn(t), s = n === "fixed", i = er(e, !0, s, t);
|
|
5997
5998
|
let a = {
|
|
5998
5999
|
scrollLeft: 0,
|
|
5999
6000
|
scrollTop: 0
|
|
@@ -6004,7 +6005,7 @@ function dv(e, t, n) {
|
|
|
6004
6005
|
}
|
|
6005
6006
|
if (r || !r && !s)
|
|
6006
6007
|
if ((Ar(t) !== "body" || uo(o)) && (a = Rs(t)), r) {
|
|
6007
|
-
const h =
|
|
6008
|
+
const h = er(t, !0, s, t);
|
|
6008
6009
|
l.x = h.x + t.clientLeft, l.y = h.y + t.clientTop;
|
|
6009
6010
|
} else o && c();
|
|
6010
6011
|
s && !r && o && c();
|
|
@@ -6032,11 +6033,11 @@ function Du(e, t) {
|
|
|
6032
6033
|
if (ks(e))
|
|
6033
6034
|
return n;
|
|
6034
6035
|
if (!wn(e)) {
|
|
6035
|
-
let o =
|
|
6036
|
+
let o = Dn(e);
|
|
6036
6037
|
for (; o && !Tr(o); ) {
|
|
6037
6038
|
if (ln(o) && !li(o))
|
|
6038
6039
|
return o;
|
|
6039
|
-
o =
|
|
6040
|
+
o = Dn(o);
|
|
6040
6041
|
}
|
|
6041
6042
|
return n;
|
|
6042
6043
|
}
|
|
@@ -6094,7 +6095,7 @@ function mv(e, t) {
|
|
|
6094
6095
|
return;
|
|
6095
6096
|
const x = bo(f), m = bo(o.clientWidth - (d + p)), y = bo(o.clientHeight - (f + h)), g = bo(d), b = {
|
|
6096
6097
|
rootMargin: -x + "px " + -m + "px " + -y + "px " + -g + "px",
|
|
6097
|
-
threshold: Vt(0,
|
|
6098
|
+
threshold: Vt(0, On(1, l)) || 1
|
|
6098
6099
|
};
|
|
6099
6100
|
let T = !0;
|
|
6100
6101
|
function S(C) {
|
|
@@ -6144,10 +6145,10 @@ function gv(e, t, n, r) {
|
|
|
6144
6145
|
(b = h) == null || b.observe(t);
|
|
6145
6146
|
})), n();
|
|
6146
6147
|
}), c && !l && h.observe(c), h.observe(t));
|
|
6147
|
-
let x, m = l ?
|
|
6148
|
+
let x, m = l ? er(e) : null;
|
|
6148
6149
|
l && y();
|
|
6149
6150
|
function y() {
|
|
6150
|
-
const g =
|
|
6151
|
+
const g = er(e);
|
|
6151
6152
|
m && !Lu(m, g) && n(), m = g, x = requestAnimationFrame(y);
|
|
6152
6153
|
}
|
|
6153
6154
|
return n(), () => {
|
|
@@ -6251,7 +6252,7 @@ function kv(e) {
|
|
|
6251
6252
|
middleware: p
|
|
6252
6253
|
};
|
|
6253
6254
|
P.current && (B.platform = P.current), Cv(C.current, I.current, B).then((A) => {
|
|
6254
|
-
const
|
|
6255
|
+
const W = {
|
|
6255
6256
|
...A,
|
|
6256
6257
|
// The floating element's position may be recomputed while it's closed
|
|
6257
6258
|
// but still mounted (such as when transitioning out). To ensure
|
|
@@ -6259,8 +6260,8 @@ function kv(e) {
|
|
|
6259
6260
|
// setting it to `true` when `open === false` (must be specified).
|
|
6260
6261
|
isPositioned: M.current !== !1
|
|
6261
6262
|
};
|
|
6262
|
-
E.current && !Jo(R.current,
|
|
6263
|
-
f(
|
|
6263
|
+
E.current && !Jo(R.current, W) && (R.current = W, gs.flushSync(() => {
|
|
6264
|
+
f(W);
|
|
6264
6265
|
}));
|
|
6265
6266
|
});
|
|
6266
6267
|
}, [p, t, n, P, M]);
|
|
@@ -6296,17 +6297,17 @@ function kv(e) {
|
|
|
6296
6297
|
};
|
|
6297
6298
|
if (!j.floating)
|
|
6298
6299
|
return B;
|
|
6299
|
-
const A = Zl(j.floating, d.x),
|
|
6300
|
+
const A = Zl(j.floating, d.x), W = Zl(j.floating, d.y);
|
|
6300
6301
|
return a ? {
|
|
6301
6302
|
...B,
|
|
6302
|
-
transform: "translate(" + A + "px, " +
|
|
6303
|
+
transform: "translate(" + A + "px, " + W + "px)",
|
|
6303
6304
|
...$u(j.floating) >= 1.5 && {
|
|
6304
6305
|
willChange: "transform"
|
|
6305
6306
|
}
|
|
6306
6307
|
} : {
|
|
6307
6308
|
position: n,
|
|
6308
6309
|
left: A,
|
|
6309
|
-
top:
|
|
6310
|
+
top: W
|
|
6310
6311
|
};
|
|
6311
6312
|
}, [n, a, j.floating, d.x, d.y]);
|
|
6312
6313
|
return v.useMemo(() => ({
|
|
@@ -6416,7 +6417,7 @@ var Wu = "PopperAnchor", Vu = v.forwardRef(
|
|
|
6416
6417
|
Vu.displayName = Wu;
|
|
6417
6418
|
var ba = "PopperContent", [$v, Fv] = zu(ba), Ku = v.forwardRef(
|
|
6418
6419
|
(e, t) => {
|
|
6419
|
-
var Y, D,
|
|
6420
|
+
var Y, D, V, J, ae, re;
|
|
6420
6421
|
const {
|
|
6421
6422
|
__scopePopper: n,
|
|
6422
6423
|
side: r = "bottom",
|
|
@@ -6467,11 +6468,11 @@ var ba = "PopperContent", [$v, Fv] = zu(ba), Ku = v.forwardRef(
|
|
|
6467
6468
|
Hv({ arrowWidth: I, arrowHeight: R }),
|
|
6468
6469
|
p && Pv({ strategy: "referenceHidden", ...$ })
|
|
6469
6470
|
]
|
|
6470
|
-
}), [A,
|
|
6471
|
+
}), [A, W] = Yu(j), G = At(x);
|
|
6471
6472
|
Nt(() => {
|
|
6472
6473
|
Z && (G == null || G());
|
|
6473
6474
|
}, [Z, G]);
|
|
6474
|
-
const oe = (Y = B.arrow) == null ? void 0 : Y.x, ve = (D = B.arrow) == null ? void 0 : D.y, je = ((
|
|
6475
|
+
const oe = (Y = B.arrow) == null ? void 0 : Y.x, ve = (D = B.arrow) == null ? void 0 : D.y, je = ((V = B.arrow) == null ? void 0 : V.centerOffset) !== 0, [q, z] = v.useState();
|
|
6475
6476
|
return Nt(() => {
|
|
6476
6477
|
g && z(window.getComputedStyle(g).zIndex);
|
|
6477
6478
|
}, [g]), /* @__PURE__ */ u.jsx(
|
|
@@ -6511,7 +6512,7 @@ var ba = "PopperContent", [$v, Fv] = zu(ba), Ku = v.forwardRef(
|
|
|
6511
6512
|
Ae.div,
|
|
6512
6513
|
{
|
|
6513
6514
|
"data-side": A,
|
|
6514
|
-
"data-align":
|
|
6515
|
+
"data-align": W,
|
|
6515
6516
|
...m,
|
|
6516
6517
|
ref: b,
|
|
6517
6518
|
style: {
|
|
@@ -7360,11 +7361,11 @@ var Fi = ["Enter", " "], Ww = ["ArrowDown", "PageUp", "Home"], hd = ["ArrowUp",
|
|
|
7360
7361
|
}, qw = {
|
|
7361
7362
|
ltr: ["ArrowLeft"],
|
|
7362
7363
|
rtl: ["ArrowRight"]
|
|
7363
|
-
}, po = "Menu", [Xr, Gw, Yw] = fa(po), [
|
|
7364
|
+
}, po = "Menu", [Xr, Gw, Yw] = fa(po), [sr, md] = Nn(po, [
|
|
7364
7365
|
Yw,
|
|
7365
7366
|
As,
|
|
7366
7367
|
td
|
|
7367
|
-
]), Ps = As(), gd = td(), [Xw,
|
|
7368
|
+
]), Ps = As(), gd = td(), [Xw, ir] = sr(po), [Jw, ho] = sr(po), xd = (e) => {
|
|
7368
7369
|
const { __scopeMenu: t, open: n = !1, children: r, dir: o, onOpenChange: s, modal: i = !0 } = e, a = Ps(t), [l, c] = v.useState(null), d = v.useRef(!1), f = At(s), p = Ss(o);
|
|
7369
7370
|
return v.useEffect(() => {
|
|
7370
7371
|
const h = () => {
|
|
@@ -7403,21 +7404,21 @@ var Zw = "MenuAnchor", Ca = v.forwardRef(
|
|
|
7403
7404
|
}
|
|
7404
7405
|
);
|
|
7405
7406
|
Ca.displayName = Zw;
|
|
7406
|
-
var Ta = "MenuPortal", [Qw, yd] =
|
|
7407
|
+
var Ta = "MenuPortal", [Qw, yd] = sr(Ta, {
|
|
7407
7408
|
forceMount: void 0
|
|
7408
7409
|
}), vd = (e) => {
|
|
7409
|
-
const { __scopeMenu: t, forceMount: n, children: r, container: o } = e, s =
|
|
7410
|
+
const { __scopeMenu: t, forceMount: n, children: r, container: o } = e, s = ir(Ta, t);
|
|
7410
7411
|
return /* @__PURE__ */ u.jsx(Qw, { scope: t, forceMount: n, children: /* @__PURE__ */ u.jsx(nn, { present: n || s.open, children: /* @__PURE__ */ u.jsx(Ns, { asChild: !0, container: o, children: r }) }) });
|
|
7411
7412
|
};
|
|
7412
7413
|
vd.displayName = Ta;
|
|
7413
|
-
var en = "MenuContent", [eb, Ia] =
|
|
7414
|
+
var en = "MenuContent", [eb, Ia] = sr(en), wd = v.forwardRef(
|
|
7414
7415
|
(e, t) => {
|
|
7415
|
-
const n = yd(en, e.__scopeMenu), { forceMount: r = n.forceMount, ...o } = e, s =
|
|
7416
|
+
const n = yd(en, e.__scopeMenu), { forceMount: r = n.forceMount, ...o } = e, s = ir(en, e.__scopeMenu), i = ho(en, e.__scopeMenu);
|
|
7416
7417
|
return /* @__PURE__ */ u.jsx(Xr.Provider, { scope: e.__scopeMenu, children: /* @__PURE__ */ u.jsx(nn, { present: r || s.open, children: /* @__PURE__ */ u.jsx(Xr.Slot, { scope: e.__scopeMenu, children: i.modal ? /* @__PURE__ */ u.jsx(tb, { ...o, ref: t }) : /* @__PURE__ */ u.jsx(nb, { ...o, ref: t }) }) }) });
|
|
7417
7418
|
}
|
|
7418
7419
|
), tb = v.forwardRef(
|
|
7419
7420
|
(e, t) => {
|
|
7420
|
-
const n =
|
|
7421
|
+
const n = ir(en, e.__scopeMenu), r = v.useRef(null), o = Ke(t, r);
|
|
7421
7422
|
return v.useEffect(() => {
|
|
7422
7423
|
const s = r.current;
|
|
7423
7424
|
if (s) return Sa(s);
|
|
@@ -7439,7 +7440,7 @@ var en = "MenuContent", [eb, Ia] = ir(en), wd = v.forwardRef(
|
|
|
7439
7440
|
);
|
|
7440
7441
|
}
|
|
7441
7442
|
), nb = v.forwardRef((e, t) => {
|
|
7442
|
-
const n =
|
|
7443
|
+
const n = ir(en, e.__scopeMenu);
|
|
7443
7444
|
return /* @__PURE__ */ u.jsx(
|
|
7444
7445
|
ka,
|
|
7445
7446
|
{
|
|
@@ -7468,12 +7469,12 @@ var en = "MenuContent", [eb, Ia] = ir(en), wd = v.forwardRef(
|
|
|
7468
7469
|
onDismiss: h,
|
|
7469
7470
|
disableOutsideScroll: x,
|
|
7470
7471
|
...m
|
|
7471
|
-
} = e, y =
|
|
7472
|
+
} = e, y = ir(en, n), g = ho(en, n), w = Ps(n), b = gd(n), T = Gw(n), [S, C] = v.useState(null), I = v.useRef(null), R = Ke(t, I, y.onContentChange), _ = v.useRef(0), L = v.useRef(""), P = v.useRef(0), M = v.useRef(null), $ = v.useRef("right"), E = v.useRef(0), F = x ? js : v.Fragment, j = x ? { as: rb, allowPinchZoom: !0 } : void 0, Z = (A) => {
|
|
7472
7473
|
var Y, D;
|
|
7473
|
-
const
|
|
7474
|
-
(function
|
|
7475
|
-
L.current = J, window.clearTimeout(_.current), J !== "" && (_.current = window.setTimeout(() =>
|
|
7476
|
-
})(
|
|
7474
|
+
const W = L.current + A, G = T().filter((V) => !V.disabled), oe = document.activeElement, ve = (Y = G.find((V) => V.ref.current === oe)) == null ? void 0 : Y.textValue, je = G.map((V) => V.textValue), q = mb(je, W, ve), z = (D = G.find((V) => V.textValue === q)) == null ? void 0 : D.ref.current;
|
|
7475
|
+
(function V(J) {
|
|
7476
|
+
L.current = J, window.clearTimeout(_.current), J !== "" && (_.current = window.setTimeout(() => V(""), 1e3));
|
|
7477
|
+
})(W), z && setTimeout(() => z.focus());
|
|
7477
7478
|
};
|
|
7478
7479
|
v.useEffect(() => () => window.clearTimeout(_.current), []), pa();
|
|
7479
7480
|
const B = v.useCallback((A) => {
|
|
@@ -7493,8 +7494,8 @@ var en = "MenuContent", [eb, Ia] = ir(en), wd = v.forwardRef(
|
|
|
7493
7494
|
),
|
|
7494
7495
|
onItemLeave: v.useCallback(
|
|
7495
7496
|
(A) => {
|
|
7496
|
-
var
|
|
7497
|
-
B(A) || ((
|
|
7497
|
+
var W;
|
|
7498
|
+
B(A) || ((W = I.current) == null || W.focus(), C(null));
|
|
7498
7499
|
},
|
|
7499
7500
|
[B]
|
|
7500
7501
|
),
|
|
@@ -7514,8 +7515,8 @@ var en = "MenuContent", [eb, Ia] = ir(en), wd = v.forwardRef(
|
|
|
7514
7515
|
asChild: !0,
|
|
7515
7516
|
trapped: o,
|
|
7516
7517
|
onMountAutoFocus: ue(s, (A) => {
|
|
7517
|
-
var
|
|
7518
|
-
A.preventDefault(), (
|
|
7518
|
+
var W;
|
|
7519
|
+
A.preventDefault(), (W = I.current) == null || W.focus({ preventScroll: !0 });
|
|
7519
7520
|
}),
|
|
7520
7521
|
onUnmountAutoFocus: i,
|
|
7521
7522
|
children: /* @__PURE__ */ u.jsx(
|
|
@@ -7569,8 +7570,8 @@ var en = "MenuContent", [eb, Ia] = ir(en), wd = v.forwardRef(
|
|
|
7569
7570
|
onPointerMove: ue(
|
|
7570
7571
|
e.onPointerMove,
|
|
7571
7572
|
Jr((A) => {
|
|
7572
|
-
const
|
|
7573
|
-
if (A.currentTarget.contains(
|
|
7573
|
+
const W = A.target, G = E.current !== A.clientX;
|
|
7574
|
+
if (A.currentTarget.contains(W) && G) {
|
|
7574
7575
|
const oe = A.clientX > E.current ? "right" : "left";
|
|
7575
7576
|
$.current = oe, E.current = A.clientX;
|
|
7576
7577
|
}
|
|
@@ -7695,7 +7696,7 @@ var Sd = v.forwardRef(
|
|
|
7695
7696
|
}
|
|
7696
7697
|
);
|
|
7697
7698
|
Cd.displayName = ib;
|
|
7698
|
-
var Td = "MenuRadioGroup", [ab, lb] =
|
|
7699
|
+
var Td = "MenuRadioGroup", [ab, lb] = sr(
|
|
7699
7700
|
Td,
|
|
7700
7701
|
{ value: void 0, onValueChange: () => {
|
|
7701
7702
|
} }
|
|
@@ -7730,7 +7731,7 @@ var kd = "MenuRadioItem", Rd = v.forwardRef(
|
|
|
7730
7731
|
}
|
|
7731
7732
|
);
|
|
7732
7733
|
Rd.displayName = kd;
|
|
7733
|
-
var Ea = "MenuItemIndicator", [Ed, cb] =
|
|
7734
|
+
var Ea = "MenuItemIndicator", [Ed, cb] = sr(
|
|
7734
7735
|
Ea,
|
|
7735
7736
|
{ checked: !1 }
|
|
7736
7737
|
), Ad = v.forwardRef(
|
|
@@ -7775,9 +7776,9 @@ var db = "MenuArrow", _d = v.forwardRef(
|
|
|
7775
7776
|
}
|
|
7776
7777
|
);
|
|
7777
7778
|
_d.displayName = db;
|
|
7778
|
-
var fb = "MenuSub", [PI, jd] =
|
|
7779
|
+
var fb = "MenuSub", [PI, jd] = sr(fb), $r = "MenuSubTrigger", Pd = v.forwardRef(
|
|
7779
7780
|
(e, t) => {
|
|
7780
|
-
const n =
|
|
7781
|
+
const n = ir($r, e.__scopeMenu), r = ho($r, e.__scopeMenu), o = jd($r, e.__scopeMenu), s = Ia($r, e.__scopeMenu), i = v.useRef(null), { pointerGraceTimerRef: a, onPointerGraceIntentChange: l } = s, c = { __scopeMenu: e.__scopeMenu }, d = v.useCallback(() => {
|
|
7781
7782
|
i.current && window.clearTimeout(i.current), i.current = null;
|
|
7782
7783
|
}, []);
|
|
7783
7784
|
return v.useEffect(() => d, [d]), v.useEffect(() => {
|
|
@@ -7848,7 +7849,7 @@ var fb = "MenuSub", [PI, jd] = ir(fb), $r = "MenuSubTrigger", Pd = v.forwardRef(
|
|
|
7848
7849
|
Pd.displayName = $r;
|
|
7849
7850
|
var Md = "MenuSubContent", Od = v.forwardRef(
|
|
7850
7851
|
(e, t) => {
|
|
7851
|
-
const n = yd(en, e.__scopeMenu), { forceMount: r = n.forceMount, ...o } = e, s =
|
|
7852
|
+
const n = yd(en, e.__scopeMenu), { forceMount: r = n.forceMount, ...o } = e, s = ir(en, e.__scopeMenu), i = ho(en, e.__scopeMenu), a = jd(Md, e.__scopeMenu), l = v.useRef(null), c = Ke(t, l);
|
|
7852
7853
|
return /* @__PURE__ */ u.jsx(Xr.Provider, { scope: e.__scopeMenu, children: /* @__PURE__ */ u.jsx(nn, { present: r || s.open, children: /* @__PURE__ */ u.jsx(Xr.Slot, { scope: e.__scopeMenu, children: /* @__PURE__ */ u.jsx(
|
|
7853
7854
|
ka,
|
|
7854
7855
|
{
|
|
@@ -8441,7 +8442,7 @@ function g0(e) {
|
|
|
8441
8442
|
let t;
|
|
8442
8443
|
return typeof e == "string" ? t = e : typeof e == "object" && e !== null ? t = JSON.stringify(e) : t = String(e), m0(t), h0(t);
|
|
8443
8444
|
}
|
|
8444
|
-
const Ds = 0,
|
|
8445
|
+
const Ds = 0, Bn = 1, Nr = 2, cf = 4;
|
|
8445
8446
|
function sc(e) {
|
|
8446
8447
|
return () => e;
|
|
8447
8448
|
}
|
|
@@ -8477,7 +8478,7 @@ function ft(...e) {
|
|
|
8477
8478
|
return e;
|
|
8478
8479
|
}
|
|
8479
8480
|
function ot(e, t) {
|
|
8480
|
-
return e(
|
|
8481
|
+
return e(Bn, t);
|
|
8481
8482
|
}
|
|
8482
8483
|
function Pe(e, t) {
|
|
8483
8484
|
e(Ds, t);
|
|
@@ -8492,7 +8493,7 @@ function pe(e, t) {
|
|
|
8492
8493
|
return ot(e, y0(t, Ds));
|
|
8493
8494
|
}
|
|
8494
8495
|
function an(e, t) {
|
|
8495
|
-
const n = e(
|
|
8496
|
+
const n = e(Bn, (r) => {
|
|
8496
8497
|
n(), t(r);
|
|
8497
8498
|
});
|
|
8498
8499
|
return n;
|
|
@@ -8534,7 +8535,7 @@ function U(e, ...t) {
|
|
|
8534
8535
|
case Nr:
|
|
8535
8536
|
_a(e);
|
|
8536
8537
|
return;
|
|
8537
|
-
case
|
|
8538
|
+
case Bn:
|
|
8538
8539
|
return ot(e, n(o));
|
|
8539
8540
|
}
|
|
8540
8541
|
};
|
|
@@ -8544,7 +8545,7 @@ function yn(e, t) {
|
|
|
8544
8545
|
n(t = e(t, r));
|
|
8545
8546
|
};
|
|
8546
8547
|
}
|
|
8547
|
-
function
|
|
8548
|
+
function tr(e) {
|
|
8548
8549
|
return (t) => (n) => {
|
|
8549
8550
|
e > 0 ? e-- : t(n);
|
|
8550
8551
|
};
|
|
@@ -8582,7 +8583,7 @@ function S0(e) {
|
|
|
8582
8583
|
const r = () => t == null ? void 0 : t();
|
|
8583
8584
|
return function(o, s) {
|
|
8584
8585
|
switch (o) {
|
|
8585
|
-
case
|
|
8586
|
+
case Bn:
|
|
8586
8587
|
return s ? n === s ? void 0 : (r(), n = s, t = ot(e, s), t) : (r(), _r);
|
|
8587
8588
|
case Nr:
|
|
8588
8589
|
r(), n = null;
|
|
@@ -8598,7 +8599,7 @@ function ee(e) {
|
|
|
8598
8599
|
case Ds:
|
|
8599
8600
|
t = o;
|
|
8600
8601
|
break;
|
|
8601
|
-
case
|
|
8602
|
+
case Bn: {
|
|
8602
8603
|
o(t);
|
|
8603
8604
|
break;
|
|
8604
8605
|
}
|
|
@@ -8623,7 +8624,7 @@ function Ve() {
|
|
|
8623
8624
|
case Nr:
|
|
8624
8625
|
e.splice(0, e.length);
|
|
8625
8626
|
return;
|
|
8626
|
-
case
|
|
8627
|
+
case Bn:
|
|
8627
8628
|
return e.push(n), () => {
|
|
8628
8629
|
const r = e.indexOf(n);
|
|
8629
8630
|
r > -1 && e.splice(r, 1);
|
|
@@ -8667,7 +8668,7 @@ function It(...e) {
|
|
|
8667
8668
|
_a(t);
|
|
8668
8669
|
return;
|
|
8669
8670
|
}
|
|
8670
|
-
case
|
|
8671
|
+
case Bn:
|
|
8671
8672
|
return r === o && i(n), ot(t, i);
|
|
8672
8673
|
}
|
|
8673
8674
|
};
|
|
@@ -8680,7 +8681,7 @@ function zi(...e) {
|
|
|
8680
8681
|
switch (t) {
|
|
8681
8682
|
case Nr:
|
|
8682
8683
|
return;
|
|
8683
|
-
case
|
|
8684
|
+
case Bn:
|
|
8684
8685
|
return v0(...e.map((r) => ot(r, n)));
|
|
8685
8686
|
}
|
|
8686
8687
|
};
|
|
@@ -8691,7 +8692,7 @@ const I0 = {
|
|
|
8691
8692
|
3: "error",
|
|
8692
8693
|
1: "log",
|
|
8693
8694
|
2: "warn"
|
|
8694
|
-
}, k0 = () => typeof globalThis > "u" ? window : globalThis,
|
|
8695
|
+
}, k0 = () => typeof globalThis > "u" ? window : globalThis, zn = Ze(
|
|
8695
8696
|
() => {
|
|
8696
8697
|
const e = ee(
|
|
8697
8698
|
3
|
|
@@ -8715,7 +8716,7 @@ const I0 = {
|
|
|
8715
8716
|
[],
|
|
8716
8717
|
{ singleton: !0 }
|
|
8717
8718
|
);
|
|
8718
|
-
function
|
|
8719
|
+
function ar(e, t, n) {
|
|
8719
8720
|
return ja(e, t, n).callbackRef;
|
|
8720
8721
|
}
|
|
8721
8722
|
function ja(e, t, n) {
|
|
@@ -8915,8 +8916,8 @@ function Hi(e, t) {
|
|
|
8915
8916
|
}
|
|
8916
8917
|
} else return t < n ? zo(kt(e, { l: Hi(r, t) })) : zo(kt(e, { r: Hi(o, t) }));
|
|
8917
8918
|
}
|
|
8918
|
-
function
|
|
8919
|
-
return ct(e) ? [] : [...
|
|
8919
|
+
function Yn(e) {
|
|
8920
|
+
return ct(e) ? [] : [...Yn(e.l), { k: e.k, v: e.v }, ...Yn(e.r)];
|
|
8920
8921
|
}
|
|
8921
8922
|
function Ui(e, t, n) {
|
|
8922
8923
|
if (ct(e))
|
|
@@ -9030,7 +9031,7 @@ function N0(e, t, n, r) {
|
|
|
9030
9031
|
const o = es(e, t, r), s = es(e, n, r, o);
|
|
9031
9032
|
return e.slice(o, s + 1);
|
|
9032
9033
|
}
|
|
9033
|
-
function
|
|
9034
|
+
function Ln(e, t) {
|
|
9034
9035
|
return Math.round(e.getBoundingClientRect()[t]);
|
|
9035
9036
|
}
|
|
9036
9037
|
function Fs(e) {
|
|
@@ -9123,7 +9124,7 @@ function D0(e, [t, n, r, o]) {
|
|
|
9123
9124
|
};
|
|
9124
9125
|
}
|
|
9125
9126
|
function L0(e) {
|
|
9126
|
-
return
|
|
9127
|
+
return Yn(e).map(({ k: t, v: n }, r, o) => {
|
|
9127
9128
|
const s = o[r + 1];
|
|
9128
9129
|
return { endIndex: s ? s.k - 1 : 1 / 0, size: n, startIndex: t };
|
|
9129
9130
|
});
|
|
@@ -9169,7 +9170,7 @@ const B0 = {
|
|
|
9169
9170
|
offsetWidth: "width"
|
|
9170
9171
|
}, Sn = Ze(
|
|
9171
9172
|
([{ log: e }, { recalcInProgress: t }]) => {
|
|
9172
|
-
const n = Ve(), r = Ve(), o = Dt(r, 0), s = Ve(), i = Ve(), a = ee(0), l = ee([]), c = ee(void 0), d = ee(void 0), f = ee((S, C) =>
|
|
9173
|
+
const n = Ve(), r = Ve(), o = Dt(r, 0), s = Ve(), i = Ve(), a = ee(0), l = ee([]), c = ee(void 0), d = ee(void 0), f = ee((S, C) => Ln(S, B0[C])), p = ee(void 0), h = ee(0), x = _0(), m = Dt(
|
|
9173
9174
|
U(n, $e(l, e, h), yn(D0, x), dt()),
|
|
9174
9175
|
x
|
|
9175
9176
|
), y = Dt(
|
|
@@ -9290,7 +9291,7 @@ const B0 = {
|
|
|
9290
9291
|
startIndex: E + 1
|
|
9291
9292
|
}), M++, P += F + 1;
|
|
9292
9293
|
}
|
|
9293
|
-
const $ =
|
|
9294
|
+
const $ = Yn(C.sizeTree);
|
|
9294
9295
|
return P !== S && $.shift(), $.reduce(
|
|
9295
9296
|
(E, { k: F, v: j }) => {
|
|
9296
9297
|
let Z = E.ranges;
|
|
@@ -9314,7 +9315,7 @@ const B0 = {
|
|
|
9314
9315
|
}
|
|
9315
9316
|
).ranges;
|
|
9316
9317
|
}
|
|
9317
|
-
return
|
|
9318
|
+
return Yn(C.sizeTree).reduce(
|
|
9318
9319
|
(L, { k: P, v: M }) => ({
|
|
9319
9320
|
prevIndex: P + S,
|
|
9320
9321
|
prevSize: M,
|
|
@@ -9356,7 +9357,7 @@ const B0 = {
|
|
|
9356
9357
|
const $ = _[P + 1] - M - 1;
|
|
9357
9358
|
P++, L += $ + 1;
|
|
9358
9359
|
}
|
|
9359
|
-
if (R =
|
|
9360
|
+
if (R = Yn(C.sizeTree).reduce(($, { k: E, v: F }) => Kt($, Math.max(0, E + S), F), R), L !== -S) {
|
|
9360
9361
|
const $ = Qr(C.sizeTree, M);
|
|
9361
9362
|
R = Kt(R, 0, $);
|
|
9362
9363
|
const E = un(C.sizeTree, -S + 1)[1];
|
|
@@ -9368,7 +9369,7 @@ const B0 = {
|
|
|
9368
9369
|
...Vi(C.offsetTree, 0, R, I)
|
|
9369
9370
|
};
|
|
9370
9371
|
} else {
|
|
9371
|
-
const R =
|
|
9372
|
+
const R = Yn(C.sizeTree).reduce((_, { k: L, v: P }) => Kt(_, Math.max(0, L + S), P), vr());
|
|
9372
9373
|
return {
|
|
9373
9374
|
...C,
|
|
9374
9375
|
sizeTree: R,
|
|
@@ -9400,7 +9401,7 @@ const B0 = {
|
|
|
9400
9401
|
unshiftWith: s
|
|
9401
9402
|
};
|
|
9402
9403
|
},
|
|
9403
|
-
ft(
|
|
9404
|
+
ft(zn, Pa),
|
|
9404
9405
|
{ singleton: !0 }
|
|
9405
9406
|
);
|
|
9406
9407
|
function z0(e) {
|
|
@@ -9439,7 +9440,7 @@ const Sf = Ze(
|
|
|
9439
9440
|
), { groupCounts: s, topItemsIndexes: i };
|
|
9440
9441
|
},
|
|
9441
9442
|
ft(Sn, Bt)
|
|
9442
|
-
),
|
|
9443
|
+
), Hn = Ze(
|
|
9443
9444
|
([{ log: e }]) => {
|
|
9444
9445
|
const t = ee(!1), n = Gt(
|
|
9445
9446
|
U(
|
|
@@ -9452,7 +9453,7 @@ const Sf = Ze(
|
|
|
9452
9453
|
r && St(e)("props updated", {}, Ut.DEBUG);
|
|
9453
9454
|
}), { didMount: n, propsReady: t };
|
|
9454
9455
|
},
|
|
9455
|
-
ft(
|
|
9456
|
+
ft(zn),
|
|
9456
9457
|
{ singleton: !0 }
|
|
9457
9458
|
), H0 = typeof document < "u" && "scrollBehavior" in document.documentElement.style;
|
|
9458
9459
|
function Cf(e) {
|
|
@@ -9491,9 +9492,9 @@ const mo = Ze(
|
|
|
9491
9492
|
$,
|
|
9492
9493
|
E
|
|
9493
9494
|
]) => {
|
|
9494
|
-
const F = Cf(T), { align: j, behavior: Z, offset: B } = F, A = I - 1,
|
|
9495
|
-
let G = to(
|
|
9496
|
-
j === "end" ? (G += $ + un(S.sizeTree,
|
|
9495
|
+
const F = Cf(T), { align: j, behavior: Z, offset: B } = F, A = I - 1, W = bf(F, S, A);
|
|
9496
|
+
let G = to(W, S.offsetTree, M) + _;
|
|
9497
|
+
j === "end" ? (G += $ + un(S.sizeTree, W)[1] - C + E, W === A && (G += L)) : j === "center" ? G += ($ + un(S.sizeTree, W)[1] - C + E) / 2 : G -= R, B && (G += B);
|
|
9497
9498
|
const oe = (ve) => {
|
|
9498
9499
|
b(), ve ? (P("retrying to scroll to", { location: T }, Ut.DEBUG), Pe(h, T)) : (Pe(x, !0), P("list did not change, scroll successful", {}, Ut.DEBUG));
|
|
9499
9500
|
};
|
|
@@ -9508,7 +9509,7 @@ const mo = Ze(
|
|
|
9508
9509
|
y = an(U(t, U0(150)), oe);
|
|
9509
9510
|
return g = setTimeout(() => {
|
|
9510
9511
|
b();
|
|
9511
|
-
}, 1200), Pe(l, !0), P("scrolling from index to", { behavior: Z, index:
|
|
9512
|
+
}, 1200), Pe(l, !0), P("scrolling from index to", { behavior: Z, index: W, top: G }, Ut.DEBUG), { behavior: Z, top: G };
|
|
9512
9513
|
}
|
|
9513
9514
|
)
|
|
9514
9515
|
),
|
|
@@ -9519,7 +9520,7 @@ const mo = Ze(
|
|
|
9519
9520
|
topListHeight: m
|
|
9520
9521
|
};
|
|
9521
9522
|
},
|
|
9522
|
-
ft(Sn, Bt,
|
|
9523
|
+
ft(Sn, Bt, zn),
|
|
9523
9524
|
{ singleton: !0 }
|
|
9524
9525
|
);
|
|
9525
9526
|
function U0(e) {
|
|
@@ -9582,7 +9583,7 @@ const go = Ze(
|
|
|
9582
9583
|
scrolledToInitialItem: a
|
|
9583
9584
|
};
|
|
9584
9585
|
},
|
|
9585
|
-
ft(Sn, Bt, mo,
|
|
9586
|
+
ft(Sn, Bt, mo, Hn),
|
|
9586
9587
|
{ singleton: !0 }
|
|
9587
9588
|
);
|
|
9588
9589
|
function Tf(e, t) {
|
|
@@ -9600,7 +9601,7 @@ const no = "up", zr = "down", W0 = "none", V0 = {
|
|
|
9600
9601
|
}, K0 = 0, xo = Ze(([{ footerHeight: e, headerHeight: t, scrollBy: n, scrollContainerState: r, scrollTop: o, viewportHeight: s }]) => {
|
|
9601
9602
|
const i = ee(!1), a = ee(!0), l = Ve(), c = Ve(), d = ee(4), f = ee(K0), p = Dt(
|
|
9602
9603
|
U(
|
|
9603
|
-
zi(U(Ce(o),
|
|
9604
|
+
zi(U(Ce(o), tr(1), mn(!0)), U(Ce(o), tr(1), mn(!1), ac(100))),
|
|
9604
9605
|
dt()
|
|
9605
9606
|
),
|
|
9606
9607
|
!1
|
|
@@ -9875,7 +9876,7 @@ function hc(e, t, n) {
|
|
|
9875
9876
|
}
|
|
9876
9877
|
return s;
|
|
9877
9878
|
}
|
|
9878
|
-
const
|
|
9879
|
+
const lr = Ze(
|
|
9879
9880
|
([
|
|
9880
9881
|
{ data: e, firstItemIndex: t, gap: n, sizes: r, totalCount: o },
|
|
9881
9882
|
s,
|
|
@@ -9935,38 +9936,38 @@ const cr = Ze(
|
|
|
9935
9936
|
j,
|
|
9936
9937
|
$
|
|
9937
9938
|
);
|
|
9938
|
-
const
|
|
9939
|
+
const W = [];
|
|
9939
9940
|
if (M.length > 0) {
|
|
9940
9941
|
const q = M[0], z = M[M.length - 1];
|
|
9941
9942
|
let Y = 0;
|
|
9942
9943
|
for (const D of $s(B, q, z)) {
|
|
9943
|
-
const
|
|
9944
|
+
const V = D.value, J = Math.max(D.start, q), ae = Math.min(D.end, z);
|
|
9944
9945
|
for (let re = J; re <= ae; re++)
|
|
9945
|
-
|
|
9946
|
+
W.push({ data: F == null ? void 0 : F[re], index: re, offset: Y, size: V }), Y += V;
|
|
9946
9947
|
}
|
|
9947
9948
|
}
|
|
9948
9949
|
if (!P)
|
|
9949
|
-
return Ho([],
|
|
9950
|
+
return Ho([], W, R, E, j, $);
|
|
9950
9951
|
const G = M.length > 0 ? M[M.length - 1] + 1 : 0, oe = O0(Z, C, I, G);
|
|
9951
9952
|
if (oe.length === 0)
|
|
9952
9953
|
return null;
|
|
9953
9954
|
const ve = R - 1, je = Ls([], (q) => {
|
|
9954
9955
|
for (const z of oe) {
|
|
9955
9956
|
const Y = z.value;
|
|
9956
|
-
let D = Y.offset,
|
|
9957
|
+
let D = Y.offset, V = z.start;
|
|
9957
9958
|
const J = Y.size;
|
|
9958
9959
|
if (Y.offset < C) {
|
|
9959
|
-
|
|
9960
|
-
const re =
|
|
9960
|
+
V += Math.floor((C - Y.offset + E) / (J + E));
|
|
9961
|
+
const re = V - z.start;
|
|
9961
9962
|
D += re * J + re * E;
|
|
9962
9963
|
}
|
|
9963
|
-
|
|
9964
|
+
V < G && (D += (G - V) * J, V = G);
|
|
9964
9965
|
const ae = Math.min(z.end, ve);
|
|
9965
|
-
for (let re =
|
|
9966
|
+
for (let re = V; re <= ae && !(D >= I); re++)
|
|
9966
9967
|
q.push({ data: F == null ? void 0 : F[re], index: re, offset: D, size: J }), D += J + E;
|
|
9967
9968
|
}
|
|
9968
9969
|
});
|
|
9969
|
-
return Ho(je,
|
|
9970
|
+
return Ho(je, W, R, E, j, $);
|
|
9970
9971
|
}
|
|
9971
9972
|
),
|
|
9972
9973
|
//@ts-expect-error filter needs to be fixed
|
|
@@ -10046,7 +10047,7 @@ const cr = Ze(
|
|
|
10046
10047
|
go,
|
|
10047
10048
|
mo,
|
|
10048
10049
|
xo,
|
|
10049
|
-
|
|
10050
|
+
Hn,
|
|
10050
10051
|
Pa
|
|
10051
10052
|
),
|
|
10052
10053
|
{ singleton: !0 }
|
|
@@ -10061,7 +10062,7 @@ const cr = Ze(
|
|
|
10061
10062
|
);
|
|
10062
10063
|
return pe(Ce(i), s), { totalListHeight: i, totalListHeightChanged: s };
|
|
10063
10064
|
},
|
|
10064
|
-
ft(Bt,
|
|
10065
|
+
ft(Bt, lr),
|
|
10065
10066
|
{ singleton: !0 }
|
|
10066
10067
|
), G0 = Ze(
|
|
10067
10068
|
([{ viewportHeight: e }, { totalListHeight: t }]) => {
|
|
@@ -10113,7 +10114,7 @@ const cr = Ze(
|
|
|
10113
10114
|
Te((F) => !F),
|
|
10114
10115
|
// skips the initial publish of false, and the cleanup call.
|
|
10115
10116
|
// but if scrollingInProgress is true, we skip the initial publish.
|
|
10116
|
-
|
|
10117
|
+
tr(St(i) ? 1 : 2)
|
|
10117
10118
|
),
|
|
10118
10119
|
I
|
|
10119
10120
|
) : I && I(), E;
|
|
@@ -10125,7 +10126,7 @@ const cr = Ze(
|
|
|
10125
10126
|
scrollIntoView: d
|
|
10126
10127
|
};
|
|
10127
10128
|
},
|
|
10128
|
-
ft(Sn, Bt, mo,
|
|
10129
|
+
ft(Sn, Bt, mo, lr, zn),
|
|
10129
10130
|
{ singleton: !0 }
|
|
10130
10131
|
);
|
|
10131
10132
|
function mc(e) {
|
|
@@ -10154,7 +10155,7 @@ const X0 = (e, t) => typeof e == "function" ? mc(e(t)) : t && mc(e), J0 = Ze(
|
|
|
10154
10155
|
}
|
|
10155
10156
|
ot(
|
|
10156
10157
|
U(
|
|
10157
|
-
It(U(Ce(t),
|
|
10158
|
+
It(U(Ce(t), tr(1)), l),
|
|
10158
10159
|
$e(Ce(x), s, a, f),
|
|
10159
10160
|
le(([[S, C], I, R, _, L]) => {
|
|
10160
10161
|
let P = C && _, M = "auto";
|
|
@@ -10210,7 +10211,7 @@ const X0 = (e, t) => typeof e == "function" ? mc(e(t)) : t && mc(e), J0 = Ze(
|
|
|
10210
10211
|
T
|
|
10211
10212
|
), ot(
|
|
10212
10213
|
U(
|
|
10213
|
-
It(U(T,
|
|
10214
|
+
It(U(T, tr(1)), l),
|
|
10214
10215
|
$e(Ce(b), a, f, p),
|
|
10215
10216
|
le(([[S, C], I, R, _, L]) => C && R && (I == null ? void 0 : I({ context: L, totalCount: S, scrollingInProgress: _ }))),
|
|
10216
10217
|
Te((S) => !!S),
|
|
@@ -10230,8 +10231,8 @@ const X0 = (e, t) => typeof e == "function" ? mc(e(t)) : t && mc(e), J0 = Ze(
|
|
|
10230
10231
|
xo,
|
|
10231
10232
|
mo,
|
|
10232
10233
|
go,
|
|
10233
|
-
Un,
|
|
10234
10234
|
Hn,
|
|
10235
|
+
zn,
|
|
10235
10236
|
Bt,
|
|
10236
10237
|
Rf,
|
|
10237
10238
|
Ef
|
|
@@ -10247,7 +10248,7 @@ const X0 = (e, t) => typeof e == "function" ? mc(e(t)) : t && mc(e), J0 = Ze(
|
|
|
10247
10248
|
),
|
|
10248
10249
|
i
|
|
10249
10250
|
), {}),
|
|
10250
|
-
ft(Sn, go,
|
|
10251
|
+
ft(Sn, go, lr, Hn),
|
|
10251
10252
|
{ singleton: !0 }
|
|
10252
10253
|
), Q0 = Ze(
|
|
10253
10254
|
([{ didMount: e }, { scrollTo: t }, { listState: n }]) => {
|
|
@@ -10263,7 +10264,7 @@ const X0 = (e, t) => typeof e == "function" ? mc(e(t)) : t && mc(e), J0 = Ze(
|
|
|
10263
10264
|
an(
|
|
10264
10265
|
U(
|
|
10265
10266
|
n,
|
|
10266
|
-
|
|
10267
|
+
tr(1),
|
|
10267
10268
|
Te((s) => s.items.length > 1)
|
|
10268
10269
|
),
|
|
10269
10270
|
() => {
|
|
@@ -10277,7 +10278,7 @@ const X0 = (e, t) => typeof e == "function" ? mc(e(t)) : t && mc(e), J0 = Ze(
|
|
|
10277
10278
|
initialScrollTop: r
|
|
10278
10279
|
};
|
|
10279
10280
|
},
|
|
10280
|
-
ft(
|
|
10281
|
+
ft(Hn, Bt, lr),
|
|
10281
10282
|
{ singleton: !0 }
|
|
10282
10283
|
), Af = Ze(
|
|
10283
10284
|
([{ scrollVelocity: e }]) => {
|
|
@@ -10372,7 +10373,7 @@ const X0 = (e, t) => typeof e == "function" ? mc(e(t)) : t && mc(e), J0 = Ze(
|
|
|
10372
10373
|
restoreStateFrom: d
|
|
10373
10374
|
};
|
|
10374
10375
|
},
|
|
10375
|
-
ft(Sn, Bt, go,
|
|
10376
|
+
ft(Sn, Bt, go, Hn, $a)
|
|
10376
10377
|
);
|
|
10377
10378
|
function tS(e) {
|
|
10378
10379
|
return { align: "start", index: 0, offset: e.scrollTop };
|
|
@@ -10387,7 +10388,7 @@ const nS = Ze(([{ topItemsIndexes: e }]) => {
|
|
|
10387
10388
|
),
|
|
10388
10389
|
e
|
|
10389
10390
|
), { topItemCount: t };
|
|
10390
|
-
}, ft(
|
|
10391
|
+
}, ft(lr));
|
|
10391
10392
|
function Nf(e) {
|
|
10392
10393
|
let t = !1, n;
|
|
10393
10394
|
return () => (t || (t = !0, n = e()), n);
|
|
@@ -10470,7 +10471,7 @@ const rS = Nf(() => /iP(ad|od|hone)/i.test(navigator.userAgent) && /WebKit/i.tes
|
|
|
10470
10471
|
}
|
|
10471
10472
|
), { deviation: e };
|
|
10472
10473
|
},
|
|
10473
|
-
ft(Bt, xo,
|
|
10474
|
+
ft(Bt, xo, lr, Sn, zn, Pa)
|
|
10474
10475
|
), sS = Ze(
|
|
10475
10476
|
([
|
|
10476
10477
|
e,
|
|
@@ -10500,14 +10501,14 @@ const rS = Nf(() => /iP(ad|od|hone)/i.test(navigator.userAgent) && /WebKit/i.tes
|
|
|
10500
10501
|
ft(
|
|
10501
10502
|
La,
|
|
10502
10503
|
Z0,
|
|
10503
|
-
|
|
10504
|
+
Hn,
|
|
10504
10505
|
Af,
|
|
10505
10506
|
kf,
|
|
10506
10507
|
Q0,
|
|
10507
10508
|
G0,
|
|
10508
10509
|
$a,
|
|
10509
10510
|
Ef,
|
|
10510
|
-
|
|
10511
|
+
zn,
|
|
10511
10512
|
Rf
|
|
10512
10513
|
)
|
|
10513
10514
|
), _f = Ze(
|
|
@@ -10579,7 +10580,7 @@ const rS = Nf(() => /iP(ad|od|hone)/i.test(navigator.userAgent) && /WebKit/i.tes
|
|
|
10579
10580
|
Bt,
|
|
10580
10581
|
eS,
|
|
10581
10582
|
J0,
|
|
10582
|
-
|
|
10583
|
+
lr,
|
|
10583
10584
|
mo,
|
|
10584
10585
|
oS,
|
|
10585
10586
|
nS,
|
|
@@ -10715,9 +10716,9 @@ function Df(e, t, n, r = _r, o, s) {
|
|
|
10715
10716
|
const x = p.behavior === "smooth";
|
|
10716
10717
|
let m, y, g;
|
|
10717
10718
|
xi(h) ? (y = Math.max(
|
|
10718
|
-
|
|
10719
|
+
Ln(h.document.documentElement, s ? "width" : "height"),
|
|
10719
10720
|
s ? h.document.documentElement.scrollWidth : h.document.documentElement.scrollHeight
|
|
10720
|
-
), m = s ? h.innerWidth : h.innerHeight, g = s ? window.scrollX : window.scrollY) : (y = h[s ? "scrollWidth" : "scrollHeight"], m =
|
|
10721
|
+
), m = s ? h.innerWidth : h.innerHeight, g = s ? window.scrollX : window.scrollY) : (y = h[s ? "scrollWidth" : "scrollHeight"], m = Ln(h, s ? "width" : "height"), g = h[s ? "scrollLeft" : "scrollTop"]);
|
|
10721
10722
|
const w = y - m;
|
|
10722
10723
|
if (p.top = Math.ceil(Math.max(Math.min(w, p.top), 0)), Tf(m, y) || p.top === g) {
|
|
10723
10724
|
e({ scrollHeight: y, scrollTop: g, viewportHeight: m }), x && t(!0);
|
|
@@ -10878,10 +10879,10 @@ function gS(e, t) {
|
|
|
10878
10879
|
return { item: typeof e == "string" ? void 0 : t };
|
|
10879
10880
|
}
|
|
10880
10881
|
const xS = /* @__PURE__ */ Q.memo(function() {
|
|
10881
|
-
const e = ke("HeaderComponent"), t = Zt("headerHeight"), n = ke("HeaderFooterTag"), r =
|
|
10882
|
+
const e = ke("HeaderComponent"), t = Zt("headerHeight"), n = ke("HeaderFooterTag"), r = ar(
|
|
10882
10883
|
Q.useMemo(
|
|
10883
10884
|
() => (s) => {
|
|
10884
|
-
t(
|
|
10885
|
+
t(Ln(s, "height"));
|
|
10885
10886
|
},
|
|
10886
10887
|
[t]
|
|
10887
10888
|
),
|
|
@@ -10890,10 +10891,10 @@ const xS = /* @__PURE__ */ Q.memo(function() {
|
|
|
10890
10891
|
), o = ke("context");
|
|
10891
10892
|
return e ? /* @__PURE__ */ u.jsx(n, { ref: r, children: /* @__PURE__ */ u.jsx(e, { ...Ot(e, o) }) }) : null;
|
|
10892
10893
|
}), yS = /* @__PURE__ */ Q.memo(function() {
|
|
10893
|
-
const e = ke("FooterComponent"), t = Zt("footerHeight"), n = ke("HeaderFooterTag"), r =
|
|
10894
|
+
const e = ke("FooterComponent"), t = Zt("footerHeight"), n = ke("HeaderFooterTag"), r = ar(
|
|
10894
10895
|
Q.useMemo(
|
|
10895
10896
|
() => (s) => {
|
|
10896
|
-
t(
|
|
10897
|
+
t(Ln(s, "height"));
|
|
10897
10898
|
},
|
|
10898
10899
|
[t]
|
|
10899
10900
|
),
|
|
@@ -10956,9 +10957,9 @@ function Ff({ useEmitter: e, useEmitterValue: t, usePublisher: n }) {
|
|
|
10956
10957
|
}
|
|
10957
10958
|
const vS = ({ children: e }) => {
|
|
10958
10959
|
const t = Q.useContext(Pf), n = Zt("viewportHeight"), r = Zt("fixedItemHeight"), o = ke("alignToBottom"), s = ke("horizontalDirection"), i = Q.useMemo(
|
|
10959
|
-
() => uf(n, (l) =>
|
|
10960
|
+
() => uf(n, (l) => Ln(l, s ? "width" : "height")),
|
|
10960
10961
|
[n, s]
|
|
10961
|
-
), a =
|
|
10962
|
+
), a = ar(i, !0, ke("skipAnimationFrameInResizeObserver"));
|
|
10962
10963
|
return Q.useEffect(() => {
|
|
10963
10964
|
t && (n(t.viewportHeight), r(t.itemHeight));
|
|
10964
10965
|
}, [t, n, r]), /* @__PURE__ */ u.jsx("div", { "data-viewport-type": "element", ref: a, style: Bs(o), children: e });
|
|
@@ -11128,26 +11129,26 @@ const _S = /* @__PURE__ */ Ze(
|
|
|
11128
11129
|
{ customScrollParent: y, useWindowScroll: g, windowScrollContainerState: w, windowScrollTo: b, windowViewportRect: T },
|
|
11129
11130
|
S
|
|
11130
11131
|
]) => {
|
|
11131
|
-
const C = ee(0), I = ee(0), R = ee(yc), _ = ee({ height: 0, width: 0 }), L = ee({ height: 0, width: 0 }), P = Ve(), M = Ve(), $ = ee(0), E = ee(null), F = ee({ column: 0, row: 0 }), j = Ve(), Z = Ve(), B = ee(!1), A = ee(0),
|
|
11132
|
+
const C = ee(0), I = ee(0), R = ee(yc), _ = ee({ height: 0, width: 0 }), L = ee({ height: 0, width: 0 }), P = Ve(), M = Ve(), $ = ee(0), E = ee(null), F = ee({ column: 0, row: 0 }), j = Ve(), Z = Ve(), B = ee(!1), A = ee(0), W = ee(!0), G = ee(!1), oe = ee(!1);
|
|
11132
11133
|
ot(
|
|
11133
11134
|
U(
|
|
11134
11135
|
x,
|
|
11135
11136
|
$e(A),
|
|
11136
|
-
Te(([D,
|
|
11137
|
+
Te(([D, V]) => !!V)
|
|
11137
11138
|
),
|
|
11138
11139
|
() => {
|
|
11139
|
-
Pe(
|
|
11140
|
+
Pe(W, !1);
|
|
11140
11141
|
}
|
|
11141
11142
|
), ot(
|
|
11142
11143
|
U(
|
|
11143
|
-
It(x,
|
|
11144
|
-
Te(([D,
|
|
11144
|
+
It(x, W, L, _, A, G),
|
|
11145
|
+
Te(([D, V, J, ae, , re]) => D && !V && J.height !== 0 && ae.height !== 0 && !re)
|
|
11145
11146
|
),
|
|
11146
11147
|
([, , , , D]) => {
|
|
11147
11148
|
Pe(G, !0), Oa(1, () => {
|
|
11148
11149
|
Pe(P, D);
|
|
11149
11150
|
}), an(U(c), () => {
|
|
11150
|
-
Pe(t, [0, 0]), Pe(
|
|
11151
|
+
Pe(t, [0, 0]), Pe(W, !0);
|
|
11151
11152
|
});
|
|
11152
11153
|
}
|
|
11153
11154
|
), pe(
|
|
@@ -11164,7 +11165,7 @@ const _S = /* @__PURE__ */ Ze(
|
|
|
11164
11165
|
Te(([, D]) => D != null)
|
|
11165
11166
|
),
|
|
11166
11167
|
([, D]) => {
|
|
11167
|
-
D && (Pe(_, D.viewport), Pe(L, D.item), Pe(F, D.gap), D.scrollTop > 0 && (Pe(B, !0), an(U(c,
|
|
11168
|
+
D && (Pe(_, D.viewport), Pe(L, D.item), Pe(F, D.gap), D.scrollTop > 0 && (Pe(B, !0), an(U(c, tr(1)), (V) => {
|
|
11168
11169
|
Pe(B, !1);
|
|
11169
11170
|
}), Pe(l, { top: D.scrollTop })));
|
|
11170
11171
|
}
|
|
@@ -11179,12 +11180,12 @@ const _S = /* @__PURE__ */ Ze(
|
|
|
11179
11180
|
It(
|
|
11180
11181
|
Ce(_, Eo),
|
|
11181
11182
|
Ce(L, Eo),
|
|
11182
|
-
Ce(F, (D,
|
|
11183
|
+
Ce(F, (D, V) => D && D.column === V.column && D.row === V.row),
|
|
11183
11184
|
Ce(c)
|
|
11184
11185
|
),
|
|
11185
|
-
le(([D,
|
|
11186
|
+
le(([D, V, J, ae]) => ({
|
|
11186
11187
|
gap: J,
|
|
11187
|
-
item:
|
|
11188
|
+
item: V,
|
|
11188
11189
|
scrollTop: ae,
|
|
11189
11190
|
viewport: D
|
|
11190
11191
|
}))
|
|
@@ -11201,14 +11202,14 @@ const _S = /* @__PURE__ */ Ze(
|
|
|
11201
11202
|
Ce(E),
|
|
11202
11203
|
Ce(I),
|
|
11203
11204
|
Ce(B),
|
|
11204
|
-
Ce(
|
|
11205
|
+
Ce(W),
|
|
11205
11206
|
Ce(A)
|
|
11206
11207
|
),
|
|
11207
11208
|
Te(([, , , , , , , D]) => !D),
|
|
11208
11209
|
le(
|
|
11209
11210
|
([
|
|
11210
11211
|
D,
|
|
11211
|
-
[
|
|
11212
|
+
[V, J],
|
|
11212
11213
|
ae,
|
|
11213
11214
|
re,
|
|
11214
11215
|
Ne,
|
|
@@ -11227,7 +11228,7 @@ const _S = /* @__PURE__ */ Ze(
|
|
|
11227
11228
|
}
|
|
11228
11229
|
const We = Bf(Ue, xe, tt);
|
|
11229
11230
|
let st, at;
|
|
11230
|
-
Ye ?
|
|
11231
|
+
Ye ? V === 0 && J === 0 && Oe > 0 ? (st = 0, at = Oe - 1) : (st = We * rs((V + Xe) / (ie + Xe)), at = We * vc((J + Xe) / (ie + Xe)) - 1, at = vi(D - 1, Hr(at, We - 1)), st = vi(at, Hr(0, st))) : (st = 0, at = -1);
|
|
11231
11232
|
const _t = bc(st, at, He), { bottom: vt, top: gt } = Sc(Ne, ae, re, _t), bt = vc(D / We), Tt = bt * ie + (bt - 1) * Xe - vt;
|
|
11232
11233
|
return { bottom: vt, itemHeight: ie, items: _t, itemWidth: xe, offsetBottom: Tt, offsetTop: gt, top: gt };
|
|
11233
11234
|
}
|
|
@@ -11244,9 +11245,9 @@ const _S = /* @__PURE__ */ Ze(
|
|
|
11244
11245
|
), pe(
|
|
11245
11246
|
U(
|
|
11246
11247
|
It(_, L, R, F),
|
|
11247
|
-
Te(([D,
|
|
11248
|
-
le(([D,
|
|
11249
|
-
const { bottom: re, top: Ne } = Sc(D, ae,
|
|
11248
|
+
Te(([D, V, { items: J }]) => J.length > 0 && V.height !== 0 && D.height !== 0),
|
|
11249
|
+
le(([D, V, { items: J }, ae]) => {
|
|
11250
|
+
const { bottom: re, top: Ne } = Sc(D, ae, V, J);
|
|
11250
11251
|
return [Ne, re];
|
|
11251
11252
|
}),
|
|
11252
11253
|
dt(eo)
|
|
@@ -11258,7 +11259,7 @@ const _S = /* @__PURE__ */ Ze(
|
|
|
11258
11259
|
U(
|
|
11259
11260
|
c,
|
|
11260
11261
|
$e(ve),
|
|
11261
|
-
le(([D,
|
|
11262
|
+
le(([D, V]) => V || D !== 0)
|
|
11262
11263
|
),
|
|
11263
11264
|
ve
|
|
11264
11265
|
);
|
|
@@ -11267,9 +11268,9 @@ const _S = /* @__PURE__ */ Ze(
|
|
|
11267
11268
|
It(R, C),
|
|
11268
11269
|
Te(([{ items: D }]) => D.length > 0),
|
|
11269
11270
|
$e(ve),
|
|
11270
|
-
Te(([[D,
|
|
11271
|
-
const ae = D.items[D.items.length - 1].index ===
|
|
11272
|
-
return (J || D.bottom > 0 && D.itemHeight > 0 && D.offsetBottom === 0 && D.items.length ===
|
|
11271
|
+
Te(([[D, V], J]) => {
|
|
11272
|
+
const ae = D.items[D.items.length - 1].index === V - 1;
|
|
11273
|
+
return (J || D.bottom > 0 && D.itemHeight > 0 && D.offsetBottom === 0 && D.items.length === V) && ae;
|
|
11273
11274
|
}),
|
|
11274
11275
|
le(([[, D]]) => D - 1),
|
|
11275
11276
|
dt()
|
|
@@ -11285,7 +11286,7 @@ const _S = /* @__PURE__ */ Ze(
|
|
|
11285
11286
|
U(
|
|
11286
11287
|
Ce(R),
|
|
11287
11288
|
$e(B),
|
|
11288
|
-
Te(([{ items: D },
|
|
11289
|
+
Te(([{ items: D }, V]) => D.length > 0 && !V),
|
|
11289
11290
|
le(([{ items: D }]) => ({
|
|
11290
11291
|
endIndex: D[D.length - 1].index,
|
|
11291
11292
|
startIndex: D[0].index
|
|
@@ -11298,12 +11299,12 @@ const _S = /* @__PURE__ */ Ze(
|
|
|
11298
11299
|
U(
|
|
11299
11300
|
P,
|
|
11300
11301
|
$e(_, L, C, F),
|
|
11301
|
-
le(([D,
|
|
11302
|
+
le(([D, V, J, ae, re]) => {
|
|
11302
11303
|
const Ne = Cf(D), { align: He, behavior: Oe, offset: Ye } = Ne;
|
|
11303
11304
|
let qe = Ne.index;
|
|
11304
11305
|
qe === "LAST" && (qe = ae - 1), qe = Hr(0, qe, vi(ae - 1, qe));
|
|
11305
|
-
let tt = Ki(
|
|
11306
|
-
return He === "end" ? tt = wc(tt -
|
|
11306
|
+
let tt = Ki(V, re, J, qe);
|
|
11307
|
+
return He === "end" ? tt = wc(tt - V.height + J.height) : He === "center" && (tt = wc(tt - V.height / 2 + J.height / 2)), Ye && (tt += Ye), { behavior: Oe, top: tt };
|
|
11307
11308
|
})
|
|
11308
11309
|
),
|
|
11309
11310
|
l
|
|
@@ -11363,7 +11364,7 @@ const _S = /* @__PURE__ */ Ze(
|
|
|
11363
11364
|
...S
|
|
11364
11365
|
};
|
|
11365
11366
|
},
|
|
11366
|
-
ft(La, Bt, xo, Af,
|
|
11367
|
+
ft(La, Bt, xo, Af, Hn, $a, zn)
|
|
11367
11368
|
);
|
|
11368
11369
|
function Bf(e, t, n) {
|
|
11369
11370
|
return Hr(1, rs((e + n) / (rs(t) + n)));
|
|
@@ -11410,7 +11411,7 @@ const jS = /* @__PURE__ */ Ze(() => {
|
|
|
11410
11411
|
([e, t]) => ({ ...e, ...t }),
|
|
11411
11412
|
ft(_S, jS)
|
|
11412
11413
|
), MS = /* @__PURE__ */ Q.memo(function() {
|
|
11413
|
-
const e = ht("gridState"), t = ht("listClassName"), n = ht("itemClassName"), r = ht("itemContent"), o = ht("computeItemKey"), s = ht("isSeeking"), i = Qt("scrollHeight"), a = ht("ItemComponent"), l = ht("ListComponent"), c = ht("ScrollSeekPlaceholder"), d = ht("context"), f = Qt("itemDimensions"), p = Qt("gap"), h = ht("log"), x = ht("stateRestoreInProgress"), m = Qt("reportReadyState"), y =
|
|
11414
|
+
const e = ht("gridState"), t = ht("listClassName"), n = ht("itemClassName"), r = ht("itemContent"), o = ht("computeItemKey"), s = ht("isSeeking"), i = Qt("scrollHeight"), a = ht("ItemComponent"), l = ht("ListComponent"), c = ht("ScrollSeekPlaceholder"), d = ht("context"), f = Qt("itemDimensions"), p = Qt("gap"), h = ht("log"), x = ht("stateRestoreInProgress"), m = Qt("reportReadyState"), y = ar(
|
|
11414
11415
|
Q.useMemo(
|
|
11415
11416
|
() => (g) => {
|
|
11416
11417
|
const w = g.parentElement.parentElement.scrollHeight;
|
|
@@ -11465,10 +11466,10 @@ const jS = /* @__PURE__ */ Ze(() => {
|
|
|
11465
11466
|
}
|
|
11466
11467
|
);
|
|
11467
11468
|
}), OS = Q.memo(function() {
|
|
11468
|
-
const e = ht("HeaderComponent"), t = Qt("headerHeight"), n = ht("headerFooterTag"), r =
|
|
11469
|
+
const e = ht("HeaderComponent"), t = Qt("headerHeight"), n = ht("headerFooterTag"), r = ar(
|
|
11469
11470
|
Q.useMemo(
|
|
11470
11471
|
() => (s) => {
|
|
11471
|
-
t(
|
|
11472
|
+
t(Ln(s, "height"));
|
|
11472
11473
|
},
|
|
11473
11474
|
[t]
|
|
11474
11475
|
),
|
|
@@ -11477,10 +11478,10 @@ const jS = /* @__PURE__ */ Ze(() => {
|
|
|
11477
11478
|
), o = ht("context");
|
|
11478
11479
|
return e ? /* @__PURE__ */ u.jsx(n, { ref: r, children: /* @__PURE__ */ u.jsx(e, { ...Ot(e, o) }) }) : null;
|
|
11479
11480
|
}), DS = Q.memo(function() {
|
|
11480
|
-
const e = ht("FooterComponent"), t = Qt("footerHeight"), n = ht("headerFooterTag"), r =
|
|
11481
|
+
const e = ht("FooterComponent"), t = Qt("footerHeight"), n = ht("headerFooterTag"), r = ar(
|
|
11481
11482
|
Q.useMemo(
|
|
11482
11483
|
() => (s) => {
|
|
11483
|
-
t(
|
|
11484
|
+
t(Ln(s, "height"));
|
|
11484
11485
|
},
|
|
11485
11486
|
[t]
|
|
11486
11487
|
),
|
|
@@ -11489,7 +11490,7 @@ const jS = /* @__PURE__ */ Ze(() => {
|
|
|
11489
11490
|
), o = ht("context");
|
|
11490
11491
|
return e ? /* @__PURE__ */ u.jsx(n, { ref: r, children: /* @__PURE__ */ u.jsx(e, { ...Ot(e, o) }) }) : null;
|
|
11491
11492
|
}), LS = ({ children: e }) => {
|
|
11492
|
-
const t = Q.useContext(Mf), n = Qt("itemDimensions"), r = Qt("viewportDimensions"), o =
|
|
11493
|
+
const t = Q.useContext(Mf), n = Qt("itemDimensions"), r = Qt("viewportDimensions"), o = ar(
|
|
11493
11494
|
Q.useMemo(
|
|
11494
11495
|
() => (s) => {
|
|
11495
11496
|
r(s.getBoundingClientRect());
|
|
@@ -11866,16 +11867,16 @@ var nC = br("DialogOverlay.RemoveScroll"), rC = v.forwardRef(
|
|
|
11866
11867
|
) })
|
|
11867
11868
|
);
|
|
11868
11869
|
}
|
|
11869
|
-
),
|
|
11870
|
+
), nr = "DialogContent", Qf = v.forwardRef(
|
|
11870
11871
|
(e, t) => {
|
|
11871
|
-
const n = Xf(
|
|
11872
|
+
const n = Xf(nr, e.__scopeDialog), { forceMount: r = n.forceMount, ...o } = e, s = fn(nr, e.__scopeDialog);
|
|
11872
11873
|
return /* @__PURE__ */ u.jsx(nn, { present: r || s.open, children: s.modal ? /* @__PURE__ */ u.jsx(oC, { ...o, ref: t }) : /* @__PURE__ */ u.jsx(sC, { ...o, ref: t }) });
|
|
11873
11874
|
}
|
|
11874
11875
|
);
|
|
11875
|
-
Qf.displayName =
|
|
11876
|
+
Qf.displayName = nr;
|
|
11876
11877
|
var oC = v.forwardRef(
|
|
11877
11878
|
(e, t) => {
|
|
11878
|
-
const n = fn(
|
|
11879
|
+
const n = fn(nr, e.__scopeDialog), r = v.useRef(null), o = Ke(t, n.contentRef, r);
|
|
11879
11880
|
return v.useEffect(() => {
|
|
11880
11881
|
const s = r.current;
|
|
11881
11882
|
if (s) return Sa(s);
|
|
@@ -11903,7 +11904,7 @@ var oC = v.forwardRef(
|
|
|
11903
11904
|
}
|
|
11904
11905
|
), sC = v.forwardRef(
|
|
11905
11906
|
(e, t) => {
|
|
11906
|
-
const n = fn(
|
|
11907
|
+
const n = fn(nr, e.__scopeDialog), r = v.useRef(!1), o = v.useRef(!1);
|
|
11907
11908
|
return /* @__PURE__ */ u.jsx(
|
|
11908
11909
|
ep,
|
|
11909
11910
|
{
|
|
@@ -11926,7 +11927,7 @@ var oC = v.forwardRef(
|
|
|
11926
11927
|
}
|
|
11927
11928
|
), ep = v.forwardRef(
|
|
11928
11929
|
(e, t) => {
|
|
11929
|
-
const { __scopeDialog: n, trapFocus: r, onOpenAutoFocus: o, onCloseAutoFocus: s, ...i } = e, a = fn(
|
|
11930
|
+
const { __scopeDialog: n, trapFocus: r, onOpenAutoFocus: o, onCloseAutoFocus: s, ...i } = e, a = fn(nr, n), l = v.useRef(null), c = Ke(t, l);
|
|
11930
11931
|
return pa(), /* @__PURE__ */ u.jsxs(u.Fragment, { children: [
|
|
11931
11932
|
/* @__PURE__ */ u.jsx(
|
|
11932
11933
|
Ts,
|
|
@@ -11990,7 +11991,7 @@ function Va(e) {
|
|
|
11990
11991
|
return e ? "open" : "closed";
|
|
11991
11992
|
}
|
|
11992
11993
|
var ip = "DialogTitleWarning", [DI, ap] = ty(ip, {
|
|
11993
|
-
contentName:
|
|
11994
|
+
contentName: nr,
|
|
11994
11995
|
titleName: Wa,
|
|
11995
11996
|
docsSlug: "dialog"
|
|
11996
11997
|
}), iC = ({ titleId: e }) => {
|
|
@@ -12009,7 +12010,7 @@ For more information, see https://radix-ui.com/primitives/docs/components/${t.do
|
|
|
12009
12010
|
const o = (s = e.current) == null ? void 0 : s.getAttribute("aria-describedby");
|
|
12010
12011
|
t && o && (document.getElementById(t) || console.warn(r));
|
|
12011
12012
|
}, [r, e, t]), null;
|
|
12012
|
-
}, lp = qf, cC = Yf, cp = Jf, Hs = Zf, Us = Qf,
|
|
12013
|
+
}, lp = qf, cC = Yf, cp = Jf, Hs = Zf, Us = Qf, Jn = tp, Ws = rp, up = sp;
|
|
12013
12014
|
const uC = lp, dC = cp, dp = v.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ u.jsx(
|
|
12014
12015
|
Hs,
|
|
12015
12016
|
{
|
|
@@ -12029,7 +12030,7 @@ const fp = v.forwardRef(({ className: e, children: t, ...n }, r) => {
|
|
|
12029
12030
|
v.Children.forEach(a, (l) => {
|
|
12030
12031
|
if (s || !v.isValidElement(l)) return;
|
|
12031
12032
|
const c = l.type;
|
|
12032
|
-
if (c ===
|
|
12033
|
+
if (c === Jn || (c == null ? void 0 : c.displayName) === Jn.displayName || (c == null ? void 0 : c.name) === "DialogTitle") {
|
|
12033
12034
|
s = !0;
|
|
12034
12035
|
return;
|
|
12035
12036
|
}
|
|
@@ -12050,7 +12051,7 @@ const fp = v.forwardRef(({ className: e, children: t, ...n }, r) => {
|
|
|
12050
12051
|
),
|
|
12051
12052
|
...n,
|
|
12052
12053
|
children: [
|
|
12053
|
-
!o && /* @__PURE__ */ u.jsx(
|
|
12054
|
+
!o && /* @__PURE__ */ u.jsx(Jn, { className: "sr-only", children: "Dialog" }),
|
|
12054
12055
|
t,
|
|
12055
12056
|
/* @__PURE__ */ u.jsxs(up, { className: "absolute right-4 top-4 rounded-sm opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none data-[state=open]:bg-accent data-[state=open]:text-muted-foreground", children: [
|
|
12056
12057
|
/* @__PURE__ */ u.jsx(gr, { className: "h-4 w-4" }),
|
|
@@ -12077,7 +12078,7 @@ const pp = ({
|
|
|
12077
12078
|
);
|
|
12078
12079
|
pp.displayName = "DialogHeader";
|
|
12079
12080
|
const hp = v.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ u.jsx(
|
|
12080
|
-
|
|
12081
|
+
Jn,
|
|
12081
12082
|
{
|
|
12082
12083
|
ref: n,
|
|
12083
12084
|
className: te(
|
|
@@ -12087,7 +12088,7 @@ const hp = v.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ u.jsx(
|
|
|
12087
12088
|
...t
|
|
12088
12089
|
}
|
|
12089
12090
|
));
|
|
12090
|
-
hp.displayName =
|
|
12091
|
+
hp.displayName = Jn.displayName;
|
|
12091
12092
|
const fC = v.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ u.jsx(
|
|
12092
12093
|
Ws,
|
|
12093
12094
|
{
|
|
@@ -12320,9 +12321,9 @@ function mp() {
|
|
|
12320
12321
|
xhtml: !1
|
|
12321
12322
|
};
|
|
12322
12323
|
}
|
|
12323
|
-
let
|
|
12324
|
+
let cr = mp();
|
|
12324
12325
|
function vC(e) {
|
|
12325
|
-
|
|
12326
|
+
cr = e;
|
|
12326
12327
|
}
|
|
12327
12328
|
const gp = /[&<>"']/, wC = new RegExp(gp.source, "g"), xp = /[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/, bC = new RegExp(xp.source, "g"), SC = {
|
|
12328
12329
|
"&": "&",
|
|
@@ -12475,7 +12476,7 @@ function PC(e, t) {
|
|
|
12475
12476
|
}
|
|
12476
12477
|
class qa {
|
|
12477
12478
|
constructor(t) {
|
|
12478
|
-
this.options = t ||
|
|
12479
|
+
this.options = t || cr;
|
|
12479
12480
|
}
|
|
12480
12481
|
space(t) {
|
|
12481
12482
|
const n = this.rules.block.newline.exec(t);
|
|
@@ -13024,9 +13025,9 @@ function jc(e) {
|
|
|
13024
13025
|
r = e.charCodeAt(n), Math.random() > 0.5 && (r = "x" + r.toString(16)), t += "&#" + r + ";";
|
|
13025
13026
|
return t;
|
|
13026
13027
|
}
|
|
13027
|
-
class
|
|
13028
|
+
class $n {
|
|
13028
13029
|
constructor(t) {
|
|
13029
|
-
this.tokens = [], this.tokens.links = /* @__PURE__ */ Object.create(null), this.options = t ||
|
|
13030
|
+
this.tokens = [], this.tokens.links = /* @__PURE__ */ Object.create(null), this.options = t || cr, this.options.tokenizer = this.options.tokenizer || new qa(), this.tokenizer = this.options.tokenizer, this.tokenizer.options = this.options, this.tokenizer.lexer = this, this.inlineQueue = [], this.state = {
|
|
13030
13031
|
inLink: !1,
|
|
13031
13032
|
inRawBlock: !1,
|
|
13032
13033
|
top: !0
|
|
@@ -13050,13 +13051,13 @@ class Fn {
|
|
|
13050
13051
|
* Static Lex Method
|
|
13051
13052
|
*/
|
|
13052
13053
|
static lex(t, n) {
|
|
13053
|
-
return new
|
|
13054
|
+
return new $n(n).lex(t);
|
|
13054
13055
|
}
|
|
13055
13056
|
/**
|
|
13056
13057
|
* Static Lex Inline Method
|
|
13057
13058
|
*/
|
|
13058
13059
|
static lexInline(t, n) {
|
|
13059
|
-
return new
|
|
13060
|
+
return new $n(n).inlineTokens(t);
|
|
13060
13061
|
}
|
|
13061
13062
|
/**
|
|
13062
13063
|
* Preprocessing
|
|
@@ -13246,7 +13247,7 @@ class Fn {
|
|
|
13246
13247
|
}
|
|
13247
13248
|
class Ga {
|
|
13248
13249
|
constructor(t) {
|
|
13249
|
-
this.options = t ||
|
|
13250
|
+
this.options = t || cr;
|
|
13250
13251
|
}
|
|
13251
13252
|
code(t, n, r) {
|
|
13252
13253
|
const o = (n || "").match(/\S*/)[0];
|
|
@@ -13457,21 +13458,21 @@ class wp {
|
|
|
13457
13458
|
return this.getNextSafeSlug(r, n.dryrun);
|
|
13458
13459
|
}
|
|
13459
13460
|
}
|
|
13460
|
-
class
|
|
13461
|
+
class Fn {
|
|
13461
13462
|
constructor(t) {
|
|
13462
|
-
this.options = t ||
|
|
13463
|
+
this.options = t || cr, this.options.renderer = this.options.renderer || new Ga(), this.renderer = this.options.renderer, this.renderer.options = this.options, this.textRenderer = new vp(), this.slugger = new wp();
|
|
13463
13464
|
}
|
|
13464
13465
|
/**
|
|
13465
13466
|
* Static Parse Method
|
|
13466
13467
|
*/
|
|
13467
13468
|
static parse(t, n) {
|
|
13468
|
-
return new
|
|
13469
|
+
return new Fn(n).parse(t);
|
|
13469
13470
|
}
|
|
13470
13471
|
/**
|
|
13471
13472
|
* Static Parse Inline Method
|
|
13472
13473
|
*/
|
|
13473
13474
|
static parseInline(t, n) {
|
|
13474
|
-
return new
|
|
13475
|
+
return new Fn(n).parseInline(t);
|
|
13475
13476
|
}
|
|
13476
13477
|
/**
|
|
13477
13478
|
* Parse Loop
|
|
@@ -13633,7 +13634,7 @@ class Bn {
|
|
|
13633
13634
|
}
|
|
13634
13635
|
class as {
|
|
13635
13636
|
constructor(t) {
|
|
13636
|
-
this.options = t ||
|
|
13637
|
+
this.options = t || cr;
|
|
13637
13638
|
}
|
|
13638
13639
|
/**
|
|
13639
13640
|
* Process markdown before marked
|
|
@@ -13729,13 +13730,13 @@ function bp(e, t) {
|
|
|
13729
13730
|
};
|
|
13730
13731
|
}
|
|
13731
13732
|
function he(e, t, n) {
|
|
13732
|
-
return bp(
|
|
13733
|
+
return bp($n.lex, Fn.parse)(e, t, n);
|
|
13733
13734
|
}
|
|
13734
13735
|
he.options = he.setOptions = function(e) {
|
|
13735
13736
|
return he.defaults = { ...he.defaults, ...e }, vC(he.defaults), he;
|
|
13736
13737
|
};
|
|
13737
13738
|
he.getDefaults = mp;
|
|
13738
|
-
he.defaults =
|
|
13739
|
+
he.defaults = cr;
|
|
13739
13740
|
he.use = function(...e) {
|
|
13740
13741
|
const t = he.defaults.extensions || { renderers: {}, childTokens: {} };
|
|
13741
13742
|
e.forEach((n) => {
|
|
@@ -13827,13 +13828,13 @@ he.walkTokens = function(e, t) {
|
|
|
13827
13828
|
}
|
|
13828
13829
|
return n;
|
|
13829
13830
|
};
|
|
13830
|
-
he.parseInline = bp(
|
|
13831
|
-
he.Parser =
|
|
13832
|
-
he.parser =
|
|
13831
|
+
he.parseInline = bp($n.lexInline, Fn.parseInline);
|
|
13832
|
+
he.Parser = Fn;
|
|
13833
|
+
he.parser = Fn.parse;
|
|
13833
13834
|
he.Renderer = Ga;
|
|
13834
13835
|
he.TextRenderer = vp;
|
|
13835
|
-
he.Lexer =
|
|
13836
|
-
he.lexer =
|
|
13836
|
+
he.Lexer = $n;
|
|
13837
|
+
he.lexer = $n.lex;
|
|
13837
13838
|
he.Tokenizer = qa;
|
|
13838
13839
|
he.Slugger = wp;
|
|
13839
13840
|
he.Hooks = as;
|
|
@@ -13843,8 +13844,8 @@ he.setOptions;
|
|
|
13843
13844
|
he.use;
|
|
13844
13845
|
he.walkTokens;
|
|
13845
13846
|
he.parseInline;
|
|
13846
|
-
|
|
13847
|
-
|
|
13847
|
+
Fn.parse;
|
|
13848
|
+
$n.lex;
|
|
13848
13849
|
function ls({
|
|
13849
13850
|
content: e,
|
|
13850
13851
|
className: t = "",
|
|
@@ -14276,14 +14277,14 @@ const Ya = Qh(function({
|
|
|
14276
14277
|
defaultCheckpointId: _ = null,
|
|
14277
14278
|
messageParentCheckpointId: L = null
|
|
14278
14279
|
}) {
|
|
14279
|
-
const [P, M] = me(!1), [$, E] = me("preview"), [F, j] = me(!1), { currentThreadId: Z } = ca(), { respondToInterrupt: B } = ua(), A = l === "phone" || l === "half-screen",
|
|
14280
|
+
const [P, M] = me(!1), [$, E] = me("preview"), [F, j] = me(!1), { currentThreadId: Z } = ca(), { respondToInterrupt: B } = ua(), A = l === "phone" || l === "half-screen", W = t.role, G = W === "tool", oe = De(() => "type" in t && t.type === "default_message" ? t : null, [t]), ve = !!oe, je = !(r && W !== "user"), {
|
|
14280
14281
|
uploadingFiles: q,
|
|
14281
14282
|
handleFileClick: z,
|
|
14282
14283
|
fileViewerOpen: Y,
|
|
14283
14284
|
currentFileInfo: D,
|
|
14284
|
-
closeFileViewer:
|
|
14285
|
+
closeFileViewer: V
|
|
14285
14286
|
} = WC({ allowFileOpen: je, currentThreadId: Z }), J = De(() => {
|
|
14286
|
-
switch (
|
|
14287
|
+
switch (W) {
|
|
14287
14288
|
case "user":
|
|
14288
14289
|
return "text-[hsl(var(--chat-bubble-user-text))]";
|
|
14289
14290
|
case "assistant":
|
|
@@ -14295,7 +14296,7 @@ const Ya = Qh(function({
|
|
|
14295
14296
|
default:
|
|
14296
14297
|
return "text-[hsl(var(--chat-bubble-ai-text))]";
|
|
14297
14298
|
}
|
|
14298
|
-
}, [
|
|
14299
|
+
}, [W]), ae = De(() => {
|
|
14299
14300
|
if (oe)
|
|
14300
14301
|
return "";
|
|
14301
14302
|
const N = t.content;
|
|
@@ -14380,7 +14381,7 @@ const Ya = Qh(function({
|
|
|
14380
14381
|
m == null || m(n);
|
|
14381
14382
|
}, [m, n]), st = ge(() => {
|
|
14382
14383
|
const X = te(A ? "h-3 w-3" : "h-4 w-4", "opacity-60 flex-shrink-0", J);
|
|
14383
|
-
switch (
|
|
14384
|
+
switch (W) {
|
|
14384
14385
|
case "user":
|
|
14385
14386
|
return /* @__PURE__ */ u.jsx(lm, { className: X });
|
|
14386
14387
|
case "assistant":
|
|
@@ -14390,9 +14391,9 @@ const Ya = Qh(function({
|
|
|
14390
14391
|
default:
|
|
14391
14392
|
return /* @__PURE__ */ u.jsx(Js, { className: X });
|
|
14392
14393
|
}
|
|
14393
|
-
}, [A, J,
|
|
14394
|
+
}, [A, J, W]), at = ge(() => {
|
|
14394
14395
|
const N = "group relative mb-4 flex w-full";
|
|
14395
|
-
switch (
|
|
14396
|
+
switch (W) {
|
|
14396
14397
|
case "user":
|
|
14397
14398
|
return te(N, "justify-end");
|
|
14398
14399
|
case "assistant":
|
|
@@ -14402,7 +14403,7 @@ const Ya = Qh(function({
|
|
|
14402
14403
|
default:
|
|
14403
14404
|
return N;
|
|
14404
14405
|
}
|
|
14405
|
-
}, [
|
|
14406
|
+
}, [W]), _t = ge(() => {
|
|
14406
14407
|
const N = te(
|
|
14407
14408
|
"rounded-lg px-4 py-3 relative min-w-0 max-w-full break-words",
|
|
14408
14409
|
A && "px-3 py-2 text-sm"
|
|
@@ -14414,7 +14415,7 @@ const Ya = Qh(function({
|
|
|
14414
14415
|
"bg-[hsl(var(--chat-bubble-ai))] text-[hsl(var(--chat-bubble-ai-text))]",
|
|
14415
14416
|
"border border-border/60 dark:border-border/40 shadow-sm"
|
|
14416
14417
|
);
|
|
14417
|
-
switch (
|
|
14418
|
+
switch (W) {
|
|
14418
14419
|
case "user":
|
|
14419
14420
|
return te(
|
|
14420
14421
|
N,
|
|
@@ -14441,7 +14442,7 @@ const Ya = Qh(function({
|
|
|
14441
14442
|
"border border-border/60 dark:border-border/40"
|
|
14442
14443
|
);
|
|
14443
14444
|
}
|
|
14444
|
-
}, [A, ve,
|
|
14445
|
+
}, [A, ve, W]), vt = ge(async (N) => {
|
|
14445
14446
|
if (b)
|
|
14446
14447
|
return;
|
|
14447
14448
|
const X = Ao(
|
|
@@ -14478,7 +14479,7 @@ const Ya = Qh(function({
|
|
|
14478
14479
|
}, [b, S, T, B]), bt = ge(({ part: N, i: X }) => {
|
|
14479
14480
|
if (N.type === "text") {
|
|
14480
14481
|
const ne = N.text ?? "", fe = ne.trim(), Re = Ha(fe);
|
|
14481
|
-
return Re &&
|
|
14482
|
+
return Re && W !== "tool" ? /* @__PURE__ */ u.jsx(Sp, { data: Re }, X) : W === "user" && c && fe.length > d ? /* @__PURE__ */ u.jsx(
|
|
14482
14483
|
VC,
|
|
14483
14484
|
{
|
|
14484
14485
|
text: fe,
|
|
@@ -14545,7 +14546,7 @@ const Ya = Qh(function({
|
|
|
14545
14546
|
q,
|
|
14546
14547
|
vt,
|
|
14547
14548
|
gt,
|
|
14548
|
-
|
|
14549
|
+
W,
|
|
14549
14550
|
c,
|
|
14550
14551
|
d,
|
|
14551
14552
|
F,
|
|
@@ -14595,14 +14596,14 @@ const Ya = Qh(function({
|
|
|
14595
14596
|
]), jt = De(() => oe ? "Assistant" : qS(t), [oe, t]), nt = De(() => oe ? [] : Array.isArray(C) ? C : [], [C, oe]), Rt = De(() => {
|
|
14596
14597
|
var N;
|
|
14597
14598
|
return nt.length ? _ && nt.some((X) => X.id === _) ? _ : ((N = nt[0]) == null ? void 0 : N.id) ?? null : null;
|
|
14598
|
-
}, [_, nt]), Qe = De(() => !nt.length || !I ? null : nt.some((N) => N.id === I) ? I : null, [I, nt]) ?? Rt, et =
|
|
14599
|
+
}, [_, nt]), Qe = De(() => !nt.length || !I ? null : nt.some((N) => N.id === I) ? I : null, [I, nt]) ?? Rt, et = W === "user" && nt.length > 0 && typeof R == "function", pt = ge(
|
|
14599
14600
|
(N, X = !1) => {
|
|
14600
14601
|
if (!R) return;
|
|
14601
14602
|
const ne = (N == null ? void 0 : N.id) ?? null, fe = (N == null ? void 0 : N.parentId) ?? L ?? null;
|
|
14602
14603
|
R(ne, fe, X);
|
|
14603
14604
|
},
|
|
14604
14605
|
[L, R]
|
|
14605
|
-
), lt = De(() => Qe ? nt.findIndex((N) => N.id === Qe) : -1, [Qe, nt]),
|
|
14606
|
+
), lt = De(() => Qe ? nt.findIndex((N) => N.id === Qe) : -1, [Qe, nt]), K = De(() => lt < 0 ? null : nt[lt] ?? null, [lt, nt]);
|
|
14606
14607
|
return G && !f && ie.length === 0 ? null : ve && oe ? /* @__PURE__ */ u.jsx("div", { className: te(at(), h.container), children: /* @__PURE__ */ u.jsxs("div", { className: te(_t(), h.content), children: [
|
|
14607
14608
|
/* @__PURE__ */ u.jsxs("div", { className: "flex items-center gap-2 mb-2 pb-2 border-b border-current/10", children: [
|
|
14608
14609
|
/* @__PURE__ */ u.jsx(Js, { className: te("h-4 w-4", J) }),
|
|
@@ -14656,7 +14657,7 @@ const Ya = Qh(function({
|
|
|
14656
14657
|
)
|
|
14657
14658
|
] }),
|
|
14658
14659
|
/* @__PURE__ */ u.jsxs("div", { className: "flex items-center gap-2", children: [
|
|
14659
|
-
et &&
|
|
14660
|
+
et && K && lt >= 0 && /* @__PURE__ */ u.jsx("div", { className: "flex flex-wrap items-center gap-2 text-xs", children: /* @__PURE__ */ u.jsxs("div", { className: "flex items-center gap-2", children: [
|
|
14660
14661
|
/* @__PURE__ */ u.jsx(
|
|
14661
14662
|
"button",
|
|
14662
14663
|
{
|
|
@@ -14733,7 +14734,7 @@ const Ya = Qh(function({
|
|
|
14733
14734
|
children: /* @__PURE__ */ u.jsx(rl, { className: te(P ? "text-success" : J, A ? "h-3 w-3" : "h-4 w-4") })
|
|
14734
14735
|
}
|
|
14735
14736
|
) }),
|
|
14736
|
-
|
|
14737
|
+
W === "user" && x && /* @__PURE__ */ u.jsx(
|
|
14737
14738
|
rt,
|
|
14738
14739
|
{
|
|
14739
14740
|
variant: "ghost",
|
|
@@ -14744,7 +14745,7 @@ const Ya = Qh(function({
|
|
|
14744
14745
|
children: /* @__PURE__ */ u.jsx(ol, { className: te(J, A ? "h-3 w-3" : "h-4 w-4") })
|
|
14745
14746
|
}
|
|
14746
14747
|
),
|
|
14747
|
-
|
|
14748
|
+
W === "assistant" && m && /* @__PURE__ */ u.jsx(
|
|
14748
14749
|
rt,
|
|
14749
14750
|
{
|
|
14750
14751
|
variant: "ghost",
|
|
@@ -14795,7 +14796,7 @@ const Ya = Qh(function({
|
|
|
14795
14796
|
children: /* @__PURE__ */ u.jsx(rl, { className: te(P ? "text-success" : "text-current", A ? "h-3 w-3" : "h-4 w-4") })
|
|
14796
14797
|
}
|
|
14797
14798
|
),
|
|
14798
|
-
|
|
14799
|
+
W === "user" && x && /* @__PURE__ */ u.jsx(
|
|
14799
14800
|
rt,
|
|
14800
14801
|
{
|
|
14801
14802
|
variant: "ghost",
|
|
@@ -14805,7 +14806,7 @@ const Ya = Qh(function({
|
|
|
14805
14806
|
children: /* @__PURE__ */ u.jsx(ol, { className: te("text-current", A ? "h-3 w-3" : "h-4 w-4") })
|
|
14806
14807
|
}
|
|
14807
14808
|
),
|
|
14808
|
-
|
|
14809
|
+
W === "assistant" && m && /* @__PURE__ */ u.jsx(
|
|
14809
14810
|
rt,
|
|
14810
14811
|
{
|
|
14811
14812
|
variant: "ghost",
|
|
@@ -14823,7 +14824,7 @@ const Ya = Qh(function({
|
|
|
14823
14824
|
yC,
|
|
14824
14825
|
{
|
|
14825
14826
|
isOpen: Y,
|
|
14826
|
-
onClose:
|
|
14827
|
+
onClose: V,
|
|
14827
14828
|
fileId: D.id,
|
|
14828
14829
|
fileName: D.name,
|
|
14829
14830
|
mimeType: D.mimeType
|
|
@@ -15102,7 +15103,7 @@ const Rp = Q.forwardRef(({
|
|
|
15102
15103
|
messagePreviews: F,
|
|
15103
15104
|
createSyntheticThinkingMessage: j = !1
|
|
15104
15105
|
}, Z) => {
|
|
15105
|
-
const B = Le(null), A = Le(null),
|
|
15106
|
+
const B = Le(null), A = Le(null), W = Le(!1), G = Le(!1), [oe, ve] = me(!0), je = De(() => w ? e.some((ie) => "type" in ie && ie.type === "default_message" ? !1 : Array.isArray(ie == null ? void 0 : ie.content) && ie.content.some(
|
|
15106
15107
|
(xe) => xe && xe.type === "interrupt" && (xe.id ?? xe.interrupt_id) === w.id
|
|
15107
15108
|
)) : !1, [w, e]), q = De(() => {
|
|
15108
15109
|
if (!w || je)
|
|
@@ -15135,17 +15136,17 @@ const Rp = Q.forwardRef(({
|
|
|
15135
15136
|
content: [],
|
|
15136
15137
|
createdAt: (/* @__PURE__ */ new Date()).toISOString()
|
|
15137
15138
|
}
|
|
15138
|
-
] : z, [z, t, j]), D = De(() => C ? Y : Y.filter((ie) => (ie == null ? void 0 : ie.role) !== "tool"), [Y, C]),
|
|
15139
|
+
] : z, [z, t, j]), D = De(() => C ? Y : Y.filter((ie) => (ie == null ? void 0 : ie.role) !== "tool"), [Y, C]), V = ge((ie) => {
|
|
15139
15140
|
ve(ie), y && y(!ie), g && g(ie);
|
|
15140
15141
|
}, [y, g]), J = De(() => {
|
|
15141
15142
|
if (a)
|
|
15142
15143
|
return async () => {
|
|
15143
|
-
if (!
|
|
15144
|
-
|
|
15144
|
+
if (!W.current) {
|
|
15145
|
+
W.current = !0;
|
|
15145
15146
|
try {
|
|
15146
15147
|
await a();
|
|
15147
15148
|
} finally {
|
|
15148
|
-
|
|
15149
|
+
W.current = !1;
|
|
15149
15150
|
}
|
|
15150
15151
|
}
|
|
15151
15152
|
};
|
|
@@ -15237,7 +15238,7 @@ const Rp = Q.forwardRef(({
|
|
|
15237
15238
|
startReached: () => {
|
|
15238
15239
|
J && J();
|
|
15239
15240
|
},
|
|
15240
|
-
atBottomStateChange:
|
|
15241
|
+
atBottomStateChange: V,
|
|
15241
15242
|
style: { height: "100%", overscrollBehavior: "contain" },
|
|
15242
15243
|
computeItemKey: (ie, xe) => Ip(xe, ie),
|
|
15243
15244
|
itemContent: (ie, xe) => /* @__PURE__ */ u.jsx(
|
|
@@ -15307,7 +15308,7 @@ function Si({
|
|
|
15307
15308
|
metadata: P,
|
|
15308
15309
|
timelineCheckpoints: M,
|
|
15309
15310
|
messagePreviews: $
|
|
15310
|
-
} = ua(), { isStreaming: E, error: F, connectionState: j, submit: Z, stop: B } = Jx(), A = w ?? g ?? null,
|
|
15311
|
+
} = ua(), { isStreaming: E, error: F, connectionState: j, submit: Z, stop: B } = Jx(), A = w ?? g ?? null, W = (R == null ? void 0 : R.id) ?? null, G = (R == null ? void 0 : R.namespace) ?? null, oe = (P == null ? void 0 : P.assemblingMessageId) ?? null, ve = L, [je, q] = me(!1);
|
|
15311
15312
|
yt(() => {
|
|
15312
15313
|
ve || q(!1);
|
|
15313
15314
|
}, [ve]);
|
|
@@ -15315,9 +15316,9 @@ function Si({
|
|
|
15315
15316
|
q(!0);
|
|
15316
15317
|
}, []), Y = ge(() => {
|
|
15317
15318
|
q(!1);
|
|
15318
|
-
}, []), D = !!ve || je, [
|
|
15319
|
+
}, []), D = !!ve || je, [V, J] = me(null), [ae, re] = me(""), [Ne, He] = me(null), [Oe, Ye] = me(null), [qe, tt] = me([]), [Xe, ie] = me(0), [xe, Ue] = me(0), [We, st] = me(!1), [at, _t] = me(null), [vt, gt] = me(null), [bt, Tt] = me(!1), [Lt, jt] = me(null), nt = Le(!1), [Rt, pn] = me(() => Pc.value), Qe = Le(Rt), et = Le(null), pt = ge((de) => {
|
|
15319
15320
|
Pc.value = de, pn(de);
|
|
15320
|
-
}, []), [lt,
|
|
15321
|
+
}, []), [lt, K] = me(!1), N = Le(null), { checkpointMetaById: X, checkpointIndexByKey: ne, attemptMetaById: fe, userMessageIdToAttempts: Re } = p0(_), be = M ?? [], ze = Le(null), Me = Le(null), Ee = ge(() => {
|
|
15321
15322
|
ze.current && (ze.current.value = ""), Me.current && (Me.current.value = ""), ie((de) => de + 1), Ue((de) => de + 1);
|
|
15322
15323
|
}, []), Wt = ge(
|
|
15323
15324
|
(de) => {
|
|
@@ -15328,11 +15329,11 @@ function Si({
|
|
|
15328
15329
|
yt(() => {
|
|
15329
15330
|
Tn.current && !E && (tt([]), Ee()), Tn.current = E;
|
|
15330
15331
|
}, [E, Ee]);
|
|
15331
|
-
const [
|
|
15332
|
+
const [Vn, ur] = me("desktop");
|
|
15332
15333
|
yt(() => {
|
|
15333
15334
|
const de = () => {
|
|
15334
15335
|
const Se = window.innerWidth;
|
|
15335
|
-
|
|
15336
|
+
ur(Se < 640 ? "phone" : Se < 1024 ? "tablet" : "desktop");
|
|
15336
15337
|
};
|
|
15337
15338
|
return de(), window.addEventListener("resize", de), () => window.removeEventListener("resize", de);
|
|
15338
15339
|
}, []), yt(() => {
|
|
@@ -15340,12 +15341,12 @@ function Si({
|
|
|
15340
15341
|
}, [A]), yt(() => {
|
|
15341
15342
|
Qe.current = Rt;
|
|
15342
15343
|
}, [Rt]), yt(() => {
|
|
15343
|
-
if (!
|
|
15344
|
+
if (!V) {
|
|
15344
15345
|
et.current = null;
|
|
15345
15346
|
return;
|
|
15346
15347
|
}
|
|
15347
15348
|
et.current === null && (et.current = Qe.current), pt(ae ?? "");
|
|
15348
|
-
}, [ae,
|
|
15349
|
+
}, [ae, V, pt]), yt(() => {
|
|
15349
15350
|
(async () => {
|
|
15350
15351
|
if (!y.baseUrl) {
|
|
15351
15352
|
jt(null);
|
|
@@ -15369,7 +15370,7 @@ function Si({
|
|
|
15369
15370
|
} catch (Se) {
|
|
15370
15371
|
return (Se == null ? void 0 : Se.message) || "Invalid message";
|
|
15371
15372
|
}
|
|
15372
|
-
},
|
|
15373
|
+
}, _n = async (de) => {
|
|
15373
15374
|
const Se = de.trim();
|
|
15374
15375
|
if (!(!Se && qe.length === 0)) {
|
|
15375
15376
|
if (Se) {
|
|
@@ -15380,7 +15381,7 @@ function Si({
|
|
|
15380
15381
|
}
|
|
15381
15382
|
}
|
|
15382
15383
|
try {
|
|
15383
|
-
const Ie =
|
|
15384
|
+
const Ie = V ? (Ne == null ? void 0 : Ne.checkpointId) ?? W ?? void 0 : W ?? void 0, Ge = V ? (Ne == null ? void 0 : Ne.checkpointNs) ?? G ?? void 0 : G ?? void 0;
|
|
15384
15385
|
await Z(
|
|
15385
15386
|
{
|
|
15386
15387
|
text: Se || "",
|
|
@@ -15389,8 +15390,8 @@ function Si({
|
|
|
15389
15390
|
{
|
|
15390
15391
|
checkpointId: Ie,
|
|
15391
15392
|
checkpointNs: Ge,
|
|
15392
|
-
edit: !!
|
|
15393
|
-
originalMessageId:
|
|
15393
|
+
edit: !!V,
|
|
15394
|
+
originalMessageId: V ?? void 0
|
|
15394
15395
|
}
|
|
15395
15396
|
), h == null || h(Se), pt(""), Ye(null), tt([]), Ee(), J(null), re(""), He(null);
|
|
15396
15397
|
} catch (Ie) {
|
|
@@ -15398,7 +15399,7 @@ function Si({
|
|
|
15398
15399
|
Ye(Ge), m == null || m(Ge);
|
|
15399
15400
|
}
|
|
15400
15401
|
}
|
|
15401
|
-
},
|
|
15402
|
+
}, Kn = Q.useCallback(
|
|
15402
15403
|
(de, Se, Ie) => {
|
|
15403
15404
|
c && (et.current = Rt, J(de), re(Se), pt(Se), Ye(null), He({
|
|
15404
15405
|
checkpointId: (Ie == null ? void 0 : Ie.checkpointId) ?? null,
|
|
@@ -15410,9 +15411,9 @@ function Si({
|
|
|
15410
15411
|
J(null), re(""), He(null), Ye(null), pt(et.current ?? Rt), et.current = null;
|
|
15411
15412
|
}, [Rt, pt]), H = ge(
|
|
15412
15413
|
(de, Se, Ie) => {
|
|
15413
|
-
|
|
15414
|
+
Kn(de, Se, Ie);
|
|
15414
15415
|
},
|
|
15415
|
-
[
|
|
15416
|
+
[Kn]
|
|
15416
15417
|
), se = ge((de) => {
|
|
15417
15418
|
let Se = null;
|
|
15418
15419
|
for (let Yt = de - 1; Yt >= 0; Yt--)
|
|
@@ -15421,28 +15422,28 @@ function Si({
|
|
|
15421
15422
|
break;
|
|
15422
15423
|
}
|
|
15423
15424
|
if (!Se) return;
|
|
15424
|
-
const Ie = Array.isArray(Se.content) ? Se.content : [],
|
|
15425
|
+
const Ie = Array.isArray(Se.content) ? Se.content : [], jn = Ie.filter((Yt) => (Yt == null ? void 0 : Yt.type) === "text").map((Yt) => Yt.text).join("") || (() => {
|
|
15425
15426
|
try {
|
|
15426
15427
|
return JSON.stringify(Ie, null, 2);
|
|
15427
15428
|
} catch {
|
|
15428
15429
|
return String(Ie);
|
|
15429
15430
|
}
|
|
15430
15431
|
})();
|
|
15431
|
-
|
|
15432
|
-
{ text:
|
|
15432
|
+
jn && Z(
|
|
15433
|
+
{ text: jn },
|
|
15433
15434
|
{
|
|
15434
|
-
checkpointId:
|
|
15435
|
+
checkpointId: W ?? void 0,
|
|
15435
15436
|
checkpointNs: G ?? void 0,
|
|
15436
15437
|
edit: !0,
|
|
15437
15438
|
originalMessageId: Se.id
|
|
15438
15439
|
}
|
|
15439
15440
|
);
|
|
15440
|
-
}, [b, Z,
|
|
15441
|
+
}, [b, Z, W, G]), we = (de) => {
|
|
15441
15442
|
const Se = Array.from(de.target.files || []);
|
|
15442
15443
|
tt((Ie) => [...Ie, ...Se]), de.target.value = "";
|
|
15443
15444
|
}, Je = (de) => {
|
|
15444
15445
|
tt((Se) => {
|
|
15445
|
-
const Ie = Se.filter((Ge,
|
|
15446
|
+
const Ie = Se.filter((Ge, jn) => de !== jn);
|
|
15446
15447
|
return Ie.length === 0 && Ee(), Ie;
|
|
15447
15448
|
});
|
|
15448
15449
|
}, it = async (de) => {
|
|
@@ -15453,7 +15454,7 @@ function Si({
|
|
|
15453
15454
|
await Z(
|
|
15454
15455
|
{ attachments: [Se] },
|
|
15455
15456
|
{
|
|
15456
|
-
checkpointId:
|
|
15457
|
+
checkpointId: W ?? void 0,
|
|
15457
15458
|
checkpointNs: G ?? void 0
|
|
15458
15459
|
}
|
|
15459
15460
|
);
|
|
@@ -15468,7 +15469,7 @@ function Si({
|
|
|
15468
15469
|
}
|
|
15469
15470
|
}, Be = async (de) => {
|
|
15470
15471
|
if (g) {
|
|
15471
|
-
|
|
15472
|
+
K(!0);
|
|
15472
15473
|
try {
|
|
15473
15474
|
if (!de) {
|
|
15474
15475
|
await I(), requestAnimationFrame(() => {
|
|
@@ -15483,7 +15484,7 @@ function Si({
|
|
|
15483
15484
|
(Ge = N.current) == null || Ge.scrollToTop();
|
|
15484
15485
|
});
|
|
15485
15486
|
} finally {
|
|
15486
|
-
|
|
15487
|
+
K(!1);
|
|
15487
15488
|
}
|
|
15488
15489
|
}
|
|
15489
15490
|
}, Fe = ge(
|
|
@@ -15524,9 +15525,9 @@ function Si({
|
|
|
15524
15525
|
streamingAssistantId: oe,
|
|
15525
15526
|
streamingDebounceMs: typeof s == "number" ? s : o,
|
|
15526
15527
|
followNewMessages: i,
|
|
15527
|
-
layoutSize:
|
|
15528
|
+
layoutSize: Vn,
|
|
15528
15529
|
enableMessageEditing: c,
|
|
15529
|
-
editingMessageId:
|
|
15530
|
+
editingMessageId: V,
|
|
15530
15531
|
onEdit: H,
|
|
15531
15532
|
onRegenerate: se,
|
|
15532
15533
|
onCancelEdit: k,
|
|
@@ -15542,7 +15543,7 @@ function Si({
|
|
|
15542
15543
|
checkpointIndexByKey: ne,
|
|
15543
15544
|
attemptMetaById: fe,
|
|
15544
15545
|
userMessageIdToAttempts: Re,
|
|
15545
|
-
activeCheckpointId:
|
|
15546
|
+
activeCheckpointId: W,
|
|
15546
15547
|
onSelectCheckpoint: Fe,
|
|
15547
15548
|
timelineCheckpoints: be,
|
|
15548
15549
|
messagePreviews: $
|
|
@@ -15565,7 +15566,7 @@ function Si({
|
|
|
15565
15566
|
}
|
|
15566
15567
|
),
|
|
15567
15568
|
/* @__PURE__ */ u.jsxs("div", { className: wt, children: [
|
|
15568
|
-
|
|
15569
|
+
V && /* @__PURE__ */ u.jsx("div", { className: "mb-3 p-3 bg-blue-50 border border-blue-200 rounded-lg", children: /* @__PURE__ */ u.jsxs("div", { className: "flex items-center justify-between", children: [
|
|
15569
15570
|
/* @__PURE__ */ u.jsxs("div", { className: "flex items-center gap-2", children: [
|
|
15570
15571
|
/* @__PURE__ */ u.jsx(zc, { size: 16, className: "text-blue-600" }),
|
|
15571
15572
|
/* @__PURE__ */ u.jsx("span", { className: "text-sm font-medium text-blue-800", children: "Editing message" })
|
|
@@ -15673,18 +15674,18 @@ function Si({
|
|
|
15673
15674
|
ey,
|
|
15674
15675
|
{
|
|
15675
15676
|
initialValue: ae,
|
|
15676
|
-
editingMessageId:
|
|
15677
|
+
editingMessageId: V,
|
|
15677
15678
|
value: Rt,
|
|
15678
15679
|
onValueChange: Wt,
|
|
15679
|
-
placeholder:
|
|
15680
|
+
placeholder: V ? "Edit your message..." : t,
|
|
15680
15681
|
isStreaming: E,
|
|
15681
15682
|
disabled: D,
|
|
15682
15683
|
maxLength: Bo,
|
|
15683
|
-
onSend:
|
|
15684
|
+
onSend: _n,
|
|
15684
15685
|
onCancelEdit: k,
|
|
15685
15686
|
onStop: B,
|
|
15686
15687
|
allowEmptySend: qe.length > 0,
|
|
15687
|
-
textareaClassName: `resize-none min-h-[44px] max-h-[20rem] w-full transition-colors ${
|
|
15688
|
+
textareaClassName: `resize-none min-h-[44px] max-h-[20rem] w-full transition-colors ${V ? "border-blue-400 bg-blue-50 text-blue-900 dark:border-blue-500 dark:bg-blue-950/60 dark:text-blue-50" : ""} ${Oe ? "border-red-400" : ""} ${p.textarea || ""}`
|
|
15688
15689
|
}
|
|
15689
15690
|
) })
|
|
15690
15691
|
] })
|
|
@@ -16330,15 +16331,15 @@ function Dc({
|
|
|
16330
16331
|
} catch (z) {
|
|
16331
16332
|
console.error("Failed to update title:", z);
|
|
16332
16333
|
}
|
|
16333
|
-
},
|
|
16334
|
+
}, W = () => {
|
|
16334
16335
|
L(null), M("");
|
|
16335
16336
|
}, G = (q, z) => {
|
|
16336
|
-
q.key === "Enter" ? A(z) : q.key === "Escape" &&
|
|
16337
|
+
q.key === "Enter" ? A(z) : q.key === "Escape" && W();
|
|
16337
16338
|
}, oe = (q) => {
|
|
16338
16339
|
if (!q) return "";
|
|
16339
16340
|
try {
|
|
16340
|
-
const z = new Date(q), D = (/* @__PURE__ */ new Date()).getTime() - z.getTime(),
|
|
16341
|
-
return
|
|
16341
|
+
const z = new Date(q), D = (/* @__PURE__ */ new Date()).getTime() - z.getTime(), V = Math.floor(D / (1e3 * 60 * 60 * 24));
|
|
16342
|
+
return V === 0 ? z.toLocaleTimeString([], { hour: "2-digit", minute: "2-digit" }) : V === 1 ? "Yesterday" : V < 7 ? `${V} days ago` : z.toLocaleDateString();
|
|
16342
16343
|
} catch {
|
|
16343
16344
|
return "";
|
|
16344
16345
|
}
|
|
@@ -16381,7 +16382,7 @@ function Dc({
|
|
|
16381
16382
|
/* @__PURE__ */ u.jsx("div", { className: "flex-1 min-w-0", children: _ === q.threadId ? /* @__PURE__ */ u.jsxs("div", { className: "flex items-center gap-2", onClick: (z) => z.stopPropagation(), children: [
|
|
16382
16383
|
/* @__PURE__ */ u.jsx(cs, { value: P, onChange: (z) => M(z.target.value), onKeyDown: (z) => G(z, q.threadId), className: "h-6 text-sm", autoFocus: !0 }),
|
|
16383
16384
|
/* @__PURE__ */ u.jsx(rt, { variant: "ghost", size: "sm", onClick: () => A(q.threadId), className: "h-6 w-6 p-0", children: /* @__PURE__ */ u.jsx(ta, { size: 12 }) }),
|
|
16384
|
-
/* @__PURE__ */ u.jsx(rt, { variant: "ghost", size: "sm", onClick:
|
|
16385
|
+
/* @__PURE__ */ u.jsx(rt, { variant: "ghost", size: "sm", onClick: W, className: "h-6 w-6 p-0", children: /* @__PURE__ */ u.jsx(gr, { size: 12 }) })
|
|
16385
16386
|
] }) : /* @__PURE__ */ u.jsxs(u.Fragment, { children: [
|
|
16386
16387
|
/* @__PURE__ */ u.jsx("div", { className: "font-medium text-sm truncate text-gray-900 dark:text-slate-100", children: je(q) }),
|
|
16387
16388
|
/* @__PURE__ */ u.jsxs("div", { className: "flex items-center gap-2 text-xs text-gray-500 dark:text-slate-400 mt-1", children: [
|
|
@@ -16455,11 +16456,11 @@ function uT() {
|
|
|
16455
16456
|
return t && (e.baseUrl = t), n && (e.apiKey = n), e;
|
|
16456
16457
|
}
|
|
16457
16458
|
function dT() {
|
|
16458
|
-
const e = uT(), t =
|
|
16459
|
+
const e = uT(), t = Qn.getAuthToken(), n = Up();
|
|
16459
16460
|
return {
|
|
16460
16461
|
apiBaseUrl: Vp(
|
|
16461
16462
|
e.baseUrl,
|
|
16462
|
-
|
|
16463
|
+
Qn.baseUrl,
|
|
16463
16464
|
n
|
|
16464
16465
|
),
|
|
16465
16466
|
apiKey: t || e.apiKey || Wp() || "",
|
|
@@ -16489,13 +16490,13 @@ function pT(e) {
|
|
|
16489
16490
|
...e,
|
|
16490
16491
|
apiBaseUrl: Rn(e.apiBaseUrl)
|
|
16491
16492
|
};
|
|
16492
|
-
localStorage.setItem(Kp, JSON.stringify(t)), t.apiKey &&
|
|
16493
|
+
localStorage.setItem(Kp, JSON.stringify(t)), t.apiKey && Qn.setAuthToken(t.apiKey);
|
|
16493
16494
|
} catch (t) {
|
|
16494
16495
|
console.error("Failed to save settings:", t);
|
|
16495
16496
|
}
|
|
16496
16497
|
}
|
|
16497
16498
|
function $I() {
|
|
16498
|
-
const e = dT(), t = fT(), n =
|
|
16499
|
+
const e = dT(), t = fT(), n = Qn.getAuthToken(), r = typeof t.apiBaseUrl == "string" ? t.apiBaseUrl : void 0;
|
|
16499
16500
|
return {
|
|
16500
16501
|
...e,
|
|
16501
16502
|
...t,
|
|
@@ -16503,14 +16504,14 @@ function $I() {
|
|
|
16503
16504
|
apiKey: n || t.apiKey || e.apiKey,
|
|
16504
16505
|
// Always use the current base URL from API client
|
|
16505
16506
|
apiBaseUrl: Vp(
|
|
16506
|
-
|
|
16507
|
+
Qn.baseUrl,
|
|
16507
16508
|
r,
|
|
16508
16509
|
e.apiBaseUrl
|
|
16509
16510
|
)
|
|
16510
16511
|
};
|
|
16511
16512
|
}
|
|
16512
16513
|
function FI(e) {
|
|
16513
|
-
|
|
16514
|
+
Qn.updateConfig({
|
|
16514
16515
|
baseUrl: e.apiBaseUrl,
|
|
16515
16516
|
authToken: e.apiKey ?? void 0
|
|
16516
16517
|
}), pT(e);
|
|
@@ -16566,10 +16567,10 @@ var Xp = Object.freeze({
|
|
|
16566
16567
|
)
|
|
16567
16568
|
);
|
|
16568
16569
|
xT.displayName = gT;
|
|
16569
|
-
var yT = [" ", "Enter", "ArrowUp", "ArrowDown"], vT = [" ", "Enter"],
|
|
16570
|
+
var yT = [" ", "Enter", "ArrowUp", "ArrowDown"], vT = [" ", "Enter"], rr = "Select", [qs, Gs, wT] = fa(rr), [jr, BI] = Nn(rr, [
|
|
16570
16571
|
wT,
|
|
16571
16572
|
As
|
|
16572
|
-
]), Ys = As(), [bT,
|
|
16573
|
+
]), Ys = As(), [bT, Un] = jr(rr), [ST, CT] = jr(rr), Jp = (e) => {
|
|
16573
16574
|
const {
|
|
16574
16575
|
__scopeSelect: t,
|
|
16575
16576
|
children: n,
|
|
@@ -16589,12 +16590,12 @@ var yT = [" ", "Enter", "ArrowUp", "ArrowDown"], vT = [" ", "Enter"], or = "Sele
|
|
|
16589
16590
|
prop: r,
|
|
16590
16591
|
defaultProp: o ?? !1,
|
|
16591
16592
|
onChange: s,
|
|
16592
|
-
caller:
|
|
16593
|
+
caller: rr
|
|
16593
16594
|
}), [_, L] = Cr({
|
|
16594
16595
|
prop: i,
|
|
16595
16596
|
defaultProp: a,
|
|
16596
16597
|
onChange: l,
|
|
16597
|
-
caller:
|
|
16598
|
+
caller: rr
|
|
16598
16599
|
}), P = v.useRef(null), M = y ? x || !!y.closest("form") : !0, [$, E] = v.useState(/* @__PURE__ */ new Set()), F = Array.from($).map((j) => j.props.value).join(";");
|
|
16599
16600
|
return /* @__PURE__ */ u.jsx(Xu, { ...m, children: /* @__PURE__ */ u.jsxs(
|
|
16600
16601
|
bT,
|
|
@@ -16655,10 +16656,10 @@ var yT = [" ", "Enter", "ArrowUp", "ArrowDown"], vT = [" ", "Enter"], or = "Sele
|
|
|
16655
16656
|
}
|
|
16656
16657
|
) });
|
|
16657
16658
|
};
|
|
16658
|
-
Jp.displayName =
|
|
16659
|
+
Jp.displayName = rr;
|
|
16659
16660
|
var Zp = "SelectTrigger", Qp = v.forwardRef(
|
|
16660
16661
|
(e, t) => {
|
|
16661
|
-
const { __scopeSelect: n, disabled: r = !1, ...o } = e, s = Ys(n), i =
|
|
16662
|
+
const { __scopeSelect: n, disabled: r = !1, ...o } = e, s = Ys(n), i = Un(Zp, n), a = i.disabled || r, l = Ke(t, i.onTriggerChange), c = Gs(n), d = v.useRef("touch"), [f, p, h] = Ch((m) => {
|
|
16662
16663
|
const y = c().filter((b) => !b.disabled), g = y.find((b) => b.value === i.value), w = Th(y, m, g);
|
|
16663
16664
|
w !== void 0 && i.onValueChange(w.value);
|
|
16664
16665
|
}), x = (m) => {
|
|
@@ -16702,7 +16703,7 @@ var Zp = "SelectTrigger", Qp = v.forwardRef(
|
|
|
16702
16703
|
Qp.displayName = Zp;
|
|
16703
16704
|
var eh = "SelectValue", th = v.forwardRef(
|
|
16704
16705
|
(e, t) => {
|
|
16705
|
-
const { __scopeSelect: n, className: r, style: o, children: s, placeholder: i = "", ...a } = e, l =
|
|
16706
|
+
const { __scopeSelect: n, className: r, style: o, children: s, placeholder: i = "", ...a } = e, l = Un(eh, n), { onValueNodeHasChildrenChange: c } = l, d = s !== void 0, f = Ke(t, l.onValueNodeChange);
|
|
16706
16707
|
return Nt(() => {
|
|
16707
16708
|
c(d);
|
|
16708
16709
|
}, [c, d]), /* @__PURE__ */ u.jsx(
|
|
@@ -16726,9 +16727,9 @@ var TT = "SelectIcon", nh = v.forwardRef(
|
|
|
16726
16727
|
nh.displayName = TT;
|
|
16727
16728
|
var IT = "SelectPortal", rh = (e) => /* @__PURE__ */ u.jsx(Ns, { asChild: !0, ...e });
|
|
16728
16729
|
rh.displayName = IT;
|
|
16729
|
-
var
|
|
16730
|
+
var or = "SelectContent", oh = v.forwardRef(
|
|
16730
16731
|
(e, t) => {
|
|
16731
|
-
const n =
|
|
16732
|
+
const n = Un(or, e.__scopeSelect), [r, o] = v.useState();
|
|
16732
16733
|
if (Nt(() => {
|
|
16733
16734
|
o(new DocumentFragment());
|
|
16734
16735
|
}, []), !n.open) {
|
|
@@ -16741,8 +16742,8 @@ var sr = "SelectContent", oh = v.forwardRef(
|
|
|
16741
16742
|
return /* @__PURE__ */ u.jsx(ih, { ...e, ref: t });
|
|
16742
16743
|
}
|
|
16743
16744
|
);
|
|
16744
|
-
oh.displayName =
|
|
16745
|
-
var on = 10, [sh,
|
|
16745
|
+
oh.displayName = or;
|
|
16746
|
+
var on = 10, [sh, Wn] = jr(or), kT = "SelectContentImpl", RT = br("SelectContent.RemoveScroll"), ih = v.forwardRef(
|
|
16746
16747
|
(e, t) => {
|
|
16747
16748
|
const {
|
|
16748
16749
|
__scopeSelect: n,
|
|
@@ -16764,7 +16765,7 @@ var on = 10, [sh, Vn] = jr(sr), kT = "SelectContentImpl", RT = br("SelectContent
|
|
|
16764
16765
|
avoidCollisions: y,
|
|
16765
16766
|
//
|
|
16766
16767
|
...g
|
|
16767
|
-
} = e, w =
|
|
16768
|
+
} = e, w = Un(or, n), [b, T] = v.useState(null), [S, C] = v.useState(null), I = Ke(t, (Y) => T(Y)), [R, _] = v.useState(null), [L, P] = v.useState(
|
|
16768
16769
|
null
|
|
16769
16770
|
), M = Gs(n), [$, E] = v.useState(!1), F = v.useRef(!1);
|
|
16770
16771
|
v.useEffect(() => {
|
|
@@ -16772,7 +16773,7 @@ var on = 10, [sh, Vn] = jr(sr), kT = "SelectContentImpl", RT = br("SelectContent
|
|
|
16772
16773
|
}, [b]), pa();
|
|
16773
16774
|
const j = v.useCallback(
|
|
16774
16775
|
(Y) => {
|
|
16775
|
-
const [D, ...
|
|
16776
|
+
const [D, ...V] = M().map((re) => re.ref.current), [J] = V.slice(-1), ae = document.activeElement;
|
|
16776
16777
|
for (const re of Y)
|
|
16777
16778
|
if (re === ae || (re == null || re.scrollIntoView({ block: "nearest" }), re === D && S && (S.scrollTop = 0), re === J && S && (S.scrollTop = S.scrollHeight), re == null || re.focus(), document.activeElement !== ae)) return;
|
|
16778
16779
|
},
|
|
@@ -16794,11 +16795,11 @@ var on = 10, [sh, Vn] = jr(sr), kT = "SelectContentImpl", RT = br("SelectContent
|
|
|
16794
16795
|
x: Math.abs(Math.round(J.pageX) - (((ae = A.current) == null ? void 0 : ae.x) ?? 0)),
|
|
16795
16796
|
y: Math.abs(Math.round(J.pageY) - (((re = A.current) == null ? void 0 : re.y) ?? 0))
|
|
16796
16797
|
};
|
|
16797
|
-
},
|
|
16798
|
+
}, V = (J) => {
|
|
16798
16799
|
Y.x <= 10 && Y.y <= 10 ? J.preventDefault() : b.contains(J.target) || B(!1), document.removeEventListener("pointermove", D), A.current = null;
|
|
16799
16800
|
};
|
|
16800
|
-
return A.current !== null && (document.addEventListener("pointermove", D), document.addEventListener("pointerup",
|
|
16801
|
-
document.removeEventListener("pointermove", D), document.removeEventListener("pointerup",
|
|
16801
|
+
return A.current !== null && (document.addEventListener("pointermove", D), document.addEventListener("pointerup", V, { capture: !0, once: !0 })), () => {
|
|
16802
|
+
document.removeEventListener("pointermove", D), document.removeEventListener("pointerup", V, { capture: !0 });
|
|
16802
16803
|
};
|
|
16803
16804
|
}
|
|
16804
16805
|
}, [b, B, A]), v.useEffect(() => {
|
|
@@ -16807,18 +16808,18 @@ var on = 10, [sh, Vn] = jr(sr), kT = "SelectContentImpl", RT = br("SelectContent
|
|
|
16807
16808
|
window.removeEventListener("blur", Y), window.removeEventListener("resize", Y);
|
|
16808
16809
|
};
|
|
16809
16810
|
}, [B]);
|
|
16810
|
-
const [
|
|
16811
|
-
const D = M().filter((ae) => !ae.disabled),
|
|
16811
|
+
const [W, G] = Ch((Y) => {
|
|
16812
|
+
const D = M().filter((ae) => !ae.disabled), V = D.find((ae) => ae.ref.current === document.activeElement), J = Th(D, Y, V);
|
|
16812
16813
|
J && setTimeout(() => J.ref.current.focus());
|
|
16813
16814
|
}), oe = v.useCallback(
|
|
16814
|
-
(Y, D,
|
|
16815
|
-
const J = !F.current && !
|
|
16815
|
+
(Y, D, V) => {
|
|
16816
|
+
const J = !F.current && !V;
|
|
16816
16817
|
(w.value !== void 0 && w.value === D || J) && (_(Y), J && (F.current = !0));
|
|
16817
16818
|
},
|
|
16818
16819
|
[w.value]
|
|
16819
16820
|
), ve = v.useCallback(() => b == null ? void 0 : b.focus(), [b]), je = v.useCallback(
|
|
16820
|
-
(Y, D,
|
|
16821
|
-
const J = !F.current && !
|
|
16821
|
+
(Y, D, V) => {
|
|
16822
|
+
const J = !F.current && !V;
|
|
16822
16823
|
(w.value !== void 0 && w.value === D || J) && P(Y);
|
|
16823
16824
|
},
|
|
16824
16825
|
[w.value]
|
|
@@ -16849,7 +16850,7 @@ var on = 10, [sh, Vn] = jr(sr), kT = "SelectContentImpl", RT = br("SelectContent
|
|
|
16849
16850
|
selectedItemText: L,
|
|
16850
16851
|
position: r,
|
|
16851
16852
|
isPositioned: $,
|
|
16852
|
-
searchRef:
|
|
16853
|
+
searchRef: W,
|
|
16853
16854
|
children: /* @__PURE__ */ u.jsx(js, { as: RT, allowPinchZoom: !0, children: /* @__PURE__ */ u.jsx(
|
|
16854
16855
|
Ts,
|
|
16855
16856
|
{
|
|
@@ -16914,7 +16915,7 @@ var on = 10, [sh, Vn] = jr(sr), kT = "SelectContentImpl", RT = br("SelectContent
|
|
|
16914
16915
|
);
|
|
16915
16916
|
ih.displayName = kT;
|
|
16916
16917
|
var ET = "SelectItemAlignedPosition", ah = v.forwardRef((e, t) => {
|
|
16917
|
-
const { __scopeSelect: n, onPlaced: r, ...o } = e, s =
|
|
16918
|
+
const { __scopeSelect: n, onPlaced: r, ...o } = e, s = Un(or, n), i = Wn(or, n), [a, l] = v.useState(null), [c, d] = v.useState(null), f = Ke(t, (I) => d(I)), p = Gs(n), h = v.useRef(!1), x = v.useRef(!0), { viewport: m, selectedItem: y, selectedItemText: g, focusSelectedItem: w } = i, b = v.useCallback(() => {
|
|
16918
16919
|
if (s.trigger && s.valueNode && a && c && m && y && g) {
|
|
16919
16920
|
const I = s.trigger.getBoundingClientRect(), R = c.getBoundingClientRect(), _ = s.valueNode.getBoundingClientRect(), L = g.getBoundingClientRect();
|
|
16920
16921
|
if (s.dir !== "rtl") {
|
|
@@ -16935,7 +16936,7 @@ var ET = "SelectItemAlignedPosition", ah = v.forwardRef((e, t) => {
|
|
|
16935
16936
|
]);
|
|
16936
16937
|
a.style.minWidth = He + "px", a.style.right = qe + "px";
|
|
16937
16938
|
}
|
|
16938
|
-
const P = p(), M = window.innerHeight - on * 2, $ = m.scrollHeight, E = window.getComputedStyle(c), F = parseInt(E.borderTopWidth, 10), j = parseInt(E.paddingTop, 10), Z = parseInt(E.borderBottomWidth, 10), B = parseInt(E.paddingBottom, 10), A = F + j + $ + B + Z,
|
|
16939
|
+
const P = p(), M = window.innerHeight - on * 2, $ = m.scrollHeight, E = window.getComputedStyle(c), F = parseInt(E.borderTopWidth, 10), j = parseInt(E.paddingTop, 10), Z = parseInt(E.borderBottomWidth, 10), B = parseInt(E.paddingBottom, 10), A = F + j + $ + B + Z, W = Math.min(y.offsetHeight * 5, A), G = window.getComputedStyle(m), oe = parseInt(G.paddingTop, 10), ve = parseInt(G.paddingBottom, 10), je = I.top + I.height / 2 - on, q = M - je, z = y.offsetHeight / 2, Y = y.offsetTop + z, D = F + j + Y, V = A - D;
|
|
16939
16940
|
if (D <= je) {
|
|
16940
16941
|
const ae = P.length > 0 && y === P[P.length - 1].ref.current;
|
|
16941
16942
|
a.style.bottom = "0px";
|
|
@@ -16952,10 +16953,10 @@ var ET = "SelectItemAlignedPosition", ah = v.forwardRef((e, t) => {
|
|
|
16952
16953
|
je,
|
|
16953
16954
|
F + m.offsetTop + // viewport might have padding top, include it to avoid a scrollable viewport
|
|
16954
16955
|
(ae ? oe : 0) + z
|
|
16955
|
-
) +
|
|
16956
|
+
) + V;
|
|
16956
16957
|
a.style.height = Ne + "px", m.scrollTop = D - je + m.offsetTop;
|
|
16957
16958
|
}
|
|
16958
|
-
a.style.margin = `${on}px 0`, a.style.minHeight =
|
|
16959
|
+
a.style.margin = `${on}px 0`, a.style.minHeight = W + "px", a.style.maxHeight = M + "px", r == null || r(), requestAnimationFrame(() => h.current = !0);
|
|
16959
16960
|
}
|
|
16960
16961
|
}, [
|
|
16961
16962
|
p,
|
|
@@ -17047,9 +17048,9 @@ var AT = "SelectPopperPosition", Gi = v.forwardRef((e, t) => {
|
|
|
17047
17048
|
);
|
|
17048
17049
|
});
|
|
17049
17050
|
Gi.displayName = AT;
|
|
17050
|
-
var [NT, el] = jr(
|
|
17051
|
+
var [NT, el] = jr(or, {}), Yi = "SelectViewport", lh = v.forwardRef(
|
|
17051
17052
|
(e, t) => {
|
|
17052
|
-
const { __scopeSelect: n, nonce: r, ...o } = e, s =
|
|
17053
|
+
const { __scopeSelect: n, nonce: r, ...o } = e, s = Wn(Yi, n), i = el(Yi, n), a = Ke(t, s.onViewportChange), l = v.useRef(0);
|
|
17053
17054
|
return /* @__PURE__ */ u.jsxs(u.Fragment, { children: [
|
|
17054
17055
|
/* @__PURE__ */ u.jsx(
|
|
17055
17056
|
"style",
|
|
@@ -17122,7 +17123,7 @@ var fs = "SelectItem", [MT, fh] = jr(fs), ph = v.forwardRef(
|
|
|
17122
17123
|
disabled: o = !1,
|
|
17123
17124
|
textValue: s,
|
|
17124
17125
|
...i
|
|
17125
|
-
} = e, a =
|
|
17126
|
+
} = e, a = Un(fs, n), l = Wn(fs, n), c = a.value === r, [d, f] = v.useState(s ?? ""), [p, h] = v.useState(!1), x = Ke(
|
|
17126
17127
|
t,
|
|
17127
17128
|
(w) => {
|
|
17128
17129
|
var b;
|
|
@@ -17200,7 +17201,7 @@ var fs = "SelectItem", [MT, fh] = jr(fs), ph = v.forwardRef(
|
|
|
17200
17201
|
ph.displayName = fs;
|
|
17201
17202
|
var Fr = "SelectItemText", hh = v.forwardRef(
|
|
17202
17203
|
(e, t) => {
|
|
17203
|
-
const { __scopeSelect: n, className: r, style: o, ...s } = e, i =
|
|
17204
|
+
const { __scopeSelect: n, className: r, style: o, ...s } = e, i = Un(Fr, n), a = Wn(Fr, n), l = fh(Fr, n), c = CT(Fr, n), [d, f] = v.useState(null), p = Ke(
|
|
17204
17205
|
t,
|
|
17205
17206
|
(g) => f(g),
|
|
17206
17207
|
l.onItemTextChange,
|
|
@@ -17227,7 +17228,7 @@ var mh = "SelectItemIndicator", gh = v.forwardRef(
|
|
|
17227
17228
|
);
|
|
17228
17229
|
gh.displayName = mh;
|
|
17229
17230
|
var Xi = "SelectScrollUpButton", xh = v.forwardRef((e, t) => {
|
|
17230
|
-
const n =
|
|
17231
|
+
const n = Wn(Xi, e.__scopeSelect), r = el(Xi, e.__scopeSelect), [o, s] = v.useState(!1), i = Ke(t, r.onScrollButtonChange);
|
|
17231
17232
|
return Nt(() => {
|
|
17232
17233
|
if (n.viewport && n.isPositioned) {
|
|
17233
17234
|
let a = function() {
|
|
@@ -17251,7 +17252,7 @@ var Xi = "SelectScrollUpButton", xh = v.forwardRef((e, t) => {
|
|
|
17251
17252
|
});
|
|
17252
17253
|
xh.displayName = Xi;
|
|
17253
17254
|
var Ji = "SelectScrollDownButton", yh = v.forwardRef((e, t) => {
|
|
17254
|
-
const n =
|
|
17255
|
+
const n = Wn(Ji, e.__scopeSelect), r = el(Ji, e.__scopeSelect), [o, s] = v.useState(!1), i = Ke(t, r.onScrollButtonChange);
|
|
17255
17256
|
return Nt(() => {
|
|
17256
17257
|
if (n.viewport && n.isPositioned) {
|
|
17257
17258
|
let a = function() {
|
|
@@ -17275,7 +17276,7 @@ var Ji = "SelectScrollDownButton", yh = v.forwardRef((e, t) => {
|
|
|
17275
17276
|
});
|
|
17276
17277
|
yh.displayName = Ji;
|
|
17277
17278
|
var vh = v.forwardRef((e, t) => {
|
|
17278
|
-
const { __scopeSelect: n, onAutoScroll: r, ...o } = e, s =
|
|
17279
|
+
const { __scopeSelect: n, onAutoScroll: r, ...o } = e, s = Wn("SelectScrollButton", n), i = v.useRef(null), a = Gs(n), l = v.useCallback(() => {
|
|
17279
17280
|
i.current !== null && (window.clearInterval(i.current), i.current = null);
|
|
17280
17281
|
}, []);
|
|
17281
17282
|
return v.useEffect(() => () => l(), [l]), Nt(() => {
|
|
@@ -17310,7 +17311,7 @@ var vh = v.forwardRef((e, t) => {
|
|
|
17310
17311
|
wh.displayName = OT;
|
|
17311
17312
|
var Zi = "SelectArrow", DT = v.forwardRef(
|
|
17312
17313
|
(e, t) => {
|
|
17313
|
-
const { __scopeSelect: n, ...r } = e, o = Ys(n), s =
|
|
17314
|
+
const { __scopeSelect: n, ...r } = e, o = Ys(n), s = Un(Zi, n), i = Wn(Zi, n);
|
|
17314
17315
|
return s.open && i.position === "popper" ? /* @__PURE__ */ u.jsx(Qu, { ...o, ...r, ref: t }) : null;
|
|
17315
17316
|
}
|
|
17316
17317
|
);
|
|
@@ -17450,7 +17451,7 @@ const KT = v.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ u.jsx(
|
|
|
17450
17451
|
}
|
|
17451
17452
|
));
|
|
17452
17453
|
KT.displayName = Rh.displayName;
|
|
17453
|
-
const
|
|
17454
|
+
const qn = v.forwardRef(({ className: e, children: t, ...n }, r) => /* @__PURE__ */ u.jsxs(
|
|
17454
17455
|
Eh,
|
|
17455
17456
|
{
|
|
17456
17457
|
ref: r,
|
|
@@ -17465,7 +17466,7 @@ const Gn = v.forwardRef(({ className: e, children: t, ...n }, r) => /* @__PURE__
|
|
|
17465
17466
|
]
|
|
17466
17467
|
}
|
|
17467
17468
|
));
|
|
17468
|
-
|
|
17469
|
+
qn.displayName = Eh.displayName;
|
|
17469
17470
|
const qT = v.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ u.jsx(
|
|
17470
17471
|
_h,
|
|
17471
17472
|
{
|
|
@@ -17570,14 +17571,14 @@ const Fh = ({
|
|
|
17570
17571
|
);
|
|
17571
17572
|
Fh.displayName = "SheetHeader";
|
|
17572
17573
|
const Bh = v.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ u.jsx(
|
|
17573
|
-
|
|
17574
|
+
Jn,
|
|
17574
17575
|
{
|
|
17575
17576
|
ref: n,
|
|
17576
17577
|
className: te("text-lg font-semibold text-foreground", e),
|
|
17577
17578
|
...t
|
|
17578
17579
|
}
|
|
17579
17580
|
));
|
|
17580
|
-
Bh.displayName =
|
|
17581
|
+
Bh.displayName = Jn.displayName;
|
|
17581
17582
|
const zh = v.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ u.jsx(
|
|
17582
17583
|
Ws,
|
|
17583
17584
|
{
|
|
@@ -17704,7 +17705,7 @@ function Kh(e) {
|
|
|
17704
17705
|
return e ? "checked" : "unchecked";
|
|
17705
17706
|
}
|
|
17706
17707
|
var qh = Hh, sI = Wh;
|
|
17707
|
-
const
|
|
17708
|
+
const Mn = v.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ u.jsx(
|
|
17708
17709
|
qh,
|
|
17709
17710
|
{
|
|
17710
17711
|
className: te(
|
|
@@ -17723,7 +17724,7 @@ const On = v.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ u.jsx(
|
|
|
17723
17724
|
)
|
|
17724
17725
|
}
|
|
17725
17726
|
));
|
|
17726
|
-
|
|
17727
|
+
Mn.displayName = qh.displayName;
|
|
17727
17728
|
const iI = {
|
|
17728
17729
|
api: {
|
|
17729
17730
|
baseUrl: "http://localhost:8000/api",
|
|
@@ -17817,7 +17818,7 @@ function HI({ settings: e, onSettingsChange: t, className: n = "" }) {
|
|
|
17817
17818
|
/* @__PURE__ */ u.jsxs("div", { className: "flex items-center justify-between", children: [
|
|
17818
17819
|
/* @__PURE__ */ u.jsx(Jt, { htmlFor: "enable-auth", children: "Enable Authentication" }),
|
|
17819
17820
|
/* @__PURE__ */ u.jsx(
|
|
17820
|
-
|
|
17821
|
+
Mn,
|
|
17821
17822
|
{
|
|
17822
17823
|
id: "enable-auth",
|
|
17823
17824
|
checked: a.api.enableAuth,
|
|
@@ -17876,9 +17877,9 @@ function HI({ settings: e, onSettingsChange: t, className: n = "" }) {
|
|
|
17876
17877
|
children: [
|
|
17877
17878
|
/* @__PURE__ */ u.jsx(Qi, { children: /* @__PURE__ */ u.jsx($c, {}) }),
|
|
17878
17879
|
/* @__PURE__ */ u.jsxs(ea, { children: [
|
|
17879
|
-
/* @__PURE__ */ u.jsx(
|
|
17880
|
-
/* @__PURE__ */ u.jsx(
|
|
17881
|
-
/* @__PURE__ */ u.jsx(
|
|
17880
|
+
/* @__PURE__ */ u.jsx(qn, { value: "sidebar", children: "Sidebar Layout" }),
|
|
17881
|
+
/* @__PURE__ */ u.jsx(qn, { value: "fullscreen", children: "Fullscreen" }),
|
|
17882
|
+
/* @__PURE__ */ u.jsx(qn, { value: "tabs", children: "Tabbed Interface" })
|
|
17882
17883
|
] })
|
|
17883
17884
|
]
|
|
17884
17885
|
}
|
|
@@ -17897,9 +17898,9 @@ function HI({ settings: e, onSettingsChange: t, className: n = "" }) {
|
|
|
17897
17898
|
children: [
|
|
17898
17899
|
/* @__PURE__ */ u.jsx(Qi, { children: /* @__PURE__ */ u.jsx($c, {}) }),
|
|
17899
17900
|
/* @__PURE__ */ u.jsxs(ea, { children: [
|
|
17900
|
-
/* @__PURE__ */ u.jsx(
|
|
17901
|
-
/* @__PURE__ */ u.jsx(
|
|
17902
|
-
/* @__PURE__ */ u.jsx(
|
|
17901
|
+
/* @__PURE__ */ u.jsx(qn, { value: "light", children: "Light" }),
|
|
17902
|
+
/* @__PURE__ */ u.jsx(qn, { value: "dark", children: "Dark" }),
|
|
17903
|
+
/* @__PURE__ */ u.jsx(qn, { value: "system", children: "System" })
|
|
17903
17904
|
] })
|
|
17904
17905
|
]
|
|
17905
17906
|
}
|
|
@@ -17910,7 +17911,7 @@ function HI({ settings: e, onSettingsChange: t, className: n = "" }) {
|
|
|
17910
17911
|
/* @__PURE__ */ u.jsxs("div", { className: "flex items-center justify-between", children: [
|
|
17911
17912
|
/* @__PURE__ */ u.jsx(Jt, { htmlFor: "show-timestamps", children: "Show Timestamps" }),
|
|
17912
17913
|
/* @__PURE__ */ u.jsx(
|
|
17913
|
-
|
|
17914
|
+
Mn,
|
|
17914
17915
|
{
|
|
17915
17916
|
id: "show-timestamps",
|
|
17916
17917
|
checked: a.ui.showTimestamps,
|
|
@@ -17924,7 +17925,7 @@ function HI({ settings: e, onSettingsChange: t, className: n = "" }) {
|
|
|
17924
17925
|
/* @__PURE__ */ u.jsxs("div", { className: "flex items-center justify-between", children: [
|
|
17925
17926
|
/* @__PURE__ */ u.jsx(Jt, { htmlFor: "show-agent-names", children: "Show Agent Names" }),
|
|
17926
17927
|
/* @__PURE__ */ u.jsx(
|
|
17927
|
-
|
|
17928
|
+
Mn,
|
|
17928
17929
|
{
|
|
17929
17930
|
id: "show-agent-names",
|
|
17930
17931
|
checked: a.ui.showAgentNames,
|
|
@@ -17938,7 +17939,7 @@ function HI({ settings: e, onSettingsChange: t, className: n = "" }) {
|
|
|
17938
17939
|
/* @__PURE__ */ u.jsxs("div", { className: "flex items-center justify-between", children: [
|
|
17939
17940
|
/* @__PURE__ */ u.jsx(Jt, { htmlFor: "compact-messages", children: "Compact Messages" }),
|
|
17940
17941
|
/* @__PURE__ */ u.jsx(
|
|
17941
|
-
|
|
17942
|
+
Mn,
|
|
17942
17943
|
{
|
|
17943
17944
|
id: "compact-messages",
|
|
17944
17945
|
checked: a.ui.compactMessages,
|
|
@@ -17964,7 +17965,7 @@ function HI({ settings: e, onSettingsChange: t, className: n = "" }) {
|
|
|
17964
17965
|
/* @__PURE__ */ u.jsx("p", { className: "text-sm text-muted-foreground", children: "Automatically save messages to threads" })
|
|
17965
17966
|
] }),
|
|
17966
17967
|
/* @__PURE__ */ u.jsx(
|
|
17967
|
-
|
|
17968
|
+
Mn,
|
|
17968
17969
|
{
|
|
17969
17970
|
id: "auto-save",
|
|
17970
17971
|
checked: a.behavior.autoSave,
|
|
@@ -17981,7 +17982,7 @@ function HI({ settings: e, onSettingsChange: t, className: n = "" }) {
|
|
|
17981
17982
|
/* @__PURE__ */ u.jsx("p", { className: "text-sm text-muted-foreground", children: "Stream responses in real-time" })
|
|
17982
17983
|
] }),
|
|
17983
17984
|
/* @__PURE__ */ u.jsx(
|
|
17984
|
-
|
|
17985
|
+
Mn,
|
|
17985
17986
|
{
|
|
17986
17987
|
id: "enable-streaming",
|
|
17987
17988
|
checked: a.behavior.enableStreaming,
|
|
@@ -17998,7 +17999,7 @@ function HI({ settings: e, onSettingsChange: t, className: n = "" }) {
|
|
|
17998
17999
|
/* @__PURE__ */ u.jsx("p", { className: "text-sm text-muted-foreground", children: "Show typing indicator during responses" })
|
|
17999
18000
|
] }),
|
|
18000
18001
|
/* @__PURE__ */ u.jsx(
|
|
18001
|
-
|
|
18002
|
+
Mn,
|
|
18002
18003
|
{
|
|
18003
18004
|
id: "typing-indicator",
|
|
18004
18005
|
checked: a.behavior.showTypingIndicator,
|
|
@@ -18114,7 +18115,7 @@ export {
|
|
|
18114
18115
|
Dc as ThreadManager,
|
|
18115
18116
|
FI as applySettings,
|
|
18116
18117
|
Lx as buildMessagePreviewMap,
|
|
18117
|
-
|
|
18118
|
+
Qn as chatApiClient,
|
|
18118
18119
|
UI as default,
|
|
18119
18120
|
lx as del,
|
|
18120
18121
|
sn as get,
|