@harbour-enterprises/superdoc 0.10.24-RC1 → 0.10.24
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/chunks/{super-editor.es-LVnq3DMw.cjs → super-editor.es-DxV1-XaR.cjs} +6 -6
- package/dist/chunks/{super-editor.es-C7FklFR7.es.js → super-editor.es-QKCAGemB.es.js} +1156 -1213
- package/dist/style.css +5 -1
- package/dist/super-editor/ai-writer.es.js +3 -3
- package/dist/super-editor/chunks/{converter-J9ViHxhj.js → converter-BZpu3h0o.js} +728 -781
- package/dist/super-editor/chunks/{docx-zipper-C1kMsjg4.js → docx-zipper-OGlRtF5k.js} +1 -1
- package/dist/super-editor/chunks/{editor-DwlgXynb.js → editor-CGwGfcxI.js} +229 -234
- package/dist/super-editor/chunks/{toolbar-Dtt8NSGy.js → toolbar-CpK0llGs.js} +2 -2
- package/dist/super-editor/components/toolbar/ai-helpers.d.ts.map +1 -1
- package/dist/super-editor/converter.es.js +1 -1
- package/dist/super-editor/core/Editor.d.ts.map +1 -1
- package/dist/super-editor/core/ExtensionService.d.ts.map +1 -1
- package/dist/super-editor/core/Mark.d.ts +0 -1
- package/dist/super-editor/core/Mark.d.ts.map +1 -1
- package/dist/super-editor/core/super-converter/SuperConverter.d.ts +2 -3
- package/dist/super-editor/core/super-converter/SuperConverter.d.ts.map +1 -1
- package/dist/super-editor/core/super-converter/exporter.d.ts.map +1 -1
- package/dist/super-editor/core/super-converter/v2/importer/bookmarkNodeImporter.d.ts.map +1 -1
- package/dist/super-editor/core/super-converter/v2/importer/runNodeImporter.d.ts.map +1 -1
- package/dist/super-editor/docx-zipper.es.js +2 -2
- package/dist/super-editor/editor.es.js +3 -3
- package/dist/super-editor/file-zipper.es.js +1 -1
- package/dist/super-editor/style.css +1 -1
- package/dist/super-editor/super-editor.es.js +7 -7
- package/dist/super-editor/tests/e2e/test-app/vite.config.d.ts +1 -1
- package/dist/super-editor/toolbar.es.js +2 -2
- package/dist/super-editor.cjs +1 -1
- package/dist/super-editor.es.js +1 -1
- package/dist/superdoc.cjs +2 -2
- package/dist/superdoc.es.js +3 -3
- package/dist/superdoc.umd.js +1291 -1349
- package/dist/superdoc.umd.js.map +1 -1
- package/package.json +1 -1
- package/dist/super-editor/tests/e2e/test-app/dist/assets/index-BTMvkUyI.d.ts +0 -3
- package/dist/super-editor/tests/e2e/test-app/dist/assets/index-BTMvkUyI.d.ts.map +0 -1
|
@@ -7,9 +7,9 @@ var I = (t, e, n) => yf(t, typeof e != "symbol" ? e + "" : e, n), Wo = (t, e, n)
|
|
|
7
7
|
var Ge = (t, e, n) => (Wo(t, e, "read from private field"), n ? n.call(t) : e.get(t)), ft = (t, e, n) => e.has(t) ? ta("Cannot add the same private member more than once") : e instanceof WeakSet ? e.add(t) : e.set(t, n), Uo = (t, e, n, r) => (Wo(t, e, "write to private field"), r ? r.call(t, n) : e.set(t, n), n), N = (t, e, n) => (Wo(t, e, "access private method"), n);
|
|
8
8
|
import * as T from "yjs";
|
|
9
9
|
import { UndoManager as bf, Item as wf, ContentType as vf, Text as kf, XmlElement as Cf } from "yjs";
|
|
10
|
-
import { P as G, a as Z, M as dr, c as K, N as B, S as Y, T as H, b as W, D as Vn, F as P, d as tn, e as Mf, f as ec, A as Or, p as ie, B as
|
|
10
|
+
import { P as G, a as Z, M as dr, c as K, N as B, S as Y, T as H, b as W, D as Vn, F as P, d as tn, e as Mf, f as ec, A as Or, p as ie, B as Sf, i as xf, g as tc, h as Af, j as wt, l as Tr, k as Ht, m as nc, r as rc, R as an, o as ur, n as na, q as $t, s as vi, t as oc, u as Of, v as Tf, w as ue, x as $e, y as Eo, z as Cn, C as ho, E as Df, G as Me, H as ro, I as ic, J as Mn, K as qo, L as Ko, O as Xo, Q as oo, U as Rt, V as ws, W as Nf, X as ra, Y as oa, Z as Ef, _ as Pf, $ as If } from "./converter-BZpu3h0o.js";
|
|
11
11
|
import { ref as ia, computed as Rf, createElementBlock as Kt, openBlock as Xt, withModifiers as Jo, Fragment as Lf, renderList as Ff, normalizeClass as Bf, createCommentVNode as sa, toDisplayString as Yo, createElementVNode as zf, createApp as _f } from "vue";
|
|
12
|
-
import { D as aa } from "./docx-zipper-
|
|
12
|
+
import { D as aa } from "./docx-zipper-OGlRtF5k.js";
|
|
13
13
|
function Po(t) {
|
|
14
14
|
const { from: e, to: n, empty: r } = t.selection, o = [];
|
|
15
15
|
return r ? (t.storedMarks && o.push(...t.storedMarks), o.push(...t.selection.$head.marks())) : t.doc.nodesBetween(e, n, (i) => {
|
|
@@ -584,7 +584,7 @@ function op(t, e, n) {
|
|
|
584
584
|
}
|
|
585
585
|
const ot = typeof navigator < "u" ? navigator : null, fa = typeof document < "u" ? document : null, jt = ot && ot.userAgent || "", Ci = /Edge\/(\d+)/.exec(jt), dc = /MSIE \d/.exec(jt), Mi = /Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(jt), Te = !!(dc || Mi || Ci), Lt = dc ? document.documentMode : Mi ? +Mi[1] : Ci ? +Ci[1] : 0, Je = !Te && /gecko\/(\d+)/i.test(jt);
|
|
586
586
|
Je && +(/Firefox\/(\d+)/.exec(jt) || [0, 0])[1];
|
|
587
|
-
const
|
|
587
|
+
const Si = !Te && /Chrome\/(\d+)/.exec(jt), be = !!Si, uc = Si ? +Si[1] : 0, Se = !Te && !!ot && /Apple Computer/.test(ot.vendor), Nn = Se && (/Mobile\/\w+/.test(jt) || !!ot && ot.maxTouchPoints > 2), ze = Nn || (ot ? /Mac/.test(ot.platform) : !1), ip = ot ? /Win/.test(ot.platform) : !1, bt = /Android \d/.test(jt), Nr = !!fa && "webkitFontSmoothing" in fa.documentElement.style, sp = Nr ? +(/\bAppleWebKit\/(\d+)/.exec(navigator.userAgent) || [0, 0])[1] : 0;
|
|
588
588
|
function ap(t) {
|
|
589
589
|
let e = t.defaultView && t.defaultView.visualViewport;
|
|
590
590
|
return e ? {
|
|
@@ -770,7 +770,7 @@ function gp(t, e) {
|
|
|
770
770
|
if (!vs(e, c) || (s = mc(t.dom, e, c), !s))
|
|
771
771
|
return null;
|
|
772
772
|
}
|
|
773
|
-
if (
|
|
773
|
+
if (Se)
|
|
774
774
|
for (let c = s; r && c; c = Dn(c))
|
|
775
775
|
c.draggable && (r = void 0);
|
|
776
776
|
if (s = pp(s, e), r) {
|
|
@@ -1178,7 +1178,7 @@ class Er {
|
|
|
1178
1178
|
h = g;
|
|
1179
1179
|
}
|
|
1180
1180
|
let a = this.domFromPos(e, e ? -1 : 1), l = n == e ? a : this.domFromPos(n, n ? -1 : 1), c = r.root.getSelection(), d = r.domSelectionRange(), u = !1;
|
|
1181
|
-
if ((Je ||
|
|
1181
|
+
if ((Je || Se) && e == n) {
|
|
1182
1182
|
let { node: p, offset: h } = a;
|
|
1183
1183
|
if (p.nodeType == 3) {
|
|
1184
1184
|
if (u = !!(h && p.nodeValue[h - 1] == `
|
|
@@ -1201,7 +1201,7 @@ class Er {
|
|
|
1201
1201
|
let p = d.focusNode.childNodes[d.focusOffset];
|
|
1202
1202
|
p && p.contentEditable == "false" && (o = !0);
|
|
1203
1203
|
}
|
|
1204
|
-
if (!(o || u &&
|
|
1204
|
+
if (!(o || u && Se) && ln(a.node, a.offset, d.anchorNode, d.anchorOffset) && ln(l.node, l.offset, d.focusNode, d.focusOffset))
|
|
1205
1205
|
return;
|
|
1206
1206
|
let f = !1;
|
|
1207
1207
|
if ((c.extend || e == n) && !u) {
|
|
@@ -1417,7 +1417,7 @@ class Ft extends Er {
|
|
|
1417
1417
|
// separate step, syncs the DOM inside `this.contentDOM` to
|
|
1418
1418
|
// `this.children`.
|
|
1419
1419
|
updateChildren(e, n) {
|
|
1420
|
-
let r = this.node.inlineContent, o = n, i = e.composing ? this.localCompositionInfo(e, n) : null, s = i && i.pos > -1 ? i : null, a = i && i.pos < 0, l = new
|
|
1420
|
+
let r = this.node.inlineContent, o = n, i = e.composing ? this.localCompositionInfo(e, n) : null, s = i && i.pos > -1 ? i : null, a = i && i.pos < 0, l = new xp(this, s && s.node, e);
|
|
1421
1421
|
Tp(this.node, this.innerDeco, (c, d, u) => {
|
|
1422
1422
|
c.spec.marks ? l.syncToMarks(c.spec.marks, r, e) : c.type.side >= 0 && !u && l.syncToMarks(d == this.node.childCount ? Mf.none : this.node.child(d).marks, r, e), l.placeWidget(c, e, o);
|
|
1423
1423
|
}, (c, d, u, f) => {
|
|
@@ -1465,7 +1465,7 @@ class Ft extends Er {
|
|
|
1465
1465
|
if (go(e, this.outerDeco))
|
|
1466
1466
|
return;
|
|
1467
1467
|
let n = this.nodeDOM.nodeType != 1, r = this.dom;
|
|
1468
|
-
this.dom = kc(this.dom, this.nodeDOM,
|
|
1468
|
+
this.dom = kc(this.dom, this.nodeDOM, xi(this.outerDeco, this.node, n), xi(e, this.node, n)), this.dom != r && (r.pmViewDesc = void 0, this.dom.pmViewDesc = this), this.outerDeco = e;
|
|
1469
1469
|
}
|
|
1470
1470
|
// Mark this node as being the selected node.
|
|
1471
1471
|
selectNode() {
|
|
@@ -1599,7 +1599,7 @@ const tr = function(t) {
|
|
|
1599
1599
|
};
|
|
1600
1600
|
tr.prototype = /* @__PURE__ */ Object.create(null);
|
|
1601
1601
|
const Qt = [new tr()];
|
|
1602
|
-
function
|
|
1602
|
+
function xi(t, e, n) {
|
|
1603
1603
|
if (t.length == 0)
|
|
1604
1604
|
return Qt;
|
|
1605
1605
|
let r = n ? Qt[0] : new tr(), o = [r];
|
|
@@ -1625,11 +1625,11 @@ function kc(t, e, n, r) {
|
|
|
1625
1625
|
let l;
|
|
1626
1626
|
a && a.nodeName == s.nodeName && o != t && (l = o.parentNode) && l.nodeName.toLowerCase() == s.nodeName || (l = document.createElement(s.nodeName), l.pmIsDeco = !0, l.appendChild(o), a = Qt[0]), o = l;
|
|
1627
1627
|
}
|
|
1628
|
-
|
|
1628
|
+
Sp(o, a || Qt[0], s);
|
|
1629
1629
|
}
|
|
1630
1630
|
return o;
|
|
1631
1631
|
}
|
|
1632
|
-
function
|
|
1632
|
+
function Sp(t, e, n) {
|
|
1633
1633
|
for (let r in e)
|
|
1634
1634
|
r != "class" && r != "style" && r != "nodeName" && !(r in n) && t.removeAttribute(r);
|
|
1635
1635
|
for (let r in n)
|
|
@@ -1652,7 +1652,7 @@ function xp(t, e, n) {
|
|
|
1652
1652
|
}
|
|
1653
1653
|
}
|
|
1654
1654
|
function Cc(t, e, n) {
|
|
1655
|
-
return kc(t, t, Qt,
|
|
1655
|
+
return kc(t, t, Qt, xi(e, n, t.nodeType != 1));
|
|
1656
1656
|
}
|
|
1657
1657
|
function go(t, e) {
|
|
1658
1658
|
if (t.length != e.length)
|
|
@@ -1666,7 +1666,7 @@ function va(t) {
|
|
|
1666
1666
|
let e = t.nextSibling;
|
|
1667
1667
|
return t.parentNode.removeChild(t), e;
|
|
1668
1668
|
}
|
|
1669
|
-
class
|
|
1669
|
+
class xp {
|
|
1670
1670
|
constructor(e, n, r) {
|
|
1671
1671
|
this.lock = n, this.view = r, this.index = 0, this.stack = [], this.changed = !1, this.top = e, this.preMatch = Ap(e.node.content, e);
|
|
1672
1672
|
}
|
|
@@ -1800,7 +1800,7 @@ class Sp {
|
|
|
1800
1800
|
for (; e instanceof cn; )
|
|
1801
1801
|
n = e, e = n.children[n.children.length - 1];
|
|
1802
1802
|
(!e || // Empty textblock
|
|
1803
|
-
!(e instanceof Lo) || /\n$/.test(e.node.text) || this.view.requiresGeckoHackNode && /\s$/.test(e.node.text)) && ((
|
|
1803
|
+
!(e instanceof Lo) || /\n$/.test(e.node.text) || this.view.requiresGeckoHackNode && /\s$/.test(e.node.text)) && ((Se || be) && e && e.dom.contentEditable == "false" && this.addHackNode("IMG", n), this.addHackNode("BR", this.top));
|
|
1804
1804
|
}
|
|
1805
1805
|
addHackNode(e, n) {
|
|
1806
1806
|
if (n == this.top && this.index < n.children.length && n.children[this.index].matchesHack(e))
|
|
@@ -1971,11 +1971,11 @@ function ks(t, e = null) {
|
|
|
1971
1971
|
return c;
|
|
1972
1972
|
}
|
|
1973
1973
|
function Mc(t) {
|
|
1974
|
-
return t.editable ? t.hasFocus() :
|
|
1974
|
+
return t.editable ? t.hasFocus() : xc(t) && document.activeElement && document.activeElement.contains(t.dom);
|
|
1975
1975
|
}
|
|
1976
1976
|
function kt(t, e = !1) {
|
|
1977
1977
|
let n = t.state.selection;
|
|
1978
|
-
if (
|
|
1978
|
+
if (Sc(t, n), !!Mc(t)) {
|
|
1979
1979
|
if (!e && t.input.mouseDown && t.input.mouseDown.allowDefault && be) {
|
|
1980
1980
|
let r = t.domSelectionRange(), o = t.domObserver.currentSelection;
|
|
1981
1981
|
if (r.anchorNode && o.anchorNode && ln(r.anchorNode, r.anchorOffset, o.anchorNode, o.anchorOffset)) {
|
|
@@ -1992,10 +1992,10 @@ function kt(t, e = !1) {
|
|
|
1992
1992
|
t.domObserver.setCurSelection(), t.domObserver.connectSelection();
|
|
1993
1993
|
}
|
|
1994
1994
|
}
|
|
1995
|
-
const ka =
|
|
1995
|
+
const ka = Se || be && uc < 63;
|
|
1996
1996
|
function Ca(t, e) {
|
|
1997
1997
|
let { node: n, offset: r } = t.docView.domFromPos(e, 0), o = r < n.childNodes.length ? n.childNodes[r] : null, i = r ? n.childNodes[r - 1] : null;
|
|
1998
|
-
if (
|
|
1998
|
+
if (Se && o && o.contentEditable == "false")
|
|
1999
1999
|
return ti(o);
|
|
2000
2000
|
if ((!o || o.contentEditable == "false") && (!i || i.contentEditable == "false")) {
|
|
2001
2001
|
if (o)
|
|
@@ -2005,7 +2005,7 @@ function Ca(t, e) {
|
|
|
2005
2005
|
}
|
|
2006
2006
|
}
|
|
2007
2007
|
function ti(t) {
|
|
2008
|
-
return t.contentEditable = "true",
|
|
2008
|
+
return t.contentEditable = "true", Se && t.draggable && (t.draggable = !1, t.wasDraggable = !0), t;
|
|
2009
2009
|
}
|
|
2010
2010
|
function Ma(t) {
|
|
2011
2011
|
t.contentEditable = "false", t.wasDraggable && (t.draggable = !0, t.wasDraggable = null);
|
|
@@ -2027,23 +2027,23 @@ function Pp(t) {
|
|
|
2027
2027
|
let r = t.cursorWrapper.dom, o = r.nodeName == "IMG";
|
|
2028
2028
|
o ? n.setStart(r.parentNode, me(r) + 1) : n.setStart(r, 0), n.collapse(!0), e.removeAllRanges(), e.addRange(n), !o && !t.state.selection.visible && Te && Lt <= 11 && (r.disabled = !0, r.disabled = !1);
|
|
2029
2029
|
}
|
|
2030
|
-
function
|
|
2030
|
+
function Sc(t, e) {
|
|
2031
2031
|
if (e instanceof B) {
|
|
2032
2032
|
let n = t.docView.descAt(e.from);
|
|
2033
|
-
n != t.lastSelectedViewDesc && (
|
|
2033
|
+
n != t.lastSelectedViewDesc && (Sa(t), n && n.selectNode(), t.lastSelectedViewDesc = n);
|
|
2034
2034
|
} else
|
|
2035
|
-
|
|
2035
|
+
Sa(t);
|
|
2036
2036
|
}
|
|
2037
|
-
function
|
|
2037
|
+
function Sa(t) {
|
|
2038
2038
|
t.lastSelectedViewDesc && (t.lastSelectedViewDesc.parent && t.lastSelectedViewDesc.deselectNode(), t.lastSelectedViewDesc = void 0);
|
|
2039
2039
|
}
|
|
2040
2040
|
function Cs(t, e, n, r) {
|
|
2041
2041
|
return t.someProp("createSelectionBetween", (o) => o(t, e, n)) || H.between(e, n, r);
|
|
2042
2042
|
}
|
|
2043
|
-
function
|
|
2044
|
-
return t.editable && !t.hasFocus() ? !1 :
|
|
2043
|
+
function xa(t) {
|
|
2044
|
+
return t.editable && !t.hasFocus() ? !1 : xc(t);
|
|
2045
2045
|
}
|
|
2046
|
-
function
|
|
2046
|
+
function xc(t) {
|
|
2047
2047
|
let e = t.domSelectionRange();
|
|
2048
2048
|
if (!e.anchorNode)
|
|
2049
2049
|
return !1;
|
|
@@ -2272,7 +2272,7 @@ function Na(t, e, n) {
|
|
|
2272
2272
|
t.domObserver.stop(), e.contentEditable = n, t.domObserver.start();
|
|
2273
2273
|
}
|
|
2274
2274
|
function zp(t) {
|
|
2275
|
-
if (!
|
|
2275
|
+
if (!Se || t.state.selection.$head.parentOffset > 0)
|
|
2276
2276
|
return !1;
|
|
2277
2277
|
let { focusNode: e, focusOffset: n } = t.domSelectionRange();
|
|
2278
2278
|
if (e && e.nodeType == 1 && n == 0 && e.firstChild && e.firstChild.contentEditable == "false") {
|
|
@@ -2497,20 +2497,20 @@ function qp(t, e) {
|
|
|
2497
2497
|
}
|
|
2498
2498
|
return new W(o, i, s);
|
|
2499
2499
|
}
|
|
2500
|
-
const
|
|
2500
|
+
const xe = {}, Ae = {}, Kp = { touchstart: !0, touchmove: !0 };
|
|
2501
2501
|
class Xp {
|
|
2502
2502
|
constructor() {
|
|
2503
2503
|
this.shiftKey = !1, this.mouseDown = null, this.lastKeyCode = null, this.lastKeyCodeTime = 0, this.lastClick = { time: 0, x: 0, y: 0, type: "" }, this.lastSelectionOrigin = null, this.lastSelectionTime = 0, this.lastIOSEnter = 0, this.lastIOSEnterFallbackTimeout = -1, this.lastFocus = 0, this.lastTouch = 0, this.lastChromeDelete = 0, this.composing = !1, this.compositionNode = null, this.composingTimeout = -1, this.compositionNodes = [], this.compositionEndedAt = -2e8, this.compositionID = 1, this.compositionPendingChanges = 0, this.domChangeCount = 0, this.eventHandlers = /* @__PURE__ */ Object.create(null), this.hideSelectionGuard = null;
|
|
2504
2504
|
}
|
|
2505
2505
|
}
|
|
2506
2506
|
function Jp(t) {
|
|
2507
|
-
for (let e in
|
|
2508
|
-
let n =
|
|
2507
|
+
for (let e in xe) {
|
|
2508
|
+
let n = xe[e];
|
|
2509
2509
|
t.dom.addEventListener(e, t.input.eventHandlers[e] = (r) => {
|
|
2510
|
-
Gp(t, r) && !
|
|
2510
|
+
Gp(t, r) && !Ss(t, r) && (t.editable || !(r.type in Ae)) && n(t, r);
|
|
2511
2511
|
}, Kp[e] ? { passive: !0 } : void 0);
|
|
2512
2512
|
}
|
|
2513
|
-
|
|
2513
|
+
Se && t.dom.addEventListener("input", () => null), Ni(t);
|
|
2514
2514
|
}
|
|
2515
2515
|
function Pt(t, e) {
|
|
2516
2516
|
t.input.lastSelectionOrigin = e, t.input.lastSelectionTime = Date.now();
|
|
@@ -2524,10 +2524,10 @@ function Yp(t) {
|
|
|
2524
2524
|
function Ni(t) {
|
|
2525
2525
|
t.someProp("handleDOMEvents", (e) => {
|
|
2526
2526
|
for (let n in e)
|
|
2527
|
-
t.input.eventHandlers[n] || t.dom.addEventListener(n, t.input.eventHandlers[n] = (r) =>
|
|
2527
|
+
t.input.eventHandlers[n] || t.dom.addEventListener(n, t.input.eventHandlers[n] = (r) => Ss(t, r));
|
|
2528
2528
|
});
|
|
2529
2529
|
}
|
|
2530
|
-
function
|
|
2530
|
+
function Ss(t, e) {
|
|
2531
2531
|
return t.someProp("handleDOMEvents", (n) => {
|
|
2532
2532
|
let r = n[e.type];
|
|
2533
2533
|
return r ? r(t, e) || e.defaultPrevented : !1;
|
|
@@ -2544,7 +2544,7 @@ function Gp(t, e) {
|
|
|
2544
2544
|
return !0;
|
|
2545
2545
|
}
|
|
2546
2546
|
function Zp(t, e) {
|
|
2547
|
-
!
|
|
2547
|
+
!Ss(t, e) && xe[e.type] && (t.editable || !(e.type in Ae)) && xe[e.type](t, e);
|
|
2548
2548
|
}
|
|
2549
2549
|
Ae.keydown = (t, e) => {
|
|
2550
2550
|
let n = e;
|
|
@@ -2580,7 +2580,7 @@ function Qp(t, e) {
|
|
|
2580
2580
|
let n = e.x - t.clientX, r = e.y - t.clientY;
|
|
2581
2581
|
return n * n + r * r < 100;
|
|
2582
2582
|
}
|
|
2583
|
-
function
|
|
2583
|
+
function xs(t, e, n, r, o) {
|
|
2584
2584
|
if (r == -1)
|
|
2585
2585
|
return !1;
|
|
2586
2586
|
let i = t.state.doc.resolve(r);
|
|
@@ -2617,13 +2617,13 @@ function th(t, e) {
|
|
|
2617
2617
|
return o != null ? (On(t, B.create(t.state.doc, o)), !0) : !1;
|
|
2618
2618
|
}
|
|
2619
2619
|
function nh(t, e, n, r, o) {
|
|
2620
|
-
return
|
|
2620
|
+
return xs(t, "handleClickOn", e, n, r) || t.someProp("handleClick", (i) => i(t, e, r)) || (o ? th(t, n) : eh(t, n));
|
|
2621
2621
|
}
|
|
2622
2622
|
function rh(t, e, n, r) {
|
|
2623
|
-
return
|
|
2623
|
+
return xs(t, "handleDoubleClickOn", e, n, r) || t.someProp("handleDoubleClick", (o) => o(t, e, r));
|
|
2624
2624
|
}
|
|
2625
2625
|
function oh(t, e, n, r) {
|
|
2626
|
-
return
|
|
2626
|
+
return xs(t, "handleTripleClickOn", e, n, r) || t.someProp("handleTripleClick", (o) => o(t, e, r)) || ih(t, n, r);
|
|
2627
2627
|
}
|
|
2628
2628
|
function ih(t, e, n) {
|
|
2629
2629
|
if (n.button != 0)
|
|
@@ -2647,7 +2647,7 @@ function As(t) {
|
|
|
2647
2647
|
return bo(t);
|
|
2648
2648
|
}
|
|
2649
2649
|
const Ic = ze ? "metaKey" : "ctrlKey";
|
|
2650
|
-
|
|
2650
|
+
xe.mousedown = (t, e) => {
|
|
2651
2651
|
let n = e;
|
|
2652
2652
|
t.input.shiftKey = n.shiftKey;
|
|
2653
2653
|
let r = As(t), o = Date.now(), i = "singleClick";
|
|
@@ -2685,7 +2685,7 @@ class sh {
|
|
|
2685
2685
|
return;
|
|
2686
2686
|
let n = this.pos;
|
|
2687
2687
|
this.view.state.doc != this.startDoc && (n = this.view.posAtCoords(Fo(e))), this.updateAllowDefault(e), this.allowDefault || !n ? Pt(this.view, "pointer") : nh(this.view, n.pos, n.inside, e, this.selectNode) ? e.preventDefault() : e.button == 0 && (this.flushed || // Safari ignores clicks on draggable elements
|
|
2688
|
-
|
|
2688
|
+
Se && this.mightDrag && !this.mightDrag.node.isAtom || // Chrome will sometimes treat a node selection as a
|
|
2689
2689
|
// cursor, but still report that the node is selected
|
|
2690
2690
|
// when asked through getSelection. You'll then get a
|
|
2691
2691
|
// situation where clicking at the point where that
|
|
@@ -2701,15 +2701,15 @@ class sh {
|
|
|
2701
2701
|
!this.allowDefault && (Math.abs(this.event.x - e.clientX) > 4 || Math.abs(this.event.y - e.clientY) > 4) && (this.allowDefault = !0);
|
|
2702
2702
|
}
|
|
2703
2703
|
}
|
|
2704
|
-
|
|
2704
|
+
xe.touchstart = (t) => {
|
|
2705
2705
|
t.input.lastTouch = Date.now(), As(t), Pt(t, "pointer");
|
|
2706
2706
|
};
|
|
2707
|
-
|
|
2707
|
+
xe.touchmove = (t) => {
|
|
2708
2708
|
t.input.lastTouch = Date.now(), Pt(t, "pointer");
|
|
2709
2709
|
};
|
|
2710
|
-
|
|
2710
|
+
xe.contextmenu = (t) => As(t);
|
|
2711
2711
|
function Rc(t, e) {
|
|
2712
|
-
return t.composing ? !0 :
|
|
2712
|
+
return t.composing ? !0 : Se && Math.abs(e.timeStamp - t.input.compositionEndedAt) < 500 ? (t.input.compositionEndedAt = -2e8, !0) : !1;
|
|
2713
2713
|
}
|
|
2714
2714
|
const ah = bt ? 5e3 : -1;
|
|
2715
2715
|
Ae.compositionstart = Ae.compositionupdate = (t) => {
|
|
@@ -2789,7 +2789,7 @@ function dh(t, e) {
|
|
|
2789
2789
|
}, 50);
|
|
2790
2790
|
}
|
|
2791
2791
|
const fr = Te && Lt < 15 || Nn && sp < 604;
|
|
2792
|
-
|
|
2792
|
+
xe.copy = Ae.cut = (t, e) => {
|
|
2793
2793
|
let n = e, r = t.state.selection, o = n.type == "cut";
|
|
2794
2794
|
if (r.empty)
|
|
2795
2795
|
return;
|
|
@@ -2842,7 +2842,7 @@ function _c(t, e) {
|
|
|
2842
2842
|
let n = t.someProp("dragCopies", (r) => !r(e));
|
|
2843
2843
|
return n ?? !e[ph];
|
|
2844
2844
|
}
|
|
2845
|
-
|
|
2845
|
+
xe.dragstart = (t, e) => {
|
|
2846
2846
|
let n = e, r = t.input.mouseDown;
|
|
2847
2847
|
if (r && r.done(), !n.dataTransfer)
|
|
2848
2848
|
return;
|
|
@@ -2858,7 +2858,7 @@ Se.dragstart = (t, e) => {
|
|
|
2858
2858
|
let a = (s || t.state.selection).content(), { dom: l, text: c, slice: d } = Ms(t, a);
|
|
2859
2859
|
(!n.dataTransfer.files.length || !be || uc > 120) && n.dataTransfer.clearData(), n.dataTransfer.setData(fr ? "Text" : "text/html", l.innerHTML), n.dataTransfer.effectAllowed = "copyMove", fr || n.dataTransfer.setData("text/plain", c), t.dragging = new zc(d, _c(t, n), s);
|
|
2860
2860
|
};
|
|
2861
|
-
|
|
2861
|
+
xe.dragend = (t) => {
|
|
2862
2862
|
let e = t.dragging;
|
|
2863
2863
|
window.setTimeout(() => {
|
|
2864
2864
|
t.dragging == e && (t.dragging = null);
|
|
@@ -2903,16 +2903,16 @@ Ae.drop = (t, e) => {
|
|
|
2903
2903
|
}
|
|
2904
2904
|
t.focus(), t.dispatch(c.setMeta("uiEvent", "drop"));
|
|
2905
2905
|
};
|
|
2906
|
-
|
|
2906
|
+
xe.focus = (t) => {
|
|
2907
2907
|
t.input.lastFocus = Date.now(), t.focused || (t.domObserver.stop(), t.dom.classList.add("ProseMirror-focused"), t.domObserver.start(), t.focused = !0, setTimeout(() => {
|
|
2908
2908
|
t.docView && t.hasFocus() && !t.domObserver.currentSelection.eq(t.domSelectionRange()) && kt(t);
|
|
2909
2909
|
}, 20));
|
|
2910
2910
|
};
|
|
2911
|
-
|
|
2911
|
+
xe.blur = (t, e) => {
|
|
2912
2912
|
let n = e;
|
|
2913
2913
|
t.focused && (t.domObserver.stop(), t.dom.classList.remove("ProseMirror-focused"), t.domObserver.start(), n.relatedTarget && t.dom.contains(n.relatedTarget) && t.domObserver.currentSelection.clear(), t.focused = !1);
|
|
2914
2914
|
};
|
|
2915
|
-
|
|
2915
|
+
xe.beforeinput = (t, e) => {
|
|
2916
2916
|
if (be && bt && e.inputType == "deleteContentBackward") {
|
|
2917
2917
|
t.domObserver.flushSoon();
|
|
2918
2918
|
let { domChangeCount: r } = t.input;
|
|
@@ -2925,7 +2925,7 @@ Se.beforeinput = (t, e) => {
|
|
|
2925
2925
|
}
|
|
2926
2926
|
};
|
|
2927
2927
|
for (let t in Ae)
|
|
2928
|
-
|
|
2928
|
+
xe[t] = Ae[t];
|
|
2929
2929
|
function hr(t, e) {
|
|
2930
2930
|
if (t == e)
|
|
2931
2931
|
return !0;
|
|
@@ -3067,13 +3067,13 @@ class $ {
|
|
|
3067
3067
|
return this.type instanceof wo;
|
|
3068
3068
|
}
|
|
3069
3069
|
}
|
|
3070
|
-
const
|
|
3070
|
+
const Sn = [], nn = {};
|
|
3071
3071
|
class L {
|
|
3072
3072
|
/**
|
|
3073
3073
|
@internal
|
|
3074
3074
|
*/
|
|
3075
3075
|
constructor(e, n) {
|
|
3076
|
-
this.local = e.length ? e :
|
|
3076
|
+
this.local = e.length ? e : Sn, this.children = n.length ? n : Sn;
|
|
3077
3077
|
}
|
|
3078
3078
|
/**
|
|
3079
3079
|
Create a set of decorations, using the structure of the given
|
|
@@ -3122,7 +3122,7 @@ class L {
|
|
|
3122
3122
|
let l = this.local[a].map(e, r, o);
|
|
3123
3123
|
l && l.type.valid(n, l) ? (s || (s = [])).push(l) : i.onRemove && i.onRemove(this.local[a].spec);
|
|
3124
3124
|
}
|
|
3125
|
-
return this.children.length ? hh(this.children, s || [], e, n, r, o, i) : s ? new L(s.sort(rn),
|
|
3125
|
+
return this.children.length ? hh(this.children, s || [], e, n, r, o, i) : s ? new L(s.sort(rn), Sn) : ye;
|
|
3126
3126
|
}
|
|
3127
3127
|
/**
|
|
3128
3128
|
Add the given array of decorations to the ones in the set,
|
|
@@ -3195,7 +3195,7 @@ class L {
|
|
|
3195
3195
|
}
|
|
3196
3196
|
}
|
|
3197
3197
|
if (o) {
|
|
3198
|
-
let a = new L(o.sort(rn),
|
|
3198
|
+
let a = new L(o.sort(rn), Sn);
|
|
3199
3199
|
return r ? new Nt([a, r]) : a;
|
|
3200
3200
|
}
|
|
3201
3201
|
return r || ye;
|
|
@@ -3227,7 +3227,7 @@ class L {
|
|
|
3227
3227
|
*/
|
|
3228
3228
|
localsInner(e) {
|
|
3229
3229
|
if (this == ye)
|
|
3230
|
-
return
|
|
3230
|
+
return Sn;
|
|
3231
3231
|
if (e.inlineContent || !this.local.some(Bt.is))
|
|
3232
3232
|
return this.local;
|
|
3233
3233
|
let n = [];
|
|
@@ -3281,7 +3281,7 @@ class Nt {
|
|
|
3281
3281
|
n.push(i[s]);
|
|
3282
3282
|
}
|
|
3283
3283
|
}
|
|
3284
|
-
return n ? Ts(r ? n : n.sort(rn)) :
|
|
3284
|
+
return n ? Ts(r ? n : n.sort(rn)) : Sn;
|
|
3285
3285
|
}
|
|
3286
3286
|
// Create a group for the given array of decoration sets, or return
|
|
3287
3287
|
// a single set when possible.
|
|
@@ -3499,7 +3499,7 @@ class wh {
|
|
|
3499
3499
|
this.suppressingSelectionUpdates = !0, setTimeout(() => this.suppressingSelectionUpdates = !1, 50);
|
|
3500
3500
|
}
|
|
3501
3501
|
onSelectionChange() {
|
|
3502
|
-
if (
|
|
3502
|
+
if (xa(this.view)) {
|
|
3503
3503
|
if (this.suppressingSelectionUpdates)
|
|
3504
3504
|
return kt(this.view);
|
|
3505
3505
|
if (Te && Lt <= 11 && !this.view.state.selection.empty) {
|
|
@@ -3543,7 +3543,7 @@ class wh {
|
|
|
3543
3543
|
return;
|
|
3544
3544
|
let n = this.pendingRecords();
|
|
3545
3545
|
n.length && (this.queue = []);
|
|
3546
|
-
let r = e.domSelectionRange(), o = !this.suppressingSelectionUpdates && !this.currentSelection.eq(r) &&
|
|
3546
|
+
let r = e.domSelectionRange(), o = !this.suppressingSelectionUpdates && !this.currentSelection.eq(r) && xa(e) && !this.ignoreSelectionChange(r), i = -1, s = -1, a = !1, l = [];
|
|
3547
3547
|
if (e.editable)
|
|
3548
3548
|
for (let d = 0; d < n.length; d++) {
|
|
3549
3549
|
let u = this.registerMutation(n[d], l);
|
|
@@ -3650,7 +3650,7 @@ function Mh(t, e, n) {
|
|
|
3650
3650
|
to: i,
|
|
3651
3651
|
preserveWhitespace: p.parent.type.whitespace == "pre" ? "full" : !0,
|
|
3652
3652
|
findPositions: c,
|
|
3653
|
-
ruleFromNode:
|
|
3653
|
+
ruleFromNode: Sh,
|
|
3654
3654
|
context: p
|
|
3655
3655
|
});
|
|
3656
3656
|
if (c && c[0].pos != null) {
|
|
@@ -3659,30 +3659,30 @@ function Mh(t, e, n) {
|
|
|
3659
3659
|
}
|
|
3660
3660
|
return { doc: m, sel: h, from: s, to: a };
|
|
3661
3661
|
}
|
|
3662
|
-
function
|
|
3662
|
+
function Sh(t) {
|
|
3663
3663
|
let e = t.pmViewDesc;
|
|
3664
3664
|
if (e)
|
|
3665
3665
|
return e.parseRule();
|
|
3666
3666
|
if (t.nodeName == "BR" && t.parentNode) {
|
|
3667
|
-
if (
|
|
3667
|
+
if (Se && /^(ul|ol)$/i.test(t.parentNode.nodeName)) {
|
|
3668
3668
|
let n = document.createElement("div");
|
|
3669
3669
|
return n.appendChild(document.createElement("li")), { skip: n };
|
|
3670
|
-
} else if (t.parentNode.lastChild == t ||
|
|
3670
|
+
} else if (t.parentNode.lastChild == t || Se && /^(tr|table)$/i.test(t.parentNode.nodeName))
|
|
3671
3671
|
return { ignore: !0 };
|
|
3672
3672
|
} else if (t.nodeName == "IMG" && t.getAttribute("mark-placeholder"))
|
|
3673
3673
|
return { ignore: !0 };
|
|
3674
3674
|
return null;
|
|
3675
3675
|
}
|
|
3676
|
-
const
|
|
3676
|
+
const xh = /^(a|abbr|acronym|b|bd[io]|big|br|button|cite|code|data(list)?|del|dfn|em|i|ins|kbd|label|map|mark|meter|output|q|ruby|s|samp|small|span|strong|su[bp]|time|u|tt|var)$/i;
|
|
3677
3677
|
function Ah(t, e, n, r, o) {
|
|
3678
3678
|
let i = t.input.compositionPendingChanges || (t.composing ? t.input.compositionID : 0);
|
|
3679
3679
|
if (t.input.compositionPendingChanges = 0, e < 0) {
|
|
3680
|
-
let
|
|
3680
|
+
let S = t.input.lastSelectionTime > Date.now() - 50 ? t.input.lastSelectionOrigin : null, _ = ks(t, S);
|
|
3681
3681
|
if (_ && !t.state.selection.eq(_)) {
|
|
3682
3682
|
if (be && bt && t.input.lastKeyCode === 13 && Date.now() - 100 < t.input.lastKeyCodeTime && t.someProp("handleKeyDown", (V) => V(t, Gt(13, "Enter"))))
|
|
3683
3683
|
return;
|
|
3684
3684
|
let z = t.state.tr.setSelection(_);
|
|
3685
|
-
|
|
3685
|
+
S == "pointer" ? z.setMeta("pointer", !0) : S == "key" && z.scrollIntoView(), i && z.setMeta("composition", i), t.dispatch(z);
|
|
3686
3686
|
}
|
|
3687
3687
|
return;
|
|
3688
3688
|
}
|
|
@@ -3691,7 +3691,7 @@ function Ah(t, e, n, r, o) {
|
|
|
3691
3691
|
let l = t.state.selection, c = Mh(t, e, n), d = t.state.doc, u = d.slice(c.from, c.to), f, p;
|
|
3692
3692
|
t.input.lastKeyCode === 8 && Date.now() - 100 < t.input.lastKeyCodeTime ? (f = t.state.selection.to, p = "end") : (f = t.state.selection.from, p = "start"), t.input.lastKeyCode = null;
|
|
3693
3693
|
let h = Dh(u.content, c.doc.content, c.from, f, p);
|
|
3694
|
-
if (h && t.input.domChangeCount++, (Nn && t.input.lastIOSEnter > Date.now() - 225 || bt) && o.some((
|
|
3694
|
+
if (h && t.input.domChangeCount++, (Nn && t.input.lastIOSEnter > Date.now() - 225 || bt) && o.some((S) => S.nodeType == 1 && !xh.test(S.nodeName)) && (!h || h.endA >= h.endB) && t.someProp("handleKeyDown", (S) => S(t, Gt(13, "Enter")))) {
|
|
3695
3695
|
t.input.lastIOSEnter = 0;
|
|
3696
3696
|
return;
|
|
3697
3697
|
}
|
|
@@ -3700,9 +3700,9 @@ function Ah(t, e, n, r, o) {
|
|
|
3700
3700
|
h = { start: l.from, endA: l.to, endB: l.to };
|
|
3701
3701
|
else {
|
|
3702
3702
|
if (c.sel) {
|
|
3703
|
-
let
|
|
3704
|
-
if (
|
|
3705
|
-
let _ = t.state.tr.setSelection(
|
|
3703
|
+
let S = Ba(t, t.state.doc, c.sel);
|
|
3704
|
+
if (S && !S.eq(t.state.selection)) {
|
|
3705
|
+
let _ = t.state.tr.setSelection(S);
|
|
3706
3706
|
i && _.setMeta("composition", i), t.dispatch(_);
|
|
3707
3707
|
}
|
|
3708
3708
|
}
|
|
@@ -3710,17 +3710,17 @@ function Ah(t, e, n, r, o) {
|
|
|
3710
3710
|
}
|
|
3711
3711
|
t.state.selection.from < t.state.selection.to && h.start == h.endB && t.state.selection instanceof H && (h.start > t.state.selection.from && h.start <= t.state.selection.from + 2 && t.state.selection.from >= c.from ? h.start = t.state.selection.from : h.endA < t.state.selection.to && h.endA >= t.state.selection.to - 2 && t.state.selection.to <= c.to && (h.endB += t.state.selection.to - h.endA, h.endA = t.state.selection.to)), Te && Lt <= 11 && h.endB == h.start + 1 && h.endA == h.start && h.start > c.from && c.doc.textBetween(h.start - c.from - 1, h.start - c.from + 1) == " " && (h.start--, h.endA--, h.endB--);
|
|
3712
3712
|
let m = c.doc.resolveNoCache(h.start - c.from), g = c.doc.resolveNoCache(h.endB - c.from), b = d.resolve(h.start), w = m.sameParent(g) && m.parent.inlineContent && b.end() >= h.endA, C;
|
|
3713
|
-
if ((Nn && t.input.lastIOSEnter > Date.now() - 225 && (!w || o.some((
|
|
3713
|
+
if ((Nn && t.input.lastIOSEnter > Date.now() - 225 && (!w || o.some((S) => S.nodeName == "DIV" || S.nodeName == "P")) || !w && m.pos < c.doc.content.size && (!m.sameParent(g) || !m.parent.inlineContent) && (C = Y.findFrom(c.doc.resolve(m.pos + 1), 1, !0)) && C.head > m.pos) && t.someProp("handleKeyDown", (S) => S(t, Gt(13, "Enter")))) {
|
|
3714
3714
|
t.input.lastIOSEnter = 0;
|
|
3715
3715
|
return;
|
|
3716
3716
|
}
|
|
3717
|
-
if (t.state.selection.anchor > h.start && Th(d, h.start, h.endA, m, g) && t.someProp("handleKeyDown", (
|
|
3717
|
+
if (t.state.selection.anchor > h.start && Th(d, h.start, h.endA, m, g) && t.someProp("handleKeyDown", (S) => S(t, Gt(8, "Backspace")))) {
|
|
3718
3718
|
bt && be && t.domObserver.suppressSelectionUpdates();
|
|
3719
3719
|
return;
|
|
3720
3720
|
}
|
|
3721
3721
|
be && h.endB == h.start && (t.input.lastChromeDelete = Date.now()), bt && !w && m.start() != g.start() && g.parentOffset == 0 && m.depth == g.depth && c.sel && c.sel.anchor == c.sel.head && c.sel.head == h.endA && (h.endB -= 2, g = c.doc.resolveNoCache(h.endB - c.from), setTimeout(() => {
|
|
3722
|
-
t.someProp("handleKeyDown", function(
|
|
3723
|
-
return
|
|
3722
|
+
t.someProp("handleKeyDown", function(S) {
|
|
3723
|
+
return S(t, Gt(13, "Enter"));
|
|
3724
3724
|
});
|
|
3725
3725
|
}, 20));
|
|
3726
3726
|
let y = h.start, M = h.endA, k, A, F;
|
|
@@ -3733,15 +3733,15 @@ function Ah(t, e, n, r, o) {
|
|
|
3733
3733
|
)
|
|
3734
3734
|
k = t.state.tr, F.type == "add" ? k.addMark(y, M, F.mark) : k.removeMark(y, M, F.mark);
|
|
3735
3735
|
else if (m.parent.child(m.index()).isText && m.index() == g.index() - (g.textOffset ? 0 : 1)) {
|
|
3736
|
-
let
|
|
3737
|
-
if (t.someProp("handleTextInput", (_) => _(t, y, M,
|
|
3736
|
+
let S = m.parent.textBetween(m.parentOffset, g.parentOffset);
|
|
3737
|
+
if (t.someProp("handleTextInput", (_) => _(t, y, M, S)))
|
|
3738
3738
|
return;
|
|
3739
|
-
k = t.state.tr.insertText(
|
|
3739
|
+
k = t.state.tr.insertText(S, y, M);
|
|
3740
3740
|
}
|
|
3741
3741
|
}
|
|
3742
3742
|
if (k || (k = t.state.tr.replace(y, M, c.doc.slice(h.start - c.from, h.endB - c.from))), c.sel) {
|
|
3743
|
-
let
|
|
3744
|
-
|
|
3743
|
+
let S = Ba(t, k.doc, c.sel);
|
|
3744
|
+
S && !(be && t.composing && S.empty && (h.start != h.endB || t.input.lastChromeDelete < Date.now() - 100) && (S.head == y || S.head == k.mapping.map(M) - 1) || Te && S.empty && S.head == y) && k.setSelection(S);
|
|
3745
3745
|
}
|
|
3746
3746
|
A && k.ensureMarks(A), i && k.setMeta("composition", i), t.dispatch(k.scrollIntoView());
|
|
3747
3747
|
}
|
|
@@ -3900,7 +3900,7 @@ class jc {
|
|
|
3900
3900
|
let h = be ? this.trackWrites = this.domSelectionRange().focusNode : null;
|
|
3901
3901
|
this.composing && (this.input.compositionNode = lh(this)), (i || !this.docView.update(e.doc, c, l, this)) && (this.docView.updateOuterDeco(c), this.docView.destroy(), this.docView = wa(e.doc, c, l, this.dom, this)), h && !this.trackWrites && (p = !0);
|
|
3902
3902
|
}
|
|
3903
|
-
p || !(this.input.mouseDown && this.domObserver.currentSelection.eq(this.domSelectionRange()) && Ip(this)) ? kt(this, p) : (
|
|
3903
|
+
p || !(this.input.mouseDown && this.domObserver.currentSelection.eq(this.domSelectionRange()) && Ip(this)) ? kt(this, p) : (Sc(this, e.selection), this.domObserver.setCurSelection()), this.domObserver.start();
|
|
3904
3904
|
}
|
|
3905
3905
|
this.updatePluginViews(o), !((r = this.dragging) === null || r === void 0) && r.node && !o.doc.eq(e.doc) && this.updateDraggedNode(this.dragging, o), d == "reset" ? this.dom.scrollTop = 0 : d == "to selection" ? this.scrollToSelection() : f && dp(f);
|
|
3906
3906
|
}
|
|
@@ -4154,7 +4154,7 @@ class jc {
|
|
|
4154
4154
|
*/
|
|
4155
4155
|
domSelectionRange() {
|
|
4156
4156
|
let e = this.domSelection();
|
|
4157
|
-
return e ?
|
|
4157
|
+
return e ? Se && this.root.nodeType === 11 && rp(this.dom.ownerDocument) == this.dom && kh(this, e) || e : { focusNode: null, focusOffset: 0, anchorNode: null, anchorOffset: 0 };
|
|
4158
4158
|
}
|
|
4159
4159
|
/**
|
|
4160
4160
|
@internal
|
|
@@ -4402,10 +4402,10 @@ const Mm = () => {
|
|
|
4402
4402
|
return Ze;
|
|
4403
4403
|
}, Ii = (t) => Mm().has(t), Ri = (t) => Xa(Pn ? ie.env[t.toUpperCase().replaceAll("-", "_")] : Cm.getItem(t)), Yc = (t) => Ii("--" + t) || Ri(t) !== null;
|
|
4404
4404
|
Yc("production");
|
|
4405
|
-
const
|
|
4406
|
-
|
|
4405
|
+
const Sm = Pn && fm(ie.env.FORCE_COLOR, ["true", "1", "2"]);
|
|
4406
|
+
Sm || !Ii("--no-colors") && // @todo deprecate --no-colors
|
|
4407
4407
|
!Yc("no-color") && (!Pn || ie.stdout.isTTY) && (!Pn || Ii("--color") || Ri("COLORTERM") !== null || (Ri("TERM") || "").includes("color"));
|
|
4408
|
-
const
|
|
4408
|
+
const xm = (
|
|
4409
4409
|
/** @type {Document} */
|
|
4410
4410
|
typeof document < "u" ? document : {}
|
|
4411
4411
|
);
|
|
@@ -4546,7 +4546,7 @@ const Lm = (t) => new Rm().digest(t), Fm = (t) => {
|
|
|
4546
4546
|
for (let n = 0; n < t.byteLength; n++)
|
|
4547
4547
|
e += $h(t[n]);
|
|
4548
4548
|
return btoa(e);
|
|
4549
|
-
}, Bm = (t) =>
|
|
4549
|
+
}, Bm = (t) => Sf.from(t.buffer, t.byteOffset, t.byteLength).toString("base64"), zm = Jc ? Fm : Bm, _m = (t) => Yh((e) => Pi(e, t)), $m = (t) => {
|
|
4550
4550
|
for (let n = 6; n < t.length; n++)
|
|
4551
4551
|
t[n % 6] = t[n % 6] ^ t[n];
|
|
4552
4552
|
return t.slice(0, 6);
|
|
@@ -4717,7 +4717,7 @@ class Km {
|
|
|
4717
4717
|
if (e == null || e.anchorNode == null) return !1;
|
|
4718
4718
|
const n = this.prosemirrorView._root.createRange();
|
|
4719
4719
|
n.setStart(e.anchorNode, e.anchorOffset), n.setEnd(e.focusNode, e.focusOffset), n.getClientRects().length === 0 && n.startContainer && n.collapsed && n.selectNodeContents(n.startContainer);
|
|
4720
|
-
const o = n.getBoundingClientRect(), i =
|
|
4720
|
+
const o = n.getBoundingClientRect(), i = xm.documentElement;
|
|
4721
4721
|
return o.bottom >= 0 && o.right >= 0 && o.left <= (window.innerWidth || i.clientWidth || 0) && o.top <= (window.innerHeight || i.clientHeight || 0);
|
|
4722
4722
|
}
|
|
4723
4723
|
/**
|
|
@@ -5591,7 +5591,7 @@ var Vt = {
|
|
|
5591
5591
|
220: "\\",
|
|
5592
5592
|
221: "]",
|
|
5593
5593
|
222: "'"
|
|
5594
|
-
},
|
|
5594
|
+
}, So = {
|
|
5595
5595
|
48: ")",
|
|
5596
5596
|
49: "!",
|
|
5597
5597
|
50: "@",
|
|
@@ -5620,10 +5620,10 @@ var Vt = {
|
|
|
5620
5620
|
for (var ge = 0; ge < 10; ge++) Vt[48 + ge] = Vt[96 + ge] = String(ge);
|
|
5621
5621
|
for (var ge = 1; ge <= 24; ge++) Vt[ge + 111] = "F" + ge;
|
|
5622
5622
|
for (var ge = 65; ge <= 90; ge++)
|
|
5623
|
-
Vt[ge] = String.fromCharCode(ge + 32),
|
|
5624
|
-
for (var si in Vt)
|
|
5623
|
+
Vt[ge] = String.fromCharCode(ge + 32), So[ge] = String.fromCharCode(ge);
|
|
5624
|
+
for (var si in Vt) So.hasOwnProperty(si) || (So[si] = Vt[si]);
|
|
5625
5625
|
function wg(t) {
|
|
5626
|
-
var e = yg && t.metaKey && t.shiftKey && !t.ctrlKey && !t.altKey || bg && t.shiftKey && t.key && t.key.length == 1 || t.key == "Unidentified", n = !e && t.key || (t.shiftKey ?
|
|
5626
|
+
var e = yg && t.metaKey && t.shiftKey && !t.ctrlKey && !t.altKey || bg && t.shiftKey && t.key && t.key.length == 1 || t.key == "Unidentified", n = !e && t.key || (t.shiftKey ? So : Vt)[t.keyCode] || t.key || "Unidentified";
|
|
5627
5627
|
return n == "Esc" && (n = "Escape"), n == "Del" && (n = "Delete"), n == "Left" && (n = "ArrowLeft"), n == "Up" && (n = "ArrowUp"), n == "Right" && (n = "ArrowRight"), n == "Down" && (n = "ArrowDown"), n;
|
|
5628
5628
|
}
|
|
5629
5629
|
const vg = typeof navigator < "u" ? /Mac|iP(hone|[oa]d)/.test(navigator.platform) : !1;
|
|
@@ -5881,7 +5881,7 @@ zn = new WeakSet(), td = function(e, n) {
|
|
|
5881
5881
|
return r;
|
|
5882
5882
|
}, ft(D, zn);
|
|
5883
5883
|
function _i(t) {
|
|
5884
|
-
const e = Object.entries(t).filter(([n, r]) => n === "attrs" &&
|
|
5884
|
+
const e = Object.entries(t).filter(([n, r]) => n === "attrs" && xf(r) ? !1 : r != null);
|
|
5885
5885
|
return Object.fromEntries(e);
|
|
5886
5886
|
}
|
|
5887
5887
|
var _n, rd, od;
|
|
@@ -5967,7 +5967,7 @@ let $i = cr;
|
|
|
5967
5967
|
function Gn(t, e) {
|
|
5968
5968
|
return e.nodes[t] || e.marks[t] || null;
|
|
5969
5969
|
}
|
|
5970
|
-
function
|
|
5970
|
+
function Sg(t, e) {
|
|
5971
5971
|
return Array.isArray(e) ? e.some((n) => (typeof n == "string" ? n : n.name) === t.name) : e;
|
|
5972
5972
|
}
|
|
5973
5973
|
function Is(t, e) {
|
|
@@ -6088,7 +6088,7 @@ class zo {
|
|
|
6088
6088
|
return a;
|
|
6089
6089
|
}
|
|
6090
6090
|
}
|
|
6091
|
-
function
|
|
6091
|
+
function xg(t, e) {
|
|
6092
6092
|
const n = Vn.fromSchema(e).serializeFragment(t), o = document.implementation.createHTMLDocument().createElement("div");
|
|
6093
6093
|
return o.appendChild(n), o.innerHTML;
|
|
6094
6094
|
}
|
|
@@ -6183,7 +6183,7 @@ const Tg = (t, e) => {
|
|
|
6183
6183
|
const a = r.getMeta("applyInputRules");
|
|
6184
6184
|
return !!a && setTimeout(() => {
|
|
6185
6185
|
let { text: c } = a;
|
|
6186
|
-
typeof c != "string" && (c =
|
|
6186
|
+
typeof c != "string" && (c = xg(P.from(c), i.schema));
|
|
6187
6187
|
const { from: d } = a, u = d + c.length;
|
|
6188
6188
|
li({
|
|
6189
6189
|
editor: t,
|
|
@@ -6267,10 +6267,7 @@ const An = class An {
|
|
|
6267
6267
|
I(this, "extensions");
|
|
6268
6268
|
I(this, "externalExtensions", []);
|
|
6269
6269
|
I(this, "splittableMarks", []);
|
|
6270
|
-
this.editor = r, this.externalExtensions = n || [], this.
|
|
6271
|
-
...o,
|
|
6272
|
-
isExternal: !0
|
|
6273
|
-
})), this.extensions = An.getResolvedExtensions([...e, ...this.externalExtensions]), this.schema = $i.createSchemaByExtensions(this.extensions, r), N(this, $n, id).call(this);
|
|
6270
|
+
this.editor = r, this.externalExtensions = n || [], this.extensions = An.getResolvedExtensions([...e, ...this.externalExtensions]), this.schema = $i.createSchemaByExtensions(this.extensions, r), N(this, $n, id).call(this);
|
|
6274
6271
|
}
|
|
6275
6272
|
/**
|
|
6276
6273
|
* Static method for creating ExtensionService.
|
|
@@ -6347,7 +6344,7 @@ const An = class An {
|
|
|
6347
6344
|
}
|
|
6348
6345
|
a.push(Mg(c));
|
|
6349
6346
|
const d = E(i, "addInputRules", s);
|
|
6350
|
-
|
|
6347
|
+
Sg(i, e.options.enableInputRules) && d && r.push(...d());
|
|
6351
6348
|
const u = E(i, "addPmPlugins", s);
|
|
6352
6349
|
if (u) {
|
|
6353
6350
|
const f = u();
|
|
@@ -6859,7 +6856,7 @@ const ny = (t, e = {}) => ({ tr: n, state: r, dispatch: o }) => {
|
|
|
6859
6856
|
t.removeMark(i.$from.pos, i.$to.pos);
|
|
6860
6857
|
}), !0;
|
|
6861
6858
|
};
|
|
6862
|
-
function
|
|
6859
|
+
function xo(t, e, n = {}) {
|
|
6863
6860
|
const { empty: r, ranges: o } = t.selection, i = e ? Mt(e, t.schema) : null;
|
|
6864
6861
|
if (r)
|
|
6865
6862
|
return !!(t.storedMarks || t.selection.$from.marks()).filter((u) => i ? i.name === u.type.name : !0).find((u) => ur(u.attrs, n, { strict: !1 }));
|
|
@@ -6884,7 +6881,7 @@ function So(t, e, n = {}) {
|
|
|
6884
6881
|
}
|
|
6885
6882
|
const oy = (t, e = {}, n = {}) => ({ state: r, commands: o }) => {
|
|
6886
6883
|
const { extendEmptyMarkRange: i = !1 } = n, s = Mt(t, r.schema);
|
|
6887
|
-
return
|
|
6884
|
+
return xo(r, s, e) ? o.unsetMark(s, { extendEmptyMarkRange: i }) : o.setMark(s, e);
|
|
6888
6885
|
}, iy = () => ({ state: t, tr: e, dispatch: n }) => {
|
|
6889
6886
|
const { selection: r } = e, { ranges: o } = r;
|
|
6890
6887
|
return n && o.forEach(({ $from: i, $to: s }) => {
|
|
@@ -7063,7 +7060,7 @@ const Cy = (t) => !("type" in t), My = (t, e, n) => ({ tr: r, dispatch: o, edito
|
|
|
7063
7060
|
c ? (Array.isArray(e) ? f = e.map((p) => p.text || "").join("") : typeof e == "object" && e && e.text ? f = e.text : f = e, r.insertText(f, a, l)) : (f = s, r.replaceWith(a, l, f)), n.updateSelection && ky(r, r.steps.length - 1, -1), n.applyInputRules && r.setMeta("applyInputRules", { from: a, text: f }), n.applyPasteRules && r.setMeta("applyPasteRules", { from: a, text: f });
|
|
7064
7061
|
}
|
|
7065
7062
|
return !0;
|
|
7066
|
-
},
|
|
7063
|
+
}, Sy = () => ({ state: t, dispatch: e }) => {
|
|
7067
7064
|
const n = t.plugins;
|
|
7068
7065
|
for (let r = 0; r < n.length; r += 1) {
|
|
7069
7066
|
const o = n[r];
|
|
@@ -7084,7 +7081,7 @@ const Cy = (t) => !("type" in t), My = (t, e, n) => ({ tr: r, dispatch: o, edito
|
|
|
7084
7081
|
}
|
|
7085
7082
|
return !1;
|
|
7086
7083
|
};
|
|
7087
|
-
function
|
|
7084
|
+
function xy(t, e = null) {
|
|
7088
7085
|
return function(n, r) {
|
|
7089
7086
|
let { $from: o, $to: i } = n.selection, s = o.blockRange(i);
|
|
7090
7087
|
if (!s)
|
|
@@ -7166,7 +7163,7 @@ function Ey(t) {
|
|
|
7166
7163
|
}
|
|
7167
7164
|
const Py = (t, e = {}) => ({ state: n, dispatch: r }) => {
|
|
7168
7165
|
const o = le(t, n.schema);
|
|
7169
|
-
return
|
|
7166
|
+
return xy(o, e)(n, r);
|
|
7170
7167
|
}, _o = (t, e) => {
|
|
7171
7168
|
for (let n = t.depth; n > 0; n--) {
|
|
7172
7169
|
const r = t.node(n);
|
|
@@ -8363,8 +8360,8 @@ const Py = (t, e = {}) => ({ state: n, dispatch: r }) => {
|
|
|
8363
8360
|
s.ensureMarks(j);
|
|
8364
8361
|
}
|
|
8365
8362
|
return V ? !0 : u.clearNodes();
|
|
8366
|
-
},
|
|
8367
|
-
return i.converter.numbering = Fy(
|
|
8363
|
+
}, S = kd(A.definitions);
|
|
8364
|
+
return i.converter.numbering = Fy(S, A, h), r.listId = S, !n || !M || !l ? c().command(F({ ensureMarks: !1 })).wrapInList(h, r).command(() => ci(s, h)).command(() => di(s, h)).run() : c().command(F({ ensureMarks: !0 })).wrapInList(h, r).command(() => ci(s, h)).command(() => di(s, h)).run();
|
|
8368
8365
|
}, kd = (t) => Math.max(...Object.keys(t).map(Number)) + 1, Fy = (t, e, n) => {
|
|
8369
8366
|
const r = n.name === "orderedList" ? Iy : Ry, o = { ...e }, i = kd(o.abstracts), s = {
|
|
8370
8367
|
...r,
|
|
@@ -8481,7 +8478,7 @@ const Py = (t, e = {}) => ({ state: n, dispatch: r }) => {
|
|
|
8481
8478
|
toggleList: Ly,
|
|
8482
8479
|
toggleMark: oy,
|
|
8483
8480
|
toggleNode: ay,
|
|
8484
|
-
undoInputRule:
|
|
8481
|
+
undoInputRule: Sy,
|
|
8485
8482
|
unsetAllMarks: ry,
|
|
8486
8483
|
unsetMark: ny,
|
|
8487
8484
|
updateAttributes: dy,
|
|
@@ -8584,9 +8581,9 @@ function Cd(t, e, n, { check: r = !1 } = {}) {
|
|
|
8584
8581
|
}
|
|
8585
8582
|
function Md(t, e, n = {}) {
|
|
8586
8583
|
if (!e)
|
|
8587
|
-
return Ao(t, null, n) ||
|
|
8584
|
+
return Ao(t, null, n) || xo(t, null, n);
|
|
8588
8585
|
const r = Pr(e, t.schema);
|
|
8589
|
-
return r === "node" ? Ao(t, e, n) : r === "mark" ?
|
|
8586
|
+
return r === "node" ? Ao(t, e, n) : r === "mark" ? xo(t, e, n) : !1;
|
|
8590
8587
|
}
|
|
8591
8588
|
const zs = ({
|
|
8592
8589
|
tr: t,
|
|
@@ -8611,7 +8608,7 @@ const zs = ({
|
|
|
8611
8608
|
mark: f
|
|
8612
8609
|
});
|
|
8613
8610
|
}), c;
|
|
8614
|
-
},
|
|
8611
|
+
}, Sd = ({ tr: t, from: e, to: n, user: r, date: o }) => {
|
|
8615
8612
|
t.removeMark(e, n, t.doc.type.schema.marks[ue]), t.removeMark(e, n, t.doc.type.schema.marks[$e]);
|
|
8616
8613
|
let i = zs({
|
|
8617
8614
|
tr: t,
|
|
@@ -8633,7 +8630,7 @@ const zs = ({
|
|
|
8633
8630
|
if (l.isInline || ["tableRow", "tableCell"].includes(l.type.name) || (l.attrs.track, l.type.name === "table"))
|
|
8634
8631
|
return !1;
|
|
8635
8632
|
}), a;
|
|
8636
|
-
},
|
|
8633
|
+
}, xd = ({ tr: t, from: e, to: n, user: r, date: o }) => {
|
|
8637
8634
|
let i = zs({
|
|
8638
8635
|
tr: t,
|
|
8639
8636
|
from: e,
|
|
@@ -8789,7 +8786,7 @@ const Od = (t) => {
|
|
|
8789
8786
|
isActive: Md,
|
|
8790
8787
|
isInTable: Od,
|
|
8791
8788
|
isList: Wi,
|
|
8792
|
-
isMarkActive:
|
|
8789
|
+
isMarkActive: xo,
|
|
8793
8790
|
isNodeActive: Ao,
|
|
8794
8791
|
isTextSelection: wd,
|
|
8795
8792
|
posToDOMRect: Ad
|
|
@@ -9254,23 +9251,23 @@ const Od = (t) => {
|
|
|
9254
9251
|
);
|
|
9255
9252
|
let M = !1;
|
|
9256
9253
|
y.forEach((A) => {
|
|
9257
|
-
const { attrs: F } = A,
|
|
9254
|
+
const { attrs: F } = A, S = F.commentId || F.importedId, _ = s.coordsAtPos(w);
|
|
9258
9255
|
rl({
|
|
9259
9256
|
allCommentPositions: f,
|
|
9260
|
-
threadId:
|
|
9257
|
+
threadId: S,
|
|
9261
9258
|
pos: w,
|
|
9262
9259
|
currentBounds: _,
|
|
9263
9260
|
node: b
|
|
9264
9261
|
});
|
|
9265
9262
|
const z = F.internal;
|
|
9266
|
-
M || (M = n ===
|
|
9267
|
-
let V = nb({ activeThreadId: n, threadId:
|
|
9263
|
+
M || (M = n === S);
|
|
9264
|
+
let V = nb({ activeThreadId: n, threadId: S, isInternal: z, editor: t });
|
|
9268
9265
|
const j = $.inline(w, w + b.nodeSize, {
|
|
9269
9266
|
style: `background-color: ${V};`,
|
|
9270
|
-
"data-thread-id":
|
|
9267
|
+
"data-thread-id": S,
|
|
9271
9268
|
class: "comment-highlight"
|
|
9272
9269
|
});
|
|
9273
|
-
M && n !==
|
|
9270
|
+
M && n !== S || u.push(j);
|
|
9274
9271
|
});
|
|
9275
9272
|
const k = Pd({
|
|
9276
9273
|
doc: c,
|
|
@@ -9438,9 +9435,9 @@ const Od = (t) => {
|
|
|
9438
9435
|
const s = e.insertedMark || e.deletionMark || e.formatMark, { type: a, attrs: l } = s, { name: c } = a, { author: d, authorEmail: u, date: f } = l, p = l.id, h = r[0], m = !!(e.insertedMark && e.deletionMark);
|
|
9439
9436
|
let g;
|
|
9440
9437
|
o.doc.descendants((y, M) => {
|
|
9441
|
-
const { marks: k = [] } = y, A = k.filter((
|
|
9438
|
+
const { marks: k = [] } = y, A = k.filter((S) => Vs.includes(S.type.name));
|
|
9442
9439
|
if (!A.length) return;
|
|
9443
|
-
if (A.find((
|
|
9440
|
+
if (A.find((S) => S.attrs.id === p) && (g = y), g) return !1;
|
|
9444
9441
|
});
|
|
9445
9442
|
const { deletionText: b, trackedChangeText: w } = ab({
|
|
9446
9443
|
state: o,
|
|
@@ -9487,7 +9484,7 @@ const Id = ({ state: t, tr: e, step: n, newTr: r, map: o, doc: i, user: s, date:
|
|
|
9487
9484
|
const g = t.apply(r).tr;
|
|
9488
9485
|
if (g.maybeStep(p).failed)
|
|
9489
9486
|
return;
|
|
9490
|
-
const b = p.getMap().map(p.to), w =
|
|
9487
|
+
const b = p.getMap().map(p.to), w = Sd({
|
|
9491
9488
|
tr: g,
|
|
9492
9489
|
from: p.from,
|
|
9493
9490
|
to: b,
|
|
@@ -9499,7 +9496,7 @@ const Id = ({ state: t, tr: e, step: n, newTr: r, map: o, doc: i, user: s, date:
|
|
|
9499
9496
|
o.appendMap(C.getMap(), y), p.from !== b && (m.insertedMark = w, m.step = C), r.selection.eq(g.selection) || r.setSelection(g.selection);
|
|
9500
9497
|
}
|
|
9501
9498
|
if (n.from !== n.to) {
|
|
9502
|
-
const { deletionMark: g, deletionMap: b, nodes: w } =
|
|
9499
|
+
const { deletionMark: g, deletionMap: b, nodes: w } = xd({
|
|
9503
9500
|
tr: r,
|
|
9504
9501
|
from: n.from,
|
|
9505
9502
|
to: n.to,
|
|
@@ -9671,11 +9668,11 @@ const Id = ({ state: t, tr: e, step: n, newTr: r, map: o, doc: i, user: s, date:
|
|
|
9671
9668
|
}, ol = (t) => {
|
|
9672
9669
|
if (t === "initial" || t === "0.4.14") return Object.values(pb);
|
|
9673
9670
|
};
|
|
9674
|
-
var en, bs,
|
|
9671
|
+
var en, bs, x, Bd, zd, qi, Ki, _d, Xi, Ji, Yi, Gi, Zi, Qi, es, ts, ns, rs, $d, Zn, Qn, Vd, Hd, jd, Wd;
|
|
9675
9672
|
const Qs = class Qs extends gg {
|
|
9676
9673
|
constructor(n) {
|
|
9677
9674
|
super();
|
|
9678
|
-
ft(this,
|
|
9675
|
+
ft(this, x);
|
|
9679
9676
|
ft(this, en);
|
|
9680
9677
|
I(this, "extensionService");
|
|
9681
9678
|
I(this, "extensionStorage", {});
|
|
@@ -9743,11 +9740,11 @@ const Qs = class Qs extends gg {
|
|
|
9743
9740
|
// telemetry
|
|
9744
9741
|
telemetry: null
|
|
9745
9742
|
});
|
|
9746
|
-
N(this,
|
|
9743
|
+
N(this, x, Bd).call(this, n), N(this, x, _d).call(this, n), this.setOptions(n);
|
|
9747
9744
|
let r = {
|
|
9748
|
-
docx: () => N(this,
|
|
9749
|
-
text: () => N(this,
|
|
9750
|
-
html: () => N(this,
|
|
9745
|
+
docx: () => N(this, x, zd).call(this, this.options),
|
|
9746
|
+
text: () => N(this, x, qi).call(this, this.options),
|
|
9747
|
+
html: () => N(this, x, qi).call(this, this.options),
|
|
9751
9748
|
default: () => {
|
|
9752
9749
|
console.log("Not implemented.");
|
|
9753
9750
|
}
|
|
@@ -9813,7 +9810,7 @@ const Qs = class Qs extends gg {
|
|
|
9813
9810
|
}
|
|
9814
9811
|
setDocumentMode(n) {
|
|
9815
9812
|
let r = n?.toLowerCase() || "editing";
|
|
9816
|
-
this.extensionService && (this.options.role === "viewer" && (r = "viewing"), this.options.role === "suggester" && r === "editing" && (r = "suggesting"), r === "viewing" ? (this.commands.toggleTrackChangesShowOriginal(), this.setEditable(!1, !1)) : r === "suggesting" ? (N(this,
|
|
9813
|
+
this.extensionService && (this.options.role === "viewer" && (r = "viewing"), this.options.role === "suggester" && r === "editing" && (r = "suggesting"), r === "viewing" ? (this.commands.toggleTrackChangesShowOriginal(), this.setEditable(!1, !1)) : r === "suggesting" ? (N(this, x, Ji).call(this, "TrackChangesBase"), this.commands.disableTrackChangesShowOriginal(), this.commands.enableTrackChanges(), this.setEditable(!0, !1)) : r === "editing" && (N(this, x, Ji).call(this, "TrackChangesBase"), this.commands.disableTrackChangesShowOriginal(), this.commands.disableTrackChanges(), this.setEditable(!0, !1)));
|
|
9817
9814
|
}
|
|
9818
9815
|
/**
|
|
9819
9816
|
* If we are replacing data and have a valid provider, listen for synced event
|
|
@@ -9822,9 +9819,9 @@ const Qs = class Qs extends gg {
|
|
|
9822
9819
|
initializeCollaborationData() {
|
|
9823
9820
|
if (!this.options.isNewFile || !this.options.collaborationProvider) return;
|
|
9824
9821
|
const { collaborationProvider: n } = this.options, r = () => {
|
|
9825
|
-
n.off("synced", r), N(this,
|
|
9822
|
+
n.off("synced", r), N(this, x, Xi).call(this);
|
|
9826
9823
|
};
|
|
9827
|
-
n.synced ? N(this,
|
|
9824
|
+
n.synced ? N(this, x, Xi).call(this) : n.on("synced", r);
|
|
9828
9825
|
}
|
|
9829
9826
|
/**
|
|
9830
9827
|
* Set editor options and update state.
|
|
@@ -9987,14 +9984,13 @@ const Qs = class Qs extends gg {
|
|
|
9987
9984
|
* Export the editor document to DOCX.
|
|
9988
9985
|
*/
|
|
9989
9986
|
async exportDocx({ isFinalDoc: n = !1, commentsType: r, comments: o = [] } = {}) {
|
|
9990
|
-
const i = N(this,
|
|
9987
|
+
const i = N(this, x, jd).call(this, o), s = await this.converter.exportToDocx(
|
|
9991
9988
|
i,
|
|
9992
9989
|
this.schema,
|
|
9993
9990
|
this.storage.image.media,
|
|
9994
9991
|
n,
|
|
9995
9992
|
r,
|
|
9996
|
-
o
|
|
9997
|
-
this
|
|
9993
|
+
o
|
|
9998
9994
|
), a = this.converter.schemaToXml(this.converter.convertedXml["docProps/custom.xml"].elements[0]), l = this.converter.schemaToXml(this.converter.convertedXml["word/styles.xml"].elements[0]), c = this.converter.schemaToXml(this.converter.convertedXml["word/settings.xml"].elements[0]), d = this.converter.schemaToXml(this.converter.convertedXml["word/_rels/document.xml.rels"].elements[0]), u = this.converter.addedMedia, f = this.converter.convertedXml["word/numbering.xml"], p = this.converter.schemaToXml(f.elements[0]), h = {
|
|
9999
9995
|
"word/document.xml": String(s),
|
|
10000
9996
|
"docProps/custom.xml": String(a),
|
|
@@ -10025,7 +10021,7 @@ const Qs = class Qs extends gg {
|
|
|
10025
10021
|
* Destroy the editor.
|
|
10026
10022
|
*/
|
|
10027
10023
|
destroy() {
|
|
10028
|
-
this.emit("destroy"), this.view && this.view.destroy(), N(this,
|
|
10024
|
+
this.emit("destroy"), this.view && this.view.destroy(), N(this, x, Wd).call(this), this.removeAllListeners();
|
|
10029
10025
|
}
|
|
10030
10026
|
static checkIfMigrationsNeeded(n) {
|
|
10031
10027
|
n || (n = "initial");
|
|
@@ -10038,7 +10034,7 @@ const Qs = class Qs extends gg {
|
|
|
10038
10034
|
* @returns {Y.Doc | undefined} Updated Y.Doc if any, otherwise undefined
|
|
10039
10035
|
*/
|
|
10040
10036
|
processCollaborationMigrations() {
|
|
10041
|
-
if (console.debug("[checkVersionMigrations] Current editor version", "0.10.24
|
|
10037
|
+
if (console.debug("[checkVersionMigrations] Current editor version", "0.10.24"), !this.options.ydoc) return;
|
|
10042
10038
|
let r = this.options.ydoc.getMap("meta").get("version");
|
|
10043
10039
|
r || (r = "initial"), console.debug("[checkVersionMigrations] Document version", r);
|
|
10044
10040
|
const o = ol(r) || [], s = this.state.plugins.find((c) => c.key.startsWith("y-sync"));
|
|
@@ -10060,21 +10056,21 @@ const Qs = class Qs extends gg {
|
|
|
10060
10056
|
isNewFile: !0,
|
|
10061
10057
|
shouldLoadComments: !0,
|
|
10062
10058
|
replacedFile: !0
|
|
10063
|
-
}), N(this,
|
|
10059
|
+
}), N(this, x, Zi).call(this), N(this, x, Qi).call(this), this.initDefaultStyles(), this.initializeCollaborationData(!0), this.options.ydoc || (N(this, x, Qn).call(this), N(this, x, Zn).call(this));
|
|
10064
10060
|
}
|
|
10065
10061
|
};
|
|
10066
|
-
en = new WeakMap(), bs = new WeakMap(),
|
|
10062
|
+
en = new WeakMap(), bs = new WeakMap(), x = new WeakSet(), Bd = function(n) {
|
|
10067
10063
|
if (!n.element && n.selector) {
|
|
10068
10064
|
const { selector: r } = n;
|
|
10069
10065
|
r.startsWith("#") || r.startsWith(".") ? n.element = document.querySelector(r) : n.element = document.getElementById(r), ["text", "html"].includes(n.mode) && n.element && n.element.classList.add("sd-super-editor-html");
|
|
10070
10066
|
}
|
|
10071
10067
|
n.element = n.isHeadless ? null : n.element || document.createElement("div");
|
|
10072
10068
|
}, zd = function(n) {
|
|
10073
|
-
N(this,
|
|
10069
|
+
N(this, x, Yi).call(this), N(this, x, Gi).call(this), N(this, x, es).call(this), N(this, x, Zi).call(this), N(this, x, Qi).call(this), this.on("beforeCreate", this.options.onBeforeCreate), this.emit("beforeCreate", { editor: this }), this.on("contentError", this.options.onContentError), this.on("exception", this.options.onException), N(this, x, rs).call(this), this.initDefaultStyles(), this.setDocumentMode(n.documentMode), !this.options.isHeadless && (this.on("create", this.options.onCreate), this.on("update", this.options.onUpdate), this.on("selectionUpdate", this.options.onSelectionUpdate), this.on("transaction", this.options.onTransaction), this.on("focus", N(this, x, Ki)), this.on("blur", this.options.onBlur), this.on("destroy", this.options.onDestroy), this.on("trackedChangesUpdate", this.options.onTrackedChangesUpdate), this.on("commentsLoaded", this.options.onCommentsLoaded), this.on("commentClick", this.options.onCommentClicked), this.on("commentsUpdate", this.options.onCommentsUpdate), this.on("locked", this.options.onDocumentLocked), this.on("collaborationReady", N(this, x, $d)), this.on("paginationUpdate", this.options.onPaginationUpdate), this.on("comment-positions", this.options.onCommentLocationsUpdate), this.initializeCollaborationData(), this.options.ydoc || (N(this, x, Qn).call(this), N(this, x, Zn).call(this)), window.setTimeout(() => {
|
|
10074
10070
|
this.isDestroyed || this.emit("create", { editor: this });
|
|
10075
10071
|
}, 0));
|
|
10076
10072
|
}, qi = function(n) {
|
|
10077
|
-
(!n.extensions || !n.extensions.length) && (this.options.extensions = jk()), N(this,
|
|
10073
|
+
(!n.extensions || !n.extensions.length) && (this.options.extensions = jk()), N(this, x, Yi).call(this), N(this, x, Gi).call(this), N(this, x, es).call(this), this.on("beforeCreate", this.options.onBeforeCreate), this.emit("beforeCreate", { editor: this }), this.on("contentError", this.options.onContentError), N(this, x, rs).call(this), this.on("create", this.options.onCreate), this.on("update", this.options.onUpdate), this.on("selectionUpdate", this.options.onSelectionUpdate), this.on("transaction", this.options.onTransaction), this.on("focus", N(this, x, Ki)), this.on("blur", this.options.onBlur), this.on("destroy", this.options.onDestroy), this.on("commentsLoaded", this.options.onCommentsLoaded), this.on("commentClick", this.options.onCommentClicked), this.on("locked", this.options.onDocumentLocked), window.setTimeout(() => {
|
|
10078
10074
|
this.isDestroyed || this.emit("create", { editor: this });
|
|
10079
10075
|
}, 0);
|
|
10080
10076
|
}, Ki = function({ editor: n, event: r }) {
|
|
@@ -10088,9 +10084,9 @@ en = new WeakMap(), bs = new WeakMap(), S = new WeakSet(), Bd = function(n) {
|
|
|
10088
10084
|
Xi = function() {
|
|
10089
10085
|
if (!this.options.isNewFile) return;
|
|
10090
10086
|
this.options.isNewFile = !1;
|
|
10091
|
-
const n = N(this,
|
|
10087
|
+
const n = N(this, x, ts).call(this), r = this.state.tr.replaceWith(0, this.state.doc.content.size, n);
|
|
10092
10088
|
this.view.dispatch(r), setTimeout(() => {
|
|
10093
|
-
N(this,
|
|
10089
|
+
N(this, x, Qn).call(this), N(this, x, Zn).call(this);
|
|
10094
10090
|
}, 50);
|
|
10095
10091
|
}, Ji = function(n) {
|
|
10096
10092
|
const r = this.extensionService?.plugins.find((i) => i.key.startsWith(n)), o = this.state.plugins.find((i) => i.key.startsWith(n));
|
|
@@ -10143,7 +10139,7 @@ ts = function() {
|
|
|
10143
10139
|
let n;
|
|
10144
10140
|
try {
|
|
10145
10141
|
const { mode: r, fragment: o, isHeadless: i, content: s, loadFromSchema: a } = this.options;
|
|
10146
|
-
r === "docx" ? (n = Cd(this.converter, this.schema, this), n = N(this,
|
|
10142
|
+
r === "docx" ? (n = Cd(this.converter, this.schema, this), n = N(this, x, Hd).call(this, n), this.options.html && (n = N(this, x, ns).call(this, this.options.html)), o && i && (n = ig(o, this.schema))) : (r === "text" || r === "html") && (a ? n = this.schema.nodeFromJSON(s) : s ? n = N(this, x, ns).call(this, s) : n = this.schema.topNodeType.createAndFill());
|
|
10147
10143
|
} catch (r) {
|
|
10148
10144
|
console.error(r), this.emit("contentError", { editor: this, error: r });
|
|
10149
10145
|
}
|
|
@@ -10164,11 +10160,11 @@ ns = function(n) {
|
|
|
10164
10160
|
* Creates PM View.
|
|
10165
10161
|
*/
|
|
10166
10162
|
rs = function() {
|
|
10167
|
-
let n = N(this,
|
|
10163
|
+
let n = N(this, x, ts).call(this);
|
|
10168
10164
|
const r = { schema: this.schema };
|
|
10169
10165
|
this.options.ydoc || (r.doc = n), this.view = new jc(this.options.element, {
|
|
10170
10166
|
...this.options.editorProps,
|
|
10171
|
-
dispatchTransaction: N(this,
|
|
10167
|
+
dispatchTransaction: N(this, x, Vd).bind(this),
|
|
10172
10168
|
state: oo.create(r)
|
|
10173
10169
|
});
|
|
10174
10170
|
const o = this.state.reconfigure({
|
|
@@ -10178,7 +10174,7 @@ rs = function() {
|
|
|
10178
10174
|
const i = this.view.dom;
|
|
10179
10175
|
i.editor = this, this.options.telemetry?.sendReport();
|
|
10180
10176
|
}, $d = function({ editor: n, ydoc: r }) {
|
|
10181
|
-
this.options.collaborationIsReady || (console.debug("🔗 [super-editor] Collaboration ready"), this.options.onCollaborationReady({ editor: n, ydoc: r }), this.options.collaborationIsReady = !0, this.options.isNewFile || (N(this,
|
|
10177
|
+
this.options.collaborationIsReady || (console.debug("🔗 [super-editor] Collaboration ready"), this.options.onCollaborationReady({ editor: n, ydoc: r }), this.options.collaborationIsReady = !0, this.options.isNewFile || (N(this, x, Qn).call(this), N(this, x, Zn).call(this)));
|
|
10182
10178
|
}, /**
|
|
10183
10179
|
* Initialize comments plugin
|
|
10184
10180
|
*/
|
|
@@ -10313,14 +10309,13 @@ class Oe {
|
|
|
10313
10309
|
I(this, "name", "mark");
|
|
10314
10310
|
I(this, "options");
|
|
10315
10311
|
I(this, "storage");
|
|
10316
|
-
I(this, "isExternal");
|
|
10317
10312
|
I(this, "config", {
|
|
10318
10313
|
name: this.name
|
|
10319
10314
|
});
|
|
10320
10315
|
this.config = {
|
|
10321
10316
|
...this.config,
|
|
10322
10317
|
...e
|
|
10323
|
-
}, this.name = this.config.name, this.
|
|
10318
|
+
}, this.name = this.config.name, this.config.addOptions && (this.options = K(
|
|
10324
10319
|
E(this, "addOptions", {
|
|
10325
10320
|
name: this.name
|
|
10326
10321
|
})
|
|
@@ -10920,7 +10915,7 @@ const Mb = Q.create({
|
|
|
10920
10915
|
})) ?? null
|
|
10921
10916
|
};
|
|
10922
10917
|
}
|
|
10923
|
-
}),
|
|
10918
|
+
}), Sb = new G("collaboration"), xb = Q.create({
|
|
10924
10919
|
name: "collaboration",
|
|
10925
10920
|
priority: 1e3,
|
|
10926
10921
|
addOptions() {
|
|
@@ -11357,10 +11352,10 @@ function _b(t) {
|
|
|
11357
11352
|
}), l = !0, w = g), f.forEach((y, M) => {
|
|
11358
11353
|
if (M === 0)
|
|
11359
11354
|
return;
|
|
11360
|
-
let { node: k, pos: A } = y, { lvlText: F, listLevel:
|
|
11355
|
+
let { node: k, pos: A } = y, { lvlText: F, listLevel: S, listNumberingType: _ } = k.attrs;
|
|
11361
11356
|
Array.isArray(w.listLevel) || (w.listLevel = JSON.parse(w.listLevel));
|
|
11362
11357
|
let z = [...w.listLevel.slice(0, -1), w.listLevel.at(-1) + 1];
|
|
11363
|
-
if (!(F === w.lvlText && _ === w.listNumberingType && sl(
|
|
11358
|
+
if (!(F === w.lvlText && _ === w.listNumberingType && sl(S, z))) {
|
|
11364
11359
|
let { selection: j, storedMarks: se } = r, ce = se || j.$to.parentOffset && j.$from.marks();
|
|
11365
11360
|
s.setNodeMarkup(A, void 0, {
|
|
11366
11361
|
...k.attrs,
|
|
@@ -12664,7 +12659,7 @@ function M0(t) {
|
|
|
12664
12659
|
function as(t) {
|
|
12665
12660
|
return t.parent.type.spec.tableRole == "row" && !!t.nodeAfter;
|
|
12666
12661
|
}
|
|
12667
|
-
function
|
|
12662
|
+
function S0(t) {
|
|
12668
12663
|
return t.node(0).resolve(t.pos + t.nodeAfter.nodeSize);
|
|
12669
12664
|
}
|
|
12670
12665
|
function Ws(t, e) {
|
|
@@ -12686,7 +12681,7 @@ function pu(t, e, n = 1) {
|
|
|
12686
12681
|
}
|
|
12687
12682
|
return r;
|
|
12688
12683
|
}
|
|
12689
|
-
function
|
|
12684
|
+
function x0(t, e, n) {
|
|
12690
12685
|
const r = we(e.type.schema).header_cell;
|
|
12691
12686
|
for (let o = 0; o < t.height; o++)
|
|
12692
12687
|
if (e.nodeAt(t.map[n + o * t.width]).type != r)
|
|
@@ -13011,7 +13006,7 @@ function at(t) {
|
|
|
13011
13006
|
}
|
|
13012
13007
|
function yu(t, { map: e, tableStart: n, table: r }, o) {
|
|
13013
13008
|
let i = o > 0 ? -1 : 0;
|
|
13014
|
-
|
|
13009
|
+
x0(e, r, o + i) && (i = o == 0 || o == e.width ? null : 0);
|
|
13015
13010
|
for (let s = 0; s < e.height; s++) {
|
|
13016
13011
|
const a = s * e.width + o;
|
|
13017
13012
|
if (o > 0 && o < e.width && e.map[a - 1] == e.map[a]) {
|
|
@@ -13407,7 +13402,7 @@ function vl(t) {
|
|
|
13407
13402
|
if (n) {
|
|
13408
13403
|
const o = e.doc.resolve(r);
|
|
13409
13404
|
n(
|
|
13410
|
-
e.tr.setSelection(H.between(o,
|
|
13405
|
+
e.tr.setSelection(H.between(o, S0(o))).scrollIntoView()
|
|
13411
13406
|
);
|
|
13412
13407
|
}
|
|
13413
13408
|
return !0;
|
|
@@ -13734,7 +13729,7 @@ function tw(t, e, n) {
|
|
|
13734
13729
|
function nw(t, e) {
|
|
13735
13730
|
var n;
|
|
13736
13731
|
if (e.ctrlKey || e.metaKey) return;
|
|
13737
|
-
const r =
|
|
13732
|
+
const r = Sl(t, e.target);
|
|
13738
13733
|
let o;
|
|
13739
13734
|
if (e.shiftKey && t.state.selection instanceof X)
|
|
13740
13735
|
i(t.state.selection.$anchorCell, e), e.preventDefault();
|
|
@@ -13762,7 +13757,7 @@ function nw(t, e) {
|
|
|
13762
13757
|
let u;
|
|
13763
13758
|
if (d != null)
|
|
13764
13759
|
u = t.state.doc.resolve(d);
|
|
13765
|
-
else if (
|
|
13760
|
+
else if (Sl(t, c.target) != r && (u = fi(t, e), !u))
|
|
13766
13761
|
return s();
|
|
13767
13762
|
u && i(u, c);
|
|
13768
13763
|
}
|
|
@@ -13781,7 +13776,7 @@ function wu(t, e, n) {
|
|
|
13781
13776
|
}
|
|
13782
13777
|
return null;
|
|
13783
13778
|
}
|
|
13784
|
-
function
|
|
13779
|
+
function Sl(t, e) {
|
|
13785
13780
|
for (; e && e != t.dom; e = e.parentNode)
|
|
13786
13781
|
if (e.nodeName == "TD" || e.nodeName == "TH")
|
|
13787
13782
|
return e;
|
|
@@ -13910,7 +13905,7 @@ function sw(t, e, n, r) {
|
|
|
13910
13905
|
let s = -1;
|
|
13911
13906
|
if (i) {
|
|
13912
13907
|
const { left: a, right: l } = i.getBoundingClientRect();
|
|
13913
|
-
e.clientX - a <= n ? s =
|
|
13908
|
+
e.clientX - a <= n ? s = xl(t, e, "left", n) : l - e.clientX <= n && (s = xl(t, e, "right", n));
|
|
13914
13909
|
}
|
|
13915
13910
|
if (s != o.activeHandle) {
|
|
13916
13911
|
if (!r && s !== -1) {
|
|
@@ -13985,7 +13980,7 @@ function dw(t) {
|
|
|
13985
13980
|
t = t.classList && t.classList.contains("ProseMirror") ? null : t.parentNode;
|
|
13986
13981
|
return t;
|
|
13987
13982
|
}
|
|
13988
|
-
function
|
|
13983
|
+
function xl(t, e, n, r) {
|
|
13989
13984
|
const o = n == "right" ? -r : r, i = t.posAtCoords({
|
|
13990
13985
|
left: e.clientX + o,
|
|
13991
13986
|
top: e.clientY
|
|
@@ -14320,7 +14315,7 @@ const mw = (t) => t instanceof X, eo = ({ editor: t }) => {
|
|
|
14320
14315
|
renderDOM({ htmlAttributes: t }) {
|
|
14321
14316
|
return ["th", D.mergeAttributes(this.options.htmlAttributes, t), 0];
|
|
14322
14317
|
}
|
|
14323
|
-
}),
|
|
14318
|
+
}), Su = J.create({
|
|
14324
14319
|
name: "tableRow",
|
|
14325
14320
|
content: "(tableCell | tableHeader)*",
|
|
14326
14321
|
tableRole: "row",
|
|
@@ -14344,7 +14339,7 @@ const mw = (t) => t instanceof X, eo = ({ editor: t }) => {
|
|
|
14344
14339
|
renderDOM({ htmlAttributes: t }) {
|
|
14345
14340
|
return ["tr", D.mergeAttributes(this.options.htmlAttributes, t), 0];
|
|
14346
14341
|
}
|
|
14347
|
-
}),
|
|
14342
|
+
}), xu = J.create({
|
|
14348
14343
|
name: "tableCell",
|
|
14349
14344
|
content: "block+",
|
|
14350
14345
|
tableRole: "cell",
|
|
@@ -14716,9 +14711,9 @@ function uo(t, e) {
|
|
|
14716
14711
|
});
|
|
14717
14712
|
}
|
|
14718
14713
|
function Mw(t, e) {
|
|
14719
|
-
return
|
|
14714
|
+
return Sw(e.doc, (r) => r.type.name === "fieldAnnotation" && r.attrs.fieldId === t);
|
|
14720
14715
|
}
|
|
14721
|
-
function
|
|
14716
|
+
function Sw(t, e) {
|
|
14722
14717
|
let n = null;
|
|
14723
14718
|
return t.descendants((r, o) => {
|
|
14724
14719
|
if (e(r) && (n = { node: r, pos: o }), n) return !1;
|
|
@@ -14747,12 +14742,12 @@ const t1 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
|
14747
14742
|
function ds(t, e, n) {
|
|
14748
14743
|
return Math.min(Math.max(t, n), e);
|
|
14749
14744
|
}
|
|
14750
|
-
class
|
|
14745
|
+
class xw extends Error {
|
|
14751
14746
|
constructor(e) {
|
|
14752
14747
|
super(`Failed to parse color: "${e}"`);
|
|
14753
14748
|
}
|
|
14754
14749
|
}
|
|
14755
|
-
var er =
|
|
14750
|
+
var er = xw;
|
|
14756
14751
|
function Aw(t) {
|
|
14757
14752
|
if (typeof t != "string") throw new er(t);
|
|
14758
14753
|
if (t.trim().toLowerCase() === "transparent") return [0, 0, 0, 0];
|
|
@@ -15895,8 +15890,8 @@ const jw = "track-insert", _u = Oe.create({
|
|
|
15895
15890
|
documentHelpers: Yy,
|
|
15896
15891
|
findTrackedMarkBetween: zs,
|
|
15897
15892
|
getTrackChanges: $s,
|
|
15898
|
-
markDeletion:
|
|
15899
|
-
markInsertion:
|
|
15893
|
+
markDeletion: xd,
|
|
15894
|
+
markInsertion: Sd,
|
|
15900
15895
|
markWrapping: db,
|
|
15901
15896
|
parseFormatList: fs,
|
|
15902
15897
|
removeMarkStep: Ld,
|
|
@@ -16429,11 +16424,11 @@ function Rl(t) {
|
|
|
16429
16424
|
var k = Rr(n), A = "clientHeight", F = "clientWidth";
|
|
16430
16425
|
if (k === Le(n) && (k = Wt(n), Ct(k).position !== "static" && a === "absolute" && (A = "scrollHeight", F = "scrollWidth")), k = k, o === De || (o === Ne || o === Ue) && i === Mr) {
|
|
16431
16426
|
y = We;
|
|
16432
|
-
var
|
|
16427
|
+
var S = u && k === M && M.visualViewport ? M.visualViewport.height : (
|
|
16433
16428
|
// $FlowFixMe[prop-missing]
|
|
16434
16429
|
k[A]
|
|
16435
16430
|
);
|
|
16436
|
-
m -=
|
|
16431
|
+
m -= S - r.height, m *= l ? 1 : -1;
|
|
16437
16432
|
}
|
|
16438
16433
|
if (o === Ne || (o === De || o === We) && i === Mr) {
|
|
16439
16434
|
C = Ue;
|
|
@@ -16555,7 +16550,7 @@ function Mv(t, e) {
|
|
|
16555
16550
|
y: l
|
|
16556
16551
|
};
|
|
16557
16552
|
}
|
|
16558
|
-
function
|
|
16553
|
+
function Sv(t) {
|
|
16559
16554
|
var e, n = Wt(t), r = Js(t), o = (e = t.ownerDocument) == null ? void 0 : e.body, i = sn(n.scrollWidth, n.clientWidth, o ? o.scrollWidth : 0, o ? o.clientWidth : 0), s = sn(n.scrollHeight, n.clientHeight, o ? o.scrollHeight : 0, o ? o.clientHeight : 0), a = -r.scrollLeft + Ys(t), l = -r.scrollTop;
|
|
16560
16555
|
return Ct(o || n).direction === "rtl" && (a += sn(n.clientWidth, o ? o.clientWidth : 0) - i), {
|
|
16561
16556
|
width: i,
|
|
@@ -16588,12 +16583,12 @@ function hs(t) {
|
|
|
16588
16583
|
bottom: t.y + t.height
|
|
16589
16584
|
});
|
|
16590
16585
|
}
|
|
16591
|
-
function
|
|
16586
|
+
function xv(t, e) {
|
|
16592
16587
|
var n = Fn(t, !1, e === "fixed");
|
|
16593
16588
|
return n.top = n.top + t.clientTop, n.left = n.left + t.clientLeft, n.bottom = n.top + t.clientHeight, n.right = n.left + t.clientWidth, n.width = t.clientWidth, n.height = t.clientHeight, n.x = n.left, n.y = n.top, n;
|
|
16594
16589
|
}
|
|
16595
16590
|
function Fl(t, e, n) {
|
|
16596
|
-
return e === Hu ? hs(Mv(t, n)) : un(e) ?
|
|
16591
|
+
return e === Hu ? hs(Mv(t, n)) : un(e) ? xv(e, n) : hs(Sv(Wt(t)));
|
|
16597
16592
|
}
|
|
16598
16593
|
function Av(t) {
|
|
16599
16594
|
var e = ar(Vo(t)), n = ["absolute", "fixed"].indexOf(Ct(t).position) >= 0, r = n && je(t) ? Rr(t) : t;
|
|
@@ -16655,17 +16650,17 @@ function Gu(t) {
|
|
|
16655
16650
|
}
|
|
16656
16651
|
return l;
|
|
16657
16652
|
}
|
|
16658
|
-
function
|
|
16653
|
+
function Sr(t, e) {
|
|
16659
16654
|
e === void 0 && (e = {});
|
|
16660
16655
|
var n = e, r = n.placement, o = r === void 0 ? t.placement : r, i = n.strategy, s = i === void 0 ? t.strategy : i, a = n.boundary, l = a === void 0 ? Xw : a, c = n.rootBoundary, d = c === void 0 ? Hu : c, u = n.elementContext, f = u === void 0 ? Yn : u, p = n.altBoundary, h = p === void 0 ? !1 : p, m = n.padding, g = m === void 0 ? 0 : m, b = Xu(typeof g != "number" ? g : Ju(g, Ir)), w = f === Yn ? Jw : Yn, C = t.rects.popper, y = t.elements[h ? w : f], M = Ov(un(y) ? y : y.contextElement || Wt(t.elements.popper), l, d, s), k = Fn(t.elements.reference), A = Gu({
|
|
16661
16656
|
reference: k,
|
|
16662
16657
|
element: C,
|
|
16663
16658
|
placement: o
|
|
16664
|
-
}), F = hs(Object.assign({}, C, A)),
|
|
16665
|
-
top: M.top -
|
|
16666
|
-
bottom:
|
|
16667
|
-
left: M.left -
|
|
16668
|
-
right:
|
|
16659
|
+
}), F = hs(Object.assign({}, C, A)), S = f === Yn ? F : k, _ = {
|
|
16660
|
+
top: M.top - S.top + b.top,
|
|
16661
|
+
bottom: S.bottom - M.bottom + b.bottom,
|
|
16662
|
+
left: M.left - S.left + b.left,
|
|
16663
|
+
right: S.right - M.right + b.right
|
|
16669
16664
|
}, z = t.modifiersData.offset;
|
|
16670
16665
|
if (f === Yn && z) {
|
|
16671
16666
|
var V = z[o];
|
|
@@ -16685,7 +16680,7 @@ function Tv(t, e) {
|
|
|
16685
16680
|
});
|
|
16686
16681
|
f.length === 0 && (f = u);
|
|
16687
16682
|
var p = f.reduce(function(h, m) {
|
|
16688
|
-
return h[m] =
|
|
16683
|
+
return h[m] = Sr(t, {
|
|
16689
16684
|
placement: m,
|
|
16690
16685
|
boundary: o,
|
|
16691
16686
|
rootBoundary: i,
|
|
@@ -16714,8 +16709,8 @@ function Nv(t) {
|
|
|
16714
16709
|
flipVariations: h,
|
|
16715
16710
|
allowedAutoPlacements: m
|
|
16716
16711
|
}) : Ee);
|
|
16717
|
-
}, []), M = e.rects.reference, k = e.rects.popper, A = /* @__PURE__ */ new Map(), F = !0,
|
|
16718
|
-
var z = y[_], V = rt(z), j = Bn(z) === Rn, se = [De, We].indexOf(V) >= 0, ce = se ? "width" : "height", ae =
|
|
16712
|
+
}, []), M = e.rects.reference, k = e.rects.popper, A = /* @__PURE__ */ new Map(), F = !0, S = y[0], _ = 0; _ < y.length; _++) {
|
|
16713
|
+
var z = y[_], V = rt(z), j = Bn(z) === Rn, se = [De, We].indexOf(V) >= 0, ce = se ? "width" : "height", ae = Sr(e, {
|
|
16719
16714
|
placement: z,
|
|
16720
16715
|
boundary: d,
|
|
16721
16716
|
rootBoundary: u,
|
|
@@ -16727,27 +16722,27 @@ function Nv(t) {
|
|
|
16727
16722
|
if (i && ve.push(ae[V] <= 0), a && ve.push(ae[ee] <= 0, ae[ne] <= 0), ve.every(function(qe) {
|
|
16728
16723
|
return qe;
|
|
16729
16724
|
})) {
|
|
16730
|
-
|
|
16725
|
+
S = z, F = !1;
|
|
16731
16726
|
break;
|
|
16732
16727
|
}
|
|
16733
16728
|
A.set(z, ve);
|
|
16734
16729
|
}
|
|
16735
16730
|
if (F)
|
|
16736
16731
|
for (var ke = h ? 3 : 1, lt = function(Ee) {
|
|
16737
|
-
var Ke = y.find(function(
|
|
16738
|
-
var dt = A.get(
|
|
16732
|
+
var Ke = y.find(function(St) {
|
|
16733
|
+
var dt = A.get(St);
|
|
16739
16734
|
if (dt)
|
|
16740
16735
|
return dt.slice(0, Ee).every(function(fn) {
|
|
16741
16736
|
return fn;
|
|
16742
16737
|
});
|
|
16743
16738
|
});
|
|
16744
16739
|
if (Ke)
|
|
16745
|
-
return
|
|
16740
|
+
return S = Ke, "break";
|
|
16746
16741
|
}, Fe = ke; Fe > 0; Fe--) {
|
|
16747
16742
|
var ct = lt(Fe);
|
|
16748
16743
|
if (ct === "break") break;
|
|
16749
16744
|
}
|
|
16750
|
-
e.placement !==
|
|
16745
|
+
e.placement !== S && (e.modifiersData[r]._skip = !0, e.placement = S, e.reset = !0);
|
|
16751
16746
|
}
|
|
16752
16747
|
}
|
|
16753
16748
|
const Ev = {
|
|
@@ -16777,9 +16772,9 @@ function zl(t) {
|
|
|
16777
16772
|
});
|
|
16778
16773
|
}
|
|
16779
16774
|
function Pv(t) {
|
|
16780
|
-
var e = t.state, n = t.name, r = e.rects.reference, o = e.rects.popper, i = e.modifiersData.preventOverflow, s =
|
|
16775
|
+
var e = t.state, n = t.name, r = e.rects.reference, o = e.rects.popper, i = e.modifiersData.preventOverflow, s = Sr(e, {
|
|
16781
16776
|
elementContext: "reference"
|
|
16782
|
-
}), a =
|
|
16777
|
+
}), a = Sr(e, {
|
|
16783
16778
|
altBoundary: !0
|
|
16784
16779
|
}), l = Bl(s, r), c = Bl(a, o, i), d = zl(l), u = zl(c);
|
|
16785
16780
|
e.modifiersData[n] = {
|
|
@@ -16843,20 +16838,20 @@ function _v(t) {
|
|
|
16843
16838
|
return t === "x" ? "y" : "x";
|
|
16844
16839
|
}
|
|
16845
16840
|
function $v(t) {
|
|
16846
|
-
var e = t.state, n = t.options, r = t.name, o = n.mainAxis, i = o === void 0 ? !0 : o, s = n.altAxis, a = s === void 0 ? !1 : s, l = n.boundary, c = n.rootBoundary, d = n.altBoundary, u = n.padding, f = n.tether, p = f === void 0 ? !0 : f, h = n.tetherOffset, m = h === void 0 ? 0 : h, g =
|
|
16841
|
+
var e = t.state, n = t.options, r = t.name, o = n.mainAxis, i = o === void 0 ? !0 : o, s = n.altAxis, a = s === void 0 ? !1 : s, l = n.boundary, c = n.rootBoundary, d = n.altBoundary, u = n.padding, f = n.tether, p = f === void 0 ? !0 : f, h = n.tetherOffset, m = h === void 0 ? 0 : h, g = Sr(e, {
|
|
16847
16842
|
boundary: l,
|
|
16848
16843
|
rootBoundary: c,
|
|
16849
16844
|
padding: u,
|
|
16850
16845
|
altBoundary: d
|
|
16851
|
-
}), b = rt(e.placement), w = Bn(e.placement), C = !w, y = Xs(b), M = _v(y), k = e.modifiersData.popperOffsets, A = e.rects.reference, F = e.rects.popper,
|
|
16846
|
+
}), b = rt(e.placement), w = Bn(e.placement), C = !w, y = Xs(b), M = _v(y), k = e.modifiersData.popperOffsets, A = e.rects.reference, F = e.rects.popper, S = typeof m == "function" ? m(Object.assign({}, e.rects, {
|
|
16852
16847
|
placement: e.placement
|
|
16853
|
-
})) : m, _ = typeof
|
|
16854
|
-
mainAxis:
|
|
16855
|
-
altAxis:
|
|
16848
|
+
})) : m, _ = typeof S == "number" ? {
|
|
16849
|
+
mainAxis: S,
|
|
16850
|
+
altAxis: S
|
|
16856
16851
|
} : Object.assign({
|
|
16857
16852
|
mainAxis: 0,
|
|
16858
16853
|
altAxis: 0
|
|
16859
|
-
},
|
|
16854
|
+
}, S), z = e.modifiersData.offset ? e.modifiersData.offset[e.placement] : null, V = {
|
|
16860
16855
|
x: 0,
|
|
16861
16856
|
y: 0
|
|
16862
16857
|
};
|
|
@@ -16865,7 +16860,7 @@ function $v(t) {
|
|
|
16865
16860
|
var j, se = y === "y" ? De : Ne, ce = y === "y" ? We : Ue, ae = y === "y" ? "height" : "width", ee = k[y], ne = ee + g[se], ve = ee - g[ce], ke = p ? -F[ae] / 2 : 0, lt = w === Rn ? A[ae] : F[ae], Fe = w === Rn ? -F[ae] : -A[ae], ct = e.elements.arrow, qe = p && ct ? Ks(ct) : {
|
|
16866
16861
|
width: 0,
|
|
16867
16862
|
height: 0
|
|
16868
|
-
}, Ee = e.modifiersData["arrow#persistent"] ? e.modifiersData["arrow#persistent"].padding : Ku(), Ke = Ee[se],
|
|
16863
|
+
}, Ee = e.modifiersData["arrow#persistent"] ? e.modifiersData["arrow#persistent"].padding : Ku(), Ke = Ee[se], St = Ee[ce], dt = sr(0, A[ae], qe[ae]), fn = C ? A[ae] / 2 - ke - dt - Ke - _.mainAxis : lt - dt - Ke - _.mainAxis, xt = C ? -A[ae] / 2 + ke + dt + St + _.mainAxis : Fe + dt + St + _.mainAxis, pn = e.elements.arrow && Rr(e.elements.arrow), Fr = pn ? y === "y" ? pn.clientTop || 0 : pn.clientLeft || 0 : 0, jn = (j = z?.[y]) != null ? j : 0, Br = ee + fn - jn - Fr, zr = ee + xt - jn, Wn = sr(p ? Do(ne, Br) : ne, ee, p ? sn(ve, zr) : ve);
|
|
16869
16864
|
k[y] = Wn, V[y] = Wn - ee;
|
|
16870
16865
|
}
|
|
16871
16866
|
if (a) {
|
|
@@ -17022,11 +17017,11 @@ function Yv(t) {
|
|
|
17022
17017
|
d.reset = !1, y = -1;
|
|
17023
17018
|
continue;
|
|
17024
17019
|
}
|
|
17025
|
-
var M = d.orderedModifiers[y], k = M.fn, A = M.options, F = A === void 0 ? {} : A,
|
|
17020
|
+
var M = d.orderedModifiers[y], k = M.fn, A = M.options, F = A === void 0 ? {} : A, S = M.name;
|
|
17026
17021
|
typeof k == "function" && (d = k({
|
|
17027
17022
|
state: d,
|
|
17028
17023
|
options: F,
|
|
17029
|
-
name:
|
|
17024
|
+
name: S,
|
|
17030
17025
|
instance: p
|
|
17031
17026
|
}) || d);
|
|
17032
17027
|
}
|
|
@@ -17116,7 +17111,7 @@ function nk(t, e) {
|
|
|
17116
17111
|
function rk(t) {
|
|
17117
17112
|
return t.split(/\s+/).filter(Boolean);
|
|
17118
17113
|
}
|
|
17119
|
-
function
|
|
17114
|
+
function xn(t) {
|
|
17120
17115
|
return [].concat(t);
|
|
17121
17116
|
}
|
|
17122
17117
|
function Hl(t, e) {
|
|
@@ -17141,7 +17136,7 @@ function jl(t) {
|
|
|
17141
17136
|
function lr() {
|
|
17142
17137
|
return document.createElement("div");
|
|
17143
17138
|
}
|
|
17144
|
-
function
|
|
17139
|
+
function xr(t) {
|
|
17145
17140
|
return ["Element", "Fragment"].some(function(e) {
|
|
17146
17141
|
return Zs(t, e);
|
|
17147
17142
|
});
|
|
@@ -17156,7 +17151,7 @@ function lk(t) {
|
|
|
17156
17151
|
return !!(t && t._tippy && t._tippy.reference === t);
|
|
17157
17152
|
}
|
|
17158
17153
|
function ck(t) {
|
|
17159
|
-
return
|
|
17154
|
+
return xr(t) ? [t] : sk(t) ? No(t) : Array.isArray(t) ? t : No(document.querySelectorAll(t));
|
|
17160
17155
|
}
|
|
17161
17156
|
function hi(t, e) {
|
|
17162
17157
|
t.forEach(function(n) {
|
|
@@ -17169,7 +17164,7 @@ function Wl(t, e) {
|
|
|
17169
17164
|
});
|
|
17170
17165
|
}
|
|
17171
17166
|
function dk(t) {
|
|
17172
|
-
var e, n =
|
|
17167
|
+
var e, n = xn(t), r = n[0];
|
|
17173
17168
|
return r != null && (e = r.ownerDocument) != null && e.body ? r.ownerDocument : document;
|
|
17174
17169
|
}
|
|
17175
17170
|
function uk(t, e) {
|
|
@@ -17392,18 +17387,18 @@ function lf(t, e) {
|
|
|
17392
17387
|
`, "Plugins: https://atomiks.github.io/tippyjs/v6/plugins/"].join(" "));
|
|
17393
17388
|
});
|
|
17394
17389
|
}
|
|
17395
|
-
var
|
|
17390
|
+
var Sk = function() {
|
|
17396
17391
|
return "innerHTML";
|
|
17397
17392
|
};
|
|
17398
17393
|
function gs(t, e) {
|
|
17399
|
-
t[
|
|
17394
|
+
t[Sk()] = e;
|
|
17400
17395
|
}
|
|
17401
17396
|
function Jl(t) {
|
|
17402
17397
|
var e = lr();
|
|
17403
|
-
return t === !0 ? e.className = Qu : (e.className = ef,
|
|
17398
|
+
return t === !0 ? e.className = Qu : (e.className = ef, xr(t) ? e.appendChild(t) : gs(e, t)), e;
|
|
17404
17399
|
}
|
|
17405
17400
|
function Yl(t, e) {
|
|
17406
|
-
|
|
17401
|
+
xr(e.content) ? (gs(t, ""), t.appendChild(e.content)) : typeof e.content != "function" && (e.allowHTML ? gs(t, e.content) : t.textContent = e.content);
|
|
17407
17402
|
}
|
|
17408
17403
|
function ys(t) {
|
|
17409
17404
|
var e = t.firstElementChild, n = No(e.children);
|
|
@@ -17435,9 +17430,9 @@ function cf(t) {
|
|
|
17435
17430
|
};
|
|
17436
17431
|
}
|
|
17437
17432
|
cf.$$tippy = !0;
|
|
17438
|
-
var
|
|
17433
|
+
var xk = 1, no = [], gi = [];
|
|
17439
17434
|
function Ak(t, e) {
|
|
17440
|
-
var n = Xl(t, Object.assign({}, Ie, af(jl(e)))), r, o, i, s = !1, a = !1, l = !1, c = !1, d, u, f, p = [], h = Vl(Br, n.interactiveDebounce), m, g =
|
|
17435
|
+
var n = Xl(t, Object.assign({}, Ie, af(jl(e)))), r, o, i, s = !1, a = !1, l = !1, c = !1, d, u, f, p = [], h = Vl(Br, n.interactiveDebounce), m, g = xk++, b = null, w = ok(n.plugins), C = {
|
|
17441
17436
|
// Is the instance currently enabled?
|
|
17442
17437
|
isEnabled: !0,
|
|
17443
17438
|
// Is the tippy currently showing and not transitioning out?
|
|
@@ -17475,7 +17470,7 @@ function Ak(t, e) {
|
|
|
17475
17470
|
k.setAttribute("data-tippy-root", ""), k.id = "tippy-" + y.id, y.popper = k, t._tippy = y, k._tippy = y;
|
|
17476
17471
|
var F = w.map(function(v) {
|
|
17477
17472
|
return v.fn(y);
|
|
17478
|
-
}),
|
|
17473
|
+
}), S = t.hasAttribute("aria-expanded");
|
|
17479
17474
|
return pn(), ke(), ee(), ne("onCreate", [y]), n.showOnCreate && qn(), k.addEventListener("mouseenter", function() {
|
|
17480
17475
|
y.props.interactive && y.state.isVisible && y.clearDelayTimeouts();
|
|
17481
17476
|
}), k.addEventListener("mouseleave", function() {
|
|
@@ -17519,7 +17514,7 @@ function Ak(t, e) {
|
|
|
17519
17514
|
function ve() {
|
|
17520
17515
|
var v = y.props.aria;
|
|
17521
17516
|
if (v.content) {
|
|
17522
|
-
var O = "aria-" + v.content, R = k.id, q =
|
|
17517
|
+
var O = "aria-" + v.content, R = k.id, q = xn(y.props.triggerTarget || t);
|
|
17523
17518
|
q.forEach(function(U) {
|
|
17524
17519
|
var Ce = U.getAttribute(O);
|
|
17525
17520
|
if (y.state.isVisible)
|
|
@@ -17532,8 +17527,8 @@ function Ak(t, e) {
|
|
|
17532
17527
|
}
|
|
17533
17528
|
}
|
|
17534
17529
|
function ke() {
|
|
17535
|
-
if (!(
|
|
17536
|
-
var v =
|
|
17530
|
+
if (!(S || !y.props.aria.expanded)) {
|
|
17531
|
+
var v = xn(y.props.triggerTarget || t);
|
|
17537
17532
|
v.forEach(function(O) {
|
|
17538
17533
|
y.props.interactive ? O.setAttribute("aria-expanded", y.state.isVisible && O === j() ? "true" : "false") : O.removeAttribute("aria-expanded");
|
|
17539
17534
|
});
|
|
@@ -17548,7 +17543,7 @@ function Ak(t, e) {
|
|
|
17548
17543
|
if (!(tt.isTouch && (l || v.type === "mousedown"))) {
|
|
17549
17544
|
var O = v.composedPath && v.composedPath()[0] || v.target;
|
|
17550
17545
|
if (!(y.props.interactive && Ul(k, O))) {
|
|
17551
|
-
if (
|
|
17546
|
+
if (xn(y.props.triggerTarget || t).some(function(R) {
|
|
17552
17547
|
return Ul(R, O);
|
|
17553
17548
|
})) {
|
|
17554
17549
|
if (tt.isTouch || y.state.isVisible && y.props.trigger.indexOf("click") >= 0)
|
|
@@ -17575,7 +17570,7 @@ function Ak(t, e) {
|
|
|
17575
17570
|
var v = se();
|
|
17576
17571
|
v.removeEventListener("mousedown", Fe, !0), v.removeEventListener("touchend", Fe, Yt), v.removeEventListener("touchstart", qe, Yt), v.removeEventListener("touchmove", ct, Yt);
|
|
17577
17572
|
}
|
|
17578
|
-
function
|
|
17573
|
+
function St(v, O) {
|
|
17579
17574
|
fn(v, function() {
|
|
17580
17575
|
!y.state.isVisible && k.parentNode && k.parentNode.contains(k) && O();
|
|
17581
17576
|
});
|
|
@@ -17592,9 +17587,9 @@ function Ak(t, e) {
|
|
|
17592
17587
|
return O();
|
|
17593
17588
|
mi(R, "remove", u), mi(R, "add", q), u = q;
|
|
17594
17589
|
}
|
|
17595
|
-
function
|
|
17590
|
+
function xt(v, O, R) {
|
|
17596
17591
|
R === void 0 && (R = !1);
|
|
17597
|
-
var q =
|
|
17592
|
+
var q = xn(y.props.triggerTarget || t);
|
|
17598
17593
|
q.forEach(function(U) {
|
|
17599
17594
|
U.addEventListener(v, O, R), p.push({
|
|
17600
17595
|
node: U,
|
|
@@ -17605,21 +17600,21 @@ function Ak(t, e) {
|
|
|
17605
17600
|
});
|
|
17606
17601
|
}
|
|
17607
17602
|
function pn() {
|
|
17608
|
-
z() && (
|
|
17603
|
+
z() && (xt("touchstart", jn, {
|
|
17609
17604
|
passive: !0
|
|
17610
|
-
}),
|
|
17605
|
+
}), xt("touchend", zr, {
|
|
17611
17606
|
passive: !0
|
|
17612
17607
|
})), rk(y.props.trigger).forEach(function(v) {
|
|
17613
17608
|
if (v !== "manual")
|
|
17614
|
-
switch (
|
|
17609
|
+
switch (xt(v, jn), v) {
|
|
17615
17610
|
case "mouseenter":
|
|
17616
|
-
|
|
17611
|
+
xt("mouseleave", zr);
|
|
17617
17612
|
break;
|
|
17618
17613
|
case "focus":
|
|
17619
|
-
|
|
17614
|
+
xt(gk ? "focusout" : "blur", Wn);
|
|
17620
17615
|
break;
|
|
17621
17616
|
case "focusin":
|
|
17622
|
-
|
|
17617
|
+
xt("focusout", Wn);
|
|
17623
17618
|
break;
|
|
17624
17619
|
}
|
|
17625
17620
|
});
|
|
@@ -17778,7 +17773,7 @@ function Ak(t, e) {
|
|
|
17778
17773
|
var O = y.props, R = Xl(t, Object.assign({}, O, jl(v), {
|
|
17779
17774
|
ignoreAttributes: !0
|
|
17780
17775
|
}));
|
|
17781
|
-
y.props = R, pn(), O.interactiveDebounce !== R.interactiveDebounce && (lt(), h = Vl(Br, R.interactiveDebounce)), O.triggerTarget && !R.triggerTarget ?
|
|
17776
|
+
y.props = R, pn(), O.interactiveDebounce !== R.interactiveDebounce && (lt(), h = Vl(Br, R.interactiveDebounce)), O.triggerTarget && !R.triggerTarget ? xn(O.triggerTarget).forEach(function(q) {
|
|
17782
17777
|
q.removeAttribute("aria-expanded");
|
|
17783
17778
|
}) : R.triggerTarget && t.removeAttribute("aria-expanded"), ke(), ee(), A && A(O, R), y.popperInstance && (_r(), At().forEach(function(q) {
|
|
17784
17779
|
requestAnimationFrame(q._tippy.popperInstance.forceUpdate);
|
|
@@ -17820,7 +17815,7 @@ function Ak(t, e) {
|
|
|
17820
17815
|
var U = ce(), Ce = U.box, Be = U.content;
|
|
17821
17816
|
y.props.animation && (hi([Ce, Be], q), Wl([Ce, Be], "hidden"));
|
|
17822
17817
|
}
|
|
17823
|
-
ve(), ke(), y.props.animation ? V() &&
|
|
17818
|
+
ve(), ke(), y.props.animation ? V() && St(q, y.unmount) : y.unmount();
|
|
17824
17819
|
}
|
|
17825
17820
|
}
|
|
17826
17821
|
function ff(v) {
|
|
@@ -17845,7 +17840,7 @@ function Lr(t, e) {
|
|
|
17845
17840
|
plugins: n
|
|
17846
17841
|
}), o = ck(t);
|
|
17847
17842
|
if (ie.env.NODE_ENV !== "production") {
|
|
17848
|
-
var i =
|
|
17843
|
+
var i = xr(r.content), s = o.length > 1;
|
|
17849
17844
|
gt(i && s, ["tippy() was passed an Element as the `content` prop, but more than", "one tippy instance was created by this invocation. This means the", "content element will only be appended to the last tippy instance.", `
|
|
17850
17845
|
|
|
17851
17846
|
`, "Instead, pass the .innerHTML of the element, or use a function that", "returns a cloned version of the element instead.", `
|
|
@@ -17857,7 +17852,7 @@ function Lr(t, e) {
|
|
|
17857
17852
|
var d = c && Ak(c, r);
|
|
17858
17853
|
return d && l.push(d), l;
|
|
17859
17854
|
}, []);
|
|
17860
|
-
return
|
|
17855
|
+
return xr(t) ? a[0] : a;
|
|
17861
17856
|
}
|
|
17862
17857
|
Lr.defaultProps = Ie;
|
|
17863
17858
|
Lr.setDefaultProps = Ck;
|
|
@@ -18154,7 +18149,7 @@ const Bk = !1, zk = Q.create({
|
|
|
18154
18149
|
if (!e.converter) return L.empty;
|
|
18155
18150
|
const r = e.converter.pageStyles?.pageSize, { width: o, height: i } = r;
|
|
18156
18151
|
if (!o || !i) return L.empty;
|
|
18157
|
-
const s = [
|
|
18152
|
+
const s = [Sb, on], { state: a } = t, l = oo.create({
|
|
18158
18153
|
schema: a.schema,
|
|
18159
18154
|
doc: a.doc,
|
|
18160
18155
|
plugins: a.plugins.filter((h) => s.includes(h.key))
|
|
@@ -18195,7 +18190,7 @@ function Vk(t, e, n, r) {
|
|
|
18195
18190
|
}
|
|
18196
18191
|
}
|
|
18197
18192
|
if (ce || se) {
|
|
18198
|
-
const ae = e.state.doc.resolve(j), ee = _o(ae, (
|
|
18193
|
+
const ae = e.state.doc.resolve(j), ee = _o(ae, (St) => St.type.name === "tableRow");
|
|
18199
18194
|
ee && (V = ee.node, j = ee.pos);
|
|
18200
18195
|
const {
|
|
18201
18196
|
top: ne,
|
|
@@ -18216,8 +18211,8 @@ function Vk(t, e, n, r) {
|
|
|
18216
18211
|
u = yi(s, i, r, y), d = bi(s, i, r, M, l);
|
|
18217
18212
|
const k = c - C.bottom, { node: A } = Zl(k), F = $.widget(t.content.size, A, { key: "stable-key" });
|
|
18218
18213
|
o.push(F);
|
|
18219
|
-
const
|
|
18220
|
-
return o.push($.widget(t.content.size,
|
|
18214
|
+
const S = wi({ editor: n, footer: d, isLastFooter: !0 });
|
|
18215
|
+
return o.push($.widget(t.content.size, S, { key: "stable-key" })), o.forEach((_) => {
|
|
18221
18216
|
const V = _.type.toDOM?.querySelector('span[data-id="auto-total-pages"]');
|
|
18222
18217
|
V && (V.innerText = l);
|
|
18223
18218
|
}), o;
|
|
@@ -18303,8 +18298,8 @@ const Ql = (t) => {
|
|
|
18303
18298
|
Fu,
|
|
18304
18299
|
Gd,
|
|
18305
18300
|
Cu,
|
|
18306
|
-
xu,
|
|
18307
18301
|
Su,
|
|
18302
|
+
xu,
|
|
18308
18303
|
Mu,
|
|
18309
18304
|
Du,
|
|
18310
18305
|
Zd,
|
|
@@ -18345,15 +18340,15 @@ const Ql = (t) => {
|
|
|
18345
18340
|
ob,
|
|
18346
18341
|
Mb,
|
|
18347
18342
|
Cu,
|
|
18348
|
-
xu,
|
|
18349
18343
|
Su,
|
|
18344
|
+
xu,
|
|
18350
18345
|
Mu,
|
|
18351
18346
|
Du,
|
|
18352
18347
|
Zd,
|
|
18353
18348
|
Nu,
|
|
18354
18349
|
_w,
|
|
18355
18350
|
Eu,
|
|
18356
|
-
|
|
18351
|
+
xb,
|
|
18357
18352
|
Nb,
|
|
18358
18353
|
qw,
|
|
18359
18354
|
_u,
|