@harbour-enterprises/superdoc 0.9.22 → 0.9.23
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/{index-YqE5-6V1.cjs → index-BXKGjuVW.cjs} +1 -1
- package/dist/chunks/{index-DHS2ANjv.cjs → index-CqRwYOdx.cjs} +1 -1
- package/dist/chunks/{index-XHRxRUhd.es.js → index-DjLrg1eZ.es.js} +2 -2
- package/dist/chunks/{index-Dd_ce0Er.es.js → index-dZKHAFXF.es.js} +1 -1
- package/dist/chunks/{super-editor.es-CMTCdDpB.cjs → super-editor.es-6eI_Ba7J.cjs} +58 -58
- package/dist/chunks/{super-editor.es-Biu3hzvL.es.js → super-editor.es-B-EAaHla.es.js} +2365 -2333
- package/dist/chunks/{url-Cqg7fbSS.cjs → url-6Xu7gR4T.cjs} +1 -1
- package/dist/chunks/{url-BWFemt_V.es.js → url-BxDGAI6E.es.js} +1 -1
- package/dist/chunks/{xml-js-Bzw8Bo_u.es.js → xml-js-BAML2_fM.es.js} +762 -744
- package/dist/chunks/xml-js-zhwNEV5e.cjs +10 -0
- package/dist/super-editor/chunks/{converter-ClWoW5PX.js → converter-DpRzc-Wm.js} +2 -2
- package/dist/super-editor/chunks/{docx-zipper-B4k46BKl.js → docx-zipper-tpHTzIXH.js} +1 -1
- package/dist/super-editor/chunks/{editor-DZjHTvfC.js → editor-DSlpsUzO.js} +447 -416
- package/dist/super-editor/chunks/{toolbar-CKWbkRLL.js → toolbar-CDed0wTy.js} +2 -2
- package/dist/super-editor/converter.es.js +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/extensions/list-item/list-item.d.ts.map +1 -1
- package/dist/super-editor/extensions/ordered-list/ordered-list.d.ts.map +1 -1
- package/dist/super-editor/file-zipper.es.js +1 -1
- package/dist/super-editor/super-editor.es.js +8 -8
- 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 +3 -3
- package/dist/superdoc.es.js +6 -6
- package/dist/superdoc.umd.js +522 -491
- package/dist/superdoc.umd.js.map +1 -1
- package/package.json +1 -1
- package/dist/chunks/xml-js-Zwb1wsIy.cjs +0 -10
|
@@ -4,12 +4,12 @@ var Gs = (t) => {
|
|
|
4
4
|
};
|
|
5
5
|
var ff = (t, e, n) => e in t ? uf(t, e, { enumerable: !0, configurable: !0, writable: !0, value: n }) : t[e] = n;
|
|
6
6
|
var P = (t, e, n) => ff(t, typeof e != "symbol" ? e + "" : e, n), Ho = (t, e, n) => e.has(t) || Gs("Cannot " + n);
|
|
7
|
-
var
|
|
7
|
+
var Qe = (t, e, n) => (Ho(t, e, "read from private field"), n ? n.call(t) : e.get(t)), ft = (t, e, n) => e.has(t) ? Gs("Cannot add the same private member more than once") : e instanceof WeakSet ? e.add(t) : e.set(t, n), jo = (t, e, n, r) => (Ho(t, e, "write to private field"), r ? r.call(t, n) : e.set(t, n), n), I = (t, e, n) => (Ho(t, e, "access private method"), n);
|
|
8
8
|
import * as T from "yjs";
|
|
9
9
|
import { UndoManager as pf, Item as hf, ContentType as mf, Text as gf, XmlElement as yf } from "yjs";
|
|
10
|
-
import { P as G, a as Z, M as lr, N as B, S as J, T as V, b as H, D as zn, F as E, c as Mn, d as bf, e as Jl, A as Mr, p as ie, B as wf, f as Yl, i as vf, g as
|
|
10
|
+
import { P as G, a as Z, M as lr, N as B, S as J, T as V, b as H, D as zn, F as E, c as Mn, d as bf, e as Jl, A as Mr, p as ie, B as wf, f as Yl, i as vf, g as wt, l as Ar, h as jt, j as Gl, r as Zl, R as an, o as cr, k as Vt, m as bi, n as Ql, q as ue, s as Ve, v as Do, t as vn, u as kf, w as xe, x as to, y as ec, z as kn, C as Wo, E as Uo, G as qo, H as no, I as Cf, J as Zs, K as Sf, L as xf } from "./converter-DpRzc-Wm.js";
|
|
11
11
|
import { ref as Qs, computed as Mf, createElementBlock as Xt, openBlock as Jt, withModifiers as Ko, Fragment as Af, renderList as Of, normalizeClass as Tf, createCommentVNode as ea, toDisplayString as Xo, createElementVNode as Df, createApp as Nf } from "vue";
|
|
12
|
-
import { D as ta } from "./docx-zipper-
|
|
12
|
+
import { D as ta } from "./docx-zipper-tpHTzIXH.js";
|
|
13
13
|
function No(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) => {
|
|
@@ -168,7 +168,7 @@ var Pf = /* @__PURE__ */ function(t) {
|
|
|
168
168
|
}, e;
|
|
169
169
|
}(fe);
|
|
170
170
|
const Rf = 500;
|
|
171
|
-
class
|
|
171
|
+
class Ye {
|
|
172
172
|
constructor(e, n) {
|
|
173
173
|
this.items = e, this.eventCount = n;
|
|
174
174
|
}
|
|
@@ -192,24 +192,24 @@ class Je {
|
|
|
192
192
|
return;
|
|
193
193
|
}
|
|
194
194
|
if (o) {
|
|
195
|
-
d.push(new
|
|
195
|
+
d.push(new tt(u.map));
|
|
196
196
|
let p = u.step.map(o.slice(i)), h;
|
|
197
|
-
p && s.maybeStep(p).doc && (h = s.mapping.maps[s.mapping.maps.length - 1], c.push(new
|
|
197
|
+
p && s.maybeStep(p).doc && (h = s.mapping.maps[s.mapping.maps.length - 1], c.push(new tt(h, void 0, void 0, c.length + d.length))), i--, h && o.appendMap(h, i);
|
|
198
198
|
} else
|
|
199
199
|
s.maybeStep(u.step);
|
|
200
200
|
if (u.selection)
|
|
201
|
-
return a = o ? u.selection.map(o.slice(i)) : u.selection, l = new
|
|
201
|
+
return a = o ? u.selection.map(o.slice(i)) : u.selection, l = new Ye(this.items.slice(0, r).append(d.reverse().concat(c)), this.eventCount - 1), !1;
|
|
202
202
|
}, this.items.length, 0), { remaining: l, transform: s, selection: a };
|
|
203
203
|
}
|
|
204
204
|
// Create a new branch with the given transform added.
|
|
205
205
|
addTransform(e, n, r, o) {
|
|
206
206
|
let i = [], s = this.eventCount, a = this.items, l = !o && a.length ? a.get(a.length - 1) : null;
|
|
207
207
|
for (let d = 0; d < e.steps.length; d++) {
|
|
208
|
-
let u = e.steps[d].invert(e.docs[d]), f = new
|
|
208
|
+
let u = e.steps[d].invert(e.docs[d]), f = new tt(e.mapping.maps[d], u, n), p;
|
|
209
209
|
(p = l && l.merge(f)) && (f = p, d ? i.pop() : a = a.slice(0, a.length - 1)), i.push(f), n && (s++, n = void 0), o || (l = f);
|
|
210
210
|
}
|
|
211
211
|
let c = s - r.depth;
|
|
212
|
-
return c > Ff && (a = Lf(a, c), s -= c), new
|
|
212
|
+
return c > Ff && (a = Lf(a, c), s -= c), new Ye(a.append(i), s);
|
|
213
213
|
}
|
|
214
214
|
remapping(e, n) {
|
|
215
215
|
let r = new lr();
|
|
@@ -219,7 +219,7 @@ class Je {
|
|
|
219
219
|
}, e, n), r;
|
|
220
220
|
}
|
|
221
221
|
addMaps(e) {
|
|
222
|
-
return this.eventCount == 0 ? this : new
|
|
222
|
+
return this.eventCount == 0 ? this : new Ye(this.items.append(e.map((n) => new tt(n))), this.eventCount);
|
|
223
223
|
}
|
|
224
224
|
// When the collab module receives remote changes, the history has
|
|
225
225
|
// to know about those, so that it can adjust the steps that were
|
|
@@ -241,14 +241,14 @@ class Je {
|
|
|
241
241
|
let h = i.maps[p];
|
|
242
242
|
if (f.step) {
|
|
243
243
|
let m = e.steps[p].invert(e.docs[p]), g = f.selection && f.selection.map(i.slice(l + 1, p));
|
|
244
|
-
g && a++, r.push(new
|
|
244
|
+
g && a++, r.push(new tt(h, m, g));
|
|
245
245
|
} else
|
|
246
|
-
r.push(new
|
|
246
|
+
r.push(new tt(h));
|
|
247
247
|
}, o);
|
|
248
248
|
let c = [];
|
|
249
249
|
for (let f = n; f < s; f++)
|
|
250
|
-
c.push(new
|
|
251
|
-
let d = this.items.slice(0, o).append(c).append(r), u = new
|
|
250
|
+
c.push(new tt(i.maps[f]));
|
|
251
|
+
let d = this.items.slice(0, o).append(c).append(r), u = new Ye(d, a);
|
|
252
252
|
return u.emptyItemCount() > Rf && (u = u.compress(this.items.length - r.length)), u;
|
|
253
253
|
}
|
|
254
254
|
emptyItemCount() {
|
|
@@ -273,14 +273,14 @@ class Je {
|
|
|
273
273
|
if (r--, c && n.appendMap(c, r), l) {
|
|
274
274
|
let d = s.selection && s.selection.map(n.slice(r));
|
|
275
275
|
d && i++;
|
|
276
|
-
let u = new
|
|
276
|
+
let u = new tt(c.invert(), l, d), f, p = o.length - 1;
|
|
277
277
|
(f = o.length && o[p].merge(u)) ? o[p] = f : o.push(u);
|
|
278
278
|
}
|
|
279
279
|
} else s.map && r--;
|
|
280
|
-
}, this.items.length, 0), new
|
|
280
|
+
}, this.items.length, 0), new Ye(fe.from(o.reverse()), i);
|
|
281
281
|
}
|
|
282
282
|
}
|
|
283
|
-
|
|
283
|
+
Ye.empty = new Ye(fe.empty, 0);
|
|
284
284
|
function Lf(t, e) {
|
|
285
285
|
let n;
|
|
286
286
|
return t.forEach((r, o) => {
|
|
@@ -288,7 +288,7 @@ function Lf(t, e) {
|
|
|
288
288
|
return n = o, !1;
|
|
289
289
|
}), t.slice(n);
|
|
290
290
|
}
|
|
291
|
-
class
|
|
291
|
+
class tt {
|
|
292
292
|
constructor(e, n, r, o) {
|
|
293
293
|
this.map = e, this.step = n, this.selection = r, this.mirrorOffset = o;
|
|
294
294
|
}
|
|
@@ -296,30 +296,30 @@ class et {
|
|
|
296
296
|
if (this.step && e.step && !e.selection) {
|
|
297
297
|
let n = e.step.merge(this.step);
|
|
298
298
|
if (n)
|
|
299
|
-
return new
|
|
299
|
+
return new tt(n.getMap().invert(), n, this.selection);
|
|
300
300
|
}
|
|
301
301
|
}
|
|
302
302
|
}
|
|
303
|
-
class
|
|
303
|
+
class Nt {
|
|
304
304
|
constructor(e, n, r, o, i) {
|
|
305
305
|
this.done = e, this.undone = n, this.prevRanges = r, this.prevTime = o, this.prevComposition = i;
|
|
306
306
|
}
|
|
307
307
|
}
|
|
308
308
|
const Ff = 20;
|
|
309
309
|
function Bf(t, e, n, r) {
|
|
310
|
-
let o = n.getMeta(
|
|
310
|
+
let o = n.getMeta(vt), i;
|
|
311
311
|
if (o)
|
|
312
312
|
return o.historyState;
|
|
313
|
-
n.getMeta($f) && (t = new
|
|
313
|
+
n.getMeta($f) && (t = new Nt(t.done, t.undone, null, 0, -1));
|
|
314
314
|
let s = n.getMeta("appendedTransaction");
|
|
315
315
|
if (n.steps.length == 0)
|
|
316
316
|
return t;
|
|
317
|
-
if (s && s.getMeta(
|
|
318
|
-
return s.getMeta(
|
|
317
|
+
if (s && s.getMeta(vt))
|
|
318
|
+
return s.getMeta(vt).redo ? new Nt(t.done.addTransform(n, void 0, r, ro(e)), t.undone, ra(n.mapping.maps), t.prevTime, t.prevComposition) : new Nt(t.done, t.undone.addTransform(n, void 0, r, ro(e)), null, t.prevTime, t.prevComposition);
|
|
319
319
|
if (n.getMeta("addToHistory") !== !1 && !(s && s.getMeta("addToHistory") === !1)) {
|
|
320
320
|
let a = n.getMeta("composition"), l = t.prevTime == 0 || !s && t.prevComposition != a && (t.prevTime < (n.time || 0) - r.newGroupDelay || !_f(n, t.prevRanges)), c = s ? Jo(t.prevRanges, n.mapping) : ra(n.mapping.maps);
|
|
321
|
-
return new
|
|
322
|
-
} else return (i = n.getMeta("rebased")) ? new
|
|
321
|
+
return new Nt(t.done.addTransform(n, l ? e.selection.getBookmark() : void 0, r, ro(e)), Ye.empty, c, n.time, a ?? t.prevComposition);
|
|
322
|
+
} else return (i = n.getMeta("rebased")) ? new Nt(t.done.rebased(n, i), t.undone.rebased(n, i), Jo(t.prevRanges, n.mapping), t.prevTime, t.prevComposition) : new Nt(t.done.addMaps(n.mapping.maps), t.undone.addMaps(n.mapping.maps), Jo(t.prevRanges, n.mapping), t.prevTime, t.prevComposition);
|
|
323
323
|
}
|
|
324
324
|
function _f(t, e) {
|
|
325
325
|
if (!e)
|
|
@@ -349,11 +349,11 @@ function Jo(t, e) {
|
|
|
349
349
|
return n;
|
|
350
350
|
}
|
|
351
351
|
function zf(t, e, n) {
|
|
352
|
-
let r = ro(e), o =
|
|
352
|
+
let r = ro(e), o = vt.get(e).spec.config, i = (n ? t.undone : t.done).popEvent(e, r);
|
|
353
353
|
if (!i)
|
|
354
354
|
return null;
|
|
355
|
-
let s = i.selection.resolve(i.transform.doc), a = (n ? t.done : t.undone).addTransform(i.transform, e.selection.getBookmark(), o, r), l = new
|
|
356
|
-
return i.transform.setSelection(s).setMeta(
|
|
355
|
+
let s = i.selection.resolve(i.transform.doc), a = (n ? t.done : t.undone).addTransform(i.transform, e.selection.getBookmark(), o, r), l = new Nt(n ? a : i.remaining, n ? i.remaining : a, null, 0, -1);
|
|
356
|
+
return i.transform.setSelection(s).setMeta(vt, { redo: n, historyState: l });
|
|
357
357
|
}
|
|
358
358
|
let Yo = !1, oa = null;
|
|
359
359
|
function ro(t) {
|
|
@@ -368,16 +368,16 @@ function ro(t) {
|
|
|
368
368
|
}
|
|
369
369
|
return Yo;
|
|
370
370
|
}
|
|
371
|
-
const
|
|
371
|
+
const vt = new G("history"), $f = new G("closeHistory");
|
|
372
372
|
function Vf(t = {}) {
|
|
373
373
|
return t = {
|
|
374
374
|
depth: t.depth || 100,
|
|
375
375
|
newGroupDelay: t.newGroupDelay || 500
|
|
376
376
|
}, new Z({
|
|
377
|
-
key:
|
|
377
|
+
key: vt,
|
|
378
378
|
state: {
|
|
379
379
|
init() {
|
|
380
|
-
return new
|
|
380
|
+
return new Nt(Ye.empty, Ye.empty, null, 0, -1);
|
|
381
381
|
},
|
|
382
382
|
apply(e, n, r) {
|
|
383
383
|
return Bf(n, r, e, t);
|
|
@@ -396,7 +396,7 @@ function Vf(t = {}) {
|
|
|
396
396
|
}
|
|
397
397
|
function nc(t, e) {
|
|
398
398
|
return (n, r) => {
|
|
399
|
-
let o =
|
|
399
|
+
let o = vt.getState(n);
|
|
400
400
|
if (!o || (t ? o.undone : o.done).eventCount == 0)
|
|
401
401
|
return !1;
|
|
402
402
|
if (r) {
|
|
@@ -408,11 +408,11 @@ function nc(t, e) {
|
|
|
408
408
|
}
|
|
409
409
|
const rc = nc(!1, !0), oc = nc(!0, !0);
|
|
410
410
|
function zk(t) {
|
|
411
|
-
let e =
|
|
411
|
+
let e = vt.getState(t);
|
|
412
412
|
return e ? e.done.eventCount : 0;
|
|
413
413
|
}
|
|
414
414
|
function $k(t) {
|
|
415
|
-
let e =
|
|
415
|
+
let e = vt.getState(t);
|
|
416
416
|
return e ? e.undone.eventCount : 0;
|
|
417
417
|
}
|
|
418
418
|
function D(t, e, n = {}) {
|
|
@@ -486,7 +486,7 @@ const Hf = Q.create({
|
|
|
486
486
|
return e && e.nodeType == 11 ? e.host : e;
|
|
487
487
|
};
|
|
488
488
|
let wi = null;
|
|
489
|
-
const
|
|
489
|
+
const mt = function(t, e, n) {
|
|
490
490
|
let r = wi || (wi = document.createRange());
|
|
491
491
|
return r.setEnd(t, n ?? t.nodeValue.length), r.setStart(t, e || 0), r;
|
|
492
492
|
}, jf = function() {
|
|
@@ -585,9 +585,9 @@ function Jf(t, e, n) {
|
|
|
585
585
|
return { node: r.startContainer, offset: Math.min($e(r.startContainer), r.startOffset) };
|
|
586
586
|
}
|
|
587
587
|
}
|
|
588
|
-
const
|
|
589
|
-
|
|
590
|
-
const Ci = !Te && /Chrome\/(\d+)/.exec(Wt), we = !!Ci, sc = Ci ? +Ci[1] : 0, Me = !Te && !!
|
|
588
|
+
const st = typeof navigator < "u" ? navigator : null, sa = typeof document < "u" ? document : null, Wt = st && st.userAgent || "", vi = /Edge\/(\d+)/.exec(Wt), ic = /MSIE \d/.exec(Wt), ki = /Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(Wt), Te = !!(ic || ki || vi), Ft = ic ? document.documentMode : ki ? +ki[1] : vi ? +vi[1] : 0, Ge = !Te && /gecko\/(\d+)/i.test(Wt);
|
|
589
|
+
Ge && +(/Firefox\/(\d+)/.exec(Wt) || [0, 0])[1];
|
|
590
|
+
const Ci = !Te && /Chrome\/(\d+)/.exec(Wt), we = !!Ci, sc = Ci ? +Ci[1] : 0, Me = !Te && !!st && /Apple Computer/.test(st.vendor), Tn = Me && (/Mobile\/\w+/.test(Wt) || !!st && st.maxTouchPoints > 2), ze = Tn || (st ? /Mac/.test(st.platform) : !1), Yf = st ? /Win/.test(st.platform) : !1, bt = /Android \d/.test(Wt), Tr = !!sa && "webkitFontSmoothing" in sa.documentElement.style, Gf = Tr ? +(/\bAppleWebKit\/(\d+)/.exec(navigator.userAgent) || [0, 0])[1] : 0;
|
|
591
591
|
function Zf(t) {
|
|
592
592
|
let e = t.defaultView && t.defaultView.visualViewport;
|
|
593
593
|
return e ? {
|
|
@@ -602,7 +602,7 @@ function Zf(t) {
|
|
|
602
602
|
bottom: t.documentElement.clientHeight
|
|
603
603
|
};
|
|
604
604
|
}
|
|
605
|
-
function
|
|
605
|
+
function pt(t, e) {
|
|
606
606
|
return typeof t == "number" ? t : t[e];
|
|
607
607
|
}
|
|
608
608
|
function Qf(t) {
|
|
@@ -622,7 +622,7 @@ function aa(t, e, n) {
|
|
|
622
622
|
continue;
|
|
623
623
|
}
|
|
624
624
|
let a = s, l = a == i.body, c = l ? Zf(i) : Qf(a), d = 0, u = 0;
|
|
625
|
-
if (e.top < c.top +
|
|
625
|
+
if (e.top < c.top + pt(r, "top") ? u = -(c.top - e.top + pt(o, "top")) : e.bottom > c.bottom - pt(r, "bottom") && (u = e.bottom - e.top > c.bottom - c.top ? e.top + pt(o, "top") - c.top : e.bottom - c.bottom + pt(o, "bottom")), e.left < c.left + pt(r, "left") ? d = -(c.left - e.left + pt(o, "left")) : e.right > c.right - pt(r, "right") && (d = e.right - c.right + pt(o, "right")), d || u)
|
|
626
626
|
if (l)
|
|
627
627
|
i.defaultView.scrollBy(d, u);
|
|
628
628
|
else {
|
|
@@ -687,7 +687,7 @@ function cc(t, e) {
|
|
|
687
687
|
if (d.nodeType == 1)
|
|
688
688
|
f = d.getClientRects();
|
|
689
689
|
else if (d.nodeType == 3)
|
|
690
|
-
f =
|
|
690
|
+
f = mt(d).getClientRects();
|
|
691
691
|
else
|
|
692
692
|
continue;
|
|
693
693
|
for (let p = 0; p < f.length; p++) {
|
|
@@ -712,7 +712,7 @@ function rp(t, e) {
|
|
|
712
712
|
let n = t.nodeValue.length, r = document.createRange();
|
|
713
713
|
for (let o = 0; o < n; o++) {
|
|
714
714
|
r.setEnd(t, o + 1), r.setStart(t, o);
|
|
715
|
-
let i =
|
|
715
|
+
let i = Dt(r, 1);
|
|
716
716
|
if (i.top != i.bottom && gs(e, i))
|
|
717
717
|
return { node: t, offset: o + (e.left >= (i.left + i.right) / 2 ? 1 : 0) };
|
|
718
718
|
}
|
|
@@ -777,7 +777,7 @@ function ap(t, e) {
|
|
|
777
777
|
for (let c = s; r && c; c = On(c))
|
|
778
778
|
c.draggable && (r = void 0);
|
|
779
779
|
if (s = op(s, e), r) {
|
|
780
|
-
if (
|
|
780
|
+
if (Ge && r.nodeType == 1 && (o = Math.min(o, r.childNodes.length), o < r.childNodes.length)) {
|
|
781
781
|
let d = r.childNodes[o], u;
|
|
782
782
|
d.nodeName == "IMG" && (u = d.getBoundingClientRect()).right <= e.left && u.bottom > e.top && o++;
|
|
783
783
|
}
|
|
@@ -791,7 +791,7 @@ function ap(t, e) {
|
|
|
791
791
|
function la(t) {
|
|
792
792
|
return t.top < t.bottom || t.left < t.right;
|
|
793
793
|
}
|
|
794
|
-
function
|
|
794
|
+
function Dt(t, e) {
|
|
795
795
|
let n = t.getClientRects();
|
|
796
796
|
if (n.length) {
|
|
797
797
|
let r = n[e < 0 ? 0 : n.length - 1];
|
|
@@ -802,14 +802,14 @@ function Tt(t, e) {
|
|
|
802
802
|
}
|
|
803
803
|
const lp = /[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac]/;
|
|
804
804
|
function uc(t, e, n) {
|
|
805
|
-
let { node: r, offset: o, atom: i } = t.docView.domFromPos(e, n < 0 ? -1 : 1), s = Tr ||
|
|
805
|
+
let { node: r, offset: o, atom: i } = t.docView.domFromPos(e, n < 0 ? -1 : 1), s = Tr || Ge;
|
|
806
806
|
if (r.nodeType == 3)
|
|
807
807
|
if (s && (lp.test(r.nodeValue) || (n < 0 ? !o : o == r.nodeValue.length))) {
|
|
808
|
-
let l =
|
|
809
|
-
if (
|
|
810
|
-
let c =
|
|
808
|
+
let l = Dt(mt(r, o, o), n);
|
|
809
|
+
if (Ge && o && /\s/.test(r.nodeValue[o - 1]) && o < r.nodeValue.length) {
|
|
810
|
+
let c = Dt(mt(r, o - 1, o - 1), -1);
|
|
811
811
|
if (c.top == l.top) {
|
|
812
|
-
let d =
|
|
812
|
+
let d = Dt(mt(r, o, o + 1), -1);
|
|
813
813
|
if (d.top != l.top)
|
|
814
814
|
return qn(d, d.left < c.left);
|
|
815
815
|
}
|
|
@@ -817,7 +817,7 @@ function uc(t, e, n) {
|
|
|
817
817
|
return l;
|
|
818
818
|
} else {
|
|
819
819
|
let l = o, c = o, d = n < 0 ? 1 : -1;
|
|
820
|
-
return n < 0 && !o ? (c++, d = -1) : n >= 0 && o == r.nodeValue.length ? (l--, d = 1) : n < 0 ? l-- : c++, qn(
|
|
820
|
+
return n < 0 && !o ? (c++, d = -1) : n >= 0 && o == r.nodeValue.length ? (l--, d = 1) : n < 0 ? l-- : c++, qn(Dt(mt(r, l, c), d), d < 0);
|
|
821
821
|
}
|
|
822
822
|
if (!t.state.doc.resolve(e - (i || 0)).parent.inlineContent) {
|
|
823
823
|
if (i == null && o && (n < 0 || o == $e(r))) {
|
|
@@ -833,19 +833,19 @@ function uc(t, e, n) {
|
|
|
833
833
|
return Zo(r.getBoundingClientRect(), n >= 0);
|
|
834
834
|
}
|
|
835
835
|
if (i == null && o && (n < 0 || o == $e(r))) {
|
|
836
|
-
let l = r.childNodes[o - 1], c = l.nodeType == 3 ?
|
|
836
|
+
let l = r.childNodes[o - 1], c = l.nodeType == 3 ? mt(l, $e(l) - (s ? 0 : 1)) : l.nodeType == 1 && (l.nodeName != "BR" || !l.nextSibling) ? l : null;
|
|
837
837
|
if (c)
|
|
838
|
-
return qn(
|
|
838
|
+
return qn(Dt(c, 1), !1);
|
|
839
839
|
}
|
|
840
840
|
if (i == null && o < $e(r)) {
|
|
841
841
|
let l = r.childNodes[o];
|
|
842
842
|
for (; l.pmViewDesc && l.pmViewDesc.ignoreForCoords; )
|
|
843
843
|
l = l.nextSibling;
|
|
844
|
-
let c = l ? l.nodeType == 3 ?
|
|
844
|
+
let c = l ? l.nodeType == 3 ? mt(l, 0, s ? 0 : 1) : l.nodeType == 1 ? l : null : null;
|
|
845
845
|
if (c)
|
|
846
|
-
return qn(
|
|
846
|
+
return qn(Dt(c, -1), !0);
|
|
847
847
|
}
|
|
848
|
-
return qn(
|
|
848
|
+
return qn(Dt(r.nodeType == 3 ? mt(r) : r, -n), n >= 0);
|
|
849
849
|
}
|
|
850
850
|
function qn(t, e) {
|
|
851
851
|
if (t.width == 0)
|
|
@@ -888,7 +888,7 @@ function cp(t, e, n) {
|
|
|
888
888
|
if (a.nodeType == 1)
|
|
889
889
|
l = a.getClientRects();
|
|
890
890
|
else if (a.nodeType == 3)
|
|
891
|
-
l =
|
|
891
|
+
l = mt(a, 0, a.nodeValue.length).getClientRects();
|
|
892
892
|
else
|
|
893
893
|
continue;
|
|
894
894
|
for (let c = 0; c < l.length; c++) {
|
|
@@ -921,7 +921,7 @@ let ca = null, da = null, ua = !1;
|
|
|
921
921
|
function fp(t, e, n) {
|
|
922
922
|
return ca == e && da == n ? ua : (ca = e, da = n, ua = n == "up" || n == "down" ? cp(t, e, n) : up(t, e, n));
|
|
923
923
|
}
|
|
924
|
-
const He = 0, fa = 1, Qt = 2,
|
|
924
|
+
const He = 0, fa = 1, Qt = 2, at = 3;
|
|
925
925
|
class Dr {
|
|
926
926
|
constructor(e, n, r, o) {
|
|
927
927
|
this.parent = e, this.children = n, this.dom = r, this.contentDOM = o, this.dirty = He, r.pmViewDesc = this;
|
|
@@ -1181,7 +1181,7 @@ class Dr {
|
|
|
1181
1181
|
h = g;
|
|
1182
1182
|
}
|
|
1183
1183
|
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;
|
|
1184
|
-
if ((
|
|
1184
|
+
if ((Ge || Me) && e == n) {
|
|
1185
1185
|
let { node: p, offset: h } = a;
|
|
1186
1186
|
if (p.nodeType == 3) {
|
|
1187
1187
|
if (u = !!(h && p.nodeValue[h - 1] == `
|
|
@@ -1200,7 +1200,7 @@ class Dr {
|
|
|
1200
1200
|
u = m && (m.nodeName == "BR" || m.contentEditable == "false");
|
|
1201
1201
|
}
|
|
1202
1202
|
}
|
|
1203
|
-
if (
|
|
1203
|
+
if (Ge && d.focusNode && d.focusNode != l.node && d.focusNode.nodeType == 1) {
|
|
1204
1204
|
let p = d.focusNode.childNodes[d.focusOffset];
|
|
1205
1205
|
p && p.contentEditable == "false" && (o = !0);
|
|
1206
1206
|
}
|
|
@@ -1237,10 +1237,10 @@ class Dr {
|
|
|
1237
1237
|
if (r == s ? e <= s && n >= r : e < s && n > r) {
|
|
1238
1238
|
let a = r + i.border, l = s - i.border;
|
|
1239
1239
|
if (e >= a && n <= l) {
|
|
1240
|
-
this.dirty = e == r || n == s ? Qt : fa, e == a && n == l && (i.contentLost || i.dom.parentNode != this.contentDOM) ? i.dirty =
|
|
1240
|
+
this.dirty = e == r || n == s ? Qt : fa, e == a && n == l && (i.contentLost || i.dom.parentNode != this.contentDOM) ? i.dirty = at : i.markDirty(e - a, n - a);
|
|
1241
1241
|
return;
|
|
1242
1242
|
} else
|
|
1243
|
-
i.dirty = i.dom == i.contentDOM && i.dom.parentNode == this.contentDOM && !i.children.length ? Qt :
|
|
1243
|
+
i.dirty = i.dom == i.contentDOM && i.dom.parentNode == this.contentDOM && !i.children.length ? Qt : at;
|
|
1244
1244
|
}
|
|
1245
1245
|
r = s;
|
|
1246
1246
|
}
|
|
@@ -1329,10 +1329,10 @@ class cn extends Dr {
|
|
|
1329
1329
|
return (!s || !s.dom) && (s = zn.renderSpec(document, n.type.spec.toDOM(n, r), null, n.attrs)), new cn(e, n, s.dom, s.contentDOM || s.dom, s);
|
|
1330
1330
|
}
|
|
1331
1331
|
parseRule() {
|
|
1332
|
-
return this.dirty &
|
|
1332
|
+
return this.dirty & at || this.mark.type.spec.reparseInView ? null : { mark: this.mark.type.name, attrs: this.mark.attrs, contentElement: this.contentDOM };
|
|
1333
1333
|
}
|
|
1334
1334
|
matchesMark(e) {
|
|
1335
|
-
return this.dirty !=
|
|
1335
|
+
return this.dirty != at && this.mark.eq(e);
|
|
1336
1336
|
}
|
|
1337
1337
|
markDirty(e, n) {
|
|
1338
1338
|
if (super.markDirty(e, n), this.dirty != He) {
|
|
@@ -1356,7 +1356,7 @@ class cn extends Dr {
|
|
|
1356
1356
|
this.spec.destroy && this.spec.destroy(), super.destroy();
|
|
1357
1357
|
}
|
|
1358
1358
|
}
|
|
1359
|
-
class
|
|
1359
|
+
class Bt extends Dr {
|
|
1360
1360
|
constructor(e, n, r, o, i, s, a, l, c) {
|
|
1361
1361
|
super(e, [], i, s), this.node = n, this.outerDeco = r, this.innerDeco = o, this.nodeDOM = a;
|
|
1362
1362
|
}
|
|
@@ -1384,7 +1384,7 @@ class Ft extends Dr {
|
|
|
1384
1384
|
} else d || ({ dom: d, contentDOM: u } = zn.renderSpec(document, n.type.spec.toDOM(n), null, n.attrs));
|
|
1385
1385
|
!u && !n.isText && d.nodeName != "BR" && (d.hasAttribute("contenteditable") || (d.contentEditable = "false"), n.type.spec.draggable && (d.draggable = !0));
|
|
1386
1386
|
let f = d;
|
|
1387
|
-
return d = yc(d, r, n), c ? l = new hp(e, n, r, o, d, u || null, f, c, i, s + 1) : n.isText ? new Po(e, n, r, o, d, f, i) : new
|
|
1387
|
+
return d = yc(d, r, n), c ? l = new hp(e, n, r, o, d, u || null, f, c, i, s + 1) : n.isText ? new Po(e, n, r, o, d, f, i) : new Bt(e, n, r, o, d, u || null, f, i, s + 1);
|
|
1388
1388
|
}
|
|
1389
1389
|
parseRule() {
|
|
1390
1390
|
if (this.node.type.spec.reparseInView)
|
|
@@ -1459,7 +1459,7 @@ class Ft extends Dr {
|
|
|
1459
1459
|
// If this desc must be updated to match the given node decoration,
|
|
1460
1460
|
// do so and return true.
|
|
1461
1461
|
update(e, n, r, o) {
|
|
1462
|
-
return this.dirty ==
|
|
1462
|
+
return this.dirty == at || !e.sameMarkup(this.node) ? !1 : (this.updateInner(e, n, r, o), !0);
|
|
1463
1463
|
}
|
|
1464
1464
|
updateInner(e, n, r, o) {
|
|
1465
1465
|
this.updateOuterDeco(n), this.node = e, this.innerDeco = r, this.contentDOM && this.updateChildren(o, this.posAtStart), this.dirty = He;
|
|
@@ -1484,10 +1484,10 @@ class Ft extends Dr {
|
|
|
1484
1484
|
}
|
|
1485
1485
|
function pa(t, e, n, r, o) {
|
|
1486
1486
|
yc(r, e, t);
|
|
1487
|
-
let i = new
|
|
1487
|
+
let i = new Bt(void 0, t, e, n, r, r, r, o, 0);
|
|
1488
1488
|
return i.contentDOM && i.updateChildren(o, 0), i;
|
|
1489
1489
|
}
|
|
1490
|
-
class Po extends
|
|
1490
|
+
class Po extends Bt {
|
|
1491
1491
|
constructor(e, n, r, o, i, s, a) {
|
|
1492
1492
|
super(e, n, r, o, i, null, s, a, 0);
|
|
1493
1493
|
}
|
|
@@ -1498,7 +1498,7 @@ class Po extends Ft {
|
|
|
1498
1498
|
return { skip: e || !0 };
|
|
1499
1499
|
}
|
|
1500
1500
|
update(e, n, r, o) {
|
|
1501
|
-
return this.dirty ==
|
|
1501
|
+
return this.dirty == at || this.dirty != He && !this.inParent() || !e.sameMarkup(this.node) ? !1 : (this.updateOuterDeco(n), (this.dirty != He || e.text != this.node.text) && e.text != this.nodeDOM.nodeValue && (this.nodeDOM.nodeValue = e.text, o.trackWrites == this.nodeDOM && (o.trackWrites = null)), this.node = e, this.dirty = He, !0);
|
|
1502
1502
|
}
|
|
1503
1503
|
inParent() {
|
|
1504
1504
|
let e = this.parent.contentDOM;
|
|
@@ -1521,7 +1521,7 @@ class Po extends Ft {
|
|
|
1521
1521
|
return new Po(this.parent, o, this.outerDeco, this.innerDeco, i, i, r);
|
|
1522
1522
|
}
|
|
1523
1523
|
markDirty(e, n) {
|
|
1524
|
-
super.markDirty(e, n), this.dom != this.nodeDOM && (e == 0 || n == this.nodeDOM.nodeValue.length) && (this.dirty =
|
|
1524
|
+
super.markDirty(e, n), this.dom != this.nodeDOM && (e == 0 || n == this.nodeDOM.nodeValue.length) && (this.dirty = at);
|
|
1525
1525
|
}
|
|
1526
1526
|
get domAtom() {
|
|
1527
1527
|
return !1;
|
|
@@ -1544,7 +1544,7 @@ class hc extends Dr {
|
|
|
1544
1544
|
return this.dom.nodeName == "IMG";
|
|
1545
1545
|
}
|
|
1546
1546
|
}
|
|
1547
|
-
class hp extends
|
|
1547
|
+
class hp extends Bt {
|
|
1548
1548
|
constructor(e, n, r, o, i, s, a, l, c, d) {
|
|
1549
1549
|
super(e, n, r, o, i, s, a, c, d), this.spec = l;
|
|
1550
1550
|
}
|
|
@@ -1552,7 +1552,7 @@ class hp extends Ft {
|
|
|
1552
1552
|
// through. If it does, and there's a `contentDOM` node, our logic
|
|
1553
1553
|
// updates the children.
|
|
1554
1554
|
update(e, n, r, o) {
|
|
1555
|
-
if (this.dirty ==
|
|
1555
|
+
if (this.dirty == at)
|
|
1556
1556
|
return !1;
|
|
1557
1557
|
if (this.spec.update && (this.node.type == e.type || this.spec.multiType)) {
|
|
1558
1558
|
let i = this.spec.update(e, n, r);
|
|
@@ -1731,7 +1731,7 @@ class gp {
|
|
|
1731
1731
|
}
|
|
1732
1732
|
updateNodeAt(e, n, r, o, i) {
|
|
1733
1733
|
let s = this.top.children[o];
|
|
1734
|
-
return s.dirty ==
|
|
1734
|
+
return s.dirty == at && s.dom == s.contentDOM && (s.dirty = Qt), s.update(e, n, r, i) ? (this.destroyBetween(this.index, o), this.index++, !0) : !1;
|
|
1735
1735
|
}
|
|
1736
1736
|
findIndexWithChild(e) {
|
|
1737
1737
|
for (; ; ) {
|
|
@@ -1755,11 +1755,11 @@ class gp {
|
|
|
1755
1755
|
updateNextNode(e, n, r, o, i, s) {
|
|
1756
1756
|
for (let a = this.index; a < this.top.children.length; a++) {
|
|
1757
1757
|
let l = this.top.children[a];
|
|
1758
|
-
if (l instanceof
|
|
1758
|
+
if (l instanceof Bt) {
|
|
1759
1759
|
let c = this.preMatch.matched.get(l);
|
|
1760
1760
|
if (c != null && c != i)
|
|
1761
1761
|
return !1;
|
|
1762
|
-
let d = l.dom, u, f = this.isLocked(d) && !(e.isText && l.node && l.node.isText && l.nodeDOM.nodeValue == e.text && l.dirty !=
|
|
1762
|
+
let d = l.dom, u, f = this.isLocked(d) && !(e.isText && l.node && l.node.isText && l.nodeDOM.nodeValue == e.text && l.dirty != at && po(n, l.outerDeco));
|
|
1763
1763
|
if (!f && l.update(e, n, r, o))
|
|
1764
1764
|
return this.destroyBetween(this.index, a), l.dom != d && (this.changed = !0), this.index++, !0;
|
|
1765
1765
|
if (!f && (u = this.recreateWrapper(l, e, n, r, o, s)))
|
|
@@ -1774,7 +1774,7 @@ class gp {
|
|
|
1774
1774
|
recreateWrapper(e, n, r, o, i, s) {
|
|
1775
1775
|
if (e.dirty || n.isAtom || !e.children.length || !e.node.content.eq(n.content) || !po(r, e.outerDeco) || !o.eq(e.innerDeco))
|
|
1776
1776
|
return null;
|
|
1777
|
-
let a =
|
|
1777
|
+
let a = Bt.create(this.top, n, r, o, i, s);
|
|
1778
1778
|
if (a.contentDOM) {
|
|
1779
1779
|
a.children = e.children, e.children = [];
|
|
1780
1780
|
for (let l of a.children)
|
|
@@ -1784,7 +1784,7 @@ class gp {
|
|
|
1784
1784
|
}
|
|
1785
1785
|
// Insert the node as a newly created node desc.
|
|
1786
1786
|
addNode(e, n, r, o, i) {
|
|
1787
|
-
let s =
|
|
1787
|
+
let s = Bt.create(this.top, e, n, r, o, i);
|
|
1788
1788
|
s.contentDOM && s.updateChildren(o, i + 1), this.top.children.splice(this.index++, 0, s), this.changed = !0;
|
|
1789
1789
|
}
|
|
1790
1790
|
placeWidget(e, n, r) {
|
|
@@ -1976,7 +1976,7 @@ function ys(t, e = null) {
|
|
|
1976
1976
|
function bc(t) {
|
|
1977
1977
|
return t.editable ? t.hasFocus() : vc(t) && document.activeElement && document.activeElement.contains(t.dom);
|
|
1978
1978
|
}
|
|
1979
|
-
function
|
|
1979
|
+
function kt(t, e = !1) {
|
|
1980
1980
|
let n = t.state.selection;
|
|
1981
1981
|
if (wc(t, n), !!bc(t)) {
|
|
1982
1982
|
if (!e && t.input.mouseDown && t.input.mouseDown.allowDefault && we) {
|
|
@@ -2028,7 +2028,7 @@ function Sp(t) {
|
|
|
2028
2028
|
if (!e)
|
|
2029
2029
|
return;
|
|
2030
2030
|
let r = t.cursorWrapper.dom, o = r.nodeName == "IMG";
|
|
2031
|
-
o ? n.setStart(r.parentNode, ge(r) + 1) : n.setStart(r, 0), n.collapse(!0), e.removeAllRanges(), e.addRange(n), !o && !t.state.selection.visible && Te &&
|
|
2031
|
+
o ? n.setStart(r.parentNode, ge(r) + 1) : n.setStart(r, 0), n.collapse(!0), e.removeAllRanges(), e.addRange(n), !o && !t.state.selection.visible && Te && Ft <= 11 && (r.disabled = !0, r.disabled = !1);
|
|
2032
2032
|
}
|
|
2033
2033
|
function wc(t, e) {
|
|
2034
2034
|
if (e instanceof B) {
|
|
@@ -2064,7 +2064,7 @@ function Mi(t, e) {
|
|
|
2064
2064
|
let { $anchor: n, $head: r } = t.selection, o = e > 0 ? n.max(r) : n.min(r), i = o.parent.inlineContent ? o.depth ? t.doc.resolve(e > 0 ? o.after() : o.before()) : null : o;
|
|
2065
2065
|
return i && J.findFrom(i, e);
|
|
2066
2066
|
}
|
|
2067
|
-
function
|
|
2067
|
+
function Et(t, e) {
|
|
2068
2068
|
return t.dispatch(t.state.tr.setSelection(e).scrollIntoView()), !0;
|
|
2069
2069
|
}
|
|
2070
2070
|
function va(t, e, n) {
|
|
@@ -2075,25 +2075,25 @@ function va(t, e, n) {
|
|
|
2075
2075
|
if (!i || i.isText || !i.isLeaf)
|
|
2076
2076
|
return !1;
|
|
2077
2077
|
let s = t.state.doc.resolve(o.pos + i.nodeSize * (e < 0 ? -1 : 1));
|
|
2078
|
-
return
|
|
2078
|
+
return Et(t, new V(r.$anchor, s));
|
|
2079
2079
|
} else if (r.empty) {
|
|
2080
2080
|
if (t.endOfTextblock(e > 0 ? "forward" : "backward")) {
|
|
2081
2081
|
let o = Mi(t.state, e);
|
|
2082
|
-
return o && o instanceof B ?
|
|
2082
|
+
return o && o instanceof B ? Et(t, o) : !1;
|
|
2083
2083
|
} else if (!(ze && n.indexOf("m") > -1)) {
|
|
2084
2084
|
let o = r.$head, i = o.textOffset ? null : e < 0 ? o.nodeBefore : o.nodeAfter, s;
|
|
2085
2085
|
if (!i || i.isText)
|
|
2086
2086
|
return !1;
|
|
2087
2087
|
let a = e < 0 ? o.pos - i.nodeSize : o.pos;
|
|
2088
|
-
return i.isAtom || (s = t.docView.descAt(a)) && !s.contentDOM ? B.isSelectable(i) ?
|
|
2088
|
+
return i.isAtom || (s = t.docView.descAt(a)) && !s.contentDOM ? B.isSelectable(i) ? Et(t, new B(e < 0 ? t.state.doc.resolve(o.pos - i.nodeSize) : o)) : Tr ? Et(t, new V(t.state.doc.resolve(e < 0 ? a : a + i.nodeSize))) : !1 : !1;
|
|
2089
2089
|
}
|
|
2090
2090
|
} else return !1;
|
|
2091
2091
|
else {
|
|
2092
2092
|
if (r instanceof B && r.node.isInline)
|
|
2093
|
-
return
|
|
2093
|
+
return Et(t, new V(e > 0 ? r.$to : r.$from));
|
|
2094
2094
|
{
|
|
2095
2095
|
let o = Mi(t.state, e);
|
|
2096
|
-
return o ?
|
|
2096
|
+
return o ? Et(t, o) : !1;
|
|
2097
2097
|
}
|
|
2098
2098
|
}
|
|
2099
2099
|
}
|
|
@@ -2112,7 +2112,7 @@ function Mp(t) {
|
|
|
2112
2112
|
if (!n)
|
|
2113
2113
|
return;
|
|
2114
2114
|
let o, i, s = !1;
|
|
2115
|
-
for (
|
|
2115
|
+
for (Ge && n.nodeType == 1 && r < ho(n) && er(n.childNodes[r], -1) && (s = !0); ; )
|
|
2116
2116
|
if (r > 0) {
|
|
2117
2117
|
if (n.nodeType != 1)
|
|
2118
2118
|
break;
|
|
@@ -2218,7 +2218,7 @@ function Ai(t, e, n) {
|
|
|
2218
2218
|
t.domObserver.setCurSelection();
|
|
2219
2219
|
let { state: o } = t;
|
|
2220
2220
|
setTimeout(() => {
|
|
2221
|
-
t.state == o &&
|
|
2221
|
+
t.state == o && kt(t);
|
|
2222
2222
|
}, 50);
|
|
2223
2223
|
}
|
|
2224
2224
|
function ka(t, e) {
|
|
@@ -2246,11 +2246,11 @@ function Ca(t, e, n) {
|
|
|
2246
2246
|
if (!o.parent.inlineContent || t.endOfTextblock(e < 0 ? "up" : "down")) {
|
|
2247
2247
|
let s = Mi(t.state, e);
|
|
2248
2248
|
if (s && s instanceof B)
|
|
2249
|
-
return
|
|
2249
|
+
return Et(t, s);
|
|
2250
2250
|
}
|
|
2251
2251
|
if (!o.parent.inlineContent) {
|
|
2252
2252
|
let s = e < 0 ? o : i, a = r instanceof Mr ? J.near(s, e) : J.findFrom(s, e);
|
|
2253
|
-
return a ?
|
|
2253
|
+
return a ? Et(t, a) : !1;
|
|
2254
2254
|
}
|
|
2255
2255
|
return !1;
|
|
2256
2256
|
}
|
|
@@ -2515,7 +2515,7 @@ function $p(t) {
|
|
|
2515
2515
|
}
|
|
2516
2516
|
Me && t.dom.addEventListener("input", () => null), Ti(t);
|
|
2517
2517
|
}
|
|
2518
|
-
function
|
|
2518
|
+
function Rt(t, e) {
|
|
2519
2519
|
t.input.lastSelectionOrigin = e, t.input.lastSelectionTime = Date.now();
|
|
2520
2520
|
}
|
|
2521
2521
|
function Vp(t) {
|
|
@@ -2551,13 +2551,13 @@ function jp(t, e) {
|
|
|
2551
2551
|
}
|
|
2552
2552
|
Oe.keydown = (t, e) => {
|
|
2553
2553
|
let n = e;
|
|
2554
|
-
if (t.input.shiftKey = n.keyCode == 16 || n.shiftKey, !Dc(t, n) && (t.input.lastKeyCode = n.keyCode, t.input.lastKeyCodeTime = Date.now(), !(
|
|
2554
|
+
if (t.input.shiftKey = n.keyCode == 16 || n.shiftKey, !Dc(t, n) && (t.input.lastKeyCode = n.keyCode, t.input.lastKeyCodeTime = Date.now(), !(bt && we && n.keyCode == 13)))
|
|
2555
2555
|
if (n.keyCode != 229 && t.domObserver.forceFlush(), Tn && n.keyCode == 13 && !n.ctrlKey && !n.altKey && !n.metaKey) {
|
|
2556
2556
|
let r = Date.now();
|
|
2557
2557
|
t.input.lastIOSEnter = r, t.input.lastIOSEnterFallbackTimeout = setTimeout(() => {
|
|
2558
2558
|
t.input.lastIOSEnter == r && (t.someProp("handleKeyDown", (o) => o(t, Zt(13, "Enter"))), t.input.lastIOSEnter = 0);
|
|
2559
2559
|
}, 200);
|
|
2560
|
-
} else t.someProp("handleKeyDown", (r) => r(t, n)) || Ep(t, n) ? n.preventDefault() :
|
|
2560
|
+
} else t.someProp("handleKeyDown", (r) => r(t, n)) || Ep(t, n) ? n.preventDefault() : Rt(t, "key");
|
|
2561
2561
|
};
|
|
2562
2562
|
Oe.keyup = (t, e) => {
|
|
2563
2563
|
e.keyCode == 16 && (t.input.shiftKey = !1);
|
|
@@ -2656,7 +2656,7 @@ Ae.mousedown = (t, e) => {
|
|
|
2656
2656
|
let r = Cs(t), o = Date.now(), i = "singleClick";
|
|
2657
2657
|
o - t.input.lastClick.time < 500 && Wp(n, t.input.lastClick) && !n[Tc] && (t.input.lastClick.type == "singleClick" ? i = "doubleClick" : t.input.lastClick.type == "doubleClick" && (i = "tripleClick")), t.input.lastClick = { time: o, x: n.clientX, y: n.clientY, type: i };
|
|
2658
2658
|
let s = t.posAtCoords(Ro(n));
|
|
2659
|
-
s && (i == "singleClick" ? (t.input.mouseDown && t.input.mouseDown.done(), t.input.mouseDown = new Gp(t, s, n, !!r)) : (i == "doubleClick" ? Xp : Jp)(t, s.pos, s.inside, n) ? n.preventDefault() :
|
|
2659
|
+
s && (i == "singleClick" ? (t.input.mouseDown && t.input.mouseDown.done(), t.input.mouseDown = new Gp(t, s, n, !!r)) : (i == "doubleClick" ? Xp : Jp)(t, s.pos, s.inside, n) ? n.preventDefault() : Rt(t, "pointer"));
|
|
2660
2660
|
};
|
|
2661
2661
|
class Gp {
|
|
2662
2662
|
constructor(e, n, r, o) {
|
|
@@ -2675,19 +2675,19 @@ class Gp {
|
|
|
2675
2675
|
node: i,
|
|
2676
2676
|
pos: s,
|
|
2677
2677
|
addAttr: !!(this.target && !this.target.draggable),
|
|
2678
|
-
setUneditable: !!(this.target &&
|
|
2678
|
+
setUneditable: !!(this.target && Ge && !this.target.hasAttribute("contentEditable"))
|
|
2679
2679
|
}), this.target && this.mightDrag && (this.mightDrag.addAttr || this.mightDrag.setUneditable) && (this.view.domObserver.stop(), this.mightDrag.addAttr && (this.target.draggable = !0), this.mightDrag.setUneditable && setTimeout(() => {
|
|
2680
2680
|
this.view.input.mouseDown == this && this.target.setAttribute("contentEditable", "false");
|
|
2681
|
-
}, 20), this.view.domObserver.start()), e.root.addEventListener("mouseup", this.up = this.up.bind(this)), e.root.addEventListener("mousemove", this.move = this.move.bind(this)),
|
|
2681
|
+
}, 20), this.view.domObserver.start()), e.root.addEventListener("mouseup", this.up = this.up.bind(this)), e.root.addEventListener("mousemove", this.move = this.move.bind(this)), Rt(e, "pointer");
|
|
2682
2682
|
}
|
|
2683
2683
|
done() {
|
|
2684
|
-
this.view.root.removeEventListener("mouseup", this.up), this.view.root.removeEventListener("mousemove", this.move), this.mightDrag && this.target && (this.view.domObserver.stop(), this.mightDrag.addAttr && this.target.removeAttribute("draggable"), this.mightDrag.setUneditable && this.target.removeAttribute("contentEditable"), this.view.domObserver.start()), this.delayedSelectionSync && setTimeout(() =>
|
|
2684
|
+
this.view.root.removeEventListener("mouseup", this.up), this.view.root.removeEventListener("mousemove", this.move), this.mightDrag && this.target && (this.view.domObserver.stop(), this.mightDrag.addAttr && this.target.removeAttribute("draggable"), this.mightDrag.setUneditable && this.target.removeAttribute("contentEditable"), this.view.domObserver.start()), this.delayedSelectionSync && setTimeout(() => kt(this.view)), this.view.input.mouseDown = null;
|
|
2685
2685
|
}
|
|
2686
2686
|
up(e) {
|
|
2687
2687
|
if (this.done(), !this.view.dom.contains(e.target))
|
|
2688
2688
|
return;
|
|
2689
2689
|
let n = this.pos;
|
|
2690
|
-
this.view.state.doc != this.startDoc && (n = this.view.posAtCoords(Ro(e))), this.updateAllowDefault(e), this.allowDefault || !n ?
|
|
2690
|
+
this.view.state.doc != this.startDoc && (n = this.view.posAtCoords(Ro(e))), this.updateAllowDefault(e), this.allowDefault || !n ? Rt(this.view, "pointer") : Kp(this.view, n.pos, n.inside, e, this.selectNode) ? e.preventDefault() : e.button == 0 && (this.flushed || // Safari ignores clicks on draggable elements
|
|
2691
2691
|
Me && this.mightDrag && !this.mightDrag.node.isAtom || // Chrome will sometimes treat a node selection as a
|
|
2692
2692
|
// cursor, but still report that the node is selected
|
|
2693
2693
|
// when asked through getSelection. You'll then get a
|
|
@@ -2695,33 +2695,33 @@ class Gp {
|
|
|
2695
2695
|
// (hidden) cursor is doesn't change the selection, and
|
|
2696
2696
|
// thus doesn't get a reaction from ProseMirror. This
|
|
2697
2697
|
// works around that.
|
|
2698
|
-
we && !this.view.state.selection.visible && Math.min(Math.abs(n.pos - this.view.state.selection.from), Math.abs(n.pos - this.view.state.selection.to)) <= 2) ? (An(this.view, J.near(this.view.state.doc.resolve(n.pos))), e.preventDefault()) :
|
|
2698
|
+
we && !this.view.state.selection.visible && Math.min(Math.abs(n.pos - this.view.state.selection.from), Math.abs(n.pos - this.view.state.selection.to)) <= 2) ? (An(this.view, J.near(this.view.state.doc.resolve(n.pos))), e.preventDefault()) : Rt(this.view, "pointer");
|
|
2699
2699
|
}
|
|
2700
2700
|
move(e) {
|
|
2701
|
-
this.updateAllowDefault(e),
|
|
2701
|
+
this.updateAllowDefault(e), Rt(this.view, "pointer"), e.buttons == 0 && this.done();
|
|
2702
2702
|
}
|
|
2703
2703
|
updateAllowDefault(e) {
|
|
2704
2704
|
!this.allowDefault && (Math.abs(this.event.x - e.clientX) > 4 || Math.abs(this.event.y - e.clientY) > 4) && (this.allowDefault = !0);
|
|
2705
2705
|
}
|
|
2706
2706
|
}
|
|
2707
2707
|
Ae.touchstart = (t) => {
|
|
2708
|
-
t.input.lastTouch = Date.now(), Cs(t),
|
|
2708
|
+
t.input.lastTouch = Date.now(), Cs(t), Rt(t, "pointer");
|
|
2709
2709
|
};
|
|
2710
2710
|
Ae.touchmove = (t) => {
|
|
2711
|
-
t.input.lastTouch = Date.now(),
|
|
2711
|
+
t.input.lastTouch = Date.now(), Rt(t, "pointer");
|
|
2712
2712
|
};
|
|
2713
2713
|
Ae.contextmenu = (t) => Cs(t);
|
|
2714
2714
|
function Dc(t, e) {
|
|
2715
2715
|
return t.composing ? !0 : Me && Math.abs(e.timeStamp - t.input.compositionEndedAt) < 500 ? (t.input.compositionEndedAt = -2e8, !0) : !1;
|
|
2716
2716
|
}
|
|
2717
|
-
const Zp =
|
|
2717
|
+
const Zp = bt ? 5e3 : -1;
|
|
2718
2718
|
Oe.compositionstart = Oe.compositionupdate = (t) => {
|
|
2719
2719
|
if (!t.composing) {
|
|
2720
2720
|
t.domObserver.flush();
|
|
2721
2721
|
let { state: e } = t, n = e.selection.$to;
|
|
2722
2722
|
if (e.selection instanceof V && (e.storedMarks || !n.textOffset && n.parentOffset && n.nodeBefore.marks.some((r) => r.type.spec.inclusive === !1)))
|
|
2723
2723
|
t.markCursor = t.state.storedMarks || n.marks(), mo(t, !0), t.markCursor = null;
|
|
2724
|
-
else if (mo(t, !e.selection.empty),
|
|
2724
|
+
else if (mo(t, !e.selection.empty), Ge && e.selection.empty && n.parentOffset && !n.textOffset && n.nodeBefore.marks.length) {
|
|
2725
2725
|
let r = t.domSelectionRange();
|
|
2726
2726
|
for (let o = r.focusNode, i = r.focusOffset; o && o.nodeType == 1 && i != 0; ) {
|
|
2727
2727
|
let s = i < 0 ? o.lastChild : o.childNodes[i - 1];
|
|
@@ -2773,7 +2773,7 @@ function eh() {
|
|
|
2773
2773
|
return t.initEvent("event", !0, !0), t.timeStamp;
|
|
2774
2774
|
}
|
|
2775
2775
|
function mo(t, e = !1) {
|
|
2776
|
-
if (!(
|
|
2776
|
+
if (!(bt && t.domObserver.flushingSoon >= 0)) {
|
|
2777
2777
|
if (t.domObserver.forceFlush(), Ec(t), e || t.docView && t.docView.dirty) {
|
|
2778
2778
|
let n = ys(t);
|
|
2779
2779
|
return n && !n.eq(t.state.selection) ? t.dispatch(t.state.tr.setSelection(n)) : (t.markCursor || e) && !t.state.selection.empty ? t.dispatch(t.state.tr.deleteSelection()) : t.updateState(t.state), !0;
|
|
@@ -2791,7 +2791,7 @@ function th(t, e) {
|
|
|
2791
2791
|
n.parentNode && n.parentNode.removeChild(n), t.focus();
|
|
2792
2792
|
}, 50);
|
|
2793
2793
|
}
|
|
2794
|
-
const dr = Te &&
|
|
2794
|
+
const dr = Te && Ft < 15 || Tn && Gf < 604;
|
|
2795
2795
|
Ae.copy = Oe.cut = (t, e) => {
|
|
2796
2796
|
let n = e, r = t.state.selection, o = n.type == "cut";
|
|
2797
2797
|
if (r.empty)
|
|
@@ -2830,7 +2830,7 @@ function Ic(t) {
|
|
|
2830
2830
|
}
|
|
2831
2831
|
Oe.paste = (t, e) => {
|
|
2832
2832
|
let n = e;
|
|
2833
|
-
if (t.composing && !
|
|
2833
|
+
if (t.composing && !bt)
|
|
2834
2834
|
return;
|
|
2835
2835
|
let r = dr ? null : n.clipboardData, o = t.input.shiftKey && t.input.lastKeyCode != 45;
|
|
2836
2836
|
r && ur(t, Ic(r), r.getData("text/html"), o, n) ? n.preventDefault() : rh(t, n);
|
|
@@ -2908,7 +2908,7 @@ Oe.drop = (t, e) => {
|
|
|
2908
2908
|
};
|
|
2909
2909
|
Ae.focus = (t) => {
|
|
2910
2910
|
t.input.lastFocus = Date.now(), t.focused || (t.domObserver.stop(), t.dom.classList.add("ProseMirror-focused"), t.domObserver.start(), t.focused = !0, setTimeout(() => {
|
|
2911
|
-
t.docView && t.hasFocus() && !t.domObserver.currentSelection.eq(t.domSelectionRange()) &&
|
|
2911
|
+
t.docView && t.hasFocus() && !t.domObserver.currentSelection.eq(t.domSelectionRange()) && kt(t);
|
|
2912
2912
|
}, 20));
|
|
2913
2913
|
};
|
|
2914
2914
|
Ae.blur = (t, e) => {
|
|
@@ -2916,7 +2916,7 @@ Ae.blur = (t, e) => {
|
|
|
2916
2916
|
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);
|
|
2917
2917
|
};
|
|
2918
2918
|
Ae.beforeinput = (t, e) => {
|
|
2919
|
-
if (we &&
|
|
2919
|
+
if (we && bt && e.inputType == "deleteContentBackward") {
|
|
2920
2920
|
t.domObserver.flushSoon();
|
|
2921
2921
|
let { domChangeCount: r } = t.input;
|
|
2922
2922
|
setTimeout(() => {
|
|
@@ -2958,7 +2958,7 @@ class go {
|
|
|
2958
2958
|
this.spec.destroy && this.spec.destroy(e);
|
|
2959
2959
|
}
|
|
2960
2960
|
}
|
|
2961
|
-
class
|
|
2961
|
+
class _t {
|
|
2962
2962
|
constructor(e, n) {
|
|
2963
2963
|
this.attrs = e, this.spec = n || nn;
|
|
2964
2964
|
}
|
|
@@ -2970,10 +2970,10 @@ class Bt {
|
|
|
2970
2970
|
return n.from < n.to;
|
|
2971
2971
|
}
|
|
2972
2972
|
eq(e) {
|
|
2973
|
-
return this == e || e instanceof
|
|
2973
|
+
return this == e || e instanceof _t && fr(this.attrs, e.attrs) && fr(this.spec, e.spec);
|
|
2974
2974
|
}
|
|
2975
2975
|
static is(e) {
|
|
2976
|
-
return e.type instanceof
|
|
2976
|
+
return e.type instanceof _t;
|
|
2977
2977
|
}
|
|
2978
2978
|
destroy() {
|
|
2979
2979
|
}
|
|
@@ -3040,7 +3040,7 @@ class z {
|
|
|
3040
3040
|
each inline node between `from` and `to`.
|
|
3041
3041
|
*/
|
|
3042
3042
|
static inline(e, n, r, o) {
|
|
3043
|
-
return new z(e, n, new
|
|
3043
|
+
return new z(e, n, new _t(r, o));
|
|
3044
3044
|
}
|
|
3045
3045
|
/**
|
|
3046
3046
|
Creates a node decoration. `from` and `to` should point precisely
|
|
@@ -3061,7 +3061,7 @@ class z {
|
|
|
3061
3061
|
@internal
|
|
3062
3062
|
*/
|
|
3063
3063
|
get inline() {
|
|
3064
|
-
return this.type instanceof
|
|
3064
|
+
return this.type instanceof _t;
|
|
3065
3065
|
}
|
|
3066
3066
|
/**
|
|
3067
3067
|
@internal
|
|
@@ -3192,14 +3192,14 @@ class F {
|
|
|
3192
3192
|
let i = e + 1, s = i + n.content.size;
|
|
3193
3193
|
for (let a = 0; a < this.local.length; a++) {
|
|
3194
3194
|
let l = this.local[a];
|
|
3195
|
-
if (l.from < s && l.to > i && l.type instanceof
|
|
3195
|
+
if (l.from < s && l.to > i && l.type instanceof _t) {
|
|
3196
3196
|
let c = Math.max(i, l.from) - i, d = Math.min(s, l.to) - i;
|
|
3197
3197
|
c < d && (o || (o = [])).push(l.copy(c, d));
|
|
3198
3198
|
}
|
|
3199
3199
|
}
|
|
3200
3200
|
if (o) {
|
|
3201
3201
|
let a = new F(o.sort(rn), Cn);
|
|
3202
|
-
return r ? new
|
|
3202
|
+
return r ? new It([a, r]) : a;
|
|
3203
3203
|
}
|
|
3204
3204
|
return r || be;
|
|
3205
3205
|
}
|
|
@@ -3231,11 +3231,11 @@ class F {
|
|
|
3231
3231
|
localsInner(e) {
|
|
3232
3232
|
if (this == be)
|
|
3233
3233
|
return Cn;
|
|
3234
|
-
if (e.inlineContent || !this.local.some(
|
|
3234
|
+
if (e.inlineContent || !this.local.some(_t.is))
|
|
3235
3235
|
return this.local;
|
|
3236
3236
|
let n = [];
|
|
3237
3237
|
for (let r = 0; r < this.local.length; r++)
|
|
3238
|
-
this.local[r].type instanceof
|
|
3238
|
+
this.local[r].type instanceof _t || n.push(this.local[r]);
|
|
3239
3239
|
return n;
|
|
3240
3240
|
}
|
|
3241
3241
|
forEachSet(e) {
|
|
@@ -3245,13 +3245,13 @@ class F {
|
|
|
3245
3245
|
F.empty = new F([], []);
|
|
3246
3246
|
F.removeOverlap = xs;
|
|
3247
3247
|
const be = F.empty;
|
|
3248
|
-
class
|
|
3248
|
+
class It {
|
|
3249
3249
|
constructor(e) {
|
|
3250
3250
|
this.members = e;
|
|
3251
3251
|
}
|
|
3252
3252
|
map(e, n) {
|
|
3253
3253
|
const r = this.members.map((o) => o.map(e, n, nn));
|
|
3254
|
-
return
|
|
3254
|
+
return It.from(r);
|
|
3255
3255
|
}
|
|
3256
3256
|
forChild(e, n) {
|
|
3257
3257
|
if (n.isLeaf)
|
|
@@ -3259,12 +3259,12 @@ class Et {
|
|
|
3259
3259
|
let r = [];
|
|
3260
3260
|
for (let o = 0; o < this.members.length; o++) {
|
|
3261
3261
|
let i = this.members[o].forChild(e, n);
|
|
3262
|
-
i != be && (i instanceof
|
|
3262
|
+
i != be && (i instanceof It ? r = r.concat(i.members) : r.push(i));
|
|
3263
3263
|
}
|
|
3264
|
-
return
|
|
3264
|
+
return It.from(r);
|
|
3265
3265
|
}
|
|
3266
3266
|
eq(e) {
|
|
3267
|
-
if (!(e instanceof
|
|
3267
|
+
if (!(e instanceof It) || e.members.length != this.members.length)
|
|
3268
3268
|
return !1;
|
|
3269
3269
|
for (let n = 0; n < this.members.length; n++)
|
|
3270
3270
|
if (!this.members[n].eq(e.members[n]))
|
|
@@ -3295,7 +3295,7 @@ class Et {
|
|
|
3295
3295
|
case 1:
|
|
3296
3296
|
return e[0];
|
|
3297
3297
|
default:
|
|
3298
|
-
return new
|
|
3298
|
+
return new It(e.every((n) => n instanceof F) ? e : e.reduce((n, r) => n.concat(r instanceof F ? r : r.members), []));
|
|
3299
3299
|
}
|
|
3300
3300
|
}
|
|
3301
3301
|
forEachSet(e) {
|
|
@@ -3435,7 +3435,7 @@ function ti(t) {
|
|
|
3435
3435
|
return t.someProp("decorations", (n) => {
|
|
3436
3436
|
let r = n(t.state);
|
|
3437
3437
|
r && r != be && e.push(r);
|
|
3438
|
-
}), t.cursorWrapper && e.push(F.create(t.state.doc, [t.cursorWrapper.deco])),
|
|
3438
|
+
}), t.cursorWrapper && e.push(F.create(t.state.doc, [t.cursorWrapper.deco])), It.from(e);
|
|
3439
3439
|
}
|
|
3440
3440
|
const ah = {
|
|
3441
3441
|
childList: !0,
|
|
@@ -3444,7 +3444,7 @@ const ah = {
|
|
|
3444
3444
|
attributes: !0,
|
|
3445
3445
|
attributeOldValue: !0,
|
|
3446
3446
|
subtree: !0
|
|
3447
|
-
}, lh = Te &&
|
|
3447
|
+
}, lh = Te && Ft <= 11;
|
|
3448
3448
|
class ch {
|
|
3449
3449
|
constructor() {
|
|
3450
3450
|
this.anchorNode = null, this.anchorOffset = 0, this.focusNode = null, this.focusOffset = 0;
|
|
@@ -3464,7 +3464,7 @@ class dh {
|
|
|
3464
3464
|
this.view = e, this.handleDOMChange = n, this.queue = [], this.flushingSoon = -1, this.observer = null, this.currentSelection = new ch(), this.onCharData = null, this.suppressingSelectionUpdates = !1, this.lastChangedTextNode = null, this.observer = window.MutationObserver && new window.MutationObserver((r) => {
|
|
3465
3465
|
for (let o = 0; o < r.length; o++)
|
|
3466
3466
|
this.queue.push(r[o]);
|
|
3467
|
-
Te &&
|
|
3467
|
+
Te && Ft <= 11 && r.some((o) => o.type == "childList" && o.removedNodes.length || o.type == "characterData" && o.oldValue.length > o.target.nodeValue.length) ? this.flushSoon() : this.flush();
|
|
3468
3468
|
}), lh && (this.onCharData = (r) => {
|
|
3469
3469
|
this.queue.push({ target: r.target, type: "characterData", oldValue: r.prevValue }), this.flushSoon();
|
|
3470
3470
|
}), this.onSelectionChange = this.onSelectionChange.bind(this);
|
|
@@ -3504,8 +3504,8 @@ class dh {
|
|
|
3504
3504
|
onSelectionChange() {
|
|
3505
3505
|
if (wa(this.view)) {
|
|
3506
3506
|
if (this.suppressingSelectionUpdates)
|
|
3507
|
-
return
|
|
3508
|
-
if (Te &&
|
|
3507
|
+
return kt(this.view);
|
|
3508
|
+
if (Te && Ft <= 11 && !this.view.state.selection.empty) {
|
|
3509
3509
|
let e = this.view.domSelectionRange();
|
|
3510
3510
|
if (e.focusNode && ln(e.focusNode, e.focusOffset, e.anchorNode, e.anchorOffset))
|
|
3511
3511
|
return this.flushSoon();
|
|
@@ -3552,7 +3552,7 @@ class dh {
|
|
|
3552
3552
|
let u = this.registerMutation(n[d], l);
|
|
3553
3553
|
u && (i = i < 0 ? u.from : Math.min(u.from, i), s = s < 0 ? u.to : Math.max(u.to, s), u.typeOver && (a = !0));
|
|
3554
3554
|
}
|
|
3555
|
-
if (
|
|
3555
|
+
if (Ge && l.length) {
|
|
3556
3556
|
let d = l.filter((u) => u.nodeName == "BR");
|
|
3557
3557
|
if (d.length == 2) {
|
|
3558
3558
|
let [u, f] = d;
|
|
@@ -3566,7 +3566,7 @@ class dh {
|
|
|
3566
3566
|
}
|
|
3567
3567
|
}
|
|
3568
3568
|
let c = null;
|
|
3569
|
-
i < 0 && o && e.input.lastFocus > Date.now() - 200 && Math.max(e.input.lastTouch, e.input.lastClick.time) < Date.now() - 300 && Io(r) && (c = ys(e)) && c.eq(J.near(e.state.doc.resolve(0), 1)) ? (e.input.lastFocus = 0,
|
|
3569
|
+
i < 0 && o && e.input.lastFocus > Date.now() - 200 && Math.max(e.input.lastTouch, e.input.lastClick.time) < Date.now() - 300 && Io(r) && (c = ys(e)) && c.eq(J.near(e.state.doc.resolve(0), 1)) ? (e.input.lastFocus = 0, kt(e), this.currentSelection.set(r), e.scrollToSelection()) : (i > -1 || o) && (i > -1 && (e.docView.markDirty(i, s), uh(e)), this.handleDOMChange(i, s, a, l), e.docView && e.docView.dirty ? e.updateState(e.state) : this.currentSelection.eq(r) || kt(e), this.currentSelection.set(r));
|
|
3570
3570
|
}
|
|
3571
3571
|
registerMutation(e, n) {
|
|
3572
3572
|
if (n.indexOf(e.target) > -1)
|
|
@@ -3583,7 +3583,7 @@ class dh {
|
|
|
3583
3583
|
if (r.contentDOM && r.contentDOM != r.dom && !r.contentDOM.contains(e.target))
|
|
3584
3584
|
return { from: r.posBefore, to: r.posAfter };
|
|
3585
3585
|
let o = e.previousSibling, i = e.nextSibling;
|
|
3586
|
-
if (Te &&
|
|
3586
|
+
if (Te && Ft <= 11 && e.addedNodes.length)
|
|
3587
3587
|
for (let d = 0; d < e.addedNodes.length; d++) {
|
|
3588
3588
|
let { previousSibling: u, nextSibling: f } = e.addedNodes[d];
|
|
3589
3589
|
(!u || Array.prototype.indexOf.call(e.addedNodes, u) < 0) && (o = u), (!f || Array.prototype.indexOf.call(e.addedNodes, f) < 0) && (i = f);
|
|
@@ -3604,7 +3604,7 @@ class dh {
|
|
|
3604
3604
|
let Ta = /* @__PURE__ */ new WeakMap(), Da = !1;
|
|
3605
3605
|
function uh(t) {
|
|
3606
3606
|
if (!Ta.has(t) && (Ta.set(t, null), ["normal", "nowrap", "pre-line"].indexOf(getComputedStyle(t.dom).whiteSpace) !== -1)) {
|
|
3607
|
-
if (t.requiresGeckoHackNode =
|
|
3607
|
+
if (t.requiresGeckoHackNode = Ge, Da)
|
|
3608
3608
|
return;
|
|
3609
3609
|
console.warn("ProseMirror expects the CSS white-space property to be set, preferably to 'pre-wrap'. It is recommended to load style/prosemirror.css from the prosemirror-view package."), Da = !0;
|
|
3610
3610
|
}
|
|
@@ -3682,7 +3682,7 @@ function yh(t, e, n, r, o) {
|
|
|
3682
3682
|
if (t.input.compositionPendingChanges = 0, e < 0) {
|
|
3683
3683
|
let x = t.input.lastSelectionTime > Date.now() - 50 ? t.input.lastSelectionOrigin : null, $ = ys(t, x);
|
|
3684
3684
|
if ($ && !t.state.selection.eq($)) {
|
|
3685
|
-
if (we &&
|
|
3685
|
+
if (we && bt && t.input.lastKeyCode === 13 && Date.now() - 100 < t.input.lastKeyCodeTime && t.someProp("handleKeyDown", (U) => U(t, Zt(13, "Enter"))))
|
|
3686
3686
|
return;
|
|
3687
3687
|
let _ = t.state.tr.setSelection($);
|
|
3688
3688
|
x == "pointer" ? _.setMeta("pointer", !0) : x == "key" && _.scrollIntoView(), i && _.setMeta("composition", i), t.dispatch(_);
|
|
@@ -3694,7 +3694,7 @@ function yh(t, e, n, r, o) {
|
|
|
3694
3694
|
let l = t.state.selection, c = hh(t, e, n), d = t.state.doc, u = d.slice(c.from, c.to), f, p;
|
|
3695
3695
|
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;
|
|
3696
3696
|
let h = vh(u.content, c.doc.content, c.from, f, p);
|
|
3697
|
-
if (h && t.input.domChangeCount++, (Tn && t.input.lastIOSEnter > Date.now() - 225 ||
|
|
3697
|
+
if (h && t.input.domChangeCount++, (Tn && t.input.lastIOSEnter > Date.now() - 225 || bt) && o.some((x) => x.nodeType == 1 && !gh.test(x.nodeName)) && (!h || h.endA >= h.endB) && t.someProp("handleKeyDown", (x) => x(t, Zt(13, "Enter")))) {
|
|
3698
3698
|
t.input.lastIOSEnter = 0;
|
|
3699
3699
|
return;
|
|
3700
3700
|
}
|
|
@@ -3711,17 +3711,17 @@ function yh(t, e, n, r, o) {
|
|
|
3711
3711
|
}
|
|
3712
3712
|
return;
|
|
3713
3713
|
}
|
|
3714
|
-
t.state.selection.from < t.state.selection.to && h.start == h.endB && t.state.selection instanceof V && (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 &&
|
|
3714
|
+
t.state.selection.from < t.state.selection.to && h.start == h.endB && t.state.selection instanceof V && (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 && Ft <= 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--);
|
|
3715
3715
|
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;
|
|
3716
3716
|
if ((Tn && t.input.lastIOSEnter > Date.now() - 225 && (!w || o.some((x) => x.nodeName == "DIV" || x.nodeName == "P")) || !w && m.pos < c.doc.content.size && (!m.sameParent(g) || !m.parent.inlineContent) && (C = J.findFrom(c.doc.resolve(m.pos + 1), 1, !0)) && C.head > m.pos) && t.someProp("handleKeyDown", (x) => x(t, Zt(13, "Enter")))) {
|
|
3717
3717
|
t.input.lastIOSEnter = 0;
|
|
3718
3718
|
return;
|
|
3719
3719
|
}
|
|
3720
3720
|
if (t.state.selection.anchor > h.start && wh(d, h.start, h.endA, m, g) && t.someProp("handleKeyDown", (x) => x(t, Zt(8, "Backspace")))) {
|
|
3721
|
-
|
|
3721
|
+
bt && we && t.domObserver.suppressSelectionUpdates();
|
|
3722
3722
|
return;
|
|
3723
3723
|
}
|
|
3724
|
-
we && h.endB == h.start && (t.input.lastChromeDelete = Date.now()),
|
|
3724
|
+
we && 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(() => {
|
|
3725
3725
|
t.someProp("handleKeyDown", function(x) {
|
|
3726
3726
|
return x(t, Zt(13, "Enter"));
|
|
3727
3727
|
});
|
|
@@ -3729,7 +3729,7 @@ function yh(t, e, n, r, o) {
|
|
|
3729
3729
|
let y = h.start, S = h.endA, k, M, L;
|
|
3730
3730
|
if (w) {
|
|
3731
3731
|
if (m.pos == g.pos)
|
|
3732
|
-
Te &&
|
|
3732
|
+
Te && Ft <= 11 && m.parentOffset == 0 && (t.domObserver.suppressSelectionUpdates(), setTimeout(() => kt(t), 20)), k = t.state.tr.delete(y, S), M = d.resolve(h.start).marksAcross(d.resolve(h.endA));
|
|
3733
3733
|
else if (
|
|
3734
3734
|
// Adding or removing a mark
|
|
3735
3735
|
h.endA == h.endB && (L = bh(m.parent.content.cut(m.parentOffset, g.parentOffset), b.parent.content.cut(b.parentOffset, h.endA - b.start())))
|
|
@@ -3903,7 +3903,7 @@ class _c {
|
|
|
3903
3903
|
let h = we ? this.trackWrites = this.domSelectionRange().focusNode : null;
|
|
3904
3904
|
this.composing && (this.input.compositionNode = Qp(this)), (i || !this.docView.update(e.doc, c, l, this)) && (this.docView.updateOuterDeco(c), this.docView.destroy(), this.docView = pa(e.doc, c, l, this.dom, this)), h && !this.trackWrites && (p = !0);
|
|
3905
3905
|
}
|
|
3906
|
-
p || !(this.input.mouseDown && this.domObserver.currentSelection.eq(this.domSelectionRange()) && xp(this)) ?
|
|
3906
|
+
p || !(this.input.mouseDown && this.domObserver.currentSelection.eq(this.domSelectionRange()) && xp(this)) ? kt(this, p) : (wc(this, e.selection), this.domObserver.setCurSelection()), this.domObserver.start();
|
|
3907
3907
|
}
|
|
3908
3908
|
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 && tp(f);
|
|
3909
3909
|
}
|
|
@@ -3992,7 +3992,7 @@ class _c {
|
|
|
3992
3992
|
Focus the editor.
|
|
3993
3993
|
*/
|
|
3994
3994
|
focus() {
|
|
3995
|
-
this.domObserver.stop(), this.editable && np(this.dom),
|
|
3995
|
+
this.domObserver.stop(), this.editable && np(this.dom), kt(this), this.domObserver.start();
|
|
3996
3996
|
}
|
|
3997
3997
|
/**
|
|
3998
3998
|
Get the document root in which the editor exists. This will
|
|
@@ -4211,7 +4211,7 @@ function Ba(t) {
|
|
|
4211
4211
|
if (t.spec.state || t.spec.filterTransaction || t.spec.appendTransaction)
|
|
4212
4212
|
throw new RangeError("Plugins passed directly to the view must not have a state component");
|
|
4213
4213
|
}
|
|
4214
|
-
const pr = Math.floor, Sh = Math.abs,
|
|
4214
|
+
const pr = Math.floor, Sh = Math.abs, zt = (t, e) => t < e ? t : e, Dn = (t, e) => t > e ? t : e, xh = (t) => t !== 0 ? t < 0 : 1 / t < 0, Mh = 64, hr = 128, Ah = 1 << 29, _a = 63, tr = 127, Oh = 2147483647, Th = Number.isInteger || ((t) => typeof t == "number" && isFinite(t) && pr(t) === t), Dh = () => /* @__PURE__ */ new Set(), Nh = Array.isArray, Eh = String.fromCharCode, Ih = (t) => t.toLowerCase(), Ph = /^\s*/g, Rh = (t) => t.replace(Ph, ""), Lh = /([A-Z])/g, za = (t, e) => Rh(t.replace(Lh, (n) => `${e}${Ih(n)}`)), Fh = (t) => {
|
|
4215
4215
|
const e = unescape(encodeURIComponent(t)), n = e.length, r = new Uint8Array(n);
|
|
4216
4216
|
for (let o = 0; o < n; o++)
|
|
4217
4217
|
r[o] = /** @type {number} */
|
|
@@ -4277,7 +4277,7 @@ const $h = () => new zh(), Vh = (t) => {
|
|
|
4277
4277
|
);
|
|
4278
4278
|
}, $a = mr && /** @type {any} */
|
|
4279
4279
|
mr.encodeInto ? Kh : Xh, Jh = (t, e) => {
|
|
4280
|
-
const n = t.cbuf.length, r = t.cpos, o =
|
|
4280
|
+
const n = t.cbuf.length, r = t.cpos, o = zt(n - r, e.length), i = e.length - o;
|
|
4281
4281
|
t.cbuf.set(e.subarray(0, o), r), t.cpos += o, i > 0 && (t.bufs.push(t.cbuf), t.cbuf = new Uint8Array(Dn(n * 2, i)), t.cbuf.set(e.subarray(o)), t.cpos = i);
|
|
4282
4282
|
}, zc = (t, e) => {
|
|
4283
4283
|
gr(t, e.byteLength), Jh(t, e);
|
|
@@ -4359,7 +4359,7 @@ mr.encodeInto ? Kh : Xh, Jh = (t, e) => {
|
|
|
4359
4359
|
remove: t.length - n - r,
|
|
4360
4360
|
insert: e.slice(n, e.length - r)
|
|
4361
4361
|
};
|
|
4362
|
-
}, lm = am, te = new G("y-sync"),
|
|
4362
|
+
}, lm = am, te = new G("y-sync"), $t = new G("y-undo"), Ur = new G("yjs-cursor"), cm = Math.random, dm = (t) => t[pr(cm() * t.length)], Ha = (t) => t === void 0 ? null : t;
|
|
4363
4363
|
class um {
|
|
4364
4364
|
constructor() {
|
|
4365
4365
|
this.map = /* @__PURE__ */ new Map();
|
|
@@ -4384,25 +4384,25 @@ try {
|
|
|
4384
4384
|
} catch {
|
|
4385
4385
|
}
|
|
4386
4386
|
const pm = jc, Nn = typeof ie < "u" && ie.release && /node|io\.js/.test(ie.release.name) && Object.prototype.toString.call(typeof ie < "u" ? ie : 0) === "[object process]", Wc = typeof window < "u" && typeof document < "u" && !Nn;
|
|
4387
|
-
let
|
|
4387
|
+
let et;
|
|
4388
4388
|
const hm = () => {
|
|
4389
|
-
if (
|
|
4389
|
+
if (et === void 0)
|
|
4390
4390
|
if (Nn) {
|
|
4391
|
-
|
|
4391
|
+
et = oo();
|
|
4392
4392
|
const t = ie.argv;
|
|
4393
4393
|
let e = null;
|
|
4394
4394
|
for (let n = 0; n < t.length; n++) {
|
|
4395
4395
|
const r = t[n];
|
|
4396
|
-
r[0] === "-" ? (e !== null &&
|
|
4396
|
+
r[0] === "-" ? (e !== null && et.set(e, ""), e = r) : e !== null && (et.set(e, r), e = null);
|
|
4397
4397
|
}
|
|
4398
|
-
e !== null &&
|
|
4399
|
-
} else typeof location == "object" ? (
|
|
4398
|
+
e !== null && et.set(e, "");
|
|
4399
|
+
} else typeof location == "object" ? (et = oo(), (location.search || "?").slice(1).split("&").forEach((t) => {
|
|
4400
4400
|
if (t.length !== 0) {
|
|
4401
4401
|
const [e, n] = t.split("=");
|
|
4402
|
-
|
|
4402
|
+
et.set(`--${za(e, "-")}`, n), et.set(`-${za(e, "-")}`, n);
|
|
4403
4403
|
}
|
|
4404
|
-
})) :
|
|
4405
|
-
return
|
|
4404
|
+
})) : et = oo();
|
|
4405
|
+
return et;
|
|
4406
4406
|
}, Ei = (t) => hm().has(t), Ii = (t) => Ha(Nn ? ie.env[t.toUpperCase().replaceAll("-", "_")] : pm.getItem(t)), Uc = (t) => Ei("--" + t) || Ii(t) !== null;
|
|
4407
4407
|
Uc("production");
|
|
4408
4408
|
const mm = Nn && rm(ie.env.FORCE_COLOR, ["true", "1", "2"]);
|
|
@@ -4423,7 +4423,7 @@ const ym = (t) => class {
|
|
|
4423
4423
|
destroy() {
|
|
4424
4424
|
t(this._);
|
|
4425
4425
|
}
|
|
4426
|
-
}, bm = ym(clearTimeout), As = (t, e) => new bm(setTimeout(e, t)),
|
|
4426
|
+
}, bm = ym(clearTimeout), As = (t, e) => new bm(setTimeout(e, t)), ot = (t, e) => t >>> e | t << 32 - e, wm = (t) => ot(t, 2) ^ ot(t, 13) ^ ot(t, 22), vm = (t) => ot(t, 6) ^ ot(t, 11) ^ ot(t, 25), km = (t) => ot(t, 7) ^ ot(t, 18) ^ t >>> 3, Cm = (t) => ot(t, 17) ^ ot(t, 19) ^ t >>> 10, Sm = new Uint32Array([
|
|
4427
4427
|
1116352408,
|
|
4428
4428
|
1899447441,
|
|
4429
4429
|
3049323471,
|
|
@@ -4637,7 +4637,7 @@ e.sv.get(t.id.client) > t.id.clock && !T.isDeleted(e.ds, t.id), Rm = [{ light: "
|
|
|
4637
4637
|
c.state.doc.type.createAndFill().content
|
|
4638
4638
|
) !== null)) {
|
|
4639
4639
|
if (s = !0, d.addToHistory === !1 && !d.isChangeOrigin) {
|
|
4640
|
-
const u =
|
|
4640
|
+
const u = $t.getState(c.state), f = u && u.undoManager;
|
|
4641
4641
|
f && f.stopCapturing();
|
|
4642
4642
|
}
|
|
4643
4643
|
a.mux(() => {
|
|
@@ -4764,7 +4764,7 @@ class _m {
|
|
|
4764
4764
|
new H(E.from(n), 0, 0)
|
|
4765
4765
|
);
|
|
4766
4766
|
if (e) {
|
|
4767
|
-
const o =
|
|
4767
|
+
const o = zt(Dn(e.anchor, 0), r.doc.content.size), i = zt(Dn(e.head, 0), r.doc.content.size);
|
|
4768
4768
|
r.setSelection(V.create(r.doc, o, i));
|
|
4769
4769
|
}
|
|
4770
4770
|
this.prosemirrorView.dispatch(
|
|
@@ -5057,7 +5057,7 @@ const qc = (t, e, n, r, o, i) => {
|
|
|
5057
5057
|
}, wo = (t, e) => t === e || t instanceof Array && e instanceof Array && t.length === e.length && t.every(
|
|
5058
5058
|
(n, r) => e[r] === n
|
|
5059
5059
|
), Wa = (t, e, n) => {
|
|
5060
|
-
const r = t.toArray(), o = Lo(e), i = o.length, s = r.length, a =
|
|
5060
|
+
const r = t.toArray(), o = Lo(e), i = o.length, s = r.length, a = zt(s, i);
|
|
5061
5061
|
let l = 0, c = 0, d = !1;
|
|
5062
5062
|
for (; l < a; l++) {
|
|
5063
5063
|
const u = r[l], f = o[l];
|
|
@@ -5124,7 +5124,7 @@ const qc = (t, e, n, r, o, i) => {
|
|
|
5124
5124
|
for (const p in u)
|
|
5125
5125
|
f[p] === void 0 && e.removeAttribute(p);
|
|
5126
5126
|
}
|
|
5127
|
-
const o = Lo(n), i = o.length, s = e.toArray(), a = s.length, l =
|
|
5127
|
+
const o = Lo(n), i = o.length, s = e.toArray(), a = s.length, l = zt(i, a);
|
|
5128
5128
|
let c = 0, d = 0;
|
|
5129
5129
|
for (; c < l; c++) {
|
|
5130
5130
|
const u = s[c], f = o[c];
|
|
@@ -5354,13 +5354,13 @@ const qm = () => {
|
|
|
5354
5354
|
);
|
|
5355
5355
|
if (u !== null && f !== null) {
|
|
5356
5356
|
const p = Dn(t.doc.content.size - 1, 0);
|
|
5357
|
-
u =
|
|
5357
|
+
u = zt(u, p), f = zt(f, p), a.push(
|
|
5358
5358
|
z.widget(f, () => r(d, c), {
|
|
5359
5359
|
key: c + "",
|
|
5360
5360
|
side: 10
|
|
5361
5361
|
})
|
|
5362
5362
|
);
|
|
5363
|
-
const h =
|
|
5363
|
+
const h = zt(u, f), m = Dn(u, f);
|
|
5364
5364
|
a.push(
|
|
5365
5365
|
z.inline(h, m, o(d, c), {
|
|
5366
5366
|
inclusiveEnd: !0,
|
|
@@ -5441,15 +5441,15 @@ const qm = () => {
|
|
|
5441
5441
|
};
|
|
5442
5442
|
}
|
|
5443
5443
|
}), ng = (t) => {
|
|
5444
|
-
const e =
|
|
5444
|
+
const e = $t.getState(t).undoManager;
|
|
5445
5445
|
if (e != null)
|
|
5446
5446
|
return e.undo(), !0;
|
|
5447
5447
|
}, rg = (t) => {
|
|
5448
|
-
const e =
|
|
5448
|
+
const e = $t.getState(t).undoManager;
|
|
5449
5449
|
if (e != null)
|
|
5450
5450
|
return e.redo(), !0;
|
|
5451
5451
|
}, og = /* @__PURE__ */ new Set(["paragraph"]), ig = (t, e) => !(t instanceof hf) || !(t.content instanceof mf) || !(t.content.type instanceof gf || t.content.type instanceof yf && e.has(t.content.type.nodeName)) || t.content.type._length === 0, sg = ({ protectedNodes: t = og, trackedOrigins: e = [], undoManager: n = null } = {}) => new Z({
|
|
5452
|
-
key:
|
|
5452
|
+
key: $t,
|
|
5453
5453
|
state: {
|
|
5454
5454
|
init: (r, o) => {
|
|
5455
5455
|
const i = te.getState(o), s = n || new pf(i.type, {
|
|
@@ -5481,10 +5481,10 @@ const qm = () => {
|
|
|
5481
5481
|
}
|
|
5482
5482
|
},
|
|
5483
5483
|
view: (r) => {
|
|
5484
|
-
const o = te.getState(r.state), i =
|
|
5484
|
+
const o = te.getState(r.state), i = $t.getState(r.state).undoManager;
|
|
5485
5485
|
return i.on("stack-item-added", ({ stackItem: s }) => {
|
|
5486
5486
|
const a = o.binding;
|
|
5487
|
-
a && s.meta.set(a,
|
|
5487
|
+
a && s.meta.set(a, $t.getState(r.state).prevSel);
|
|
5488
5488
|
}), i.on("stack-item-popped", ({ stackItem: s }) => {
|
|
5489
5489
|
const a = o.binding;
|
|
5490
5490
|
a && (a.beforeTransactionSelection = s.meta.get(a) || a.beforeTransactionSelection);
|
|
@@ -5495,10 +5495,10 @@ const qm = () => {
|
|
|
5495
5495
|
};
|
|
5496
5496
|
}
|
|
5497
5497
|
});
|
|
5498
|
-
var
|
|
5498
|
+
var nt;
|
|
5499
5499
|
class ag {
|
|
5500
5500
|
constructor() {
|
|
5501
|
-
|
|
5501
|
+
ft(this, nt, /* @__PURE__ */ new Map());
|
|
5502
5502
|
}
|
|
5503
5503
|
/**
|
|
5504
5504
|
* Subscribe to the event.
|
|
@@ -5506,8 +5506,8 @@ class ag {
|
|
|
5506
5506
|
* @param fn Callback.
|
|
5507
5507
|
*/
|
|
5508
5508
|
on(e, n) {
|
|
5509
|
-
const r =
|
|
5510
|
-
r ? r.push(n) :
|
|
5509
|
+
const r = Qe(this, nt).get(e);
|
|
5510
|
+
r ? r.push(n) : Qe(this, nt).set(e, [n]);
|
|
5511
5511
|
}
|
|
5512
5512
|
/**
|
|
5513
5513
|
* Emit event.
|
|
@@ -5515,7 +5515,7 @@ class ag {
|
|
|
5515
5515
|
* @param args Arguments.
|
|
5516
5516
|
*/
|
|
5517
5517
|
emit(e, ...n) {
|
|
5518
|
-
const r =
|
|
5518
|
+
const r = Qe(this, nt).get(e);
|
|
5519
5519
|
if (r)
|
|
5520
5520
|
for (const o of r)
|
|
5521
5521
|
o.apply(this, n);
|
|
@@ -5527,21 +5527,21 @@ class ag {
|
|
|
5527
5527
|
* @param fn Callback.
|
|
5528
5528
|
*/
|
|
5529
5529
|
off(e, n) {
|
|
5530
|
-
const r =
|
|
5531
|
-
r && (n ?
|
|
5530
|
+
const r = Qe(this, nt).get(e);
|
|
5531
|
+
r && (n ? Qe(this, nt).set(
|
|
5532
5532
|
e,
|
|
5533
5533
|
r.filter((o) => o !== n)
|
|
5534
|
-
) :
|
|
5534
|
+
) : Qe(this, nt).delete(e));
|
|
5535
5535
|
}
|
|
5536
5536
|
/**
|
|
5537
5537
|
* Remove all registered events and subscriptions.
|
|
5538
5538
|
*/
|
|
5539
5539
|
removeAllListeners() {
|
|
5540
|
-
jo(this,
|
|
5540
|
+
jo(this, nt, /* @__PURE__ */ new Map());
|
|
5541
5541
|
}
|
|
5542
5542
|
}
|
|
5543
|
-
|
|
5544
|
-
var
|
|
5543
|
+
nt = new WeakMap();
|
|
5544
|
+
var Ht = {
|
|
5545
5545
|
8: "Backspace",
|
|
5546
5546
|
9: "Tab",
|
|
5547
5547
|
10: "Enter",
|
|
@@ -5620,13 +5620,13 @@ var Vt = {
|
|
|
5620
5620
|
221: "}",
|
|
5621
5621
|
222: '"'
|
|
5622
5622
|
}, lg = typeof navigator < "u" && /Mac/.test(navigator.platform), cg = typeof navigator < "u" && /MSIE \d|Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(navigator.userAgent);
|
|
5623
|
-
for (var ye = 0; ye < 10; ye++)
|
|
5624
|
-
for (var ye = 1; ye <= 24; ye++)
|
|
5623
|
+
for (var ye = 0; ye < 10; ye++) Ht[48 + ye] = Ht[96 + ye] = String(ye);
|
|
5624
|
+
for (var ye = 1; ye <= 24; ye++) Ht[ye + 111] = "F" + ye;
|
|
5625
5625
|
for (var ye = 65; ye <= 90; ye++)
|
|
5626
|
-
|
|
5627
|
-
for (var oi in
|
|
5626
|
+
Ht[ye] = String.fromCharCode(ye + 32), ko[ye] = String.fromCharCode(ye);
|
|
5627
|
+
for (var oi in Ht) ko.hasOwnProperty(oi) || (ko[oi] = Ht[oi]);
|
|
5628
5628
|
function dg(t) {
|
|
5629
|
-
var e = lg && t.metaKey && t.shiftKey && !t.ctrlKey && !t.altKey || cg && t.shiftKey && t.key && t.key.length == 1 || t.key == "Unidentified", n = !e && t.key || (t.shiftKey ? ko :
|
|
5629
|
+
var e = lg && t.metaKey && t.shiftKey && !t.ctrlKey && !t.altKey || cg && t.shiftKey && t.key && t.key.length == 1 || t.key == "Unidentified", n = !e && t.key || (t.shiftKey ? ko : Ht)[t.keyCode] || t.key || "Unidentified";
|
|
5630
5630
|
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;
|
|
5631
5631
|
}
|
|
5632
5632
|
const ug = typeof navigator < "u" ? /Mac|iP(hone|[oa]d)/.test(navigator.platform) : !1;
|
|
@@ -5675,7 +5675,7 @@ function Ts(t) {
|
|
|
5675
5675
|
if (a && a(n.state, n.dispatch, n))
|
|
5676
5676
|
return !0;
|
|
5677
5677
|
}
|
|
5678
|
-
if ((r.shiftKey || r.altKey || r.metaKey || o.charCodeAt(0) > 127) && (i =
|
|
5678
|
+
if ((r.shiftKey || r.altKey || r.metaKey || o.charCodeAt(0) > 127) && (i = Ht[r.keyCode]) && i != o) {
|
|
5679
5679
|
let a = e[ii(i, r)];
|
|
5680
5680
|
if (a && a(n.state, n.dispatch, n))
|
|
5681
5681
|
return !0;
|
|
@@ -5692,7 +5692,7 @@ function le(t, e) {
|
|
|
5692
5692
|
}
|
|
5693
5693
|
return t;
|
|
5694
5694
|
}
|
|
5695
|
-
function
|
|
5695
|
+
function xt(t, e) {
|
|
5696
5696
|
if (typeof t == "string") {
|
|
5697
5697
|
if (!e.marks[t])
|
|
5698
5698
|
throw Error(`There is no mark type named '${t}' in schema.`);
|
|
@@ -5801,7 +5801,7 @@ class N {
|
|
|
5801
5801
|
* @returns The mark attrs.
|
|
5802
5802
|
*/
|
|
5803
5803
|
static getMarkAttributes(e, n) {
|
|
5804
|
-
const r =
|
|
5804
|
+
const r = xt(n, e.schema), i = No(e).find((s) => s.type.name === r.name);
|
|
5805
5805
|
return i ? { ...i.attrs } : {};
|
|
5806
5806
|
}
|
|
5807
5807
|
/**
|
|
@@ -5882,7 +5882,7 @@ Fn = new WeakSet(), Yc = function(e, n) {
|
|
|
5882
5882
|
}
|
|
5883
5883
|
}
|
|
5884
5884
|
return r;
|
|
5885
|
-
},
|
|
5885
|
+
}, ft(N, Fn);
|
|
5886
5886
|
function mg(t = {}) {
|
|
5887
5887
|
return Object.keys(t).length === 0 && t.constructor === Object;
|
|
5888
5888
|
}
|
|
@@ -5968,7 +5968,7 @@ Bn = new WeakSet(), Zc = function(e, n, r) {
|
|
|
5968
5968
|
})), [i.name, c];
|
|
5969
5969
|
});
|
|
5970
5970
|
return Object.fromEntries(o);
|
|
5971
|
-
},
|
|
5971
|
+
}, ft(ar, Bn);
|
|
5972
5972
|
let _i = ar;
|
|
5973
5973
|
function Jn(t, e) {
|
|
5974
5974
|
return e.nodes[t] || e.marks[t] || null;
|
|
@@ -6237,7 +6237,7 @@ const vg = (t, e) => {
|
|
|
6237
6237
|
var _n, ed, td;
|
|
6238
6238
|
const xn = class xn {
|
|
6239
6239
|
constructor(e, n, r) {
|
|
6240
|
-
|
|
6240
|
+
ft(this, _n);
|
|
6241
6241
|
P(this, "editor");
|
|
6242
6242
|
P(this, "schema");
|
|
6243
6243
|
P(this, "extensions");
|
|
@@ -6583,7 +6583,7 @@ const Eg = (t, e) => {
|
|
|
6583
6583
|
return !1;
|
|
6584
6584
|
if (n.depth > 1 && n.after() != n.end(-1)) {
|
|
6585
6585
|
let i = n.before();
|
|
6586
|
-
if (
|
|
6586
|
+
if (wt(t.doc, i))
|
|
6587
6587
|
return e && e(t.tr.split(i).scrollIntoView()), !0;
|
|
6588
6588
|
}
|
|
6589
6589
|
let r = n.blockRange(), o = r && Ar(r);
|
|
@@ -6593,7 +6593,7 @@ function Ig(t) {
|
|
|
6593
6593
|
return (e, n) => {
|
|
6594
6594
|
let { $from: r, $to: o } = e.selection;
|
|
6595
6595
|
if (e.selection instanceof B && e.selection.node.isBlock)
|
|
6596
|
-
return !r.parentOffset || !
|
|
6596
|
+
return !r.parentOffset || !wt(e.doc, r.pos) ? !1 : (n && n(e.tr.split(r.pos).scrollIntoView()), !0);
|
|
6597
6597
|
if (!r.depth)
|
|
6598
6598
|
return !1;
|
|
6599
6599
|
let i = [], s, a, l = !1, c = !1;
|
|
@@ -6608,8 +6608,8 @@ function Ig(t) {
|
|
|
6608
6608
|
}
|
|
6609
6609
|
let d = e.tr;
|
|
6610
6610
|
(e.selection instanceof V || e.selection instanceof Mr) && d.deleteSelection();
|
|
6611
|
-
let u = d.mapping.map(r.pos), f =
|
|
6612
|
-
if (f || (i[0] = a ? { type: a } : null, f =
|
|
6611
|
+
let u = d.mapping.map(r.pos), f = wt(d.doc, u, i.length, i);
|
|
6612
|
+
if (f || (i[0] = a ? { type: a } : null, f = wt(d.doc, u, i.length, i)), d.split(u, i.length, i), !l && c && r.node(s).type != a) {
|
|
6613
6613
|
let p = d.mapping.map(r.before(s)), h = d.doc.resolve(p);
|
|
6614
6614
|
a && r.node(s - 1).canReplaceWith(h.index(), h.index() + 1, a) && d.setNodeMarkup(d.mapping.map(r.before(s)), a);
|
|
6615
6615
|
}
|
|
@@ -6730,14 +6730,14 @@ const Ka = (t, e) => {
|
|
|
6730
6730
|
}, _g = ({ keepMarks: t = !0 } = {}) => (e) => {
|
|
6731
6731
|
const { tr: n, state: r, dispatch: o, editor: i } = e, { selection: s, doc: a } = n, { $from: l, $to: c } = s, d = i.extensionService.attributes, u = N.getSplittedAttributes(d, l.node().type.name, l.node().attrs);
|
|
6732
6732
|
if (s instanceof B && s.node.isBlock)
|
|
6733
|
-
return !l.parentOffset || !
|
|
6733
|
+
return !l.parentOffset || !wt(a, l.pos) ? !1 : (o && (t && Ka(r, i.extensionService.splittableMarks), n.split(l.pos).scrollIntoView()), !0);
|
|
6734
6734
|
if (!l.parent.isBlock) return !1;
|
|
6735
6735
|
if (o) {
|
|
6736
6736
|
const f = c.parentOffset === c.parent.content.size;
|
|
6737
6737
|
s instanceof V && n.deleteSelection();
|
|
6738
6738
|
const p = l.depth === 0 ? null : pd(l.node(-1).contentMatchAt(l.indexAfter(-1)));
|
|
6739
|
-
let h = f && p ? [{ type: p, attrs: u }] : void 0, m =
|
|
6740
|
-
if (!h && !m &&
|
|
6739
|
+
let h = f && p ? [{ type: p, attrs: u }] : void 0, m = wt(n.doc, n.mapping.map(l.pos), 1, h);
|
|
6740
|
+
if (!h && !m && wt(n.doc, n.mapping.map(l.pos), 1, p ? [{ type: p }] : void 0) && (m = !0, h = p ? [{ type: p, attrs: u }] : void 0), m && (n.split(n.mapping.map(l.pos), 1, h), p && !f && !l.parentOffset && l.parent.type !== p)) {
|
|
6741
6741
|
const g = n.mapping.map(l.before()), b = n.doc.resolve(g);
|
|
6742
6742
|
l.node(-1).canReplaceWith(b.index(), b.index() + 1, p) && n.setNodeMarkup(n.mapping.map(l.before()), p);
|
|
6743
6743
|
}
|
|
@@ -6766,7 +6766,7 @@ function jg(t, e, n) {
|
|
|
6766
6766
|
});
|
|
6767
6767
|
}
|
|
6768
6768
|
const Wg = (t, e = {}) => ({ tr: n, state: r, dispatch: o }) => {
|
|
6769
|
-
const { selection: i } = n, { empty: s, ranges: a } = i, l =
|
|
6769
|
+
const { selection: i } = n, { empty: s, ranges: a } = i, l = xt(t, r.schema);
|
|
6770
6770
|
if (o)
|
|
6771
6771
|
if (s) {
|
|
6772
6772
|
const c = N.getMarkAttributes(r, l);
|
|
@@ -6815,7 +6815,7 @@ function Ps(t, e, n = {}) {
|
|
|
6815
6815
|
return { from: s, to: l };
|
|
6816
6816
|
}
|
|
6817
6817
|
const qg = (t, e = {}) => ({ tr: n, state: r, dispatch: o }) => {
|
|
6818
|
-
const { extendEmptyMarkRange: i = !1 } = e, { selection: s } = n, a =
|
|
6818
|
+
const { extendEmptyMarkRange: i = !1 } = e, { selection: s } = n, a = xt(t, r.schema), { $from: l, empty: c, ranges: d } = s;
|
|
6819
6819
|
if (!o) return !0;
|
|
6820
6820
|
if (c && i) {
|
|
6821
6821
|
let { from: u, to: f } = s;
|
|
@@ -6833,7 +6833,7 @@ const qg = (t, e = {}) => ({ tr: n, state: r, dispatch: o }) => {
|
|
|
6833
6833
|
}), !0;
|
|
6834
6834
|
};
|
|
6835
6835
|
function Co(t, e, n = {}) {
|
|
6836
|
-
const { empty: r, ranges: o } = t.selection, i = e ?
|
|
6836
|
+
const { empty: r, ranges: o } = t.selection, i = e ? xt(e, t.schema) : null;
|
|
6837
6837
|
if (r)
|
|
6838
6838
|
return !!(t.storedMarks || t.selection.$from.marks()).filter((u) => i ? i.name === u.type.name : !0).find((u) => cr(u.attrs, n, { strict: !1 }));
|
|
6839
6839
|
let s = 0;
|
|
@@ -6856,7 +6856,7 @@ function Co(t, e, n = {}) {
|
|
|
6856
6856
|
return (l > 0 ? l + c : l) >= s;
|
|
6857
6857
|
}
|
|
6858
6858
|
const Xg = (t, e = {}, n = {}) => ({ state: r, commands: o }) => {
|
|
6859
|
-
const { extendEmptyMarkRange: i = !1 } = n, s =
|
|
6859
|
+
const { extendEmptyMarkRange: i = !1 } = n, s = xt(t, r.schema);
|
|
6860
6860
|
return Co(r, s, e) ? o.unsetMark(s, { extendEmptyMarkRange: i }) : o.setMark(s, e);
|
|
6861
6861
|
}, Jg = () => ({ state: t, tr: e, dispatch: n }) => {
|
|
6862
6862
|
const { selection: r } = e, { ranges: o } = r;
|
|
@@ -6900,7 +6900,7 @@ const Gg = (t, e, n = {}) => ({ state: r, commands: o }) => {
|
|
|
6900
6900
|
typeof t == "string" ? t : t.name,
|
|
6901
6901
|
r.schema
|
|
6902
6902
|
);
|
|
6903
|
-
return a ? (a === "node" && (i = le(t, r.schema)), a === "mark" && (s =
|
|
6903
|
+
return a ? (a === "node" && (i = le(t, r.schema)), a === "mark" && (s = xt(t, r.schema)), o && n.selection.ranges.forEach((l) => {
|
|
6904
6904
|
const c = l.$from.pos, d = l.$to.pos;
|
|
6905
6905
|
r.doc.nodesBetween(c, d, (u, f) => {
|
|
6906
6906
|
i && i === u.type && n.setNodeMarkup(f, void 0, { ...u.attrs, ...e }), s && u.marks.length && u.marks.forEach((p) => {
|
|
@@ -6922,7 +6922,7 @@ const ty = (t, e) => ({ tr: n, state: r, dispatch: o }) => {
|
|
|
6922
6922
|
typeof t == "string" ? t : t.name,
|
|
6923
6923
|
r.schema
|
|
6924
6924
|
);
|
|
6925
|
-
return a ? (a === "node" && (i = le(t, r.schema)), a === "mark" && (s =
|
|
6925
|
+
return a ? (a === "node" && (i = le(t, r.schema)), a === "mark" && (s = xt(t, r.schema)), o && n.selection.ranges.forEach((l) => {
|
|
6926
6926
|
r.doc.nodesBetween(l.$from.pos, l.$to.pos, (c, d) => {
|
|
6927
6927
|
i && i === c.type && n.setNodeMarkup(d, void 0, Xa(c.attrs, e)), s && c.marks.length && c.marks.forEach((u) => {
|
|
6928
6928
|
s === u.type && n.addMark(d, d + c.nodeSize, s.create(Xa(u.attrs, e)));
|
|
@@ -6995,7 +6995,7 @@ function uy(t, e, n) {
|
|
|
6995
6995
|
if (r < e)
|
|
6996
6996
|
return;
|
|
6997
6997
|
const o = t.steps[r];
|
|
6998
|
-
if (!(o instanceof
|
|
6998
|
+
if (!(o instanceof Vt || o instanceof an))
|
|
6999
6999
|
return;
|
|
7000
7000
|
const i = t.mapping.maps[r];
|
|
7001
7001
|
let s = 0;
|
|
@@ -7092,7 +7092,7 @@ function yy(t, e, n, r, o) {
|
|
|
7092
7092
|
n[d].type == o && (s = d + 1);
|
|
7093
7093
|
let a = n.length - s, l = e.start + n.length - (r ? 2 : 0), c = e.parent;
|
|
7094
7094
|
for (let d = e.startIndex, u = e.endIndex, f = !0; d < u; d++, f = !1)
|
|
7095
|
-
!f &&
|
|
7095
|
+
!f && wt(t.doc, l, a) && (t.split(l, a), l += 2 * a), l += c.child(d).nodeSize;
|
|
7096
7096
|
return t;
|
|
7097
7097
|
}
|
|
7098
7098
|
function by(t) {
|
|
@@ -7156,7 +7156,7 @@ const Cy = (t, e = {}) => ({ state: n, dispatch: r }) => {
|
|
|
7156
7156
|
node: r
|
|
7157
7157
|
};
|
|
7158
7158
|
}
|
|
7159
|
-
},
|
|
7159
|
+
}, je = (t) => ({ $from: e }) => Bo(e, t), Hi = (t, e) => {
|
|
7160
7160
|
const r = e.filter((s) => s.type === "node").find((s) => s.name === t);
|
|
7161
7161
|
if (!r) return !1;
|
|
7162
7162
|
const o = {
|
|
@@ -8309,14 +8309,14 @@ const Cy = (t, e = {}) => ({ state: n, dispatch: r }) => {
|
|
|
8309
8309
|
}
|
|
8310
8310
|
]
|
|
8311
8311
|
}, ai = (t, e) => {
|
|
8312
|
-
const n =
|
|
8312
|
+
const n = je((s) => s.type === e)(t.selection);
|
|
8313
8313
|
if (!n) return !0;
|
|
8314
8314
|
const r = t.doc.resolve(Math.max(0, n.pos - 1)).before(n.depth);
|
|
8315
8315
|
if (r === void 0) return !0;
|
|
8316
8316
|
const o = t.doc.nodeAt(r);
|
|
8317
8317
|
return n.node.type === o?.type && jt(t.doc, n.pos) && t.join(n.pos), !0;
|
|
8318
8318
|
}, li = (t, e) => {
|
|
8319
|
-
const n =
|
|
8319
|
+
const n = je((s) => s.type === e)(t.selection);
|
|
8320
8320
|
if (!n) return !0;
|
|
8321
8321
|
const r = t.doc.resolve(n.start).after(n.depth);
|
|
8322
8322
|
if (r === void 0) return !0;
|
|
@@ -8325,7 +8325,7 @@ const Cy = (t, e = {}) => ({ state: n, dispatch: r }) => {
|
|
|
8325
8325
|
}, My = (t, e, n, r = {}) => (o) => {
|
|
8326
8326
|
const { editor: i, tr: s, state: a, dispatch: l, chain: c, can: d, commands: u } = o, { extensions: f, splittableMarks: p } = i.extensionService, h = le(t, a.schema), m = le(e, a.schema), { selection: g, storedMarks: b } = a, { $from: w, $to: C } = g, y = w.blockRange(C), S = b || g.$to.parentOffset && g.$from.marks();
|
|
8327
8327
|
if (!y) return !1;
|
|
8328
|
-
const k =
|
|
8328
|
+
const k = je((_) => Hi(_.type.name, f))(g), { numbering: M } = i.converter;
|
|
8329
8329
|
if (y.depth >= 1 && k && y.depth - k.depth <= 1) {
|
|
8330
8330
|
if (k.node.type === h) {
|
|
8331
8331
|
const { listId: _ } = k.node.attrs;
|
|
@@ -8410,7 +8410,7 @@ const Cy = (t, e = {}) => ({ state: n, dispatch: r }) => {
|
|
|
8410
8410
|
{ type: s, attrs: p },
|
|
8411
8411
|
{ type: f, attrs: h }
|
|
8412
8412
|
] : [{ type: s, attrs: p }];
|
|
8413
|
-
if (!
|
|
8413
|
+
if (!wt(n.doc, a.pos, 2))
|
|
8414
8414
|
return !1;
|
|
8415
8415
|
if (o) {
|
|
8416
8416
|
const { selection: g, storedMarks: b } = r, { splittableMarks: w } = i.extensionService, C = b || g.$to.parentOffset && g.$from.marks();
|
|
@@ -8632,7 +8632,7 @@ const Rs = ({
|
|
|
8632
8632
|
return t.doc.nodesBetween(e, n, (d, u) => {
|
|
8633
8633
|
if (!d.type.name.includes("table"))
|
|
8634
8634
|
if (d.isInline && d.marks.find((f) => f.type.name === Ve && f.attrs.authorEmail === r.email)) {
|
|
8635
|
-
const f = new
|
|
8635
|
+
const f = new Vt(
|
|
8636
8636
|
l.map(Math.max(e, u)),
|
|
8637
8637
|
l.map(Math.min(n, u + d.nodeSize)),
|
|
8638
8638
|
H.empty
|
|
@@ -8755,7 +8755,7 @@ const Cd = (t) => {
|
|
|
8755
8755
|
defaultBlockAt: pd,
|
|
8756
8756
|
findChildren: Ls,
|
|
8757
8757
|
findMark: Eo,
|
|
8758
|
-
findParentNode:
|
|
8758
|
+
findParentNode: je,
|
|
8759
8759
|
findParentNodeClosestToPos: Bo,
|
|
8760
8760
|
generateDocxListAttributes: zy,
|
|
8761
8761
|
generateDocxRandomId: vn,
|
|
@@ -8763,7 +8763,7 @@ const Cd = (t) => {
|
|
|
8763
8763
|
getActiveFormatting: Ef,
|
|
8764
8764
|
getExtensionConfigField: D,
|
|
8765
8765
|
getMarkRange: Ps,
|
|
8766
|
-
getMarkType:
|
|
8766
|
+
getMarkType: xt,
|
|
8767
8767
|
getMarksBetween: $y,
|
|
8768
8768
|
getMarksFromSelection: No,
|
|
8769
8769
|
getNodeType: le,
|
|
@@ -9457,7 +9457,7 @@ function tb(t, e) {
|
|
|
9457
9457
|
}), n;
|
|
9458
9458
|
}
|
|
9459
9459
|
const Td = ({ state: t, tr: e, step: n, newTr: r, map: o, doc: i, user: s, date: a, originalStep: l, originalStepIndex: c }) => {
|
|
9460
|
-
const d = t.schema.marks[ue], u = Eo(t, d, !1), f = u ? u.to : n.to, p = new
|
|
9460
|
+
const d = t.schema.marks[ue], u = Eo(t, d, !1), f = u ? u.to : n.to, p = new Vt(
|
|
9461
9461
|
f,
|
|
9462
9462
|
// We insert all the same steps, but with "from"/"to" both set to "to" in order not to delete content. Mapped as needed.
|
|
9463
9463
|
f,
|
|
@@ -9476,7 +9476,7 @@ const Td = ({ state: t, tr: e, step: n, newTr: r, map: o, doc: i, user: s, date:
|
|
|
9476
9476
|
to: b,
|
|
9477
9477
|
user: s,
|
|
9478
9478
|
date: a
|
|
9479
|
-
}), C = new
|
|
9479
|
+
}), C = new Vt(p.from, p.to, g.doc.slice(p.from, b));
|
|
9480
9480
|
r.step(C);
|
|
9481
9481
|
const y = o.maps.length - 1;
|
|
9482
9482
|
o.appendMap(C.getMap(), y), p.from !== b && (m.insertedMark = w, m.step = C), r.selection.eq(g.selection) || r.setSelection(g.selection);
|
|
@@ -9583,7 +9583,7 @@ const Td = ({ state: t, tr: e, step: n, newTr: r, map: o, doc: i, user: s, date:
|
|
|
9583
9583
|
const i = e.tr, s = new lr(), a = Math.floor(Date.now() / 6e5) * 6e5, l = new Date(a).toISOString();
|
|
9584
9584
|
if (t.steps.forEach((c, d) => {
|
|
9585
9585
|
const u = c.map(s), { doc: f } = i;
|
|
9586
|
-
u && (u instanceof
|
|
9586
|
+
u && (u instanceof Vt ? (Td({
|
|
9587
9587
|
state: e,
|
|
9588
9588
|
tr: t,
|
|
9589
9589
|
step: u,
|
|
@@ -9658,14 +9658,14 @@ var tn, ms, O, Id, Pd, Wi, Rd, Ui, qi, Ki, Xi, Ji, Yi, Gi, Zi, Qi, Ld, Yn, Gn, F
|
|
|
9658
9658
|
const Js = class Js extends ag {
|
|
9659
9659
|
constructor(n) {
|
|
9660
9660
|
super();
|
|
9661
|
-
|
|
9662
|
-
|
|
9661
|
+
ft(this, O);
|
|
9662
|
+
ft(this, tn);
|
|
9663
9663
|
P(this, "extensionService");
|
|
9664
9664
|
P(this, "extensionStorage", {});
|
|
9665
9665
|
P(this, "schema");
|
|
9666
9666
|
P(this, "view");
|
|
9667
9667
|
P(this, "isFocused", !1);
|
|
9668
|
-
|
|
9668
|
+
ft(this, ms);
|
|
9669
9669
|
P(this, "options", {
|
|
9670
9670
|
element: null,
|
|
9671
9671
|
isHeadless: !1,
|
|
@@ -9754,7 +9754,7 @@ const Js = class Js extends ag {
|
|
|
9754
9754
|
* Get object of registered commands.
|
|
9755
9755
|
*/
|
|
9756
9756
|
get commands() {
|
|
9757
|
-
return
|
|
9757
|
+
return Qe(this, tn).commands;
|
|
9758
9758
|
}
|
|
9759
9759
|
/**
|
|
9760
9760
|
* Check if the editor is editable.
|
|
@@ -9784,13 +9784,13 @@ const Js = class Js extends ag {
|
|
|
9784
9784
|
* Create a chain of commands to call multiple commands at once.
|
|
9785
9785
|
*/
|
|
9786
9786
|
chain() {
|
|
9787
|
-
return
|
|
9787
|
+
return Qe(this, tn).chain();
|
|
9788
9788
|
}
|
|
9789
9789
|
/**
|
|
9790
9790
|
* Check if a command or a chain of commands can be executed. Without executing it.
|
|
9791
9791
|
*/
|
|
9792
9792
|
can() {
|
|
9793
|
-
return
|
|
9793
|
+
return Qe(this, tn).can();
|
|
9794
9794
|
}
|
|
9795
9795
|
setDocumentMode(n) {
|
|
9796
9796
|
let r = n?.toLowerCase() || "editing";
|
|
@@ -10018,7 +10018,7 @@ const Js = class Js extends ag {
|
|
|
10018
10018
|
* @returns {Y.Doc | undefined} Updated Y.Doc if any, otherwise undefined
|
|
10019
10019
|
*/
|
|
10020
10020
|
processCollaborationMigrations() {
|
|
10021
|
-
if (console.debug("[checkVersionMigrations] Current editor version", "0.9.
|
|
10021
|
+
if (console.debug("[checkVersionMigrations] Current editor version", "0.9.23"), !this.options.ydoc) return;
|
|
10022
10022
|
let r = this.options.ydoc.getMap("meta").get("version");
|
|
10023
10023
|
r || (r = "initial"), console.debug("[checkVersionMigrations] Document version", r);
|
|
10024
10024
|
const o = Qa(r) || [], s = this.state.plugins.find((c) => c.key.startsWith("y-sync"));
|
|
@@ -10312,7 +10312,7 @@ class Fe {
|
|
|
10312
10312
|
}
|
|
10313
10313
|
}
|
|
10314
10314
|
const sb = /[\d-.]+(\w+)$/, ab = ["px", "rem", "em", "in", "q", "mm", "cm", "pt", "pc", "vh", "vw", "vmin", "vmax"];
|
|
10315
|
-
function
|
|
10315
|
+
function Ct(t = "0") {
|
|
10316
10316
|
const e = t || "0", n = Number.parseFloat(e), o = (e.match(sb)?.[1] ?? "").toLowerCase();
|
|
10317
10317
|
return [n, ab.includes(o) ? o : null];
|
|
10318
10318
|
}
|
|
@@ -10393,7 +10393,7 @@ const $d = Q.create({
|
|
|
10393
10393
|
parseDOM: (t) => t.style.fontSize,
|
|
10394
10394
|
renderDOM: (t) => {
|
|
10395
10395
|
if (!t.fontSize) return {};
|
|
10396
|
-
let [e, n] =
|
|
10396
|
+
let [e, n] = Ct(t.fontSize);
|
|
10397
10397
|
return Number.isNaN(e) ? {} : (n = n || this.options.defaults.unit, { style: `font-size: ${e}${n}` });
|
|
10398
10398
|
}
|
|
10399
10399
|
}
|
|
@@ -10404,7 +10404,7 @@ const $d = Q.create({
|
|
|
10404
10404
|
addCommands() {
|
|
10405
10405
|
return {
|
|
10406
10406
|
setFontSize: (t) => ({ chain: e }) => {
|
|
10407
|
-
let [n, r] =
|
|
10407
|
+
let [n, r] = Ct(t);
|
|
10408
10408
|
if (Number.isNaN(n))
|
|
10409
10409
|
return !1;
|
|
10410
10410
|
let { min: o, max: i, unit: s } = this.options.defaults;
|
|
@@ -10473,7 +10473,7 @@ const $d = Q.create({
|
|
|
10473
10473
|
parseDOM: (t) => t.style.textIndent,
|
|
10474
10474
|
renderDOM: (t) => {
|
|
10475
10475
|
if (!t.textIndent) return {};
|
|
10476
|
-
let [e, n] =
|
|
10476
|
+
let [e, n] = Ct(t.textIndent);
|
|
10477
10477
|
return Number.isNaN(e) || !e ? {} : (n = n || this.options.defaults.unit, { style: `margin-left: ${e}${n}` });
|
|
10478
10478
|
}
|
|
10479
10479
|
}
|
|
@@ -10493,7 +10493,7 @@ const $d = Q.create({
|
|
|
10493
10493
|
textIndent: `${i}${s}`
|
|
10494
10494
|
});
|
|
10495
10495
|
}
|
|
10496
|
-
let [r, o] =
|
|
10496
|
+
let [r, o] = Ct(n);
|
|
10497
10497
|
return r = r + this.options.defaults.increment, o = o || this.options.defaults.unit, Number.isNaN(r) ? !1 : t.updateAttributes(e, {
|
|
10498
10498
|
textIndent: `${r}${o}`
|
|
10499
10499
|
});
|
|
@@ -10501,7 +10501,7 @@ const $d = Q.create({
|
|
|
10501
10501
|
decreaseTextIndent: () => ({ commands: t }) => this.options.types.map((e) => {
|
|
10502
10502
|
let { textIndent: n } = this.editor.getAttributes(e);
|
|
10503
10503
|
if (!n) return !1;
|
|
10504
|
-
let [r, o] =
|
|
10504
|
+
let [r, o] = Ct(n);
|
|
10505
10505
|
return r = r - this.options.defaults.increment, o = o || this.options.defaults.unit, Number.isNaN(r) ? !1 : r <= 0 ? t.unsetTextIndent() : t.updateAttributes(e, {
|
|
10506
10506
|
textIndent: `${r}${o}`
|
|
10507
10507
|
});
|
|
@@ -10528,7 +10528,7 @@ const $d = Q.create({
|
|
|
10528
10528
|
parseDOM: (t) => t.style.lineHeight,
|
|
10529
10529
|
renderDOM: (t) => {
|
|
10530
10530
|
if (!t.lineHeight) return {};
|
|
10531
|
-
let [e, n] =
|
|
10531
|
+
let [e, n] = Ct(t.lineHeight);
|
|
10532
10532
|
return Number.isNaN(e) ? {} : (n = n || this.options.defaults.unit, { style: `line-height: ${e}${n}` });
|
|
10533
10533
|
}
|
|
10534
10534
|
}
|
|
@@ -10927,8 +10927,8 @@ const yb = Q.create({
|
|
|
10927
10927
|
},
|
|
10928
10928
|
addCommands() {
|
|
10929
10929
|
return {
|
|
10930
|
-
undo: () => ({ tr: t, state: e, dispatch: n }) => (t.setMeta("preventDispatch", !0), t.setMeta("inputType", "historyUndo"),
|
|
10931
|
-
redo: () => ({ tr: t, state: e, dispatch: n }) => (t.setMeta("preventDispatch", !0), t.setMeta("inputType", "historyRedo"),
|
|
10930
|
+
undo: () => ({ tr: t, state: e, dispatch: n }) => (t.setMeta("preventDispatch", !0), t.setMeta("inputType", "historyUndo"), $t.getState(e).undoManager.undoStack.length === 0 ? !1 : n ? ng(e) : !0),
|
|
10931
|
+
redo: () => ({ tr: t, state: e, dispatch: n }) => (t.setMeta("preventDispatch", !0), t.setMeta("inputType", "historyRedo"), $t.getState(e).undoManager.redoStack.length === 0 ? !1 : n ? rg(e) : !0),
|
|
10932
10932
|
addImageToCollaboration: ({ mediaPath: t, fileData: e }) => () => {
|
|
10933
10933
|
if (!this.options.ydoc) return;
|
|
10934
10934
|
this.options.ydoc.getMap("media").set(t, e);
|
|
@@ -11340,12 +11340,26 @@ const nl = /^(\d+)\.\s$/, Zd = Y.create({
|
|
|
11340
11340
|
addCommands() {
|
|
11341
11341
|
return {
|
|
11342
11342
|
toggleOrderedList: () => ({ commands: t }) => t.toggleList(this.name, this.options.itemTypeName, this.options.keepMarks),
|
|
11343
|
+
getCurrentList: () => ({ state: t }) => je((e) => e.type.name === this.name)(t.selection),
|
|
11344
|
+
restartListNodes: (t, e) => ({ tr: n, state: r }) => {
|
|
11345
|
+
let o = e;
|
|
11346
|
+
return t.map((s) => {
|
|
11347
|
+
const a = {
|
|
11348
|
+
node: s,
|
|
11349
|
+
pos: o
|
|
11350
|
+
};
|
|
11351
|
+
return o += s.nodeSize, a;
|
|
11352
|
+
}).forEach((s) => {
|
|
11353
|
+
const { pos: a } = s, l = n.mapping.map(a);
|
|
11354
|
+
n.setNodeMarkup(l, void 0, {});
|
|
11355
|
+
}), !0;
|
|
11356
|
+
},
|
|
11343
11357
|
/**
|
|
11344
11358
|
* Updates ordered list style type when sink or lift `listItem`.
|
|
11345
11359
|
* @example 1,2,3 -> a,b,c -> i,ii,iii -> 1,2,3 -> etc
|
|
11346
11360
|
*/
|
|
11347
11361
|
updateOrderedListStyleType: () => ({ dispatch: t, state: e, tr: n }) => {
|
|
11348
|
-
let r =
|
|
11362
|
+
let r = je((o) => o.type.name === this.name)(n.selection);
|
|
11349
11363
|
if (!r)
|
|
11350
11364
|
return !0;
|
|
11351
11365
|
if (t) {
|
|
@@ -11370,7 +11384,7 @@ const nl = /^(\d+)\.\s$/, Zd = Y.create({
|
|
|
11370
11384
|
* </ol>
|
|
11371
11385
|
*/
|
|
11372
11386
|
liftEmptyBlockAndContinueListOrder: () => ({ editor: t, dispatch: e, state: n, tr: r, commands: o }) => {
|
|
11373
|
-
let i =
|
|
11387
|
+
let i = je((f) => f.type.name === this.name)(n.selection);
|
|
11374
11388
|
if (!i)
|
|
11375
11389
|
return !1;
|
|
11376
11390
|
let s = t.can().liftEmptyBlock(), a = i.depth === 1, l = i.node.childCount === 1, c = n.selection.$from.node(-1), d = i.node.lastChild.eq(c);
|
|
@@ -11497,7 +11511,7 @@ function Hb(t = {}) {
|
|
|
11497
11511
|
function rl(t) {
|
|
11498
11512
|
let { doc: e, storedMarks: n } = t, r = [], o = Ls(e, (i) => i.type.name === "listItem");
|
|
11499
11513
|
return o.length && o.forEach(({ node: i, pos: s }) => {
|
|
11500
|
-
let a = [], l =
|
|
11514
|
+
let a = [], l = xt("textStyle", e.type.schema);
|
|
11501
11515
|
if (Wb(i) && n) {
|
|
11502
11516
|
let g = n.filter((b) => b.type === l);
|
|
11503
11517
|
a.push(...g);
|
|
@@ -11509,7 +11523,7 @@ function rl(t) {
|
|
|
11509
11523
|
a.forEach((g) => {
|
|
11510
11524
|
let { attrs: b } = g;
|
|
11511
11525
|
if (b.fontSize && !d) {
|
|
11512
|
-
let [w, C] =
|
|
11526
|
+
let [w, C] = Ct(b.fontSize);
|
|
11513
11527
|
Number.isNaN(w) || (C = C ?? "pt", d = `${w}${C}`);
|
|
11514
11528
|
}
|
|
11515
11529
|
b.fontFamily && !u && (u = b.fontFamily);
|
|
@@ -11638,6 +11652,23 @@ const tu = Y.create({
|
|
|
11638
11652
|
}
|
|
11639
11653
|
};
|
|
11640
11654
|
},
|
|
11655
|
+
addCommands() {
|
|
11656
|
+
return {
|
|
11657
|
+
getCurrentListNode: () => ({ state: t }) => je((e) => e.type.name === this.name)(t.selection),
|
|
11658
|
+
increaseListIndent: () => ({ commands: t }) => t.sinkListItem(this.name) ? (t.updateNodeStyle(), t.updateOrderedListStyleType(), !0) : !1,
|
|
11659
|
+
decreaseListIndent: () => ({ commands: t }) => {
|
|
11660
|
+
const e = t.getCurrentList(), n = t.getCurrentListNode(), r = e?.node?.children.findIndex((s) => s === n.node), o = n?.pos + n?.node.nodeSize, i = e?.node?.children.slice(r + 1) || [];
|
|
11661
|
+
return t.liftListItem(this.name) ? (t.updateNodeStyle(), t.updateOrderedListStyleType(), t.restartListNodes(i, o), !0) : !1;
|
|
11662
|
+
},
|
|
11663
|
+
updateNodeStyle: () => ({ tr: t, state: e }) => {
|
|
11664
|
+
let n = je((s) => s.type.name === "orderedList")(t.selection);
|
|
11665
|
+
const r = je((s) => s.type.name === this.name)(e.selection), o = n?.node.children[0]?.attrs, i = t.mapping.map(r.pos);
|
|
11666
|
+
return t.setNodeMarkup(i, void 0, {
|
|
11667
|
+
...o
|
|
11668
|
+
}), !0;
|
|
11669
|
+
}
|
|
11670
|
+
};
|
|
11671
|
+
},
|
|
11641
11672
|
addShortcuts() {
|
|
11642
11673
|
return {
|
|
11643
11674
|
Enter: () => this.editor.commands.splitListItem(this.name),
|
|
@@ -11645,8 +11676,8 @@ const tu = Y.create({
|
|
|
11645
11676
|
() => t.createParagraphNear(),
|
|
11646
11677
|
() => t.splitBlock()
|
|
11647
11678
|
]),
|
|
11648
|
-
Tab: () => this.editor.
|
|
11649
|
-
"Shift-Tab": () => this.editor.
|
|
11679
|
+
Tab: () => this.editor.commands.increaseListIndent(),
|
|
11680
|
+
"Shift-Tab": () => this.editor.commands.decreaseListIndent()
|
|
11650
11681
|
};
|
|
11651
11682
|
},
|
|
11652
11683
|
addPmPlugins() {
|
|
@@ -11665,7 +11696,7 @@ const tu = Y.create({
|
|
|
11665
11696
|
if (o === i) return;
|
|
11666
11697
|
let s = o, a = n.doc.nodeAt(o);
|
|
11667
11698
|
if (a.type.name !== "paragraph") {
|
|
11668
|
-
const l =
|
|
11699
|
+
const l = je((c) => c.type.name === "paragraph")(n.selection) || {};
|
|
11669
11700
|
s = l.pos, a = l.node;
|
|
11670
11701
|
}
|
|
11671
11702
|
n.setNodeMarkup(s, void 0, {
|
|
@@ -12444,7 +12475,7 @@ function ve(t) {
|
|
|
12444
12475
|
}
|
|
12445
12476
|
return e;
|
|
12446
12477
|
}
|
|
12447
|
-
var
|
|
12478
|
+
var Pt = new G("selectingCells");
|
|
12448
12479
|
function $n(t) {
|
|
12449
12480
|
for (let e = t.depth - 1; e > 0; e--)
|
|
12450
12481
|
if (t.node(e).type.spec.tableRole == "row")
|
|
@@ -12458,7 +12489,7 @@ function f0(t) {
|
|
|
12458
12489
|
}
|
|
12459
12490
|
return null;
|
|
12460
12491
|
}
|
|
12461
|
-
function
|
|
12492
|
+
function Ze(t) {
|
|
12462
12493
|
const e = t.selection.$head;
|
|
12463
12494
|
for (let n = e.depth; n > 0; n--)
|
|
12464
12495
|
if (e.node(n).type.spec.tableRole == "row") return !0;
|
|
@@ -12518,7 +12549,7 @@ function m0(t, e, n) {
|
|
|
12518
12549
|
return !1;
|
|
12519
12550
|
return !0;
|
|
12520
12551
|
}
|
|
12521
|
-
var X = class
|
|
12552
|
+
var X = class ht extends J {
|
|
12522
12553
|
// A table selection is identified by its anchor and head cells. The
|
|
12523
12554
|
// positions given to this constructor should point _before_ two
|
|
12524
12555
|
// cells in the same table. They may be the same, to select a single
|
|
@@ -12545,7 +12576,7 @@ var X = class pt extends J {
|
|
|
12545
12576
|
const r = e.resolve(n.map(this.$anchorCell.pos)), o = e.resolve(n.map(this.$headCell.pos));
|
|
12546
12577
|
if (rs(r) && rs(o) && $s(r, o)) {
|
|
12547
12578
|
const i = this.$anchorCell.node(-1) != r.node(-1);
|
|
12548
|
-
return i && this.isRowSelection() ?
|
|
12579
|
+
return i && this.isRowSelection() ? ht.rowSelection(r, o) : i && this.isColSelection() ? ht.colSelection(r, o) : new ht(r, o);
|
|
12549
12580
|
}
|
|
12550
12581
|
return V.between(r, o);
|
|
12551
12582
|
}
|
|
@@ -12640,7 +12671,7 @@ var X = class pt extends J {
|
|
|
12640
12671
|
i + o.map[o.width * (o.height - 1) + a.right - 1]
|
|
12641
12672
|
))) : (a.top > 0 && (n = l.resolve(i + o.map[a.left])), s.bottom < o.height && (e = l.resolve(
|
|
12642
12673
|
i + o.map[o.width * (o.height - 1) + s.right - 1]
|
|
12643
|
-
))), new
|
|
12674
|
+
))), new ht(e, n);
|
|
12644
12675
|
}
|
|
12645
12676
|
// True if this selection goes all the way from the left to the
|
|
12646
12677
|
// right of the table.
|
|
@@ -12651,7 +12682,7 @@ var X = class pt extends J {
|
|
|
12651
12682
|
return Math.max(s, a) == n.width;
|
|
12652
12683
|
}
|
|
12653
12684
|
eq(e) {
|
|
12654
|
-
return e instanceof
|
|
12685
|
+
return e instanceof ht && e.$anchorCell.pos == this.$anchorCell.pos && e.$headCell.pos == this.$headCell.pos;
|
|
12655
12686
|
}
|
|
12656
12687
|
// Returns the smallest row selection that covers the given anchor
|
|
12657
12688
|
// and head cell.
|
|
@@ -12663,7 +12694,7 @@ var X = class pt extends J {
|
|
|
12663
12694
|
i + o.map[o.width * (a.top + 1) - 1]
|
|
12664
12695
|
))) : (a.left > 0 && (n = l.resolve(i + o.map[a.top * o.width])), s.right < o.width && (e = l.resolve(
|
|
12665
12696
|
i + o.map[o.width * (s.top + 1) - 1]
|
|
12666
|
-
))), new
|
|
12697
|
+
))), new ht(e, n);
|
|
12667
12698
|
}
|
|
12668
12699
|
toJSON() {
|
|
12669
12700
|
return {
|
|
@@ -12673,10 +12704,10 @@ var X = class pt extends J {
|
|
|
12673
12704
|
};
|
|
12674
12705
|
}
|
|
12675
12706
|
static fromJSON(e, n) {
|
|
12676
|
-
return new
|
|
12707
|
+
return new ht(e.resolve(n.anchor), e.resolve(n.head));
|
|
12677
12708
|
}
|
|
12678
12709
|
static create(e, n, r = n) {
|
|
12679
|
-
return new
|
|
12710
|
+
return new ht(e.resolve(n), e.resolve(r));
|
|
12680
12711
|
}
|
|
12681
12712
|
getBookmark() {
|
|
12682
12713
|
return new g0(this.$anchorCell.pos, this.$headCell.pos);
|
|
@@ -12827,7 +12858,7 @@ function C0(t, e, n, r) {
|
|
|
12827
12858
|
}
|
|
12828
12859
|
return r.setMeta(k0, { fixTables: !0 });
|
|
12829
12860
|
}
|
|
12830
|
-
function
|
|
12861
|
+
function ct(t) {
|
|
12831
12862
|
const e = t.selection, n = _o(t), r = n.node(-1), o = n.start(-1), i = re.get(r);
|
|
12832
12863
|
return { ...e instanceof X ? i.rectBetween(
|
|
12833
12864
|
e.$anchorCell.pos - o,
|
|
@@ -12854,17 +12885,17 @@ function fu(t, { map: e, tableStart: n, table: r }, o) {
|
|
|
12854
12885
|
return t;
|
|
12855
12886
|
}
|
|
12856
12887
|
function S0(t, e) {
|
|
12857
|
-
if (!
|
|
12888
|
+
if (!Ze(t)) return !1;
|
|
12858
12889
|
if (e) {
|
|
12859
|
-
const n =
|
|
12890
|
+
const n = ct(t);
|
|
12860
12891
|
e(fu(t.tr, n, n.left));
|
|
12861
12892
|
}
|
|
12862
12893
|
return !0;
|
|
12863
12894
|
}
|
|
12864
12895
|
function x0(t, e) {
|
|
12865
|
-
if (!
|
|
12896
|
+
if (!Ze(t)) return !1;
|
|
12866
12897
|
if (e) {
|
|
12867
|
-
const n =
|
|
12898
|
+
const n = ct(t);
|
|
12868
12899
|
e(fu(t.tr, n, n.right));
|
|
12869
12900
|
}
|
|
12870
12901
|
return !0;
|
|
@@ -12887,9 +12918,9 @@ function M0(t, { map: e, table: n, tableStart: r }, o) {
|
|
|
12887
12918
|
}
|
|
12888
12919
|
}
|
|
12889
12920
|
function A0(t, e) {
|
|
12890
|
-
if (!
|
|
12921
|
+
if (!Ze(t)) return !1;
|
|
12891
12922
|
if (e) {
|
|
12892
|
-
const n =
|
|
12923
|
+
const n = ct(t), r = t.tr;
|
|
12893
12924
|
if (n.left == 0 && n.right == n.map.width) return !1;
|
|
12894
12925
|
for (let o = n.right - 1; M0(r, n, o), o != n.left; o--) {
|
|
12895
12926
|
const i = n.tableStart ? r.doc.nodeAt(n.tableStart - 1) : r.doc;
|
|
@@ -12930,17 +12961,17 @@ function pu(t, { map: e, tableStart: n, table: r }, o) {
|
|
|
12930
12961
|
return t.insert(s, ve(r.type.schema).row.create(null, a)), t;
|
|
12931
12962
|
}
|
|
12932
12963
|
function T0(t, e) {
|
|
12933
|
-
if (!
|
|
12964
|
+
if (!Ze(t)) return !1;
|
|
12934
12965
|
if (e) {
|
|
12935
|
-
const n =
|
|
12966
|
+
const n = ct(t);
|
|
12936
12967
|
e(pu(t.tr, n, n.top));
|
|
12937
12968
|
}
|
|
12938
12969
|
return !0;
|
|
12939
12970
|
}
|
|
12940
12971
|
function D0(t, e) {
|
|
12941
|
-
if (!
|
|
12972
|
+
if (!Ze(t)) return !1;
|
|
12942
12973
|
if (e) {
|
|
12943
|
-
const n =
|
|
12974
|
+
const n = ct(t);
|
|
12944
12975
|
e(pu(t.tr, n, n.bottom));
|
|
12945
12976
|
}
|
|
12946
12977
|
return !0;
|
|
@@ -12971,9 +13002,9 @@ function N0(t, { map: e, table: n, tableStart: r }, o) {
|
|
|
12971
13002
|
}
|
|
12972
13003
|
}
|
|
12973
13004
|
function E0(t, e) {
|
|
12974
|
-
if (!
|
|
13005
|
+
if (!Ze(t)) return !1;
|
|
12975
13006
|
if (e) {
|
|
12976
|
-
const n =
|
|
13007
|
+
const n = ct(t), r = t.tr;
|
|
12977
13008
|
if (n.top == 0 && n.bottom == n.map.height) return !1;
|
|
12978
13009
|
for (let o = n.bottom - 1; N0(r, n, o), o != n.top; o--) {
|
|
12979
13010
|
const i = n.tableStart ? r.doc.nodeAt(n.tableStart - 1) : r.doc;
|
|
@@ -13007,7 +13038,7 @@ function fl(t, e) {
|
|
|
13007
13038
|
const n = t.selection;
|
|
13008
13039
|
if (!(n instanceof X) || n.$anchorCell.pos == n.$headCell.pos)
|
|
13009
13040
|
return !1;
|
|
13010
|
-
const r =
|
|
13041
|
+
const r = ct(t), { map: o } = r;
|
|
13011
13042
|
if (I0(o, r)) return !1;
|
|
13012
13043
|
if (e) {
|
|
13013
13044
|
const i = t.tr, s = {};
|
|
@@ -13065,7 +13096,7 @@ function P0(t) {
|
|
|
13065
13096
|
let a = i.attrs;
|
|
13066
13097
|
const l = [], c = a.colwidth;
|
|
13067
13098
|
a.rowspan > 1 && (a = { ...a, rowspan: 1 }), a.colspan > 1 && (a = { ...a, colspan: 1 });
|
|
13068
|
-
const d =
|
|
13099
|
+
const d = ct(e), u = e.tr;
|
|
13069
13100
|
for (let p = 0; p < d.right - d.left; p++)
|
|
13070
13101
|
l.push(
|
|
13071
13102
|
c ? {
|
|
@@ -13099,7 +13130,7 @@ function P0(t) {
|
|
|
13099
13130
|
}
|
|
13100
13131
|
function R0(t, e) {
|
|
13101
13132
|
return function(n, r) {
|
|
13102
|
-
if (!
|
|
13133
|
+
if (!Ze(n)) return !1;
|
|
13103
13134
|
const o = _o(n);
|
|
13104
13135
|
if (o.nodeAfter.attrs[t] === e) return !1;
|
|
13105
13136
|
if (r) {
|
|
@@ -13119,9 +13150,9 @@ function R0(t, e) {
|
|
|
13119
13150
|
}
|
|
13120
13151
|
function L0(t) {
|
|
13121
13152
|
return function(e, n) {
|
|
13122
|
-
if (!
|
|
13153
|
+
if (!Ze(e)) return !1;
|
|
13123
13154
|
if (n) {
|
|
13124
|
-
const r = ve(e.schema), o =
|
|
13155
|
+
const r = ve(e.schema), o = ct(e), i = e.tr, s = o.map.cellsInRect(
|
|
13125
13156
|
t == "column" ? {
|
|
13126
13157
|
left: o.left,
|
|
13127
13158
|
top: 0,
|
|
@@ -13168,9 +13199,9 @@ function hl(t, e, n) {
|
|
|
13168
13199
|
}
|
|
13169
13200
|
function wr(t, e) {
|
|
13170
13201
|
return e = e || { useDeprecatedLogic: !1 }, e.useDeprecatedLogic ? L0(t) : function(n, r) {
|
|
13171
|
-
if (!
|
|
13202
|
+
if (!Ze(n)) return !1;
|
|
13172
13203
|
if (r) {
|
|
13173
|
-
const o = ve(n.schema), i =
|
|
13204
|
+
const o = ve(n.schema), i = ct(n), s = n.tr, a = hl("row", i, o), l = hl(
|
|
13174
13205
|
"column",
|
|
13175
13206
|
i,
|
|
13176
13207
|
o
|
|
@@ -13226,7 +13257,7 @@ function B0(t, e) {
|
|
|
13226
13257
|
}
|
|
13227
13258
|
function ml(t) {
|
|
13228
13259
|
return function(e, n) {
|
|
13229
|
-
if (!
|
|
13260
|
+
if (!Ze(e)) return !1;
|
|
13230
13261
|
const r = B0(_o(e), t);
|
|
13231
13262
|
if (r == null) return !1;
|
|
13232
13263
|
if (n) {
|
|
@@ -13526,7 +13557,7 @@ function W0(t, e) {
|
|
|
13526
13557
|
return r ? (t.dispatch(t.state.tr.setSelection(new X(r))), !0) : !1;
|
|
13527
13558
|
}
|
|
13528
13559
|
function U0(t, e, n) {
|
|
13529
|
-
if (!
|
|
13560
|
+
if (!Ze(t.state)) return !1;
|
|
13530
13561
|
let r = z0(n);
|
|
13531
13562
|
const o = t.state.selection;
|
|
13532
13563
|
if (o instanceof X) {
|
|
@@ -13569,21 +13600,21 @@ function q0(t, e) {
|
|
|
13569
13600
|
return;
|
|
13570
13601
|
function i(l, c) {
|
|
13571
13602
|
let d = di(t, c);
|
|
13572
|
-
const u =
|
|
13603
|
+
const u = Pt.getState(t.state) == null;
|
|
13573
13604
|
if (!d || !$s(l, d))
|
|
13574
13605
|
if (u) d = l;
|
|
13575
13606
|
else return;
|
|
13576
13607
|
const f = new X(l, d);
|
|
13577
13608
|
if (u || !t.state.selection.eq(f)) {
|
|
13578
13609
|
const p = t.state.tr.setSelection(f);
|
|
13579
|
-
u && p.setMeta(
|
|
13610
|
+
u && p.setMeta(Pt, l.pos), t.dispatch(p);
|
|
13580
13611
|
}
|
|
13581
13612
|
}
|
|
13582
13613
|
function s() {
|
|
13583
|
-
t.root.removeEventListener("mouseup", s), t.root.removeEventListener("dragstart", s), t.root.removeEventListener("mousemove", a),
|
|
13614
|
+
t.root.removeEventListener("mouseup", s), t.root.removeEventListener("dragstart", s), t.root.removeEventListener("mousemove", a), Pt.getState(t.state) != null && t.dispatch(t.state.tr.setMeta(Pt, -1));
|
|
13584
13615
|
}
|
|
13585
13616
|
function a(l) {
|
|
13586
|
-
const c = l, d =
|
|
13617
|
+
const c = l, d = Pt.getState(t.state);
|
|
13587
13618
|
let u;
|
|
13588
13619
|
if (d != null)
|
|
13589
13620
|
u = t.state.doc.resolve(d);
|
|
@@ -13887,7 +13918,7 @@ function ow({
|
|
|
13887
13918
|
allowTableNodeSelection: t = !1
|
|
13888
13919
|
} = {}) {
|
|
13889
13920
|
return new Z({
|
|
13890
|
-
key:
|
|
13921
|
+
key: Pt,
|
|
13891
13922
|
// This piece of state is used to remember when a mouse-drag
|
|
13892
13923
|
// cell-selection is happening, so that it can continue even as
|
|
13893
13924
|
// transactions (which might move its anchor cell) come in.
|
|
@@ -13896,7 +13927,7 @@ function ow({
|
|
|
13896
13927
|
return null;
|
|
13897
13928
|
},
|
|
13898
13929
|
apply(e, n) {
|
|
13899
|
-
const r = e.getMeta(
|
|
13930
|
+
const r = e.getMeta(Pt);
|
|
13900
13931
|
if (r != null) return r == -1 ? null : r;
|
|
13901
13932
|
if (n == null || !e.docChanged) return n;
|
|
13902
13933
|
const { deleted: o, pos: i } = e.mapping.mapResult(n);
|
|
@@ -13909,7 +13940,7 @@ function ow({
|
|
|
13909
13940
|
mousedown: q0
|
|
13910
13941
|
},
|
|
13911
13942
|
createSelectionBetween(e) {
|
|
13912
|
-
return
|
|
13943
|
+
return Pt.getState(e.state) != null ? e.state.selection : null;
|
|
13913
13944
|
},
|
|
13914
13945
|
handleTripleClick: W0,
|
|
13915
13946
|
handleKeyDown: j0,
|
|
@@ -14056,7 +14087,7 @@ const iw = (t) => t instanceof X, Gr = ({ editor: t }) => {
|
|
|
14056
14087
|
deleteCellAndTableBorders: () => ({ chain: t, state: e, tr: n }) => {
|
|
14057
14088
|
if (!Cd(e))
|
|
14058
14089
|
return !1;
|
|
14059
|
-
const r =
|
|
14090
|
+
const r = je((s) => s.type.name === this.name)(e.selection);
|
|
14060
14091
|
if (!r)
|
|
14061
14092
|
return !1;
|
|
14062
14093
|
const o = r.pos, i = r.pos + r.node.nodeSize;
|
|
@@ -14252,10 +14283,10 @@ const iw = (t) => t instanceof X, Gr = ({ editor: t }) => {
|
|
|
14252
14283
|
return ["td", N.mergeAttributes(this.options.htmlAttributes, t), 0];
|
|
14253
14284
|
}
|
|
14254
14285
|
});
|
|
14255
|
-
var
|
|
14286
|
+
var yt, Yt;
|
|
14256
14287
|
class sw {
|
|
14257
14288
|
constructor(e) {
|
|
14258
|
-
|
|
14289
|
+
ft(this, yt);
|
|
14259
14290
|
P(this, "editor");
|
|
14260
14291
|
P(this, "node");
|
|
14261
14292
|
P(this, "decorations");
|
|
@@ -14280,13 +14311,13 @@ class sw {
|
|
|
14280
14311
|
(n[e] ?? n.default)();
|
|
14281
14312
|
}
|
|
14282
14313
|
buildTextView() {
|
|
14283
|
-
let { displayLabel: e } = this.node.attrs, { annotation: n } = I(this,
|
|
14314
|
+
let { displayLabel: e } = this.node.attrs, { annotation: n } = I(this, yt, Yt).call(this, {
|
|
14284
14315
|
displayLabel: e
|
|
14285
14316
|
});
|
|
14286
14317
|
this.dom = n;
|
|
14287
14318
|
}
|
|
14288
14319
|
buildImageView() {
|
|
14289
|
-
let { displayLabel: e, imageSrc: n } = this.node.attrs, { annotation: r, content: o } = I(this,
|
|
14320
|
+
let { displayLabel: e, imageSrc: n } = this.node.attrs, { annotation: r, content: o } = I(this, yt, Yt).call(this);
|
|
14290
14321
|
if (n) {
|
|
14291
14322
|
let i = document.createElement("img");
|
|
14292
14323
|
i.src = n, i.alt = e, i.style.height = "auto", i.style.maxWidth = "100%", i.style.pointerEvents = "none", i.style.verticalAlign = "middle", o.append(i), r.style.display = "inline-block", o.style.display = "inline-block";
|
|
@@ -14297,7 +14328,7 @@ class sw {
|
|
|
14297
14328
|
buildSignatureView() {
|
|
14298
14329
|
let { displayLabel: e, imageSrc: n } = this.node.attrs;
|
|
14299
14330
|
e = e || "Signature";
|
|
14300
|
-
let { annotation: r, content: o } = I(this,
|
|
14331
|
+
let { annotation: r, content: o } = I(this, yt, Yt).call(this);
|
|
14301
14332
|
if (n) {
|
|
14302
14333
|
let i = document.createElement("img");
|
|
14303
14334
|
i.src = n, i.alt = e, i.style.height = "auto", i.style.maxWidth = "100%", i.style.maxHeight = "28px", i.style.pointerEvents = "none", i.style.verticalAlign = "middle", o.append(i), r.style.display = "inline-block", o.style.display = "inline-block";
|
|
@@ -14306,17 +14337,17 @@ class sw {
|
|
|
14306
14337
|
this.dom = r;
|
|
14307
14338
|
}
|
|
14308
14339
|
buildCheckboxView() {
|
|
14309
|
-
let { displayLabel: e } = this.node.attrs, { annotation: n } = I(this,
|
|
14340
|
+
let { displayLabel: e } = this.node.attrs, { annotation: n } = I(this, yt, Yt).call(this, {
|
|
14310
14341
|
displayLabel: e
|
|
14311
14342
|
});
|
|
14312
14343
|
this.dom = n;
|
|
14313
14344
|
}
|
|
14314
14345
|
buildHTMLView() {
|
|
14315
|
-
let { displayLabel: e, rawHtml: n } = this.node.attrs, { annotation: r, content: o } = I(this,
|
|
14346
|
+
let { displayLabel: e, rawHtml: n } = this.node.attrs, { annotation: r, content: o } = I(this, yt, Yt).call(this);
|
|
14316
14347
|
n ? (o.innerHTML = n.trim(), r.style.display = "inline-block", o.style.display = "inline-block") : o.textContent = e, this.dom = r;
|
|
14317
14348
|
}
|
|
14318
14349
|
buildLinkView() {
|
|
14319
|
-
let { displayLabel: e, linkUrl: n } = this.node.attrs, { annotation: r, content: o } = I(this,
|
|
14350
|
+
let { displayLabel: e, linkUrl: n } = this.node.attrs, { annotation: r, content: o } = I(this, yt, Yt).call(this);
|
|
14320
14351
|
if (n) {
|
|
14321
14352
|
let i = document.createElement("a");
|
|
14322
14353
|
i.href = n, i.target = "_blank", i.textContent = n, i.style.textDecoration = "none", o.append(i), o.style.pointerEvents = "all";
|
|
@@ -14383,7 +14414,7 @@ class sw {
|
|
|
14383
14414
|
}), !0));
|
|
14384
14415
|
}
|
|
14385
14416
|
}
|
|
14386
|
-
|
|
14417
|
+
yt = new WeakSet(), Yt = function({ displayLabel: e } = {}) {
|
|
14387
14418
|
let { highlighted: n } = this.node.attrs, r = document.createElement("span");
|
|
14388
14419
|
r.classList.add(this.annotationClass);
|
|
14389
14420
|
let o = document.createElement("span");
|
|
@@ -14403,7 +14434,7 @@ gt = new WeakSet(), Yt = function({ displayLabel: e } = {}) {
|
|
|
14403
14434
|
function ku(t) {
|
|
14404
14435
|
let e = [];
|
|
14405
14436
|
return !t.steps.length || t.meta && !Object.keys(t.meta).every((n) => ["inputType", "uiEvent", "paste"].includes(n)) || ["historyUndo", "historyRedo"].includes(t.getMeta("inputType")) || ["drop"].includes(t.getMeta("uiEvent")) || t.getMeta("fieldAnnotationUpdate") === !0 || t.steps.forEach((n, r) => {
|
|
14406
|
-
if (n instanceof
|
|
14437
|
+
if (n instanceof Vt && n.from !== n.to) {
|
|
14407
14438
|
let o = t.mapping.maps[r];
|
|
14408
14439
|
t.before.nodesBetween(n.from, n.to, (s, a) => {
|
|
14409
14440
|
s.type.name === "fieldAnnotation" && o.mapResult(a).deleted && e.push({ node: s, pos: a });
|
|
@@ -14421,7 +14452,7 @@ function Cu(t, e) {
|
|
|
14421
14452
|
}, 0);
|
|
14422
14453
|
}
|
|
14423
14454
|
const { findChildren: aw } = Sd;
|
|
14424
|
-
function
|
|
14455
|
+
function Lt(t) {
|
|
14425
14456
|
return aw(t.doc, (n) => n.type.name === "fieldAnnotation");
|
|
14426
14457
|
}
|
|
14427
14458
|
const lw = (t = {}) => {
|
|
@@ -14489,7 +14520,7 @@ const lw = (t = {}) => {
|
|
|
14489
14520
|
appendTransaction: (r, o, i) => {
|
|
14490
14521
|
if (!(r.some((u) => u.docChanged) && !o.doc.eq(i.doc)))
|
|
14491
14522
|
return;
|
|
14492
|
-
let { tr: a, doc: l } = i, c = !1, d =
|
|
14523
|
+
let { tr: a, doc: l } = i, c = !1, d = Lt(i);
|
|
14493
14524
|
if (d.length)
|
|
14494
14525
|
return d.forEach(({ node: u, pos: f }) => {
|
|
14495
14526
|
let { marks: p } = u, h = a.doc.nodeAt(f);
|
|
@@ -14518,7 +14549,7 @@ function cw({ fieldAnnotation: t, editor: e, view: n, event: r }) {
|
|
|
14518
14549
|
});
|
|
14519
14550
|
}
|
|
14520
14551
|
function dw(t, e) {
|
|
14521
|
-
return
|
|
14552
|
+
return Lt(e).map(({ node: r, pos: o }) => {
|
|
14522
14553
|
let i = kd(t, o, o + r.nodeSize);
|
|
14523
14554
|
return {
|
|
14524
14555
|
node: r,
|
|
@@ -14528,7 +14559,7 @@ function dw(t, e) {
|
|
|
14528
14559
|
});
|
|
14529
14560
|
}
|
|
14530
14561
|
function uw(t, e) {
|
|
14531
|
-
let n =
|
|
14562
|
+
let n = Lt(e), r = [];
|
|
14532
14563
|
return n.forEach((o) => {
|
|
14533
14564
|
t(o.node) && r.push(o);
|
|
14534
14565
|
}), r;
|
|
@@ -14565,7 +14596,7 @@ const Wk = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
|
14565
14596
|
findFieldAnnotationsByFieldId: lo,
|
|
14566
14597
|
findFirstFieldAnnotationByFieldId: pw,
|
|
14567
14598
|
findRemovedFieldAnnotations: ku,
|
|
14568
|
-
getAllFieldAnnotations:
|
|
14599
|
+
getAllFieldAnnotations: Lt,
|
|
14569
14600
|
getAllFieldAnnotationsWithRect: dw,
|
|
14570
14601
|
trackFieldAnnotationsDeletion: Cu
|
|
14571
14602
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
@@ -14810,7 +14841,7 @@ const ls = "annotation", Su = "annotation-content", xu = Y.create({
|
|
|
14810
14841
|
parseDOM: (t) => t.getAttribute("data-font-size") || t.style.fontSize || null,
|
|
14811
14842
|
renderDOM: (t) => {
|
|
14812
14843
|
if (!t.fontSize) return {};
|
|
14813
|
-
let [e, n] =
|
|
14844
|
+
let [e, n] = Ct(t.fontSize);
|
|
14814
14845
|
if (Number.isNaN(e)) return {};
|
|
14815
14846
|
n = n || "pt";
|
|
14816
14847
|
let r = `${e}${n}`;
|
|
@@ -15013,7 +15044,7 @@ const ls = "annotation", Su = "annotation-content", xu = Y.create({
|
|
|
15013
15044
|
* })
|
|
15014
15045
|
*/
|
|
15015
15046
|
setFieldAnnotationsHiddenByCondition: (t = () => !1, e = !1) => ({ dispatch: n, state: r, chain: o }) => {
|
|
15016
|
-
let i =
|
|
15047
|
+
let i = Lt(r);
|
|
15017
15048
|
if (!i.length)
|
|
15018
15049
|
return !0;
|
|
15019
15050
|
if (n) {
|
|
@@ -15031,7 +15062,7 @@ const ls = "annotation", Su = "annotation-content", xu = Y.create({
|
|
|
15031
15062
|
* editor.commands.unsetFieldAnnotationsHidden()
|
|
15032
15063
|
*/
|
|
15033
15064
|
unsetFieldAnnotationsHidden: () => ({ dispatch: t, state: e, commands: n }) => {
|
|
15034
|
-
let r =
|
|
15065
|
+
let r = Lt(e);
|
|
15035
15066
|
return r.length && t ? n.updateFieldAnnotationsAttributes(r, { hidden: !1 }) : !0;
|
|
15036
15067
|
},
|
|
15037
15068
|
/**
|
|
@@ -15043,7 +15074,7 @@ const ls = "annotation", Su = "annotation-content", xu = Y.create({
|
|
|
15043
15074
|
* editor.commands.setFieldAnnotationsVisibility('hidden');
|
|
15044
15075
|
*/
|
|
15045
15076
|
setFieldAnnotationsVisibility: (t = "visible") => ({ dispatch: e, state: n, commands: r }) => {
|
|
15046
|
-
let o =
|
|
15077
|
+
let o = Lt(n);
|
|
15047
15078
|
return o.length ? this.options.visibilityOptions.includes(t) ? e ? r.updateFieldAnnotationsAttributes(o, {
|
|
15048
15079
|
visibility: t
|
|
15049
15080
|
}) : !0 : !1 : !0;
|
|
@@ -15062,7 +15093,7 @@ const ls = "annotation", Su = "annotation-content", xu = Y.create({
|
|
|
15062
15093
|
* editor.commands.setFieldAnnotationsHighlighted(() => true, true)
|
|
15063
15094
|
*/
|
|
15064
15095
|
setFieldAnnotationsHighlighted: (t = () => !1, e = !0) => ({ dispatch: n, state: r, commands: o }) => {
|
|
15065
|
-
let i =
|
|
15096
|
+
let i = Lt(r);
|
|
15066
15097
|
if (!i.length)
|
|
15067
15098
|
return !0;
|
|
15068
15099
|
if (n) {
|
|
@@ -15098,7 +15129,7 @@ const ls = "annotation", Su = "annotation-content", xu = Y.create({
|
|
|
15098
15129
|
let { from: s, to: a, node: l } = o.selection, c = co(s, a, o.doc);
|
|
15099
15130
|
if (!c.length)
|
|
15100
15131
|
return !0;
|
|
15101
|
-
let [d, u] =
|
|
15132
|
+
let [d, u] = Ct(t), f = 8, p = 96, h = "pt";
|
|
15102
15133
|
return Number.isNaN(d) ? !1 : (d = xo(d, f, p), u = u || h, n && (c.forEach((m) => {
|
|
15103
15134
|
i.updateFieldAnnotationsAttributes([m], {
|
|
15104
15135
|
fontSize: `${d}${u}`
|
|
@@ -15791,7 +15822,7 @@ const Iw = "track-insert", Ru = Fe.create({
|
|
|
15791
15822
|
const s = new lr();
|
|
15792
15823
|
return i.nodesBetween(t, e, (a, l) => {
|
|
15793
15824
|
if (a.marks && a.marks.find((c) => c.type.name === ue)) {
|
|
15794
|
-
const c = new
|
|
15825
|
+
const c = new Vt(
|
|
15795
15826
|
s.map(Math.max(l, t)),
|
|
15796
15827
|
s.map(Math.min(l + a.nodeSize, e)),
|
|
15797
15828
|
H.empty
|
|
@@ -15833,7 +15864,7 @@ const Iw = "track-insert", Ru = Fe.create({
|
|
|
15833
15864
|
)
|
|
15834
15865
|
);
|
|
15835
15866
|
} else if (a.marks && a.marks.find((c) => c.type.name === Ve)) {
|
|
15836
|
-
const c = new
|
|
15867
|
+
const c = new Vt(
|
|
15837
15868
|
s.map(Math.max(l, t)),
|
|
15838
15869
|
s.map(Math.min(l + a.nodeSize, e)),
|
|
15839
15870
|
H.empty
|
|
@@ -15981,12 +16012,12 @@ const Iw = "track-insert", Ru = Fe.create({
|
|
|
15981
16012
|
})];
|
|
15982
16013
|
}
|
|
15983
16014
|
});
|
|
15984
|
-
var De = "top",
|
|
16015
|
+
var De = "top", Ue = "bottom", qe = "right", Ne = "left", Vs = "auto", Er = [De, Ue, qe, Ne], In = "start", kr = "end", Bw = "clippingParents", Bu = "viewport", Xn = "popper", _w = "reference", Ol = /* @__PURE__ */ Er.reduce(function(t, e) {
|
|
15985
16016
|
return t.concat([e + "-" + In, e + "-" + kr]);
|
|
15986
16017
|
}, []), _u = /* @__PURE__ */ [].concat(Er, [Vs]).reduce(function(t, e) {
|
|
15987
16018
|
return t.concat([e, e + "-" + In, e + "-" + kr]);
|
|
15988
16019
|
}, []), zw = "beforeRead", $w = "read", Vw = "afterRead", Hw = "beforeMain", jw = "main", Ww = "afterMain", Uw = "beforeWrite", qw = "write", Kw = "afterWrite", Xw = [zw, $w, Vw, Hw, jw, Ww, Uw, qw, Kw];
|
|
15989
|
-
function
|
|
16020
|
+
function lt(t) {
|
|
15990
16021
|
return t ? (t.nodeName || "").toLowerCase() : null;
|
|
15991
16022
|
}
|
|
15992
16023
|
function Le(t) {
|
|
@@ -16002,7 +16033,7 @@ function un(t) {
|
|
|
16002
16033
|
var e = Le(t).Element;
|
|
16003
16034
|
return t instanceof e || t instanceof Element;
|
|
16004
16035
|
}
|
|
16005
|
-
function
|
|
16036
|
+
function We(t) {
|
|
16006
16037
|
var e = Le(t).HTMLElement;
|
|
16007
16038
|
return t instanceof e || t instanceof HTMLElement;
|
|
16008
16039
|
}
|
|
@@ -16016,7 +16047,7 @@ function Jw(t) {
|
|
|
16016
16047
|
var e = t.state;
|
|
16017
16048
|
Object.keys(e.elements).forEach(function(n) {
|
|
16018
16049
|
var r = e.styles[n] || {}, o = e.attributes[n] || {}, i = e.elements[n];
|
|
16019
|
-
!
|
|
16050
|
+
!We(i) || !lt(i) || (Object.assign(i.style, r), Object.keys(o).forEach(function(s) {
|
|
16020
16051
|
var a = o[s];
|
|
16021
16052
|
a === !1 ? i.removeAttribute(s) : i.setAttribute(s, a === !0 ? "" : a);
|
|
16022
16053
|
}));
|
|
@@ -16040,7 +16071,7 @@ function Yw(t) {
|
|
|
16040
16071
|
var o = e.elements[r], i = e.attributes[r] || {}, s = Object.keys(e.styles.hasOwnProperty(r) ? e.styles[r] : n[r]), a = s.reduce(function(l, c) {
|
|
16041
16072
|
return l[c] = "", l;
|
|
16042
16073
|
}, {});
|
|
16043
|
-
!
|
|
16074
|
+
!We(o) || !lt(o) || (Object.assign(o.style, a), Object.keys(i).forEach(function(l) {
|
|
16044
16075
|
o.removeAttribute(l);
|
|
16045
16076
|
}));
|
|
16046
16077
|
});
|
|
@@ -16054,7 +16085,7 @@ const zu = {
|
|
|
16054
16085
|
effect: Yw,
|
|
16055
16086
|
requires: ["computeStyles"]
|
|
16056
16087
|
};
|
|
16057
|
-
function
|
|
16088
|
+
function it(t) {
|
|
16058
16089
|
return t.split("-")[0];
|
|
16059
16090
|
}
|
|
16060
16091
|
var sn = Math.max, Oo = Math.min, Pn = Math.round;
|
|
@@ -16070,7 +16101,7 @@ function $u() {
|
|
|
16070
16101
|
function Rn(t, e, n) {
|
|
16071
16102
|
e === void 0 && (e = !1), n === void 0 && (n = !1);
|
|
16072
16103
|
var r = t.getBoundingClientRect(), o = 1, i = 1;
|
|
16073
|
-
e &&
|
|
16104
|
+
e && We(t) && (o = t.offsetWidth > 0 && Pn(r.width) / t.offsetWidth || 1, i = t.offsetHeight > 0 && Pn(r.height) / t.offsetHeight || 1);
|
|
16074
16105
|
var s = un(t) ? Le(t) : window, a = s.visualViewport, l = !$u() && n, c = (r.left + (l && a ? a.offsetLeft : 0)) / o, d = (r.top + (l && a ? a.offsetTop : 0)) / i, u = r.width / o, f = r.height / i;
|
|
16075
16106
|
return {
|
|
16076
16107
|
width: u,
|
|
@@ -16106,11 +16137,11 @@ function Vu(t, e) {
|
|
|
16106
16137
|
}
|
|
16107
16138
|
return !1;
|
|
16108
16139
|
}
|
|
16109
|
-
function
|
|
16140
|
+
function St(t) {
|
|
16110
16141
|
return Le(t).getComputedStyle(t);
|
|
16111
16142
|
}
|
|
16112
16143
|
function Gw(t) {
|
|
16113
|
-
return ["table", "td", "th"].indexOf(
|
|
16144
|
+
return ["table", "td", "th"].indexOf(lt(t)) >= 0;
|
|
16114
16145
|
}
|
|
16115
16146
|
function Ut(t) {
|
|
16116
16147
|
return ((un(t) ? t.ownerDocument : (
|
|
@@ -16119,7 +16150,7 @@ function Ut(t) {
|
|
|
16119
16150
|
)) || window.document).documentElement;
|
|
16120
16151
|
}
|
|
16121
16152
|
function zo(t) {
|
|
16122
|
-
return
|
|
16153
|
+
return lt(t) === "html" ? t : (
|
|
16123
16154
|
// this is a quicker (but less type safe) way to save quite some bytes from the bundle
|
|
16124
16155
|
// $FlowFixMe[incompatible-return]
|
|
16125
16156
|
// $FlowFixMe[prop-missing]
|
|
@@ -16131,19 +16162,19 @@ function zo(t) {
|
|
|
16131
16162
|
);
|
|
16132
16163
|
}
|
|
16133
16164
|
function Tl(t) {
|
|
16134
|
-
return !
|
|
16135
|
-
|
|
16165
|
+
return !We(t) || // https://github.com/popperjs/popper-core/issues/837
|
|
16166
|
+
St(t).position === "fixed" ? null : t.offsetParent;
|
|
16136
16167
|
}
|
|
16137
16168
|
function Zw(t) {
|
|
16138
16169
|
var e = /firefox/i.test(ds()), n = /Trident/i.test(ds());
|
|
16139
|
-
if (n &&
|
|
16140
|
-
var r =
|
|
16170
|
+
if (n && We(t)) {
|
|
16171
|
+
var r = St(t);
|
|
16141
16172
|
if (r.position === "fixed")
|
|
16142
16173
|
return null;
|
|
16143
16174
|
}
|
|
16144
16175
|
var o = zo(t);
|
|
16145
|
-
for (Hs(o) && (o = o.host);
|
|
16146
|
-
var i =
|
|
16176
|
+
for (Hs(o) && (o = o.host); We(o) && ["html", "body"].indexOf(lt(o)) < 0; ) {
|
|
16177
|
+
var i = St(o);
|
|
16147
16178
|
if (i.transform !== "none" || i.perspective !== "none" || i.contain === "paint" || ["transform", "perspective"].indexOf(i.willChange) !== -1 || e && i.willChange === "filter" || e && i.filter && i.filter !== "none")
|
|
16148
16179
|
return o;
|
|
16149
16180
|
o = o.parentNode;
|
|
@@ -16151,9 +16182,9 @@ function Zw(t) {
|
|
|
16151
16182
|
return null;
|
|
16152
16183
|
}
|
|
16153
16184
|
function Ir(t) {
|
|
16154
|
-
for (var e = Le(t), n = Tl(t); n && Gw(n) &&
|
|
16185
|
+
for (var e = Le(t), n = Tl(t); n && Gw(n) && St(n).position === "static"; )
|
|
16155
16186
|
n = Tl(n);
|
|
16156
|
-
return n && (
|
|
16187
|
+
return n && (lt(n) === "html" || lt(n) === "body" && St(n).position === "static") ? e : n || Zw(t) || e;
|
|
16157
16188
|
}
|
|
16158
16189
|
function Ws(t) {
|
|
16159
16190
|
return ["top", "bottom"].indexOf(t) >= 0 ? "x" : "y";
|
|
@@ -16187,9 +16218,9 @@ var ev = function(e, n) {
|
|
|
16187
16218
|
})) : e, ju(typeof e != "number" ? e : Wu(e, Er));
|
|
16188
16219
|
};
|
|
16189
16220
|
function tv(t) {
|
|
16190
|
-
var e, n = t.state, r = t.name, o = t.options, i = n.elements.arrow, s = n.modifiersData.popperOffsets, a =
|
|
16221
|
+
var e, n = t.state, r = t.name, o = t.options, i = n.elements.arrow, s = n.modifiersData.popperOffsets, a = it(n.placement), l = Ws(a), c = [Ne, qe].indexOf(a) >= 0, d = c ? "height" : "width";
|
|
16191
16222
|
if (!(!i || !s)) {
|
|
16192
|
-
var u = ev(o.padding, n), f = js(i), p = l === "y" ? De : Ne, h = l === "y" ?
|
|
16223
|
+
var u = ev(o.padding, n), f = js(i), p = l === "y" ? De : Ne, h = l === "y" ? Ue : qe, m = n.rects.reference[d] + n.rects.reference[l] - s[l] - n.rects.popper[d], g = s[l] - n.rects.reference[l], b = Ir(i), w = b ? l === "y" ? b.clientHeight || 0 : b.clientWidth || 0 : 0, C = m / 2 - g / 2, y = u[p], S = w - f[d] - u[h], k = w / 2 - f[d] / 2 + C, M = or(y, k, S), L = l;
|
|
16193
16224
|
n.modifiersData[r] = (e = {}, e[L] = M, e.centerOffset = M - k, e);
|
|
16194
16225
|
}
|
|
16195
16226
|
}
|
|
@@ -16234,16 +16265,16 @@ function Dl(t) {
|
|
|
16234
16265
|
var b = s.hasOwnProperty("x"), w = s.hasOwnProperty("y"), C = Ne, y = De, S = window;
|
|
16235
16266
|
if (c) {
|
|
16236
16267
|
var k = Ir(n), M = "clientHeight", L = "clientWidth";
|
|
16237
|
-
if (k === Le(n) && (k = Ut(n),
|
|
16238
|
-
y =
|
|
16268
|
+
if (k === Le(n) && (k = Ut(n), St(k).position !== "static" && a === "absolute" && (M = "scrollHeight", L = "scrollWidth")), k = k, o === De || (o === Ne || o === qe) && i === kr) {
|
|
16269
|
+
y = Ue;
|
|
16239
16270
|
var x = u && k === S && S.visualViewport ? S.visualViewport.height : (
|
|
16240
16271
|
// $FlowFixMe[prop-missing]
|
|
16241
16272
|
k[M]
|
|
16242
16273
|
);
|
|
16243
16274
|
m -= x - r.height, m *= l ? 1 : -1;
|
|
16244
16275
|
}
|
|
16245
|
-
if (o === Ne || (o === De || o ===
|
|
16246
|
-
C =
|
|
16276
|
+
if (o === Ne || (o === De || o === Ue) && i === kr) {
|
|
16277
|
+
C = qe;
|
|
16247
16278
|
var $ = u && k === S && S.visualViewport ? S.visualViewport.width : (
|
|
16248
16279
|
// $FlowFixMe[prop-missing]
|
|
16249
16280
|
k[L]
|
|
@@ -16268,7 +16299,7 @@ function Dl(t) {
|
|
|
16268
16299
|
}
|
|
16269
16300
|
function sv(t) {
|
|
16270
16301
|
var e = t.state, n = t.options, r = n.gpuAcceleration, o = r === void 0 ? !0 : r, i = n.adaptive, s = i === void 0 ? !0 : i, a = n.roundOffsets, l = a === void 0 ? !0 : a, c = {
|
|
16271
|
-
placement:
|
|
16302
|
+
placement: it(e.placement),
|
|
16272
16303
|
variation: Ln(e.placement),
|
|
16273
16304
|
popper: e.elements.popper,
|
|
16274
16305
|
popperRect: e.rects.popper,
|
|
@@ -16364,7 +16395,7 @@ function fv(t, e) {
|
|
|
16364
16395
|
}
|
|
16365
16396
|
function pv(t) {
|
|
16366
16397
|
var e, n = Ut(t), r = Us(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 + qs(t), l = -r.scrollTop;
|
|
16367
|
-
return
|
|
16398
|
+
return St(o || n).direction === "rtl" && (a += sn(n.clientWidth, o ? o.clientWidth : 0) - i), {
|
|
16368
16399
|
width: i,
|
|
16369
16400
|
height: s,
|
|
16370
16401
|
x: a,
|
|
@@ -16372,11 +16403,11 @@ function pv(t) {
|
|
|
16372
16403
|
};
|
|
16373
16404
|
}
|
|
16374
16405
|
function Ks(t) {
|
|
16375
|
-
var e =
|
|
16406
|
+
var e = St(t), n = e.overflow, r = e.overflowX, o = e.overflowY;
|
|
16376
16407
|
return /auto|scroll|overlay|hidden/.test(n + o + r);
|
|
16377
16408
|
}
|
|
16378
16409
|
function Uu(t) {
|
|
16379
|
-
return ["html", "body", "#document"].indexOf(
|
|
16410
|
+
return ["html", "body", "#document"].indexOf(lt(t)) >= 0 ? t.ownerDocument.body : We(t) && Ks(t) ? t : Uu(zo(t));
|
|
16380
16411
|
}
|
|
16381
16412
|
function ir(t, e) {
|
|
16382
16413
|
var n;
|
|
@@ -16403,9 +16434,9 @@ function El(t, e, n) {
|
|
|
16403
16434
|
return e === Bu ? us(fv(t, n)) : un(e) ? hv(e, n) : us(pv(Ut(t)));
|
|
16404
16435
|
}
|
|
16405
16436
|
function mv(t) {
|
|
16406
|
-
var e = ir(zo(t)), n = ["absolute", "fixed"].indexOf(
|
|
16437
|
+
var e = ir(zo(t)), n = ["absolute", "fixed"].indexOf(St(t).position) >= 0, r = n && We(t) ? Ir(t) : t;
|
|
16407
16438
|
return un(r) ? e.filter(function(o) {
|
|
16408
|
-
return un(o) && Vu(o, r) &&
|
|
16439
|
+
return un(o) && Vu(o, r) && lt(o) !== "body";
|
|
16409
16440
|
}) : [];
|
|
16410
16441
|
}
|
|
16411
16442
|
function gv(t, e, n, r) {
|
|
@@ -16416,7 +16447,7 @@ function gv(t, e, n, r) {
|
|
|
16416
16447
|
return a.width = a.right - a.left, a.height = a.bottom - a.top, a.x = a.left, a.y = a.top, a;
|
|
16417
16448
|
}
|
|
16418
16449
|
function qu(t) {
|
|
16419
|
-
var e = t.reference, n = t.element, r = t.placement, o = r ?
|
|
16450
|
+
var e = t.reference, n = t.element, r = t.placement, o = r ? it(r) : null, i = r ? Ln(r) : null, s = e.x + e.width / 2 - n.width / 2, a = e.y + e.height / 2 - n.height / 2, l;
|
|
16420
16451
|
switch (o) {
|
|
16421
16452
|
case De:
|
|
16422
16453
|
l = {
|
|
@@ -16424,13 +16455,13 @@ function qu(t) {
|
|
|
16424
16455
|
y: e.y - n.height
|
|
16425
16456
|
};
|
|
16426
16457
|
break;
|
|
16427
|
-
case
|
|
16458
|
+
case Ue:
|
|
16428
16459
|
l = {
|
|
16429
16460
|
x: s,
|
|
16430
16461
|
y: e.y + e.height
|
|
16431
16462
|
};
|
|
16432
16463
|
break;
|
|
16433
|
-
case
|
|
16464
|
+
case qe:
|
|
16434
16465
|
l = {
|
|
16435
16466
|
x: e.x + e.width,
|
|
16436
16467
|
y: a
|
|
@@ -16477,7 +16508,7 @@ function Cr(t, e) {
|
|
|
16477
16508
|
if (f === Xn && _) {
|
|
16478
16509
|
var U = _[o];
|
|
16479
16510
|
Object.keys($).forEach(function(W) {
|
|
16480
|
-
var ee = [
|
|
16511
|
+
var ee = [qe, Ue].indexOf(W) >= 0 ? 1 : -1, oe = [De, Ue].indexOf(W) >= 0 ? "y" : "x";
|
|
16481
16512
|
$[W] += U[oe] * ee;
|
|
16482
16513
|
});
|
|
16483
16514
|
}
|
|
@@ -16497,14 +16528,14 @@ function yv(t, e) {
|
|
|
16497
16528
|
boundary: o,
|
|
16498
16529
|
rootBoundary: i,
|
|
16499
16530
|
padding: s
|
|
16500
|
-
})[
|
|
16531
|
+
})[it(m)], h;
|
|
16501
16532
|
}, {});
|
|
16502
16533
|
return Object.keys(p).sort(function(h, m) {
|
|
16503
16534
|
return p[h] - p[m];
|
|
16504
16535
|
});
|
|
16505
16536
|
}
|
|
16506
16537
|
function bv(t) {
|
|
16507
|
-
if (
|
|
16538
|
+
if (it(t) === Vs)
|
|
16508
16539
|
return [];
|
|
16509
16540
|
var e = uo(t);
|
|
16510
16541
|
return [Nl(t), e, Nl(e)];
|
|
@@ -16512,8 +16543,8 @@ function bv(t) {
|
|
|
16512
16543
|
function wv(t) {
|
|
16513
16544
|
var e = t.state, n = t.options, r = t.name;
|
|
16514
16545
|
if (!e.modifiersData[r]._skip) {
|
|
16515
|
-
for (var o = n.mainAxis, i = o === void 0 ? !0 : o, s = n.altAxis, a = s === void 0 ? !0 : s, l = n.fallbackPlacements, c = n.padding, d = n.boundary, u = n.rootBoundary, f = n.altBoundary, p = n.flipVariations, h = p === void 0 ? !0 : p, m = n.allowedAutoPlacements, g = e.options.placement, b =
|
|
16516
|
-
return
|
|
16546
|
+
for (var o = n.mainAxis, i = o === void 0 ? !0 : o, s = n.altAxis, a = s === void 0 ? !0 : s, l = n.fallbackPlacements, c = n.padding, d = n.boundary, u = n.rootBoundary, f = n.altBoundary, p = n.flipVariations, h = p === void 0 ? !0 : p, m = n.allowedAutoPlacements, g = e.options.placement, b = it(g), w = b === g, C = l || (w || !h ? [uo(g)] : bv(g)), y = [g].concat(C).reduce(function(Ke, Ee) {
|
|
16547
|
+
return Ke.concat(it(Ee) === Vs ? yv(e, {
|
|
16517
16548
|
placement: Ee,
|
|
16518
16549
|
boundary: d,
|
|
16519
16550
|
rootBoundary: u,
|
|
@@ -16522,17 +16553,17 @@ function wv(t) {
|
|
|
16522
16553
|
allowedAutoPlacements: m
|
|
16523
16554
|
}) : Ee);
|
|
16524
16555
|
}, []), S = e.rects.reference, k = e.rects.popper, M = /* @__PURE__ */ new Map(), L = !0, x = y[0], $ = 0; $ < y.length; $++) {
|
|
16525
|
-
var _ = y[$], U =
|
|
16556
|
+
var _ = y[$], U = it(_), W = Ln(_) === In, ee = [De, Ue].indexOf(U) >= 0, oe = ee ? "width" : "height", ae = Cr(e, {
|
|
16526
16557
|
placement: _,
|
|
16527
16558
|
boundary: d,
|
|
16528
16559
|
rootBoundary: u,
|
|
16529
16560
|
altBoundary: f,
|
|
16530
16561
|
padding: c
|
|
16531
|
-
}), ce = ee ? W ?
|
|
16562
|
+
}), ce = ee ? W ? qe : Ne : W ? Ue : De;
|
|
16532
16563
|
S[oe] > k[oe] && (ce = uo(ce));
|
|
16533
16564
|
var se = uo(ce), pe = [];
|
|
16534
|
-
if (i && pe.push(ae[U] <= 0), a && pe.push(ae[ce] <= 0, ae[se] <= 0), pe.every(function(
|
|
16535
|
-
return
|
|
16565
|
+
if (i && pe.push(ae[U] <= 0), a && pe.push(ae[ce] <= 0, ae[se] <= 0), pe.every(function(Ke) {
|
|
16566
|
+
return Ke;
|
|
16536
16567
|
})) {
|
|
16537
16568
|
x = _, L = !1;
|
|
16538
16569
|
break;
|
|
@@ -16541,18 +16572,18 @@ function wv(t) {
|
|
|
16541
16572
|
}
|
|
16542
16573
|
if (L)
|
|
16543
16574
|
for (var ke = h ? 3 : 1, Be = function(Ee) {
|
|
16544
|
-
var
|
|
16545
|
-
var
|
|
16546
|
-
if (
|
|
16547
|
-
return
|
|
16548
|
-
return
|
|
16575
|
+
var Xe = y.find(function(Mt) {
|
|
16576
|
+
var Je = M.get(Mt);
|
|
16577
|
+
if (Je)
|
|
16578
|
+
return Je.slice(0, Ee).every(function(At) {
|
|
16579
|
+
return At;
|
|
16549
16580
|
});
|
|
16550
16581
|
});
|
|
16551
|
-
if (
|
|
16552
|
-
return x =
|
|
16582
|
+
if (Xe)
|
|
16583
|
+
return x = Xe, "break";
|
|
16553
16584
|
}, Ce = ke; Ce > 0; Ce--) {
|
|
16554
|
-
var
|
|
16555
|
-
if (
|
|
16585
|
+
var dt = Be(Ce);
|
|
16586
|
+
if (dt === "break") break;
|
|
16556
16587
|
}
|
|
16557
16588
|
e.placement !== x && (e.modifiersData[r]._skip = !0, e.placement = x, e.reset = !0);
|
|
16558
16589
|
}
|
|
@@ -16579,7 +16610,7 @@ function Il(t, e, n) {
|
|
|
16579
16610
|
};
|
|
16580
16611
|
}
|
|
16581
16612
|
function Pl(t) {
|
|
16582
|
-
return [De,
|
|
16613
|
+
return [De, qe, Ue, Ne].some(function(e) {
|
|
16583
16614
|
return t[e] >= 0;
|
|
16584
16615
|
});
|
|
16585
16616
|
}
|
|
@@ -16607,10 +16638,10 @@ const Cv = {
|
|
|
16607
16638
|
fn: kv
|
|
16608
16639
|
};
|
|
16609
16640
|
function Sv(t, e, n) {
|
|
16610
|
-
var r =
|
|
16641
|
+
var r = it(t), o = [Ne, De].indexOf(r) >= 0 ? -1 : 1, i = typeof n == "function" ? n(Object.assign({}, e, {
|
|
16611
16642
|
placement: t
|
|
16612
16643
|
})) : n, s = i[0], a = i[1];
|
|
16613
|
-
return s = s || 0, a = (a || 0) * o, [Ne,
|
|
16644
|
+
return s = s || 0, a = (a || 0) * o, [Ne, qe].indexOf(r) >= 0 ? {
|
|
16614
16645
|
x: a,
|
|
16615
16646
|
y: s
|
|
16616
16647
|
} : {
|
|
@@ -16655,7 +16686,7 @@ function Dv(t) {
|
|
|
16655
16686
|
rootBoundary: c,
|
|
16656
16687
|
padding: u,
|
|
16657
16688
|
altBoundary: d
|
|
16658
|
-
}), b =
|
|
16689
|
+
}), b = it(e.placement), w = Ln(e.placement), C = !w, y = Ws(b), S = Tv(y), k = e.modifiersData.popperOffsets, M = e.rects.reference, L = e.rects.popper, x = typeof m == "function" ? m(Object.assign({}, e.rects, {
|
|
16659
16690
|
placement: e.placement
|
|
16660
16691
|
})) : m, $ = typeof x == "number" ? {
|
|
16661
16692
|
mainAxis: x,
|
|
@@ -16669,15 +16700,15 @@ function Dv(t) {
|
|
|
16669
16700
|
};
|
|
16670
16701
|
if (k) {
|
|
16671
16702
|
if (i) {
|
|
16672
|
-
var W, ee = y === "y" ? De : Ne, oe = y === "y" ?
|
|
16703
|
+
var W, ee = y === "y" ? De : Ne, oe = y === "y" ? Ue : qe, ae = y === "y" ? "height" : "width", ce = k[y], se = ce + g[ee], pe = ce - g[oe], ke = p ? -L[ae] / 2 : 0, Be = w === In ? M[ae] : L[ae], Ce = w === In ? -L[ae] : -M[ae], dt = e.elements.arrow, Ke = p && dt ? js(dt) : {
|
|
16673
16704
|
width: 0,
|
|
16674
16705
|
height: 0
|
|
16675
|
-
}, Ee = e.modifiersData["arrow#persistent"] ? e.modifiersData["arrow#persistent"].padding : Hu(),
|
|
16706
|
+
}, Ee = e.modifiersData["arrow#persistent"] ? e.modifiersData["arrow#persistent"].padding : Hu(), Xe = Ee[ee], Mt = Ee[oe], Je = or(0, M[ae], Ke[ae]), At = C ? M[ae] / 2 - ke - Je - Xe - $.mainAxis : Be - Je - Xe - $.mainAxis, Ot = C ? -M[ae] / 2 + ke + Je + Mt + $.mainAxis : Ce + Je + Mt + $.mainAxis, fn = e.elements.arrow && Ir(e.elements.arrow), Rr = fn ? y === "y" ? fn.clientTop || 0 : fn.clientLeft || 0 : 0, Vn = (W = _?.[y]) != null ? W : 0, Lr = ce + At - Vn - Rr, Fr = ce + Ot - Vn, Hn = or(p ? Oo(se, Lr) : se, ce, p ? sn(pe, Fr) : pe);
|
|
16676
16707
|
k[y] = Hn, U[y] = Hn - ce;
|
|
16677
16708
|
}
|
|
16678
16709
|
if (a) {
|
|
16679
|
-
var jn, Br = y === "x" ? De : Ne, _r = y === "x" ?
|
|
16680
|
-
k[S] = Hr, U[S] = Hr -
|
|
16710
|
+
var jn, Br = y === "x" ? De : Ne, _r = y === "x" ? Ue : qe, ut = k[S], Tt = S === "y" ? "height" : "width", Wn = ut + g[Br], qt = ut - g[_r], Un = [De, Ne].indexOf(b) !== -1, zr = (jn = _?.[S]) != null ? jn : 0, $r = Un ? Wn : ut - M[Tt] - L[Tt] - zr + $.altAxis, Vr = Un ? ut + M[Tt] + L[Tt] - zr - $.altAxis : qt, Hr = p && Un ? Qw($r, ut, Vr) : or(p ? $r : Wn, ut, p ? Vr : qt);
|
|
16711
|
+
k[S] = Hr, U[S] = Hr - ut;
|
|
16681
16712
|
}
|
|
16682
16713
|
e.modifiersData[r] = U;
|
|
16683
16714
|
}
|
|
@@ -16696,7 +16727,7 @@ function Ev(t) {
|
|
|
16696
16727
|
};
|
|
16697
16728
|
}
|
|
16698
16729
|
function Iv(t) {
|
|
16699
|
-
return t === Le(t) || !
|
|
16730
|
+
return t === Le(t) || !We(t) ? Us(t) : Ev(t);
|
|
16700
16731
|
}
|
|
16701
16732
|
function Pv(t) {
|
|
16702
16733
|
var e = t.getBoundingClientRect(), n = Pn(e.width) / t.offsetWidth || 1, r = Pn(e.height) / t.offsetHeight || 1;
|
|
@@ -16704,15 +16735,15 @@ function Pv(t) {
|
|
|
16704
16735
|
}
|
|
16705
16736
|
function Rv(t, e, n) {
|
|
16706
16737
|
n === void 0 && (n = !1);
|
|
16707
|
-
var r =
|
|
16738
|
+
var r = We(e), o = We(e) && Pv(e), i = Ut(e), s = Rn(t, o, n), a = {
|
|
16708
16739
|
scrollLeft: 0,
|
|
16709
16740
|
scrollTop: 0
|
|
16710
16741
|
}, l = {
|
|
16711
16742
|
x: 0,
|
|
16712
16743
|
y: 0
|
|
16713
16744
|
};
|
|
16714
|
-
return (r || !r && !n) && ((
|
|
16715
|
-
Ks(i)) && (a = Iv(e)),
|
|
16745
|
+
return (r || !r && !n) && ((lt(e) !== "body" || // https://github.com/popperjs/popper-core/issues/1078
|
|
16746
|
+
Ks(i)) && (a = Iv(e)), We(e) ? (l = Rn(e, !0), l.x += e.clientLeft, l.y += e.clientTop) : i && (l.x = qs(i))), {
|
|
16716
16747
|
x: s.left + a.scrollLeft - l.x,
|
|
16717
16748
|
y: s.top + a.scrollTop - l.y,
|
|
16718
16749
|
width: s.width,
|
|
@@ -17004,15 +17035,15 @@ function $l(t, e) {
|
|
|
17004
17035
|
}
|
|
17005
17036
|
return !1;
|
|
17006
17037
|
}
|
|
17007
|
-
var
|
|
17038
|
+
var rt = {
|
|
17008
17039
|
isTouch: !1
|
|
17009
17040
|
}, Vl = 0;
|
|
17010
17041
|
function tk() {
|
|
17011
|
-
|
|
17042
|
+
rt.isTouch || (rt.isTouch = !0, window.performance && document.addEventListener("mousemove", Zu));
|
|
17012
17043
|
}
|
|
17013
17044
|
function Zu() {
|
|
17014
17045
|
var t = performance.now();
|
|
17015
|
-
t - Vl < 20 && (
|
|
17046
|
+
t - Vl < 20 && (rt.isTouch = !1, document.removeEventListener("mousemove", Zu)), Vl = t;
|
|
17016
17047
|
}
|
|
17017
17048
|
function nk() {
|
|
17018
17049
|
var t = document.activeElement;
|
|
@@ -17061,7 +17092,7 @@ ie.env.NODE_ENV !== "production" && ak();
|
|
|
17061
17092
|
function ak() {
|
|
17062
17093
|
xr = /* @__PURE__ */ new Set();
|
|
17063
17094
|
}
|
|
17064
|
-
function
|
|
17095
|
+
function gt(t, e) {
|
|
17065
17096
|
if (t && !xr.has(e)) {
|
|
17066
17097
|
var n;
|
|
17067
17098
|
xr.add(e), (n = console).warn.apply(n, Qu(e));
|
|
@@ -17193,7 +17224,7 @@ function nf(t, e) {
|
|
|
17193
17224
|
var o = Uv(Pe, Object.keys(ef)), i = !Wv(o, r);
|
|
17194
17225
|
i && (i = e.filter(function(s) {
|
|
17195
17226
|
return s.name === r;
|
|
17196
|
-
}).length === 0),
|
|
17227
|
+
}).length === 0), gt(i, ["`" + r + "`", "is not a valid prop. You may have spelled it incorrectly, or if it's", "a plugin, forgot to pass it in an array as props.plugins.", `
|
|
17197
17228
|
|
|
17198
17229
|
`, `All props: https://atomiks.github.io/tippyjs/v6/all-props/
|
|
17199
17230
|
`, "Plugins: https://atomiks.github.io/tippyjs/v6/plugins/"].join(" "));
|
|
@@ -17310,7 +17341,7 @@ function mk(t, e) {
|
|
|
17310
17341
|
return hs(k);
|
|
17311
17342
|
}
|
|
17312
17343
|
function ae(v) {
|
|
17313
|
-
return y.state.isMounted && !y.state.isVisible ||
|
|
17344
|
+
return y.state.isMounted && !y.state.isVisible || rt.isTouch || d && d.type === "focus" ? 0 : ui(y.props.delay, v ? 0 : 1, Pe.delay);
|
|
17314
17345
|
}
|
|
17315
17346
|
function ce(v) {
|
|
17316
17347
|
v === void 0 && (v = !1), k.style.pointerEvents = y.props.interactive && !v ? "" : "none", k.style.zIndex = "" + y.props.zIndex;
|
|
@@ -17352,45 +17383,45 @@ function mk(t, e) {
|
|
|
17352
17383
|
});
|
|
17353
17384
|
}
|
|
17354
17385
|
function Ce(v) {
|
|
17355
|
-
if (!(
|
|
17386
|
+
if (!(rt.isTouch && (l || v.type === "mousedown"))) {
|
|
17356
17387
|
var A = v.composedPath && v.composedPath()[0] || v.target;
|
|
17357
17388
|
if (!(y.props.interactive && $l(k, A))) {
|
|
17358
17389
|
if (Sn(y.props.triggerTarget || t).some(function(R) {
|
|
17359
17390
|
return $l(R, A);
|
|
17360
17391
|
})) {
|
|
17361
|
-
if (
|
|
17392
|
+
if (rt.isTouch || y.state.isVisible && y.props.trigger.indexOf("click") >= 0)
|
|
17362
17393
|
return;
|
|
17363
17394
|
} else
|
|
17364
17395
|
se("onClickOutside", [y, v]);
|
|
17365
17396
|
y.props.hideOnClick === !0 && (y.clearDelayTimeouts(), y.hide(), a = !0, setTimeout(function() {
|
|
17366
17397
|
a = !1;
|
|
17367
|
-
}), y.state.isMounted ||
|
|
17398
|
+
}), y.state.isMounted || Xe());
|
|
17368
17399
|
}
|
|
17369
17400
|
}
|
|
17370
17401
|
}
|
|
17371
|
-
function
|
|
17402
|
+
function dt() {
|
|
17372
17403
|
l = !0;
|
|
17373
17404
|
}
|
|
17374
|
-
function
|
|
17405
|
+
function Ke() {
|
|
17375
17406
|
l = !1;
|
|
17376
17407
|
}
|
|
17377
17408
|
function Ee() {
|
|
17378
17409
|
var v = ee();
|
|
17379
|
-
v.addEventListener("mousedown", Ce, !0), v.addEventListener("touchend", Ce, Gt), v.addEventListener("touchstart",
|
|
17410
|
+
v.addEventListener("mousedown", Ce, !0), v.addEventListener("touchend", Ce, Gt), v.addEventListener("touchstart", Ke, Gt), v.addEventListener("touchmove", dt, Gt);
|
|
17380
17411
|
}
|
|
17381
|
-
function
|
|
17412
|
+
function Xe() {
|
|
17382
17413
|
var v = ee();
|
|
17383
|
-
v.removeEventListener("mousedown", Ce, !0), v.removeEventListener("touchend", Ce, Gt), v.removeEventListener("touchstart",
|
|
17414
|
+
v.removeEventListener("mousedown", Ce, !0), v.removeEventListener("touchend", Ce, Gt), v.removeEventListener("touchstart", Ke, Gt), v.removeEventListener("touchmove", dt, Gt);
|
|
17384
17415
|
}
|
|
17385
|
-
function
|
|
17386
|
-
|
|
17416
|
+
function Mt(v, A) {
|
|
17417
|
+
At(v, function() {
|
|
17387
17418
|
!y.state.isVisible && k.parentNode && k.parentNode.contains(k) && A();
|
|
17388
17419
|
});
|
|
17389
17420
|
}
|
|
17390
|
-
function
|
|
17391
|
-
|
|
17421
|
+
function Je(v, A) {
|
|
17422
|
+
At(v, A);
|
|
17392
17423
|
}
|
|
17393
|
-
function
|
|
17424
|
+
function At(v, A) {
|
|
17394
17425
|
var R = oe().box;
|
|
17395
17426
|
function q(j) {
|
|
17396
17427
|
j.target === R && (pi(R, "remove", q), A());
|
|
@@ -17399,7 +17430,7 @@ function mk(t, e) {
|
|
|
17399
17430
|
return A();
|
|
17400
17431
|
pi(R, "remove", u), pi(R, "add", q), u = q;
|
|
17401
17432
|
}
|
|
17402
|
-
function
|
|
17433
|
+
function Ot(v, A, R) {
|
|
17403
17434
|
R === void 0 && (R = !1);
|
|
17404
17435
|
var q = Sn(y.props.triggerTarget || t);
|
|
17405
17436
|
q.forEach(function(j) {
|
|
@@ -17412,21 +17443,21 @@ function mk(t, e) {
|
|
|
17412
17443
|
});
|
|
17413
17444
|
}
|
|
17414
17445
|
function fn() {
|
|
17415
|
-
_() && (
|
|
17446
|
+
_() && (Ot("touchstart", Vn, {
|
|
17416
17447
|
passive: !0
|
|
17417
|
-
}),
|
|
17448
|
+
}), Ot("touchend", Fr, {
|
|
17418
17449
|
passive: !0
|
|
17419
17450
|
})), qv(y.props.trigger).forEach(function(v) {
|
|
17420
17451
|
if (v !== "manual")
|
|
17421
|
-
switch (
|
|
17452
|
+
switch (Ot(v, Vn), v) {
|
|
17422
17453
|
case "mouseenter":
|
|
17423
|
-
|
|
17454
|
+
Ot("mouseleave", Fr);
|
|
17424
17455
|
break;
|
|
17425
17456
|
case "focus":
|
|
17426
|
-
|
|
17457
|
+
Ot(ik ? "focusout" : "blur", Hn);
|
|
17427
17458
|
break;
|
|
17428
17459
|
case "focusin":
|
|
17429
|
-
|
|
17460
|
+
Ot("focusout", Hn);
|
|
17430
17461
|
break;
|
|
17431
17462
|
}
|
|
17432
17463
|
});
|
|
@@ -17449,7 +17480,7 @@ function mk(t, e) {
|
|
|
17449
17480
|
function Lr(v) {
|
|
17450
17481
|
var A = v.target, R = W().contains(A) || k.contains(A);
|
|
17451
17482
|
if (!(v.type === "mousemove" && R)) {
|
|
17452
|
-
var q =
|
|
17483
|
+
var q = Tt().concat(k).map(function(j) {
|
|
17453
17484
|
var Se, _e = j._tippy, pn = (Se = _e.popperInstance) == null ? void 0 : Se.state;
|
|
17454
17485
|
return pn ? {
|
|
17455
17486
|
popperRect: j.getBoundingClientRect(),
|
|
@@ -17474,7 +17505,7 @@ function mk(t, e) {
|
|
|
17474
17505
|
y.props.trigger.indexOf("focusin") < 0 && v.target !== W() || y.props.interactive && v.relatedTarget && k.contains(v.relatedTarget) || qt(v);
|
|
17475
17506
|
}
|
|
17476
17507
|
function jn(v) {
|
|
17477
|
-
return
|
|
17508
|
+
return rt.isTouch ? _() !== v.type.indexOf("touch") >= 0 : !1;
|
|
17478
17509
|
}
|
|
17479
17510
|
function Br() {
|
|
17480
17511
|
_r();
|
|
@@ -17536,9 +17567,9 @@ function mk(t, e) {
|
|
|
17536
17567
|
function _r() {
|
|
17537
17568
|
y.popperInstance && (y.popperInstance.destroy(), y.popperInstance = null);
|
|
17538
17569
|
}
|
|
17539
|
-
function
|
|
17570
|
+
function ut() {
|
|
17540
17571
|
var v = y.props.appendTo, A, R = W();
|
|
17541
|
-
y.props.interactive && v === Yu || v === "parent" ? A = R.parentNode : A = Gu(v, [R]), A.contains(k) || A.appendChild(k), y.state.isMounted = !0, Br(), ie.env.NODE_ENV !== "production" &&
|
|
17572
|
+
y.props.interactive && v === Yu || v === "parent" ? A = R.parentNode : A = Gu(v, [R]), A.contains(k) || A.appendChild(k), y.state.isMounted = !0, Br(), ie.env.NODE_ENV !== "production" && gt(y.props.interactive && v === Pe.appendTo && R.nextElementSibling !== k, ["Interactive tippy element may not be accessible via keyboard", "navigation because it is not directly after the reference element", "in the DOM source order.", `
|
|
17542
17573
|
|
|
17543
17574
|
`, "Using a wrapper <div> or <span> tag around the reference element", "solves this by creating a new parentNode context.", `
|
|
17544
17575
|
|
|
@@ -17546,19 +17577,19 @@ function mk(t, e) {
|
|
|
17546
17577
|
|
|
17547
17578
|
`, "See: https://atomiks.github.io/tippyjs/v6/accessibility/#interactivity"].join(" "));
|
|
17548
17579
|
}
|
|
17549
|
-
function
|
|
17580
|
+
function Tt() {
|
|
17550
17581
|
return To(k.querySelectorAll("[data-tippy-root]"));
|
|
17551
17582
|
}
|
|
17552
17583
|
function Wn(v) {
|
|
17553
17584
|
y.clearDelayTimeouts(), v && se("onTrigger", [y, v]), Ee();
|
|
17554
17585
|
var A = ae(!0), R = $(), q = R[0], j = R[1];
|
|
17555
|
-
|
|
17586
|
+
rt.isTouch && q === "hold" && j && (A = j), A ? r = setTimeout(function() {
|
|
17556
17587
|
y.show();
|
|
17557
17588
|
}, A) : y.show();
|
|
17558
17589
|
}
|
|
17559
17590
|
function qt(v) {
|
|
17560
17591
|
if (y.clearDelayTimeouts(), se("onUntrigger", [y, v]), !y.state.isVisible) {
|
|
17561
|
-
|
|
17592
|
+
Xe();
|
|
17562
17593
|
return;
|
|
17563
17594
|
}
|
|
17564
17595
|
if (!(y.props.trigger.indexOf("mouseenter") >= 0 && y.props.trigger.indexOf("click") >= 0 && ["mouseleave", "mousemove"].indexOf(v.type) >= 0 && s)) {
|
|
@@ -17580,14 +17611,14 @@ function mk(t, e) {
|
|
|
17580
17611
|
clearTimeout(r), clearTimeout(o), cancelAnimationFrame(i);
|
|
17581
17612
|
}
|
|
17582
17613
|
function Vr(v) {
|
|
17583
|
-
if (ie.env.NODE_ENV !== "production" &&
|
|
17614
|
+
if (ie.env.NODE_ENV !== "production" && gt(y.state.isDestroyed, wn("setProps")), !y.state.isDestroyed) {
|
|
17584
17615
|
se("onBeforeUpdate", [y, v]), Rr();
|
|
17585
17616
|
var A = y.props, R = jl(t, Object.assign({}, A, _l(v), {
|
|
17586
17617
|
ignoreAttributes: !0
|
|
17587
17618
|
}));
|
|
17588
17619
|
y.props = R, fn(), A.interactiveDebounce !== R.interactiveDebounce && (Be(), h = Fl(Lr, R.interactiveDebounce)), A.triggerTarget && !R.triggerTarget ? Sn(A.triggerTarget).forEach(function(q) {
|
|
17589
17620
|
q.removeAttribute("aria-expanded");
|
|
17590
|
-
}) : R.triggerTarget && t.removeAttribute("aria-expanded"), ke(), ce(), M && M(A, R), y.popperInstance && (Br(),
|
|
17621
|
+
}) : R.triggerTarget && t.removeAttribute("aria-expanded"), ke(), ce(), M && M(A, R), y.popperInstance && (Br(), Tt().forEach(function(q) {
|
|
17591
17622
|
requestAnimationFrame(q._tippy.popperInstance.forceUpdate);
|
|
17592
17623
|
})), se("onAfterUpdate", [y, v]);
|
|
17593
17624
|
}
|
|
@@ -17598,8 +17629,8 @@ function mk(t, e) {
|
|
|
17598
17629
|
});
|
|
17599
17630
|
}
|
|
17600
17631
|
function of() {
|
|
17601
|
-
ie.env.NODE_ENV !== "production" &&
|
|
17602
|
-
var v = y.state.isVisible, A = y.state.isDestroyed, R = !y.state.isEnabled, q =
|
|
17632
|
+
ie.env.NODE_ENV !== "production" && gt(y.state.isDestroyed, wn("show"));
|
|
17633
|
+
var v = y.state.isVisible, A = y.state.isDestroyed, R = !y.state.isEnabled, q = rt.isTouch && !y.props.touch, j = ui(y.props.duration, 0, Pe.duration);
|
|
17603
17634
|
if (!(v || A || R || q) && !W().hasAttribute("disabled") && (se("onShow", [y], !1), y.props.onShow(y) !== !1)) {
|
|
17604
17635
|
if (y.state.isVisible = !0, U() && (k.style.visibility = "visible"), ce(), Ee(), y.state.isMounted || (k.style.transition = "none"), U()) {
|
|
17605
17636
|
var Se = oe(), _e = Se.box, pn = Se.content;
|
|
@@ -17612,36 +17643,36 @@ function mk(t, e) {
|
|
|
17612
17643
|
var $o = oe(), jr = $o.box, hn = $o.content;
|
|
17613
17644
|
fi([jr, hn], j), zl([jr, hn], "visible");
|
|
17614
17645
|
}
|
|
17615
|
-
pe(), ke(), Bl(hi, y), (Kt = y.popperInstance) == null || Kt.forceUpdate(), se("onMount", [y]), y.props.animation && U() &&
|
|
17646
|
+
pe(), ke(), Bl(hi, y), (Kt = y.popperInstance) == null || Kt.forceUpdate(), se("onMount", [y]), y.props.animation && U() && Je(j, function() {
|
|
17616
17647
|
y.state.isShown = !0, se("onShown", [y]);
|
|
17617
17648
|
});
|
|
17618
17649
|
}
|
|
17619
|
-
},
|
|
17650
|
+
}, ut();
|
|
17620
17651
|
}
|
|
17621
17652
|
}
|
|
17622
17653
|
function sf() {
|
|
17623
|
-
ie.env.NODE_ENV !== "production" &&
|
|
17654
|
+
ie.env.NODE_ENV !== "production" && gt(y.state.isDestroyed, wn("hide"));
|
|
17624
17655
|
var v = !y.state.isVisible, A = y.state.isDestroyed, R = !y.state.isEnabled, q = ui(y.props.duration, 1, Pe.duration);
|
|
17625
17656
|
if (!(v || A || R) && (se("onHide", [y], !1), y.props.onHide(y) !== !1)) {
|
|
17626
|
-
if (y.state.isVisible = !1, y.state.isShown = !1, c = !1, s = !1, U() && (k.style.visibility = "hidden"), Be(),
|
|
17657
|
+
if (y.state.isVisible = !1, y.state.isShown = !1, c = !1, s = !1, U() && (k.style.visibility = "hidden"), Be(), Xe(), ce(!0), U()) {
|
|
17627
17658
|
var j = oe(), Se = j.box, _e = j.content;
|
|
17628
17659
|
y.props.animation && (fi([Se, _e], q), zl([Se, _e], "hidden"));
|
|
17629
17660
|
}
|
|
17630
|
-
pe(), ke(), y.props.animation ? U() &&
|
|
17661
|
+
pe(), ke(), y.props.animation ? U() && Mt(q, y.unmount) : y.unmount();
|
|
17631
17662
|
}
|
|
17632
17663
|
}
|
|
17633
17664
|
function af(v) {
|
|
17634
|
-
ie.env.NODE_ENV !== "production" &&
|
|
17665
|
+
ie.env.NODE_ENV !== "production" && gt(y.state.isDestroyed, wn("hideWithInteractivity")), ee().addEventListener("mousemove", h), Bl(Qr, h), h(v);
|
|
17635
17666
|
}
|
|
17636
17667
|
function lf() {
|
|
17637
|
-
ie.env.NODE_ENV !== "production" &&
|
|
17668
|
+
ie.env.NODE_ENV !== "production" && gt(y.state.isDestroyed, wn("unmount")), y.state.isVisible && y.hide(), y.state.isMounted && (_r(), Tt().forEach(function(v) {
|
|
17638
17669
|
v._tippy.unmount();
|
|
17639
17670
|
}), k.parentNode && k.parentNode.removeChild(k), hi = hi.filter(function(v) {
|
|
17640
17671
|
return v !== y;
|
|
17641
17672
|
}), y.state.isMounted = !1, se("onHidden", [y]));
|
|
17642
17673
|
}
|
|
17643
17674
|
function cf() {
|
|
17644
|
-
ie.env.NODE_ENV !== "production" &&
|
|
17675
|
+
ie.env.NODE_ENV !== "production" && gt(y.state.isDestroyed, wn("destroy")), !y.state.isDestroyed && (y.clearDelayTimeouts(), y.unmount(), Rr(), delete t._tippy, y.state.isDestroyed = !0, se("onDestroy", [y]));
|
|
17645
17676
|
}
|
|
17646
17677
|
}
|
|
17647
17678
|
function Pr(t, e) {
|
|
@@ -17653,7 +17684,7 @@ function Pr(t, e) {
|
|
|
17653
17684
|
}), o = Zv(t);
|
|
17654
17685
|
if (ie.env.NODE_ENV !== "production") {
|
|
17655
17686
|
var i = Sr(r.content), s = o.length > 1;
|
|
17656
|
-
|
|
17687
|
+
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.", `
|
|
17657
17688
|
|
|
17658
17689
|
`, "Instead, pass the .innerHTML of the element, or use a function that", "returns a cloned version of the element instead.", `
|
|
17659
17690
|
|
|
@@ -17668,7 +17699,7 @@ function Pr(t, e) {
|
|
|
17668
17699
|
}
|
|
17669
17700
|
Pr.defaultProps = Pe;
|
|
17670
17701
|
Pr.setDefaultProps = uk;
|
|
17671
|
-
Pr.currentInput =
|
|
17702
|
+
Pr.currentInput = rt;
|
|
17672
17703
|
Object.assign({}, zu, {
|
|
17673
17704
|
effect: function(e) {
|
|
17674
17705
|
var n = e.state, r = {
|
|
@@ -18001,7 +18032,7 @@ function Nk(t, e, n, r) {
|
|
|
18001
18032
|
}
|
|
18002
18033
|
}
|
|
18003
18034
|
if (ce || ae) {
|
|
18004
|
-
const se = e.state.doc.resolve(oe), pe = Bo(se, (
|
|
18035
|
+
const se = e.state.doc.resolve(oe), pe = Bo(se, (At) => At.type.name === "tableRow");
|
|
18005
18036
|
pe && (ee = pe.node, oe = pe.pos);
|
|
18006
18037
|
const {
|
|
18007
18038
|
top: ke,
|
|
@@ -18009,12 +18040,12 @@ function Nk(t, e, n, r) {
|
|
|
18009
18040
|
pos: Ce
|
|
18010
18041
|
} = Ek(e, oe, c);
|
|
18011
18042
|
l++;
|
|
18012
|
-
const
|
|
18013
|
-
u = mi(s, i, r,
|
|
18014
|
-
const Ee = c - Be, { node:
|
|
18015
|
-
o.push(
|
|
18016
|
-
const
|
|
18017
|
-
o.push(z.widget(Ce,
|
|
18043
|
+
const dt = eo(l, "headerIds", n), Ke = eo(l, "footerIds", n);
|
|
18044
|
+
u = mi(s, i, r, dt), d = gi(s, i, r, Ke, l - 1);
|
|
18045
|
+
const Ee = c - Be, { node: Xe } = Kl(Ee), Mt = z.widget(Ce, Xe, { key: "stable-key" });
|
|
18046
|
+
o.push(Mt);
|
|
18047
|
+
const Je = yi({ editor: n, header: u, footer: d });
|
|
18048
|
+
o.push(z.widget(Ce, Je, { key: "stable-key" })), c = Be + (a - u.headerHeight - d.footerHeight);
|
|
18018
18049
|
}
|
|
18019
18050
|
});
|
|
18020
18051
|
let y = t.content.size;
|
|
@@ -18179,7 +18210,7 @@ export {
|
|
|
18179
18210
|
gk as _,
|
|
18180
18211
|
Hk as a,
|
|
18181
18212
|
Kb as b,
|
|
18182
|
-
|
|
18213
|
+
je as c,
|
|
18183
18214
|
Ef as d,
|
|
18184
18215
|
Pk as e,
|
|
18185
18216
|
Uk as f,
|