@schmitech/chatbot-widget 0.3.1 → 0.3.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/chatbot-widget.bundle.js +25 -26
- package/dist/chatbot-widget.es.js +524 -518
- package/dist/chatbot-widget.umd.js +25 -26
- package/dist/index.d.ts +1 -1
- package/package.json +2 -2
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import at, { forwardRef as io, createElement as
|
|
1
|
+
import at, { forwardRef as io, createElement as Gn, useState as Te, useRef as je, useEffect as He } from "react";
|
|
2
2
|
typeof window < "u" && (window.global = window);
|
|
3
|
-
var
|
|
4
|
-
function
|
|
3
|
+
var Xn = {}, Mt = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof Xn < "u" ? Xn : typeof self < "u" ? self : {};
|
|
4
|
+
function _n(e) {
|
|
5
5
|
return e && e.__esModule && Object.prototype.hasOwnProperty.call(e, "default") ? e.default : e;
|
|
6
6
|
}
|
|
7
|
-
var pn = { exports: {} },
|
|
7
|
+
var pn = { exports: {} }, kt = {};
|
|
8
8
|
/**
|
|
9
9
|
* @license React
|
|
10
10
|
* react-jsx-runtime.production.min.js
|
|
@@ -14,10 +14,10 @@ var pn = { exports: {} }, wt = {};
|
|
|
14
14
|
* This source code is licensed under the MIT license found in the
|
|
15
15
|
* LICENSE file in the root directory of this source tree.
|
|
16
16
|
*/
|
|
17
|
-
var
|
|
17
|
+
var Qn;
|
|
18
18
|
function oo() {
|
|
19
|
-
if (
|
|
20
|
-
|
|
19
|
+
if (Qn) return kt;
|
|
20
|
+
Qn = 1;
|
|
21
21
|
var e = at, t = Symbol.for("react.element"), n = Symbol.for("react.fragment"), r = Object.prototype.hasOwnProperty, i = e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner, o = { key: !0, ref: !0, __self: !0, __source: !0 };
|
|
22
22
|
function l(a, u, f) {
|
|
23
23
|
var s, c = {}, h = null, p = null;
|
|
@@ -26,12 +26,12 @@ function oo() {
|
|
|
26
26
|
if (a && a.defaultProps) for (s in u = a.defaultProps, u) c[s] === void 0 && (c[s] = u[s]);
|
|
27
27
|
return { $$typeof: t, type: a, key: h, ref: p, props: c, _owner: i.current };
|
|
28
28
|
}
|
|
29
|
-
return
|
|
29
|
+
return kt.Fragment = n, kt.jsx = l, kt.jsxs = l, kt;
|
|
30
30
|
}
|
|
31
|
-
var
|
|
31
|
+
var vt = {}, Jn;
|
|
32
32
|
function lo() {
|
|
33
|
-
if (
|
|
34
|
-
|
|
33
|
+
if (Jn) return vt;
|
|
34
|
+
Jn = 1;
|
|
35
35
|
var e = {};
|
|
36
36
|
/**
|
|
37
37
|
* @license React
|
|
@@ -68,10 +68,10 @@ function lo() {
|
|
|
68
68
|
ne.unshift("Warning: " + S), Function.prototype.apply.call(console[m], console, ne);
|
|
69
69
|
}
|
|
70
70
|
}
|
|
71
|
-
var B = !1, w = !1, L = !1, W = !1,
|
|
71
|
+
var B = !1, w = !1, L = !1, W = !1, D = !1, q;
|
|
72
72
|
q = Symbol.for("react.module.reference");
|
|
73
73
|
function P(m) {
|
|
74
|
-
return !!(typeof m == "string" || typeof m == "function" || m === i || m === l ||
|
|
74
|
+
return !!(typeof m == "string" || typeof m == "function" || m === i || m === l || D || m === o || m === s || m === c || W || m === y || B || w || L || typeof m == "object" && m !== null && (m.$$typeof === p || m.$$typeof === h || m.$$typeof === a || m.$$typeof === u || m.$$typeof === f || // This needs to include all possible module reference object
|
|
75
75
|
// types supported by any Flight configuration anywhere since
|
|
76
76
|
// we don't know which Flight build this will end up being used
|
|
77
77
|
// with.
|
|
@@ -210,8 +210,8 @@ function lo() {
|
|
|
210
210
|
}
|
|
211
211
|
var he = !1, Le;
|
|
212
212
|
{
|
|
213
|
-
var
|
|
214
|
-
Le = new
|
|
213
|
+
var bt = typeof WeakMap == "function" ? WeakMap : Map;
|
|
214
|
+
Le = new bt();
|
|
215
215
|
}
|
|
216
216
|
function ut(m, S) {
|
|
217
217
|
if (!m || he)
|
|
@@ -284,7 +284,7 @@ function lo() {
|
|
|
284
284
|
var ft = m ? m.displayName || m.name : "", nt = ft ? Re(ft) : "";
|
|
285
285
|
return typeof m == "function" && Le.set(m, nt), nt;
|
|
286
286
|
}
|
|
287
|
-
function
|
|
287
|
+
function wt(m, S, I) {
|
|
288
288
|
return ut(m, !1);
|
|
289
289
|
}
|
|
290
290
|
function et(m) {
|
|
@@ -307,7 +307,7 @@ function lo() {
|
|
|
307
307
|
if (typeof m == "object")
|
|
308
308
|
switch (m.$$typeof) {
|
|
309
309
|
case f:
|
|
310
|
-
return
|
|
310
|
+
return wt(m.render);
|
|
311
311
|
case h:
|
|
312
312
|
return Ke(m.type, S, I);
|
|
313
313
|
case p: {
|
|
@@ -465,20 +465,20 @@ function lo() {
|
|
|
465
465
|
return Qe(m, $, Ee, Z, F, j.current, G);
|
|
466
466
|
}
|
|
467
467
|
}
|
|
468
|
-
var qt = A.ReactCurrentOwner,
|
|
468
|
+
var qt = A.ReactCurrentOwner, Hn = A.ReactDebugCurrentFrame;
|
|
469
469
|
function ct(m) {
|
|
470
470
|
if (m) {
|
|
471
471
|
var S = m._owner, I = Ke(m.type, m._source, S ? S.type : null);
|
|
472
|
-
|
|
472
|
+
Hn.setExtraStackFrame(I);
|
|
473
473
|
} else
|
|
474
|
-
|
|
474
|
+
Hn.setExtraStackFrame(null);
|
|
475
475
|
}
|
|
476
476
|
var $t;
|
|
477
477
|
$t = !1;
|
|
478
478
|
function Yt(m) {
|
|
479
479
|
return typeof m == "object" && m !== null && m.$$typeof === n;
|
|
480
480
|
}
|
|
481
|
-
function
|
|
481
|
+
function Vn() {
|
|
482
482
|
{
|
|
483
483
|
if (qt.current) {
|
|
484
484
|
var m = Y(qt.current.type);
|
|
@@ -493,10 +493,10 @@ Check the render method of \`` + m + "`.";
|
|
|
493
493
|
function Ki(m) {
|
|
494
494
|
return "";
|
|
495
495
|
}
|
|
496
|
-
var
|
|
496
|
+
var Wn = {};
|
|
497
497
|
function Gi(m) {
|
|
498
498
|
{
|
|
499
|
-
var S =
|
|
499
|
+
var S = Vn();
|
|
500
500
|
if (!S) {
|
|
501
501
|
var I = typeof m == "string" ? m : m.displayName || m.name;
|
|
502
502
|
I && (S = `
|
|
@@ -506,27 +506,27 @@ Check the top-level render call using <` + I + ">.");
|
|
|
506
506
|
return S;
|
|
507
507
|
}
|
|
508
508
|
}
|
|
509
|
-
function
|
|
509
|
+
function qn(m, S) {
|
|
510
510
|
{
|
|
511
511
|
if (!m._store || m._store.validated || m.key != null)
|
|
512
512
|
return;
|
|
513
513
|
m._store.validated = !0;
|
|
514
514
|
var I = Gi(S);
|
|
515
|
-
if (
|
|
515
|
+
if (Wn[I])
|
|
516
516
|
return;
|
|
517
|
-
|
|
517
|
+
Wn[I] = !0;
|
|
518
518
|
var F = "";
|
|
519
519
|
m && m._owner && m._owner !== qt.current && (F = " It was passed a child from " + Y(m._owner.type) + "."), ct(m), v('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.', I, F), ct(null);
|
|
520
520
|
}
|
|
521
521
|
}
|
|
522
|
-
function
|
|
522
|
+
function $n(m, S) {
|
|
523
523
|
{
|
|
524
524
|
if (typeof m != "object")
|
|
525
525
|
return;
|
|
526
526
|
if (tt(m))
|
|
527
527
|
for (var I = 0; I < m.length; I++) {
|
|
528
528
|
var F = m[I];
|
|
529
|
-
Yt(F) &&
|
|
529
|
+
Yt(F) && qn(F, S);
|
|
530
530
|
}
|
|
531
531
|
else if (Yt(m))
|
|
532
532
|
m._store && (m._store.validated = !0);
|
|
@@ -534,7 +534,7 @@ Check the top-level render call using <` + I + ">.");
|
|
|
534
534
|
var Z = k(m);
|
|
535
535
|
if (typeof Z == "function" && Z !== m.entries)
|
|
536
536
|
for (var ne = Z.call(m), G; !(G = ne.next()).done; )
|
|
537
|
-
Yt(G.value) &&
|
|
537
|
+
Yt(G.value) && qn(G.value, S);
|
|
538
538
|
}
|
|
539
539
|
}
|
|
540
540
|
}
|
|
@@ -575,15 +575,15 @@ Check the top-level render call using <` + I + ">.");
|
|
|
575
575
|
m.ref !== null && (ct(m), v("Invalid attribute `ref` supplied to `React.Fragment`."), ct(null));
|
|
576
576
|
}
|
|
577
577
|
}
|
|
578
|
-
var
|
|
579
|
-
function
|
|
578
|
+
var Yn = {};
|
|
579
|
+
function Kn(m, S, I, F, Z, ne) {
|
|
580
580
|
{
|
|
581
581
|
var G = P(m);
|
|
582
582
|
if (!G) {
|
|
583
583
|
var $ = "";
|
|
584
584
|
(m === void 0 || typeof m == "object" && m !== null && Object.keys(m).length === 0) && ($ += " You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.");
|
|
585
585
|
var Ee = Ki();
|
|
586
|
-
Ee ? $ += Ee : $ +=
|
|
586
|
+
Ee ? $ += Ee : $ += Vn();
|
|
587
587
|
var ue;
|
|
588
588
|
m === null ? ue = "null" : tt(m) ? ue = "array" : m !== void 0 && m.$$typeof === n ? (ue = "<" + (Y(m.type) || "Unknown") + " />", $ = " Did you accidentally export a JSX literal instead of a component?") : ue = typeof m, v("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s", ue, $);
|
|
589
589
|
}
|
|
@@ -596,39 +596,39 @@ Check the top-level render call using <` + I + ">.");
|
|
|
596
596
|
if (F)
|
|
597
597
|
if (tt(Me)) {
|
|
598
598
|
for (var ft = 0; ft < Me.length; ft++)
|
|
599
|
-
|
|
599
|
+
$n(Me[ft], m);
|
|
600
600
|
Object.freeze && Object.freeze(Me);
|
|
601
601
|
} else
|
|
602
602
|
v("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");
|
|
603
603
|
else
|
|
604
|
-
|
|
604
|
+
$n(Me, m);
|
|
605
605
|
}
|
|
606
606
|
if (O.call(S, "key")) {
|
|
607
607
|
var nt = Y(m), _e = Object.keys(S).filter(function(ro) {
|
|
608
608
|
return ro !== "key";
|
|
609
609
|
}), Kt = _e.length > 0 ? "{key: someKey, " + _e.join(": ..., ") + ": ...}" : "{key: someKey}";
|
|
610
|
-
if (!
|
|
610
|
+
if (!Yn[nt + Kt]) {
|
|
611
611
|
var no = _e.length > 0 ? "{" + _e.join(": ..., ") + ": ...}" : "{}";
|
|
612
612
|
v(`A props object containing a "key" prop is being spread into JSX:
|
|
613
613
|
let props = %s;
|
|
614
614
|
<%s {...props} />
|
|
615
615
|
React keys must be passed directly to JSX without using spread:
|
|
616
616
|
let props = %s;
|
|
617
|
-
<%s key={someKey} {...props} />`, Kt, nt, no, nt),
|
|
617
|
+
<%s key={someKey} {...props} />`, Kt, nt, no, nt), Yn[nt + Kt] = !0;
|
|
618
618
|
}
|
|
619
619
|
}
|
|
620
620
|
return m === i ? Qi(ce) : Xi(ce), ce;
|
|
621
621
|
}
|
|
622
622
|
}
|
|
623
623
|
function Ji(m, S, I) {
|
|
624
|
-
return
|
|
624
|
+
return Kn(m, S, I, !0);
|
|
625
625
|
}
|
|
626
626
|
function Zi(m, S, I) {
|
|
627
|
-
return
|
|
627
|
+
return Kn(m, S, I, !1);
|
|
628
628
|
}
|
|
629
629
|
var eo = Zi, to = Ji;
|
|
630
|
-
|
|
631
|
-
}(),
|
|
630
|
+
vt.Fragment = i, vt.jsx = eo, vt.jsxs = to;
|
|
631
|
+
}(), vt;
|
|
632
632
|
}
|
|
633
633
|
var ao = {};
|
|
634
634
|
ao.NODE_ENV === "production" ? pn.exports = oo() : pn.exports = lo();
|
|
@@ -666,7 +666,7 @@ const uo = (e) => e.replace(/([a-z0-9])([A-Z])/g, "$1-$2").toLowerCase().trim(),
|
|
|
666
666
|
className: a = "",
|
|
667
667
|
children: u,
|
|
668
668
|
...f
|
|
669
|
-
}, s) =>
|
|
669
|
+
}, s) => Gn(
|
|
670
670
|
"svg",
|
|
671
671
|
{
|
|
672
672
|
ref: s,
|
|
@@ -679,7 +679,7 @@ const uo = (e) => e.replace(/([a-z0-9])([A-Z])/g, "$1-$2").toLowerCase().trim(),
|
|
|
679
679
|
...f
|
|
680
680
|
},
|
|
681
681
|
[
|
|
682
|
-
...t.map(([c, h]) =>
|
|
682
|
+
...t.map(([c, h]) => Gn(c, h)),
|
|
683
683
|
...Array.isArray(u) ? u : [u]
|
|
684
684
|
]
|
|
685
685
|
)
|
|
@@ -776,7 +776,7 @@ const xo = Oe("Info", [
|
|
|
776
776
|
* This source code is licensed under the ISC license.
|
|
777
777
|
* See the LICENSE file in the root directory of this source tree.
|
|
778
778
|
*/
|
|
779
|
-
const
|
|
779
|
+
const ni = Oe("MessageCircle", [
|
|
780
780
|
["path", { d: "M7.9 20A9 9 0 1 0 4 16.1L2 22Z", key: "vv11sd" }]
|
|
781
781
|
]);
|
|
782
782
|
/**
|
|
@@ -794,7 +794,7 @@ const bo = Oe("MessageSquare", [
|
|
|
794
794
|
* This source code is licensed under the ISC license.
|
|
795
795
|
* See the LICENSE file in the root directory of this source tree.
|
|
796
796
|
*/
|
|
797
|
-
const
|
|
797
|
+
const Zn = Oe("Minimize2", [
|
|
798
798
|
["polyline", { points: "4 14 10 14 10 20", key: "11kfnr" }],
|
|
799
799
|
["polyline", { points: "20 10 14 10 14 4", key: "rlmsce" }],
|
|
800
800
|
["line", { x1: "14", x2: "21", y1: "10", y2: "3", key: "o5lafz" }],
|
|
@@ -841,7 +841,7 @@ const vo = Oe("Trash2", [
|
|
|
841
841
|
["path", { d: "M8 6V4c0-1 1-2 2-2h4c1 0 2 1 2 2v2", key: "v07s0e" }],
|
|
842
842
|
["line", { x1: "10", x2: "10", y1: "11", y2: "17", key: "1uufr5" }],
|
|
843
843
|
["line", { x1: "14", x2: "14", y1: "11", y2: "17", key: "xtxkd" }]
|
|
844
|
-
]), So = {},
|
|
844
|
+
]), So = {}, er = (e) => {
|
|
845
845
|
let t;
|
|
846
846
|
const n = /* @__PURE__ */ new Set(), r = (s, c) => {
|
|
847
847
|
const h = typeof s == "function" ? s(t) : s;
|
|
@@ -855,7 +855,7 @@ const vo = Oe("Trash2", [
|
|
|
855
855
|
), n.clear();
|
|
856
856
|
} }, f = t = e(r, i, u);
|
|
857
857
|
return u;
|
|
858
|
-
}, Eo = (e) => e ?
|
|
858
|
+
}, Eo = (e) => e ? er(e) : er;
|
|
859
859
|
var hn = { exports: {} }, Gt = {}, Rt = { exports: {} }, Xt = {};
|
|
860
860
|
/**
|
|
861
861
|
* @license React
|
|
@@ -866,10 +866,10 @@ var hn = { exports: {} }, Gt = {}, Rt = { exports: {} }, Xt = {};
|
|
|
866
866
|
* This source code is licensed under the MIT license found in the
|
|
867
867
|
* LICENSE file in the root directory of this source tree.
|
|
868
868
|
*/
|
|
869
|
-
var
|
|
869
|
+
var tr;
|
|
870
870
|
function Co() {
|
|
871
|
-
if (
|
|
872
|
-
|
|
871
|
+
if (tr) return Xt;
|
|
872
|
+
tr = 1;
|
|
873
873
|
var e = at;
|
|
874
874
|
function t(c, h) {
|
|
875
875
|
return c === h && (c !== 0 || 1 / c === 1 / h) || c !== c && h !== h;
|
|
@@ -907,10 +907,10 @@ function Co() {
|
|
|
907
907
|
var s = typeof window > "u" || typeof window.document > "u" || typeof window.document.createElement > "u" ? f : a;
|
|
908
908
|
return Xt.useSyncExternalStore = e.useSyncExternalStore !== void 0 ? e.useSyncExternalStore : s, Xt;
|
|
909
909
|
}
|
|
910
|
-
var Qt = {},
|
|
910
|
+
var Qt = {}, nr;
|
|
911
911
|
function _o() {
|
|
912
|
-
if (
|
|
913
|
-
|
|
912
|
+
if (nr) return Qt;
|
|
913
|
+
nr = 1;
|
|
914
914
|
var e = {};
|
|
915
915
|
/**
|
|
916
916
|
* @license React
|
|
@@ -972,10 +972,10 @@ function _o() {
|
|
|
972
972
|
Qt.useSyncExternalStore = o.useSyncExternalStore !== void 0 ? o.useSyncExternalStore : p, typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ < "u" && typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop == "function" && __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(Error());
|
|
973
973
|
}(), Qt;
|
|
974
974
|
}
|
|
975
|
-
var
|
|
976
|
-
function
|
|
977
|
-
if (
|
|
978
|
-
|
|
975
|
+
var rr;
|
|
976
|
+
function ri() {
|
|
977
|
+
if (rr) return Rt.exports;
|
|
978
|
+
rr = 1;
|
|
979
979
|
var e = {};
|
|
980
980
|
return e.NODE_ENV === "production" ? Rt.exports = Co() : Rt.exports = _o(), Rt.exports;
|
|
981
981
|
}
|
|
@@ -988,11 +988,11 @@ function oi() {
|
|
|
988
988
|
* This source code is licensed under the MIT license found in the
|
|
989
989
|
* LICENSE file in the root directory of this source tree.
|
|
990
990
|
*/
|
|
991
|
-
var
|
|
991
|
+
var ir;
|
|
992
992
|
function To() {
|
|
993
|
-
if (
|
|
994
|
-
|
|
995
|
-
var e = at, t =
|
|
993
|
+
if (ir) return Gt;
|
|
994
|
+
ir = 1;
|
|
995
|
+
var e = at, t = ri();
|
|
996
996
|
function n(f, s) {
|
|
997
997
|
return f === s && (f !== 0 || 1 / f === 1 / s) || f !== f && s !== s;
|
|
998
998
|
}
|
|
@@ -1039,10 +1039,10 @@ function To() {
|
|
|
1039
1039
|
), u(T), T;
|
|
1040
1040
|
}, Gt;
|
|
1041
1041
|
}
|
|
1042
|
-
var Jt = {},
|
|
1042
|
+
var Jt = {}, or;
|
|
1043
1043
|
function Io() {
|
|
1044
|
-
if (
|
|
1045
|
-
|
|
1044
|
+
if (or) return Jt;
|
|
1045
|
+
or = 1;
|
|
1046
1046
|
var e = {};
|
|
1047
1047
|
/**
|
|
1048
1048
|
* @license React
|
|
@@ -1058,7 +1058,7 @@ function Io() {
|
|
|
1058
1058
|
return s === c && (s !== 0 || 1 / s === 1 / c) || s !== s && c !== c;
|
|
1059
1059
|
}
|
|
1060
1060
|
typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ < "u" && typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart == "function" && __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(Error());
|
|
1061
|
-
var n = at, r =
|
|
1061
|
+
var n = at, r = ri(), i = typeof Object.is == "function" ? Object.is : t, o = r.useSyncExternalStore, l = n.useRef, a = n.useEffect, u = n.useMemo, f = n.useDebugValue;
|
|
1062
1062
|
Jt.useSyncExternalStoreWithSelector = function(s, c, h, p, y) {
|
|
1063
1063
|
var x = l(null);
|
|
1064
1064
|
if (x.current === null) {
|
|
@@ -1078,8 +1078,8 @@ function Io() {
|
|
|
1078
1078
|
}
|
|
1079
1079
|
if (W = B, i(M, L))
|
|
1080
1080
|
return W;
|
|
1081
|
-
var
|
|
1082
|
-
return y !== void 0 && y(W,
|
|
1081
|
+
var D = p(L);
|
|
1082
|
+
return y !== void 0 && y(W, D) ? (M = L, W) : (M = L, B = D);
|
|
1083
1083
|
}
|
|
1084
1084
|
var v = !1, M, B, w = h === void 0 ? null : h;
|
|
1085
1085
|
return [
|
|
@@ -1106,13 +1106,13 @@ function Io() {
|
|
|
1106
1106
|
var Ao = {};
|
|
1107
1107
|
Ao.NODE_ENV === "production" ? hn.exports = To() : hn.exports = Io();
|
|
1108
1108
|
var Oo = hn.exports;
|
|
1109
|
-
const Po = /* @__PURE__ */
|
|
1110
|
-
let
|
|
1109
|
+
const Po = /* @__PURE__ */ _n(Oo), ii = {}, { useDebugValue: Ro } = at, { useSyncExternalStoreWithSelector: Lo } = Po;
|
|
1110
|
+
let lr = !1;
|
|
1111
1111
|
const jo = (e) => e;
|
|
1112
|
-
function
|
|
1113
|
-
(
|
|
1112
|
+
function No(e, t = jo, n) {
|
|
1113
|
+
(ii ? "production" : void 0) !== "production" && n && !lr && (console.warn(
|
|
1114
1114
|
"[DEPRECATED] Use `createWithEqualityFn` instead of `create` or use `useStoreWithEqualityFn` instead of `useStore`. They can be imported from 'zustand/traditional'. https://github.com/pmndrs/zustand/discussions/1937"
|
|
1115
|
-
),
|
|
1115
|
+
), lr = !0);
|
|
1116
1116
|
const r = Lo(
|
|
1117
1117
|
e.subscribe,
|
|
1118
1118
|
e.getState,
|
|
@@ -1122,43 +1122,35 @@ function Do(e, t = jo, n) {
|
|
|
1122
1122
|
);
|
|
1123
1123
|
return Ro(r), r;
|
|
1124
1124
|
}
|
|
1125
|
-
const
|
|
1126
|
-
(
|
|
1125
|
+
const ar = (e) => {
|
|
1126
|
+
(ii ? "production" : void 0) !== "production" && typeof e != "function" && console.warn(
|
|
1127
1127
|
"[DEPRECATED] Passing a vanilla store will be unsupported in a future version. Instead use `import { useStore } from 'zustand'`."
|
|
1128
1128
|
);
|
|
1129
|
-
const t = typeof e == "function" ? Eo(e) : e, n = (r, i) =>
|
|
1129
|
+
const t = typeof e == "function" ? Eo(e) : e, n = (r, i) => No(t, r, i);
|
|
1130
1130
|
return Object.assign(n, t), n;
|
|
1131
|
-
},
|
|
1132
|
-
let dn = null,
|
|
1133
|
-
const Fo = (e, t, n) => {
|
|
1131
|
+
}, Do = (e) => e ? ar(e) : ar;
|
|
1132
|
+
let dn = null, oi = null, li = null;
|
|
1133
|
+
const Fo = (e, t = null, n = null) => {
|
|
1134
1134
|
if (!e || typeof e != "string")
|
|
1135
1135
|
throw new Error("API URL must be a valid string");
|
|
1136
|
-
if (
|
|
1137
|
-
throw new Error("API key must be a valid string");
|
|
1138
|
-
if (
|
|
1139
|
-
throw new Error("Session ID must be a valid string");
|
|
1140
|
-
dn = e,
|
|
1136
|
+
if (t !== null && typeof t != "string")
|
|
1137
|
+
throw new Error("API key must be a valid string or null");
|
|
1138
|
+
if (n !== null && typeof n != "string")
|
|
1139
|
+
throw new Error("Session ID must be a valid string or null");
|
|
1140
|
+
dn = e, oi = t, li = n;
|
|
1141
1141
|
}, Mo = () => {
|
|
1142
1142
|
if (!dn)
|
|
1143
1143
|
throw new Error("API URL not configured. Please call configureApi() with your server URL before using any API functions.");
|
|
1144
1144
|
return dn;
|
|
1145
|
-
}, zo = () => {
|
|
1146
|
-
if (!mn)
|
|
1147
|
-
throw new Error("API key not configured. Please call configureApi() with your API key before using any API functions.");
|
|
1148
|
-
return mn;
|
|
1149
|
-
}, Bo = () => {
|
|
1150
|
-
if (!gn)
|
|
1151
|
-
throw new Error("Session ID not configured. Please call configureApi() with your session ID before using any API functions.");
|
|
1152
|
-
return gn;
|
|
1153
|
-
}, Uo = (e, t = {}) => {
|
|
1145
|
+
}, zo = () => oi, Bo = () => li, Uo = (e, t = {}) => {
|
|
1154
1146
|
e.startsWith("https:");
|
|
1155
1147
|
const r = {
|
|
1156
1148
|
Connection: "keep-alive",
|
|
1157
|
-
"X-Request-ID": Date.now().toString(36) + Math.random().toString(36).substring(2)
|
|
1158
|
-
|
|
1159
|
-
|
|
1160
|
-
|
|
1161
|
-
return {
|
|
1149
|
+
"X-Request-ID": Date.now().toString(36) + Math.random().toString(36).substring(2)
|
|
1150
|
+
}, i = zo();
|
|
1151
|
+
i && (r["X-API-Key"] = i);
|
|
1152
|
+
const o = Bo();
|
|
1153
|
+
return o && (r["X-Session-ID"] = o), {
|
|
1162
1154
|
...t,
|
|
1163
1155
|
headers: {
|
|
1164
1156
|
...t.headers,
|
|
@@ -1182,7 +1174,7 @@ const Fo = (e, t, n) => {
|
|
|
1182
1174
|
async function* Vo(e, t = !0) {
|
|
1183
1175
|
var n, r, i, o, l, a, u, f, s;
|
|
1184
1176
|
try {
|
|
1185
|
-
const c = Mo(), h = new AbortController(), p = setTimeout(() => h.abort(),
|
|
1177
|
+
const c = Mo(), h = new AbortController(), p = setTimeout(() => h.abort(), 6e4), y = await fetch(`${c}/v1/chat`, {
|
|
1186
1178
|
...Uo(c, {
|
|
1187
1179
|
method: "POST",
|
|
1188
1180
|
headers: {
|
|
@@ -1228,17 +1220,17 @@ async function* Vo(e, t = !0) {
|
|
|
1228
1220
|
yield { text: "", done: !0 };
|
|
1229
1221
|
break;
|
|
1230
1222
|
}
|
|
1231
|
-
const
|
|
1232
|
-
if (
|
|
1223
|
+
const D = JSON.parse(W);
|
|
1224
|
+
if (D.result) {
|
|
1233
1225
|
let q = "";
|
|
1234
|
-
if (
|
|
1226
|
+
if (D.result.type === "start")
|
|
1235
1227
|
continue;
|
|
1236
|
-
if (
|
|
1237
|
-
const P =
|
|
1228
|
+
if (D.result.type === "chunk" && D.result.chunk ? q = D.result.chunk.content : D.result.type === "complete" && ((u = (a = D.result.output) == null ? void 0 : a.messages) != null && u[0]) && (q = D.result.output.messages[0].content), q) {
|
|
1229
|
+
const P = sr(q, A);
|
|
1238
1230
|
P ? (A += P, yield {
|
|
1239
1231
|
text: P,
|
|
1240
|
-
done:
|
|
1241
|
-
}) :
|
|
1232
|
+
done: D.result.type === "complete"
|
|
1233
|
+
}) : D.result.type === "complete" && (yield { text: "", done: !0 });
|
|
1242
1234
|
}
|
|
1243
1235
|
}
|
|
1244
1236
|
} catch (W) {
|
|
@@ -1254,7 +1246,7 @@ async function* Vo(e, t = !0) {
|
|
|
1254
1246
|
if (v !== "[DONE]") {
|
|
1255
1247
|
const M = JSON.parse(v);
|
|
1256
1248
|
if ((s = (f = M.result) == null ? void 0 : f.chunk) != null && s.content) {
|
|
1257
|
-
const B =
|
|
1249
|
+
const B = sr(M.result.chunk.content, A);
|
|
1258
1250
|
B && (yield {
|
|
1259
1251
|
text: B,
|
|
1260
1252
|
done: M.result.type === "complete"
|
|
@@ -1277,7 +1269,7 @@ async function* Vo(e, t = !0) {
|
|
|
1277
1269
|
};
|
|
1278
1270
|
}
|
|
1279
1271
|
}
|
|
1280
|
-
function
|
|
1272
|
+
function sr(e, t) {
|
|
1281
1273
|
if (!t) return e;
|
|
1282
1274
|
if (t.endsWith(e)) return "";
|
|
1283
1275
|
if (e.length > t.length) {
|
|
@@ -1310,7 +1302,7 @@ function Wo() {
|
|
|
1310
1302
|
});
|
|
1311
1303
|
}
|
|
1312
1304
|
ai();
|
|
1313
|
-
const si =
|
|
1305
|
+
const si = Do((e, t) => ({
|
|
1314
1306
|
messages: [],
|
|
1315
1307
|
isLoading: !1,
|
|
1316
1308
|
error: null,
|
|
@@ -1363,14 +1355,14 @@ function qo(e, t) {
|
|
|
1363
1355
|
).trim();
|
|
1364
1356
|
}
|
|
1365
1357
|
const $o = /^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u, Yo = /^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u, Ko = {};
|
|
1366
|
-
function
|
|
1358
|
+
function ur(e, t) {
|
|
1367
1359
|
return (Ko.jsx ? Yo : $o).test(e);
|
|
1368
1360
|
}
|
|
1369
1361
|
const Go = /[ \t\n\f\r]/g;
|
|
1370
1362
|
function Xo(e) {
|
|
1371
|
-
return typeof e == "object" ? e.type === "text" ?
|
|
1363
|
+
return typeof e == "object" ? e.type === "text" ? cr(e.value) : !1 : cr(e);
|
|
1372
1364
|
}
|
|
1373
|
-
function
|
|
1365
|
+
function cr(e) {
|
|
1374
1366
|
return e.replace(Go, "") === "";
|
|
1375
1367
|
}
|
|
1376
1368
|
class At {
|
|
@@ -1397,7 +1389,7 @@ function ui(e, t) {
|
|
|
1397
1389
|
Object.assign(n, i.property), Object.assign(r, i.normal);
|
|
1398
1390
|
return new At(n, r, t);
|
|
1399
1391
|
}
|
|
1400
|
-
function
|
|
1392
|
+
function mn(e) {
|
|
1401
1393
|
return e.toLowerCase();
|
|
1402
1394
|
}
|
|
1403
1395
|
class Pe {
|
|
@@ -1426,24 +1418,24 @@ Pe.prototype.property = "";
|
|
|
1426
1418
|
Pe.prototype.spaceSeparated = !1;
|
|
1427
1419
|
Pe.prototype.space = void 0;
|
|
1428
1420
|
let Qo = 0;
|
|
1429
|
-
const V = st(), fe = st(),
|
|
1421
|
+
const V = st(), fe = st(), gn = st(), _ = st(), re = st(), dt = st(), Ne = st();
|
|
1430
1422
|
function st() {
|
|
1431
1423
|
return 2 ** ++Qo;
|
|
1432
1424
|
}
|
|
1433
|
-
const
|
|
1425
|
+
const yn = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
1434
1426
|
__proto__: null,
|
|
1435
1427
|
boolean: V,
|
|
1436
1428
|
booleanish: fe,
|
|
1437
|
-
commaOrSpaceSeparated:
|
|
1429
|
+
commaOrSpaceSeparated: Ne,
|
|
1438
1430
|
commaSeparated: dt,
|
|
1439
1431
|
number: _,
|
|
1440
|
-
overloadedBoolean:
|
|
1432
|
+
overloadedBoolean: gn,
|
|
1441
1433
|
spaceSeparated: re
|
|
1442
1434
|
}, Symbol.toStringTag, { value: "Module" })), Zt = (
|
|
1443
1435
|
/** @type {ReadonlyArray<keyof typeof types>} */
|
|
1444
|
-
Object.keys(
|
|
1436
|
+
Object.keys(yn)
|
|
1445
1437
|
);
|
|
1446
|
-
class
|
|
1438
|
+
class Tn extends Pe {
|
|
1447
1439
|
/**
|
|
1448
1440
|
* @constructor
|
|
1449
1441
|
* @param {string} property
|
|
@@ -1459,31 +1451,31 @@ class An extends Pe {
|
|
|
1459
1451
|
*/
|
|
1460
1452
|
constructor(t, n, r, i) {
|
|
1461
1453
|
let o = -1;
|
|
1462
|
-
if (super(t, n),
|
|
1454
|
+
if (super(t, n), fr(this, "space", i), typeof r == "number")
|
|
1463
1455
|
for (; ++o < Zt.length; ) {
|
|
1464
1456
|
const l = Zt[o];
|
|
1465
|
-
|
|
1457
|
+
fr(this, Zt[o], (r & yn[l]) === yn[l]);
|
|
1466
1458
|
}
|
|
1467
1459
|
}
|
|
1468
1460
|
}
|
|
1469
|
-
|
|
1470
|
-
function
|
|
1461
|
+
Tn.prototype.defined = !0;
|
|
1462
|
+
function fr(e, t, n) {
|
|
1471
1463
|
n && (e[t] = n);
|
|
1472
1464
|
}
|
|
1473
|
-
function
|
|
1465
|
+
function yt(e) {
|
|
1474
1466
|
const t = {}, n = {};
|
|
1475
1467
|
for (const [r, i] of Object.entries(e.properties)) {
|
|
1476
|
-
const o = new
|
|
1468
|
+
const o = new Tn(
|
|
1477
1469
|
r,
|
|
1478
1470
|
e.transform(e.attributes || {}, r),
|
|
1479
1471
|
i,
|
|
1480
1472
|
e.space
|
|
1481
1473
|
);
|
|
1482
|
-
e.mustUseProperty && e.mustUseProperty.includes(r) && (o.mustUseProperty = !0), t[r] = o, n[
|
|
1474
|
+
e.mustUseProperty && e.mustUseProperty.includes(r) && (o.mustUseProperty = !0), t[r] = o, n[mn(r)] = r, n[mn(o.attribute)] = r;
|
|
1483
1475
|
}
|
|
1484
1476
|
return new At(t, n, e.space);
|
|
1485
1477
|
}
|
|
1486
|
-
const ci =
|
|
1478
|
+
const ci = yt({
|
|
1487
1479
|
properties: {
|
|
1488
1480
|
ariaActiveDescendant: null,
|
|
1489
1481
|
ariaAtomic: fe,
|
|
@@ -1545,7 +1537,7 @@ function fi(e, t) {
|
|
|
1545
1537
|
function pi(e, t) {
|
|
1546
1538
|
return fi(e, t.toLowerCase());
|
|
1547
1539
|
}
|
|
1548
|
-
const Jo =
|
|
1540
|
+
const Jo = yt({
|
|
1549
1541
|
attributes: {
|
|
1550
1542
|
acceptcharset: "accept-charset",
|
|
1551
1543
|
classname: "class",
|
|
@@ -1593,7 +1585,7 @@ const Jo = gt({
|
|
|
1593
1585
|
dir: null,
|
|
1594
1586
|
dirName: null,
|
|
1595
1587
|
disabled: V,
|
|
1596
|
-
download:
|
|
1588
|
+
download: gn,
|
|
1597
1589
|
draggable: fe,
|
|
1598
1590
|
encType: null,
|
|
1599
1591
|
enterKeyHint: null,
|
|
@@ -1606,7 +1598,7 @@ const Jo = gt({
|
|
|
1606
1598
|
formTarget: null,
|
|
1607
1599
|
headers: re,
|
|
1608
1600
|
height: _,
|
|
1609
|
-
hidden:
|
|
1601
|
+
hidden: gn,
|
|
1610
1602
|
high: _,
|
|
1611
1603
|
href: null,
|
|
1612
1604
|
hrefLang: null,
|
|
@@ -1906,7 +1898,7 @@ const Jo = gt({
|
|
|
1906
1898
|
},
|
|
1907
1899
|
space: "html",
|
|
1908
1900
|
transform: pi
|
|
1909
|
-
}), Zo =
|
|
1901
|
+
}), Zo = yt({
|
|
1910
1902
|
attributes: {
|
|
1911
1903
|
accentHeight: "accent-height",
|
|
1912
1904
|
alignmentBaseline: "alignment-baseline",
|
|
@@ -2083,7 +2075,7 @@ const Jo = gt({
|
|
|
2083
2075
|
timelineBegin: "timelinebegin"
|
|
2084
2076
|
},
|
|
2085
2077
|
properties: {
|
|
2086
|
-
about:
|
|
2078
|
+
about: Ne,
|
|
2087
2079
|
accentHeight: _,
|
|
2088
2080
|
accumulate: null,
|
|
2089
2081
|
additive: null,
|
|
@@ -2195,7 +2187,7 @@ const Jo = gt({
|
|
|
2195
2187
|
k2: _,
|
|
2196
2188
|
k3: _,
|
|
2197
2189
|
k4: _,
|
|
2198
|
-
kernelMatrix:
|
|
2190
|
+
kernelMatrix: Ne,
|
|
2199
2191
|
kernelUnitLength: null,
|
|
2200
2192
|
keyPoints: null,
|
|
2201
2193
|
// SEMI_COLON_SEPARATED
|
|
@@ -2352,21 +2344,21 @@ const Jo = gt({
|
|
|
2352
2344
|
preserveAspectRatio: null,
|
|
2353
2345
|
primitiveUnits: null,
|
|
2354
2346
|
propagate: null,
|
|
2355
|
-
property:
|
|
2347
|
+
property: Ne,
|
|
2356
2348
|
r: null,
|
|
2357
2349
|
radius: null,
|
|
2358
2350
|
referrerPolicy: null,
|
|
2359
2351
|
refX: null,
|
|
2360
2352
|
refY: null,
|
|
2361
|
-
rel:
|
|
2362
|
-
rev:
|
|
2353
|
+
rel: Ne,
|
|
2354
|
+
rev: Ne,
|
|
2363
2355
|
renderingIntent: null,
|
|
2364
2356
|
repeatCount: null,
|
|
2365
2357
|
repeatDur: null,
|
|
2366
|
-
requiredExtensions:
|
|
2367
|
-
requiredFeatures:
|
|
2368
|
-
requiredFonts:
|
|
2369
|
-
requiredFormats:
|
|
2358
|
+
requiredExtensions: Ne,
|
|
2359
|
+
requiredFeatures: Ne,
|
|
2360
|
+
requiredFonts: Ne,
|
|
2361
|
+
requiredFormats: Ne,
|
|
2370
2362
|
resource: null,
|
|
2371
2363
|
restart: null,
|
|
2372
2364
|
result: null,
|
|
@@ -2394,7 +2386,7 @@ const Jo = gt({
|
|
|
2394
2386
|
strikethroughThickness: _,
|
|
2395
2387
|
string: null,
|
|
2396
2388
|
stroke: null,
|
|
2397
|
-
strokeDashArray:
|
|
2389
|
+
strokeDashArray: Ne,
|
|
2398
2390
|
strokeDashOffset: null,
|
|
2399
2391
|
strokeLineCap: null,
|
|
2400
2392
|
strokeLineJoin: null,
|
|
@@ -2408,7 +2400,7 @@ const Jo = gt({
|
|
|
2408
2400
|
syncMaster: null,
|
|
2409
2401
|
syncTolerance: null,
|
|
2410
2402
|
syncToleranceDefault: null,
|
|
2411
|
-
systemLanguage:
|
|
2403
|
+
systemLanguage: Ne,
|
|
2412
2404
|
tabIndex: _,
|
|
2413
2405
|
tableValues: null,
|
|
2414
2406
|
target: null,
|
|
@@ -2422,7 +2414,7 @@ const Jo = gt({
|
|
|
2422
2414
|
title: null,
|
|
2423
2415
|
transformBehavior: null,
|
|
2424
2416
|
type: null,
|
|
2425
|
-
typeOf:
|
|
2417
|
+
typeOf: Ne,
|
|
2426
2418
|
to: null,
|
|
2427
2419
|
transform: null,
|
|
2428
2420
|
transformOrigin: null,
|
|
@@ -2465,7 +2457,7 @@ const Jo = gt({
|
|
|
2465
2457
|
},
|
|
2466
2458
|
space: "svg",
|
|
2467
2459
|
transform: fi
|
|
2468
|
-
}), hi =
|
|
2460
|
+
}), hi = yt({
|
|
2469
2461
|
properties: {
|
|
2470
2462
|
xLinkActuate: null,
|
|
2471
2463
|
xLinkArcRole: null,
|
|
@@ -2479,12 +2471,12 @@ const Jo = gt({
|
|
|
2479
2471
|
transform(e, t) {
|
|
2480
2472
|
return "xlink:" + t.slice(5).toLowerCase();
|
|
2481
2473
|
}
|
|
2482
|
-
}), di =
|
|
2474
|
+
}), di = yt({
|
|
2483
2475
|
attributes: { xmlnsxlink: "xmlns:xlink" },
|
|
2484
2476
|
properties: { xmlnsXLink: null, xmlns: null },
|
|
2485
2477
|
space: "xmlns",
|
|
2486
2478
|
transform: pi
|
|
2487
|
-
}), mi =
|
|
2479
|
+
}), mi = yt({
|
|
2488
2480
|
properties: { xmlBase: null, xmlLang: null, xmlSpace: null },
|
|
2489
2481
|
space: "xml",
|
|
2490
2482
|
transform(e, t) {
|
|
@@ -2508,24 +2500,24 @@ const Jo = gt({
|
|
|
2508
2500
|
xLinkTitle: "xlinkTitle",
|
|
2509
2501
|
xLinkType: "xlinkType",
|
|
2510
2502
|
xmlnsXLink: "xmlnsXlink"
|
|
2511
|
-
}, tl = /[A-Z]/g,
|
|
2503
|
+
}, tl = /[A-Z]/g, pr = /-[a-z]/g, nl = /^data[-\w.:]+$/i;
|
|
2512
2504
|
function rl(e, t) {
|
|
2513
|
-
const n =
|
|
2505
|
+
const n = mn(t);
|
|
2514
2506
|
let r = t, i = Pe;
|
|
2515
2507
|
if (n in e.normal)
|
|
2516
2508
|
return e.property[e.normal[n]];
|
|
2517
2509
|
if (n.length > 4 && n.slice(0, 4) === "data" && nl.test(t)) {
|
|
2518
2510
|
if (t.charAt(4) === "-") {
|
|
2519
|
-
const o = t.slice(5).replace(
|
|
2511
|
+
const o = t.slice(5).replace(pr, ol);
|
|
2520
2512
|
r = "data" + o.charAt(0).toUpperCase() + o.slice(1);
|
|
2521
2513
|
} else {
|
|
2522
2514
|
const o = t.slice(4);
|
|
2523
|
-
if (!
|
|
2515
|
+
if (!pr.test(o)) {
|
|
2524
2516
|
let l = o.replace(tl, il);
|
|
2525
2517
|
l.charAt(0) !== "-" && (l = "-" + l), t = "data" + l;
|
|
2526
2518
|
}
|
|
2527
2519
|
}
|
|
2528
|
-
i =
|
|
2520
|
+
i = Tn;
|
|
2529
2521
|
}
|
|
2530
2522
|
return new i(r, t);
|
|
2531
2523
|
}
|
|
@@ -2535,12 +2527,12 @@ function il(e) {
|
|
|
2535
2527
|
function ol(e) {
|
|
2536
2528
|
return e.charAt(1).toUpperCase();
|
|
2537
2529
|
}
|
|
2538
|
-
const ll = ui([ci, Jo, hi, di, mi], "html"),
|
|
2530
|
+
const ll = ui([ci, Jo, hi, di, mi], "html"), In = ui([ci, Zo, hi, di, mi], "svg");
|
|
2539
2531
|
function al(e) {
|
|
2540
2532
|
return e.join(" ").trim();
|
|
2541
2533
|
}
|
|
2542
|
-
var
|
|
2543
|
-
`,
|
|
2534
|
+
var An = {}, hr = /\/\*[^*]*\*+([^/*][^*]*\*+)*\//g, sl = /\n/g, ul = /^\s*/, cl = /^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/, fl = /^:\s*/, pl = /^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/, hl = /^[;\s]*/, dl = /^\s+|\s+$/g, ml = `
|
|
2535
|
+
`, dr = "/", mr = "*", rt = "", gl = "comment", yl = "declaration", xl = function(e, t) {
|
|
2544
2536
|
if (typeof e != "string")
|
|
2545
2537
|
throw new TypeError("First argument must be a string");
|
|
2546
2538
|
if (!e) return [];
|
|
@@ -2586,8 +2578,8 @@ var Pn = {}, mr = /\/\*[^*]*\*+([^/*][^*]*\*+)*\//g, sl = /\n/g, ul = /^\s*/, cl
|
|
|
2586
2578
|
}
|
|
2587
2579
|
function c() {
|
|
2588
2580
|
var y = o();
|
|
2589
|
-
if (!(
|
|
2590
|
-
for (var x = 2; rt != e.charAt(x) && (
|
|
2581
|
+
if (!(dr != e.charAt(0) || mr != e.charAt(1))) {
|
|
2582
|
+
for (var x = 2; rt != e.charAt(x) && (mr != e.charAt(x) || dr != e.charAt(x + 1)); )
|
|
2591
2583
|
++x;
|
|
2592
2584
|
if (x += 2, rt === e.charAt(x - 1))
|
|
2593
2585
|
return a("End of comment missing");
|
|
@@ -2604,8 +2596,8 @@ var Pn = {}, mr = /\/\*[^*]*\*+([^/*][^*]*\*+)*\//g, sl = /\n/g, ul = /^\s*/, cl
|
|
|
2604
2596
|
if (c(), !u(fl)) return a("property missing ':'");
|
|
2605
2597
|
var T = u(pl), k = y({
|
|
2606
2598
|
type: yl,
|
|
2607
|
-
property:
|
|
2608
|
-
value: T ?
|
|
2599
|
+
property: gr(x[0].replace(hr, rt)),
|
|
2600
|
+
value: T ? gr(T[0].replace(hr, rt)) : rt
|
|
2609
2601
|
});
|
|
2610
2602
|
return u(hl), k;
|
|
2611
2603
|
}
|
|
@@ -2619,14 +2611,14 @@ var Pn = {}, mr = /\/\*[^*]*\*+([^/*][^*]*\*+)*\//g, sl = /\n/g, ul = /^\s*/, cl
|
|
|
2619
2611
|
}
|
|
2620
2612
|
return f(), p();
|
|
2621
2613
|
};
|
|
2622
|
-
function
|
|
2614
|
+
function gr(e) {
|
|
2623
2615
|
return e ? e.replace(dl, rt) : rt;
|
|
2624
2616
|
}
|
|
2625
2617
|
var bl = Mt && Mt.__importDefault || function(e) {
|
|
2626
2618
|
return e && e.__esModule ? e : { default: e };
|
|
2627
2619
|
};
|
|
2628
|
-
Object.defineProperty(
|
|
2629
|
-
|
|
2620
|
+
Object.defineProperty(An, "__esModule", { value: !0 });
|
|
2621
|
+
An.default = kl;
|
|
2630
2622
|
var wl = bl(xl);
|
|
2631
2623
|
function kl(e, t) {
|
|
2632
2624
|
var n = null;
|
|
@@ -2647,24 +2639,24 @@ var vl = /^--[a-zA-Z0-9_-]+$/, Sl = /-([a-z])/g, El = /^[^-]+$/, Cl = /^-(webkit
|
|
|
2647
2639
|
return !e || El.test(e) || vl.test(e);
|
|
2648
2640
|
}, Il = function(e, t) {
|
|
2649
2641
|
return t.toUpperCase();
|
|
2650
|
-
},
|
|
2642
|
+
}, yr = function(e, t) {
|
|
2651
2643
|
return "".concat(t, "-");
|
|
2652
2644
|
}, Al = function(e, t) {
|
|
2653
|
-
return t === void 0 && (t = {}), Tl(e) ? e : (e = e.toLowerCase(), t.reactCompat ? e = e.replace(_l,
|
|
2645
|
+
return t === void 0 && (t = {}), Tl(e) ? e : (e = e.toLowerCase(), t.reactCompat ? e = e.replace(_l, yr) : e = e.replace(Cl, yr), e.replace(Sl, Il));
|
|
2654
2646
|
};
|
|
2655
2647
|
Ut.camelCase = Al;
|
|
2656
2648
|
var Ol = Mt && Mt.__importDefault || function(e) {
|
|
2657
2649
|
return e && e.__esModule ? e : { default: e };
|
|
2658
|
-
}, Pl = Ol(
|
|
2659
|
-
function
|
|
2650
|
+
}, Pl = Ol(An), Rl = Ut;
|
|
2651
|
+
function xn(e, t) {
|
|
2660
2652
|
var n = {};
|
|
2661
2653
|
return !e || typeof e != "string" || (0, Pl.default)(e, function(r, i) {
|
|
2662
2654
|
r && i && (n[(0, Rl.camelCase)(r, t)] = i);
|
|
2663
2655
|
}), n;
|
|
2664
2656
|
}
|
|
2665
|
-
|
|
2666
|
-
var Ll =
|
|
2667
|
-
const jl = /* @__PURE__ */
|
|
2657
|
+
xn.default = xn;
|
|
2658
|
+
var Ll = xn;
|
|
2659
|
+
const jl = /* @__PURE__ */ _n(Ll), gi = yi("end"), On = yi("start");
|
|
2668
2660
|
function yi(e) {
|
|
2669
2661
|
return t;
|
|
2670
2662
|
function t(n) {
|
|
@@ -2677,21 +2669,21 @@ function yi(e) {
|
|
|
2677
2669
|
};
|
|
2678
2670
|
}
|
|
2679
2671
|
}
|
|
2680
|
-
function
|
|
2681
|
-
const t =
|
|
2672
|
+
function Nl(e) {
|
|
2673
|
+
const t = On(e), n = gi(e);
|
|
2682
2674
|
if (t && n)
|
|
2683
2675
|
return { start: t, end: n };
|
|
2684
2676
|
}
|
|
2685
|
-
function
|
|
2686
|
-
return !e || typeof e != "object" ? "" : "position" in e || "type" in e ?
|
|
2677
|
+
function Ct(e) {
|
|
2678
|
+
return !e || typeof e != "object" ? "" : "position" in e || "type" in e ? xr(e.position) : "start" in e || "end" in e ? xr(e) : "line" in e || "column" in e ? bn(e) : "";
|
|
2687
2679
|
}
|
|
2688
|
-
function
|
|
2689
|
-
return
|
|
2680
|
+
function bn(e) {
|
|
2681
|
+
return br(e && e.line) + ":" + br(e && e.column);
|
|
2690
2682
|
}
|
|
2691
|
-
function
|
|
2692
|
-
return
|
|
2683
|
+
function xr(e) {
|
|
2684
|
+
return bn(e && e.start) + "-" + bn(e && e.end);
|
|
2693
2685
|
}
|
|
2694
|
-
function
|
|
2686
|
+
function br(e) {
|
|
2695
2687
|
return e && typeof e == "number" ? e : 1;
|
|
2696
2688
|
}
|
|
2697
2689
|
class we extends Error {
|
|
@@ -2765,7 +2757,7 @@ class we extends Error {
|
|
|
2765
2757
|
u && (o.place = u.position);
|
|
2766
2758
|
}
|
|
2767
2759
|
const a = o.place && "start" in o.place ? o.place.start : o.place;
|
|
2768
|
-
this.ancestors = o.ancestors || void 0, this.cause = o.cause || void 0, this.column = a ? a.column : void 0, this.fatal = void 0, this.file, this.message = i, this.line = a ? a.line : void 0, this.name =
|
|
2760
|
+
this.ancestors = o.ancestors || void 0, this.cause = o.cause || void 0, this.column = a ? a.column : void 0, this.fatal = void 0, this.file, this.message = i, this.line = a ? a.line : void 0, this.name = Ct(o.place) || "1:1", this.place = o.place || void 0, this.reason = this.message, this.ruleId = o.ruleId || void 0, this.source = o.source || void 0, this.stack = l && o.cause && typeof o.cause.stack == "string" ? o.cause.stack : "", this.actual, this.expected, this.note, this.url;
|
|
2769
2761
|
}
|
|
2770
2762
|
}
|
|
2771
2763
|
we.prototype.file = "";
|
|
@@ -2781,7 +2773,7 @@ we.prototype.fatal = void 0;
|
|
|
2781
2773
|
we.prototype.place = void 0;
|
|
2782
2774
|
we.prototype.ruleId = void 0;
|
|
2783
2775
|
we.prototype.source = void 0;
|
|
2784
|
-
const
|
|
2776
|
+
const Pn = {}.hasOwnProperty, Dl = /* @__PURE__ */ new Map(), Fl = /[A-Z]/g, Ml = /* @__PURE__ */ new Set(["table", "tbody", "thead", "tfoot", "tr"]), zl = /* @__PURE__ */ new Set(["td", "th"]), xi = "https://github.com/syntax-tree/hast-util-to-jsx-runtime";
|
|
2785
2777
|
function Bl(e, t) {
|
|
2786
2778
|
if (!t || t.Fragment === void 0)
|
|
2787
2779
|
throw new TypeError("Expected `Fragment` in options");
|
|
@@ -2811,7 +2803,7 @@ function Bl(e, t) {
|
|
|
2811
2803
|
ignoreInvalidStyle: t.ignoreInvalidStyle || !1,
|
|
2812
2804
|
passKeys: t.passKeys !== !1,
|
|
2813
2805
|
passNode: t.passNode || !1,
|
|
2814
|
-
schema: t.space === "svg" ?
|
|
2806
|
+
schema: t.space === "svg" ? In : ll,
|
|
2815
2807
|
stylePropertyNameCase: t.stylePropertyNameCase || "dom",
|
|
2816
2808
|
tableCellAlignToStyle: t.tableCellAlignToStyle !== !1
|
|
2817
2809
|
}, o = bi(i, e, void 0);
|
|
@@ -2839,12 +2831,12 @@ function bi(e, t, n) {
|
|
|
2839
2831
|
function Ul(e, t, n) {
|
|
2840
2832
|
const r = e.schema;
|
|
2841
2833
|
let i = r;
|
|
2842
|
-
t.tagName.toLowerCase() === "svg" && r.space === "html" && (i =
|
|
2834
|
+
t.tagName.toLowerCase() === "svg" && r.space === "html" && (i = In, e.schema = i), e.ancestors.push(t);
|
|
2843
2835
|
const o = ki(e, t.tagName, !1), l = Gl(e, t);
|
|
2844
|
-
let a =
|
|
2836
|
+
let a = Ln(e, t);
|
|
2845
2837
|
return Ml.has(t.tagName) && (a = a.filter(function(u) {
|
|
2846
2838
|
return typeof u == "string" ? !Xo(u) : !0;
|
|
2847
|
-
})), wi(e, l, o, t),
|
|
2839
|
+
})), wi(e, l, o, t), Rn(l, a), e.ancestors.pop(), e.schema = r, e.create(t, o, l, n);
|
|
2848
2840
|
}
|
|
2849
2841
|
function Hl(e, t) {
|
|
2850
2842
|
if (t.data && t.data.estree && e.evaluater) {
|
|
@@ -2852,7 +2844,7 @@ function Hl(e, t) {
|
|
|
2852
2844
|
return r.type, /** @type {Child | undefined} */
|
|
2853
2845
|
e.evaluater.evaluateExpression(r.expression);
|
|
2854
2846
|
}
|
|
2855
|
-
|
|
2847
|
+
It(e, t.position);
|
|
2856
2848
|
}
|
|
2857
2849
|
function Vl(e, t) {
|
|
2858
2850
|
if (t.data && t.data.estree && e.evaluater)
|
|
@@ -2860,18 +2852,18 @@ function Vl(e, t) {
|
|
|
2860
2852
|
/** @type {Child | undefined} */
|
|
2861
2853
|
e.evaluater.evaluateProgram(t.data.estree)
|
|
2862
2854
|
);
|
|
2863
|
-
|
|
2855
|
+
It(e, t.position);
|
|
2864
2856
|
}
|
|
2865
2857
|
function Wl(e, t, n) {
|
|
2866
2858
|
const r = e.schema;
|
|
2867
2859
|
let i = r;
|
|
2868
|
-
t.name === "svg" && r.space === "html" && (i =
|
|
2869
|
-
const o = t.name === null ? e.Fragment : ki(e, t.name, !0), l = Xl(e, t), a =
|
|
2870
|
-
return wi(e, l, o, t),
|
|
2860
|
+
t.name === "svg" && r.space === "html" && (i = In, e.schema = i), e.ancestors.push(t);
|
|
2861
|
+
const o = t.name === null ? e.Fragment : ki(e, t.name, !0), l = Xl(e, t), a = Ln(e, t);
|
|
2862
|
+
return wi(e, l, o, t), Rn(l, a), e.ancestors.pop(), e.schema = r, e.create(t, o, l, n);
|
|
2871
2863
|
}
|
|
2872
2864
|
function ql(e, t, n) {
|
|
2873
2865
|
const r = {};
|
|
2874
|
-
return
|
|
2866
|
+
return Rn(r, Ln(e, t)), e.create(t, e.Fragment, r, n);
|
|
2875
2867
|
}
|
|
2876
2868
|
function $l(e, t) {
|
|
2877
2869
|
return t.value;
|
|
@@ -2879,7 +2871,7 @@ function $l(e, t) {
|
|
|
2879
2871
|
function wi(e, t, n, r) {
|
|
2880
2872
|
typeof n != "string" && n !== e.Fragment && e.passNode && (t.node = r);
|
|
2881
2873
|
}
|
|
2882
|
-
function
|
|
2874
|
+
function Rn(e, t) {
|
|
2883
2875
|
if (t.length > 0) {
|
|
2884
2876
|
const n = t.length > 1 ? t : t[0];
|
|
2885
2877
|
n && (e.children = n);
|
|
@@ -2895,7 +2887,7 @@ function Yl(e, t, n) {
|
|
|
2895
2887
|
function Kl(e, t) {
|
|
2896
2888
|
return n;
|
|
2897
2889
|
function n(r, i, o, l) {
|
|
2898
|
-
const a = Array.isArray(o.children), u =
|
|
2890
|
+
const a = Array.isArray(o.children), u = On(r);
|
|
2899
2891
|
return t(
|
|
2900
2892
|
i,
|
|
2901
2893
|
o,
|
|
@@ -2914,7 +2906,7 @@ function Gl(e, t) {
|
|
|
2914
2906
|
const n = {};
|
|
2915
2907
|
let r, i;
|
|
2916
2908
|
for (i in t.properties)
|
|
2917
|
-
if (i !== "children" &&
|
|
2909
|
+
if (i !== "children" && Pn.call(t.properties, i)) {
|
|
2918
2910
|
const o = Ql(e, i, t.properties[i]);
|
|
2919
2911
|
if (o) {
|
|
2920
2912
|
const [l, a] = o;
|
|
@@ -2945,7 +2937,7 @@ function Xl(e, t) {
|
|
|
2945
2937
|
e.evaluater.evaluateExpression(a.argument)
|
|
2946
2938
|
);
|
|
2947
2939
|
} else
|
|
2948
|
-
|
|
2940
|
+
It(e, t.position);
|
|
2949
2941
|
else {
|
|
2950
2942
|
const i = r.name;
|
|
2951
2943
|
let o;
|
|
@@ -2954,7 +2946,7 @@ function Xl(e, t) {
|
|
|
2954
2946
|
const a = r.value.data.estree.body[0];
|
|
2955
2947
|
a.type, o = e.evaluater.evaluateExpression(a.expression);
|
|
2956
2948
|
} else
|
|
2957
|
-
|
|
2949
|
+
It(e, t.position);
|
|
2958
2950
|
else
|
|
2959
2951
|
o = r.value === null ? !0 : r.value;
|
|
2960
2952
|
n[i] = /** @type {Props[keyof Props]} */
|
|
@@ -2962,10 +2954,10 @@ function Xl(e, t) {
|
|
|
2962
2954
|
}
|
|
2963
2955
|
return n;
|
|
2964
2956
|
}
|
|
2965
|
-
function
|
|
2957
|
+
function Ln(e, t) {
|
|
2966
2958
|
const n = [];
|
|
2967
2959
|
let r = -1;
|
|
2968
|
-
const i = e.passKeys ? /* @__PURE__ */ new Map() :
|
|
2960
|
+
const i = e.passKeys ? /* @__PURE__ */ new Map() : Dl;
|
|
2969
2961
|
for (; ++r < t.children.length; ) {
|
|
2970
2962
|
const o = t.children[r];
|
|
2971
2963
|
let l;
|
|
@@ -3020,7 +3012,7 @@ function ki(e, t, n) {
|
|
|
3020
3012
|
const i = t.split(".");
|
|
3021
3013
|
let o = -1, l;
|
|
3022
3014
|
for (; ++o < i.length; ) {
|
|
3023
|
-
const a =
|
|
3015
|
+
const a = ur(i[o]) ? { type: "Identifier", name: i[o] } : { type: "Literal", value: i[o] };
|
|
3024
3016
|
l = l ? {
|
|
3025
3017
|
type: "MemberExpression",
|
|
3026
3018
|
object: l,
|
|
@@ -3031,19 +3023,19 @@ function ki(e, t, n) {
|
|
|
3031
3023
|
}
|
|
3032
3024
|
r = l;
|
|
3033
3025
|
} else
|
|
3034
|
-
r =
|
|
3026
|
+
r = ur(t) && !/^[a-z]/.test(t) ? { type: "Identifier", name: t } : { type: "Literal", value: t };
|
|
3035
3027
|
if (r.type === "Literal") {
|
|
3036
3028
|
const i = (
|
|
3037
3029
|
/** @type {string | number} */
|
|
3038
3030
|
r.value
|
|
3039
3031
|
);
|
|
3040
|
-
return
|
|
3032
|
+
return Pn.call(e.components, i) ? e.components[i] : i;
|
|
3041
3033
|
}
|
|
3042
3034
|
if (e.evaluater)
|
|
3043
3035
|
return e.evaluater.evaluateExpression(r);
|
|
3044
|
-
|
|
3036
|
+
It(e);
|
|
3045
3037
|
}
|
|
3046
|
-
function
|
|
3038
|
+
function It(e, t) {
|
|
3047
3039
|
const n = new we(
|
|
3048
3040
|
"Cannot handle MDX estrees without `createEvaluater`",
|
|
3049
3041
|
{
|
|
@@ -3059,7 +3051,7 @@ function Zl(e) {
|
|
|
3059
3051
|
const t = {};
|
|
3060
3052
|
let n;
|
|
3061
3053
|
for (n in e)
|
|
3062
|
-
|
|
3054
|
+
Pn.call(e, n) && (t[ea(n)] = e[n]);
|
|
3063
3055
|
return t;
|
|
3064
3056
|
}
|
|
3065
3057
|
function ea(e) {
|
|
@@ -3103,11 +3095,11 @@ function vi(e, t, n) {
|
|
|
3103
3095
|
if (t && "alt" in e && e.alt)
|
|
3104
3096
|
return e.alt;
|
|
3105
3097
|
if ("children" in e)
|
|
3106
|
-
return
|
|
3098
|
+
return wr(e.children, t, n);
|
|
3107
3099
|
}
|
|
3108
|
-
return Array.isArray(e) ?
|
|
3100
|
+
return Array.isArray(e) ? wr(e, t, n) : "";
|
|
3109
3101
|
}
|
|
3110
|
-
function
|
|
3102
|
+
function wr(e, t, n) {
|
|
3111
3103
|
const r = [];
|
|
3112
3104
|
let i = -1;
|
|
3113
3105
|
for (; ++i < e.length; )
|
|
@@ -3117,11 +3109,11 @@ function vr(e, t, n) {
|
|
|
3117
3109
|
function ia(e) {
|
|
3118
3110
|
return !!(e && typeof e == "object");
|
|
3119
3111
|
}
|
|
3120
|
-
const
|
|
3121
|
-
function
|
|
3112
|
+
const kr = document.createElement("i");
|
|
3113
|
+
function jn(e) {
|
|
3122
3114
|
const t = "&" + e + ";";
|
|
3123
|
-
|
|
3124
|
-
const n =
|
|
3115
|
+
kr.innerHTML = t;
|
|
3116
|
+
const n = kr.textContent;
|
|
3125
3117
|
return (
|
|
3126
3118
|
// @ts-expect-error: TypeScript is wrong that `textContent` on elements can
|
|
3127
3119
|
// yield `null`.
|
|
@@ -3140,7 +3132,7 @@ function Ye(e, t, n, r) {
|
|
|
3140
3132
|
function ze(e, t) {
|
|
3141
3133
|
return e.length > 0 ? (Ye(e, e.length, 0, t), e) : t;
|
|
3142
3134
|
}
|
|
3143
|
-
const
|
|
3135
|
+
const vr = {}.hasOwnProperty;
|
|
3144
3136
|
function oa(e) {
|
|
3145
3137
|
const t = {};
|
|
3146
3138
|
let n = -1;
|
|
@@ -3151,11 +3143,11 @@ function oa(e) {
|
|
|
3151
3143
|
function la(e, t) {
|
|
3152
3144
|
let n;
|
|
3153
3145
|
for (n in t) {
|
|
3154
|
-
const i = (
|
|
3146
|
+
const i = (vr.call(e, n) ? e[n] : void 0) || (e[n] = {}), o = t[n];
|
|
3155
3147
|
let l;
|
|
3156
3148
|
if (o)
|
|
3157
3149
|
for (l in o) {
|
|
3158
|
-
|
|
3150
|
+
vr.call(i, l) || (i[l] = []);
|
|
3159
3151
|
const a = o[l];
|
|
3160
3152
|
aa(
|
|
3161
3153
|
// @ts-expect-error Looks like a list.
|
|
@@ -3188,16 +3180,16 @@ function Si(e, t) {
|
|
|
3188
3180
|
function mt(e) {
|
|
3189
3181
|
return e.replace(/[\t\n\r ]+/g, " ").replace(/^ | $/g, "").toLowerCase().toUpperCase();
|
|
3190
3182
|
}
|
|
3191
|
-
const $e = Ze(/[A-Za-z]/),
|
|
3192
|
-
function
|
|
3183
|
+
const $e = Ze(/[A-Za-z]/), De = Ze(/[\dA-Za-z]/), sa = Ze(/[#-'*+\--9=?A-Z^-~]/);
|
|
3184
|
+
function wn(e) {
|
|
3193
3185
|
return (
|
|
3194
3186
|
// Special whitespace codes (which have negative values), C0 and Control
|
|
3195
3187
|
// character DEL
|
|
3196
3188
|
e !== null && (e < 32 || e === 127)
|
|
3197
3189
|
);
|
|
3198
3190
|
}
|
|
3199
|
-
const
|
|
3200
|
-
function
|
|
3191
|
+
const kn = Ze(/\d/), ua = Ze(/[\dA-Fa-f]/), ca = Ze(/[!-/:-@[-`{-~]/);
|
|
3192
|
+
function N(e) {
|
|
3201
3193
|
return e !== null && e < -2;
|
|
3202
3194
|
}
|
|
3203
3195
|
function Ae(e) {
|
|
@@ -3213,13 +3205,13 @@ function Ze(e) {
|
|
|
3213
3205
|
return n !== null && n > -1 && e.test(String.fromCharCode(n));
|
|
3214
3206
|
}
|
|
3215
3207
|
}
|
|
3216
|
-
function
|
|
3208
|
+
function xt(e) {
|
|
3217
3209
|
const t = [];
|
|
3218
3210
|
let n = -1, r = 0, i = 0;
|
|
3219
3211
|
for (; ++n < e.length; ) {
|
|
3220
3212
|
const o = e.charCodeAt(n);
|
|
3221
3213
|
let l = "";
|
|
3222
|
-
if (o === 37 &&
|
|
3214
|
+
if (o === 37 && De(e.charCodeAt(n + 1)) && De(e.charCodeAt(n + 2)))
|
|
3223
3215
|
i = 2;
|
|
3224
3216
|
else if (o < 128)
|
|
3225
3217
|
/[!#$&-;=?-Z_a-z~]/.test(String.fromCharCode(o)) || (l = String.fromCharCode(o));
|
|
@@ -3272,12 +3264,12 @@ function da(e) {
|
|
|
3272
3264
|
e.exit("chunkText"), e.exit("paragraph"), e.consume(a);
|
|
3273
3265
|
return;
|
|
3274
3266
|
}
|
|
3275
|
-
return
|
|
3267
|
+
return N(a) ? (e.consume(a), e.exit("chunkText"), o) : (e.consume(a), l);
|
|
3276
3268
|
}
|
|
3277
3269
|
}
|
|
3278
3270
|
const ma = {
|
|
3279
3271
|
tokenize: ga
|
|
3280
|
-
},
|
|
3272
|
+
}, Sr = {
|
|
3281
3273
|
tokenize: ya
|
|
3282
3274
|
};
|
|
3283
3275
|
function ga(e) {
|
|
@@ -3319,7 +3311,7 @@ function ga(e) {
|
|
|
3319
3311
|
return y(v);
|
|
3320
3312
|
t.interrupt = !!(i.currentConstruct && !i._gfmTableDynamicInterruptHack);
|
|
3321
3313
|
}
|
|
3322
|
-
return t.containerState = {}, e.check(
|
|
3314
|
+
return t.containerState = {}, e.check(Sr, s, c)(v);
|
|
3323
3315
|
}
|
|
3324
3316
|
function s(v) {
|
|
3325
3317
|
return i && A(), k(r), h(v);
|
|
@@ -3328,7 +3320,7 @@ function ga(e) {
|
|
|
3328
3320
|
return t.parser.lazy[t.now().line] = r !== n.length, l = t.now().offset, y(v);
|
|
3329
3321
|
}
|
|
3330
3322
|
function h(v) {
|
|
3331
|
-
return t.containerState = {}, e.attempt(
|
|
3323
|
+
return t.containerState = {}, e.attempt(Sr, p, y)(v);
|
|
3332
3324
|
}
|
|
3333
3325
|
function p(v) {
|
|
3334
3326
|
return r++, n.push([t.currentConstruct, t.containerState]), h(v);
|
|
@@ -3349,7 +3341,7 @@ function ga(e) {
|
|
|
3349
3341
|
T(e.exit("chunkFlow"), !0), k(0), e.consume(v);
|
|
3350
3342
|
return;
|
|
3351
3343
|
}
|
|
3352
|
-
return
|
|
3344
|
+
return N(v) ? (e.consume(v), T(e.exit("chunkFlow")), r = 0, t.interrupt = void 0, a) : (e.consume(v), x);
|
|
3353
3345
|
}
|
|
3354
3346
|
function T(v, M) {
|
|
3355
3347
|
const B = t.sliceStream(v);
|
|
@@ -3364,14 +3356,14 @@ function ga(e) {
|
|
|
3364
3356
|
)
|
|
3365
3357
|
return;
|
|
3366
3358
|
const L = t.events.length;
|
|
3367
|
-
let W = L,
|
|
3359
|
+
let W = L, D, q;
|
|
3368
3360
|
for (; W--; )
|
|
3369
3361
|
if (t.events[W][0] === "exit" && t.events[W][1].type === "chunkFlow") {
|
|
3370
|
-
if (
|
|
3362
|
+
if (D) {
|
|
3371
3363
|
q = t.events[W][1].end;
|
|
3372
3364
|
break;
|
|
3373
3365
|
}
|
|
3374
|
-
|
|
3366
|
+
D = !0;
|
|
3375
3367
|
}
|
|
3376
3368
|
for (k(r), w = L; w < t.events.length; )
|
|
3377
3369
|
t.events[w][1].end = {
|
|
@@ -3395,13 +3387,13 @@ function ga(e) {
|
|
|
3395
3387
|
function ya(e, t, n) {
|
|
3396
3388
|
return ie(e, e.attempt(this.parser.constructs.document, t, n), "linePrefix", this.parser.constructs.disable.null.includes("codeIndented") ? void 0 : 4);
|
|
3397
3389
|
}
|
|
3398
|
-
function
|
|
3390
|
+
function Er(e) {
|
|
3399
3391
|
if (e === null || Ae(e) || pa(e))
|
|
3400
3392
|
return 1;
|
|
3401
3393
|
if (fa(e))
|
|
3402
3394
|
return 2;
|
|
3403
3395
|
}
|
|
3404
|
-
function
|
|
3396
|
+
function Nn(e, t, n) {
|
|
3405
3397
|
const r = [];
|
|
3406
3398
|
let i = -1;
|
|
3407
3399
|
for (; ++i < e.length; ) {
|
|
@@ -3410,7 +3402,7 @@ function Fn(e, t, n) {
|
|
|
3410
3402
|
}
|
|
3411
3403
|
return t;
|
|
3412
3404
|
}
|
|
3413
|
-
const
|
|
3405
|
+
const vn = {
|
|
3414
3406
|
name: "attention",
|
|
3415
3407
|
resolveAll: xa,
|
|
3416
3408
|
tokenize: ba
|
|
@@ -3430,7 +3422,7 @@ function xa(e, t) {
|
|
|
3430
3422
|
}, h = {
|
|
3431
3423
|
...e[n][1].start
|
|
3432
3424
|
};
|
|
3433
|
-
|
|
3425
|
+
Cr(c, -u), Cr(h, u), l = {
|
|
3434
3426
|
type: u > 1 ? "strongSequence" : "emphasisSequence",
|
|
3435
3427
|
start: c,
|
|
3436
3428
|
end: {
|
|
@@ -3462,7 +3454,7 @@ function xa(e, t) {
|
|
|
3462
3454
|
...l.start
|
|
3463
3455
|
}, e[n][1].start = {
|
|
3464
3456
|
...a.end
|
|
3465
|
-
}, f = [], e[r][1].end.offset - e[r][1].start.offset && (f = ze(f, [["enter", e[r][1], t], ["exit", e[r][1], t]])), f = ze(f, [["enter", i, t], ["enter", l, t], ["exit", l, t], ["enter", o, t]]), f = ze(f,
|
|
3457
|
+
}, f = [], e[r][1].end.offset - e[r][1].start.offset && (f = ze(f, [["enter", e[r][1], t], ["exit", e[r][1], t]])), f = ze(f, [["enter", i, t], ["enter", l, t], ["exit", l, t], ["enter", o, t]]), f = ze(f, Nn(t.parser.constructs.insideSpan.null, e.slice(r + 1, n), t)), f = ze(f, [["exit", o, t], ["enter", a, t], ["exit", a, t], ["exit", i, t]]), e[n][1].end.offset - e[n][1].start.offset ? (s = 2, f = ze(f, [["enter", e[n][1], t], ["exit", e[n][1], t]])) : s = 0, Ye(e, r - 1, n - r + 3, f), n = r + f.length - s - 2;
|
|
3466
3458
|
break;
|
|
3467
3459
|
}
|
|
3468
3460
|
}
|
|
@@ -3471,7 +3463,7 @@ function xa(e, t) {
|
|
|
3471
3463
|
return e;
|
|
3472
3464
|
}
|
|
3473
3465
|
function ba(e, t) {
|
|
3474
|
-
const n = this.parser.constructs.attentionMarkers.null, r = this.previous, i =
|
|
3466
|
+
const n = this.parser.constructs.attentionMarkers.null, r = this.previous, i = Er(r);
|
|
3475
3467
|
let o;
|
|
3476
3468
|
return l;
|
|
3477
3469
|
function l(u) {
|
|
@@ -3480,11 +3472,11 @@ function ba(e, t) {
|
|
|
3480
3472
|
function a(u) {
|
|
3481
3473
|
if (u === o)
|
|
3482
3474
|
return e.consume(u), a;
|
|
3483
|
-
const f = e.exit("attentionSequence"), s =
|
|
3475
|
+
const f = e.exit("attentionSequence"), s = Er(u), c = !s || s === 2 && i || n.includes(u), h = !i || i === 2 && s || n.includes(r);
|
|
3484
3476
|
return f._open = !!(o === 42 ? c : c && (i || !h)), f._close = !!(o === 42 ? h : h && (s || !c)), t(u);
|
|
3485
3477
|
}
|
|
3486
3478
|
}
|
|
3487
|
-
function
|
|
3479
|
+
function Cr(e, t) {
|
|
3488
3480
|
e.column += t, e.offset += t, e._bufferIndex += t;
|
|
3489
3481
|
}
|
|
3490
3482
|
const wa = {
|
|
@@ -3501,25 +3493,25 @@ function ka(e, t, n) {
|
|
|
3501
3493
|
return $e(p) ? (e.consume(p), l) : p === 64 ? n(p) : f(p);
|
|
3502
3494
|
}
|
|
3503
3495
|
function l(p) {
|
|
3504
|
-
return p === 43 || p === 45 || p === 46 ||
|
|
3496
|
+
return p === 43 || p === 45 || p === 46 || De(p) ? (r = 1, a(p)) : f(p);
|
|
3505
3497
|
}
|
|
3506
3498
|
function a(p) {
|
|
3507
|
-
return p === 58 ? (e.consume(p), r = 0, u) : (p === 43 || p === 45 || p === 46 ||
|
|
3499
|
+
return p === 58 ? (e.consume(p), r = 0, u) : (p === 43 || p === 45 || p === 46 || De(p)) && r++ < 32 ? (e.consume(p), a) : (r = 0, f(p));
|
|
3508
3500
|
}
|
|
3509
3501
|
function u(p) {
|
|
3510
|
-
return p === 62 ? (e.exit("autolinkProtocol"), e.enter("autolinkMarker"), e.consume(p), e.exit("autolinkMarker"), e.exit("autolink"), t) : p === null || p === 32 || p === 60 ||
|
|
3502
|
+
return p === 62 ? (e.exit("autolinkProtocol"), e.enter("autolinkMarker"), e.consume(p), e.exit("autolinkMarker"), e.exit("autolink"), t) : p === null || p === 32 || p === 60 || wn(p) ? n(p) : (e.consume(p), u);
|
|
3511
3503
|
}
|
|
3512
3504
|
function f(p) {
|
|
3513
3505
|
return p === 64 ? (e.consume(p), s) : sa(p) ? (e.consume(p), f) : n(p);
|
|
3514
3506
|
}
|
|
3515
3507
|
function s(p) {
|
|
3516
|
-
return
|
|
3508
|
+
return De(p) ? c(p) : n(p);
|
|
3517
3509
|
}
|
|
3518
3510
|
function c(p) {
|
|
3519
3511
|
return p === 46 ? (e.consume(p), r = 0, s) : p === 62 ? (e.exit("autolinkProtocol").type = "autolinkEmail", e.enter("autolinkMarker"), e.consume(p), e.exit("autolinkMarker"), e.exit("autolink"), t) : h(p);
|
|
3520
3512
|
}
|
|
3521
3513
|
function h(p) {
|
|
3522
|
-
if ((p === 45 ||
|
|
3514
|
+
if ((p === 45 || De(p)) && r++ < 63) {
|
|
3523
3515
|
const y = p === 45 ? h : c;
|
|
3524
3516
|
return e.consume(p), y;
|
|
3525
3517
|
}
|
|
@@ -3536,7 +3528,7 @@ function va(e, t, n) {
|
|
|
3536
3528
|
return Q(o) ? ie(e, i, "linePrefix")(o) : i(o);
|
|
3537
3529
|
}
|
|
3538
3530
|
function i(o) {
|
|
3539
|
-
return o === null ||
|
|
3531
|
+
return o === null || N(o) ? t(o) : n(o);
|
|
3540
3532
|
}
|
|
3541
3533
|
}
|
|
3542
3534
|
const Ei = {
|
|
@@ -3601,23 +3593,23 @@ function Ta(e, t, n) {
|
|
|
3601
3593
|
return e.enter("characterReference"), e.enter("characterReferenceMarker"), e.consume(c), e.exit("characterReferenceMarker"), u;
|
|
3602
3594
|
}
|
|
3603
3595
|
function u(c) {
|
|
3604
|
-
return c === 35 ? (e.enter("characterReferenceMarkerNumeric"), e.consume(c), e.exit("characterReferenceMarkerNumeric"), f) : (e.enter("characterReferenceValue"), o = 31, l =
|
|
3596
|
+
return c === 35 ? (e.enter("characterReferenceMarkerNumeric"), e.consume(c), e.exit("characterReferenceMarkerNumeric"), f) : (e.enter("characterReferenceValue"), o = 31, l = De, s(c));
|
|
3605
3597
|
}
|
|
3606
3598
|
function f(c) {
|
|
3607
|
-
return c === 88 || c === 120 ? (e.enter("characterReferenceMarkerHexadecimal"), e.consume(c), e.exit("characterReferenceMarkerHexadecimal"), e.enter("characterReferenceValue"), o = 6, l = ua, s) : (e.enter("characterReferenceValue"), o = 7, l =
|
|
3599
|
+
return c === 88 || c === 120 ? (e.enter("characterReferenceMarkerHexadecimal"), e.consume(c), e.exit("characterReferenceMarkerHexadecimal"), e.enter("characterReferenceValue"), o = 6, l = ua, s) : (e.enter("characterReferenceValue"), o = 7, l = kn, s(c));
|
|
3608
3600
|
}
|
|
3609
3601
|
function s(c) {
|
|
3610
3602
|
if (c === 59 && i) {
|
|
3611
3603
|
const h = e.exit("characterReferenceValue");
|
|
3612
|
-
return l ===
|
|
3604
|
+
return l === De && !jn(r.sliceSerialize(h)) ? n(c) : (e.enter("characterReferenceMarker"), e.consume(c), e.exit("characterReferenceMarker"), e.exit("characterReference"), t);
|
|
3613
3605
|
}
|
|
3614
3606
|
return l(c) && i++ < o ? (e.consume(c), s) : n(c);
|
|
3615
3607
|
}
|
|
3616
3608
|
}
|
|
3617
|
-
const
|
|
3609
|
+
const _r = {
|
|
3618
3610
|
partial: !0,
|
|
3619
3611
|
tokenize: Aa
|
|
3620
|
-
},
|
|
3612
|
+
}, Tr = {
|
|
3621
3613
|
concrete: !0,
|
|
3622
3614
|
name: "codeFenced",
|
|
3623
3615
|
tokenize: Ia
|
|
@@ -3640,20 +3632,20 @@ function Ia(e, t, n) {
|
|
|
3640
3632
|
return w === a ? (l++, e.consume(w), s) : l < 3 ? n(w) : (e.exit("codeFencedFenceSequence"), Q(w) ? ie(e, c, "whitespace")(w) : c(w));
|
|
3641
3633
|
}
|
|
3642
3634
|
function c(w) {
|
|
3643
|
-
return w === null ||
|
|
3635
|
+
return w === null || N(w) ? (e.exit("codeFencedFence"), r.interrupt ? t(w) : e.check(_r, x, M)(w)) : (e.enter("codeFencedFenceInfo"), e.enter("chunkString", {
|
|
3644
3636
|
contentType: "string"
|
|
3645
3637
|
}), h(w));
|
|
3646
3638
|
}
|
|
3647
3639
|
function h(w) {
|
|
3648
|
-
return w === null ||
|
|
3640
|
+
return w === null || N(w) ? (e.exit("chunkString"), e.exit("codeFencedFenceInfo"), c(w)) : Q(w) ? (e.exit("chunkString"), e.exit("codeFencedFenceInfo"), ie(e, p, "whitespace")(w)) : w === 96 && w === a ? n(w) : (e.consume(w), h);
|
|
3649
3641
|
}
|
|
3650
3642
|
function p(w) {
|
|
3651
|
-
return w === null ||
|
|
3643
|
+
return w === null || N(w) ? c(w) : (e.enter("codeFencedFenceMeta"), e.enter("chunkString", {
|
|
3652
3644
|
contentType: "string"
|
|
3653
3645
|
}), y(w));
|
|
3654
3646
|
}
|
|
3655
3647
|
function y(w) {
|
|
3656
|
-
return w === null ||
|
|
3648
|
+
return w === null || N(w) ? (e.exit("chunkString"), e.exit("codeFencedFenceMeta"), c(w)) : w === 96 && w === a ? n(w) : (e.consume(w), y);
|
|
3657
3649
|
}
|
|
3658
3650
|
function x(w) {
|
|
3659
3651
|
return e.attempt(i, M, T)(w);
|
|
@@ -3665,16 +3657,16 @@ function Ia(e, t, n) {
|
|
|
3665
3657
|
return o > 0 && Q(w) ? ie(e, A, "linePrefix", o + 1)(w) : A(w);
|
|
3666
3658
|
}
|
|
3667
3659
|
function A(w) {
|
|
3668
|
-
return w === null ||
|
|
3660
|
+
return w === null || N(w) ? e.check(_r, x, M)(w) : (e.enter("codeFlowValue"), v(w));
|
|
3669
3661
|
}
|
|
3670
3662
|
function v(w) {
|
|
3671
|
-
return w === null ||
|
|
3663
|
+
return w === null || N(w) ? (e.exit("codeFlowValue"), A(w)) : (e.consume(w), v);
|
|
3672
3664
|
}
|
|
3673
3665
|
function M(w) {
|
|
3674
3666
|
return e.exit("codeFenced"), t(w);
|
|
3675
3667
|
}
|
|
3676
3668
|
function B(w, L, W) {
|
|
3677
|
-
let
|
|
3669
|
+
let D = 0;
|
|
3678
3670
|
return q;
|
|
3679
3671
|
function q(U) {
|
|
3680
3672
|
return w.enter("lineEnding"), w.consume(U), w.exit("lineEnding"), P;
|
|
@@ -3686,10 +3678,10 @@ function Ia(e, t, n) {
|
|
|
3686
3678
|
return U === a ? (w.enter("codeFencedFenceSequence"), J(U)) : W(U);
|
|
3687
3679
|
}
|
|
3688
3680
|
function J(U) {
|
|
3689
|
-
return U === a ? (
|
|
3681
|
+
return U === a ? (D++, w.consume(U), J) : D >= l ? (w.exit("codeFencedFenceSequence"), Q(U) ? ie(w, Y, "whitespace")(U) : Y(U)) : W(U);
|
|
3690
3682
|
}
|
|
3691
3683
|
function Y(U) {
|
|
3692
|
-
return U === null ||
|
|
3684
|
+
return U === null || N(U) ? (w.exit("codeFencedFence"), L(U)) : W(U);
|
|
3693
3685
|
}
|
|
3694
3686
|
}
|
|
3695
3687
|
}
|
|
@@ -3721,10 +3713,10 @@ function Pa(e, t, n) {
|
|
|
3721
3713
|
return s && s[1].type === "linePrefix" && s[2].sliceSerialize(s[1], !0).length >= 4 ? l(f) : n(f);
|
|
3722
3714
|
}
|
|
3723
3715
|
function l(f) {
|
|
3724
|
-
return f === null ? u(f) :
|
|
3716
|
+
return f === null ? u(f) : N(f) ? e.attempt(Oa, l, u)(f) : (e.enter("codeFlowValue"), a(f));
|
|
3725
3717
|
}
|
|
3726
3718
|
function a(f) {
|
|
3727
|
-
return f === null ||
|
|
3719
|
+
return f === null || N(f) ? (e.exit("codeFlowValue"), l(f)) : (e.consume(f), a);
|
|
3728
3720
|
}
|
|
3729
3721
|
function u(f) {
|
|
3730
3722
|
return e.exit("codeIndented"), t(f);
|
|
@@ -3734,18 +3726,18 @@ function Ra(e, t, n) {
|
|
|
3734
3726
|
const r = this;
|
|
3735
3727
|
return i;
|
|
3736
3728
|
function i(l) {
|
|
3737
|
-
return r.parser.lazy[r.now().line] ? n(l) :
|
|
3729
|
+
return r.parser.lazy[r.now().line] ? n(l) : N(l) ? (e.enter("lineEnding"), e.consume(l), e.exit("lineEnding"), i) : ie(e, o, "linePrefix", 5)(l);
|
|
3738
3730
|
}
|
|
3739
3731
|
function o(l) {
|
|
3740
3732
|
const a = r.events[r.events.length - 1];
|
|
3741
|
-
return a && a[1].type === "linePrefix" && a[2].sliceSerialize(a[1], !0).length >= 4 ? t(l) :
|
|
3733
|
+
return a && a[1].type === "linePrefix" && a[2].sliceSerialize(a[1], !0).length >= 4 ? t(l) : N(l) ? i(l) : n(l);
|
|
3742
3734
|
}
|
|
3743
3735
|
}
|
|
3744
3736
|
const La = {
|
|
3745
3737
|
name: "codeText",
|
|
3746
|
-
previous:
|
|
3738
|
+
previous: Na,
|
|
3747
3739
|
resolve: ja,
|
|
3748
|
-
tokenize:
|
|
3740
|
+
tokenize: Da
|
|
3749
3741
|
};
|
|
3750
3742
|
function ja(e) {
|
|
3751
3743
|
let t = e.length - 4, n = 3, r, i;
|
|
@@ -3760,10 +3752,10 @@ function ja(e) {
|
|
|
3760
3752
|
i === void 0 ? r !== t && e[r][1].type !== "lineEnding" && (i = r) : (r === t || e[r][1].type === "lineEnding") && (e[i][1].type = "codeTextData", r !== i + 2 && (e[i][1].end = e[r - 1][1].end, e.splice(i + 2, r - i - 2), t -= r - i - 2, r = i + 2), i = void 0);
|
|
3761
3753
|
return e;
|
|
3762
3754
|
}
|
|
3763
|
-
function
|
|
3755
|
+
function Na(e) {
|
|
3764
3756
|
return e !== 96 || this.events[this.events.length - 1][1].type === "characterEscape";
|
|
3765
3757
|
}
|
|
3766
|
-
function
|
|
3758
|
+
function Da(e, t, n) {
|
|
3767
3759
|
let r = 0, i, o;
|
|
3768
3760
|
return l;
|
|
3769
3761
|
function l(c) {
|
|
@@ -3773,10 +3765,10 @@ function Na(e, t, n) {
|
|
|
3773
3765
|
return c === 96 ? (e.consume(c), r++, a) : (e.exit("codeTextSequence"), u(c));
|
|
3774
3766
|
}
|
|
3775
3767
|
function u(c) {
|
|
3776
|
-
return c === null ? n(c) : c === 32 ? (e.enter("space"), e.consume(c), e.exit("space"), u) : c === 96 ? (o = e.enter("codeTextSequence"), i = 0, s(c)) :
|
|
3768
|
+
return c === null ? n(c) : c === 32 ? (e.enter("space"), e.consume(c), e.exit("space"), u) : c === 96 ? (o = e.enter("codeTextSequence"), i = 0, s(c)) : N(c) ? (e.enter("lineEnding"), e.consume(c), e.exit("lineEnding"), u) : (e.enter("codeTextData"), f(c));
|
|
3777
3769
|
}
|
|
3778
3770
|
function f(c) {
|
|
3779
|
-
return c === null || c === 32 || c === 96 ||
|
|
3771
|
+
return c === null || c === 32 || c === 96 || N(c) ? (e.exit("codeTextData"), u(c)) : (e.consume(c), f);
|
|
3780
3772
|
}
|
|
3781
3773
|
function s(c) {
|
|
3782
3774
|
return c === 96 ? (e.consume(c), i++, s) : i === r ? (e.exit("codeTextSequence"), e.exit("codeText"), t(c)) : (o.type = "codeTextData", f(c));
|
|
@@ -3862,7 +3854,7 @@ class Fa {
|
|
|
3862
3854
|
const i = n || 0;
|
|
3863
3855
|
this.setCursor(Math.trunc(t));
|
|
3864
3856
|
const o = this.right.splice(this.right.length - i, Number.POSITIVE_INFINITY);
|
|
3865
|
-
return r &&
|
|
3857
|
+
return r && St(this.left, r), o.reverse();
|
|
3866
3858
|
}
|
|
3867
3859
|
/**
|
|
3868
3860
|
* Remove and return the highest-numbered item in the array, so
|
|
@@ -3897,7 +3889,7 @@ class Fa {
|
|
|
3897
3889
|
* Nothing.
|
|
3898
3890
|
*/
|
|
3899
3891
|
pushMany(t) {
|
|
3900
|
-
this.setCursor(Number.POSITIVE_INFINITY),
|
|
3892
|
+
this.setCursor(Number.POSITIVE_INFINITY), St(this.left, t);
|
|
3901
3893
|
}
|
|
3902
3894
|
/**
|
|
3903
3895
|
* Inserts a single item to the low-numbered side of the array;
|
|
@@ -3921,7 +3913,7 @@ class Fa {
|
|
|
3921
3913
|
* Nothing.
|
|
3922
3914
|
*/
|
|
3923
3915
|
unshiftMany(t) {
|
|
3924
|
-
this.setCursor(0),
|
|
3916
|
+
this.setCursor(0), St(this.right, t.reverse());
|
|
3925
3917
|
}
|
|
3926
3918
|
/**
|
|
3927
3919
|
* Move the cursor to a specific position in the array. Requires
|
|
@@ -3939,14 +3931,14 @@ class Fa {
|
|
|
3939
3931
|
if (!(t === this.left.length || t > this.left.length && this.right.length === 0 || t < 0 && this.left.length === 0))
|
|
3940
3932
|
if (t < this.left.length) {
|
|
3941
3933
|
const n = this.left.splice(t, Number.POSITIVE_INFINITY);
|
|
3942
|
-
|
|
3934
|
+
St(this.right, n.reverse());
|
|
3943
3935
|
} else {
|
|
3944
3936
|
const n = this.right.splice(this.left.length + this.right.length - t, Number.POSITIVE_INFINITY);
|
|
3945
|
-
|
|
3937
|
+
St(this.left, n.reverse());
|
|
3946
3938
|
}
|
|
3947
3939
|
}
|
|
3948
3940
|
}
|
|
3949
|
-
function
|
|
3941
|
+
function St(e, t) {
|
|
3950
3942
|
let n = 0;
|
|
3951
3943
|
if (t.length < 1e4)
|
|
3952
3944
|
e.push(...t);
|
|
@@ -4022,7 +4014,7 @@ function Ha(e, t) {
|
|
|
4022
4014
|
}), i(a);
|
|
4023
4015
|
}
|
|
4024
4016
|
function i(a) {
|
|
4025
|
-
return a === null ? o(a) :
|
|
4017
|
+
return a === null ? o(a) : N(a) ? e.check(Ba, l, o)(a) : (e.consume(a), i);
|
|
4026
4018
|
}
|
|
4027
4019
|
function o(a) {
|
|
4028
4020
|
return e.exit("chunkContent"), e.exit("content"), t(a);
|
|
@@ -4041,7 +4033,7 @@ function Va(e, t, n) {
|
|
|
4041
4033
|
return e.exit("chunkContent"), e.enter("lineEnding"), e.consume(l), e.exit("lineEnding"), ie(e, o, "linePrefix");
|
|
4042
4034
|
}
|
|
4043
4035
|
function o(l) {
|
|
4044
|
-
if (l === null ||
|
|
4036
|
+
if (l === null || N(l))
|
|
4045
4037
|
return n(l);
|
|
4046
4038
|
const a = r.events[r.events.length - 1];
|
|
4047
4039
|
return !r.parser.constructs.disable.null.includes("codeIndented") && a && a[1].type === "linePrefix" && a[2].sliceSerialize(a[1], !0).length >= 4 ? t(l) : e.interrupt(r.parser.constructs.flow, n, t)(l);
|
|
@@ -4052,7 +4044,7 @@ function Ii(e, t, n, r, i, o, l, a, u) {
|
|
|
4052
4044
|
let s = 0;
|
|
4053
4045
|
return c;
|
|
4054
4046
|
function c(k) {
|
|
4055
|
-
return k === 60 ? (e.enter(r), e.enter(i), e.enter(o), e.consume(k), e.exit(o), h) : k === null || k === 32 || k === 41 ||
|
|
4047
|
+
return k === 60 ? (e.enter(r), e.enter(i), e.enter(o), e.consume(k), e.exit(o), h) : k === null || k === 32 || k === 41 || wn(k) ? n(k) : (e.enter(r), e.enter(l), e.enter(a), e.enter("chunkString", {
|
|
4056
4048
|
contentType: "string"
|
|
4057
4049
|
}), x(k));
|
|
4058
4050
|
}
|
|
@@ -4062,13 +4054,13 @@ function Ii(e, t, n, r, i, o, l, a, u) {
|
|
|
4062
4054
|
}), p(k));
|
|
4063
4055
|
}
|
|
4064
4056
|
function p(k) {
|
|
4065
|
-
return k === 62 ? (e.exit("chunkString"), e.exit(a), h(k)) : k === null || k === 60 ||
|
|
4057
|
+
return k === 62 ? (e.exit("chunkString"), e.exit(a), h(k)) : k === null || k === 60 || N(k) ? n(k) : (e.consume(k), k === 92 ? y : p);
|
|
4066
4058
|
}
|
|
4067
4059
|
function y(k) {
|
|
4068
4060
|
return k === 60 || k === 62 || k === 92 ? (e.consume(k), p) : p(k);
|
|
4069
4061
|
}
|
|
4070
4062
|
function x(k) {
|
|
4071
|
-
return !s && (k === null || k === 41 || Ae(k)) ? (e.exit("chunkString"), e.exit(a), e.exit(l), e.exit(r), t(k)) : s < f && k === 40 ? (e.consume(k), s++, x) : k === 41 ? (e.consume(k), s--, x) : k === null || k === 32 || k === 40 ||
|
|
4063
|
+
return !s && (k === null || k === 41 || Ae(k)) ? (e.exit("chunkString"), e.exit(a), e.exit(l), e.exit(r), t(k)) : s < f && k === 40 ? (e.consume(k), s++, x) : k === 41 ? (e.consume(k), s--, x) : k === null || k === 32 || k === 40 || wn(k) ? n(k) : (e.consume(k), k === 92 ? T : x);
|
|
4072
4064
|
}
|
|
4073
4065
|
function T(k) {
|
|
4074
4066
|
return k === 40 || k === 41 || k === 92 ? (e.consume(k), x) : x(k);
|
|
@@ -4087,12 +4079,12 @@ function Ai(e, t, n, r, i, o) {
|
|
|
4087
4079
|
// which doesn’t need this.
|
|
4088
4080
|
// Hidden footnotes hook.
|
|
4089
4081
|
/* c8 ignore next 3 */
|
|
4090
|
-
p === 94 && !a && "_hiddenFootnoteSupport" in l.parser.constructs ? n(p) : p === 93 ? (e.exit(o), e.enter(i), e.consume(p), e.exit(i), e.exit(r), t) :
|
|
4082
|
+
p === 94 && !a && "_hiddenFootnoteSupport" in l.parser.constructs ? n(p) : p === 93 ? (e.exit(o), e.enter(i), e.consume(p), e.exit(i), e.exit(r), t) : N(p) ? (e.enter("lineEnding"), e.consume(p), e.exit("lineEnding"), s) : (e.enter("chunkString", {
|
|
4091
4083
|
contentType: "string"
|
|
4092
4084
|
}), c(p));
|
|
4093
4085
|
}
|
|
4094
4086
|
function c(p) {
|
|
4095
|
-
return p === null || p === 91 || p === 93 ||
|
|
4087
|
+
return p === null || p === 91 || p === 93 || N(p) || a++ > 999 ? (e.exit("chunkString"), s(p)) : (e.consume(p), u || (u = !Q(p)), p === 92 ? h : c);
|
|
4096
4088
|
}
|
|
4097
4089
|
function h(p) {
|
|
4098
4090
|
return p === 91 || p === 92 || p === 93 ? (e.consume(p), a++, c) : c(p);
|
|
@@ -4108,22 +4100,22 @@ function Oi(e, t, n, r, i, o) {
|
|
|
4108
4100
|
return h === l ? (e.enter(i), e.consume(h), e.exit(i), e.exit(r), t) : (e.enter(o), f(h));
|
|
4109
4101
|
}
|
|
4110
4102
|
function f(h) {
|
|
4111
|
-
return h === l ? (e.exit(o), u(l)) : h === null ? n(h) :
|
|
4103
|
+
return h === l ? (e.exit(o), u(l)) : h === null ? n(h) : N(h) ? (e.enter("lineEnding"), e.consume(h), e.exit("lineEnding"), ie(e, f, "linePrefix")) : (e.enter("chunkString", {
|
|
4112
4104
|
contentType: "string"
|
|
4113
4105
|
}), s(h));
|
|
4114
4106
|
}
|
|
4115
4107
|
function s(h) {
|
|
4116
|
-
return h === l || h === null ||
|
|
4108
|
+
return h === l || h === null || N(h) ? (e.exit("chunkString"), f(h)) : (e.consume(h), h === 92 ? c : s);
|
|
4117
4109
|
}
|
|
4118
4110
|
function c(h) {
|
|
4119
4111
|
return h === l || h === 92 ? (e.consume(h), s) : s(h);
|
|
4120
4112
|
}
|
|
4121
4113
|
}
|
|
4122
|
-
function
|
|
4114
|
+
function _t(e, t) {
|
|
4123
4115
|
let n;
|
|
4124
4116
|
return r;
|
|
4125
4117
|
function r(i) {
|
|
4126
|
-
return
|
|
4118
|
+
return N(i) ? (e.enter("lineEnding"), e.consume(i), e.exit("lineEnding"), n = !0, r) : Q(i) ? ie(e, r, n ? "linePrefix" : "lineSuffix")(i) : t(i);
|
|
4127
4119
|
}
|
|
4128
4120
|
}
|
|
4129
4121
|
const Wa = {
|
|
@@ -4156,7 +4148,7 @@ function $a(e, t, n) {
|
|
|
4156
4148
|
return i = mt(r.sliceSerialize(r.events[r.events.length - 1][1]).slice(1, -1)), p === 58 ? (e.enter("definitionMarker"), e.consume(p), e.exit("definitionMarker"), u) : n(p);
|
|
4157
4149
|
}
|
|
4158
4150
|
function u(p) {
|
|
4159
|
-
return Ae(p) ?
|
|
4151
|
+
return Ae(p) ? _t(e, f)(p) : f(p);
|
|
4160
4152
|
}
|
|
4161
4153
|
function f(p) {
|
|
4162
4154
|
return Ii(
|
|
@@ -4178,13 +4170,13 @@ function $a(e, t, n) {
|
|
|
4178
4170
|
return Q(p) ? ie(e, h, "whitespace")(p) : h(p);
|
|
4179
4171
|
}
|
|
4180
4172
|
function h(p) {
|
|
4181
|
-
return p === null ||
|
|
4173
|
+
return p === null || N(p) ? (e.exit("definition"), r.parser.defined.push(i), t(p)) : n(p);
|
|
4182
4174
|
}
|
|
4183
4175
|
}
|
|
4184
4176
|
function Ya(e, t, n) {
|
|
4185
4177
|
return r;
|
|
4186
4178
|
function r(a) {
|
|
4187
|
-
return Ae(a) ?
|
|
4179
|
+
return Ae(a) ? _t(e, i)(a) : n(a);
|
|
4188
4180
|
}
|
|
4189
4181
|
function i(a) {
|
|
4190
4182
|
return Oi(e, o, n, "definitionTitle", "definitionTitleMarker", "definitionTitleString")(a);
|
|
@@ -4193,7 +4185,7 @@ function Ya(e, t, n) {
|
|
|
4193
4185
|
return Q(a) ? ie(e, l, "whitespace")(a) : l(a);
|
|
4194
4186
|
}
|
|
4195
4187
|
function l(a) {
|
|
4196
|
-
return a === null ||
|
|
4188
|
+
return a === null || N(a) ? t(a) : n(a);
|
|
4197
4189
|
}
|
|
4198
4190
|
}
|
|
4199
4191
|
const Ka = {
|
|
@@ -4206,7 +4198,7 @@ function Ga(e, t, n) {
|
|
|
4206
4198
|
return e.enter("hardBreakEscape"), e.consume(o), i;
|
|
4207
4199
|
}
|
|
4208
4200
|
function i(o) {
|
|
4209
|
-
return
|
|
4201
|
+
return N(o) ? (e.exit("hardBreakEscape"), t(o)) : n(o);
|
|
4210
4202
|
}
|
|
4211
4203
|
}
|
|
4212
4204
|
const Xa = {
|
|
@@ -4240,7 +4232,7 @@ function Ja(e, t, n) {
|
|
|
4240
4232
|
return s === 35 && r++ < 6 ? (e.consume(s), l) : s === null || Ae(s) ? (e.exit("atxHeadingSequence"), a(s)) : n(s);
|
|
4241
4233
|
}
|
|
4242
4234
|
function a(s) {
|
|
4243
|
-
return s === 35 ? (e.enter("atxHeadingSequence"), u(s)) : s === null ||
|
|
4235
|
+
return s === 35 ? (e.enter("atxHeadingSequence"), u(s)) : s === null || N(s) ? (e.exit("atxHeading"), t(s)) : Q(s) ? ie(e, a, "whitespace")(s) : (e.enter("atxHeadingText"), f(s));
|
|
4244
4236
|
}
|
|
4245
4237
|
function u(s) {
|
|
4246
4238
|
return s === 35 ? (e.consume(s), u) : (e.exit("atxHeadingSequence"), a(s));
|
|
@@ -4312,7 +4304,7 @@ const Za = [
|
|
|
4312
4304
|
"tr",
|
|
4313
4305
|
"track",
|
|
4314
4306
|
"ul"
|
|
4315
|
-
],
|
|
4307
|
+
], Ir = ["pre", "script", "style", "textarea"], es = {
|
|
4316
4308
|
concrete: !0,
|
|
4317
4309
|
name: "htmlFlow",
|
|
4318
4310
|
resolveTo: rs,
|
|
@@ -4359,9 +4351,9 @@ function is(e, t, n) {
|
|
|
4359
4351
|
function T(g) {
|
|
4360
4352
|
if (g === null || g === 47 || g === 62 || Ae(g)) {
|
|
4361
4353
|
const me = g === 47, Fe = l.toLowerCase();
|
|
4362
|
-
return !me && !o &&
|
|
4354
|
+
return !me && !o && Ir.includes(Fe) ? (i = 1, r.interrupt ? t(g) : R(g)) : Za.includes(l.toLowerCase()) ? (i = 6, me ? (e.consume(g), k) : r.interrupt ? t(g) : R(g)) : (i = 7, r.interrupt && !r.parser.lazy[r.now().line] ? n(g) : o ? A(g) : v(g));
|
|
4363
4355
|
}
|
|
4364
|
-
return g === 45 ||
|
|
4356
|
+
return g === 45 || De(g) ? (e.consume(g), l += String.fromCharCode(g), T) : n(g);
|
|
4365
4357
|
}
|
|
4366
4358
|
function k(g) {
|
|
4367
4359
|
return g === 62 ? (e.consume(g), r.interrupt ? t : R) : n(g);
|
|
@@ -4373,7 +4365,7 @@ function is(e, t, n) {
|
|
|
4373
4365
|
return g === 47 ? (e.consume(g), q) : g === 58 || g === 95 || $e(g) ? (e.consume(g), M) : Q(g) ? (e.consume(g), v) : q(g);
|
|
4374
4366
|
}
|
|
4375
4367
|
function M(g) {
|
|
4376
|
-
return g === 45 || g === 46 || g === 58 || g === 95 ||
|
|
4368
|
+
return g === 45 || g === 46 || g === 58 || g === 95 || De(g) ? (e.consume(g), M) : B(g);
|
|
4377
4369
|
}
|
|
4378
4370
|
function B(g) {
|
|
4379
4371
|
return g === 61 ? (e.consume(g), w) : Q(g) ? (e.consume(g), B) : v(g);
|
|
@@ -4382,22 +4374,22 @@ function is(e, t, n) {
|
|
|
4382
4374
|
return g === null || g === 60 || g === 61 || g === 62 || g === 96 ? n(g) : g === 34 || g === 39 ? (e.consume(g), u = g, L) : Q(g) ? (e.consume(g), w) : W(g);
|
|
4383
4375
|
}
|
|
4384
4376
|
function L(g) {
|
|
4385
|
-
return g === u ? (e.consume(g), u = null,
|
|
4377
|
+
return g === u ? (e.consume(g), u = null, D) : g === null || N(g) ? n(g) : (e.consume(g), L);
|
|
4386
4378
|
}
|
|
4387
4379
|
function W(g) {
|
|
4388
4380
|
return g === null || g === 34 || g === 39 || g === 47 || g === 60 || g === 61 || g === 62 || g === 96 || Ae(g) ? B(g) : (e.consume(g), W);
|
|
4389
4381
|
}
|
|
4390
|
-
function
|
|
4382
|
+
function D(g) {
|
|
4391
4383
|
return g === 47 || g === 62 || Q(g) ? v(g) : n(g);
|
|
4392
4384
|
}
|
|
4393
4385
|
function q(g) {
|
|
4394
4386
|
return g === 62 ? (e.consume(g), P) : n(g);
|
|
4395
4387
|
}
|
|
4396
4388
|
function P(g) {
|
|
4397
|
-
return g === null ||
|
|
4389
|
+
return g === null || N(g) ? R(g) : Q(g) ? (e.consume(g), P) : n(g);
|
|
4398
4390
|
}
|
|
4399
4391
|
function R(g) {
|
|
4400
|
-
return g === 45 && i === 2 ? (e.consume(g), oe) : g === 60 && i === 1 ? (e.consume(g), ee) : g === 62 && i === 4 ? (e.consume(g), le) : g === 63 && i === 3 ? (e.consume(g), d) : g === 93 && i === 5 ? (e.consume(g), z) :
|
|
4392
|
+
return g === 45 && i === 2 ? (e.consume(g), oe) : g === 60 && i === 1 ? (e.consume(g), ee) : g === 62 && i === 4 ? (e.consume(g), le) : g === 63 && i === 3 ? (e.consume(g), d) : g === 93 && i === 5 ? (e.consume(g), z) : N(g) && (i === 6 || i === 7) ? (e.exit("htmlFlowData"), e.check(ts, ke, J)(g)) : g === null || N(g) ? (e.exit("htmlFlowData"), J(g)) : (e.consume(g), R);
|
|
4401
4393
|
}
|
|
4402
4394
|
function J(g) {
|
|
4403
4395
|
return e.check(ns, Y, ke)(g);
|
|
@@ -4406,7 +4398,7 @@ function is(e, t, n) {
|
|
|
4406
4398
|
return e.enter("lineEnding"), e.consume(g), e.exit("lineEnding"), U;
|
|
4407
4399
|
}
|
|
4408
4400
|
function U(g) {
|
|
4409
|
-
return g === null ||
|
|
4401
|
+
return g === null || N(g) ? J(g) : (e.enter("htmlFlowData"), R(g));
|
|
4410
4402
|
}
|
|
4411
4403
|
function oe(g) {
|
|
4412
4404
|
return g === 45 ? (e.consume(g), d) : R(g);
|
|
@@ -4417,7 +4409,7 @@ function is(e, t, n) {
|
|
|
4417
4409
|
function de(g) {
|
|
4418
4410
|
if (g === 62) {
|
|
4419
4411
|
const me = l.toLowerCase();
|
|
4420
|
-
return
|
|
4412
|
+
return Ir.includes(me) ? (e.consume(g), le) : R(g);
|
|
4421
4413
|
}
|
|
4422
4414
|
return $e(g) && l.length < 8 ? (e.consume(g), l += String.fromCharCode(g), de) : R(g);
|
|
4423
4415
|
}
|
|
@@ -4428,7 +4420,7 @@ function is(e, t, n) {
|
|
|
4428
4420
|
return g === 62 ? (e.consume(g), le) : g === 45 && i === 2 ? (e.consume(g), d) : R(g);
|
|
4429
4421
|
}
|
|
4430
4422
|
function le(g) {
|
|
4431
|
-
return g === null ||
|
|
4423
|
+
return g === null || N(g) ? (e.exit("htmlFlowData"), ke(g)) : (e.consume(g), le);
|
|
4432
4424
|
}
|
|
4433
4425
|
function ke(g) {
|
|
4434
4426
|
return e.exit("htmlFlow"), t(g);
|
|
@@ -4438,7 +4430,7 @@ function os(e, t, n) {
|
|
|
4438
4430
|
const r = this;
|
|
4439
4431
|
return i;
|
|
4440
4432
|
function i(l) {
|
|
4441
|
-
return
|
|
4433
|
+
return N(l) ? (e.enter("lineEnding"), e.consume(l), e.exit("lineEnding"), o) : n(l);
|
|
4442
4434
|
}
|
|
4443
4435
|
function o(l) {
|
|
4444
4436
|
return r.parser.lazy[r.now().line] ? n(l) : t(l);
|
|
@@ -4471,7 +4463,7 @@ function ss(e, t, n) {
|
|
|
4471
4463
|
return d === 45 ? (e.consume(d), p) : n(d);
|
|
4472
4464
|
}
|
|
4473
4465
|
function c(d) {
|
|
4474
|
-
return d === null ? n(d) : d === 45 ? (e.consume(d), h) :
|
|
4466
|
+
return d === null ? n(d) : d === 45 ? (e.consume(d), h) : N(d) ? (l = c, ee(d)) : (e.consume(d), c);
|
|
4475
4467
|
}
|
|
4476
4468
|
function h(d) {
|
|
4477
4469
|
return d === 45 ? (e.consume(d), p) : c(d);
|
|
@@ -4484,7 +4476,7 @@ function ss(e, t, n) {
|
|
|
4484
4476
|
return d === le.charCodeAt(o++) ? (e.consume(d), o === le.length ? x : y) : n(d);
|
|
4485
4477
|
}
|
|
4486
4478
|
function x(d) {
|
|
4487
|
-
return d === null ? n(d) : d === 93 ? (e.consume(d), T) :
|
|
4479
|
+
return d === null ? n(d) : d === 93 ? (e.consume(d), T) : N(d) ? (l = x, ee(d)) : (e.consume(d), x);
|
|
4488
4480
|
}
|
|
4489
4481
|
function T(d) {
|
|
4490
4482
|
return d === 93 ? (e.consume(d), k) : x(d);
|
|
@@ -4493,10 +4485,10 @@ function ss(e, t, n) {
|
|
|
4493
4485
|
return d === 62 ? oe(d) : d === 93 ? (e.consume(d), k) : x(d);
|
|
4494
4486
|
}
|
|
4495
4487
|
function A(d) {
|
|
4496
|
-
return d === null || d === 62 ? oe(d) :
|
|
4488
|
+
return d === null || d === 62 ? oe(d) : N(d) ? (l = A, ee(d)) : (e.consume(d), A);
|
|
4497
4489
|
}
|
|
4498
4490
|
function v(d) {
|
|
4499
|
-
return d === null ? n(d) : d === 63 ? (e.consume(d), M) :
|
|
4491
|
+
return d === null ? n(d) : d === 63 ? (e.consume(d), M) : N(d) ? (l = v, ee(d)) : (e.consume(d), v);
|
|
4500
4492
|
}
|
|
4501
4493
|
function M(d) {
|
|
4502
4494
|
return d === 62 ? oe(d) : v(d);
|
|
@@ -4505,34 +4497,34 @@ function ss(e, t, n) {
|
|
|
4505
4497
|
return $e(d) ? (e.consume(d), w) : n(d);
|
|
4506
4498
|
}
|
|
4507
4499
|
function w(d) {
|
|
4508
|
-
return d === 45 ||
|
|
4500
|
+
return d === 45 || De(d) ? (e.consume(d), w) : L(d);
|
|
4509
4501
|
}
|
|
4510
4502
|
function L(d) {
|
|
4511
|
-
return
|
|
4503
|
+
return N(d) ? (l = L, ee(d)) : Q(d) ? (e.consume(d), L) : oe(d);
|
|
4512
4504
|
}
|
|
4513
4505
|
function W(d) {
|
|
4514
|
-
return d === 45 ||
|
|
4506
|
+
return d === 45 || De(d) ? (e.consume(d), W) : d === 47 || d === 62 || Ae(d) ? D(d) : n(d);
|
|
4515
4507
|
}
|
|
4516
|
-
function
|
|
4517
|
-
return d === 47 ? (e.consume(d), oe) : d === 58 || d === 95 || $e(d) ? (e.consume(d), q) :
|
|
4508
|
+
function D(d) {
|
|
4509
|
+
return d === 47 ? (e.consume(d), oe) : d === 58 || d === 95 || $e(d) ? (e.consume(d), q) : N(d) ? (l = D, ee(d)) : Q(d) ? (e.consume(d), D) : oe(d);
|
|
4518
4510
|
}
|
|
4519
4511
|
function q(d) {
|
|
4520
|
-
return d === 45 || d === 46 || d === 58 || d === 95 ||
|
|
4512
|
+
return d === 45 || d === 46 || d === 58 || d === 95 || De(d) ? (e.consume(d), q) : P(d);
|
|
4521
4513
|
}
|
|
4522
4514
|
function P(d) {
|
|
4523
|
-
return d === 61 ? (e.consume(d), R) :
|
|
4515
|
+
return d === 61 ? (e.consume(d), R) : N(d) ? (l = P, ee(d)) : Q(d) ? (e.consume(d), P) : D(d);
|
|
4524
4516
|
}
|
|
4525
4517
|
function R(d) {
|
|
4526
|
-
return d === null || d === 60 || d === 61 || d === 62 || d === 96 ? n(d) : d === 34 || d === 39 ? (e.consume(d), i = d, J) :
|
|
4518
|
+
return d === null || d === 60 || d === 61 || d === 62 || d === 96 ? n(d) : d === 34 || d === 39 ? (e.consume(d), i = d, J) : N(d) ? (l = R, ee(d)) : Q(d) ? (e.consume(d), R) : (e.consume(d), Y);
|
|
4527
4519
|
}
|
|
4528
4520
|
function J(d) {
|
|
4529
|
-
return d === i ? (e.consume(d), i = void 0, U) : d === null ? n(d) :
|
|
4521
|
+
return d === i ? (e.consume(d), i = void 0, U) : d === null ? n(d) : N(d) ? (l = J, ee(d)) : (e.consume(d), J);
|
|
4530
4522
|
}
|
|
4531
4523
|
function Y(d) {
|
|
4532
|
-
return d === null || d === 34 || d === 39 || d === 60 || d === 61 || d === 96 ? n(d) : d === 47 || d === 62 || Ae(d) ?
|
|
4524
|
+
return d === null || d === 34 || d === 39 || d === 60 || d === 61 || d === 96 ? n(d) : d === 47 || d === 62 || Ae(d) ? D(d) : (e.consume(d), Y);
|
|
4533
4525
|
}
|
|
4534
4526
|
function U(d) {
|
|
4535
|
-
return d === 47 || d === 62 || Ae(d) ?
|
|
4527
|
+
return d === 47 || d === 62 || Ae(d) ? D(d) : n(d);
|
|
4536
4528
|
}
|
|
4537
4529
|
function oe(d) {
|
|
4538
4530
|
return d === 62 ? (e.consume(d), e.exit("htmlTextData"), e.exit("htmlText"), t) : n(d);
|
|
@@ -4547,7 +4539,7 @@ function ss(e, t, n) {
|
|
|
4547
4539
|
return e.enter("htmlTextData"), l(d);
|
|
4548
4540
|
}
|
|
4549
4541
|
}
|
|
4550
|
-
const
|
|
4542
|
+
const Dn = {
|
|
4551
4543
|
name: "labelEnd",
|
|
4552
4544
|
resolveAll: ps,
|
|
4553
4545
|
resolveTo: hs,
|
|
@@ -4609,7 +4601,7 @@ function hs(e, t) {
|
|
|
4609
4601
|
...e[l - 2][1].start
|
|
4610
4602
|
}
|
|
4611
4603
|
};
|
|
4612
|
-
return a = [["enter", u, t], ["enter", f, t]], a = ze(a, e.slice(o + 1, o + r + 3)), a = ze(a, [["enter", s, t]]), a = ze(a,
|
|
4604
|
+
return a = [["enter", u, t], ["enter", f, t]], a = ze(a, e.slice(o + 1, o + r + 3)), a = ze(a, [["enter", s, t]]), a = ze(a, Nn(t.parser.constructs.insideSpan.null, e.slice(o + r + 4, l - 3), t)), a = ze(a, [["exit", s, t], e[l - 2], e[l - 1], ["exit", f, t]]), a = ze(a, e.slice(l + 1)), a = ze(a, [["exit", u, t]]), Ye(e, o, e.length, a), e;
|
|
4613
4605
|
}
|
|
4614
4606
|
function ds(e, t, n) {
|
|
4615
4607
|
const r = this;
|
|
@@ -4645,13 +4637,13 @@ function ms(e, t, n) {
|
|
|
4645
4637
|
return e.enter("resource"), e.enter("resourceMarker"), e.consume(c), e.exit("resourceMarker"), i;
|
|
4646
4638
|
}
|
|
4647
4639
|
function i(c) {
|
|
4648
|
-
return Ae(c) ?
|
|
4640
|
+
return Ae(c) ? _t(e, o)(c) : o(c);
|
|
4649
4641
|
}
|
|
4650
4642
|
function o(c) {
|
|
4651
4643
|
return c === 41 ? s(c) : Ii(e, l, a, "resourceDestination", "resourceDestinationLiteral", "resourceDestinationLiteralMarker", "resourceDestinationRaw", "resourceDestinationString", 32)(c);
|
|
4652
4644
|
}
|
|
4653
4645
|
function l(c) {
|
|
4654
|
-
return Ae(c) ?
|
|
4646
|
+
return Ae(c) ? _t(e, u)(c) : s(c);
|
|
4655
4647
|
}
|
|
4656
4648
|
function a(c) {
|
|
4657
4649
|
return n(c);
|
|
@@ -4660,7 +4652,7 @@ function ms(e, t, n) {
|
|
|
4660
4652
|
return c === 34 || c === 39 || c === 40 ? Oi(e, f, n, "resourceTitle", "resourceTitleMarker", "resourceTitleString")(c) : s(c);
|
|
4661
4653
|
}
|
|
4662
4654
|
function f(c) {
|
|
4663
|
-
return Ae(c) ?
|
|
4655
|
+
return Ae(c) ? _t(e, s)(c) : s(c);
|
|
4664
4656
|
}
|
|
4665
4657
|
function s(c) {
|
|
4666
4658
|
return c === 41 ? (e.enter("resourceMarker"), e.consume(c), e.exit("resourceMarker"), e.exit("resource"), t) : n(c);
|
|
@@ -4690,7 +4682,7 @@ function ys(e, t, n) {
|
|
|
4690
4682
|
}
|
|
4691
4683
|
const xs = {
|
|
4692
4684
|
name: "labelStartImage",
|
|
4693
|
-
resolveAll:
|
|
4685
|
+
resolveAll: Dn.resolveAll,
|
|
4694
4686
|
tokenize: bs
|
|
4695
4687
|
};
|
|
4696
4688
|
function bs(e, t, n) {
|
|
@@ -4708,7 +4700,7 @@ function bs(e, t, n) {
|
|
|
4708
4700
|
}
|
|
4709
4701
|
const ws = {
|
|
4710
4702
|
name: "labelStartLink",
|
|
4711
|
-
resolveAll:
|
|
4703
|
+
resolveAll: Dn.resolveAll,
|
|
4712
4704
|
tokenize: ks
|
|
4713
4705
|
};
|
|
4714
4706
|
function ks(e, t, n) {
|
|
@@ -4731,7 +4723,7 @@ function vs(e, t) {
|
|
|
4731
4723
|
return e.enter("lineEnding"), e.consume(r), e.exit("lineEnding"), ie(e, t, "linePrefix");
|
|
4732
4724
|
}
|
|
4733
4725
|
}
|
|
4734
|
-
const
|
|
4726
|
+
const Dt = {
|
|
4735
4727
|
name: "thematicBreak",
|
|
4736
4728
|
tokenize: Ss
|
|
4737
4729
|
};
|
|
@@ -4745,7 +4737,7 @@ function Ss(e, t, n) {
|
|
|
4745
4737
|
return i = f, a(f);
|
|
4746
4738
|
}
|
|
4747
4739
|
function a(f) {
|
|
4748
|
-
return f === i ? (e.enter("thematicBreakSequence"), u(f)) : r >= 3 && (f === null ||
|
|
4740
|
+
return f === i ? (e.enter("thematicBreakSequence"), u(f)) : r >= 3 && (f === null || N(f)) ? (e.exit("thematicBreak"), t(f)) : n(f);
|
|
4749
4741
|
}
|
|
4750
4742
|
function u(f) {
|
|
4751
4743
|
return f === i ? (e.consume(f), r++, u) : (e.exit("thematicBreakSequence"), Q(f) ? ie(e, a, "whitespace")(f) : a(f));
|
|
@@ -4771,18 +4763,18 @@ function _s(e, t, n) {
|
|
|
4771
4763
|
return a;
|
|
4772
4764
|
function a(p) {
|
|
4773
4765
|
const y = r.containerState.type || (p === 42 || p === 43 || p === 45 ? "listUnordered" : "listOrdered");
|
|
4774
|
-
if (y === "listUnordered" ? !r.containerState.marker || p === r.containerState.marker :
|
|
4766
|
+
if (y === "listUnordered" ? !r.containerState.marker || p === r.containerState.marker : kn(p)) {
|
|
4775
4767
|
if (r.containerState.type || (r.containerState.type = y, e.enter(y, {
|
|
4776
4768
|
_container: !0
|
|
4777
4769
|
})), y === "listUnordered")
|
|
4778
|
-
return e.enter("listItemPrefix"), p === 42 || p === 45 ? e.check(
|
|
4770
|
+
return e.enter("listItemPrefix"), p === 42 || p === 45 ? e.check(Dt, n, f)(p) : f(p);
|
|
4779
4771
|
if (!r.interrupt || p === 49)
|
|
4780
4772
|
return e.enter("listItemPrefix"), e.enter("listItemValue"), u(p);
|
|
4781
4773
|
}
|
|
4782
4774
|
return n(p);
|
|
4783
4775
|
}
|
|
4784
4776
|
function u(p) {
|
|
4785
|
-
return
|
|
4777
|
+
return kn(p) && ++l < 10 ? (e.consume(p), u) : (!r.interrupt || l < 2) && (r.containerState.marker ? p === r.containerState.marker : p === 41 || p === 46) ? (e.exit("listItemValue"), f(p)) : n(p);
|
|
4786
4778
|
}
|
|
4787
4779
|
function f(p) {
|
|
4788
4780
|
return e.enter("listItemMarker"), e.consume(p), e.exit("listItemMarker"), r.containerState.marker = r.containerState.marker || p, e.check(
|
|
@@ -4834,7 +4826,7 @@ function Os(e, t, n) {
|
|
|
4834
4826
|
return !Q(o) && l && l[1].type === "listItemPrefixWhitespace" ? t(o) : n(o);
|
|
4835
4827
|
}
|
|
4836
4828
|
}
|
|
4837
|
-
const
|
|
4829
|
+
const Ar = {
|
|
4838
4830
|
name: "setextUnderline",
|
|
4839
4831
|
resolveTo: Ps,
|
|
4840
4832
|
tokenize: Rs
|
|
@@ -4883,7 +4875,7 @@ function Rs(e, t, n) {
|
|
|
4883
4875
|
return f === i ? (e.consume(f), a) : (e.exit("setextHeadingLineSequence"), Q(f) ? ie(e, u, "lineSuffix")(f) : u(f));
|
|
4884
4876
|
}
|
|
4885
4877
|
function u(f) {
|
|
4886
|
-
return f === null ||
|
|
4878
|
+
return f === null || N(f) ? (e.exit("setextHeadingLine"), t(f)) : n(f);
|
|
4887
4879
|
}
|
|
4888
4880
|
}
|
|
4889
4881
|
const Ls = {
|
|
@@ -4913,9 +4905,9 @@ function js(e) {
|
|
|
4913
4905
|
return e.enter("lineEnding"), e.consume(o), e.exit("lineEnding"), t.currentConstruct = void 0, n;
|
|
4914
4906
|
}
|
|
4915
4907
|
}
|
|
4916
|
-
const
|
|
4908
|
+
const Ns = {
|
|
4917
4909
|
resolveAll: Ri()
|
|
4918
|
-
},
|
|
4910
|
+
}, Ds = Pi("string"), Fs = Pi("text");
|
|
4919
4911
|
function Pi(e) {
|
|
4920
4912
|
return {
|
|
4921
4913
|
resolveAll: Ri(e === "text" ? Ms : void 0),
|
|
@@ -5026,13 +5018,13 @@ const zs = {
|
|
|
5026
5018
|
32: tn
|
|
5027
5019
|
}, Hs = {
|
|
5028
5020
|
35: Xa,
|
|
5029
|
-
42:
|
|
5030
|
-
45: [
|
|
5021
|
+
42: Dt,
|
|
5022
|
+
45: [Ar, Dt],
|
|
5031
5023
|
60: es,
|
|
5032
|
-
61:
|
|
5033
|
-
95:
|
|
5034
|
-
96:
|
|
5035
|
-
126:
|
|
5024
|
+
61: Ar,
|
|
5025
|
+
95: Dt,
|
|
5026
|
+
96: Tr,
|
|
5027
|
+
126: Tr
|
|
5036
5028
|
}, Vs = {
|
|
5037
5029
|
38: _i,
|
|
5038
5030
|
92: Ci
|
|
@@ -5042,15 +5034,15 @@ const zs = {
|
|
|
5042
5034
|
[-3]: nn,
|
|
5043
5035
|
33: xs,
|
|
5044
5036
|
38: _i,
|
|
5045
|
-
42:
|
|
5037
|
+
42: vn,
|
|
5046
5038
|
60: [wa, as],
|
|
5047
5039
|
91: ws,
|
|
5048
5040
|
92: [Ka, Ci],
|
|
5049
|
-
93:
|
|
5050
|
-
95:
|
|
5041
|
+
93: Dn,
|
|
5042
|
+
95: vn,
|
|
5051
5043
|
96: La
|
|
5052
5044
|
}, qs = {
|
|
5053
|
-
null: [
|
|
5045
|
+
null: [vn, Ns]
|
|
5054
5046
|
}, $s = {
|
|
5055
5047
|
null: [42, 95]
|
|
5056
5048
|
}, Ys = {
|
|
@@ -5101,7 +5093,7 @@ function Gs(e, t, n) {
|
|
|
5101
5093
|
let s = t.tokenize.call(f, u);
|
|
5102
5094
|
return t.resolveAll && o.push(t), f;
|
|
5103
5095
|
function c(P) {
|
|
5104
|
-
return l = ze(l, P), T(), l[l.length - 1] !== null ? [] : (W(t, 0), f.events =
|
|
5096
|
+
return l = ze(l, P), T(), l[l.length - 1] !== null ? [] : (W(t, 0), f.events = Nn(o, f.events, f), f.events);
|
|
5105
5097
|
}
|
|
5106
5098
|
function h(P, R) {
|
|
5107
5099
|
return Qs(p(P), R);
|
|
@@ -5143,7 +5135,7 @@ function Gs(e, t, n) {
|
|
|
5143
5135
|
s = s(P);
|
|
5144
5136
|
}
|
|
5145
5137
|
function A(P) {
|
|
5146
|
-
|
|
5138
|
+
N(P) ? (r.line++, r.column = 1, r.offset += P === -3 ? 2 : 1, q()) : P !== -1 && (r.column++, r.offset++), r._bufferIndex < 0 ? r._index++ : (r._bufferIndex++, r._bufferIndex === // Points w/ non-negative `_bufferIndex` reference
|
|
5147
5139
|
// strings.
|
|
5148
5140
|
/** @type {string} */
|
|
5149
5141
|
l[r._index].length && (r._bufferIndex = -1, r._index++)), f.previous = P;
|
|
@@ -5194,7 +5186,7 @@ function Gs(e, t, n) {
|
|
|
5194
5186
|
function g(ae) {
|
|
5195
5187
|
return Be;
|
|
5196
5188
|
function Be(ve) {
|
|
5197
|
-
return d =
|
|
5189
|
+
return d = D(), z = ae, ae.partial || (f.currentConstruct = ae), ae.name && f.parser.constructs.disable.null.includes(ae.name) ? Fe() : ae.tokenize.call(
|
|
5198
5190
|
// If we do have fields, create an object w/ `context` as its
|
|
5199
5191
|
// prototype.
|
|
5200
5192
|
// This allows a “live binding”, which is needed for `interrupt`.
|
|
@@ -5216,7 +5208,7 @@ function Gs(e, t, n) {
|
|
|
5216
5208
|
function W(P, R) {
|
|
5217
5209
|
P.resolveAll && !o.includes(P) && o.push(P), P.resolve && Ye(f.events, R, f.events.length - R, P.resolve(f.events.slice(R), f)), P.resolveTo && (f.events = P.resolveTo(f.events, f));
|
|
5218
5210
|
}
|
|
5219
|
-
function
|
|
5211
|
+
function D() {
|
|
5220
5212
|
const P = y(), R = f.previous, J = f.currentConstruct, Y = f.events.length, U = Array.from(a);
|
|
5221
5213
|
return {
|
|
5222
5214
|
from: Y,
|
|
@@ -5295,7 +5287,7 @@ function Js(e) {
|
|
|
5295
5287
|
document: i(ma),
|
|
5296
5288
|
flow: i(Ls),
|
|
5297
5289
|
lazy: {},
|
|
5298
|
-
string: i(
|
|
5290
|
+
string: i(Ds),
|
|
5299
5291
|
text: i(Fs)
|
|
5300
5292
|
};
|
|
5301
5293
|
return r;
|
|
@@ -5311,7 +5303,7 @@ function Zs(e) {
|
|
|
5311
5303
|
;
|
|
5312
5304
|
return e;
|
|
5313
5305
|
}
|
|
5314
|
-
const
|
|
5306
|
+
const Or = /[\0\t\n\r]/g;
|
|
5315
5307
|
function eu() {
|
|
5316
5308
|
let e = 1, t = "", n = !0, r;
|
|
5317
5309
|
return i;
|
|
@@ -5319,7 +5311,7 @@ function eu() {
|
|
|
5319
5311
|
const u = [];
|
|
5320
5312
|
let f, s, c, h, p;
|
|
5321
5313
|
for (o = t + (typeof o == "string" ? o.toString() : new TextDecoder(l || void 0).decode(o)), c = 0, t = "", n && (o.charCodeAt(0) === 65279 && c++, n = void 0); c < o.length; ) {
|
|
5322
|
-
if (
|
|
5314
|
+
if (Or.lastIndex = c, f = Or.exec(o), h = f && f.index !== void 0 ? f.index : o.length, p = o.charCodeAt(h), !f) {
|
|
5323
5315
|
t = o.slice(c);
|
|
5324
5316
|
break;
|
|
5325
5317
|
}
|
|
@@ -5358,7 +5350,7 @@ function ru(e, t, n) {
|
|
|
5358
5350
|
const i = n.charCodeAt(1), o = i === 120 || i === 88;
|
|
5359
5351
|
return Si(n.slice(o ? 2 : 1), o ? 16 : 10);
|
|
5360
5352
|
}
|
|
5361
|
-
return
|
|
5353
|
+
return jn(n) || e;
|
|
5362
5354
|
}
|
|
5363
5355
|
const Li = {}.hasOwnProperty;
|
|
5364
5356
|
function iu(e, t, n) {
|
|
@@ -5370,31 +5362,31 @@ function ou(e) {
|
|
|
5370
5362
|
canContainEols: ["emphasis", "fragment", "heading", "paragraph", "strong"],
|
|
5371
5363
|
enter: {
|
|
5372
5364
|
autolink: o(se),
|
|
5373
|
-
autolinkProtocol:
|
|
5374
|
-
autolinkEmail:
|
|
5365
|
+
autolinkProtocol: D,
|
|
5366
|
+
autolinkEmail: D,
|
|
5375
5367
|
atxHeading: o(et),
|
|
5376
5368
|
blockQuote: o(he),
|
|
5377
|
-
characterEscape:
|
|
5378
|
-
characterReference:
|
|
5369
|
+
characterEscape: D,
|
|
5370
|
+
characterReference: D,
|
|
5379
5371
|
codeFenced: o(Le),
|
|
5380
5372
|
codeFencedFenceInfo: l,
|
|
5381
5373
|
codeFencedFenceMeta: l,
|
|
5382
5374
|
codeIndented: o(Le, l),
|
|
5383
|
-
codeText: o(
|
|
5384
|
-
codeTextData:
|
|
5385
|
-
data:
|
|
5386
|
-
codeFlowValue:
|
|
5375
|
+
codeText: o(bt, l),
|
|
5376
|
+
codeTextData: D,
|
|
5377
|
+
data: D,
|
|
5378
|
+
codeFlowValue: D,
|
|
5387
5379
|
definition: o(ut),
|
|
5388
5380
|
definitionDestinationString: l,
|
|
5389
5381
|
definitionLabelString: l,
|
|
5390
5382
|
definitionTitleString: l,
|
|
5391
|
-
emphasis: o(
|
|
5383
|
+
emphasis: o(wt),
|
|
5392
5384
|
hardBreakEscape: o(Ke),
|
|
5393
5385
|
hardBreakTrailing: o(Ke),
|
|
5394
5386
|
htmlFlow: o(O, l),
|
|
5395
|
-
htmlFlowData:
|
|
5387
|
+
htmlFlowData: D,
|
|
5396
5388
|
htmlText: o(O, l),
|
|
5397
|
-
htmlTextData:
|
|
5389
|
+
htmlTextData: D,
|
|
5398
5390
|
image: o(K),
|
|
5399
5391
|
label: l,
|
|
5400
5392
|
link: o(se),
|
|
@@ -5498,7 +5490,7 @@ function ou(e) {
|
|
|
5498
5490
|
}
|
|
5499
5491
|
if (j.tokenStack.length > 0) {
|
|
5500
5492
|
const ge = j.tokenStack[j.tokenStack.length - 1];
|
|
5501
|
-
(ge[1] ||
|
|
5493
|
+
(ge[1] || Pr).call(j, void 0, ge[0]);
|
|
5502
5494
|
}
|
|
5503
5495
|
for (C.position = {
|
|
5504
5496
|
start: Je(b.length > 0 ? b[0][1].start : {
|
|
@@ -5593,8 +5585,8 @@ function ou(e) {
|
|
|
5593
5585
|
function f(b, C) {
|
|
5594
5586
|
const j = this.stack.pop(), H = this.tokenStack.pop();
|
|
5595
5587
|
if (H)
|
|
5596
|
-
H[0].type !== b.type && (C ? C.call(this, b, H[0]) : (H[1] ||
|
|
5597
|
-
else throw new Error("Cannot close `" + b.type + "` (" +
|
|
5588
|
+
H[0].type !== b.type && (C ? C.call(this, b, H[0]) : (H[1] || Pr).call(this, b, H[0]));
|
|
5589
|
+
else throw new Error("Cannot close `" + b.type + "` (" + Ct({
|
|
5598
5590
|
start: b.start,
|
|
5599
5591
|
end: b.end
|
|
5600
5592
|
}) + "): it’s not open");
|
|
@@ -5660,7 +5652,7 @@ function ou(e) {
|
|
|
5660
5652
|
function W() {
|
|
5661
5653
|
this.data.setextHeadingSlurpLineEnding = void 0;
|
|
5662
5654
|
}
|
|
5663
|
-
function
|
|
5655
|
+
function D(b) {
|
|
5664
5656
|
const j = this.stack[this.stack.length - 1].children;
|
|
5665
5657
|
let H = j[j.length - 1];
|
|
5666
5658
|
(!H || H.type !== "text") && (H = Ge(), H.position = {
|
|
@@ -5680,7 +5672,7 @@ function ou(e) {
|
|
|
5680
5672
|
j.position.end = Je(b.end), this.data.atHardBreak = void 0;
|
|
5681
5673
|
return;
|
|
5682
5674
|
}
|
|
5683
|
-
!this.data.setextHeadingSlurpLineEnding && t.canContainEols.includes(C.type) && (
|
|
5675
|
+
!this.data.setextHeadingSlurpLineEnding && t.canContainEols.includes(C.type) && (D.call(this, b), q.call(this, b));
|
|
5684
5676
|
}
|
|
5685
5677
|
function R() {
|
|
5686
5678
|
this.data.atHardBreak = !0;
|
|
@@ -5751,7 +5743,7 @@ function ou(e) {
|
|
|
5751
5743
|
function ae(b) {
|
|
5752
5744
|
const C = this.sliceSerialize(b), j = this.data.characterReferenceType;
|
|
5753
5745
|
let H;
|
|
5754
|
-
j ? (H = Si(C, j === "characterReferenceMarkerNumeric" ? 10 : 16), this.data.characterReferenceType = void 0) : H =
|
|
5746
|
+
j ? (H = Si(C, j === "characterReferenceMarkerNumeric" ? 10 : 16), this.data.characterReferenceType = void 0) : H = jn(C);
|
|
5755
5747
|
const X = this.stack[this.stack.length - 1];
|
|
5756
5748
|
X.value += H;
|
|
5757
5749
|
}
|
|
@@ -5783,7 +5775,7 @@ function ou(e) {
|
|
|
5783
5775
|
value: ""
|
|
5784
5776
|
};
|
|
5785
5777
|
}
|
|
5786
|
-
function
|
|
5778
|
+
function bt() {
|
|
5787
5779
|
return {
|
|
5788
5780
|
type: "inlineCode",
|
|
5789
5781
|
value: ""
|
|
@@ -5798,7 +5790,7 @@ function ou(e) {
|
|
|
5798
5790
|
url: ""
|
|
5799
5791
|
};
|
|
5800
5792
|
}
|
|
5801
|
-
function
|
|
5793
|
+
function wt() {
|
|
5802
5794
|
return {
|
|
5803
5795
|
type: "emphasis",
|
|
5804
5796
|
children: []
|
|
@@ -5917,14 +5909,14 @@ function lu(e, t) {
|
|
|
5917
5909
|
}
|
|
5918
5910
|
}
|
|
5919
5911
|
}
|
|
5920
|
-
function
|
|
5921
|
-
throw e ? new Error("Cannot close `" + e.type + "` (" +
|
|
5912
|
+
function Pr(e, t) {
|
|
5913
|
+
throw e ? new Error("Cannot close `" + e.type + "` (" + Ct({
|
|
5922
5914
|
start: e.start,
|
|
5923
5915
|
end: e.end
|
|
5924
|
-
}) + "): a different token (`" + t.type + "`, " +
|
|
5916
|
+
}) + "): a different token (`" + t.type + "`, " + Ct({
|
|
5925
5917
|
start: t.start,
|
|
5926
5918
|
end: t.end
|
|
5927
|
-
}) + ") is open") : new Error("Cannot close document, a token (`" + t.type + "`, " +
|
|
5919
|
+
}) + ") is open") : new Error("Cannot close document, a token (`" + t.type + "`, " + Ct({
|
|
5928
5920
|
start: t.start,
|
|
5929
5921
|
end: t.end
|
|
5930
5922
|
}) + ") is still open");
|
|
@@ -5989,7 +5981,7 @@ function pu(e, t) {
|
|
|
5989
5981
|
return e.patch(t, n), e.applyData(t, n);
|
|
5990
5982
|
}
|
|
5991
5983
|
function hu(e, t) {
|
|
5992
|
-
const n = typeof e.options.clobberPrefix == "string" ? e.options.clobberPrefix : "user-content-", r = String(t.identifier).toUpperCase(), i =
|
|
5984
|
+
const n = typeof e.options.clobberPrefix == "string" ? e.options.clobberPrefix : "user-content-", r = String(t.identifier).toUpperCase(), i = xt(r.toLowerCase()), o = e.footnoteOrder.indexOf(r);
|
|
5993
5985
|
let l, a = e.footnoteCounts.get(r);
|
|
5994
5986
|
a === void 0 ? (a = 0, e.footnoteOrder.push(r), l = e.footnoteOrder.length) : l = o + 1, a += 1, e.footnoteCounts.set(r, a);
|
|
5995
5987
|
const u = {
|
|
@@ -6027,7 +6019,7 @@ function mu(e, t) {
|
|
|
6027
6019
|
return e.patch(t, n), e.applyData(t, n);
|
|
6028
6020
|
}
|
|
6029
6021
|
}
|
|
6030
|
-
function
|
|
6022
|
+
function Ni(e, t) {
|
|
6031
6023
|
const n = t.referenceType;
|
|
6032
6024
|
let r = "]";
|
|
6033
6025
|
if (n === "collapsed" ? r += "[]" : n === "full" && (r += "[" + (t.label || t.identifier) + "]"), t.type === "imageReference")
|
|
@@ -6040,14 +6032,14 @@ function Di(e, t) {
|
|
|
6040
6032
|
function gu(e, t) {
|
|
6041
6033
|
const n = String(t.identifier).toUpperCase(), r = e.definitionById.get(n);
|
|
6042
6034
|
if (!r)
|
|
6043
|
-
return
|
|
6044
|
-
const i = { src:
|
|
6035
|
+
return Ni(e, t);
|
|
6036
|
+
const i = { src: xt(r.url || ""), alt: t.alt };
|
|
6045
6037
|
r.title !== null && r.title !== void 0 && (i.title = r.title);
|
|
6046
6038
|
const o = { type: "element", tagName: "img", properties: i, children: [] };
|
|
6047
6039
|
return e.patch(t, o), e.applyData(t, o);
|
|
6048
6040
|
}
|
|
6049
6041
|
function yu(e, t) {
|
|
6050
|
-
const n = { src:
|
|
6042
|
+
const n = { src: xt(t.url) };
|
|
6051
6043
|
t.alt !== null && t.alt !== void 0 && (n.alt = t.alt), t.title !== null && t.title !== void 0 && (n.title = t.title);
|
|
6052
6044
|
const r = { type: "element", tagName: "img", properties: n, children: [] };
|
|
6053
6045
|
return e.patch(t, r), e.applyData(t, r);
|
|
@@ -6066,8 +6058,8 @@ function xu(e, t) {
|
|
|
6066
6058
|
function bu(e, t) {
|
|
6067
6059
|
const n = String(t.identifier).toUpperCase(), r = e.definitionById.get(n);
|
|
6068
6060
|
if (!r)
|
|
6069
|
-
return
|
|
6070
|
-
const i = { href:
|
|
6061
|
+
return Ni(e, t);
|
|
6062
|
+
const i = { href: xt(r.url || "") };
|
|
6071
6063
|
r.title !== null && r.title !== void 0 && (i.title = r.title);
|
|
6072
6064
|
const o = {
|
|
6073
6065
|
type: "element",
|
|
@@ -6078,7 +6070,7 @@ function bu(e, t) {
|
|
|
6078
6070
|
return e.patch(t, o), e.applyData(t, o);
|
|
6079
6071
|
}
|
|
6080
6072
|
function wu(e, t) {
|
|
6081
|
-
const n = { href:
|
|
6073
|
+
const n = { href: xt(t.url) };
|
|
6082
6074
|
t.title !== null && t.title !== void 0 && (n.title = t.title);
|
|
6083
6075
|
const r = {
|
|
6084
6076
|
type: "element",
|
|
@@ -6089,7 +6081,7 @@ function wu(e, t) {
|
|
|
6089
6081
|
return e.patch(t, r), e.applyData(t, r);
|
|
6090
6082
|
}
|
|
6091
6083
|
function ku(e, t, n) {
|
|
6092
|
-
const r = e.all(t), i = n ? vu(n) :
|
|
6084
|
+
const r = e.all(t), i = n ? vu(n) : Di(t), o = {}, l = [];
|
|
6093
6085
|
if (typeof t.checked == "boolean") {
|
|
6094
6086
|
const s = r[0];
|
|
6095
6087
|
let c;
|
|
@@ -6119,11 +6111,11 @@ function vu(e) {
|
|
|
6119
6111
|
const n = e.children;
|
|
6120
6112
|
let r = -1;
|
|
6121
6113
|
for (; !t && ++r < n.length; )
|
|
6122
|
-
t =
|
|
6114
|
+
t = Di(n[r]);
|
|
6123
6115
|
}
|
|
6124
6116
|
return t;
|
|
6125
6117
|
}
|
|
6126
|
-
function
|
|
6118
|
+
function Di(e) {
|
|
6127
6119
|
const t = e.spread;
|
|
6128
6120
|
return t ?? e.children.length > 1;
|
|
6129
6121
|
}
|
|
@@ -6184,7 +6176,7 @@ function Tu(e, t) {
|
|
|
6184
6176
|
tagName: "tbody",
|
|
6185
6177
|
properties: {},
|
|
6186
6178
|
children: e.wrap(n, !0)
|
|
6187
|
-
}, a =
|
|
6179
|
+
}, a = On(t.children[1]), u = gi(t.children[t.children.length - 1]);
|
|
6188
6180
|
a && u && (l.position = { start: a, end: u }), i.push(l);
|
|
6189
6181
|
}
|
|
6190
6182
|
const o = {
|
|
@@ -6223,28 +6215,28 @@ function Au(e, t) {
|
|
|
6223
6215
|
};
|
|
6224
6216
|
return e.patch(t, n), e.applyData(t, n);
|
|
6225
6217
|
}
|
|
6226
|
-
const
|
|
6218
|
+
const Rr = 9, Lr = 32;
|
|
6227
6219
|
function Ou(e) {
|
|
6228
6220
|
const t = String(e), n = /\r?\n|\r/g;
|
|
6229
6221
|
let r = n.exec(t), i = 0;
|
|
6230
6222
|
const o = [];
|
|
6231
6223
|
for (; r; )
|
|
6232
6224
|
o.push(
|
|
6233
|
-
|
|
6225
|
+
jr(t.slice(i, r.index), i > 0, !0),
|
|
6234
6226
|
r[0]
|
|
6235
6227
|
), i = r.index + r[0].length, r = n.exec(t);
|
|
6236
|
-
return o.push(
|
|
6228
|
+
return o.push(jr(t.slice(i), i > 0, !1)), o.join("");
|
|
6237
6229
|
}
|
|
6238
|
-
function
|
|
6230
|
+
function jr(e, t, n) {
|
|
6239
6231
|
let r = 0, i = e.length;
|
|
6240
6232
|
if (t) {
|
|
6241
6233
|
let o = e.codePointAt(r);
|
|
6242
|
-
for (; o ===
|
|
6234
|
+
for (; o === Rr || o === Lr; )
|
|
6243
6235
|
r++, o = e.codePointAt(r);
|
|
6244
6236
|
}
|
|
6245
6237
|
if (n) {
|
|
6246
6238
|
let o = e.codePointAt(i - 1);
|
|
6247
|
-
for (; o ===
|
|
6239
|
+
for (; o === Rr || o === Lr; )
|
|
6248
6240
|
i--, o = e.codePointAt(i - 1);
|
|
6249
6241
|
}
|
|
6250
6242
|
return i > r ? e.slice(r, i) : "";
|
|
@@ -6294,7 +6286,7 @@ const Lu = {
|
|
|
6294
6286
|
};
|
|
6295
6287
|
function Lt() {
|
|
6296
6288
|
}
|
|
6297
|
-
const Fi = -1, Vt = 0,
|
|
6289
|
+
const Fi = -1, Vt = 0, Tt = 1, zt = 2, Fn = 3, Mn = 4, zn = 5, Bn = 6, Mi = 7, zi = 8, Nr = typeof self == "object" ? self : globalThis, ju = (e, t) => {
|
|
6298
6290
|
const n = (i, o) => (e.set(o, i), i), r = (i) => {
|
|
6299
6291
|
if (e.has(i))
|
|
6300
6292
|
return e.get(i);
|
|
@@ -6303,7 +6295,7 @@ const Fi = -1, Vt = 0, _t = 1, zt = 2, zn = 3, Bn = 4, Un = 5, Hn = 6, Mi = 7, z
|
|
|
6303
6295
|
case Vt:
|
|
6304
6296
|
case Fi:
|
|
6305
6297
|
return n(l, i);
|
|
6306
|
-
case
|
|
6298
|
+
case Tt: {
|
|
6307
6299
|
const a = n([], i);
|
|
6308
6300
|
for (const u of l)
|
|
6309
6301
|
a.push(r(u));
|
|
@@ -6315,19 +6307,19 @@ const Fi = -1, Vt = 0, _t = 1, zt = 2, zn = 3, Bn = 4, Un = 5, Hn = 6, Mi = 7, z
|
|
|
6315
6307
|
a[r(u)] = r(f);
|
|
6316
6308
|
return a;
|
|
6317
6309
|
}
|
|
6318
|
-
case
|
|
6310
|
+
case Fn:
|
|
6319
6311
|
return n(new Date(l), i);
|
|
6320
|
-
case
|
|
6312
|
+
case Mn: {
|
|
6321
6313
|
const { source: a, flags: u } = l;
|
|
6322
6314
|
return n(new RegExp(a, u), i);
|
|
6323
6315
|
}
|
|
6324
|
-
case
|
|
6316
|
+
case zn: {
|
|
6325
6317
|
const a = n(/* @__PURE__ */ new Map(), i);
|
|
6326
6318
|
for (const [u, f] of l)
|
|
6327
6319
|
a.set(r(u), r(f));
|
|
6328
6320
|
return a;
|
|
6329
6321
|
}
|
|
6330
|
-
case
|
|
6322
|
+
case Bn: {
|
|
6331
6323
|
const a = n(/* @__PURE__ */ new Set(), i);
|
|
6332
6324
|
for (const u of l)
|
|
6333
6325
|
a.add(r(u));
|
|
@@ -6335,7 +6327,7 @@ const Fi = -1, Vt = 0, _t = 1, zt = 2, zn = 3, Bn = 4, Un = 5, Hn = 6, Mi = 7, z
|
|
|
6335
6327
|
}
|
|
6336
6328
|
case Mi: {
|
|
6337
6329
|
const { name: a, message: u } = l;
|
|
6338
|
-
return n(new
|
|
6330
|
+
return n(new Nr[a](u), i);
|
|
6339
6331
|
}
|
|
6340
6332
|
case zi:
|
|
6341
6333
|
return n(BigInt(l), i);
|
|
@@ -6348,31 +6340,31 @@ const Fi = -1, Vt = 0, _t = 1, zt = 2, zn = 3, Bn = 4, Un = 5, Hn = 6, Mi = 7, z
|
|
|
6348
6340
|
return n(new DataView(a), l);
|
|
6349
6341
|
}
|
|
6350
6342
|
}
|
|
6351
|
-
return n(new
|
|
6343
|
+
return n(new Nr[o](l), i);
|
|
6352
6344
|
};
|
|
6353
6345
|
return r;
|
|
6354
|
-
},
|
|
6346
|
+
}, Dr = (e) => ju(/* @__PURE__ */ new Map(), e)(0), pt = "", { toString: Nu } = {}, { keys: Du } = Object, Et = (e) => {
|
|
6355
6347
|
const t = typeof e;
|
|
6356
6348
|
if (t !== "object" || !e)
|
|
6357
6349
|
return [Vt, t];
|
|
6358
|
-
const n =
|
|
6350
|
+
const n = Nu.call(e).slice(8, -1);
|
|
6359
6351
|
switch (n) {
|
|
6360
6352
|
case "Array":
|
|
6361
|
-
return [
|
|
6353
|
+
return [Tt, pt];
|
|
6362
6354
|
case "Object":
|
|
6363
6355
|
return [zt, pt];
|
|
6364
6356
|
case "Date":
|
|
6365
|
-
return [
|
|
6357
|
+
return [Fn, pt];
|
|
6366
6358
|
case "RegExp":
|
|
6367
|
-
return [
|
|
6359
|
+
return [Mn, pt];
|
|
6368
6360
|
case "Map":
|
|
6369
|
-
return [
|
|
6361
|
+
return [zn, pt];
|
|
6370
6362
|
case "Set":
|
|
6371
|
-
return [
|
|
6363
|
+
return [Bn, pt];
|
|
6372
6364
|
case "DataView":
|
|
6373
|
-
return [
|
|
6365
|
+
return [Tt, n];
|
|
6374
6366
|
}
|
|
6375
|
-
return n.includes("Array") ? [
|
|
6367
|
+
return n.includes("Array") ? [Tt, n] : n.includes("Error") ? [Mi, n] : [zt, n];
|
|
6376
6368
|
}, jt = ([e, t]) => e === Vt && (t === "function" || t === "symbol"), Fu = (e, t, n, r) => {
|
|
6377
6369
|
const i = (l, a) => {
|
|
6378
6370
|
const u = r.push(l) - 1;
|
|
@@ -6380,7 +6372,7 @@ const Fi = -1, Vt = 0, _t = 1, zt = 2, zn = 3, Bn = 4, Un = 5, Hn = 6, Mi = 7, z
|
|
|
6380
6372
|
}, o = (l) => {
|
|
6381
6373
|
if (n.has(l))
|
|
6382
6374
|
return n.get(l);
|
|
6383
|
-
let [a, u] =
|
|
6375
|
+
let [a, u] = Et(l);
|
|
6384
6376
|
switch (a) {
|
|
6385
6377
|
case Vt: {
|
|
6386
6378
|
let s = l;
|
|
@@ -6399,7 +6391,7 @@ const Fi = -1, Vt = 0, _t = 1, zt = 2, zn = 3, Bn = 4, Un = 5, Hn = 6, Mi = 7, z
|
|
|
6399
6391
|
}
|
|
6400
6392
|
return i([a, s], l);
|
|
6401
6393
|
}
|
|
6402
|
-
case
|
|
6394
|
+
case Tt: {
|
|
6403
6395
|
if (u) {
|
|
6404
6396
|
let h = l;
|
|
6405
6397
|
return u === "DataView" ? h = new Uint8Array(l.buffer) : u === "ArrayBuffer" && (h = new Uint8Array(l)), i([u, [...h]], l);
|
|
@@ -6422,26 +6414,26 @@ const Fi = -1, Vt = 0, _t = 1, zt = 2, zn = 3, Bn = 4, Un = 5, Hn = 6, Mi = 7, z
|
|
|
6422
6414
|
if (t && "toJSON" in l)
|
|
6423
6415
|
return o(l.toJSON());
|
|
6424
6416
|
const s = [], c = i([a, s], l);
|
|
6425
|
-
for (const h of
|
|
6426
|
-
(e || !jt(
|
|
6417
|
+
for (const h of Du(l))
|
|
6418
|
+
(e || !jt(Et(l[h]))) && s.push([o(h), o(l[h])]);
|
|
6427
6419
|
return c;
|
|
6428
6420
|
}
|
|
6429
|
-
case
|
|
6421
|
+
case Fn:
|
|
6430
6422
|
return i([a, l.toISOString()], l);
|
|
6431
|
-
case
|
|
6423
|
+
case Mn: {
|
|
6432
6424
|
const { source: s, flags: c } = l;
|
|
6433
6425
|
return i([a, { source: s, flags: c }], l);
|
|
6434
6426
|
}
|
|
6435
|
-
case
|
|
6427
|
+
case zn: {
|
|
6436
6428
|
const s = [], c = i([a, s], l);
|
|
6437
6429
|
for (const [h, p] of l)
|
|
6438
|
-
(e || !(jt(
|
|
6430
|
+
(e || !(jt(Et(h)) || jt(Et(p)))) && s.push([o(h), o(p)]);
|
|
6439
6431
|
return c;
|
|
6440
6432
|
}
|
|
6441
|
-
case
|
|
6433
|
+
case Bn: {
|
|
6442
6434
|
const s = [], c = i([a, s], l);
|
|
6443
6435
|
for (const h of l)
|
|
6444
|
-
(e || !jt(
|
|
6436
|
+
(e || !jt(Et(h))) && s.push(o(h));
|
|
6445
6437
|
return c;
|
|
6446
6438
|
}
|
|
6447
6439
|
}
|
|
@@ -6449,13 +6441,13 @@ const Fi = -1, Vt = 0, _t = 1, zt = 2, zn = 3, Bn = 4, Un = 5, Hn = 6, Mi = 7, z
|
|
|
6449
6441
|
return i([a, { name: u, message: f }], l);
|
|
6450
6442
|
};
|
|
6451
6443
|
return o;
|
|
6452
|
-
},
|
|
6444
|
+
}, Fr = (e, { json: t, lossy: n } = {}) => {
|
|
6453
6445
|
const r = [];
|
|
6454
6446
|
return Fu(!(t || n), !!t, /* @__PURE__ */ new Map(), r)(e), r;
|
|
6455
6447
|
}, Bt = typeof structuredClone == "function" ? (
|
|
6456
6448
|
/* c8 ignore start */
|
|
6457
|
-
(e, t) => t && ("json" in t || "lossy" in t) ?
|
|
6458
|
-
) : (e, t) =>
|
|
6449
|
+
(e, t) => t && ("json" in t || "lossy" in t) ? Dr(Fr(e, t)) : structuredClone(e)
|
|
6450
|
+
) : (e, t) => Dr(Fr(e, t));
|
|
6459
6451
|
function Mu(e, t) {
|
|
6460
6452
|
const n = [{ type: "text", value: "↩" }];
|
|
6461
6453
|
return t > 1 && n.push({
|
|
@@ -6479,7 +6471,7 @@ function Bu(e) {
|
|
|
6479
6471
|
);
|
|
6480
6472
|
if (!f)
|
|
6481
6473
|
continue;
|
|
6482
|
-
const s = e.all(f), c = String(f.identifier).toUpperCase(), h =
|
|
6474
|
+
const s = e.all(f), c = String(f.identifier).toUpperCase(), h = xt(c.toLowerCase());
|
|
6483
6475
|
let p = 0;
|
|
6484
6476
|
const y = [], x = e.footnoteCounts.get(c);
|
|
6485
6477
|
for (; x !== void 0 && ++p <= x; ) {
|
|
@@ -6620,7 +6612,7 @@ function Wu() {
|
|
|
6620
6612
|
function qu(e) {
|
|
6621
6613
|
return e !== null && typeof e == "object" && "type" in e;
|
|
6622
6614
|
}
|
|
6623
|
-
const Ui = [], $u = !0,
|
|
6615
|
+
const Ui = [], $u = !0, Mr = !1, Yu = "skip";
|
|
6624
6616
|
function Ku(e, t, n, r) {
|
|
6625
6617
|
let i;
|
|
6626
6618
|
typeof t == "function" && typeof n != "function" ? (r = n, n = t) : i = t;
|
|
@@ -6646,7 +6638,7 @@ function Ku(e, t, n, r) {
|
|
|
6646
6638
|
return h;
|
|
6647
6639
|
function h() {
|
|
6648
6640
|
let p = Ui, y, x, T;
|
|
6649
|
-
if ((!t || o(u, f, s[s.length - 1] || void 0)) && (p = Gu(n(u, s)), p[0] ===
|
|
6641
|
+
if ((!t || o(u, f, s[s.length - 1] || void 0)) && (p = Gu(n(u, s)), p[0] === Mr))
|
|
6650
6642
|
return p;
|
|
6651
6643
|
if ("children" in u && u.children) {
|
|
6652
6644
|
const k = (
|
|
@@ -6656,7 +6648,7 @@ function Ku(e, t, n, r) {
|
|
|
6656
6648
|
if (k.children && p[0] !== Yu)
|
|
6657
6649
|
for (x = (r ? k.children.length : -1) + l, T = s.concat(k); x > -1 && x < k.children.length; ) {
|
|
6658
6650
|
const A = k.children[x];
|
|
6659
|
-
if (y = a(A, x, T)(), y[0] ===
|
|
6651
|
+
if (y = a(A, x, T)(), y[0] === Mr)
|
|
6660
6652
|
return y;
|
|
6661
6653
|
x = typeof y[1] == "number" ? y[1] : x + l;
|
|
6662
6654
|
}
|
|
@@ -6676,7 +6668,7 @@ function Hi(e, t, n, r) {
|
|
|
6676
6668
|
return l(u, c, s);
|
|
6677
6669
|
}
|
|
6678
6670
|
}
|
|
6679
|
-
const
|
|
6671
|
+
const Sn = {}.hasOwnProperty, Xu = {};
|
|
6680
6672
|
function Qu(e, t) {
|
|
6681
6673
|
const n = t || Xu, r = /* @__PURE__ */ new Map(), i = /* @__PURE__ */ new Map(), o = /* @__PURE__ */ new Map(), l = { ...Lu, ...n.handlers }, a = {
|
|
6682
6674
|
all: f,
|
|
@@ -6699,7 +6691,7 @@ function Qu(e, t) {
|
|
|
6699
6691
|
}), a;
|
|
6700
6692
|
function u(s, c) {
|
|
6701
6693
|
const h = s.type, p = a.handlers[h];
|
|
6702
|
-
if (
|
|
6694
|
+
if (Sn.call(a.handlers, h) && p)
|
|
6703
6695
|
return p(a, s, c);
|
|
6704
6696
|
if (a.options.passThrough && a.options.passThrough.includes(h)) {
|
|
6705
6697
|
if ("children" in s) {
|
|
@@ -6718,9 +6710,9 @@ function Qu(e, t) {
|
|
|
6718
6710
|
for (; ++p < h.length; ) {
|
|
6719
6711
|
const y = a.one(h[p], s);
|
|
6720
6712
|
if (y) {
|
|
6721
|
-
if (p && h[p - 1].type === "break" && (!Array.isArray(y) && y.type === "text" && (y.value =
|
|
6713
|
+
if (p && h[p - 1].type === "break" && (!Array.isArray(y) && y.type === "text" && (y.value = zr(y.value)), !Array.isArray(y) && y.type === "element")) {
|
|
6722
6714
|
const x = y.children[0];
|
|
6723
|
-
x && x.type === "text" && (x.value =
|
|
6715
|
+
x && x.type === "text" && (x.value = zr(x.value));
|
|
6724
6716
|
}
|
|
6725
6717
|
Array.isArray(y) ? c.push(...y) : c.push(y);
|
|
6726
6718
|
}
|
|
@@ -6730,7 +6722,7 @@ function Qu(e, t) {
|
|
|
6730
6722
|
}
|
|
6731
6723
|
}
|
|
6732
6724
|
function Ju(e, t) {
|
|
6733
|
-
e.position && (t.position =
|
|
6725
|
+
e.position && (t.position = Nl(e));
|
|
6734
6726
|
}
|
|
6735
6727
|
function Zu(e, t) {
|
|
6736
6728
|
let n = t;
|
|
@@ -6748,7 +6740,7 @@ function Zu(e, t) {
|
|
|
6748
6740
|
return n;
|
|
6749
6741
|
}
|
|
6750
6742
|
function ec(e, t) {
|
|
6751
|
-
const n = t.data || {}, r = "value" in t && !(
|
|
6743
|
+
const n = t.data || {}, r = "value" in t && !(Sn.call(n, "hProperties") || Sn.call(n, "hChildren")) ? { type: "text", value: t.value } : {
|
|
6752
6744
|
type: "element",
|
|
6753
6745
|
tagName: "div",
|
|
6754
6746
|
properties: {},
|
|
@@ -6766,13 +6758,13 @@ function tc(e, t) {
|
|
|
6766
6758
|
return t && e.length > 0 && n.push({ type: "text", value: `
|
|
6767
6759
|
` }), n;
|
|
6768
6760
|
}
|
|
6769
|
-
function
|
|
6761
|
+
function zr(e) {
|
|
6770
6762
|
let t = 0, n = e.charCodeAt(t);
|
|
6771
6763
|
for (; n === 9 || n === 32; )
|
|
6772
6764
|
t++, n = e.charCodeAt(t);
|
|
6773
6765
|
return e.slice(t);
|
|
6774
6766
|
}
|
|
6775
|
-
function
|
|
6767
|
+
function Br(e, t) {
|
|
6776
6768
|
const n = Qu(e, t), r = n.one(e, void 0), i = Bu(n), o = Array.isArray(r) ? { type: "root", children: r } : r || { type: "root", children: [] };
|
|
6777
6769
|
return i && o.children.push({ type: "text", value: `
|
|
6778
6770
|
` }, i), o;
|
|
@@ -6781,23 +6773,23 @@ function nc(e, t) {
|
|
|
6781
6773
|
return e && "run" in e ? async function(n, r) {
|
|
6782
6774
|
const i = (
|
|
6783
6775
|
/** @type {HastRoot} */
|
|
6784
|
-
|
|
6776
|
+
Br(n, { file: r, ...t })
|
|
6785
6777
|
);
|
|
6786
6778
|
await e.run(i, r);
|
|
6787
6779
|
} : function(n, r) {
|
|
6788
6780
|
return (
|
|
6789
6781
|
/** @type {HastRoot} */
|
|
6790
|
-
|
|
6782
|
+
Br(n, { file: r, ...e || t })
|
|
6791
6783
|
);
|
|
6792
6784
|
};
|
|
6793
6785
|
}
|
|
6794
|
-
function
|
|
6786
|
+
function Ur(e) {
|
|
6795
6787
|
if (e)
|
|
6796
6788
|
throw e;
|
|
6797
6789
|
}
|
|
6798
|
-
var Ft = Object.prototype.hasOwnProperty, Vi = Object.prototype.toString,
|
|
6790
|
+
var Ft = Object.prototype.hasOwnProperty, Vi = Object.prototype.toString, Hr = Object.defineProperty, Vr = Object.getOwnPropertyDescriptor, Wr = function(t) {
|
|
6799
6791
|
return typeof Array.isArray == "function" ? Array.isArray(t) : Vi.call(t) === "[object Array]";
|
|
6800
|
-
},
|
|
6792
|
+
}, qr = function(t) {
|
|
6801
6793
|
if (!t || Vi.call(t) !== "[object Object]")
|
|
6802
6794
|
return !1;
|
|
6803
6795
|
var n = Ft.call(t, "constructor"), r = t.constructor && t.constructor.prototype && Ft.call(t.constructor.prototype, "isPrototypeOf");
|
|
@@ -6807,18 +6799,18 @@ var Ft = Object.prototype.hasOwnProperty, Vi = Object.prototype.toString, Wr = O
|
|
|
6807
6799
|
for (i in t)
|
|
6808
6800
|
;
|
|
6809
6801
|
return typeof i > "u" || Ft.call(t, i);
|
|
6810
|
-
},
|
|
6811
|
-
|
|
6802
|
+
}, $r = function(t, n) {
|
|
6803
|
+
Hr && n.name === "__proto__" ? Hr(t, n.name, {
|
|
6812
6804
|
enumerable: !0,
|
|
6813
6805
|
configurable: !0,
|
|
6814
6806
|
value: n.newValue,
|
|
6815
6807
|
writable: !0
|
|
6816
6808
|
}) : t[n.name] = n.newValue;
|
|
6817
|
-
},
|
|
6809
|
+
}, Yr = function(t, n) {
|
|
6818
6810
|
if (n === "__proto__")
|
|
6819
6811
|
if (Ft.call(t, n)) {
|
|
6820
|
-
if (
|
|
6821
|
-
return
|
|
6812
|
+
if (Vr)
|
|
6813
|
+
return Vr(t, n).value;
|
|
6822
6814
|
} else return;
|
|
6823
6815
|
return t[n];
|
|
6824
6816
|
}, rc = function e() {
|
|
@@ -6826,11 +6818,11 @@ var Ft = Object.prototype.hasOwnProperty, Vi = Object.prototype.toString, Wr = O
|
|
|
6826
6818
|
for (typeof a == "boolean" && (s = a, a = arguments[1] || {}, u = 2), (a == null || typeof a != "object" && typeof a != "function") && (a = {}); u < f; ++u)
|
|
6827
6819
|
if (t = arguments[u], t != null)
|
|
6828
6820
|
for (n in t)
|
|
6829
|
-
r =
|
|
6821
|
+
r = Yr(a, n), i = Yr(t, n), a !== i && (s && i && (qr(i) || (o = Wr(i))) ? (o ? (o = !1, l = r && Wr(r) ? r : []) : l = r && qr(r) ? r : {}, $r(a, { name: n, newValue: e(s, l, i) })) : typeof i < "u" && $r(a, { name: n, newValue: i }));
|
|
6830
6822
|
return a;
|
|
6831
6823
|
};
|
|
6832
|
-
const rn = /* @__PURE__ */
|
|
6833
|
-
function
|
|
6824
|
+
const rn = /* @__PURE__ */ _n(rc);
|
|
6825
|
+
function En(e) {
|
|
6834
6826
|
if (typeof e != "object" || e === null)
|
|
6835
6827
|
return !1;
|
|
6836
6828
|
const t = Object.getPrototypeOf(e);
|
|
@@ -7005,14 +6997,14 @@ const pc = { cwd: hc };
|
|
|
7005
6997
|
function hc() {
|
|
7006
6998
|
return "/";
|
|
7007
6999
|
}
|
|
7008
|
-
function
|
|
7000
|
+
function Cn(e) {
|
|
7009
7001
|
return !!(e !== null && typeof e == "object" && "href" in e && e.href && "protocol" in e && e.protocol && // @ts-expect-error: indexing is fine.
|
|
7010
7002
|
e.auth === void 0);
|
|
7011
7003
|
}
|
|
7012
7004
|
function dc(e) {
|
|
7013
7005
|
if (typeof e == "string")
|
|
7014
7006
|
e = new URL(e);
|
|
7015
|
-
else if (!
|
|
7007
|
+
else if (!Cn(e)) {
|
|
7016
7008
|
const t = new TypeError(
|
|
7017
7009
|
'The "path" argument must be of type string or an instance of URL. Received `' + e + "`"
|
|
7018
7010
|
);
|
|
@@ -7081,7 +7073,7 @@ class Wi {
|
|
|
7081
7073
|
*/
|
|
7082
7074
|
constructor(t) {
|
|
7083
7075
|
let n;
|
|
7084
|
-
t ?
|
|
7076
|
+
t ? Cn(t) ? n = { path: t } : typeof t == "string" || gc(t) ? n = { value: t } : n = t : n = {}, this.cwd = "cwd" in n ? "" : pc.cwd(), this.data = {}, this.history = [], this.messages = [], this.value, this.map, this.result, this.stored;
|
|
7085
7077
|
let r = -1;
|
|
7086
7078
|
for (; ++r < on.length; ) {
|
|
7087
7079
|
const o = on[r];
|
|
@@ -7135,7 +7127,7 @@ class Wi {
|
|
|
7135
7127
|
* Nothing.
|
|
7136
7128
|
*/
|
|
7137
7129
|
set dirname(t) {
|
|
7138
|
-
|
|
7130
|
+
Kr(this.basename, "dirname"), this.path = qe.join(t || "", this.basename);
|
|
7139
7131
|
}
|
|
7140
7132
|
/**
|
|
7141
7133
|
* Get the extname (including dot) (example: `'.js'`).
|
|
@@ -7159,7 +7151,7 @@ class Wi {
|
|
|
7159
7151
|
* Nothing.
|
|
7160
7152
|
*/
|
|
7161
7153
|
set extname(t) {
|
|
7162
|
-
if (ln(t, "extname"),
|
|
7154
|
+
if (ln(t, "extname"), Kr(this.dirname, "extname"), t) {
|
|
7163
7155
|
if (t.codePointAt(0) !== 46)
|
|
7164
7156
|
throw new Error("`extname` must start with `.`");
|
|
7165
7157
|
if (t.includes(".", 1))
|
|
@@ -7189,7 +7181,7 @@ class Wi {
|
|
|
7189
7181
|
* Nothing.
|
|
7190
7182
|
*/
|
|
7191
7183
|
set path(t) {
|
|
7192
|
-
|
|
7184
|
+
Cn(t) && (t = dc(t)), an(t, "path"), this.path !== t && this.history.push(t);
|
|
7193
7185
|
}
|
|
7194
7186
|
/**
|
|
7195
7187
|
* Get the stem (basename w/o extname) (example: `'index.min'`).
|
|
@@ -7436,7 +7428,7 @@ function an(e, t) {
|
|
|
7436
7428
|
if (!e)
|
|
7437
7429
|
throw new Error("`" + t + "` cannot be empty");
|
|
7438
7430
|
}
|
|
7439
|
-
function
|
|
7431
|
+
function Kr(e, t) {
|
|
7440
7432
|
if (!e)
|
|
7441
7433
|
throw new Error("Setting `" + t + "` requires `path` to be set too");
|
|
7442
7434
|
}
|
|
@@ -7465,7 +7457,7 @@ const yc = (
|
|
|
7465
7457
|
return Object.setPrototypeOf(o, r), o;
|
|
7466
7458
|
}
|
|
7467
7459
|
), xc = {}.hasOwnProperty;
|
|
7468
|
-
class
|
|
7460
|
+
class Un extends yc {
|
|
7469
7461
|
/**
|
|
7470
7462
|
* Create a processor.
|
|
7471
7463
|
*/
|
|
@@ -7486,7 +7478,7 @@ class Vn extends yc {
|
|
|
7486
7478
|
copy() {
|
|
7487
7479
|
const t = (
|
|
7488
7480
|
/** @type {Processor<ParseTree, HeadTree, TailTree, CompileTree, CompileResult>} */
|
|
7489
|
-
new
|
|
7481
|
+
new Un()
|
|
7490
7482
|
);
|
|
7491
7483
|
let n = -1;
|
|
7492
7484
|
for (; ++n < this.attachers.length; ) {
|
|
@@ -7608,7 +7600,7 @@ class Vn extends yc {
|
|
|
7608
7600
|
*/
|
|
7609
7601
|
parse(t) {
|
|
7610
7602
|
this.freeze();
|
|
7611
|
-
const n =
|
|
7603
|
+
const n = Nt(t), r = this.parser || this.Parser;
|
|
7612
7604
|
return sn("parse", r), r(String(n), n);
|
|
7613
7605
|
}
|
|
7614
7606
|
/**
|
|
@@ -7657,7 +7649,7 @@ class Vn extends yc {
|
|
|
7657
7649
|
const r = this;
|
|
7658
7650
|
return this.freeze(), sn("process", this.parser || this.Parser), un("process", this.compiler || this.Compiler), n ? i(void 0, n) : new Promise(i);
|
|
7659
7651
|
function i(o, l) {
|
|
7660
|
-
const a =
|
|
7652
|
+
const a = Nt(t), u = (
|
|
7661
7653
|
/** @type {HeadTree extends undefined ? Node : HeadTree} */
|
|
7662
7654
|
/** @type {unknown} */
|
|
7663
7655
|
r.parse(a)
|
|
@@ -7714,9 +7706,9 @@ class Vn extends yc {
|
|
|
7714
7706
|
*/
|
|
7715
7707
|
processSync(t) {
|
|
7716
7708
|
let n = !1, r;
|
|
7717
|
-
return this.freeze(), sn("processSync", this.parser || this.Parser), un("processSync", this.compiler || this.Compiler), this.process(t, i),
|
|
7709
|
+
return this.freeze(), sn("processSync", this.parser || this.Parser), un("processSync", this.compiler || this.Compiler), this.process(t, i), Xr("processSync", "process", n), r;
|
|
7718
7710
|
function i(o, l) {
|
|
7719
|
-
n = !0,
|
|
7711
|
+
n = !0, Ur(o), r = l;
|
|
7720
7712
|
}
|
|
7721
7713
|
}
|
|
7722
7714
|
/**
|
|
@@ -7758,11 +7750,11 @@ class Vn extends yc {
|
|
|
7758
7750
|
* transformed tree.
|
|
7759
7751
|
*/
|
|
7760
7752
|
run(t, n, r) {
|
|
7761
|
-
|
|
7753
|
+
Gr(t), this.freeze();
|
|
7762
7754
|
const i = this.transformers;
|
|
7763
7755
|
return !r && typeof n == "function" && (r = n, n = void 0), r ? o(void 0, r) : new Promise(o);
|
|
7764
7756
|
function o(l, a) {
|
|
7765
|
-
const u =
|
|
7757
|
+
const u = Nt(n);
|
|
7766
7758
|
i.run(t, u, f);
|
|
7767
7759
|
function f(s, c, h) {
|
|
7768
7760
|
const p = (
|
|
@@ -7792,9 +7784,9 @@ class Vn extends yc {
|
|
|
7792
7784
|
*/
|
|
7793
7785
|
runSync(t, n) {
|
|
7794
7786
|
let r = !1, i;
|
|
7795
|
-
return this.run(t, n, o),
|
|
7787
|
+
return this.run(t, n, o), Xr("runSync", "run", r), i;
|
|
7796
7788
|
function o(l, a) {
|
|
7797
|
-
|
|
7789
|
+
Ur(l), i = a, r = !0;
|
|
7798
7790
|
}
|
|
7799
7791
|
}
|
|
7800
7792
|
/**
|
|
@@ -7828,8 +7820,8 @@ class Vn extends yc {
|
|
|
7828
7820
|
*/
|
|
7829
7821
|
stringify(t, n) {
|
|
7830
7822
|
this.freeze();
|
|
7831
|
-
const r =
|
|
7832
|
-
return un("stringify", i),
|
|
7823
|
+
const r = Nt(n), i = this.compiler || this.Compiler;
|
|
7824
|
+
return un("stringify", i), Gr(t), i(t, r);
|
|
7833
7825
|
}
|
|
7834
7826
|
/**
|
|
7835
7827
|
* Configure the processor to use a plugin, a list of usable values, or a
|
|
@@ -7941,12 +7933,12 @@ class Vn extends yc {
|
|
|
7941
7933
|
else if (s.length > 0) {
|
|
7942
7934
|
let [p, ...y] = s;
|
|
7943
7935
|
const x = r[h][1];
|
|
7944
|
-
|
|
7936
|
+
En(x) && En(p) && (p = rn(!0, x, p)), r[h] = [f, p, ...y];
|
|
7945
7937
|
}
|
|
7946
7938
|
}
|
|
7947
7939
|
}
|
|
7948
7940
|
}
|
|
7949
|
-
const bc = new
|
|
7941
|
+
const bc = new Un().freeze();
|
|
7950
7942
|
function sn(e, t) {
|
|
7951
7943
|
if (typeof t != "function")
|
|
7952
7944
|
throw new TypeError("Cannot `" + e + "` without `parser`");
|
|
@@ -7961,17 +7953,17 @@ function cn(e, t) {
|
|
|
7961
7953
|
"Cannot call `" + e + "` on a frozen processor.\nCreate a new processor first, by calling it: use `processor()` instead of `processor`."
|
|
7962
7954
|
);
|
|
7963
7955
|
}
|
|
7964
|
-
function
|
|
7965
|
-
if (!
|
|
7956
|
+
function Gr(e) {
|
|
7957
|
+
if (!En(e) || typeof e.type != "string")
|
|
7966
7958
|
throw new TypeError("Expected node, got `" + e + "`");
|
|
7967
7959
|
}
|
|
7968
|
-
function
|
|
7960
|
+
function Xr(e, t, n) {
|
|
7969
7961
|
if (!n)
|
|
7970
7962
|
throw new Error(
|
|
7971
7963
|
"`" + e + "` finished async. Use `" + t + "` instead"
|
|
7972
7964
|
);
|
|
7973
7965
|
}
|
|
7974
|
-
function
|
|
7966
|
+
function Nt(e) {
|
|
7975
7967
|
return wc(e) ? e : new Wi(e);
|
|
7976
7968
|
}
|
|
7977
7969
|
function wc(e) {
|
|
@@ -7983,7 +7975,7 @@ function kc(e) {
|
|
|
7983
7975
|
function vc(e) {
|
|
7984
7976
|
return !!(e && typeof e == "object" && "byteLength" in e && "byteOffset" in e);
|
|
7985
7977
|
}
|
|
7986
|
-
const Sc = "https://github.com/remarkjs/react-markdown/blob/main/changelog.md",
|
|
7978
|
+
const Sc = "https://github.com/remarkjs/react-markdown/blob/main/changelog.md", Qr = [], Jr = { allowDangerousHtml: !0 }, Ec = /^(https?|ircs?|mailto|xmpp)$/i, Cc = [
|
|
7987
7979
|
{ from: "astPlugins", id: "remove-buggy-html-in-markdown-parser" },
|
|
7988
7980
|
{ from: "allowDangerousHtml", id: "remove-buggy-html-in-markdown-parser" },
|
|
7989
7981
|
{
|
|
@@ -8016,12 +8008,12 @@ const Sc = "https://github.com/remarkjs/react-markdown/blob/main/changelog.md",
|
|
|
8016
8008
|
{ from: "transformImageUri", id: "#add-urltransform", to: "urlTransform" },
|
|
8017
8009
|
{ from: "transformLinkUri", id: "#add-urltransform", to: "urlTransform" }
|
|
8018
8010
|
];
|
|
8019
|
-
function
|
|
8011
|
+
function Zr(e) {
|
|
8020
8012
|
const t = _c(e), n = Tc(e);
|
|
8021
8013
|
return Ic(t.runSync(t.parse(n), n), e);
|
|
8022
8014
|
}
|
|
8023
8015
|
function _c(e) {
|
|
8024
|
-
const t = e.rehypePlugins ||
|
|
8016
|
+
const t = e.rehypePlugins || Qr, n = e.remarkPlugins || Qr, r = e.remarkRehypeOptions ? { ...e.remarkRehypeOptions, ...Jr } : Jr;
|
|
8025
8017
|
return bc().use(au).use(n).use(nc, r).use(t);
|
|
8026
8018
|
}
|
|
8027
8019
|
function Tc(e) {
|
|
@@ -8131,14 +8123,14 @@ const $i = {
|
|
|
8131
8123
|
{ text: "How do I get started?", query: "How do I get started?" }
|
|
8132
8124
|
],
|
|
8133
8125
|
icon: "sparkles"
|
|
8134
|
-
}), Pt = (e, t, n) => {
|
|
8126
|
+
}), Pt = (e, t = null, n = null) => {
|
|
8135
8127
|
if (!e || typeof e != "string")
|
|
8136
8128
|
throw new Error("API URL must be a valid string");
|
|
8137
|
-
if (
|
|
8138
|
-
throw new Error("API key must be a valid string");
|
|
8139
|
-
if (
|
|
8140
|
-
throw new Error("Session ID must be a valid string");
|
|
8141
|
-
},
|
|
8129
|
+
if (t !== null && typeof t != "string")
|
|
8130
|
+
throw new Error("API key must be a valid string or null");
|
|
8131
|
+
if (n !== null && typeof n != "string")
|
|
8132
|
+
throw new Error("Session ID must be a valid string or null");
|
|
8133
|
+
}, ei = (e) => /* @__PURE__ */ E.jsx(
|
|
8142
8134
|
"a",
|
|
8143
8135
|
{
|
|
8144
8136
|
...e,
|
|
@@ -8152,7 +8144,7 @@ const $i = {
|
|
|
8152
8144
|
case "heart":
|
|
8153
8145
|
return /* @__PURE__ */ E.jsx(go, { size: t, className: n, style: r });
|
|
8154
8146
|
case "message-circle":
|
|
8155
|
-
return /* @__PURE__ */ E.jsx(
|
|
8147
|
+
return /* @__PURE__ */ E.jsx(ni, { size: t, className: n, style: r });
|
|
8156
8148
|
case "help-circle":
|
|
8157
8149
|
return /* @__PURE__ */ E.jsx(yo, { size: t, className: n, style: r });
|
|
8158
8150
|
case "info":
|
|
@@ -8166,7 +8158,7 @@ const $i = {
|
|
|
8166
8158
|
return /* @__PURE__ */ E.jsx(bo, { size: t, className: n, style: r });
|
|
8167
8159
|
}
|
|
8168
8160
|
}, Yi = (e) => {
|
|
8169
|
-
const [t, n] = Te(!1), [r, i] = Te(""), [o, l] = Te(!1), [a, u] = Te(!1), f = je(null), s = je(null), c = 250, h = je(null), [p, y] = Te(!1), [x, T] = Te(!1), [k, A] = Te(!1), [v, M] = Te(!1), B = je(/* @__PURE__ */ new Set()), w = je(!0), L = je(), W = je(null),
|
|
8161
|
+
const [t, n] = Te(!1), [r, i] = Te(""), [o, l] = Te(!1), [a, u] = Te(!1), f = je(null), s = je(null), c = 250, h = je(null), [p, y] = Te(!1), [x, T] = Te(!1), [k, A] = Te(!1), [v, M] = Te(!1), B = je(/* @__PURE__ */ new Set()), w = je(!0), L = je(), W = je(null), D = je(!1), [q, P] = Te(!1), [R, J] = Te(null), [Y, U] = Te(window.innerWidth);
|
|
8170
8162
|
He(() => {
|
|
8171
8163
|
const O = () => U(window.innerWidth);
|
|
8172
8164
|
return window.addEventListener("resize", O), () => window.removeEventListener("resize", O);
|
|
@@ -8218,9 +8210,7 @@ const $i = {
|
|
|
8218
8210
|
return O.replace(
|
|
8219
8211
|
K,
|
|
8220
8212
|
(be, Ce, Se) => `[${Ce}](${Ce})${Se}`
|
|
8221
|
-
)
|
|
8222
|
-
|
|
8223
|
-
`);
|
|
8213
|
+
);
|
|
8224
8214
|
}, Re = (O) => O.toLocaleTimeString([], { hour: "2-digit", minute: "2-digit" }), he = (O = !1) => {
|
|
8225
8215
|
if (h.current) {
|
|
8226
8216
|
const { scrollHeight: K } = h.current;
|
|
@@ -8236,7 +8226,7 @@ const $i = {
|
|
|
8236
8226
|
const { scrollTop: O, scrollHeight: K, clientHeight: se } = h.current, be = Math.abs(K - O - se) < 10, Ce = O < 10;
|
|
8237
8227
|
y(!Ce && O > 200), T(!be);
|
|
8238
8228
|
}
|
|
8239
|
-
},
|
|
8229
|
+
}, bt = () => {
|
|
8240
8230
|
h.current && (M(!0), h.current.scrollTo({
|
|
8241
8231
|
top: 0,
|
|
8242
8232
|
behavior: "smooth"
|
|
@@ -8246,7 +8236,7 @@ const $i = {
|
|
|
8246
8236
|
}, ut = (O) => {
|
|
8247
8237
|
const K = O.target.value;
|
|
8248
8238
|
K.length <= c && i(K);
|
|
8249
|
-
},
|
|
8239
|
+
}, wt = (O) => {
|
|
8250
8240
|
B.current.add(O), O === d.length - 1 && (P(!1), setTimeout(() => he(), 50));
|
|
8251
8241
|
}, et = (O) => B.current.has(O);
|
|
8252
8242
|
He(() => {
|
|
@@ -8270,7 +8260,7 @@ const $i = {
|
|
|
8270
8260
|
}, [se]);
|
|
8271
8261
|
const X = () => {
|
|
8272
8262
|
if (b.current) return;
|
|
8273
|
-
b.current = !0,
|
|
8263
|
+
b.current = !0, D.current = !0, P(!0);
|
|
8274
8264
|
let te = Xe.current, pe = 0;
|
|
8275
8265
|
Ge(te === 0);
|
|
8276
8266
|
const Ve = (We) => {
|
|
@@ -8282,7 +8272,7 @@ const $i = {
|
|
|
8282
8272
|
};
|
|
8283
8273
|
C.current = requestAnimationFrame(Ve);
|
|
8284
8274
|
}, ge = () => {
|
|
8285
|
-
|
|
8275
|
+
D.current = !1, K(), b.current = !1, P(!1), he();
|
|
8286
8276
|
};
|
|
8287
8277
|
return He(() => {
|
|
8288
8278
|
const te = () => {
|
|
@@ -8306,13 +8296,15 @@ const $i = {
|
|
|
8306
8296
|
maxWidth: "100%",
|
|
8307
8297
|
fontSize: "16px"
|
|
8308
8298
|
}, children: /* @__PURE__ */ E.jsx(
|
|
8309
|
-
|
|
8299
|
+
Zr,
|
|
8310
8300
|
{
|
|
8311
8301
|
components: {
|
|
8312
|
-
a: (te) => /* @__PURE__ */ E.jsx(
|
|
8302
|
+
a: (te) => /* @__PURE__ */ E.jsx(ei, { ...te }),
|
|
8313
8303
|
p: (te) => /* @__PURE__ */ E.jsx("p", { style: {
|
|
8314
8304
|
overflowWrap: "anywhere",
|
|
8315
|
-
wordBreak: "break-word"
|
|
8305
|
+
wordBreak: "break-word",
|
|
8306
|
+
whiteSpace: "pre-line",
|
|
8307
|
+
margin: "0 0 0.5em 0"
|
|
8316
8308
|
}, ...te }),
|
|
8317
8309
|
code: (te) => /* @__PURE__ */ E.jsx("code", { style: { display: "block", whiteSpace: "pre-wrap", overflowX: "auto", overflowWrap: "anywhere" }, ...te })
|
|
8318
8310
|
},
|
|
@@ -8373,7 +8365,7 @@ const $i = {
|
|
|
8373
8365
|
className: "transition-colors p-2 rounded-full hover:bg-opacity-20 hover:bg-black",
|
|
8374
8366
|
style: { color: z.text.inverse },
|
|
8375
8367
|
"aria-label": "Minimize chat",
|
|
8376
|
-
children: /* @__PURE__ */ E.jsx(
|
|
8368
|
+
children: /* @__PURE__ */ E.jsx(Zn, { size: 20 })
|
|
8377
8369
|
}
|
|
8378
8370
|
)
|
|
8379
8371
|
] })
|
|
@@ -8394,7 +8386,7 @@ const $i = {
|
|
|
8394
8386
|
p && /* @__PURE__ */ E.jsx(
|
|
8395
8387
|
"button",
|
|
8396
8388
|
{
|
|
8397
|
-
onClick:
|
|
8389
|
+
onClick: bt,
|
|
8398
8390
|
className: "sticky top-3 left-[calc(100%-48px)] z-10 flex items-center justify-center p-2 rounded-full shadow-md",
|
|
8399
8391
|
style: {
|
|
8400
8392
|
backgroundColor: z.primary,
|
|
@@ -8451,7 +8443,7 @@ const $i = {
|
|
|
8451
8443
|
se.currentTarget.style.backgroundColor = z.suggestedQuestions.background;
|
|
8452
8444
|
},
|
|
8453
8445
|
children: [
|
|
8454
|
-
/* @__PURE__ */ E.jsx(
|
|
8446
|
+
/* @__PURE__ */ E.jsx(ni, { size: 20, className: "mr-2 flex-shrink-0" }),
|
|
8455
8447
|
/* @__PURE__ */ E.jsx("span", { children: O.text })
|
|
8456
8448
|
]
|
|
8457
8449
|
},
|
|
@@ -8498,7 +8490,7 @@ const $i = {
|
|
|
8498
8490
|
Ke,
|
|
8499
8491
|
{
|
|
8500
8492
|
content: O.content,
|
|
8501
|
-
onComplete: () =>
|
|
8493
|
+
onComplete: () => wt(K),
|
|
8502
8494
|
messageIndex: K,
|
|
8503
8495
|
inputRef: s
|
|
8504
8496
|
}
|
|
@@ -8509,13 +8501,15 @@ const $i = {
|
|
|
8509
8501
|
maxWidth: "100%",
|
|
8510
8502
|
fontSize: "16px"
|
|
8511
8503
|
}, children: /* @__PURE__ */ E.jsx(
|
|
8512
|
-
|
|
8504
|
+
Zr,
|
|
8513
8505
|
{
|
|
8514
8506
|
components: {
|
|
8515
|
-
a: (Se) => /* @__PURE__ */ E.jsx(
|
|
8507
|
+
a: (Se) => /* @__PURE__ */ E.jsx(ei, { ...Se }),
|
|
8516
8508
|
p: (Se) => /* @__PURE__ */ E.jsx("p", { style: {
|
|
8517
8509
|
overflowWrap: "anywhere",
|
|
8518
|
-
wordBreak: "break-word"
|
|
8510
|
+
wordBreak: "break-word",
|
|
8511
|
+
whiteSpace: "pre-line",
|
|
8512
|
+
margin: "0 0 0.5em 0"
|
|
8519
8513
|
}, ...Se }),
|
|
8520
8514
|
code: (Se) => /* @__PURE__ */ E.jsx("code", { style: { display: "block", whiteSpace: "pre-wrap", overflowX: "auto", overflowWrap: "anywhere" }, ...Se })
|
|
8521
8515
|
},
|
|
@@ -8689,7 +8683,7 @@ const $i = {
|
|
|
8689
8683
|
height: "80px"
|
|
8690
8684
|
},
|
|
8691
8685
|
"aria-label": t ? "Close chat" : "Open chat",
|
|
8692
|
-
children: t ? /* @__PURE__ */ E.jsx(
|
|
8686
|
+
children: t ? /* @__PURE__ */ E.jsx(Zn, { size: 40, className: "text-white", style: { opacity: 0.9 } }) : /* @__PURE__ */ E.jsx(fn, { iconName: "message-square", size: 40, className: "text-white" })
|
|
8693
8687
|
}
|
|
8694
8688
|
)
|
|
8695
8689
|
] }),
|
|
@@ -8754,6 +8748,7 @@ const $i = {
|
|
|
8754
8748
|
margin: 0 0 0.5em 0 !important;
|
|
8755
8749
|
padding: 0;
|
|
8756
8750
|
line-height: 1.5;
|
|
8751
|
+
white-space: pre-line;
|
|
8757
8752
|
}
|
|
8758
8753
|
|
|
8759
8754
|
.prose p:last-child {
|
|
@@ -8778,8 +8773,19 @@ const $i = {
|
|
|
8778
8773
|
` })
|
|
8779
8774
|
] });
|
|
8780
8775
|
};
|
|
8781
|
-
let ot = null, lt = null, It = null, xe = null;
|
|
8782
8776
|
function Oc() {
|
|
8777
|
+
return "xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g, function(e) {
|
|
8778
|
+
const t = Math.random() * 16 | 0;
|
|
8779
|
+
return (e === "x" ? t : t & 3 | 8).toString(16);
|
|
8780
|
+
});
|
|
8781
|
+
}
|
|
8782
|
+
function Pc() {
|
|
8783
|
+
const e = "orbit_session_id";
|
|
8784
|
+
let t = sessionStorage.getItem(e);
|
|
8785
|
+
return t || (t = Oc(), sessionStorage.setItem(e, t)), t;
|
|
8786
|
+
}
|
|
8787
|
+
let ot = null, lt = null, gt = null, xe = null;
|
|
8788
|
+
function Rc() {
|
|
8783
8789
|
if (!ot)
|
|
8784
8790
|
if (typeof window < "u" && window.CHATBOT_API_URL)
|
|
8785
8791
|
ot = window.CHATBOT_API_URL;
|
|
@@ -8787,7 +8793,7 @@ function Oc() {
|
|
|
8787
8793
|
throw new Error("API URL not set. Call setApiUrl or use injectChatWidget to configure the API URL.");
|
|
8788
8794
|
return ot;
|
|
8789
8795
|
}
|
|
8790
|
-
function
|
|
8796
|
+
function Lc() {
|
|
8791
8797
|
if (!lt)
|
|
8792
8798
|
if (typeof window < "u" && window.CHATBOT_API_KEY)
|
|
8793
8799
|
lt = window.CHATBOT_API_KEY;
|
|
@@ -8795,13 +8801,13 @@ function Pc() {
|
|
|
8795
8801
|
throw new Error("API key not set. Call setApiKey or use injectChatWidget to configure the API key.");
|
|
8796
8802
|
return lt;
|
|
8797
8803
|
}
|
|
8798
|
-
function
|
|
8799
|
-
ot = e, typeof window < "u" && (window.CHATBOT_API_URL = e, lt &&
|
|
8804
|
+
function jc(e) {
|
|
8805
|
+
ot = e, typeof window < "u" && (window.CHATBOT_API_URL = e, lt && gt && Pt(e, lt, gt));
|
|
8800
8806
|
}
|
|
8801
|
-
function
|
|
8802
|
-
lt = e, typeof window < "u" && (window.CHATBOT_API_KEY = e, ot &&
|
|
8807
|
+
function Nc(e) {
|
|
8808
|
+
lt = e, typeof window < "u" && (window.CHATBOT_API_KEY = e, ot && gt && Pt(ot, e, gt));
|
|
8803
8809
|
}
|
|
8804
|
-
function
|
|
8810
|
+
function Dc(e) {
|
|
8805
8811
|
typeof window > "u" || (xe = {
|
|
8806
8812
|
...it(),
|
|
8807
8813
|
// Start with default config
|
|
@@ -8839,9 +8845,9 @@ function jc(e) {
|
|
|
8839
8845
|
detail: xe
|
|
8840
8846
|
})));
|
|
8841
8847
|
}
|
|
8842
|
-
function
|
|
8848
|
+
function ti(e) {
|
|
8843
8849
|
if (typeof window > "u") return;
|
|
8844
|
-
ot = e.apiUrl, lt = e.apiKey,
|
|
8850
|
+
ot = e.apiUrl, lt = e.apiKey, gt = e.sessionId || Pc(), Pt(e.apiUrl, e.apiKey, gt), e.widgetConfig && (xe = {
|
|
8845
8851
|
...it(),
|
|
8846
8852
|
// Start with default config
|
|
8847
8853
|
...e.widgetConfig
|
|
@@ -8865,26 +8871,26 @@ function ri(e) {
|
|
|
8865
8871
|
}
|
|
8866
8872
|
setTimeout(t, 100);
|
|
8867
8873
|
}
|
|
8868
|
-
typeof window < "u" && (window.initChatbotWidget =
|
|
8874
|
+
typeof window < "u" && (window.initChatbotWidget = ti, window.ChatbotWidget = {
|
|
8869
8875
|
ChatWidget: Yi,
|
|
8870
8876
|
useChatStore: si,
|
|
8871
|
-
injectChatWidget:
|
|
8872
|
-
setApiUrl:
|
|
8873
|
-
getApiUrl:
|
|
8874
|
-
setApiKey:
|
|
8875
|
-
getApiKey:
|
|
8876
|
-
updateWidgetConfig:
|
|
8877
|
+
injectChatWidget: ti,
|
|
8878
|
+
setApiUrl: jc,
|
|
8879
|
+
getApiUrl: Rc,
|
|
8880
|
+
setApiKey: Nc,
|
|
8881
|
+
getApiKey: Lc,
|
|
8882
|
+
updateWidgetConfig: Dc,
|
|
8877
8883
|
configureApi: Pt
|
|
8878
8884
|
}, console.log("Chatbot widget loaded."));
|
|
8879
8885
|
export {
|
|
8880
8886
|
Yi as ChatWidget,
|
|
8881
8887
|
Yi as default,
|
|
8882
|
-
|
|
8883
|
-
|
|
8888
|
+
Lc as getApiKey,
|
|
8889
|
+
Rc as getApiUrl,
|
|
8884
8890
|
it as getChatConfig,
|
|
8885
|
-
|
|
8886
|
-
|
|
8887
|
-
|
|
8888
|
-
|
|
8891
|
+
ti as injectChatWidget,
|
|
8892
|
+
Nc as setApiKey,
|
|
8893
|
+
jc as setApiUrl,
|
|
8894
|
+
Dc as updateWidgetConfig,
|
|
8889
8895
|
si as useChatStore
|
|
8890
8896
|
};
|