@2uinc/frontend-component-xpert-chatbot 1.40.23-alpha.1 → 1.40.24
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/lib/index.min.js +1177 -1177
- package/package.json +1 -1
package/dist/lib/index.min.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import Nn, { createContext as to, useState as ve, useCallback as Qt, useEffect as Oe, useMemo as Yt, useRef as Ze, useContext as
|
|
1
|
+
import Nn, { createContext as to, useState as ve, useCallback as Qt, useEffect as Oe, useMemo as Yt, useRef as Ze, useContext as _e, forwardRef as a1, createElement as Bs, memo as A2, Suspense as _2, isValidElement as Wl, Fragment as k2, StrictMode as I2 } from "react";
|
|
2
2
|
import O2, { render as N2 } from "react-dom";
|
|
3
3
|
var li = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {};
|
|
4
4
|
function qn(e) {
|
|
@@ -173,8 +173,8 @@ ka.exports;
|
|
|
173
173
|
var Zl;
|
|
174
174
|
function P2() {
|
|
175
175
|
return Zl || (Zl = 1, (function(e, t) {
|
|
176
|
-
var n = 200, r = "__lodash_hash_undefined__", a = 800, i = 16, o = 9007199254740991, s = "[object Arguments]", u = "[object Array]", l = "[object AsyncFunction]", c = "[object Boolean]", h = "[object Date]", m = "[object Error]", p = "[object Function]", y = "[object GeneratorFunction]", b = "[object Map]", E = "[object Number]", v = "[object Null]", k = "[object Object]", B = "[object Proxy]",
|
|
177
|
-
|
|
176
|
+
var n = 200, r = "__lodash_hash_undefined__", a = 800, i = 16, o = 9007199254740991, s = "[object Arguments]", u = "[object Array]", l = "[object AsyncFunction]", c = "[object Boolean]", h = "[object Date]", m = "[object Error]", p = "[object Function]", y = "[object GeneratorFunction]", b = "[object Map]", E = "[object Number]", v = "[object Null]", k = "[object Object]", B = "[object Proxy]", W = "[object RegExp]", H = "[object Set]", C = "[object String]", D = "[object Undefined]", X = "[object WeakMap]", q = "[object ArrayBuffer]", ne = "[object DataView]", z = "[object Float32Array]", V = "[object Float64Array]", U = "[object Int8Array]", I = "[object Int16Array]", F = "[object Int32Array]", Y = "[object Uint8Array]", J = "[object Uint8ClampedArray]", G = "[object Uint16Array]", Z = "[object Uint32Array]", A = /[\\^$.*+?()[\]{}|]/g, se = /^\[object .+?Constructor\]$/, ye = /^(?:0|[1-9]\d*)$/, O = {};
|
|
177
|
+
O[z] = O[V] = O[U] = O[I] = O[F] = O[Y] = O[J] = O[G] = O[Z] = !0, O[s] = O[u] = O[q] = O[c] = O[ne] = O[h] = O[m] = O[p] = O[b] = O[E] = O[k] = O[W] = O[H] = O[C] = O[X] = !1;
|
|
178
178
|
var Ee = typeof li == "object" && li && li.Object === Object && li, Ae = typeof self == "object" && self && self.Object === Object && self, Ne = Ee || Ae || Function("return this")(), De = t && !t.nodeType && t, Ge = De && !0 && e && !e.nodeType && e, Qe = Ge && Ge.exports === De, Ye = Qe && Ee.process, dt = (function() {
|
|
179
179
|
try {
|
|
180
180
|
var R = Ge && Ge.require && Ge.require("util").types;
|
|
@@ -401,7 +401,7 @@ function P2() {
|
|
|
401
401
|
return $.test(v2(R));
|
|
402
402
|
}
|
|
403
403
|
function Qm(R) {
|
|
404
|
-
return ba(R) && ql(R.length) && !!
|
|
404
|
+
return ba(R) && ql(R.length) && !!O[oi(R)];
|
|
405
405
|
}
|
|
406
406
|
function Zm(R) {
|
|
407
407
|
if (!xr(R))
|
|
@@ -1447,8 +1447,8 @@ const T = /* @__PURE__ */ qn(U2), z2 = {
|
|
|
1447
1447
|
if (!(!t && !a))
|
|
1448
1448
|
if (t)
|
|
1449
1449
|
try {
|
|
1450
|
-
const h = await fetch(
|
|
1451
|
-
|
|
1450
|
+
const h = n.endsWith("/") ? n : `${n}/`, m = await fetch(
|
|
1451
|
+
`${h}v1/client?client_id=${t}`,
|
|
1452
1452
|
{
|
|
1453
1453
|
method: "GET",
|
|
1454
1454
|
headers: {
|
|
@@ -1456,14 +1456,14 @@ const T = /* @__PURE__ */ qn(U2), z2 = {
|
|
|
1456
1456
|
}
|
|
1457
1457
|
}
|
|
1458
1458
|
);
|
|
1459
|
-
if (!
|
|
1459
|
+
if (!m.ok) {
|
|
1460
1460
|
console.error(
|
|
1461
|
-
`The chatbot configuration could not be loaded from the server. Status ${
|
|
1461
|
+
`The chatbot configuration could not be loaded from the server. Status ${m.status} - ${m.statusText}`
|
|
1462
1462
|
);
|
|
1463
1463
|
return;
|
|
1464
1464
|
}
|
|
1465
|
-
const
|
|
1466
|
-
s({ ...
|
|
1465
|
+
const p = await m.json();
|
|
1466
|
+
s({ ...p, id: t });
|
|
1467
1467
|
} catch (h) {
|
|
1468
1468
|
console.error("Unexpected error loading the chatbot configuration", h);
|
|
1469
1469
|
}
|
|
@@ -1618,22 +1618,22 @@ const n0 = 991, e4 = () => {
|
|
|
1618
1618
|
}, Rn = {
|
|
1619
1619
|
LIVECHAT: "LIVECHAT",
|
|
1620
1620
|
XPERT: "XPERT"
|
|
1621
|
-
},
|
|
1621
|
+
}, Ht = to({}), l1 = ({
|
|
1622
1622
|
children: e,
|
|
1623
1623
|
externalLoading: t = !1,
|
|
1624
1624
|
externalLoadingHistory: n = !1,
|
|
1625
1625
|
externalStreaming: r = !1,
|
|
1626
1626
|
externalTriggerSurvey: a = !1
|
|
1627
1627
|
}) => {
|
|
1628
|
-
const [i, o] = ve(!1), [s, u] = ve(!1), [l, c] = ve(!1), [h, m] = ve(!0), [p, y] = ve(!1), [b, E] = ve(!1), [v, k] = ve(!1), [B,
|
|
1628
|
+
const [i, o] = ve(!1), [s, u] = ve(!1), [l, c] = ve(!1), [h, m] = ve(!0), [p, y] = ve(!1), [b, E] = ve(!1), [v, k] = ve(!1), [B, W] = ve(Rn.XPERT), H = e4(), C = {
|
|
1629
1629
|
disabledScroll: i,
|
|
1630
1630
|
externalTriggerSurvey: a,
|
|
1631
1631
|
externalStreaming: r,
|
|
1632
1632
|
hasError: s,
|
|
1633
1633
|
hasNewMessage: l,
|
|
1634
1634
|
internalStreaming: v,
|
|
1635
|
-
isMobile:
|
|
1636
|
-
isNormalSize: h ||
|
|
1635
|
+
isMobile: H,
|
|
1636
|
+
isNormalSize: h || H,
|
|
1637
1637
|
loading: p || t,
|
|
1638
1638
|
loadingHistory: b || n,
|
|
1639
1639
|
streaming: v || r,
|
|
@@ -1645,9 +1645,9 @@ const n0 = 991, e4 = () => {
|
|
|
1645
1645
|
setLoading: y,
|
|
1646
1646
|
setLoadingHistory: E,
|
|
1647
1647
|
setStreaming: k,
|
|
1648
|
-
setMode:
|
|
1648
|
+
setMode: W
|
|
1649
1649
|
};
|
|
1650
|
-
return /* @__PURE__ */ S.jsx(
|
|
1650
|
+
return /* @__PURE__ */ S.jsx(Ht.Provider, { value: C, children: e });
|
|
1651
1651
|
};
|
|
1652
1652
|
l1.propTypes = {
|
|
1653
1653
|
children: T.element.isRequired,
|
|
@@ -1702,10 +1702,10 @@ const Ii = "--- SWITCHED TO SURVEY MODE ---", c1 = "--- EXITED SURVEY MODE. ---"
|
|
|
1702
1702
|
onMessageSent: n,
|
|
1703
1703
|
onStreamingStop: r
|
|
1704
1704
|
}) => {
|
|
1705
|
-
const a = Ze(null), i = Ze(null), { id: o } =
|
|
1705
|
+
const a = Ze(null), i = Ze(null), { id: o } = _e(Ct), { setLoading: s, setStreaming: u } = _e(Ht), [l, c] = ve(null), [h, m] = ve(!1), [p, y] = ve([]), [b, E] = ve([]), v = Qt(() => {
|
|
1706
1706
|
c(null), m(!1), y([]), E([]), Zt.remove(`${o}-conversation-history-id`);
|
|
1707
1707
|
}, [o, c]), k = (C) => {
|
|
1708
|
-
if (y((
|
|
1708
|
+
if (y((z) => [...z, C]), t == null)
|
|
1709
1709
|
return;
|
|
1710
1710
|
const D = C?.content;
|
|
1711
1711
|
if (typeof D != "string")
|
|
@@ -1714,9 +1714,9 @@ const Ii = "--- SWITCHED TO SURVEY MODE ---", c1 = "--- EXITED SURVEY MODE. ---"
|
|
|
1714
1714
|
if (!t4.includes(X))
|
|
1715
1715
|
return;
|
|
1716
1716
|
const ne = Array.isArray(t) ? t.length : 0;
|
|
1717
|
-
E((
|
|
1718
|
-
const
|
|
1719
|
-
return
|
|
1717
|
+
E((z) => {
|
|
1718
|
+
const V = z[z.length - 1]?.message;
|
|
1719
|
+
return V?.role === C?.role && V?.content === C?.content ? z : [...z, { insertionPoint: ne, message: C }];
|
|
1720
1720
|
});
|
|
1721
1721
|
}, B = Yt(() => {
|
|
1722
1722
|
if (t == null)
|
|
@@ -1724,25 +1724,25 @@ const Ii = "--- SWITCHED TO SURVEY MODE ---", c1 = "--- EXITED SURVEY MODE. ---"
|
|
|
1724
1724
|
const C = Array.isArray(t) ? t : [];
|
|
1725
1725
|
if (!b.length)
|
|
1726
1726
|
return C;
|
|
1727
|
-
const D = (
|
|
1728
|
-
for (const { insertionPoint:
|
|
1729
|
-
if (typeof
|
|
1730
|
-
const
|
|
1731
|
-
if (X.has(
|
|
1732
|
-
X.add(
|
|
1727
|
+
const D = (z) => `${z?.role ?? ""}::${z?.content ?? ""}`, X = new Set(C.map(D)), q = /* @__PURE__ */ new Map();
|
|
1728
|
+
for (const { insertionPoint: z, message: V } of b) {
|
|
1729
|
+
if (typeof V?.content != "string") continue;
|
|
1730
|
+
const I = D(V);
|
|
1731
|
+
if (X.has(I)) continue;
|
|
1732
|
+
X.add(I);
|
|
1733
1733
|
const F = Math.min(
|
|
1734
|
-
Math.max(0,
|
|
1734
|
+
Math.max(0, z ?? C.length),
|
|
1735
1735
|
C.length
|
|
1736
|
-
), Y =
|
|
1737
|
-
Y.push(
|
|
1736
|
+
), Y = q.get(F) ?? [];
|
|
1737
|
+
Y.push(V), q.set(F, Y);
|
|
1738
1738
|
}
|
|
1739
1739
|
const ne = [];
|
|
1740
|
-
for (let
|
|
1741
|
-
const
|
|
1742
|
-
|
|
1740
|
+
for (let z = 0; z <= C.length; z += 1) {
|
|
1741
|
+
const V = q.get(z);
|
|
1742
|
+
V?.length && ne.push(...V), z < C.length && ne.push(C[z]);
|
|
1743
1743
|
}
|
|
1744
1744
|
return ne;
|
|
1745
|
-
}, [t, b, p]),
|
|
1745
|
+
}, [t, b, p]), H = {
|
|
1746
1746
|
contentRef: a,
|
|
1747
1747
|
abortControllerRef: i,
|
|
1748
1748
|
conversationId: l,
|
|
@@ -1767,7 +1767,7 @@ const Ii = "--- SWITCHED TO SURVEY MODE ---", c1 = "--- EXITED SURVEY MODE. ---"
|
|
|
1767
1767
|
setXpertMessages: y,
|
|
1768
1768
|
xpertMessages: B
|
|
1769
1769
|
};
|
|
1770
|
-
return /* @__PURE__ */ S.jsx(vr.Provider, { value:
|
|
1770
|
+
return /* @__PURE__ */ S.jsx(vr.Provider, { value: H, children: e });
|
|
1771
1771
|
};
|
|
1772
1772
|
g1.propTypes = {
|
|
1773
1773
|
children: T.element.isRequired,
|
|
@@ -1819,7 +1819,7 @@ function Ru({
|
|
|
1819
1819
|
children: a,
|
|
1820
1820
|
...i
|
|
1821
1821
|
}) {
|
|
1822
|
-
const { isMobile: o } =
|
|
1822
|
+
const { isMobile: o } = _e(Ht);
|
|
1823
1823
|
return /* @__PURE__ */ S.jsx(
|
|
1824
1824
|
"button",
|
|
1825
1825
|
{
|
|
@@ -1852,7 +1852,7 @@ const a4 = 1500, i4 = `The parent container is wider than the chatbot launch but
|
|
|
1852
1852
|
eyes follow your mouse when you hover near it.`, y1 = ({
|
|
1853
1853
|
handleFloatingActionButtonClick: e = null
|
|
1854
1854
|
}) => {
|
|
1855
|
-
const { id: t, launchButton: n } =
|
|
1855
|
+
const { id: t, launchButton: n } = _e(Ct), { isMobile: r } = _e(Ht), a = !Zt.get(
|
|
1856
1856
|
`${t}-proactive-message-xpert-chatbot`
|
|
1857
1857
|
), i = Ze(null), o = Ze(!1), s = a ? n?.animatedGraduate?.delayMs : n?.animatedGraduate?.delayMs * 2, [u, l] = ve(!1), c = window.matchMedia(
|
|
1858
1858
|
`(max-width: ${a4}px)`
|
|
@@ -1875,8 +1875,8 @@ eyes follow your mouse when you hover near it.`, y1 = ({
|
|
|
1875
1875
|
i.current.querySelectorAll(
|
|
1876
1876
|
".xpert_chatbot__animated_graduate__pupil"
|
|
1877
1877
|
).forEach((v) => {
|
|
1878
|
-
const k = v.getBoundingClientRect(), B = (y.pageX - window.scrollX - k.left) / 30 / 16 + "rem",
|
|
1879
|
-
v.style.transform = "translate3d(" + B + "," +
|
|
1878
|
+
const k = v.getBoundingClientRect(), B = (y.pageX - window.scrollX - k.left) / 30 / 16 + "rem", W = (y.pageY - window.scrollY - k.top) / 30 / 16 + "rem";
|
|
1879
|
+
v.style.transform = "translate3d(" + B + "," + W + ", 0rem)";
|
|
1880
1880
|
});
|
|
1881
1881
|
};
|
|
1882
1882
|
return window.addEventListener("mousemove", p), () => {
|
|
@@ -2060,7 +2060,7 @@ const o4 = "data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20hei
|
|
|
2060
2060
|
}, T1 = ({
|
|
2061
2061
|
handleFloatingActionButtonClick: e = null
|
|
2062
2062
|
}) => {
|
|
2063
|
-
const { launchButton: t } =
|
|
2063
|
+
const { launchButton: t } = _e(Ct), { isMobile: n } = _e(Ht);
|
|
2064
2064
|
return /* @__PURE__ */ S.jsxs(
|
|
2065
2065
|
Ru,
|
|
2066
2066
|
{
|
|
@@ -2450,63 +2450,63 @@ var s0 = {
|
|
|
2450
2450
|
delayInitialFocusTimer: void 0,
|
|
2451
2451
|
// the most recent KeyboardEvent for the configured nav key (typically [SHIFT+]TAB), if any
|
|
2452
2452
|
recentNavEvent: void 0
|
|
2453
|
-
}, s, u = function(
|
|
2454
|
-
return
|
|
2455
|
-
}, l = function(
|
|
2456
|
-
var F = typeof
|
|
2453
|
+
}, s, u = function(U, I, F) {
|
|
2454
|
+
return U && U[I] !== void 0 ? U[I] : i[F || I];
|
|
2455
|
+
}, l = function(U, I) {
|
|
2456
|
+
var F = typeof I?.composedPath == "function" ? I.composedPath() : void 0;
|
|
2457
2457
|
return o.containerGroups.findIndex(function(Y) {
|
|
2458
|
-
var J = Y.container,
|
|
2459
|
-
return J.contains(
|
|
2460
|
-
return Z ===
|
|
2458
|
+
var J = Y.container, G = Y.tabbableNodes;
|
|
2459
|
+
return J.contains(U) || F?.includes(J) || G.find(function(Z) {
|
|
2460
|
+
return Z === U;
|
|
2461
2461
|
});
|
|
2462
2462
|
});
|
|
2463
|
-
}, c = function(
|
|
2464
|
-
var
|
|
2465
|
-
if (typeof Z == "function" && (Z = Z.apply(void 0, _4(
|
|
2463
|
+
}, c = function(U) {
|
|
2464
|
+
var I = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {}, F = I.hasFallback, Y = F === void 0 ? !1 : F, J = I.params, G = J === void 0 ? [] : J, Z = i[U];
|
|
2465
|
+
if (typeof Z == "function" && (Z = Z.apply(void 0, _4(G))), Z === !0 && (Z = void 0), !Z) {
|
|
2466
2466
|
if (Z === void 0 || Z === !1)
|
|
2467
2467
|
return Z;
|
|
2468
|
-
throw new Error("`".concat(
|
|
2468
|
+
throw new Error("`".concat(U, "` was specified but was not a node, or did not return a node"));
|
|
2469
2469
|
}
|
|
2470
2470
|
var A = Z;
|
|
2471
2471
|
if (typeof Z == "string") {
|
|
2472
2472
|
try {
|
|
2473
2473
|
A = r.querySelector(Z);
|
|
2474
2474
|
} catch (se) {
|
|
2475
|
-
throw new Error("`".concat(
|
|
2475
|
+
throw new Error("`".concat(U, '` appears to be an invalid selector; error="').concat(se.message, '"'));
|
|
2476
2476
|
}
|
|
2477
2477
|
if (!A && !Y)
|
|
2478
|
-
throw new Error("`".concat(
|
|
2478
|
+
throw new Error("`".concat(U, "` as selector refers to no known node"));
|
|
2479
2479
|
}
|
|
2480
2480
|
return A;
|
|
2481
2481
|
}, h = function() {
|
|
2482
|
-
var
|
|
2482
|
+
var U = c("initialFocus", {
|
|
2483
2483
|
hasFallback: !0
|
|
2484
2484
|
});
|
|
2485
|
-
if (
|
|
2485
|
+
if (U === !1)
|
|
2486
2486
|
return !1;
|
|
2487
|
-
if (
|
|
2487
|
+
if (U === void 0 || U && !Oi(U, i.tabbableOptions))
|
|
2488
2488
|
if (l(r.activeElement) >= 0)
|
|
2489
|
-
|
|
2489
|
+
U = r.activeElement;
|
|
2490
2490
|
else {
|
|
2491
|
-
var
|
|
2492
|
-
|
|
2491
|
+
var I = o.tabbableGroups[0], F = I && I.firstTabbableNode;
|
|
2492
|
+
U = F || c("fallbackFocus");
|
|
2493
2493
|
}
|
|
2494
|
-
else
|
|
2495
|
-
if (!
|
|
2494
|
+
else U === null && (U = c("fallbackFocus"));
|
|
2495
|
+
if (!U)
|
|
2496
2496
|
throw new Error("Your focus-trap needs to have at least one focusable element");
|
|
2497
|
-
return
|
|
2497
|
+
return U;
|
|
2498
2498
|
}, m = function() {
|
|
2499
|
-
if (o.containerGroups = o.containers.map(function(
|
|
2500
|
-
var
|
|
2499
|
+
if (o.containerGroups = o.containers.map(function(U) {
|
|
2500
|
+
var I = _1(U, i.tabbableOptions), F = k1(U, i.tabbableOptions), Y = I.length > 0 ? I[0] : void 0, J = I.length > 0 ? I[I.length - 1] : void 0, G = F.find(function(se) {
|
|
2501
2501
|
return kr(se);
|
|
2502
2502
|
}), Z = F.slice().reverse().find(function(se) {
|
|
2503
2503
|
return kr(se);
|
|
2504
|
-
}), A = !!
|
|
2504
|
+
}), A = !!I.find(function(se) {
|
|
2505
2505
|
return hr(se) > 0;
|
|
2506
2506
|
});
|
|
2507
2507
|
return {
|
|
2508
|
-
container:
|
|
2509
|
-
tabbableNodes:
|
|
2508
|
+
container: U,
|
|
2509
|
+
tabbableNodes: I,
|
|
2510
2510
|
focusableNodes: F,
|
|
2511
2511
|
/** True if at least one node with positive `tabindex` was found in this container. */
|
|
2512
2512
|
posTabIndexesFound: A,
|
|
@@ -2522,7 +2522,7 @@ var s0 = {
|
|
|
2522
2522
|
// "close enough most of the time" alternative for positive tabindexes which should generally
|
|
2523
2523
|
// be avoided anyway...
|
|
2524
2524
|
/** First tabbable node in container, __DOM__ order; `undefined` if none. */
|
|
2525
|
-
firstDomTabbableNode:
|
|
2525
|
+
firstDomTabbableNode: G,
|
|
2526
2526
|
/** Last tabbable node in container, __DOM__ order; `undefined` if none. */
|
|
2527
2527
|
lastDomTabbableNode: Z,
|
|
2528
2528
|
/**
|
|
@@ -2534,75 +2534,75 @@ var s0 = {
|
|
|
2534
2534
|
* @returns {HTMLElement|undefined} The next tabbable node, if any.
|
|
2535
2535
|
*/
|
|
2536
2536
|
nextTabbableNode: function(ye) {
|
|
2537
|
-
var
|
|
2538
|
-
return Ee < 0 ?
|
|
2537
|
+
var O = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : !0, Ee = I.indexOf(ye);
|
|
2538
|
+
return Ee < 0 ? O ? F.slice(F.indexOf(ye) + 1).find(function(Ae) {
|
|
2539
2539
|
return kr(Ae);
|
|
2540
2540
|
}) : F.slice(0, F.indexOf(ye)).reverse().find(function(Ae) {
|
|
2541
2541
|
return kr(Ae);
|
|
2542
|
-
}) :
|
|
2542
|
+
}) : I[Ee + (O ? 1 : -1)];
|
|
2543
2543
|
}
|
|
2544
2544
|
};
|
|
2545
|
-
}), o.tabbableGroups = o.containerGroups.filter(function(
|
|
2546
|
-
return
|
|
2545
|
+
}), o.tabbableGroups = o.containerGroups.filter(function(U) {
|
|
2546
|
+
return U.tabbableNodes.length > 0;
|
|
2547
2547
|
}), o.tabbableGroups.length <= 0 && !c("fallbackFocus"))
|
|
2548
2548
|
throw new Error("Your focus-trap must have at least one container with at least one tabbable node in it at all times");
|
|
2549
|
-
if (o.containerGroups.find(function(
|
|
2550
|
-
return
|
|
2549
|
+
if (o.containerGroups.find(function(U) {
|
|
2550
|
+
return U.posTabIndexesFound;
|
|
2551
2551
|
}) && o.containerGroups.length > 1)
|
|
2552
2552
|
throw new Error("At least one node with a positive tabindex was found in one of your focus-trap's multiple containers. Positive tabindexes are only supported in single-container focus-traps.");
|
|
2553
|
-
}, p = function(
|
|
2554
|
-
var
|
|
2555
|
-
if (
|
|
2556
|
-
return
|
|
2557
|
-
}, y = function(
|
|
2558
|
-
if (
|
|
2559
|
-
if (!
|
|
2553
|
+
}, p = function(U) {
|
|
2554
|
+
var I = U.activeElement;
|
|
2555
|
+
if (I)
|
|
2556
|
+
return I.shadowRoot && I.shadowRoot.activeElement !== null ? p(I.shadowRoot) : I;
|
|
2557
|
+
}, y = function(U) {
|
|
2558
|
+
if (U !== !1 && U !== p(document)) {
|
|
2559
|
+
if (!U || !U.focus) {
|
|
2560
2560
|
y(h());
|
|
2561
2561
|
return;
|
|
2562
2562
|
}
|
|
2563
|
-
|
|
2563
|
+
U.focus({
|
|
2564
2564
|
preventScroll: !!i.preventScroll
|
|
2565
|
-
}), o.mostRecentlyFocusedNode =
|
|
2565
|
+
}), o.mostRecentlyFocusedNode = U, N4(U) && U.select();
|
|
2566
2566
|
}
|
|
2567
|
-
}, b = function(
|
|
2568
|
-
var
|
|
2569
|
-
params: [
|
|
2567
|
+
}, b = function(U) {
|
|
2568
|
+
var I = c("setReturnFocus", {
|
|
2569
|
+
params: [U]
|
|
2570
2570
|
});
|
|
2571
|
-
return
|
|
2572
|
-
}, E = function(
|
|
2573
|
-
var
|
|
2574
|
-
|
|
2575
|
-
var
|
|
2571
|
+
return I || (I === !1 ? !1 : U);
|
|
2572
|
+
}, E = function(U) {
|
|
2573
|
+
var I = U.target, F = U.event, Y = U.isBackward, J = Y === void 0 ? !1 : Y;
|
|
2574
|
+
I = I || di(F), m();
|
|
2575
|
+
var G = null;
|
|
2576
2576
|
if (o.tabbableGroups.length > 0) {
|
|
2577
|
-
var Z = l(
|
|
2577
|
+
var Z = l(I, F), A = Z >= 0 ? o.containerGroups[Z] : void 0;
|
|
2578
2578
|
if (Z < 0)
|
|
2579
|
-
J ?
|
|
2579
|
+
J ? G = o.tabbableGroups[o.tabbableGroups.length - 1].lastTabbableNode : G = o.tabbableGroups[0].firstTabbableNode;
|
|
2580
2580
|
else if (J) {
|
|
2581
2581
|
var se = o.tabbableGroups.findIndex(function(De) {
|
|
2582
2582
|
var Ge = De.firstTabbableNode;
|
|
2583
|
-
return
|
|
2583
|
+
return I === Ge;
|
|
2584
2584
|
});
|
|
2585
|
-
if (se < 0 && (A.container ===
|
|
2586
|
-
var ye = se === 0 ? o.tabbableGroups.length - 1 : se - 1,
|
|
2587
|
-
|
|
2588
|
-
} else Na(F) || (
|
|
2585
|
+
if (se < 0 && (A.container === I || Oi(I, i.tabbableOptions) && !kr(I, i.tabbableOptions) && !A.nextTabbableNode(I, !1)) && (se = Z), se >= 0) {
|
|
2586
|
+
var ye = se === 0 ? o.tabbableGroups.length - 1 : se - 1, O = o.tabbableGroups[ye];
|
|
2587
|
+
G = hr(I) >= 0 ? O.lastTabbableNode : O.lastDomTabbableNode;
|
|
2588
|
+
} else Na(F) || (G = A.nextTabbableNode(I, !1));
|
|
2589
2589
|
} else {
|
|
2590
2590
|
var Ee = o.tabbableGroups.findIndex(function(De) {
|
|
2591
2591
|
var Ge = De.lastTabbableNode;
|
|
2592
|
-
return
|
|
2592
|
+
return I === Ge;
|
|
2593
2593
|
});
|
|
2594
|
-
if (Ee < 0 && (A.container ===
|
|
2594
|
+
if (Ee < 0 && (A.container === I || Oi(I, i.tabbableOptions) && !kr(I, i.tabbableOptions) && !A.nextTabbableNode(I)) && (Ee = Z), Ee >= 0) {
|
|
2595
2595
|
var Ae = Ee === o.tabbableGroups.length - 1 ? 0 : Ee + 1, Ne = o.tabbableGroups[Ae];
|
|
2596
|
-
|
|
2597
|
-
} else Na(F) || (
|
|
2596
|
+
G = hr(I) >= 0 ? Ne.firstTabbableNode : Ne.firstDomTabbableNode;
|
|
2597
|
+
} else Na(F) || (G = A.nextTabbableNode(I));
|
|
2598
2598
|
}
|
|
2599
2599
|
} else
|
|
2600
|
-
|
|
2601
|
-
return
|
|
2602
|
-
}, v = function(
|
|
2603
|
-
var
|
|
2604
|
-
if (!(l(
|
|
2605
|
-
if (va(i.clickOutsideDeactivates,
|
|
2600
|
+
G = c("fallbackFocus");
|
|
2601
|
+
return G;
|
|
2602
|
+
}, v = function(U) {
|
|
2603
|
+
var I = di(U);
|
|
2604
|
+
if (!(l(I, U) >= 0)) {
|
|
2605
|
+
if (va(i.clickOutsideDeactivates, U)) {
|
|
2606
2606
|
s.deactivate({
|
|
2607
2607
|
// NOTE: by setting `returnFocus: false`, deactivate() will do nothing,
|
|
2608
2608
|
// which will result in the outside click setting focus to the node
|
|
@@ -2614,18 +2614,18 @@ var s0 = {
|
|
|
2614
2614
|
});
|
|
2615
2615
|
return;
|
|
2616
2616
|
}
|
|
2617
|
-
va(i.allowOutsideClick,
|
|
2617
|
+
va(i.allowOutsideClick, U) || U.preventDefault();
|
|
2618
2618
|
}
|
|
2619
|
-
}, k = function(
|
|
2620
|
-
var
|
|
2621
|
-
if (F ||
|
|
2622
|
-
F && (o.mostRecentlyFocusedNode =
|
|
2619
|
+
}, k = function(U) {
|
|
2620
|
+
var I = di(U), F = l(I, U) >= 0;
|
|
2621
|
+
if (F || I instanceof Document)
|
|
2622
|
+
F && (o.mostRecentlyFocusedNode = I);
|
|
2623
2623
|
else {
|
|
2624
|
-
|
|
2624
|
+
U.stopImmediatePropagation();
|
|
2625
2625
|
var Y, J = !0;
|
|
2626
2626
|
if (o.mostRecentlyFocusedNode)
|
|
2627
2627
|
if (hr(o.mostRecentlyFocusedNode) > 0) {
|
|
2628
|
-
var
|
|
2628
|
+
var G = l(o.mostRecentlyFocusedNode), Z = o.containerGroups[G].tabbableNodes;
|
|
2629
2629
|
if (Z.length > 0) {
|
|
2630
2630
|
var A = Z.findIndex(function(se) {
|
|
2631
2631
|
return se === o.mostRecentlyFocusedNode;
|
|
@@ -2648,21 +2648,21 @@ var s0 = {
|
|
|
2648
2648
|
})), y(Y || o.mostRecentlyFocusedNode || h());
|
|
2649
2649
|
}
|
|
2650
2650
|
o.recentNavEvent = void 0;
|
|
2651
|
-
}, B = function(
|
|
2652
|
-
var
|
|
2653
|
-
o.recentNavEvent =
|
|
2651
|
+
}, B = function(U) {
|
|
2652
|
+
var I = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : !1;
|
|
2653
|
+
o.recentNavEvent = U;
|
|
2654
2654
|
var F = E({
|
|
2655
|
-
event:
|
|
2656
|
-
isBackward:
|
|
2655
|
+
event: U,
|
|
2656
|
+
isBackward: I
|
|
2657
2657
|
});
|
|
2658
|
-
F && (Na(
|
|
2659
|
-
},
|
|
2660
|
-
(i.isKeyForward(
|
|
2661
|
-
},
|
|
2662
|
-
R4(
|
|
2663
|
-
}, C = function(
|
|
2664
|
-
var
|
|
2665
|
-
l(
|
|
2658
|
+
F && (Na(U) && U.preventDefault(), y(F));
|
|
2659
|
+
}, W = function(U) {
|
|
2660
|
+
(i.isKeyForward(U) || i.isKeyBackward(U)) && B(U, i.isKeyBackward(U));
|
|
2661
|
+
}, H = function(U) {
|
|
2662
|
+
R4(U) && va(i.escapeDeactivates, U) !== !1 && (U.preventDefault(), s.deactivate());
|
|
2663
|
+
}, C = function(U) {
|
|
2664
|
+
var I = di(U);
|
|
2665
|
+
l(I, U) >= 0 || va(i.clickOutsideDeactivates, U) || va(i.allowOutsideClick, U) || (U.preventDefault(), U.stopImmediatePropagation());
|
|
2666
2666
|
}, D = function() {
|
|
2667
2667
|
if (o.active)
|
|
2668
2668
|
return s0.activateTrap(a, s), o.delayInitialFocusTimer = i.delayInitialFocus ? u0(function() {
|
|
@@ -2676,24 +2676,24 @@ var s0 = {
|
|
|
2676
2676
|
}), r.addEventListener("click", C, {
|
|
2677
2677
|
capture: !0,
|
|
2678
2678
|
passive: !1
|
|
2679
|
-
}), r.addEventListener("keydown",
|
|
2679
|
+
}), r.addEventListener("keydown", W, {
|
|
2680
2680
|
capture: !0,
|
|
2681
2681
|
passive: !1
|
|
2682
|
-
}), r.addEventListener("keydown",
|
|
2682
|
+
}), r.addEventListener("keydown", H), s;
|
|
2683
2683
|
}, X = function() {
|
|
2684
2684
|
if (o.active)
|
|
2685
|
-
return r.removeEventListener("focusin", k, !0), r.removeEventListener("mousedown", v, !0), r.removeEventListener("touchstart", v, !0), r.removeEventListener("click", C, !0), r.removeEventListener("keydown",
|
|
2686
|
-
},
|
|
2687
|
-
var
|
|
2685
|
+
return r.removeEventListener("focusin", k, !0), r.removeEventListener("mousedown", v, !0), r.removeEventListener("touchstart", v, !0), r.removeEventListener("click", C, !0), r.removeEventListener("keydown", W, !0), r.removeEventListener("keydown", H), s;
|
|
2686
|
+
}, q = function(U) {
|
|
2687
|
+
var I = U.some(function(F) {
|
|
2688
2688
|
var Y = Array.from(F.removedNodes);
|
|
2689
2689
|
return Y.some(function(J) {
|
|
2690
2690
|
return J === o.mostRecentlyFocusedNode;
|
|
2691
2691
|
});
|
|
2692
2692
|
});
|
|
2693
|
-
|
|
2694
|
-
}, ne = typeof window < "u" && "MutationObserver" in window ? new MutationObserver(
|
|
2695
|
-
ne && (ne.disconnect(), o.active && !o.paused && o.containers.map(function(
|
|
2696
|
-
ne.observe(
|
|
2693
|
+
I && y(h());
|
|
2694
|
+
}, ne = typeof window < "u" && "MutationObserver" in window ? new MutationObserver(q) : void 0, z = function() {
|
|
2695
|
+
ne && (ne.disconnect(), o.active && !o.paused && o.containers.map(function(U) {
|
|
2696
|
+
ne.observe(U, {
|
|
2697
2697
|
subtree: !0,
|
|
2698
2698
|
childList: !0
|
|
2699
2699
|
});
|
|
@@ -2706,45 +2706,45 @@ var s0 = {
|
|
|
2706
2706
|
get paused() {
|
|
2707
2707
|
return o.paused;
|
|
2708
2708
|
},
|
|
2709
|
-
activate: function(
|
|
2709
|
+
activate: function(U) {
|
|
2710
2710
|
if (o.active)
|
|
2711
2711
|
return this;
|
|
2712
|
-
var
|
|
2713
|
-
Y || m(), o.active = !0, o.paused = !1, o.nodeFocusedBeforeActivation = p(r),
|
|
2712
|
+
var I = u(U, "onActivate"), F = u(U, "onPostActivate"), Y = u(U, "checkCanFocusTrap");
|
|
2713
|
+
Y || m(), o.active = !0, o.paused = !1, o.nodeFocusedBeforeActivation = p(r), I?.();
|
|
2714
2714
|
var J = function() {
|
|
2715
|
-
Y && m(), D(),
|
|
2715
|
+
Y && m(), D(), z(), F?.();
|
|
2716
2716
|
};
|
|
2717
2717
|
return Y ? (Y(o.containers.concat()).then(J, J), this) : (J(), this);
|
|
2718
2718
|
},
|
|
2719
|
-
deactivate: function(
|
|
2719
|
+
deactivate: function(U) {
|
|
2720
2720
|
if (!o.active)
|
|
2721
2721
|
return this;
|
|
2722
|
-
var
|
|
2722
|
+
var I = o0({
|
|
2723
2723
|
onDeactivate: i.onDeactivate,
|
|
2724
2724
|
onPostDeactivate: i.onPostDeactivate,
|
|
2725
2725
|
checkCanReturnFocus: i.checkCanReturnFocus
|
|
2726
|
-
},
|
|
2727
|
-
clearTimeout(o.delayInitialFocusTimer), o.delayInitialFocusTimer = void 0, X(), o.active = !1, o.paused = !1,
|
|
2728
|
-
var F = u(
|
|
2726
|
+
}, U);
|
|
2727
|
+
clearTimeout(o.delayInitialFocusTimer), o.delayInitialFocusTimer = void 0, X(), o.active = !1, o.paused = !1, z(), s0.deactivateTrap(a, s);
|
|
2728
|
+
var F = u(I, "onDeactivate"), Y = u(I, "onPostDeactivate"), J = u(I, "checkCanReturnFocus"), G = u(I, "returnFocus", "returnFocusOnDeactivate");
|
|
2729
2729
|
F?.();
|
|
2730
2730
|
var Z = function() {
|
|
2731
2731
|
u0(function() {
|
|
2732
|
-
|
|
2732
|
+
G && y(b(o.nodeFocusedBeforeActivation)), Y?.();
|
|
2733
2733
|
});
|
|
2734
2734
|
};
|
|
2735
|
-
return
|
|
2735
|
+
return G && J ? (J(b(o.nodeFocusedBeforeActivation)).then(Z, Z), this) : (Z(), this);
|
|
2736
2736
|
},
|
|
2737
|
-
pause: function(
|
|
2738
|
-
return o.active ? (o.manuallyPaused = !0, this._setPausedState(!0,
|
|
2737
|
+
pause: function(U) {
|
|
2738
|
+
return o.active ? (o.manuallyPaused = !0, this._setPausedState(!0, U)) : this;
|
|
2739
2739
|
},
|
|
2740
|
-
unpause: function(
|
|
2741
|
-
return o.active ? (o.manuallyPaused = !1, a[a.length - 1] !== this ? this : this._setPausedState(!1,
|
|
2740
|
+
unpause: function(U) {
|
|
2741
|
+
return o.active ? (o.manuallyPaused = !1, a[a.length - 1] !== this ? this : this._setPausedState(!1, U)) : this;
|
|
2742
2742
|
},
|
|
2743
|
-
updateContainerElements: function(
|
|
2744
|
-
var
|
|
2745
|
-
return o.containers =
|
|
2743
|
+
updateContainerElements: function(U) {
|
|
2744
|
+
var I = [].concat(U).filter(Boolean);
|
|
2745
|
+
return o.containers = I.map(function(F) {
|
|
2746
2746
|
return typeof F == "string" ? r.querySelector(F) : F;
|
|
2747
|
-
}), o.active && m(),
|
|
2747
|
+
}), o.active && m(), z(), this;
|
|
2748
2748
|
}
|
|
2749
2749
|
}, Object.defineProperties(s, {
|
|
2750
2750
|
_isManuallyPaused: {
|
|
@@ -2753,15 +2753,15 @@ var s0 = {
|
|
|
2753
2753
|
}
|
|
2754
2754
|
},
|
|
2755
2755
|
_setPausedState: {
|
|
2756
|
-
value: function(
|
|
2757
|
-
if (o.paused ===
|
|
2756
|
+
value: function(U, I) {
|
|
2757
|
+
if (o.paused === U)
|
|
2758
2758
|
return this;
|
|
2759
|
-
if (o.paused =
|
|
2760
|
-
var F = u(
|
|
2761
|
-
F?.(), X(),
|
|
2759
|
+
if (o.paused = U, U) {
|
|
2760
|
+
var F = u(I, "onPause"), Y = u(I, "onPostPause");
|
|
2761
|
+
F?.(), X(), z(), Y?.();
|
|
2762
2762
|
} else {
|
|
2763
|
-
var J = u(
|
|
2764
|
-
J?.(), m(), D(),
|
|
2763
|
+
var J = u(I, "onUnpause"), G = u(I, "onPostUnpause");
|
|
2764
|
+
J?.(), m(), D(), z(), G?.();
|
|
2765
2765
|
}
|
|
2766
2766
|
return this;
|
|
2767
2767
|
}
|
|
@@ -2789,8 +2789,8 @@ function U4() {
|
|
|
2789
2789
|
}
|
|
2790
2790
|
function n(C, D) {
|
|
2791
2791
|
for (var X = 0; X < D.length; X++) {
|
|
2792
|
-
var
|
|
2793
|
-
|
|
2792
|
+
var q = D[X];
|
|
2793
|
+
q.enumerable = q.enumerable || !1, q.configurable = !0, "value" in q && (q.writable = !0), Object.defineProperty(C, m(q.key), q);
|
|
2794
2794
|
}
|
|
2795
2795
|
}
|
|
2796
2796
|
function r(C, D, X) {
|
|
@@ -2828,8 +2828,8 @@ function U4() {
|
|
|
2828
2828
|
C.prototype = Object.create(D && D.prototype, { constructor: { value: C, writable: !0, configurable: !0 } }), Object.defineProperty(C, "prototype", { writable: !1 }), D && c(C, D);
|
|
2829
2829
|
}
|
|
2830
2830
|
function c(C, D) {
|
|
2831
|
-
return c = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function(X,
|
|
2832
|
-
return X.__proto__ =
|
|
2831
|
+
return c = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function(X, q) {
|
|
2832
|
+
return X.__proto__ = q, X;
|
|
2833
2833
|
}, c(C, D);
|
|
2834
2834
|
}
|
|
2835
2835
|
function h(C, D, X) {
|
|
@@ -2843,35 +2843,35 @@ function U4() {
|
|
|
2843
2843
|
if (e(C) != "object" || !C) return C;
|
|
2844
2844
|
var X = C[Symbol.toPrimitive];
|
|
2845
2845
|
if (X !== void 0) {
|
|
2846
|
-
var
|
|
2847
|
-
if (e(
|
|
2846
|
+
var q = X.call(C, D);
|
|
2847
|
+
if (e(q) != "object") return q;
|
|
2848
2848
|
throw new TypeError("@@toPrimitive must return a primitive value.");
|
|
2849
2849
|
}
|
|
2850
2850
|
return (D === "string" ? String : Number)(C);
|
|
2851
2851
|
}
|
|
2852
|
-
var y = Nn, b = /* @__PURE__ */ s1(), E = B4, v = E.createFocusTrap, k = H4, B = k.isFocusable,
|
|
2852
|
+
var y = Nn, b = /* @__PURE__ */ s1(), E = B4, v = E.createFocusTrap, k = H4, B = k.isFocusable, W = /* @__PURE__ */ (function(C) {
|
|
2853
2853
|
function D(X) {
|
|
2854
|
-
var
|
|
2855
|
-
t(this, D),
|
|
2856
|
-
var
|
|
2857
|
-
if (typeof
|
|
2854
|
+
var q;
|
|
2855
|
+
t(this, D), q = a(this, D, [X]), h(q, "getNodeForOption", function(V) {
|
|
2856
|
+
var U, I = (U = this.internalOptions[V]) !== null && U !== void 0 ? U : this.originalOptions[V];
|
|
2857
|
+
if (typeof I == "function") {
|
|
2858
2858
|
for (var F = arguments.length, Y = new Array(F > 1 ? F - 1 : 0), J = 1; J < F; J++)
|
|
2859
2859
|
Y[J - 1] = arguments[J];
|
|
2860
|
-
|
|
2860
|
+
I = I.apply(void 0, Y);
|
|
2861
2861
|
}
|
|
2862
|
-
if (
|
|
2863
|
-
if (
|
|
2864
|
-
return
|
|
2865
|
-
throw new Error("`".concat(
|
|
2862
|
+
if (I === !0 && (I = void 0), !I) {
|
|
2863
|
+
if (I === void 0 || I === !1)
|
|
2864
|
+
return I;
|
|
2865
|
+
throw new Error("`".concat(V, "` was specified but was not a node, or did not return a node"));
|
|
2866
2866
|
}
|
|
2867
|
-
var
|
|
2868
|
-
if (typeof
|
|
2867
|
+
var G = I;
|
|
2868
|
+
if (typeof I == "string") {
|
|
2869
2869
|
var Z;
|
|
2870
|
-
if (
|
|
2871
|
-
throw new Error("`".concat(
|
|
2870
|
+
if (G = (Z = this.getDocument()) === null || Z === void 0 ? void 0 : Z.querySelector(I), !G)
|
|
2871
|
+
throw new Error("`".concat(V, "` as selector refers to no known node"));
|
|
2872
2872
|
}
|
|
2873
|
-
return
|
|
2874
|
-
}),
|
|
2873
|
+
return G;
|
|
2874
|
+
}), q.handleDeactivate = q.handleDeactivate.bind(q), q.handlePostDeactivate = q.handlePostDeactivate.bind(q), q.handleClickOutsideDeactivates = q.handleClickOutsideDeactivates.bind(q), q.internalOptions = {
|
|
2875
2875
|
// We need to hijack the returnFocusOnDeactivate option,
|
|
2876
2876
|
// because React can move focus into the element before we arrived at
|
|
2877
2877
|
// this lifecycle hook (e.g. with autoFocus inputs). So the component
|
|
@@ -2881,14 +2881,14 @@ function U4() {
|
|
|
2881
2881
|
// the rest of these are also related to deactivation of the trap, and we
|
|
2882
2882
|
// need to use them and control them as well
|
|
2883
2883
|
checkCanReturnFocus: null,
|
|
2884
|
-
onDeactivate:
|
|
2885
|
-
onPostDeactivate:
|
|
2884
|
+
onDeactivate: q.handleDeactivate,
|
|
2885
|
+
onPostDeactivate: q.handlePostDeactivate,
|
|
2886
2886
|
// we need to special-case this setting as well so that we can know if we should
|
|
2887
2887
|
// NOT return focus if the trap gets auto-deactivated as the result of an
|
|
2888
2888
|
// outside click (otherwise, we'll always think we should return focus because
|
|
2889
2889
|
// of how we manage that flag internally here)
|
|
2890
|
-
clickOutsideDeactivates:
|
|
2891
|
-
},
|
|
2890
|
+
clickOutsideDeactivates: q.handleClickOutsideDeactivates
|
|
2891
|
+
}, q.originalOptions = {
|
|
2892
2892
|
// because of the above `internalOptions`, we maintain our own flag for
|
|
2893
2893
|
// this option, and default it to `true` because that's focus-trap's default
|
|
2894
2894
|
returnFocusOnDeactivate: !0,
|
|
@@ -2902,15 +2902,15 @@ function U4() {
|
|
|
2902
2902
|
clickOutsideDeactivates: !1
|
|
2903
2903
|
};
|
|
2904
2904
|
var ne = X.focusTrapOptions;
|
|
2905
|
-
for (var
|
|
2906
|
-
if (Object.prototype.hasOwnProperty.call(ne,
|
|
2907
|
-
if (
|
|
2908
|
-
|
|
2905
|
+
for (var z in ne)
|
|
2906
|
+
if (Object.prototype.hasOwnProperty.call(ne, z)) {
|
|
2907
|
+
if (z === "returnFocusOnDeactivate" || z === "onDeactivate" || z === "onPostDeactivate" || z === "checkCanReturnFocus" || z === "clickOutsideDeactivates") {
|
|
2908
|
+
q.originalOptions[z] = ne[z];
|
|
2909
2909
|
continue;
|
|
2910
2910
|
}
|
|
2911
|
-
|
|
2911
|
+
q.internalOptions[z] = ne[z];
|
|
2912
2912
|
}
|
|
2913
|
-
return
|
|
2913
|
+
return q.outsideClick = null, q.focusTrapElements = X.containerElements || [], q.updatePreviousElement(), q;
|
|
2914
2914
|
}
|
|
2915
2915
|
return l(D, C), r(D, [{
|
|
2916
2916
|
key: "getDocument",
|
|
@@ -2920,15 +2920,15 @@ function U4() {
|
|
|
2920
2920
|
}, {
|
|
2921
2921
|
key: "getReturnFocusNode",
|
|
2922
2922
|
value: function() {
|
|
2923
|
-
var
|
|
2924
|
-
return
|
|
2923
|
+
var q = this.getNodeForOption("setReturnFocus", this.previouslyFocusedElement);
|
|
2924
|
+
return q || (q === !1 ? !1 : this.previouslyFocusedElement);
|
|
2925
2925
|
}
|
|
2926
2926
|
/** Update the previously focused element with the currently focused element. */
|
|
2927
2927
|
}, {
|
|
2928
2928
|
key: "updatePreviousElement",
|
|
2929
2929
|
value: function() {
|
|
2930
|
-
var
|
|
2931
|
-
|
|
2930
|
+
var q = this.getDocument();
|
|
2931
|
+
q && (this.previouslyFocusedElement = q.activeElement);
|
|
2932
2932
|
}
|
|
2933
2933
|
}, {
|
|
2934
2934
|
key: "deactivateTrap",
|
|
@@ -2952,10 +2952,10 @@ function U4() {
|
|
|
2952
2952
|
}
|
|
2953
2953
|
}, {
|
|
2954
2954
|
key: "handleClickOutsideDeactivates",
|
|
2955
|
-
value: function(
|
|
2956
|
-
var ne = typeof this.originalOptions.clickOutsideDeactivates == "function" ? this.originalOptions.clickOutsideDeactivates.call(null,
|
|
2955
|
+
value: function(q) {
|
|
2956
|
+
var ne = typeof this.originalOptions.clickOutsideDeactivates == "function" ? this.originalOptions.clickOutsideDeactivates.call(null, q) : this.originalOptions.clickOutsideDeactivates;
|
|
2957
2957
|
return ne && (this.outsideClick = {
|
|
2958
|
-
target:
|
|
2958
|
+
target: q.target,
|
|
2959
2959
|
allowDeactivation: ne
|
|
2960
2960
|
}), ne;
|
|
2961
2961
|
}
|
|
@@ -2967,18 +2967,18 @@ function U4() {
|
|
|
2967
2967
|
}, {
|
|
2968
2968
|
key: "handlePostDeactivate",
|
|
2969
2969
|
value: function() {
|
|
2970
|
-
var
|
|
2971
|
-
var
|
|
2972
|
-
(
|
|
2973
|
-
|
|
2974
|
-
(!
|
|
2975
|
-
|
|
2970
|
+
var q = this, ne = function() {
|
|
2971
|
+
var V = q.getReturnFocusNode(), U = !!// did the consumer allow it?
|
|
2972
|
+
(q.originalOptions.returnFocusOnDeactivate && // can we actually focus the node?
|
|
2973
|
+
V !== null && V !== void 0 && V.focus && // was there an outside click that allowed deactivation?
|
|
2974
|
+
(!q.outsideClick || // did the consumer allow deactivation when the outside node was clicked?
|
|
2975
|
+
q.outsideClick.allowDeactivation && // is the outside node NOT focusable (implying that it did NOT receive focus
|
|
2976
2976
|
// as a result of the click-through) -- in which case do NOT restore focus
|
|
2977
2977
|
// to `returnFocusNode` because focus should remain on the outside node
|
|
2978
|
-
!B(
|
|
2979
|
-
|
|
2978
|
+
!B(q.outsideClick.target, q.internalOptions.tabbableOptions))), I = q.internalOptions.preventScroll, F = I === void 0 ? !1 : I;
|
|
2979
|
+
U && V.focus({
|
|
2980
2980
|
preventScroll: F
|
|
2981
|
-
}),
|
|
2981
|
+
}), q.originalOptions.onPostDeactivate && q.originalOptions.onPostDeactivate.call(null), q.outsideClick = null;
|
|
2982
2982
|
};
|
|
2983
2983
|
this.originalOptions.checkCanReturnFocus ? this.originalOptions.checkCanReturnFocus.call(null, this.getReturnFocusNode()).then(ne, ne) : ne();
|
|
2984
2984
|
}
|
|
@@ -2988,8 +2988,8 @@ function U4() {
|
|
|
2988
2988
|
if (this.focusTrap)
|
|
2989
2989
|
this.props.active && !this.focusTrap.active && (this.focusTrap.activate(), this.props.paused && this.focusTrap.pause());
|
|
2990
2990
|
else {
|
|
2991
|
-
var
|
|
2992
|
-
|
|
2991
|
+
var q = this.focusTrapElements.some(Boolean);
|
|
2992
|
+
q && (this.focusTrap = this.props._createFocusTrap(this.focusTrapElements, this.internalOptions), this.props.active && this.focusTrap.activate(), this.props.paused && this.focusTrap.pause());
|
|
2993
2993
|
}
|
|
2994
2994
|
}
|
|
2995
2995
|
}, {
|
|
@@ -2999,17 +2999,17 @@ function U4() {
|
|
|
2999
2999
|
}
|
|
3000
3000
|
}, {
|
|
3001
3001
|
key: "componentDidUpdate",
|
|
3002
|
-
value: function(
|
|
3002
|
+
value: function(q) {
|
|
3003
3003
|
if (this.focusTrap) {
|
|
3004
|
-
|
|
3005
|
-
var ne = !
|
|
3006
|
-
if (ne && (this.updatePreviousElement(), this.focusTrap.activate()),
|
|
3004
|
+
q.containerElements !== this.props.containerElements && this.focusTrap.updateContainerElements(this.props.containerElements);
|
|
3005
|
+
var ne = !q.active && this.props.active, z = q.active && !this.props.active, V = !q.paused && this.props.paused, U = q.paused && !this.props.paused;
|
|
3006
|
+
if (ne && (this.updatePreviousElement(), this.focusTrap.activate()), z) {
|
|
3007
3007
|
this.deactivateTrap();
|
|
3008
3008
|
return;
|
|
3009
3009
|
}
|
|
3010
|
-
|
|
3010
|
+
V && this.focusTrap.pause(), U && this.focusTrap.unpause();
|
|
3011
3011
|
} else
|
|
3012
|
-
|
|
3012
|
+
q.containerElements !== this.props.containerElements && (this.focusTrapElements = this.props.containerElements), this.props.active && (this.updatePreviousElement(), this.setupFocusTrap());
|
|
3013
3013
|
}
|
|
3014
3014
|
}, {
|
|
3015
3015
|
key: "componentWillUnmount",
|
|
@@ -3019,23 +3019,23 @@ function U4() {
|
|
|
3019
3019
|
}, {
|
|
3020
3020
|
key: "render",
|
|
3021
3021
|
value: function() {
|
|
3022
|
-
var
|
|
3022
|
+
var q = this, ne = this.props.children ? y.Children.only(this.props.children) : void 0;
|
|
3023
3023
|
if (ne) {
|
|
3024
3024
|
if (ne.type && ne.type === y.Fragment)
|
|
3025
3025
|
throw new Error("A focus-trap cannot use a Fragment as its child container. Try replacing it with a <div> element.");
|
|
3026
|
-
var
|
|
3027
|
-
var F =
|
|
3028
|
-
ne && (typeof ne.ref == "function" ? ne.ref(
|
|
3029
|
-
},
|
|
3030
|
-
ref:
|
|
3026
|
+
var z = function(I) {
|
|
3027
|
+
var F = q.props.containerElements;
|
|
3028
|
+
ne && (typeof ne.ref == "function" ? ne.ref(I) : ne.ref && (ne.ref.current = I)), q.focusTrapElements = F || [I];
|
|
3029
|
+
}, V = y.cloneElement(ne, {
|
|
3030
|
+
ref: z
|
|
3031
3031
|
});
|
|
3032
|
-
return
|
|
3032
|
+
return V;
|
|
3033
3033
|
}
|
|
3034
3034
|
return null;
|
|
3035
3035
|
}
|
|
3036
3036
|
}]);
|
|
3037
|
-
})(y.Component),
|
|
3038
|
-
return
|
|
3037
|
+
})(y.Component), H = typeof Element > "u" ? Function : Element;
|
|
3038
|
+
return W.propTypes = {
|
|
3039
3039
|
active: b.bool,
|
|
3040
3040
|
paused: b.bool,
|
|
3041
3041
|
focusTrapOptions: b.shape({
|
|
@@ -3050,9 +3050,9 @@ function U4() {
|
|
|
3050
3050
|
onDeactivate: b.func,
|
|
3051
3051
|
onPostDeactivate: b.func,
|
|
3052
3052
|
checkCanReturnFocus: b.func,
|
|
3053
|
-
initialFocus: b.oneOfType([b.instanceOf(
|
|
3053
|
+
initialFocus: b.oneOfType([b.instanceOf(H), b.string, b.bool, b.func]),
|
|
3054
3054
|
fallbackFocus: b.oneOfType([
|
|
3055
|
-
b.instanceOf(
|
|
3055
|
+
b.instanceOf(H),
|
|
3056
3056
|
b.string,
|
|
3057
3057
|
// NOTE: does not support `false` as value (or return value from function)
|
|
3058
3058
|
b.func
|
|
@@ -3060,7 +3060,7 @@ function U4() {
|
|
|
3060
3060
|
escapeDeactivates: b.oneOfType([b.bool, b.func]),
|
|
3061
3061
|
clickOutsideDeactivates: b.oneOfType([b.bool, b.func]),
|
|
3062
3062
|
returnFocusOnDeactivate: b.bool,
|
|
3063
|
-
setReturnFocus: b.oneOfType([b.instanceOf(
|
|
3063
|
+
setReturnFocus: b.oneOfType([b.instanceOf(H), b.string, b.bool, b.func]),
|
|
3064
3064
|
allowOutsideClick: b.oneOfType([b.bool, b.func]),
|
|
3065
3065
|
preventScroll: b.bool,
|
|
3066
3066
|
tabbableOptions: b.shape({
|
|
@@ -3071,23 +3071,23 @@ function U4() {
|
|
|
3071
3071
|
isKeyForward: b.func,
|
|
3072
3072
|
isKeyBackward: b.func
|
|
3073
3073
|
}),
|
|
3074
|
-
containerElements: b.arrayOf(b.instanceOf(
|
|
3074
|
+
containerElements: b.arrayOf(b.instanceOf(H)),
|
|
3075
3075
|
// DOM element ONLY
|
|
3076
3076
|
children: b.oneOfType([
|
|
3077
3077
|
b.element,
|
|
3078
3078
|
// React element
|
|
3079
|
-
b.instanceOf(
|
|
3079
|
+
b.instanceOf(H)
|
|
3080
3080
|
// DOM element
|
|
3081
3081
|
])
|
|
3082
3082
|
// NOTE: _createFocusTrap is internal, for testing purposes only, so we don't
|
|
3083
3083
|
// specify it here. It's expected to be set to the function returned from
|
|
3084
3084
|
// require('focus-trap'), or one with a compatible interface.
|
|
3085
|
-
},
|
|
3085
|
+
}, W.defaultProps = {
|
|
3086
3086
|
active: !0,
|
|
3087
3087
|
paused: !1,
|
|
3088
3088
|
focusTrapOptions: {},
|
|
3089
3089
|
_createFocusTrap: v
|
|
3090
|
-
}, Vo =
|
|
3090
|
+
}, Vo = W, Vo;
|
|
3091
3091
|
}
|
|
3092
3092
|
var z4 = U4();
|
|
3093
3093
|
const j4 = /* @__PURE__ */ qn(z4);
|
|
@@ -3097,7 +3097,7 @@ function I1({
|
|
|
3097
3097
|
isMounted: n = !1,
|
|
3098
3098
|
style: r = {}
|
|
3099
3099
|
}) {
|
|
3100
|
-
const { isMobile: a, isNormalSize: i } =
|
|
3100
|
+
const { isMobile: a, isNormalSize: i } = _e(Ht), o = Ze(null);
|
|
3101
3101
|
return /* @__PURE__ */ S.jsx(
|
|
3102
3102
|
j4,
|
|
3103
3103
|
{
|
|
@@ -3138,7 +3138,7 @@ I1.propTypes = {
|
|
|
3138
3138
|
className: T.string
|
|
3139
3139
|
};
|
|
3140
3140
|
function O1({ children: e, isMounted: t }) {
|
|
3141
|
-
const { widgetMode: n } =
|
|
3141
|
+
const { widgetMode: n } = _e(Ct);
|
|
3142
3142
|
return n ? /* @__PURE__ */ S.jsx(I1, { isMounted: t, children: e }) : /* @__PURE__ */ S.jsx("div", { className: "xpert_chatbot_inline", children: e });
|
|
3143
3143
|
}
|
|
3144
3144
|
O1.propTypes = {
|
|
@@ -3146,7 +3146,7 @@ O1.propTypes = {
|
|
|
3146
3146
|
isMounted: T.bool
|
|
3147
3147
|
};
|
|
3148
3148
|
const N1 = () => {
|
|
3149
|
-
const { disclaimer: e } =
|
|
3149
|
+
const { disclaimer: e } = _e(Ct), t = Ze(null);
|
|
3150
3150
|
return Oe(() => {
|
|
3151
3151
|
t?.current?.focus();
|
|
3152
3152
|
}, []), /* @__PURE__ */ S.jsxs(
|
|
@@ -3423,19 +3423,19 @@ function r3(e, t) {
|
|
|
3423
3423
|
const E = [], v = b.hFlip, k = b.vFlip;
|
|
3424
3424
|
let B = b.rotate;
|
|
3425
3425
|
v ? k ? B += 2 : (E.push("translate(" + (a.width + a.left).toString() + " " + (0 - a.top).toString() + ")"), E.push("scale(-1 1)"), a.top = a.left = 0) : k && (E.push("translate(" + (0 - a.left).toString() + " " + (a.height + a.top).toString() + ")"), E.push("scale(1 -1)"), a.top = a.left = 0);
|
|
3426
|
-
let
|
|
3426
|
+
let W;
|
|
3427
3427
|
switch (B < 0 && (B -= Math.floor(B / 4) * 4), B = B % 4, B) {
|
|
3428
3428
|
case 1:
|
|
3429
|
-
|
|
3429
|
+
W = a.height / 2 + a.top, E.unshift("rotate(90 " + W.toString() + " " + W.toString() + ")");
|
|
3430
3430
|
break;
|
|
3431
3431
|
case 2:
|
|
3432
3432
|
E.unshift("rotate(180 " + (a.width / 2 + a.left).toString() + " " + (a.height / 2 + a.top).toString() + ")");
|
|
3433
3433
|
break;
|
|
3434
3434
|
case 3:
|
|
3435
|
-
|
|
3435
|
+
W = a.width / 2 + a.left, E.unshift("rotate(-90 " + W.toString() + " " + W.toString() + ")");
|
|
3436
3436
|
break;
|
|
3437
3437
|
}
|
|
3438
|
-
B % 2 === 1 && (a.left !== a.top && (
|
|
3438
|
+
B % 2 === 1 && (a.left !== a.top && (W = a.left, a.left = a.top, a.top = W), a.width !== a.height && (W = a.width, a.width = a.height, a.height = W)), E.length && (i = t3(i, '<g transform="' + E.join(" ") + '">', "</g>"));
|
|
3439
3439
|
});
|
|
3440
3440
|
const o = r.width, s = r.height, u = a.width, l = a.height;
|
|
3441
3441
|
let c, h;
|
|
@@ -3735,13 +3735,13 @@ function S3(e, t, n, r) {
|
|
|
3735
3735
|
C.status === "pending" && (C.status = "aborted");
|
|
3736
3736
|
}), m = [];
|
|
3737
3737
|
}
|
|
3738
|
-
function
|
|
3739
|
-
const
|
|
3738
|
+
function W(C, D, X) {
|
|
3739
|
+
const q = D !== "success";
|
|
3740
3740
|
switch (m = m.filter((ne) => ne !== C), u) {
|
|
3741
3741
|
case "pending":
|
|
3742
3742
|
break;
|
|
3743
3743
|
case "failed":
|
|
3744
|
-
if (
|
|
3744
|
+
if (q || !e.dataAfterTimeout) return;
|
|
3745
3745
|
break;
|
|
3746
3746
|
default:
|
|
3747
3747
|
return;
|
|
@@ -3750,8 +3750,8 @@ function S3(e, t, n, r) {
|
|
|
3750
3750
|
c = X, k();
|
|
3751
3751
|
return;
|
|
3752
3752
|
}
|
|
3753
|
-
if (
|
|
3754
|
-
c = X, m.length || (o.length ?
|
|
3753
|
+
if (q) {
|
|
3754
|
+
c = X, m.length || (o.length ? H() : k());
|
|
3755
3755
|
return;
|
|
3756
3756
|
}
|
|
3757
3757
|
if (y(), B(), !e.random) {
|
|
@@ -3762,7 +3762,7 @@ function S3(e, t, n, r) {
|
|
|
3762
3762
|
ne(X);
|
|
3763
3763
|
});
|
|
3764
3764
|
}
|
|
3765
|
-
function
|
|
3765
|
+
function H() {
|
|
3766
3766
|
if (u !== "pending") return;
|
|
3767
3767
|
y();
|
|
3768
3768
|
const C = o.shift();
|
|
@@ -3779,13 +3779,13 @@ function S3(e, t, n, r) {
|
|
|
3779
3779
|
const D = {
|
|
3780
3780
|
status: "pending",
|
|
3781
3781
|
resource: C,
|
|
3782
|
-
callback: (X,
|
|
3783
|
-
|
|
3782
|
+
callback: (X, q) => {
|
|
3783
|
+
W(D, X, q);
|
|
3784
3784
|
}
|
|
3785
3785
|
};
|
|
3786
|
-
m.push(D), l++, h = setTimeout(
|
|
3786
|
+
m.push(D), l++, h = setTimeout(H, e.rotate), n(C, t, D.callback);
|
|
3787
3787
|
}
|
|
3788
|
-
return setTimeout(
|
|
3788
|
+
return setTimeout(H), v;
|
|
3789
3789
|
}
|
|
3790
3790
|
function z1(e) {
|
|
3791
3791
|
const t = {
|
|
@@ -4262,7 +4262,7 @@ function ao({
|
|
|
4262
4262
|
handleChange: a,
|
|
4263
4263
|
value: i
|
|
4264
4264
|
}) {
|
|
4265
|
-
const o = Ze(!1), { conversationScreen: s, primaryColor: u } =
|
|
4265
|
+
const o = Ze(!1), { conversationScreen: s, primaryColor: u } = _e(Ct), { handleStop: l, onStreamingStop: c } = _e(vr), {
|
|
4266
4266
|
hasError: h,
|
|
4267
4267
|
hasNewMessage: m,
|
|
4268
4268
|
loading: p,
|
|
@@ -4270,21 +4270,21 @@ function ao({
|
|
|
4270
4270
|
streaming: b,
|
|
4271
4271
|
internalStreaming: E,
|
|
4272
4272
|
externalStreaming: v
|
|
4273
|
-
} =
|
|
4274
|
-
(
|
|
4275
|
-
|
|
4273
|
+
} = _e(Ht), [k, B] = ve(""), W = i !== void 0, H = W ? i : k, C = Qt(
|
|
4274
|
+
(z) => {
|
|
4275
|
+
z.preventDefault(), W || B(z.target.value), a && a(z);
|
|
4276
4276
|
},
|
|
4277
|
-
[a,
|
|
4277
|
+
[a, W]
|
|
4278
4278
|
), D = () => {
|
|
4279
|
-
|
|
4279
|
+
W || B(""), r.current && (r.current.style.height = "auto");
|
|
4280
4280
|
}, X = e || p || y || b;
|
|
4281
4281
|
Oe(() => {
|
|
4282
4282
|
o.current && !X && r.current?.focus(), o.current = X;
|
|
4283
4283
|
}, [X, r]), Oe(() => {
|
|
4284
4284
|
(h || m) && r.current?.focus();
|
|
4285
4285
|
}, [m, h, r]);
|
|
4286
|
-
const
|
|
4287
|
-
|
|
4286
|
+
const q = (z) => {
|
|
4287
|
+
z.key === "Enter" && H.trim() === "" || z.key === "Enter" && !z.shiftKey && (z.preventDefault(), t(H), D());
|
|
4288
4288
|
}, ne = () => {
|
|
4289
4289
|
r.current && (r.current.style.height = "auto", r.current.style.height = `${Math.min(
|
|
4290
4290
|
r.current?.scrollHeight,
|
|
@@ -4297,7 +4297,7 @@ function ao({
|
|
|
4297
4297
|
{
|
|
4298
4298
|
"data-testid": "ConversationInput",
|
|
4299
4299
|
disabled: X,
|
|
4300
|
-
value:
|
|
4300
|
+
value: H,
|
|
4301
4301
|
ref: r,
|
|
4302
4302
|
onInput: ne,
|
|
4303
4303
|
onChange: C,
|
|
@@ -4305,7 +4305,7 @@ function ao({
|
|
|
4305
4305
|
cols: "5",
|
|
4306
4306
|
rows: "1",
|
|
4307
4307
|
maxLength: s?.input?.maxLength ?? 5e3,
|
|
4308
|
-
onKeyDown:
|
|
4308
|
+
onKeyDown: q,
|
|
4309
4309
|
style: {
|
|
4310
4310
|
margin: "0",
|
|
4311
4311
|
borderRadius: "1rem",
|
|
@@ -4328,8 +4328,8 @@ function ao({
|
|
|
4328
4328
|
{
|
|
4329
4329
|
"data-testid": "Stop",
|
|
4330
4330
|
className: "xpert-chatbot-popup__input--stop-btn",
|
|
4331
|
-
onClick: (
|
|
4332
|
-
|
|
4331
|
+
onClick: (z) => {
|
|
4332
|
+
z.preventDefault(), l();
|
|
4333
4333
|
},
|
|
4334
4334
|
"aria-label": "Stop streaming",
|
|
4335
4335
|
children: /* @__PURE__ */ S.jsx(zn, { icon: "material-symbols:stop", style: { fontSize: "1.75rem" } })
|
|
@@ -4340,8 +4340,8 @@ function ao({
|
|
|
4340
4340
|
"data-testid": "Send",
|
|
4341
4341
|
disabled: X,
|
|
4342
4342
|
className: "xpert-chatbot-popup__input--send-btn",
|
|
4343
|
-
onClick: (
|
|
4344
|
-
|
|
4343
|
+
onClick: (z) => {
|
|
4344
|
+
z.preventDefault(), t(H), D();
|
|
4345
4345
|
},
|
|
4346
4346
|
"aria-label": "Send message",
|
|
4347
4347
|
children: /* @__PURE__ */ S.jsx(zn, { icon: "material-symbols:send", style: { fontSize: "1.75rem" } })
|
|
@@ -5024,28 +5024,28 @@ function W1() {
|
|
|
5024
5024
|
function u(b, ...E) {
|
|
5025
5025
|
let v;
|
|
5026
5026
|
if (ns("use", r), b != null) if (typeof b == "function")
|
|
5027
|
-
|
|
5027
|
+
H(b, ...E);
|
|
5028
5028
|
else if (typeof b == "object")
|
|
5029
|
-
Array.isArray(b) ?
|
|
5029
|
+
Array.isArray(b) ? W(b) : B(b);
|
|
5030
5030
|
else
|
|
5031
5031
|
throw new TypeError("Expected usable value, not `" + b + "`");
|
|
5032
5032
|
return v && (n.settings = Object.assign(n.settings || {}, v)), i;
|
|
5033
5033
|
function k(C) {
|
|
5034
5034
|
if (typeof C == "function")
|
|
5035
|
-
|
|
5035
|
+
H(C);
|
|
5036
5036
|
else if (typeof C == "object")
|
|
5037
5037
|
if (Array.isArray(C)) {
|
|
5038
5038
|
const [D, ...X] = C;
|
|
5039
|
-
|
|
5039
|
+
H(D, ...X);
|
|
5040
5040
|
} else
|
|
5041
5041
|
B(C);
|
|
5042
5042
|
else
|
|
5043
5043
|
throw new TypeError("Expected usable value, not `" + C + "`");
|
|
5044
5044
|
}
|
|
5045
5045
|
function B(C) {
|
|
5046
|
-
|
|
5046
|
+
W(C.plugins), C.settings && (v = Object.assign(v || {}, C.settings));
|
|
5047
5047
|
}
|
|
5048
|
-
function
|
|
5048
|
+
function W(C) {
|
|
5049
5049
|
let D = -1;
|
|
5050
5050
|
if (C != null) if (Array.isArray(C))
|
|
5051
5051
|
for (; ++D < C.length; ) {
|
|
@@ -5055,14 +5055,14 @@ function W1() {
|
|
|
5055
5055
|
else
|
|
5056
5056
|
throw new TypeError("Expected a list of plugins, not `" + C + "`");
|
|
5057
5057
|
}
|
|
5058
|
-
function
|
|
5059
|
-
let X = -1,
|
|
5058
|
+
function H(C, D) {
|
|
5059
|
+
let X = -1, q;
|
|
5060
5060
|
for (; ++X < t.length; )
|
|
5061
5061
|
if (t[X][0] === C) {
|
|
5062
|
-
|
|
5062
|
+
q = t[X];
|
|
5063
5063
|
break;
|
|
5064
5064
|
}
|
|
5065
|
-
|
|
5065
|
+
q ? (Xs(q[1]) && Xs(D) && (D = k0(!0, q[1], D)), q[1] = D) : t.push([...arguments]);
|
|
5066
5066
|
}
|
|
5067
5067
|
}
|
|
5068
5068
|
function l(b) {
|
|
@@ -5079,18 +5079,18 @@ function W1() {
|
|
|
5079
5079
|
if (O0(b), i.freeze(), !v && typeof E == "function" && (v = E, E = void 0), !v)
|
|
5080
5080
|
return new Promise(k);
|
|
5081
5081
|
k(null, v);
|
|
5082
|
-
function k(B,
|
|
5083
|
-
e.run(b, xa(E),
|
|
5084
|
-
function
|
|
5085
|
-
D = D || b, C ?
|
|
5082
|
+
function k(B, W) {
|
|
5083
|
+
e.run(b, xa(E), H);
|
|
5084
|
+
function H(C, D, X) {
|
|
5085
|
+
D = D || b, C ? W(C) : B ? B(D) : v(null, D, X);
|
|
5086
5086
|
}
|
|
5087
5087
|
}
|
|
5088
5088
|
}
|
|
5089
5089
|
function m(b, E) {
|
|
5090
5090
|
let v, k;
|
|
5091
5091
|
return i.run(b, E, B), N0("runSync", "run", k), v;
|
|
5092
|
-
function B(
|
|
5093
|
-
A0(
|
|
5092
|
+
function B(W, H) {
|
|
5093
|
+
A0(W), v = H, k = !0;
|
|
5094
5094
|
}
|
|
5095
5095
|
}
|
|
5096
5096
|
function p(b, E) {
|
|
@@ -5098,16 +5098,16 @@ function W1() {
|
|
|
5098
5098
|
return new Promise(v);
|
|
5099
5099
|
v(null, E);
|
|
5100
5100
|
function v(k, B) {
|
|
5101
|
-
const
|
|
5102
|
-
i.run(i.parse(
|
|
5101
|
+
const W = xa(b);
|
|
5102
|
+
i.run(i.parse(W), W, (C, D, X) => {
|
|
5103
5103
|
if (C || !D || !X)
|
|
5104
|
-
|
|
5104
|
+
H(C);
|
|
5105
5105
|
else {
|
|
5106
|
-
const
|
|
5107
|
-
|
|
5106
|
+
const q = i.stringify(D, X);
|
|
5107
|
+
q == null || (d6(q) ? X.value = q : X.result = q), H(C, X);
|
|
5108
5108
|
}
|
|
5109
5109
|
});
|
|
5110
|
-
function
|
|
5110
|
+
function H(C, D) {
|
|
5111
5111
|
C || !D ? B(C) : k ? k(D) : E(null, D);
|
|
5112
5112
|
}
|
|
5113
5113
|
}
|
|
@@ -5305,9 +5305,9 @@ function E6(e) {
|
|
|
5305
5305
|
return s;
|
|
5306
5306
|
function s(B) {
|
|
5307
5307
|
if (r < n.length) {
|
|
5308
|
-
const
|
|
5309
|
-
return t.containerState =
|
|
5310
|
-
|
|
5308
|
+
const W = n[r];
|
|
5309
|
+
return t.containerState = W[1], e.attempt(
|
|
5310
|
+
W[0].continuation,
|
|
5311
5311
|
u,
|
|
5312
5312
|
l
|
|
5313
5313
|
)(B);
|
|
@@ -5317,22 +5317,22 @@ function E6(e) {
|
|
|
5317
5317
|
function u(B) {
|
|
5318
5318
|
if (r++, t.containerState._closeFlow) {
|
|
5319
5319
|
t.containerState._closeFlow = void 0, a && k();
|
|
5320
|
-
const
|
|
5321
|
-
let
|
|
5322
|
-
for (;
|
|
5323
|
-
if (t.events[
|
|
5324
|
-
C = t.events[
|
|
5320
|
+
const W = t.events.length;
|
|
5321
|
+
let H = W, C;
|
|
5322
|
+
for (; H--; )
|
|
5323
|
+
if (t.events[H][0] === "exit" && t.events[H][1].type === "chunkFlow") {
|
|
5324
|
+
C = t.events[H][1].end;
|
|
5325
5325
|
break;
|
|
5326
5326
|
}
|
|
5327
5327
|
v(r);
|
|
5328
|
-
let D =
|
|
5328
|
+
let D = W;
|
|
5329
5329
|
for (; D < t.events.length; )
|
|
5330
5330
|
t.events[D][1].end = Object.assign({}, C), D++;
|
|
5331
5331
|
return jn(
|
|
5332
5332
|
t.events,
|
|
5333
|
-
|
|
5333
|
+
H + 1,
|
|
5334
5334
|
0,
|
|
5335
|
-
t.events.slice(
|
|
5335
|
+
t.events.slice(W)
|
|
5336
5336
|
), t.events.length = D, l(B);
|
|
5337
5337
|
}
|
|
5338
5338
|
return s(B);
|
|
@@ -5385,9 +5385,9 @@ function E6(e) {
|
|
|
5385
5385
|
}
|
|
5386
5386
|
return Fu(B) ? (e.consume(B), E(e.exit("chunkFlow")), r = 0, t.interrupt = void 0, s) : (e.consume(B), b);
|
|
5387
5387
|
}
|
|
5388
|
-
function E(B,
|
|
5389
|
-
const
|
|
5390
|
-
if (
|
|
5388
|
+
function E(B, W) {
|
|
5389
|
+
const H = t.sliceStream(B);
|
|
5390
|
+
if (W && H.push(null), B.previous = i, i && (i.next = B), i = B, a.defineSkip(B.start), a.write(H), t.parser.lazy[B.start.line]) {
|
|
5391
5391
|
let C = a.events.length;
|
|
5392
5392
|
for (; C--; )
|
|
5393
5393
|
if (
|
|
@@ -5398,14 +5398,14 @@ function E6(e) {
|
|
|
5398
5398
|
)
|
|
5399
5399
|
return;
|
|
5400
5400
|
const D = t.events.length;
|
|
5401
|
-
let X = D,
|
|
5401
|
+
let X = D, q, ne;
|
|
5402
5402
|
for (; X--; )
|
|
5403
5403
|
if (t.events[X][0] === "exit" && t.events[X][1].type === "chunkFlow") {
|
|
5404
|
-
if (
|
|
5404
|
+
if (q) {
|
|
5405
5405
|
ne = t.events[X][1].end;
|
|
5406
5406
|
break;
|
|
5407
5407
|
}
|
|
5408
|
-
|
|
5408
|
+
q = !0;
|
|
5409
5409
|
}
|
|
5410
5410
|
for (v(r), C = D; C < t.events.length; )
|
|
5411
5411
|
t.events[C][1].end = Object.assign({}, ne), C++;
|
|
@@ -5418,10 +5418,10 @@ function E6(e) {
|
|
|
5418
5418
|
}
|
|
5419
5419
|
}
|
|
5420
5420
|
function v(B) {
|
|
5421
|
-
let
|
|
5422
|
-
for (;
|
|
5423
|
-
const
|
|
5424
|
-
t.containerState =
|
|
5421
|
+
let W = n.length;
|
|
5422
|
+
for (; W-- > B; ) {
|
|
5423
|
+
const H = n[W];
|
|
5424
|
+
t.containerState = H[1], H[0].exit.call(t, e);
|
|
5425
5425
|
}
|
|
5426
5426
|
n.length = B;
|
|
5427
5427
|
}
|
|
@@ -5720,7 +5720,7 @@ const H0 = {
|
|
|
5720
5720
|
};
|
|
5721
5721
|
function z6(e, t, n) {
|
|
5722
5722
|
const r = this, a = {
|
|
5723
|
-
tokenize:
|
|
5723
|
+
tokenize: H,
|
|
5724
5724
|
partial: !0
|
|
5725
5725
|
};
|
|
5726
5726
|
let i = 0, o = 0, s;
|
|
@@ -5736,7 +5736,7 @@ function z6(e, t, n) {
|
|
|
5736
5736
|
return C === s ? (o++, e.consume(C), c) : o < 3 ? n(C) : (e.exit("codeFencedFenceSequence"), lt(C) ? ot(e, h, "whitespace")(C) : h(C));
|
|
5737
5737
|
}
|
|
5738
5738
|
function h(C) {
|
|
5739
|
-
return C === null || Ke(C) ? (e.exit("codeFencedFence"), r.interrupt ? t(C) : e.check(H0, b,
|
|
5739
|
+
return C === null || Ke(C) ? (e.exit("codeFencedFence"), r.interrupt ? t(C) : e.check(H0, b, W)(C)) : (e.enter("codeFencedFenceInfo"), e.enter("chunkString", {
|
|
5740
5740
|
contentType: "string"
|
|
5741
5741
|
}), m(C));
|
|
5742
5742
|
}
|
|
@@ -5752,7 +5752,7 @@ function z6(e, t, n) {
|
|
|
5752
5752
|
return C === null || Ke(C) ? (e.exit("chunkString"), e.exit("codeFencedFenceMeta"), h(C)) : C === 96 && C === s ? n(C) : (e.consume(C), y);
|
|
5753
5753
|
}
|
|
5754
5754
|
function b(C) {
|
|
5755
|
-
return e.attempt(a,
|
|
5755
|
+
return e.attempt(a, W, E)(C);
|
|
5756
5756
|
}
|
|
5757
5757
|
function E(C) {
|
|
5758
5758
|
return e.enter("lineEnding"), e.consume(C), e.exit("lineEnding"), v;
|
|
@@ -5766,35 +5766,35 @@ function z6(e, t, n) {
|
|
|
5766
5766
|
)(C) : k(C);
|
|
5767
5767
|
}
|
|
5768
5768
|
function k(C) {
|
|
5769
|
-
return C === null || Ke(C) ? e.check(H0, b,
|
|
5769
|
+
return C === null || Ke(C) ? e.check(H0, b, W)(C) : (e.enter("codeFlowValue"), B(C));
|
|
5770
5770
|
}
|
|
5771
5771
|
function B(C) {
|
|
5772
5772
|
return C === null || Ke(C) ? (e.exit("codeFlowValue"), k(C)) : (e.consume(C), B);
|
|
5773
5773
|
}
|
|
5774
|
-
function
|
|
5774
|
+
function W(C) {
|
|
5775
5775
|
return e.exit("codeFenced"), t(C);
|
|
5776
5776
|
}
|
|
5777
|
-
function
|
|
5778
|
-
let
|
|
5777
|
+
function H(C, D, X) {
|
|
5778
|
+
let q = 0;
|
|
5779
5779
|
return ne;
|
|
5780
5780
|
function ne(F) {
|
|
5781
|
-
return C.enter("lineEnding"), C.consume(F), C.exit("lineEnding"),
|
|
5781
|
+
return C.enter("lineEnding"), C.consume(F), C.exit("lineEnding"), z;
|
|
5782
5782
|
}
|
|
5783
|
-
function
|
|
5783
|
+
function z(F) {
|
|
5784
5784
|
return C.enter("codeFencedFence"), lt(F) ? ot(
|
|
5785
5785
|
C,
|
|
5786
|
-
|
|
5786
|
+
V,
|
|
5787
5787
|
"linePrefix",
|
|
5788
5788
|
r.parser.constructs.disable.null.includes("codeIndented") ? void 0 : 4
|
|
5789
|
-
)(F) :
|
|
5789
|
+
)(F) : V(F);
|
|
5790
5790
|
}
|
|
5791
|
-
function
|
|
5792
|
-
return F === s ? (C.enter("codeFencedFenceSequence"),
|
|
5791
|
+
function V(F) {
|
|
5792
|
+
return F === s ? (C.enter("codeFencedFenceSequence"), U(F)) : X(F);
|
|
5793
5793
|
}
|
|
5794
|
-
function
|
|
5795
|
-
return F === s ? (
|
|
5794
|
+
function U(F) {
|
|
5795
|
+
return F === s ? (q++, C.consume(F), U) : q >= o ? (C.exit("codeFencedFenceSequence"), lt(F) ? ot(C, I, "whitespace")(F) : I(F)) : X(F);
|
|
5796
5796
|
}
|
|
5797
|
-
function
|
|
5797
|
+
function I(F) {
|
|
5798
5798
|
return F === null || Ke(F) ? (C.exit("codeFencedFence"), D(F)) : X(F);
|
|
5799
5799
|
}
|
|
5800
5800
|
}
|
|
@@ -6313,112 +6313,112 @@ function Eg(e, t, n) {
|
|
|
6313
6313
|
const r = this;
|
|
6314
6314
|
let a, i, o, s, u;
|
|
6315
6315
|
return l;
|
|
6316
|
-
function l(
|
|
6317
|
-
return c(
|
|
6316
|
+
function l(O) {
|
|
6317
|
+
return c(O);
|
|
6318
6318
|
}
|
|
6319
|
-
function c(
|
|
6320
|
-
return e.enter("htmlFlow"), e.enter("htmlFlowData"), e.consume(
|
|
6319
|
+
function c(O) {
|
|
6320
|
+
return e.enter("htmlFlow"), e.enter("htmlFlowData"), e.consume(O), h;
|
|
6321
6321
|
}
|
|
6322
|
-
function h(
|
|
6323
|
-
return
|
|
6322
|
+
function h(O) {
|
|
6323
|
+
return O === 33 ? (e.consume(O), m) : O === 47 ? (e.consume(O), i = !0, b) : O === 63 ? (e.consume(O), a = 3, r.interrupt ? t : A) : Bn(O) ? (e.consume(O), o = String.fromCharCode(O), E) : n(O);
|
|
6324
6324
|
}
|
|
6325
|
-
function m(
|
|
6326
|
-
return
|
|
6325
|
+
function m(O) {
|
|
6326
|
+
return O === 45 ? (e.consume(O), a = 2, p) : O === 91 ? (e.consume(O), a = 5, s = 0, y) : Bn(O) ? (e.consume(O), a = 4, r.interrupt ? t : A) : n(O);
|
|
6327
6327
|
}
|
|
6328
|
-
function p(
|
|
6329
|
-
return
|
|
6328
|
+
function p(O) {
|
|
6329
|
+
return O === 45 ? (e.consume(O), r.interrupt ? t : A) : n(O);
|
|
6330
6330
|
}
|
|
6331
|
-
function y(
|
|
6331
|
+
function y(O) {
|
|
6332
6332
|
const Ee = "CDATA[";
|
|
6333
|
-
return
|
|
6333
|
+
return O === Ee.charCodeAt(s++) ? (e.consume(O), s === Ee.length ? r.interrupt ? t : V : y) : n(O);
|
|
6334
6334
|
}
|
|
6335
|
-
function b(
|
|
6336
|
-
return Bn(
|
|
6335
|
+
function b(O) {
|
|
6336
|
+
return Bn(O) ? (e.consume(O), o = String.fromCharCode(O), E) : n(O);
|
|
6337
6337
|
}
|
|
6338
|
-
function E(
|
|
6339
|
-
if (
|
|
6340
|
-
const Ee =
|
|
6341
|
-
return !Ee && !i && $0.includes(Ae) ? (a = 1, r.interrupt ? t(
|
|
6338
|
+
function E(O) {
|
|
6339
|
+
if (O === null || O === 47 || O === 62 || Sn(O)) {
|
|
6340
|
+
const Ee = O === 47, Ae = o.toLowerCase();
|
|
6341
|
+
return !Ee && !i && $0.includes(Ae) ? (a = 1, r.interrupt ? t(O) : V(O)) : gg.includes(o.toLowerCase()) ? (a = 6, Ee ? (e.consume(O), v) : r.interrupt ? t(O) : V(O)) : (a = 7, r.interrupt && !r.parser.lazy[r.now().line] ? n(O) : i ? k(O) : B(O));
|
|
6342
6342
|
}
|
|
6343
|
-
return
|
|
6343
|
+
return O === 45 || On(O) ? (e.consume(O), o += String.fromCharCode(O), E) : n(O);
|
|
6344
6344
|
}
|
|
6345
|
-
function v(
|
|
6346
|
-
return
|
|
6345
|
+
function v(O) {
|
|
6346
|
+
return O === 62 ? (e.consume(O), r.interrupt ? t : V) : n(O);
|
|
6347
6347
|
}
|
|
6348
|
-
function k(
|
|
6349
|
-
return lt(
|
|
6348
|
+
function k(O) {
|
|
6349
|
+
return lt(O) ? (e.consume(O), k) : ne(O);
|
|
6350
6350
|
}
|
|
6351
|
-
function B(
|
|
6352
|
-
return
|
|
6351
|
+
function B(O) {
|
|
6352
|
+
return O === 47 ? (e.consume(O), ne) : O === 58 || O === 95 || Bn(O) ? (e.consume(O), W) : lt(O) ? (e.consume(O), B) : ne(O);
|
|
6353
6353
|
}
|
|
6354
|
-
function
|
|
6355
|
-
return
|
|
6354
|
+
function W(O) {
|
|
6355
|
+
return O === 45 || O === 46 || O === 58 || O === 95 || On(O) ? (e.consume(O), W) : H(O);
|
|
6356
6356
|
}
|
|
6357
|
-
function
|
|
6358
|
-
return
|
|
6357
|
+
function H(O) {
|
|
6358
|
+
return O === 61 ? (e.consume(O), C) : lt(O) ? (e.consume(O), H) : B(O);
|
|
6359
6359
|
}
|
|
6360
|
-
function C(
|
|
6361
|
-
return
|
|
6360
|
+
function C(O) {
|
|
6361
|
+
return O === null || O === 60 || O === 61 || O === 62 || O === 96 ? n(O) : O === 34 || O === 39 ? (e.consume(O), u = O, D) : lt(O) ? (e.consume(O), C) : X(O);
|
|
6362
6362
|
}
|
|
6363
|
-
function D(
|
|
6364
|
-
return
|
|
6363
|
+
function D(O) {
|
|
6364
|
+
return O === u ? (e.consume(O), u = null, q) : O === null || Ke(O) ? n(O) : (e.consume(O), D);
|
|
6365
6365
|
}
|
|
6366
|
-
function X(
|
|
6367
|
-
return
|
|
6366
|
+
function X(O) {
|
|
6367
|
+
return O === null || O === 34 || O === 39 || O === 47 || O === 60 || O === 61 || O === 62 || O === 96 || Sn(O) ? H(O) : (e.consume(O), X);
|
|
6368
6368
|
}
|
|
6369
|
-
function
|
|
6370
|
-
return
|
|
6369
|
+
function q(O) {
|
|
6370
|
+
return O === 47 || O === 62 || lt(O) ? B(O) : n(O);
|
|
6371
6371
|
}
|
|
6372
|
-
function ne(
|
|
6373
|
-
return
|
|
6372
|
+
function ne(O) {
|
|
6373
|
+
return O === 62 ? (e.consume(O), z) : n(O);
|
|
6374
6374
|
}
|
|
6375
|
-
function
|
|
6376
|
-
return
|
|
6375
|
+
function z(O) {
|
|
6376
|
+
return O === null || Ke(O) ? V(O) : lt(O) ? (e.consume(O), z) : n(O);
|
|
6377
6377
|
}
|
|
6378
|
-
function
|
|
6379
|
-
return
|
|
6378
|
+
function V(O) {
|
|
6379
|
+
return O === 45 && a === 2 ? (e.consume(O), Y) : O === 60 && a === 1 ? (e.consume(O), J) : O === 62 && a === 4 ? (e.consume(O), se) : O === 63 && a === 3 ? (e.consume(O), A) : O === 93 && a === 5 ? (e.consume(O), Z) : Ke(O) && (a === 6 || a === 7) ? (e.exit("htmlFlowData"), e.check(
|
|
6380
6380
|
yg,
|
|
6381
6381
|
ye,
|
|
6382
|
-
|
|
6383
|
-
)(
|
|
6382
|
+
U
|
|
6383
|
+
)(O)) : O === null || Ke(O) ? (e.exit("htmlFlowData"), U(O)) : (e.consume(O), V);
|
|
6384
6384
|
}
|
|
6385
|
-
function
|
|
6385
|
+
function U(O) {
|
|
6386
6386
|
return e.check(
|
|
6387
6387
|
vg,
|
|
6388
|
-
|
|
6388
|
+
I,
|
|
6389
6389
|
ye
|
|
6390
|
-
)(
|
|
6390
|
+
)(O);
|
|
6391
6391
|
}
|
|
6392
|
-
function O
|
|
6393
|
-
return e.enter("lineEnding"), e.consume(
|
|
6392
|
+
function I(O) {
|
|
6393
|
+
return e.enter("lineEnding"), e.consume(O), e.exit("lineEnding"), F;
|
|
6394
6394
|
}
|
|
6395
|
-
function F(
|
|
6396
|
-
return
|
|
6395
|
+
function F(O) {
|
|
6396
|
+
return O === null || Ke(O) ? U(O) : (e.enter("htmlFlowData"), V(O));
|
|
6397
6397
|
}
|
|
6398
|
-
function Y(
|
|
6399
|
-
return
|
|
6398
|
+
function Y(O) {
|
|
6399
|
+
return O === 45 ? (e.consume(O), A) : V(O);
|
|
6400
6400
|
}
|
|
6401
|
-
function J(
|
|
6402
|
-
return
|
|
6401
|
+
function J(O) {
|
|
6402
|
+
return O === 47 ? (e.consume(O), o = "", G) : V(O);
|
|
6403
6403
|
}
|
|
6404
|
-
function
|
|
6405
|
-
if (
|
|
6404
|
+
function G(O) {
|
|
6405
|
+
if (O === 62) {
|
|
6406
6406
|
const Ee = o.toLowerCase();
|
|
6407
|
-
return $0.includes(Ee) ? (e.consume(
|
|
6407
|
+
return $0.includes(Ee) ? (e.consume(O), se) : V(O);
|
|
6408
6408
|
}
|
|
6409
|
-
return Bn(
|
|
6409
|
+
return Bn(O) && o.length < 8 ? (e.consume(O), o += String.fromCharCode(O), G) : V(O);
|
|
6410
6410
|
}
|
|
6411
|
-
function Z(
|
|
6412
|
-
return
|
|
6411
|
+
function Z(O) {
|
|
6412
|
+
return O === 93 ? (e.consume(O), A) : V(O);
|
|
6413
6413
|
}
|
|
6414
|
-
function A(
|
|
6415
|
-
return
|
|
6414
|
+
function A(O) {
|
|
6415
|
+
return O === 62 ? (e.consume(O), se) : O === 45 && a === 2 ? (e.consume(O), A) : V(O);
|
|
6416
6416
|
}
|
|
6417
|
-
function se(
|
|
6418
|
-
return
|
|
6417
|
+
function se(O) {
|
|
6418
|
+
return O === null || Ke(O) ? (e.exit("htmlFlowData"), ye(O)) : (e.consume(O), se);
|
|
6419
6419
|
}
|
|
6420
|
-
function ye(
|
|
6421
|
-
return e.exit("htmlFlow"), t(
|
|
6420
|
+
function ye(O) {
|
|
6421
|
+
return e.exit("htmlFlow"), t(O);
|
|
6422
6422
|
}
|
|
6423
6423
|
}
|
|
6424
6424
|
function xg(e, t, n) {
|
|
@@ -6449,7 +6449,7 @@ function wg(e, t, n) {
|
|
|
6449
6449
|
return e.enter("htmlText"), e.enter("htmlTextData"), e.consume(A), u;
|
|
6450
6450
|
}
|
|
6451
6451
|
function u(A) {
|
|
6452
|
-
return A === 33 ? (e.consume(A), l) : A === 47 ? (e.consume(A),
|
|
6452
|
+
return A === 33 ? (e.consume(A), l) : A === 47 ? (e.consume(A), H) : A === 63 ? (e.consume(A), B) : Bn(A) ? (e.consume(A), X) : n(A);
|
|
6453
6453
|
}
|
|
6454
6454
|
function l(A) {
|
|
6455
6455
|
return A === 45 ? (e.consume(A), c) : A === 91 ? (e.consume(A), i = 0, y) : Bn(A) ? (e.consume(A), k) : n(A);
|
|
@@ -6483,12 +6483,12 @@ function wg(e, t, n) {
|
|
|
6483
6483
|
return A === null || A === 62 ? Y(A) : Ke(A) ? (o = k, J(A)) : (e.consume(A), k);
|
|
6484
6484
|
}
|
|
6485
6485
|
function B(A) {
|
|
6486
|
-
return A === null ? n(A) : A === 63 ? (e.consume(A),
|
|
6486
|
+
return A === null ? n(A) : A === 63 ? (e.consume(A), W) : Ke(A) ? (o = B, J(A)) : (e.consume(A), B);
|
|
6487
6487
|
}
|
|
6488
|
-
function
|
|
6488
|
+
function W(A) {
|
|
6489
6489
|
return A === 62 ? Y(A) : B(A);
|
|
6490
6490
|
}
|
|
6491
|
-
function
|
|
6491
|
+
function H(A) {
|
|
6492
6492
|
return Bn(A) ? (e.consume(A), C) : n(A);
|
|
6493
6493
|
}
|
|
6494
6494
|
function C(A) {
|
|
@@ -6498,36 +6498,36 @@ function wg(e, t, n) {
|
|
|
6498
6498
|
return Ke(A) ? (o = D, J(A)) : lt(A) ? (e.consume(A), D) : Y(A);
|
|
6499
6499
|
}
|
|
6500
6500
|
function X(A) {
|
|
6501
|
-
return A === 45 || On(A) ? (e.consume(A), X) : A === 47 || A === 62 || Sn(A) ?
|
|
6501
|
+
return A === 45 || On(A) ? (e.consume(A), X) : A === 47 || A === 62 || Sn(A) ? q(A) : n(A);
|
|
6502
6502
|
}
|
|
6503
|
-
function
|
|
6504
|
-
return A === 47 ? (e.consume(A), Y) : A === 58 || A === 95 || Bn(A) ? (e.consume(A), ne) : Ke(A) ? (o =
|
|
6503
|
+
function q(A) {
|
|
6504
|
+
return A === 47 ? (e.consume(A), Y) : A === 58 || A === 95 || Bn(A) ? (e.consume(A), ne) : Ke(A) ? (o = q, J(A)) : lt(A) ? (e.consume(A), q) : Y(A);
|
|
6505
6505
|
}
|
|
6506
6506
|
function ne(A) {
|
|
6507
|
-
return A === 45 || A === 46 || A === 58 || A === 95 || On(A) ? (e.consume(A), ne) :
|
|
6507
|
+
return A === 45 || A === 46 || A === 58 || A === 95 || On(A) ? (e.consume(A), ne) : z(A);
|
|
6508
6508
|
}
|
|
6509
|
-
function
|
|
6510
|
-
return A === 61 ? (e.consume(A),
|
|
6509
|
+
function z(A) {
|
|
6510
|
+
return A === 61 ? (e.consume(A), V) : Ke(A) ? (o = z, J(A)) : lt(A) ? (e.consume(A), z) : q(A);
|
|
6511
6511
|
}
|
|
6512
|
-
function
|
|
6513
|
-
return A === null || A === 60 || A === 61 || A === 62 || A === 96 ? n(A) : A === 34 || A === 39 ? (e.consume(A), a = A,
|
|
6512
|
+
function V(A) {
|
|
6513
|
+
return A === null || A === 60 || A === 61 || A === 62 || A === 96 ? n(A) : A === 34 || A === 39 ? (e.consume(A), a = A, U) : Ke(A) ? (o = V, J(A)) : lt(A) ? (e.consume(A), V) : (e.consume(A), I);
|
|
6514
6514
|
}
|
|
6515
|
-
function
|
|
6516
|
-
return A === a ? (e.consume(A), a = void 0, F) : A === null ? n(A) : Ke(A) ? (o =
|
|
6515
|
+
function U(A) {
|
|
6516
|
+
return A === a ? (e.consume(A), a = void 0, F) : A === null ? n(A) : Ke(A) ? (o = U, J(A)) : (e.consume(A), U);
|
|
6517
6517
|
}
|
|
6518
|
-
function
|
|
6519
|
-
return A === null || A === 34 || A === 39 || A === 60 || A === 61 || A === 96 ? n(A) : A === 47 || A === 62 || Sn(A) ?
|
|
6518
|
+
function I(A) {
|
|
6519
|
+
return A === null || A === 34 || A === 39 || A === 60 || A === 61 || A === 96 ? n(A) : A === 47 || A === 62 || Sn(A) ? q(A) : (e.consume(A), I);
|
|
6520
6520
|
}
|
|
6521
6521
|
function F(A) {
|
|
6522
|
-
return A === 47 || A === 62 || Sn(A) ?
|
|
6522
|
+
return A === 47 || A === 62 || Sn(A) ? q(A) : n(A);
|
|
6523
6523
|
}
|
|
6524
6524
|
function Y(A) {
|
|
6525
6525
|
return A === 62 ? (e.consume(A), e.exit("htmlTextData"), e.exit("htmlText"), t) : n(A);
|
|
6526
6526
|
}
|
|
6527
6527
|
function J(A) {
|
|
6528
|
-
return e.exit("htmlTextData"), e.enter("lineEnding"), e.consume(A), e.exit("lineEnding"),
|
|
6528
|
+
return e.exit("htmlTextData"), e.enter("lineEnding"), e.consume(A), e.exit("lineEnding"), G;
|
|
6529
6529
|
}
|
|
6530
|
-
function
|
|
6530
|
+
function G(A) {
|
|
6531
6531
|
return lt(A) ? ot(
|
|
6532
6532
|
e,
|
|
6533
6533
|
Z,
|
|
@@ -7089,8 +7089,8 @@ function n5(e, t, n) {
|
|
|
7089
7089
|
const u = {
|
|
7090
7090
|
consume: k,
|
|
7091
7091
|
enter: B,
|
|
7092
|
-
exit:
|
|
7093
|
-
attempt: D(
|
|
7092
|
+
exit: W,
|
|
7093
|
+
attempt: D(H),
|
|
7094
7094
|
check: D(C),
|
|
7095
7095
|
interrupt: D(C, {
|
|
7096
7096
|
interrupt: !0
|
|
@@ -7109,67 +7109,67 @@ function n5(e, t, n) {
|
|
|
7109
7109
|
};
|
|
7110
7110
|
let c = t.tokenize.call(l, u);
|
|
7111
7111
|
return t.resolveAll && i.push(t), l;
|
|
7112
|
-
function h(
|
|
7113
|
-
return o = Tn(o,
|
|
7112
|
+
function h(z) {
|
|
7113
|
+
return o = Tn(o, z), E(), o[o.length - 1] !== null ? [] : (X(t, 0), l.events = Bu(i, l.events, l), l.events);
|
|
7114
7114
|
}
|
|
7115
|
-
function m(
|
|
7116
|
-
return a5(p(
|
|
7115
|
+
function m(z, V) {
|
|
7116
|
+
return a5(p(z), V);
|
|
7117
7117
|
}
|
|
7118
|
-
function p(
|
|
7119
|
-
return r5(o,
|
|
7118
|
+
function p(z) {
|
|
7119
|
+
return r5(o, z);
|
|
7120
7120
|
}
|
|
7121
7121
|
function y() {
|
|
7122
|
-
const { line:
|
|
7122
|
+
const { line: z, column: V, offset: U, _index: I, _bufferIndex: F } = r;
|
|
7123
7123
|
return {
|
|
7124
|
-
line:
|
|
7125
|
-
column:
|
|
7126
|
-
offset:
|
|
7127
|
-
_index:
|
|
7124
|
+
line: z,
|
|
7125
|
+
column: V,
|
|
7126
|
+
offset: U,
|
|
7127
|
+
_index: I,
|
|
7128
7128
|
_bufferIndex: F
|
|
7129
7129
|
};
|
|
7130
7130
|
}
|
|
7131
|
-
function b(
|
|
7132
|
-
a[
|
|
7131
|
+
function b(z) {
|
|
7132
|
+
a[z.line] = z.column, ne();
|
|
7133
7133
|
}
|
|
7134
7134
|
function E() {
|
|
7135
|
-
let
|
|
7135
|
+
let z;
|
|
7136
7136
|
for (; r._index < o.length; ) {
|
|
7137
|
-
const
|
|
7138
|
-
if (typeof
|
|
7139
|
-
for (
|
|
7140
|
-
v(
|
|
7137
|
+
const V = o[r._index];
|
|
7138
|
+
if (typeof V == "string")
|
|
7139
|
+
for (z = r._index, r._bufferIndex < 0 && (r._bufferIndex = 0); r._index === z && r._bufferIndex < V.length; )
|
|
7140
|
+
v(V.charCodeAt(r._bufferIndex));
|
|
7141
7141
|
else
|
|
7142
|
-
v(
|
|
7142
|
+
v(V);
|
|
7143
7143
|
}
|
|
7144
7144
|
}
|
|
7145
|
-
function v(
|
|
7146
|
-
c = c(
|
|
7145
|
+
function v(z) {
|
|
7146
|
+
c = c(z);
|
|
7147
7147
|
}
|
|
7148
|
-
function k(
|
|
7149
|
-
Fu(
|
|
7148
|
+
function k(z) {
|
|
7149
|
+
Fu(z) ? (r.line++, r.column = 1, r.offset += z === -3 ? 2 : 1, ne()) : z !== -1 && (r.column++, r.offset++), r._bufferIndex < 0 ? r._index++ : (r._bufferIndex++, r._bufferIndex === o[r._index].length && (r._bufferIndex = -1, r._index++)), l.previous = z;
|
|
7150
7150
|
}
|
|
7151
|
-
function B(
|
|
7152
|
-
const
|
|
7153
|
-
return
|
|
7151
|
+
function B(z, V) {
|
|
7152
|
+
const U = V || {};
|
|
7153
|
+
return U.type = z, U.start = y(), l.events.push(["enter", U, l]), s.push(U), U;
|
|
7154
7154
|
}
|
|
7155
|
-
function
|
|
7156
|
-
const
|
|
7157
|
-
return
|
|
7155
|
+
function W(z) {
|
|
7156
|
+
const V = s.pop();
|
|
7157
|
+
return V.end = y(), l.events.push(["exit", V, l]), V;
|
|
7158
7158
|
}
|
|
7159
|
-
function
|
|
7160
|
-
X(
|
|
7159
|
+
function H(z, V) {
|
|
7160
|
+
X(z, V.from);
|
|
7161
7161
|
}
|
|
7162
|
-
function C(
|
|
7163
|
-
|
|
7162
|
+
function C(z, V) {
|
|
7163
|
+
V.restore();
|
|
7164
7164
|
}
|
|
7165
|
-
function D(
|
|
7166
|
-
return
|
|
7167
|
-
function
|
|
7168
|
-
let J,
|
|
7169
|
-
return Array.isArray(
|
|
7165
|
+
function D(z, V) {
|
|
7166
|
+
return U;
|
|
7167
|
+
function U(I, F, Y) {
|
|
7168
|
+
let J, G, Z, A;
|
|
7169
|
+
return Array.isArray(I) ? ye(I) : "tokenize" in I ? (
|
|
7170
7170
|
// @ts-expect-error Looks like a construct.
|
|
7171
|
-
ye([
|
|
7172
|
-
) : se(
|
|
7171
|
+
ye([I])
|
|
7172
|
+
) : se(I);
|
|
7173
7173
|
function se(Ne) {
|
|
7174
7174
|
return De;
|
|
7175
7175
|
function De(Ge) {
|
|
@@ -7183,16 +7183,16 @@ function n5(e, t, n) {
|
|
|
7183
7183
|
}
|
|
7184
7184
|
}
|
|
7185
7185
|
function ye(Ne) {
|
|
7186
|
-
return J = Ne,
|
|
7186
|
+
return J = Ne, G = 0, Ne.length === 0 ? Y : O(Ne[G]);
|
|
7187
7187
|
}
|
|
7188
|
-
function
|
|
7188
|
+
function O(Ne) {
|
|
7189
7189
|
return De;
|
|
7190
7190
|
function De(Ge) {
|
|
7191
|
-
return A =
|
|
7191
|
+
return A = q(), Z = Ne, Ne.partial || (l.currentConstruct = Ne), Ne.name && l.parser.constructs.disable.null.includes(Ne.name) ? Ae() : Ne.tokenize.call(
|
|
7192
7192
|
// If we do have fields, create an object w/ `context` as its
|
|
7193
7193
|
// prototype.
|
|
7194
7194
|
// This allows a “live binding”, which is needed for `interrupt`.
|
|
7195
|
-
|
|
7195
|
+
V ? Object.assign(Object.create(l), V) : l,
|
|
7196
7196
|
u,
|
|
7197
7197
|
Ee,
|
|
7198
7198
|
Ae
|
|
@@ -7200,29 +7200,29 @@ function n5(e, t, n) {
|
|
|
7200
7200
|
}
|
|
7201
7201
|
}
|
|
7202
7202
|
function Ee(Ne) {
|
|
7203
|
-
return
|
|
7203
|
+
return z(Z, A), F;
|
|
7204
7204
|
}
|
|
7205
7205
|
function Ae(Ne) {
|
|
7206
|
-
return A.restore(), ++
|
|
7206
|
+
return A.restore(), ++G < J.length ? O(J[G]) : Y;
|
|
7207
7207
|
}
|
|
7208
7208
|
}
|
|
7209
7209
|
}
|
|
7210
|
-
function X(
|
|
7211
|
-
|
|
7210
|
+
function X(z, V) {
|
|
7211
|
+
z.resolveAll && !i.includes(z) && i.push(z), z.resolve && jn(
|
|
7212
7212
|
l.events,
|
|
7213
|
-
|
|
7214
|
-
l.events.length -
|
|
7215
|
-
|
|
7216
|
-
),
|
|
7213
|
+
V,
|
|
7214
|
+
l.events.length - V,
|
|
7215
|
+
z.resolve(l.events.slice(V), l)
|
|
7216
|
+
), z.resolveTo && (l.events = z.resolveTo(l.events, l));
|
|
7217
7217
|
}
|
|
7218
|
-
function
|
|
7219
|
-
const
|
|
7218
|
+
function q() {
|
|
7219
|
+
const z = y(), V = l.previous, U = l.currentConstruct, I = l.events.length, F = Array.from(s);
|
|
7220
7220
|
return {
|
|
7221
7221
|
restore: Y,
|
|
7222
|
-
from:
|
|
7222
|
+
from: I
|
|
7223
7223
|
};
|
|
7224
7224
|
function Y() {
|
|
7225
|
-
r =
|
|
7225
|
+
r = z, l.previous = V, l.currentConstruct = U, l.events.length = I, s = F, ne();
|
|
7226
7226
|
}
|
|
7227
7227
|
}
|
|
7228
7228
|
function ne() {
|
|
@@ -7462,20 +7462,20 @@ function x5(e) {
|
|
|
7462
7462
|
canContainEols: ["emphasis", "fragment", "heading", "paragraph", "strong"],
|
|
7463
7463
|
enter: {
|
|
7464
7464
|
autolink: s(rt),
|
|
7465
|
-
autolinkProtocol:
|
|
7466
|
-
autolinkEmail:
|
|
7465
|
+
autolinkProtocol: z,
|
|
7466
|
+
autolinkEmail: z,
|
|
7467
7467
|
atxHeading: s(ln),
|
|
7468
7468
|
blockQuote: s(dt),
|
|
7469
|
-
characterEscape:
|
|
7470
|
-
characterReference:
|
|
7469
|
+
characterEscape: z,
|
|
7470
|
+
characterReference: z,
|
|
7471
7471
|
codeFenced: s(ht),
|
|
7472
7472
|
codeFencedFenceInfo: u,
|
|
7473
7473
|
codeFencedFenceMeta: u,
|
|
7474
7474
|
codeIndented: s(ht, u),
|
|
7475
7475
|
codeText: s(Ft, u),
|
|
7476
|
-
codeTextData:
|
|
7477
|
-
data:
|
|
7478
|
-
codeFlowValue:
|
|
7476
|
+
codeTextData: z,
|
|
7477
|
+
data: z,
|
|
7478
|
+
codeFlowValue: z,
|
|
7479
7479
|
definition: s(Dn),
|
|
7480
7480
|
definitionDestinationString: u,
|
|
7481
7481
|
definitionLabelString: u,
|
|
@@ -7484,9 +7484,9 @@ function x5(e) {
|
|
|
7484
7484
|
hardBreakEscape: s(vn),
|
|
7485
7485
|
hardBreakTrailing: s(vn),
|
|
7486
7486
|
htmlFlow: s(ge, u),
|
|
7487
|
-
htmlFlowData:
|
|
7487
|
+
htmlFlowData: z,
|
|
7488
7488
|
htmlText: s(ge, u),
|
|
7489
|
-
htmlTextData:
|
|
7489
|
+
htmlTextData: z,
|
|
7490
7490
|
image: s(We),
|
|
7491
7491
|
label: u,
|
|
7492
7492
|
link: s(rt),
|
|
@@ -7510,7 +7510,7 @@ function x5(e) {
|
|
|
7510
7510
|
autolinkEmail: Ye,
|
|
7511
7511
|
autolinkProtocol: Qe,
|
|
7512
7512
|
blockQuote: c(),
|
|
7513
|
-
characterEscapeValue:
|
|
7513
|
+
characterEscapeValue: V,
|
|
7514
7514
|
characterReferenceMarkerHexadecimal: De,
|
|
7515
7515
|
characterReferenceMarkerNumeric: De,
|
|
7516
7516
|
characterReferenceValue: Ge,
|
|
@@ -7518,37 +7518,37 @@ function x5(e) {
|
|
|
7518
7518
|
codeFencedFence: v,
|
|
7519
7519
|
codeFencedFenceInfo: b,
|
|
7520
7520
|
codeFencedFenceMeta: E,
|
|
7521
|
-
codeFlowValue:
|
|
7521
|
+
codeFlowValue: V,
|
|
7522
7522
|
codeIndented: c(B),
|
|
7523
7523
|
codeText: c(J),
|
|
7524
|
-
codeTextData:
|
|
7525
|
-
data:
|
|
7524
|
+
codeTextData: V,
|
|
7525
|
+
data: V,
|
|
7526
7526
|
definition: c(),
|
|
7527
7527
|
definitionDestinationString: C,
|
|
7528
|
-
definitionLabelString:
|
|
7529
|
-
definitionTitleString:
|
|
7528
|
+
definitionLabelString: W,
|
|
7529
|
+
definitionTitleString: H,
|
|
7530
7530
|
emphasis: c(),
|
|
7531
|
-
hardBreakEscape: c(
|
|
7532
|
-
hardBreakTrailing: c(
|
|
7531
|
+
hardBreakEscape: c(I),
|
|
7532
|
+
hardBreakTrailing: c(I),
|
|
7533
7533
|
htmlFlow: c(F),
|
|
7534
|
-
htmlFlowData:
|
|
7534
|
+
htmlFlowData: V,
|
|
7535
7535
|
htmlText: c(Y),
|
|
7536
|
-
htmlTextData:
|
|
7536
|
+
htmlTextData: V,
|
|
7537
7537
|
image: c(Z),
|
|
7538
7538
|
label: se,
|
|
7539
7539
|
labelText: A,
|
|
7540
|
-
lineEnding:
|
|
7541
|
-
link: c(
|
|
7540
|
+
lineEnding: U,
|
|
7541
|
+
link: c(G),
|
|
7542
7542
|
listItem: c(),
|
|
7543
7543
|
listOrdered: c(),
|
|
7544
7544
|
listUnordered: c(),
|
|
7545
7545
|
paragraph: c(),
|
|
7546
7546
|
referenceString: Ne,
|
|
7547
7547
|
resourceDestinationString: ye,
|
|
7548
|
-
resourceTitleString:
|
|
7548
|
+
resourceTitleString: O,
|
|
7549
7549
|
resource: Ee,
|
|
7550
7550
|
setextHeading: c(ne),
|
|
7551
|
-
setextHeadingLineSequence:
|
|
7551
|
+
setextHeadingLineSequence: q,
|
|
7552
7552
|
setextHeadingText: X,
|
|
7553
7553
|
strong: c(),
|
|
7554
7554
|
thematicBreak: c()
|
|
@@ -7719,13 +7719,13 @@ function x5(e) {
|
|
|
7719
7719
|
const K = this.resume(), re = this.stack[this.stack.length - 1];
|
|
7720
7720
|
re.value = K.replace(/(\r?\n|\r)$/g, "");
|
|
7721
7721
|
}
|
|
7722
|
-
function
|
|
7722
|
+
function W(K) {
|
|
7723
7723
|
const re = this.resume(), xe = this.stack[this.stack.length - 1];
|
|
7724
7724
|
xe.label = re, xe.identifier = Wr(
|
|
7725
7725
|
this.sliceSerialize(K)
|
|
7726
7726
|
).toLowerCase();
|
|
7727
7727
|
}
|
|
7728
|
-
function
|
|
7728
|
+
function H() {
|
|
7729
7729
|
const K = this.resume(), re = this.stack[this.stack.length - 1];
|
|
7730
7730
|
re.title = K;
|
|
7731
7731
|
}
|
|
@@ -7743,34 +7743,34 @@ function x5(e) {
|
|
|
7743
7743
|
function X() {
|
|
7744
7744
|
i("setextHeadingSlurpLineEnding", !0);
|
|
7745
7745
|
}
|
|
7746
|
-
function
|
|
7746
|
+
function q(K) {
|
|
7747
7747
|
const re = this.stack[this.stack.length - 1];
|
|
7748
7748
|
re.depth = this.sliceSerialize(K).charCodeAt(0) === 61 ? 1 : 2;
|
|
7749
7749
|
}
|
|
7750
7750
|
function ne() {
|
|
7751
7751
|
i("setextHeadingSlurpLineEnding");
|
|
7752
7752
|
}
|
|
7753
|
-
function
|
|
7753
|
+
function z(K) {
|
|
7754
7754
|
const re = this.stack[this.stack.length - 1];
|
|
7755
7755
|
let xe = re.children[re.children.length - 1];
|
|
7756
7756
|
(!xe || xe.type !== "text") && (xe = Be(), xe.position = {
|
|
7757
7757
|
start: sr(K.start)
|
|
7758
7758
|
}, re.children.push(xe)), this.stack.push(xe);
|
|
7759
7759
|
}
|
|
7760
|
-
function
|
|
7760
|
+
function V(K) {
|
|
7761
7761
|
const re = this.stack.pop();
|
|
7762
7762
|
re.value += this.sliceSerialize(K), re.position.end = sr(K.end);
|
|
7763
7763
|
}
|
|
7764
|
-
function
|
|
7764
|
+
function U(K) {
|
|
7765
7765
|
const re = this.stack[this.stack.length - 1];
|
|
7766
7766
|
if (o("atHardBreak")) {
|
|
7767
7767
|
const xe = re.children[re.children.length - 1];
|
|
7768
7768
|
xe.position.end = sr(K.end), i("atHardBreak");
|
|
7769
7769
|
return;
|
|
7770
7770
|
}
|
|
7771
|
-
!o("setextHeadingSlurpLineEnding") && t.canContainEols.includes(re.type) && (
|
|
7771
|
+
!o("setextHeadingSlurpLineEnding") && t.canContainEols.includes(re.type) && (z.call(this, K), V.call(this, K));
|
|
7772
7772
|
}
|
|
7773
|
-
function
|
|
7773
|
+
function I() {
|
|
7774
7774
|
i("atHardBreak", !0);
|
|
7775
7775
|
}
|
|
7776
7776
|
function F() {
|
|
@@ -7785,7 +7785,7 @@ function x5(e) {
|
|
|
7785
7785
|
const K = this.resume(), re = this.stack[this.stack.length - 1];
|
|
7786
7786
|
re.value = K;
|
|
7787
7787
|
}
|
|
7788
|
-
function
|
|
7788
|
+
function G() {
|
|
7789
7789
|
const K = this.stack[this.stack.length - 1];
|
|
7790
7790
|
if (o("inReference")) {
|
|
7791
7791
|
const re = o("referenceType") || "shortcut";
|
|
@@ -7819,7 +7819,7 @@ function x5(e) {
|
|
|
7819
7819
|
const K = this.resume(), re = this.stack[this.stack.length - 1];
|
|
7820
7820
|
re.url = K;
|
|
7821
7821
|
}
|
|
7822
|
-
function
|
|
7822
|
+
function O() {
|
|
7823
7823
|
const K = this.resume(), re = this.stack[this.stack.length - 1];
|
|
7824
7824
|
re.title = K;
|
|
7825
7825
|
}
|
|
@@ -7849,12 +7849,12 @@ function x5(e) {
|
|
|
7849
7849
|
Ve.value += Le, Ve.position.end = sr(K.end);
|
|
7850
7850
|
}
|
|
7851
7851
|
function Qe(K) {
|
|
7852
|
-
|
|
7852
|
+
V.call(this, K);
|
|
7853
7853
|
const re = this.stack[this.stack.length - 1];
|
|
7854
7854
|
re.url = this.sliceSerialize(K);
|
|
7855
7855
|
}
|
|
7856
7856
|
function Ye(K) {
|
|
7857
|
-
|
|
7857
|
+
V.call(this, K);
|
|
7858
7858
|
const re = this.stack[this.stack.length - 1];
|
|
7859
7859
|
re.url = "mailto:" + this.sliceSerialize(K);
|
|
7860
7860
|
}
|
|
@@ -10079,78 +10079,78 @@ function Mb() {
|
|
|
10079
10079
|
if (!b) return [];
|
|
10080
10080
|
E = E || {};
|
|
10081
10081
|
var v = 1, k = 1;
|
|
10082
|
-
function B(
|
|
10083
|
-
var
|
|
10084
|
-
|
|
10085
|
-
var F =
|
|
10086
|
-
k = ~F ?
|
|
10087
|
-
}
|
|
10088
|
-
function
|
|
10089
|
-
var
|
|
10090
|
-
return function(
|
|
10091
|
-
return
|
|
10082
|
+
function B(U) {
|
|
10083
|
+
var I = U.match(t);
|
|
10084
|
+
I && (v += I.length);
|
|
10085
|
+
var F = U.lastIndexOf(u);
|
|
10086
|
+
k = ~F ? U.length - F : k + U.length;
|
|
10087
|
+
}
|
|
10088
|
+
function W() {
|
|
10089
|
+
var U = { line: v, column: k };
|
|
10090
|
+
return function(I) {
|
|
10091
|
+
return I.position = new H(U), X(), I;
|
|
10092
10092
|
};
|
|
10093
10093
|
}
|
|
10094
|
-
function U
|
|
10095
|
-
this.start =
|
|
10094
|
+
function H(U) {
|
|
10095
|
+
this.start = U, this.end = { line: v, column: k }, this.source = E.source;
|
|
10096
10096
|
}
|
|
10097
|
-
|
|
10098
|
-
function C(
|
|
10099
|
-
var
|
|
10100
|
-
E.source + ":" + v + ":" + k + ": " +
|
|
10097
|
+
H.prototype.content = b;
|
|
10098
|
+
function C(U) {
|
|
10099
|
+
var I = new Error(
|
|
10100
|
+
E.source + ":" + v + ":" + k + ": " + U
|
|
10101
10101
|
);
|
|
10102
|
-
if (
|
|
10102
|
+
if (I.reason = U, I.filename = E.source, I.line = v, I.column = k, I.source = b, !E.silent) throw I;
|
|
10103
10103
|
}
|
|
10104
|
-
function D(
|
|
10105
|
-
var
|
|
10106
|
-
if (
|
|
10107
|
-
var F =
|
|
10108
|
-
return B(F), b = b.slice(F.length),
|
|
10104
|
+
function D(U) {
|
|
10105
|
+
var I = U.exec(b);
|
|
10106
|
+
if (I) {
|
|
10107
|
+
var F = I[0];
|
|
10108
|
+
return B(F), b = b.slice(F.length), I;
|
|
10109
10109
|
}
|
|
10110
10110
|
}
|
|
10111
10111
|
function X() {
|
|
10112
10112
|
D(n);
|
|
10113
10113
|
}
|
|
10114
|
-
function
|
|
10115
|
-
var
|
|
10116
|
-
for (
|
|
10117
|
-
|
|
10118
|
-
return
|
|
10114
|
+
function q(U) {
|
|
10115
|
+
var I;
|
|
10116
|
+
for (U = U || []; I = ne(); )
|
|
10117
|
+
I !== !1 && U.push(I);
|
|
10118
|
+
return U;
|
|
10119
10119
|
}
|
|
10120
10120
|
function ne() {
|
|
10121
|
-
var
|
|
10121
|
+
var U = W();
|
|
10122
10122
|
if (!(l != b.charAt(0) || c != b.charAt(1))) {
|
|
10123
|
-
for (var
|
|
10124
|
-
++
|
|
10125
|
-
if (
|
|
10123
|
+
for (var I = 2; h != b.charAt(I) && (c != b.charAt(I) || l != b.charAt(I + 1)); )
|
|
10124
|
+
++I;
|
|
10125
|
+
if (I += 2, h === b.charAt(I - 1))
|
|
10126
10126
|
return C("End of comment missing");
|
|
10127
|
-
var F = b.slice(2,
|
|
10128
|
-
return k += 2, B(F), b = b.slice(
|
|
10127
|
+
var F = b.slice(2, I - 2);
|
|
10128
|
+
return k += 2, B(F), b = b.slice(I), k += 2, U({
|
|
10129
10129
|
type: m,
|
|
10130
10130
|
comment: F
|
|
10131
10131
|
});
|
|
10132
10132
|
}
|
|
10133
10133
|
}
|
|
10134
|
-
function
|
|
10135
|
-
var
|
|
10136
|
-
if (
|
|
10134
|
+
function z() {
|
|
10135
|
+
var U = W(), I = D(r);
|
|
10136
|
+
if (I) {
|
|
10137
10137
|
if (ne(), !D(a)) return C("property missing ':'");
|
|
10138
|
-
var F = D(i), Y =
|
|
10138
|
+
var F = D(i), Y = U({
|
|
10139
10139
|
type: p,
|
|
10140
|
-
property: y(
|
|
10140
|
+
property: y(I[0].replace(e, h)),
|
|
10141
10141
|
value: F ? y(F[0].replace(e, h)) : h
|
|
10142
10142
|
});
|
|
10143
10143
|
return D(o), Y;
|
|
10144
10144
|
}
|
|
10145
10145
|
}
|
|
10146
|
-
function
|
|
10147
|
-
var
|
|
10148
|
-
|
|
10149
|
-
for (var
|
|
10150
|
-
|
|
10151
|
-
return
|
|
10146
|
+
function V() {
|
|
10147
|
+
var U = [];
|
|
10148
|
+
q(U);
|
|
10149
|
+
for (var I; I = z(); )
|
|
10150
|
+
I !== !1 && (U.push(I), q(U));
|
|
10151
|
+
return U;
|
|
10152
10152
|
}
|
|
10153
|
-
return X(),
|
|
10153
|
+
return X(), V();
|
|
10154
10154
|
};
|
|
10155
10155
|
function y(b) {
|
|
10156
10156
|
return b ? b.replace(s, h) : h;
|
|
@@ -14651,42 +14651,42 @@ function J7(e) {
|
|
|
14651
14651
|
var t;
|
|
14652
14652
|
return e >= 55296 && e <= 57343 || e > 1114111 ? 65533 : (t = Z7.get(e)) !== null && t !== void 0 ? t : e;
|
|
14653
14653
|
}
|
|
14654
|
-
var
|
|
14654
|
+
var zt;
|
|
14655
14655
|
(function(e) {
|
|
14656
14656
|
e[e.NUM = 35] = "NUM", e[e.SEMI = 59] = "SEMI", e[e.EQUALS = 61] = "EQUALS", e[e.ZERO = 48] = "ZERO", e[e.NINE = 57] = "NINE", e[e.LOWER_A = 97] = "LOWER_A", e[e.LOWER_F = 102] = "LOWER_F", e[e.LOWER_X = 120] = "LOWER_X", e[e.LOWER_Z = 122] = "LOWER_Z", e[e.UPPER_A = 65] = "UPPER_A", e[e.UPPER_F = 70] = "UPPER_F", e[e.UPPER_Z = 90] = "UPPER_Z";
|
|
14657
|
-
})(
|
|
14657
|
+
})(zt || (zt = {}));
|
|
14658
14658
|
const e8 = 32;
|
|
14659
14659
|
var fr;
|
|
14660
14660
|
(function(e) {
|
|
14661
14661
|
e[e.VALUE_LENGTH = 49152] = "VALUE_LENGTH", e[e.BRANCH_LENGTH = 16256] = "BRANCH_LENGTH", e[e.JUMP_TABLE = 127] = "JUMP_TABLE";
|
|
14662
14662
|
})(fr || (fr = {}));
|
|
14663
14663
|
function cu(e) {
|
|
14664
|
-
return e >=
|
|
14664
|
+
return e >= zt.ZERO && e <= zt.NINE;
|
|
14665
14665
|
}
|
|
14666
14666
|
function t8(e) {
|
|
14667
|
-
return e >=
|
|
14667
|
+
return e >= zt.UPPER_A && e <= zt.UPPER_F || e >= zt.LOWER_A && e <= zt.LOWER_F;
|
|
14668
14668
|
}
|
|
14669
14669
|
function n8(e) {
|
|
14670
|
-
return e >=
|
|
14670
|
+
return e >= zt.UPPER_A && e <= zt.UPPER_Z || e >= zt.LOWER_A && e <= zt.LOWER_Z || cu(e);
|
|
14671
14671
|
}
|
|
14672
14672
|
function r8(e) {
|
|
14673
|
-
return e ===
|
|
14673
|
+
return e === zt.EQUALS || n8(e);
|
|
14674
14674
|
}
|
|
14675
|
-
var
|
|
14675
|
+
var Ut;
|
|
14676
14676
|
(function(e) {
|
|
14677
14677
|
e[e.EntityStart = 0] = "EntityStart", e[e.NumericStart = 1] = "NumericStart", e[e.NumericDecimal = 2] = "NumericDecimal", e[e.NumericHex = 3] = "NumericHex", e[e.NamedEntity = 4] = "NamedEntity";
|
|
14678
|
-
})(
|
|
14678
|
+
})(Ut || (Ut = {}));
|
|
14679
14679
|
var er;
|
|
14680
14680
|
(function(e) {
|
|
14681
14681
|
e[e.Legacy = 0] = "Legacy", e[e.Strict = 1] = "Strict", e[e.Attribute = 2] = "Attribute";
|
|
14682
14682
|
})(er || (er = {}));
|
|
14683
14683
|
class a8 {
|
|
14684
14684
|
constructor(t, n, r) {
|
|
14685
|
-
this.decodeTree = t, this.emitCodePoint = n, this.errors = r, this.state =
|
|
14685
|
+
this.decodeTree = t, this.emitCodePoint = n, this.errors = r, this.state = Ut.EntityStart, this.consumed = 1, this.result = 0, this.treeIndex = 0, this.excess = 1, this.decodeMode = er.Strict;
|
|
14686
14686
|
}
|
|
14687
14687
|
/** Resets the instance to make it reusable. */
|
|
14688
14688
|
startEntity(t) {
|
|
14689
|
-
this.decodeMode = t, this.state =
|
|
14689
|
+
this.decodeMode = t, this.state = Ut.EntityStart, this.result = 0, this.treeIndex = 0, this.excess = 1, this.consumed = 1;
|
|
14690
14690
|
}
|
|
14691
14691
|
/**
|
|
14692
14692
|
* Write an entity to the decoder. This can be called multiple times with partial entities.
|
|
@@ -14701,15 +14701,15 @@ class a8 {
|
|
|
14701
14701
|
*/
|
|
14702
14702
|
write(t, n) {
|
|
14703
14703
|
switch (this.state) {
|
|
14704
|
-
case
|
|
14705
|
-
return t.charCodeAt(n) ===
|
|
14706
|
-
case
|
|
14704
|
+
case Ut.EntityStart:
|
|
14705
|
+
return t.charCodeAt(n) === zt.NUM ? (this.state = Ut.NumericStart, this.consumed += 1, this.stateNumericStart(t, n + 1)) : (this.state = Ut.NamedEntity, this.stateNamedEntity(t, n));
|
|
14706
|
+
case Ut.NumericStart:
|
|
14707
14707
|
return this.stateNumericStart(t, n);
|
|
14708
|
-
case
|
|
14708
|
+
case Ut.NumericDecimal:
|
|
14709
14709
|
return this.stateNumericDecimal(t, n);
|
|
14710
|
-
case
|
|
14710
|
+
case Ut.NumericHex:
|
|
14711
14711
|
return this.stateNumericHex(t, n);
|
|
14712
|
-
case
|
|
14712
|
+
case Ut.NamedEntity:
|
|
14713
14713
|
return this.stateNamedEntity(t, n);
|
|
14714
14714
|
}
|
|
14715
14715
|
}
|
|
@@ -14723,7 +14723,7 @@ class a8 {
|
|
|
14723
14723
|
* @returns The number of characters that were consumed, or -1 if the entity is incomplete.
|
|
14724
14724
|
*/
|
|
14725
14725
|
stateNumericStart(t, n) {
|
|
14726
|
-
return n >= t.length ? -1 : (t.charCodeAt(n) | e8) ===
|
|
14726
|
+
return n >= t.length ? -1 : (t.charCodeAt(n) | e8) === zt.LOWER_X ? (this.state = Ut.NumericHex, this.consumed += 1, this.stateNumericHex(t, n + 1)) : (this.state = Ut.NumericDecimal, this.stateNumericDecimal(t, n));
|
|
14727
14727
|
}
|
|
14728
14728
|
addToNumericResult(t, n, r, a) {
|
|
14729
14729
|
if (n !== r) {
|
|
@@ -14788,11 +14788,11 @@ class a8 {
|
|
|
14788
14788
|
var r;
|
|
14789
14789
|
if (this.consumed <= n)
|
|
14790
14790
|
return (r = this.errors) === null || r === void 0 || r.absenceOfDigitsInNumericCharacterReference(this.consumed), 0;
|
|
14791
|
-
if (t ===
|
|
14791
|
+
if (t === zt.SEMI)
|
|
14792
14792
|
this.consumed += 1;
|
|
14793
14793
|
else if (this.decodeMode === er.Strict)
|
|
14794
14794
|
return 0;
|
|
14795
|
-
return this.emitCodePoint(J7(this.result), this.consumed), this.errors && (t !==
|
|
14795
|
+
return this.emitCodePoint(J7(this.result), this.consumed), this.errors && (t !== zt.SEMI && this.errors.missingSemicolonAfterCharacterReference(), this.errors.validateNumericCharacterReference(this.result)), this.consumed;
|
|
14796
14796
|
}
|
|
14797
14797
|
/**
|
|
14798
14798
|
* Parses a named entity.
|
|
@@ -14814,7 +14814,7 @@ class a8 {
|
|
|
14814
14814
|
(i === 0 || // And there should be no invalid characters.
|
|
14815
14815
|
r8(o)) ? 0 : this.emitNotTerminatedNamedEntity();
|
|
14816
14816
|
if (a = r[this.treeIndex], i = (a & fr.VALUE_LENGTH) >> 14, i !== 0) {
|
|
14817
|
-
if (o ===
|
|
14817
|
+
if (o === zt.SEMI)
|
|
14818
14818
|
return this.emitNamedEntityData(this.treeIndex, i, this.consumed + this.excess);
|
|
14819
14819
|
this.decodeMode !== er.Strict && (this.result = this.treeIndex, this.consumed += this.excess, this.excess = 0);
|
|
14820
14820
|
}
|
|
@@ -14854,16 +14854,16 @@ class a8 {
|
|
|
14854
14854
|
end() {
|
|
14855
14855
|
var t;
|
|
14856
14856
|
switch (this.state) {
|
|
14857
|
-
case
|
|
14857
|
+
case Ut.NamedEntity:
|
|
14858
14858
|
return this.result !== 0 && (this.decodeMode !== er.Attribute || this.result === this.treeIndex) ? this.emitNotTerminatedNamedEntity() : 0;
|
|
14859
14859
|
// Otherwise, emit a numeric entity if we have one.
|
|
14860
|
-
case
|
|
14860
|
+
case Ut.NumericDecimal:
|
|
14861
14861
|
return this.emitNumericEntity(0, 2);
|
|
14862
|
-
case
|
|
14862
|
+
case Ut.NumericHex:
|
|
14863
14863
|
return this.emitNumericEntity(0, 3);
|
|
14864
|
-
case
|
|
14864
|
+
case Ut.NumericStart:
|
|
14865
14865
|
return (t = this.errors) === null || t === void 0 || t.absenceOfDigitsInNumericCharacterReference(this.consumed), 0;
|
|
14866
|
-
case
|
|
14866
|
+
case Ut.EntityStart:
|
|
14867
14867
|
return 0;
|
|
14868
14868
|
}
|
|
14869
14869
|
}
|
|
@@ -24492,7 +24492,7 @@ function f(e, t, n, r, a, i) {
|
|
|
24492
24492
|
replace: r
|
|
24493
24493
|
}, i && r && (bt[e][r] = bt[e][a]);
|
|
24494
24494
|
}
|
|
24495
|
-
var g = "math", ae = "text", x = "main", L = "ams", Et = "accent-token", Te = "bin", en = "close", pa = "inner",
|
|
24495
|
+
var g = "math", ae = "text", x = "main", L = "ams", Et = "accent-token", Te = "bin", en = "close", pa = "inner", ke = "mathord", Pt = "op-token", yn = "open", mo = "punct", M = "rel", ir = "spacing", j = "textord";
|
|
24496
24496
|
f(g, x, M, "≡", "\\equiv", !0);
|
|
24497
24497
|
f(g, x, M, "≺", "\\prec", !0);
|
|
24498
24498
|
f(g, x, M, "≻", "\\succ", !0);
|
|
@@ -24857,36 +24857,36 @@ f(g, x, j, "⊤", "\\top");
|
|
|
24857
24857
|
f(g, x, j, "⊥", "\\bot");
|
|
24858
24858
|
f(g, x, j, "∅", "\\emptyset");
|
|
24859
24859
|
f(g, L, j, "∅", "\\varnothing");
|
|
24860
|
-
f(g, x,
|
|
24861
|
-
f(g, x,
|
|
24862
|
-
f(g, x,
|
|
24863
|
-
f(g, x,
|
|
24864
|
-
f(g, x,
|
|
24865
|
-
f(g, x,
|
|
24866
|
-
f(g, x,
|
|
24867
|
-
f(g, x,
|
|
24868
|
-
f(g, x,
|
|
24869
|
-
f(g, x,
|
|
24870
|
-
f(g, x,
|
|
24871
|
-
f(g, x,
|
|
24872
|
-
f(g, x,
|
|
24873
|
-
f(g, x,
|
|
24874
|
-
f(g, x,
|
|
24875
|
-
f(g, x,
|
|
24876
|
-
f(g, x,
|
|
24877
|
-
f(g, x,
|
|
24878
|
-
f(g, x,
|
|
24879
|
-
f(g, x,
|
|
24880
|
-
f(g, x,
|
|
24881
|
-
f(g, x,
|
|
24882
|
-
f(g, x,
|
|
24883
|
-
f(g, x,
|
|
24884
|
-
f(g, x,
|
|
24885
|
-
f(g, x,
|
|
24886
|
-
f(g, x,
|
|
24887
|
-
f(g, x,
|
|
24888
|
-
f(g, x,
|
|
24889
|
-
f(g, x,
|
|
24860
|
+
f(g, x, ke, "α", "\\alpha", !0);
|
|
24861
|
+
f(g, x, ke, "β", "\\beta", !0);
|
|
24862
|
+
f(g, x, ke, "γ", "\\gamma", !0);
|
|
24863
|
+
f(g, x, ke, "δ", "\\delta", !0);
|
|
24864
|
+
f(g, x, ke, "ϵ", "\\epsilon", !0);
|
|
24865
|
+
f(g, x, ke, "ζ", "\\zeta", !0);
|
|
24866
|
+
f(g, x, ke, "η", "\\eta", !0);
|
|
24867
|
+
f(g, x, ke, "θ", "\\theta", !0);
|
|
24868
|
+
f(g, x, ke, "ι", "\\iota", !0);
|
|
24869
|
+
f(g, x, ke, "κ", "\\kappa", !0);
|
|
24870
|
+
f(g, x, ke, "λ", "\\lambda", !0);
|
|
24871
|
+
f(g, x, ke, "μ", "\\mu", !0);
|
|
24872
|
+
f(g, x, ke, "ν", "\\nu", !0);
|
|
24873
|
+
f(g, x, ke, "ξ", "\\xi", !0);
|
|
24874
|
+
f(g, x, ke, "ο", "\\omicron", !0);
|
|
24875
|
+
f(g, x, ke, "π", "\\pi", !0);
|
|
24876
|
+
f(g, x, ke, "ρ", "\\rho", !0);
|
|
24877
|
+
f(g, x, ke, "σ", "\\sigma", !0);
|
|
24878
|
+
f(g, x, ke, "τ", "\\tau", !0);
|
|
24879
|
+
f(g, x, ke, "υ", "\\upsilon", !0);
|
|
24880
|
+
f(g, x, ke, "ϕ", "\\phi", !0);
|
|
24881
|
+
f(g, x, ke, "χ", "\\chi", !0);
|
|
24882
|
+
f(g, x, ke, "ψ", "\\psi", !0);
|
|
24883
|
+
f(g, x, ke, "ω", "\\omega", !0);
|
|
24884
|
+
f(g, x, ke, "ε", "\\varepsilon", !0);
|
|
24885
|
+
f(g, x, ke, "ϑ", "\\vartheta", !0);
|
|
24886
|
+
f(g, x, ke, "ϖ", "\\varpi", !0);
|
|
24887
|
+
f(g, x, ke, "ϱ", "\\varrho", !0);
|
|
24888
|
+
f(g, x, ke, "ς", "\\varsigma", !0);
|
|
24889
|
+
f(g, x, ke, "φ", "\\varphi", !0);
|
|
24890
24890
|
f(g, x, Te, "∗", "*", !0);
|
|
24891
24891
|
f(g, x, Te, "+", "+");
|
|
24892
24892
|
f(g, x, Te, "−", "-", !0);
|
|
@@ -25038,8 +25038,8 @@ f(g, x, Et, "^", "\\hat");
|
|
|
25038
25038
|
f(g, x, Et, "⃗", "\\vec");
|
|
25039
25039
|
f(g, x, Et, "˙", "\\dot");
|
|
25040
25040
|
f(g, x, Et, "˚", "\\mathring");
|
|
25041
|
-
f(g, x,
|
|
25042
|
-
f(g, x,
|
|
25041
|
+
f(g, x, ke, "", "\\@imath");
|
|
25042
|
+
f(g, x, ke, "", "\\@jmath");
|
|
25043
25043
|
f(g, x, j, "ı", "ı");
|
|
25044
25044
|
f(g, x, j, "ȷ", "ȷ");
|
|
25045
25045
|
f(ae, x, j, "ı", "\\i", !0);
|
|
@@ -25104,7 +25104,7 @@ for (var gs = 0; gs < Jc.length; gs++) {
|
|
|
25104
25104
|
var Ki = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz";
|
|
25105
25105
|
for (var bs = 0; bs < Ki.length; bs++) {
|
|
25106
25106
|
var yi = Ki.charAt(bs);
|
|
25107
|
-
f(g, x,
|
|
25107
|
+
f(g, x, ke, yi, yi), f(ae, x, j, yi, yi);
|
|
25108
25108
|
}
|
|
25109
25109
|
f(g, L, j, "C", "ℂ");
|
|
25110
25110
|
f(ae, L, j, "C", "ℂ");
|
|
@@ -25120,24 +25120,24 @@ f(g, L, j, "R", "ℝ");
|
|
|
25120
25120
|
f(ae, L, j, "R", "ℝ");
|
|
25121
25121
|
f(g, L, j, "Z", "ℤ");
|
|
25122
25122
|
f(ae, L, j, "Z", "ℤ");
|
|
25123
|
-
f(g, x,
|
|
25124
|
-
f(ae, x,
|
|
25123
|
+
f(g, x, ke, "h", "ℎ");
|
|
25124
|
+
f(ae, x, ke, "h", "ℎ");
|
|
25125
25125
|
var Re = "";
|
|
25126
25126
|
for (var Xt = 0; Xt < Ki.length; Xt++) {
|
|
25127
25127
|
var At = Ki.charAt(Xt);
|
|
25128
|
-
Re = String.fromCharCode(55349, 56320 + Xt), f(g, x,
|
|
25128
|
+
Re = String.fromCharCode(55349, 56320 + Xt), f(g, x, ke, At, Re), f(ae, x, j, At, Re), Re = String.fromCharCode(55349, 56372 + Xt), f(g, x, ke, At, Re), f(ae, x, j, At, Re), Re = String.fromCharCode(55349, 56424 + Xt), f(g, x, ke, At, Re), f(ae, x, j, At, Re), Re = String.fromCharCode(55349, 56580 + Xt), f(g, x, ke, At, Re), f(ae, x, j, At, Re), Re = String.fromCharCode(55349, 56684 + Xt), f(g, x, ke, At, Re), f(ae, x, j, At, Re), Re = String.fromCharCode(55349, 56736 + Xt), f(g, x, ke, At, Re), f(ae, x, j, At, Re), Re = String.fromCharCode(55349, 56788 + Xt), f(g, x, ke, At, Re), f(ae, x, j, At, Re), Re = String.fromCharCode(55349, 56840 + Xt), f(g, x, ke, At, Re), f(ae, x, j, At, Re), Re = String.fromCharCode(55349, 56944 + Xt), f(g, x, ke, At, Re), f(ae, x, j, At, Re), Xt < 26 && (Re = String.fromCharCode(55349, 56632 + Xt), f(g, x, ke, At, Re), f(ae, x, j, At, Re), Re = String.fromCharCode(55349, 56476 + Xt), f(g, x, ke, At, Re), f(ae, x, j, At, Re));
|
|
25129
25129
|
}
|
|
25130
25130
|
Re = "𝕜";
|
|
25131
|
-
f(g, x,
|
|
25131
|
+
f(g, x, ke, "k", Re);
|
|
25132
25132
|
f(ae, x, j, "k", Re);
|
|
25133
25133
|
for (var Sr = 0; Sr < 10; Sr++) {
|
|
25134
25134
|
var lr = Sr.toString();
|
|
25135
|
-
Re = String.fromCharCode(55349, 57294 + Sr), f(g, x,
|
|
25135
|
+
Re = String.fromCharCode(55349, 57294 + Sr), f(g, x, ke, lr, Re), f(ae, x, j, lr, Re), Re = String.fromCharCode(55349, 57314 + Sr), f(g, x, ke, lr, Re), f(ae, x, j, lr, Re), Re = String.fromCharCode(55349, 57324 + Sr), f(g, x, ke, lr, Re), f(ae, x, j, lr, Re), Re = String.fromCharCode(55349, 57334 + Sr), f(g, x, ke, lr, Re), f(ae, x, j, lr, Re);
|
|
25136
25136
|
}
|
|
25137
25137
|
var yu = "ÐÞþ";
|
|
25138
25138
|
for (var ys = 0; ys < yu.length; ys++) {
|
|
25139
25139
|
var vi = yu.charAt(ys);
|
|
25140
|
-
f(g, x,
|
|
25140
|
+
f(g, x, ke, vi, vi), f(ae, x, j, vi, vi);
|
|
25141
25141
|
}
|
|
25142
25142
|
var Ti = [
|
|
25143
25143
|
["mathbf", "textbf", "Main-Bold"],
|
|
@@ -25388,18 +25388,18 @@ var Ti = [
|
|
|
25388
25388
|
}
|
|
25389
25389
|
h = Math.min(h, p), m = Math.max(m, p);
|
|
25390
25390
|
}
|
|
25391
|
-
var
|
|
25392
|
-
|
|
25393
|
-
var
|
|
25391
|
+
var W = oe(["vlist"], c);
|
|
25392
|
+
W.style.height = me(m);
|
|
25393
|
+
var H;
|
|
25394
25394
|
if (h < 0) {
|
|
25395
25395
|
var C = oe([], []), D = oe(["vlist"], [C]);
|
|
25396
25396
|
D.style.height = me(-h);
|
|
25397
25397
|
var X = oe(["vlist-s"], [new Cn("")]);
|
|
25398
|
-
|
|
25398
|
+
H = [oe(["vlist-r"], [W, X]), oe(["vlist-r"], [D])];
|
|
25399
25399
|
} else
|
|
25400
|
-
|
|
25401
|
-
var
|
|
25402
|
-
return
|
|
25400
|
+
H = [oe(["vlist-r"], [W])];
|
|
25401
|
+
var q = oe(["vlist-t"], H);
|
|
25402
|
+
return H.length === 2 && q.classes.push("vlist-t2"), q.height = m, q.depth = -h, q;
|
|
25403
25403
|
}, rp = (e, t) => {
|
|
25404
25404
|
var n = oe(["mspace"], [], t), r = St(e, t);
|
|
25405
25405
|
return n.style.marginRight = me(r), n;
|
|
@@ -26105,35 +26105,35 @@ var cp = function(t) {
|
|
|
26105
26105
|
height: p
|
|
26106
26106
|
};
|
|
26107
26107
|
} else {
|
|
26108
|
-
var v = [], k = hT[u], [B,
|
|
26108
|
+
var v = [], k = hT[u], [B, W, H] = k, C = H / 1e3, D = B.length, X, q;
|
|
26109
26109
|
if (D === 1) {
|
|
26110
26110
|
var ne = k[3];
|
|
26111
|
-
X = ["hide-tail"],
|
|
26111
|
+
X = ["hide-tail"], q = [ne];
|
|
26112
26112
|
} else if (D === 2)
|
|
26113
|
-
X = ["halfarrow-left", "halfarrow-right"],
|
|
26113
|
+
X = ["halfarrow-left", "halfarrow-right"], q = ["xMinYMin", "xMaxYMin"];
|
|
26114
26114
|
else if (D === 3)
|
|
26115
|
-
X = ["brace-left", "brace-center", "brace-right"],
|
|
26115
|
+
X = ["brace-left", "brace-center", "brace-right"], q = ["xMinYMin", "xMidYMin", "xMaxYMin"];
|
|
26116
26116
|
else
|
|
26117
26117
|
throw new Error(`Correct katexImagesData or update code here to support
|
|
26118
26118
|
` + D + " children.");
|
|
26119
|
-
for (var
|
|
26120
|
-
var
|
|
26119
|
+
for (var z = 0; z < D; z++) {
|
|
26120
|
+
var V = new gr(B[z]), U = new rr([V], {
|
|
26121
26121
|
width: "400em",
|
|
26122
26122
|
height: me(C),
|
|
26123
|
-
viewBox: "0 0 " + s + " " +
|
|
26124
|
-
preserveAspectRatio: z
|
|
26125
|
-
}),
|
|
26123
|
+
viewBox: "0 0 " + s + " " + H,
|
|
26124
|
+
preserveAspectRatio: q[z] + " slice"
|
|
26125
|
+
}), I = br([X[z]], [U], n);
|
|
26126
26126
|
if (D === 1)
|
|
26127
26127
|
return {
|
|
26128
|
-
span:
|
|
26129
|
-
minWidth:
|
|
26128
|
+
span: I,
|
|
26129
|
+
minWidth: W,
|
|
26130
26130
|
height: C
|
|
26131
26131
|
};
|
|
26132
|
-
|
|
26132
|
+
I.style.height = me(C), v.push(I);
|
|
26133
26133
|
}
|
|
26134
26134
|
return {
|
|
26135
26135
|
span: oe(["stretchy"], v, n),
|
|
26136
|
-
minWidth:
|
|
26136
|
+
minWidth: W,
|
|
26137
26137
|
height: C
|
|
26138
26138
|
};
|
|
26139
26139
|
}
|
|
@@ -27043,40 +27043,40 @@ var Oa = function(t, n, r) {
|
|
|
27043
27043
|
s = l = c = t, u = null;
|
|
27044
27044
|
var p = "Size1-Regular";
|
|
27045
27045
|
t === "\\uparrow" ? l = c = "⏐" : t === "\\Uparrow" ? l = c = "‖" : t === "\\downarrow" ? s = l = "⏐" : t === "\\Downarrow" ? s = l = "‖" : t === "\\updownarrow" ? (s = "\\uparrow", l = "⏐", c = "\\downarrow") : t === "\\Updownarrow" ? (s = "\\Uparrow", l = "‖", c = "\\Downarrow") : ST.has(t) ? (l = "∣", h = "vert", m = 333) : CT.has(t) ? (l = "∥", h = "doublevert", m = 556) : t === "[" || t === "\\lbrack" ? (s = "⎡", l = "⎢", c = "⎣", p = "Size4-Regular", h = "lbrack", m = 667) : t === "]" || t === "\\rbrack" ? (s = "⎤", l = "⎥", c = "⎦", p = "Size4-Regular", h = "rbrack", m = 667) : t === "\\lfloor" || t === "⌊" ? (l = s = "⎢", c = "⎣", p = "Size4-Regular", h = "lfloor", m = 667) : t === "\\lceil" || t === "⌈" ? (s = "⎡", l = c = "⎢", p = "Size4-Regular", h = "lceil", m = 667) : t === "\\rfloor" || t === "⌋" ? (l = s = "⎥", c = "⎦", p = "Size4-Regular", h = "rfloor", m = 667) : t === "\\rceil" || t === "⌉" ? (s = "⎤", l = c = "⎥", p = "Size4-Regular", h = "rceil", m = 667) : t === "(" || t === "\\lparen" ? (s = "⎛", l = "⎜", c = "⎝", p = "Size4-Regular", h = "lparen", m = 875) : t === ")" || t === "\\rparen" ? (s = "⎞", l = "⎟", c = "⎠", p = "Size4-Regular", h = "rparen", m = 875) : t === "\\{" || t === "\\lbrace" ? (s = "⎧", u = "⎨", c = "⎩", l = "⎪", p = "Size4-Regular") : t === "\\}" || t === "\\rbrace" ? (s = "⎫", u = "⎬", c = "⎭", l = "⎪", p = "Size4-Regular") : t === "\\lgroup" || t === "⟮" ? (s = "⎧", c = "⎩", l = "⎪", p = "Size4-Regular") : t === "\\rgroup" || t === "⟯" ? (s = "⎫", c = "⎭", l = "⎪", p = "Size4-Regular") : t === "\\lmoustache" || t === "⎰" ? (s = "⎧", c = "⎭", l = "⎪", p = "Size4-Regular") : (t === "\\rmoustache" || t === "⎱") && (s = "⎫", c = "⎩", l = "⎪", p = "Size4-Regular");
|
|
27046
|
-
var y = Oa(s, p, i), b = y.height + y.depth, E = Oa(l, p, i), v = E.height + E.depth, k = Oa(c, p, i), B = k.height + k.depth,
|
|
27046
|
+
var y = Oa(s, p, i), b = y.height + y.depth, E = Oa(l, p, i), v = E.height + E.depth, k = Oa(c, p, i), B = k.height + k.depth, W = 0, H = 1;
|
|
27047
27047
|
if (u !== null) {
|
|
27048
27048
|
var C = Oa(u, p, i);
|
|
27049
|
-
|
|
27049
|
+
W = C.height + C.depth, H = 2;
|
|
27050
27050
|
}
|
|
27051
|
-
var D = b + B +
|
|
27051
|
+
var D = b + B + W, X = Math.max(0, Math.ceil((n - D) / (H * v))), q = D + X * H * v, ne = a.fontMetrics().axisHeight;
|
|
27052
27052
|
r && (ne *= a.sizeMultiplier);
|
|
27053
|
-
var
|
|
27053
|
+
var z = q / 2 - ne, V = [];
|
|
27054
27054
|
if (h.length > 0) {
|
|
27055
|
-
var
|
|
27055
|
+
var U = q - b - B, I = Math.round(q * 1e3), F = B9(h, Math.round(U * 1e3)), Y = new gr(h, F), J = (m / 1e3).toFixed(3) + "em", G = (I / 1e3).toFixed(3) + "em", Z = new rr([Y], {
|
|
27056
27056
|
width: J,
|
|
27057
|
-
height:
|
|
27058
|
-
viewBox: "0 0 " + m + " " +
|
|
27057
|
+
height: G,
|
|
27058
|
+
viewBox: "0 0 " + m + " " + I
|
|
27059
27059
|
}), A = br([], [Z], a);
|
|
27060
|
-
A.height =
|
|
27060
|
+
A.height = I / 1e3, A.style.width = J, A.style.height = G, V.push({
|
|
27061
27061
|
type: "elem",
|
|
27062
27062
|
elem: A
|
|
27063
27063
|
});
|
|
27064
27064
|
} else {
|
|
27065
|
-
if (
|
|
27066
|
-
var se =
|
|
27067
|
-
|
|
27065
|
+
if (V.push(Ts(c, p, i)), V.push(Ci), u === null) {
|
|
27066
|
+
var se = q - b - B + 2 * Su;
|
|
27067
|
+
V.push(Es(l, se, a));
|
|
27068
27068
|
} else {
|
|
27069
|
-
var ye = (
|
|
27070
|
-
|
|
27069
|
+
var ye = (q - b - B - W) / 2 + 2 * Su;
|
|
27070
|
+
V.push(Es(l, ye, a)), V.push(Ci), V.push(Ts(u, p, i)), V.push(Ci), V.push(Es(l, ye, a));
|
|
27071
27071
|
}
|
|
27072
|
-
|
|
27072
|
+
V.push(Ci), V.push(Ts(s, p, i));
|
|
27073
27073
|
}
|
|
27074
|
-
var
|
|
27074
|
+
var O = a.havingBaseStyle(Pe.TEXT), Ee = nt({
|
|
27075
27075
|
positionType: "bottom",
|
|
27076
|
-
positionData:
|
|
27077
|
-
children:
|
|
27076
|
+
positionData: z,
|
|
27077
|
+
children: V
|
|
27078
27078
|
});
|
|
27079
|
-
return yl(oe(["delimsizing", "mult"], [Ee],
|
|
27079
|
+
return yl(oe(["delimsizing", "mult"], [Ee], O), Pe.TEXT, a, o);
|
|
27080
27080
|
}, xs = 80, Ss = 0.08, Cs = function(t, n, r, a, i) {
|
|
27081
27081
|
var o = P9(t, a, r), s = new gr(t, o), u = new rr([s], {
|
|
27082
27082
|
// Note: 1000:1 ratio of viewBox to document em width.
|
|
@@ -27698,21 +27698,21 @@ function Tr(e, t, n) {
|
|
|
27698
27698
|
function B() {
|
|
27699
27699
|
u && e.gullet.macros.set("\\@eqnsw", "1", !0);
|
|
27700
27700
|
}
|
|
27701
|
-
function
|
|
27701
|
+
function W() {
|
|
27702
27702
|
k && (e.gullet.macros.get("\\df@tag") ? (k.push(e.subparse([new bn("\\df@tag")])), e.gullet.macros.set("\\df@tag", void 0, !0)) : k.push(!!u && e.gullet.macros.get("\\@eqnsw") === "1"));
|
|
27703
27703
|
}
|
|
27704
27704
|
for (B(), v.push(ud(e)); ; ) {
|
|
27705
|
-
var
|
|
27706
|
-
e.gullet.endGroup(), e.gullet.beginGroup(),
|
|
27705
|
+
var H = e.parseExpression(!1, l ? "\\end" : "\\\\");
|
|
27706
|
+
e.gullet.endGroup(), e.gullet.beginGroup(), H = {
|
|
27707
27707
|
type: "ordgroup",
|
|
27708
27708
|
mode: e.mode,
|
|
27709
|
-
body:
|
|
27710
|
-
}, n && (
|
|
27709
|
+
body: H
|
|
27710
|
+
}, n && (H = {
|
|
27711
27711
|
type: "styling",
|
|
27712
27712
|
mode: e.mode,
|
|
27713
27713
|
style: n,
|
|
27714
|
-
body: [
|
|
27715
|
-
}), y.push(
|
|
27714
|
+
body: [H]
|
|
27715
|
+
}), y.push(H);
|
|
27716
27716
|
var C = e.fetch().text;
|
|
27717
27717
|
if (C === "&") {
|
|
27718
27718
|
if (h && y.length === h) {
|
|
@@ -27722,12 +27722,12 @@ function Tr(e, t, n) {
|
|
|
27722
27722
|
}
|
|
27723
27723
|
e.consume();
|
|
27724
27724
|
} else if (C === "\\end") {
|
|
27725
|
-
|
|
27725
|
+
W(), y.length === 1 && H.type === "styling" && H.body[0].body.length === 0 && (b.length > 1 || !c) && b.pop(), v.length < b.length + 1 && v.push([]);
|
|
27726
27726
|
break;
|
|
27727
27727
|
} else if (C === "\\\\") {
|
|
27728
27728
|
e.consume();
|
|
27729
27729
|
var D = void 0;
|
|
27730
|
-
e.gullet.future().text !== " " && (D = e.parseSizeGroup(!0)), E.push(D ? D.value : null),
|
|
27730
|
+
e.gullet.future().text !== " " && (D = e.parseSizeGroup(!0)), E.push(D ? D.value : null), W(), v.push(ud(e)), y = [], b.push(y), B();
|
|
27731
27731
|
} else
|
|
27732
27732
|
throw new le("Expected & or \\\\ or \\cr or \\end", e.nextToken);
|
|
27733
27733
|
}
|
|
@@ -27764,29 +27764,29 @@ var Yn = function(t, n) {
|
|
|
27764
27764
|
number: 3,
|
|
27765
27765
|
unit: "ex"
|
|
27766
27766
|
}, n) : 12 * h, b = 3 * h, E = t.arraystretch * y, v = 0.7 * E, k = 0.3 * E, B = 0;
|
|
27767
|
-
function
|
|
27767
|
+
function W(rt) {
|
|
27768
27768
|
for (var Se = 0; Se < rt.length; ++Se)
|
|
27769
27769
|
Se > 0 && (B += 0.25), l.push({
|
|
27770
27770
|
pos: B,
|
|
27771
27771
|
isDashed: rt[Se]
|
|
27772
27772
|
});
|
|
27773
27773
|
}
|
|
27774
|
-
for (
|
|
27775
|
-
var
|
|
27776
|
-
s <
|
|
27777
|
-
var X = new Array(
|
|
27778
|
-
for (a = 0; a <
|
|
27779
|
-
var
|
|
27780
|
-
D <
|
|
27774
|
+
for (W(o[0]), r = 0; r < t.body.length; ++r) {
|
|
27775
|
+
var H = t.body[r], C = v, D = k;
|
|
27776
|
+
s < H.length && (s = H.length);
|
|
27777
|
+
var X = new Array(H.length);
|
|
27778
|
+
for (a = 0; a < H.length; ++a) {
|
|
27779
|
+
var q = et(H[a], n);
|
|
27780
|
+
D < q.depth && (D = q.depth), C < q.height && (C = q.height), X[a] = q;
|
|
27781
27781
|
}
|
|
27782
|
-
var ne = t.rowGaps[r],
|
|
27783
|
-
ne && (
|
|
27782
|
+
var ne = t.rowGaps[r], z = 0;
|
|
27783
|
+
ne && (z = St(ne, n), z > 0 && (z += k, D < z && (D = z), z = 0)), t.addJot && (D += b), X.height = C, X.depth = D, B += C, X.pos = B, B += D + z, u[r] = X, W(o[r + 1]);
|
|
27784
27784
|
}
|
|
27785
|
-
var
|
|
27785
|
+
var V = B / 2 + n.fontMetrics().axisHeight, U = t.cols || [], I = [], F, Y, J = [];
|
|
27786
27786
|
if (t.tags && t.tags.some((rt) => rt))
|
|
27787
27787
|
for (r = 0; r < i; ++r) {
|
|
27788
|
-
var
|
|
27789
|
-
A === !0 ? se = oe(["eqn-num"], [], n) : A === !1 ? se = oe([], [], n) : se = oe([], Bt(A, n, !0), n), se.depth =
|
|
27788
|
+
var G = u[r], Z = G.pos - V, A = t.tags[r], se = void 0;
|
|
27789
|
+
A === !0 ? se = oe(["eqn-num"], [], n) : A === !1 ? se = oe([], [], n) : se = oe([], Bt(A, n, !0), n), se.depth = G.depth, se.height = G.height, J.push({
|
|
27790
27790
|
type: "elem",
|
|
27791
27791
|
elem: se,
|
|
27792
27792
|
shift: Z
|
|
@@ -27796,30 +27796,30 @@ var Yn = function(t, n) {
|
|
|
27796
27796
|
a = 0, Y = 0;
|
|
27797
27797
|
// Continue while either there are more columns or more column
|
|
27798
27798
|
// descriptions, so trailing separators don't get lost.
|
|
27799
|
-
a < s || Y <
|
|
27799
|
+
a < s || Y < U.length;
|
|
27800
27800
|
++a, ++Y
|
|
27801
27801
|
) {
|
|
27802
|
-
for (var ye =
|
|
27803
|
-
if (
|
|
27802
|
+
for (var ye = U[Y] || {}, O = !0; ye.type === "separator"; ) {
|
|
27803
|
+
if (O || (F = oe(["arraycolsep"], []), F.style.width = me(n.fontMetrics().doubleRuleSep), I.push(F)), ye.separator === "|" || ye.separator === ":") {
|
|
27804
27804
|
var Ee = ye.separator === "|" ? "solid" : "dashed", Ae = oe(["vertical-separator"], [], n);
|
|
27805
27805
|
Ae.style.height = me(B), Ae.style.borderRightWidth = me(c), Ae.style.borderRightStyle = Ee, Ae.style.margin = "0 " + me(-c / 2);
|
|
27806
|
-
var Ne = B -
|
|
27807
|
-
Ne && (Ae.style.verticalAlign = me(-Ne)),
|
|
27806
|
+
var Ne = B - V;
|
|
27807
|
+
Ne && (Ae.style.verticalAlign = me(-Ne)), I.push(Ae);
|
|
27808
27808
|
} else
|
|
27809
27809
|
throw new le("Invalid separator type: " + ye.separator);
|
|
27810
|
-
Y++, ye =
|
|
27810
|
+
Y++, ye = U[Y] || {}, O = !1;
|
|
27811
27811
|
}
|
|
27812
27812
|
if (!(a >= s)) {
|
|
27813
27813
|
var De = void 0;
|
|
27814
27814
|
if (a > 0 || t.hskipBeforeAndAfter) {
|
|
27815
27815
|
var Ge;
|
|
27816
|
-
De = (Ge = ye.pregap) != null ? Ge : m, De !== 0 && (F = oe(["arraycolsep"], []), F.style.width = me(De),
|
|
27816
|
+
De = (Ge = ye.pregap) != null ? Ge : m, De !== 0 && (F = oe(["arraycolsep"], []), F.style.width = me(De), I.push(F));
|
|
27817
27817
|
}
|
|
27818
27818
|
var Qe = [];
|
|
27819
27819
|
for (r = 0; r < i; ++r) {
|
|
27820
27820
|
var Ye = u[r], dt = Ye[a];
|
|
27821
27821
|
if (dt) {
|
|
27822
|
-
var ht = Ye.pos -
|
|
27822
|
+
var ht = Ye.pos - V;
|
|
27823
27823
|
dt.depth = Ye.depth, dt.height = Ye.height, Qe.push({
|
|
27824
27824
|
type: "elem",
|
|
27825
27825
|
elem: dt,
|
|
@@ -27830,19 +27830,19 @@ var Yn = function(t, n) {
|
|
|
27830
27830
|
if (Qe = nt({
|
|
27831
27831
|
positionType: "individualShift",
|
|
27832
27832
|
children: Qe
|
|
27833
|
-
}), Qe = oe(["col-align-" + (ye.align || "c")], [Qe]),
|
|
27833
|
+
}), Qe = oe(["col-align-" + (ye.align || "c")], [Qe]), I.push(Qe), a < s - 1 || t.hskipBeforeAndAfter) {
|
|
27834
27834
|
var Ft;
|
|
27835
|
-
De = (Ft = ye.postgap) != null ? Ft : m, De !== 0 && (F = oe(["arraycolsep"], []), F.style.width = me(De),
|
|
27835
|
+
De = (Ft = ye.postgap) != null ? Ft : m, De !== 0 && (F = oe(["arraycolsep"], []), F.style.width = me(De), I.push(F));
|
|
27836
27836
|
}
|
|
27837
27837
|
}
|
|
27838
27838
|
}
|
|
27839
|
-
if (u = oe(["mtable"],
|
|
27839
|
+
if (u = oe(["mtable"], I), l.length > 0) {
|
|
27840
27840
|
for (var Dn = ra("hline", n, c), kn = ra("hdashline", n, c), ln = [{
|
|
27841
27841
|
type: "elem",
|
|
27842
27842
|
elem: u,
|
|
27843
27843
|
shift: 0
|
|
27844
27844
|
}]; l.length > 0; ) {
|
|
27845
|
-
var vn = l.pop(), ge = vn.pos -
|
|
27845
|
+
var vn = l.pop(), ge = vn.pos - V;
|
|
27846
27846
|
vn.isDashed ? ln.push({
|
|
27847
27847
|
type: "elem",
|
|
27848
27848
|
elem: kn,
|
|
@@ -27886,14 +27886,14 @@ var Yn = function(t, n) {
|
|
|
27886
27886
|
c.setAttribute("columnalign", p.trim()), /[sd]/.test(b) && c.setAttribute("columnlines", b.trim());
|
|
27887
27887
|
}
|
|
27888
27888
|
if (t.colSeparationType === "align") {
|
|
27889
|
-
for (var
|
|
27890
|
-
|
|
27891
|
-
c.setAttribute("columnspacing",
|
|
27889
|
+
for (var W = t.cols || [], H = "", C = 1; C < W.length; C++)
|
|
27890
|
+
H += C % 2 ? "0em " : "1em ";
|
|
27891
|
+
c.setAttribute("columnspacing", H.trim());
|
|
27892
27892
|
} else t.colSeparationType === "alignat" || t.colSeparationType === "gather" ? c.setAttribute("columnspacing", "0em") : t.colSeparationType === "small" ? c.setAttribute("columnspacing", "0.2778em") : t.colSeparationType === "CD" ? c.setAttribute("columnspacing", "0.5em") : c.setAttribute("columnspacing", "1em");
|
|
27893
27893
|
var D = "", X = t.hLinesBeforeRow;
|
|
27894
27894
|
m += X[0].length > 0 ? "left " : "", m += X[X.length - 1].length > 0 ? "right " : "";
|
|
27895
|
-
for (var
|
|
27896
|
-
D += X[
|
|
27895
|
+
for (var q = 1; q < X.length - 1; q++)
|
|
27896
|
+
D += X[q].length === 0 ? "none " : X[q][0] ? "dashed " : "solid ";
|
|
27897
27897
|
return /[sd]/.test(D) && c.setAttribute("rowlines", D.trim()), m !== "" && (c = new ce("menclose", [c]), c.setAttribute("notation", m.trim())), t.arraystretch && t.arraystretch < 1 && (c = new ce("mstyle", [c]), c.setAttribute("scriptlevel", "1")), c;
|
|
27898
27898
|
}, Ip = function(t, n) {
|
|
27899
27899
|
t.envName.includes("ed") || So(t);
|
|
@@ -27920,15 +27920,15 @@ var Yn = function(t, n) {
|
|
|
27920
27920
|
var p = !u;
|
|
27921
27921
|
o.body.forEach(function(v) {
|
|
27922
27922
|
for (var k = 1; k < v.length; k += 2) {
|
|
27923
|
-
var B = $e(v[k], "styling"),
|
|
27924
|
-
|
|
27923
|
+
var B = $e(v[k], "styling"), W = $e(B.body[0], "ordgroup");
|
|
27924
|
+
W.body.unshift(l);
|
|
27925
27925
|
}
|
|
27926
27926
|
if (p)
|
|
27927
27927
|
u < v.length && (u = v.length);
|
|
27928
27928
|
else {
|
|
27929
|
-
var
|
|
27930
|
-
if (s <
|
|
27931
|
-
throw new le("Too many math in a row: " + ("expected " + s + ", but got " +
|
|
27929
|
+
var H = v.length / 2;
|
|
27930
|
+
if (s < H)
|
|
27931
|
+
throw new le("Too many math in a row: " + ("expected " + s + ", but got " + H), v[0]);
|
|
27932
27932
|
}
|
|
27933
27933
|
});
|
|
27934
27934
|
for (var y = 0; y < u; ++y) {
|
|
@@ -28398,10 +28398,10 @@ var LT = (e, t) => {
|
|
|
28398
28398
|
});
|
|
28399
28399
|
}
|
|
28400
28400
|
i = t.havingStyle(n), E.height *= i.sizeMultiplier / t.sizeMultiplier, E.depth *= i.sizeMultiplier / t.sizeMultiplier;
|
|
28401
|
-
var
|
|
28402
|
-
n.size === Pe.DISPLAY.size ?
|
|
28403
|
-
var
|
|
28404
|
-
return e.leftDelim == null ?
|
|
28401
|
+
var W;
|
|
28402
|
+
n.size === Pe.DISPLAY.size ? W = t.fontMetrics().delim1 : n.size === Pe.SCRIPTSCRIPT.size ? W = t.havingStyle(Pe.SCRIPT).fontMetrics().delim2 : W = t.fontMetrics().delim2;
|
|
28403
|
+
var H, C;
|
|
28404
|
+
return e.leftDelim == null ? H = Wa(t, ["mopen"]) : H = Cu(e.leftDelim, W, !0, t.havingStyle(n), e.mode, ["mopen"]), e.continued ? C = oe([]) : e.rightDelim == null ? C = Wa(t, ["mclose"]) : C = Cu(e.rightDelim, W, !0, t.havingStyle(n), e.mode, ["mclose"]), oe(["mord"].concat(i.sizingClasses(t)), [H, oe(["mfrac"], [E]), C], t);
|
|
28405
28405
|
}, DT = (e, t) => {
|
|
28406
28406
|
var n = new ce("mfrac", [ct(e.numer, t), ct(e.denom, t)]);
|
|
28407
28407
|
if (!e.hasBarLine)
|
|
@@ -29983,10 +29983,10 @@ Ur({
|
|
|
29983
29983
|
var B = e.base && e.base.type === "op" && e.base.name && (e.base.name === "\\oiint" || e.base.name === "\\oiiint");
|
|
29984
29984
|
(o instanceof Cn || B) && (k = me(-o.italic));
|
|
29985
29985
|
}
|
|
29986
|
-
var
|
|
29986
|
+
var W;
|
|
29987
29987
|
if (s && u) {
|
|
29988
29988
|
c = Math.max(c, b, s.depth + 0.25 * l.xHeight), h = Math.max(h, l.sub2);
|
|
29989
|
-
var
|
|
29989
|
+
var H = l.defaultRuleThickness, C = 4 * H;
|
|
29990
29990
|
if (c - s.depth - (u.height - h) < C) {
|
|
29991
29991
|
h = C - (c - s.depth) + u.height;
|
|
29992
29992
|
var D = 0.8 * l.xHeight - (c - s.depth);
|
|
@@ -30004,25 +30004,25 @@ Ur({
|
|
|
30004
30004
|
shift: -c,
|
|
30005
30005
|
marginRight: v
|
|
30006
30006
|
}];
|
|
30007
|
-
|
|
30007
|
+
W = nt({
|
|
30008
30008
|
positionType: "individualShift",
|
|
30009
30009
|
children: X
|
|
30010
30010
|
});
|
|
30011
30011
|
} else if (u) {
|
|
30012
30012
|
h = Math.max(h, l.sub1, u.height - 0.8 * l.xHeight);
|
|
30013
|
-
var
|
|
30013
|
+
var q = [{
|
|
30014
30014
|
type: "elem",
|
|
30015
30015
|
elem: u,
|
|
30016
30016
|
marginLeft: k,
|
|
30017
30017
|
marginRight: v
|
|
30018
30018
|
}];
|
|
30019
|
-
|
|
30019
|
+
W = nt({
|
|
30020
30020
|
positionType: "shift",
|
|
30021
30021
|
positionData: h,
|
|
30022
|
-
children:
|
|
30022
|
+
children: q
|
|
30023
30023
|
});
|
|
30024
30024
|
} else if (s)
|
|
30025
|
-
c = Math.max(c, b, s.depth + 0.25 * l.xHeight),
|
|
30025
|
+
c = Math.max(c, b, s.depth + 0.25 * l.xHeight), W = nt({
|
|
30026
30026
|
positionType: "shift",
|
|
30027
30027
|
positionData: -c,
|
|
30028
30028
|
children: [{
|
|
@@ -30034,7 +30034,7 @@ Ur({
|
|
|
30034
30034
|
else
|
|
30035
30035
|
throw new Error("supsub must have either sup or sub.");
|
|
30036
30036
|
var ne = Tu(o, "right") || "mord";
|
|
30037
|
-
return oe([ne], [o, oe(["msupsub"], [
|
|
30037
|
+
return oe([ne], [o, oe(["msupsub"], [W])], t);
|
|
30038
30038
|
},
|
|
30039
30039
|
mathmlBuilder(e, t) {
|
|
30040
30040
|
var n = !1, r, a;
|
|
@@ -32786,22 +32786,22 @@ function mE(e, t, n) {
|
|
|
32786
32786
|
function E(k) {
|
|
32787
32787
|
return e.exit("mathFlow"), t(k);
|
|
32788
32788
|
}
|
|
32789
|
-
function v(k, B,
|
|
32790
|
-
let
|
|
32789
|
+
function v(k, B, W) {
|
|
32790
|
+
let H = 0;
|
|
32791
32791
|
return ot(
|
|
32792
32792
|
k,
|
|
32793
32793
|
C,
|
|
32794
32794
|
"linePrefix",
|
|
32795
32795
|
r.parser.constructs.disable.null.includes("codeIndented") ? void 0 : 4
|
|
32796
32796
|
);
|
|
32797
|
-
function C(
|
|
32798
|
-
return k.enter("mathFlowFence"), k.enter("mathFlowFenceSequence"), D(
|
|
32797
|
+
function C(q) {
|
|
32798
|
+
return k.enter("mathFlowFence"), k.enter("mathFlowFenceSequence"), D(q);
|
|
32799
32799
|
}
|
|
32800
|
-
function D(
|
|
32801
|
-
return
|
|
32800
|
+
function D(q) {
|
|
32801
|
+
return q === 36 ? (H++, k.consume(q), D) : H < o ? W(q) : (k.exit("mathFlowFenceSequence"), ot(k, X, "whitespace")(q));
|
|
32802
32802
|
}
|
|
32803
|
-
function X(
|
|
32804
|
-
return
|
|
32803
|
+
function X(q) {
|
|
32804
|
+
return q === null || Ir(q) ? (k.exit("mathFlowFence"), B(q)) : W(q);
|
|
32805
32805
|
}
|
|
32806
32806
|
}
|
|
32807
32807
|
}
|
|
@@ -33102,104 +33102,104 @@ function OE() {
|
|
|
33102
33102
|
(function(n, r) {
|
|
33103
33103
|
e.exports = r();
|
|
33104
33104
|
})(IE, (function() {
|
|
33105
|
-
var n = 1e3, r = 6e4, a = 36e5, i = "millisecond", o = "second", s = "minute", u = "hour", l = "day", c = "week", h = "month", m = "quarter", p = "year", y = "date", b = "Invalid Date", E = /^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/, v = /\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g, k = { name: "en", weekdays: "Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"), months: "January_February_March_April_May_June_July_August_September_October_November_December".split("_"), ordinal: function(
|
|
33106
|
-
var F = ["th", "st", "nd", "rd"], Y =
|
|
33107
|
-
return "[" +
|
|
33108
|
-
} }, B = function(
|
|
33109
|
-
var J = String(
|
|
33110
|
-
return !J || J.length >= F ?
|
|
33111
|
-
},
|
|
33112
|
-
var F = -
|
|
33113
|
-
return (F <= 0 ? "+" : "-") + B(J, 2, "0") + ":" + B(
|
|
33114
|
-
}, m: function
|
|
33115
|
-
if (F.date() < Y.date()) return -
|
|
33116
|
-
var J = 12 * (Y.year() - F.year()) + (Y.month() - F.month()),
|
|
33117
|
-
return +(-(J + (Y -
|
|
33118
|
-
}, a: function(
|
|
33119
|
-
return
|
|
33120
|
-
}, p: function(
|
|
33121
|
-
return { M: h, y: p, w: c, d: l, D: y, h: u, m: s, s: o, ms: i, Q: m }[
|
|
33122
|
-
}, u: function(
|
|
33123
|
-
return
|
|
33124
|
-
} },
|
|
33125
|
-
C[
|
|
33126
|
-
var D = "$isDayjsObject", X = function(
|
|
33127
|
-
return
|
|
33128
|
-
},
|
|
33129
|
-
var
|
|
33130
|
-
if (!F) return
|
|
33105
|
+
var n = 1e3, r = 6e4, a = 36e5, i = "millisecond", o = "second", s = "minute", u = "hour", l = "day", c = "week", h = "month", m = "quarter", p = "year", y = "date", b = "Invalid Date", E = /^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/, v = /\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g, k = { name: "en", weekdays: "Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"), months: "January_February_March_April_May_June_July_August_September_October_November_December".split("_"), ordinal: function(I) {
|
|
33106
|
+
var F = ["th", "st", "nd", "rd"], Y = I % 100;
|
|
33107
|
+
return "[" + I + (F[(Y - 20) % 10] || F[Y] || F[0]) + "]";
|
|
33108
|
+
} }, B = function(I, F, Y) {
|
|
33109
|
+
var J = String(I);
|
|
33110
|
+
return !J || J.length >= F ? I : "" + Array(F + 1 - J.length).join(Y) + I;
|
|
33111
|
+
}, W = { s: B, z: function(I) {
|
|
33112
|
+
var F = -I.utcOffset(), Y = Math.abs(F), J = Math.floor(Y / 60), G = Y % 60;
|
|
33113
|
+
return (F <= 0 ? "+" : "-") + B(J, 2, "0") + ":" + B(G, 2, "0");
|
|
33114
|
+
}, m: function I(F, Y) {
|
|
33115
|
+
if (F.date() < Y.date()) return -I(Y, F);
|
|
33116
|
+
var J = 12 * (Y.year() - F.year()) + (Y.month() - F.month()), G = F.clone().add(J, h), Z = Y - G < 0, A = F.clone().add(J + (Z ? -1 : 1), h);
|
|
33117
|
+
return +(-(J + (Y - G) / (Z ? G - A : A - G)) || 0);
|
|
33118
|
+
}, a: function(I) {
|
|
33119
|
+
return I < 0 ? Math.ceil(I) || 0 : Math.floor(I);
|
|
33120
|
+
}, p: function(I) {
|
|
33121
|
+
return { M: h, y: p, w: c, d: l, D: y, h: u, m: s, s: o, ms: i, Q: m }[I] || String(I || "").toLowerCase().replace(/s$/, "");
|
|
33122
|
+
}, u: function(I) {
|
|
33123
|
+
return I === void 0;
|
|
33124
|
+
} }, H = "en", C = {};
|
|
33125
|
+
C[H] = k;
|
|
33126
|
+
var D = "$isDayjsObject", X = function(I) {
|
|
33127
|
+
return I instanceof V || !(!I || !I[D]);
|
|
33128
|
+
}, q = function I(F, Y, J) {
|
|
33129
|
+
var G;
|
|
33130
|
+
if (!F) return H;
|
|
33131
33131
|
if (typeof F == "string") {
|
|
33132
33132
|
var Z = F.toLowerCase();
|
|
33133
|
-
C[Z] && (
|
|
33133
|
+
C[Z] && (G = Z), Y && (C[Z] = Y, G = Z);
|
|
33134
33134
|
var A = F.split("-");
|
|
33135
|
-
if (!
|
|
33135
|
+
if (!G && A.length > 1) return I(A[0]);
|
|
33136
33136
|
} else {
|
|
33137
33137
|
var se = F.name;
|
|
33138
|
-
C[se] = F,
|
|
33138
|
+
C[se] = F, G = se;
|
|
33139
33139
|
}
|
|
33140
|
-
return !J &&
|
|
33141
|
-
}, ne = function(
|
|
33142
|
-
if (X(
|
|
33140
|
+
return !J && G && (H = G), G || !J && H;
|
|
33141
|
+
}, ne = function(I, F) {
|
|
33142
|
+
if (X(I)) return I.clone();
|
|
33143
33143
|
var Y = typeof F == "object" ? F : {};
|
|
33144
|
-
return Y.date =
|
|
33145
|
-
},
|
|
33146
|
-
|
|
33147
|
-
return ne(
|
|
33144
|
+
return Y.date = I, Y.args = arguments, new V(Y);
|
|
33145
|
+
}, z = W;
|
|
33146
|
+
z.l = q, z.i = X, z.w = function(I, F) {
|
|
33147
|
+
return ne(I, { locale: F.$L, utc: F.$u, x: F.$x, $offset: F.$offset });
|
|
33148
33148
|
};
|
|
33149
|
-
var
|
|
33150
|
-
function
|
|
33151
|
-
this.$L =
|
|
33149
|
+
var V = (function() {
|
|
33150
|
+
function I(Y) {
|
|
33151
|
+
this.$L = q(Y.locale, null, !0), this.parse(Y), this.$x = this.$x || Y.x || {}, this[D] = !0;
|
|
33152
33152
|
}
|
|
33153
|
-
var F =
|
|
33153
|
+
var F = I.prototype;
|
|
33154
33154
|
return F.parse = function(Y) {
|
|
33155
33155
|
this.$d = (function(J) {
|
|
33156
|
-
var
|
|
33157
|
-
if (
|
|
33158
|
-
if (
|
|
33159
|
-
if (
|
|
33160
|
-
if (typeof
|
|
33161
|
-
var A =
|
|
33156
|
+
var G = J.date, Z = J.utc;
|
|
33157
|
+
if (G === null) return /* @__PURE__ */ new Date(NaN);
|
|
33158
|
+
if (z.u(G)) return /* @__PURE__ */ new Date();
|
|
33159
|
+
if (G instanceof Date) return new Date(G);
|
|
33160
|
+
if (typeof G == "string" && !/Z$/i.test(G)) {
|
|
33161
|
+
var A = G.match(E);
|
|
33162
33162
|
if (A) {
|
|
33163
33163
|
var se = A[2] - 1 || 0, ye = (A[7] || "0").substring(0, 3);
|
|
33164
33164
|
return Z ? new Date(Date.UTC(A[1], se, A[3] || 1, A[4] || 0, A[5] || 0, A[6] || 0, ye)) : new Date(A[1], se, A[3] || 1, A[4] || 0, A[5] || 0, A[6] || 0, ye);
|
|
33165
33165
|
}
|
|
33166
33166
|
}
|
|
33167
|
-
return new Date(
|
|
33167
|
+
return new Date(G);
|
|
33168
33168
|
})(Y), this.init();
|
|
33169
33169
|
}, F.init = function() {
|
|
33170
33170
|
var Y = this.$d;
|
|
33171
33171
|
this.$y = Y.getFullYear(), this.$M = Y.getMonth(), this.$D = Y.getDate(), this.$W = Y.getDay(), this.$H = Y.getHours(), this.$m = Y.getMinutes(), this.$s = Y.getSeconds(), this.$ms = Y.getMilliseconds();
|
|
33172
33172
|
}, F.$utils = function() {
|
|
33173
|
-
return
|
|
33173
|
+
return z;
|
|
33174
33174
|
}, F.isValid = function() {
|
|
33175
33175
|
return this.$d.toString() !== b;
|
|
33176
33176
|
}, F.isSame = function(Y, J) {
|
|
33177
|
-
var
|
|
33178
|
-
return this.startOf(J) <=
|
|
33177
|
+
var G = ne(Y);
|
|
33178
|
+
return this.startOf(J) <= G && G <= this.endOf(J);
|
|
33179
33179
|
}, F.isAfter = function(Y, J) {
|
|
33180
33180
|
return ne(Y) < this.startOf(J);
|
|
33181
33181
|
}, F.isBefore = function(Y, J) {
|
|
33182
33182
|
return this.endOf(J) < ne(Y);
|
|
33183
|
-
}, F.$g = function(Y, J,
|
|
33184
|
-
return
|
|
33183
|
+
}, F.$g = function(Y, J, G) {
|
|
33184
|
+
return z.u(Y) ? this[J] : this.set(G, Y);
|
|
33185
33185
|
}, F.unix = function() {
|
|
33186
33186
|
return Math.floor(this.valueOf() / 1e3);
|
|
33187
33187
|
}, F.valueOf = function() {
|
|
33188
33188
|
return this.$d.getTime();
|
|
33189
33189
|
}, F.startOf = function(Y, J) {
|
|
33190
|
-
var
|
|
33191
|
-
var dt =
|
|
33190
|
+
var G = this, Z = !!z.u(J) || J, A = z.p(Y), se = function(Qe, Ye) {
|
|
33191
|
+
var dt = z.w(G.$u ? Date.UTC(G.$y, Ye, Qe) : new Date(G.$y, Ye, Qe), G);
|
|
33192
33192
|
return Z ? dt : dt.endOf(l);
|
|
33193
33193
|
}, ye = function(Qe, Ye) {
|
|
33194
|
-
return
|
|
33195
|
-
},
|
|
33194
|
+
return z.w(G.toDate()[Qe].apply(G.toDate("s"), (Z ? [0, 0, 0, 0] : [23, 59, 59, 999]).slice(Ye)), G);
|
|
33195
|
+
}, O = this.$W, Ee = this.$M, Ae = this.$D, Ne = "set" + (this.$u ? "UTC" : "");
|
|
33196
33196
|
switch (A) {
|
|
33197
33197
|
case p:
|
|
33198
33198
|
return Z ? se(1, 0) : se(31, 11);
|
|
33199
33199
|
case h:
|
|
33200
33200
|
return Z ? se(1, Ee) : se(0, Ee + 1);
|
|
33201
33201
|
case c:
|
|
33202
|
-
var De = this.$locale().weekStart || 0, Ge = (
|
|
33202
|
+
var De = this.$locale().weekStart || 0, Ge = (O < De ? O + 7 : O) - De;
|
|
33203
33203
|
return se(Z ? Ae - Ge : Ae + (6 - Ge), Ee);
|
|
33204
33204
|
case l:
|
|
33205
33205
|
case y:
|
|
@@ -33216,38 +33216,38 @@ function OE() {
|
|
|
33216
33216
|
}, F.endOf = function(Y) {
|
|
33217
33217
|
return this.startOf(Y, !1);
|
|
33218
33218
|
}, F.$set = function(Y, J) {
|
|
33219
|
-
var
|
|
33219
|
+
var G, Z = z.p(Y), A = "set" + (this.$u ? "UTC" : ""), se = (G = {}, G[l] = A + "Date", G[y] = A + "Date", G[h] = A + "Month", G[p] = A + "FullYear", G[u] = A + "Hours", G[s] = A + "Minutes", G[o] = A + "Seconds", G[i] = A + "Milliseconds", G)[Z], ye = Z === l ? this.$D + (J - this.$W) : J;
|
|
33220
33220
|
if (Z === h || Z === p) {
|
|
33221
|
-
var
|
|
33222
|
-
|
|
33221
|
+
var O = this.clone().set(y, 1);
|
|
33222
|
+
O.$d[se](ye), O.init(), this.$d = O.set(y, Math.min(this.$D, O.daysInMonth())).$d;
|
|
33223
33223
|
} else se && this.$d[se](ye);
|
|
33224
33224
|
return this.init(), this;
|
|
33225
33225
|
}, F.set = function(Y, J) {
|
|
33226
33226
|
return this.clone().$set(Y, J);
|
|
33227
33227
|
}, F.get = function(Y) {
|
|
33228
|
-
return this[
|
|
33228
|
+
return this[z.p(Y)]();
|
|
33229
33229
|
}, F.add = function(Y, J) {
|
|
33230
|
-
var
|
|
33230
|
+
var G, Z = this;
|
|
33231
33231
|
Y = Number(Y);
|
|
33232
|
-
var A =
|
|
33232
|
+
var A = z.p(J), se = function(Ee) {
|
|
33233
33233
|
var Ae = ne(Z);
|
|
33234
|
-
return
|
|
33234
|
+
return z.w(Ae.date(Ae.date() + Math.round(Ee * Y)), Z);
|
|
33235
33235
|
};
|
|
33236
33236
|
if (A === h) return this.set(h, this.$M + Y);
|
|
33237
33237
|
if (A === p) return this.set(p, this.$y + Y);
|
|
33238
33238
|
if (A === l) return se(1);
|
|
33239
33239
|
if (A === c) return se(7);
|
|
33240
|
-
var ye = (
|
|
33241
|
-
return
|
|
33240
|
+
var ye = (G = {}, G[s] = r, G[u] = a, G[o] = n, G)[A] || 1, O = this.$d.getTime() + Y * ye;
|
|
33241
|
+
return z.w(O, this);
|
|
33242
33242
|
}, F.subtract = function(Y, J) {
|
|
33243
33243
|
return this.add(-1 * Y, J);
|
|
33244
33244
|
}, F.format = function(Y) {
|
|
33245
|
-
var J = this,
|
|
33246
|
-
if (!this.isValid()) return
|
|
33247
|
-
var Z = Y || "YYYY-MM-DDTHH:mm:ssZ", A =
|
|
33245
|
+
var J = this, G = this.$locale();
|
|
33246
|
+
if (!this.isValid()) return G.invalidDate || b;
|
|
33247
|
+
var Z = Y || "YYYY-MM-DDTHH:mm:ssZ", A = z.z(this), se = this.$H, ye = this.$m, O = this.$M, Ee = G.weekdays, Ae = G.months, Ne = G.meridiem, De = function(Ye, dt, ht, Ft) {
|
|
33248
33248
|
return Ye && (Ye[dt] || Ye(J, Z)) || ht[dt].slice(0, Ft);
|
|
33249
33249
|
}, Ge = function(Ye) {
|
|
33250
|
-
return
|
|
33250
|
+
return z.s(se % 12 || 12, Ye, "0");
|
|
33251
33251
|
}, Qe = Ne || function(Ye, dt, ht) {
|
|
33252
33252
|
var Ft = Ye < 12 ? "AM" : "PM";
|
|
33253
33253
|
return ht ? Ft.toLowerCase() : Ft;
|
|
@@ -33258,31 +33258,31 @@ function OE() {
|
|
|
33258
33258
|
case "YY":
|
|
33259
33259
|
return String(J.$y).slice(-2);
|
|
33260
33260
|
case "YYYY":
|
|
33261
|
-
return
|
|
33261
|
+
return z.s(J.$y, 4, "0");
|
|
33262
33262
|
case "M":
|
|
33263
|
-
return
|
|
33263
|
+
return O + 1;
|
|
33264
33264
|
case "MM":
|
|
33265
|
-
return
|
|
33265
|
+
return z.s(O + 1, 2, "0");
|
|
33266
33266
|
case "MMM":
|
|
33267
|
-
return De(
|
|
33267
|
+
return De(G.monthsShort, O, Ae, 3);
|
|
33268
33268
|
case "MMMM":
|
|
33269
|
-
return De(Ae,
|
|
33269
|
+
return De(Ae, O);
|
|
33270
33270
|
case "D":
|
|
33271
33271
|
return J.$D;
|
|
33272
33272
|
case "DD":
|
|
33273
|
-
return
|
|
33273
|
+
return z.s(J.$D, 2, "0");
|
|
33274
33274
|
case "d":
|
|
33275
33275
|
return String(J.$W);
|
|
33276
33276
|
case "dd":
|
|
33277
|
-
return De(
|
|
33277
|
+
return De(G.weekdaysMin, J.$W, Ee, 2);
|
|
33278
33278
|
case "ddd":
|
|
33279
|
-
return De(
|
|
33279
|
+
return De(G.weekdaysShort, J.$W, Ee, 3);
|
|
33280
33280
|
case "dddd":
|
|
33281
33281
|
return Ee[J.$W];
|
|
33282
33282
|
case "H":
|
|
33283
33283
|
return String(se);
|
|
33284
33284
|
case "HH":
|
|
33285
|
-
return
|
|
33285
|
+
return z.s(se, 2, "0");
|
|
33286
33286
|
case "h":
|
|
33287
33287
|
return Ge(1);
|
|
33288
33288
|
case "hh":
|
|
@@ -33294,13 +33294,13 @@ function OE() {
|
|
|
33294
33294
|
case "m":
|
|
33295
33295
|
return String(ye);
|
|
33296
33296
|
case "mm":
|
|
33297
|
-
return
|
|
33297
|
+
return z.s(ye, 2, "0");
|
|
33298
33298
|
case "s":
|
|
33299
33299
|
return String(J.$s);
|
|
33300
33300
|
case "ss":
|
|
33301
|
-
return
|
|
33301
|
+
return z.s(J.$s, 2, "0");
|
|
33302
33302
|
case "SSS":
|
|
33303
|
-
return
|
|
33303
|
+
return z.s(J.$ms, 3, "0");
|
|
33304
33304
|
case "Z":
|
|
33305
33305
|
return A;
|
|
33306
33306
|
}
|
|
@@ -33309,9 +33309,9 @@ function OE() {
|
|
|
33309
33309
|
}));
|
|
33310
33310
|
}, F.utcOffset = function() {
|
|
33311
33311
|
return 15 * -Math.round(this.$d.getTimezoneOffset() / 15);
|
|
33312
|
-
}, F.diff = function(Y, J,
|
|
33313
|
-
var Z, A = this, se =
|
|
33314
|
-
return
|
|
33312
|
+
}, F.diff = function(Y, J, G) {
|
|
33313
|
+
var Z, A = this, se = z.p(J), ye = ne(Y), O = (ye.utcOffset() - this.utcOffset()) * r, Ee = this - ye, Ae = function() {
|
|
33314
|
+
return z.m(A, ye);
|
|
33315
33315
|
};
|
|
33316
33316
|
switch (se) {
|
|
33317
33317
|
case p:
|
|
@@ -33324,10 +33324,10 @@ function OE() {
|
|
|
33324
33324
|
Z = Ae() / 3;
|
|
33325
33325
|
break;
|
|
33326
33326
|
case c:
|
|
33327
|
-
Z = (Ee -
|
|
33327
|
+
Z = (Ee - O) / 6048e5;
|
|
33328
33328
|
break;
|
|
33329
33329
|
case l:
|
|
33330
|
-
Z = (Ee -
|
|
33330
|
+
Z = (Ee - O) / 864e5;
|
|
33331
33331
|
break;
|
|
33332
33332
|
case u:
|
|
33333
33333
|
Z = Ee / a;
|
|
@@ -33341,17 +33341,17 @@ function OE() {
|
|
|
33341
33341
|
default:
|
|
33342
33342
|
Z = Ee;
|
|
33343
33343
|
}
|
|
33344
|
-
return
|
|
33344
|
+
return G ? Z : z.a(Z);
|
|
33345
33345
|
}, F.daysInMonth = function() {
|
|
33346
33346
|
return this.endOf(h).$D;
|
|
33347
33347
|
}, F.$locale = function() {
|
|
33348
33348
|
return C[this.$L];
|
|
33349
33349
|
}, F.locale = function(Y, J) {
|
|
33350
33350
|
if (!Y) return this.$L;
|
|
33351
|
-
var
|
|
33352
|
-
return Z && (
|
|
33351
|
+
var G = this.clone(), Z = q(Y, J, !0);
|
|
33352
|
+
return Z && (G.$L = Z), G;
|
|
33353
33353
|
}, F.clone = function() {
|
|
33354
|
-
return
|
|
33354
|
+
return z.w(this.$d, this);
|
|
33355
33355
|
}, F.toDate = function() {
|
|
33356
33356
|
return new Date(this.valueOf());
|
|
33357
33357
|
}, F.toJSON = function() {
|
|
@@ -33360,17 +33360,17 @@ function OE() {
|
|
|
33360
33360
|
return this.$d.toISOString();
|
|
33361
33361
|
}, F.toString = function() {
|
|
33362
33362
|
return this.$d.toUTCString();
|
|
33363
|
-
},
|
|
33364
|
-
})(),
|
|
33365
|
-
return ne.prototype =
|
|
33366
|
-
|
|
33367
|
-
return this.$g(F,
|
|
33363
|
+
}, I;
|
|
33364
|
+
})(), U = V.prototype;
|
|
33365
|
+
return ne.prototype = U, [["$ms", i], ["$s", o], ["$m", s], ["$H", u], ["$W", l], ["$M", h], ["$y", p], ["$D", y]].forEach((function(I) {
|
|
33366
|
+
U[I[1]] = function(F) {
|
|
33367
|
+
return this.$g(F, I[0], I[1]);
|
|
33368
33368
|
};
|
|
33369
|
-
})), ne.extend = function(
|
|
33370
|
-
return
|
|
33371
|
-
}, ne.locale =
|
|
33372
|
-
return ne(1e3 *
|
|
33373
|
-
}, ne.en = C[
|
|
33369
|
+
})), ne.extend = function(I, F) {
|
|
33370
|
+
return I.$i || (I(F, V, ne), I.$i = !0), ne;
|
|
33371
|
+
}, ne.locale = q, ne.isDayjs = X, ne.unix = function(I) {
|
|
33372
|
+
return ne(1e3 * I);
|
|
33373
|
+
}, ne.en = C[H], ne.Ls = C, ne.p = {}, ne;
|
|
33374
33374
|
}));
|
|
33375
33375
|
})(Bi)), Bi.exports;
|
|
33376
33376
|
}
|
|
@@ -33418,7 +33418,7 @@ function _l({
|
|
|
33418
33418
|
text: o = null,
|
|
33419
33419
|
userTrackingName: s = "clicked"
|
|
33420
33420
|
}) {
|
|
33421
|
-
const [u, l] = ve(!0), { primaryColor: c, id: h, conversationScreen: m } =
|
|
33421
|
+
const [u, l] = ve(!0), { primaryColor: c, id: h, conversationScreen: m } = _e(Ct), p = Qt(
|
|
33422
33422
|
(E) => {
|
|
33423
33423
|
E?.data?.who === "customer" && (!window?.OnetrustActiveGroups || window?.OnetrustActiveGroups?.includes("C0003")) && Zt.set(`${h}-live-chat-open`, 1, {
|
|
33424
33424
|
expires: 1,
|
|
@@ -33749,14 +33749,14 @@ function eo({
|
|
|
33749
33749
|
}) {
|
|
33750
33750
|
const [u, l] = ve(!1), [c, h] = ve(!1), m = Ze(null), [p] = ve(
|
|
33751
33751
|
() => Math.random().toString(36).slice(2, 10)
|
|
33752
|
-
), y = `${YE}-${t ?? "no-conversation-id"}-${p}`, b = !n && a, E = b && c, v = Qp(e), k = u ? "Copied!" : v.tooltip, B = e === "message" ? "Message Copied!" : "Response Copied!",
|
|
33752
|
+
), y = `${YE}-${t ?? "no-conversation-id"}-${p}`, b = !n && a, E = b && c, v = Qp(e), k = u ? "Copied!" : v.tooltip, B = e === "message" ? "Message Copied!" : "Response Copied!", W = VE({ disabled: n, isCopied: u, copyKind: e });
|
|
33753
33753
|
Oe(
|
|
33754
33754
|
() => () => {
|
|
33755
33755
|
m.current && window.clearTimeout(m.current);
|
|
33756
33756
|
},
|
|
33757
33757
|
[]
|
|
33758
33758
|
);
|
|
33759
|
-
const
|
|
33759
|
+
const H = () => {
|
|
33760
33760
|
m.current && window.clearTimeout(m.current), m.current = window.setTimeout(() => {
|
|
33761
33761
|
l(!1), h(!1);
|
|
33762
33762
|
}, $E);
|
|
@@ -33775,7 +33775,7 @@ function eo({
|
|
|
33775
33775
|
clientId: s,
|
|
33776
33776
|
conversationHistoryId: X
|
|
33777
33777
|
}
|
|
33778
|
-
}), l(!0), h(!0),
|
|
33778
|
+
}), l(!0), h(!0), H());
|
|
33779
33779
|
};
|
|
33780
33780
|
return /* @__PURE__ */ S.jsx(
|
|
33781
33781
|
"div",
|
|
@@ -33805,7 +33805,7 @@ function eo({
|
|
|
33805
33805
|
type: "button",
|
|
33806
33806
|
className: "xpert-chatbot-response-copy__button",
|
|
33807
33807
|
"aria-describedby": E ? y : void 0,
|
|
33808
|
-
"aria-label":
|
|
33808
|
+
"aria-label": W,
|
|
33809
33809
|
"aria-disabled": n || !a,
|
|
33810
33810
|
"aria-hidden": !a,
|
|
33811
33811
|
"data-copied": u,
|
|
@@ -33827,7 +33827,7 @@ function eo({
|
|
|
33827
33827
|
{
|
|
33828
33828
|
id: y,
|
|
33829
33829
|
role: "tooltip",
|
|
33830
|
-
className: `xpert-chatbot-response-copy__tooltip${e === "message" ? " xpert-chatbot-response-copy__tooltip--left" : ""}`,
|
|
33830
|
+
className: `xpert-chatbot-response-copy__tooltip${e === "message" ? " xpert-chatbot-response-copy__tooltip--below-left" : ""}`,
|
|
33831
33831
|
"aria-hidden": !E,
|
|
33832
33832
|
"data-visible": E,
|
|
33833
33833
|
children: k
|
|
@@ -34002,53 +34002,53 @@ const WE = (e) => ({
|
|
|
34002
34002
|
primaryColor: l,
|
|
34003
34003
|
conversationScreen: c,
|
|
34004
34004
|
id: h
|
|
34005
|
-
} =
|
|
34006
|
-
content:
|
|
34007
|
-
conversationHistoryId:
|
|
34008
|
-
liveAgent:
|
|
34009
|
-
role:
|
|
34010
|
-
timestamp:
|
|
34011
|
-
} = t ?? {},
|
|
34005
|
+
} = _e(Ct), { isMobile: m = !1 } = _e(Ht) ?? {}, {
|
|
34006
|
+
content: p,
|
|
34007
|
+
conversationHistoryId: y,
|
|
34008
|
+
liveAgent: b,
|
|
34009
|
+
role: E = Ie.ASSISTANT,
|
|
34010
|
+
timestamp: v
|
|
34011
|
+
} = t ?? {}, k = Ze(null), [B, W] = ve(!1), H = E === Ie.TOOL ? Ie.ASSISTANT : E, C = b || u === f1.ESCALATE_TO_AN_AGENT, D = !C && !!p, X = r && D && [Ie.AGENT, Ie.ASSISTANT].includes(H), q = r && D && H === Ie.USER, ne = Yt(
|
|
34012
34012
|
() => ZE(
|
|
34013
34013
|
l,
|
|
34014
34014
|
c?.userMessageBubble?.style
|
|
34015
34015
|
),
|
|
34016
34016
|
[l, c?.userMessageBubble?.style]
|
|
34017
|
-
),
|
|
34018
|
-
() => WE(u)(
|
|
34019
|
-
[
|
|
34017
|
+
), z = Yt(
|
|
34018
|
+
() => WE(u)(p),
|
|
34019
|
+
[p, u]
|
|
34020
34020
|
);
|
|
34021
34021
|
Oe(() => {
|
|
34022
34022
|
if (!a) return;
|
|
34023
|
-
const
|
|
34024
|
-
if (!
|
|
34025
|
-
const
|
|
34023
|
+
const U = n?.current;
|
|
34024
|
+
if (!U) return;
|
|
34025
|
+
const I = U.closest(
|
|
34026
34026
|
'[data-xpert-chat-scroll-container="true"]'
|
|
34027
34027
|
);
|
|
34028
|
-
if (
|
|
34029
|
-
const { scrollTop:
|
|
34030
|
-
if (!(
|
|
34031
|
-
|
|
34032
|
-
top:
|
|
34028
|
+
if (I) {
|
|
34029
|
+
const { scrollTop: F, scrollHeight: Y, clientHeight: J } = I;
|
|
34030
|
+
if (!(Y - (F + J) <= 24) || typeof I.scrollTo != "function") return;
|
|
34031
|
+
I.scrollTo({
|
|
34032
|
+
top: I.scrollHeight,
|
|
34033
34033
|
behavior: "auto"
|
|
34034
34034
|
});
|
|
34035
34035
|
return;
|
|
34036
34036
|
}
|
|
34037
|
-
typeof
|
|
34038
|
-
}, [a, n,
|
|
34039
|
-
const
|
|
34040
|
-
if (!
|
|
34041
|
-
if (
|
|
34042
|
-
return
|
|
34043
|
-
const
|
|
34037
|
+
typeof U.scrollIntoView == "function" && U.scrollIntoView({ block: "end" });
|
|
34038
|
+
}, [a, n, z]);
|
|
34039
|
+
const V = Yt(() => {
|
|
34040
|
+
if (!D) return null;
|
|
34041
|
+
if (H === Ie.USER)
|
|
34042
|
+
return z;
|
|
34043
|
+
const U = KE(z), I = H === Ie.AGENT || H === Ie.ASSISTANT;
|
|
34044
34044
|
return /* @__PURE__ */ S.jsx(
|
|
34045
34045
|
Vu,
|
|
34046
34046
|
{
|
|
34047
34047
|
components: ex(
|
|
34048
34048
|
i,
|
|
34049
|
-
|
|
34049
|
+
ne[H].bubbleStyle,
|
|
34050
34050
|
h,
|
|
34051
|
-
|
|
34051
|
+
I
|
|
34052
34052
|
),
|
|
34053
34053
|
linkTarget: "_blank",
|
|
34054
34054
|
remarkPlugins: [[kE, {}]],
|
|
@@ -34062,21 +34062,21 @@ const WE = (e) => ({
|
|
|
34062
34062
|
]
|
|
34063
34063
|
],
|
|
34064
34064
|
transformLinkUri: Xp,
|
|
34065
|
-
children:
|
|
34065
|
+
children: U
|
|
34066
34066
|
}
|
|
34067
34067
|
);
|
|
34068
34068
|
}, [
|
|
34069
|
-
|
|
34070
|
-
ne,
|
|
34071
|
-
i,
|
|
34069
|
+
D,
|
|
34072
34070
|
z,
|
|
34073
|
-
|
|
34071
|
+
i,
|
|
34072
|
+
ne,
|
|
34073
|
+
H,
|
|
34074
34074
|
h
|
|
34075
34075
|
]);
|
|
34076
34076
|
return /* @__PURE__ */ S.jsxs(
|
|
34077
34077
|
"section",
|
|
34078
34078
|
{
|
|
34079
|
-
"aria-label":
|
|
34079
|
+
"aria-label": ne[H].sectionAriaLabel,
|
|
34080
34080
|
className: "xpert-chatbot-popup__bubble--group",
|
|
34081
34081
|
ref: n,
|
|
34082
34082
|
children: [
|
|
@@ -34084,9 +34084,9 @@ const WE = (e) => ({
|
|
|
34084
34084
|
"div",
|
|
34085
34085
|
{
|
|
34086
34086
|
className: "xpert-chatbot-popup__bubble--group-inner",
|
|
34087
|
-
style:
|
|
34087
|
+
style: ne[H].innerStyle,
|
|
34088
34088
|
children: [
|
|
34089
|
-
|
|
34089
|
+
H === Ie.AGENT && /* @__PURE__ */ S.jsx(
|
|
34090
34090
|
Au,
|
|
34091
34091
|
{
|
|
34092
34092
|
alignSelf: "flex-end",
|
|
@@ -34099,26 +34099,26 @@ const WE = (e) => ({
|
|
|
34099
34099
|
{
|
|
34100
34100
|
className: "xpert-chatbot-popup__bubble--content",
|
|
34101
34101
|
onMouseEnter: () => {
|
|
34102
|
-
|
|
34102
|
+
H === Ie.USER && W(!0);
|
|
34103
34103
|
},
|
|
34104
34104
|
onMouseLeave: () => {
|
|
34105
|
-
|
|
34105
|
+
H === Ie.USER && W(!1);
|
|
34106
34106
|
},
|
|
34107
34107
|
children: [
|
|
34108
34108
|
/* @__PURE__ */ S.jsxs(
|
|
34109
34109
|
"div",
|
|
34110
34110
|
{
|
|
34111
|
-
className: `xpert-chatbot-popup__bubble--message-row${
|
|
34111
|
+
className: `xpert-chatbot-popup__bubble--message-row${H === Ie.USER ? " xpert-chatbot-popup__bubble--message-row-user" : ""}`,
|
|
34112
34112
|
children: [
|
|
34113
34113
|
/* @__PURE__ */ S.jsxs(
|
|
34114
34114
|
"div",
|
|
34115
34115
|
{
|
|
34116
34116
|
"data-testid": "message-container",
|
|
34117
|
-
className:
|
|
34118
|
-
style:
|
|
34117
|
+
className: ne[H].bubbleClassName,
|
|
34118
|
+
style: ne[H].bubbleStyle,
|
|
34119
34119
|
children: [
|
|
34120
|
-
/* @__PURE__ */ S.jsx("div", { ref:
|
|
34121
|
-
|
|
34120
|
+
/* @__PURE__ */ S.jsx("div", { ref: k, children: V }),
|
|
34121
|
+
C && /* @__PURE__ */ S.jsxs(S.Fragment, { children: [
|
|
34122
34122
|
/* @__PURE__ */ S.jsx("div", { children: QE }),
|
|
34123
34123
|
/* @__PURE__ */ S.jsx(
|
|
34124
34124
|
_l,
|
|
@@ -34136,7 +34136,7 @@ const WE = (e) => ({
|
|
|
34136
34136
|
]
|
|
34137
34137
|
}
|
|
34138
34138
|
),
|
|
34139
|
-
|
|
34139
|
+
H === Ie.USER && /* @__PURE__ */ S.jsx(
|
|
34140
34140
|
Au,
|
|
34141
34141
|
{
|
|
34142
34142
|
alignSelf: "flex-end",
|
|
@@ -34147,27 +34147,27 @@ const WE = (e) => ({
|
|
|
34147
34147
|
]
|
|
34148
34148
|
}
|
|
34149
34149
|
),
|
|
34150
|
-
|
|
34150
|
+
X && /* @__PURE__ */ S.jsx(
|
|
34151
34151
|
eo,
|
|
34152
34152
|
{
|
|
34153
34153
|
clientId: h,
|
|
34154
34154
|
copyKind: "response",
|
|
34155
|
-
conversationHistoryId:
|
|
34155
|
+
conversationHistoryId: y,
|
|
34156
34156
|
disabled: a,
|
|
34157
|
-
getCopyText: () =>
|
|
34157
|
+
getCopyText: () => z || "",
|
|
34158
34158
|
isTestUser: e,
|
|
34159
34159
|
submitEvent: s
|
|
34160
34160
|
}
|
|
34161
34161
|
),
|
|
34162
|
-
|
|
34162
|
+
q && /* @__PURE__ */ S.jsx(
|
|
34163
34163
|
eo,
|
|
34164
34164
|
{
|
|
34165
34165
|
clientId: h,
|
|
34166
34166
|
copyKind: "message",
|
|
34167
|
-
conversationHistoryId:
|
|
34167
|
+
conversationHistoryId: y,
|
|
34168
34168
|
disabled: a,
|
|
34169
|
-
getCopyText: () =>
|
|
34170
|
-
isVisible:
|
|
34169
|
+
getCopyText: () => z || "",
|
|
34170
|
+
isVisible: m || B,
|
|
34171
34171
|
isTestUser: e,
|
|
34172
34172
|
submitEvent: s
|
|
34173
34173
|
}
|
|
@@ -34178,7 +34178,7 @@ const WE = (e) => ({
|
|
|
34178
34178
|
]
|
|
34179
34179
|
}
|
|
34180
34180
|
),
|
|
34181
|
-
|
|
34181
|
+
v && /* @__PURE__ */ S.jsx("div", { className: "xpert-chatbot-popup__bubble--timestamp", children: RE(v).format("hh:mm a") })
|
|
34182
34182
|
]
|
|
34183
34183
|
}
|
|
34184
34184
|
);
|
|
@@ -34302,7 +34302,7 @@ const Nr = ({
|
|
|
34302
34302
|
name: "xpert.chatbot.popup.chat.link.clicked",
|
|
34303
34303
|
payload: k
|
|
34304
34304
|
});
|
|
34305
|
-
}, { disableScroll: u, hasError: l, streaming: c, loadingHistory: h } =
|
|
34305
|
+
}, { disableScroll: u, hasError: l, streaming: c, loadingHistory: h } = _e(Ht), m = Ze(null), { primaryColor: p } = _e(Ct), y = Yt(
|
|
34306
34306
|
() => n.reduce((b, E) => (E.toolCalls && E.toolCalls.forEach(({ function: v, id: k }) => {
|
|
34307
34307
|
b[k] = v?.name;
|
|
34308
34308
|
}), b), {}),
|
|
@@ -34335,7 +34335,7 @@ const Nr = ({
|
|
|
34335
34335
|
return null;
|
|
34336
34336
|
const B = Array.isArray(b?.options) && b.options.length > 0;
|
|
34337
34337
|
if (!b.content && !B) return null;
|
|
34338
|
-
const
|
|
34338
|
+
const W = y[b.toolCallId], H = c && v === Ie.ASSISTANT && E === n.length - 1, C = B && [Ie.AGENT, Ie.ASSISTANT].includes(v);
|
|
34339
34339
|
return /* @__PURE__ */ S.jsxs("div", { children: [
|
|
34340
34340
|
!!b.content && /* @__PURE__ */ S.jsx(
|
|
34341
34341
|
Jp,
|
|
@@ -34343,11 +34343,11 @@ const Nr = ({
|
|
|
34343
34343
|
index: E,
|
|
34344
34344
|
isTestUser: e,
|
|
34345
34345
|
message: b,
|
|
34346
|
-
messageRef:
|
|
34347
|
-
scrollToTopOnStreaming:
|
|
34346
|
+
messageRef: H ? m : void 0,
|
|
34347
|
+
scrollToTopOnStreaming: H,
|
|
34348
34348
|
setLiveChatOpen: i,
|
|
34349
34349
|
submitEvent: o,
|
|
34350
|
-
toolCall:
|
|
34350
|
+
toolCall: W,
|
|
34351
34351
|
onMessageLinkClicked: a ?? s
|
|
34352
34352
|
}
|
|
34353
34353
|
),
|
|
@@ -34570,18 +34570,18 @@ const tx = "https://code.jquery.com/jquery-3.7.1.min.js", nx = "https://prospect
|
|
|
34570
34570
|
onSubmitted: r = null,
|
|
34571
34571
|
taxiForm: a = null
|
|
34572
34572
|
}) => {
|
|
34573
|
-
const i = gx(a), o = i?.clientId ?? null, s = i?.prospectFormGrouping ?? null, u = i?.formId ?? null, l = !!(o && s && u), c = o ?? "unconfigured-client", h = l ? yx({ formId: u, prospectFormGrouping: s }) : null, m = l ? vx({ formId: u, prospectFormGrouping: s }) : null, [p, y] = ve("idle"), [b, E] = ve(null), [v, k] = ve(null), B = Ze(null),
|
|
34573
|
+
const i = gx(a), o = i?.clientId ?? null, s = i?.prospectFormGrouping ?? null, u = i?.formId ?? null, l = !!(o && s && u), c = o ?? "unconfigured-client", h = l ? yx({ formId: u, prospectFormGrouping: s }) : null, m = l ? vx({ formId: u, prospectFormGrouping: s }) : null, [p, y] = ve("idle"), [b, E] = ve(null), [v, k] = ve(null), B = Ze(null), W = Ze(!1), H = e ?? `form-id-${c}`, C = h ? Tx({ clientId: c, taxiPackageKey: h }) : {
|
|
34574
34574
|
short: `taxi-form-missing-short-package-${c}`,
|
|
34575
34575
|
full: `taxi-form-missing-full-package-${c}`
|
|
34576
|
-
}, D = bx(c), X = wx(p, b),
|
|
34577
|
-
ne.current ||
|
|
34578
|
-
}, [n]),
|
|
34579
|
-
ne.current || (ne.current = !0,
|
|
34576
|
+
}, D = bx(c), X = wx(p, b), q = Ze(!1), ne = Ze(!1), z = Qt(() => {
|
|
34577
|
+
ne.current || q.current || (q.current = !0, n?.());
|
|
34578
|
+
}, [n]), V = Qt(() => {
|
|
34579
|
+
ne.current || (ne.current = !0, q.current = !1, r?.());
|
|
34580
34580
|
}, [r]);
|
|
34581
34581
|
return Oe(() => {
|
|
34582
34582
|
fx.forEach(mx);
|
|
34583
34583
|
}, []), Oe(() => {
|
|
34584
|
-
let
|
|
34584
|
+
let I = !1;
|
|
34585
34585
|
return (async () => {
|
|
34586
34586
|
if (!l || !m) {
|
|
34587
34587
|
E(dx), y("error");
|
|
@@ -34590,47 +34590,47 @@ const tx = "https://code.jquery.com/jquery-3.7.1.min.js", nx = "https://prospect
|
|
|
34590
34590
|
try {
|
|
34591
34591
|
y("loading"), E(null);
|
|
34592
34592
|
const Y = await Cx(m);
|
|
34593
|
-
if (
|
|
34593
|
+
if (I) return;
|
|
34594
34594
|
k(Y);
|
|
34595
34595
|
} catch (Y) {
|
|
34596
|
-
|
|
34596
|
+
I || (E(Dd(Y)), y("error"));
|
|
34597
34597
|
}
|
|
34598
34598
|
})(), () => {
|
|
34599
|
-
|
|
34599
|
+
I = !0;
|
|
34600
34600
|
};
|
|
34601
34601
|
}, [l, m]), Oe(() => {
|
|
34602
|
-
|
|
34603
|
-
}, [c,
|
|
34602
|
+
W.current = !1, q.current = !1, ne.current = !1;
|
|
34603
|
+
}, [c, H]), Oe(() => {
|
|
34604
34604
|
if (typeof window > "u") return;
|
|
34605
|
-
const
|
|
34606
|
-
if (typeof
|
|
34605
|
+
const I = window.fetch;
|
|
34606
|
+
if (typeof I == "function")
|
|
34607
34607
|
return window.fetch = async (...F) => {
|
|
34608
|
-
const [Y, J] = F,
|
|
34609
|
-
if (Md(
|
|
34610
|
-
|
|
34608
|
+
const [Y, J] = F, G = typeof Y == "string" ? Y : Y?.url;
|
|
34609
|
+
if (Md(G)) {
|
|
34610
|
+
z();
|
|
34611
34611
|
const Z = Pd(J?.body);
|
|
34612
|
-
Fd(Z) &&
|
|
34612
|
+
Fd(Z) && V();
|
|
34613
34613
|
}
|
|
34614
|
-
return
|
|
34614
|
+
return I(...F);
|
|
34615
34615
|
}, () => {
|
|
34616
|
-
window.fetch =
|
|
34616
|
+
window.fetch = I;
|
|
34617
34617
|
};
|
|
34618
|
-
}, [
|
|
34618
|
+
}, [z, V]), Oe(() => {
|
|
34619
34619
|
if (typeof window > "u") return;
|
|
34620
|
-
const
|
|
34621
|
-
if (!(typeof
|
|
34620
|
+
const I = window.XMLHttpRequest?.prototype?.open, F = window.XMLHttpRequest?.prototype?.send;
|
|
34621
|
+
if (!(typeof I != "function" || typeof F != "function"))
|
|
34622
34622
|
return window.XMLHttpRequest.prototype.open = function(...J) {
|
|
34623
|
-
return this.__xpertRequestUrl = J[1],
|
|
34623
|
+
return this.__xpertRequestUrl = J[1], I.apply(this, J);
|
|
34624
34624
|
}, window.XMLHttpRequest.prototype.send = function(...J) {
|
|
34625
|
-
const
|
|
34626
|
-
return Md(this.__xpertRequestUrl) && (
|
|
34625
|
+
const G = Pd(J[0]);
|
|
34626
|
+
return Md(this.__xpertRequestUrl) && (z(), Fd(G) && V()), F.apply(this, J);
|
|
34627
34627
|
}, () => {
|
|
34628
|
-
window.XMLHttpRequest.prototype.open =
|
|
34628
|
+
window.XMLHttpRequest.prototype.open = I, window.XMLHttpRequest.prototype.send = F;
|
|
34629
34629
|
};
|
|
34630
|
-
}, [
|
|
34631
|
-
if (!v || !l || !h ||
|
|
34630
|
+
}, [z, V]), Oe(() => {
|
|
34631
|
+
if (!v || !l || !h || W.current)
|
|
34632
34632
|
return;
|
|
34633
|
-
let
|
|
34633
|
+
let I = !1, F;
|
|
34634
34634
|
const Y = B.current;
|
|
34635
34635
|
return (() => {
|
|
34636
34636
|
try {
|
|
@@ -34639,24 +34639,24 @@ const tx = "https://code.jquery.com/jquery-3.7.1.min.js", nx = "https://prospect
|
|
|
34639
34639
|
if (typeof window.setupTaxiForm != "function" || typeof window.mkTaxiPackageId != "function")
|
|
34640
34640
|
throw new Error("Taxi helpers are unavailable");
|
|
34641
34641
|
F = new MutationObserver(() => {
|
|
34642
|
-
|
|
34642
|
+
I || Y.childElementCount && y("ready");
|
|
34643
34643
|
}), F.observe(Y, {
|
|
34644
34644
|
childList: !0,
|
|
34645
34645
|
subtree: !0
|
|
34646
|
-
}),
|
|
34646
|
+
}), W.current = !0, window.setupTaxiForm(
|
|
34647
34647
|
xx({ formId: u, prospectFormGrouping: s }),
|
|
34648
34648
|
Sx({
|
|
34649
34649
|
clientId: c,
|
|
34650
|
-
resolvedMountPointId:
|
|
34650
|
+
resolvedMountPointId: H,
|
|
34651
34651
|
taxiPackageKey: h,
|
|
34652
34652
|
templateId: D
|
|
34653
34653
|
})
|
|
34654
34654
|
), Y.childElementCount && y("ready");
|
|
34655
|
-
} catch (
|
|
34656
|
-
|
|
34655
|
+
} catch (G) {
|
|
34656
|
+
I || (E(Dd(G)), y("error"));
|
|
34657
34657
|
}
|
|
34658
34658
|
})(), () => {
|
|
34659
|
-
|
|
34659
|
+
I = !0, F?.disconnect();
|
|
34660
34660
|
};
|
|
34661
34661
|
}, [
|
|
34662
34662
|
u,
|
|
@@ -34664,24 +34664,24 @@ const tx = "https://code.jquery.com/jquery-3.7.1.min.js", nx = "https://prospect
|
|
|
34664
34664
|
v,
|
|
34665
34665
|
s,
|
|
34666
34666
|
c,
|
|
34667
|
-
|
|
34667
|
+
H,
|
|
34668
34668
|
h,
|
|
34669
34669
|
D
|
|
34670
34670
|
]), Oe(() => {
|
|
34671
|
-
const
|
|
34672
|
-
if (!
|
|
34671
|
+
const I = B.current;
|
|
34672
|
+
if (!I) return;
|
|
34673
34673
|
const F = (Y) => {
|
|
34674
34674
|
const J = Y.target;
|
|
34675
34675
|
J instanceof Element && (J.closest(
|
|
34676
34676
|
'input, select, textarea, .checkbox .label, .radio .label, .lead-form-next-step, [id$="lead-form-next-action-button"]'
|
|
34677
|
-
) &&
|
|
34677
|
+
) && z(), J.closest(
|
|
34678
34678
|
'[id$="lead-form-submit-action-button"], button[type="submit"]'
|
|
34679
|
-
) &&
|
|
34679
|
+
) && V());
|
|
34680
34680
|
};
|
|
34681
|
-
return
|
|
34682
|
-
|
|
34681
|
+
return I.addEventListener("input", F, !0), I.addEventListener("change", F, !0), I.addEventListener("click", F, !0), () => {
|
|
34682
|
+
I.removeEventListener("input", F, !0), I.removeEventListener("change", F, !0), I.removeEventListener("click", F, !0);
|
|
34683
34683
|
};
|
|
34684
|
-
}, [
|
|
34684
|
+
}, [z, V, v]), /* @__PURE__ */ S.jsxs("section", { className: "xpert-taxi-form", "aria-label": "Taxi Form", children: [
|
|
34685
34685
|
X && /* @__PURE__ */ S.jsx("div", { className: "xpert-taxi-form__status", "data-state": p, children: X }),
|
|
34686
34686
|
/* @__PURE__ */ S.jsx(
|
|
34687
34687
|
"div",
|
|
@@ -34697,7 +34697,7 @@ const tx = "https://code.jquery.com/jquery-3.7.1.min.js", nx = "https://prospect
|
|
|
34697
34697
|
/* @__PURE__ */ S.jsx(
|
|
34698
34698
|
"div",
|
|
34699
34699
|
{
|
|
34700
|
-
id:
|
|
34700
|
+
id: H,
|
|
34701
34701
|
ref: B,
|
|
34702
34702
|
"data-testid": "taxi-form-mount-point"
|
|
34703
34703
|
}
|
|
@@ -34939,27 +34939,27 @@ const im = "xpert_lead_capture_state", Ax = 3600 * 24 * 30, _x = (e) => {
|
|
|
34939
34939
|
lineHeight: 0,
|
|
34940
34940
|
backgroundColor: b.buttonBackgroundColor,
|
|
34941
34941
|
color: b.buttonIconColor
|
|
34942
|
-
},
|
|
34942
|
+
}, W = {
|
|
34943
34943
|
backgroundColor: b.tooltipBackgroundColor,
|
|
34944
34944
|
"--xpert-livechat-tooltip-bg": b.tooltipBackgroundColor,
|
|
34945
34945
|
color: b.tooltipTextColor
|
|
34946
|
-
},
|
|
34946
|
+
}, H = {
|
|
34947
34947
|
backgroundColor: b.tooltipAccentColor
|
|
34948
34948
|
}, C = ({
|
|
34949
|
-
started:
|
|
34950
|
-
submitted:
|
|
34951
|
-
insertIndex:
|
|
34949
|
+
started: V,
|
|
34950
|
+
submitted: U,
|
|
34951
|
+
insertIndex: I = null
|
|
34952
34952
|
}) => {
|
|
34953
34953
|
Ox({
|
|
34954
34954
|
clientId: e,
|
|
34955
|
-
started:
|
|
34956
|
-
submitted:
|
|
34957
|
-
insertIndex:
|
|
34955
|
+
started: V,
|
|
34956
|
+
submitted: U,
|
|
34957
|
+
insertIndex: I
|
|
34958
34958
|
});
|
|
34959
34959
|
}, D = !n && p && i, X = Math.min(
|
|
34960
34960
|
s ?? r,
|
|
34961
34961
|
r
|
|
34962
|
-
),
|
|
34962
|
+
), q = () => {
|
|
34963
34963
|
if (i) {
|
|
34964
34964
|
o(!1), C({
|
|
34965
34965
|
started: !1,
|
|
@@ -34979,7 +34979,7 @@ const im = "xpert_lead_capture_state", Ax = 3600 * 24 * 30, _x = (e) => {
|
|
|
34979
34979
|
submitted: !1,
|
|
34980
34980
|
insertIndex: X
|
|
34981
34981
|
});
|
|
34982
|
-
},
|
|
34982
|
+
}, z = () => {
|
|
34983
34983
|
C({
|
|
34984
34984
|
started: !1,
|
|
34985
34985
|
submitted: !0,
|
|
@@ -34988,24 +34988,24 @@ const im = "xpert_lead_capture_state", Ax = 3600 * 24 * 30, _x = (e) => {
|
|
|
34988
34988
|
};
|
|
34989
34989
|
return Oe(() => {
|
|
34990
34990
|
if (!y) return;
|
|
34991
|
-
const
|
|
34991
|
+
const V = setTimeout(() => {
|
|
34992
34992
|
c(!1);
|
|
34993
34993
|
}, 3e3);
|
|
34994
34994
|
return () => {
|
|
34995
|
-
clearTimeout(
|
|
34995
|
+
clearTimeout(V);
|
|
34996
34996
|
};
|
|
34997
34997
|
}, [y]), Oe(() => {
|
|
34998
34998
|
if (!p || !y) return;
|
|
34999
|
-
const { shouldRestore:
|
|
34999
|
+
const { shouldRestore: V, insertIndex: U } = Nx({
|
|
35000
35000
|
clientId: e,
|
|
35001
35001
|
messageCount: r
|
|
35002
35002
|
});
|
|
35003
|
-
if (!
|
|
35004
|
-
const
|
|
35005
|
-
u(
|
|
35003
|
+
if (!V) return;
|
|
35004
|
+
const I = setTimeout(() => {
|
|
35005
|
+
u(U), o(!0);
|
|
35006
35006
|
}, 0);
|
|
35007
35007
|
return () => {
|
|
35008
|
-
clearTimeout(
|
|
35008
|
+
clearTimeout(I);
|
|
35009
35009
|
};
|
|
35010
35010
|
}, [
|
|
35011
35011
|
e,
|
|
@@ -35019,19 +35019,19 @@ const im = "xpert_lead_capture_state", Ax = 3600 * 24 * 30, _x = (e) => {
|
|
|
35019
35019
|
leadCaptureStateStamp: v,
|
|
35020
35020
|
leadCaptureStateTooltip: k,
|
|
35021
35021
|
leadCaptureButtonStyle: B,
|
|
35022
|
-
leadCaptureTooltipStyle:
|
|
35023
|
-
leadCaptureTooltipAccentStyle:
|
|
35022
|
+
leadCaptureTooltipStyle: W,
|
|
35023
|
+
leadCaptureTooltipAccentStyle: H,
|
|
35024
35024
|
showLeadCaptureTooltip: l,
|
|
35025
35025
|
resolvedLeadCaptureStyle: b,
|
|
35026
35026
|
shouldShowLeadCaptureForm: D,
|
|
35027
35027
|
resolvedLeadCaptureInsertIndex: X,
|
|
35028
|
-
toggleLeadCapture:
|
|
35028
|
+
toggleLeadCapture: q,
|
|
35029
35029
|
markLeadCaptureStarted: ne,
|
|
35030
|
-
markLeadCaptureSubmitted:
|
|
35030
|
+
markLeadCaptureSubmitted: z,
|
|
35031
35031
|
leadCaptureOpen: i
|
|
35032
35032
|
};
|
|
35033
35033
|
}, om = () => {
|
|
35034
|
-
const { conversationScreen: e, id: t } =
|
|
35034
|
+
const { conversationScreen: e, id: t } = _e(Ct), n = `${t}-maintenance-banner`, [r, a] = ve(
|
|
35035
35035
|
Zt.get(n) === void 0
|
|
35036
35036
|
), i = /* @__PURE__ */ new Date(), o = new Date(
|
|
35037
35037
|
e?.maintenanceBanner?.endDateTime
|
|
@@ -35082,7 +35082,7 @@ const im = "xpert_lead_capture_state", Ax = 3600 * 24 * 30, _x = (e) => {
|
|
|
35082
35082
|
};
|
|
35083
35083
|
om.displayName = "MaintenanceBanner";
|
|
35084
35084
|
const Nl = ({ onPromptClick: e }) => {
|
|
35085
|
-
const { primaryColor: t, conversationScreen: n } =
|
|
35085
|
+
const { primaryColor: t, conversationScreen: n } = _e(Ct), { deleteConversationModal: r } = _e(vr), { loading: a, streaming: i, loadingHistory: o } = _e(Ht), s = a || o || i;
|
|
35086
35086
|
return /* @__PURE__ */ S.jsxs("div", { style: { display: "grid", gap: ".75rem" }, children: [
|
|
35087
35087
|
/* @__PURE__ */ S.jsx("div", { style: { fontWeight: 700, fontSize: "0.75rem" }, children: "Some things I can help you with" }),
|
|
35088
35088
|
n?.prompts?.map((u) => /* @__PURE__ */ S.jsx(
|
|
@@ -35110,7 +35110,7 @@ Nl.propTypes = {
|
|
|
35110
35110
|
};
|
|
35111
35111
|
Nl.displayName = "PromptList";
|
|
35112
35112
|
const sm = ({ chatContentRef: e, messages: t }) => {
|
|
35113
|
-
const { loading: n, streaming: r } =
|
|
35113
|
+
const { loading: n, streaming: r } = _e(Ht), [a, i] = ve(!1), o = Ze(null), s = Qt(() => {
|
|
35114
35114
|
if (!e.current) return;
|
|
35115
35115
|
const { scrollTop: l, scrollHeight: c, clientHeight: h } = e.current, m = l + h >= c - 10;
|
|
35116
35116
|
i(!m);
|
|
@@ -35170,7 +35170,7 @@ function Ao({
|
|
|
35170
35170
|
const b = p === "text", E = p === "ranking", v = !!h?.trim(), k = v ? `${c} - ${h}` : c, B = Yt(
|
|
35171
35171
|
() => Mx(k),
|
|
35172
35172
|
[k]
|
|
35173
|
-
), [
|
|
35173
|
+
), [W, H] = ve({
|
|
35174
35174
|
prompt: k,
|
|
35175
35175
|
visibleTokenCount: 0
|
|
35176
35176
|
});
|
|
@@ -35179,7 +35179,7 @@ function Ao({
|
|
|
35179
35179
|
return;
|
|
35180
35180
|
let Z = 0;
|
|
35181
35181
|
const A = window.setInterval(() => {
|
|
35182
|
-
Z += 1,
|
|
35182
|
+
Z += 1, H({
|
|
35183
35183
|
prompt: k,
|
|
35184
35184
|
visibleTokenCount: Z
|
|
35185
35185
|
}), Z >= B.length && window.clearInterval(A);
|
|
@@ -35188,13 +35188,13 @@ function Ao({
|
|
|
35188
35188
|
window.clearInterval(A);
|
|
35189
35189
|
};
|
|
35190
35190
|
}, [k, B]);
|
|
35191
|
-
const C =
|
|
35191
|
+
const C = W.prompt === k ? W.visibleTokenCount : 0, D = B.slice(0, C).join(""), X = c.length, q = D.slice(0, X).trimEnd(), ne = v ? D.slice(X).replace(/^\s*-\s*/, "") : "", z = C < B.length, V = Math.max(1, i ?? 1), U = `survey-question-${u}`, I = `${U}-label`, F = `${U}-row`, Y = `${U}-options-label`, J = `${U}-free-text-hint`, G = v ? `${I} ${F}` : I;
|
|
35192
35192
|
return /* @__PURE__ */ S.jsxs(
|
|
35193
35193
|
"section",
|
|
35194
35194
|
{
|
|
35195
35195
|
className: "xpert_chatbot__survey-card",
|
|
35196
35196
|
"aria-label": "Survey question",
|
|
35197
|
-
"aria-labelledby":
|
|
35197
|
+
"aria-labelledby": G,
|
|
35198
35198
|
children: [
|
|
35199
35199
|
/* @__PURE__ */ S.jsxs("div", { className: "xpert_chatbot__survey-card__actions", children: [
|
|
35200
35200
|
/* @__PURE__ */ S.jsx(
|
|
@@ -35207,7 +35207,7 @@ function Ao({
|
|
|
35207
35207
|
children: "Previous Question"
|
|
35208
35208
|
}
|
|
35209
35209
|
),
|
|
35210
|
-
!
|
|
35210
|
+
!z && E && r ? /* @__PURE__ */ S.jsx(
|
|
35211
35211
|
"button",
|
|
35212
35212
|
{
|
|
35213
35213
|
type: "button",
|
|
@@ -35216,7 +35216,7 @@ function Ao({
|
|
|
35216
35216
|
children: "Next Question"
|
|
35217
35217
|
}
|
|
35218
35218
|
) : null,
|
|
35219
|
-
!
|
|
35219
|
+
!z && a ? /* @__PURE__ */ S.jsx(
|
|
35220
35220
|
"button",
|
|
35221
35221
|
{
|
|
35222
35222
|
type: "button",
|
|
@@ -35231,14 +35231,14 @@ function Ao({
|
|
|
35231
35231
|
{
|
|
35232
35232
|
className: "xpert_chatbot__survey-card__prompt",
|
|
35233
35233
|
"aria-live": "polite",
|
|
35234
|
-
"aria-busy":
|
|
35234
|
+
"aria-busy": z,
|
|
35235
35235
|
children: [
|
|
35236
35236
|
/* @__PURE__ */ S.jsx(
|
|
35237
35237
|
"span",
|
|
35238
35238
|
{
|
|
35239
|
-
id:
|
|
35239
|
+
id: I,
|
|
35240
35240
|
className: "xpert_chatbot__survey-card__promptLabel",
|
|
35241
|
-
children:
|
|
35241
|
+
children: q
|
|
35242
35242
|
}
|
|
35243
35243
|
),
|
|
35244
35244
|
v ? /* @__PURE__ */ S.jsx(
|
|
@@ -35252,7 +35252,7 @@ function Ao({
|
|
|
35252
35252
|
]
|
|
35253
35253
|
}
|
|
35254
35254
|
),
|
|
35255
|
-
!
|
|
35255
|
+
!z && b ? /* @__PURE__ */ S.jsx(
|
|
35256
35256
|
"div",
|
|
35257
35257
|
{
|
|
35258
35258
|
className: "xpert_chatbot__survey-card__options",
|
|
@@ -35268,7 +35268,7 @@ function Ao({
|
|
|
35268
35268
|
)
|
|
35269
35269
|
}
|
|
35270
35270
|
) : null,
|
|
35271
|
-
!
|
|
35271
|
+
!z && !b ? /* @__PURE__ */ S.jsxs(
|
|
35272
35272
|
"fieldset",
|
|
35273
35273
|
{
|
|
35274
35274
|
className: "xpert_chatbot__survey-card__options",
|
|
@@ -35311,24 +35311,24 @@ function Ao({
|
|
|
35311
35311
|
role: "group",
|
|
35312
35312
|
"aria-label": `Ranks for ${Z.label}`,
|
|
35313
35313
|
style: { display: "flex", gap: "0.4rem" },
|
|
35314
|
-
children: Array.from({ length:
|
|
35315
|
-
const
|
|
35314
|
+
children: Array.from({ length: V }, (se, ye) => {
|
|
35315
|
+
const O = ye + 1, Ee = e?.[Z.id] === O;
|
|
35316
35316
|
return /* @__PURE__ */ S.jsx(
|
|
35317
35317
|
"button",
|
|
35318
35318
|
{
|
|
35319
35319
|
type: "button",
|
|
35320
35320
|
className: "xpert_chatbot__survey-card__option",
|
|
35321
|
-
"aria-label": `Select rank ${
|
|
35321
|
+
"aria-label": `Select rank ${O} for ${Z.label}`,
|
|
35322
35322
|
"aria-pressed": Ee,
|
|
35323
|
-
onClick: () => y({ ...Z, rank:
|
|
35323
|
+
onClick: () => y({ ...Z, rank: O }),
|
|
35324
35324
|
style: {
|
|
35325
35325
|
minWidth: "2.2rem",
|
|
35326
35326
|
padding: "0.75rem",
|
|
35327
35327
|
border: Ee ? "2px solid #0b5fff" : void 0
|
|
35328
35328
|
},
|
|
35329
|
-
children:
|
|
35329
|
+
children: O
|
|
35330
35330
|
},
|
|
35331
|
-
`${Z.id ?? Z.label}-${
|
|
35331
|
+
`${Z.id ?? Z.label}-${O}`
|
|
35332
35332
|
);
|
|
35333
35333
|
})
|
|
35334
35334
|
}
|
|
@@ -35423,11 +35423,11 @@ function Rl({
|
|
|
35423
35423
|
surveyLoading: v,
|
|
35424
35424
|
surveyPromptSelected: k,
|
|
35425
35425
|
surveyStepIndex: B,
|
|
35426
|
-
triggerSurveyPrompt:
|
|
35426
|
+
triggerSurveyPrompt: W
|
|
35427
35427
|
}) {
|
|
35428
|
-
const
|
|
35429
|
-
() => Bx(
|
|
35430
|
-
[
|
|
35428
|
+
const H = h ?? Fx, C = Yt(
|
|
35429
|
+
() => Bx(H),
|
|
35430
|
+
[H]
|
|
35431
35431
|
), [D, X] = ve({
|
|
35432
35432
|
streamKey: null,
|
|
35433
35433
|
visibleTokenCount: 0
|
|
@@ -35435,25 +35435,25 @@ function Rl({
|
|
|
35435
35435
|
Oe(() => {
|
|
35436
35436
|
if (!y || !k || s)
|
|
35437
35437
|
return;
|
|
35438
|
-
let
|
|
35439
|
-
const
|
|
35440
|
-
|
|
35441
|
-
streamKey:
|
|
35442
|
-
visibleTokenCount:
|
|
35443
|
-
}),
|
|
35438
|
+
let U = 0;
|
|
35439
|
+
const I = `${y}:${k}:${s}`, F = window.setInterval(() => {
|
|
35440
|
+
U += 1, X({
|
|
35441
|
+
streamKey: I,
|
|
35442
|
+
visibleTokenCount: U
|
|
35443
|
+
}), U >= C.length && window.clearInterval(F);
|
|
35444
35444
|
}, Px);
|
|
35445
35445
|
return () => {
|
|
35446
35446
|
window.clearInterval(F);
|
|
35447
35447
|
};
|
|
35448
35448
|
}, [C, s, y, k]);
|
|
35449
|
-
const
|
|
35449
|
+
const q = `${y}:${k}:${s}`, ne = D.streamKey === q ? D.visibleTokenCount : 0, z = C.slice(0, ne).join(""), V = y && k && !s && ne < C.length;
|
|
35450
35450
|
return /* @__PURE__ */ S.jsxs(S.Fragment, { children: [
|
|
35451
35451
|
!s && y && !b && /* @__PURE__ */ S.jsx("div", { style: { margin: "0.75rem 0" }, children: /* @__PURE__ */ S.jsx(
|
|
35452
35452
|
"button",
|
|
35453
35453
|
{
|
|
35454
35454
|
type: "button",
|
|
35455
35455
|
className: "xpert_chatbot__survey-btn xpert_chatbot__survey-btn--primary",
|
|
35456
|
-
onClick: () =>
|
|
35456
|
+
onClick: () => W("internal"),
|
|
35457
35457
|
children: "Take Survey ✨"
|
|
35458
35458
|
}
|
|
35459
35459
|
) }),
|
|
@@ -35470,11 +35470,11 @@ function Rl({
|
|
|
35470
35470
|
className: "xpert_chatbot__survey-callout",
|
|
35471
35471
|
style: { color: "#3f2c00" },
|
|
35472
35472
|
"aria-live": "polite",
|
|
35473
|
-
"aria-busy":
|
|
35474
|
-
children:
|
|
35473
|
+
"aria-busy": V,
|
|
35474
|
+
children: z
|
|
35475
35475
|
}
|
|
35476
35476
|
),
|
|
35477
|
-
!
|
|
35477
|
+
!V && /* @__PURE__ */ S.jsxs(
|
|
35478
35478
|
"div",
|
|
35479
35479
|
{
|
|
35480
35480
|
style: { display: "flex", gap: "0.75rem", marginTop: "0.75rem" },
|
|
@@ -36035,14 +36035,14 @@ function Zx({
|
|
|
36035
36035
|
}) {
|
|
36036
36036
|
const [l, c] = ve(!1), [h, m] = ve(!1), [p, y] = ve(0), [b, E] = ve(null), [v, k] = ve(
|
|
36037
36037
|
{}
|
|
36038
|
-
), [B,
|
|
36039
|
-
() => lm(
|
|
36040
|
-
[
|
|
36041
|
-
),
|
|
36038
|
+
), [B, W] = ve({}), [H, C] = ve(!1), [D, X] = ve(null), q = r?.surveys ?? r?.survey, ne = Yt(
|
|
36039
|
+
() => lm(q),
|
|
36040
|
+
[q]
|
|
36041
|
+
), z = ne?.enabled === !0, V = ne?.externalTrigger === !0, U = r?.conversationHistory?.enabled === !0, I = Ze(l);
|
|
36042
36042
|
Oe(() => {
|
|
36043
|
-
|
|
36043
|
+
I.current = l;
|
|
36044
36044
|
}, [l]);
|
|
36045
|
-
const F = Ze(null), Y = Ze(null), J = Ze(null),
|
|
36045
|
+
const F = Ze(null), Y = Ze(null), J = Ze(null), G = Yt(() => l ? b?.questions?.[p] ?? null : null, [l, b, p]), Z = !!G && G?.type !== "text", A = Yt(() => G?.type !== "ranking" ? {} : B?.[G?.id] ?? {}, [G, B]), se = Yt(() => G?.id ? v?.[G.id] ?? null : null, [G, v]), ye = G?.type === "text" ? se?.answerText ?? "" : "", O = Yt(() => G?.type !== "ranking" ? !1 : Ud(G, A).length >= Nu(G), [A, G]), Ee = Yt(() => Array.isArray(u) ? u.map((ge) => ({
|
|
36046
36046
|
role: ge.role,
|
|
36047
36047
|
content: ge.content,
|
|
36048
36048
|
...ge.toolCalls && { tool_calls: ge.toolCalls },
|
|
@@ -36073,16 +36073,16 @@ function Zx({
|
|
|
36073
36073
|
}), m(!0);
|
|
36074
36074
|
};
|
|
36075
36075
|
Oe(() => {
|
|
36076
|
-
if (
|
|
36076
|
+
if (V && z && a && !I.current) {
|
|
36077
36077
|
if (typeof a == "number") {
|
|
36078
36078
|
if (Ge.current === a) return;
|
|
36079
36079
|
Ge.current = a;
|
|
36080
36080
|
}
|
|
36081
36081
|
Qe("external");
|
|
36082
36082
|
}
|
|
36083
|
-
}, [a,
|
|
36083
|
+
}, [a, z, V]);
|
|
36084
36084
|
const Ye = (ge = !0, We = {}) => {
|
|
36085
|
-
const { skipTelemetryPost: rt = !1, surveyResponseOverride: Se = null } = We ?? {}, we = b?.id ?? "end_of_term_survey", Fe = n &&
|
|
36085
|
+
const { skipTelemetryPost: rt = !1, surveyResponseOverride: Se = null } = We ?? {}, we = b?.id ?? "end_of_term_survey", Fe = n && U ? gn(n) : null, Me = b?.questions?.length ?? 0, Be = Math.max(
|
|
36086
36086
|
0,
|
|
36087
36087
|
Math.min(p, Me)
|
|
36088
36088
|
), He = !!Y.current || Be > 0, K = ge ? (/* @__PURE__ */ new Date()).toISOString() : null, re = Se ?? Ai({
|
|
@@ -36092,7 +36092,7 @@ function Zx({
|
|
|
36092
36092
|
startedAt: F.current,
|
|
36093
36093
|
lastAnsweredAt: Y.current,
|
|
36094
36094
|
completedAt: K,
|
|
36095
|
-
currentQuestionId:
|
|
36095
|
+
currentQuestionId: G?.id ?? null,
|
|
36096
36096
|
totalQuestions: Me,
|
|
36097
36097
|
answeredQuestions: ge ? Me : Be
|
|
36098
36098
|
});
|
|
@@ -36102,9 +36102,9 @@ function Zx({
|
|
|
36102
36102
|
messages: Ee,
|
|
36103
36103
|
surveyResponse: re,
|
|
36104
36104
|
clientId: n,
|
|
36105
|
-
conversationHistoryEnabled:
|
|
36105
|
+
conversationHistoryEnabled: U,
|
|
36106
36106
|
onMessageSent: o
|
|
36107
|
-
}), c(!1), m(!1), y(0), E(null), k({}),
|
|
36107
|
+
}), c(!1), m(!1), y(0), E(null), k({}), W({}), C(!1), X(null), F.current = null, Y.current = null;
|
|
36108
36108
|
const xe = ge || He ? d1 : c1;
|
|
36109
36109
|
typeof s == "function" && (Ae({
|
|
36110
36110
|
role: Ie.INFO,
|
|
@@ -36124,7 +36124,7 @@ function Zx({
|
|
|
36124
36124
|
E(re);
|
|
36125
36125
|
const xe = (/* @__PURE__ */ new Date()).toISOString();
|
|
36126
36126
|
F.current = xe, Y.current = null;
|
|
36127
|
-
const Le = n &&
|
|
36127
|
+
const Le = n && U ? gn(n) : null, Ve = re?.questions?.length ?? 0, _t = re?.questions?.[0]?.id ?? null, wt = Ai({
|
|
36128
36128
|
conversationId: Le,
|
|
36129
36129
|
surveyId: re?.id ?? "end_of_term_survey",
|
|
36130
36130
|
status: "inProgress",
|
|
@@ -36145,9 +36145,9 @@ function Zx({
|
|
|
36145
36145
|
messages: Ee,
|
|
36146
36146
|
surveyResponse: wt,
|
|
36147
36147
|
clientId: n,
|
|
36148
|
-
conversationHistoryEnabled:
|
|
36148
|
+
conversationHistoryEnabled: U,
|
|
36149
36149
|
onMessageSent: o
|
|
36150
|
-
}), Ne(), m(!1), c(!0), y(0), k({}),
|
|
36150
|
+
}), Ne(), m(!1), c(!0), y(0), k({}), W({});
|
|
36151
36151
|
return;
|
|
36152
36152
|
}
|
|
36153
36153
|
if (!n)
|
|
@@ -36172,7 +36172,7 @@ function Zx({
|
|
|
36172
36172
|
E(we);
|
|
36173
36173
|
const Fe = (/* @__PURE__ */ new Date()).toISOString();
|
|
36174
36174
|
F.current = Fe, Y.current = null;
|
|
36175
|
-
const Me = n &&
|
|
36175
|
+
const Me = n && U ? gn(n) : null, Be = we?.questions?.length ?? 0, He = we?.questions?.[0]?.id ?? null, K = Ai({
|
|
36176
36176
|
conversationId: Me,
|
|
36177
36177
|
surveyId: we?.id ?? "end_of_term_survey",
|
|
36178
36178
|
status: "inProgress",
|
|
@@ -36193,9 +36193,9 @@ function Zx({
|
|
|
36193
36193
|
messages: Ee,
|
|
36194
36194
|
surveyResponse: K,
|
|
36195
36195
|
clientId: n,
|
|
36196
|
-
conversationHistoryEnabled:
|
|
36196
|
+
conversationHistoryEnabled: U,
|
|
36197
36197
|
onMessageSent: o
|
|
36198
|
-
}), Ne(), m(!1), c(!0), y(0), k({}),
|
|
36198
|
+
}), Ne(), m(!1), c(!0), y(0), k({}), W({});
|
|
36199
36199
|
} catch (ge) {
|
|
36200
36200
|
X(ge);
|
|
36201
36201
|
} finally {
|
|
@@ -36208,7 +36208,7 @@ function Zx({
|
|
|
36208
36208
|
answerText: Se,
|
|
36209
36209
|
answeredAt: we
|
|
36210
36210
|
}) => {
|
|
36211
|
-
const Fe = b?.id ?? "end_of_term_survey", Me = n &&
|
|
36211
|
+
const Fe = b?.id ?? "end_of_term_survey", Me = n && U ? gn(n) : null, Be = b?.questions?.length ?? 0, He = Math.max(
|
|
36212
36212
|
0,
|
|
36213
36213
|
Math.min(p + 1, Be)
|
|
36214
36214
|
), K = p + 1, re = K >= Be, xe = re ? we : null, Le = Ai({
|
|
@@ -36238,7 +36238,7 @@ function Zx({
|
|
|
36238
36238
|
messages: Ee,
|
|
36239
36239
|
surveyResponse: _t,
|
|
36240
36240
|
clientId: n,
|
|
36241
|
-
conversationHistoryEnabled:
|
|
36241
|
+
conversationHistoryEnabled: U,
|
|
36242
36242
|
onMessageSent: o
|
|
36243
36243
|
}), re) {
|
|
36244
36244
|
Ye(!0, {
|
|
@@ -36249,7 +36249,7 @@ function Zx({
|
|
|
36249
36249
|
}
|
|
36250
36250
|
y(K);
|
|
36251
36251
|
}, Ft = (ge) => {
|
|
36252
|
-
const We =
|
|
36252
|
+
const We = G;
|
|
36253
36253
|
if (!We) return;
|
|
36254
36254
|
const rt = (/* @__PURE__ */ new Date()).toISOString();
|
|
36255
36255
|
if (Y.current = rt, We.type === "ranking") {
|
|
@@ -36258,7 +36258,7 @@ function Zx({
|
|
|
36258
36258
|
const Be = { ...B?.[We.id] ?? {} };
|
|
36259
36259
|
Object.entries(Be).forEach(([He, K]) => {
|
|
36260
36260
|
K === ge.rank && He !== ge.id && delete Be[He];
|
|
36261
|
-
}), Be[ge.id] === ge.rank ? delete Be[ge.id] : Be[ge.id] = ge.rank,
|
|
36261
|
+
}), Be[ge.id] === ge.rank ? delete Be[ge.id] : Be[ge.id] = ge.rank, W((He) => ({
|
|
36262
36262
|
...He,
|
|
36263
36263
|
[We.id]: Be
|
|
36264
36264
|
}));
|
|
@@ -36280,11 +36280,11 @@ function Zx({
|
|
|
36280
36280
|
};
|
|
36281
36281
|
return {
|
|
36282
36282
|
activeSurveyAnswer: se,
|
|
36283
|
-
activeSurveyQuestion:
|
|
36283
|
+
activeSurveyQuestion: G,
|
|
36284
36284
|
activeSurveyInputValue: ye,
|
|
36285
36285
|
exitSurvey: Ye,
|
|
36286
36286
|
goToNextSurveyQuestion: () => {
|
|
36287
|
-
const ge =
|
|
36287
|
+
const ge = G;
|
|
36288
36288
|
if (ge?.type !== "ranking") return;
|
|
36289
36289
|
const We = Ud(
|
|
36290
36290
|
ge,
|
|
@@ -36306,7 +36306,7 @@ function Zx({
|
|
|
36306
36306
|
y((ge) => Math.max(ge - 1, 0));
|
|
36307
36307
|
},
|
|
36308
36308
|
handleSendRouted: (ge) => {
|
|
36309
|
-
if (l &&
|
|
36309
|
+
if (l && G?.type === "text") {
|
|
36310
36310
|
const We = (ge ?? "").trim();
|
|
36311
36311
|
if (!We) return;
|
|
36312
36312
|
Ft({ id: "free_text", label: We });
|
|
@@ -36315,7 +36315,7 @@ function Zx({
|
|
|
36315
36315
|
i(ge);
|
|
36316
36316
|
},
|
|
36317
36317
|
handleSurveyInputChange: (ge) => {
|
|
36318
|
-
const We =
|
|
36318
|
+
const We = G;
|
|
36319
36319
|
We?.type === "text" && k((rt) => ({
|
|
36320
36320
|
...rt,
|
|
36321
36321
|
[We.id]: {
|
|
@@ -36329,13 +36329,13 @@ function Zx({
|
|
|
36329
36329
|
selectedSurveyConfiguration: ne,
|
|
36330
36330
|
startSurvey: dt,
|
|
36331
36331
|
surveyDefinition: b,
|
|
36332
|
-
surveyEnabled:
|
|
36333
|
-
surveyExternalTrigger:
|
|
36332
|
+
surveyEnabled: z,
|
|
36333
|
+
surveyExternalTrigger: V,
|
|
36334
36334
|
surveyInputActive: Z,
|
|
36335
36335
|
activeRankingSelections: A,
|
|
36336
|
-
canSubmitActiveRankingQuestion:
|
|
36336
|
+
canSubmitActiveRankingQuestion: O,
|
|
36337
36337
|
surveyLoadError: D,
|
|
36338
|
-
surveyLoading:
|
|
36338
|
+
surveyLoading: H,
|
|
36339
36339
|
surveyPromptSelected: h,
|
|
36340
36340
|
surveyStepIndex: p,
|
|
36341
36341
|
triggerSurveyPrompt: Qe,
|
|
@@ -36351,31 +36351,31 @@ function cm({
|
|
|
36351
36351
|
setLiveChatOpen: r = null,
|
|
36352
36352
|
submitEvent: a = null
|
|
36353
36353
|
}) {
|
|
36354
|
-
const { chatApi: i, conversationScreen: o, disclaimer: s, id: u, primaryColor: l } =
|
|
36354
|
+
const { chatApi: i, conversationScreen: o, disclaimer: s, id: u, primaryColor: l } = _e(Ct), {
|
|
36355
36355
|
deleteConversationModal: c,
|
|
36356
36356
|
onMessageSent: h,
|
|
36357
36357
|
pushXpertMessage: m,
|
|
36358
36358
|
xpertMessages: p
|
|
36359
|
-
} =
|
|
36360
|
-
activeSurveyAnswer:
|
|
36359
|
+
} = _e(vr), y = Array.isArray(p) ? p.length : 0, { loading: b, setMode: E, mode: v, loadingHistory: k, externalTriggerSurvey: B } = _e(Ht), W = Ze(null), {
|
|
36360
|
+
activeSurveyAnswer: H,
|
|
36361
36361
|
activeSurveyQuestion: C,
|
|
36362
36362
|
activeRankingSelections: D,
|
|
36363
36363
|
canSubmitActiveRankingQuestion: X,
|
|
36364
|
-
exitSurvey:
|
|
36364
|
+
exitSurvey: q,
|
|
36365
36365
|
goToNextSurveyQuestion: ne,
|
|
36366
|
-
goToPreviousSurveyQuestion:
|
|
36367
|
-
handleSendRouted:
|
|
36368
|
-
handleSurveyInputChange:
|
|
36369
|
-
handleSurveyOptionSelect:
|
|
36366
|
+
goToPreviousSurveyQuestion: z,
|
|
36367
|
+
handleSendRouted: V,
|
|
36368
|
+
handleSurveyInputChange: U,
|
|
36369
|
+
handleSurveyOptionSelect: I,
|
|
36370
36370
|
isSurveyMode: F,
|
|
36371
36371
|
selectedSurveyConfiguration: Y,
|
|
36372
36372
|
startSurvey: J,
|
|
36373
|
-
surveyDefinition:
|
|
36373
|
+
surveyDefinition: G,
|
|
36374
36374
|
surveyEnabled: Z,
|
|
36375
36375
|
surveyExternalTrigger: A,
|
|
36376
36376
|
activeSurveyInputValue: se,
|
|
36377
36377
|
surveyInputActive: ye,
|
|
36378
|
-
surveyLoadError:
|
|
36378
|
+
surveyLoadError: O,
|
|
36379
36379
|
surveyLoading: Ee,
|
|
36380
36380
|
surveyPromptSelected: Ae,
|
|
36381
36381
|
surveyStepIndex: Ne,
|
|
@@ -36397,7 +36397,7 @@ function cm({
|
|
|
36397
36397
|
o.liveChat.useOwnChat ? E(Rn.LIVECHAT) : r(re);
|
|
36398
36398
|
};
|
|
36399
36399
|
Hx({
|
|
36400
|
-
chatContentRef:
|
|
36400
|
+
chatContentRef: W,
|
|
36401
36401
|
isSurveyMode: F,
|
|
36402
36402
|
messageCount: y,
|
|
36403
36403
|
surveyPromptSelected: Ae
|
|
@@ -36429,8 +36429,8 @@ function cm({
|
|
|
36429
36429
|
_o,
|
|
36430
36430
|
{
|
|
36431
36431
|
currentStep: Ne + 1,
|
|
36432
|
-
onExit: () =>
|
|
36433
|
-
totalSteps:
|
|
36432
|
+
onExit: () => q(!1),
|
|
36433
|
+
totalSteps: G?.questions?.length ?? 1
|
|
36434
36434
|
}
|
|
36435
36435
|
),
|
|
36436
36436
|
/* @__PURE__ */ S.jsxs(
|
|
@@ -36444,7 +36444,7 @@ function cm({
|
|
|
36444
36444
|
overscrollBehavior: "contain",
|
|
36445
36445
|
position: "relative"
|
|
36446
36446
|
},
|
|
36447
|
-
ref:
|
|
36447
|
+
ref: W,
|
|
36448
36448
|
children: [
|
|
36449
36449
|
!ht && s?.text && /* @__PURE__ */ S.jsx(N1, {}),
|
|
36450
36450
|
!ht && o?.prompts?.length > 0 && /* @__PURE__ */ S.jsx(Nl, { onPromptClick: e }),
|
|
@@ -36509,23 +36509,23 @@ function cm({
|
|
|
36509
36509
|
/* @__PURE__ */ S.jsx(
|
|
36510
36510
|
Rl,
|
|
36511
36511
|
{
|
|
36512
|
-
activeSurveyAnswer:
|
|
36512
|
+
activeSurveyAnswer: H,
|
|
36513
36513
|
activeSurveyQuestion: C,
|
|
36514
36514
|
activeRankingSelections: D,
|
|
36515
36515
|
canSubmitActiveRankingQuestion: X,
|
|
36516
36516
|
goToNextSurveyQuestion: ne,
|
|
36517
|
-
goToPreviousSurveyQuestion:
|
|
36518
|
-
handleSurveyOptionSelect:
|
|
36517
|
+
goToPreviousSurveyQuestion: z,
|
|
36518
|
+
handleSurveyOptionSelect: I,
|
|
36519
36519
|
isSurveyMode: F,
|
|
36520
36520
|
setSurveyLoadError: Ge,
|
|
36521
36521
|
setSurveyLoading: Qe,
|
|
36522
36522
|
setSurveyPromptSelected: Ye,
|
|
36523
36523
|
surveyDescription: Y?.description,
|
|
36524
36524
|
startSurvey: J,
|
|
36525
|
-
surveyDefinition:
|
|
36525
|
+
surveyDefinition: G,
|
|
36526
36526
|
surveyEnabled: Z,
|
|
36527
36527
|
surveyExternalTrigger: A,
|
|
36528
|
-
surveyLoadError:
|
|
36528
|
+
surveyLoadError: O,
|
|
36529
36529
|
surveyLoading: Ee,
|
|
36530
36530
|
surveyPromptSelected: Ae,
|
|
36531
36531
|
surveyStepIndex: Ne,
|
|
@@ -36573,8 +36573,8 @@ function cm({
|
|
|
36573
36573
|
ao,
|
|
36574
36574
|
{
|
|
36575
36575
|
disabled: b || k || c || ye || He,
|
|
36576
|
-
handleChange: Ft ?
|
|
36577
|
-
handleSend:
|
|
36576
|
+
handleChange: Ft ? U : void 0,
|
|
36577
|
+
handleSend: V,
|
|
36578
36578
|
inputRef: t,
|
|
36579
36579
|
value: Ft ? se : void 0
|
|
36580
36580
|
}
|
|
@@ -36585,7 +36585,7 @@ function cm({
|
|
|
36585
36585
|
!ht && /* @__PURE__ */ S.jsx(
|
|
36586
36586
|
sm,
|
|
36587
36587
|
{
|
|
36588
|
-
chatContentRef:
|
|
36588
|
+
chatContentRef: W,
|
|
36589
36589
|
messages: p
|
|
36590
36590
|
}
|
|
36591
36591
|
)
|
|
@@ -36809,9 +36809,9 @@ function Jx() {
|
|
|
36809
36809
|
return b && window.clearTimeout(b);
|
|
36810
36810
|
};
|
|
36811
36811
|
}, l = function(c, h, m, p, y, b, E) {
|
|
36812
|
-
var v = h.setLastMessage, k = h.setReadyState, B,
|
|
36813
|
-
return m.current.fromSocketIO && (B = (0, t.setUpSocketIOPing)(E)), i(c, m, v, b), o(c, m, k, y, b),
|
|
36814
|
-
k(r.ReadyState.CLOSING),
|
|
36812
|
+
var v = h.setLastMessage, k = h.setReadyState, B, W, H;
|
|
36813
|
+
return m.current.fromSocketIO && (B = (0, t.setUpSocketIOPing)(E)), i(c, m, v, b), o(c, m, k, y, b), W = s(c, m, k, p, y), H = u(c, m, k, p, y), function() {
|
|
36814
|
+
k(r.ReadyState.CLOSING), W(), H(), c.close(), B && clearInterval(B);
|
|
36815
36815
|
};
|
|
36816
36816
|
};
|
|
36817
36817
|
return wr.attachListeners = l, wr;
|
|
@@ -37023,7 +37023,7 @@ function nS() {
|
|
|
37023
37023
|
for (var c = [], h = 2; h < arguments.length; h++)
|
|
37024
37024
|
c[h - 2] = arguments[h];
|
|
37025
37025
|
return t(void 0, r([u, l], c, !0), void 0, function(m, p, y) {
|
|
37026
|
-
var b, E, v, k, B,
|
|
37026
|
+
var b, E, v, k, B, W, H, C;
|
|
37027
37027
|
return y === void 0 && (y = 0), n(this, function(D) {
|
|
37028
37028
|
switch (D.label) {
|
|
37029
37029
|
case 0:
|
|
@@ -37034,11 +37034,11 @@ function nS() {
|
|
|
37034
37034
|
case 2:
|
|
37035
37035
|
return b = D.sent(), [3, 9];
|
|
37036
37036
|
case 3:
|
|
37037
|
-
return D.sent(), p.current.retryOnError ? (E = (
|
|
37037
|
+
return D.sent(), p.current.retryOnError ? (E = (W = p.current.reconnectAttempts) !== null && W !== void 0 ? W : i.DEFAULT_RECONNECT_LIMIT, y < E ? (v = typeof p.current.reconnectInterval == "function" ? p.current.reconnectInterval(y) : p.current.reconnectInterval, [4, o(v ?? i.DEFAULT_RECONNECT_INTERVAL_MS)]) : [3, 5]) : [3, 7];
|
|
37038
37038
|
case 4:
|
|
37039
37039
|
return D.sent(), [2, (0, e.getUrl)(m, p, y + 1)];
|
|
37040
37040
|
case 5:
|
|
37041
|
-
return (C = (
|
|
37041
|
+
return (C = (H = p.current).onReconnectStop) === null || C === void 0 || C.call(H, y), [2, null];
|
|
37042
37042
|
case 6:
|
|
37043
37043
|
return [3, 8];
|
|
37044
37044
|
case 7:
|
|
@@ -37098,22 +37098,22 @@ function Fl() {
|
|
|
37098
37098
|
return new (y || (y = Promise))(function(v, k) {
|
|
37099
37099
|
function B(C) {
|
|
37100
37100
|
try {
|
|
37101
|
-
|
|
37101
|
+
H(b.next(C));
|
|
37102
37102
|
} catch (D) {
|
|
37103
37103
|
k(D);
|
|
37104
37104
|
}
|
|
37105
37105
|
}
|
|
37106
|
-
function
|
|
37106
|
+
function W(C) {
|
|
37107
37107
|
try {
|
|
37108
|
-
|
|
37108
|
+
H(b.throw(C));
|
|
37109
37109
|
} catch (D) {
|
|
37110
37110
|
k(D);
|
|
37111
37111
|
}
|
|
37112
37112
|
}
|
|
37113
|
-
function
|
|
37114
|
-
C.done ? v(C.value) : E(C.value).then(B,
|
|
37113
|
+
function H(C) {
|
|
37114
|
+
C.done ? v(C.value) : E(C.value).then(B, W);
|
|
37115
37115
|
}
|
|
37116
|
-
|
|
37116
|
+
H((b = b.apply(m, p || [])).next());
|
|
37117
37117
|
});
|
|
37118
37118
|
}, n = dn && dn.__generator || function(m, p) {
|
|
37119
37119
|
var y = { label: 0, sent: function() {
|
|
@@ -37123,56 +37123,56 @@ function Fl() {
|
|
|
37123
37123
|
return k.next = B(0), k.throw = B(1), k.return = B(2), typeof Symbol == "function" && (k[Symbol.iterator] = function() {
|
|
37124
37124
|
return this;
|
|
37125
37125
|
}), k;
|
|
37126
|
-
function B(
|
|
37126
|
+
function B(H) {
|
|
37127
37127
|
return function(C) {
|
|
37128
|
-
return
|
|
37128
|
+
return W([H, C]);
|
|
37129
37129
|
};
|
|
37130
37130
|
}
|
|
37131
|
-
function
|
|
37131
|
+
function W(H) {
|
|
37132
37132
|
if (b) throw new TypeError("Generator is already executing.");
|
|
37133
|
-
for (; k && (k = 0,
|
|
37134
|
-
if (b = 1, E && (v =
|
|
37135
|
-
switch (E = 0, v && (
|
|
37133
|
+
for (; k && (k = 0, H[0] && (y = 0)), y; ) try {
|
|
37134
|
+
if (b = 1, E && (v = H[0] & 2 ? E.return : H[0] ? E.throw || ((v = E.return) && v.call(E), 0) : E.next) && !(v = v.call(E, H[1])).done) return v;
|
|
37135
|
+
switch (E = 0, v && (H = [H[0] & 2, v.value]), H[0]) {
|
|
37136
37136
|
case 0:
|
|
37137
37137
|
case 1:
|
|
37138
|
-
v =
|
|
37138
|
+
v = H;
|
|
37139
37139
|
break;
|
|
37140
37140
|
case 4:
|
|
37141
|
-
return y.label++, { value:
|
|
37141
|
+
return y.label++, { value: H[1], done: !1 };
|
|
37142
37142
|
case 5:
|
|
37143
|
-
y.label++, E =
|
|
37143
|
+
y.label++, E = H[1], H = [0];
|
|
37144
37144
|
continue;
|
|
37145
37145
|
case 7:
|
|
37146
|
-
|
|
37146
|
+
H = y.ops.pop(), y.trys.pop();
|
|
37147
37147
|
continue;
|
|
37148
37148
|
default:
|
|
37149
|
-
if (v = y.trys, !(v = v.length > 0 && v[v.length - 1]) && (
|
|
37149
|
+
if (v = y.trys, !(v = v.length > 0 && v[v.length - 1]) && (H[0] === 6 || H[0] === 2)) {
|
|
37150
37150
|
y = 0;
|
|
37151
37151
|
continue;
|
|
37152
37152
|
}
|
|
37153
|
-
if (
|
|
37154
|
-
y.label =
|
|
37153
|
+
if (H[0] === 3 && (!v || H[1] > v[0] && H[1] < v[3])) {
|
|
37154
|
+
y.label = H[1];
|
|
37155
37155
|
break;
|
|
37156
37156
|
}
|
|
37157
|
-
if (
|
|
37158
|
-
y.label = v[1], v =
|
|
37157
|
+
if (H[0] === 6 && y.label < v[1]) {
|
|
37158
|
+
y.label = v[1], v = H;
|
|
37159
37159
|
break;
|
|
37160
37160
|
}
|
|
37161
37161
|
if (v && y.label < v[2]) {
|
|
37162
|
-
y.label = v[2], y.ops.push(
|
|
37162
|
+
y.label = v[2], y.ops.push(H);
|
|
37163
37163
|
break;
|
|
37164
37164
|
}
|
|
37165
37165
|
v[2] && y.ops.pop(), y.trys.pop();
|
|
37166
37166
|
continue;
|
|
37167
37167
|
}
|
|
37168
|
-
|
|
37168
|
+
H = p.call(m, y);
|
|
37169
37169
|
} catch (C) {
|
|
37170
|
-
|
|
37170
|
+
H = [6, C], E = 0;
|
|
37171
37171
|
} finally {
|
|
37172
37172
|
b = v = 0;
|
|
37173
37173
|
}
|
|
37174
|
-
if (
|
|
37175
|
-
return { value:
|
|
37174
|
+
if (H[0] & 5) throw H[1];
|
|
37175
|
+
return { value: H[0] ? H[1] : void 0, done: !0 };
|
|
37176
37176
|
}
|
|
37177
37177
|
}, r = dn && dn.__importDefault || function(m) {
|
|
37178
37178
|
return m && m.__esModule ? m : { default: m };
|
|
@@ -37180,7 +37180,7 @@ function Fl() {
|
|
|
37180
37180
|
Object.defineProperty(dn, "__esModule", { value: !0 }), dn.useWebSocket = void 0;
|
|
37181
37181
|
var a = Nn, i = O2, o = Gn(), s = tS(), u = nS(), l = r(rS()), c = Pl(), h = function(m, p, y) {
|
|
37182
37182
|
p === void 0 && (p = o.DEFAULT_OPTIONS), y === void 0 && (y = !0);
|
|
37183
|
-
var b = (0, a.useState)(null), E = b[0], v = b[1], k = (0, a.useState)({}), B = k[0],
|
|
37183
|
+
var b = (0, a.useState)(null), E = b[0], v = b[1], k = (0, a.useState)({}), B = k[0], W = k[1], H = (0, a.useMemo)(function() {
|
|
37184
37184
|
if (!p.disableJson && E)
|
|
37185
37185
|
try {
|
|
37186
37186
|
return JSON.parse(E.data);
|
|
@@ -37189,32 +37189,32 @@ function Fl() {
|
|
|
37189
37189
|
}
|
|
37190
37190
|
return null;
|
|
37191
37191
|
}, [E, p.disableJson]), C = (0, a.useRef)(null), D = (0, a.useRef)(null), X = (0, a.useRef)(function() {
|
|
37192
|
-
}),
|
|
37193
|
-
|
|
37194
|
-
var
|
|
37192
|
+
}), q = (0, a.useRef)(0), ne = (0, a.useRef)(Date.now()), z = (0, a.useRef)([]), V = (0, a.useRef)(null), U = (0, a.useRef)(p);
|
|
37193
|
+
U.current = p;
|
|
37194
|
+
var I = C.current && B[C.current] !== void 0 ? B[C.current] : m !== null && y === !0 ? o.ReadyState.CONNECTING : o.ReadyState.UNINSTANTIATED, F = p.queryParams ? JSON.stringify(p.queryParams) : null, Y = (0, a.useCallback)(function(Z, A) {
|
|
37195
37195
|
var se;
|
|
37196
37196
|
if (A === void 0 && (A = !0), o.isEventSourceSupported && D.current instanceof EventSource) {
|
|
37197
37197
|
console.warn("Unable to send a message from an eventSource");
|
|
37198
37198
|
return;
|
|
37199
37199
|
}
|
|
37200
|
-
((se = D.current) === null || se === void 0 ? void 0 : se.readyState) === o.ReadyState.OPEN ? ((0, c.assertIsWebSocket)(D.current,
|
|
37200
|
+
((se = D.current) === null || se === void 0 ? void 0 : se.readyState) === o.ReadyState.OPEN ? ((0, c.assertIsWebSocket)(D.current, U.current.skipAssert), D.current.send(Z)) : A && z.current.push(Z);
|
|
37201
37201
|
}, []), J = (0, a.useCallback)(function(Z, A) {
|
|
37202
37202
|
A === void 0 && (A = !0), Y(JSON.stringify(Z), A);
|
|
37203
|
-
}, [Y]),
|
|
37204
|
-
return
|
|
37203
|
+
}, [Y]), G = (0, a.useCallback)(function() {
|
|
37204
|
+
return U.current.share !== !0 || o.isEventSourceSupported && D.current instanceof EventSource ? D.current : (V.current === null && D.current && ((0, c.assertIsWebSocket)(D.current, U.current.skipAssert), V.current = (0, l.default)(D.current, X)), V.current);
|
|
37205
37205
|
}, []);
|
|
37206
37206
|
return (0, a.useEffect)(function() {
|
|
37207
37207
|
if (m !== null && y === !0) {
|
|
37208
37208
|
var Z, A = !1, se = !0, ye = function() {
|
|
37209
37209
|
return t(void 0, void 0, void 0, function() {
|
|
37210
|
-
var
|
|
37210
|
+
var O, Ee, Ae;
|
|
37211
37211
|
return n(this, function(Ne) {
|
|
37212
37212
|
switch (Ne.label) {
|
|
37213
37213
|
case 0:
|
|
37214
|
-
return
|
|
37214
|
+
return O = C, [4, (0, u.getUrl)(m, U)];
|
|
37215
37215
|
case 1:
|
|
37216
|
-
return
|
|
37217
|
-
return
|
|
37216
|
+
return O.current = Ne.sent(), C.current === null ? (console.error("Failed to get a valid URL. WebSocket connection aborted."), C.current = "ABORTED", (0, i.flushSync)(function() {
|
|
37217
|
+
return W(function(De) {
|
|
37218
37218
|
return e(e({}, De), { ABORTED: o.ReadyState.CLOSED });
|
|
37219
37219
|
});
|
|
37220
37220
|
}), [
|
|
@@ -37226,12 +37226,12 @@ function Fl() {
|
|
|
37226
37226
|
});
|
|
37227
37227
|
}, Ae = function(De) {
|
|
37228
37228
|
A || (0, i.flushSync)(function() {
|
|
37229
|
-
return
|
|
37229
|
+
return W(function(Ge) {
|
|
37230
37230
|
var Qe;
|
|
37231
37231
|
return e(e({}, Ge), C.current && (Qe = {}, Qe[C.current] = De, Qe));
|
|
37232
37232
|
});
|
|
37233
37233
|
});
|
|
37234
|
-
}, se && (Z = (0, s.createOrJoinSocket)(D, C.current, Ae,
|
|
37234
|
+
}, se && (Z = (0, s.createOrJoinSocket)(D, C.current, Ae, U, Ee, X, q, ne, Y)), [
|
|
37235
37235
|
2
|
|
37236
37236
|
/*return*/
|
|
37237
37237
|
]);
|
|
@@ -37240,25 +37240,25 @@ function Fl() {
|
|
|
37240
37240
|
});
|
|
37241
37241
|
};
|
|
37242
37242
|
return X.current = function() {
|
|
37243
|
-
A || (
|
|
37243
|
+
A || (V.current && (V.current = null), Z?.(), ye());
|
|
37244
37244
|
}, ye(), function() {
|
|
37245
|
-
A = !0, se = !1,
|
|
37245
|
+
A = !0, se = !1, V.current && (V.current = null), Z?.(), v(null);
|
|
37246
37246
|
};
|
|
37247
|
-
} else (m === null || y === !1) && (
|
|
37247
|
+
} else (m === null || y === !1) && (q.current = 0, W(function(O) {
|
|
37248
37248
|
var Ee;
|
|
37249
|
-
return e(e({},
|
|
37249
|
+
return e(e({}, O), C.current && (Ee = {}, Ee[C.current] = o.ReadyState.CLOSED, Ee));
|
|
37250
37250
|
}));
|
|
37251
37251
|
}, [m, y, F, Y]), (0, a.useEffect)(function() {
|
|
37252
|
-
|
|
37252
|
+
I === o.ReadyState.OPEN && z.current.splice(0).forEach(function(Z) {
|
|
37253
37253
|
Y(Z);
|
|
37254
37254
|
});
|
|
37255
|
-
}, [
|
|
37255
|
+
}, [I]), {
|
|
37256
37256
|
sendMessage: Y,
|
|
37257
37257
|
sendJsonMessage: J,
|
|
37258
37258
|
lastMessage: E,
|
|
37259
|
-
lastJsonMessage:
|
|
37260
|
-
readyState:
|
|
37261
|
-
getWebSocket:
|
|
37259
|
+
lastJsonMessage: H,
|
|
37260
|
+
readyState: I,
|
|
37261
|
+
getWebSocket: G
|
|
37262
37262
|
};
|
|
37263
37263
|
};
|
|
37264
37264
|
return dn.useWebSocket = h, dn;
|
|
@@ -37341,8 +37341,8 @@ function iS() {
|
|
|
37341
37341
|
var y = (0, r.useWebSocket)(o, m, u), b = y.lastMessage, E = y.readyState, v = y.getWebSocket;
|
|
37342
37342
|
return (0, n.useEffect)(function() {
|
|
37343
37343
|
b?.type && Object.entries(p.current).forEach(function(k) {
|
|
37344
|
-
var B = k[0],
|
|
37345
|
-
B === b.type &&
|
|
37344
|
+
var B = k[0], W = k[1];
|
|
37345
|
+
B === b.type && W(b);
|
|
37346
37346
|
});
|
|
37347
37347
|
}, [b]), {
|
|
37348
37348
|
lastEvent: b,
|
|
@@ -37399,13 +37399,13 @@ const cS = "This conversation with a live agent has ended. Please note that a tr
|
|
|
37399
37399
|
CONVERSATION: "CONVERSATION",
|
|
37400
37400
|
FORM: "FORM"
|
|
37401
37401
|
}, zr = to({}), hm = ({ children: e, liveChatPayload: t }) => {
|
|
37402
|
-
const { conversationScreen: n } =
|
|
37403
|
-
const Z = await lS(
|
|
37402
|
+
const { conversationScreen: n } = _e(Ct), { pushXpertMessage: r } = _e(vr), { setHasError: a, setMode: i } = _e(Ht), [o, s] = ve(""), [u, l] = ve(!1), [, c] = ve(""), [h, m] = ve([]), [p, y] = ve(null), [b, E] = ve(tr.FORM), [v, k] = ve(null), B = (G) => m((Z) => [...Z, G]), W = async (G) => {
|
|
37403
|
+
const Z = await lS(G.data), { conversation_id: A, event_type: se, body: ye } = Z;
|
|
37404
37404
|
switch (se) {
|
|
37405
37405
|
case "AGENT_TYPING":
|
|
37406
37406
|
return ne();
|
|
37407
37407
|
case "CONVERSATION_ACCEPTED":
|
|
37408
|
-
return
|
|
37408
|
+
return z(ye);
|
|
37409
37409
|
case "CONVERSATION_CREATED":
|
|
37410
37410
|
return c(A);
|
|
37411
37411
|
case "CONVERSATION_ERROR":
|
|
@@ -37417,7 +37417,7 @@ const cS = "This conversation with a live agent has ended. Please note that a tr
|
|
|
37417
37417
|
case "CONVERSATION_TRANSFERRED_TO_AGENT":
|
|
37418
37418
|
return;
|
|
37419
37419
|
case "MESSAGE_ADDED":
|
|
37420
|
-
return
|
|
37420
|
+
return V(ye);
|
|
37421
37421
|
case "PARTICIPANT_JOINED":
|
|
37422
37422
|
return;
|
|
37423
37423
|
case "PARTICIPANT_LEFT":
|
|
@@ -37425,14 +37425,14 @@ const cS = "This conversation with a live agent has ended. Please note that a tr
|
|
|
37425
37425
|
default:
|
|
37426
37426
|
return;
|
|
37427
37427
|
}
|
|
37428
|
-
}, { sendJsonMessage:
|
|
37429
|
-
onMessage:
|
|
37428
|
+
}, { sendJsonMessage: H } = uS(p, {
|
|
37429
|
+
onMessage: W
|
|
37430
37430
|
}), C = () => {
|
|
37431
37431
|
E(tr.FORM);
|
|
37432
|
-
const
|
|
37433
|
-
(!
|
|
37432
|
+
const G = n?.liveChat?.form;
|
|
37433
|
+
(!G || G.length === 0) && i(Rn.XPERT);
|
|
37434
37434
|
}, D = () => {
|
|
37435
|
-
|
|
37435
|
+
H({
|
|
37436
37436
|
action: "sendmessage",
|
|
37437
37437
|
event: "TERMINATE_CONVERSATION"
|
|
37438
37438
|
});
|
|
@@ -37440,26 +37440,26 @@ const cS = "This conversation with a live agent has ended. Please note that a tr
|
|
|
37440
37440
|
r({
|
|
37441
37441
|
content: cS,
|
|
37442
37442
|
role: Ie.INFO
|
|
37443
|
-
}),
|
|
37444
|
-
},
|
|
37443
|
+
}), q();
|
|
37444
|
+
}, q = () => {
|
|
37445
37445
|
c(""), y(null), E(tr.FORM), i(Rn.XPERT);
|
|
37446
37446
|
}, ne = () => {
|
|
37447
37447
|
v && clearTimeout(v), l(!0);
|
|
37448
|
-
const
|
|
37448
|
+
const G = setTimeout(() => {
|
|
37449
37449
|
l(!1);
|
|
37450
37450
|
}, 5e3);
|
|
37451
|
-
k(
|
|
37452
|
-
},
|
|
37453
|
-
const { displayName: Z } =
|
|
37451
|
+
k(G);
|
|
37452
|
+
}, z = (G) => {
|
|
37453
|
+
const { displayName: Z } = G;
|
|
37454
37454
|
m([]), s(Z ?? "An agent"), E(tr.CONVERSATION);
|
|
37455
|
-
},
|
|
37456
|
-
const { messageId: Z, text: A, timestamp: se } =
|
|
37455
|
+
}, V = (G) => {
|
|
37456
|
+
const { messageId: Z, text: A, timestamp: se } = G;
|
|
37457
37457
|
B({
|
|
37458
37458
|
content: A ?? "",
|
|
37459
37459
|
id: Z ?? "",
|
|
37460
37460
|
role: Ie.AGENT,
|
|
37461
37461
|
timestamp: se ? new Date(se) : void 0
|
|
37462
|
-
}),
|
|
37462
|
+
}), H({
|
|
37463
37463
|
action: "sendmessage",
|
|
37464
37464
|
messages: [
|
|
37465
37465
|
{
|
|
@@ -37476,20 +37476,20 @@ const cS = "This conversation with a live agent has ended. Please note that a tr
|
|
|
37476
37476
|
endLiveChat: X,
|
|
37477
37477
|
liveChatMessages: h,
|
|
37478
37478
|
pushLiveChatMessage: B,
|
|
37479
|
-
sendMessage: (
|
|
37479
|
+
sendMessage: (G) => {
|
|
37480
37480
|
B({
|
|
37481
|
-
content:
|
|
37481
|
+
content: G,
|
|
37482
37482
|
id: "",
|
|
37483
37483
|
role: Ie.USER,
|
|
37484
37484
|
timestamp: /* @__PURE__ */ new Date()
|
|
37485
|
-
}),
|
|
37485
|
+
}), H({
|
|
37486
37486
|
action: "sendmessage",
|
|
37487
37487
|
event: "OUTGOING_MESSAGE",
|
|
37488
|
-
message:
|
|
37488
|
+
message: G
|
|
37489
37489
|
});
|
|
37490
37490
|
},
|
|
37491
37491
|
sendTypingEvent: async () => {
|
|
37492
|
-
|
|
37492
|
+
H({
|
|
37493
37493
|
action: "sendmessage",
|
|
37494
37494
|
event: "TYPING"
|
|
37495
37495
|
});
|
|
@@ -37497,15 +37497,15 @@ const cS = "This conversation with a live agent has ended. Please note that a tr
|
|
|
37497
37497
|
setLiveChatMessages: m,
|
|
37498
37498
|
step: b,
|
|
37499
37499
|
setStep: E,
|
|
37500
|
-
startLiveChat: (
|
|
37500
|
+
startLiveChat: (G) => {
|
|
37501
37501
|
try {
|
|
37502
37502
|
E(tr.CONNECTING);
|
|
37503
|
-
const Z = new URLSearchParams({ ...t, ...
|
|
37503
|
+
const Z = new URLSearchParams({ ...t, ...G });
|
|
37504
37504
|
Z.append("url", window.location.href), y(
|
|
37505
37505
|
`${n?.liveChat?.socketUrl}?${Z.toString()}`
|
|
37506
37506
|
);
|
|
37507
37507
|
} catch (Z) {
|
|
37508
|
-
console.error(Z.message), a(!0),
|
|
37508
|
+
console.error(Z.message), a(!0), q();
|
|
37509
37509
|
}
|
|
37510
37510
|
},
|
|
37511
37511
|
submitSurvey: () => {
|
|
@@ -37526,7 +37526,7 @@ hm.propTypes = {
|
|
|
37526
37526
|
};
|
|
37527
37527
|
const dS = "data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20fill='%23ffffff'%20height='48'%20viewBox='0%20-960%20960%20960'%20width='48'%3e%3cpath%20d='M120-120v-300h60v198l558-558H540v-60h300v300h-60v-198L222-180h198v60H120Z'/%3e%3c/svg%3e", hS = "data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20fill='%23ffffff'%20height='48'%20viewBox='0%20-960%20960%20960'%20width='48'%3e%3cpath%20d='M370-287h360v-90H370v90ZM180-120q-24%200-42-18t-18-42v-600q0-24%2018-42t42-18h600q24%200%2042%2018t18%2042v600q0%2024-18%2042t-42%2018H180Zm0-60h600v-600H180v600Zm0-600v600-600Z'/%3e%3c/svg%3e";
|
|
37528
37528
|
function fm({ handleResizeButtonClick: e, setIsMounted: t }) {
|
|
37529
|
-
const { isMobile: n, isNormalSize: r } =
|
|
37529
|
+
const { isMobile: n, isNormalSize: r } = _e(Ht);
|
|
37530
37530
|
if (n)
|
|
37531
37531
|
return null;
|
|
37532
37532
|
const a = `${r ? "Expand" : "Shrink"} Xpert dialog width`;
|
|
@@ -37564,7 +37564,7 @@ function pm({
|
|
|
37564
37564
|
onClose: n,
|
|
37565
37565
|
isMounted: r
|
|
37566
37566
|
}) {
|
|
37567
|
-
const { conversationScreen: a } =
|
|
37567
|
+
const { conversationScreen: a } = _e(Ct), { mode: i } = _e(Ht), { setDeleteConversationModal: o, xpertMessages: s } = _e(vr), u = i === Rn.XPERT && a?.conversationHistory?.allowDeletion && !!s?.length;
|
|
37568
37568
|
return /* @__PURE__ */ S.jsxs(S.Fragment, { children: [
|
|
37569
37569
|
u && /* @__PURE__ */ S.jsx(
|
|
37570
37570
|
"button",
|
|
@@ -37669,7 +37669,7 @@ function gm({
|
|
|
37669
37669
|
setIsMounted: n,
|
|
37670
37670
|
onClose: r
|
|
37671
37671
|
}) {
|
|
37672
|
-
const { primaryColor: a, conversationScreen: i } =
|
|
37672
|
+
const { primaryColor: a, conversationScreen: i } = _e(Ct), { isMobile: o, mode: s } = _e(Ht), { step: u } = _e(zr);
|
|
37673
37673
|
return Oe(() => {
|
|
37674
37674
|
const l = document.getElementById("header-mobile");
|
|
37675
37675
|
return l && (l.style.display = "none"), () => {
|
|
@@ -37748,7 +37748,7 @@ function fS() {
|
|
|
37748
37748
|
deleteConversationModal: e,
|
|
37749
37749
|
deleteConversationHistory: t,
|
|
37750
37750
|
setDeleteConversationModal: n
|
|
37751
|
-
} =
|
|
37751
|
+
} = _e(vr), { primaryColor: r } = _e(Ct);
|
|
37752
37752
|
return e ? /* @__PURE__ */ S.jsx(
|
|
37753
37753
|
"div",
|
|
37754
37754
|
{
|
|
@@ -37798,7 +37798,7 @@ function fS() {
|
|
|
37798
37798
|
) : null;
|
|
37799
37799
|
}
|
|
37800
37800
|
const pS = () => {
|
|
37801
|
-
const { isMobile: e } =
|
|
37801
|
+
const { isMobile: e } = _e(Ht), { launchButton: t } = _e(Ct);
|
|
37802
37802
|
return t?.message?.enabled ? /* @__PURE__ */ S.jsx(
|
|
37803
37803
|
"div",
|
|
37804
37804
|
{
|
|
@@ -37815,7 +37815,7 @@ function mS() {
|
|
|
37815
37815
|
return /* @__PURE__ */ S.jsx("div", { className: "spinner" });
|
|
37816
37816
|
}
|
|
37817
37817
|
function bm() {
|
|
37818
|
-
const { conversationScreen: e, primaryColor: t, widgetMode: n } =
|
|
37818
|
+
const { conversationScreen: e, primaryColor: t, widgetMode: n } = _e(Ct), { cancelLiveChatConnection: r } = _e(zr), a = e?.liveChat?.queueMessages ?? [], i = n ? t : "#FFFFFF", o = n ? "#FFFFFF" : t;
|
|
37819
37819
|
return /* @__PURE__ */ S.jsxs("div", { className: "live-chat-connecting", style: { backgroundColor: i }, children: [
|
|
37820
37820
|
/* @__PURE__ */ S.jsx(mS, {}),
|
|
37821
37821
|
/* @__PURE__ */ S.jsx("div", { className: "live-chat-connecting-messages", style: { color: o }, children: a.length === 0 ? /* @__PURE__ */ S.jsx("p", { children: "Connecting to live agent" }) : a.map((s, u) => /* @__PURE__ */ S.jsx("p", { children: s }, `queue-message-${u}`)) }),
|
|
@@ -37848,7 +37848,7 @@ const n1 = 500, gS = [
|
|
|
37848
37848
|
}
|
|
37849
37849
|
];
|
|
37850
37850
|
function ym({ onDismiss: e }) {
|
|
37851
|
-
const [t, n] = ve(""), [r, a] = ve(!1), [i, o] = ve(null), { conversationScreen: s } =
|
|
37851
|
+
const [t, n] = ve(""), [r, a] = ve(!1), [i, o] = ve(null), { conversationScreen: s } = _e(Ct), { endLiveChat: u, submitSurvey: l, terminateConversation: c } = _e(zr), h = () => {
|
|
37852
37852
|
c(), s?.liveChat?.useSurvey ? a(!0) : u();
|
|
37853
37853
|
}, m = () => {
|
|
37854
37854
|
l({
|
|
@@ -37939,7 +37939,7 @@ function vm() {
|
|
|
37939
37939
|
liveChatMessages: n,
|
|
37940
37940
|
sendMessage: r,
|
|
37941
37941
|
sendTypingEvent: a
|
|
37942
|
-
} =
|
|
37942
|
+
} = _e(zr), i = Ze(null), [o, s] = ve(!1), u = bS(a, 5e3), l = () => {
|
|
37943
37943
|
u();
|
|
37944
37944
|
}, c = (h) => {
|
|
37945
37945
|
h.trim() !== "" && r(h);
|
|
@@ -38034,29 +38034,29 @@ const vS = "data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20wid
|
|
|
38034
38034
|
}];
|
|
38035
38035
|
}, Fs = "privacy policy";
|
|
38036
38036
|
function Tm() {
|
|
38037
|
-
const { conversationScreen: e, primaryColor: t } =
|
|
38037
|
+
const { conversationScreen: e, primaryColor: t } = _e(Ct), { startLiveChat: n } = _e(zr), { setMode: r } = _e(Ht), { form: a, formHeader: i, privacyPolicyLink: o, privacyPolicyText: s } = e.liveChat, [u, , l] = ES({}), [c, h] = ve(!1), { clearError: m, errors: p, setErrors: y } = TS(), b = Yt(
|
|
38038
38038
|
() => (s ?? "").split(Fs, 2),
|
|
38039
38039
|
[s]
|
|
38040
38040
|
), E = () => {
|
|
38041
38041
|
r(Rn.XPERT);
|
|
38042
38042
|
}, v = () => {
|
|
38043
|
-
m("privacyCheck"), h((
|
|
38044
|
-
}, k = (
|
|
38045
|
-
const D =
|
|
38043
|
+
m("privacyCheck"), h((H) => !H);
|
|
38044
|
+
}, k = (H, C) => {
|
|
38045
|
+
const D = H.target.value;
|
|
38046
38046
|
m(C), l(C, D);
|
|
38047
38047
|
}, B = () => {
|
|
38048
|
-
|
|
38048
|
+
W() && n(u);
|
|
38049
38049
|
};
|
|
38050
38050
|
Oe(() => {
|
|
38051
38051
|
(!a || a.length === 0) && n();
|
|
38052
38052
|
}, [a, n]);
|
|
38053
|
-
const
|
|
38054
|
-
const
|
|
38055
|
-
const { key: X, validations:
|
|
38053
|
+
const W = () => {
|
|
38054
|
+
const H = a.reduce((C, D) => {
|
|
38055
|
+
const { key: X, validations: q = [] } = D, ne = u[X];
|
|
38056
38056
|
if (!ne) return { ...C, [X]: "Required" };
|
|
38057
|
-
if (
|
|
38058
|
-
for (const
|
|
38059
|
-
switch (
|
|
38057
|
+
if (q?.length > 0)
|
|
38058
|
+
for (const z of q)
|
|
38059
|
+
switch (z) {
|
|
38060
38060
|
case "email": {
|
|
38061
38061
|
if (!yS(ne))
|
|
38062
38062
|
return { ...C, [X]: "Should be email" };
|
|
@@ -38065,22 +38065,22 @@ function Tm() {
|
|
|
38065
38065
|
}
|
|
38066
38066
|
return C;
|
|
38067
38067
|
}, {});
|
|
38068
|
-
return !c && s && (
|
|
38068
|
+
return !c && s && (H.privacyCheck = "Required"), y(H), Object.keys(H).length === 0;
|
|
38069
38069
|
};
|
|
38070
38070
|
return /* @__PURE__ */ S.jsxs("div", { className: "live-chat-form", children: [
|
|
38071
38071
|
i && /* @__PURE__ */ S.jsx("p", { children: i }),
|
|
38072
|
-
(a ?? []).map(({ key:
|
|
38072
|
+
(a ?? []).map(({ key: H, name: C }) => /* @__PURE__ */ S.jsxs(k2, { children: [
|
|
38073
38073
|
/* @__PURE__ */ S.jsx(
|
|
38074
38074
|
"input",
|
|
38075
38075
|
{
|
|
38076
|
-
className: `live-chat-form-input ${p[
|
|
38076
|
+
className: `live-chat-form-input ${p[H] ? "error" : ""}`,
|
|
38077
38077
|
name: C,
|
|
38078
38078
|
placeholder: C,
|
|
38079
|
-
onChange: (D) => k(D,
|
|
38079
|
+
onChange: (D) => k(D, H)
|
|
38080
38080
|
}
|
|
38081
38081
|
),
|
|
38082
|
-
p[
|
|
38083
|
-
] },
|
|
38082
|
+
p[H] && /* @__PURE__ */ S.jsx("p", { className: "live-chat-form-error", children: p[H] })
|
|
38083
|
+
] }, H)),
|
|
38084
38084
|
s && /* @__PURE__ */ S.jsxs(S.Fragment, { children: [
|
|
38085
38085
|
/* @__PURE__ */ S.jsx(
|
|
38086
38086
|
"div",
|
|
@@ -38125,7 +38125,7 @@ function Tm() {
|
|
|
38125
38125
|
},
|
|
38126
38126
|
type: "checkbox",
|
|
38127
38127
|
onChange: v,
|
|
38128
|
-
onKeyDown: (
|
|
38128
|
+
onKeyDown: (H) => H.key === "Enter" && v()
|
|
38129
38129
|
}
|
|
38130
38130
|
),
|
|
38131
38131
|
/* @__PURE__ */ S.jsx("label", { htmlFor: "privacy-check", children: "Yes, I accept" })
|
|
@@ -38148,7 +38148,7 @@ function Tm() {
|
|
|
38148
38148
|
}
|
|
38149
38149
|
Tm.propTypes = {};
|
|
38150
38150
|
function Em() {
|
|
38151
|
-
const { step: e } =
|
|
38151
|
+
const { step: e } = _e(zr);
|
|
38152
38152
|
return /* @__PURE__ */ S.jsxs("div", { className: "live-chat-container", children: [
|
|
38153
38153
|
e === tr.FORM && /* @__PURE__ */ S.jsx(Tm, {}),
|
|
38154
38154
|
e === tr.CONNECTING && /* @__PURE__ */ S.jsx(bm, {}),
|
|
@@ -38163,7 +38163,7 @@ function xm({
|
|
|
38163
38163
|
showMessage: r = !1,
|
|
38164
38164
|
style: a = {}
|
|
38165
38165
|
}) {
|
|
38166
|
-
const { proactiveMessage: i } =
|
|
38166
|
+
const { proactiveMessage: i } = _e(Ct), [o, s] = ve(!0), [u, l] = ve(!1), c = o && (!window?.OnetrustActiveGroups || window?.OnetrustActiveGroups?.includes("C0003")) && Zt.get(t) === void 0;
|
|
38167
38167
|
Oe(() => {
|
|
38168
38168
|
window?.OneTrust?.OnConsentChanged(() => {
|
|
38169
38169
|
!window?.OnetrustActiveGroups?.includes("C0003") && Zt.get(t) !== void 0 && Zt.remove(t);
|
|
@@ -38319,28 +38319,28 @@ function wS({
|
|
|
38319
38319
|
v(!0);
|
|
38320
38320
|
try {
|
|
38321
38321
|
p(!1), m(!1), y(!0);
|
|
38322
|
-
let
|
|
38323
|
-
r && (
|
|
38324
|
-
const
|
|
38322
|
+
let W = null;
|
|
38323
|
+
r && (W = gn(o)), e.current = new AbortController();
|
|
38324
|
+
const H = await fetch(n.endpoint, {
|
|
38325
38325
|
method: "POST",
|
|
38326
38326
|
headers: { "Content-Type": "application/json" },
|
|
38327
38327
|
body: JSON.stringify(
|
|
38328
38328
|
t({
|
|
38329
38329
|
messageList: [],
|
|
38330
|
-
conversationHistoryId:
|
|
38330
|
+
conversationHistoryId: W
|
|
38331
38331
|
})
|
|
38332
38332
|
),
|
|
38333
38333
|
signal: e.current.signal
|
|
38334
38334
|
});
|
|
38335
|
-
if (!
|
|
38336
|
-
throw new Error(`HTTPError: ${
|
|
38337
|
-
y(!1), await i(
|
|
38335
|
+
if (!H.ok)
|
|
38336
|
+
throw new Error(`HTTPError: ${H.status} ${H.statusText}`);
|
|
38337
|
+
y(!1), await i(H, W, "", [], /* @__PURE__ */ new Date(), {
|
|
38338
38338
|
track: !1
|
|
38339
38339
|
}), h(!1), p(!0);
|
|
38340
|
-
} catch (
|
|
38341
|
-
if (
|
|
38340
|
+
} catch (W) {
|
|
38341
|
+
if (W?.name === "AbortError")
|
|
38342
38342
|
return;
|
|
38343
|
-
y(!1), m(!0), console.error(
|
|
38343
|
+
y(!1), m(!0), console.error(W);
|
|
38344
38344
|
}
|
|
38345
38345
|
}
|
|
38346
38346
|
}, [
|
|
@@ -38429,25 +38429,25 @@ function Sm({ submitEventExternal: e = null }) {
|
|
|
38429
38429
|
userTracking: u,
|
|
38430
38430
|
webExperimentation: l,
|
|
38431
38431
|
widgetMode: c
|
|
38432
|
-
} =
|
|
38432
|
+
} = _e(Ct), {
|
|
38433
38433
|
contentRef: h,
|
|
38434
38434
|
abortControllerRef: m,
|
|
38435
38435
|
onMessageSent: p,
|
|
38436
38436
|
pushXpertMessage: y,
|
|
38437
38437
|
setXpertMessages: b,
|
|
38438
38438
|
xpertMessages: E
|
|
38439
|
-
} =
|
|
38439
|
+
} = _e(vr), {
|
|
38440
38440
|
isMobile: v,
|
|
38441
38441
|
loadingHistory: k,
|
|
38442
38442
|
mode: B,
|
|
38443
|
-
setDisableScroll:
|
|
38444
|
-
setHasError:
|
|
38443
|
+
setDisableScroll: W,
|
|
38444
|
+
setHasError: H,
|
|
38445
38445
|
setHasNewMessage: C,
|
|
38446
38446
|
setIsNormalSize: D,
|
|
38447
38447
|
setLoading: X,
|
|
38448
|
-
setLoadingHistory:
|
|
38448
|
+
setLoadingHistory: q,
|
|
38449
38449
|
setStreaming: ne
|
|
38450
|
-
} =
|
|
38450
|
+
} = _e(Ht), [, z] = ve(!1), [, V] = ve(!1), [U, I] = ve(!1), [F, Y] = ve(!1), [J, G] = ve(!1), [Z, A] = ve(!0), se = U || !c, ye = Ze(null), O = Ze(null), Ee = Zt.get(`${i}-test`) === "1", Ae = !!r && a?.startMode === "guided", Ne = Qt(
|
|
38451
38451
|
({ messageList: Se, conversationHistoryId: we }) => {
|
|
38452
38452
|
if (!t?.messagesKey)
|
|
38453
38453
|
return {};
|
|
@@ -38491,13 +38491,13 @@ function Sm({ submitEventExternal: e = null }) {
|
|
|
38491
38491
|
id: i,
|
|
38492
38492
|
isTestUser: Ee,
|
|
38493
38493
|
submitEventExternal: e,
|
|
38494
|
-
submitEventInternal:
|
|
38494
|
+
submitEventInternal: O
|
|
38495
38495
|
});
|
|
38496
38496
|
const De = Qt(
|
|
38497
38497
|
({ name: Se, payload: we }) => {
|
|
38498
38498
|
if (!n || !u?.enabled) return;
|
|
38499
38499
|
const Fe = o1(u?.payloadParams, we);
|
|
38500
|
-
e ? e({ name: Se, payload: Fe }) :
|
|
38500
|
+
e ? e({ name: Se, payload: Fe }) : O.current.track(
|
|
38501
38501
|
// TODO: this is untestable - create a custom hook to get submit event function.
|
|
38502
38502
|
Se,
|
|
38503
38503
|
Fe
|
|
@@ -38584,7 +38584,7 @@ function Sm({ submitEventExternal: e = null }) {
|
|
|
38584
38584
|
A(!0);
|
|
38585
38585
|
return;
|
|
38586
38586
|
}
|
|
38587
|
-
|
|
38587
|
+
q(!0);
|
|
38588
38588
|
try {
|
|
38589
38589
|
let Me = gn(i);
|
|
38590
38590
|
const Be = t?.baseUrl?.includes("xpert-api-services") || t?.baseUrl?.includes("localhost") ? "/v1/history" : "/xpert/v2/history", He = `conversation_id=${Me}&client_id=${t?.payloadParams?.client_id}`, K = await fetch(
|
|
@@ -38605,11 +38605,11 @@ function Sm({ submitEventExternal: e = null }) {
|
|
|
38605
38605
|
toolCalls: xe.tool_calls,
|
|
38606
38606
|
toolCallId: xe.tool_call_id
|
|
38607
38607
|
}))
|
|
38608
|
-
),
|
|
38608
|
+
), W(!0), C(!0);
|
|
38609
38609
|
} catch (Me) {
|
|
38610
38610
|
console.error(Me);
|
|
38611
38611
|
} finally {
|
|
38612
|
-
|
|
38612
|
+
q(!1), A(!0);
|
|
38613
38613
|
}
|
|
38614
38614
|
}, dt = a?.conversationHistory?.enabled && se && !F;
|
|
38615
38615
|
if (CS(
|
|
@@ -38623,7 +38623,7 @@ function Sm({ submitEventExternal: e = null }) {
|
|
|
38623
38623
|
let Se, we;
|
|
38624
38624
|
if (n)
|
|
38625
38625
|
return u?.enabled && (Se = setInterval(() => {
|
|
38626
|
-
(window.analytics?.track || e) && (
|
|
38626
|
+
(window.analytics?.track || e) && (O.current = window.analytics, clearInterval(Se), clearTimeout(we), z(!0));
|
|
38627
38627
|
}, 1e3), we = setTimeout(() => {
|
|
38628
38628
|
clearInterval(Se);
|
|
38629
38629
|
}, 6e4)), () => {
|
|
@@ -38632,7 +38632,7 @@ function Sm({ submitEventExternal: e = null }) {
|
|
|
38632
38632
|
}, [n, e, u?.enabled]), Oe(() => {
|
|
38633
38633
|
let Se, we;
|
|
38634
38634
|
const Fe = () => {
|
|
38635
|
-
l?.enabled && window.optimizely && window.experiments && (clearInterval(Se), clearTimeout(we),
|
|
38635
|
+
l?.enabled && window.optimizely && window.experiments && (clearInterval(Se), clearTimeout(we), V(!0));
|
|
38636
38636
|
};
|
|
38637
38637
|
if (n)
|
|
38638
38638
|
return Se = setInterval(Fe, 1e3), we = setTimeout(() => {
|
|
@@ -38656,12 +38656,12 @@ function Sm({ submitEventExternal: e = null }) {
|
|
|
38656
38656
|
isGuidedStartMode: Ae,
|
|
38657
38657
|
liveChatOpen: F,
|
|
38658
38658
|
loadingHistory: k,
|
|
38659
|
-
setDisableScroll:
|
|
38660
|
-
setHasError:
|
|
38659
|
+
setDisableScroll: W,
|
|
38660
|
+
setHasError: H,
|
|
38661
38661
|
setHasNewMessage: C,
|
|
38662
38662
|
setLoading: X,
|
|
38663
38663
|
xpertMessages: E
|
|
38664
|
-
}), !n || l?.enabled && !l?.experimentName && !Ee || u?.enabled && !
|
|
38664
|
+
}), !n || l?.enabled && !l?.experimentName && !Ee || u?.enabled && !O?.current?.track && !e)
|
|
38665
38665
|
return null;
|
|
38666
38666
|
const ht = async (Se, we, Fe, Me) => {
|
|
38667
38667
|
const Be = new TextDecoder("utf-8");
|
|
@@ -38740,7 +38740,7 @@ function Sm({ submitEventExternal: e = null }) {
|
|
|
38740
38740
|
if (!t?.endpoint || !t?.messagesKey || Se.trim().length === 0)
|
|
38741
38741
|
return;
|
|
38742
38742
|
const we = /* @__PURE__ */ new Date();
|
|
38743
|
-
C(!1),
|
|
38743
|
+
C(!1), H(!1);
|
|
38744
38744
|
const Fe = E.filter((K) => K.role === Ie.USER).length + 1;
|
|
38745
38745
|
De({
|
|
38746
38746
|
name: "xpert.chatbot.popup.chat.message.sent",
|
|
@@ -38788,7 +38788,7 @@ function Sm({ submitEventExternal: e = null }) {
|
|
|
38788
38788
|
},
|
|
38789
38789
|
...K && { external_id: K }
|
|
38790
38790
|
}
|
|
38791
|
-
}),
|
|
38791
|
+
}), W(!1), C(!0), X(!1);
|
|
38792
38792
|
return;
|
|
38793
38793
|
}
|
|
38794
38794
|
y({ role: Ie.USER, content: Se }), m.current = new AbortController();
|
|
@@ -38817,20 +38817,20 @@ function Sm({ submitEventExternal: e = null }) {
|
|
|
38817
38817
|
Se,
|
|
38818
38818
|
Be,
|
|
38819
38819
|
we
|
|
38820
|
-
),
|
|
38820
|
+
), W(!1), C(!0);
|
|
38821
38821
|
} catch (we) {
|
|
38822
38822
|
if (we.name === "AbortError")
|
|
38823
38823
|
return;
|
|
38824
|
-
X(!1),
|
|
38824
|
+
X(!1), H(!0), console.error(we);
|
|
38825
38825
|
}
|
|
38826
38826
|
}, kn = () => {
|
|
38827
|
-
Y(!1),
|
|
38827
|
+
Y(!1), I(!0), D(!0), Ye();
|
|
38828
38828
|
}, ln = (Se) => {
|
|
38829
38829
|
D(Se);
|
|
38830
38830
|
}, vn = () => {
|
|
38831
|
-
|
|
38831
|
+
I(!0), D(!0), Ye();
|
|
38832
38832
|
}, ge = () => {
|
|
38833
|
-
|
|
38833
|
+
I(!1), G(!1);
|
|
38834
38834
|
}, We = o?.animatedGraduate?.enabled, rt = s?.enabled ? v ? s?.style?.mobile : s?.style : null;
|
|
38835
38835
|
return (
|
|
38836
38836
|
// do not remove this class as it's needed to turn off chatbot
|
|
@@ -38893,7 +38893,7 @@ function Sm({ submitEventExternal: e = null }) {
|
|
|
38893
38893
|
onClose: ge,
|
|
38894
38894
|
handleResizeButtonClick: ln,
|
|
38895
38895
|
isMounted: J,
|
|
38896
|
-
setIsMounted:
|
|
38896
|
+
setIsMounted: G
|
|
38897
38897
|
}
|
|
38898
38898
|
),
|
|
38899
38899
|
/* @__PURE__ */ S.jsx(fS, {}),
|