@yext/pages-components 1.1.3 → 1.1.5
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/{debugger-DdHFLhFn.cjs → debugger-C8RcTf7G.cjs} +1 -1
- package/dist/{debugger-DAn0J9y5.js → debugger-rlNxnZtt.js} +1 -1
- package/dist/{index-BRrPJ5d0.js → index-BqwUybQE.js} +1 -1
- package/dist/{index-DRkcUfXU.js → index-BsTia22i.js} +90 -84
- package/dist/{index-D2-_zwfp.cjs → index-BsYy4LPR.cjs} +2 -2
- package/dist/{index-DlwXwY2z.cjs → index-DmzJWbSH.cjs} +1 -1
- package/dist/pages-components.cjs +1 -1
- package/dist/pages-components.js +1 -1
- package/package.json +1 -1
|
@@ -2,7 +2,7 @@ var U_ = Object.defineProperty;
|
|
|
2
2
|
var G_ = (e, t, n) => t in e ? U_(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n;
|
|
3
3
|
var Ie = (e, t, n) => G_(e, typeof t != "symbol" ? t + "" : t, n);
|
|
4
4
|
import * as Y_ from "react";
|
|
5
|
-
import xn, { createElement as V_, createContext as Nc, useRef as od, useState as Nr, useEffect as
|
|
5
|
+
import xn, { createElement as V_, createContext as Nc, useRef as od, useState as Nr, useEffect as tr, Suspense as j_, lazy as q_, useContext as co, forwardRef as Z_, Fragment as J_, useMemo as tp } from "react";
|
|
6
6
|
import np, { createPortal as X_ } from "react-dom";
|
|
7
7
|
var of = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {};
|
|
8
8
|
function rp(e) {
|
|
@@ -1547,7 +1547,7 @@ const Wy = (e) => {
|
|
|
1547
1547
|
default:
|
|
1548
1548
|
return "";
|
|
1549
1549
|
}
|
|
1550
|
-
}, lp = Nc(null), Ky = q_(() => import("./debugger-
|
|
1550
|
+
}, lp = Nc(null), Ky = q_(() => import("./debugger-rlNxnZtt.js"));
|
|
1551
1551
|
function GS(e) {
|
|
1552
1552
|
const {
|
|
1553
1553
|
children: t,
|
|
@@ -1562,7 +1562,7 @@ function GS(e) {
|
|
|
1562
1562
|
if (!n)
|
|
1563
1563
|
throw new Error("API Key is required for AnalyticsProvider");
|
|
1564
1564
|
const T = od(null), [E, S] = Nr(!1);
|
|
1565
|
-
|
|
1565
|
+
tr(() => {
|
|
1566
1566
|
S(!0);
|
|
1567
1567
|
}, []), T.current === null && (T.current = new zy(
|
|
1568
1568
|
n,
|
|
@@ -1574,7 +1574,11 @@ function GS(e) {
|
|
|
1574
1574
|
p ?? Uu()
|
|
1575
1575
|
));
|
|
1576
1576
|
const w = T.current;
|
|
1577
|
-
return
|
|
1577
|
+
return tr(() => (window.enableYextAnalytics = () => {
|
|
1578
|
+
w.optIn();
|
|
1579
|
+
}, () => {
|
|
1580
|
+
delete window.enableYextAnalytics;
|
|
1581
|
+
}), [w]), /* @__PURE__ */ ft.jsxs(ft.Fragment, { children: [
|
|
1578
1582
|
/* @__PURE__ */ ft.jsx(lp.Provider, { value: w, children: t }),
|
|
1579
1583
|
E && (p || Uu()) && sa().name === "browser" ? /* @__PURE__ */ ft.jsx(j_, { fallback: /* @__PURE__ */ ft.jsx(ft.Fragment, {}), children: /* @__PURE__ */ ft.jsx(Ky, {}) }) : null
|
|
1580
1584
|
] });
|
|
@@ -1623,7 +1627,9 @@ class zy {
|
|
|
1623
1627
|
siteUid: this.templateData.document.siteId,
|
|
1624
1628
|
template: this.templateData.document.__.name
|
|
1625
1629
|
},
|
|
1626
|
-
entity: this.templateData.document.uid || void 0
|
|
1630
|
+
entity: this.templateData.document.uid || void 0,
|
|
1631
|
+
pageUrl: document.URL,
|
|
1632
|
+
referrerUrl: document.referrer !== "" ? document.referrer : void 0
|
|
1627
1633
|
};
|
|
1628
1634
|
this._analyticsEventService = Hy(n).with(r);
|
|
1629
1635
|
}
|
|
@@ -1691,7 +1697,7 @@ function YS(e) {
|
|
|
1691
1697
|
const t = ap(), [n] = Nr({
|
|
1692
1698
|
name: op(t, e.name)
|
|
1693
1699
|
}), r = (f = ca()) == null ? void 0 : f.getDebugEnabled(), [l, d] = Nr(!1);
|
|
1694
|
-
return
|
|
1700
|
+
return tr(() => {
|
|
1695
1701
|
d(!0);
|
|
1696
1702
|
}, []), r && l ? /* @__PURE__ */ ft.jsx("section", { "data-ya-scope": n.name, children: /* @__PURE__ */ ft.jsx(Gu.Provider, { value: n, children: e.children }) }) : /* @__PURE__ */ ft.jsx(Gu.Provider, { value: n, children: e.children });
|
|
1697
1703
|
}
|
|
@@ -1947,7 +1953,7 @@ const VS = () => {
|
|
|
1947
1953
|
loading: T = "lazy"
|
|
1948
1954
|
}) => {
|
|
1949
1955
|
const E = od(null), [S, w] = Nr(!1), M = "image" in e ? e.image : e;
|
|
1950
|
-
|
|
1956
|
+
tr(() => {
|
|
1951
1957
|
var ce;
|
|
1952
1958
|
(ce = E.current) != null && ce.complete && w(!0);
|
|
1953
1959
|
}, []), jy(
|
|
@@ -3621,19 +3627,19 @@ const xN = ({
|
|
|
3621
3627
|
const v = od(null), [k, G] = Nr(new fn(f)), [I, P] = Nr(!1), [H, V] = Nr(), [re, te] = Nr(p), ce = (j, z) => {
|
|
3622
3628
|
E(j, z), z && G(z.getCenter());
|
|
3623
3629
|
};
|
|
3624
|
-
return
|
|
3630
|
+
return tr(() => {
|
|
3625
3631
|
!I || !H || te(H.getZoom());
|
|
3626
|
-
}, [k]),
|
|
3632
|
+
}, [k]), tr(() => {
|
|
3627
3633
|
if (!t || !I || !H)
|
|
3628
3634
|
return;
|
|
3629
3635
|
const j = t.map((z) => new fn(z));
|
|
3630
3636
|
H.fitCoordinates(j);
|
|
3631
|
-
}, [JSON.stringify(t), H]),
|
|
3637
|
+
}, [JSON.stringify(t), H]), tr(() => {
|
|
3632
3638
|
if (!I || H)
|
|
3633
3639
|
return;
|
|
3634
3640
|
const j = new gp().withControlEnabled(d).withDefaultCenter(k).withDefaultZoom(re).withPadding(T).withPanHandler(ce).withPanStartHandler(S).withProvider(w).withProviderOptions(M).withSinglePinZoom(m).withWrapper(v.current).build();
|
|
3635
3641
|
V(j), _ && (_.current = j);
|
|
3636
|
-
}, [I]),
|
|
3642
|
+
}, [I]), tr(() => {
|
|
3637
3643
|
I || H || !v.current || w.load(e, {
|
|
3638
3644
|
...M,
|
|
3639
3645
|
...l && { client: l }
|
|
@@ -3701,9 +3707,9 @@ const ew = ({
|
|
|
3701
3707
|
ClusterTemplate: n = vN
|
|
3702
3708
|
}) => {
|
|
3703
3709
|
const { map: r } = co(Cc), [l, d] = Nr([]), [f, p] = Nr(), [_, T] = Nr([]), [E, S] = Nr([]);
|
|
3704
|
-
return
|
|
3710
|
+
return tr(() => {
|
|
3705
3711
|
p(SN(l, r.getZoom(), e));
|
|
3706
|
-
}, [l, r.getZoom()]),
|
|
3712
|
+
}, [l, r.getZoom()]), tr(() => {
|
|
3707
3713
|
S(() => []), T(() => []), (f == null ? void 0 : f.length) !== 0 && (f == null || f.forEach((w) => {
|
|
3708
3714
|
if (w.length === 1) {
|
|
3709
3715
|
w[0].pin.setMap(r);
|
|
@@ -3807,12 +3813,12 @@ const ew = ({
|
|
|
3807
3813
|
hasPinUrl: T = !1
|
|
3808
3814
|
}) => {
|
|
3809
3815
|
const { map: E, provider: S } = co(Cc), w = co(ud), M = tp(() => new cd().withCoordinate(t).withHideOffscreen(n).withProvider(S).withHasPinUrl(T).build(), []);
|
|
3810
|
-
|
|
3816
|
+
tr(() => {
|
|
3811
3817
|
if (_ !== 0 && !_)
|
|
3812
3818
|
return;
|
|
3813
3819
|
const v = M.getProviderPin().getWrapperElement();
|
|
3814
3820
|
v && (v.style.zIndex = _.toString());
|
|
3815
|
-
}, [_]),
|
|
3821
|
+
}, [_]), tr(() => {
|
|
3816
3822
|
M.setMap(E), M.setClickHandler(() => d(r)), M.setFocusHandler((k) => f(k, r)), M.setHoverHandler((k) => p(k, r));
|
|
3817
3823
|
const v = w == null ? void 0 : w.clusterIds.includes(r);
|
|
3818
3824
|
return w && !v && w.setPinStore((k) => [
|
|
@@ -4027,8 +4033,8 @@ function AN() {
|
|
|
4027
4033
|
const Ht = Mt[jt], Ot = mo(Ht), ln = Ht.parentNode;
|
|
4028
4034
|
if (ln != null && Ht !== ae && Ot === null && (Ht.nodeName !== "BR" || !rn(Ht, ln, u))) {
|
|
4029
4035
|
if (De) {
|
|
4030
|
-
const
|
|
4031
|
-
|
|
4036
|
+
const sr = Ht.innerText || Ht.nodeValue;
|
|
4037
|
+
sr && (me += sr);
|
|
4032
4038
|
}
|
|
4033
4039
|
ln.removeChild(Ht);
|
|
4034
4040
|
}
|
|
@@ -4311,7 +4317,7 @@ function AN() {
|
|
|
4311
4317
|
return u._pendingDecorators = c, c;
|
|
4312
4318
|
}
|
|
4313
4319
|
function _o(u) {
|
|
4314
|
-
return u.read(() =>
|
|
4320
|
+
return u.read(() => nr().getTextContent());
|
|
4315
4321
|
}
|
|
4316
4322
|
function Ii(u, s) {
|
|
4317
4323
|
Gr(u, () => {
|
|
@@ -4319,7 +4325,7 @@ function AN() {
|
|
|
4319
4325
|
if (c.isEmpty())
|
|
4320
4326
|
return;
|
|
4321
4327
|
if (s === "root") {
|
|
4322
|
-
|
|
4328
|
+
nr().markDirty();
|
|
4323
4329
|
return;
|
|
4324
4330
|
}
|
|
4325
4331
|
const h = c._nodeMap;
|
|
@@ -4329,7 +4335,7 @@ function AN() {
|
|
|
4329
4335
|
tag: "history-merge"
|
|
4330
4336
|
} : void 0);
|
|
4331
4337
|
}
|
|
4332
|
-
function
|
|
4338
|
+
function nr() {
|
|
4333
4339
|
return gl(Si());
|
|
4334
4340
|
}
|
|
4335
4341
|
function gl(u) {
|
|
@@ -4566,7 +4572,7 @@ function AN() {
|
|
|
4566
4572
|
return u === 65 && Jr(s, c);
|
|
4567
4573
|
}
|
|
4568
4574
|
function xl() {
|
|
4569
|
-
const u =
|
|
4575
|
+
const u = nr(), s = u.select(0, u.getChildrenSize());
|
|
4570
4576
|
Tr(Ds(s));
|
|
4571
4577
|
}
|
|
4572
4578
|
function Bi(u, s) {
|
|
@@ -4807,7 +4813,7 @@ function AN() {
|
|
|
4807
4813
|
}
|
|
4808
4814
|
function So(u, s) {
|
|
4809
4815
|
let c = u;
|
|
4810
|
-
for (; c !==
|
|
4816
|
+
for (; c !== nr() && c != null; ) {
|
|
4811
4817
|
if (s(c))
|
|
4812
4818
|
return c;
|
|
4813
4819
|
c = c.getParent();
|
|
@@ -5134,7 +5140,7 @@ function AN() {
|
|
|
5134
5140
|
throw Error(`Reconciliation: could not find DOM element for node key ${u}`);
|
|
5135
5141
|
return s;
|
|
5136
5142
|
}
|
|
5137
|
-
const ur = Object.freeze({}),
|
|
5143
|
+
const ur = Object.freeze({}), rr = 30, Ll = [["keydown", ge], ["pointerdown", $l], ["compositionstart", x], ["compositionend", Q], ["input", C], ["click", Ba], ["cut", ur], ["copy", ur], ["dragstart", ur], ["dragover", ur], ["dragend", ur], ["paste", ur], ["focus", ur], ["blur", ur], ["drop", ur]];
|
|
5138
5144
|
ee && Ll.push(["beforeinput", (u, s) => g(u, s)]);
|
|
5139
5145
|
let Vi = 0, Il = 0, Ys = 0, Kr = null, Vs = 0, zr = !1, Mo = !1, js = !1, qs = !1, Ro = [0, "", 0, "root", 0];
|
|
5140
5146
|
function ji(u, s, c, h, y) {
|
|
@@ -5178,7 +5184,7 @@ function AN() {
|
|
|
5178
5184
|
const ae = $.anchor, he = ae.getNode();
|
|
5179
5185
|
if ($.isCollapsed()) {
|
|
5180
5186
|
u.type === "Range" && u.anchorNode === u.focusNode && ($.dirty = !0);
|
|
5181
|
-
const me = To(s).event, xe = me ? me.timeStamp : performance.now(), [we, Ce, je, Ue, $e] = Ro, Mt =
|
|
5187
|
+
const me = To(s).event, xe = me ? me.timeStamp : performance.now(), [we, Ce, je, Ue, $e] = Ro, Mt = nr(), Qe = s.isComposing() === !1 && Mt.getTextContent() === "";
|
|
5182
5188
|
if (xe < $e + 200 && ae.offset === je && ae.key === Ue)
|
|
5183
5189
|
$.format = we, $.style = Ce;
|
|
5184
5190
|
else if (ae.type === "text") {
|
|
@@ -5206,7 +5212,7 @@ function AN() {
|
|
|
5206
5212
|
if (h) {
|
|
5207
5213
|
if (Et(c)) {
|
|
5208
5214
|
const N = c.anchor, b = N.getNode();
|
|
5209
|
-
if (N.type === "element" && N.offset === 0 && c.isCollapsed() && !Yr(b) &&
|
|
5215
|
+
if (N.type === "element" && N.offset === 0 && c.isCollapsed() && !Yr(b) && nr().getChildrenSize() === 1 && b.getTopLevelElementOrThrow().isEmpty() && y !== null && c.is(y))
|
|
5210
5216
|
h.removeAllRanges(), c.dirty = !0;
|
|
5211
5217
|
else if (u.detail === 3 && !c.isCollapsed()) {
|
|
5212
5218
|
const ae = c.focus.getNode();
|
|
@@ -5242,7 +5248,7 @@ function AN() {
|
|
|
5242
5248
|
return u !== s || et(u) || et(s) || !u.isToken() || !s.isToken();
|
|
5243
5249
|
}
|
|
5244
5250
|
function a(u) {
|
|
5245
|
-
return Il === 229 && u < Vi +
|
|
5251
|
+
return Il === 229 && u < Vi + rr;
|
|
5246
5252
|
}
|
|
5247
5253
|
function g(u, s) {
|
|
5248
5254
|
const c = u.inputType, h = o(u);
|
|
@@ -5266,7 +5272,7 @@ function AN() {
|
|
|
5266
5272
|
Gr(s, () => {
|
|
5267
5273
|
vn(null);
|
|
5268
5274
|
});
|
|
5269
|
-
},
|
|
5275
|
+
}, rr), Et(y)) {
|
|
5270
5276
|
const xe = y.anchor.getNode();
|
|
5271
5277
|
if (xe.markDirty(), y.format = xe.getFormat(), !mt(xe))
|
|
5272
5278
|
throw Error("Anchor node must be a TextNode");
|
|
@@ -5404,7 +5410,7 @@ function AN() {
|
|
|
5404
5410
|
vn(h.key), // If it has been 30ms since the last keydown, then we should
|
|
5405
5411
|
// apply the empty space heuristic. We can't do this for Safari,
|
|
5406
5412
|
// as the keydown fires after composition start.
|
|
5407
|
-
(u.timeStamp < Vi +
|
|
5413
|
+
(u.timeStamp < Vi + rr || // FF has issues around composing multibyte characters, so we also
|
|
5408
5414
|
// need to invoke the empty space heuristic below.
|
|
5409
5415
|
h.type === "element" || !c.isCollapsed() || y.getFormat() !== c.format || mt(y) && y.getStyle() !== c.style) && ct(s, p, Wt);
|
|
5410
5416
|
}
|
|
@@ -6801,7 +6807,7 @@ function AN() {
|
|
|
6801
6807
|
const Qe = mn(), dt = [Ce];
|
|
6802
6808
|
let jt = xe.length;
|
|
6803
6809
|
for (let ln = 1; ln < me; ln++) {
|
|
6804
|
-
const
|
|
6810
|
+
const sr = $[ln], ys = sr.length, gr = Dn(sr).getWritable();
|
|
6805
6811
|
gr.__format = je, gr.__style = Ue, gr.__detail = $e;
|
|
6806
6812
|
const nn = gr.__key, kn = jt + ys;
|
|
6807
6813
|
if (Et(Qe)) {
|
|
@@ -7193,7 +7199,7 @@ function AN() {
|
|
|
7193
7199
|
}
|
|
7194
7200
|
}
|
|
7195
7201
|
function Et(u) {
|
|
7196
|
-
return u instanceof
|
|
7202
|
+
return u instanceof ir;
|
|
7197
7203
|
}
|
|
7198
7204
|
function dr(u) {
|
|
7199
7205
|
return u instanceof Ir;
|
|
@@ -7224,7 +7230,7 @@ function AN() {
|
|
|
7224
7230
|
}
|
|
7225
7231
|
return null;
|
|
7226
7232
|
}
|
|
7227
|
-
class
|
|
7233
|
+
class ir extends Ir {
|
|
7228
7234
|
constructor(s, c, h, y) {
|
|
7229
7235
|
super(s, c), this.format = h, this.style = y;
|
|
7230
7236
|
}
|
|
@@ -7324,7 +7330,7 @@ function AN() {
|
|
|
7324
7330
|
*/
|
|
7325
7331
|
clone() {
|
|
7326
7332
|
const s = this.anchor, c = this.focus;
|
|
7327
|
-
return new
|
|
7333
|
+
return new ir(Lr(s.key, s.offset, s.type), Lr(c.key, c.offset, c.type), this.format, this.style);
|
|
7328
7334
|
}
|
|
7329
7335
|
/**
|
|
7330
7336
|
* Toggles the provided format on all the TextNodes in the Selection.
|
|
@@ -7454,12 +7460,12 @@ function AN() {
|
|
|
7454
7460
|
}
|
|
7455
7461
|
else
|
|
7456
7462
|
dt.add(Qe.__key);
|
|
7457
|
-
const ln = Ht.getChildren(),
|
|
7463
|
+
const ln = Ht.getChildren(), sr = new Set($), ys = jt.is(Ht), gr = jt.isInline() && Ce.getNextSibling() === null ? jt : Ce;
|
|
7458
7464
|
for (let nn = ln.length - 1; nn >= 0; nn--) {
|
|
7459
7465
|
const kn = ln[nn];
|
|
7460
7466
|
if (kn.is(Ce) || et(kn) && kn.isParentOf(Ce))
|
|
7461
7467
|
break;
|
|
7462
|
-
kn.isAttached() && (!
|
|
7468
|
+
kn.isAttached() && (!sr.has(kn) || kn.is(Ot) ? ys || gr.insertAfter(kn, !1) : kn.remove());
|
|
7463
7469
|
}
|
|
7464
7470
|
if (!ys) {
|
|
7465
7471
|
let nn = Ht, kn = null;
|
|
@@ -7594,7 +7600,7 @@ function AN() {
|
|
|
7594
7600
|
insertParagraph() {
|
|
7595
7601
|
if (this.anchor.key === "root") {
|
|
7596
7602
|
const b = Ji();
|
|
7597
|
-
return
|
|
7603
|
+
return nr().splice(this.anchor.offset, 0, [b]), b.select(), b;
|
|
7598
7604
|
}
|
|
7599
7605
|
const s = Bc(this), c = wo(this.anchor.getNode(), Ki);
|
|
7600
7606
|
if (!et(c))
|
|
@@ -7902,12 +7908,12 @@ function AN() {
|
|
|
7902
7908
|
return et(u) && !u.isInline();
|
|
7903
7909
|
}
|
|
7904
7910
|
function Hd(u, s, c, h, y, N) {
|
|
7905
|
-
const b = Si(), $ = new
|
|
7911
|
+
const b = Si(), $ = new ir(Lr(u, s, y), Lr(c, h, N), 0, "");
|
|
7906
7912
|
return $.dirty = !0, b._selection = $, $;
|
|
7907
7913
|
}
|
|
7908
7914
|
function h_() {
|
|
7909
7915
|
const u = Lr("root", 0, "element"), s = Lr("root", 0, "element");
|
|
7910
|
-
return new
|
|
7916
|
+
return new ir(u, s, 0, "");
|
|
7911
7917
|
}
|
|
7912
7918
|
function $c() {
|
|
7913
7919
|
return new vi(/* @__PURE__ */ new Set());
|
|
@@ -7933,7 +7939,7 @@ function AN() {
|
|
|
7933
7939
|
if (Ce === null)
|
|
7934
7940
|
return null;
|
|
7935
7941
|
const [je, Ue] = Ce;
|
|
7936
|
-
return new
|
|
7942
|
+
return new ir(je, Ue, Et(u) ? u.format : 0, Et(u) ? u.style : "");
|
|
7937
7943
|
}
|
|
7938
7944
|
function mn() {
|
|
7939
7945
|
return Si()._selection;
|
|
@@ -8019,22 +8025,22 @@ function AN() {
|
|
|
8019
8025
|
return;
|
|
8020
8026
|
}
|
|
8021
8027
|
const we = s.anchor, Ce = s.focus, je = we.key, Ue = Ce.key, $e = Bs(c, je), Mt = Bs(c, Ue), Qe = we.offset, dt = Ce.offset, jt = s.format, Ht = s.style, Ot = s.isCollapsed();
|
|
8022
|
-
let ln = $e,
|
|
8028
|
+
let ln = $e, sr = Mt, ys = !1;
|
|
8023
8029
|
if (we.type === "text") {
|
|
8024
8030
|
ln = Fr($e);
|
|
8025
8031
|
const gr = we.getNode();
|
|
8026
8032
|
ys = gr.getFormat() !== jt || gr.getStyle() !== Ht;
|
|
8027
8033
|
} else Et(u) && u.anchor.type === "text" && (ys = !0);
|
|
8028
|
-
if (Ce.type === "text" && (
|
|
8034
|
+
if (Ce.type === "text" && (sr = Fr(Mt)), !(ln === null || sr === null) && (Ot && (u === null || ys || Et(u) && (u.format !== jt || u.style !== Ht)) && Yn(jt, Ht, Qe, je, performance.now()), !(he === Qe && me === dt && $ === ln && ae === sr && // Badly interpreted range selection when collapsed - #1482
|
|
8029
8035
|
!(h.type === "Range" && Ot) && ((xe === null || !N.contains(xe)) && N.focus({
|
|
8030
8036
|
preventScroll: !0
|
|
8031
8037
|
}), we.type !== "element")))) {
|
|
8032
8038
|
try {
|
|
8033
|
-
h.setBaseAndExtent(ln, Qe,
|
|
8039
|
+
h.setBaseAndExtent(ln, Qe, sr, dt);
|
|
8034
8040
|
} catch {
|
|
8035
8041
|
}
|
|
8036
8042
|
if (!y.has("skip-scroll-into-view") && s.isCollapsed() && N !== null && N === document.activeElement) {
|
|
8037
|
-
const gr = s instanceof
|
|
8043
|
+
const gr = s instanceof ir && s.anchor.type === "element" ? ln.childNodes[Qe] || null : h.rangeCount > 0 ? h.getRangeAt(0) : null;
|
|
8038
8044
|
if (gr !== null) {
|
|
8039
8045
|
let nn;
|
|
8040
8046
|
if (gr instanceof Text) {
|
|
@@ -8050,7 +8056,7 @@ function AN() {
|
|
|
8050
8056
|
}
|
|
8051
8057
|
function __(u) {
|
|
8052
8058
|
let s = mn() || Ho();
|
|
8053
|
-
s === null && (s =
|
|
8059
|
+
s === null && (s = nr().selectEnd()), s.insertNodes(u);
|
|
8054
8060
|
}
|
|
8055
8061
|
function y_() {
|
|
8056
8062
|
const u = mn();
|
|
@@ -8131,7 +8137,7 @@ function AN() {
|
|
|
8131
8137
|
const c = u.getParent();
|
|
8132
8138
|
if (!c) {
|
|
8133
8139
|
const y = Ji();
|
|
8134
|
-
return
|
|
8140
|
+
return nr().append(y), y.select(), [nr(), 0];
|
|
8135
8141
|
}
|
|
8136
8142
|
if (mt(u)) {
|
|
8137
8143
|
const y = u.splitText(s);
|
|
@@ -8144,7 +8150,7 @@ function AN() {
|
|
|
8144
8150
|
return [c, u.getIndexWithinParent()];
|
|
8145
8151
|
const h = u.getChildAtIndex(s);
|
|
8146
8152
|
if (h) {
|
|
8147
|
-
const y = new
|
|
8153
|
+
const y = new ir(Lr(u.__key, s, "element"), Lr(u.__key, s, "element"), 0, ""), N = u.insertNewAfter(y);
|
|
8148
8154
|
N && N.append(h, ...h.getNextSiblings());
|
|
8149
8155
|
}
|
|
8150
8156
|
return [c, u.getIndexWithinParent() + 1];
|
|
@@ -8298,8 +8304,8 @@ function AN() {
|
|
|
8298
8304
|
if (u._pendingEditorState = null, u._editorState = c, !y && ae && Ce !== null) {
|
|
8299
8305
|
er = u, Qn = c, Pr = !1, u._updating = !0;
|
|
8300
8306
|
try {
|
|
8301
|
-
const Ot = u._dirtyType, ln = u._dirtyElements,
|
|
8302
|
-
Ce.disconnect(), je = Yi(N, c, u, Ot, ln,
|
|
8307
|
+
const Ot = u._dirtyType, ln = u._dirtyElements, sr = u._dirtyLeaves;
|
|
8308
|
+
Ce.disconnect(), je = Yi(N, c, u, Ot, ln, sr);
|
|
8303
8309
|
} catch (Ot) {
|
|
8304
8310
|
if (Ot instanceof Error && u._onError(Ot), !Hc)
|
|
8305
8311
|
tf(u, null, h, c), or(u), u._dirtyType = at, Hc = !0, Xs(u, N), Hc = !1;
|
|
@@ -8877,7 +8883,7 @@ function AN() {
|
|
|
8877
8883
|
return super.append(...s);
|
|
8878
8884
|
}
|
|
8879
8885
|
static importJSON(s) {
|
|
8880
|
-
const c =
|
|
8886
|
+
const c = nr();
|
|
8881
8887
|
return c.setFormat(s.format), c.setIndent(s.indent), c.setDirection(s.direction), c;
|
|
8882
8888
|
}
|
|
8883
8889
|
exportJSON() {
|
|
@@ -8947,7 +8953,7 @@ function AN() {
|
|
|
8947
8953
|
}
|
|
8948
8954
|
toJSON() {
|
|
8949
8955
|
return jd(this, () => ({
|
|
8950
|
-
root: ef(
|
|
8956
|
+
root: ef(nr())
|
|
8951
8957
|
}));
|
|
8952
8958
|
}
|
|
8953
8959
|
}
|
|
@@ -9078,8 +9084,8 @@ function AN() {
|
|
|
9078
9084
|
const Ot = $e.name;
|
|
9079
9085
|
if (Ot !== "RootNode") {
|
|
9080
9086
|
const ln = $e.prototype;
|
|
9081
|
-
["getType", "clone"].forEach((
|
|
9082
|
-
$e.hasOwnProperty(
|
|
9087
|
+
["getType", "clone"].forEach((sr) => {
|
|
9088
|
+
$e.hasOwnProperty(sr) || console.warn(`${Ot} must implement static "${sr}" method`);
|
|
9083
9089
|
}), // eslint-disable-next-line no-prototype-builtins
|
|
9084
9090
|
!$e.hasOwnProperty("importDOM") && // eslint-disable-next-line no-prototype-builtins
|
|
9085
9091
|
$e.hasOwnProperty("exportDOM") && console.warn(`${Ot} should implement "importDOM" if using a custom "exportDOM" method to ensure HTML serialization (important for copy & paste) works as expected`), ln instanceof Kc && (ln.hasOwnProperty("decorate") || console.warn(`${ln.constructor.name} must implement "decorate" method`)), $e.hasOwnProperty("importJSON") || console.warn(`${Ot} should implement "importJSON" method to ensure JSON and default HTML serialization works as expected`), ln.hasOwnProperty("exportJSON") || console.warn(`${Ot} should implement "exportJSON" method to ensure JSON and default HTML serialization works as expected`);
|
|
@@ -9428,7 +9434,7 @@ function AN() {
|
|
|
9428
9434
|
focus(s, c = {}) {
|
|
9429
9435
|
const h = this._rootElement;
|
|
9430
9436
|
h !== null && (h.setAttribute("autocapitalize", "off"), Gr(this, () => {
|
|
9431
|
-
const y = mn(), N =
|
|
9437
|
+
const y = mn(), N = nr();
|
|
9432
9438
|
y !== null ? y.dirty = !0 : N.getChildrenSize() !== 0 && (c.defaultSelection === "rootStart" ? N.selectStart() : N.selectEnd());
|
|
9433
9439
|
}, {
|
|
9434
9440
|
onUpdate: () => {
|
|
@@ -9514,7 +9520,7 @@ function AN() {
|
|
|
9514
9520
|
function Gc(u) {
|
|
9515
9521
|
return u instanceof sf;
|
|
9516
9522
|
}
|
|
9517
|
-
return He.$INTERNAL_isPointSelection = dr, He.$addUpdateTag = Nt, He.$applyNodeReplacement = Mr, He.$copyNode = wl, He.$createLineBreakNode = _s, He.$createNodeSelection = $c, He.$createParagraphNode = Ji, He.$createPoint = Lr, He.$createRangeSelection = h_, He.$createTabNode = Po, He.$createTextNode = Dn, He.$getAdjacentNode = vl, He.$getNearestNodeFromDOMNode = oi, He.$getNearestRootOrShadowRoot = xo, He.$getNodeByKey = Nn, He.$getPreviousSelection = Ho, He.$getRoot =
|
|
9523
|
+
return He.$INTERNAL_isPointSelection = dr, He.$addUpdateTag = Nt, He.$applyNodeReplacement = Mr, He.$copyNode = wl, He.$createLineBreakNode = _s, He.$createNodeSelection = $c, He.$createParagraphNode = Ji, He.$createPoint = Lr, He.$createRangeSelection = h_, He.$createTabNode = Po, He.$createTextNode = Dn, He.$getAdjacentNode = vl, He.$getNearestNodeFromDOMNode = oi, He.$getNearestRootOrShadowRoot = xo, He.$getNodeByKey = Nn, He.$getPreviousSelection = Ho, He.$getRoot = nr, He.$getSelection = mn, He.$getTextContent = y_, He.$hasAncestor = Wi, He.$hasUpdateTag = Un, He.$insertNodes = __, He.$isBlockElementNode = f_, He.$isDecoratorNode = An, He.$isElementNode = et, He.$isInlineElementOrDecoratorNode = Hr, He.$isLeafNode = Ms, He.$isLineBreakNode = ui, He.$isNodeSelection = Ur, He.$isParagraphNode = k_, He.$isRangeSelection = Et, He.$isRootNode = Yr, He.$isRootOrShadowRoot = li, He.$isTabNode = $o, He.$isTextNode = mt, He.$nodesOfType = Hi, He.$normalizeSelection__EXPERIMENTAL = Ds, He.$parseSerializedNode = S_, He.$selectAll = xl, He.$setCompositionKey = vn, He.$setSelection = Tr, He.$splitNode = La, He.BLUR_COMMAND = B, He.CAN_REDO_COMMAND = X, He.CAN_UNDO_COMMAND = fe, He.CLEAR_EDITOR_COMMAND = R, He.CLEAR_HISTORY_COMMAND = U, He.CLICK_COMMAND = r, He.COMMAND_PRIORITY_CRITICAL = H_, He.COMMAND_PRIORITY_EDITOR = P_, He.COMMAND_PRIORITY_HIGH = B_, He.COMMAND_PRIORITY_LOW = $_, He.COMMAND_PRIORITY_NORMAL = F_, He.CONTROLLED_TEXT_INSERTION_COMMAND = p, He.COPY_COMMAND = Y, He.CUT_COMMAND = W, He.DELETE_CHARACTER_COMMAND = l, He.DELETE_LINE_COMMAND = S, He.DELETE_WORD_COMMAND = E, He.DEPRECATED_$computeGridMap = N_, He.DEPRECATED_$getGridCellNodeRect = kr, He.DEPRECATED_$getNodeTriplet = zd, He.DEPRECATED_$isGridCellNode = Uo, He.DEPRECATED_$isGridNode = rf, He.DEPRECATED_$isGridRowNode = Gc, He.DEPRECATED_GridCellNode = Uc, He.DEPRECATED_GridNode = nf, He.DEPRECATED_GridRowNode = sf, He.DRAGEND_COMMAND = oe, He.DRAGOVER_COMMAND = Z, He.DRAGSTART_COMMAND = O, He.DROP_COMMAND = de, He.DecoratorNode = Kc, He.ElementNode = Qs, He.FOCUS_COMMAND = _e, He.FORMAT_ELEMENT_COMMAND = K, He.FORMAT_TEXT_COMMAND = w, He.INDENT_CONTENT_COMMAND = Se, He.INSERT_LINE_BREAK_COMMAND = d, He.INSERT_PARAGRAPH_COMMAND = f, He.INSERT_TAB_COMMAND = Te, He.INTERNAL_PointSelection = Ir, He.KEY_ARROW_DOWN_COMMAND = V, He.KEY_ARROW_LEFT_COMMAND = I, He.KEY_ARROW_RIGHT_COMMAND = k, He.KEY_ARROW_UP_COMMAND = H, He.KEY_BACKSPACE_COMMAND = ce, He.KEY_DELETE_COMMAND = z, He.KEY_DOWN_COMMAND = v, He.KEY_ENTER_COMMAND = re, He.KEY_ESCAPE_COMMAND = j, He.KEY_MODIFIER_COMMAND = A, He.KEY_SPACE_COMMAND = te, He.KEY_TAB_COMMAND = q, He.LineBreakNode = qi, He.MOVE_TO_END = G, He.MOVE_TO_START = P, He.OUTDENT_CONTENT_COMMAND = Ee, He.PASTE_COMMAND = _, He.ParagraphNode = zo, He.REDO_COMMAND = m, He.REMOVE_TEXT_COMMAND = T, He.RootNode = Ko, He.SELECTION_CHANGE_COMMAND = t, He.SELECTION_INSERT_CLIPBOARD_NODES_COMMAND = n, He.SELECT_ALL_COMMAND = J, He.TabNode = Sr, He.TextNode = Qr, He.UNDO_COMMAND = M, He.createCommand = e, He.createEditor = K_, He.getNearestEditorFromDOMNode = ul, He.isCurrentlyReadOnlyMode = Wo, He.isHTMLAnchorElement = Ia, He.isHTMLElement = Ks, He.isSelectionCapturedInDecoratorInput = As, He.isSelectionWithinEditor = ls, He;
|
|
9518
9524
|
}
|
|
9519
9525
|
var We = {}, Of;
|
|
9520
9526
|
function MN() {
|
|
@@ -9856,7 +9862,7 @@ function MN() {
|
|
|
9856
9862
|
return o = (o = un(o).event) && o.inputType, o === "insertFromPaste" || o === "insertFromPasteAsQuotation";
|
|
9857
9863
|
}
|
|
9858
9864
|
function on(o) {
|
|
9859
|
-
return !
|
|
9865
|
+
return !rr(o) && !o.isLastChild() && !o.isInline();
|
|
9860
9866
|
}
|
|
9861
9867
|
function bn(o, i) {
|
|
9862
9868
|
return o = o._keyToDOMMap.get(i), o === void 0 && Y(75, i), o;
|
|
@@ -9879,7 +9885,7 @@ function MN() {
|
|
|
9879
9885
|
return o;
|
|
9880
9886
|
}
|
|
9881
9887
|
function lr(o) {
|
|
9882
|
-
return
|
|
9888
|
+
return rr(o) || Je(o) && o.isShadowRoot();
|
|
9883
9889
|
}
|
|
9884
9890
|
function bi(o) {
|
|
9885
9891
|
return o = o.constructor.clone(o), _t(o, null), o;
|
|
@@ -9890,7 +9896,7 @@ function MN() {
|
|
|
9890
9896
|
return i = i._nodes.get(a), i === void 0 && Y(97), i = i.replace, i !== null ? (i = i(o), i instanceof o.constructor || Y(98), i) : o;
|
|
9891
9897
|
}
|
|
9892
9898
|
function Ds(o, i) {
|
|
9893
|
-
o = o.getParent(), !
|
|
9899
|
+
o = o.getParent(), !rr(o) || Je(i) || Cn(i) || Y(99);
|
|
9894
9900
|
}
|
|
9895
9901
|
function go(o) {
|
|
9896
9902
|
return (Cn(o) || Je(o) && !o.canBeEmpty()) && !o.isInline();
|
|
@@ -9955,7 +9961,7 @@ function MN() {
|
|
|
9955
9961
|
function Ii(o, i) {
|
|
9956
9962
|
o.setProperty("text-align", i);
|
|
9957
9963
|
}
|
|
9958
|
-
function
|
|
9964
|
+
function nr(o, i) {
|
|
9959
9965
|
var a = Fr.theme.indent;
|
|
9960
9966
|
if (typeof a == "string") {
|
|
9961
9967
|
let g = o.classList.contains(a);
|
|
@@ -9972,7 +9978,7 @@ function MN() {
|
|
|
9972
9978
|
let C = g.createDOM(Fr, Bn);
|
|
9973
9979
|
var x = Bn._keyToDOMMap;
|
|
9974
9980
|
if (C["__lexicalKey_" + Bn._key] = o, x.set(o, C), Nt(g) ? C.setAttribute("data-lexical-text", "true") : Cn(g) && C.setAttribute("data-lexical-decorator", "true"), Je(g)) {
|
|
9975
|
-
if (o = g.__indent, x = g.__size, o !== 0 &&
|
|
9981
|
+
if (o = g.__indent, x = g.__size, o !== 0 && nr(C, o), x !== 0) {
|
|
9976
9982
|
--x, o = bs(g, Nn);
|
|
9977
9983
|
var D = zn;
|
|
9978
9984
|
zn = "", pl(o, g, 0, x, C, null), ya(g, C), zn = D;
|
|
@@ -10029,7 +10035,7 @@ function MN() {
|
|
|
10029
10035
|
if (a === g && !C) return Je(a) ? (g = x.__lexicalTextContent, g !== void 0 && (Ln += g, si += g), g = x.__lexicalDirTextContent, g !== void 0 && (zn += g)) : (g = a.getTextContent(), Nt(a) && !a.isDirectionless() && (zn += g), si += g, Ln += g), x;
|
|
10030
10036
|
if (a !== g && C && kt(oi, Ms, Zr, g, "updated"), g.updateDOM(a, x, Fr)) return g = Tr(o, null, null), i === null && Y(62), i.replaceChild(g, x), Rs(o, null), g;
|
|
10031
10037
|
if (Je(a) && Je(g)) {
|
|
10032
|
-
if (o = g.__indent, o !== a.__indent &&
|
|
10038
|
+
if (o = g.__indent, o !== a.__indent && nr(x, o), o = g.__format, o !== a.__format && gl(x, o), C) {
|
|
10033
10039
|
o = zn, zn = "", C = Ln;
|
|
10034
10040
|
var D = a.__size, Q = g.__size;
|
|
10035
10041
|
if (Ln = "", D === 1 && Q === 1) {
|
|
@@ -10063,7 +10069,7 @@ function MN() {
|
|
|
10063
10069
|
}
|
|
10064
10070
|
on(g) && (Ln += `
|
|
10065
10071
|
|
|
10066
|
-
`), x.__lexicalTextContent = Ln, Ln = C + Ln, ya(g, x), zn = o,
|
|
10072
|
+
`), x.__lexicalTextContent = Ln, Ln = C + Ln, ya(g, x), zn = o, rr(g) || g.isInline() || ml(a, g, x);
|
|
10067
10073
|
}
|
|
10068
10074
|
on(g) && (Ln += `
|
|
10069
10075
|
|
|
@@ -10071,7 +10077,7 @@ function MN() {
|
|
|
10071
10077
|
|
|
10072
10078
|
`);
|
|
10073
10079
|
} else a = g.getTextContent(), Cn(g) ? (C = g.decorate(Bn, Fr), C !== null && _l(o, C)) : Nt(g) && !g.isDirectionless() && (zn += a), Ln += a, si += a;
|
|
10074
|
-
return !fl &&
|
|
10080
|
+
return !fl && rr(g) && g.__cachedText !== si && (g.getWritable().__cachedText = si), x;
|
|
10075
10081
|
}
|
|
10076
10082
|
function _l(o, i) {
|
|
10077
10083
|
let a = Bn._pendingDecorators, g = Bn._decorators;
|
|
@@ -10142,7 +10148,7 @@ function MN() {
|
|
|
10142
10148
|
if (g) if (At(a)) {
|
|
10143
10149
|
let D = a.anchor;
|
|
10144
10150
|
var x = D.getNode();
|
|
10145
|
-
D.type === "element" && D.offset === 0 && a.isCollapsed() && !
|
|
10151
|
+
D.type === "element" && D.offset === 0 && a.isCollapsed() && !rr(x) && Rt().getChildrenSize() === 1 && x.getTopLevelElementOrThrow().isEmpty() && C !== null && a.is(C) ? (g.removeAllRanges(), a.dirty = !0) : o.detail !== 3 || a.isCollapsed() || (g = a.focus.getNode(), x !== g && (Je(x) ? x.select(0) : x.getParentOrThrow().select(0)));
|
|
10146
10152
|
} else o.pointerType === "touch" && (x = g.anchorNode, x !== null && (x = x.nodeType, x === 1 || x === 3)) && (g = Gn(C, g, i, o), tn(g));
|
|
10147
10153
|
lt(i, t, o);
|
|
10148
10154
|
});
|
|
@@ -10185,7 +10191,7 @@ function MN() {
|
|
|
10185
10191
|
}
|
|
10186
10192
|
}
|
|
10187
10193
|
if (At(C)) {
|
|
10188
|
-
x = o.data, as !== null && st(!1, i, as), C.dirty && as === null || !C.isCollapsed() ||
|
|
10194
|
+
x = o.data, as !== null && st(!1, i, as), C.dirty && as === null || !C.isCollapsed() || rr(C.anchor.getNode()) || g === null || C.applyDOMRange(g), as = null;
|
|
10189
10195
|
var D = C.focus, Q = C.anchor.getNode();
|
|
10190
10196
|
if (D = D.getNode(), a === "insertText" || a === "insertTranspose") x === `
|
|
10191
10197
|
` ? (o.preventDefault(), lt(i, r, !1)) : x === `
|
|
@@ -10402,7 +10408,7 @@ function MN() {
|
|
|
10402
10408
|
let Ye = ge.focus;
|
|
10403
10409
|
x.key === g && (hs(x, o, C, o.getPreviousSibling(), o.getNextSibling()), Ae = !0), Ye.key === g && (hs(Ye, o, C, o.getPreviousSibling(), o.getNextSibling()), Ae = !0);
|
|
10404
10410
|
} else cr(ge) && i && o.isSelected() && o.selectPrevious();
|
|
10405
|
-
At(ge) && i && !Ae ? (g = o.getIndexWithinParent(), yt(o), Hn(ge, C, g, -1)) : yt(o), a || lr(C) || C.canBeEmpty() || !C.isEmpty() || Tl(C, i), i &&
|
|
10411
|
+
At(ge) && i && !Ae ? (g = o.getIndexWithinParent(), yt(o), Hn(ge, C, g, -1)) : yt(o), a || lr(C) || C.canBeEmpty() || !C.isEmpty() || Tl(C, i), i && rr(C) && C.isEmpty() && C.selectEnd();
|
|
10406
10412
|
}
|
|
10407
10413
|
}
|
|
10408
10414
|
class Fs {
|
|
@@ -11100,7 +11106,7 @@ function MN() {
|
|
|
11100
11106
|
} else xo(o, i);
|
|
11101
11107
|
}
|
|
11102
11108
|
function wl(o, i, a, g) {
|
|
11103
|
-
let C = o.getNode(), x = C.getChildAtIndex(o.offset), D = Un(), Q =
|
|
11109
|
+
let C = o.getNode(), x = C.getChildAtIndex(o.offset), D = Un(), Q = rr(C) ? zr().append(D) : D;
|
|
11104
11110
|
D.setFormat(a), D.setStyle(g), x === null ? C.append(Q) : x.insertBefore(Q), o.is(i) && i.set(D.__key, 0, "text"), o.set(D.__key, 0, "text");
|
|
11105
11111
|
}
|
|
11106
11112
|
function Mr(o, i, a, g) {
|
|
@@ -11321,7 +11327,7 @@ function MN() {
|
|
|
11321
11327
|
var gt = Un(Ke.getTextContent());
|
|
11322
11328
|
Ke.replace(gt), Ke = gt;
|
|
11323
11329
|
}
|
|
11324
|
-
|
|
11330
|
+
rr(Ae.getNode()) || Ae.type !== "text" || (Ke = Ke.spliceText(0, Ye, "")), x.add(Ke.__key);
|
|
11325
11331
|
} else Ae = Ke.getParentOrThrow(), Ae.canBeEmpty() || Ae.getChildrenSize() !== 1 ? Ke.remove() : Ae.remove();
|
|
11326
11332
|
else x.add(Ke.__key);
|
|
11327
11333
|
for (Ae = D.getChildren(), Ye = new Set(Q), Ke = Pe.is(D), Pe = Pe.isInline() && a.getNextSibling() === null ? Pe : a, gt = Ae.length - 1; 0 <= gt; gt--) {
|
|
@@ -11424,7 +11430,7 @@ function MN() {
|
|
|
11424
11430
|
if (Cn(Q) && !Q.isIsolated()) D && Q.isKeyboardSelectable() ? (a = Dl(), a.add(Q.__key), tn(a)) : (i = a ? Q.getPreviousSibling() : Q.getNextSibling(), Nt(i) ? (Q = i.__key, a = a ? i.getTextContent().length : 0, C.set(Q, a, "text"), D && x.set(Q, a, "text")) : (g = Q.getParentOrThrow(), Je(i) ? (g = i.__key, Q = a ? i.getChildrenSize() : 0) : (Q = Q.getIndexWithinParent(), g = g.__key, a || Q++), C.set(g, Q, "element"), D && x.set(g, Q, "element")));
|
|
11425
11431
|
else if (x = dn(), C = qr(x._window)) {
|
|
11426
11432
|
var ge = x._blockCursorElement, Ae = x._rootElement;
|
|
11427
|
-
if (Ae === null || ge === null || !Je(Q) || Q.isInline() || Q.canBeEmpty() || cl(ge, x, Ae), C.modify(i, a ? "backward" : "forward", g), 0 < C.rangeCount && (Q = C.getRangeAt(0), x = this.anchor.getNode(), x =
|
|
11433
|
+
if (Ae === null || ge === null || !Je(Q) || Q.isInline() || Q.canBeEmpty() || cl(ge, x, Ae), C.modify(i, a ? "backward" : "forward", g), 0 < C.rangeCount && (Q = C.getRangeAt(0), x = this.anchor.getNode(), x = rr(x) ? x : or(x), this.applyDOMRange(Q), this.dirty = !0, !D)) {
|
|
11428
11434
|
for (D = this.getNodes(), i = [], g = !1, ge = 0; ge < D.length; ge++) Ae = D[ge], Zn(Ae, x) ? i.push(Ae) : g = !0;
|
|
11429
11435
|
g && 0 < i.length && (a ? (a = i[0], Je(a) ? a.selectStart() : a.getParentOrThrow().selectStart()) : (a = i[i.length - 1], Je(a) ? a.selectEnd() : a.getParentOrThrow().selectEnd())), (C.anchorNode !== Q.startContainer || C.anchorOffset !== Q.startOffset) && (a = this.focus, D = this.anchor, C = D.key, Q = D.offset, x = D.type, Mr(D, a.key, a.offset, a.type), Mr(a, C, Q, x), this._cachedNodes = null);
|
|
11430
11436
|
}
|
|
@@ -11465,7 +11471,7 @@ function MN() {
|
|
|
11465
11471
|
}
|
|
11466
11472
|
}
|
|
11467
11473
|
}
|
|
11468
|
-
this.removeText(), i && !a && this.isCollapsed() && this.anchor.type === "element" && this.anchor.offset === 0 && (i = this.anchor.getNode(), i.isEmpty() &&
|
|
11474
|
+
this.removeText(), i && !a && this.isCollapsed() && this.anchor.type === "element" && this.anchor.offset === 0 && (i = this.anchor.getNode(), i.isEmpty() && rr(i.getParent()) && i.getIndexWithinParent() === 0 && i.collapseAtStart(this));
|
|
11469
11475
|
}
|
|
11470
11476
|
deleteLine(i) {
|
|
11471
11477
|
this.isCollapsed() && (this.anchor.type === "text" && this.modify("extend", i, "lineboundary"), (i ? this.focus : this.anchor).offset === 0 && this.modify(
|
|
@@ -11754,9 +11760,9 @@ function MN() {
|
|
|
11754
11760
|
let fr = document.createRange();
|
|
11755
11761
|
fr.selectNode(dr), kr = fr.getBoundingClientRect();
|
|
11756
11762
|
} else kr = dr.getBoundingClientRect();
|
|
11757
|
-
let
|
|
11763
|
+
let ir = g.ownerDocument, Ur = ir.defaultView;
|
|
11758
11764
|
if (Ur !== null) for (var { top: Kl, bottom: ei } = kr, Dn, mt, Sr = g; Sr !== null; ) {
|
|
11759
|
-
let fr = Sr ===
|
|
11765
|
+
let fr = Sr === ir.body;
|
|
11760
11766
|
if (fr) Dn = 0, mt = un(o).innerHeight;
|
|
11761
11767
|
else {
|
|
11762
11768
|
let Bo = Sr.getBoundingClientRect();
|
|
@@ -11790,20 +11796,20 @@ function MN() {
|
|
|
11790
11796
|
} else {
|
|
11791
11797
|
let kr = En.getChildAtIndex(Ir);
|
|
11792
11798
|
if (go(kr)) {
|
|
11793
|
-
let
|
|
11794
|
-
(
|
|
11799
|
+
let ir = kr.getPreviousSibling();
|
|
11800
|
+
(ir === null || go(ir)) && (Et = !0, dr = o.getElementByKey(kr.__key));
|
|
11795
11801
|
}
|
|
11796
11802
|
}
|
|
11797
11803
|
if (Et) {
|
|
11798
11804
|
let kr = o.getElementByKey(En.__key);
|
|
11799
11805
|
if (pn === null) {
|
|
11800
|
-
let
|
|
11806
|
+
let ir = o._config.theme, Ur = document.createElement("div");
|
|
11801
11807
|
Ur.contentEditable = "false", Ur.setAttribute("data-lexical-cursor", "true");
|
|
11802
|
-
let fr =
|
|
11808
|
+
let fr = ir.blockCursor;
|
|
11803
11809
|
if (fr !== void 0) {
|
|
11804
11810
|
if (typeof fr == "string") {
|
|
11805
11811
|
let di = fr.split(" ");
|
|
11806
|
-
fr =
|
|
11812
|
+
fr = ir.blockCursor = di;
|
|
11807
11813
|
}
|
|
11808
11814
|
fr !== void 0 && Ur.classList.add(...fr);
|
|
11809
11815
|
}
|
|
@@ -12259,7 +12265,7 @@ function MN() {
|
|
|
12259
12265
|
return !0;
|
|
12260
12266
|
}
|
|
12261
12267
|
}
|
|
12262
|
-
function
|
|
12268
|
+
function rr(o) {
|
|
12263
12269
|
return o instanceof ur;
|
|
12264
12270
|
}
|
|
12265
12271
|
function Ll(o, i) {
|
|
@@ -12583,7 +12589,7 @@ function MN() {
|
|
|
12583
12589
|
return Nt(o) || $i(o) || Cn(o);
|
|
12584
12590
|
}, We.$isLineBreakNode = $i, We.$isNodeSelection = cr, We.$isParagraphNode = function(o) {
|
|
12585
12591
|
return o instanceof Kr;
|
|
12586
|
-
}, We.$isRangeSelection = At, We.$isRootNode =
|
|
12592
|
+
}, We.$isRangeSelection = At, We.$isRootNode = rr, We.$isRootOrShadowRoot = lr, We.$isTabNode = ba, We.$isTextNode = Nt, We.$nodesOfType = function(o) {
|
|
12587
12593
|
var i = Wr();
|
|
12588
12594
|
let a = i._readOnly, g = o.getType();
|
|
12589
12595
|
i = i._nodeMap;
|
|
@@ -23895,7 +23901,7 @@ const MC = process.env.NODE_ENV === "development" ? DC() : AC();
|
|
|
23895
23901
|
var Vu = MC, pd = qn();
|
|
23896
23902
|
function RC() {
|
|
23897
23903
|
const [e] = pd.useLexicalComposerContext();
|
|
23898
|
-
return
|
|
23904
|
+
return tr(() => Vu.registerCodeHighlighting(e), [e]), null;
|
|
23899
23905
|
}
|
|
23900
23906
|
var Qh = gn(), Fn = Gt();
|
|
23901
23907
|
function bC({
|
|
@@ -24004,7 +24010,7 @@ const IC = typeof window < "u" && typeof window.document < "u" && typeof window.
|
|
|
24004
24010
|
);
|
|
24005
24011
|
function PC() {
|
|
24006
24012
|
const [e] = pd.useLexicalComposerContext();
|
|
24007
|
-
return
|
|
24013
|
+
return tr(() => {
|
|
24008
24014
|
if (!e.hasNodes([il]))
|
|
24009
24015
|
throw new Error("ImagePlugin: ImageNode not registered on editor");
|
|
24010
24016
|
return Qh.mergeRegister(
|
|
@@ -24136,7 +24142,7 @@ function UC(e) {
|
|
|
24136
24142
|
}
|
|
24137
24143
|
function GC({ maxDepth: e }) {
|
|
24138
24144
|
const [t] = pd.useLexicalComposerContext();
|
|
24139
|
-
return
|
|
24145
|
+
return tr(() => t.registerCommand(
|
|
24140
24146
|
Fn.INDENT_CONTENT_COMMAND,
|
|
24141
24147
|
() => !UC(e || 7),
|
|
24142
24148
|
zC
|
|
@@ -26087,11 +26093,11 @@ const bT = (e, t) => e(t, "i", ss(e, t)), LT = (e, t) => e(t, "b", ss(e, t)), IT
|
|
|
26087
26093
|
}, fw = (e) => {
|
|
26088
26094
|
const [t, n] = Nr();
|
|
26089
26095
|
let r;
|
|
26090
|
-
return
|
|
26096
|
+
return tr(() => {
|
|
26091
26097
|
(async () => {
|
|
26092
26098
|
if (!r)
|
|
26093
26099
|
try {
|
|
26094
|
-
r = (await import("./index-
|
|
26100
|
+
r = (await import("./index-BqwUybQE.js")).default;
|
|
26095
26101
|
} catch {
|
|
26096
26102
|
throw new Error(
|
|
26097
26103
|
"Failed to import React Markdown, cannot properly render LegacyRichText."
|
|
@@ -31792,7 +31798,7 @@ function jv(e, t) {
|
|
|
31792
31798
|
}
|
|
31793
31799
|
const hw = (e) => {
|
|
31794
31800
|
const [t, n] = Nr(!1), [r, l] = Nr(!1);
|
|
31795
|
-
|
|
31801
|
+
tr(() => {
|
|
31796
31802
|
l(!0);
|
|
31797
31803
|
}, []);
|
|
31798
31804
|
const d = e.statusTemplate || jv, f = new e_(e.hours, e.timezone), p = f.isOpenNow(), _ = f.getCurrentInterval(), T = f.getNextInterval(), E = (_ == null ? void 0 : _.end) || (T == null ? void 0 : T.start);
|
|
@@ -31850,7 +31856,7 @@ function Jv(e, t, n) {
|
|
|
31850
31856
|
}
|
|
31851
31857
|
const gw = (e) => {
|
|
31852
31858
|
const [t, n] = Nr(!1);
|
|
31853
|
-
|
|
31859
|
+
tr(() => {
|
|
31854
31860
|
n(!0);
|
|
31855
31861
|
}, []);
|
|
31856
31862
|
const r = new e_(
|