@multiplayer-app/ai-agent-react 0.4.2-beta.1 → 0.4.2-beta.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/ai-agent-react.cjs.js +6 -6
- package/dist/ai-agent-react.cjs.js.map +1 -1
- package/dist/ai-agent-react.es.js +213 -210
- package/dist/ai-agent-react.es.js.map +1 -1
- package/dist/components/ChatWindow/MessageList/ToolCallCard/SubagentToolCall.d.ts.map +1 -1
- package/dist/hooks/useChatSendController.d.ts.map +1 -1
- package/package.json +2 -2
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { z as U } from "zod";
|
|
2
2
|
import { jsx as T, Fragment as Rt, jsxs as re } from "react/jsx-runtime";
|
|
3
3
|
import * as ee from "react";
|
|
4
|
-
import tr, { forwardRef as ho, createElement as hd, useMemo as it, useState as Ze, useEffect as Be, useLayoutEffect as mo, memo as
|
|
4
|
+
import tr, { forwardRef as ho, createElement as hd, useMemo as it, useState as Ze, useEffect as Be, useLayoutEffect as mo, memo as ft, useCallback as Ge, useRef as Ve, createContext as ip, useContext as op, useImperativeHandle as D7, isValidElement as A5 } from "react";
|
|
5
5
|
import { useInfiniteQuery as sp, useQuery as mr, useQueryClient as z7, useMutation as r2, QueryClient as $7, QueryClientProvider as F7 } from "@tanstack/react-query";
|
|
6
6
|
import { create as P7, useStore as q7 } from "zustand";
|
|
7
7
|
import { nanoid as Tt } from "nanoid";
|
|
@@ -237,10 +237,10 @@ var _t;
|
|
|
237
237
|
(function(e) {
|
|
238
238
|
e.File = "file", e.Link = "link", e.Artifact = "artifact", e.Context = "context";
|
|
239
239
|
})(_t || (_t = {}));
|
|
240
|
-
var
|
|
240
|
+
var ht;
|
|
241
241
|
(function(e) {
|
|
242
242
|
e.Pending = "pending", e.Running = "running", e.Succeeded = "succeeded", e.Failed = "failed";
|
|
243
|
-
})(
|
|
243
|
+
})(ht || (ht = {}));
|
|
244
244
|
var o2;
|
|
245
245
|
(function(e) {
|
|
246
246
|
e.Queued = "queued", e.ApprovalRequired = "approvalRequired", e.Running = "running", e.Paused = "paused", e.Error = "error", e.Complete = "complete";
|
|
@@ -1391,13 +1391,13 @@ class l_ {
|
|
|
1391
1391
|
id: Tt(),
|
|
1392
1392
|
name: t,
|
|
1393
1393
|
input: n,
|
|
1394
|
-
status:
|
|
1394
|
+
status: ht.Running
|
|
1395
1395
|
};
|
|
1396
1396
|
try {
|
|
1397
1397
|
const s = await i.handler(n, r);
|
|
1398
|
-
o.status =
|
|
1398
|
+
o.status = ht.Succeeded, o.output = s ?? {};
|
|
1399
1399
|
} catch (s) {
|
|
1400
|
-
throw o.status =
|
|
1400
|
+
throw o.status = ht.Failed, o.error = s.message, s;
|
|
1401
1401
|
}
|
|
1402
1402
|
return o;
|
|
1403
1403
|
}
|
|
@@ -29903,7 +29903,7 @@ function xp(e, t) {
|
|
|
29903
29903
|
Array.from(N).every((ye) => !Tr(K, ye)))
|
|
29904
29904
|
return;
|
|
29905
29905
|
if (Gt(z) && Z) {
|
|
29906
|
-
const ye = ir(z), ke = wn(z), Ie = /auto|scroll/, Pe = ye || Ie.test(ke.overflowX), Je = ye || Ie.test(ke.overflowY), Xe = Pe && z.clientWidth > 0 && z.scrollWidth > z.clientWidth,
|
|
29906
|
+
const ye = ir(z), ke = wn(z), Ie = /auto|scroll/, Pe = ye || Ie.test(ke.overflowX), Je = ye || Ie.test(ke.overflowY), Xe = Pe && z.clientWidth > 0 && z.scrollWidth > z.clientWidth, lt = Je && z.clientHeight > 0 && z.scrollHeight > z.clientHeight, xt = ke.direction === "rtl", et = lt && (xt ? W.offsetX <= z.offsetWidth - z.clientWidth : W.offsetX > z.clientWidth), ie = Xe && W.offsetY > z.clientHeight;
|
|
29907
29907
|
if (et || ie)
|
|
29908
29908
|
return;
|
|
29909
29909
|
}
|
|
@@ -30295,11 +30295,11 @@ function J8e(e, t) {
|
|
|
30295
30295
|
}, [e, E]);
|
|
30296
30296
|
const R = Jt(() => {
|
|
30297
30297
|
l(z.current === -1 ? null : z.current);
|
|
30298
|
-
}), H = z6e(a.domReference), j = ee.useRef(_), z = ee.useRef(d ?? -1), V = ee.useRef(null), N = ee.useRef(!0), K = ee.useRef(R), J = ee.useRef(!!a.floating), L = ee.useRef(n), se = ee.useRef(!1), ye = ee.useRef(!1), ke = Fn(w), Ie = Fn(n), Pe = Fn(D), Je = Fn(d), [Xe,
|
|
30298
|
+
}), H = z6e(a.domReference), j = ee.useRef(_), z = ee.useRef(d ?? -1), V = ee.useRef(null), N = ee.useRef(!0), K = ee.useRef(R), J = ee.useRef(!!a.floating), L = ee.useRef(n), se = ee.useRef(!1), ye = ee.useRef(!1), ke = Fn(w), Ie = Fn(n), Pe = Fn(D), Je = Fn(d), [Xe, lt] = ee.useState(), [xt, et] = ee.useState(), ie = Jt(() => {
|
|
30299
30299
|
function ve(B) {
|
|
30300
30300
|
if (g) {
|
|
30301
30301
|
var X;
|
|
30302
|
-
(X = B.id) != null && X.endsWith("-fui-option") && (B.id = i + "-" + Math.random().toString(16).slice(2, 10)),
|
|
30302
|
+
(X = B.id) != null && X.endsWith("-fui-option") && (B.id = i + "-" + Math.random().toString(16).slice(2, 10)), lt(B.id), W?.events.emit("virtualfocus", B), P && (P.current = B);
|
|
30303
30303
|
} else
|
|
30304
30304
|
B8e(B, {
|
|
30305
30305
|
sync: se.current,
|
|
@@ -30415,7 +30415,7 @@ function J8e(e, t) {
|
|
|
30415
30415
|
}, () => ({
|
|
30416
30416
|
width: 1,
|
|
30417
30417
|
height: 1
|
|
30418
|
-
})), X = K6e(B, x, I), oe = X.findIndex((qe) => qe != null && !Ci(o, qe, w)), ne = X.reduce((qe,
|
|
30418
|
+
})), X = K6e(B, x, I), oe = X.findIndex((qe) => qe != null && !Ci(o, qe, w)), ne = X.reduce((qe, dt, Nt) => dt != null && !Ci(o, dt, w) ? Nt : qe, -1), _e = X[W6e({
|
|
30419
30419
|
current: X.map((qe) => qe != null ? o.current[qe] : null)
|
|
30420
30420
|
}, {
|
|
30421
30421
|
event: ve,
|
|
@@ -30425,7 +30425,7 @@ function J8e(e, t) {
|
|
|
30425
30425
|
cols: x,
|
|
30426
30426
|
// treat undefined (empty grid spaces) as disabled indices so we
|
|
30427
30427
|
// don't end up in them
|
|
30428
|
-
disabledIndices: Z6e([...(typeof w != "function" ? w : null) || o.current.map((qe,
|
|
30428
|
+
disabledIndices: Z6e([...(typeof w != "function" ? w : null) || o.current.map((qe, dt) => Ci(o, dt, w) ? dt : void 0), void 0], X),
|
|
30429
30429
|
minIndex: oe,
|
|
30430
30430
|
maxIndex: ne,
|
|
30431
30431
|
prevIndex: Y6e(
|
|
@@ -30484,7 +30484,7 @@ function J8e(e, t) {
|
|
|
30484
30484
|
...Le,
|
|
30485
30485
|
onKeyDown(be) {
|
|
30486
30486
|
N.current = !1;
|
|
30487
|
-
const Re = be.key.startsWith("Arrow"), B = ["Home", "End"].includes(be.key), X = Re || B, oe = O2(be.key, E, f), ne = L2(be.key, E, f, x), _e = O2(be.key, Ye(), f), qe = ai(be.key, E),
|
|
30487
|
+
const Re = be.key.startsWith("Arrow"), B = ["Home", "End"].includes(be.key), X = Re || B, oe = O2(be.key, E, f), ne = L2(be.key, E, f, x), _e = O2(be.key, Ye(), f), qe = ai(be.key, E), dt = (m ? _e : qe) || be.key === "Enter" || be.key.trim() === "";
|
|
30488
30488
|
if (g && n) {
|
|
30489
30489
|
const Et = W?.nodesRef.current.find((Bt) => Bt.parentId == null), Ot = W && Et ? F6e(W.nodesRef.current, Et.id) : null;
|
|
30490
30490
|
if (X && Ot && P) {
|
|
@@ -30506,7 +30506,7 @@ function J8e(e, t) {
|
|
|
30506
30506
|
return ue(be);
|
|
30507
30507
|
}
|
|
30508
30508
|
if (!(!n && !b && Re)) {
|
|
30509
|
-
if (
|
|
30509
|
+
if (dt) {
|
|
30510
30510
|
const Et = ai(be.key, Ye());
|
|
30511
30511
|
V.current = m && Et ? null : be.key;
|
|
30512
30512
|
}
|
|
@@ -30685,7 +30685,7 @@ const Pn = ({
|
|
|
30685
30685
|
}, fn = () => {
|
|
30686
30686
|
const e = Fe();
|
|
30687
30687
|
return { ...md, ...e.config.translations ?? {} };
|
|
30688
|
-
}, D2 = 300, k3 =
|
|
30688
|
+
}, D2 = 300, k3 = ft(({ field: e, isExpanded: t, canApply: n, onToggleExpand: r, onApply: a }) => {
|
|
30689
30689
|
const i = fn(), o = e.value.length > D2, s = o && !t ? `${e.value.slice(0, D2)}...` : e.value, l = Ge(() => {
|
|
30690
30690
|
r(e.name);
|
|
30691
30691
|
}, [e.name, r]), u = Ge(() => {
|
|
@@ -31031,7 +31031,7 @@ const x3 = 30 * 1e3, E3 = 5 * 60 * 1e3, M3 = 20, Er = {
|
|
|
31031
31031
|
refetchOnWindowFocus: !1
|
|
31032
31032
|
});
|
|
31033
31033
|
}, ii = (e) => e.type === _t.Context && e?.metadata?.kind === "pageContext";
|
|
31034
|
-
var
|
|
31034
|
+
var yt = /* @__PURE__ */ ((e) => (e.Idle = "idle", e.Sending = "sending", e.Streaming = "streaming", e))(yt || {});
|
|
31035
31035
|
const Ia = (e) => e === Yr.Streaming || e === Yr.Processing || e === Yr.WaitingForUserAction ? "streaming" : "idle", N3 = () => ({
|
|
31036
31036
|
messages: [],
|
|
31037
31037
|
reasoning: [],
|
|
@@ -31562,11 +31562,11 @@ const Ia = (e) => e === Yr.Streaming || e === Yr.Processing || e === Yr.WaitingF
|
|
|
31562
31562
|
const x = (e.output ?? {})?._mp?.lastAction, D = typeof x?.action == "string" ? x.action : void 0, P = typeof x?.at == "string" ? x.at : void 0;
|
|
31563
31563
|
return { action: D, at: P };
|
|
31564
31564
|
}, [e.output]), p = it(() => d.action === "apply", [d.action]), h = it(() => d.action === "reject", [d.action]), m = it(
|
|
31565
|
-
() => e.status ===
|
|
31565
|
+
() => e.status === ht.Succeeded && !!s.formId && s.fields.length > 0 && !p,
|
|
31566
31566
|
[e.status, s.formId, s.fields.length, p]
|
|
31567
31567
|
);
|
|
31568
31568
|
it(
|
|
31569
|
-
() => e.status ===
|
|
31569
|
+
() => e.status === ht.Succeeded && !!s.formId && s.fields.length > 0 && !p && !h,
|
|
31570
31570
|
[e.status, s.formId, s.fields.length, p, h]
|
|
31571
31571
|
);
|
|
31572
31572
|
const f = Ge(
|
|
@@ -31635,7 +31635,7 @@ const Ia = (e) => e === Yr.Streaming || e === Yr.Processing || e === Yr.WaitingF
|
|
|
31635
31635
|
), b = Ge(() => {
|
|
31636
31636
|
g(s.fields);
|
|
31637
31637
|
}, [g, s.fields]), w = s.formName ? `${o.formProposalHeaderPrefix} ${s.formName}` : `${o.formProposalHeaderPrefix} ${s.formId}`;
|
|
31638
|
-
return e.status ===
|
|
31638
|
+
return e.status === ht.Failed && e.error ? /* @__PURE__ */ T("div", { className: "mp-agent-tool-body", children: /* @__PURE__ */ T("div", { className: "mp-agent-tool-simple-message", children: o.formProposalFailed }) }) : e.status !== ht.Succeeded ? /* @__PURE__ */ T("div", { className: "mp-agent-tool-simple-message", children: o.formProposalPreparing }) : !s.formId || s.fields.length === 0 ? /* @__PURE__ */ T("div", { className: "mp-agent-tool-simple-message", children: o.formProposalNone }) : /* @__PURE__ */ re("div", { className: "mp-agent-tool-body", children: [
|
|
31639
31639
|
/* @__PURE__ */ T("div", { className: "mp-agent-tool-simple-message", children: w }),
|
|
31640
31640
|
s.notes ? /* @__PURE__ */ T("div", { className: "mp-agent-tool-simple-message", children: s.notes }) : null,
|
|
31641
31641
|
/* @__PURE__ */ T("div", { className: "mp-agent-form-proposal-fields", children: s.fields.map((E) => /* @__PURE__ */ T(
|
|
@@ -31712,10 +31712,10 @@ const Ia = (e) => e === Yr.Streaming || e === Yr.Processing || e === Yr.WaitingF
|
|
|
31712
31712
|
window.open(d, "_blank", "noreferrer");
|
|
31713
31713
|
}
|
|
31714
31714
|
}, []);
|
|
31715
|
-
return e.status ===
|
|
31715
|
+
return e.status === ht.Failed || r.error ? /* @__PURE__ */ re("div", { className: "mp-agent-tool-body", children: [
|
|
31716
31716
|
/* @__PURE__ */ T("div", { className: "mp-agent-tool-simple-message", children: n.imageGenerationFailed }),
|
|
31717
31717
|
r.error ? /* @__PURE__ */ T("div", { className: "mp-agent-tool-error", children: r.error }) : null
|
|
31718
|
-
] }) : e.status !==
|
|
31718
|
+
] }) : e.status !== ht.Succeeded ? /* @__PURE__ */ T("div", { className: "mp-agent-tool-body mp-agent-image-tool", children: /* @__PURE__ */ re("div", { className: "mp-agent-image-tool-loading", children: [
|
|
31719
31719
|
/* @__PURE__ */ T(bd, { size: 16 }),
|
|
31720
31720
|
/* @__PURE__ */ T("span", { children: n.imageGenerationGenerating })
|
|
31721
31721
|
] }) }) : r.images.length ? /* @__PURE__ */ T("div", { className: "mp-agent-tool-body mp-agent-image-tool", children: /* @__PURE__ */ T("div", { className: "mp-agent-image-tool-grid", children: r.images.map((u) => {
|
|
@@ -32124,7 +32124,7 @@ class E7e {
|
|
|
32124
32124
|
id: Tt(),
|
|
32125
32125
|
name: t,
|
|
32126
32126
|
input: n,
|
|
32127
|
-
status:
|
|
32127
|
+
status: ht.Running
|
|
32128
32128
|
};
|
|
32129
32129
|
this.writeToolCall(a, i);
|
|
32130
32130
|
const o = this.buildToolContext(a);
|
|
@@ -32134,7 +32134,7 @@ class E7e {
|
|
|
32134
32134
|
} catch (s) {
|
|
32135
32135
|
const l = {
|
|
32136
32136
|
...i,
|
|
32137
|
-
status:
|
|
32137
|
+
status: ht.Failed,
|
|
32138
32138
|
error: s instanceof Error ? s.message : "Unknown tool error"
|
|
32139
32139
|
};
|
|
32140
32140
|
throw this.writeToolCall(a, l), s;
|
|
@@ -34747,7 +34747,7 @@ const N_e = ip(null), A_e = ({ children: e }) => {
|
|
|
34747
34747
|
}
|
|
34748
34748
|
const Ie = a.getChatMetadata({ contextKey: o });
|
|
34749
34749
|
Ie && (ke = { ...ke ?? {}, ...Ie });
|
|
34750
|
-
const Pe = a.store.getState(), Je = s ? Pe.chats[s] : void 0,
|
|
34750
|
+
const Pe = a.store.getState(), Je = s ? Pe.chats[s] : void 0, lt = (s ? Pe.chatState[s] : void 0)?.messages ?? [], xt = N.filter((pe) => K3(pe) ? !C_e(lt, pe) : !0), et = Je?.model, ie = i.model !== et;
|
|
34751
34751
|
let we, xe = !1;
|
|
34752
34752
|
ie ? (we = i.model, xe = !0) : et ? (we = et, xe = !1) : (we = void 0, xe = !1);
|
|
34753
34753
|
const Ye = R_e(V), ue = {
|
|
@@ -34773,7 +34773,7 @@ const N_e = ip(null), A_e = ({ children: e }) => {
|
|
|
34773
34773
|
}
|
|
34774
34774
|
throw pe;
|
|
34775
34775
|
}, Ce = async () => {
|
|
34776
|
-
h(se.current,
|
|
34776
|
+
h(se.current, yt.Sending);
|
|
34777
34777
|
try {
|
|
34778
34778
|
if (!a.transport.sendMultiUserMessage)
|
|
34779
34779
|
throw new Error("Multi-user chat requires a transport that supports sendMultiUserMessage");
|
|
@@ -34784,7 +34784,7 @@ const N_e = ip(null), A_e = ({ children: e }) => {
|
|
|
34784
34784
|
}
|
|
34785
34785
|
}, ve = async () => {
|
|
34786
34786
|
let pe = `pending-${Date.now()}`, be = "", Re;
|
|
34787
|
-
h(se.current,
|
|
34787
|
+
h(se.current, yt.Streaming), k(se.current, {
|
|
34788
34788
|
id: pe,
|
|
34789
34789
|
content: "",
|
|
34790
34790
|
reasoning: "",
|
|
@@ -34819,7 +34819,7 @@ const N_e = ip(null), A_e = ({ children: e }) => {
|
|
|
34819
34819
|
content: _e,
|
|
34820
34820
|
createdAt: (/* @__PURE__ */ new Date()).toISOString()
|
|
34821
34821
|
};
|
|
34822
|
-
w(se.current, [{ ...qe, content: _e }]), h(se.current,
|
|
34822
|
+
w(se.current, [{ ...qe, content: _e }]), h(se.current, yt.Idle), Le();
|
|
34823
34823
|
return;
|
|
34824
34824
|
}
|
|
34825
34825
|
if (ne.message && ne.message.role === We.User) {
|
|
@@ -34829,7 +34829,7 @@ const N_e = ip(null), A_e = ({ children: e }) => {
|
|
|
34829
34829
|
ne.message && (pe = ne.message.id, Re = {
|
|
34830
34830
|
...ne.message,
|
|
34831
34831
|
reasoning: be || ne.message.reasoning
|
|
34832
|
-
}, k(se.current, Re)), ne.done && (Re && w(se.current, [Re]), h(se.current,
|
|
34832
|
+
}, k(se.current, Re)), ne.done && (Re && w(se.current, [Re]), h(se.current, yt.Idle), Le());
|
|
34833
34833
|
}, oe = await a.transport.streamMessage(
|
|
34834
34834
|
ue,
|
|
34835
34835
|
X,
|
|
@@ -34837,7 +34837,7 @@ const N_e = ip(null), A_e = ({ children: e }) => {
|
|
|
34837
34837
|
);
|
|
34838
34838
|
if (oe) {
|
|
34839
34839
|
const ne = oe.messages.map(
|
|
34840
|
-
(
|
|
34840
|
+
(dt) => Re && dt.id === Re.id && dt.role === We.Assistant ? { ...dt, reasoning: be } : dt
|
|
34841
34841
|
);
|
|
34842
34842
|
w(oe.id, ne);
|
|
34843
34843
|
const _e = a.store.getState();
|
|
@@ -34856,9 +34856,9 @@ const N_e = ip(null), A_e = ({ children: e }) => {
|
|
|
34856
34856
|
const be = pe?.chat;
|
|
34857
34857
|
be && (p(be), m(be.id));
|
|
34858
34858
|
const Re = pe instanceof Error ? pe : new Error("Failed to send message");
|
|
34859
|
-
return f(se.current, Re.message || "Failed to send message"), h(se.current,
|
|
34859
|
+
return f(se.current, Re.message || "Failed to send message"), h(se.current, yt.Idle), t.current?.setDraft(ye), D.current = !1, { type: "error", error: Re };
|
|
34860
34860
|
} finally {
|
|
34861
|
-
P.current = !1, n || h(se.current,
|
|
34861
|
+
P.current = !1, n || h(se.current, yt.Idle), C.current = void 0;
|
|
34862
34862
|
}
|
|
34863
34863
|
},
|
|
34864
34864
|
[
|
|
@@ -34882,7 +34882,7 @@ const N_e = ip(null), A_e = ({ children: e }) => {
|
|
|
34882
34882
|
f
|
|
34883
34883
|
]
|
|
34884
34884
|
), W = Ge(async () => {
|
|
34885
|
-
if (d !==
|
|
34885
|
+
if (d !== yt.Idle || P.current || !u.length || D.current)
|
|
34886
34886
|
return;
|
|
34887
34887
|
const V = u[0];
|
|
34888
34888
|
P.current = !0, _(q, V.id);
|
|
@@ -34913,7 +34913,7 @@ const N_e = ip(null), A_e = ({ children: e }) => {
|
|
|
34913
34913
|
), H = Ge(
|
|
34914
34914
|
async (V) => {
|
|
34915
34915
|
const K = t.current.getDraft().attachments;
|
|
34916
|
-
if (!n && d !==
|
|
34916
|
+
if (!n && d !== yt.Idle) {
|
|
34917
34917
|
b(q, V, K), t.current?.clearDraft();
|
|
34918
34918
|
return;
|
|
34919
34919
|
}
|
|
@@ -34932,17 +34932,22 @@ const N_e = ip(null), A_e = ({ children: e }) => {
|
|
|
34932
34932
|
), j = Ge(() => {
|
|
34933
34933
|
D.current = !0;
|
|
34934
34934
|
const V = C.current ?? q;
|
|
34935
|
-
I.current.add(V), a.transport.cancelStream?.(V), E(V), h(V,
|
|
34935
|
+
I.current.add(V), a.transport.cancelStream?.(V), E(V), h(V, yt.Idle);
|
|
34936
34936
|
}, [q, a.transport, E, h]), z = Ge(
|
|
34937
34937
|
async (V) => {
|
|
34938
|
-
d ===
|
|
34938
|
+
d === yt.Streaming && j(), await R(V);
|
|
34939
34939
|
},
|
|
34940
34940
|
[d, j, R]
|
|
34941
34941
|
);
|
|
34942
34942
|
return {
|
|
34943
34943
|
pendingKey: q,
|
|
34944
34944
|
queuedMessages: u,
|
|
34945
|
-
|
|
34945
|
+
// Multi-user chats report the real status too: the server keeps chat.status
|
|
34946
|
+
// current over socket ChatUpdate events, and the composer needs it to offer
|
|
34947
|
+
// Stop while the agent (and its subagents) are running. Send is never
|
|
34948
|
+
// queue-blocked in multi-user mode, so surfacing the status only affects
|
|
34949
|
+
// the Stop affordance.
|
|
34950
|
+
activeChatStatus: d,
|
|
34946
34951
|
activeChatId: s,
|
|
34947
34952
|
removeQueuedMessage: _,
|
|
34948
34953
|
handleSubmit: H,
|
|
@@ -35442,7 +35447,7 @@ const G_e = ({
|
|
|
35442
35447
|
}
|
|
35443
35448
|
)
|
|
35444
35449
|
] });
|
|
35445
|
-
}, W_e =
|
|
35450
|
+
}, W_e = ft(() => {
|
|
35446
35451
|
const e = Fe(), t = fe((p) => p.composer), n = fe((p) => p.contextKey), r = fe((p) => p.setComposerOptions), a = e.config.models, { data: i, isLoading: o } = r7e(), s = it(() => {
|
|
35447
35452
|
const p = i && i.length > 0 ? i : a;
|
|
35448
35453
|
return I3(p, e.config.transport).filter((m) => !m.contexts?.length || m.contexts.includes(n));
|
|
@@ -35766,7 +35771,7 @@ const Q_e = () => {
|
|
|
35766
35771
|
ie.key === "Enter" && !ie.shiftKey && (ie.preventDefault(), Pe(ie));
|
|
35767
35772
|
}, Xe = (ie) => {
|
|
35768
35773
|
h && k(d, void 0), f(d, ie.target.value);
|
|
35769
|
-
},
|
|
35774
|
+
}, lt = (ie) => {
|
|
35770
35775
|
if (ie.nativeEvent.shiftKey)
|
|
35771
35776
|
return;
|
|
35772
35777
|
const we = ie.clipboardData?.getData("text/plain") ?? "";
|
|
@@ -35798,7 +35803,7 @@ const Q_e = () => {
|
|
|
35798
35803
|
placeholder: t ? o.followUp : o.newChat,
|
|
35799
35804
|
onChange: Xe,
|
|
35800
35805
|
onKeyDown: Je,
|
|
35801
|
-
onPaste:
|
|
35806
|
+
onPaste: lt
|
|
35802
35807
|
}
|
|
35803
35808
|
)
|
|
35804
35809
|
] }),
|
|
@@ -35853,7 +35858,7 @@ const Q_e = () => {
|
|
|
35853
35858
|
}
|
|
35854
35859
|
)
|
|
35855
35860
|
] }),
|
|
35856
|
-
/* @__PURE__ */ T("div", { className: "mp-agent-composer-actions-right", children: n ===
|
|
35861
|
+
/* @__PURE__ */ T("div", { className: "mp-agent-composer-actions-right", children: n === yt.Streaming && !et ? /* @__PURE__ */ T(Pn, { content: o.stopStreaming, children: /* @__PURE__ */ T(
|
|
35857
35862
|
"button",
|
|
35858
35863
|
{
|
|
35859
35864
|
type: "button",
|
|
@@ -36878,20 +36883,20 @@ function bwe(e) {
|
|
|
36878
36883
|
...e
|
|
36879
36884
|
});
|
|
36880
36885
|
}
|
|
36881
|
-
const X3 =
|
|
36886
|
+
const X3 = ft(() => {
|
|
36882
36887
|
const e = fe((n) => n.activeChatId ?? n.draftChatKey), t = fe((n) => De(n, e).composerError);
|
|
36883
36888
|
return t ? /* @__PURE__ */ T("div", { className: "mp-agent-composer-error", children: t }) : null;
|
|
36884
36889
|
});
|
|
36885
36890
|
X3.displayName = "ComposerError";
|
|
36886
36891
|
const kwe = (e, t) => {
|
|
36887
36892
|
switch (e.status) {
|
|
36888
|
-
case
|
|
36893
|
+
case ht.Running:
|
|
36889
36894
|
return `Running ${t}...`;
|
|
36890
|
-
case
|
|
36895
|
+
case ht.Succeeded:
|
|
36891
36896
|
return `Completed ${t}`;
|
|
36892
|
-
case
|
|
36897
|
+
case ht.Failed:
|
|
36893
36898
|
return `Failed to run ${t}`;
|
|
36894
|
-
case
|
|
36899
|
+
case ht.Pending:
|
|
36895
36900
|
return `Preparing ${t}...`;
|
|
36896
36901
|
default:
|
|
36897
36902
|
return `Running ${t}...`;
|
|
@@ -36932,8 +36937,8 @@ const kwe = (e, t) => {
|
|
|
36932
36937
|
/* @__PURE__ */ T("pre", { className: "mp-agent-tool-debug-code", children: /* @__PURE__ */ T("code", { children: _s(e.error) }) })
|
|
36933
36938
|
] })
|
|
36934
36939
|
] })
|
|
36935
|
-
] }) : null, Q3 =
|
|
36936
|
-
const t = Fe(), n = e.status ===
|
|
36940
|
+
] }) : null, Q3 = ft(({ call: e }) => {
|
|
36941
|
+
const t = Fe(), n = e.status === ht.Succeeded || e.status === ht.Failed;
|
|
36937
36942
|
if (!t.config.debug || n)
|
|
36938
36943
|
return null;
|
|
36939
36944
|
const a = t.tools.get(e.name)?.label ?? e.name;
|
|
@@ -37099,7 +37104,7 @@ const J3 = ({ call: e }) => {
|
|
|
37099
37104
|
);
|
|
37100
37105
|
}, I = async (q, Y) => {
|
|
37101
37106
|
if (!(!e.approvalId || d || f || h)) {
|
|
37102
|
-
p(!0), C({ approved: q, ...Y ? { userResponse: Y } : {} }), l(n,
|
|
37107
|
+
p(!0), C({ approved: q, ...Y ? { userResponse: Y } : {} }), l(n, yt.Streaming), u(n, {
|
|
37103
37108
|
id: `pending-approval-${e.id}`,
|
|
37104
37109
|
chat: n,
|
|
37105
37110
|
role: We.Assistant,
|
|
@@ -37126,7 +37131,7 @@ const J3 = ({ call: e }) => {
|
|
|
37126
37131
|
);
|
|
37127
37132
|
W && o(W.id, W.messages), await r();
|
|
37128
37133
|
} catch (Z) {
|
|
37129
|
-
console.error("Failed to send approval:", Z), C({ approved: void 0, userResponse: void 0 }), l(n,
|
|
37134
|
+
console.error("Failed to send approval:", Z), C({ approved: void 0, userResponse: void 0 }), l(n, yt.Idle);
|
|
37130
37135
|
} finally {
|
|
37131
37136
|
u(n, void 0), p(!1);
|
|
37132
37137
|
}
|
|
@@ -37218,14 +37223,14 @@ const J3 = ({ call: e }) => {
|
|
|
37218
37223
|
const p = await r.transport.getChat(n);
|
|
37219
37224
|
a(p), i(n, Ia(p.status));
|
|
37220
37225
|
} catch (p) {
|
|
37221
|
-
console.error("Failed to refresh chat after approval:", p), i(n,
|
|
37226
|
+
console.error("Failed to refresh chat after approval:", p), i(n, yt.Idle);
|
|
37222
37227
|
}
|
|
37223
37228
|
};
|
|
37224
37229
|
return !l && !u ? null : /* @__PURE__ */ re("div", { className: "mp-agent-tool-approval", children: [
|
|
37225
37230
|
l && /* @__PURE__ */ T(xwe, { call: e, messageId: t, chatId: n, onApprovalSent: d }),
|
|
37226
37231
|
u && /* @__PURE__ */ T(J3, { call: e })
|
|
37227
37232
|
] });
|
|
37228
|
-
}, ev =
|
|
37233
|
+
}, ev = ft(({ chatId: e, isExpanded: t }) => {
|
|
37229
37234
|
const n = Fe(), r = fe((d) => De(d, e).messages), a = fe((d) => De(d, e).pendingAssistant), i = fe((d) => d.chats[e]?.contextKey ?? d.contextKey), [o, s] = Ze(t);
|
|
37230
37235
|
t && !o && s(!0);
|
|
37231
37236
|
const l = A3(e, { requireRegisteredChat: !1, enabled: o }), u = it(() => {
|
|
@@ -37243,19 +37248,17 @@ const J3 = ({ call: e }) => {
|
|
|
37243
37248
|
ev.displayName = "SubagentChatPreview";
|
|
37244
37249
|
const Ewe = (e) => {
|
|
37245
37250
|
switch (e) {
|
|
37246
|
-
case
|
|
37251
|
+
case ht.Succeeded:
|
|
37247
37252
|
return { key: "succeeded", label: "Done", icon: /* @__PURE__ */ T(cp, { size: 12 }) };
|
|
37248
|
-
case
|
|
37253
|
+
case ht.Failed:
|
|
37249
37254
|
return { key: "failed", label: "Failed", icon: /* @__PURE__ */ T(j5, { size: 12 }) };
|
|
37250
|
-
case
|
|
37255
|
+
case ht.Pending:
|
|
37251
37256
|
return { key: "running", label: "Preparing", icon: /* @__PURE__ */ T(Na, { size: 12, className: "mp-agent-subagent-spinner" }) };
|
|
37252
37257
|
default:
|
|
37253
37258
|
return { key: "running", label: "Running", icon: /* @__PURE__ */ T(Na, { size: 12, className: "mp-agent-subagent-spinner" }) };
|
|
37254
37259
|
}
|
|
37255
|
-
}, tv =
|
|
37256
|
-
const [n, r] = Ze(
|
|
37257
|
-
() => e.status === st.Running || e.status === st.Pending
|
|
37258
|
-
), a = fe((o) => {
|
|
37260
|
+
}, tv = ft(({ call: e, subagentChatId: t }) => {
|
|
37261
|
+
const [n, r] = Ze(!1), a = fe((o) => {
|
|
37259
37262
|
const { messages: s, pendingAssistant: l } = De(o, t), u = s.find((d) => d.agentName || d.sender?.type === "agent") ?? l;
|
|
37260
37263
|
return u?.agentName || u?.sender?.displayName || void 0;
|
|
37261
37264
|
}), i = Ewe(e.status);
|
|
@@ -37286,7 +37289,7 @@ const Ewe = (e) => {
|
|
|
37286
37289
|
] });
|
|
37287
37290
|
});
|
|
37288
37291
|
tv.displayName = "SubagentToolCall";
|
|
37289
|
-
const zp =
|
|
37292
|
+
const zp = ft(({ call: e, contextKey: t, messageId: n, chatId: r }) => {
|
|
37290
37293
|
const a = Fe(), i = e.subagentChatId || (typeof e.input?.subagentChatId == "string" ? e.input.subagentChatId : void 0), o = it(() => a.getToolRenderer(e), [a, e.name]), s = i ? /* @__PURE__ */ T(tv, { call: e, subagentChatId: i }) : null;
|
|
37291
37294
|
if (!o) {
|
|
37292
37295
|
const l = !!(e.requiresConfirmation && e.approvalId);
|
|
@@ -37311,12 +37314,12 @@ const Mwe = (e) => {
|
|
|
37311
37314
|
return e.role === We.User ? "You" : "AI";
|
|
37312
37315
|
const n = t.split(/\s+/).filter(Boolean);
|
|
37313
37316
|
return n.length >= 2 ? `${n[0][0]}${n[1][0]}`.toUpperCase() : t.slice(0, 2).toUpperCase();
|
|
37314
|
-
}, nv =
|
|
37317
|
+
}, nv = ft(({ message: e }) => {
|
|
37315
37318
|
const t = e.role === We.User;
|
|
37316
37319
|
return /* @__PURE__ */ T("div", { className: `mp-agent-message-avatar ${t ? "mp-agent-message-avatar-user" : ""}`, children: e.sender?.avatarUrl ? /* @__PURE__ */ T("img", { className: "mp-agent-message-avatar-image", src: e.sender.avatarUrl, alt: "" }) : /* @__PURE__ */ T("div", { className: "mp-agent-message-avatar-icon", children: Mwe(e) }) });
|
|
37317
37320
|
});
|
|
37318
37321
|
nv.displayName = "MessageAvatar";
|
|
37319
|
-
const Swe = (e) => e ? new Date(e).toLocaleTimeString("en-US", { hour: "numeric", minute: "2-digit" }) : "", Nwe = (e) => e.sender?.displayName ? e.sender.displayName : e.sender?.id && e.sender.id !== "guest" ? e.sender.id : e.agentName ? e.agentName : e.role === We.User ? "You" : "Assistant", rv =
|
|
37322
|
+
const Swe = (e) => e ? new Date(e).toLocaleTimeString("en-US", { hour: "numeric", minute: "2-digit" }) : "", Nwe = (e) => e.sender?.displayName ? e.sender.displayName : e.sender?.id && e.sender.id !== "guest" ? e.sender.id : e.agentName ? e.agentName : e.role === We.User ? "You" : "Assistant", rv = ft(({ message: e }) => {
|
|
37320
37323
|
const t = Nwe(e);
|
|
37321
37324
|
return /* @__PURE__ */ re("div", { className: "mp-agent-message-header", children: [
|
|
37322
37325
|
/* @__PURE__ */ T("span", { className: "mp-agent-message-role", children: t }),
|
|
@@ -37404,14 +37407,14 @@ Wt.prototype.property = "";
|
|
|
37404
37407
|
Wt.prototype.spaceSeparated = !1;
|
|
37405
37408
|
Wt.prototype.space = void 0;
|
|
37406
37409
|
let Lwe = 0;
|
|
37407
|
-
const Te = Rr(),
|
|
37410
|
+
const Te = Rr(), gt = Rr(), Rd = Rr(), le = Rr(), tt = Rr(), Nr = Rr(), Xt = Rr();
|
|
37408
37411
|
function Rr() {
|
|
37409
37412
|
return 2 ** ++Lwe;
|
|
37410
37413
|
}
|
|
37411
37414
|
const Id = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
37412
37415
|
__proto__: null,
|
|
37413
37416
|
boolean: Te,
|
|
37414
|
-
booleanish:
|
|
37417
|
+
booleanish: gt,
|
|
37415
37418
|
commaOrSpaceSeparated: Xt,
|
|
37416
37419
|
commaSeparated: Nr,
|
|
37417
37420
|
number: le,
|
|
@@ -37464,10 +37467,10 @@ function ia(e) {
|
|
|
37464
37467
|
const iv = ia({
|
|
37465
37468
|
properties: {
|
|
37466
37469
|
ariaActiveDescendant: null,
|
|
37467
|
-
ariaAtomic:
|
|
37470
|
+
ariaAtomic: gt,
|
|
37468
37471
|
ariaAutoComplete: null,
|
|
37469
|
-
ariaBusy:
|
|
37470
|
-
ariaChecked:
|
|
37472
|
+
ariaBusy: gt,
|
|
37473
|
+
ariaChecked: gt,
|
|
37471
37474
|
ariaColCount: le,
|
|
37472
37475
|
ariaColIndex: le,
|
|
37473
37476
|
ariaColSpan: le,
|
|
@@ -37475,36 +37478,36 @@ const iv = ia({
|
|
|
37475
37478
|
ariaCurrent: null,
|
|
37476
37479
|
ariaDescribedBy: tt,
|
|
37477
37480
|
ariaDetails: null,
|
|
37478
|
-
ariaDisabled:
|
|
37481
|
+
ariaDisabled: gt,
|
|
37479
37482
|
ariaDropEffect: tt,
|
|
37480
37483
|
ariaErrorMessage: null,
|
|
37481
|
-
ariaExpanded:
|
|
37484
|
+
ariaExpanded: gt,
|
|
37482
37485
|
ariaFlowTo: tt,
|
|
37483
|
-
ariaGrabbed:
|
|
37486
|
+
ariaGrabbed: gt,
|
|
37484
37487
|
ariaHasPopup: null,
|
|
37485
|
-
ariaHidden:
|
|
37488
|
+
ariaHidden: gt,
|
|
37486
37489
|
ariaInvalid: null,
|
|
37487
37490
|
ariaKeyShortcuts: null,
|
|
37488
37491
|
ariaLabel: null,
|
|
37489
37492
|
ariaLabelledBy: tt,
|
|
37490
37493
|
ariaLevel: le,
|
|
37491
37494
|
ariaLive: null,
|
|
37492
|
-
ariaModal:
|
|
37493
|
-
ariaMultiLine:
|
|
37494
|
-
ariaMultiSelectable:
|
|
37495
|
+
ariaModal: gt,
|
|
37496
|
+
ariaMultiLine: gt,
|
|
37497
|
+
ariaMultiSelectable: gt,
|
|
37495
37498
|
ariaOrientation: null,
|
|
37496
37499
|
ariaOwns: tt,
|
|
37497
37500
|
ariaPlaceholder: null,
|
|
37498
37501
|
ariaPosInSet: le,
|
|
37499
|
-
ariaPressed:
|
|
37500
|
-
ariaReadOnly:
|
|
37502
|
+
ariaPressed: gt,
|
|
37503
|
+
ariaReadOnly: gt,
|
|
37501
37504
|
ariaRelevant: null,
|
|
37502
|
-
ariaRequired:
|
|
37505
|
+
ariaRequired: gt,
|
|
37503
37506
|
ariaRoleDescription: tt,
|
|
37504
37507
|
ariaRowCount: le,
|
|
37505
37508
|
ariaRowIndex: le,
|
|
37506
37509
|
ariaRowSpan: le,
|
|
37507
|
-
ariaSelected:
|
|
37510
|
+
ariaSelected: gt,
|
|
37508
37511
|
ariaSetSize: le,
|
|
37509
37512
|
ariaSort: null,
|
|
37510
37513
|
ariaValueMax: le,
|
|
@@ -37563,7 +37566,7 @@ const Dwe = ia({
|
|
|
37563
37566
|
command: null,
|
|
37564
37567
|
commandFor: null,
|
|
37565
37568
|
content: null,
|
|
37566
|
-
contentEditable:
|
|
37569
|
+
contentEditable: gt,
|
|
37567
37570
|
controls: Te,
|
|
37568
37571
|
controlsList: tt,
|
|
37569
37572
|
coords: le | Nr,
|
|
@@ -37577,7 +37580,7 @@ const Dwe = ia({
|
|
|
37577
37580
|
dirName: null,
|
|
37578
37581
|
disabled: Te,
|
|
37579
37582
|
download: Rd,
|
|
37580
|
-
draggable:
|
|
37583
|
+
draggable: gt,
|
|
37581
37584
|
encType: null,
|
|
37582
37585
|
enterKeyHint: null,
|
|
37583
37586
|
fetchPriority: null,
|
|
@@ -37750,7 +37753,7 @@ const Dwe = ia({
|
|
|
37750
37753
|
sizes: null,
|
|
37751
37754
|
slot: null,
|
|
37752
37755
|
span: le,
|
|
37753
|
-
spellCheck:
|
|
37756
|
+
spellCheck: gt,
|
|
37754
37757
|
src: null,
|
|
37755
37758
|
srcDoc: null,
|
|
37756
37759
|
srcLang: null,
|
|
@@ -37765,7 +37768,7 @@ const Dwe = ia({
|
|
|
37765
37768
|
type: null,
|
|
37766
37769
|
typeMustMatch: Te,
|
|
37767
37770
|
useMap: null,
|
|
37768
|
-
value:
|
|
37771
|
+
value: gt,
|
|
37769
37772
|
width: le,
|
|
37770
37773
|
wrap: null,
|
|
37771
37774
|
writingSuggestions: null,
|
|
@@ -37857,7 +37860,7 @@ const Dwe = ia({
|
|
|
37857
37860
|
// `<table>`
|
|
37858
37861
|
scheme: null,
|
|
37859
37862
|
// `<meta>`
|
|
37860
|
-
scrolling:
|
|
37863
|
+
scrolling: gt,
|
|
37861
37864
|
// `<frame>`. Use overflow in the child context
|
|
37862
37865
|
standby: null,
|
|
37863
37866
|
// `<object>`
|
|
@@ -41180,13 +41183,13 @@ function NEe(e, t, n) {
|
|
|
41180
41183
|
function K(ke) {
|
|
41181
41184
|
return Ie;
|
|
41182
41185
|
function Ie(Pe) {
|
|
41183
|
-
const Je = Pe !== null && ke[Pe], Xe = Pe !== null && ke.null,
|
|
41186
|
+
const Je = Pe !== null && ke[Pe], Xe = Pe !== null && ke.null, lt = [
|
|
41184
41187
|
// To do: add more extension tests.
|
|
41185
41188
|
/* c8 ignore next 2 */
|
|
41186
41189
|
...Array.isArray(Je) ? Je : Je ? [Je] : [],
|
|
41187
41190
|
...Array.isArray(Xe) ? Xe : Xe ? [Xe] : []
|
|
41188
41191
|
];
|
|
41189
|
-
return J(
|
|
41192
|
+
return J(lt)(Pe);
|
|
41190
41193
|
}
|
|
41191
41194
|
}
|
|
41192
41195
|
function J(ke) {
|
|
@@ -41380,10 +41383,10 @@ function $Ee(e) {
|
|
|
41380
41383
|
blockQuote: i(Xe),
|
|
41381
41384
|
characterEscape: C,
|
|
41382
41385
|
characterReference: C,
|
|
41383
|
-
codeFenced: i(
|
|
41386
|
+
codeFenced: i(lt),
|
|
41384
41387
|
codeFencedFenceInfo: o,
|
|
41385
41388
|
codeFencedFenceMeta: o,
|
|
41386
|
-
codeIndented: i(
|
|
41389
|
+
codeIndented: i(lt, o),
|
|
41387
41390
|
codeText: i(xt, o),
|
|
41388
41391
|
codeTextData: C,
|
|
41389
41392
|
data: C,
|
|
@@ -41520,7 +41523,7 @@ function $Ee(e) {
|
|
|
41520
41523
|
return X;
|
|
41521
41524
|
}
|
|
41522
41525
|
function a(B, X, oe) {
|
|
41523
|
-
let ne = X - 1, _e = -1, qe = !1,
|
|
41526
|
+
let ne = X - 1, _e = -1, qe = !1, dt, Nt, Zn, Xn;
|
|
41524
41527
|
for (; ++ne <= oe; ) {
|
|
41525
41528
|
const Et = B[ne];
|
|
41526
41529
|
switch (Et[1].type) {
|
|
@@ -41531,7 +41534,7 @@ function $Ee(e) {
|
|
|
41531
41534
|
break;
|
|
41532
41535
|
}
|
|
41533
41536
|
case "lineEndingBlank": {
|
|
41534
|
-
Et[0] === "enter" && (
|
|
41537
|
+
Et[0] === "enter" && (dt && !Xn && !_e && !Zn && (Zn = ne), Xn = void 0);
|
|
41535
41538
|
break;
|
|
41536
41539
|
}
|
|
41537
41540
|
case "linePrefix":
|
|
@@ -41544,7 +41547,7 @@ function $Ee(e) {
|
|
|
41544
41547
|
Xn = void 0;
|
|
41545
41548
|
}
|
|
41546
41549
|
if (!_e && Et[0] === "enter" && Et[1].type === "listItemPrefix" || _e === -1 && Et[0] === "exit" && (Et[1].type === "listUnordered" || Et[1].type === "listOrdered")) {
|
|
41547
|
-
if (
|
|
41550
|
+
if (dt) {
|
|
41548
41551
|
let Ot = ne;
|
|
41549
41552
|
for (Nt = void 0; Ot--; ) {
|
|
41550
41553
|
const Bt = B[Ot];
|
|
@@ -41555,7 +41558,7 @@ function $Ee(e) {
|
|
|
41555
41558
|
} else if (!(Bt[1].type === "linePrefix" || Bt[1].type === "blockQuotePrefix" || Bt[1].type === "blockQuotePrefixWhitespace" || Bt[1].type === "blockQuoteMarker" || Bt[1].type === "listItemIndent"))
|
|
41556
41559
|
break;
|
|
41557
41560
|
}
|
|
41558
|
-
Zn && (!Nt || Zn < Nt) && (
|
|
41561
|
+
Zn && (!Nt || Zn < Nt) && (dt._spread = !0), dt.end = Object.assign({}, Nt ? B[Nt][1].start : Et[1].end), B.splice(Nt || ne, 0, ["exit", dt, Et[2]]), ne++, oe++;
|
|
41559
41562
|
}
|
|
41560
41563
|
if (Et[1].type === "listItemPrefix") {
|
|
41561
41564
|
const Ot = {
|
|
@@ -41565,7 +41568,7 @@ function $Ee(e) {
|
|
|
41565
41568
|
// @ts-expect-error: we’ll add `end` in a second.
|
|
41566
41569
|
end: void 0
|
|
41567
41570
|
};
|
|
41568
|
-
|
|
41571
|
+
dt = Ot, B.splice(ne, 0, ["enter", Ot, Et[2]]), ne++, oe++, Zn = void 0, Xn = !0;
|
|
41569
41572
|
}
|
|
41570
41573
|
}
|
|
41571
41574
|
}
|
|
@@ -41782,7 +41785,7 @@ function $Ee(e) {
|
|
|
41782
41785
|
children: []
|
|
41783
41786
|
};
|
|
41784
41787
|
}
|
|
41785
|
-
function
|
|
41788
|
+
function lt() {
|
|
41786
41789
|
return {
|
|
41787
41790
|
type: "code",
|
|
41788
41791
|
lang: null,
|
|
@@ -49637,7 +49640,7 @@ var Hd = {
|
|
|
49637
49640
|
mu: !0
|
|
49638
49641
|
}, f6 = function(t) {
|
|
49639
49642
|
return typeof t != "string" && (t = t.unit), t in Hd || t in QAe || t === "ex";
|
|
49640
|
-
},
|
|
49643
|
+
}, ut = function(t, n) {
|
|
49641
49644
|
var r;
|
|
49642
49645
|
if (t.unit in Hd)
|
|
49643
49646
|
r = Hd[t.unit] / n.fontMetrics().ptPerEm / n.sizeMultiplier;
|
|
@@ -49875,7 +49878,7 @@ function y(e, t, n, r, a, i) {
|
|
|
49875
49878
|
replace: r
|
|
49876
49879
|
}, i && r && (rt[e][r] = rt[e][a]);
|
|
49877
49880
|
}
|
|
49878
|
-
var v = "math", te = "text", M = "main", $ = "ams",
|
|
49881
|
+
var v = "math", te = "text", M = "main", $ = "ams", st = "accent-token", ge = "bin", qt = "close", sa = "inner", Me = "mathord", vt = "op-token", nn = "open", qo = "punct", F = "rel", Yn = "spacing", G = "textord";
|
|
49879
49882
|
y(v, M, F, "≡", "\\equiv", !0);
|
|
49880
49883
|
y(v, M, F, "≺", "\\prec", !0);
|
|
49881
49884
|
y(v, M, F, "≻", "\\succ", !0);
|
|
@@ -50409,17 +50412,17 @@ y(v, M, sa, "…", "\\ldots", !0);
|
|
|
50409
50412
|
y(v, M, sa, "⋯", "\\@cdots", !0);
|
|
50410
50413
|
y(v, M, sa, "⋱", "\\ddots", !0);
|
|
50411
50414
|
y(v, M, G, "⋮", "\\varvdots");
|
|
50412
|
-
y(v, M,
|
|
50413
|
-
y(v, M,
|
|
50414
|
-
y(v, M,
|
|
50415
|
-
y(v, M,
|
|
50416
|
-
y(v, M,
|
|
50417
|
-
y(v, M,
|
|
50418
|
-
y(v, M,
|
|
50419
|
-
y(v, M,
|
|
50420
|
-
y(v, M,
|
|
50421
|
-
y(v, M,
|
|
50422
|
-
y(v, M,
|
|
50415
|
+
y(v, M, st, "ˊ", "\\acute");
|
|
50416
|
+
y(v, M, st, "ˋ", "\\grave");
|
|
50417
|
+
y(v, M, st, "¨", "\\ddot");
|
|
50418
|
+
y(v, M, st, "~", "\\tilde");
|
|
50419
|
+
y(v, M, st, "ˉ", "\\bar");
|
|
50420
|
+
y(v, M, st, "˘", "\\breve");
|
|
50421
|
+
y(v, M, st, "ˇ", "\\check");
|
|
50422
|
+
y(v, M, st, "^", "\\hat");
|
|
50423
|
+
y(v, M, st, "⃗", "\\vec");
|
|
50424
|
+
y(v, M, st, "˙", "\\dot");
|
|
50425
|
+
y(v, M, st, "˚", "\\mathring");
|
|
50423
50426
|
y(v, M, Me, "", "\\@imath");
|
|
50424
50427
|
y(v, M, Me, "", "\\@jmath");
|
|
50425
50428
|
y(v, M, G, "ı", "ı");
|
|
@@ -50433,19 +50436,19 @@ y(te, M, G, "ø", "\\o", !0);
|
|
|
50433
50436
|
y(te, M, G, "Æ", "\\AE", !0);
|
|
50434
50437
|
y(te, M, G, "Œ", "\\OE", !0);
|
|
50435
50438
|
y(te, M, G, "Ø", "\\O", !0);
|
|
50436
|
-
y(te, M,
|
|
50437
|
-
y(te, M,
|
|
50438
|
-
y(te, M,
|
|
50439
|
-
y(te, M,
|
|
50440
|
-
y(te, M,
|
|
50441
|
-
y(te, M,
|
|
50442
|
-
y(te, M,
|
|
50443
|
-
y(te, M,
|
|
50444
|
-
y(te, M,
|
|
50445
|
-
y(te, M,
|
|
50446
|
-
y(te, M,
|
|
50447
|
-
y(te, M,
|
|
50448
|
-
y(te, M,
|
|
50439
|
+
y(te, M, st, "ˊ", "\\'");
|
|
50440
|
+
y(te, M, st, "ˋ", "\\`");
|
|
50441
|
+
y(te, M, st, "ˆ", "\\^");
|
|
50442
|
+
y(te, M, st, "˜", "\\~");
|
|
50443
|
+
y(te, M, st, "ˉ", "\\=");
|
|
50444
|
+
y(te, M, st, "˘", "\\u");
|
|
50445
|
+
y(te, M, st, "˙", "\\.");
|
|
50446
|
+
y(te, M, st, "¸", "\\c");
|
|
50447
|
+
y(te, M, st, "˚", "\\r");
|
|
50448
|
+
y(te, M, st, "ˇ", "\\v");
|
|
50449
|
+
y(te, M, st, "¨", '\\"');
|
|
50450
|
+
y(te, M, st, "˝", "\\H");
|
|
50451
|
+
y(te, M, st, "◯", "\\textcircled");
|
|
50449
50452
|
var k6 = {
|
|
50450
50453
|
"--": !0,
|
|
50451
50454
|
"---": !0,
|
|
@@ -50506,8 +50509,8 @@ y(v, M, Me, "h", "ℎ");
|
|
|
50506
50509
|
y(te, M, Me, "h", "ℎ");
|
|
50507
50510
|
var Ne = "";
|
|
50508
50511
|
for (var Lt = 0; Lt < ro.length; Lt++) {
|
|
50509
|
-
var
|
|
50510
|
-
Ne = String.fromCharCode(55349, 56320 + Lt), y(v, M, Me,
|
|
50512
|
+
var pt = ro.charAt(Lt);
|
|
50513
|
+
Ne = String.fromCharCode(55349, 56320 + Lt), y(v, M, Me, pt, Ne), y(te, M, G, pt, Ne), Ne = String.fromCharCode(55349, 56372 + Lt), y(v, M, Me, pt, Ne), y(te, M, G, pt, Ne), Ne = String.fromCharCode(55349, 56424 + Lt), y(v, M, Me, pt, Ne), y(te, M, G, pt, Ne), Ne = String.fromCharCode(55349, 56580 + Lt), y(v, M, Me, pt, Ne), y(te, M, G, pt, Ne), Ne = String.fromCharCode(55349, 56684 + Lt), y(v, M, Me, pt, Ne), y(te, M, G, pt, Ne), Ne = String.fromCharCode(55349, 56736 + Lt), y(v, M, Me, pt, Ne), y(te, M, G, pt, Ne), Ne = String.fromCharCode(55349, 56788 + Lt), y(v, M, Me, pt, Ne), y(te, M, G, pt, Ne), Ne = String.fromCharCode(55349, 56840 + Lt), y(v, M, Me, pt, Ne), y(te, M, G, pt, Ne), Ne = String.fromCharCode(55349, 56944 + Lt), y(v, M, Me, pt, Ne), y(te, M, G, pt, Ne), Lt < 26 && (Ne = String.fromCharCode(55349, 56632 + Lt), y(v, M, Me, pt, Ne), y(te, M, G, pt, Ne), Ne = String.fromCharCode(55349, 56476 + Lt), y(v, M, Me, pt, Ne), y(te, M, G, pt, Ne));
|
|
50511
50514
|
}
|
|
50512
50515
|
Ne = "𝕜";
|
|
50513
50516
|
y(v, M, Me, "k", Ne);
|
|
@@ -50784,7 +50787,7 @@ var fi = [
|
|
|
50784
50787
|
var C = jt(["vlist-t"], S);
|
|
50785
50788
|
return S.length === 2 && C.classes.push("vlist-t2"), C.height = h, C.depth = -p, C;
|
|
50786
50789
|
}, fTe = (e, t) => {
|
|
50787
|
-
var n = jt(["mspace"], [], t), r =
|
|
50790
|
+
var n = jt(["mspace"], [], t), r = ut(e, t);
|
|
50788
50791
|
return n.style.marginRight = de(r), n;
|
|
50789
50792
|
}, gi = function(t, n, r) {
|
|
50790
50793
|
var a = "";
|
|
@@ -50891,7 +50894,7 @@ var fi = [
|
|
|
50891
50894
|
staticSvg: gTe,
|
|
50892
50895
|
svgData: x6,
|
|
50893
50896
|
tryCombineChars: cTe
|
|
50894
|
-
},
|
|
50897
|
+
}, ct = {
|
|
50895
50898
|
number: 3,
|
|
50896
50899
|
unit: "mu"
|
|
50897
50900
|
}, _r = {
|
|
@@ -50902,16 +50905,16 @@ var fi = [
|
|
|
50902
50905
|
unit: "mu"
|
|
50903
50906
|
}, yTe = {
|
|
50904
50907
|
mord: {
|
|
50905
|
-
mop:
|
|
50908
|
+
mop: ct,
|
|
50906
50909
|
mbin: _r,
|
|
50907
50910
|
mrel: zn,
|
|
50908
|
-
minner:
|
|
50911
|
+
minner: ct
|
|
50909
50912
|
},
|
|
50910
50913
|
mop: {
|
|
50911
|
-
mord:
|
|
50912
|
-
mop:
|
|
50914
|
+
mord: ct,
|
|
50915
|
+
mop: ct,
|
|
50913
50916
|
mrel: zn,
|
|
50914
|
-
minner:
|
|
50917
|
+
minner: ct
|
|
50915
50918
|
},
|
|
50916
50919
|
mbin: {
|
|
50917
50920
|
mord: _r,
|
|
@@ -50927,46 +50930,46 @@ var fi = [
|
|
|
50927
50930
|
},
|
|
50928
50931
|
mopen: {},
|
|
50929
50932
|
mclose: {
|
|
50930
|
-
mop:
|
|
50933
|
+
mop: ct,
|
|
50931
50934
|
mbin: _r,
|
|
50932
50935
|
mrel: zn,
|
|
50933
|
-
minner:
|
|
50936
|
+
minner: ct
|
|
50934
50937
|
},
|
|
50935
50938
|
mpunct: {
|
|
50936
|
-
mord:
|
|
50937
|
-
mop:
|
|
50939
|
+
mord: ct,
|
|
50940
|
+
mop: ct,
|
|
50938
50941
|
mrel: zn,
|
|
50939
|
-
mopen:
|
|
50940
|
-
mclose:
|
|
50941
|
-
mpunct:
|
|
50942
|
-
minner:
|
|
50942
|
+
mopen: ct,
|
|
50943
|
+
mclose: ct,
|
|
50944
|
+
mpunct: ct,
|
|
50945
|
+
minner: ct
|
|
50943
50946
|
},
|
|
50944
50947
|
minner: {
|
|
50945
|
-
mord:
|
|
50946
|
-
mop:
|
|
50948
|
+
mord: ct,
|
|
50949
|
+
mop: ct,
|
|
50947
50950
|
mbin: _r,
|
|
50948
50951
|
mrel: zn,
|
|
50949
|
-
mopen:
|
|
50950
|
-
mpunct:
|
|
50951
|
-
minner:
|
|
50952
|
+
mopen: ct,
|
|
50953
|
+
mpunct: ct,
|
|
50954
|
+
minner: ct
|
|
50952
50955
|
}
|
|
50953
50956
|
}, bTe = {
|
|
50954
50957
|
mord: {
|
|
50955
|
-
mop:
|
|
50958
|
+
mop: ct
|
|
50956
50959
|
},
|
|
50957
50960
|
mop: {
|
|
50958
|
-
mord:
|
|
50959
|
-
mop:
|
|
50961
|
+
mord: ct,
|
|
50962
|
+
mop: ct
|
|
50960
50963
|
},
|
|
50961
50964
|
mbin: {},
|
|
50962
50965
|
mrel: {},
|
|
50963
50966
|
mopen: {},
|
|
50964
50967
|
mclose: {
|
|
50965
|
-
mop:
|
|
50968
|
+
mop: ct
|
|
50966
50969
|
},
|
|
50967
50970
|
mpunct: {},
|
|
50968
50971
|
minner: {
|
|
50969
|
-
mop:
|
|
50972
|
+
mop: ct
|
|
50970
50973
|
}
|
|
50971
50974
|
}, E6 = {}, ao = {}, io = {};
|
|
50972
50975
|
function me(e) {
|
|
@@ -51013,7 +51016,7 @@ function Ir(e) {
|
|
|
51013
51016
|
}
|
|
51014
51017
|
var oo = function(t) {
|
|
51015
51018
|
return t.type === "ordgroup" && t.body.length === 1 ? t.body[0] : t;
|
|
51016
|
-
},
|
|
51019
|
+
}, mt = function(t) {
|
|
51017
51020
|
return t.type === "ordgroup" ? t.body : [t];
|
|
51018
51021
|
}, jn = Q.makeSpan, kTe = ["leftmost", "mbin", "mopen", "mrel", "mop", "mpunct"], vTe = ["rightmost", "mrel", "mclose", "mpunct"], _Te = {
|
|
51019
51022
|
display: Se.DISPLAY,
|
|
@@ -51853,7 +51856,7 @@ me({
|
|
|
51853
51856
|
mode: n.mode,
|
|
51854
51857
|
mclass: "m" + r.slice(5),
|
|
51855
51858
|
// TODO(kevinb): don't prefix with 'm'
|
|
51856
|
-
body:
|
|
51859
|
+
body: mt(a),
|
|
51857
51860
|
isCharacterBox: Ee.isCharacterBox(a)
|
|
51858
51861
|
};
|
|
51859
51862
|
},
|
|
@@ -51878,7 +51881,7 @@ me({
|
|
|
51878
51881
|
type: "mclass",
|
|
51879
51882
|
mode: n.mode,
|
|
51880
51883
|
mclass: Ho(t[0]),
|
|
51881
|
-
body:
|
|
51884
|
+
body: mt(t[1]),
|
|
51882
51885
|
isCharacterBox: Ee.isCharacterBox(t[1])
|
|
51883
51886
|
};
|
|
51884
51887
|
}
|
|
@@ -51903,7 +51906,7 @@ me({
|
|
|
51903
51906
|
parentIsSupSub: !1,
|
|
51904
51907
|
symbol: !1,
|
|
51905
51908
|
suppressBaseShift: r !== "\\stackrel",
|
|
51906
|
-
body:
|
|
51909
|
+
body: mt(a)
|
|
51907
51910
|
}, l = {
|
|
51908
51911
|
type: "supsub",
|
|
51909
51912
|
mode: i.mode,
|
|
@@ -51937,7 +51940,7 @@ me({
|
|
|
51937
51940
|
type: "pmb",
|
|
51938
51941
|
mode: n.mode,
|
|
51939
51942
|
mclass: Ho(t[0]),
|
|
51940
|
-
body:
|
|
51943
|
+
body: mt(t[0])
|
|
51941
51944
|
};
|
|
51942
51945
|
},
|
|
51943
51946
|
htmlBuilder(e, t) {
|
|
@@ -52178,7 +52181,7 @@ me({
|
|
|
52178
52181
|
type: "color",
|
|
52179
52182
|
mode: n.mode,
|
|
52180
52183
|
color: r,
|
|
52181
|
-
body:
|
|
52184
|
+
body: mt(a)
|
|
52182
52185
|
};
|
|
52183
52186
|
},
|
|
52184
52187
|
htmlBuilder: I6,
|
|
@@ -52232,11 +52235,11 @@ me({
|
|
|
52232
52235
|
// not within tabular/array environments.
|
|
52233
52236
|
htmlBuilder(e, t) {
|
|
52234
52237
|
var n = Q.makeSpan(["mspace"], [], t);
|
|
52235
|
-
return e.newLine && (n.classes.push("newline"), e.size && (n.style.marginTop = de(
|
|
52238
|
+
return e.newLine && (n.classes.push("newline"), e.size && (n.style.marginTop = de(ut(e.size, t)))), n;
|
|
52236
52239
|
},
|
|
52237
52240
|
mathmlBuilder(e, t) {
|
|
52238
52241
|
var n = new ae.MathNode("mspace");
|
|
52239
|
-
return e.newLine && (n.setAttribute("linebreak", "newline"), e.size && n.setAttribute("height", de(
|
|
52242
|
+
return e.newLine && (n.setAttribute("linebreak", "newline"), e.size && n.setAttribute("height", de(ut(e.size, t)))), n;
|
|
52240
52243
|
}
|
|
52241
52244
|
});
|
|
52242
52245
|
var Kd = {
|
|
@@ -52811,10 +52814,10 @@ var ch = (e, t) => {
|
|
|
52811
52814
|
if (r === "sout")
|
|
52812
52815
|
i = Q.makeSpan(["stretchy", "sout"]), i.height = t.fontMetrics().defaultRuleThickness / a, o = -0.5 * t.fontMetrics().xHeight;
|
|
52813
52816
|
else if (r === "phase") {
|
|
52814
|
-
var l =
|
|
52817
|
+
var l = ut({
|
|
52815
52818
|
number: 0.6,
|
|
52816
52819
|
unit: "pt"
|
|
52817
|
-
}, t), u =
|
|
52820
|
+
}, t), u = ut({
|
|
52818
52821
|
number: 0.35,
|
|
52819
52822
|
unit: "ex"
|
|
52820
52823
|
}, t), d = t.havingBaseSizing();
|
|
@@ -53153,7 +53156,7 @@ var On = function(t, n) {
|
|
|
53153
53156
|
var m = n.havingStyle(Se.SCRIPT).sizeMultiplier;
|
|
53154
53157
|
h = 0.2778 * (m / n.sizeMultiplier);
|
|
53155
53158
|
}
|
|
53156
|
-
var f = t.colSeparationType === "CD" ?
|
|
53159
|
+
var f = t.colSeparationType === "CD" ? ut({
|
|
53157
53160
|
number: 3,
|
|
53158
53161
|
unit: "ex"
|
|
53159
53162
|
}, n) : 12 * p, g = 3 * p, _ = t.arraystretch * f, k = 0.7 * _, b = 0.3 * _, w = 0;
|
|
@@ -53173,7 +53176,7 @@ var On = function(t, n) {
|
|
|
53173
53176
|
D < C.depth && (D = C.depth), x < C.height && (x = C.height), P[a] = C;
|
|
53174
53177
|
}
|
|
53175
53178
|
var I = t.rowGaps[r], q = 0;
|
|
53176
|
-
I && (q =
|
|
53179
|
+
I && (q = ut(I, n), q > 0 && (q += b, D < q && (D = q), q = 0)), t.addJot && (D += g), P.height = x, P.depth = D, w += x, P.pos = w, w += D + q, l[r] = P, E(o[r + 1]);
|
|
53177
53180
|
}
|
|
53178
53181
|
var Y = w / 2 + n.fontMetrics().axisHeight, Z = t.cols || [], W = [], R, H, j = [];
|
|
53179
53182
|
if (t.tags && t.tags.some((ue) => ue))
|
|
@@ -53209,11 +53212,11 @@ var On = function(t, n) {
|
|
|
53209
53212
|
for (r = 0; r < i; ++r) {
|
|
53210
53213
|
var Je = l[r], Xe = Je[a];
|
|
53211
53214
|
if (Xe) {
|
|
53212
|
-
var
|
|
53215
|
+
var lt = Je.pos - Y;
|
|
53213
53216
|
Xe.depth = Je.depth, Xe.height = Je.height, Pe.push({
|
|
53214
53217
|
type: "elem",
|
|
53215
53218
|
elem: Xe,
|
|
53216
|
-
shift:
|
|
53219
|
+
shift: lt
|
|
53217
53220
|
});
|
|
53218
53221
|
}
|
|
53219
53222
|
}
|
|
@@ -53748,7 +53751,7 @@ var Y6 = (e, t) => {
|
|
|
53748
53751
|
}
|
|
53749
53752
|
i = t.havingStyle(a);
|
|
53750
53753
|
var u = Ke(e.denom, i, t), d, p, h;
|
|
53751
|
-
e.hasBarLine ? (e.barSize ? (p =
|
|
53754
|
+
e.hasBarLine ? (e.barSize ? (p = ut(e.barSize, t), d = Q.makeLineSpan("frac-line", t, p)) : d = Q.makeLineSpan("frac-line", t), p = d.height, h = d.height) : (d = null, p = 0, h = t.fontMetrics().defaultRuleThickness);
|
|
53752
53755
|
var m, f, g;
|
|
53753
53756
|
n.size === Se.DISPLAY.size || e.size === "display" ? (m = t.fontMetrics().num1, p > 0 ? f = 3 * h : f = 7 * h, g = t.fontMetrics().denom1) : (p > 0 ? (m = t.fontMetrics().num2, f = h) : (m = t.fontMetrics().num3, f = 3 * h), g = t.fontMetrics().denom2);
|
|
53754
53757
|
var _;
|
|
@@ -53797,7 +53800,7 @@ var Y6 = (e, t) => {
|
|
|
53797
53800
|
if (!e.hasBarLine)
|
|
53798
53801
|
n.setAttribute("linethickness", "0px");
|
|
53799
53802
|
else if (e.barSize) {
|
|
53800
|
-
var r =
|
|
53803
|
+
var r = ut(e.barSize, t);
|
|
53801
53804
|
n.setAttribute("linethickness", de(r));
|
|
53802
53805
|
}
|
|
53803
53806
|
var a = Y6(e.size, t.style);
|
|
@@ -54154,7 +54157,7 @@ me({
|
|
|
54154
54157
|
type: "href",
|
|
54155
54158
|
mode: n.mode,
|
|
54156
54159
|
href: a,
|
|
54157
|
-
body:
|
|
54160
|
+
body: mt(r)
|
|
54158
54161
|
} : n.formatUnsupportedCmd("\\href");
|
|
54159
54162
|
},
|
|
54160
54163
|
htmlBuilder: (e, t) => {
|
|
@@ -54201,7 +54204,7 @@ me({
|
|
|
54201
54204
|
type: "href",
|
|
54202
54205
|
mode: n.mode,
|
|
54203
54206
|
href: r,
|
|
54204
|
-
body:
|
|
54207
|
+
body: mt(s)
|
|
54205
54208
|
};
|
|
54206
54209
|
}
|
|
54207
54210
|
});
|
|
@@ -54221,7 +54224,7 @@ me({
|
|
|
54221
54224
|
return {
|
|
54222
54225
|
type: "hbox",
|
|
54223
54226
|
mode: n.mode,
|
|
54224
|
-
body:
|
|
54227
|
+
body: mt(t[0])
|
|
54225
54228
|
};
|
|
54226
54229
|
},
|
|
54227
54230
|
htmlBuilder(e, t) {
|
|
@@ -54287,7 +54290,7 @@ me({
|
|
|
54287
54290
|
type: "html",
|
|
54288
54291
|
mode: n.mode,
|
|
54289
54292
|
attributes: l,
|
|
54290
|
-
body:
|
|
54293
|
+
body: mt(o)
|
|
54291
54294
|
} : n.formatUnsupportedCmd(r);
|
|
54292
54295
|
},
|
|
54293
54296
|
htmlBuilder: (e, t) => {
|
|
@@ -54314,8 +54317,8 @@ me({
|
|
|
54314
54317
|
return {
|
|
54315
54318
|
type: "htmlmathml",
|
|
54316
54319
|
mode: n.mode,
|
|
54317
|
-
html:
|
|
54318
|
-
mathml:
|
|
54320
|
+
html: mt(t[0]),
|
|
54321
|
+
mathml: mt(t[1])
|
|
54319
54322
|
};
|
|
54320
54323
|
},
|
|
54321
54324
|
htmlBuilder: (e, t) => {
|
|
@@ -54402,10 +54405,10 @@ me({
|
|
|
54402
54405
|
} : r.formatUnsupportedCmd("\\includegraphics");
|
|
54403
54406
|
},
|
|
54404
54407
|
htmlBuilder: (e, t) => {
|
|
54405
|
-
var n =
|
|
54406
|
-
e.totalheight.number > 0 && (r =
|
|
54408
|
+
var n = ut(e.height, t), r = 0;
|
|
54409
|
+
e.totalheight.number > 0 && (r = ut(e.totalheight, t) - n);
|
|
54407
54410
|
var a = 0;
|
|
54408
|
-
e.width.number > 0 && (a =
|
|
54411
|
+
e.width.number > 0 && (a = ut(e.width, t));
|
|
54409
54412
|
var i = {
|
|
54410
54413
|
height: de(n + r)
|
|
54411
54414
|
};
|
|
@@ -54416,9 +54419,9 @@ me({
|
|
|
54416
54419
|
mathmlBuilder: (e, t) => {
|
|
54417
54420
|
var n = new ae.MathNode("mglyph", []);
|
|
54418
54421
|
n.setAttribute("alt", e.alt);
|
|
54419
|
-
var r =
|
|
54420
|
-
if (e.totalheight.number > 0 && (a =
|
|
54421
|
-
var i =
|
|
54422
|
+
var r = ut(e.height, t), a = 0;
|
|
54423
|
+
if (e.totalheight.number > 0 && (a = ut(e.totalheight, t) - r, n.setAttribute("valign", de(-a))), n.setAttribute("height", de(r + a)), e.width.number > 0) {
|
|
54424
|
+
var i = ut(e.width, t);
|
|
54422
54425
|
n.setAttribute("width", de(i));
|
|
54423
54426
|
}
|
|
54424
54427
|
return n.setAttribute("src", e.src), n;
|
|
@@ -54452,7 +54455,7 @@ me({
|
|
|
54452
54455
|
return Q.makeGlue(e.dimension, t);
|
|
54453
54456
|
},
|
|
54454
54457
|
mathmlBuilder(e, t) {
|
|
54455
|
-
var n =
|
|
54458
|
+
var n = ut(e.dimension, t);
|
|
54456
54459
|
return new ae.SpaceNode(n);
|
|
54457
54460
|
}
|
|
54458
54461
|
});
|
|
@@ -54554,10 +54557,10 @@ me({
|
|
|
54554
54557
|
return {
|
|
54555
54558
|
type: "mathchoice",
|
|
54556
54559
|
mode: n.mode,
|
|
54557
|
-
display:
|
|
54558
|
-
text:
|
|
54559
|
-
script:
|
|
54560
|
-
scriptscript:
|
|
54560
|
+
display: mt(t[0]),
|
|
54561
|
+
text: mt(t[1]),
|
|
54562
|
+
script: mt(t[2]),
|
|
54563
|
+
scriptscript: mt(t[3])
|
|
54561
54564
|
};
|
|
54562
54565
|
},
|
|
54563
54566
|
htmlBuilder: (e, t) => {
|
|
@@ -54764,7 +54767,7 @@ me({
|
|
|
54764
54767
|
limits: !1,
|
|
54765
54768
|
parentIsSupSub: !1,
|
|
54766
54769
|
symbol: !1,
|
|
54767
|
-
body:
|
|
54770
|
+
body: mt(r)
|
|
54768
54771
|
};
|
|
54769
54772
|
},
|
|
54770
54773
|
htmlBuilder: la,
|
|
@@ -54913,7 +54916,7 @@ me({
|
|
|
54913
54916
|
return {
|
|
54914
54917
|
type: "operatorname",
|
|
54915
54918
|
mode: n.mode,
|
|
54916
|
-
body:
|
|
54919
|
+
body: mt(a),
|
|
54917
54920
|
alwaysHandleSupSub: r === "\\operatornamewithlimits",
|
|
54918
54921
|
limits: !1,
|
|
54919
54922
|
parentIsSupSub: !1
|
|
@@ -54988,7 +54991,7 @@ me({
|
|
|
54988
54991
|
return {
|
|
54989
54992
|
type: "phantom",
|
|
54990
54993
|
mode: n.mode,
|
|
54991
|
-
body:
|
|
54994
|
+
body: mt(r)
|
|
54992
54995
|
};
|
|
54993
54996
|
},
|
|
54994
54997
|
htmlBuilder: (e, t) => {
|
|
@@ -55031,7 +55034,7 @@ me({
|
|
|
55031
55034
|
}, t), Q.makeSpan(["mord"], [n], t);
|
|
55032
55035
|
},
|
|
55033
55036
|
mathmlBuilder: (e, t) => {
|
|
55034
|
-
var n = Kt(
|
|
55037
|
+
var n = Kt(mt(e.body), t), r = new ae.MathNode("mphantom", n), a = new ae.MathNode("mpadded", [r]);
|
|
55035
55038
|
return a.setAttribute("height", "0px"), a.setAttribute("depth", "0px"), a;
|
|
55036
55039
|
}
|
|
55037
55040
|
});
|
|
@@ -55057,7 +55060,7 @@ me({
|
|
|
55057
55060
|
return Q.makeSpan(["mord", "rlap"], [n, r], t);
|
|
55058
55061
|
},
|
|
55059
55062
|
mathmlBuilder: (e, t) => {
|
|
55060
|
-
var n = Kt(
|
|
55063
|
+
var n = Kt(mt(e.body), t), r = new ae.MathNode("mphantom", n), a = new ae.MathNode("mpadded", [r]);
|
|
55061
55064
|
return a.setAttribute("width", "0px"), a;
|
|
55062
55065
|
}
|
|
55063
55066
|
});
|
|
@@ -55081,7 +55084,7 @@ me({
|
|
|
55081
55084
|
};
|
|
55082
55085
|
},
|
|
55083
55086
|
htmlBuilder(e, t) {
|
|
55084
|
-
var n = Ke(e.body, t), r =
|
|
55087
|
+
var n = Ke(e.body, t), r = ut(e.dy, t);
|
|
55085
55088
|
return Q.makeVList({
|
|
55086
55089
|
positionType: "shift",
|
|
55087
55090
|
positionData: -r,
|
|
@@ -55134,11 +55137,11 @@ me({
|
|
|
55134
55137
|
};
|
|
55135
55138
|
},
|
|
55136
55139
|
htmlBuilder(e, t) {
|
|
55137
|
-
var n = Q.makeSpan(["mord", "rule"], [], t), r =
|
|
55140
|
+
var n = Q.makeSpan(["mord", "rule"], [], t), r = ut(e.width, t), a = ut(e.height, t), i = e.shift ? ut(e.shift, t) : 0;
|
|
55138
55141
|
return n.style.borderRightWidth = de(r), n.style.borderTopWidth = de(a), n.style.bottom = de(i), n.width = r, n.height = a + i, n.depth = -i, n.maxFontSize = a * 1.125 * t.sizeMultiplier, n;
|
|
55139
55142
|
},
|
|
55140
55143
|
mathmlBuilder(e, t) {
|
|
55141
|
-
var n =
|
|
55144
|
+
var n = ut(e.width, t), r = ut(e.height, t), a = e.shift ? ut(e.shift, t) : 0, i = t.color && t.getColor() || "black", o = new ae.MathNode("mspace");
|
|
55142
55145
|
o.setAttribute("mathbackground", i), o.setAttribute("width", de(n)), o.setAttribute("height", de(r));
|
|
55143
55146
|
var s = new ae.MathNode("mpadded", [o]);
|
|
55144
55147
|
return a >= 0 ? s.setAttribute("height", de(a)) : (s.setAttribute("height", de(a)), s.setAttribute("depth", de(-a))), s.setAttribute("voffset", de(a)), s;
|
|
@@ -55625,7 +55628,7 @@ me({
|
|
|
55625
55628
|
return {
|
|
55626
55629
|
type: "text",
|
|
55627
55630
|
mode: n.mode,
|
|
55628
|
-
body:
|
|
55631
|
+
body: mt(a),
|
|
55629
55632
|
font: r
|
|
55630
55633
|
};
|
|
55631
55634
|
},
|
|
@@ -70665,7 +70668,7 @@ function gOe(e) {
|
|
|
70665
70668
|
t
|
|
70666
70669
|
],
|
|
70667
70670
|
illegal: /\[|%/
|
|
70668
|
-
},
|
|
70671
|
+
}, lt = {
|
|
70669
70672
|
match: [
|
|
70670
70673
|
/operator/,
|
|
70671
70674
|
/\s+/,
|
|
@@ -70777,7 +70780,7 @@ function gOe(e) {
|
|
|
70777
70780
|
et,
|
|
70778
70781
|
ie,
|
|
70779
70782
|
we,
|
|
70780
|
-
|
|
70783
|
+
lt,
|
|
70781
70784
|
xt,
|
|
70782
70785
|
{
|
|
70783
70786
|
beginKeywords: "import",
|
|
@@ -72923,8 +72926,8 @@ https://github.com/highlightjs/highlight.js/issues/2277`), N = H, V = j), z ===
|
|
|
72923
72926
|
oe += Ce.substring(B, X.index);
|
|
72924
72927
|
const ne = we.case_insensitive ? X[0].toLowerCase() : X[0], _e = K(ue, ne);
|
|
72925
72928
|
if (_e) {
|
|
72926
|
-
const [qe,
|
|
72927
|
-
if (Ue.addText(oe), oe = "", N[ne] = (N[ne] || 0) + 1, N[ne] <= fLe && (ve +=
|
|
72929
|
+
const [qe, dt] = _e;
|
|
72930
|
+
if (Ue.addText(oe), oe = "", N[ne] = (N[ne] || 0) + 1, N[ne] <= fLe && (ve += dt), qe.startsWith("_"))
|
|
72928
72931
|
oe += X[0];
|
|
72929
72932
|
else {
|
|
72930
72933
|
const Nt = we.classNameAliases[qe] || qe;
|
|
@@ -72998,7 +73001,7 @@ https://github.com/highlightjs/highlight.js/issues/2277`), N = H, V = j), z ===
|
|
|
72998
73001
|
return Je(X);
|
|
72999
73002
|
return oe.skip ? Ce += X : (oe.excludeBegin && (Ce += X), se(), !oe.returnBegin && !oe.excludeBegin && (Ce = X)), Ie(oe, B), oe.returnBegin ? 0 : X.length;
|
|
73000
73003
|
}
|
|
73001
|
-
function
|
|
73004
|
+
function lt(B) {
|
|
73002
73005
|
const X = B[0], oe = j.substring(B.index), ne = Pe(ue, B, oe);
|
|
73003
73006
|
if (!ne)
|
|
73004
73007
|
return rg;
|
|
@@ -73033,7 +73036,7 @@ https://github.com/highlightjs/highlight.js/issues/2277`), N = H, V = j), z ===
|
|
|
73033
73036
|
const ne = new Error('Illegal lexeme "' + oe + '" for mode "' + (ue.scope || "<unnamed>") + '"');
|
|
73034
73037
|
throw ne.mode = ue, ne;
|
|
73035
73038
|
} else if (X.type === "end") {
|
|
73036
|
-
const ne =
|
|
73039
|
+
const ne = lt(X);
|
|
73037
73040
|
if (ne !== rg)
|
|
73038
73041
|
return ne;
|
|
73039
73042
|
}
|
|
@@ -75523,10 +75526,10 @@ var b7 = { exports: {} };
|
|
|
75523
75526
|
continue;
|
|
75524
75527
|
var ke = J.index, Ie = J[0], Pe = N.slice(0, ke), Je = N.slice(ke + Ie.length), Xe = V + N.length;
|
|
75525
75528
|
D && Xe > D.reach && (D.reach = Xe);
|
|
75526
|
-
var
|
|
75527
|
-
Pe && (
|
|
75529
|
+
var lt = z.prev;
|
|
75530
|
+
Pe && (lt = h(w, lt, Pe), V += Pe.length), m(w, lt, K);
|
|
75528
75531
|
var xt = new l(P, Y ? s.tokenize(Ie, Y) : Ie, R, Ie);
|
|
75529
|
-
if (z = h(w,
|
|
75532
|
+
if (z = h(w, lt, xt), Je && h(w, z, Je), K > 1) {
|
|
75530
75533
|
var et = {
|
|
75531
75534
|
cause: P + "," + I,
|
|
75532
75535
|
reach: Xe
|
|
@@ -96868,7 +96871,7 @@ const iVe = {
|
|
|
96868
96871
|
fontSize: "13px",
|
|
96869
96872
|
lineHeight: "1.5",
|
|
96870
96873
|
overflowX: "auto"
|
|
96871
|
-
}, T7 =
|
|
96874
|
+
}, T7 = ft(
|
|
96872
96875
|
({
|
|
96873
96876
|
code: e,
|
|
96874
96877
|
lang: t,
|
|
@@ -96886,7 +96889,7 @@ const iVe = {
|
|
|
96886
96889
|
) : /* @__PURE__ */ T("pre", { className: "mp-agent-code-block-pre", children: /* @__PURE__ */ T("code", { children: e }) })
|
|
96887
96890
|
);
|
|
96888
96891
|
T7.displayName = "CodeContent";
|
|
96889
|
-
const C7 =
|
|
96892
|
+
const C7 = ft(({ lang: e = "text", codeChildren: t, allowExecution: n = !1 }) => {
|
|
96890
96893
|
const { colorMode: r } = A7e(), a = ap(t).replace(/\n$/, ""), i = r === "light" ? JHe : QHe, { truncated: o, isTruncated: s, totalLines: l } = it(() => aVe(a), [a]), [u, d] = Ze(!1), p = Ge(() => d((f) => !f), []), h = u ? a : o, m = it(() => rVe(h), [h]);
|
|
96891
96894
|
return /* @__PURE__ */ re("div", { className: "mp-agent-code-block-wrapper", children: [
|
|
96892
96895
|
/* @__PURE__ */ re("div", { className: "mp-agent-code-block-header", children: [
|
|
@@ -96898,7 +96901,7 @@ const C7 = gt(({ lang: e = "text", codeChildren: t, allowExecution: n = !1 }) =>
|
|
|
96898
96901
|
] });
|
|
96899
96902
|
});
|
|
96900
96903
|
C7.displayName = "CodeBlock";
|
|
96901
|
-
const oVe = (e) => A5(e) ? e.key?.startsWith("code-") ?? !1 : !1, sVe =
|
|
96904
|
+
const oVe = (e) => A5(e) ? e.key?.startsWith("code-") ?? !1 : !1, sVe = ft(({ className: e, children: t }) => {
|
|
96902
96905
|
const n = /language-(\w+)/.exec(e ?? ""), r = n && n[1], a = r === "math", i = typeof t == "string" && t.split(`
|
|
96903
96906
|
`).length === 1;
|
|
96904
96907
|
return a ? /* @__PURE__ */ T(Rt, { children: t }) : i || !n ? /* @__PURE__ */ T("code", { onDoubleClick: (s) => {
|
|
@@ -96908,10 +96911,10 @@ const oVe = (e) => A5(e) ? e.key?.startsWith("code-") ?? !1 : !1, sVe = gt(({ cl
|
|
|
96908
96911
|
u.selectNodeContents(s.currentTarget), l.removeAllRanges(), l.addRange(u);
|
|
96909
96912
|
}
|
|
96910
96913
|
}, className: e || "mp-agent-inline-code", children: t }) : /* @__PURE__ */ T(C7, { lang: r || void 0, codeChildren: t, allowExecution: !1 });
|
|
96911
|
-
}), lVe =
|
|
96914
|
+
}), lVe = ft(({ children: e, ...t }) => {
|
|
96912
96915
|
const r = (Array.isArray(e) ? e : [e]).find(oVe);
|
|
96913
96916
|
return r ? /* @__PURE__ */ T(Rt, { children: r }) : /* @__PURE__ */ T("pre", { className: "mp-agent-markdown-pre", ...t, children: e });
|
|
96914
|
-
}), cVe =
|
|
96917
|
+
}), cVe = ft(({ children: e, ...t }) => /* @__PURE__ */ T("div", { className: "mp-agent-markdown-p", ...t, children: e })), uVe = ft(
|
|
96915
96918
|
({
|
|
96916
96919
|
href: e,
|
|
96917
96920
|
children: t,
|
|
@@ -96930,7 +96933,7 @@ const oVe = (e) => A5(e) ? e.key?.startsWith("code-") ?? !1 : !1, sVe = gt(({ cl
|
|
|
96930
96933
|
}
|
|
96931
96934
|
);
|
|
96932
96935
|
}
|
|
96933
|
-
), dVe =
|
|
96936
|
+
), dVe = ft(
|
|
96934
96937
|
({
|
|
96935
96938
|
src: e,
|
|
96936
96939
|
alt: t,
|
|
@@ -96964,7 +96967,7 @@ const oVe = (e) => A5(e) ? e.key?.startsWith("code-") ?? !1 : !1, sVe = gt(({ cl
|
|
|
96964
96967
|
], mVe = [
|
|
96965
96968
|
eIe,
|
|
96966
96969
|
[wLe, { detect: !0, ignoreMissing: !0 }]
|
|
96967
|
-
], Jh =
|
|
96970
|
+
], Jh = ft(({ text: e, className: t = "mp-agent-message-markdown" }) => /* @__PURE__ */ T(
|
|
96968
96971
|
nSe,
|
|
96969
96972
|
{
|
|
96970
96973
|
className: t,
|
|
@@ -96999,7 +97002,7 @@ const fVe = ({ content: e, role: t }) => {
|
|
|
96999
97002
|
) })
|
|
97000
97003
|
}
|
|
97001
97004
|
);
|
|
97002
|
-
}, e2 =
|
|
97005
|
+
}, e2 = ft(({ reasoning: e, isStreaming: t }) => {
|
|
97003
97006
|
const [n, r] = Ze(!0), a = Ve(null);
|
|
97004
97007
|
return Be(() => {
|
|
97005
97008
|
if (n)
|
|
@@ -97117,13 +97120,13 @@ const I7 = () => /* @__PURE__ */ re("span", { className: "mp-agent-message-typin
|
|
|
97117
97120
|
] }),
|
|
97118
97121
|
/* @__PURE__ */ T("div", { className: "mp-agent-message-group-body", children: l })
|
|
97119
97122
|
] });
|
|
97120
|
-
}, po =
|
|
97123
|
+
}, po = ft(vVe), N5 = [], _Ve = 120, wVe = (e) => {
|
|
97121
97124
|
const t = e.activeChatId;
|
|
97122
97125
|
return t ? e.chatState[t]?.messages ?? N5 : N5;
|
|
97123
97126
|
}, xVe = ({ showParticipantChrome: e = !1 }) => {
|
|
97124
97127
|
const t = fn(), n = fe((S) => S.contextKey), r = fe((S) => S.draftChatKey), a = fe((S) => S.activeChatId), i = fe(wVe), o = a ?? r, s = A3(a), l = fe(
|
|
97125
97128
|
(S) => De(S, o).pendingAssistant?.content?.length
|
|
97126
|
-
), u = fe((S) => De(S, o).pendingAssistant?.id), d = fe((S) => De(S, o).status), p = d ===
|
|
97129
|
+
), u = fe((S) => De(S, o).pendingAssistant?.id), d = fe((S) => De(S, o).status), p = d === yt.Sending || d === yt.Streaming, h = Ve(null), m = Ve(!0), f = Ve(!1), g = Ve(!1), _ = Ve(null), k = bwe({
|
|
97127
97130
|
count: i.length,
|
|
97128
97131
|
getScrollElement: () => h.current,
|
|
97129
97132
|
estimateSize: () => _Ve,
|
|
@@ -97211,7 +97214,7 @@ const I7 = () => /* @__PURE__ */ re("span", { className: "mp-agent-message-typin
|
|
|
97211
97214
|
),
|
|
97212
97215
|
/* @__PURE__ */ T(X3, {})
|
|
97213
97216
|
] });
|
|
97214
|
-
}, EVe =
|
|
97217
|
+
}, EVe = ft(
|
|
97215
97218
|
({
|
|
97216
97219
|
pendingKey: e,
|
|
97217
97220
|
contextKey: t,
|
|
@@ -97220,7 +97223,7 @@ const I7 = () => /* @__PURE__ */ re("span", { className: "mp-agent-message-typin
|
|
|
97220
97223
|
const r = fe((s) => De(s, e)), a = r.pendingAssistant, i = r.status;
|
|
97221
97224
|
if (!a)
|
|
97222
97225
|
return null;
|
|
97223
|
-
const o = i ===
|
|
97226
|
+
const o = i === yt.Sending || i === yt.Streaming;
|
|
97224
97227
|
return /* @__PURE__ */ T(
|
|
97225
97228
|
po,
|
|
97226
97229
|
{
|
|
@@ -97258,11 +97261,11 @@ const SVe = ({ status: e, generating: t }) => {
|
|
|
97258
97261
|
default:
|
|
97259
97262
|
return /* @__PURE__ */ T(L5, { size: 13, className: "mp-agent-plan-task-icon" });
|
|
97260
97263
|
}
|
|
97261
|
-
}, O7 =
|
|
97264
|
+
}, O7 = ft(() => {
|
|
97262
97265
|
const t = Fe().config.planExtractor, n = fe((h) => h.activeChatId), r = fe((h) => n ? De(h, n).messages : void 0), a = fe(
|
|
97263
97266
|
(h) => n ? De(h, n).pendingAssistant : void 0
|
|
97264
97267
|
), i = fe(
|
|
97265
|
-
(h) => n ? De(h, n).status ===
|
|
97268
|
+
(h) => n ? De(h, n).status === yt.Streaming : !1
|
|
97266
97269
|
), [o, s] = Ze(!1), l = it(
|
|
97267
97270
|
() => t && r ? MVe(r, a, t) : void 0,
|
|
97268
97271
|
[t, r, a]
|
|
@@ -97469,7 +97472,7 @@ export {
|
|
|
97469
97472
|
gd as AgentSessionKind,
|
|
97470
97473
|
Yr as AgentStatus,
|
|
97471
97474
|
N7e as AgentThemeProvider,
|
|
97472
|
-
|
|
97475
|
+
ht as AgentToolCallStatus,
|
|
97473
97476
|
s2 as AgentToolType,
|
|
97474
97477
|
IVe as AttachContextButton,
|
|
97475
97478
|
V7 as BuiltinContextAttachmentKinds,
|