@wrdagency/blockout 0.0.15 → 0.0.16
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/components/markdown/index.js +321 -321
- package/package.json +1 -1
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import '../../assets/index13.css';var d_ = Object.defineProperty;
|
|
2
2
|
var f_ = (e, t, n) => t in e ? d_(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n;
|
|
3
3
|
var Bt = (e, t, n) => f_(e, typeof t != "symbol" ? t + "" : t, n);
|
|
4
|
-
import { jsxs as Qn, Fragment as
|
|
4
|
+
import { jsxs as Qn, Fragment as er, jsx as $ } from "react/jsx-runtime";
|
|
5
5
|
import { noop as p_ } from "../../utils/noop.js";
|
|
6
6
|
import * as I from "react";
|
|
7
|
-
import A, { createContext as h_, useContext as g_, useMemo as Io, useEffect as $e, forwardRef as Jg, useState as
|
|
7
|
+
import A, { createContext as h_, useContext as g_, useMemo as Io, useEffect as $e, forwardRef as Jg, useState as tr, useLayoutEffect as Ii, useCallback as Qe, useRef as lt, Suspense as m_, useReducer as v_, cloneElement as y_, Component as x_ } from "react";
|
|
8
8
|
import { r as gi, c as __, o as b_, s as C_, f as w_, d as E_, h as S_, l as k_, b as vf, a as T_, R as I_ } from "../../floating-ui.dom-9sqP7IwC.js";
|
|
9
9
|
import { g as jg, c as yf } from "../../_commonjsHelpers-DaMA6jEr.js";
|
|
10
10
|
var A_ = Object.defineProperty, N_ = (e, t, n) => t in e ? A_(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n, jn = (e, t, n) => N_(e, typeof t != "symbol" ? t + "" : t, n);
|
|
@@ -42,7 +42,7 @@ let P_ = class Zg {
|
|
|
42
42
|
return this.map.delete(t);
|
|
43
43
|
}
|
|
44
44
|
};
|
|
45
|
-
function
|
|
45
|
+
function Sr(e, t) {
|
|
46
46
|
return t(e), e;
|
|
47
47
|
}
|
|
48
48
|
function yc() {
|
|
@@ -221,7 +221,7 @@ let O_ = class {
|
|
|
221
221
|
return this.combineOperators(...n)(t);
|
|
222
222
|
}
|
|
223
223
|
transformer(...t) {
|
|
224
|
-
return (n) =>
|
|
224
|
+
return (n) => Sr(this.signalInstance(), (r) => (this.link(this.pipe(r, ...t), n), r));
|
|
225
225
|
}
|
|
226
226
|
/**
|
|
227
227
|
* Links the output of a node to the input of another node.
|
|
@@ -237,7 +237,7 @@ let O_ = class {
|
|
|
237
237
|
}
|
|
238
238
|
// prettier-ignore
|
|
239
239
|
combine(...t) {
|
|
240
|
-
return
|
|
240
|
+
return Sr(this.signalInstance(), (n) => {
|
|
241
241
|
this.connect({
|
|
242
242
|
map: (r) => (...i) => {
|
|
243
243
|
r(i);
|
|
@@ -249,7 +249,7 @@ let O_ = class {
|
|
|
249
249
|
}
|
|
250
250
|
// prettier-ignore
|
|
251
251
|
combineCells(...t) {
|
|
252
|
-
return
|
|
252
|
+
return Sr(
|
|
253
253
|
this.cellInstance(
|
|
254
254
|
t.map((n) => this.getValue(n)),
|
|
255
255
|
!0
|
|
@@ -294,7 +294,7 @@ let O_ = class {
|
|
|
294
294
|
*/
|
|
295
295
|
register(t) {
|
|
296
296
|
const n = da.get(t);
|
|
297
|
-
return n === void 0 || this.definitionRegistry.has(t) ? t : (this.definitionRegistry.add(t),
|
|
297
|
+
return n === void 0 || this.definitionRegistry.has(t) ? t : (this.definitionRegistry.add(t), Sr(
|
|
298
298
|
n.type === qg ? this.cellInstance(n.initial, n.distinct, t) : this.signalInstance(n.distinct, t),
|
|
299
299
|
(r) => {
|
|
300
300
|
this.inContext(() => {
|
|
@@ -368,17 +368,17 @@ let O_ = class {
|
|
|
368
368
|
}
|
|
369
369
|
};
|
|
370
370
|
function ve(e, t = yc, n = !0) {
|
|
371
|
-
return
|
|
371
|
+
return Sr(Symbol(), (r) => {
|
|
372
372
|
da.set(r, { type: qg, distinct: n, initial: e, init: t });
|
|
373
373
|
});
|
|
374
374
|
}
|
|
375
375
|
function Nt(e = yc, t = !1) {
|
|
376
|
-
return
|
|
376
|
+
return Sr(Symbol(), (n) => {
|
|
377
377
|
da.set(n, { type: "signal", distinct: t, init: e });
|
|
378
378
|
});
|
|
379
379
|
}
|
|
380
380
|
function Ao(e = yc) {
|
|
381
|
-
return
|
|
381
|
+
return Sr(Symbol(), (t) => {
|
|
382
382
|
da.set(t, { type: "signal", distinct: !1, init: e });
|
|
383
383
|
});
|
|
384
384
|
}
|
|
@@ -525,9 +525,9 @@ function Is(...e) {
|
|
|
525
525
|
for (const n of e) if (n && typeof n == "string") for (const [r] of n.matchAll(/\S+/g)) t.push(r);
|
|
526
526
|
return t;
|
|
527
527
|
}
|
|
528
|
-
const $_ = 1, V_ = 3, H_ = 9, B_ = 11,
|
|
528
|
+
const $_ = 1, V_ = 3, H_ = 9, B_ = 11, Pr = 0, em = 1, vi = 2, z_ = 0, U_ = 1, W_ = 2, As = 4, Ns = 8, xc = 128, K_ = 1792 | (112 | (3 | As | Ns) | xc), _c = 1, bc = 2, Cc = 3, wc = 4, Ec = 5, Sc = 6, pa = go || mi || Ts ? " " : "", Bn = `
|
|
529
529
|
|
|
530
|
-
`, J_ = Xn ? " " : pa, tm = "֑-߿יִ-﷽ﹰ-ﻼ", nm = "A-Za-zÀ-ÖØ-öø-ʸ̀-ࠀ-Ⰰ-︀--", j_ = new RegExp("^[^" + nm + "]*[" + tm + "]"), Z_ = new RegExp("^[^" + tm + "]*[" + nm + "]"),
|
|
530
|
+
`, J_ = Xn ? " " : pa, tm = "֑-߿יִ-﷽ﹰ-ﻼ", nm = "A-Za-zÀ-ÖØ-öø-ʸ̀-ࠀ-Ⰰ-︀--", j_ = new RegExp("^[^" + nm + "]*[" + tm + "]"), Z_ = new RegExp("^[^" + tm + "]*[" + nm + "]"), Or = { bold: 1, capitalize: 1024, code: 16, highlight: xc, italic: 2, lowercase: 256, strikethrough: As, subscript: 32, superscript: 64, underline: Ns, uppercase: 512 }, q_ = { directionless: 1, unmergeable: 2 }, bf = { center: bc, end: Sc, justify: wc, left: _c, right: Cc, start: Ec }, G_ = { [bc]: "center", [Sc]: "end", [wc]: "justify", [_c]: "left", [Cc]: "right", [Ec]: "start" }, Y_ = { normal: 0, segmented: 2, token: 1 }, X_ = { [z_]: "normal", [W_]: "segmented", [U_]: "token" }, Q_ = "$";
|
|
531
531
|
function rm(e, t, n, r, i, o) {
|
|
532
532
|
let s = e.getFirstChild();
|
|
533
533
|
for (; s !== null; ) {
|
|
@@ -752,7 +752,7 @@ function Ef(e) {
|
|
|
752
752
|
}
|
|
753
753
|
} else r.remove();
|
|
754
754
|
}
|
|
755
|
-
function
|
|
755
|
+
function Lr(e) {
|
|
756
756
|
return Sf(e.anchor), Sf(e.focus), e;
|
|
757
757
|
}
|
|
758
758
|
function Sf(e) {
|
|
@@ -767,15 +767,15 @@ function Sf(e) {
|
|
|
767
767
|
e.set(r.__key, i ? r.getChildrenSize() : 0, "element", !0);
|
|
768
768
|
}
|
|
769
769
|
}
|
|
770
|
-
let
|
|
770
|
+
let nr, At, mo, ha, ou, su, Mr, sn, au, vo, rt = "", It = "", hn = null, gn = "", Fn = "", lm = !1, yo = !1, ps = null;
|
|
771
771
|
function Ps(e, t) {
|
|
772
|
-
const n =
|
|
772
|
+
const n = Mr.get(e);
|
|
773
773
|
if (t !== null) {
|
|
774
774
|
const r = cu(e);
|
|
775
775
|
r.parentNode === t && t.removeChild(r);
|
|
776
776
|
}
|
|
777
777
|
if (sn.has(e) || At._keyToDOMMap.delete(e), z(n)) {
|
|
778
|
-
const r = Ls(n,
|
|
778
|
+
const r = Ls(n, Mr);
|
|
779
779
|
lu(r, 0, r.length - 1, null);
|
|
780
780
|
}
|
|
781
781
|
n !== void 0 && Xc(vo, mo, ha, n, "destroyed");
|
|
@@ -787,12 +787,12 @@ function lu(e, t, n, r) {
|
|
|
787
787
|
o !== void 0 && Ps(o, r);
|
|
788
788
|
}
|
|
789
789
|
}
|
|
790
|
-
function
|
|
790
|
+
function _r(e, t) {
|
|
791
791
|
e.setProperty("text-align", t);
|
|
792
792
|
}
|
|
793
793
|
const a5 = "40px";
|
|
794
794
|
function um(e, t) {
|
|
795
|
-
const n =
|
|
795
|
+
const n = nr.theme.indent;
|
|
796
796
|
if (typeof n == "string") {
|
|
797
797
|
const i = e.classList.contains(n);
|
|
798
798
|
t > 0 && !i ? e.classList.add(n) : t < 1 && i && e.classList.remove(n);
|
|
@@ -802,12 +802,12 @@ function um(e, t) {
|
|
|
802
802
|
}
|
|
803
803
|
function cm(e, t) {
|
|
804
804
|
const n = e.style;
|
|
805
|
-
t === 0 ?
|
|
805
|
+
t === 0 ? _r(n, "") : t === _c ? _r(n, "left") : t === bc ? _r(n, "center") : t === Cc ? _r(n, "right") : t === wc ? _r(n, "justify") : t === Ec ? _r(n, "start") : t === Sc && _r(n, "end");
|
|
806
806
|
}
|
|
807
807
|
function Os(e, t) {
|
|
808
808
|
const n = sn.get(e);
|
|
809
809
|
n === void 0 && ne(60);
|
|
810
|
-
const r = n.createDOM(
|
|
810
|
+
const r = n.createDOM(nr, At);
|
|
811
811
|
if (function(i, o, s) {
|
|
812
812
|
const a = s._keyToDOMMap;
|
|
813
813
|
(function(l, u, c) {
|
|
@@ -828,7 +828,7 @@ function Os(e, t) {
|
|
|
828
828
|
} else {
|
|
829
829
|
const i = n.getTextContent();
|
|
830
830
|
if (Ne(n)) {
|
|
831
|
-
const o = n.decorate(At,
|
|
831
|
+
const o = n.decorate(At, nr);
|
|
832
832
|
o !== null && pm(e, o), r.contentEditable = "false";
|
|
833
833
|
} else ae(n) && (n.isDirectionless() || (It += i));
|
|
834
834
|
rt += i, Fn += i;
|
|
@@ -858,7 +858,7 @@ function kf(e, t) {
|
|
|
858
858
|
return null;
|
|
859
859
|
}
|
|
860
860
|
function dm(e, t, n) {
|
|
861
|
-
const r = kf(e,
|
|
861
|
+
const r = kf(e, Mr), i = kf(t, sn);
|
|
862
862
|
r !== i && t.getDOMSlot(n).setManagedLineBreak(i);
|
|
863
863
|
}
|
|
864
864
|
function fm(e, t) {
|
|
@@ -868,7 +868,7 @@ function fm(e, t) {
|
|
|
868
868
|
return j_.test(s) ? "rtl" : Z_.test(s) ? "ltr" : null;
|
|
869
869
|
}(It);
|
|
870
870
|
if (o !== r) {
|
|
871
|
-
const s = t.classList, a =
|
|
871
|
+
const s = t.classList, a = nr.theme;
|
|
872
872
|
let l = r !== null ? a[r] : void 0, u = o !== null ? a[o] : void 0;
|
|
873
873
|
if (l !== void 0) {
|
|
874
874
|
if (typeof l == "string") {
|
|
@@ -919,7 +919,7 @@ function l5(e, t, n) {
|
|
|
919
919
|
const m = sn.get(p);
|
|
920
920
|
ae(m) && (hn === null && (hn = m.getFormat()), gn === "" && (gn = m.getStyle()));
|
|
921
921
|
} else {
|
|
922
|
-
const f = Ls(o,
|
|
922
|
+
const f = Ls(o, Mr), p = Ls(s, sn);
|
|
923
923
|
if (f.length !== u && ne(227), p.length !== c && ne(228), u === 0) c !== 0 && uu(p, s, 0, c - 1, a);
|
|
924
924
|
else if (c === 0) {
|
|
925
925
|
if (u !== 0) {
|
|
@@ -966,7 +966,7 @@ function Ls(e, t) {
|
|
|
966
966
|
return n;
|
|
967
967
|
}
|
|
968
968
|
function Ji(e, t) {
|
|
969
|
-
const n =
|
|
969
|
+
const n = Mr.get(e);
|
|
970
970
|
let r = sn.get(e);
|
|
971
971
|
n !== void 0 && r !== void 0 || ne(61);
|
|
972
972
|
const i = lm || su.has(e) || ou.has(e), o = xi(At, e);
|
|
@@ -982,7 +982,7 @@ function Ji(e, t) {
|
|
|
982
982
|
}
|
|
983
983
|
return o;
|
|
984
984
|
}
|
|
985
|
-
if (n !== r && i && Xc(vo, mo, ha, r, "updated"), r.updateDOM(n, o,
|
|
985
|
+
if (n !== r && i && Xc(vo, mo, ha, r, "updated"), r.updateDOM(n, o, nr)) {
|
|
986
986
|
const s = Os(e, null);
|
|
987
987
|
return t === null && ne(62), t.replaceChild(s, o), Ps(e, null), s;
|
|
988
988
|
}
|
|
@@ -994,7 +994,7 @@ function Ji(e, t) {
|
|
|
994
994
|
} else {
|
|
995
995
|
const s = r.getTextContent();
|
|
996
996
|
if (Ne(r)) {
|
|
997
|
-
const a = r.decorate(At,
|
|
997
|
+
const a = r.decorate(At, nr);
|
|
998
998
|
a !== null && pm(e, a);
|
|
999
999
|
} else ae(r) && !r.isDirectionless() && (It += s);
|
|
1000
1000
|
rt += s, Fn += s;
|
|
@@ -1019,9 +1019,9 @@ function cl(e) {
|
|
|
1019
1019
|
return t !== null && t === At._blockCursorElement && (t = t.nextSibling), t;
|
|
1020
1020
|
}
|
|
1021
1021
|
function u5(e, t, n, r, i, o) {
|
|
1022
|
-
rt = "", Fn = "", It = "", lm = r === vi, ps = null, At = n,
|
|
1022
|
+
rt = "", Fn = "", It = "", lm = r === vi, ps = null, At = n, nr = n._config, mo = n._nodes, ha = At._listeners.mutation, ou = i, su = o, Mr = e._nodeMap, sn = t._nodeMap, yo = t._readOnly, au = new Map(n._keyToDOMMap);
|
|
1023
1023
|
const s = /* @__PURE__ */ new Map();
|
|
1024
|
-
return vo = s, Ji("root", null), At = void 0, mo = void 0, ou = void 0, su = void 0,
|
|
1024
|
+
return vo = s, Ji("root", null), At = void 0, mo = void 0, ou = void 0, su = void 0, Mr = void 0, sn = void 0, nr = void 0, au = void 0, vo = void 0, s;
|
|
1025
1025
|
}
|
|
1026
1026
|
function cu(e) {
|
|
1027
1027
|
const t = au.get(e);
|
|
@@ -1030,7 +1030,7 @@ function cu(e) {
|
|
|
1030
1030
|
function jr(e) {
|
|
1031
1031
|
return {};
|
|
1032
1032
|
}
|
|
1033
|
-
const Tc = {}, c5 = {}, Ic = {},
|
|
1033
|
+
const Tc = {}, c5 = {}, Ic = {}, Ir = {}, li = {}, xo = {}, ui = {}, ga = {}, du = {}, _o = {}, bo = {}, $n = {}, ma = {}, va = {}, hm = {}, gm = {}, d5 = {}, Ac = {}, f5 = {}, Nc = {}, Pc = {}, Ms = {}, Oc = {}, Lc = {}, ya = {}, Mc = {}, Rc = {}, mm = {}, Rs = {}, fu = {}, vm = {}, p5 = {}, ym = {}, xm = {}, h5 = {}, xa = {}, Fc = {}, pu = {}, g5 = {}, m5 = {}, ji = {}, Zi = {}, _m = {}, bm = {}, Cm = {}, On = Object.freeze({}), hu = 30, gu = [["keydown", function(e, t) {
|
|
1034
1034
|
if (Qi = e.timeStamp, mu = e.key, t.isComposing()) return;
|
|
1035
1035
|
const { key: n, shiftKey: r, ctrlKey: i, metaKey: o, altKey: s } = e;
|
|
1036
1036
|
if (!he(t, hm, e) && n != null) {
|
|
@@ -1073,13 +1073,13 @@ const Tc = {}, c5 = {}, Ic = {}, Tr = {}, li = {}, xo = {}, ui = {}, ga = {}, du
|
|
|
1073
1073
|
}(n, r)) eo = !1, he(t, Ms, e);
|
|
1074
1074
|
else if (function(a, l, u, c) {
|
|
1075
1075
|
return Yt ? !l && !u && (qr(a) || a.toLowerCase() === "h" && c) : c || l || u ? !1 : qr(a);
|
|
1076
|
-
}(n, s, o, i)) qr(n) ? he(t, Lc, e) : (e.preventDefault(), he(t,
|
|
1076
|
+
}(n, s, o, i)) qr(n) ? he(t, Lc, e) : (e.preventDefault(), he(t, Ir, !0));
|
|
1077
1077
|
else if (/* @__PURE__ */ function(a) {
|
|
1078
1078
|
return a === "Escape";
|
|
1079
1079
|
}(n)) he(t, ya, e);
|
|
1080
1080
|
else if (function(a, l, u, c, d) {
|
|
1081
1081
|
return Yt ? !(u || c || d) && (Hi(a) || a.toLowerCase() === "d" && l) : l || c || d ? !1 : Hi(a);
|
|
1082
|
-
}(n, i, r, s, o)) Hi(n) ? he(t, Mc, e) : (e.preventDefault(), he(t,
|
|
1082
|
+
}(n, i, r, s, o)) Hi(n) ? he(t, Mc, e) : (e.preventDefault(), he(t, Ir, !1));
|
|
1083
1083
|
else if (function(a, l, u) {
|
|
1084
1084
|
return qr(a) && (Yt ? l : u);
|
|
1085
1085
|
}(n, s, i)) e.preventDefault(), he(t, _o, !0);
|
|
@@ -1210,9 +1210,9 @@ ks && gu.push(["beforeinput", (e, t) => function(n, r) {
|
|
|
1210
1210
|
const m = s.anchor.getNode(), v = m.getTextContent(), _ = m.canInsertTextAfter(), y = s.anchor.offset === 0 && s.focus.offset === v.length;
|
|
1211
1211
|
let h = _f && p && !y && _;
|
|
1212
1212
|
if (h && s.isCollapsed() && (h = !Ne(bu(s.anchor, !0))), !h) {
|
|
1213
|
-
he(r,
|
|
1213
|
+
he(r, Ir, !0);
|
|
1214
1214
|
const g = se();
|
|
1215
|
-
_f && X(g) && g.isCollapsed() && (
|
|
1215
|
+
_f && X(g) && g.isCollapsed() && (wr = g, setTimeout(() => wr = null));
|
|
1216
1216
|
}
|
|
1217
1217
|
}
|
|
1218
1218
|
return;
|
|
@@ -1252,7 +1252,7 @@ ks && gu.push(["beforeinput", (e, t) => function(n, r) {
|
|
|
1252
1252
|
he(r, du, n);
|
|
1253
1253
|
break;
|
|
1254
1254
|
case "deleteContent":
|
|
1255
|
-
he(r,
|
|
1255
|
+
he(r, Ir, !1);
|
|
1256
1256
|
break;
|
|
1257
1257
|
case "deleteWordBackward":
|
|
1258
1258
|
he(r, _o, !0);
|
|
@@ -1301,7 +1301,7 @@ ks && gu.push(["beforeinput", (e, t) => function(n, r) {
|
|
|
1301
1301
|
}(e, t)]);
|
|
1302
1302
|
let Qi = 0, mu = null, wm = 0, ni = null;
|
|
1303
1303
|
const Fs = /* @__PURE__ */ new WeakMap();
|
|
1304
|
-
let vu = !1, yu = !1, eo = !1, Vi = !1, dl = !1, fl = "",
|
|
1304
|
+
let vu = !1, yu = !1, eo = !1, Vi = !1, dl = !1, fl = "", wr = null, Em = [0, "", 0, "root", 0];
|
|
1305
1305
|
function Sm(e, t, n, r, i) {
|
|
1306
1306
|
const o = e.anchor, s = e.focus, a = o.getNode(), l = Ke(), u = un(jt(l)), c = u !== null ? u.anchorNode : null, d = o.key, f = l.getElementByKey(d), p = n.length;
|
|
1307
1307
|
return d !== s.key || !ae(a) || (!i && (!ks || wm < r + 50) || a.isDirty() && p < 2 || Zm(n)) && o.offset !== s.offset && !a.isComposing() || ri(a) || a.isDirty() && p > 1 || (i || !ks) && f !== null && !a.isComposing() && c !== yi(f) || u !== null && t !== null && (!t.collapsed || t.startContainer !== u.anchorNode || t.startOffset !== u.anchorOffset) || a.getFormat() !== e.format || a.getStyle() !== e.style || function(m, v) {
|
|
@@ -1319,15 +1319,15 @@ function Tf(e, t) {
|
|
|
1319
1319
|
}
|
|
1320
1320
|
function If(e, t, n) {
|
|
1321
1321
|
const { anchorNode: r, anchorOffset: i, focusNode: o, focusOffset: s } = e;
|
|
1322
|
-
vu && (vu = !1, Tf(r, i) && Tf(o, s) && !
|
|
1322
|
+
vu && (vu = !1, Tf(r, i) && Tf(o, s) && !wr) || Ut(t, () => {
|
|
1323
1323
|
if (!n) return void pt(null);
|
|
1324
1324
|
if (!Ro(t, r, o)) return;
|
|
1325
1325
|
let a = se();
|
|
1326
|
-
if (
|
|
1327
|
-
const l = a.anchor, u =
|
|
1328
|
-
(l.key === u.key && l.offset === u.offset + 1 || l.offset === 1 && u.getNode().is(l.getNode().getPreviousSibling())) && (a =
|
|
1326
|
+
if (wr && X(a) && a.isCollapsed()) {
|
|
1327
|
+
const l = a.anchor, u = wr.anchor;
|
|
1328
|
+
(l.key === u.key && l.offset === u.offset + 1 || l.offset === 1 && u.getNode().is(l.getNode().getPreviousSibling())) && (a = wr.clone(), pt(a));
|
|
1329
1329
|
}
|
|
1330
|
-
if (
|
|
1330
|
+
if (wr = null, X(a)) {
|
|
1331
1331
|
const l = a.anchor, u = l.getNode();
|
|
1332
1332
|
if (a.isCollapsed()) {
|
|
1333
1333
|
e.type === "Range" && e.anchorNode === e.focusNode && (a.dirty = !0);
|
|
@@ -1440,8 +1440,8 @@ function xu(e, t, n) {
|
|
|
1440
1440
|
} else Tt(o) && t && e.isSelected() && e.selectPrevious();
|
|
1441
1441
|
if (X(o) && t && !s) {
|
|
1442
1442
|
const a = e.getIndexWithinParent();
|
|
1443
|
-
|
|
1444
|
-
} else
|
|
1443
|
+
Ar(e), $s(o, i, a, -1);
|
|
1444
|
+
} else Ar(e);
|
|
1445
1445
|
n || Ye(i) || i.canBeEmpty() || !i.isEmpty() || xu(i, t), t && vt(i) && i.isEmpty() && i.selectEnd();
|
|
1446
1446
|
}
|
|
1447
1447
|
class _a {
|
|
@@ -1607,7 +1607,7 @@ class _a {
|
|
|
1607
1607
|
}
|
|
1608
1608
|
getWritable() {
|
|
1609
1609
|
xt();
|
|
1610
|
-
const t =
|
|
1610
|
+
const t = ur(), n = Ke(), r = t._nodeMap, i = this.__key, o = this.getLatest(), s = n._cloneNotNeeded, a = se();
|
|
1611
1611
|
if (a !== null && a.setCachedNodes(null), s.has(i)) return Bs(o), o;
|
|
1612
1612
|
const l = ed(o);
|
|
1613
1613
|
return s.add(i), Bs(l), r.set(i, l), l;
|
|
@@ -1651,7 +1651,7 @@ class _a {
|
|
|
1651
1651
|
let r = se();
|
|
1652
1652
|
r !== null && (r = r.clone()), yl(this, t);
|
|
1653
1653
|
const i = this.getLatest(), o = this.__key, s = t.__key, a = t.getWritable(), l = this.getParentOrThrow().getWritable(), u = l.__size;
|
|
1654
|
-
|
|
1654
|
+
Ar(a);
|
|
1655
1655
|
const c = i.getPreviousSibling(), d = i.getNextSibling(), f = i.__prev, p = i.__next, m = i.__parent;
|
|
1656
1656
|
if (xu(i, !1, !0), c === null ? l.__first = s : c.getWritable().__next = s, a.__prev = f, d === null ? l.__last = s : d.getWritable().__prev = s, a.__next = p, a.__parent = m, l.__size = u, n && (z(this) && z(a) || ne(139), this.getChildren().forEach((v) => {
|
|
1657
1657
|
a.append(v);
|
|
@@ -1668,7 +1668,7 @@ class _a {
|
|
|
1668
1668
|
let a = !1, l = !1;
|
|
1669
1669
|
if (o !== null) {
|
|
1670
1670
|
const p = t.getIndexWithinParent();
|
|
1671
|
-
if (
|
|
1671
|
+
if (Ar(i), X(s)) {
|
|
1672
1672
|
const m = o.__key, v = s.anchor, _ = s.focus;
|
|
1673
1673
|
a = v.type === "element" && v.key === m && v.offset === p + 1, l = _.type === "element" && _.key === m && _.offset === p + 1;
|
|
1674
1674
|
}
|
|
@@ -1685,7 +1685,7 @@ class _a {
|
|
|
1685
1685
|
insertBefore(t, n = !0) {
|
|
1686
1686
|
xt(), yl(this, t);
|
|
1687
1687
|
const r = this.getWritable(), i = t.getWritable(), o = i.__key;
|
|
1688
|
-
|
|
1688
|
+
Ar(i);
|
|
1689
1689
|
const s = this.getPreviousSibling(), a = this.getParentOrThrow().getWritable(), l = r.__prev, u = this.getIndexWithinParent();
|
|
1690
1690
|
s === null ? a.__first = o : s.getWritable().__next = o, a.__size++, r.__prev = o, i.__prev = l, i.__next = r.__key, i.__parent = r.__parent;
|
|
1691
1691
|
const c = se();
|
|
@@ -1806,8 +1806,8 @@ function Nm(e, t, n, r, i) {
|
|
|
1806
1806
|
let a = !1;
|
|
1807
1807
|
const l = t & Ns && t & As;
|
|
1808
1808
|
s !== void 0 && (n & Ns && n & As ? (a = !0, l || o.add(...s)) : l && o.remove(...s));
|
|
1809
|
-
for (const u in
|
|
1810
|
-
const c =
|
|
1809
|
+
for (const u in Or) {
|
|
1810
|
+
const c = Or[u];
|
|
1811
1811
|
if (s = di(i, u), s !== void 0) if (n & c) {
|
|
1812
1812
|
if (a && (u === "underline" || u === "strikethrough")) {
|
|
1813
1813
|
t & c && o.remove(...s);
|
|
@@ -1885,7 +1885,7 @@ class In extends _a {
|
|
|
1885
1885
|
return !!(2 & this.getLatest().__detail);
|
|
1886
1886
|
}
|
|
1887
1887
|
hasFormat(t) {
|
|
1888
|
-
const n =
|
|
1888
|
+
const n = Or[t];
|
|
1889
1889
|
return !!(this.getFormat() & n);
|
|
1890
1890
|
}
|
|
1891
1891
|
isSimpleText() {
|
|
@@ -1946,7 +1946,7 @@ class In extends _a {
|
|
|
1946
1946
|
}
|
|
1947
1947
|
setFormat(t) {
|
|
1948
1948
|
const n = this.getWritable();
|
|
1949
|
-
return n.__format = typeof t == "string" ?
|
|
1949
|
+
return n.__format = typeof t == "string" ? Or[t] : t, n;
|
|
1950
1950
|
}
|
|
1951
1951
|
setDetail(t) {
|
|
1952
1952
|
const n = this.getWritable();
|
|
@@ -2231,7 +2231,7 @@ class E5 {
|
|
|
2231
2231
|
return this.key === t.key && this.offset === t.offset && this.type === t.type;
|
|
2232
2232
|
}
|
|
2233
2233
|
isBefore(t) {
|
|
2234
|
-
return this.key === t.key ? this.offset < t.offset : t1(Jt(
|
|
2234
|
+
return this.key === t.key ? this.offset < t.offset : t1(Jt(ir(this, "next")), Jt(ir(t, "next"))) < 0;
|
|
2235
2235
|
}
|
|
2236
2236
|
getNode() {
|
|
2237
2237
|
const t = ot(this.key);
|
|
@@ -2381,7 +2381,7 @@ class Zr {
|
|
|
2381
2381
|
i.pop();
|
|
2382
2382
|
}
|
|
2383
2383
|
if (i.length === 0 && r.isCollapsed()) {
|
|
2384
|
-
const u = Jt(r.anchor), c = Jt(r.anchor.getFlipped()), d = (p) =>
|
|
2384
|
+
const u = Jt(r.anchor), c = Jt(r.anchor.getFlipped()), d = (p) => Nr(p) ? p.origin : p.getNodeAtCaret(), f = d(u) || d(c) || (r.anchor.getNodeAtCaret() ? u.origin : c.origin);
|
|
2385
2385
|
i.push(f);
|
|
2386
2386
|
}
|
|
2387
2387
|
return i;
|
|
@@ -2411,7 +2411,7 @@ class Zr {
|
|
|
2411
2411
|
const n = Ke(), r = n.getEditorState()._selection, i = Lm(t.startContainer, t.startOffset, t.endContainer, t.endOffset, n, r);
|
|
2412
2412
|
if (i === null) return;
|
|
2413
2413
|
const [o, s] = i;
|
|
2414
|
-
this.anchor.set(o.key, o.offset, o.type, !0), this.focus.set(s.key, s.offset, s.type, !0),
|
|
2414
|
+
this.anchor.set(o.key, o.offset, o.type, !0), this.focus.set(s.key, s.offset, s.type, !0), Lr(this);
|
|
2415
2415
|
}
|
|
2416
2416
|
clone() {
|
|
2417
2417
|
const t = this.anchor, n = this.focus;
|
|
@@ -2424,7 +2424,7 @@ class Zr {
|
|
|
2424
2424
|
this.style = t, this.dirty = !0;
|
|
2425
2425
|
}
|
|
2426
2426
|
hasFormat(t) {
|
|
2427
|
-
const n =
|
|
2427
|
+
const n = Or[t];
|
|
2428
2428
|
return !!(this.format & n);
|
|
2429
2429
|
}
|
|
2430
2430
|
insertRawText(t) {
|
|
@@ -2443,7 +2443,7 @@ class Zr {
|
|
|
2443
2443
|
!this.isCollapsed() && r.isBefore(n) && (s = r, a = n), s.type === "element" && function(_, y, h, g) {
|
|
2444
2444
|
const x = _.getNode(), b = x.getChildAtIndex(_.offset), C = ze(), w = vt(x) ? Be().append(C) : C;
|
|
2445
2445
|
C.setFormat(h), C.setStyle(g), b === null ? x.append(w) : b.insertBefore(w), _.is(y) && y.set(C.__key, 0, "text"), _.set(C.__key, 0, "text");
|
|
2446
|
-
}(s, a, i, o), a.type === "element" &&
|
|
2446
|
+
}(s, a, i, o), a.type === "element" && $r(a, Jt(ir(a, "next")));
|
|
2447
2447
|
const l = s.offset;
|
|
2448
2448
|
let u = a.offset;
|
|
2449
2449
|
const c = this.getNodes(), d = c.length;
|
|
@@ -2710,7 +2710,7 @@ class Zr {
|
|
|
2710
2710
|
const r = this.anchor;
|
|
2711
2711
|
let i = r.getNode();
|
|
2712
2712
|
if (this.forwardDeletion(r, i, t)) return;
|
|
2713
|
-
const o = sd(
|
|
2713
|
+
const o = sd(ir(r, t ? "previous" : "next"));
|
|
2714
2714
|
if (o.getTextSlices().every((a) => a === null || a.distance === 0)) {
|
|
2715
2715
|
let a = { type: "initial" };
|
|
2716
2716
|
for (const l of o.iterNodeCarets("shadowRoot")) if (En(l)) {
|
|
@@ -2925,7 +2925,7 @@ function Ds(e) {
|
|
|
2925
2925
|
return z(e) && !e.isInline();
|
|
2926
2926
|
}
|
|
2927
2927
|
function Mm(e, t, n, r, i, o) {
|
|
2928
|
-
const s =
|
|
2928
|
+
const s = ur(), a = new Zr(Sn(e, t, i), Sn(n, r, o), 0, "");
|
|
2929
2929
|
return a.dirty = !0, s._selection = a, a;
|
|
2930
2930
|
}
|
|
2931
2931
|
function Ca() {
|
|
@@ -2949,7 +2949,7 @@ function Hc(e, t, n, r) {
|
|
|
2949
2949
|
return new Zr(m, v, X(e) ? e.format : 0, X(e) ? e.style : "");
|
|
2950
2950
|
}
|
|
2951
2951
|
function se() {
|
|
2952
|
-
return
|
|
2952
|
+
return ur()._selection;
|
|
2953
2953
|
}
|
|
2954
2954
|
function Ni() {
|
|
2955
2955
|
return Ke()._editorState._selection;
|
|
@@ -3107,7 +3107,7 @@ function zf(e, t, n, r, i = "decorators-and-blocks") {
|
|
|
3107
3107
|
const [c, d] = n === e.isBackward() ? [e.focus, e.anchor] : [e.anchor, e.focus];
|
|
3108
3108
|
return d.set(c.key, c.offset, c.type), !0;
|
|
3109
3109
|
}
|
|
3110
|
-
const o =
|
|
3110
|
+
const o = ir(e.focus, n ? "previous" : "next"), s = r === "lineboundary", a = t === "move";
|
|
3111
3111
|
let l = o, u = i === "decorators-and-blocks";
|
|
3112
3112
|
if (!r1(l)) {
|
|
3113
3113
|
for (const c of l) {
|
|
@@ -3129,7 +3129,7 @@ function zf(e, t, n, r, i = "decorators-and-blocks") {
|
|
|
3129
3129
|
const c = Vc();
|
|
3130
3130
|
return c.add(l.origin.getKey()), pt(c), !0;
|
|
3131
3131
|
}
|
|
3132
|
-
return l = Jt(l), a &&
|
|
3132
|
+
return l = Jt(l), a && $r(e.anchor, l), $r(e.focus, l), u || !s;
|
|
3133
3133
|
}
|
|
3134
3134
|
let ct = null, it = null, Lt = !1, vl = !1, gs = 0;
|
|
3135
3135
|
const Uf = { characterData: !0, childList: !0, subtree: !0 };
|
|
@@ -3142,7 +3142,7 @@ function xt() {
|
|
|
3142
3142
|
function Fm() {
|
|
3143
3143
|
gs > 99 && ne(14);
|
|
3144
3144
|
}
|
|
3145
|
-
function
|
|
3145
|
+
function ur() {
|
|
3146
3146
|
return ct === null && ne(195, Dm()), ct;
|
|
3147
3147
|
}
|
|
3148
3148
|
function Ke() {
|
|
@@ -3212,7 +3212,7 @@ function Jf(e, t, n) {
|
|
|
3212
3212
|
function Dn(e, t) {
|
|
3213
3213
|
const n = e._pendingEditorState, r = e._rootElement, i = e._headless || r === null;
|
|
3214
3214
|
if (n === null) return;
|
|
3215
|
-
const o = e._editorState, s = o._selection, a = n._selection, l = e._dirtyType !==
|
|
3215
|
+
const o = e._editorState, s = o._selection, a = n._selection, l = e._dirtyType !== Pr, u = ct, c = Lt, d = it, f = e._updating, p = e._observer;
|
|
3216
3216
|
let m = null;
|
|
3217
3217
|
if (e._pendingEditorState = null, e._editorState = n, !i && l && p !== null) {
|
|
3218
3218
|
it = e, ct = n, Lt = !1, e._updating = !0;
|
|
@@ -3228,7 +3228,7 @@ function Dn(e, t) {
|
|
|
3228
3228
|
}
|
|
3229
3229
|
n._readOnly || (n._readOnly = !0);
|
|
3230
3230
|
const v = e._dirtyLeaves, _ = e._dirtyElements, y = e._normalizedNodes, h = e._updateTags, g = e._deferred;
|
|
3231
|
-
l && (e._dirtyType =
|
|
3231
|
+
l && (e._dirtyType = Pr, e._cloneNotNeeded.clear(), e._dirtyLeaves = /* @__PURE__ */ new Set(), e._dirtyElements = /* @__PURE__ */ new Map(), e._normalizedNodes = /* @__PURE__ */ new Set(), e._updateTags = /* @__PURE__ */ new Set()), function(C, w) {
|
|
3232
3232
|
const E = C._decorators;
|
|
3233
3233
|
let S = C._pendingDecorators || E;
|
|
3234
3234
|
const O = w._nodeMap;
|
|
@@ -3388,7 +3388,7 @@ function zc(e, t, n) {
|
|
|
3388
3388
|
E !== S && S.selectionTransform(x, b);
|
|
3389
3389
|
}
|
|
3390
3390
|
}
|
|
3391
|
-
}(l, e), e._dirtyType !==
|
|
3391
|
+
}(l, e), e._dirtyType !== Pr && (o ? function(h, g) {
|
|
3392
3392
|
const x = g._dirtyLeaves, b = h._nodeMap;
|
|
3393
3393
|
for (const C of x) {
|
|
3394
3394
|
const w = b.get(C);
|
|
@@ -3441,7 +3441,7 @@ function zc(e, t, n) {
|
|
|
3441
3441
|
} finally {
|
|
3442
3442
|
ct = c, Lt = d, it = f, e._updating = p, gs = 0;
|
|
3443
3443
|
}
|
|
3444
|
-
e._dirtyType !==
|
|
3444
|
+
e._dirtyType !== Pr || e._deferred.length > 0 || function(_, y) {
|
|
3445
3445
|
const h = y.getEditorState()._selection, g = _._selection;
|
|
3446
3446
|
if (g !== null) {
|
|
3447
3447
|
if (g.dirty || !g.is(h)) return !0;
|
|
@@ -3694,7 +3694,7 @@ class fn extends _a {
|
|
|
3694
3694
|
return !1;
|
|
3695
3695
|
}
|
|
3696
3696
|
hasTextFormat(t) {
|
|
3697
|
-
const n =
|
|
3697
|
+
const n = Or[t];
|
|
3698
3698
|
return !!(this.getTextFormat() & n);
|
|
3699
3699
|
}
|
|
3700
3700
|
getFormatFlags(t, n) {
|
|
@@ -3772,7 +3772,7 @@ class fn extends _a {
|
|
|
3772
3772
|
for (let v = 0; v < n; v++) {
|
|
3773
3773
|
m === null && ne(100);
|
|
3774
3774
|
const _ = m.getNextSibling(), y = m.__key;
|
|
3775
|
-
|
|
3775
|
+
Ar(m.getWritable()), u.push(y), m = _;
|
|
3776
3776
|
}
|
|
3777
3777
|
}
|
|
3778
3778
|
let p = d;
|
|
@@ -3780,7 +3780,7 @@ class fn extends _a {
|
|
|
3780
3780
|
const v = r[m];
|
|
3781
3781
|
p !== null && v.is(p) && (d = p = p.getPreviousSibling());
|
|
3782
3782
|
const _ = v.getWritable();
|
|
3783
|
-
_.__parent === a && f--,
|
|
3783
|
+
_.__parent === a && f--, Ar(_);
|
|
3784
3784
|
const y = v.__key;
|
|
3785
3785
|
if (p === null) s.__first = y, _.__prev = null;
|
|
3786
3786
|
else {
|
|
@@ -3922,7 +3922,7 @@ class Mo extends fn {
|
|
|
3922
3922
|
}
|
|
3923
3923
|
getTextContent() {
|
|
3924
3924
|
const t = this.__cachedText;
|
|
3925
|
-
return !Lo() && Ke()._dirtyType !==
|
|
3925
|
+
return !Lo() && Ke()._dirtyType !== Pr || t === null ? super.getTextContent() : t;
|
|
3926
3926
|
}
|
|
3927
3927
|
remove() {
|
|
3928
3928
|
ne(52);
|
|
@@ -4058,10 +4058,10 @@ function Be() {
|
|
|
4058
4058
|
function Kc(e) {
|
|
4059
4059
|
return e instanceof Pi;
|
|
4060
4060
|
}
|
|
4061
|
-
const Ie = 0, ut = 1, P5 = 3,
|
|
4061
|
+
const Ie = 0, ut = 1, P5 = 3, rr = 4;
|
|
4062
4062
|
function zm(e, t, n, r) {
|
|
4063
4063
|
const i = e._keyToDOMMap;
|
|
4064
|
-
i.clear(), e._editorState = Uc(), e._pendingEditorState = r, e._compositionKey = null, e._dirtyType =
|
|
4064
|
+
i.clear(), e._editorState = Uc(), e._pendingEditorState = r, e._compositionKey = null, e._dirtyType = Pr, e._cloneNotNeeded.clear(), e._dirtyLeaves = /* @__PURE__ */ new Set(), e._dirtyElements.clear(), e._normalizedNodes = /* @__PURE__ */ new Set(), e._updateTags = /* @__PURE__ */ new Set(), e._updates = [], e._blockCursorElement = null;
|
|
4065
4065
|
const o = e._observer;
|
|
4066
4066
|
o !== null && (o.disconnect(), e._observer = null), t !== null && (t.textContent = ""), n !== null && (n.textContent = "", i.set("root", n));
|
|
4067
4067
|
}
|
|
@@ -4100,7 +4100,7 @@ function O5(e) {
|
|
|
4100
4100
|
}
|
|
4101
4101
|
class ka {
|
|
4102
4102
|
constructor(t, n, r, i, o, s, a) {
|
|
4103
|
-
this._parentEditor = n, this._rootElement = null, this._editorState = t, this._pendingEditorState = null, this._compositionKey = null, this._deferred = [], this._keyToDOMMap = /* @__PURE__ */ new Map(), this._updates = [], this._updating = !1, this._listeners = { decorator: /* @__PURE__ */ new Set(), editable: /* @__PURE__ */ new Set(), mutation: /* @__PURE__ */ new Map(), root: /* @__PURE__ */ new Set(), textcontent: /* @__PURE__ */ new Set(), update: /* @__PURE__ */ new Set() }, this._commands = /* @__PURE__ */ new Map(), this._config = i, this._nodes = r, this._decorators = {}, this._pendingDecorators = null, this._dirtyType =
|
|
4103
|
+
this._parentEditor = n, this._rootElement = null, this._editorState = t, this._pendingEditorState = null, this._compositionKey = null, this._deferred = [], this._keyToDOMMap = /* @__PURE__ */ new Map(), this._updates = [], this._updating = !1, this._listeners = { decorator: /* @__PURE__ */ new Set(), editable: /* @__PURE__ */ new Set(), mutation: /* @__PURE__ */ new Map(), root: /* @__PURE__ */ new Set(), textcontent: /* @__PURE__ */ new Set(), update: /* @__PURE__ */ new Set() }, this._commands = /* @__PURE__ */ new Map(), this._config = i, this._nodes = r, this._decorators = {}, this._pendingDecorators = null, this._dirtyType = Pr, this._cloneNotNeeded = /* @__PURE__ */ new Set(), this._dirtyLeaves = /* @__PURE__ */ new Set(), this._dirtyElements = /* @__PURE__ */ new Map(), this._normalizedNodes = /* @__PURE__ */ new Set(), this._updateTags = /* @__PURE__ */ new Set(), this._observer = null, this._key = qm(), this._onError = o, this._htmlConversions = s, this._editable = a, this._headless = n !== null && n._headless, this._window = null, this._blockCursorElement = null;
|
|
4104
4104
|
}
|
|
4105
4105
|
isComposing() {
|
|
4106
4106
|
return this._compositionKey != null;
|
|
@@ -4373,7 +4373,7 @@ function yi(e) {
|
|
|
4373
4373
|
return null;
|
|
4374
4374
|
}
|
|
4375
4375
|
function Hs(e, t, n) {
|
|
4376
|
-
const r =
|
|
4376
|
+
const r = Or[t];
|
|
4377
4377
|
if (n !== null && (e & r) == (n & r)) return e;
|
|
4378
4378
|
let i = e ^ r;
|
|
4379
4379
|
return t === "subscript" ? i &= -65 : t === "superscript" ? i &= -33 : t === "lowercase" ? (i &= -513, i &= -1025) : t === "uppercase" ? (i &= -257, i &= -1025) : t === "capitalize" && (i &= -257, i &= -513), i;
|
|
@@ -4384,10 +4384,10 @@ function Um(e) {
|
|
|
4384
4384
|
function Wm(e, t) {
|
|
4385
4385
|
if (t != null) return void (e.__key = t);
|
|
4386
4386
|
xt(), Fm();
|
|
4387
|
-
const n = Ke(), r =
|
|
4387
|
+
const n = Ke(), r = ur(), i = "" + L5++;
|
|
4388
4388
|
r._nodeMap.set(i, e), z(e) ? n._dirtyElements.set(i, !0) : n._dirtyLeaves.add(i), n._cloneNotNeeded.add(i), n._dirtyType = em, e.__key = i;
|
|
4389
4389
|
}
|
|
4390
|
-
function
|
|
4390
|
+
function Ar(e) {
|
|
4391
4391
|
const t = e.getParent();
|
|
4392
4392
|
if (t !== null) {
|
|
4393
4393
|
const n = e.getWritable(), r = t.getWritable(), i = e.getPreviousSibling(), o = e.getNextSibling();
|
|
@@ -4420,7 +4420,7 @@ function Ir(e) {
|
|
|
4420
4420
|
}
|
|
4421
4421
|
function Bs(e) {
|
|
4422
4422
|
Fm();
|
|
4423
|
-
const t = e.getLatest(), n = t.__parent, r =
|
|
4423
|
+
const t = e.getLatest(), n = t.__parent, r = ur(), i = Ke(), o = r._nodeMap, s = i._dirtyElements;
|
|
4424
4424
|
n !== null && function(l, u, c) {
|
|
4425
4425
|
let d = l;
|
|
4426
4426
|
for (; d !== null; ) {
|
|
@@ -4451,7 +4451,7 @@ function Gn() {
|
|
|
4451
4451
|
return Lo() ? null : Ke()._compositionKey;
|
|
4452
4452
|
}
|
|
4453
4453
|
function ot(e, t) {
|
|
4454
|
-
const n = (t ||
|
|
4454
|
+
const n = (t || ur())._nodeMap.get(e);
|
|
4455
4455
|
return n === void 0 ? null : n;
|
|
4456
4456
|
}
|
|
4457
4457
|
function Km(e, t) {
|
|
@@ -4478,14 +4478,14 @@ function Gf(e) {
|
|
|
4478
4478
|
return e.read(() => Ve().getTextContent());
|
|
4479
4479
|
}
|
|
4480
4480
|
function Ve() {
|
|
4481
|
-
return jm(
|
|
4481
|
+
return jm(ur());
|
|
4482
4482
|
}
|
|
4483
4483
|
function jm(e) {
|
|
4484
4484
|
return e._nodeMap.get("root");
|
|
4485
4485
|
}
|
|
4486
4486
|
function pt(e) {
|
|
4487
4487
|
xt();
|
|
4488
|
-
const t =
|
|
4488
|
+
const t = ur();
|
|
4489
4489
|
e !== null && (e.dirty = !0, e.setCachedNodes(null)), t._selection = e;
|
|
4490
4490
|
}
|
|
4491
4491
|
function ii(e) {
|
|
@@ -4592,11 +4592,11 @@ function F5(e) {
|
|
|
4592
4592
|
const t = Ve();
|
|
4593
4593
|
if (X(e)) {
|
|
4594
4594
|
const n = e.anchor, r = e.focus, i = n.getNode().getTopLevelElementOrThrow().getParentOrThrow();
|
|
4595
|
-
return n.set(i.getKey(), 0, "element"), r.set(i.getKey(), i.getChildrenSize(), "element"),
|
|
4595
|
+
return n.set(i.getKey(), 0, "element"), r.set(i.getKey(), i.getChildrenSize(), "element"), Lr(e), e;
|
|
4596
4596
|
}
|
|
4597
4597
|
{
|
|
4598
4598
|
const n = t.select(0, t.getChildrenSize());
|
|
4599
|
-
return pt(
|
|
4599
|
+
return pt(Lr(n)), n;
|
|
4600
4600
|
}
|
|
4601
4601
|
}
|
|
4602
4602
|
function di(e, t) {
|
|
@@ -4883,7 +4883,7 @@ function Li(e) {
|
|
|
4883
4883
|
function rd(e, t = "root") {
|
|
4884
4884
|
return Z5[t](e) ? null : e;
|
|
4885
4885
|
}
|
|
4886
|
-
class
|
|
4886
|
+
class Rr extends nd {
|
|
4887
4887
|
constructor() {
|
|
4888
4888
|
super(...arguments);
|
|
4889
4889
|
Bt(this, "type", "sibling");
|
|
@@ -4909,13 +4909,13 @@ class Mr extends nd {
|
|
|
4909
4909
|
return _t(this.getNodeAtCaret(), n) || Tn(this.origin.getParentOrThrow(), n);
|
|
4910
4910
|
}
|
|
4911
4911
|
isSamePointCaret(n) {
|
|
4912
|
-
return n instanceof
|
|
4912
|
+
return n instanceof Rr && this.direction === n.direction && this.origin.is(n.origin);
|
|
4913
4913
|
}
|
|
4914
4914
|
isSameNodeCaret(n) {
|
|
4915
|
-
return (n instanceof
|
|
4915
|
+
return (n instanceof Rr || n instanceof Fr) && this.direction === n.direction && this.origin.is(n.origin);
|
|
4916
4916
|
}
|
|
4917
4917
|
}
|
|
4918
|
-
class
|
|
4918
|
+
class Fr extends nd {
|
|
4919
4919
|
constructor(n, r) {
|
|
4920
4920
|
super(n);
|
|
4921
4921
|
Bt(this, "type", "text");
|
|
@@ -4923,7 +4923,7 @@ class Rr extends nd {
|
|
|
4923
4923
|
}
|
|
4924
4924
|
getLatest() {
|
|
4925
4925
|
const n = this.origin.getLatest();
|
|
4926
|
-
return n === this.origin ? this :
|
|
4926
|
+
return n === this.origin ? this : Dr(n, this.direction, this.offset);
|
|
4927
4927
|
}
|
|
4928
4928
|
getParentAtCaret() {
|
|
4929
4929
|
return this.origin.getParent();
|
|
@@ -4935,28 +4935,28 @@ class Rr extends nd {
|
|
|
4935
4935
|
return _t(rd(this.getParentAtCaret(), n), this.direction);
|
|
4936
4936
|
}
|
|
4937
4937
|
getFlipped() {
|
|
4938
|
-
return
|
|
4938
|
+
return Dr(this.origin, Li(this.direction), this.offset);
|
|
4939
4939
|
}
|
|
4940
4940
|
isSamePointCaret(n) {
|
|
4941
|
-
return n instanceof
|
|
4941
|
+
return n instanceof Fr && this.direction === n.direction && this.origin.is(n.origin) && this.offset === n.offset;
|
|
4942
4942
|
}
|
|
4943
4943
|
isSameNodeCaret(n) {
|
|
4944
|
-
return (n instanceof
|
|
4944
|
+
return (n instanceof Rr || n instanceof Fr) && this.direction === n.direction && this.origin.is(n.origin);
|
|
4945
4945
|
}
|
|
4946
4946
|
getSiblingCaret() {
|
|
4947
4947
|
return _t(this.origin, this.direction);
|
|
4948
4948
|
}
|
|
4949
4949
|
}
|
|
4950
|
-
function
|
|
4951
|
-
return e instanceof
|
|
4950
|
+
function Nr(e) {
|
|
4951
|
+
return e instanceof Fr;
|
|
4952
4952
|
}
|
|
4953
4953
|
function _i(e) {
|
|
4954
|
-
return e instanceof
|
|
4954
|
+
return e instanceof Rr;
|
|
4955
4955
|
}
|
|
4956
4956
|
function En(e) {
|
|
4957
4957
|
return e instanceof Co;
|
|
4958
4958
|
}
|
|
4959
|
-
const q5 = { next: class extends
|
|
4959
|
+
const q5 = { next: class extends Fr {
|
|
4960
4960
|
constructor() {
|
|
4961
4961
|
super(...arguments);
|
|
4962
4962
|
Bt(this, "direction", "next");
|
|
@@ -4967,7 +4967,7 @@ const q5 = { next: class extends Rr {
|
|
|
4967
4967
|
insert(t) {
|
|
4968
4968
|
return this.origin.insertAfter(t), this;
|
|
4969
4969
|
}
|
|
4970
|
-
}, previous: class extends
|
|
4970
|
+
}, previous: class extends Fr {
|
|
4971
4971
|
constructor() {
|
|
4972
4972
|
super(...arguments);
|
|
4973
4973
|
Bt(this, "direction", "previous");
|
|
@@ -4978,7 +4978,7 @@ const q5 = { next: class extends Rr {
|
|
|
4978
4978
|
insert(t) {
|
|
4979
4979
|
return this.origin.insertBefore(t), this;
|
|
4980
4980
|
}
|
|
4981
|
-
} }, G5 = { next: class extends
|
|
4981
|
+
} }, G5 = { next: class extends Rr {
|
|
4982
4982
|
constructor() {
|
|
4983
4983
|
super(...arguments);
|
|
4984
4984
|
Bt(this, "direction", "next");
|
|
@@ -4989,7 +4989,7 @@ const q5 = { next: class extends Rr {
|
|
|
4989
4989
|
insert(t) {
|
|
4990
4990
|
return this.origin.insertAfter(t), this;
|
|
4991
4991
|
}
|
|
4992
|
-
}, previous: class extends
|
|
4992
|
+
}, previous: class extends Rr {
|
|
4993
4993
|
constructor() {
|
|
4994
4994
|
super(...arguments);
|
|
4995
4995
|
Bt(this, "direction", "previous");
|
|
@@ -5026,7 +5026,7 @@ const q5 = { next: class extends Rr {
|
|
|
5026
5026
|
function _t(e, t) {
|
|
5027
5027
|
return e ? new G5[t](e) : null;
|
|
5028
5028
|
}
|
|
5029
|
-
function
|
|
5029
|
+
function Dr(e, t, n) {
|
|
5030
5030
|
return e ? new q5[t](e, Na(e, n)) : null;
|
|
5031
5031
|
}
|
|
5032
5032
|
function Na(e, t) {
|
|
@@ -5060,7 +5060,7 @@ class od {
|
|
|
5060
5060
|
getTextSlices() {
|
|
5061
5061
|
const t = (i) => {
|
|
5062
5062
|
const o = this[i].getLatest();
|
|
5063
|
-
return
|
|
5063
|
+
return Nr(o) ? function(s, a) {
|
|
5064
5064
|
const { direction: l, origin: u } = s, c = Na(u, a === "focus" ? Li(l) : l);
|
|
5065
5065
|
return op(s, c - s.offset);
|
|
5066
5066
|
}(o, i) : null;
|
|
@@ -5072,7 +5072,7 @@ class od {
|
|
|
5072
5072
|
return [n, r];
|
|
5073
5073
|
}
|
|
5074
5074
|
iterNodeCarets(t = "root") {
|
|
5075
|
-
const n =
|
|
5075
|
+
const n = Nr(this.anchor) ? this.anchor.getSiblingCaret() : this.anchor.getLatest(), r = this.focus.getLatest(), i = Nr(r), o = (s) => s.isSameNodeCaret(r) ? null : id(s) || s.getParentCaret(t);
|
|
5076
5076
|
return e1({ hasNext: (s) => s !== null && !(i && r.isSameNodeCaret(s)), initial: n.isSameNodeCaret(r) ? null : o(n), map: (s) => s, step: o });
|
|
5077
5077
|
}
|
|
5078
5078
|
[Symbol.iterator]() {
|
|
@@ -5097,7 +5097,7 @@ class Q5 {
|
|
|
5097
5097
|
}
|
|
5098
5098
|
removeTextSlice() {
|
|
5099
5099
|
const { caret: { origin: t, direction: n } } = this, [r, i] = this.getSliceIndices(), o = t.getTextContent();
|
|
5100
|
-
return
|
|
5100
|
+
return Dr(t.setTextContent(o.slice(0, r) + o.slice(i)), n, r);
|
|
5101
5101
|
}
|
|
5102
5102
|
}
|
|
5103
5103
|
function sd(e) {
|
|
@@ -5159,19 +5159,19 @@ function ms(e, t) {
|
|
|
5159
5159
|
}
|
|
5160
5160
|
return null;
|
|
5161
5161
|
}
|
|
5162
|
-
function
|
|
5162
|
+
function ir(e, t) {
|
|
5163
5163
|
const { type: n, key: r, offset: i } = e, o = B5(e.key);
|
|
5164
|
-
return n === "text" ? (ae(o) || ne(266, o.getType(), r),
|
|
5164
|
+
return n === "text" ? (ae(o) || ne(266, o.getType(), r), Dr(o, t, i)) : (z(o) || ne(267, o.getType(), r), o1(o, e.offset, t));
|
|
5165
5165
|
}
|
|
5166
|
-
function
|
|
5166
|
+
function $r(e, t) {
|
|
5167
5167
|
const { origin: n, direction: r } = t, i = r === "next";
|
|
5168
|
-
|
|
5168
|
+
Nr(t) ? e.set(n.getKey(), t.offset, "text") : _i(t) ? ae(n) ? e.set(n.getKey(), Na(n, r), "text") : e.set(n.getParentOrThrow().getKey(), n.getIndexWithinParent() + (i ? 1 : 0), "element") : (En(t) && z(n) || ne(268), e.set(n.getKey(), i ? 0 : n.getChildrenSize(), "element"));
|
|
5169
5169
|
}
|
|
5170
5170
|
function bl(e, t) {
|
|
5171
|
-
|
|
5171
|
+
$r(e.anchor, t.anchor), $r(e.focus, t.focus);
|
|
5172
5172
|
}
|
|
5173
5173
|
function ap(e) {
|
|
5174
|
-
const { anchor: t, focus: n } = e, r =
|
|
5174
|
+
const { anchor: t, focus: n } = e, r = ir(t, "next"), i = ir(n, "next"), o = t1(r, i) <= 0 ? "next" : "previous";
|
|
5175
5175
|
return bi(Ci(r, o), Ci(i, o));
|
|
5176
5176
|
}
|
|
5177
5177
|
function ad(e) {
|
|
@@ -5207,7 +5207,7 @@ function e2(e, t = "removeEmptySlices") {
|
|
|
5207
5207
|
const x = m.caret.origin;
|
|
5208
5208
|
if (h === "segmented") {
|
|
5209
5209
|
const b = g.origin, C = ze(b.getTextContent()).setStyle(b.getStyle()).setFormat(b.getFormat());
|
|
5210
|
-
y.replaceOrInsert(C), g =
|
|
5210
|
+
y.replaceOrInsert(C), g = Dr(C, r, g.offset);
|
|
5211
5211
|
}
|
|
5212
5212
|
x.is(s[0].origin) && (s[0] = g), x.is(a[0].origin) && (a[0] = g.getFlipped());
|
|
5213
5213
|
}
|
|
@@ -5264,12 +5264,12 @@ function Jt(e) {
|
|
|
5264
5264
|
}
|
|
5265
5265
|
return o;
|
|
5266
5266
|
}(e.getLatest()), { direction: n } = t;
|
|
5267
|
-
if (ae(t.origin)) return
|
|
5267
|
+
if (ae(t.origin)) return Nr(t) ? t : Dr(t.origin, n, n);
|
|
5268
5268
|
const r = t.getAdjacentCaret();
|
|
5269
|
-
return _i(r) && ae(r.origin) ?
|
|
5269
|
+
return _i(r) && ae(r.origin) ? Dr(r.origin, n, Li(n)) : t;
|
|
5270
5270
|
}
|
|
5271
5271
|
function r1(e) {
|
|
5272
|
-
return
|
|
5272
|
+
return Nr(e) && e.offset !== Na(e.origin, e.direction);
|
|
5273
5273
|
}
|
|
5274
5274
|
function Ci(e, t) {
|
|
5275
5275
|
return e.direction === t ? e : e.getFlipped();
|
|
@@ -5346,7 +5346,7 @@ function s2(e, t, n = o2) {
|
|
|
5346
5346
|
o && e.is(se()) && pt(o);
|
|
5347
5347
|
}
|
|
5348
5348
|
function cp(e, t) {
|
|
5349
|
-
const n =
|
|
5349
|
+
const n = ir(e.focus, t ? "previous" : "next");
|
|
5350
5350
|
if (r1(n)) return !1;
|
|
5351
5351
|
for (const r of sd(n)) {
|
|
5352
5352
|
if (En(r)) return !r.origin.isInline();
|
|
@@ -5413,10 +5413,10 @@ function l1(e, t) {
|
|
|
5413
5413
|
return null;
|
|
5414
5414
|
}
|
|
5415
5415
|
function ku(e) {
|
|
5416
|
-
const t =
|
|
5416
|
+
const t = cr(e, (n) => z(n) && !n.isInline());
|
|
5417
5417
|
return z(t) || u2(4, e.__key), t;
|
|
5418
5418
|
}
|
|
5419
|
-
const
|
|
5419
|
+
const cr = (e, t) => {
|
|
5420
5420
|
let n = e;
|
|
5421
5421
|
for (; n !== Ve() && n != null; ) {
|
|
5422
5422
|
if (t(n)) return n;
|
|
@@ -5769,7 +5769,7 @@ async function vp(e, t, n) {
|
|
|
5769
5769
|
a.style.cssText = "position: fixed; top: -1000px;", a.append(o.createTextNode("#")), r.append(a);
|
|
5770
5770
|
const l = new Range();
|
|
5771
5771
|
return l.setStart(a, 0), l.setEnd(a, 1), s.removeAllRanges(), s.addRange(l), new Promise((u, c) => {
|
|
5772
|
-
const d = e.registerCommand(xa, (f) => (Yn(f, ClipboardEvent) && (d(), Gr !== null && (window.clearTimeout(Gr), Gr = null), u(yp(e, f, n))), !0),
|
|
5772
|
+
const d = e.registerCommand(xa, (f) => (Yn(f, ClipboardEvent) && (d(), Gr !== null && (window.clearTimeout(Gr), Gr = null), u(yp(e, f, n))), !0), rr);
|
|
5773
5773
|
Gr = window.setTimeout(() => {
|
|
5774
5774
|
d(), Gr = null, u(!1);
|
|
5775
5775
|
}, 50), o.execCommand("copy"), a.remove();
|
|
@@ -5969,7 +5969,7 @@ function Ep(e) {
|
|
|
5969
5969
|
for (let i = 0; i < r.length; i++) {
|
|
5970
5970
|
const o = r[i], s = o.getKey();
|
|
5971
5971
|
if (n.has(s)) continue;
|
|
5972
|
-
const a =
|
|
5972
|
+
const a = cr(o, (u) => z(u) && !u.isInline());
|
|
5973
5973
|
if (a === null) continue;
|
|
5974
5974
|
const l = a.getKey();
|
|
5975
5975
|
a.canIndent() && !n.has(l) && (n.add(l), e(a));
|
|
@@ -5987,7 +5987,7 @@ function z2(e) {
|
|
|
5987
5987
|
return Zt(e.registerCommand(Ic, (t) => {
|
|
5988
5988
|
const n = se();
|
|
5989
5989
|
return !!Tt(n) && (n.clear(), !0);
|
|
5990
|
-
}, 0), e.registerCommand(
|
|
5990
|
+
}, 0), e.registerCommand(Ir, (t) => {
|
|
5991
5991
|
const n = se();
|
|
5992
5992
|
return !!X(n) && (n.deleteCharacter(t), !0);
|
|
5993
5993
|
}, Ie), e.registerCommand(_o, (t) => {
|
|
@@ -6020,7 +6020,7 @@ function z2(e) {
|
|
|
6020
6020
|
if (!X(n) && !Tt(n)) return !1;
|
|
6021
6021
|
const r = n.getNodes();
|
|
6022
6022
|
for (const i of r) {
|
|
6023
|
-
const o =
|
|
6023
|
+
const o = cr(i, (s) => z(s) && !s.isInline());
|
|
6024
6024
|
o !== null && o.setFormat(t);
|
|
6025
6025
|
}
|
|
6026
6026
|
return !0;
|
|
@@ -6086,11 +6086,11 @@ function z2(e) {
|
|
|
6086
6086
|
const n = se();
|
|
6087
6087
|
if (!X(n)) return !1;
|
|
6088
6088
|
const { anchor: r } = n, i = r.getNode();
|
|
6089
|
-
return n.isCollapsed() && r.offset === 0 && !vt(i) && ku(i).getIndent() > 0 ? (t.preventDefault(), e.dispatchCommand(fu, void 0)) : (!_p || navigator.language !== "ko-KR") && (t.preventDefault(), e.dispatchCommand(
|
|
6089
|
+
return n.isCollapsed() && r.offset === 0 && !vt(i) && ku(i).getIndent() > 0 ? (t.preventDefault(), e.dispatchCommand(fu, void 0)) : (!_p || navigator.language !== "ko-KR") && (t.preventDefault(), e.dispatchCommand(Ir, !0));
|
|
6090
6090
|
}, Ie), e.registerCommand(Mc, (t) => {
|
|
6091
6091
|
if (Qo(t.target)) return !1;
|
|
6092
6092
|
const n = se();
|
|
6093
|
-
return !!X(n) && (t.preventDefault(), e.dispatchCommand(
|
|
6093
|
+
return !!X(n) && (t.preventDefault(), e.dispatchCommand(Ir, !1));
|
|
6094
6094
|
}, Ie), e.registerCommand(Ms, (t) => {
|
|
6095
6095
|
const n = se();
|
|
6096
6096
|
if (!X(n)) return !1;
|
|
@@ -6115,7 +6115,7 @@ function z2(e) {
|
|
|
6115
6115
|
const c = a.getParentOrThrow().getKey(), d = a.getIndexWithinParent() + 1;
|
|
6116
6116
|
l.anchor.set(c, d, "element"), l.focus.set(c, d, "element");
|
|
6117
6117
|
}
|
|
6118
|
-
const u =
|
|
6118
|
+
const u = Lr(l);
|
|
6119
6119
|
pt(u);
|
|
6120
6120
|
}
|
|
6121
6121
|
e.dispatchCommand(bp, n);
|
|
@@ -6169,7 +6169,7 @@ function $t(e, t, n, r) {
|
|
|
6169
6169
|
function Wt(e, t) {
|
|
6170
6170
|
return e.length > 0 ? ($t(e, e.length, 0, t), e) : t;
|
|
6171
6171
|
}
|
|
6172
|
-
const mn =
|
|
6172
|
+
const mn = dr(/[A-Za-z]/), on = dr(/[\dA-Za-z]/), U2 = dr(/[#-'*+\--9=?A-Z^-~]/);
|
|
6173
6173
|
function Au(e) {
|
|
6174
6174
|
return (
|
|
6175
6175
|
// Special whitespace codes (which have negative values), C0 and Control
|
|
@@ -6177,7 +6177,7 @@ function Au(e) {
|
|
|
6177
6177
|
e !== null && (e < 32 || e === 127)
|
|
6178
6178
|
);
|
|
6179
6179
|
}
|
|
6180
|
-
const Nu =
|
|
6180
|
+
const Nu = dr(/\d/), W2 = dr(/[\dA-Fa-f]/), K2 = dr(/[!-/:-@[-`{-~]/);
|
|
6181
6181
|
function me(e) {
|
|
6182
6182
|
return e !== null && e < -2;
|
|
6183
6183
|
}
|
|
@@ -6187,8 +6187,8 @@ function qe(e) {
|
|
|
6187
6187
|
function Ee(e) {
|
|
6188
6188
|
return e === -2 || e === -1 || e === 32;
|
|
6189
6189
|
}
|
|
6190
|
-
const J2 =
|
|
6191
|
-
function
|
|
6190
|
+
const J2 = dr(new RegExp("\\p{P}|\\p{S}", "u")), Rn = dr(/\s/);
|
|
6191
|
+
function dr(e) {
|
|
6192
6192
|
return t;
|
|
6193
6193
|
function t(n) {
|
|
6194
6194
|
return n !== null && n > -1 && e.test(String.fromCharCode(n));
|
|
@@ -7906,7 +7906,7 @@ function Qb(e) {
|
|
|
7906
7906
|
);
|
|
7907
7907
|
return t;
|
|
7908
7908
|
}
|
|
7909
|
-
function
|
|
7909
|
+
function or(e) {
|
|
7910
7910
|
return "&#x" + e.toString(16).toUpperCase() + ";";
|
|
7911
7911
|
}
|
|
7912
7912
|
function Ws(e, t, n) {
|
|
@@ -7957,9 +7957,9 @@ function E1(e, t, n, r) {
|
|
|
7957
7957
|
u,
|
|
7958
7958
|
i
|
|
7959
7959
|
);
|
|
7960
|
-
c.inside && (l =
|
|
7960
|
+
c.inside && (l = or(u) + l.slice(1));
|
|
7961
7961
|
const d = l.charCodeAt(l.length - 1), f = Ws(r.after.charCodeAt(0), d, i);
|
|
7962
|
-
f.inside && (l = l.slice(0, -1) +
|
|
7962
|
+
f.inside && (l = l.slice(0, -1) + or(d));
|
|
7963
7963
|
const p = s.move(i);
|
|
7964
7964
|
return o(), n.attentionEncodeSurroundingInfo = {
|
|
7965
7965
|
after: f.outside,
|
|
@@ -8166,7 +8166,7 @@ function pC(e, t, n, r) {
|
|
|
8166
8166
|
`,
|
|
8167
8167
|
...o.current()
|
|
8168
8168
|
});
|
|
8169
|
-
return /^[\t ]/.test(u) && (u =
|
|
8169
|
+
return /^[\t ]/.test(u) && (u = or(u.charCodeAt(0)) + u.slice(1)), u = u ? s + " " + u : s, n.options.closeAtx && (u += " " + s), l(), a(), u;
|
|
8170
8170
|
}
|
|
8171
8171
|
I1.peek = hC;
|
|
8172
8172
|
function I1(e) {
|
|
@@ -8476,9 +8476,9 @@ function F1(e, t, n, r) {
|
|
|
8476
8476
|
u,
|
|
8477
8477
|
i
|
|
8478
8478
|
);
|
|
8479
|
-
c.inside && (l =
|
|
8479
|
+
c.inside && (l = or(u) + l.slice(1));
|
|
8480
8480
|
const d = l.charCodeAt(l.length - 1), f = Ws(r.after.charCodeAt(0), d, i);
|
|
8481
|
-
f.inside && (l = l.slice(0, -1) +
|
|
8481
|
+
f.inside && (l = l.slice(0, -1) + or(d));
|
|
8482
8482
|
const p = s.move(i + i);
|
|
8483
8483
|
return o(), n.attentionEncodeSurroundingInfo = {
|
|
8484
8484
|
after: f.outside,
|
|
@@ -8533,7 +8533,7 @@ function MC(e, t, n, r) {
|
|
|
8533
8533
|
(e.type === t.type || t.type === "definition" || // Paragraph followed by a setext heading.
|
|
8534
8534
|
t.type === "heading" && T1(t, r)) ? void 0 : n.spread ? 1 : 0;
|
|
8535
8535
|
}
|
|
8536
|
-
const
|
|
8536
|
+
const br = [
|
|
8537
8537
|
"autolink",
|
|
8538
8538
|
"destinationLiteral",
|
|
8539
8539
|
"destinationRaw",
|
|
@@ -8582,7 +8582,7 @@ const _r = [
|
|
|
8582
8582
|
character: "!",
|
|
8583
8583
|
after: "\\[",
|
|
8584
8584
|
inConstruct: "phrasing",
|
|
8585
|
-
notInConstruct:
|
|
8585
|
+
notInConstruct: br
|
|
8586
8586
|
},
|
|
8587
8587
|
// A quote can break out of a title.
|
|
8588
8588
|
{ character: '"', inConstruct: "titleQuote" },
|
|
@@ -8602,7 +8602,7 @@ const _r = [
|
|
|
8602
8602
|
before: "\\]",
|
|
8603
8603
|
character: "(",
|
|
8604
8604
|
inConstruct: "phrasing",
|
|
8605
|
-
notInConstruct:
|
|
8605
|
+
notInConstruct: br
|
|
8606
8606
|
},
|
|
8607
8607
|
// A right paren could start a list item or break out of a destination
|
|
8608
8608
|
// raw.
|
|
@@ -8611,7 +8611,7 @@ const _r = [
|
|
|
8611
8611
|
// An asterisk can start thematic breaks, list items, emphasis, strong.
|
|
8612
8612
|
{ atBreak: !0, character: "*", after: `(?:[ \r
|
|
8613
8613
|
*])` },
|
|
8614
|
-
{ character: "*", inConstruct: "phrasing", notInConstruct:
|
|
8614
|
+
{ character: "*", inConstruct: "phrasing", notInConstruct: br },
|
|
8615
8615
|
// A plus sign could start a list item.
|
|
8616
8616
|
{ atBreak: !0, character: "+", after: `(?:[ \r
|
|
8617
8617
|
])` },
|
|
@@ -8633,7 +8633,7 @@ const _r = [
|
|
|
8633
8633
|
character: "<",
|
|
8634
8634
|
after: "[!/?A-Za-z]",
|
|
8635
8635
|
inConstruct: "phrasing",
|
|
8636
|
-
notInConstruct:
|
|
8636
|
+
notInConstruct: br
|
|
8637
8637
|
},
|
|
8638
8638
|
{ character: "<", inConstruct: "destinationLiteral" },
|
|
8639
8639
|
// An equals to can start setext heading underlines.
|
|
@@ -8645,7 +8645,7 @@ const _r = [
|
|
|
8645
8645
|
// Question mark and at sign are not used in markdown for constructs.
|
|
8646
8646
|
// A left bracket can start definitions, references, labels,
|
|
8647
8647
|
{ atBreak: !0, character: "[" },
|
|
8648
|
-
{ character: "[", inConstruct: "phrasing", notInConstruct:
|
|
8648
|
+
{ character: "[", inConstruct: "phrasing", notInConstruct: br },
|
|
8649
8649
|
{ character: "[", inConstruct: ["label", "reference"] },
|
|
8650
8650
|
// A backslash can start an escape (when followed by punctuation) or a
|
|
8651
8651
|
// hard break (when followed by an eol).
|
|
@@ -8656,7 +8656,7 @@ const _r = [
|
|
|
8656
8656
|
// Caret is not used in markdown for constructs.
|
|
8657
8657
|
// An underscore can start emphasis, strong, or a thematic break.
|
|
8658
8658
|
{ atBreak: !0, character: "_" },
|
|
8659
|
-
{ character: "_", inConstruct: "phrasing", notInConstruct:
|
|
8659
|
+
{ character: "_", inConstruct: "phrasing", notInConstruct: br },
|
|
8660
8660
|
// A grave accent can start code (fenced or text), or it can break out of
|
|
8661
8661
|
// a grave accent code fence.
|
|
8662
8662
|
{ atBreak: !0, character: "`" },
|
|
@@ -8664,7 +8664,7 @@ const _r = [
|
|
|
8664
8664
|
character: "`",
|
|
8665
8665
|
inConstruct: ["codeFencedLangGraveAccent", "codeFencedMetaGraveAccent"]
|
|
8666
8666
|
},
|
|
8667
|
-
{ character: "`", inConstruct: "phrasing", notInConstruct:
|
|
8667
|
+
{ character: "`", inConstruct: "phrasing", notInConstruct: br },
|
|
8668
8668
|
// Left brace, vertical bar, right brace are not used in markdown for
|
|
8669
8669
|
// constructs.
|
|
8670
8670
|
// A tilde can start code (fenced).
|
|
@@ -8736,9 +8736,9 @@ function HC(e, t, n) {
|
|
|
8736
8736
|
after: d,
|
|
8737
8737
|
before: a
|
|
8738
8738
|
});
|
|
8739
|
-
l && l === f.slice(0, 1) && (f =
|
|
8739
|
+
l && l === f.slice(0, 1) && (f = or(l.charCodeAt(0)) + f.slice(1));
|
|
8740
8740
|
const p = t.attentionEncodeSurroundingInfo;
|
|
8741
|
-
t.attentionEncodeSurroundingInfo = void 0, l = void 0, p && (o.length > 0 && p.before && a === o[o.length - 1].slice(-1) && (o[o.length - 1] = o[o.length - 1].slice(0, -1) +
|
|
8741
|
+
t.attentionEncodeSurroundingInfo = void 0, l = void 0, p && (o.length > 0 && p.before && a === o[o.length - 1].slice(-1) && (o[o.length - 1] = o[o.length - 1].slice(0, -1) + or(a.charCodeAt(0))), p.after && (l = d)), u.move(f), o.push(f), a = f.slice(-1);
|
|
8742
8742
|
}
|
|
8743
8743
|
return r.pop(), o.join("");
|
|
8744
8744
|
}
|
|
@@ -8813,7 +8813,7 @@ function KC(e, t, n) {
|
|
|
8813
8813
|
const u = r.length - (n.after ? n.after.length : 0);
|
|
8814
8814
|
for (a = -1; ++a < i.length; ) {
|
|
8815
8815
|
const c = i[a];
|
|
8816
|
-
c < l || c >= u || c + 1 < u && i[a + 1] === c + 1 && s[c].after && !s[c + 1].before && !s[c + 1].after || i[a - 1] === c - 1 && s[c].before && !s[c - 1].before && !s[c - 1].after || (l !== c && o.push(Up(r.slice(l, c), "\\")), l = c, /[!-/:-@[-`{-~]/.test(r.charAt(c)) && (!n.encode || !n.encode.includes(r.charAt(c))) ? o.push("\\") : (o.push(
|
|
8816
|
+
c < l || c >= u || c + 1 < u && i[a + 1] === c + 1 && s[c].after && !s[c + 1].before && !s[c + 1].after || i[a - 1] === c - 1 && s[c].before && !s[c - 1].before && !s[c - 1].after || (l !== c && o.push(Up(r.slice(l, c), "\\")), l = c, /[!-/:-@[-`{-~]/.test(r.charAt(c)) && (!n.encode || !n.encode.includes(r.charAt(c))) ? o.push("\\") : (o.push(or(r.charCodeAt(c))), l++));
|
|
8817
8817
|
}
|
|
8818
8818
|
return o.push(Up(r.slice(l, u), n.after)), o.join("");
|
|
8819
8819
|
}
|
|
@@ -11506,18 +11506,18 @@ function QE(e) {
|
|
|
11506
11506
|
return U;
|
|
11507
11507
|
}
|
|
11508
11508
|
function i(F, U, T) {
|
|
11509
|
-
let ge = U - 1, _e = -1, Se = !1, at, et, Pn,
|
|
11509
|
+
let ge = U - 1, _e = -1, Se = !1, at, et, Pn, xr;
|
|
11510
11510
|
for (; ++ge <= T; ) {
|
|
11511
11511
|
const yt = F[ge];
|
|
11512
11512
|
switch (yt[1].type) {
|
|
11513
11513
|
case "listUnordered":
|
|
11514
11514
|
case "listOrdered":
|
|
11515
11515
|
case "blockQuote": {
|
|
11516
|
-
yt[0] === "enter" ? _e++ : _e--,
|
|
11516
|
+
yt[0] === "enter" ? _e++ : _e--, xr = void 0;
|
|
11517
11517
|
break;
|
|
11518
11518
|
}
|
|
11519
11519
|
case "lineEndingBlank": {
|
|
11520
|
-
yt[0] === "enter" && (at && !
|
|
11520
|
+
yt[0] === "enter" && (at && !xr && !_e && !Pn && (Pn = ge), xr = void 0);
|
|
11521
11521
|
break;
|
|
11522
11522
|
}
|
|
11523
11523
|
case "linePrefix":
|
|
@@ -11527,7 +11527,7 @@ function QE(e) {
|
|
|
11527
11527
|
case "listItemPrefixWhitespace":
|
|
11528
11528
|
break;
|
|
11529
11529
|
default:
|
|
11530
|
-
|
|
11530
|
+
xr = void 0;
|
|
11531
11531
|
}
|
|
11532
11532
|
if (!_e && yt[0] === "enter" && yt[1].type === "listItemPrefix" || _e === -1 && yt[0] === "exit" && (yt[1].type === "listUnordered" || yt[1].type === "listOrdered")) {
|
|
11533
11533
|
if (at) {
|
|
@@ -11549,7 +11549,7 @@ function QE(e) {
|
|
|
11549
11549
|
// @ts-expect-error: we’ll add `end` in a second.
|
|
11550
11550
|
end: void 0
|
|
11551
11551
|
};
|
|
11552
|
-
at = Wn, F.splice(ge, 0, ["enter", Wn, yt[2]]), ge++, T++, Pn = void 0,
|
|
11552
|
+
at = Wn, F.splice(ge, 0, ["enter", Wn, yt[2]]), ge++, T++, Pn = void 0, xr = !0;
|
|
11553
11553
|
}
|
|
11554
11554
|
}
|
|
11555
11555
|
}
|
|
@@ -12341,7 +12341,7 @@ const h9 = {
|
|
|
12341
12341
|
// `-`
|
|
12342
12342
|
greaterThan: 62
|
|
12343
12343
|
}
|
|
12344
|
-
),
|
|
12344
|
+
), Cr = (
|
|
12345
12345
|
/** @type {const} */
|
|
12346
12346
|
{
|
|
12347
12347
|
// Generic type for data, such as in a title, a destination, etc.
|
|
@@ -12384,25 +12384,25 @@ const ih = (e, t, n) => {
|
|
|
12384
12384
|
return m === Gt.dash ? (e.consume(m), a) : n(m);
|
|
12385
12385
|
}
|
|
12386
12386
|
function a(m) {
|
|
12387
|
-
return m === Gt.greaterThan ? n(m) : me(m) ? c(m) : (e.enter(
|
|
12387
|
+
return m === Gt.greaterThan ? n(m) : me(m) ? c(m) : (e.enter(Cr.data), m === Gt.dash ? (e.consume(m), l) : u(m));
|
|
12388
12388
|
}
|
|
12389
12389
|
function l(m) {
|
|
12390
12390
|
return m === Gt.greaterThan ? n(m) : u(m);
|
|
12391
12391
|
}
|
|
12392
12392
|
function u(m) {
|
|
12393
|
-
return m === Gt.eof ? n(m) : m === Gt.dash ? (e.consume(m), f) : me(m) ? (e.exit(
|
|
12393
|
+
return m === Gt.eof ? n(m) : m === Gt.dash ? (e.consume(m), f) : me(m) ? (e.exit(Cr.data), c(m)) : (e.consume(m), u);
|
|
12394
12394
|
}
|
|
12395
12395
|
function c(m) {
|
|
12396
|
-
return e.enter(
|
|
12396
|
+
return e.enter(Cr.lineEnding), e.consume(m), e.exit(Cr.lineEnding), Le(e, d, Cr.linePrefix);
|
|
12397
12397
|
}
|
|
12398
12398
|
function d(m) {
|
|
12399
|
-
return me(m) ? c(m) : (e.enter(
|
|
12399
|
+
return me(m) ? c(m) : (e.enter(Cr.data), u(m));
|
|
12400
12400
|
}
|
|
12401
12401
|
function f(m) {
|
|
12402
12402
|
return m === Gt.dash ? (e.consume(m), p) : u(m);
|
|
12403
12403
|
}
|
|
12404
12404
|
function p(m) {
|
|
12405
|
-
return m === Gt.greaterThan ? (e.exit(
|
|
12405
|
+
return m === Gt.greaterThan ? (e.exit(Cr.data), e.enter("commentEnd"), e.consume(m), e.exit("commentEnd"), e.exit("comment"), t(m)) : m === Gt.dash ? (e.consume(m), p) : u(m);
|
|
12406
12406
|
}
|
|
12407
12407
|
}, k9 = {
|
|
12408
12408
|
flow: { 60: { tokenize: ih, concrete: !0 } },
|
|
@@ -12451,8 +12451,8 @@ const ih = (e, t, n) => {
|
|
|
12451
12451
|
tip: ht.admonitionTip,
|
|
12452
12452
|
caution: ht.admonitionCaution
|
|
12453
12453
|
}
|
|
12454
|
-
}, md = jr(),
|
|
12455
|
-
e.sub(e.pipe(
|
|
12454
|
+
}, md = jr(), fr = ve(null), dt = ve(null), Du = ve(""), $u = ve(!0), sr = ve(!1, (e) => {
|
|
12455
|
+
e.sub(e.pipe(sr, st(fr)), ([t, n]) => {
|
|
12456
12456
|
n == null || n.setEditable(!t);
|
|
12457
12457
|
});
|
|
12458
12458
|
}), Vu = ve(""), oh = ve(!1), Eo = ve(!1), n0 = ve(0), Ks = ve(null), Hu = Nt((e) => {
|
|
@@ -12472,7 +12472,7 @@ const ih = (e, t, n) => {
|
|
|
12472
12472
|
if (!t || !n)
|
|
12473
12473
|
return;
|
|
12474
12474
|
const r = t.anchor.getNode();
|
|
12475
|
-
let i = r.getKey() === "root" ? r :
|
|
12475
|
+
let i = r.getKey() === "root" ? r : cr(r, (a) => {
|
|
12476
12476
|
const l = a.getParent();
|
|
12477
12477
|
return l !== null && Ye(l);
|
|
12478
12478
|
});
|
|
@@ -12483,11 +12483,11 @@ const ih = (e, t, n) => {
|
|
|
12483
12483
|
e.pub(E0, a);
|
|
12484
12484
|
}
|
|
12485
12485
|
});
|
|
12486
|
-
}), i0 = ve(""),
|
|
12487
|
-
e.link(
|
|
12486
|
+
}), i0 = ve(""), Vr = ve(""), Js = ve(!1), $a = Nt((e) => {
|
|
12487
|
+
e.link(Vr, $a), e.sub(i0, (t) => {
|
|
12488
12488
|
e.pubIn({
|
|
12489
12489
|
[Js]: !0,
|
|
12490
|
-
[
|
|
12490
|
+
[Vr]: t
|
|
12491
12491
|
});
|
|
12492
12492
|
});
|
|
12493
12493
|
}), Bu = Nt((e) => {
|
|
@@ -12504,7 +12504,7 @@ const ih = (e, t, n) => {
|
|
|
12504
12504
|
e.sub(
|
|
12505
12505
|
e.pipe(
|
|
12506
12506
|
yd,
|
|
12507
|
-
st(
|
|
12507
|
+
st(Vr, fr, Eo),
|
|
12508
12508
|
No(([t, n]) => t.trim() !== n.trim())
|
|
12509
12509
|
),
|
|
12510
12510
|
([t, , n, r]) => {
|
|
@@ -12550,8 +12550,8 @@ function h0() {
|
|
|
12550
12550
|
const g0 = ve([], (e) => {
|
|
12551
12551
|
e.pipe(e.combine(g0, dt), h0());
|
|
12552
12552
|
}), m0 = ve([], (e) => {
|
|
12553
|
-
e.pipe(e.combine(m0,
|
|
12554
|
-
}), j9 = ve(null), Ju = Nt(),
|
|
12553
|
+
e.pipe(e.combine(m0, fr), h0());
|
|
12554
|
+
}), j9 = ve(null), Ju = Nt(), pr = ve((e) => {
|
|
12555
12555
|
throw new Error(`No icon component for ${e}`);
|
|
12556
12556
|
});
|
|
12557
12557
|
function Pt(e, t) {
|
|
@@ -12585,7 +12585,7 @@ const y0 = Pt(m0, (e, t) => {
|
|
|
12585
12585
|
editorType: "lexical"
|
|
12586
12586
|
});
|
|
12587
12587
|
}), v0(e), !1),
|
|
12588
|
-
|
|
12588
|
+
rr
|
|
12589
12589
|
),
|
|
12590
12590
|
// Export handler
|
|
12591
12591
|
(n) => n.registerUpdateListener(({ dirtyElements: r, dirtyLeaves: i, editorState: o }) => {
|
|
@@ -12606,12 +12606,12 @@ const y0 = Pt(m0, (e, t) => {
|
|
|
12606
12606
|
toMarkdownOptions: e.getValue(zu),
|
|
12607
12607
|
jsxIsAvailable: e.getValue(W9)
|
|
12608
12608
|
});
|
|
12609
|
-
}), e.pub(
|
|
12609
|
+
}), e.pub(Vr, a.trim()), e.pub(Js, !1);
|
|
12610
12610
|
}),
|
|
12611
12611
|
(n) => n.registerCommand(
|
|
12612
12612
|
_m,
|
|
12613
12613
|
() => (e.pub(Eo, !0), !1),
|
|
12614
|
-
|
|
12614
|
+
rr
|
|
12615
12615
|
)
|
|
12616
12616
|
/*
|
|
12617
12617
|
// Fixes select all when frontmatter is present
|
|
@@ -12659,13 +12659,13 @@ const y0 = Pt(m0, (e, t) => {
|
|
|
12659
12659
|
bm,
|
|
12660
12660
|
(r) => {
|
|
12661
12661
|
var i;
|
|
12662
|
-
const o = e.getValue(
|
|
12662
|
+
const o = e.getValue(fr);
|
|
12663
12663
|
return o && !((i = o.getRootElement()) != null && i.contains(r.relatedTarget)) && e.pubIn({
|
|
12664
12664
|
[Eo]: !1,
|
|
12665
12665
|
[Ju]: r
|
|
12666
12666
|
}), !1;
|
|
12667
12667
|
},
|
|
12668
|
-
|
|
12668
|
+
rr
|
|
12669
12669
|
)
|
|
12670
12670
|
]);
|
|
12671
12671
|
});
|
|
@@ -12684,7 +12684,7 @@ function xd(e, t, n) {
|
|
|
12684
12684
|
} catch (r) {
|
|
12685
12685
|
if (r instanceof Ru || r instanceof Fu)
|
|
12686
12686
|
e.pubIn({
|
|
12687
|
-
[
|
|
12687
|
+
[Vr]: n,
|
|
12688
12688
|
[Ks]: {
|
|
12689
12689
|
error: r.message,
|
|
12690
12690
|
source: n
|
|
@@ -12750,7 +12750,7 @@ const Zs = Nt((e) => {
|
|
|
12750
12750
|
}
|
|
12751
12751
|
);
|
|
12752
12752
|
}), Gs = ve("", (e) => {
|
|
12753
|
-
e.link(
|
|
12753
|
+
e.link(Vr, Gs), e.link(Gs, $a);
|
|
12754
12754
|
}), _d = ve([]), bd = Pt(_d), k0 = ve(() => {
|
|
12755
12755
|
throw new Error("No translation function provided");
|
|
12756
12756
|
}), sh = ve(gd), X9 = Jr({
|
|
@@ -12758,7 +12758,7 @@ const Zs = Nt((e) => {
|
|
|
12758
12758
|
const n = (t == null ? void 0 : t.initialMarkdown) ?? "";
|
|
12759
12759
|
e.register(y0), e.register(js), e.register($a), e.pubIn({
|
|
12760
12760
|
[i0]: t != null && t.trim ? n.trim() : n,
|
|
12761
|
-
[
|
|
12761
|
+
[pr]: t == null ? void 0 : t.iconComponentFor,
|
|
12762
12762
|
[So]: [C9, b9, w9, p9, ...y9],
|
|
12763
12763
|
[Ha]: [Pi, In, $o],
|
|
12764
12764
|
[Ba]: [
|
|
@@ -12774,7 +12774,7 @@ const Zs = Nt((e) => {
|
|
|
12774
12774
|
[zu]: t == null ? void 0 : t.toMarkdownOptions,
|
|
12775
12775
|
[oh]: t == null ? void 0 : t.autoFocus,
|
|
12776
12776
|
[Vu]: t == null ? void 0 : t.placeholder,
|
|
12777
|
-
[
|
|
12777
|
+
[sr]: t == null ? void 0 : t.readOnly,
|
|
12778
12778
|
[k0]: t == null ? void 0 : t.translation,
|
|
12779
12779
|
[Wu]: q2(),
|
|
12780
12780
|
[Uu]: j2(),
|
|
@@ -12815,7 +12815,7 @@ const Zs = Nt((e) => {
|
|
|
12815
12815
|
});
|
|
12816
12816
|
});
|
|
12817
12817
|
}
|
|
12818
|
-
}), e.pub(
|
|
12818
|
+
}), e.pub(fr, n), e.pub(dt, n);
|
|
12819
12819
|
},
|
|
12820
12820
|
update(e, t) {
|
|
12821
12821
|
e.pubIn({
|
|
@@ -12824,7 +12824,7 @@ const Zs = Nt((e) => {
|
|
|
12824
12824
|
[zu]: t == null ? void 0 : t.toMarkdownOptions,
|
|
12825
12825
|
[oh]: t == null ? void 0 : t.autoFocus,
|
|
12826
12826
|
[Vu]: t == null ? void 0 : t.placeholder,
|
|
12827
|
-
[
|
|
12827
|
+
[sr]: t == null ? void 0 : t.readOnly
|
|
12828
12828
|
}), e.singletonSub(Bu, (n) => {
|
|
12829
12829
|
t == null || t.onChange(n, e.getValue(Js));
|
|
12830
12830
|
}), e.singletonSub(Ju, t == null ? void 0 : t.onBlur), e.singletonSub(Hu, t == null ? void 0 : t.onError);
|
|
@@ -12864,7 +12864,7 @@ function T0(e) {
|
|
|
12864
12864
|
}
|
|
12865
12865
|
const I0 = typeof window < "u" && window.document !== void 0 && window.document.createElement !== void 0 ? Ii : $e;
|
|
12866
12866
|
function nS({ editor: e, ariaActiveDescendant: t, ariaAutoComplete: n, ariaControls: r, ariaDescribedBy: i, ariaErrorMessage: o, ariaExpanded: s, ariaInvalid: a, ariaLabel: l, ariaLabelledBy: u, ariaMultiline: c, ariaOwns: d, ariaRequired: f, autoCapitalize: p, className: m, id: v, role: _ = "textbox", spellCheck: y = !0, style: h, tabIndex: g, "data-testid": x, ...b }, C) {
|
|
12867
|
-
const [w, E] =
|
|
12867
|
+
const [w, E] = tr(e.isEditable()), S = Qe((M) => {
|
|
12868
12868
|
M && M.ownerDocument && M.ownerDocument.defaultView ? e.setRootElement(M) : e.setRootElement(null);
|
|
12869
12869
|
}, [e]), O = Io(() => /* @__PURE__ */ function(...M) {
|
|
12870
12870
|
return (R) => {
|
|
@@ -12884,11 +12884,11 @@ function ah(e) {
|
|
|
12884
12884
|
const iS = Jg(oS);
|
|
12885
12885
|
function oS(e, t) {
|
|
12886
12886
|
const { placeholder: n, ...r } = e, [i] = Vt();
|
|
12887
|
-
return Qn(
|
|
12887
|
+
return Qn(er, { children: [$(rS, { editor: i, ...r, ref: t }), n != null && $(sS, { editor: i, content: n })] });
|
|
12888
12888
|
}
|
|
12889
12889
|
function sS({ content: e, editor: t }) {
|
|
12890
12890
|
const n = function(s) {
|
|
12891
|
-
const [a, l] =
|
|
12891
|
+
const [a, l] = tr(() => ah(s));
|
|
12892
12892
|
return I0(() => {
|
|
12893
12893
|
function u() {
|
|
12894
12894
|
const c = ah(s);
|
|
@@ -12900,7 +12900,7 @@ function sS({ content: e, editor: t }) {
|
|
|
12900
12900
|
u();
|
|
12901
12901
|
}));
|
|
12902
12902
|
}, [s]), a;
|
|
12903
|
-
}(t), [r, i] =
|
|
12903
|
+
}(t), [r, i] = tr(t.isEditable());
|
|
12904
12904
|
if (Ii(() => (i(t.isEditable()), t.registerEditableListener((s) => {
|
|
12905
12905
|
i(s);
|
|
12906
12906
|
})), [t]), !n) return null;
|
|
@@ -12913,7 +12913,7 @@ function lS(e) {
|
|
|
12913
12913
|
}
|
|
12914
12914
|
function uS() {
|
|
12915
12915
|
return function(e) {
|
|
12916
|
-
const [t] = Vt(), n = Io(() => e(t), [t, e]), [r, i] =
|
|
12916
|
+
const [t] = Vt(), n = Io(() => e(t), [t, e]), [r, i] = tr(() => n.initialValueFn()), o = lt(r);
|
|
12917
12917
|
return aS(() => {
|
|
12918
12918
|
const { initialValueFn: s, subscribe: a } = n, l = s();
|
|
12919
12919
|
return o.current !== l && (o.current = l, i(l)), a((u) => {
|
|
@@ -12969,7 +12969,7 @@ function lh(e) {
|
|
|
12969
12969
|
}
|
|
12970
12970
|
function dS({ contentEditable: e, placeholder: t = null, ErrorBoundary: n }) {
|
|
12971
12971
|
const [r] = Vt(), i = function(o, s) {
|
|
12972
|
-
const [a, l] =
|
|
12972
|
+
const [a, l] = tr(() => o.getDecorators());
|
|
12973
12973
|
return ju(() => o.registerDecoratorListener((u) => {
|
|
12974
12974
|
gi.flushSync(() => {
|
|
12975
12975
|
l(u);
|
|
@@ -12987,11 +12987,11 @@ function dS({ contentEditable: e, placeholder: t = null, ErrorBoundary: n }) {
|
|
|
12987
12987
|
}(r, n);
|
|
12988
12988
|
return function(o) {
|
|
12989
12989
|
ju(() => Zt(z2(o), cS(o)), [o]);
|
|
12990
|
-
}(r), Qn(
|
|
12990
|
+
}(r), Qn(er, { children: [e, $(fS, { content: t }), i] });
|
|
12991
12991
|
}
|
|
12992
12992
|
function fS({ content: e }) {
|
|
12993
12993
|
const [t] = Vt(), n = function(i) {
|
|
12994
|
-
const [o, s] =
|
|
12994
|
+
const [o, s] = tr(() => lh(i));
|
|
12995
12995
|
return ju(() => {
|
|
12996
12996
|
function a() {
|
|
12997
12997
|
const l = lh(i);
|
|
@@ -13449,7 +13449,7 @@ function qS({ children: e, onError: t }) {
|
|
|
13449
13449
|
return $(ZS, { fallback: $("div", { style: { border: "1px solid #f00", color: "#f00", padding: "8px" }, children: "An error was thrown." }), onError: t, children: e });
|
|
13450
13450
|
}
|
|
13451
13451
|
const GS = ({ children: e }) => {
|
|
13452
|
-
const t = Dt(
|
|
13452
|
+
const t = Dt(fr), n = A.useMemo(() => [t, R_(null, gd)], [t]);
|
|
13453
13453
|
return /* @__PURE__ */ A.createElement(Xg.Provider, { value: n }, e);
|
|
13454
13454
|
}, YS = () => {
|
|
13455
13455
|
const e = An(), t = en(J9), n = (c) => {
|
|
@@ -13510,7 +13510,7 @@ const A0 = ({ wrappers: e, children: t }) => {
|
|
|
13510
13510
|
return A.useImperativeHandle(
|
|
13511
13511
|
e,
|
|
13512
13512
|
() => ({
|
|
13513
|
-
getMarkdown: () => t.getValue(qs) === "source" ? t.getValue(Gs) : t.getValue(
|
|
13513
|
+
getMarkdown: () => t.getValue(qs) === "source" ? t.getValue(Gs) : t.getValue(Vr),
|
|
13514
13514
|
setMarkdown: (n) => {
|
|
13515
13515
|
t.pub(yd, n);
|
|
13516
13516
|
},
|
|
@@ -13519,7 +13519,7 @@ const A0 = ({ wrappers: e, children: t }) => {
|
|
|
13519
13519
|
},
|
|
13520
13520
|
focus: (n, r) => {
|
|
13521
13521
|
var i;
|
|
13522
|
-
(i = t.getValue(
|
|
13522
|
+
(i = t.getValue(fr)) == null || i.focus(n, r);
|
|
13523
13523
|
}
|
|
13524
13524
|
}),
|
|
13525
13525
|
[t]
|
|
@@ -13608,7 +13608,7 @@ function dh(e, t) {
|
|
|
13608
13608
|
});
|
|
13609
13609
|
}
|
|
13610
13610
|
function d3(e) {
|
|
13611
|
-
const [t] = Vt(), [n, r] =
|
|
13611
|
+
const [t] = Vt(), [n, r] = tr(() => dh(t, e));
|
|
13612
13612
|
return $e(() => {
|
|
13613
13613
|
let i = !0;
|
|
13614
13614
|
const o = t.registerUpdateListener(() => {
|
|
@@ -13756,7 +13756,7 @@ function Yu(e) {
|
|
|
13756
13756
|
z(s) && (u.setFormat(s.getFormatType()), u.setIndent(s.getIndent())), l.append(u);
|
|
13757
13757
|
} else if (ke(s)) {
|
|
13758
13758
|
const u = s.getParentOrThrow();
|
|
13759
|
-
|
|
13759
|
+
Hr(l, u.getChildren()), u.replace(l);
|
|
13760
13760
|
}
|
|
13761
13761
|
return;
|
|
13762
13762
|
}
|
|
@@ -13772,7 +13772,7 @@ function Yu(e) {
|
|
|
13772
13772
|
if (xe(s)) {
|
|
13773
13773
|
if (!r.has(a)) {
|
|
13774
13774
|
const l = bt(e);
|
|
13775
|
-
|
|
13775
|
+
Hr(l, s.getChildren()), s.replace(l), r.add(a);
|
|
13776
13776
|
}
|
|
13777
13777
|
break;
|
|
13778
13778
|
}
|
|
@@ -13790,14 +13790,14 @@ function Yu(e) {
|
|
|
13790
13790
|
}
|
|
13791
13791
|
}
|
|
13792
13792
|
}
|
|
13793
|
-
function
|
|
13793
|
+
function Hr(e, t) {
|
|
13794
13794
|
e.splice(e.getChildrenSize(), 0, t);
|
|
13795
13795
|
}
|
|
13796
13796
|
function ph(e, t) {
|
|
13797
13797
|
if (xe(e)) return e;
|
|
13798
13798
|
const n = e.getPreviousSibling(), r = e.getNextSibling(), i = Ct();
|
|
13799
13799
|
let o;
|
|
13800
|
-
if (
|
|
13800
|
+
if (Hr(i, e.getChildren()), xe(n) && t === n.getListType()) n.append(i), xe(r) && t === r.getListType() && (Hr(n, r.getChildren()), r.remove()), o = n;
|
|
13801
13801
|
else if (xe(r) && t === r.getListType()) r.getFirstChildOrThrow().insertBefore(i), o = r;
|
|
13802
13802
|
else {
|
|
13803
13803
|
const s = bt(t);
|
|
@@ -13828,7 +13828,7 @@ function h3() {
|
|
|
13828
13828
|
const s = O0(i);
|
|
13829
13829
|
for (const a of s) {
|
|
13830
13830
|
const l = Be().setTextStyle(e.style).setTextFormat(e.format);
|
|
13831
|
-
|
|
13831
|
+
Hr(l, a.getChildren()), o.insertAfter(l), o = l, a.__key === e.anchor.key && $r(e.anchor, Jt(Tn(l, "next"))), a.__key === e.focus.key && $r(e.focus, Jt(Tn(l, "next"))), a.remove();
|
|
13832
13832
|
}
|
|
13833
13833
|
i.remove();
|
|
13834
13834
|
}
|
|
@@ -13843,7 +13843,7 @@ function g3(e) {
|
|
|
13843
13843
|
if (xe(o)) {
|
|
13844
13844
|
o.append(e);
|
|
13845
13845
|
const s = r.getFirstChild();
|
|
13846
|
-
xe(s) && (
|
|
13846
|
+
xe(s) && (Hr(o, s.getChildren()), r.remove(), t.add(r.getKey()));
|
|
13847
13847
|
}
|
|
13848
13848
|
} else if (yn(r)) {
|
|
13849
13849
|
const o = r.getFirstChild();
|
|
@@ -13870,7 +13870,7 @@ function m3(e) {
|
|
|
13870
13870
|
const o = t.getListType(), s = Ct(), a = bt(o);
|
|
13871
13871
|
s.append(a), e.getPreviousSiblings().forEach((c) => a.append(c));
|
|
13872
13872
|
const l = Ct(), u = bt(o);
|
|
13873
|
-
l.append(u),
|
|
13873
|
+
l.append(u), Hr(u, e.getNextSiblings()), n.insertBefore(s), n.insertAfter(l), n.replace(e);
|
|
13874
13874
|
}
|
|
13875
13875
|
}
|
|
13876
13876
|
}
|
|
@@ -14335,7 +14335,7 @@ function T3(e, t) {
|
|
|
14335
14335
|
if (d.canIndent()) {
|
|
14336
14336
|
const f = d.getKey();
|
|
14337
14337
|
let p = Ca();
|
|
14338
|
-
if (p.anchor.set(f, 0, "element"), p.focus.set(f, 0, "element"), p =
|
|
14338
|
+
if (p.anchor.set(f, 0, "element"), p.focus.set(f, 0, "element"), p = Lr(p), p.anchor.is(u)) return !0;
|
|
14339
14339
|
}
|
|
14340
14340
|
return !1;
|
|
14341
14341
|
}(r) ? n.shiftKey ? fu : Rs : mm;
|
|
@@ -14346,7 +14346,7 @@ function T3(e, t) {
|
|
|
14346
14346
|
if (!X(n)) return !1;
|
|
14347
14347
|
const r = n.getNodes().map((i) => ku(i).getIndent());
|
|
14348
14348
|
return Math.max(...r) + 1 >= t;
|
|
14349
|
-
},
|
|
14349
|
+
}, rr));
|
|
14350
14350
|
}
|
|
14351
14351
|
function xh({ maxIndent: e }) {
|
|
14352
14352
|
const [t] = Vt();
|
|
@@ -14371,7 +14371,7 @@ function _h() {
|
|
|
14371
14371
|
if (X(n) && n.isCollapsed()) {
|
|
14372
14372
|
const { anchor: r } = n, i = r.type === "element";
|
|
14373
14373
|
if (i || r.offset === 0) {
|
|
14374
|
-
const o = r.getNode(), s =
|
|
14374
|
+
const o = r.getNode(), s = cr(o, (a) => z(a) && !a.isInline());
|
|
14375
14375
|
if (ke(s)) {
|
|
14376
14376
|
const a = s.getParent();
|
|
14377
14377
|
if (xe(a) && a.getListType() === "check" && (i || s.getFirstDescendant() === o)) {
|
|
@@ -14550,7 +14550,7 @@ const F3 = /* @__PURE__ */ new Map([
|
|
|
14550
14550
|
if (!t || !n)
|
|
14551
14551
|
return;
|
|
14552
14552
|
const r = t.anchor.getNode();
|
|
14553
|
-
let i = r.getKey() === "root" ? r :
|
|
14553
|
+
let i = r.getKey() === "root" ? r : cr(r, (a) => {
|
|
14554
14554
|
const l = a.getParent();
|
|
14555
14555
|
return l !== null && Ye(l);
|
|
14556
14556
|
});
|
|
@@ -14570,7 +14570,7 @@ const F3 = /* @__PURE__ */ new Map([
|
|
|
14570
14570
|
}), D3 = Jr({
|
|
14571
14571
|
init(e) {
|
|
14572
14572
|
var t;
|
|
14573
|
-
(t = e.getValue(
|
|
14573
|
+
(t = e.getValue(fr)) == null || t.registerCommand(Rs, () => !V3(7), rr), e.pubIn({
|
|
14574
14574
|
[bd]: "lists",
|
|
14575
14575
|
[Wu]: O3(),
|
|
14576
14576
|
[Uu]: A3(),
|
|
@@ -14639,7 +14639,7 @@ function H0(...e) {
|
|
|
14639
14639
|
function je(...e) {
|
|
14640
14640
|
return I.useCallback(H0(...e), e);
|
|
14641
14641
|
}
|
|
14642
|
-
function
|
|
14642
|
+
function hr(e, t = []) {
|
|
14643
14643
|
let n = [];
|
|
14644
14644
|
function r(o, s) {
|
|
14645
14645
|
const a = I.createContext(s), l = n.length;
|
|
@@ -14716,7 +14716,7 @@ function B3(e) {
|
|
|
14716
14716
|
var B0 = Symbol("radix.slottable");
|
|
14717
14717
|
// @__NO_SIDE_EFFECTS__
|
|
14718
14718
|
function z3(e) {
|
|
14719
|
-
const t = ({ children: n }) => /* @__PURE__ */ $(
|
|
14719
|
+
const t = ({ children: n }) => /* @__PURE__ */ $(er, { children: n });
|
|
14720
14720
|
return t.displayName = `${e}.Slottable`, t.__radixId = B0, t;
|
|
14721
14721
|
}
|
|
14722
14722
|
function U3(e) {
|
|
@@ -14766,7 +14766,7 @@ var J3 = [
|
|
|
14766
14766
|
function j3(e, t) {
|
|
14767
14767
|
e && gi.flushSync(() => e.dispatchEvent(t));
|
|
14768
14768
|
}
|
|
14769
|
-
function
|
|
14769
|
+
function ar(e) {
|
|
14770
14770
|
const t = I.useRef(e);
|
|
14771
14771
|
return I.useEffect(() => {
|
|
14772
14772
|
t.current = e;
|
|
@@ -14776,7 +14776,7 @@ function sr(e) {
|
|
|
14776
14776
|
}, []);
|
|
14777
14777
|
}
|
|
14778
14778
|
function Z3(e, t = globalThis == null ? void 0 : globalThis.document) {
|
|
14779
|
-
const n =
|
|
14779
|
+
const n = ar(e);
|
|
14780
14780
|
I.useEffect(() => {
|
|
14781
14781
|
const r = (i) => {
|
|
14782
14782
|
i.key === "Escape" && n(i);
|
|
@@ -14849,7 +14849,7 @@ var X3 = "DismissableLayerBranch", Q3 = I.forwardRef((e, t) => {
|
|
|
14849
14849
|
});
|
|
14850
14850
|
Q3.displayName = X3;
|
|
14851
14851
|
function ek(e, t = globalThis == null ? void 0 : globalThis.document) {
|
|
14852
|
-
const n =
|
|
14852
|
+
const n = ar(e), r = I.useRef(!1), i = I.useRef(() => {
|
|
14853
14853
|
});
|
|
14854
14854
|
return I.useEffect(() => {
|
|
14855
14855
|
const o = (a) => {
|
|
@@ -14879,7 +14879,7 @@ function ek(e, t = globalThis == null ? void 0 : globalThis.document) {
|
|
|
14879
14879
|
};
|
|
14880
14880
|
}
|
|
14881
14881
|
function tk(e, t = globalThis == null ? void 0 : globalThis.document) {
|
|
14882
|
-
const n =
|
|
14882
|
+
const n = ar(e), r = I.useRef(!1);
|
|
14883
14883
|
return I.useEffect(() => {
|
|
14884
14884
|
const i = (o) => {
|
|
14885
14885
|
o.target && !r.current && U0(Y3, n, { originalEvent: o }, {
|
|
@@ -14920,7 +14920,7 @@ var Ml = "focusScope.autoFocusOnMount", Rl = "focusScope.autoFocusOnUnmount", Nh
|
|
|
14920
14920
|
onMountAutoFocus: i,
|
|
14921
14921
|
onUnmountAutoFocus: o,
|
|
14922
14922
|
...s
|
|
14923
|
-
} = e, [a, l] = I.useState(null), u =
|
|
14923
|
+
} = e, [a, l] = I.useState(null), u = ar(i), c = ar(o), d = I.useRef(null), f = je(t, (v) => l(v)), p = I.useRef({
|
|
14924
14924
|
paused: !1,
|
|
14925
14925
|
pause() {
|
|
14926
14926
|
this.paused = !0;
|
|
@@ -15279,7 +15279,7 @@ function Ck(e) {
|
|
|
15279
15279
|
n(void 0);
|
|
15280
15280
|
}, [e]), t;
|
|
15281
15281
|
}
|
|
15282
|
-
var Sd = "Popper", [Z0, Fi] =
|
|
15282
|
+
var Sd = "Popper", [Z0, Fi] = hr(Sd), [wk, q0] = Z0(Sd), G0 = (e) => {
|
|
15283
15283
|
const { __scopePopper: t, children: n } = e, [r, i] = I.useState(null);
|
|
15284
15284
|
return /* @__PURE__ */ $(wk, { scope: t, anchor: r, onAnchorChange: i, children: n });
|
|
15285
15285
|
};
|
|
@@ -15346,7 +15346,7 @@ var kd = "PopperContent", [Ek, Sk] = Z0(kd), Q0 = I.forwardRef(
|
|
|
15346
15346
|
Ik({ arrowWidth: w, arrowHeight: E }),
|
|
15347
15347
|
f && yk({ strategy: "referenceHidden", ...P })
|
|
15348
15348
|
]
|
|
15349
|
-
}), [pe, k] = nv(q), ee =
|
|
15349
|
+
}), [pe, k] = nv(q), ee = ar(m);
|
|
15350
15350
|
wt(() => {
|
|
15351
15351
|
Q && (ee == null || ee());
|
|
15352
15352
|
}, [Q, ee]);
|
|
@@ -15550,7 +15550,7 @@ function Ok(e) {
|
|
|
15550
15550
|
return n ? e.ref : (t = (i = Object.getOwnPropertyDescriptor(e, "ref")) == null ? void 0 : i.get, n = t && "isReactWarning" in t && t.isReactWarning, n ? e.props.ref : e.props.ref || e.ref);
|
|
15551
15551
|
}
|
|
15552
15552
|
var Lk = I[" useInsertionEffect ".trim().toString()] || wt;
|
|
15553
|
-
function
|
|
15553
|
+
function lr({
|
|
15554
15554
|
prop: e,
|
|
15555
15555
|
defaultProp: t,
|
|
15556
15556
|
onChange: n = () => {
|
|
@@ -15673,7 +15673,7 @@ function $l(e, t) {
|
|
|
15673
15673
|
return typeof e == "function" ? e(t) : e && (e.current = t), e;
|
|
15674
15674
|
}
|
|
15675
15675
|
function zk(e, t) {
|
|
15676
|
-
var n =
|
|
15676
|
+
var n = tr(function() {
|
|
15677
15677
|
return {
|
|
15678
15678
|
// value
|
|
15679
15679
|
value: e,
|
|
@@ -16114,9 +16114,9 @@ var Nd = I.forwardRef(function(e, t) {
|
|
|
16114
16114
|
return I.createElement(Za, Kt({}, e, { ref: t, sideCar: _7 }));
|
|
16115
16115
|
});
|
|
16116
16116
|
Nd.classNames = Za.classNames;
|
|
16117
|
-
var qa = "Popover", [fv, vI] =
|
|
16117
|
+
var qa = "Popover", [fv, vI] = hr(qa, [
|
|
16118
16118
|
Fi
|
|
16119
|
-
]), Bo = Fi(), [b7,
|
|
16119
|
+
]), Bo = Fi(), [b7, gr] = fv(qa), pv = (e) => {
|
|
16120
16120
|
const {
|
|
16121
16121
|
__scopePopover: t,
|
|
16122
16122
|
children: n,
|
|
@@ -16124,7 +16124,7 @@ var qa = "Popover", [fv, vI] = pr(qa, [
|
|
|
16124
16124
|
defaultOpen: i,
|
|
16125
16125
|
onOpenChange: o,
|
|
16126
16126
|
modal: s = !1
|
|
16127
|
-
} = e, a = Bo(t), l = I.useRef(null), [u, c] = I.useState(!1), [d, f] =
|
|
16127
|
+
} = e, a = Bo(t), l = I.useRef(null), [u, c] = I.useState(!1), [d, f] = lr({
|
|
16128
16128
|
prop: r,
|
|
16129
16129
|
defaultProp: i ?? !1,
|
|
16130
16130
|
onChange: o,
|
|
@@ -16150,14 +16150,14 @@ var qa = "Popover", [fv, vI] = pr(qa, [
|
|
|
16150
16150
|
pv.displayName = qa;
|
|
16151
16151
|
var hv = "PopoverAnchor", gv = I.forwardRef(
|
|
16152
16152
|
(e, t) => {
|
|
16153
|
-
const { __scopePopover: n, ...r } = e, i =
|
|
16153
|
+
const { __scopePopover: n, ...r } = e, i = gr(hv, n), o = Bo(n), { onCustomAnchorAdd: s, onCustomAnchorRemove: a } = i;
|
|
16154
16154
|
return I.useEffect(() => (s(), () => a()), [s, a]), /* @__PURE__ */ $(Ja, { ...o, ...r, ref: t });
|
|
16155
16155
|
}
|
|
16156
16156
|
);
|
|
16157
16157
|
gv.displayName = hv;
|
|
16158
16158
|
var mv = "PopoverTrigger", C7 = I.forwardRef(
|
|
16159
16159
|
(e, t) => {
|
|
16160
|
-
const { __scopePopover: n, ...r } = e, i =
|
|
16160
|
+
const { __scopePopover: n, ...r } = e, i = gr(mv, n), o = Bo(n), s = je(t, i.triggerRef), a = /* @__PURE__ */ $(
|
|
16161
16161
|
Ae.button,
|
|
16162
16162
|
{
|
|
16163
16163
|
type: "button",
|
|
@@ -16177,20 +16177,20 @@ C7.displayName = mv;
|
|
|
16177
16177
|
var Pd = "PopoverPortal", [w7, E7] = fv(Pd, {
|
|
16178
16178
|
forceMount: void 0
|
|
16179
16179
|
}), vv = (e) => {
|
|
16180
|
-
const { __scopePopover: t, forceMount: n, children: r, container: i } = e, o =
|
|
16180
|
+
const { __scopePopover: t, forceMount: n, children: r, container: i } = e, o = gr(Pd, t);
|
|
16181
16181
|
return /* @__PURE__ */ $(w7, { scope: t, forceMount: n, children: /* @__PURE__ */ $(Ho, { present: n || o.open, children: /* @__PURE__ */ $(ja, { asChild: !0, container: i, children: r }) }) });
|
|
16182
16182
|
};
|
|
16183
16183
|
vv.displayName = Pd;
|
|
16184
16184
|
var Si = "PopoverContent", yv = I.forwardRef(
|
|
16185
16185
|
(e, t) => {
|
|
16186
|
-
const n = E7(Si, e.__scopePopover), { forceMount: r = n.forceMount, ...i } = e, o =
|
|
16186
|
+
const n = E7(Si, e.__scopePopover), { forceMount: r = n.forceMount, ...i } = e, o = gr(Si, e.__scopePopover);
|
|
16187
16187
|
return /* @__PURE__ */ $(Ho, { present: r || o.open, children: o.modal ? /* @__PURE__ */ $(k7, { ...i, ref: t }) : /* @__PURE__ */ $(T7, { ...i, ref: t }) });
|
|
16188
16188
|
}
|
|
16189
16189
|
);
|
|
16190
16190
|
yv.displayName = Si;
|
|
16191
16191
|
var S7 = /* @__PURE__ */ ko("PopoverContent.RemoveScroll"), k7 = I.forwardRef(
|
|
16192
16192
|
(e, t) => {
|
|
16193
|
-
const n =
|
|
16193
|
+
const n = gr(Si, e.__scopePopover), r = I.useRef(null), i = je(t, r), o = I.useRef(!1);
|
|
16194
16194
|
return I.useEffect(() => {
|
|
16195
16195
|
const s = r.current;
|
|
16196
16196
|
if (s) return iv(s);
|
|
@@ -16223,7 +16223,7 @@ var S7 = /* @__PURE__ */ ko("PopoverContent.RemoveScroll"), k7 = I.forwardRef(
|
|
|
16223
16223
|
}
|
|
16224
16224
|
), T7 = I.forwardRef(
|
|
16225
16225
|
(e, t) => {
|
|
16226
|
-
const n =
|
|
16226
|
+
const n = gr(Si, e.__scopePopover), r = I.useRef(!1), i = I.useRef(!1);
|
|
16227
16227
|
return /* @__PURE__ */ $(
|
|
16228
16228
|
xv,
|
|
16229
16229
|
{
|
|
@@ -16257,7 +16257,7 @@ var S7 = /* @__PURE__ */ ko("PopoverContent.RemoveScroll"), k7 = I.forwardRef(
|
|
|
16257
16257
|
onFocusOutside: u,
|
|
16258
16258
|
onInteractOutside: c,
|
|
16259
16259
|
...d
|
|
16260
|
-
} = e, f =
|
|
16260
|
+
} = e, f = gr(Si, n), p = Bo(n);
|
|
16261
16261
|
return W0(), /* @__PURE__ */ $(
|
|
16262
16262
|
Ed,
|
|
16263
16263
|
{
|
|
@@ -16302,7 +16302,7 @@ var S7 = /* @__PURE__ */ ko("PopoverContent.RemoveScroll"), k7 = I.forwardRef(
|
|
|
16302
16302
|
}
|
|
16303
16303
|
), _v = "PopoverClose", I7 = I.forwardRef(
|
|
16304
16304
|
(e, t) => {
|
|
16305
|
-
const { __scopePopover: n, ...r } = e, i =
|
|
16305
|
+
const { __scopePopover: n, ...r } = e, i = gr(_v, n);
|
|
16306
16306
|
return /* @__PURE__ */ $(
|
|
16307
16307
|
Ae.button,
|
|
16308
16308
|
{
|
|
@@ -16327,7 +16327,7 @@ function Cv(e) {
|
|
|
16327
16327
|
}
|
|
16328
16328
|
var N7 = pv, P7 = gv, O7 = vv, L7 = yv, M7 = bv;
|
|
16329
16329
|
function wv(e) {
|
|
16330
|
-
const t = e + "CollectionProvider", [n, r] =
|
|
16330
|
+
const t = e + "CollectionProvider", [n, r] = hr(t), [i, o] = n(
|
|
16331
16331
|
t,
|
|
16332
16332
|
{ collectionRef: { current: null }, itemMap: /* @__PURE__ */ new Map() }
|
|
16333
16333
|
), s = (v) => {
|
|
@@ -16371,7 +16371,7 @@ function Ga(e) {
|
|
|
16371
16371
|
const t = I.useContext(R7);
|
|
16372
16372
|
return e || t || "ltr";
|
|
16373
16373
|
}
|
|
16374
|
-
var Bl = "rovingFocusGroup.onEntryFocus", F7 = { bubbles: !1, cancelable: !0 }, zo = "RovingFocusGroup", [nc, Ev, D7] = wv(zo), [$7, Ya] =
|
|
16374
|
+
var Bl = "rovingFocusGroup.onEntryFocus", F7 = { bubbles: !1, cancelable: !0 }, zo = "RovingFocusGroup", [nc, Ev, D7] = wv(zo), [$7, Ya] = hr(
|
|
16375
16375
|
zo,
|
|
16376
16376
|
[D7]
|
|
16377
16377
|
), [V7, H7] = $7(zo), Sv = I.forwardRef(
|
|
@@ -16390,12 +16390,12 @@ var B7 = I.forwardRef((e, t) => {
|
|
|
16390
16390
|
onEntryFocus: u,
|
|
16391
16391
|
preventScrollOnEntryFocus: c = !1,
|
|
16392
16392
|
...d
|
|
16393
|
-
} = e, f = I.useRef(null), p = je(t, f), m = Ga(o), [v, _] =
|
|
16393
|
+
} = e, f = I.useRef(null), p = je(t, f), m = Ga(o), [v, _] = lr({
|
|
16394
16394
|
prop: s,
|
|
16395
16395
|
defaultProp: a ?? null,
|
|
16396
16396
|
onChange: l,
|
|
16397
16397
|
caller: zo
|
|
16398
|
-
}), [y, h] = I.useState(!1), g =
|
|
16398
|
+
}), [y, h] = I.useState(!1), g = ar(u), x = Ev(n), b = I.useRef(!1), [C, w] = I.useState(0);
|
|
16399
16399
|
return I.useEffect(() => {
|
|
16400
16400
|
const E = f.current;
|
|
16401
16401
|
if (E)
|
|
@@ -16552,7 +16552,7 @@ function Z7(e) {
|
|
|
16552
16552
|
return j7.includes(e);
|
|
16553
16553
|
}
|
|
16554
16554
|
var q7 = Nv, Pv = "Toggle", Ov = I.forwardRef((e, t) => {
|
|
16555
|
-
const { pressed: n, defaultPressed: r, onPressedChange: i, ...o } = e, [s, a] =
|
|
16555
|
+
const { pressed: n, defaultPressed: r, onPressedChange: i, ...o } = e, [s, a] = lr({
|
|
16556
16556
|
prop: n,
|
|
16557
16557
|
onChange: i,
|
|
16558
16558
|
defaultProp: r ?? !1,
|
|
@@ -16574,7 +16574,7 @@ var q7 = Nv, Pv = "Toggle", Ov = I.forwardRef((e, t) => {
|
|
|
16574
16574
|
);
|
|
16575
16575
|
});
|
|
16576
16576
|
Ov.displayName = Pv;
|
|
16577
|
-
var
|
|
16577
|
+
var mr = "ToggleGroup", [Lv, Mv] = hr(mr, [
|
|
16578
16578
|
Ya
|
|
16579
16579
|
]), Rv = Ya(), Ld = A.forwardRef((e, t) => {
|
|
16580
16580
|
const { type: n, ...r } = e;
|
|
@@ -16582,21 +16582,21 @@ var gr = "ToggleGroup", [Lv, Mv] = pr(gr, [
|
|
|
16582
16582
|
return /* @__PURE__ */ $(G7, { ...r, ref: t });
|
|
16583
16583
|
if (n === "multiple")
|
|
16584
16584
|
return /* @__PURE__ */ $(Y7, { ...r, ref: t });
|
|
16585
|
-
throw new Error(`Missing prop \`type\` expected on \`${
|
|
16585
|
+
throw new Error(`Missing prop \`type\` expected on \`${mr}\``);
|
|
16586
16586
|
});
|
|
16587
|
-
Ld.displayName =
|
|
16588
|
-
var [Fv, Dv] = Lv(
|
|
16587
|
+
Ld.displayName = mr;
|
|
16588
|
+
var [Fv, Dv] = Lv(mr), G7 = A.forwardRef((e, t) => {
|
|
16589
16589
|
const {
|
|
16590
16590
|
value: n,
|
|
16591
16591
|
defaultValue: r,
|
|
16592
16592
|
onValueChange: i = () => {
|
|
16593
16593
|
},
|
|
16594
16594
|
...o
|
|
16595
|
-
} = e, [s, a] =
|
|
16595
|
+
} = e, [s, a] = lr({
|
|
16596
16596
|
prop: n,
|
|
16597
16597
|
defaultProp: r ?? "",
|
|
16598
16598
|
onChange: i,
|
|
16599
|
-
caller:
|
|
16599
|
+
caller: mr
|
|
16600
16600
|
});
|
|
16601
16601
|
return /* @__PURE__ */ $(
|
|
16602
16602
|
Fv,
|
|
@@ -16616,11 +16616,11 @@ var [Fv, Dv] = Lv(gr), G7 = A.forwardRef((e, t) => {
|
|
|
16616
16616
|
onValueChange: i = () => {
|
|
16617
16617
|
},
|
|
16618
16618
|
...o
|
|
16619
|
-
} = e, [s, a] =
|
|
16619
|
+
} = e, [s, a] = lr({
|
|
16620
16620
|
prop: n,
|
|
16621
16621
|
defaultProp: r ?? [],
|
|
16622
16622
|
onChange: i,
|
|
16623
|
-
caller:
|
|
16623
|
+
caller: mr
|
|
16624
16624
|
}), l = A.useCallback(
|
|
16625
16625
|
(c) => a((d = []) => [...d, c]),
|
|
16626
16626
|
[a]
|
|
@@ -16640,8 +16640,8 @@ var [Fv, Dv] = Lv(gr), G7 = A.forwardRef((e, t) => {
|
|
|
16640
16640
|
}
|
|
16641
16641
|
);
|
|
16642
16642
|
});
|
|
16643
|
-
Ld.displayName =
|
|
16644
|
-
var [X7, Q7] = Lv(
|
|
16643
|
+
Ld.displayName = mr;
|
|
16644
|
+
var [X7, Q7] = Lv(mr), $v = A.forwardRef(
|
|
16645
16645
|
(e, t) => {
|
|
16646
16646
|
const {
|
|
16647
16647
|
__scopeToggleGroup: n,
|
|
@@ -16696,7 +16696,7 @@ var Bh = A.forwardRef(
|
|
|
16696
16696
|
}
|
|
16697
16697
|
);
|
|
16698
16698
|
}
|
|
16699
|
-
), eT = Ld, tT = Vv, Md = "Toolbar", [nT, yI] =
|
|
16699
|
+
), eT = Ld, tT = Vv, Md = "Toolbar", [nT, yI] = hr(Md, [
|
|
16700
16700
|
Ya,
|
|
16701
16701
|
Mv
|
|
16702
16702
|
]), Rd = Ya(), Hv = Mv(), [rT, Bv] = nT(Md), zv = I.forwardRef(
|
|
@@ -16815,7 +16815,7 @@ class Un extends fn {
|
|
|
16815
16815
|
return { a: (t) => ({ conversion: pT, priority: 1 }) };
|
|
16816
16816
|
}
|
|
16817
16817
|
static importJSON(t) {
|
|
16818
|
-
return
|
|
16818
|
+
return Br().updateFromJSON(t);
|
|
16819
16819
|
}
|
|
16820
16820
|
updateFromJSON(t) {
|
|
16821
16821
|
return super.updateFromJSON(t).setURL(t.url).setRel(t.rel || null).setTarget(t.target || null).setTitle(t.title || null);
|
|
@@ -16861,7 +16861,7 @@ class Un extends fn {
|
|
|
16861
16861
|
return n.__title = t, n;
|
|
16862
16862
|
}
|
|
16863
16863
|
insertNewAfter(t, n = !0) {
|
|
16864
|
-
const r =
|
|
16864
|
+
const r = Br(this.__url, { rel: this.__rel, target: this.__target, title: this.__title });
|
|
16865
16865
|
return this.insertAfter(r, n), r;
|
|
16866
16866
|
}
|
|
16867
16867
|
canInsertTextBefore() {
|
|
@@ -16892,11 +16892,11 @@ function pT(e) {
|
|
|
16892
16892
|
let t = null;
|
|
16893
16893
|
if (Qm(e)) {
|
|
16894
16894
|
const n = e.textContent;
|
|
16895
|
-
(n !== null && n !== "" || e.children.length > 0) && (t =
|
|
16895
|
+
(n !== null && n !== "" || e.children.length > 0) && (t = Br(e.getAttribute("href") || "", { rel: e.getAttribute("rel"), target: e.getAttribute("target"), title: e.getAttribute("title") }));
|
|
16896
16896
|
}
|
|
16897
16897
|
return { node: t };
|
|
16898
16898
|
}
|
|
16899
|
-
function
|
|
16899
|
+
function Br(e = "", t) {
|
|
16900
16900
|
return Mt(new Un(e, t));
|
|
16901
16901
|
}
|
|
16902
16902
|
function xn(e) {
|
|
@@ -16949,7 +16949,7 @@ class Di extends Un {
|
|
|
16949
16949
|
function rc(e = "", t) {
|
|
16950
16950
|
return Mt(new Di(e, t));
|
|
16951
16951
|
}
|
|
16952
|
-
function
|
|
16952
|
+
function Er(e) {
|
|
16953
16953
|
return e instanceof Di;
|
|
16954
16954
|
}
|
|
16955
16955
|
const ki = jr();
|
|
@@ -16970,7 +16970,7 @@ function zl(e, t = {}) {
|
|
|
16970
16970
|
if (!X(o)) return;
|
|
16971
16971
|
const s = o.extract();
|
|
16972
16972
|
if (e === null) return void s.forEach((u) => {
|
|
16973
|
-
const c =
|
|
16973
|
+
const c = cr(u, (d) => !Er(d) && xn(d));
|
|
16974
16974
|
if (c) {
|
|
16975
16975
|
const d = c.getChildren();
|
|
16976
16976
|
for (let f = 0; f < d.length; f++) c.insertBefore(d[f]);
|
|
@@ -16987,7 +16987,7 @@ function zl(e, t = {}) {
|
|
|
16987
16987
|
(function(u) {
|
|
16988
16988
|
const c = se();
|
|
16989
16989
|
if (!X(c)) return u();
|
|
16990
|
-
const d =
|
|
16990
|
+
const d = Lr(c), f = d.isBackward(), p = zh(d.anchor, f ? -1 : 0), m = zh(d.focus, f ? 0 : -1);
|
|
16991
16991
|
if (u(), p || m) {
|
|
16992
16992
|
const v = se();
|
|
16993
16993
|
if (X(v)) {
|
|
@@ -17000,7 +17000,7 @@ function zl(e, t = {}) {
|
|
|
17000
17000
|
const y = m.getParent();
|
|
17001
17001
|
y && _.focus.set(y.getKey(), m.getIndexWithinParent() + (f ? 0 : 1), "element");
|
|
17002
17002
|
}
|
|
17003
|
-
pt(
|
|
17003
|
+
pt(Lr(_));
|
|
17004
17004
|
}
|
|
17005
17005
|
}
|
|
17006
17006
|
})(() => {
|
|
@@ -17015,7 +17015,7 @@ function zl(e, t = {}) {
|
|
|
17015
17015
|
if (z(c)) {
|
|
17016
17016
|
if (!c.isInline()) continue;
|
|
17017
17017
|
if (xn(c)) {
|
|
17018
|
-
if (!(
|
|
17018
|
+
if (!(Er(c) || u !== null && u.getParentOrThrow().isParentOf(c))) {
|
|
17019
17019
|
l(c), u = c;
|
|
17020
17020
|
continue;
|
|
17021
17021
|
}
|
|
@@ -17025,7 +17025,7 @@ function zl(e, t = {}) {
|
|
|
17025
17025
|
}
|
|
17026
17026
|
}
|
|
17027
17027
|
const f = c.getPreviousSibling();
|
|
17028
|
-
xn(f) && f.is(u) ? f.append(c) : (u =
|
|
17028
|
+
xn(f) && f.is(u) ? f.append(c) : (u = Br(e, { rel: i, target: n, title: r }), c.insertAfter(u), u.append(c));
|
|
17029
17029
|
}
|
|
17030
17030
|
});
|
|
17031
17031
|
}
|
|
@@ -17038,7 +17038,7 @@ const hT = {
|
|
|
17038
17038
|
testNode: "link",
|
|
17039
17039
|
visitNode({ mdastNode: e, actions: t }) {
|
|
17040
17040
|
t.addAndStepInto(
|
|
17041
|
-
|
|
17041
|
+
Br(e.url, {
|
|
17042
17042
|
title: e.title
|
|
17043
17043
|
})
|
|
17044
17044
|
);
|
|
@@ -17176,9 +17176,9 @@ function bT(e, t, n) {
|
|
|
17176
17176
|
};
|
|
17177
17177
|
return Zt(e.registerNodeTransform(In, (i) => {
|
|
17178
17178
|
const o = i.getParentOrThrow(), s = i.getPreviousSibling();
|
|
17179
|
-
if (
|
|
17179
|
+
if (Er(o) && !o.getIsUnlinked()) Ul(o, t, r);
|
|
17180
17180
|
else if (!xn(o)) {
|
|
17181
|
-
if (i.isSimpleText() && (ic(i.getTextContent()) || !
|
|
17181
|
+
if (i.isSimpleText() && (ic(i.getTextContent()) || !Er(s))) {
|
|
17182
17182
|
const a = function(l) {
|
|
17183
17183
|
const u = [l];
|
|
17184
17184
|
let c = l.getNextSibling();
|
|
@@ -17202,14 +17202,14 @@ function bT(e, t, n) {
|
|
|
17202
17202
|
(function(a, l, u) {
|
|
17203
17203
|
const c = a.getPreviousSibling(), d = a.getNextSibling(), f = a.getTextContent();
|
|
17204
17204
|
var p;
|
|
17205
|
-
!
|
|
17205
|
+
!Er(c) || c.getIsUnlinked() || ic(f) && (p = f, !(c.isEmailURI() ? /^\.[a-zA-Z]{2,}/.test(p) : /^\.[a-zA-Z0-9]{1,}/.test(p))) || (c.append(a), Ul(c, l, u), u(null, c.getURL())), !Er(d) || d.getIsUnlinked() || Zv(f) || (Cs(d), Ul(d, l, u), u(null, d.getURL()));
|
|
17206
17206
|
})(i, t, r);
|
|
17207
17207
|
}
|
|
17208
17208
|
}), e.registerCommand(ki, (i) => {
|
|
17209
17209
|
const o = se();
|
|
17210
17210
|
return i !== null || !X(o) || o.extract().forEach((s) => {
|
|
17211
17211
|
const a = s.getParent();
|
|
17212
|
-
if (
|
|
17212
|
+
if (Er(a)) return a.setIsUnlinked(!a.getIsUnlinked()), a.markDirty(), !0;
|
|
17213
17213
|
}), !1;
|
|
17214
17214
|
}, ut));
|
|
17215
17215
|
}, [e, t, n]);
|
|
@@ -17234,9 +17234,9 @@ const wT = /((https?:\/\/(www\.)?)|(www\.))[-a-zA-Z0-9@:%._+~#=]{1,256}\.[a-zA-Z
|
|
|
17234
17234
|
});
|
|
17235
17235
|
}
|
|
17236
17236
|
});
|
|
17237
|
-
var Uo = (e) => e.type === "checkbox",
|
|
17237
|
+
var Uo = (e) => e.type === "checkbox", kr = (e) => e instanceof Date, kt = (e) => e == null;
|
|
17238
17238
|
const Yv = (e) => typeof e == "object";
|
|
17239
|
-
var Xe = (e) => !kt(e) && !Array.isArray(e) && Yv(e) && !
|
|
17239
|
+
var Xe = (e) => !kt(e) && !Array.isArray(e) && Yv(e) && !kr(e), Xv = (e) => Xe(e) && e.target ? Uo(e.target) ? e.target.checked : e.target.value : e, AT = (e) => e.substring(0, e.search(/\.\d+(\.|$)/)) || e, Qv = (e, t) => e.has(AT(t)), NT = (e) => {
|
|
17240
17240
|
const t = e.constructor && e.constructor.prototype;
|
|
17241
17241
|
return Xe(t) && t.hasOwnProperty("isPrototypeOf");
|
|
17242
17242
|
}, $d = typeof window < "u" && typeof window.HTMLElement < "u" && typeof document < "u";
|
|
@@ -17468,7 +17468,7 @@ var FT = (e, t, n, r, i) => t ? {
|
|
|
17468
17468
|
function qn(e, t) {
|
|
17469
17469
|
if (oc(e) || oc(t))
|
|
17470
17470
|
return e === t;
|
|
17471
|
-
if (
|
|
17471
|
+
if (kr(e) && kr(t))
|
|
17472
17472
|
return e.getTime() === t.getTime();
|
|
17473
17473
|
const n = Object.keys(e), r = Object.keys(t);
|
|
17474
17474
|
if (n.length !== r.length)
|
|
@@ -17479,7 +17479,7 @@ function qn(e, t) {
|
|
|
17479
17479
|
return !1;
|
|
17480
17480
|
if (i !== "ref") {
|
|
17481
17481
|
const s = t[i];
|
|
17482
|
-
if (
|
|
17482
|
+
if (kr(o) && kr(s) || Xe(o) && Xe(s) || Array.isArray(o) && Array.isArray(s) ? !qn(o, s) : o !== s)
|
|
17483
17483
|
return !1;
|
|
17484
17484
|
}
|
|
17485
17485
|
}
|
|
@@ -17916,7 +17916,7 @@ function qT(e = {}) {
|
|
|
17916
17916
|
if (!D.hasOwnProperty(ue))
|
|
17917
17917
|
return;
|
|
17918
17918
|
const te = D[ue], re = `${L}.${ue}`, F = fe(r, re);
|
|
17919
|
-
(a.array.has(L) || Xe(te) || F && !F._f) && !
|
|
17919
|
+
(a.array.has(L) || Xe(te) || F && !F._f) && !kr(te) ? B(re, te, J) : V(re, te, J);
|
|
17920
17920
|
}
|
|
17921
17921
|
}, q = (L, D, J = {}) => {
|
|
17922
17922
|
const ue = fe(r, L), te = a.array.has(L), re = gt(D);
|
|
@@ -17936,19 +17936,19 @@ function qT(e = {}) {
|
|
|
17936
17936
|
const D = L.target;
|
|
17937
17937
|
let J = D.name, ue = !0;
|
|
17938
17938
|
const te = fe(r, J), re = (T) => {
|
|
17939
|
-
ue = Number.isNaN(T) ||
|
|
17939
|
+
ue = Number.isNaN(T) || kr(T) && isNaN(T.getTime()) || qn(T, fe(o, J, T));
|
|
17940
17940
|
}, F = Gh(t.mode), U = Gh(t.reValidateMode);
|
|
17941
17941
|
if (te) {
|
|
17942
17942
|
let T, ge;
|
|
17943
17943
|
const _e = D.type ? qh(te._f) : Xv(L), Se = L.type === na.BLUR || L.type === na.FOCUS_OUT, at = !zT(te._f) && !t.resolver && !fe(n.errors, J) && !te._f.deps || KT(Se, fe(n.touchedFields, J), n.isSubmitted, U, F), et = Xh(J, a, Se);
|
|
17944
17944
|
De(o, J, _e), Se ? (te._f.onBlur && te._f.onBlur(L), l && l(0)) : te._f.onChange && te._f.onChange(L);
|
|
17945
|
-
const Pn = b(J, _e, Se),
|
|
17945
|
+
const Pn = b(J, _e, Se), xr = !St(Pn) || et;
|
|
17946
17946
|
if (!Se && f.state.next({
|
|
17947
17947
|
name: J,
|
|
17948
17948
|
type: L.type,
|
|
17949
17949
|
values: gt(o)
|
|
17950
17950
|
}), at)
|
|
17951
|
-
return (c.isValid || d.isValid) && (t.mode === "onBlur" ? Se && v() : Se || v()),
|
|
17951
|
+
return (c.isValid || d.isValid) && (t.mode === "onBlur" ? Se && v() : Se || v()), xr && f.state.next({ name: J, ...et ? {} : Pn });
|
|
17952
17952
|
if (!Se && et && f.state.next({ ...n }), t.resolver) {
|
|
17953
17953
|
const { errors: yt } = await w([J]);
|
|
17954
17954
|
if (re(_e), ue) {
|
|
@@ -19335,17 +19335,17 @@ function ac(e) {
|
|
|
19335
19335
|
function h6(e) {
|
|
19336
19336
|
return Object.prototype.toString.call(e) === "[object Object]";
|
|
19337
19337
|
}
|
|
19338
|
-
function
|
|
19338
|
+
function Tr(e, t, n, r, i) {
|
|
19339
19339
|
if (i === void 0 && (i = !0), n === 0)
|
|
19340
19340
|
return -1;
|
|
19341
19341
|
var o = n - 1;
|
|
19342
19342
|
(typeof t != "number" || t < 0 || t >= n) && (t = e > 0 ? -1 : o + 1);
|
|
19343
19343
|
var s = t + e;
|
|
19344
19344
|
s < 0 ? s = i ? o : 0 : s > o && (s = i ? 0 : o);
|
|
19345
|
-
var a =
|
|
19345
|
+
var a = zr(e, s, n, r, i);
|
|
19346
19346
|
return a === -1 ? t >= n ? -1 : t : a;
|
|
19347
19347
|
}
|
|
19348
|
-
function
|
|
19348
|
+
function zr(e, t, n, r, i) {
|
|
19349
19349
|
var o = r(t);
|
|
19350
19350
|
if (!o || !o.hasAttribute("disabled"))
|
|
19351
19351
|
return t;
|
|
@@ -19357,7 +19357,7 @@ function Br(e, t, n, r, i) {
|
|
|
19357
19357
|
for (var a = t - 1; a >= 0; a--)
|
|
19358
19358
|
if (!r(a).hasAttribute("disabled"))
|
|
19359
19359
|
return a;
|
|
19360
|
-
return i ? e > 0 ?
|
|
19360
|
+
return i ? e > 0 ? zr(1, 0, n, r, !1) : zr(-1, n - 1, n, r, !1) : -1;
|
|
19361
19361
|
}
|
|
19362
19362
|
function la(e, t, n, r) {
|
|
19363
19363
|
return r === void 0 && (r = !0), t.some(function(i) {
|
|
@@ -19489,7 +19489,7 @@ var yy = process.env.NODE_ENV !== "production" ? "__autocomplete_unknown__" : 0,
|
|
|
19489
19489
|
}, function() {
|
|
19490
19490
|
var C = x.getItemCount();
|
|
19491
19491
|
if (C > 0) {
|
|
19492
|
-
var w = x.getState(), E = w.highlightedIndex, S =
|
|
19492
|
+
var w = x.getState(), E = w.highlightedIndex, S = Tr(1, E, C, function(O) {
|
|
19493
19493
|
return x.getItemNodeFromIndex(O);
|
|
19494
19494
|
});
|
|
19495
19495
|
x.setHighlightedIndex(S, {
|
|
@@ -19512,7 +19512,7 @@ var yy = process.env.NODE_ENV !== "production" ? "__autocomplete_unknown__" : 0,
|
|
|
19512
19512
|
}, function() {
|
|
19513
19513
|
var C = x.getItemCount();
|
|
19514
19514
|
if (C > 0) {
|
|
19515
|
-
var w = x.getState(), E = w.highlightedIndex, S =
|
|
19515
|
+
var w = x.getState(), E = w.highlightedIndex, S = Tr(-1, E, C, function(O) {
|
|
19516
19516
|
return x.getItemNodeFromIndex(O);
|
|
19517
19517
|
});
|
|
19518
19518
|
x.setHighlightedIndex(S, {
|
|
@@ -19556,7 +19556,7 @@ var yy = process.env.NODE_ENV !== "production" ? "__autocomplete_unknown__" : 0,
|
|
|
19556
19556
|
g.preventDefault();
|
|
19557
19557
|
var w = this.getItemCount();
|
|
19558
19558
|
if (!(w <= 0 || !C)) {
|
|
19559
|
-
var E =
|
|
19559
|
+
var E = zr(1, 0, w, function(S) {
|
|
19560
19560
|
return x.getItemNodeFromIndex(S);
|
|
19561
19561
|
}, !1);
|
|
19562
19562
|
this.setHighlightedIndex(E, {
|
|
@@ -19571,7 +19571,7 @@ var yy = process.env.NODE_ENV !== "production" ? "__autocomplete_unknown__" : 0,
|
|
|
19571
19571
|
g.preventDefault();
|
|
19572
19572
|
var w = this.getItemCount();
|
|
19573
19573
|
if (!(w <= 0 || !C)) {
|
|
19574
|
-
var E =
|
|
19574
|
+
var E = zr(-1, w - 1, w, function(S) {
|
|
19575
19575
|
return x.getItemNodeFromIndex(S);
|
|
19576
19576
|
}, !1);
|
|
19577
19577
|
this.setHighlightedIndex(E, {
|
|
@@ -19766,7 +19766,7 @@ var yy = process.env.NODE_ENV !== "production" ? "__autocomplete_unknown__" : 0,
|
|
|
19766
19766
|
}, r.moveHighlightedIndex = function(o, s) {
|
|
19767
19767
|
var a = this, l = this.getItemCount(), u = this.getState(), c = u.highlightedIndex;
|
|
19768
19768
|
if (l > 0) {
|
|
19769
|
-
var d =
|
|
19769
|
+
var d = Tr(o, c, l, function(f) {
|
|
19770
19770
|
return a.getItemNodeFromIndex(f);
|
|
19771
19771
|
});
|
|
19772
19772
|
this.setHighlightedIndex(d, s);
|
|
@@ -20344,7 +20344,7 @@ function W6(e, t) {
|
|
|
20344
20344
|
break;
|
|
20345
20345
|
case Zd:
|
|
20346
20346
|
e.isOpen ? s = {
|
|
20347
|
-
highlightedIndex:
|
|
20347
|
+
highlightedIndex: Tr(1, e.highlightedIndex, i.items.length, t.getItemNodeFromIndex, !0)
|
|
20348
20348
|
} : s = {
|
|
20349
20349
|
highlightedIndex: o && e.selectedItem == null ? -1 : ho(i, e, 1, t.getItemNodeFromIndex),
|
|
20350
20350
|
isOpen: i.items.length >= 0
|
|
@@ -20352,7 +20352,7 @@ function W6(e, t) {
|
|
|
20352
20352
|
break;
|
|
20353
20353
|
case qd:
|
|
20354
20354
|
e.isOpen ? o ? s = Eg(i, e.highlightedIndex) : s = {
|
|
20355
|
-
highlightedIndex:
|
|
20355
|
+
highlightedIndex: Tr(-1, e.highlightedIndex, i.items.length, t.getItemNodeFromIndex, !0)
|
|
20356
20356
|
} : s = {
|
|
20357
20357
|
highlightedIndex: ho(i, e, -1, t.getItemNodeFromIndex),
|
|
20358
20358
|
isOpen: i.items.length >= 0
|
|
@@ -20372,22 +20372,22 @@ function W6(e, t) {
|
|
|
20372
20372
|
break;
|
|
20373
20373
|
case Qd:
|
|
20374
20374
|
s = {
|
|
20375
|
-
highlightedIndex:
|
|
20375
|
+
highlightedIndex: Tr(-10, e.highlightedIndex, i.items.length, t.getItemNodeFromIndex, !1)
|
|
20376
20376
|
};
|
|
20377
20377
|
break;
|
|
20378
20378
|
case ef:
|
|
20379
20379
|
s = {
|
|
20380
|
-
highlightedIndex:
|
|
20380
|
+
highlightedIndex: Tr(10, e.highlightedIndex, i.items.length, t.getItemNodeFromIndex, !1)
|
|
20381
20381
|
};
|
|
20382
20382
|
break;
|
|
20383
20383
|
case Yd:
|
|
20384
20384
|
s = {
|
|
20385
|
-
highlightedIndex:
|
|
20385
|
+
highlightedIndex: zr(1, 0, i.items.length, t.getItemNodeFromIndex, !1)
|
|
20386
20386
|
};
|
|
20387
20387
|
break;
|
|
20388
20388
|
case Xd:
|
|
20389
20389
|
s = {
|
|
20390
|
-
highlightedIndex:
|
|
20390
|
+
highlightedIndex: zr(-1, i.items.length - 1, i.items.length, t.getItemNodeFromIndex, !1)
|
|
20391
20391
|
};
|
|
20392
20392
|
break;
|
|
20393
20393
|
case ua:
|
|
@@ -20712,7 +20712,7 @@ const Sg = 20, q6 = (e) => e.suggestions.length > 0 ? /* @__PURE__ */ A.createEl
|
|
|
20712
20712
|
initialInputValue: o,
|
|
20713
20713
|
setValue: s
|
|
20714
20714
|
}) => {
|
|
20715
|
-
const [a, l] = A.useState(t.slice(0, Sg)), u = Dt(
|
|
20715
|
+
const [a, l] = A.useState(t.slice(0, Sg)), u = Dt(pr), c = t.length > 0, { isOpen: d, getToggleButtonProps: f, getMenuProps: p, getInputProps: m, highlightedIndex: v, getItemProps: _, selectedItem: y } = lf({
|
|
20716
20716
|
initialInputValue: o,
|
|
20717
20717
|
onInputValueChange({ inputValue: g = "" }) {
|
|
20718
20718
|
s(r, g), g = g.toLowerCase() || "";
|
|
@@ -20932,10 +20932,10 @@ var Zy = Object.freeze({
|
|
|
20932
20932
|
)
|
|
20933
20933
|
);
|
|
20934
20934
|
qy.displayName = s8;
|
|
20935
|
-
var a8 = qy, l8 = [" ", "Enter", "ArrowUp", "ArrowDown"], u8 = [" ", "Enter"],
|
|
20935
|
+
var a8 = qy, l8 = [" ", "Enter", "ArrowUp", "ArrowDown"], u8 = [" ", "Enter"], Ur = "Select", [tl, nl, c8] = wv(Ur), [$i, xI] = hr(Ur, [
|
|
20936
20936
|
c8,
|
|
20937
20937
|
Fi
|
|
20938
|
-
]), rl = Fi(), [d8,
|
|
20938
|
+
]), rl = Fi(), [d8, vr] = $i(Ur), [f8, p8] = $i(Ur), Gy = (e) => {
|
|
20939
20939
|
const {
|
|
20940
20940
|
__scopeSelect: t,
|
|
20941
20941
|
children: n,
|
|
@@ -20951,16 +20951,16 @@ var a8 = qy, l8 = [" ", "Enter", "ArrowUp", "ArrowDown"], u8 = [" ", "Enter"], z
|
|
|
20951
20951
|
disabled: f,
|
|
20952
20952
|
required: p,
|
|
20953
20953
|
form: m
|
|
20954
|
-
} = e, v = rl(t), [_, y] = I.useState(null), [h, g] = I.useState(null), [x, b] = I.useState(!1), C = Ga(u), [w, E] =
|
|
20954
|
+
} = e, v = rl(t), [_, y] = I.useState(null), [h, g] = I.useState(null), [x, b] = I.useState(!1), C = Ga(u), [w, E] = lr({
|
|
20955
20955
|
prop: r,
|
|
20956
20956
|
defaultProp: i ?? !1,
|
|
20957
20957
|
onChange: o,
|
|
20958
|
-
caller:
|
|
20959
|
-
}), [S, O] =
|
|
20958
|
+
caller: Ur
|
|
20959
|
+
}), [S, O] = lr({
|
|
20960
20960
|
prop: s,
|
|
20961
20961
|
defaultProp: a,
|
|
20962
20962
|
onChange: l,
|
|
20963
|
-
caller:
|
|
20963
|
+
caller: Ur
|
|
20964
20964
|
}), M = I.useRef(null), R = _ ? m || !!_.closest("form") : !0, [P, V] = I.useState(/* @__PURE__ */ new Set()), B = Array.from(P).map((q) => q.props.value).join(";");
|
|
20965
20965
|
return /* @__PURE__ */ $(Td, { ...v, children: /* @__PURE__ */ Qn(
|
|
20966
20966
|
d8,
|
|
@@ -21021,10 +21021,10 @@ var a8 = qy, l8 = [" ", "Enter", "ArrowUp", "ArrowDown"], u8 = [" ", "Enter"], z
|
|
|
21021
21021
|
}
|
|
21022
21022
|
) });
|
|
21023
21023
|
};
|
|
21024
|
-
Gy.displayName =
|
|
21024
|
+
Gy.displayName = Ur;
|
|
21025
21025
|
var Yy = "SelectTrigger", Xy = I.forwardRef(
|
|
21026
21026
|
(e, t) => {
|
|
21027
|
-
const { __scopeSelect: n, disabled: r = !1, ...i } = e, o = rl(n), s =
|
|
21027
|
+
const { __scopeSelect: n, disabled: r = !1, ...i } = e, o = rl(n), s = vr(Yy, n), a = s.disabled || r, l = je(t, s.onTriggerChange), u = nl(n), c = I.useRef("touch"), [d, f, p] = yx((v) => {
|
|
21028
21028
|
const _ = u().filter((g) => !g.disabled), y = _.find((g) => g.value === s.value), h = xx(_, v, y);
|
|
21029
21029
|
h !== void 0 && s.onValueChange(h.value);
|
|
21030
21030
|
}), m = (v) => {
|
|
@@ -21068,7 +21068,7 @@ var Yy = "SelectTrigger", Xy = I.forwardRef(
|
|
|
21068
21068
|
Xy.displayName = Yy;
|
|
21069
21069
|
var Qy = "SelectValue", ex = I.forwardRef(
|
|
21070
21070
|
(e, t) => {
|
|
21071
|
-
const { __scopeSelect: n, className: r, style: i, children: o, placeholder: s = "", ...a } = e, l =
|
|
21071
|
+
const { __scopeSelect: n, className: r, style: i, children: o, placeholder: s = "", ...a } = e, l = vr(Qy, n), { onValueNodeHasChildrenChange: u } = l, c = o !== void 0, d = je(t, l.onValueNodeChange);
|
|
21072
21072
|
return wt(() => {
|
|
21073
21073
|
u(c);
|
|
21074
21074
|
}, [u, c]), /* @__PURE__ */ $(
|
|
@@ -21077,7 +21077,7 @@ var Qy = "SelectValue", ex = I.forwardRef(
|
|
|
21077
21077
|
...a,
|
|
21078
21078
|
ref: d,
|
|
21079
21079
|
style: { pointerEvents: "none" },
|
|
21080
|
-
children: vx(l.value) ? /* @__PURE__ */ $(
|
|
21080
|
+
children: vx(l.value) ? /* @__PURE__ */ $(er, { children: s }) : o
|
|
21081
21081
|
}
|
|
21082
21082
|
);
|
|
21083
21083
|
}
|
|
@@ -21092,9 +21092,9 @@ var h8 = "SelectIcon", tx = I.forwardRef(
|
|
|
21092
21092
|
tx.displayName = h8;
|
|
21093
21093
|
var g8 = "SelectPortal", nx = (e) => /* @__PURE__ */ $(ja, { asChild: !0, ...e });
|
|
21094
21094
|
nx.displayName = g8;
|
|
21095
|
-
var
|
|
21095
|
+
var Wr = "SelectContent", rx = I.forwardRef(
|
|
21096
21096
|
(e, t) => {
|
|
21097
|
-
const n =
|
|
21097
|
+
const n = vr(Wr, e.__scopeSelect), [r, i] = I.useState();
|
|
21098
21098
|
if (wt(() => {
|
|
21099
21099
|
i(new DocumentFragment());
|
|
21100
21100
|
}, []), !n.open) {
|
|
@@ -21107,8 +21107,8 @@ var Ur = "SelectContent", rx = I.forwardRef(
|
|
|
21107
21107
|
return /* @__PURE__ */ $(ox, { ...e, ref: t });
|
|
21108
21108
|
}
|
|
21109
21109
|
);
|
|
21110
|
-
rx.displayName =
|
|
21111
|
-
var Xt = 10, [ix,
|
|
21110
|
+
rx.displayName = Wr;
|
|
21111
|
+
var Xt = 10, [ix, yr] = $i(Wr), m8 = "SelectContentImpl", v8 = /* @__PURE__ */ ko("SelectContent.RemoveScroll"), ox = I.forwardRef(
|
|
21112
21112
|
(e, t) => {
|
|
21113
21113
|
const {
|
|
21114
21114
|
__scopeSelect: n,
|
|
@@ -21130,7 +21130,7 @@ var Xt = 10, [ix, vr] = $i(Ur), m8 = "SelectContentImpl", v8 = /* @__PURE__ */ k
|
|
|
21130
21130
|
avoidCollisions: _,
|
|
21131
21131
|
//
|
|
21132
21132
|
...y
|
|
21133
|
-
} = e, h =
|
|
21133
|
+
} = e, h = vr(Wr, n), [g, x] = I.useState(null), [b, C] = I.useState(null), w = je(t, (H) => x(H)), [E, S] = I.useState(null), [O, M] = I.useState(
|
|
21134
21134
|
null
|
|
21135
21135
|
), R = nl(n), [P, V] = I.useState(!1), B = I.useRef(!1);
|
|
21136
21136
|
I.useEffect(() => {
|
|
@@ -21280,7 +21280,7 @@ var Xt = 10, [ix, vr] = $i(Ur), m8 = "SelectContentImpl", v8 = /* @__PURE__ */ k
|
|
|
21280
21280
|
);
|
|
21281
21281
|
ox.displayName = m8;
|
|
21282
21282
|
var y8 = "SelectItemAlignedPosition", sx = I.forwardRef((e, t) => {
|
|
21283
|
-
const { __scopeSelect: n, onPlaced: r, ...i } = e, o =
|
|
21283
|
+
const { __scopeSelect: n, onPlaced: r, ...i } = e, o = vr(Wr, n), s = yr(Wr, n), [a, l] = I.useState(null), [u, c] = I.useState(null), d = je(t, (w) => c(w)), f = nl(n), p = I.useRef(!1), m = I.useRef(!0), { viewport: v, selectedItem: _, selectedItemText: y, focusSelectedItem: h } = s, g = I.useCallback(() => {
|
|
21284
21284
|
if (o.trigger && o.valueNode && a && u && v && _ && y) {
|
|
21285
21285
|
const w = o.trigger.getBoundingClientRect(), E = u.getBoundingClientRect(), S = o.valueNode.getBoundingClientRect(), O = y.getBoundingClientRect();
|
|
21286
21286
|
if (o.dir !== "rtl") {
|
|
@@ -21413,10 +21413,10 @@ var x8 = "SelectPopperPosition", uc = I.forwardRef((e, t) => {
|
|
|
21413
21413
|
);
|
|
21414
21414
|
});
|
|
21415
21415
|
uc.displayName = x8;
|
|
21416
|
-
var [_8, uf] = $i(
|
|
21416
|
+
var [_8, uf] = $i(Wr, {}), cc = "SelectViewport", ax = I.forwardRef(
|
|
21417
21417
|
(e, t) => {
|
|
21418
|
-
const { __scopeSelect: n, nonce: r, ...i } = e, o =
|
|
21419
|
-
return /* @__PURE__ */ Qn(
|
|
21418
|
+
const { __scopeSelect: n, nonce: r, ...i } = e, o = yr(cc, n), s = uf(cc, n), a = je(t, o.onViewportChange), l = I.useRef(0);
|
|
21419
|
+
return /* @__PURE__ */ Qn(er, { children: [
|
|
21420
21420
|
/* @__PURE__ */ $(
|
|
21421
21421
|
"style",
|
|
21422
21422
|
{
|
|
@@ -21488,7 +21488,7 @@ var ca = "SelectItem", [S8, cx] = $i(ca), dx = I.forwardRef(
|
|
|
21488
21488
|
disabled: i = !1,
|
|
21489
21489
|
textValue: o,
|
|
21490
21490
|
...s
|
|
21491
|
-
} = e, a =
|
|
21491
|
+
} = e, a = vr(ca, n), l = yr(ca, n), u = a.value === r, [c, d] = I.useState(o ?? ""), [f, p] = I.useState(!1), m = je(
|
|
21492
21492
|
t,
|
|
21493
21493
|
(h) => {
|
|
21494
21494
|
var g;
|
|
@@ -21566,7 +21566,7 @@ var ca = "SelectItem", [S8, cx] = $i(ca), dx = I.forwardRef(
|
|
|
21566
21566
|
dx.displayName = ca;
|
|
21567
21567
|
var Gi = "SelectItemText", fx = I.forwardRef(
|
|
21568
21568
|
(e, t) => {
|
|
21569
|
-
const { __scopeSelect: n, className: r, style: i, ...o } = e, s =
|
|
21569
|
+
const { __scopeSelect: n, className: r, style: i, ...o } = e, s = vr(Gi, n), a = yr(Gi, n), l = cx(Gi, n), u = p8(Gi, n), [c, d] = I.useState(null), f = je(
|
|
21570
21570
|
t,
|
|
21571
21571
|
(y) => d(y),
|
|
21572
21572
|
l.onItemTextChange,
|
|
@@ -21578,7 +21578,7 @@ var Gi = "SelectItemText", fx = I.forwardRef(
|
|
|
21578
21578
|
() => /* @__PURE__ */ $("option", { value: l.value, disabled: l.disabled, children: p }, l.value),
|
|
21579
21579
|
[l.disabled, l.value, p]
|
|
21580
21580
|
), { onNativeOptionAdd: v, onNativeOptionRemove: _ } = u;
|
|
21581
|
-
return wt(() => (v(m), () => _(m)), [v, _, m]), /* @__PURE__ */ Qn(
|
|
21581
|
+
return wt(() => (v(m), () => _(m)), [v, _, m]), /* @__PURE__ */ Qn(er, { children: [
|
|
21582
21582
|
/* @__PURE__ */ $(Ae.span, { id: l.textId, ...o, ref: f }),
|
|
21583
21583
|
l.isSelected && s.valueNode && !s.valueNodeHasChildren ? gi.createPortal(o.children, s.valueNode) : null
|
|
21584
21584
|
] });
|
|
@@ -21593,7 +21593,7 @@ var px = "SelectItemIndicator", k8 = I.forwardRef(
|
|
|
21593
21593
|
);
|
|
21594
21594
|
k8.displayName = px;
|
|
21595
21595
|
var dc = "SelectScrollUpButton", T8 = I.forwardRef((e, t) => {
|
|
21596
|
-
const n =
|
|
21596
|
+
const n = yr(dc, e.__scopeSelect), r = uf(dc, e.__scopeSelect), [i, o] = I.useState(!1), s = je(t, r.onScrollButtonChange);
|
|
21597
21597
|
return wt(() => {
|
|
21598
21598
|
if (n.viewport && n.isPositioned) {
|
|
21599
21599
|
let a = function() {
|
|
@@ -21617,7 +21617,7 @@ var dc = "SelectScrollUpButton", T8 = I.forwardRef((e, t) => {
|
|
|
21617
21617
|
});
|
|
21618
21618
|
T8.displayName = dc;
|
|
21619
21619
|
var fc = "SelectScrollDownButton", I8 = I.forwardRef((e, t) => {
|
|
21620
|
-
const n =
|
|
21620
|
+
const n = yr(fc, e.__scopeSelect), r = uf(fc, e.__scopeSelect), [i, o] = I.useState(!1), s = je(t, r.onScrollButtonChange);
|
|
21621
21621
|
return wt(() => {
|
|
21622
21622
|
if (n.viewport && n.isPositioned) {
|
|
21623
21623
|
let a = function() {
|
|
@@ -21641,7 +21641,7 @@ var fc = "SelectScrollDownButton", I8 = I.forwardRef((e, t) => {
|
|
|
21641
21641
|
});
|
|
21642
21642
|
I8.displayName = fc;
|
|
21643
21643
|
var hx = I.forwardRef((e, t) => {
|
|
21644
|
-
const { __scopeSelect: n, onAutoScroll: r, ...i } = e, o =
|
|
21644
|
+
const { __scopeSelect: n, onAutoScroll: r, ...i } = e, o = yr("SelectScrollButton", n), s = I.useRef(null), a = nl(n), l = I.useCallback(() => {
|
|
21645
21645
|
s.current !== null && (window.clearInterval(s.current), s.current = null);
|
|
21646
21646
|
}, []);
|
|
21647
21647
|
return I.useEffect(() => () => l(), [l]), wt(() => {
|
|
@@ -21676,7 +21676,7 @@ var hx = I.forwardRef((e, t) => {
|
|
|
21676
21676
|
gx.displayName = A8;
|
|
21677
21677
|
var pc = "SelectArrow", N8 = I.forwardRef(
|
|
21678
21678
|
(e, t) => {
|
|
21679
|
-
const { __scopeSelect: n, ...r } = e, i = rl(n), o =
|
|
21679
|
+
const { __scopeSelect: n, ...r } = e, i = rl(n), o = vr(pc, n), s = yr(pc, n);
|
|
21680
21680
|
return o.open && s.position === "popper" ? /* @__PURE__ */ $(Ad, { ...i, ...r, ref: t }) : null;
|
|
21681
21681
|
}
|
|
21682
21682
|
);
|
|
@@ -21711,7 +21711,7 @@ function vx(e) {
|
|
|
21711
21711
|
return e === "" || e === void 0;
|
|
21712
21712
|
}
|
|
21713
21713
|
function yx(e) {
|
|
21714
|
-
const t =
|
|
21714
|
+
const t = ar(e), n = I.useRef(""), r = I.useRef(0), i = I.useCallback(
|
|
21715
21715
|
(s) => {
|
|
21716
21716
|
const a = n.current + s;
|
|
21717
21717
|
t(a), function l(u) {
|
|
@@ -21736,7 +21736,7 @@ function xx(e, t, n) {
|
|
|
21736
21736
|
function O8(e, t) {
|
|
21737
21737
|
return e.map((n, r) => e[(t + r) % e.length]);
|
|
21738
21738
|
}
|
|
21739
|
-
var L8 = Gy, M8 = Xy, R8 = ex, F8 = tx, D8 = nx, $8 = rx, V8 = ax, H8 = dx, B8 = fx, z8 = gx, [il, _I] =
|
|
21739
|
+
var L8 = Gy, M8 = Xy, R8 = ex, F8 = tx, D8 = nx, $8 = rx, V8 = ax, H8 = dx, B8 = fx, z8 = gx, [il, _I] = hr("Tooltip", [
|
|
21740
21740
|
Fi
|
|
21741
21741
|
]), ol = Fi(), _x = "TooltipProvider", U8 = 700, hc = "tooltip.open", [W8, cf] = il(_x), bx = (e) => {
|
|
21742
21742
|
const {
|
|
@@ -21783,7 +21783,7 @@ var To = "Tooltip", [K8, Wo] = il(To), Cx = (e) => {
|
|
|
21783
21783
|
onOpenChange: o,
|
|
21784
21784
|
disableHoverableContent: s,
|
|
21785
21785
|
delayDuration: a
|
|
21786
|
-
} = e, l = cf(To, e.__scopeTooltip), u = ol(t), [c, d] = I.useState(null), f = Ri(), p = I.useRef(0), m = s ?? l.disableHoverableContent, v = a ?? l.delayDuration, _ = I.useRef(!1), [y, h] =
|
|
21786
|
+
} = e, l = cf(To, e.__scopeTooltip), u = ol(t), [c, d] = I.useState(null), f = Ri(), p = I.useRef(0), m = s ?? l.disableHoverableContent, v = a ?? l.delayDuration, _ = I.useRef(!1), [y, h] = lr({
|
|
21787
21787
|
prop: r,
|
|
21788
21788
|
defaultProp: i ?? !1,
|
|
21789
21789
|
onChange: (w) => {
|
|
@@ -22053,7 +22053,7 @@ const sl = A.forwardRef(({ title: e, children: t }, n) => {
|
|
|
22053
22053
|
}), o4 = A.forwardRef(
|
|
22054
22054
|
({ children: e, className: t, ...n }, r) => /* @__PURE__ */ A.createElement(H8, { ...n, ref: r, className: ft(t, be.selectItem) }, /* @__PURE__ */ A.createElement(B8, null, e))
|
|
22055
22055
|
), s4 = ({ title: e, placeholder: t, className: n }) => {
|
|
22056
|
-
const [r, i] = Kr(
|
|
22056
|
+
const [r, i] = Kr(sr, pr);
|
|
22057
22057
|
return /* @__PURE__ */ A.createElement(sl, { title: e }, /* @__PURE__ */ A.createElement(
|
|
22058
22058
|
M8,
|
|
22059
22059
|
{
|
|
@@ -22178,7 +22178,7 @@ const d4 = () => {
|
|
|
22178
22178
|
const [e, t, n, r, i, o] = Kr(
|
|
22179
22179
|
Va,
|
|
22180
22180
|
dt,
|
|
22181
|
-
|
|
22181
|
+
pr,
|
|
22182
22182
|
Et,
|
|
22183
22183
|
Hx,
|
|
22184
22184
|
Bx
|
|
@@ -22299,7 +22299,7 @@ const Rx = Nt(), Et = ve({ type: "inactive" }, (e) => {
|
|
|
22299
22299
|
}), e.pub(js, (t) => t.registerCommand(
|
|
22300
22300
|
Cm,
|
|
22301
22301
|
(n) => {
|
|
22302
|
-
if (n.key === "k" && (Ys ? n.metaKey : n.ctrlKey) && !e.getValue(
|
|
22302
|
+
if (n.key === "k" && (Ys ? n.metaKey : n.ctrlKey) && !e.getValue(sr)) {
|
|
22303
22303
|
const r = se();
|
|
22304
22304
|
return X(r) ? (e.pub(ff), n.stopPropagation(), n.preventDefault(), !0) : !1;
|
|
22305
22305
|
}
|
|
@@ -22336,7 +22336,7 @@ const Rx = Nt(), Et = ve({ type: "inactive" }, (e) => {
|
|
|
22336
22336
|
if (c)
|
|
22337
22337
|
c.setURL(a), c.setTitle(l);
|
|
22338
22338
|
else {
|
|
22339
|
-
const d =
|
|
22339
|
+
const d = Br(a, { title: l });
|
|
22340
22340
|
d.append(ze(u)), wa([d]), d.select();
|
|
22341
22341
|
}
|
|
22342
22342
|
},
|
|
@@ -22376,7 +22376,7 @@ const Rx = Nt(), Et = ve({ type: "inactive" }, (e) => {
|
|
|
22376
22376
|
), e.link(
|
|
22377
22377
|
e.pipe(
|
|
22378
22378
|
e.combine(Ei, Rx),
|
|
22379
|
-
st(dt, Et,
|
|
22379
|
+
st(dt, Et, sr),
|
|
22380
22380
|
Xi(([[t], n, r, i]) => {
|
|
22381
22381
|
if (X(t) && n && !i) {
|
|
22382
22382
|
const o = mc(t);
|
|
@@ -22440,11 +22440,11 @@ const $x = Ao(), Vx = Ao((e) => {
|
|
|
22440
22440
|
}), Hx = ve([]), Bx = ve(null), zx = ve(null, (e) => {
|
|
22441
22441
|
e.pub(js, (t) => {
|
|
22442
22442
|
function n(r) {
|
|
22443
|
-
const [i, o] = e.getValues([
|
|
22443
|
+
const [i, o] = e.getValues([sr, zx]);
|
|
22444
22444
|
!i || o === null || t.update(() => {
|
|
22445
22445
|
const s = kn(r.target);
|
|
22446
22446
|
if (s !== null) {
|
|
22447
|
-
const a =
|
|
22447
|
+
const a = cr(s, (l) => l instanceof Un);
|
|
22448
22448
|
a !== null && o(r, a, a.getURL());
|
|
22449
22449
|
}
|
|
22450
22450
|
});
|
|
@@ -22536,7 +22536,7 @@ const Wx = A.forwardRef(({ on: e, title: t, children: n, disabled: r, ...i }, o)
|
|
|
22536
22536
|
[Ql]: (t == null ? void 0 : t.toolbarContents) ?? Tg,
|
|
22537
22537
|
[eu]: (t == null ? void 0 : t.toolbarClassName) ?? "",
|
|
22538
22538
|
[n]: () => {
|
|
22539
|
-
const [r, i, o] = Kr(Ql,
|
|
22539
|
+
const [r, i, o] = Kr(Ql, sr, eu);
|
|
22540
22540
|
return /* @__PURE__ */ A.createElement(h4, { className: o, readOnly: i }, r());
|
|
22541
22541
|
}
|
|
22542
22542
|
});
|
|
@@ -25550,7 +25550,7 @@ const F4 = /^(\s*)(\d{1,})\.\s/, D4 = /^(\s*)[-*+]\s/, $4 = /^(\s*)(?:-\s)?\s?(\
|
|
|
25550
25550
|
const r = e.getTitle(), i = t(e);
|
|
25551
25551
|
return r ? `[${i}](${e.getURL()} "${r}")` : `[${i}](${e.getURL()})`;
|
|
25552
25552
|
}, importRegExp: /(?:\[([^[]+)\])(?:\((?:([^()\s]+)(?:\s"((?:[^"]*\\")*[^"]*)"\s*)?)\))/, regExp: /(?:\[([^[]+)\])(?:\((?:([^()\s]+)(?:\s"((?:[^"]*\\")*[^"]*)"\s*)?)\))$/, replace: (e, t) => {
|
|
25553
|
-
const [, n, r, i] = t, o =
|
|
25553
|
+
const [, n, r, i] = t, o = Br(r, { title: i }), s = ze(n);
|
|
25554
25554
|
return s.setFormat(e.getFormat()), o.append(s), e.replace(o), s;
|
|
25555
25555
|
}, trigger: ")", type: "text-match" }, j4 = [U4, Xx, e_, t_], Z4 = [Qx], q4 = [n_, r_, i_, o_, s_, K4, a_, l_, J4], G4 = [u_], c_ = [...j4, ...Z4, ...q4, ...G4], Y4 = [{ dependencies: [Ua], export: (e) => Cd(e) ? "***" : null, regExp: /^(---|\*\*\*|___)\s?$/, replace: (e, t, n, r) => {
|
|
25556
25556
|
const i = Wa();
|
|
@@ -25668,7 +25668,7 @@ const nI = () => {
|
|
|
25668
25668
|
}
|
|
25669
25669
|
);
|
|
25670
25670
|
}, hi = ({ format: e, addTitle: t, removeTitle: n, icon: r, formatName: i }) => {
|
|
25671
|
-
const [o, s] = Kr(n0,
|
|
25671
|
+
const [o, s] = Kr(n0, pr), a = en(r0), l = (o & e) !== 0;
|
|
25672
25672
|
return /* @__PURE__ */ A.createElement(
|
|
25673
25673
|
Wx,
|
|
25674
25674
|
{
|
|
@@ -25741,7 +25741,7 @@ const nI = () => {
|
|
|
25741
25741
|
}
|
|
25742
25742
|
) : null);
|
|
25743
25743
|
}, oI = () => {
|
|
25744
|
-
const e = en(ff), t = Dt(
|
|
25744
|
+
const e = en(ff), t = Dt(pr), n = An();
|
|
25745
25745
|
return /* @__PURE__ */ A.createElement(
|
|
25746
25746
|
m4,
|
|
25747
25747
|
{
|
|
@@ -25758,7 +25758,7 @@ const nI = () => {
|
|
|
25758
25758
|
number: "format_list_numbered",
|
|
25759
25759
|
check: "format_list_checked"
|
|
25760
25760
|
}, aI = ({ options: e = ["bullet", "number", "check"] }) => {
|
|
25761
|
-
const [t, n] = Kr(Qu,
|
|
25761
|
+
const [t, n] = Kr(Qu, pr), r = en(V0), i = An(), o = {
|
|
25762
25762
|
bullet: i("toolbar.bulletedList", "Bulleted list"),
|
|
25763
25763
|
number: i("toolbar.numberedList", "Numbered list"),
|
|
25764
25764
|
check: i("toolbar.checkList", "Check list")
|
|
@@ -25769,19 +25769,19 @@ const nI = () => {
|
|
|
25769
25769
|
}));
|
|
25770
25770
|
return /* @__PURE__ */ A.createElement(y4, { value: t || "", items: s, onChange: r });
|
|
25771
25771
|
}, lI = () => {
|
|
25772
|
-
const [e, t] = Kr(
|
|
25772
|
+
const [e, t] = Kr(pr, dt), [n, r] = A.useState(!1), [i, o] = A.useState(!1), s = An();
|
|
25773
25773
|
return A.useEffect(() => {
|
|
25774
25774
|
if (t)
|
|
25775
25775
|
return Zt(
|
|
25776
25776
|
t.registerCommand(
|
|
25777
25777
|
Zi,
|
|
25778
25778
|
(a) => (r(a), !1),
|
|
25779
|
-
|
|
25779
|
+
rr
|
|
25780
25780
|
),
|
|
25781
25781
|
t.registerCommand(
|
|
25782
25782
|
ji,
|
|
25783
25783
|
(a) => (o(a), !1),
|
|
25784
|
-
|
|
25784
|
+
rr
|
|
25785
25785
|
)
|
|
25786
25786
|
);
|
|
25787
25787
|
}, [t]), /* @__PURE__ */ A.createElement(
|
|
@@ -25810,7 +25810,7 @@ const nI = () => {
|
|
|
25810
25810
|
onChangeValue: t = p_
|
|
25811
25811
|
}) => {
|
|
25812
25812
|
const n = lt(null);
|
|
25813
|
-
return /* @__PURE__ */ $(
|
|
25813
|
+
return document ? /* @__PURE__ */ $(
|
|
25814
25814
|
r3,
|
|
25815
25815
|
{
|
|
25816
25816
|
className: "component-markdown-editor",
|
|
@@ -25827,7 +25827,7 @@ const nI = () => {
|
|
|
25827
25827
|
x4({
|
|
25828
25828
|
toolbarClassName: "component-markdown-editor__toolbar",
|
|
25829
25829
|
toolbarPosition: "top",
|
|
25830
|
-
toolbarContents: () => /* @__PURE__ */ Qn(
|
|
25830
|
+
toolbarContents: () => /* @__PURE__ */ Qn(er, { children: [
|
|
25831
25831
|
/* @__PURE__ */ $(lI, {}),
|
|
25832
25832
|
/* @__PURE__ */ $(nI, {}),
|
|
25833
25833
|
/* @__PURE__ */ $(rI, { options: ["Bold", "Italic"] }),
|
|
@@ -25838,7 +25838,7 @@ const nI = () => {
|
|
|
25838
25838
|
})
|
|
25839
25839
|
]
|
|
25840
25840
|
}
|
|
25841
|
-
);
|
|
25841
|
+
) : /* @__PURE__ */ $(er, { children: "Loading..." });
|
|
25842
25842
|
};
|
|
25843
25843
|
export {
|
|
25844
25844
|
bI as MarkdownEditor
|