@multiplayer-app/ai-agent-react 0.1.0-beta.15 → 0.1.0-beta.16
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.
|
@@ -359,7 +359,7 @@ function M7() {
|
|
|
359
359
|
R < 0 && k("disabledDepth fell below zero. This is a bug in React. Please file an issue.");
|
|
360
360
|
}
|
|
361
361
|
}
|
|
362
|
-
var
|
|
362
|
+
var ke = _.ReactCurrentDispatcher, Ce;
|
|
363
363
|
function Pe(U, ie, ye) {
|
|
364
364
|
{
|
|
365
365
|
if (Ce === void 0)
|
|
@@ -375,8 +375,8 @@ function M7() {
|
|
|
375
375
|
}
|
|
376
376
|
var Ue = !1, ne;
|
|
377
377
|
{
|
|
378
|
-
var
|
|
379
|
-
ne = new
|
|
378
|
+
var Ee = typeof WeakMap == "function" ? WeakMap : Map;
|
|
379
|
+
ne = new Ee();
|
|
380
380
|
}
|
|
381
381
|
function Ve(U, ie) {
|
|
382
382
|
if (!U || Ue)
|
|
@@ -391,7 +391,7 @@ function M7() {
|
|
|
391
391
|
var et = Error.prepareStackTrace;
|
|
392
392
|
Error.prepareStackTrace = void 0;
|
|
393
393
|
var nt;
|
|
394
|
-
nt =
|
|
394
|
+
nt = ke.current, ke.current = null, de();
|
|
395
395
|
try {
|
|
396
396
|
if (ie) {
|
|
397
397
|
var Ke = function() {
|
|
@@ -444,7 +444,7 @@ function M7() {
|
|
|
444
444
|
}
|
|
445
445
|
}
|
|
446
446
|
} finally {
|
|
447
|
-
Ue = !1,
|
|
447
|
+
Ue = !1, ke.current = nt, fe(), Error.prepareStackTrace = et;
|
|
448
448
|
}
|
|
449
449
|
var Ur = U ? U.displayName || U.name : "", Er = Ur ? Pe(Ur) : "";
|
|
450
450
|
return typeof U == "function" && ne.set(U, Er), Er;
|
|
@@ -456,7 +456,7 @@ function M7() {
|
|
|
456
456
|
var ie = U.prototype;
|
|
457
457
|
return !!(ie && ie.isReactComponent);
|
|
458
458
|
}
|
|
459
|
-
function
|
|
459
|
+
function _e(U, ie, ye) {
|
|
460
460
|
if (U == null)
|
|
461
461
|
return "";
|
|
462
462
|
if (typeof U == "function")
|
|
@@ -474,11 +474,11 @@ function M7() {
|
|
|
474
474
|
case l:
|
|
475
475
|
return Qe(U.render);
|
|
476
476
|
case p:
|
|
477
|
-
return
|
|
477
|
+
return _e(U.type, ie, ye);
|
|
478
478
|
case m: {
|
|
479
479
|
var Ie = U, et = Ie._payload, nt = Ie._init;
|
|
480
480
|
try {
|
|
481
|
-
return
|
|
481
|
+
return _e(nt(et), ie, ye);
|
|
482
482
|
} catch {
|
|
483
483
|
}
|
|
484
484
|
}
|
|
@@ -488,12 +488,12 @@ function M7() {
|
|
|
488
488
|
var be = Object.prototype.hasOwnProperty, Le = {}, ue = _.ReactDebugCurrentFrame;
|
|
489
489
|
function Je(U) {
|
|
490
490
|
if (U) {
|
|
491
|
-
var ie = U._owner, ye =
|
|
491
|
+
var ie = U._owner, ye = _e(U.type, U._source, ie ? ie.type : null);
|
|
492
492
|
ue.setExtraStackFrame(ye);
|
|
493
493
|
} else
|
|
494
494
|
ue.setExtraStackFrame(null);
|
|
495
495
|
}
|
|
496
|
-
function
|
|
496
|
+
function Ae(U, ie, ye, Ie, et) {
|
|
497
497
|
{
|
|
498
498
|
var nt = Function.call.bind(be);
|
|
499
499
|
for (var Ke in U)
|
|
@@ -513,7 +513,7 @@ function M7() {
|
|
|
513
513
|
}
|
|
514
514
|
}
|
|
515
515
|
var Ge = Array.isArray;
|
|
516
|
-
function
|
|
516
|
+
function ve(U) {
|
|
517
517
|
return Ge(U);
|
|
518
518
|
}
|
|
519
519
|
function ze(U) {
|
|
@@ -522,7 +522,7 @@ function M7() {
|
|
|
522
522
|
return ye;
|
|
523
523
|
}
|
|
524
524
|
}
|
|
525
|
-
function
|
|
525
|
+
function we(U) {
|
|
526
526
|
try {
|
|
527
527
|
return Ze(U), !1;
|
|
528
528
|
} catch {
|
|
@@ -533,7 +533,7 @@ function M7() {
|
|
|
533
533
|
return "" + U;
|
|
534
534
|
}
|
|
535
535
|
function B(U) {
|
|
536
|
-
if (
|
|
536
|
+
if (we(U))
|
|
537
537
|
return k("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.", ze(U)), Ze(U);
|
|
538
538
|
}
|
|
539
539
|
var X = _.ReactCurrentOwner, se = {
|
|
@@ -541,7 +541,7 @@ function M7() {
|
|
|
541
541
|
ref: !0,
|
|
542
542
|
__self: !0,
|
|
543
543
|
__source: !0
|
|
544
|
-
}, pe,
|
|
544
|
+
}, pe, Me;
|
|
545
545
|
function He(U) {
|
|
546
546
|
if (be.call(U, "ref")) {
|
|
547
547
|
var ie = Object.getOwnPropertyDescriptor(U, "ref").get;
|
|
@@ -575,7 +575,7 @@ function M7() {
|
|
|
575
575
|
function Cn(U, ie) {
|
|
576
576
|
{
|
|
577
577
|
var ye = function() {
|
|
578
|
-
|
|
578
|
+
Me || (Me = !0, k("%s: `ref` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)", ie));
|
|
579
579
|
};
|
|
580
580
|
ye.isReactWarning = !0, Object.defineProperty(U, "ref", {
|
|
581
581
|
get: ye,
|
|
@@ -633,7 +633,7 @@ function M7() {
|
|
|
633
633
|
var At = _.ReactCurrentOwner, si = _.ReactDebugCurrentFrame;
|
|
634
634
|
function Gn(U) {
|
|
635
635
|
if (U) {
|
|
636
|
-
var ie = U._owner, ye =
|
|
636
|
+
var ie = U._owner, ye = _e(U.type, U._source, ie ? ie.type : null);
|
|
637
637
|
si.setExtraStackFrame(ye);
|
|
638
638
|
} else
|
|
639
639
|
si.setExtraStackFrame(null);
|
|
@@ -688,7 +688,7 @@ Check the top-level render call using <` + ye + ">.");
|
|
|
688
688
|
{
|
|
689
689
|
if (typeof U != "object")
|
|
690
690
|
return;
|
|
691
|
-
if (
|
|
691
|
+
if (ve(U))
|
|
692
692
|
for (var ye = 0; ye < U.length; ye++) {
|
|
693
693
|
var Ie = U[ye];
|
|
694
694
|
Xo(Ie) && Ph(Ie, ie);
|
|
@@ -719,7 +719,7 @@ Check the top-level render call using <` + ye + ">.");
|
|
|
719
719
|
return;
|
|
720
720
|
if (ye) {
|
|
721
721
|
var Ie = J(ie);
|
|
722
|
-
|
|
722
|
+
Ae(ye, U.props, "prop", Ie, U);
|
|
723
723
|
} else if (ie.PropTypes !== void 0 && !qr) {
|
|
724
724
|
qr = !0;
|
|
725
725
|
var et = J(ie);
|
|
@@ -750,7 +750,7 @@ Check the top-level render call using <` + ye + ">.");
|
|
|
750
750
|
var Bt = o7();
|
|
751
751
|
Bt ? je += Bt : je += zh();
|
|
752
752
|
var gt;
|
|
753
|
-
U === null ? gt = "null" :
|
|
753
|
+
U === null ? gt = "null" : ve(U) ? gt = "array" : U !== void 0 && U.$$typeof === t ? (gt = "<" + (J(U.type) || "Unknown") + " />", je = " Did you accidentally export a JSX literal instead of a component?") : gt = typeof U, k("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s", gt, je);
|
|
754
754
|
}
|
|
755
755
|
var kt = Rt(U, ie, ye, et, nt);
|
|
756
756
|
if (kt == null)
|
|
@@ -759,7 +759,7 @@ Check the top-level render call using <` + ye + ">.");
|
|
|
759
759
|
var cn = ie.children;
|
|
760
760
|
if (cn !== void 0)
|
|
761
761
|
if (Ie)
|
|
762
|
-
if (
|
|
762
|
+
if (ve(cn)) {
|
|
763
763
|
for (var Ur = 0; Ur < cn.length; Ur++)
|
|
764
764
|
Bh(cn[Ur], U);
|
|
765
765
|
Object.freeze && Object.freeze(cn);
|
|
@@ -30266,22 +30266,22 @@ function J5(e, t) {
|
|
|
30266
30266
|
Array.from(N).every((fe) => !Or(Z, fe)))
|
|
30267
30267
|
return;
|
|
30268
30268
|
if (Ft(T) && J) {
|
|
30269
|
-
const fe = Xn(T),
|
|
30269
|
+
const fe = Xn(T), ke = kn(T), Ce = /auto|scroll/, Pe = fe || Ce.test(ke.overflowX), Ue = fe || Ce.test(ke.overflowY), ne = Pe && T.clientWidth > 0 && T.scrollWidth > T.clientWidth, Ee = Ue && T.clientHeight > 0 && T.scrollHeight > T.clientHeight, Ve = ke.direction === "rtl", Qe = Ee && (Ve ? V.offsetX <= T.offsetWidth - T.clientWidth : V.offsetX > T.clientWidth), Be = ne && V.offsetY > T.clientHeight;
|
|
30270
30270
|
if (Qe || Be)
|
|
30271
30271
|
return;
|
|
30272
30272
|
}
|
|
30273
30273
|
const ee = (R = i.current.floatingContext) == null ? void 0 : R.nodeId, I = y && Aa(y.nodesRef.current, ee).some((fe) => {
|
|
30274
|
-
var
|
|
30275
|
-
return rs(V, (
|
|
30274
|
+
var ke;
|
|
30275
|
+
return rs(V, (ke = fe.context) == null ? void 0 : ke.elements.floating);
|
|
30276
30276
|
});
|
|
30277
30277
|
if (rs(V, a.floating) || rs(V, a.domReference) || I)
|
|
30278
30278
|
return;
|
|
30279
30279
|
const de = y ? Aa(y.nodesRef.current, ee) : [];
|
|
30280
30280
|
if (de.length > 0) {
|
|
30281
30281
|
let fe = !0;
|
|
30282
|
-
if (de.forEach((
|
|
30282
|
+
if (de.forEach((ke) => {
|
|
30283
30283
|
var Ce;
|
|
30284
|
-
if ((Ce =
|
|
30284
|
+
if ((Ce = ke.context) != null && Ce.open && !ke.context.dataRef.current.__outsidePressBubbles) {
|
|
30285
30285
|
fe = !1;
|
|
30286
30286
|
return;
|
|
30287
30287
|
}
|
|
@@ -30656,25 +30656,25 @@ function X8e(e, t) {
|
|
|
30656
30656
|
}, [e, M]);
|
|
30657
30657
|
const R = on(() => {
|
|
30658
30658
|
l(T.current === -1 ? null : T.current);
|
|
30659
|
-
}), q = z6e(a.domReference), G = te.useRef(v), T = te.useRef(d ?? -1), Y = te.useRef(null), N = te.useRef(!0), Z = te.useRef(R), ee = te.useRef(!!a.floating), I = te.useRef(n), de = te.useRef(!1), fe = te.useRef(!1),
|
|
30660
|
-
function
|
|
30659
|
+
}), q = z6e(a.domReference), G = te.useRef(v), T = te.useRef(d ?? -1), Y = te.useRef(null), N = te.useRef(!0), Z = te.useRef(R), ee = te.useRef(!!a.floating), I = te.useRef(n), de = te.useRef(!1), fe = te.useRef(!1), ke = Yn(w), Ce = Yn(n), Pe = Yn(F), Ue = Yn(d), [ne, Ee] = te.useState(), [Ve, Qe] = te.useState(), Be = on(() => {
|
|
30660
|
+
function ve(B) {
|
|
30661
30661
|
if (y) {
|
|
30662
30662
|
var X;
|
|
30663
|
-
(X = B.id) != null && X.endsWith("-fui-option") && (B.id = i + "-" + Math.random().toString(16).slice(2, 10)),
|
|
30663
|
+
(X = B.id) != null && X.endsWith("-fui-option") && (B.id = i + "-" + Math.random().toString(16).slice(2, 10)), Ee(B.id), V?.events.emit("virtualfocus", B), P && (P.current = B);
|
|
30664
30664
|
} else
|
|
30665
30665
|
B8e(B, {
|
|
30666
30666
|
sync: de.current,
|
|
30667
30667
|
preventScroll: !0
|
|
30668
30668
|
});
|
|
30669
30669
|
}
|
|
30670
|
-
const ze = o.current[T.current],
|
|
30671
|
-
ze &&
|
|
30670
|
+
const ze = o.current[T.current], we = fe.current;
|
|
30671
|
+
ze && ve(ze), (de.current ? (B) => B() : requestAnimationFrame)(() => {
|
|
30672
30672
|
const B = o.current[T.current] || ze;
|
|
30673
30673
|
if (!B)
|
|
30674
30674
|
return;
|
|
30675
|
-
ze ||
|
|
30675
|
+
ze || ve(B);
|
|
30676
30676
|
const X = Pe.current;
|
|
30677
|
-
X && be && (
|
|
30677
|
+
X && be && (we || !N.current) && (B.scrollIntoView == null || B.scrollIntoView(typeof X == "boolean" ? {
|
|
30678
30678
|
block: "nearest",
|
|
30679
30679
|
inline: "nearest"
|
|
30680
30680
|
} : X));
|
|
@@ -30688,69 +30688,69 @@ function X8e(e, t) {
|
|
|
30688
30688
|
if (de.current = !1, Ue.current != null)
|
|
30689
30689
|
return;
|
|
30690
30690
|
if (ee.current && (T.current = -1, Be()), (!I.current || !ee.current) && G.current && (Y.current != null || G.current === !0 && Y.current == null)) {
|
|
30691
|
-
let
|
|
30691
|
+
let ve = 0;
|
|
30692
30692
|
const ze = () => {
|
|
30693
|
-
o.current[0] == null ? (
|
|
30693
|
+
o.current[0] == null ? (ve < 2 && (ve ? requestAnimationFrame : queueMicrotask)(ze), ve++) : (T.current = Y.current == null || hs(Y.current, M, g) || h ? as(o, ke.current) : n2(o, ke.current), Y.current = null, R());
|
|
30694
30694
|
};
|
|
30695
30695
|
ze();
|
|
30696
30696
|
}
|
|
30697
30697
|
} else
|
|
30698
30698
|
Ta(o, s) || (T.current = s, Be(), fe.current = !1);
|
|
30699
|
-
}, [u, n, a.floating, s, Ue, h, o, M, g, R, Be,
|
|
30700
|
-
var
|
|
30699
|
+
}, [u, n, a.floating, s, Ue, h, o, M, g, R, Be, ke]), It(() => {
|
|
30700
|
+
var ve;
|
|
30701
30701
|
if (!u || a.floating || !V || y || !ee.current)
|
|
30702
30702
|
return;
|
|
30703
|
-
const ze = V.nodesRef.current,
|
|
30704
|
-
|
|
30703
|
+
const ze = V.nodesRef.current, we = (ve = ze.find((X) => X.id === J)) == null || (ve = ve.context) == null ? void 0 : ve.elements.floating, Ze = $a(Sn(a.floating)), B = ze.some((X) => X.context && Or(X.context.elements.floating, Ze));
|
|
30704
|
+
we && !B && N.current && we.focus({
|
|
30705
30705
|
preventScroll: !0
|
|
30706
30706
|
});
|
|
30707
30707
|
}, [u, a.floating, V, J, y]), It(() => {
|
|
30708
30708
|
if (!u || !V || !y || J)
|
|
30709
30709
|
return;
|
|
30710
|
-
function
|
|
30710
|
+
function ve(ze) {
|
|
30711
30711
|
Qe(ze.id), P && (P.current = ze);
|
|
30712
30712
|
}
|
|
30713
|
-
return V.events.on("virtualfocus",
|
|
30714
|
-
V.events.off("virtualfocus",
|
|
30713
|
+
return V.events.on("virtualfocus", ve), () => {
|
|
30714
|
+
V.events.off("virtualfocus", ve);
|
|
30715
30715
|
};
|
|
30716
30716
|
}, [u, V, y, J, P]), It(() => {
|
|
30717
30717
|
Z.current = R, I.current = n, ee.current = !!a.floating;
|
|
30718
30718
|
}), It(() => {
|
|
30719
30719
|
n || (Y.current = null, G.current = v);
|
|
30720
30720
|
}, [n, v]);
|
|
30721
|
-
const
|
|
30722
|
-
function
|
|
30721
|
+
const _e = s != null, be = te.useMemo(() => {
|
|
30722
|
+
function ve(we) {
|
|
30723
30723
|
if (!Ce.current)
|
|
30724
30724
|
return;
|
|
30725
|
-
const Ze = o.current.indexOf(
|
|
30725
|
+
const Ze = o.current.indexOf(we);
|
|
30726
30726
|
Ze !== -1 && T.current !== Ze && (T.current = Ze, R());
|
|
30727
30727
|
}
|
|
30728
30728
|
return {
|
|
30729
|
-
onFocus(
|
|
30729
|
+
onFocus(we) {
|
|
30730
30730
|
let {
|
|
30731
30731
|
currentTarget: Ze
|
|
30732
|
-
} =
|
|
30733
|
-
de.current = !0,
|
|
30732
|
+
} = we;
|
|
30733
|
+
de.current = !0, ve(Ze);
|
|
30734
30734
|
},
|
|
30735
|
-
onClick: (
|
|
30735
|
+
onClick: (we) => {
|
|
30736
30736
|
let {
|
|
30737
30737
|
currentTarget: Ze
|
|
30738
|
-
} =
|
|
30738
|
+
} = we;
|
|
30739
30739
|
return Ze.focus({
|
|
30740
30740
|
preventScroll: !0
|
|
30741
30741
|
});
|
|
30742
30742
|
},
|
|
30743
30743
|
// Safari
|
|
30744
|
-
onMouseMove(
|
|
30744
|
+
onMouseMove(we) {
|
|
30745
30745
|
let {
|
|
30746
30746
|
currentTarget: Ze
|
|
30747
|
-
} =
|
|
30748
|
-
de.current = !0, fe.current = !1, _ &&
|
|
30747
|
+
} = we;
|
|
30748
|
+
de.current = !0, fe.current = !1, _ && ve(Ze);
|
|
30749
30749
|
},
|
|
30750
|
-
onPointerLeave(
|
|
30750
|
+
onPointerLeave(we) {
|
|
30751
30751
|
let {
|
|
30752
30752
|
pointerType: Ze
|
|
30753
|
-
} =
|
|
30753
|
+
} = we;
|
|
30754
30754
|
if (!(!N.current || Ze === "touch") && (de.current = !0, !!_ && (T.current = -1, R(), !y))) {
|
|
30755
30755
|
var B;
|
|
30756
30756
|
(B = K.current) == null || B.focus({
|
|
@@ -30760,26 +30760,26 @@ function X8e(e, t) {
|
|
|
30760
30760
|
}
|
|
30761
30761
|
};
|
|
30762
30762
|
}, [Ce, K, _, o, R, y]), Le = te.useCallback(() => {
|
|
30763
|
-
var
|
|
30764
|
-
return S ?? (V == null || (
|
|
30765
|
-
}, [J, V, S]), ue = on((
|
|
30766
|
-
if (N.current = !1, de.current = !0,
|
|
30763
|
+
var ve;
|
|
30764
|
+
return S ?? (V == null || (ve = V.nodesRef.current.find((ze) => ze.id === J)) == null || (ve = ve.context) == null || (ve = ve.dataRef) == null ? void 0 : ve.current.orientation);
|
|
30765
|
+
}, [J, V, S]), ue = on((ve) => {
|
|
30766
|
+
if (N.current = !1, de.current = !0, ve.which === 229 || !Ce.current && ve.currentTarget === K.current)
|
|
30767
30767
|
return;
|
|
30768
|
-
if (h && _2(
|
|
30769
|
-
ui(
|
|
30768
|
+
if (h && _2(ve.key, M, g, E)) {
|
|
30769
|
+
ui(ve.key, Le()) || pn(ve), r(!1, ve.nativeEvent, "list-navigation"), Ft(a.domReference) && (y ? V?.events.emit("virtualfocus", a.domReference) : a.domReference.focus());
|
|
30770
30770
|
return;
|
|
30771
30771
|
}
|
|
30772
|
-
const ze = T.current,
|
|
30773
|
-
if (q || (
|
|
30772
|
+
const ze = T.current, we = as(o, w), Ze = n2(o, w);
|
|
30773
|
+
if (q || (ve.key === "Home" && (pn(ve), T.current = we, R()), ve.key === "End" && (pn(ve), T.current = Ze, R())), E > 1) {
|
|
30774
30774
|
const B = C || Array.from({
|
|
30775
30775
|
length: o.current.length
|
|
30776
30776
|
}, () => ({
|
|
30777
30777
|
width: 1,
|
|
30778
30778
|
height: 1
|
|
30779
|
-
})), X = Y6e(B, E, D), se = X.findIndex((He) => He != null && !$i(o, He, w)), pe = X.reduce((He, Et, Nt) => Et != null && !$i(o, Et, w) ? Nt : He, -1),
|
|
30779
|
+
})), X = Y6e(B, E, D), se = X.findIndex((He) => He != null && !$i(o, He, w)), pe = X.reduce((He, Et, Nt) => Et != null && !$i(o, Et, w) ? Nt : He, -1), Me = X[K6e({
|
|
30780
30780
|
current: X.map((He) => He != null ? o.current[He] : null)
|
|
30781
30781
|
}, {
|
|
30782
|
-
event:
|
|
30782
|
+
event: ve,
|
|
30783
30783
|
orientation: M,
|
|
30784
30784
|
loop: m,
|
|
30785
30785
|
rtl: g,
|
|
@@ -30790,44 +30790,44 @@ function X8e(e, t) {
|
|
|
30790
30790
|
minIndex: se,
|
|
30791
30791
|
maxIndex: pe,
|
|
30792
30792
|
prevIndex: Z6e(
|
|
30793
|
-
T.current > Ze ?
|
|
30793
|
+
T.current > Ze ? we : T.current,
|
|
30794
30794
|
B,
|
|
30795
30795
|
X,
|
|
30796
30796
|
E,
|
|
30797
30797
|
// use a corner matching the edge closest to the direction
|
|
30798
30798
|
// we're moving in so we don't end up in the same item. Prefer
|
|
30799
30799
|
// top/left over bottom/right.
|
|
30800
|
-
|
|
30800
|
+
ve.key === Eo ? "bl" : ve.key === (g ? Ya : Za) ? "tr" : "tl"
|
|
30801
30801
|
),
|
|
30802
30802
|
stopEvent: !0
|
|
30803
30803
|
})];
|
|
30804
|
-
if (
|
|
30804
|
+
if (Me != null && (T.current = Me, R()), M === "both")
|
|
30805
30805
|
return;
|
|
30806
30806
|
}
|
|
30807
|
-
if (ui(
|
|
30808
|
-
if (pn(
|
|
30809
|
-
T.current = hs(
|
|
30807
|
+
if (ui(ve.key, M)) {
|
|
30808
|
+
if (pn(ve), n && !y && $a(ve.currentTarget.ownerDocument) === ve.currentTarget) {
|
|
30809
|
+
T.current = hs(ve.key, M, g) ? we : Ze, R();
|
|
30810
30810
|
return;
|
|
30811
30811
|
}
|
|
30812
|
-
hs(
|
|
30812
|
+
hs(ve.key, M, g) ? m ? T.current = ze >= Ze ? p && ze !== o.current.length ? -1 : we : Dt(o, {
|
|
30813
30813
|
startingIndex: ze,
|
|
30814
30814
|
disabledIndices: w
|
|
30815
30815
|
}) : T.current = Math.min(Ze, Dt(o, {
|
|
30816
30816
|
startingIndex: ze,
|
|
30817
30817
|
disabledIndices: w
|
|
30818
|
-
})) : m ? T.current = ze <=
|
|
30818
|
+
})) : m ? T.current = ze <= we ? p && ze !== -1 ? o.current.length : Ze : Dt(o, {
|
|
30819
30819
|
startingIndex: ze,
|
|
30820
30820
|
decrement: !0,
|
|
30821
30821
|
disabledIndices: w
|
|
30822
|
-
}) : T.current = Math.max(
|
|
30822
|
+
}) : T.current = Math.max(we, Dt(o, {
|
|
30823
30823
|
startingIndex: ze,
|
|
30824
30824
|
decrement: !0,
|
|
30825
30825
|
disabledIndices: w
|
|
30826
30826
|
})), Ta(o, T.current) && (T.current = -1), R();
|
|
30827
30827
|
}
|
|
30828
|
-
}), Je = te.useMemo(() => y && n &&
|
|
30828
|
+
}), Je = te.useMemo(() => y && n && _e && {
|
|
30829
30829
|
"aria-activedescendant": Ve || ne
|
|
30830
|
-
}, [y, n,
|
|
30830
|
+
}, [y, n, _e, Ve, ne]), Ae = te.useMemo(() => ({
|
|
30831
30831
|
"aria-orientation": M === "both" ? void 0 : M,
|
|
30832
30832
|
...q ? {} : Je,
|
|
30833
30833
|
onKeyDown: ue,
|
|
@@ -30835,47 +30835,47 @@ function X8e(e, t) {
|
|
|
30835
30835
|
N.current = !0;
|
|
30836
30836
|
}
|
|
30837
30837
|
}), [Je, ue, M, q]), Ge = te.useMemo(() => {
|
|
30838
|
-
function
|
|
30839
|
-
v === "auto" && q6e(
|
|
30838
|
+
function ve(we) {
|
|
30839
|
+
v === "auto" && q6e(we.nativeEvent) && (G.current = !0);
|
|
30840
30840
|
}
|
|
30841
|
-
function ze(
|
|
30842
|
-
G.current = v, v === "auto" && U6e(
|
|
30841
|
+
function ze(we) {
|
|
30842
|
+
G.current = v, v === "auto" && U6e(we.nativeEvent) && (G.current = !0);
|
|
30843
30843
|
}
|
|
30844
30844
|
return {
|
|
30845
30845
|
...Je,
|
|
30846
|
-
onKeyDown(
|
|
30846
|
+
onKeyDown(we) {
|
|
30847
30847
|
N.current = !1;
|
|
30848
|
-
const Ze =
|
|
30848
|
+
const Ze = we.key.startsWith("Arrow"), B = ["Home", "End"].includes(we.key), X = Ze || B, se = v2(we.key, M, g), pe = _2(we.key, M, g, E), Me = v2(we.key, Le(), g), He = ui(we.key, M), Et = (h ? Me : He) || we.key === "Enter" || we.key.trim() === "";
|
|
30849
30849
|
if (y && n) {
|
|
30850
30850
|
const bt = V?.nodesRef.current.find((At) => At.parentId == null), Rt = V && bt ? P6e(V.nodesRef.current, bt.id) : null;
|
|
30851
30851
|
if (X && Rt && P) {
|
|
30852
30852
|
const At = new KeyboardEvent("keydown", {
|
|
30853
|
-
key:
|
|
30853
|
+
key: we.key,
|
|
30854
30854
|
bubbles: !0
|
|
30855
30855
|
});
|
|
30856
30856
|
if (se || pe) {
|
|
30857
30857
|
var Nt, Tn;
|
|
30858
|
-
const si = ((Nt = Rt.context) == null ? void 0 : Nt.elements.domReference) ===
|
|
30859
|
-
Gn && (pn(
|
|
30858
|
+
const si = ((Nt = Rt.context) == null ? void 0 : Nt.elements.domReference) === we.currentTarget, Gn = pe && !si ? (Tn = Rt.context) == null ? void 0 : Tn.elements.domReference : se ? o.current.find((qr) => qr?.id === ne) : null;
|
|
30859
|
+
Gn && (pn(we), Gn.dispatchEvent(At), Qe(void 0));
|
|
30860
30860
|
}
|
|
30861
|
-
if ((He || B) && Rt.context && Rt.context.open && Rt.parentId &&
|
|
30861
|
+
if ((He || B) && Rt.context && Rt.context.open && Rt.parentId && we.currentTarget !== Rt.context.elements.domReference) {
|
|
30862
30862
|
var Cn;
|
|
30863
|
-
pn(
|
|
30863
|
+
pn(we), (Cn = Rt.context.elements.domReference) == null || Cn.dispatchEvent(At);
|
|
30864
30864
|
return;
|
|
30865
30865
|
}
|
|
30866
30866
|
}
|
|
30867
|
-
return ue(
|
|
30867
|
+
return ue(we);
|
|
30868
30868
|
}
|
|
30869
30869
|
if (!(!n && !k && Ze)) {
|
|
30870
30870
|
if (Et) {
|
|
30871
|
-
const bt = ui(
|
|
30872
|
-
Y.current = h && bt ? null :
|
|
30871
|
+
const bt = ui(we.key, Le());
|
|
30872
|
+
Y.current = h && bt ? null : we.key;
|
|
30873
30873
|
}
|
|
30874
30874
|
if (h) {
|
|
30875
|
-
|
|
30875
|
+
Me && (pn(we), n ? (T.current = as(o, ke.current), R()) : r(!0, we.nativeEvent, "list-navigation"));
|
|
30876
30876
|
return;
|
|
30877
30877
|
}
|
|
30878
|
-
He && (d != null && (T.current = d), pn(
|
|
30878
|
+
He && (d != null && (T.current = d), pn(we), !n && k ? r(!0, we.nativeEvent, "list-navigation") : ue(we), n && R());
|
|
30879
30879
|
}
|
|
30880
30880
|
},
|
|
30881
30881
|
onFocus() {
|
|
@@ -30883,15 +30883,15 @@ function X8e(e, t) {
|
|
|
30883
30883
|
},
|
|
30884
30884
|
onPointerDown: ze,
|
|
30885
30885
|
onPointerEnter: ze,
|
|
30886
|
-
onMouseDown:
|
|
30887
|
-
onClick:
|
|
30886
|
+
onMouseDown: ve,
|
|
30887
|
+
onClick: ve
|
|
30888
30888
|
};
|
|
30889
|
-
}, [ne, Je, E, ue,
|
|
30889
|
+
}, [ne, Je, E, ue, ke, v, o, h, R, r, n, k, M, Le, g, d, V, y, P]);
|
|
30890
30890
|
return te.useMemo(() => u ? {
|
|
30891
30891
|
reference: Ge,
|
|
30892
|
-
floating:
|
|
30892
|
+
floating: Ae,
|
|
30893
30893
|
item: be
|
|
30894
|
-
} : {}, [u, Ge,
|
|
30894
|
+
} : {}, [u, Ge, Ae, be]);
|
|
30895
30895
|
}
|
|
30896
30896
|
const Q8e = /* @__PURE__ */ new Map([["select", "listbox"], ["combobox", "listbox"], ["label", !1]]);
|
|
30897
30897
|
function n3(e, t) {
|
|
@@ -34249,7 +34249,7 @@ function bp() {
|
|
|
34249
34249
|
return localStorage.setItem(R2, t), t;
|
|
34250
34250
|
}
|
|
34251
34251
|
const o_e = ep(null), s_e = ({ children: e }) => {
|
|
34252
|
-
const t = St(), n =
|
|
34252
|
+
const t = St(), n = Te((h) => h.upsertChat), r = Te((h) => h.contextKey), a = Tt(() => t.config.user?.id ?? bp(), [t.config.user?.id]), i = t.config.transport, [o, s] = Lt(null), [l, u] = Lt(void 0), d = ut(r), p = ut(n);
|
|
34253
34253
|
ht(() => {
|
|
34254
34254
|
d.current = r, p.current = n;
|
|
34255
34255
|
}, [r, n]), ht(() => {
|
|
@@ -34330,13 +34330,13 @@ const o_e = ep(null), s_e = ({ children: e }) => {
|
|
|
34330
34330
|
if (!e)
|
|
34331
34331
|
throw new Error("useAgentRuntime must be used inside <AgentProvider />");
|
|
34332
34332
|
return e.runtime;
|
|
34333
|
-
},
|
|
34333
|
+
}, Te = (e) => {
|
|
34334
34334
|
const t = tp(kp);
|
|
34335
34335
|
if (!t)
|
|
34336
34336
|
throw new Error("useAgentStore must be used inside <AgentProvider />");
|
|
34337
34337
|
return _7(t.store, e);
|
|
34338
34338
|
}, l_e = () => {
|
|
34339
|
-
const e = St(), t =
|
|
34339
|
+
const e = St(), t = Te((a) => a.hydrateChats), n = e.config.user?.id ?? bp(), r = d5({
|
|
34340
34340
|
queryKey: ["mp-agents", "chats", n],
|
|
34341
34341
|
queryFn: () => e.transport.listChats({ userId: n }),
|
|
34342
34342
|
enabled: !!n
|
|
@@ -34429,7 +34429,7 @@ const o_e = ep(null), s_e = ({ children: e }) => {
|
|
|
34429
34429
|
refetchOnWindowFocus: !1
|
|
34430
34430
|
});
|
|
34431
34431
|
}, d_e = () => {
|
|
34432
|
-
const e =
|
|
34432
|
+
const e = Te((s) => s.activeChatId ?? s.draftChatKey), t = Te((s) => s.composerDraftByChat[e] ?? { value: "", attachments: [] }), n = Te((s) => s.setComposerValue), r = Te((s) => s.setComposerDraft), a = Te((s) => s.clearComposerDraft), i = Te((s) => s.addComposerAttachments), o = Te((s) => s.removeComposerAttachment);
|
|
34433
34433
|
return {
|
|
34434
34434
|
chatKey: e,
|
|
34435
34435
|
draft: t,
|
|
@@ -34445,9 +34445,43 @@ const o_e = ep(null), s_e = ({ children: e }) => {
|
|
|
34445
34445
|
const i = ct((o) => r.current(o), []);
|
|
34446
34446
|
ht(() => n.registerPageContextProvider(i), [n, i]);
|
|
34447
34447
|
}, p_e = ({ initialSystemPrompt: e, composerFormRef: t }) => {
|
|
34448
|
-
const n = St(),
|
|
34448
|
+
const n = St(), {
|
|
34449
|
+
statusByChat: r,
|
|
34450
|
+
composer: a,
|
|
34451
|
+
contextKey: i,
|
|
34452
|
+
activeChatId: o,
|
|
34453
|
+
draftChatKey: s,
|
|
34454
|
+
messageQueueByChat: l,
|
|
34455
|
+
upsertChat: u,
|
|
34456
|
+
setChatStatus: d,
|
|
34457
|
+
setActiveChat: p,
|
|
34458
|
+
setComposerError: m,
|
|
34459
|
+
moveChatKeyState: h,
|
|
34460
|
+
removeQueuedMessage: g,
|
|
34461
|
+
setPendingAssistant: y,
|
|
34462
|
+
enqueueQueuedMessage: v,
|
|
34463
|
+
commitPendingAssistant: _,
|
|
34464
|
+
setPageContextDismissed: k
|
|
34465
|
+
} = Te((T) => ({
|
|
34466
|
+
composer: T.composer,
|
|
34467
|
+
contextKey: T.contextKey,
|
|
34468
|
+
statusByChat: T.statusByChat,
|
|
34469
|
+
activeChatId: T.activeChatId,
|
|
34470
|
+
draftChatKey: T.draftChatKey,
|
|
34471
|
+
messageQueueByChat: T.messageQueueByChat,
|
|
34472
|
+
upsertChat: T.upsertChat,
|
|
34473
|
+
setActiveChat: T.setActiveChat,
|
|
34474
|
+
setChatStatus: T.setChatStatus,
|
|
34475
|
+
setComposerError: T.setComposerError,
|
|
34476
|
+
moveChatKeyState: T.moveChatKeyState,
|
|
34477
|
+
setPendingAssistant: T.setPendingAssistant,
|
|
34478
|
+
removeQueuedMessage: T.removeQueuedMessage,
|
|
34479
|
+
enqueueQueuedMessage: T.enqueueQueuedMessage,
|
|
34480
|
+
commitPendingAssistant: T.commitPendingAssistant,
|
|
34481
|
+
setPageContextDismissed: T.setPageContextDismissed
|
|
34482
|
+
})), w = ct((T) => !T || T.length === 0 ? !1 : T.some(
|
|
34449
34483
|
(Y) => Y.type === Ct.Context && Y?.metadata?.kind === "pageContext"
|
|
34450
|
-
), []), M = ut(!1), S = ut(!1), E = ut(void 0), F = ut(/* @__PURE__ */ new Set()), P = o ?? s, C = l[P] ?? [], D =
|
|
34484
|
+
), []), M = ut(!1), S = ut(!1), E = ut(void 0), F = ut(/* @__PURE__ */ new Set()), P = o ?? s, C = l[P] ?? [], D = r[P] ?? hn.Idle, W = ct(
|
|
34451
34485
|
async (T, Y) => {
|
|
34452
34486
|
if (!n.transport.generateTitle)
|
|
34453
34487
|
return;
|
|
@@ -34458,13 +34492,13 @@ const o_e = ep(null), s_e = ({ children: e }) => {
|
|
|
34458
34492
|
userId: Y,
|
|
34459
34493
|
content: T,
|
|
34460
34494
|
strategy: N,
|
|
34461
|
-
contextKey:
|
|
34495
|
+
contextKey: i
|
|
34462
34496
|
});
|
|
34463
34497
|
} catch {
|
|
34464
34498
|
}
|
|
34465
34499
|
return Z;
|
|
34466
34500
|
},
|
|
34467
|
-
[n.transport, n.config.features?.titleGeneration,
|
|
34501
|
+
[n.transport, n.config.features?.titleGeneration, i]
|
|
34468
34502
|
), K = ct(
|
|
34469
34503
|
async (T, Y) => {
|
|
34470
34504
|
const N = n.config.user?.id ?? "guest", Z = !o, ee = o ?? s, I = { current: ee };
|
|
@@ -34473,32 +34507,32 @@ const o_e = ep(null), s_e = ({ children: e }) => {
|
|
|
34473
34507
|
m(I.current, void 0);
|
|
34474
34508
|
let fe;
|
|
34475
34509
|
if (Z) {
|
|
34476
|
-
const
|
|
34477
|
-
|
|
34510
|
+
const _e = await W(T, N);
|
|
34511
|
+
_e && _e.trim().length > 0 && (fe = { ...fe ?? {}, title: _e });
|
|
34478
34512
|
}
|
|
34479
|
-
const Ce = (o ? n.store.getState().chats[o] : void 0)?.model, Pe =
|
|
34513
|
+
const Ce = (o ? n.store.getState().chats[o] : void 0)?.model, Pe = a.model !== Ce;
|
|
34480
34514
|
let Ue, ne = !1;
|
|
34481
|
-
Pe ? (Ue =
|
|
34482
|
-
const
|
|
34515
|
+
Pe ? (Ue = a.model, ne = !0) : Ce ? (Ue = Ce, ne = !1) : (Ue = void 0, ne = !1);
|
|
34516
|
+
const Ee = {
|
|
34483
34517
|
userId: N,
|
|
34484
34518
|
content: T,
|
|
34485
34519
|
metadata: fe,
|
|
34486
|
-
contextKey:
|
|
34520
|
+
contextKey: i,
|
|
34487
34521
|
...Z ? {} : { chatId: o },
|
|
34488
34522
|
...ne ? { model: Ue } : {},
|
|
34489
34523
|
...Y && Y.length > 0 ? { attachments: Y } : {}
|
|
34490
34524
|
}, Ve = () => {
|
|
34491
34525
|
y(I.current, void 0);
|
|
34492
|
-
}, Qe = (
|
|
34493
|
-
if (
|
|
34526
|
+
}, Qe = (_e) => {
|
|
34527
|
+
if (_e?.name === "AbortError") {
|
|
34494
34528
|
const be = E.current ?? I.current;
|
|
34495
34529
|
return F.current.has(be) ? (_(I.current), F.current.delete(be)) : (Ve(), t.current.setDraft(de)), { type: "aborted" };
|
|
34496
34530
|
}
|
|
34497
|
-
throw
|
|
34531
|
+
throw _e;
|
|
34498
34532
|
}, Be = async () => {
|
|
34499
|
-
let
|
|
34533
|
+
let _e = `pending-${Date.now()}`, be = "", Le;
|
|
34500
34534
|
d(I.current, hn.Streaming), y(I.current, {
|
|
34501
|
-
id:
|
|
34535
|
+
id: _e,
|
|
34502
34536
|
content: "",
|
|
34503
34537
|
reasoning: "",
|
|
34504
34538
|
toolCalls: [],
|
|
@@ -34510,15 +34544,15 @@ const o_e = ep(null), s_e = ({ children: e }) => {
|
|
|
34510
34544
|
try {
|
|
34511
34545
|
let ue = o;
|
|
34512
34546
|
const Je = await n.transport.streamMessage(
|
|
34513
|
-
|
|
34514
|
-
(
|
|
34515
|
-
if (
|
|
34516
|
-
u({ ...
|
|
34547
|
+
Ee,
|
|
34548
|
+
(Ae) => {
|
|
34549
|
+
if (Ae.type === Mn.Chat && Ae.chat) {
|
|
34550
|
+
u({ ...Ae.chat, messages: [] }), ue = Ae.chat.id, Z && (E.current = Ae.chat.id, h(I.current, Ae.chat.id), I.current = Ae.chat.id, p(Ae.chat.id));
|
|
34517
34551
|
return;
|
|
34518
34552
|
}
|
|
34519
|
-
if (
|
|
34520
|
-
be +=
|
|
34521
|
-
id:
|
|
34553
|
+
if (Ae.type === Mn.Reasoning && Ae.reasoning) {
|
|
34554
|
+
be += Ae.reasoning, Le = { ...Le ?? {
|
|
34555
|
+
id: _e,
|
|
34522
34556
|
chat: ue,
|
|
34523
34557
|
role: rt.Assistant,
|
|
34524
34558
|
content: "",
|
|
@@ -34526,23 +34560,23 @@ const o_e = ep(null), s_e = ({ children: e }) => {
|
|
|
34526
34560
|
}, reasoning: be }, y(I.current, Le);
|
|
34527
34561
|
return;
|
|
34528
34562
|
}
|
|
34529
|
-
if (
|
|
34530
|
-
throw new Error(
|
|
34531
|
-
|
|
34532
|
-
...
|
|
34533
|
-
reasoning: be ||
|
|
34563
|
+
if (Ae.type === Mn.Error && Ae.error)
|
|
34564
|
+
throw new Error(Ae.error);
|
|
34565
|
+
Ae.message && Ae.message.role === rt.User || Ae.message && (_e = Ae.message.id, Le = {
|
|
34566
|
+
...Ae.message,
|
|
34567
|
+
reasoning: be || Ae.message.reasoning
|
|
34534
34568
|
}, y(I.current, Le));
|
|
34535
34569
|
},
|
|
34536
34570
|
{ streamKey: E.current }
|
|
34537
34571
|
);
|
|
34538
34572
|
if (Je) {
|
|
34539
|
-
const
|
|
34573
|
+
const Ae = be && Le ? {
|
|
34540
34574
|
...Je,
|
|
34541
34575
|
messages: Je.messages.map(
|
|
34542
|
-
(
|
|
34576
|
+
(ve) => ve.id === Le.id && ve.role === rt.Assistant ? { ...ve, reasoning: be } : ve
|
|
34543
34577
|
)
|
|
34544
34578
|
} : Je;
|
|
34545
|
-
return u(
|
|
34579
|
+
return u(Ae), (n.store.getState().activeChatId ?? n.store.getState().draftChatKey) === I.current && p(Ae.id), Ve(), { type: "success" };
|
|
34546
34580
|
}
|
|
34547
34581
|
return Ve(), { type: "success" };
|
|
34548
34582
|
} catch (ue) {
|
|
@@ -34550,13 +34584,13 @@ const o_e = ep(null), s_e = ({ children: e }) => {
|
|
|
34550
34584
|
}
|
|
34551
34585
|
};
|
|
34552
34586
|
try {
|
|
34553
|
-
const
|
|
34554
|
-
return
|
|
34555
|
-
} catch (
|
|
34587
|
+
const _e = await Be();
|
|
34588
|
+
return _e.type === "success" && (M.current = !1), _e;
|
|
34589
|
+
} catch (_e) {
|
|
34556
34590
|
Ve();
|
|
34557
|
-
const be =
|
|
34591
|
+
const be = _e?.chat;
|
|
34558
34592
|
be && (u(be), p(be.id));
|
|
34559
|
-
const Le =
|
|
34593
|
+
const Le = _e instanceof Error ? _e : new Error("Failed to send message");
|
|
34560
34594
|
return m(I.current, Le.message || "Failed to send message"), t.current.setDraft(de), M.current = !1, { type: "error", error: Le };
|
|
34561
34595
|
} finally {
|
|
34562
34596
|
S.current = !1, d(I.current, hn.Idle), E.current = void 0;
|
|
@@ -34564,8 +34598,8 @@ const o_e = ep(null), s_e = ({ children: e }) => {
|
|
|
34564
34598
|
},
|
|
34565
34599
|
[
|
|
34566
34600
|
o,
|
|
34567
|
-
|
|
34568
|
-
|
|
34601
|
+
i,
|
|
34602
|
+
a.model,
|
|
34569
34603
|
n.transport,
|
|
34570
34604
|
n.config.user?.id,
|
|
34571
34605
|
u,
|
|
@@ -34841,7 +34875,7 @@ const o_e = ep(null), s_e = ({ children: e }) => {
|
|
|
34841
34875
|
)
|
|
34842
34876
|
] });
|
|
34843
34877
|
}, f_e = Gt(() => {
|
|
34844
|
-
const e = St(), t =
|
|
34878
|
+
const e = St(), t = Te((p) => p.composer), n = Te((p) => p.contextKey), r = Te((p) => p.setComposerOptions), a = e.config.models, { data: i, isLoading: o } = u_e(), s = Tt(() => {
|
|
34845
34879
|
const p = i && i.length > 0 ? i : a;
|
|
34846
34880
|
return s3(p, e.config.transport).filter((h) => !h.contexts?.length || h.contexts.includes(n));
|
|
34847
34881
|
}, [i, a, e.config.transport, n]), l = Tt(() => {
|
|
@@ -35138,7 +35172,7 @@ const Sd = "mp-agent:locationchange", I2 = "__mp_agent_history_patched__", O2 =
|
|
|
35138
35172
|
};
|
|
35139
35173
|
}, T_e = ho(
|
|
35140
35174
|
({ autoFocus: e, activeChatId: t, status: n, onStop: r, onSubmit: a }, i) => {
|
|
35141
|
-
const o = ua(), s = St(), l = ut(null), u = ut(null), d =
|
|
35175
|
+
const o = ua(), s = St(), l = ut(null), u = ut(null), d = Te((ne) => ne.activeChatId ?? ne.draftChatKey), p = Te((ne) => ne.composerDraftByChat[d] ?? { value: "", attachments: [] }), m = Te((ne) => ne.composerErrorByChat[d]), h = Te((ne) => ne.pageContextDismissedByChatKey[d] ?? !1), g = Te((ne) => ne.setComposerValue), y = Te((ne) => ne.setComposerDraft), v = Te((ne) => ne.clearComposerDraft), _ = Te((ne) => ne.setComposerError), k = Te((ne) => ne.addComposerAttachments), w = Te((ne) => ne.removeComposerAttachment), M = Te((ne) => ne.setPageContextDismissed), S = p.value, E = p.attachments, [F, P] = Lt(/* @__PURE__ */ new Map()), [C, D] = Lt(/* @__PURE__ */ new Map()), W = ut(S), K = ut(E), J = ut(h), V = s.config.features?.pageContextAttachments !== !1, R = (ne) => ne.type === Ct.Context && ne?.metadata?.kind === "pageContext", q = E.some(R), G = () => {
|
|
35142
35176
|
if (V)
|
|
35143
35177
|
return s.buildPageContextAttachment();
|
|
35144
35178
|
};
|
|
@@ -35158,13 +35192,13 @@ const Sd = "mp-agent:locationchange", I2 = "__mp_agent_history_patched__", O2 =
|
|
|
35158
35192
|
return A_e(() => {
|
|
35159
35193
|
if (J.current)
|
|
35160
35194
|
return;
|
|
35161
|
-
const ne = K.current,
|
|
35162
|
-
if (!
|
|
35195
|
+
const ne = K.current, Ee = ne.find(R);
|
|
35196
|
+
if (!Ee)
|
|
35163
35197
|
return;
|
|
35164
35198
|
const Ve = G();
|
|
35165
35199
|
if (!Ve)
|
|
35166
35200
|
return;
|
|
35167
|
-
const Qe = { ...Ve, id:
|
|
35201
|
+
const Qe = { ...Ve, id: Ee.id }, Be = ne.map((_e) => _e.id === Ee.id ? Qe : _e);
|
|
35168
35202
|
y(d, { value: W.current, attachments: Be });
|
|
35169
35203
|
});
|
|
35170
35204
|
}, [V, d, y]), g7(i, () => ({
|
|
@@ -35185,31 +35219,31 @@ const Sd = "mp-agent:locationchange", I2 = "__mp_agent_history_patched__", O2 =
|
|
|
35185
35219
|
const T = async (ne) => {
|
|
35186
35220
|
if (!ne || ne.length === 0)
|
|
35187
35221
|
return;
|
|
35188
|
-
const
|
|
35222
|
+
const Ee = Array.from(ne), Ve = v_e(), Qe = k_e(Ee, E, Ve);
|
|
35189
35223
|
if (Qe) {
|
|
35190
35224
|
D((Be) => {
|
|
35191
|
-
const
|
|
35192
|
-
return
|
|
35193
|
-
|
|
35194
|
-
}),
|
|
35225
|
+
const _e = new Map(Be);
|
|
35226
|
+
return Ee.forEach((be) => {
|
|
35227
|
+
_e.set(be.name, Qe.message);
|
|
35228
|
+
}), _e;
|
|
35195
35229
|
});
|
|
35196
35230
|
return;
|
|
35197
35231
|
}
|
|
35198
35232
|
D((Be) => {
|
|
35199
|
-
const
|
|
35200
|
-
return
|
|
35233
|
+
const _e = new Map(Be);
|
|
35234
|
+
return Ee.forEach((be) => _e.delete(be.name)), _e;
|
|
35201
35235
|
});
|
|
35202
35236
|
try {
|
|
35203
35237
|
const Be = s.config.transport;
|
|
35204
35238
|
if (Be.mode !== "proxy")
|
|
35205
35239
|
throw new Error("File uploads are only supported with proxy transport");
|
|
35206
|
-
const
|
|
35240
|
+
const _e = {
|
|
35207
35241
|
presignedUrlEndpoint: `${Be.baseUrl}/files/upload/presigned`,
|
|
35208
35242
|
getAuthHeaders: () => {
|
|
35209
35243
|
const Le = {};
|
|
35210
35244
|
return Be.apiKey && (Le.Authorization = `Bearer ${Be.apiKey}`), Le;
|
|
35211
35245
|
}
|
|
35212
|
-
}, be = await S_e(
|
|
35246
|
+
}, be = await S_e(Ee, _e, {
|
|
35213
35247
|
chatId: t,
|
|
35214
35248
|
userId: s.config.user?.id,
|
|
35215
35249
|
onProgress: (Le) => {
|
|
@@ -35226,25 +35260,25 @@ const Sd = "mp-agent:locationchange", I2 = "__mp_agent_history_patched__", O2 =
|
|
|
35226
35260
|
});
|
|
35227
35261
|
}, 2e3);
|
|
35228
35262
|
} catch (Be) {
|
|
35229
|
-
const
|
|
35263
|
+
const _e = Be instanceof Error ? Be.message : "Failed to upload files";
|
|
35230
35264
|
D((be) => {
|
|
35231
35265
|
const Le = new Map(be);
|
|
35232
|
-
return
|
|
35233
|
-
Le.set(ue.name,
|
|
35266
|
+
return Ee.forEach((ue) => {
|
|
35267
|
+
Le.set(ue.name, _e);
|
|
35234
35268
|
}), Le;
|
|
35235
35269
|
});
|
|
35236
35270
|
}
|
|
35237
35271
|
}, Y = () => {
|
|
35238
35272
|
u.current?.click();
|
|
35239
35273
|
}, N = (ne) => {
|
|
35240
|
-
const
|
|
35241
|
-
if (!
|
|
35274
|
+
const Ee = g_e(ne);
|
|
35275
|
+
if (!Ee)
|
|
35242
35276
|
return !1;
|
|
35243
|
-
if (E.some((Be) => Be.type === Ct.Link && Be.url ===
|
|
35277
|
+
if (E.some((Be) => Be.type === Ct.Link && Be.url === Ee))
|
|
35244
35278
|
return !0;
|
|
35245
|
-
const Ve = y_e(
|
|
35279
|
+
const Ve = y_e(Ee), Qe = {
|
|
35246
35280
|
id: $t(),
|
|
35247
|
-
url:
|
|
35281
|
+
url: Ee,
|
|
35248
35282
|
name: Ve,
|
|
35249
35283
|
type: Ct.Link
|
|
35250
35284
|
};
|
|
@@ -35252,38 +35286,38 @@ const Sd = "mp-agent:locationchange", I2 = "__mp_agent_history_patched__", O2 =
|
|
|
35252
35286
|
}, Z = async (ne) => {
|
|
35253
35287
|
await T(ne.target.files), ne.target.value = "";
|
|
35254
35288
|
}, ee = (ne) => {
|
|
35255
|
-
const
|
|
35256
|
-
|
|
35289
|
+
const Ee = E.find((Ve) => Ve.id === ne);
|
|
35290
|
+
Ee && R(Ee) && M(d, !0), w(d, ne);
|
|
35257
35291
|
}, I = () => {
|
|
35258
35292
|
if (typeof window > "u" || typeof document > "u")
|
|
35259
35293
|
return !1;
|
|
35260
|
-
const ne = a7e(),
|
|
35261
|
-
if (!
|
|
35294
|
+
const ne = a7e(), Ee = ne?.selectedText ?? window.getSelection?.()?.toString()?.trim() ?? "";
|
|
35295
|
+
if (!Ee)
|
|
35262
35296
|
return !1;
|
|
35263
|
-
const Ve = window.location?.href, Qe =
|
|
35297
|
+
const Ve = window.location?.href, Qe = Ee.slice(0, 20), Be = Ee.length > 20 ? Qe + "..." : Ee, _e = pp({
|
|
35264
35298
|
kind: "webSnippet",
|
|
35265
35299
|
url: Ve,
|
|
35266
35300
|
title: Be,
|
|
35267
|
-
selectedText:
|
|
35301
|
+
selectedText: Ee,
|
|
35268
35302
|
source: { app: "browser", url: Ve },
|
|
35269
35303
|
...ne?.target ? { target: ne.target } : {}
|
|
35270
35304
|
});
|
|
35271
|
-
return k(d, [
|
|
35305
|
+
return k(d, [_e]), !0;
|
|
35272
35306
|
}, de = (ne) => {
|
|
35273
35307
|
ne.preventDefault();
|
|
35274
|
-
const
|
|
35275
|
-
|
|
35308
|
+
const Ee = S.trim();
|
|
35309
|
+
Ee && (_(d, void 0), a(Ee));
|
|
35276
35310
|
}, fe = (ne) => {
|
|
35277
35311
|
ne.key === "Enter" && !ne.shiftKey && (ne.preventDefault(), de(ne));
|
|
35278
|
-
},
|
|
35312
|
+
}, ke = (ne) => {
|
|
35279
35313
|
m && _(d, void 0), g(d, ne.target.value);
|
|
35280
35314
|
}, Ce = (ne) => {
|
|
35281
35315
|
if (ne.nativeEvent.shiftKey)
|
|
35282
35316
|
return;
|
|
35283
|
-
const
|
|
35284
|
-
if (!
|
|
35317
|
+
const Ee = ne.clipboardData?.getData("text/plain") ?? "";
|
|
35318
|
+
if (!Ee)
|
|
35285
35319
|
return;
|
|
35286
|
-
N(
|
|
35320
|
+
N(Ee) && ne.preventDefault();
|
|
35287
35321
|
}, Ue = !!S.trim();
|
|
35288
35322
|
return /* @__PURE__ */ O.jsxs("form", { onSubmit: de, className: "mp-agent-composer-input-wrapper", children: [
|
|
35289
35323
|
/* @__PURE__ */ O.jsx("input", { ref: u, type: "file", multiple: !0, style: { display: "none" }, onChange: Z }),
|
|
@@ -35306,7 +35340,7 @@ const Sd = "mp-agent:locationchange", I2 = "__mp_agent_history_patched__", O2 =
|
|
|
35306
35340
|
autoFocus: e,
|
|
35307
35341
|
className: "mp-agent-composer-textarea",
|
|
35308
35342
|
placeholder: t ? o.followUp : o.newChat,
|
|
35309
|
-
onChange:
|
|
35343
|
+
onChange: ke,
|
|
35310
35344
|
onKeyDown: fe,
|
|
35311
35345
|
onPaste: Ce
|
|
35312
35346
|
}
|
|
@@ -35415,7 +35449,7 @@ const Sd = "mp-agent:locationchange", I2 = "__mp_agent_history_patched__", O2 =
|
|
|
35415
35449
|
)
|
|
35416
35450
|
] }) });
|
|
35417
35451
|
}, R_e = () => {
|
|
35418
|
-
const e = St(), t = e.config.user?.id ?? bp(), n =
|
|
35452
|
+
const e = St(), t = e.config.user?.id ?? bp(), n = Te((u) => u.activeChatId), r = Te((u) => u.removeChat), a = Te((u) => u.setActiveChat), [i, o] = Lt(/* @__PURE__ */ new Set()), s = ct(
|
|
35419
35453
|
async (u) => {
|
|
35420
35454
|
o((d) => new Set(d).add(u));
|
|
35421
35455
|
try {
|
|
@@ -35431,7 +35465,7 @@ const Sd = "mp-agent:locationchange", I2 = "__mp_agent_history_patched__", O2 =
|
|
|
35431
35465
|
), l = ct((u) => i.has(u), [i]);
|
|
35432
35466
|
return { deleteChat: s, isDeleting: l };
|
|
35433
35467
|
}, I_e = () => {
|
|
35434
|
-
const e = ua(), { deleteChat: t, isDeleting: n } = R_e(), r =
|
|
35468
|
+
const e = ua(), { deleteChat: t, isDeleting: n } = R_e(), r = Te((s) => s.chats), a = Te((s) => s.activeChatId), i = Te((s) => s.setActiveChat), o = Tt(
|
|
35435
35469
|
() => Object.values(r).sort((s, l) => s.updatedAt === l.updatedAt ? 0 : s.updatedAt < l.updatedAt ? 1 : -1),
|
|
35436
35470
|
[r]
|
|
35437
35471
|
);
|
|
@@ -35473,10 +35507,10 @@ const Sd = "mp-agent:locationchange", I2 = "__mp_agent_history_patched__", O2 =
|
|
|
35473
35507
|
}) })
|
|
35474
35508
|
] });
|
|
35475
35509
|
}, O_e = (e) => {
|
|
35476
|
-
const t = St(), n =
|
|
35510
|
+
const t = St(), n = Te((a) => a.isChatHistoryOpen);
|
|
35477
35511
|
return !(t.config.features?.historySidebar !== !1) || !n ? null : /* @__PURE__ */ O.jsx("div", { className: "mp-agent-chat-history-panel", children: /* @__PURE__ */ O.jsx(I_e, {}) });
|
|
35478
35512
|
}, L_e = ({ onClose: e }) => {
|
|
35479
|
-
const t = ua(), r = St().config.features?.historySidebar !== !1, a =
|
|
35513
|
+
const t = ua(), r = St().config.features?.historySidebar !== !1, a = Te((l) => l.isChatHistoryOpen), i = Te((l) => l.setChatHistoryOpen), o = Te((l) => l.setActiveChat), s = () => {
|
|
35480
35514
|
o(void 0);
|
|
35481
35515
|
};
|
|
35482
35516
|
return /* @__PURE__ */ O.jsxs("div", { className: "mp-agent-agent-controls", children: [
|
|
@@ -35496,7 +35530,7 @@ const Sd = "mp-agent:locationchange", I2 = "__mp_agent_history_patched__", O2 =
|
|
|
35496
35530
|
e && /* @__PURE__ */ O.jsx("div", { className: "mp-agent-agent-controls-right", children: /* @__PURE__ */ O.jsx(mr, { onClick: e, icon: "X", "aria-label": t.close, tooltip: t.close }) })
|
|
35497
35531
|
] });
|
|
35498
35532
|
}, D_e = ({ children: e }) => {
|
|
35499
|
-
const t =
|
|
35533
|
+
const t = Te((n) => n.isChatHistoryOpen);
|
|
35500
35534
|
return /* @__PURE__ */ O.jsx("section", { className: `mp-agent-main ${t ? "with-chat-history" : ""}`, children: e });
|
|
35501
35535
|
}, $_e = Gt(({ role: e, isGrouped: t }) => {
|
|
35502
35536
|
if (t)
|
|
@@ -39356,25 +39390,25 @@ function F9e(e, t, n) {
|
|
|
39356
39390
|
V
|
|
39357
39391
|
])
|
|
39358
39392
|
) : Z(V);
|
|
39359
|
-
function Z(
|
|
39393
|
+
function Z(ke) {
|
|
39360
39394
|
return Ce;
|
|
39361
39395
|
function Ce(Pe) {
|
|
39362
|
-
const Ue = Pe !== null &&
|
|
39396
|
+
const Ue = Pe !== null && ke[Pe], ne = Pe !== null && ke.null, Ee = [
|
|
39363
39397
|
// To do: add more extension tests.
|
|
39364
39398
|
/* c8 ignore next 2 */
|
|
39365
39399
|
...Array.isArray(Ue) ? Ue : Ue ? [Ue] : [],
|
|
39366
39400
|
...Array.isArray(ne) ? ne : ne ? [ne] : []
|
|
39367
39401
|
];
|
|
39368
|
-
return ee(
|
|
39402
|
+
return ee(Ee)(Pe);
|
|
39369
39403
|
}
|
|
39370
39404
|
}
|
|
39371
|
-
function ee(
|
|
39372
|
-
return G =
|
|
39405
|
+
function ee(ke) {
|
|
39406
|
+
return G = ke, T = 0, ke.length === 0 ? q : I(ke[T]);
|
|
39373
39407
|
}
|
|
39374
|
-
function I(
|
|
39408
|
+
function I(ke) {
|
|
39375
39409
|
return Ce;
|
|
39376
39410
|
function Ce(Pe) {
|
|
39377
|
-
return N = C(), Y =
|
|
39411
|
+
return N = C(), Y = ke, ke.partial || (u.currentConstruct = ke), ke.name && u.parser.constructs.disable.null.includes(ke.name) ? fe() : ke.tokenize.call(
|
|
39378
39412
|
// If we do have fields, create an object w/ `context` as its
|
|
39379
39413
|
// prototype.
|
|
39380
39414
|
// This allows a “live binding”, which is needed for `interrupt`.
|
|
@@ -39385,10 +39419,10 @@ function F9e(e, t, n) {
|
|
|
39385
39419
|
)(Pe);
|
|
39386
39420
|
}
|
|
39387
39421
|
}
|
|
39388
|
-
function de(
|
|
39422
|
+
function de(ke) {
|
|
39389
39423
|
return W(Y, N), R;
|
|
39390
39424
|
}
|
|
39391
|
-
function fe(
|
|
39425
|
+
function fe(ke) {
|
|
39392
39426
|
return N.restore(), ++T < G.length ? I(G[T]) : q;
|
|
39393
39427
|
}
|
|
39394
39428
|
}
|
|
@@ -39555,14 +39589,14 @@ function K9e(e) {
|
|
|
39555
39589
|
autolink: i(Je),
|
|
39556
39590
|
autolinkProtocol: C,
|
|
39557
39591
|
autolinkEmail: C,
|
|
39558
|
-
atxHeading: i(
|
|
39592
|
+
atxHeading: i(_e),
|
|
39559
39593
|
blockQuote: i(ne),
|
|
39560
39594
|
characterEscape: C,
|
|
39561
39595
|
characterReference: C,
|
|
39562
|
-
codeFenced: i(
|
|
39596
|
+
codeFenced: i(Ee),
|
|
39563
39597
|
codeFencedFenceInfo: o,
|
|
39564
39598
|
codeFencedFenceMeta: o,
|
|
39565
|
-
codeIndented: i(
|
|
39599
|
+
codeIndented: i(Ee, o),
|
|
39566
39600
|
codeText: i(Ve, o),
|
|
39567
39601
|
codeTextData: C,
|
|
39568
39602
|
data: C,
|
|
@@ -39583,14 +39617,14 @@ function K9e(e) {
|
|
|
39583
39617
|
link: i(Je),
|
|
39584
39618
|
listItem: i(Ge),
|
|
39585
39619
|
listItemValue: m,
|
|
39586
|
-
listOrdered: i(
|
|
39587
|
-
listUnordered: i(
|
|
39588
|
-
paragraph: i(
|
|
39620
|
+
listOrdered: i(Ae, p),
|
|
39621
|
+
listUnordered: i(Ae),
|
|
39622
|
+
paragraph: i(ve),
|
|
39589
39623
|
reference: I,
|
|
39590
39624
|
referenceString: o,
|
|
39591
39625
|
resourceDestinationString: o,
|
|
39592
39626
|
resourceTitleString: o,
|
|
39593
|
-
setextHeading: i(
|
|
39627
|
+
setextHeading: i(_e),
|
|
39594
39628
|
strong: i(ze),
|
|
39595
39629
|
thematicBreak: i(Ze)
|
|
39596
39630
|
},
|
|
@@ -39604,7 +39638,7 @@ function K9e(e) {
|
|
|
39604
39638
|
characterEscapeValue: D,
|
|
39605
39639
|
characterReferenceMarkerHexadecimal: fe,
|
|
39606
39640
|
characterReferenceMarkerNumeric: fe,
|
|
39607
|
-
characterReferenceValue:
|
|
39641
|
+
characterReferenceValue: ke,
|
|
39608
39642
|
characterReference: Ce,
|
|
39609
39643
|
codeFenced: l(v),
|
|
39610
39644
|
codeFencedFence: y,
|
|
@@ -39664,20 +39698,20 @@ function K9e(e) {
|
|
|
39664
39698
|
resume: d,
|
|
39665
39699
|
data: n
|
|
39666
39700
|
}, pe = [];
|
|
39667
|
-
let
|
|
39668
|
-
for (; ++
|
|
39669
|
-
if (B[
|
|
39670
|
-
if (B[
|
|
39671
|
-
pe.push(
|
|
39701
|
+
let Me = -1;
|
|
39702
|
+
for (; ++Me < B.length; )
|
|
39703
|
+
if (B[Me][1].type === "listOrdered" || B[Me][1].type === "listUnordered")
|
|
39704
|
+
if (B[Me][0] === "enter")
|
|
39705
|
+
pe.push(Me);
|
|
39672
39706
|
else {
|
|
39673
39707
|
const He = pe.pop();
|
|
39674
|
-
|
|
39708
|
+
Me = a(B, He, Me);
|
|
39675
39709
|
}
|
|
39676
|
-
for (
|
|
39677
|
-
const He = t[B[
|
|
39678
|
-
Y3.call(He, B[
|
|
39679
|
-
sliceSerialize: B[
|
|
39680
|
-
}, se), B[
|
|
39710
|
+
for (Me = -1; ++Me < B.length; ) {
|
|
39711
|
+
const He = t[B[Me][0]];
|
|
39712
|
+
Y3.call(He, B[Me][1].type) && He[B[Me][1].type].call(Object.assign({
|
|
39713
|
+
sliceSerialize: B[Me][2].sliceSerialize
|
|
39714
|
+
}, se), B[Me][1]);
|
|
39681
39715
|
}
|
|
39682
39716
|
if (se.tokenStack.length > 0) {
|
|
39683
39717
|
const He = se.tokenStack[se.tokenStack.length - 1];
|
|
@@ -39694,23 +39728,23 @@ function K9e(e) {
|
|
|
39694
39728
|
column: 1,
|
|
39695
39729
|
offset: 0
|
|
39696
39730
|
})
|
|
39697
|
-
},
|
|
39698
|
-
X = t.transforms[
|
|
39731
|
+
}, Me = -1; ++Me < t.transforms.length; )
|
|
39732
|
+
X = t.transforms[Me](X) || X;
|
|
39699
39733
|
return X;
|
|
39700
39734
|
}
|
|
39701
39735
|
function a(B, X, se) {
|
|
39702
|
-
let pe = X - 1,
|
|
39736
|
+
let pe = X - 1, Me = -1, He = !1, Et, Nt, Tn, Cn;
|
|
39703
39737
|
for (; ++pe <= se; ) {
|
|
39704
39738
|
const bt = B[pe];
|
|
39705
39739
|
switch (bt[1].type) {
|
|
39706
39740
|
case "listUnordered":
|
|
39707
39741
|
case "listOrdered":
|
|
39708
39742
|
case "blockQuote": {
|
|
39709
|
-
bt[0] === "enter" ?
|
|
39743
|
+
bt[0] === "enter" ? Me++ : Me--, Cn = void 0;
|
|
39710
39744
|
break;
|
|
39711
39745
|
}
|
|
39712
39746
|
case "lineEndingBlank": {
|
|
39713
|
-
bt[0] === "enter" && (Et && !Cn && !
|
|
39747
|
+
bt[0] === "enter" && (Et && !Cn && !Me && !Tn && (Tn = pe), Cn = void 0);
|
|
39714
39748
|
break;
|
|
39715
39749
|
}
|
|
39716
39750
|
case "linePrefix":
|
|
@@ -39722,7 +39756,7 @@ function K9e(e) {
|
|
|
39722
39756
|
default:
|
|
39723
39757
|
Cn = void 0;
|
|
39724
39758
|
}
|
|
39725
|
-
if (!
|
|
39759
|
+
if (!Me && bt[0] === "enter" && bt[1].type === "listItemPrefix" || Me === -1 && bt[0] === "exit" && (bt[1].type === "listUnordered" || bt[1].type === "listOrdered")) {
|
|
39726
39760
|
if (Et) {
|
|
39727
39761
|
let Rt = pe;
|
|
39728
39762
|
for (Nt = void 0; Rt--; ) {
|
|
@@ -39849,7 +39883,7 @@ function K9e(e) {
|
|
|
39849
39883
|
function C(B) {
|
|
39850
39884
|
const se = this.stack[this.stack.length - 1].children;
|
|
39851
39885
|
let pe = se[se.length - 1];
|
|
39852
|
-
(!pe || pe.type !== "text") && (pe =
|
|
39886
|
+
(!pe || pe.type !== "text") && (pe = we(), pe.position = {
|
|
39853
39887
|
start: or(B.start),
|
|
39854
39888
|
// @ts-expect-error: we’ll add `end` later.
|
|
39855
39889
|
end: void 0
|
|
@@ -39934,12 +39968,12 @@ function K9e(e) {
|
|
|
39934
39968
|
function fe(B) {
|
|
39935
39969
|
this.data.characterReferenceType = B.type;
|
|
39936
39970
|
}
|
|
39937
|
-
function
|
|
39971
|
+
function ke(B) {
|
|
39938
39972
|
const X = this.sliceSerialize(B), se = this.data.characterReferenceType;
|
|
39939
39973
|
let pe;
|
|
39940
39974
|
se ? (pe = P3(X, se === "characterReferenceMarkerNumeric" ? 10 : 16), this.data.characterReferenceType = void 0) : pe = qa(X);
|
|
39941
|
-
const
|
|
39942
|
-
|
|
39975
|
+
const Me = this.stack[this.stack.length - 1];
|
|
39976
|
+
Me.value += pe;
|
|
39943
39977
|
}
|
|
39944
39978
|
function Ce(B) {
|
|
39945
39979
|
const X = this.stack.pop();
|
|
@@ -39961,7 +39995,7 @@ function K9e(e) {
|
|
|
39961
39995
|
children: []
|
|
39962
39996
|
};
|
|
39963
39997
|
}
|
|
39964
|
-
function
|
|
39998
|
+
function Ee() {
|
|
39965
39999
|
return {
|
|
39966
40000
|
type: "code",
|
|
39967
40001
|
lang: null,
|
|
@@ -39990,7 +40024,7 @@ function K9e(e) {
|
|
|
39990
40024
|
children: []
|
|
39991
40025
|
};
|
|
39992
40026
|
}
|
|
39993
|
-
function
|
|
40027
|
+
function _e() {
|
|
39994
40028
|
return {
|
|
39995
40029
|
type: "heading",
|
|
39996
40030
|
// @ts-expect-error `depth` will be set later.
|
|
@@ -40025,7 +40059,7 @@ function K9e(e) {
|
|
|
40025
40059
|
children: []
|
|
40026
40060
|
};
|
|
40027
40061
|
}
|
|
40028
|
-
function
|
|
40062
|
+
function Ae(B) {
|
|
40029
40063
|
return {
|
|
40030
40064
|
type: "list",
|
|
40031
40065
|
ordered: B.type === "listOrdered",
|
|
@@ -40042,7 +40076,7 @@ function K9e(e) {
|
|
|
40042
40076
|
children: []
|
|
40043
40077
|
};
|
|
40044
40078
|
}
|
|
40045
|
-
function
|
|
40079
|
+
function ve() {
|
|
40046
40080
|
return {
|
|
40047
40081
|
type: "paragraph",
|
|
40048
40082
|
children: []
|
|
@@ -40054,7 +40088,7 @@ function K9e(e) {
|
|
|
40054
40088
|
children: []
|
|
40055
40089
|
};
|
|
40056
40090
|
}
|
|
40057
|
-
function
|
|
40091
|
+
function we() {
|
|
40058
40092
|
return {
|
|
40059
40093
|
type: "text",
|
|
40060
40094
|
value: ""
|
|
@@ -44542,7 +44576,7 @@ var Iv = function e(t) {
|
|
|
44542
44576
|
}, PNe = function(t) {
|
|
44543
44577
|
var n = /^[\x00-\x20]*([^\\/#?]*?)(:|�*58|�*3a|&colon)/i.exec(t);
|
|
44544
44578
|
return n ? n[2] !== ":" || !/^[a-zA-Z][a-zA-Z0-9+\-.]*$/.test(n[1]) ? null : n[1].toLowerCase() : "_relative";
|
|
44545
|
-
},
|
|
44579
|
+
}, xe = {
|
|
44546
44580
|
contains: CNe,
|
|
44547
44581
|
deflt: RNe,
|
|
44548
44582
|
escape: $Ne,
|
|
@@ -44703,7 +44737,7 @@ class zp {
|
|
|
44703
44737
|
*/
|
|
44704
44738
|
isTrusted(t) {
|
|
44705
44739
|
if (t.url && !t.protocol) {
|
|
44706
|
-
var n =
|
|
44740
|
+
var n = xe.protocolFromUrl(t.url);
|
|
44707
44741
|
if (n == null)
|
|
44708
44742
|
return !1;
|
|
44709
44743
|
t.protocol = n;
|
|
@@ -44762,7 +44796,7 @@ class sr {
|
|
|
44762
44796
|
return this.size >= 2;
|
|
44763
44797
|
}
|
|
44764
44798
|
}
|
|
44765
|
-
var Fp = 0, ao = 1, aa = 2, Qn = 3, Ha = 4, yn = 5, oa = 6, Vt = 7, On = [new sr(Fp, 0, !1), new sr(ao, 0, !0), new sr(aa, 1, !1), new sr(Qn, 1, !0), new sr(Ha, 2, !1), new sr(yn, 2, !0), new sr(oa, 3, !1), new sr(Vt, 3, !0)], qNe = [Ha, yn, Ha, yn, oa, Vt, oa, Vt], UNe = [yn, yn, yn, yn, Vt, Vt, Vt, Vt], HNe = [aa, Qn, Ha, yn, oa, Vt, oa, Vt], jNe = [Qn, Qn, yn, yn, Vt, Vt, Vt, Vt], VNe = [ao, ao, Qn, Qn, yn, yn, Vt, Vt], GNe = [Fp, ao, aa, Qn, aa, Qn, aa, Qn],
|
|
44799
|
+
var Fp = 0, ao = 1, aa = 2, Qn = 3, Ha = 4, yn = 5, oa = 6, Vt = 7, On = [new sr(Fp, 0, !1), new sr(ao, 0, !0), new sr(aa, 1, !1), new sr(Qn, 1, !0), new sr(Ha, 2, !1), new sr(yn, 2, !0), new sr(oa, 3, !1), new sr(Vt, 3, !0)], qNe = [Ha, yn, Ha, yn, oa, Vt, oa, Vt], UNe = [yn, yn, yn, yn, Vt, Vt, Vt, Vt], HNe = [aa, Qn, Ha, yn, oa, Vt, oa, Vt], jNe = [Qn, Qn, yn, yn, Vt, Vt, Vt, Vt], VNe = [ao, ao, Qn, Qn, yn, yn, Vt, Vt], GNe = [Fp, ao, aa, Qn, aa, Qn, aa, Qn], Ne = {
|
|
44766
44800
|
DISPLAY: On[Fp],
|
|
44767
44801
|
TEXT: On[aa],
|
|
44768
44802
|
SCRIPT: On[Ha],
|
|
@@ -45269,7 +45303,7 @@ class ni {
|
|
|
45269
45303
|
this.children = void 0, this.classes = void 0, this.height = void 0, this.depth = void 0, this.maxFontSize = void 0, this.style = void 0, this.children = t, this.classes = [], this.height = 0, this.depth = 0, this.maxFontSize = 0, this.style = {};
|
|
45270
45304
|
}
|
|
45271
45305
|
hasClass(t) {
|
|
45272
|
-
return
|
|
45306
|
+
return xe.contains(this.classes, t);
|
|
45273
45307
|
}
|
|
45274
45308
|
/** Convert the fragment into a node. */
|
|
45275
45309
|
toNode() {
|
|
@@ -47841,13 +47875,13 @@ var Pd = {
|
|
|
47841
47875
|
return n;
|
|
47842
47876
|
}, zv = function(t) {
|
|
47843
47877
|
var n = "<" + t;
|
|
47844
|
-
this.classes.length && (n += ' class="' +
|
|
47878
|
+
this.classes.length && (n += ' class="' + xe.escape(br(this.classes)) + '"');
|
|
47845
47879
|
var r = "";
|
|
47846
47880
|
for (var a in this.style)
|
|
47847
|
-
this.style.hasOwnProperty(a) && (r +=
|
|
47848
|
-
r && (n += ' style="' +
|
|
47881
|
+
this.style.hasOwnProperty(a) && (r += xe.hyphenate(a) + ":" + this.style[a] + ";");
|
|
47882
|
+
r && (n += ' style="' + xe.escape(r) + '"');
|
|
47849
47883
|
for (var i in this.attributes)
|
|
47850
|
-
this.attributes.hasOwnProperty(i) && (n += " " + i + '="' +
|
|
47884
|
+
this.attributes.hasOwnProperty(i) && (n += " " + i + '="' + xe.escape(this.attributes[i]) + '"');
|
|
47851
47885
|
n += ">";
|
|
47852
47886
|
for (var o = 0; o < this.children.length; o++)
|
|
47853
47887
|
n += this.children[o].toMarkup();
|
|
@@ -47866,7 +47900,7 @@ class ri {
|
|
|
47866
47900
|
this.attributes[t] = n;
|
|
47867
47901
|
}
|
|
47868
47902
|
hasClass(t) {
|
|
47869
|
-
return
|
|
47903
|
+
return xe.contains(this.classes, t);
|
|
47870
47904
|
}
|
|
47871
47905
|
toNode() {
|
|
47872
47906
|
return $v.call(this, "span");
|
|
@@ -47883,7 +47917,7 @@ class Bp {
|
|
|
47883
47917
|
this.attributes[t] = n;
|
|
47884
47918
|
}
|
|
47885
47919
|
hasClass(t) {
|
|
47886
|
-
return
|
|
47920
|
+
return xe.contains(this.classes, t);
|
|
47887
47921
|
}
|
|
47888
47922
|
toNode() {
|
|
47889
47923
|
return $v.call(this, "a");
|
|
@@ -47897,7 +47931,7 @@ class lAe {
|
|
|
47897
47931
|
this.src = void 0, this.alt = void 0, this.classes = void 0, this.height = void 0, this.depth = void 0, this.maxFontSize = void 0, this.style = void 0, this.alt = n, this.src = t, this.classes = ["mord"], this.style = r;
|
|
47898
47932
|
}
|
|
47899
47933
|
hasClass(t) {
|
|
47900
|
-
return
|
|
47934
|
+
return xe.contains(this.classes, t);
|
|
47901
47935
|
}
|
|
47902
47936
|
toNode() {
|
|
47903
47937
|
var t = document.createElement("img");
|
|
@@ -47907,10 +47941,10 @@ class lAe {
|
|
|
47907
47941
|
return t;
|
|
47908
47942
|
}
|
|
47909
47943
|
toMarkup() {
|
|
47910
|
-
var t = '<img src="' +
|
|
47944
|
+
var t = '<img src="' + xe.escape(this.src) + '"' + (' alt="' + xe.escape(this.alt) + '"'), n = "";
|
|
47911
47945
|
for (var r in this.style)
|
|
47912
|
-
this.style.hasOwnProperty(r) && (n +=
|
|
47913
|
-
return n && (t += ' style="' +
|
|
47946
|
+
this.style.hasOwnProperty(r) && (n += xe.hyphenate(r) + ":" + this.style[r] + ";");
|
|
47947
|
+
return n && (t += ' style="' + xe.escape(n) + '"'), t += "'/>", t;
|
|
47914
47948
|
}
|
|
47915
47949
|
}
|
|
47916
47950
|
var cAe = {
|
|
@@ -47927,7 +47961,7 @@ class vn {
|
|
|
47927
47961
|
u && this.classes.push(u + "_fallback"), /[îïíì]/.test(this.text) && (this.text = cAe[this.text]);
|
|
47928
47962
|
}
|
|
47929
47963
|
hasClass(t) {
|
|
47930
|
-
return
|
|
47964
|
+
return xe.contains(this.classes, t);
|
|
47931
47965
|
}
|
|
47932
47966
|
/**
|
|
47933
47967
|
* Creates a text node or span from a symbol node. Note that a span is only
|
|
@@ -47945,13 +47979,13 @@ class vn {
|
|
|
47945
47979
|
*/
|
|
47946
47980
|
toMarkup() {
|
|
47947
47981
|
var t = !1, n = "<span";
|
|
47948
|
-
this.classes.length && (t = !0, n += ' class="', n +=
|
|
47982
|
+
this.classes.length && (t = !0, n += ' class="', n += xe.escape(br(this.classes)), n += '"');
|
|
47949
47983
|
var r = "";
|
|
47950
47984
|
this.italic > 0 && (r += "margin-right:" + this.italic + "em;");
|
|
47951
47985
|
for (var a in this.style)
|
|
47952
|
-
this.style.hasOwnProperty(a) && (r +=
|
|
47953
|
-
r && (t = !0, n += ' style="' +
|
|
47954
|
-
var i =
|
|
47986
|
+
this.style.hasOwnProperty(a) && (r += xe.hyphenate(a) + ":" + this.style[a] + ";");
|
|
47987
|
+
r && (t = !0, n += ' style="' + xe.escape(r) + '"');
|
|
47988
|
+
var i = xe.escape(this.text);
|
|
47955
47989
|
return t ? (n += ">", n += i, n += "</span>", n) : i;
|
|
47956
47990
|
}
|
|
47957
47991
|
}
|
|
@@ -47970,7 +48004,7 @@ class tr {
|
|
|
47970
48004
|
toMarkup() {
|
|
47971
48005
|
var t = '<svg xmlns="http://www.w3.org/2000/svg"';
|
|
47972
48006
|
for (var n in this.attributes)
|
|
47973
|
-
Object.prototype.hasOwnProperty.call(this.attributes, n) && (t += " " + n + '="' +
|
|
48007
|
+
Object.prototype.hasOwnProperty.call(this.attributes, n) && (t += " " + n + '="' + xe.escape(this.attributes[n]) + '"');
|
|
47974
48008
|
t += ">";
|
|
47975
48009
|
for (var r = 0; r < this.children.length; r++)
|
|
47976
48010
|
t += this.children[r].toMarkup();
|
|
@@ -47986,7 +48020,7 @@ class kr {
|
|
|
47986
48020
|
return this.alternate ? n.setAttribute("d", this.alternate) : n.setAttribute("d", Rm[this.pathName]), n;
|
|
47987
48021
|
}
|
|
47988
48022
|
toMarkup() {
|
|
47989
|
-
return this.alternate ? '<path d="' +
|
|
48023
|
+
return this.alternate ? '<path d="' + xe.escape(this.alternate) + '"/>' : '<path d="' + xe.escape(Rm[this.pathName]) + '"/>';
|
|
47990
48024
|
}
|
|
47991
48025
|
}
|
|
47992
48026
|
class Bd {
|
|
@@ -48002,7 +48036,7 @@ class Bd {
|
|
|
48002
48036
|
toMarkup() {
|
|
48003
48037
|
var t = "<line";
|
|
48004
48038
|
for (var n in this.attributes)
|
|
48005
|
-
Object.prototype.hasOwnProperty.call(this.attributes, n) && (t += " " + n + '="' +
|
|
48039
|
+
Object.prototype.hasOwnProperty.call(this.attributes, n) && (t += " " + n + '="' + xe.escape(this.attributes[n]) + '"');
|
|
48006
48040
|
return t += "/>", t;
|
|
48007
48041
|
}
|
|
48008
48042
|
}
|
|
@@ -48040,7 +48074,7 @@ function f(e, t, n, r, a, i) {
|
|
|
48040
48074
|
replace: r
|
|
48041
48075
|
}, i && r && (st[e][r] = st[e][a]);
|
|
48042
48076
|
}
|
|
48043
|
-
var b = "math", re = "text", x = "main", $ = "ams", dt = "accent-token", ge = "bin", Wt = "close", ha = "inner",
|
|
48077
|
+
var b = "math", re = "text", x = "main", $ = "ams", dt = "accent-token", ge = "bin", Wt = "close", ha = "inner", Se = "mathord", xt = "op-token", ln = "open", zo = "punct", z = "rel", ir = "spacing", j = "textord";
|
|
48044
48078
|
f(b, x, z, "≡", "\\equiv", !0);
|
|
48045
48079
|
f(b, x, z, "≺", "\\prec", !0);
|
|
48046
48080
|
f(b, x, z, "≻", "\\succ", !0);
|
|
@@ -48405,36 +48439,36 @@ f(b, x, j, "⊤", "\\top");
|
|
|
48405
48439
|
f(b, x, j, "⊥", "\\bot");
|
|
48406
48440
|
f(b, x, j, "∅", "\\emptyset");
|
|
48407
48441
|
f(b, $, j, "∅", "\\varnothing");
|
|
48408
|
-
f(b, x,
|
|
48409
|
-
f(b, x,
|
|
48410
|
-
f(b, x,
|
|
48411
|
-
f(b, x,
|
|
48412
|
-
f(b, x,
|
|
48413
|
-
f(b, x,
|
|
48414
|
-
f(b, x,
|
|
48415
|
-
f(b, x,
|
|
48416
|
-
f(b, x,
|
|
48417
|
-
f(b, x,
|
|
48418
|
-
f(b, x,
|
|
48419
|
-
f(b, x,
|
|
48420
|
-
f(b, x,
|
|
48421
|
-
f(b, x,
|
|
48422
|
-
f(b, x,
|
|
48423
|
-
f(b, x,
|
|
48424
|
-
f(b, x,
|
|
48425
|
-
f(b, x,
|
|
48426
|
-
f(b, x,
|
|
48427
|
-
f(b, x,
|
|
48428
|
-
f(b, x,
|
|
48429
|
-
f(b, x,
|
|
48430
|
-
f(b, x,
|
|
48431
|
-
f(b, x,
|
|
48432
|
-
f(b, x,
|
|
48433
|
-
f(b, x,
|
|
48434
|
-
f(b, x,
|
|
48435
|
-
f(b, x,
|
|
48436
|
-
f(b, x,
|
|
48437
|
-
f(b, x,
|
|
48442
|
+
f(b, x, Se, "α", "\\alpha", !0);
|
|
48443
|
+
f(b, x, Se, "β", "\\beta", !0);
|
|
48444
|
+
f(b, x, Se, "γ", "\\gamma", !0);
|
|
48445
|
+
f(b, x, Se, "δ", "\\delta", !0);
|
|
48446
|
+
f(b, x, Se, "ϵ", "\\epsilon", !0);
|
|
48447
|
+
f(b, x, Se, "ζ", "\\zeta", !0);
|
|
48448
|
+
f(b, x, Se, "η", "\\eta", !0);
|
|
48449
|
+
f(b, x, Se, "θ", "\\theta", !0);
|
|
48450
|
+
f(b, x, Se, "ι", "\\iota", !0);
|
|
48451
|
+
f(b, x, Se, "κ", "\\kappa", !0);
|
|
48452
|
+
f(b, x, Se, "λ", "\\lambda", !0);
|
|
48453
|
+
f(b, x, Se, "μ", "\\mu", !0);
|
|
48454
|
+
f(b, x, Se, "ν", "\\nu", !0);
|
|
48455
|
+
f(b, x, Se, "ξ", "\\xi", !0);
|
|
48456
|
+
f(b, x, Se, "ο", "\\omicron", !0);
|
|
48457
|
+
f(b, x, Se, "π", "\\pi", !0);
|
|
48458
|
+
f(b, x, Se, "ρ", "\\rho", !0);
|
|
48459
|
+
f(b, x, Se, "σ", "\\sigma", !0);
|
|
48460
|
+
f(b, x, Se, "τ", "\\tau", !0);
|
|
48461
|
+
f(b, x, Se, "υ", "\\upsilon", !0);
|
|
48462
|
+
f(b, x, Se, "ϕ", "\\phi", !0);
|
|
48463
|
+
f(b, x, Se, "χ", "\\chi", !0);
|
|
48464
|
+
f(b, x, Se, "ψ", "\\psi", !0);
|
|
48465
|
+
f(b, x, Se, "ω", "\\omega", !0);
|
|
48466
|
+
f(b, x, Se, "ε", "\\varepsilon", !0);
|
|
48467
|
+
f(b, x, Se, "ϑ", "\\vartheta", !0);
|
|
48468
|
+
f(b, x, Se, "ϖ", "\\varpi", !0);
|
|
48469
|
+
f(b, x, Se, "ϱ", "\\varrho", !0);
|
|
48470
|
+
f(b, x, Se, "ς", "\\varsigma", !0);
|
|
48471
|
+
f(b, x, Se, "φ", "\\varphi", !0);
|
|
48438
48472
|
f(b, x, ge, "∗", "*", !0);
|
|
48439
48473
|
f(b, x, ge, "+", "+");
|
|
48440
48474
|
f(b, x, ge, "−", "-", !0);
|
|
@@ -48585,8 +48619,8 @@ f(b, x, dt, "^", "\\hat");
|
|
|
48585
48619
|
f(b, x, dt, "⃗", "\\vec");
|
|
48586
48620
|
f(b, x, dt, "˙", "\\dot");
|
|
48587
48621
|
f(b, x, dt, "˚", "\\mathring");
|
|
48588
|
-
f(b, x,
|
|
48589
|
-
f(b, x,
|
|
48622
|
+
f(b, x, Se, "", "\\@imath");
|
|
48623
|
+
f(b, x, Se, "", "\\@jmath");
|
|
48590
48624
|
f(b, x, j, "ı", "ı");
|
|
48591
48625
|
f(b, x, j, "ȷ", "ȷ");
|
|
48592
48626
|
f(re, x, j, "ı", "\\i", !0);
|
|
@@ -48651,7 +48685,7 @@ for (var Ls = 0; Ls < Fm.length; Ls++) {
|
|
|
48651
48685
|
var io = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz";
|
|
48652
48686
|
for (var Ds = 0; Ds < io.length; Ds++) {
|
|
48653
48687
|
var ki = io.charAt(Ds);
|
|
48654
|
-
f(b, x,
|
|
48688
|
+
f(b, x, Se, ki, ki), f(re, x, j, ki, ki);
|
|
48655
48689
|
}
|
|
48656
48690
|
f(b, $, j, "C", "ℂ");
|
|
48657
48691
|
f(re, $, j, "C", "ℂ");
|
|
@@ -48667,24 +48701,24 @@ f(b, $, j, "R", "ℝ");
|
|
|
48667
48701
|
f(re, $, j, "R", "ℝ");
|
|
48668
48702
|
f(b, $, j, "Z", "ℤ");
|
|
48669
48703
|
f(re, $, j, "Z", "ℤ");
|
|
48670
|
-
f(b, x,
|
|
48671
|
-
f(re, x,
|
|
48704
|
+
f(b, x, Se, "h", "ℎ");
|
|
48705
|
+
f(re, x, Se, "h", "ℎ");
|
|
48672
48706
|
var Re = "";
|
|
48673
48707
|
for (var qt = 0; qt < io.length; qt++) {
|
|
48674
48708
|
var ft = io.charAt(qt);
|
|
48675
|
-
Re = String.fromCharCode(55349, 56320 + qt), f(b, x,
|
|
48709
|
+
Re = String.fromCharCode(55349, 56320 + qt), f(b, x, Se, ft, Re), f(re, x, j, ft, Re), Re = String.fromCharCode(55349, 56372 + qt), f(b, x, Se, ft, Re), f(re, x, j, ft, Re), Re = String.fromCharCode(55349, 56424 + qt), f(b, x, Se, ft, Re), f(re, x, j, ft, Re), Re = String.fromCharCode(55349, 56580 + qt), f(b, x, Se, ft, Re), f(re, x, j, ft, Re), Re = String.fromCharCode(55349, 56684 + qt), f(b, x, Se, ft, Re), f(re, x, j, ft, Re), Re = String.fromCharCode(55349, 56736 + qt), f(b, x, Se, ft, Re), f(re, x, j, ft, Re), Re = String.fromCharCode(55349, 56788 + qt), f(b, x, Se, ft, Re), f(re, x, j, ft, Re), Re = String.fromCharCode(55349, 56840 + qt), f(b, x, Se, ft, Re), f(re, x, j, ft, Re), Re = String.fromCharCode(55349, 56944 + qt), f(b, x, Se, ft, Re), f(re, x, j, ft, Re), qt < 26 && (Re = String.fromCharCode(55349, 56632 + qt), f(b, x, Se, ft, Re), f(re, x, j, ft, Re), Re = String.fromCharCode(55349, 56476 + qt), f(b, x, Se, ft, Re), f(re, x, j, ft, Re));
|
|
48676
48710
|
}
|
|
48677
48711
|
Re = "𝕜";
|
|
48678
|
-
f(b, x,
|
|
48712
|
+
f(b, x, Se, "k", Re);
|
|
48679
48713
|
f(re, x, j, "k", Re);
|
|
48680
48714
|
for (var Sr = 0; Sr < 10; Sr++) {
|
|
48681
48715
|
var lr = Sr.toString();
|
|
48682
|
-
Re = String.fromCharCode(55349, 57294 + Sr), f(b, x,
|
|
48716
|
+
Re = String.fromCharCode(55349, 57294 + Sr), f(b, x, Se, lr, Re), f(re, x, j, lr, Re), Re = String.fromCharCode(55349, 57314 + Sr), f(b, x, Se, lr, Re), f(re, x, j, lr, Re), Re = String.fromCharCode(55349, 57324 + Sr), f(b, x, Se, lr, Re), f(re, x, j, lr, Re), Re = String.fromCharCode(55349, 57334 + Sr), f(b, x, Se, lr, Re), f(re, x, j, lr, Re);
|
|
48683
48717
|
}
|
|
48684
48718
|
var qd = "ÐÞþ";
|
|
48685
48719
|
for (var $s = 0; $s < qd.length; $s++) {
|
|
48686
48720
|
var vi = qd.charAt($s);
|
|
48687
|
-
f(b, x,
|
|
48721
|
+
f(b, x, Se, vi, vi), f(re, x, j, vi, vi);
|
|
48688
48722
|
}
|
|
48689
48723
|
var _i = [
|
|
48690
48724
|
["mathbf", "textbf", "Main-Bold"],
|
|
@@ -49181,10 +49215,10 @@ var lo = function(t) {
|
|
|
49181
49215
|
}, yt = function(t) {
|
|
49182
49216
|
return t.type === "ordgroup" ? t.body : [t];
|
|
49183
49217
|
}, nr = Q.makeSpan, AAe = ["leftmost", "mbin", "mopen", "mrel", "mop", "mpunct"], TAe = ["rightmost", "mrel", "mclose", "mpunct"], CAe = {
|
|
49184
|
-
display:
|
|
49185
|
-
text:
|
|
49186
|
-
script:
|
|
49187
|
-
scriptscript:
|
|
49218
|
+
display: Ne.DISPLAY,
|
|
49219
|
+
text: Ne.TEXT,
|
|
49220
|
+
script: Ne.SCRIPT,
|
|
49221
|
+
scriptscript: Ne.SCRIPTSCRIPT
|
|
49188
49222
|
}, RAe = {
|
|
49189
49223
|
mord: "mord",
|
|
49190
49224
|
mop: "mop",
|
|
@@ -49214,7 +49248,7 @@ var lo = function(t) {
|
|
|
49214
49248
|
var p = nr([a[0] || "leftmost"], [], n), m = nr([a[1] || "rightmost"], [], n), h = r === "root";
|
|
49215
49249
|
return qm(i, (g, y) => {
|
|
49216
49250
|
var v = y.classes[0], _ = g.classes[0];
|
|
49217
|
-
v === "mbin" &&
|
|
49251
|
+
v === "mbin" && xe.contains(TAe, _) ? y.classes[0] = "mord" : _ === "mbin" && xe.contains(AAe, v) && (g.classes[0] = "mord");
|
|
49218
49252
|
}, {
|
|
49219
49253
|
node: p
|
|
49220
49254
|
}, m, h), qm(i, (g, y) => {
|
|
@@ -49339,8 +49373,8 @@ class gn {
|
|
|
49339
49373
|
toMarkup() {
|
|
49340
49374
|
var t = "<" + this.type;
|
|
49341
49375
|
for (var n in this.attributes)
|
|
49342
|
-
Object.prototype.hasOwnProperty.call(this.attributes, n) && (t += " " + n + '="', t +=
|
|
49343
|
-
this.classes.length > 0 && (t += ' class ="' +
|
|
49376
|
+
Object.prototype.hasOwnProperty.call(this.attributes, n) && (t += " " + n + '="', t += xe.escape(this.attributes[n]), t += '"');
|
|
49377
|
+
this.classes.length > 0 && (t += ' class ="' + xe.escape(br(this.classes)) + '"'), t += ">";
|
|
49344
49378
|
for (var r = 0; r < this.children.length; r++)
|
|
49345
49379
|
t += this.children[r].toMarkup();
|
|
49346
49380
|
return t += "</" + this.type + ">", t;
|
|
@@ -49367,7 +49401,7 @@ class Ia {
|
|
|
49367
49401
|
* (representing the text itself).
|
|
49368
49402
|
*/
|
|
49369
49403
|
toMarkup() {
|
|
49370
|
-
return
|
|
49404
|
+
return xe.escape(this.toText());
|
|
49371
49405
|
}
|
|
49372
49406
|
/**
|
|
49373
49407
|
* Converts the text node into a string
|
|
@@ -49447,7 +49481,7 @@ var ae = {
|
|
|
49447
49481
|
if (r === "mathtt")
|
|
49448
49482
|
return "monospace";
|
|
49449
49483
|
var i = t.text;
|
|
49450
|
-
if (
|
|
49484
|
+
if (xe.contains(["\\imath", "\\jmath"], i))
|
|
49451
49485
|
return null;
|
|
49452
49486
|
st[a][i] && st[a][i].replace && (i = st[a][i].replace);
|
|
49453
49487
|
var o = Q.fontMap[r].fontName;
|
|
@@ -49496,7 +49530,7 @@ var ae = {
|
|
|
49496
49530
|
};
|
|
49497
49531
|
function Um(e, t, n, r, a) {
|
|
49498
49532
|
var i = en(e, n), o;
|
|
49499
|
-
i.length === 1 && i[0] instanceof gn &&
|
|
49533
|
+
i.length === 1 && i[0] instanceof gn && xe.contains(["mrow", "mtable"], i[0].type) ? o = i[0] : o = new ae.MathNode("mrow", i);
|
|
49500
49534
|
var s = new ae.MathNode("annotation", [new ae.TextNode(t)]);
|
|
49501
49535
|
s.setAttribute("encoding", "application/x-tex");
|
|
49502
49536
|
var l = new ae.MathNode("semantics", [o, s]), u = new ae.MathNode("math", [l]);
|
|
@@ -49506,7 +49540,7 @@ function Um(e, t, n, r, a) {
|
|
|
49506
49540
|
}
|
|
49507
49541
|
var Gv = function(t) {
|
|
49508
49542
|
return new Kn({
|
|
49509
|
-
style: t.displayMode ?
|
|
49543
|
+
style: t.displayMode ? Ne.DISPLAY : Ne.TEXT,
|
|
49510
49544
|
maxSize: t.maxSize,
|
|
49511
49545
|
minRuleThickness: t.minRuleThickness
|
|
49512
49546
|
});
|
|
@@ -49631,7 +49665,7 @@ var Gv = function(t) {
|
|
|
49631
49665
|
}, BAe = function(t, n) {
|
|
49632
49666
|
function r() {
|
|
49633
49667
|
var s = 4e5, l = t.label.slice(1);
|
|
49634
|
-
if (
|
|
49668
|
+
if (xe.contains(["widehat", "widecheck", "widetilde", "utilde"], l)) {
|
|
49635
49669
|
var u = t, d = PAe(u.base), p, m, h;
|
|
49636
49670
|
if (d > 5)
|
|
49637
49671
|
l === "widehat" || l === "widecheck" ? (p = 420, s = 2364, h = 0.42, m = l + "4") : (p = 312, s = 2340, h = 0.34, m = "tilde4");
|
|
@@ -49741,9 +49775,9 @@ function Po(e) {
|
|
|
49741
49775
|
var Vp = (e, t) => {
|
|
49742
49776
|
var n, r, a;
|
|
49743
49777
|
e && e.type === "supsub" ? (r = $e(e.base, "accent"), n = r.base, e.base = n, a = uAe(Xe(e, t)), e.base = r) : (r = $e(e, "accent"), n = r.base);
|
|
49744
|
-
var i = Xe(n, t.havingCrampedStyle()), o = r.isShifty &&
|
|
49778
|
+
var i = Xe(n, t.havingCrampedStyle()), o = r.isShifty && xe.isCharacterBox(n), s = 0;
|
|
49745
49779
|
if (o) {
|
|
49746
|
-
var l =
|
|
49780
|
+
var l = xe.getBaseElem(n), u = Xe(l, t.havingCrampedStyle());
|
|
49747
49781
|
s = Dm(u).skew;
|
|
49748
49782
|
}
|
|
49749
49783
|
var d = r.label === "\\c", p = d ? i.height + i.depth : Math.min(i.height, t.fontMetrics().xHeight), m;
|
|
@@ -50019,7 +50053,7 @@ me({
|
|
|
50019
50053
|
mclass: "m" + r.slice(5),
|
|
50020
50054
|
// TODO(kevinb): don't prefix with 'm'
|
|
50021
50055
|
body: yt(a),
|
|
50022
|
-
isCharacterBox:
|
|
50056
|
+
isCharacterBox: xe.isCharacterBox(a)
|
|
50023
50057
|
};
|
|
50024
50058
|
},
|
|
50025
50059
|
htmlBuilder: Yv,
|
|
@@ -50044,7 +50078,7 @@ me({
|
|
|
50044
50078
|
mode: n.mode,
|
|
50045
50079
|
mclass: Bo(t[0]),
|
|
50046
50080
|
body: yt(t[1]),
|
|
50047
|
-
isCharacterBox:
|
|
50081
|
+
isCharacterBox: xe.isCharacterBox(t[1])
|
|
50048
50082
|
};
|
|
50049
50083
|
}
|
|
50050
50084
|
});
|
|
@@ -50081,7 +50115,7 @@ me({
|
|
|
50081
50115
|
mode: n.mode,
|
|
50082
50116
|
mclass: o,
|
|
50083
50117
|
body: [l],
|
|
50084
|
-
isCharacterBox:
|
|
50118
|
+
isCharacterBox: xe.isCharacterBox(l)
|
|
50085
50119
|
};
|
|
50086
50120
|
},
|
|
50087
50121
|
htmlBuilder: Yv,
|
|
@@ -50564,8 +50598,8 @@ var Ma = function(t, n, r) {
|
|
|
50564
50598
|
}, ZAe = function(t, n, r, a) {
|
|
50565
50599
|
return Q.makeSymbol(t, "Size" + n + "-Regular", r, a);
|
|
50566
50600
|
}, n6 = function(t, n, r, a, i, o) {
|
|
50567
|
-
var s = ZAe(t, n, i, a), l = Gp(Q.makeSpan(["delimsizing", "size" + n], [s], a),
|
|
50568
|
-
return r && t6(l, a,
|
|
50601
|
+
var s = ZAe(t, n, i, a), l = Gp(Q.makeSpan(["delimsizing", "size" + n], [s], a), Ne.TEXT, a, o);
|
|
50602
|
+
return r && t6(l, a, Ne.TEXT), l;
|
|
50569
50603
|
}, zs = function(t, n, r) {
|
|
50570
50604
|
var a;
|
|
50571
50605
|
n === "Size1-Regular" ? a = "delim-size1" : a = "delim-size4";
|
|
@@ -50594,7 +50628,7 @@ var Ma = function(t, n, r) {
|
|
|
50594
50628
|
var s, l, u, d, p = "", m = 0;
|
|
50595
50629
|
s = u = d = t, l = null;
|
|
50596
50630
|
var h = "Size1-Regular";
|
|
50597
|
-
t === "\\uparrow" ? u = d = "⏐" : t === "\\Uparrow" ? u = d = "‖" : t === "\\downarrow" ? s = u = "⏐" : t === "\\Downarrow" ? s = u = "‖" : t === "\\updownarrow" ? (s = "\\uparrow", u = "⏐", d = "\\downarrow") : t === "\\Updownarrow" ? (s = "\\Uparrow", u = "‖", d = "\\Downarrow") :
|
|
50631
|
+
t === "\\uparrow" ? u = d = "⏐" : t === "\\Uparrow" ? u = d = "‖" : t === "\\downarrow" ? s = u = "⏐" : t === "\\Downarrow" ? s = u = "‖" : t === "\\updownarrow" ? (s = "\\uparrow", u = "⏐", d = "\\downarrow") : t === "\\Updownarrow" ? (s = "\\Uparrow", u = "‖", d = "\\Downarrow") : xe.contains(XAe, t) ? (u = "∣", p = "vert", m = 333) : xe.contains(QAe, t) ? (u = "∥", p = "doublevert", m = 556) : t === "[" || t === "\\lbrack" ? (s = "⎡", u = "⎢", d = "⎣", h = "Size4-Regular", p = "lbrack", m = 667) : t === "]" || t === "\\rbrack" ? (s = "⎤", u = "⎥", d = "⎦", h = "Size4-Regular", p = "rbrack", m = 667) : t === "\\lfloor" || t === "⌊" ? (u = s = "⎢", d = "⎣", h = "Size4-Regular", p = "lfloor", m = 667) : t === "\\lceil" || t === "⌈" ? (s = "⎡", u = d = "⎢", h = "Size4-Regular", p = "lceil", m = 667) : t === "\\rfloor" || t === "⌋" ? (u = s = "⎥", d = "⎦", h = "Size4-Regular", p = "rfloor", m = 667) : t === "\\rceil" || t === "⌉" ? (s = "⎤", u = d = "⎥", h = "Size4-Regular", p = "rceil", m = 667) : t === "(" || t === "\\lparen" ? (s = "⎛", u = "⎜", d = "⎝", h = "Size4-Regular", p = "lparen", m = 875) : t === ")" || t === "\\rparen" ? (s = "⎞", u = "⎟", d = "⎠", h = "Size4-Regular", p = "rparen", m = 875) : t === "\\{" || t === "\\lbrace" ? (s = "⎧", l = "⎨", d = "⎩", u = "⎪", h = "Size4-Regular") : t === "\\}" || t === "\\rbrace" ? (s = "⎫", l = "⎬", d = "⎭", u = "⎪", h = "Size4-Regular") : t === "\\lgroup" || t === "⟮" ? (s = "⎧", d = "⎩", u = "⎪", h = "Size4-Regular") : t === "\\rgroup" || t === "⟯" ? (s = "⎫", d = "⎭", u = "⎪", h = "Size4-Regular") : t === "\\lmoustache" || t === "⎰" ? (s = "⎧", d = "⎭", u = "⎪", h = "Size4-Regular") : (t === "\\rmoustache" || t === "⎱") && (s = "⎫", d = "⎩", u = "⎪", h = "Size4-Regular");
|
|
50598
50632
|
var g = Ma(s, h, i), y = g.height + g.depth, v = Ma(u, h, i), _ = v.height + v.depth, k = Ma(d, h, i), w = k.height + k.depth, M = 0, S = 1;
|
|
50599
50633
|
if (l !== null) {
|
|
50600
50634
|
var E = Ma(l, h, i);
|
|
@@ -50623,12 +50657,12 @@ var Ma = function(t, n, r) {
|
|
|
50623
50657
|
}
|
|
50624
50658
|
K.push(Mi), K.push(zs(s, h, i));
|
|
50625
50659
|
}
|
|
50626
|
-
var I = a.havingBaseStyle(
|
|
50660
|
+
var I = a.havingBaseStyle(Ne.TEXT), de = Q.makeVList({
|
|
50627
50661
|
positionType: "bottom",
|
|
50628
50662
|
positionData: W,
|
|
50629
50663
|
children: K
|
|
50630
50664
|
}, I);
|
|
50631
|
-
return Gp(Q.makeSpan(["delimsizing", "mult"], [de], I),
|
|
50665
|
+
return Gp(Q.makeSpan(["delimsizing", "mult"], [de], I), Ne.TEXT, a, o);
|
|
50632
50666
|
}, Ps = 80, Bs = 0.08, qs = function(t, n, r, a, i) {
|
|
50633
50667
|
var o = tAe(t, a, r), s = new kr(t, o), l = new tr([s], {
|
|
50634
50668
|
// Note: 1000:1 ratio of viewBox to document em width.
|
|
@@ -50650,20 +50684,20 @@ var Ma = function(t, n, r) {
|
|
|
50650
50684
|
ruleWidth: (n.fontMetrics().sqrtRuleThickness + o) * i
|
|
50651
50685
|
};
|
|
50652
50686
|
}, a6 = ["(", "\\lparen", ")", "\\rparen", "[", "\\lbrack", "]", "\\rbrack", "\\{", "\\lbrace", "\\}", "\\rbrace", "\\lfloor", "\\rfloor", "⌊", "⌋", "\\lceil", "\\rceil", "⌈", "⌉", "\\surd"], eTe = ["\\uparrow", "\\downarrow", "\\updownarrow", "\\Uparrow", "\\Downarrow", "\\Updownarrow", "|", "\\|", "\\vert", "\\Vert", "\\lvert", "\\rvert", "\\lVert", "\\rVert", "\\lgroup", "\\rgroup", "⟮", "⟯", "\\lmoustache", "\\rmoustache", "⎰", "⎱"], i6 = ["<", ">", "\\langle", "\\rangle", "/", "\\backslash", "\\lt", "\\gt"], Oa = [0, 1.2, 1.8, 2.4, 3], tTe = function(t, n, r, a, i) {
|
|
50653
|
-
if (t === "<" || t === "\\lt" || t === "⟨" ? t = "\\langle" : (t === ">" || t === "\\gt" || t === "⟩") && (t = "\\rangle"),
|
|
50687
|
+
if (t === "<" || t === "\\lt" || t === "⟨" ? t = "\\langle" : (t === ">" || t === "\\gt" || t === "⟩") && (t = "\\rangle"), xe.contains(a6, t) || xe.contains(i6, t))
|
|
50654
50688
|
return n6(t, n, !1, r, a, i);
|
|
50655
|
-
if (
|
|
50689
|
+
if (xe.contains(eTe, t))
|
|
50656
50690
|
return r6(t, Oa[n], !1, r, a, i);
|
|
50657
50691
|
throw new oe("Illegal delimiter: '" + t + "'");
|
|
50658
50692
|
}, nTe = [{
|
|
50659
50693
|
type: "small",
|
|
50660
|
-
style:
|
|
50694
|
+
style: Ne.SCRIPTSCRIPT
|
|
50661
50695
|
}, {
|
|
50662
50696
|
type: "small",
|
|
50663
|
-
style:
|
|
50697
|
+
style: Ne.SCRIPT
|
|
50664
50698
|
}, {
|
|
50665
50699
|
type: "small",
|
|
50666
|
-
style:
|
|
50700
|
+
style: Ne.TEXT
|
|
50667
50701
|
}, {
|
|
50668
50702
|
type: "large",
|
|
50669
50703
|
size: 1
|
|
@@ -50678,24 +50712,24 @@ var Ma = function(t, n, r) {
|
|
|
50678
50712
|
size: 4
|
|
50679
50713
|
}], rTe = [{
|
|
50680
50714
|
type: "small",
|
|
50681
|
-
style:
|
|
50715
|
+
style: Ne.SCRIPTSCRIPT
|
|
50682
50716
|
}, {
|
|
50683
50717
|
type: "small",
|
|
50684
|
-
style:
|
|
50718
|
+
style: Ne.SCRIPT
|
|
50685
50719
|
}, {
|
|
50686
50720
|
type: "small",
|
|
50687
|
-
style:
|
|
50721
|
+
style: Ne.TEXT
|
|
50688
50722
|
}, {
|
|
50689
50723
|
type: "stack"
|
|
50690
50724
|
}], o6 = [{
|
|
50691
50725
|
type: "small",
|
|
50692
|
-
style:
|
|
50726
|
+
style: Ne.SCRIPTSCRIPT
|
|
50693
50727
|
}, {
|
|
50694
50728
|
type: "small",
|
|
50695
|
-
style:
|
|
50729
|
+
style: Ne.SCRIPT
|
|
50696
50730
|
}, {
|
|
50697
50731
|
type: "small",
|
|
50698
|
-
style:
|
|
50732
|
+
style: Ne.TEXT
|
|
50699
50733
|
}, {
|
|
50700
50734
|
type: "large",
|
|
50701
50735
|
size: 1
|
|
@@ -50732,7 +50766,7 @@ var Ma = function(t, n, r) {
|
|
|
50732
50766
|
}, l6 = function(t, n, r, a, i, o) {
|
|
50733
50767
|
t === "<" || t === "\\lt" || t === "⟨" ? t = "\\langle" : (t === ">" || t === "\\gt" || t === "⟩") && (t = "\\rangle");
|
|
50734
50768
|
var s;
|
|
50735
|
-
|
|
50769
|
+
xe.contains(i6, t) ? s = nTe : xe.contains(a6, t) ? s = o6 : s = rTe;
|
|
50736
50770
|
var l = s6(t, n, s, a);
|
|
50737
50771
|
return l.type === "small" ? YAe(t, l.style, r, a, i, o) : l.type === "large" ? n6(t, l.size, r, a, i, o) : r6(t, n, r, a, i, o);
|
|
50738
50772
|
}, iTe = function(t, n, r, a, i, o) {
|
|
@@ -50824,7 +50858,7 @@ var Ma = function(t, n, r) {
|
|
|
50824
50858
|
}, oTe = ["(", "\\lparen", ")", "\\rparen", "[", "\\lbrack", "]", "\\rbrack", "\\{", "\\lbrace", "\\}", "\\rbrace", "\\lfloor", "\\rfloor", "⌊", "⌋", "\\lceil", "\\rceil", "⌈", "⌉", "<", ">", "\\langle", "⟨", "\\rangle", "⟩", "\\lt", "\\gt", "\\lvert", "\\rvert", "\\lVert", "\\rVert", "\\lgroup", "\\rgroup", "⟮", "⟯", "\\lmoustache", "\\rmoustache", "⎰", "⎱", "/", "\\backslash", "|", "\\vert", "\\|", "\\Vert", "\\uparrow", "\\Uparrow", "\\downarrow", "\\Downarrow", "\\updownarrow", "\\Updownarrow", "."];
|
|
50825
50859
|
function qo(e, t) {
|
|
50826
50860
|
var n = Po(e);
|
|
50827
|
-
if (n &&
|
|
50861
|
+
if (n && xe.contains(oTe, n.text))
|
|
50828
50862
|
return n;
|
|
50829
50863
|
throw n ? new oe("Invalid delimiter '" + n.text + "' after '" + t.funcName + "'", e) : new oe("Invalid delimiter type '" + e.type + "'", e);
|
|
50830
50864
|
}
|
|
@@ -50972,7 +51006,7 @@ me({
|
|
|
50972
51006
|
}
|
|
50973
51007
|
});
|
|
50974
51008
|
var Wp = (e, t) => {
|
|
50975
|
-
var n = Q.wrapFragment(Xe(e.body, t), t), r = e.label.slice(1), a = t.sizeMultiplier, i, o = 0, s =
|
|
51009
|
+
var n = Q.wrapFragment(Xe(e.body, t), t), r = e.label.slice(1), a = t.sizeMultiplier, i, o = 0, s = xe.isCharacterBox(e.body);
|
|
50976
51010
|
if (r === "sout")
|
|
50977
51011
|
i = Q.makeSpan(["stretchy", "sout"]), i.height = t.fontMetrics().defaultRuleThickness / a, o = -0.5 * t.fontMetrics().xHeight;
|
|
50978
51012
|
else if (r === "phase") {
|
|
@@ -51315,7 +51349,7 @@ var Hn = function(t, n) {
|
|
|
51315
51349
|
// User override.
|
|
51316
51350
|
), p = 1 / n.fontMetrics().ptPerEm, m = 5 * p;
|
|
51317
51351
|
if (t.colSeparationType && t.colSeparationType === "small") {
|
|
51318
|
-
var h = n.havingStyle(
|
|
51352
|
+
var h = n.havingStyle(Ne.SCRIPT).sizeMultiplier;
|
|
51319
51353
|
m = 0.2778 * (h / n.sizeMultiplier);
|
|
51320
51354
|
}
|
|
51321
51355
|
var g = t.colSeparationType === "CD" ? mt({
|
|
@@ -51361,31 +51395,31 @@ var Hn = function(t, n) {
|
|
|
51361
51395
|
if (I || (R = Q.makeSpan(["arraycolsep"], []), R.style.width = ce(n.fontMetrics().doubleRuleSep), V.push(R)), ee.separator === "|" || ee.separator === ":") {
|
|
51362
51396
|
var de = ee.separator === "|" ? "solid" : "dashed", fe = Q.makeSpan(["vertical-separator"], [], n);
|
|
51363
51397
|
fe.style.height = ce(w), fe.style.borderRightWidth = ce(d), fe.style.borderRightStyle = de, fe.style.margin = "0 " + ce(-d / 2);
|
|
51364
|
-
var
|
|
51365
|
-
|
|
51398
|
+
var ke = w - K;
|
|
51399
|
+
ke && (fe.style.verticalAlign = ce(-ke)), V.push(fe);
|
|
51366
51400
|
} else
|
|
51367
51401
|
throw new oe("Invalid separator type: " + ee.separator);
|
|
51368
51402
|
q++, ee = J[q] || {}, I = !1;
|
|
51369
51403
|
}
|
|
51370
51404
|
if (!(a >= s)) {
|
|
51371
51405
|
var Ce = void 0;
|
|
51372
|
-
(a > 0 || t.hskipBeforeAndAfter) && (Ce =
|
|
51406
|
+
(a > 0 || t.hskipBeforeAndAfter) && (Ce = xe.deflt(ee.pregap, m), Ce !== 0 && (R = Q.makeSpan(["arraycolsep"], []), R.style.width = ce(Ce), V.push(R)));
|
|
51373
51407
|
var Pe = [];
|
|
51374
51408
|
for (r = 0; r < i; ++r) {
|
|
51375
51409
|
var Ue = l[r], ne = Ue[a];
|
|
51376
51410
|
if (ne) {
|
|
51377
|
-
var
|
|
51411
|
+
var Ee = Ue.pos - K;
|
|
51378
51412
|
ne.depth = Ue.depth, ne.height = Ue.height, Pe.push({
|
|
51379
51413
|
type: "elem",
|
|
51380
51414
|
elem: ne,
|
|
51381
|
-
shift:
|
|
51415
|
+
shift: Ee
|
|
51382
51416
|
});
|
|
51383
51417
|
}
|
|
51384
51418
|
}
|
|
51385
51419
|
Pe = Q.makeVList({
|
|
51386
51420
|
positionType: "individualShift",
|
|
51387
51421
|
children: Pe
|
|
51388
|
-
}, n), Pe = Q.makeSpan(["col-align-" + (ee.align || "c")], [Pe]), V.push(Pe), (a < s - 1 || t.hskipBeforeAndAfter) && (Ce =
|
|
51422
|
+
}, n), Pe = Q.makeSpan(["col-align-" + (ee.align || "c")], [Pe]), V.push(Pe), (a < s - 1 || t.hskipBeforeAndAfter) && (Ce = xe.deflt(ee.postgap, m), Ce !== 0 && (R = Q.makeSpan(["arraycolsep"], []), R.style.width = ce(Ce), V.push(R)));
|
|
51389
51423
|
}
|
|
51390
51424
|
}
|
|
51391
51425
|
if (l = Q.makeSpan(["mtable"], V), u.length > 0) {
|
|
@@ -51394,8 +51428,8 @@ var Hn = function(t, n) {
|
|
|
51394
51428
|
elem: l,
|
|
51395
51429
|
shift: 0
|
|
51396
51430
|
}]; u.length > 0; ) {
|
|
51397
|
-
var
|
|
51398
|
-
|
|
51431
|
+
var _e = u.pop(), be = _e.pos - K;
|
|
51432
|
+
_e.isDashed ? Be.push({
|
|
51399
51433
|
type: "elem",
|
|
51400
51434
|
elem: Qe,
|
|
51401
51435
|
shift: be
|
|
@@ -51680,7 +51714,7 @@ Un({
|
|
|
51680
51714
|
numArgs: 0
|
|
51681
51715
|
},
|
|
51682
51716
|
handler(e) {
|
|
51683
|
-
|
|
51717
|
+
xe.contains(["gather", "gather*"], e.envName) && Uo(e);
|
|
51684
51718
|
var t = {
|
|
51685
51719
|
cols: [{
|
|
51686
51720
|
type: "align",
|
|
@@ -51856,7 +51890,7 @@ me({
|
|
|
51856
51890
|
handler: (e, t) => {
|
|
51857
51891
|
var {
|
|
51858
51892
|
parser: n
|
|
51859
|
-
} = e, r = t[0], a =
|
|
51893
|
+
} = e, r = t[0], a = xe.isCharacterBox(r);
|
|
51860
51894
|
return {
|
|
51861
51895
|
type: "mclass",
|
|
51862
51896
|
mode: n.mode,
|
|
@@ -51902,7 +51936,7 @@ me({
|
|
|
51902
51936
|
});
|
|
51903
51937
|
var m6 = (e, t) => {
|
|
51904
51938
|
var n = t;
|
|
51905
|
-
return e === "display" ? n = n.id >=
|
|
51939
|
+
return e === "display" ? n = n.id >= Ne.SCRIPT.id ? n.text() : Ne.DISPLAY : e === "text" && n.size === Ne.DISPLAY.size ? n = Ne.TEXT : e === "script" ? n = Ne.SCRIPT : e === "scriptscript" && (n = Ne.SCRIPTSCRIPT), n;
|
|
51906
51940
|
}, Xp = (e, t) => {
|
|
51907
51941
|
var n = m6(e.size, t.style), r = n.fracNum(), a = n.fracDen(), i;
|
|
51908
51942
|
i = t.havingStyle(r);
|
|
@@ -51915,7 +51949,7 @@ var m6 = (e, t) => {
|
|
|
51915
51949
|
var u = Xe(e.denom, i, t), d, p, m;
|
|
51916
51950
|
e.hasBarLine ? (e.barSize ? (p = mt(e.barSize, t), d = Q.makeLineSpan("frac-line", t, p)) : d = Q.makeLineSpan("frac-line", t), p = d.height, m = d.height) : (d = null, p = 0, m = t.fontMetrics().defaultRuleThickness);
|
|
51917
51951
|
var h, g, y;
|
|
51918
|
-
n.size ===
|
|
51952
|
+
n.size === Ne.DISPLAY.size || e.size === "display" ? (h = t.fontMetrics().num1, p > 0 ? g = 3 * m : g = 7 * m, y = t.fontMetrics().denom1) : (p > 0 ? (h = t.fontMetrics().num2, g = m) : (h = t.fontMetrics().num3, g = 3 * m), y = t.fontMetrics().denom2);
|
|
51919
51953
|
var v;
|
|
51920
51954
|
if (d) {
|
|
51921
51955
|
var k = t.fontMetrics().axisHeight;
|
|
@@ -51954,7 +51988,7 @@ var m6 = (e, t) => {
|
|
|
51954
51988
|
}
|
|
51955
51989
|
i = t.havingStyle(n), v.height *= i.sizeMultiplier / t.sizeMultiplier, v.depth *= i.sizeMultiplier / t.sizeMultiplier;
|
|
51956
51990
|
var M;
|
|
51957
|
-
n.size ===
|
|
51991
|
+
n.size === Ne.DISPLAY.size ? M = t.fontMetrics().delim1 : n.size === Ne.SCRIPTSCRIPT.size ? M = t.havingStyle(Ne.SCRIPT).fontMetrics().delim2 : M = t.fontMetrics().delim2;
|
|
51958
51992
|
var S, E;
|
|
51959
51993
|
return e.leftDelim == null ? S = ja(t, ["mopen"]) : S = Jn.customSizedDelim(e.leftDelim, M, !0, t.havingStyle(n), e.mode, ["mopen"]), e.continued ? E = Q.makeSpan([]) : e.rightDelim == null ? E = ja(t, ["mclose"]) : E = Jn.customSizedDelim(e.rightDelim, M, !0, t.havingStyle(n), e.mode, ["mclose"]), Q.makeSpan(["mord"].concat(i.sizingClasses(t)), [S, Q.makeSpan(["mfrac"], [v]), E], t);
|
|
51960
51994
|
}, Qp = (e, t) => {
|
|
@@ -51968,7 +52002,7 @@ var m6 = (e, t) => {
|
|
|
51968
52002
|
var a = m6(e.size, t.style);
|
|
51969
52003
|
if (a.size !== t.style.size) {
|
|
51970
52004
|
n = new ae.MathNode("mstyle", [n]);
|
|
51971
|
-
var i = a.size ===
|
|
52005
|
+
var i = a.size === Ne.DISPLAY.size ? "true" : "false";
|
|
51972
52006
|
n.setAttribute("displaystyle", i), n.setAttribute("scriptlevel", "0");
|
|
51973
52007
|
}
|
|
51974
52008
|
if (e.leftDelim != null || e.rightDelim != null) {
|
|
@@ -52218,7 +52252,7 @@ me({
|
|
|
52218
52252
|
var f6 = (e, t) => {
|
|
52219
52253
|
var n = t.style, r, a;
|
|
52220
52254
|
e.type === "supsub" ? (r = e.sup ? Xe(e.sup, t.havingStyle(n.sup()), t) : Xe(e.sub, t.havingStyle(n.sub()), t), a = $e(e.base, "horizBrace")) : a = $e(e, "horizBrace");
|
|
52221
|
-
var i = Xe(a.base, t.havingBaseStyle(
|
|
52255
|
+
var i = Xe(a.base, t.havingBaseStyle(Ne.DISPLAY)), o = rr.svgSpan(a, t), s;
|
|
52222
52256
|
if (a.isOver ? (s = Q.makeVList({
|
|
52223
52257
|
positionType: "firstBaseline",
|
|
52224
52258
|
children: [{
|
|
@@ -52693,13 +52727,13 @@ me({
|
|
|
52693
52727
|
});
|
|
52694
52728
|
var Qm = (e, t) => {
|
|
52695
52729
|
switch (t.style.size) {
|
|
52696
|
-
case
|
|
52730
|
+
case Ne.DISPLAY.size:
|
|
52697
52731
|
return e.display;
|
|
52698
|
-
case
|
|
52732
|
+
case Ne.TEXT.size:
|
|
52699
52733
|
return e.text;
|
|
52700
|
-
case
|
|
52734
|
+
case Ne.SCRIPT.size:
|
|
52701
52735
|
return e.script;
|
|
52702
|
-
case
|
|
52736
|
+
case Ne.SCRIPTSCRIPT.size:
|
|
52703
52737
|
return e.scriptscript;
|
|
52704
52738
|
default:
|
|
52705
52739
|
return e.text;
|
|
@@ -52736,7 +52770,7 @@ me({
|
|
|
52736
52770
|
});
|
|
52737
52771
|
var g6 = (e, t, n, r, a, i, o) => {
|
|
52738
52772
|
e = Q.makeSpan([], [e]);
|
|
52739
|
-
var s = n &&
|
|
52773
|
+
var s = n && xe.isCharacterBox(n), l, u;
|
|
52740
52774
|
if (t) {
|
|
52741
52775
|
var d = Xe(t, r.havingStyle(a.sup()), r);
|
|
52742
52776
|
u = {
|
|
@@ -52834,7 +52868,7 @@ var g6 = (e, t, n, r, a, i, o) => {
|
|
|
52834
52868
|
var n, r, a = !1, i;
|
|
52835
52869
|
e.type === "supsub" ? (n = e.sup, r = e.sub, i = $e(e.base, "op"), a = !0) : i = $e(e, "op");
|
|
52836
52870
|
var o = t.style, s = !1;
|
|
52837
|
-
o.size ===
|
|
52871
|
+
o.size === Ne.DISPLAY.size && i.symbol && !xe.contains(y6, i.name) && (s = !0);
|
|
52838
52872
|
var l;
|
|
52839
52873
|
if (i.symbol) {
|
|
52840
52874
|
var u = s ? "Size2-Regular" : "Size1-Regular", d = "";
|
|
@@ -52866,7 +52900,7 @@ var g6 = (e, t, n, r, a, i, o) => {
|
|
|
52866
52900
|
}, ai = (e, t) => {
|
|
52867
52901
|
var n;
|
|
52868
52902
|
if (e.symbol)
|
|
52869
|
-
n = new gn("mo", [_n(e.name, e.mode)]),
|
|
52903
|
+
n = new gn("mo", [_n(e.name, e.mode)]), xe.contains(y6, e.name) && n.setAttribute("largeop", "false");
|
|
52870
52904
|
else if (e.body)
|
|
52871
52905
|
n = new gn("mo", en(e.body, t));
|
|
52872
52906
|
else {
|
|
@@ -53428,7 +53462,7 @@ me({
|
|
|
53428
53462
|
var n = Xe(e.body, t.havingCrampedStyle());
|
|
53429
53463
|
n.height === 0 && (n.height = t.fontMetrics().xHeight), n = Q.wrapFragment(n, t);
|
|
53430
53464
|
var r = t.fontMetrics(), a = r.defaultRuleThickness, i = a;
|
|
53431
|
-
t.style.id <
|
|
53465
|
+
t.style.id < Ne.TEXT.id && (i = t.fontMetrics().xHeight);
|
|
53432
53466
|
var o = a + i / 4, s = n.height + n.depth + o + a, {
|
|
53433
53467
|
span: l,
|
|
53434
53468
|
ruleWidth: u,
|
|
@@ -53455,7 +53489,7 @@ me({
|
|
|
53455
53489
|
}]
|
|
53456
53490
|
}, t);
|
|
53457
53491
|
if (e.index) {
|
|
53458
|
-
var g = t.havingStyle(
|
|
53492
|
+
var g = t.havingStyle(Ne.SCRIPTSCRIPT), y = Xe(e.index, g, t), v = 0.6 * (h.height - h.depth), _ = Q.makeVList({
|
|
53459
53493
|
positionType: "shift",
|
|
53460
53494
|
positionData: -v,
|
|
53461
53495
|
children: [{
|
|
@@ -53476,10 +53510,10 @@ me({
|
|
|
53476
53510
|
}
|
|
53477
53511
|
});
|
|
53478
53512
|
var ef = {
|
|
53479
|
-
display:
|
|
53480
|
-
text:
|
|
53481
|
-
script:
|
|
53482
|
-
scriptscript:
|
|
53513
|
+
display: Ne.DISPLAY,
|
|
53514
|
+
text: Ne.TEXT,
|
|
53515
|
+
script: Ne.SCRIPT,
|
|
53516
|
+
scriptscript: Ne.SCRIPTSCRIPT
|
|
53483
53517
|
};
|
|
53484
53518
|
me({
|
|
53485
53519
|
type: "styling",
|
|
@@ -53522,14 +53556,14 @@ var hTe = function(t, n) {
|
|
|
53522
53556
|
var r = t.base;
|
|
53523
53557
|
if (r)
|
|
53524
53558
|
if (r.type === "op") {
|
|
53525
|
-
var a = r.limits && (n.style.size ===
|
|
53559
|
+
var a = r.limits && (n.style.size === Ne.DISPLAY.size || r.alwaysHandleSupSub);
|
|
53526
53560
|
return a ? ma : null;
|
|
53527
53561
|
} else if (r.type === "operatorname") {
|
|
53528
|
-
var i = r.alwaysHandleSupSub && (n.style.size ===
|
|
53562
|
+
var i = r.alwaysHandleSupSub && (n.style.size === Ne.DISPLAY.size || r.limits);
|
|
53529
53563
|
return i ? b6 : null;
|
|
53530
53564
|
} else {
|
|
53531
53565
|
if (r.type === "accent")
|
|
53532
|
-
return
|
|
53566
|
+
return xe.isCharacterBox(r.base) ? Vp : null;
|
|
53533
53567
|
if (r.type === "horizBrace") {
|
|
53534
53568
|
var o = !t.sub;
|
|
53535
53569
|
return o === r.isOver ? f6 : null;
|
|
@@ -53549,7 +53583,7 @@ $r({
|
|
|
53549
53583
|
base: r,
|
|
53550
53584
|
sup: a,
|
|
53551
53585
|
sub: i
|
|
53552
|
-
} = e, o = Xe(r, t), s, l, u = t.fontMetrics(), d = 0, p = 0, m = r &&
|
|
53586
|
+
} = e, o = Xe(r, t), s, l, u = t.fontMetrics(), d = 0, p = 0, m = r && xe.isCharacterBox(r);
|
|
53553
53587
|
if (a) {
|
|
53554
53588
|
var h = t.havingStyle(t.style.sup());
|
|
53555
53589
|
s = Xe(a, h, t), m || (d = o.height - h.fontMetrics().supDrop * h.sizeMultiplier / t.sizeMultiplier);
|
|
@@ -53559,7 +53593,7 @@ $r({
|
|
|
53559
53593
|
l = Xe(i, g, t), m || (p = o.depth + g.fontMetrics().subDrop * g.sizeMultiplier / t.sizeMultiplier);
|
|
53560
53594
|
}
|
|
53561
53595
|
var y;
|
|
53562
|
-
t.style ===
|
|
53596
|
+
t.style === Ne.DISPLAY ? y = u.sup1 : t.style.cramped ? y = u.sup3 : y = u.sup2;
|
|
53563
53597
|
var v = t.sizeMultiplier, _ = ce(0.5 / u.ptPerEm / v), k = null;
|
|
53564
53598
|
if (l) {
|
|
53565
53599
|
var w = e.base && e.base.type === "op" && e.base.name && (e.base.name === "\\oiint" || e.base.name === "\\oiiint");
|
|
@@ -53629,14 +53663,14 @@ $r({
|
|
|
53629
53663
|
else if (e.sub)
|
|
53630
53664
|
if (e.sup) {
|
|
53631
53665
|
var u = e.base;
|
|
53632
|
-
u && u.type === "op" && u.limits && t.style ===
|
|
53666
|
+
u && u.type === "op" && u.limits && t.style === Ne.DISPLAY || u && u.type === "operatorname" && u.alwaysHandleSupSub && (t.style === Ne.DISPLAY || u.limits) ? o = "munderover" : o = "msubsup";
|
|
53633
53667
|
} else {
|
|
53634
53668
|
var l = e.base;
|
|
53635
|
-
l && l.type === "op" && l.limits && (t.style ===
|
|
53669
|
+
l && l.type === "op" && l.limits && (t.style === Ne.DISPLAY || l.alwaysHandleSupSub) || l && l.type === "operatorname" && l.alwaysHandleSupSub && (l.limits || t.style === Ne.DISPLAY) ? o = "munder" : o = "msub";
|
|
53636
53670
|
}
|
|
53637
53671
|
else {
|
|
53638
53672
|
var s = e.base;
|
|
53639
|
-
s && s.type === "op" && s.limits && (t.style ===
|
|
53673
|
+
s && s.type === "op" && s.limits && (t.style === Ne.DISPLAY || s.alwaysHandleSupSub) || s && s.type === "operatorname" && s.alwaysHandleSupSub && (s.limits || t.style === Ne.DISPLAY) ? o = "mover" : o = "msup";
|
|
53640
53674
|
}
|
|
53641
53675
|
return new ae.MathNode(o, i);
|
|
53642
53676
|
}
|
|
@@ -54287,7 +54321,7 @@ var cf = {
|
|
|
54287
54321
|
};
|
|
54288
54322
|
A("\\dots", function(e) {
|
|
54289
54323
|
var t = "\\dotso", n = e.expandAfterFuture().text;
|
|
54290
|
-
return n in cf ? t = cf[n] : (n.slice(0, 4) === "\\not" || n in st.math &&
|
|
54324
|
+
return n in cf ? t = cf[n] : (n.slice(0, 4) === "\\not" || n in st.math && xe.contains(["bin", "rel"], st.math[n].group)) && (t = "\\dotsb"), t;
|
|
54291
54325
|
});
|
|
54292
54326
|
var eh = {
|
|
54293
54327
|
// \rightdelim@ checks for the following:
|
|
@@ -68727,7 +68761,7 @@ function kIe(e) {
|
|
|
68727
68761
|
...Z,
|
|
68728
68762
|
ee
|
|
68729
68763
|
]
|
|
68730
|
-
},
|
|
68764
|
+
}, ke = {
|
|
68731
68765
|
begin: /</,
|
|
68732
68766
|
end: />/,
|
|
68733
68767
|
keywords: "repeat each",
|
|
@@ -68780,7 +68814,7 @@ function kIe(e) {
|
|
|
68780
68814
|
3: "title.function"
|
|
68781
68815
|
},
|
|
68782
68816
|
contains: [
|
|
68783
|
-
|
|
68817
|
+
ke,
|
|
68784
68818
|
Pe,
|
|
68785
68819
|
t
|
|
68786
68820
|
],
|
|
@@ -68795,12 +68829,12 @@ function kIe(e) {
|
|
|
68795
68829
|
],
|
|
68796
68830
|
className: { 1: "keyword" },
|
|
68797
68831
|
contains: [
|
|
68798
|
-
|
|
68832
|
+
ke,
|
|
68799
68833
|
Pe,
|
|
68800
68834
|
t
|
|
68801
68835
|
],
|
|
68802
68836
|
illegal: /\[|%/
|
|
68803
|
-
},
|
|
68837
|
+
}, Ee = {
|
|
68804
68838
|
match: [
|
|
68805
68839
|
/operator/,
|
|
68806
68840
|
/\s+/,
|
|
@@ -68849,7 +68883,7 @@ function kIe(e) {
|
|
|
68849
68883
|
1: "keyword",
|
|
68850
68884
|
3: "keyword"
|
|
68851
68885
|
}
|
|
68852
|
-
},
|
|
68886
|
+
}, _e = {
|
|
68853
68887
|
begin: [
|
|
68854
68888
|
/(struct|protocol|class|extension|enum|actor)/,
|
|
68855
68889
|
/\s+/,
|
|
@@ -68862,7 +68896,7 @@ function kIe(e) {
|
|
|
68862
68896
|
},
|
|
68863
68897
|
keywords: u,
|
|
68864
68898
|
contains: [
|
|
68865
|
-
|
|
68899
|
+
ke,
|
|
68866
68900
|
...d,
|
|
68867
68901
|
{
|
|
68868
68902
|
begin: /:/,
|
|
@@ -68911,8 +68945,8 @@ function kIe(e) {
|
|
|
68911
68945
|
ne,
|
|
68912
68946
|
Qe,
|
|
68913
68947
|
Be,
|
|
68914
|
-
|
|
68915
|
-
|
|
68948
|
+
_e,
|
|
68949
|
+
Ee,
|
|
68916
68950
|
Ve,
|
|
68917
68951
|
{
|
|
68918
68952
|
beginKeywords: "import",
|
|
@@ -71047,7 +71081,7 @@ https://github.com/highlightjs/highlight.js/issues/2277`), N = q, Y = G), T ===
|
|
|
71047
71081
|
}
|
|
71048
71082
|
function ee() {
|
|
71049
71083
|
if (!ue.keywords) {
|
|
71050
|
-
|
|
71084
|
+
Ae.addText(Ge);
|
|
71051
71085
|
return;
|
|
71052
71086
|
}
|
|
71053
71087
|
let B = 0;
|
|
@@ -71055,20 +71089,20 @@ https://github.com/highlightjs/highlight.js/issues/2277`), N = q, Y = G), T ===
|
|
|
71055
71089
|
let X = ue.keywordPatternRe.exec(Ge), se = "";
|
|
71056
71090
|
for (; X; ) {
|
|
71057
71091
|
se += Ge.substring(B, X.index);
|
|
71058
|
-
const pe =
|
|
71059
|
-
if (
|
|
71060
|
-
const [He, Et] =
|
|
71061
|
-
if (
|
|
71092
|
+
const pe = _e.case_insensitive ? X[0].toLowerCase() : X[0], Me = Z(ue, pe);
|
|
71093
|
+
if (Me) {
|
|
71094
|
+
const [He, Et] = Me;
|
|
71095
|
+
if (Ae.addText(se), se = "", N[pe] = (N[pe] || 0) + 1, N[pe] <= bOe && (ve += Et), He.startsWith("_"))
|
|
71062
71096
|
se += X[0];
|
|
71063
71097
|
else {
|
|
71064
|
-
const Nt =
|
|
71098
|
+
const Nt = _e.classNameAliases[He] || He;
|
|
71065
71099
|
fe(X[0], Nt);
|
|
71066
71100
|
}
|
|
71067
71101
|
} else
|
|
71068
71102
|
se += X[0];
|
|
71069
71103
|
B = ue.keywordPatternRe.lastIndex, X = ue.keywordPatternRe.exec(Ge);
|
|
71070
71104
|
}
|
|
71071
|
-
se += Ge.substring(B),
|
|
71105
|
+
se += Ge.substring(B), Ae.addText(se);
|
|
71072
71106
|
}
|
|
71073
71107
|
function I() {
|
|
71074
71108
|
if (Ge === "")
|
|
@@ -71076,22 +71110,22 @@ https://github.com/highlightjs/highlight.js/issues/2277`), N = q, Y = G), T ===
|
|
|
71076
71110
|
let B = null;
|
|
71077
71111
|
if (typeof ue.subLanguage == "string") {
|
|
71078
71112
|
if (!t[ue.subLanguage]) {
|
|
71079
|
-
|
|
71113
|
+
Ae.addText(Ge);
|
|
71080
71114
|
return;
|
|
71081
71115
|
}
|
|
71082
71116
|
B = p(ue.subLanguage, Ge, !0, Je[ue.subLanguage]), Je[ue.subLanguage] = /** @type {CompiledMode} */
|
|
71083
71117
|
B._top;
|
|
71084
71118
|
} else
|
|
71085
71119
|
B = h(Ge, ue.subLanguage.length ? ue.subLanguage : null);
|
|
71086
|
-
ue.relevance > 0 && (
|
|
71120
|
+
ue.relevance > 0 && (ve += B.relevance), Ae.__addSublanguage(B._emitter, B.language);
|
|
71087
71121
|
}
|
|
71088
71122
|
function de() {
|
|
71089
71123
|
ue.subLanguage != null ? I() : ee(), Ge = "";
|
|
71090
71124
|
}
|
|
71091
71125
|
function fe(B, X) {
|
|
71092
|
-
B !== "" && (
|
|
71126
|
+
B !== "" && (Ae.startScope(X), Ae.addText(B), Ae.endScope());
|
|
71093
71127
|
}
|
|
71094
|
-
function
|
|
71128
|
+
function ke(B, X) {
|
|
71095
71129
|
let se = 1;
|
|
71096
71130
|
const pe = X.length - 1;
|
|
71097
71131
|
for (; se <= pe; ) {
|
|
@@ -71099,19 +71133,19 @@ https://github.com/highlightjs/highlight.js/issues/2277`), N = q, Y = G), T ===
|
|
|
71099
71133
|
se++;
|
|
71100
71134
|
continue;
|
|
71101
71135
|
}
|
|
71102
|
-
const
|
|
71103
|
-
|
|
71136
|
+
const Me = _e.classNameAliases[B[se]] || B[se], He = X[se];
|
|
71137
|
+
Me ? fe(He, Me) : (Ge = He, ee(), Ge = ""), se++;
|
|
71104
71138
|
}
|
|
71105
71139
|
}
|
|
71106
71140
|
function Ce(B, X) {
|
|
71107
|
-
return B.scope && typeof B.scope == "string" &&
|
|
71141
|
+
return B.scope && typeof B.scope == "string" && Ae.openNode(_e.classNameAliases[B.scope] || B.scope), B.beginScope && (B.beginScope._wrap ? (fe(Ge, _e.classNameAliases[B.beginScope._wrap] || B.beginScope._wrap), Ge = "") : B.beginScope._multi && (ke(B.beginScope, X), Ge = "")), ue = Object.create(B, { parent: { value: ue } }), ue;
|
|
71108
71142
|
}
|
|
71109
71143
|
function Pe(B, X, se) {
|
|
71110
71144
|
let pe = LIe(B.endRe, se);
|
|
71111
71145
|
if (pe) {
|
|
71112
71146
|
if (B["on:end"]) {
|
|
71113
|
-
const
|
|
71114
|
-
B["on:end"](X,
|
|
71147
|
+
const Me = new Of(B);
|
|
71148
|
+
B["on:end"](X, Me), Me.isMatchIgnored && (pe = !1);
|
|
71115
71149
|
}
|
|
71116
71150
|
if (pe) {
|
|
71117
71151
|
for (; B.endsParent && B.parent; )
|
|
@@ -71126,28 +71160,28 @@ https://github.com/highlightjs/highlight.js/issues/2277`), N = q, Y = G), T ===
|
|
|
71126
71160
|
return ue.matcher.regexIndex === 0 ? (Ge += B[0], 1) : (Ze = !0, 0);
|
|
71127
71161
|
}
|
|
71128
71162
|
function ne(B) {
|
|
71129
|
-
const X = B[0], se = B.rule, pe = new Of(se),
|
|
71130
|
-
for (const He of
|
|
71163
|
+
const X = B[0], se = B.rule, pe = new Of(se), Me = [se.__beforeBegin, se["on:begin"]];
|
|
71164
|
+
for (const He of Me)
|
|
71131
71165
|
if (He && (He(B, pe), pe.isMatchIgnored))
|
|
71132
71166
|
return Ue(X);
|
|
71133
71167
|
return se.skip ? Ge += X : (se.excludeBegin && (Ge += X), de(), !se.returnBegin && !se.excludeBegin && (Ge = X)), Ce(se, B), se.returnBegin ? 0 : X.length;
|
|
71134
71168
|
}
|
|
71135
|
-
function
|
|
71169
|
+
function Ee(B) {
|
|
71136
71170
|
const X = B[0], se = G.substring(B.index), pe = Pe(ue, B, se);
|
|
71137
71171
|
if (!pe)
|
|
71138
71172
|
return Pf;
|
|
71139
|
-
const
|
|
71140
|
-
ue.endScope && ue.endScope._wrap ? (de(), fe(X, ue.endScope._wrap)) : ue.endScope && ue.endScope._multi ? (de(),
|
|
71173
|
+
const Me = ue;
|
|
71174
|
+
ue.endScope && ue.endScope._wrap ? (de(), fe(X, ue.endScope._wrap)) : ue.endScope && ue.endScope._multi ? (de(), ke(ue.endScope, B)) : Me.skip ? Ge += X : (Me.returnEnd || Me.excludeEnd || (Ge += X), de(), Me.excludeEnd && (Ge = X));
|
|
71141
71175
|
do
|
|
71142
|
-
ue.scope &&
|
|
71176
|
+
ue.scope && Ae.closeNode(), !ue.skip && !ue.subLanguage && (ve += ue.relevance), ue = ue.parent;
|
|
71143
71177
|
while (ue !== pe.parent);
|
|
71144
|
-
return pe.starts && Ce(pe.starts, B),
|
|
71178
|
+
return pe.starts && Ce(pe.starts, B), Me.returnEnd ? 0 : X.length;
|
|
71145
71179
|
}
|
|
71146
71180
|
function Ve() {
|
|
71147
71181
|
const B = [];
|
|
71148
|
-
for (let X = ue; X !==
|
|
71182
|
+
for (let X = ue; X !== _e; X = X.parent)
|
|
71149
71183
|
X.scope && B.unshift(X.scope);
|
|
71150
|
-
B.forEach((X) =>
|
|
71184
|
+
B.forEach((X) => Ae.openNode(X));
|
|
71151
71185
|
}
|
|
71152
71186
|
let Qe = {};
|
|
71153
71187
|
function Be(B, X) {
|
|
@@ -71167,31 +71201,31 @@ https://github.com/highlightjs/highlight.js/issues/2277`), N = q, Y = G), T ===
|
|
|
71167
71201
|
const pe = new Error('Illegal lexeme "' + se + '" for mode "' + (ue.scope || "<unnamed>") + '"');
|
|
71168
71202
|
throw pe.mode = ue, pe;
|
|
71169
71203
|
} else if (X.type === "end") {
|
|
71170
|
-
const pe =
|
|
71204
|
+
const pe = Ee(X);
|
|
71171
71205
|
if (pe !== Pf)
|
|
71172
71206
|
return pe;
|
|
71173
71207
|
}
|
|
71174
71208
|
if (X.type === "illegal" && se === "")
|
|
71175
71209
|
return Ge += `
|
|
71176
71210
|
`, 1;
|
|
71177
|
-
if (
|
|
71211
|
+
if (we > 1e5 && we > X.index * 3)
|
|
71178
71212
|
throw new Error("potential infinite loop, way more iterations than matches");
|
|
71179
71213
|
return Ge += se, se.length;
|
|
71180
71214
|
}
|
|
71181
|
-
const
|
|
71182
|
-
if (!
|
|
71215
|
+
const _e = P(q);
|
|
71216
|
+
if (!_e)
|
|
71183
71217
|
throw Rr(i.replace("{}", q)), new Error('Unknown language: "' + q + '"');
|
|
71184
|
-
const be = mOe(
|
|
71218
|
+
const be = mOe(_e);
|
|
71185
71219
|
let Le = "", ue = Y || be;
|
|
71186
|
-
const Je = {},
|
|
71220
|
+
const Je = {}, Ae = new s.__emitter(s);
|
|
71187
71221
|
Ve();
|
|
71188
|
-
let Ge = "",
|
|
71222
|
+
let Ge = "", ve = 0, ze = 0, we = 0, Ze = !1;
|
|
71189
71223
|
try {
|
|
71190
|
-
if (
|
|
71191
|
-
|
|
71224
|
+
if (_e.__emitTokens)
|
|
71225
|
+
_e.__emitTokens(G, Ae);
|
|
71192
71226
|
else {
|
|
71193
71227
|
for (ue.matcher.considerAll(); ; ) {
|
|
71194
|
-
|
|
71228
|
+
we++, Ze ? Ze = !1 : ue.matcher.considerAll(), ue.matcher.lastIndex = ze;
|
|
71195
71229
|
const B = ue.matcher.exec(G);
|
|
71196
71230
|
if (!B)
|
|
71197
71231
|
break;
|
|
@@ -71200,12 +71234,12 @@ https://github.com/highlightjs/highlight.js/issues/2277`), N = q, Y = G), T ===
|
|
|
71200
71234
|
}
|
|
71201
71235
|
Be(G.substring(ze));
|
|
71202
71236
|
}
|
|
71203
|
-
return
|
|
71237
|
+
return Ae.finalize(), Le = Ae.toHTML(), {
|
|
71204
71238
|
language: q,
|
|
71205
71239
|
value: Le,
|
|
71206
|
-
relevance:
|
|
71240
|
+
relevance: ve,
|
|
71207
71241
|
illegal: !1,
|
|
71208
|
-
_emitter:
|
|
71242
|
+
_emitter: Ae,
|
|
71209
71243
|
_top: ue
|
|
71210
71244
|
};
|
|
71211
71245
|
} catch (B) {
|
|
@@ -71222,7 +71256,7 @@ https://github.com/highlightjs/highlight.js/issues/2277`), N = q, Y = G), T ===
|
|
|
71222
71256
|
mode: B.mode,
|
|
71223
71257
|
resultSoFar: Le
|
|
71224
71258
|
},
|
|
71225
|
-
_emitter:
|
|
71259
|
+
_emitter: Ae
|
|
71226
71260
|
};
|
|
71227
71261
|
if (a)
|
|
71228
71262
|
return {
|
|
@@ -71231,7 +71265,7 @@ https://github.com/highlightjs/highlight.js/issues/2277`), N = q, Y = G), T ===
|
|
|
71231
71265
|
illegal: !1,
|
|
71232
71266
|
relevance: 0,
|
|
71233
71267
|
errorRaised: B,
|
|
71234
|
-
_emitter:
|
|
71268
|
+
_emitter: Ae,
|
|
71235
71269
|
_top: ue
|
|
71236
71270
|
};
|
|
71237
71271
|
throw B;
|
|
@@ -72106,14 +72140,14 @@ function YOe(e, t) {
|
|
|
72106
72140
|
var fe = [{
|
|
72107
72141
|
type: "text",
|
|
72108
72142
|
value: T
|
|
72109
|
-
}],
|
|
72143
|
+
}], ke = KOe({
|
|
72110
72144
|
astGenerator: Y,
|
|
72111
72145
|
language: a,
|
|
72112
72146
|
code: T,
|
|
72113
72147
|
defaultCodeValue: fe
|
|
72114
72148
|
});
|
|
72115
|
-
|
|
72116
|
-
var Ce =
|
|
72149
|
+
ke.language === null && (ke.value = fe);
|
|
72150
|
+
var Ce = ke.value.length + w, Pe = GOe(ke, F, W, y, _, w, Ce, E, C);
|
|
72117
72151
|
return /* @__PURE__ */ Dn.createElement(V, de, /* @__PURE__ */ Dn.createElement(q, p, !_ && Z, K({
|
|
72118
72152
|
rows: Pe,
|
|
72119
72153
|
stylesheet: s,
|
|
@@ -72993,9 +73027,9 @@ function jze(e, t) {
|
|
|
72993
73027
|
offset: h + (d.offset || 0)
|
|
72994
73028
|
};
|
|
72995
73029
|
}
|
|
72996
|
-
function I(fe,
|
|
73030
|
+
function I(fe, ke) {
|
|
72997
73031
|
var Ce = ee();
|
|
72998
|
-
Ce.column +=
|
|
73032
|
+
Ce.column += ke, Ce.offset += ke, o.call(u, xr[fe], Ce, fe);
|
|
72999
73033
|
}
|
|
73000
73034
|
function de() {
|
|
73001
73035
|
_ && (k.push(_), a && a.call(s, _, { start: T, end: ee() }), _ = "");
|
|
@@ -73645,8 +73679,8 @@ var U8 = { exports: {} };
|
|
|
73645
73679
|
if (V) {
|
|
73646
73680
|
if (ee = u(G, Y, k, J), !ee || ee.index >= k.length)
|
|
73647
73681
|
break;
|
|
73648
|
-
var
|
|
73649
|
-
for (de += T.value.length;
|
|
73682
|
+
var ke = ee.index, I = ee.index + ee[0].length, de = Y;
|
|
73683
|
+
for (de += T.value.length; ke >= de; )
|
|
73650
73684
|
T = T.next, de += T.value.length;
|
|
73651
73685
|
if (de -= T.value.length, Y = de, T.value instanceof l)
|
|
73652
73686
|
continue;
|
|
@@ -73655,12 +73689,12 @@ var U8 = { exports: {} };
|
|
|
73655
73689
|
Z--, N = k.slice(Y, de), ee.index -= Y;
|
|
73656
73690
|
} else if (ee = u(G, 0, N, J), !ee)
|
|
73657
73691
|
continue;
|
|
73658
|
-
var
|
|
73692
|
+
var ke = ee.index, Ce = ee[0], Pe = N.slice(0, ke), Ue = N.slice(ke + Ce.length), ne = Y + N.length;
|
|
73659
73693
|
F && ne > F.reach && (F.reach = ne);
|
|
73660
|
-
var
|
|
73661
|
-
Pe && (
|
|
73694
|
+
var Ee = T.prev;
|
|
73695
|
+
Pe && (Ee = m(w, Ee, Pe), Y += Pe.length), h(w, Ee, Z);
|
|
73662
73696
|
var Ve = new l(P, K ? s.tokenize(Ce, K) : Ce, R, Ce);
|
|
73663
|
-
if (T = m(w,
|
|
73697
|
+
if (T = m(w, Ee, Ve), Ue && m(w, T, Ue), Z > 1) {
|
|
73664
73698
|
var Qe = {
|
|
73665
73699
|
cause: P + "," + D,
|
|
73666
73700
|
reach: ne
|
|
@@ -94682,7 +94716,7 @@ const r7 = (e, t) => {
|
|
|
94682
94716
|
d && /* @__PURE__ */ O.jsx("div", { className: "mp-agent-tool-approval-status-inline", children: e.approved ? /* @__PURE__ */ O.jsx("span", { className: "mp-agent-tool-approved", children: "✓ Approved" }) : /* @__PURE__ */ O.jsx("span", { className: "mp-agent-tool-denied", children: "✗ Denied" }) })
|
|
94683
94717
|
] });
|
|
94684
94718
|
}, a7 = ({ call: e, messageId: t, chatId: n, onApprovalSent: r }) => {
|
|
94685
|
-
const a = St(), i =
|
|
94719
|
+
const a = St(), i = Te((d) => d.upsertChat), [o, s] = Lt(!1), l = a.config.user?.id ?? "guest", u = async (d, p) => {
|
|
94686
94720
|
if (!(!e.approvalId || o)) {
|
|
94687
94721
|
s(!0);
|
|
94688
94722
|
try {
|
|
@@ -94719,7 +94753,7 @@ const r7 = (e, t) => {
|
|
|
94719
94753
|
/* @__PURE__ */ O.jsx("button", { className: "mp-agent-tool-deny-button", onClick: () => u(!1), disabled: o, children: o ? "Processing..." : "Deny" })
|
|
94720
94754
|
] });
|
|
94721
94755
|
}, bHe = ({ call: e, contextKey: t, messageId: n, chatId: r }) => {
|
|
94722
|
-
const a = St(), i = Tt(() => a.getToolRenderer(e) ?? gHe, [a, e]), o =
|
|
94756
|
+
const a = St(), i = Tt(() => a.getToolRenderer(e) ?? gHe, [a, e]), o = Te((d) => d.upsertChat), s = a.getToolRenderer(e), l = async () => {
|
|
94723
94757
|
try {
|
|
94724
94758
|
const d = await a.transport.getChat(r);
|
|
94725
94759
|
o(d);
|
|
@@ -94763,7 +94797,7 @@ const r7 = (e, t) => {
|
|
|
94763
94797
|
const t = e.activeChatId;
|
|
94764
94798
|
return t ? e.chats[t]?.messages ?? c5 : c5;
|
|
94765
94799
|
}, wHe = () => {
|
|
94766
|
-
const e = ua(), t =
|
|
94800
|
+
const e = ua(), t = Te((d) => d.activeChatId), n = Te((d) => d.draftChatKey), r = Te((d) => d.contextKey), a = Te(_He), i = t ?? n, o = Te((d) => d.pendingAssistantByChat[i]?.content.length), s = Te((d) => d.pendingAssistantByChat[i]?.id), { containerRef: l, sentinelRef: u } = c_e({ threshold: 100, scrollOnMount: !0 }, [
|
|
94767
94801
|
t,
|
|
94768
94802
|
a.length,
|
|
94769
94803
|
s,
|
|
@@ -94778,7 +94812,7 @@ const r7 = (e, t) => {
|
|
|
94778
94812
|
/* @__PURE__ */ O.jsx("div", { ref: u, style: { height: 1, width: "1px" } })
|
|
94779
94813
|
] });
|
|
94780
94814
|
}, xHe = Gt(({ pendingKey: e, contextKey: t }) => {
|
|
94781
|
-
const n =
|
|
94815
|
+
const n = Te((i) => i.pendingAssistantByChat[e]), r = Te((i) => i.statusByChat[e] ?? hn.Idle);
|
|
94782
94816
|
if (!n)
|
|
94783
94817
|
return null;
|
|
94784
94818
|
const a = r === hn.Sending || r === hn.Streaming;
|
|
@@ -94794,10 +94828,10 @@ const r7 = (e, t) => {
|
|
|
94794
94828
|
] })
|
|
94795
94829
|
] });
|
|
94796
94830
|
}, qHe = () => {
|
|
94797
|
-
const e = St(), t =
|
|
94831
|
+
const e = St(), t = Te((a) => a.contextKey), n = Te((a) => a.setContextKey), r = e.config.contextKeys;
|
|
94798
94832
|
return /* @__PURE__ */ O.jsx("div", { className: "mp-agent-context-selector", children: /* @__PURE__ */ O.jsx("select", { className: "mp-agent-select", value: t, onChange: (a) => n(a.target.value), children: r.map((a) => /* @__PURE__ */ O.jsx("option", { value: a.key, children: a.label }, a.key)) }) });
|
|
94799
94833
|
}, UHe = ({ onToolSelected: e }) => {
|
|
94800
|
-
const t = St(), n =
|
|
94834
|
+
const t = St(), n = Te((u) => u.contextKey), a = t.config.contextKeys.find((u) => u.key === n)?.tools ?? [], i = t.tools.list().filter((u) => a.length === 0 || a.includes(u.name)), [o, s] = Lt(!1), l = ut(null);
|
|
94801
94835
|
return ht(() => {
|
|
94802
94836
|
const u = (p) => {
|
|
94803
94837
|
l.current && !l.current.contains(p.target) && s(!1);
|
|
@@ -94896,7 +94930,7 @@ export {
|
|
|
94896
94930
|
w7 as themeTokenSchema,
|
|
94897
94931
|
RHe as translationsSchema,
|
|
94898
94932
|
St as useAgentRuntime,
|
|
94899
|
-
|
|
94933
|
+
Te as useAgentStore,
|
|
94900
94934
|
OHe as useAgentTheme,
|
|
94901
94935
|
c_e as useAutoScroll,
|
|
94902
94936
|
l_e as useChatBootstrap,
|