@woven-canvas/vue 1.0.9 → 1.0.10
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/build/components/WovenCanvasCore.vue.d.ts.map +1 -1
- package/build/index.js +634 -631
- package/build/index.umd.cjs +12 -12
- package/package.json +3 -3
package/build/index.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { defineCanvasSingleton as Ud, Synced as jd, CanvasStore as wm } from "@woven-ecs/canvas-store";
|
|
2
2
|
import { CanvasComponentDef as GM, CanvasSingletonDef as YM, CanvasStore as XM, Synced as QM, defineCanvasComponent as ZM, defineCanvasSingleton as eT } from "@woven-ecs/canvas-store";
|
|
3
3
|
import { ArrowHeadKind as Ye, ArcArrow as rn, ElbowArrow as sn, createArrowsPlugin as km } from "@woven-canvas/plugin-arrows";
|
|
4
|
-
import { inject as ue, shallowRef as Me, onUnmounted as Le, defineComponent as U, computed as I, openBlock as S, createElementBlock as A, unref as B, Fragment as ce, createElementVNode as b, createCommentVNode as
|
|
5
|
-
import { hasComponent as ut, Color as
|
|
4
|
+
import { inject as ue, shallowRef as Me, onUnmounted as Le, defineComponent as U, computed as I, openBlock as S, createElementBlock as A, unref as B, Fragment as ce, createElementVNode as b, createCommentVNode as V, ref as z, onMounted as Mt, createBlock as K, renderList as Te, toDisplayString as De, normalizeStyle as ge, watch as me, withAsyncContext as ar, h as ui, getCurrentInstance as ma, watchEffect as ds, nextTick as po, onBeforeUnmount as bm, markRaw as xm, customRef as Sm, toValue as nt, reactive as Kd, readonly as $i, createVNode as G, mergeProps as Re, getCurrentScope as qd, onScopeDispose as Jd, shallowReadonly as ko, provide as Xn, withModifiers as Dt, normalizeClass as Ie, renderSlot as de, Teleport as $r, withCtx as te, resolveComponent as Cm, Transition as ga, withDirectives as Gd, withKeys as Cc, vModelText as Yd, useSlots as Xd, resolveDynamicComponent as Mc, createTextVNode as Sl, normalizeProps as Cl, guardReactiveProps as Ml, Suspense as Mm, createSlots as Tm } from "vue";
|
|
5
|
+
import { hasComponent as ut, Color as Ro, EmbedProvider as ae, Embed as Tl, Block as fe, UploadState as Mn, Asset as Tn, Image as El, field as er, defineQuery as ft, Edited as ya, defineEditorSystem as va, Controls as Io, getPointerInput as Qd, PointerButton as Zd, getPluginResources as zr, getResources as Fo, addComponent as ze, Held as Al, canBlockEdit as wa, Cursor as ef, getBlockDef as tf, Grid as io, RankBounds as nf, createEntity as di, Synced as Ht, Mouse as of, Camera as _e, removeEntity as rf, Text as pt, Aabb as Eo, Screen as Hn, ResetKeyboard as Em, VerticalAlignment as Ge, StrokeKind as bt, Shape as an, VerticalAlign as fs, TextAlignment as nn, Undo as ka, Redo as hs, detectEmbedProvider as Am, validateEmbedUrl as Im, resolveEmbedUrl as Om, on as Tc, Key as zi, Connector as Ec, Hovered as Nm, Opacity as Ac, User as Fi, UserData as Dm, Editor as Rm, SINGLETON_ENTITY_ID as _m, EventType as bo, STRATUM_ORDER as Pm } from "@woven-canvas/core";
|
|
6
6
|
import { Arc as Xt, Vec2 as tr, Aabb as En, Rect as Lm } from "@woven-canvas/math";
|
|
7
7
|
import { EraserStroke as Bm, POINTS_CAPACITY as Ic, createEraserPlugin as $m } from "@woven-canvas/plugin-eraser";
|
|
8
8
|
import { PenStroke as Il, createPenPlugin as zm } from "@woven-canvas/plugin-pen";
|
|
@@ -148,8 +148,8 @@ const Xm = { key: 0 }, Qm = ["x1", "y1", "x2", "y2", "stroke", "stroke-width"],
|
|
|
148
148
|
key: 3,
|
|
149
149
|
points: i.value,
|
|
150
150
|
fill: n.color
|
|
151
|
-
}, null, 8, ng)) :
|
|
152
|
-
])) :
|
|
151
|
+
}, null, 8, ng)) : V("", !0)
|
|
152
|
+
])) : V("", !0);
|
|
153
153
|
}
|
|
154
154
|
}), sg = {
|
|
155
155
|
class: "arrow-svg",
|
|
@@ -168,7 +168,7 @@ const Xm = { key: 0 }, Qm = ["x1", "y1", "x2", "y2", "stroke", "stroke-width"],
|
|
|
168
168
|
connector: {}
|
|
169
169
|
},
|
|
170
170
|
setup(n) {
|
|
171
|
-
const e = n, t = z(null), o = z(0), r = z(0), s = Pe(e.entityId,
|
|
171
|
+
const e = n, t = z(null), o = z(0), r = z(0), s = Pe(e.entityId, Ro), i = Pe(e.entityId, rn);
|
|
172
172
|
let l = null;
|
|
173
173
|
Mt(() => {
|
|
174
174
|
t.value && (l = new ResizeObserver(() => {
|
|
@@ -193,11 +193,11 @@ const Xm = { key: 0 }, Qm = ["x1", "y1", "x2", "y2", "stroke", "stroke-width"],
|
|
|
193
193
|
const w = i.value.value, k = o.value, C = r.value;
|
|
194
194
|
return Xt.create(w[0] * k, w[1] * C, w[2] * k, w[3] * C, w[4] * k, w[5] * C, w[6]);
|
|
195
195
|
}), p = I(() => !f.value || !h.value ? null : Xt.compute(f.value)), m = I(() => {
|
|
196
|
-
var
|
|
196
|
+
var W, q, ne, Z;
|
|
197
197
|
if (!i.value || !f.value) return null;
|
|
198
198
|
const w = f.value, k = i.value.startArrowHead, C = i.value.endArrowHead, T = Xt.length(w);
|
|
199
199
|
let x = i.value.trimStart;
|
|
200
|
-
if ((
|
|
200
|
+
if ((W = e.connector) != null && W.startBlock && k !== "none") {
|
|
201
201
|
const Y = ((q = xr(k)) == null ? void 0 : q.gap) ?? 0, X = T > 0 ? Y / T : 0;
|
|
202
202
|
x += X;
|
|
203
203
|
}
|
|
@@ -206,9 +206,9 @@ const Xm = { key: 0 }, Qm = ["x1", "y1", "x2", "y2", "stroke", "stroke-width"],
|
|
|
206
206
|
const Y = ((Z = xr(C)) == null ? void 0 : Z.gap) ?? 0, X = T > 0 ? Y / T : 0;
|
|
207
207
|
M += X;
|
|
208
208
|
}
|
|
209
|
-
const E = 1 - M,
|
|
209
|
+
const E = 1 - M, D = Xt.parametricToPoint(w, x), P = Xt.parametricToPoint(w, E), _ = v(Xt.directionAt(w, x)), $ = Xt.directionAt(w, E);
|
|
210
210
|
return {
|
|
211
|
-
start:
|
|
211
|
+
start: D,
|
|
212
212
|
end: P,
|
|
213
213
|
startDir: _,
|
|
214
214
|
endDir: $,
|
|
@@ -253,7 +253,7 @@ const Xm = { key: 0 }, Qm = ["x1", "y1", "x2", "y2", "stroke", "stroke-width"],
|
|
|
253
253
|
fill: "none",
|
|
254
254
|
"stroke-width": u.value,
|
|
255
255
|
"stroke-linecap": "round"
|
|
256
|
-
}, null, 8, lg)) :
|
|
256
|
+
}, null, 8, lg)) : V("", !0),
|
|
257
257
|
m.value ? (S(), A(ce, { key: 2 }, [
|
|
258
258
|
m.value.startHead !== "none" ? (S(), K(An, {
|
|
259
259
|
key: 0,
|
|
@@ -263,7 +263,7 @@ const Xm = { key: 0 }, Qm = ["x1", "y1", "x2", "y2", "stroke", "stroke-width"],
|
|
|
263
263
|
"arrow-thickness": c.value,
|
|
264
264
|
color: a.value,
|
|
265
265
|
kind: m.value.startHead
|
|
266
|
-
}, null, 8, ["position", "direction", "thickness", "arrow-thickness", "color", "kind"])) :
|
|
266
|
+
}, null, 8, ["position", "direction", "thickness", "arrow-thickness", "color", "kind"])) : V("", !0),
|
|
267
267
|
m.value.endHead !== "none" ? (S(), K(An, {
|
|
268
268
|
key: 1,
|
|
269
269
|
position: m.value.end,
|
|
@@ -272,7 +272,7 @@ const Xm = { key: 0 }, Qm = ["x1", "y1", "x2", "y2", "stroke", "stroke-width"],
|
|
|
272
272
|
"arrow-thickness": c.value,
|
|
273
273
|
color: a.value,
|
|
274
274
|
kind: m.value.endHead
|
|
275
|
-
}, null, 8, ["position", "direction", "thickness", "arrow-thickness", "color", "kind"])) :
|
|
275
|
+
}, null, 8, ["position", "direction", "thickness", "arrow-thickness", "color", "kind"])) : V("", !0),
|
|
276
276
|
d.value ? (S(), A(ce, { key: 2 }, [
|
|
277
277
|
h.value && g.value ? (S(), A("path", {
|
|
278
278
|
key: 0,
|
|
@@ -291,7 +291,7 @@ const Xm = { key: 0 }, Qm = ["x1", "y1", "x2", "y2", "stroke", "stroke-width"],
|
|
|
291
291
|
fill: "none",
|
|
292
292
|
style: { "stroke-width": "calc(2px / var(--wov-zoom))" },
|
|
293
293
|
"stroke-linecap": "round"
|
|
294
|
-
}, null, 8, cg)) :
|
|
294
|
+
}, null, 8, cg)) : V("", !0),
|
|
295
295
|
m.value.startHead !== "none" ? (S(), K(An, {
|
|
296
296
|
key: 2,
|
|
297
297
|
position: m.value.start,
|
|
@@ -300,7 +300,7 @@ const Xm = { key: 0 }, Qm = ["x1", "y1", "x2", "y2", "stroke", "stroke-width"],
|
|
|
300
300
|
"arrow-thickness": c.value,
|
|
301
301
|
color: "var(--wov-highlighted-block-outline-color)",
|
|
302
302
|
kind: m.value.startHead
|
|
303
|
-
}, null, 8, ["position", "direction", "arrow-thickness", "kind"])) :
|
|
303
|
+
}, null, 8, ["position", "direction", "arrow-thickness", "kind"])) : V("", !0),
|
|
304
304
|
m.value.endHead !== "none" ? (S(), K(An, {
|
|
305
305
|
key: 3,
|
|
306
306
|
position: m.value.end,
|
|
@@ -309,9 +309,9 @@ const Xm = { key: 0 }, Qm = ["x1", "y1", "x2", "y2", "stroke", "stroke-width"],
|
|
|
309
309
|
"arrow-thickness": c.value,
|
|
310
310
|
color: "var(--wov-highlighted-block-outline-color)",
|
|
311
311
|
kind: m.value.endHead
|
|
312
|
-
}, null, 8, ["position", "direction", "arrow-thickness", "kind"])) :
|
|
313
|
-
], 64)) :
|
|
314
|
-
], 64)) :
|
|
312
|
+
}, null, 8, ["position", "direction", "arrow-thickness", "kind"])) : V("", !0)
|
|
313
|
+
], 64)) : V("", !0)
|
|
314
|
+
], 64)) : V("", !0)
|
|
315
315
|
]))
|
|
316
316
|
], 512));
|
|
317
317
|
}
|
|
@@ -351,7 +351,7 @@ const wg = /* @__PURE__ */ mo(gg, [["render", vg]]), kg = {
|
|
|
351
351
|
connector: {}
|
|
352
352
|
},
|
|
353
353
|
setup(n) {
|
|
354
|
-
const e = n, t = z(null), o = z(0), r = z(0), s = Pe(e.entityId,
|
|
354
|
+
const e = n, t = z(null), o = z(0), r = z(0), s = Pe(e.entityId, Ro), i = Pe(e.entityId, sn), l = I(() => e.hovered || e.selected);
|
|
355
355
|
let a = null;
|
|
356
356
|
Mt(() => {
|
|
357
357
|
t.value && (a = new ResizeObserver(() => {
|
|
@@ -383,7 +383,7 @@ const wg = /* @__PURE__ */ mo(gg, [["render", vg]]), kg = {
|
|
|
383
383
|
g.push({ start: m[y], end: m[y + 1] });
|
|
384
384
|
return g;
|
|
385
385
|
}), p = I(() => {
|
|
386
|
-
var E,
|
|
386
|
+
var E, D, P, _;
|
|
387
387
|
if (!i.value || h.value.length < 2) return null;
|
|
388
388
|
const m = i.value, g = [...h.value.map(($) => [...$])], y = m.startArrowHead, v = m.endArrowHead, w = [g[1][0] - g[0][0], g[1][1] - g[0][1]], k = [
|
|
389
389
|
g[g.length - 1][0] - g[g.length - 2][0],
|
|
@@ -391,12 +391,12 @@ const wg = /* @__PURE__ */ mo(gg, [["render", vg]]), kg = {
|
|
|
391
391
|
];
|
|
392
392
|
let C = m.trimStart;
|
|
393
393
|
if ((E = e.connector) != null && E.startBlock && y !== "none") {
|
|
394
|
-
const $ = Math.hypot(w[0], w[1]),
|
|
394
|
+
const $ = Math.hypot(w[0], w[1]), W = ((D = xr(y)) == null ? void 0 : D.gap) ?? 0, q = $ > 0 ? W / $ : 0;
|
|
395
395
|
C += q;
|
|
396
396
|
}
|
|
397
397
|
let T = m.trimEnd;
|
|
398
398
|
if ((P = e.connector) != null && P.endBlock && v !== "none") {
|
|
399
|
-
const $ = Math.hypot(k[0], k[1]),
|
|
399
|
+
const $ = Math.hypot(k[0], k[1]), W = ((_ = xr(v)) == null ? void 0 : _.gap) ?? 0, q = $ > 0 ? W / $ : 0;
|
|
400
400
|
T += q;
|
|
401
401
|
}
|
|
402
402
|
g[0] = [
|
|
@@ -438,7 +438,7 @@ const wg = /* @__PURE__ */ mo(gg, [["render", vg]]), kg = {
|
|
|
438
438
|
fill: "none",
|
|
439
439
|
style: { "stroke-width": "calc(2px / var(--wov-zoom))", "stroke-dasharray": "calc(12px / var(--wov-zoom))" },
|
|
440
440
|
"stroke-linecap": "round"
|
|
441
|
-
}, null, 8, bg))), 128)) :
|
|
441
|
+
}, null, 8, bg))), 128)) : V("", !0),
|
|
442
442
|
p.value ? (S(), A(ce, { key: 1 }, [
|
|
443
443
|
(S(!0), A(ce, null, Te(p.value.lines, (y, v) => (S(), A("line", {
|
|
444
444
|
key: v,
|
|
@@ -459,7 +459,7 @@ const wg = /* @__PURE__ */ mo(gg, [["render", vg]]), kg = {
|
|
|
459
459
|
"arrow-thickness": u.value,
|
|
460
460
|
color: c.value,
|
|
461
461
|
kind: p.value.startHead
|
|
462
|
-
}, null, 8, ["position", "direction", "thickness", "arrow-thickness", "color", "kind"])) :
|
|
462
|
+
}, null, 8, ["position", "direction", "thickness", "arrow-thickness", "color", "kind"])) : V("", !0),
|
|
463
463
|
p.value.endHead !== "none" ? (S(), K(An, {
|
|
464
464
|
key: 1,
|
|
465
465
|
position: p.value.endPos,
|
|
@@ -468,7 +468,7 @@ const wg = /* @__PURE__ */ mo(gg, [["render", vg]]), kg = {
|
|
|
468
468
|
"arrow-thickness": u.value,
|
|
469
469
|
color: c.value,
|
|
470
470
|
kind: p.value.endHead
|
|
471
|
-
}, null, 8, ["position", "direction", "thickness", "arrow-thickness", "color", "kind"])) :
|
|
471
|
+
}, null, 8, ["position", "direction", "thickness", "arrow-thickness", "color", "kind"])) : V("", !0),
|
|
472
472
|
l.value ? (S(), A(ce, { key: 2 }, [
|
|
473
473
|
(S(!0), A(ce, null, Te(p.value.lines, (y, v) => (S(), A("line", {
|
|
474
474
|
key: "hl-" + v,
|
|
@@ -489,7 +489,7 @@ const wg = /* @__PURE__ */ mo(gg, [["render", vg]]), kg = {
|
|
|
489
489
|
"arrow-thickness": u.value,
|
|
490
490
|
color: "var(--wov-highlighted-block-outline-color)",
|
|
491
491
|
kind: p.value.startHead
|
|
492
|
-
}, null, 8, ["position", "direction", "arrow-thickness", "kind"])) :
|
|
492
|
+
}, null, 8, ["position", "direction", "arrow-thickness", "kind"])) : V("", !0),
|
|
493
493
|
p.value.endHead !== "none" ? (S(), K(An, {
|
|
494
494
|
key: 1,
|
|
495
495
|
position: p.value.endPos,
|
|
@@ -498,9 +498,9 @@ const wg = /* @__PURE__ */ mo(gg, [["render", vg]]), kg = {
|
|
|
498
498
|
"arrow-thickness": u.value,
|
|
499
499
|
color: "var(--wov-highlighted-block-outline-color)",
|
|
500
500
|
kind: p.value.endHead
|
|
501
|
-
}, null, 8, ["position", "direction", "arrow-thickness", "kind"])) :
|
|
502
|
-
], 64)) :
|
|
503
|
-
], 64)) :
|
|
501
|
+
}, null, 8, ["position", "direction", "arrow-thickness", "kind"])) : V("", !0)
|
|
502
|
+
], 64)) : V("", !0)
|
|
503
|
+
], 64)) : V("", !0)
|
|
504
504
|
]))
|
|
505
505
|
], 512));
|
|
506
506
|
}
|
|
@@ -572,11 +572,11 @@ const wg = /* @__PURE__ */ mo(gg, [["render", vg]]), kg = {
|
|
|
572
572
|
class: "wov-embed-iframe",
|
|
573
573
|
style: ge({ pointerEvents: n.edited ? "auto" : "none" })
|
|
574
574
|
}, null, 12, Ag)) : (S(), A("div", Eg, [
|
|
575
|
-
b("span", null,
|
|
575
|
+
b("span", null, De(s.value), 1)
|
|
576
576
|
]))
|
|
577
577
|
]));
|
|
578
578
|
}
|
|
579
|
-
}), { PI: Og } = Math, Sr = Og + 1e-4,
|
|
579
|
+
}), { PI: Og } = Math, Sr = Og + 1e-4, Dc = 0.5, Rc = [1, 1];
|
|
580
580
|
function _c(n, e, t, o = (r) => r) {
|
|
581
581
|
return n * o(0.5 - e * (0.5 - t));
|
|
582
582
|
}
|
|
@@ -606,7 +606,7 @@ function In(n, e) {
|
|
|
606
606
|
function Vi(n, e, t) {
|
|
607
607
|
return n[0] = e[0] * t, n[1] = e[1] * t, n;
|
|
608
608
|
}
|
|
609
|
-
function
|
|
609
|
+
function Dg(n, e) {
|
|
610
610
|
return [n[0] / e, n[1] / e];
|
|
611
611
|
}
|
|
612
612
|
function ff(n) {
|
|
@@ -619,7 +619,7 @@ function Wi(n, e) {
|
|
|
619
619
|
function Lc(n, e) {
|
|
620
620
|
return n[0] * e[0] + n[1] * e[1];
|
|
621
621
|
}
|
|
622
|
-
function
|
|
622
|
+
function Rg(n, e) {
|
|
623
623
|
return n[0] === e[0] && n[1] === e[1];
|
|
624
624
|
}
|
|
625
625
|
function _g(n) {
|
|
@@ -630,7 +630,7 @@ function Bc(n, e) {
|
|
|
630
630
|
return t * t + o * o;
|
|
631
631
|
}
|
|
632
632
|
function hf(n) {
|
|
633
|
-
return
|
|
633
|
+
return Dg(n, _g(n));
|
|
634
634
|
}
|
|
635
635
|
function Pg(n, e) {
|
|
636
636
|
return Math.hypot(n[1] - e[1], n[0] - e[0]);
|
|
@@ -688,7 +688,7 @@ function Vg(n, e, t) {
|
|
|
688
688
|
function Wg(n, e = {}) {
|
|
689
689
|
let { size: t = 16, smoothing: o = 0.5, thinning: r = 0.5, simulatePressure: s = !0, easing: i = (Z) => Z, start: l = {}, end: a = {}, last: c = !1 } = e, { cap: u = !0, easing: d = (Z) => Z * (2 - Z) } = l, { cap: h = !0, easing: f = (Z) => --Z * Z * Z + 1 } = a;
|
|
690
690
|
if (n.length === 0 || t <= 0) return [];
|
|
691
|
-
let p = n[n.length - 1].runningLength, m = Fc(l.taper, t, p), g = Fc(a.taper, t, p), y = (t * o) ** 2, v = [], w = [], k = Vg(n, s, t), C = _c(t, r, n[n.length - 1].pressure, i), T, x = n[0].vector, M = n[0].point, E = M,
|
|
691
|
+
let p = n[n.length - 1].runningLength, m = Fc(l.taper, t, p), g = Fc(a.taper, t, p), y = (t * o) ** 2, v = [], w = [], k = Vg(n, s, t), C = _c(t, r, n[n.length - 1].pressure, i), T, x = n[0].vector, M = n[0].point, E = M, D = M, P = E, _ = !1;
|
|
692
692
|
for (let Z = 0; Z < n.length; Z++) {
|
|
693
693
|
let { pressure: Y } = n[Z], { point: X, vector: se, distance: he, runningLength: pe } = n[Z], je = Z === n.length - 1;
|
|
694
694
|
if (!je && p - pe < 3) continue;
|
|
@@ -698,23 +698,23 @@ function Wg(n, e = {}) {
|
|
|
698
698
|
let Oe = (je ? n[Z] : n[Z + 1]).vector, pn = je ? 1 : Lc(se, Oe), jr = Lc(se, x) < 0 && !_, wo = pn !== null && pn < 0;
|
|
699
699
|
if (jr || wo) {
|
|
700
700
|
Wi(Ke, x), Vi(Ke, Ke, C);
|
|
701
|
-
for (let Lt = 0; Lt <= 1; Lt += 0.07692307692307693) Nl(gn, X, Ke), $c(gn, gn, X, Sr * Lt),
|
|
702
|
-
M =
|
|
701
|
+
for (let Lt = 0; Lt <= 1; Lt += 0.07692307692307693) Nl(gn, X, Ke), $c(gn, gn, X, Sr * Lt), D = [gn[0], gn[1]], v.push(D), Pc(yn, X, Ke), $c(yn, yn, X, Sr * -Lt), P = [yn[0], yn[1]], w.push(P);
|
|
702
|
+
M = D, E = P, wo && (_ = !0);
|
|
703
703
|
continue;
|
|
704
704
|
}
|
|
705
705
|
if (_ = !1, je) {
|
|
706
706
|
Wi(Ke, se), Vi(Ke, Ke, C), v.push(_n(X, Ke)), w.push(Wt(X, Ke));
|
|
707
707
|
continue;
|
|
708
708
|
}
|
|
709
|
-
Lg(Ke, Oe, se, pn), Wi(Ke, Ke), Vi(Ke, Ke, C), Nl(gn, X, Ke),
|
|
709
|
+
Lg(Ke, Oe, se, pn), Wi(Ke, Ke), Vi(Ke, Ke, C), Nl(gn, X, Ke), D = [gn[0], gn[1]], (Z <= 1 || Bc(M, D) > y) && (v.push(D), M = D), Pc(yn, X, Ke), P = [yn[0], yn[1]], (Z <= 1 || Bc(E, P) > y) && (w.push(P), E = P), k = Y, x = se;
|
|
710
710
|
}
|
|
711
|
-
let $ = [n[0].point[0], n[0].point[1]],
|
|
711
|
+
let $ = [n[0].point[0], n[0].point[1]], W = n.length > 1 ? [n[n.length - 1].point[0], n[n.length - 1].point[1]] : Wt(n[0].point, [1, 1]), q = [], ne = [];
|
|
712
712
|
if (n.length === 1) {
|
|
713
713
|
if (!(m || g) || c) return Bg($, T || C);
|
|
714
714
|
} else {
|
|
715
715
|
m || g && n.length === 1 || (u ? q.push(...$g($, w[0], 13)) : q.push(...zg($, v[0], w[0])));
|
|
716
716
|
let Z = ff(Ng(n[n.length - 1].vector));
|
|
717
|
-
g || m && n.length === 1 ? ne.push(
|
|
717
|
+
g || m && n.length === 1 ? ne.push(W) : h ? ne.push(...Fg(W, Z, C, 29)) : ne.push(...Hg(W, Z, C));
|
|
718
718
|
}
|
|
719
719
|
return v.concat(ne, w.reverse(), q);
|
|
720
720
|
}
|
|
@@ -726,27 +726,27 @@ function Ug(n, e = {}) {
|
|
|
726
726
|
var h;
|
|
727
727
|
let { streamline: t = 0.5, size: o = 16, last: r = !1 } = e;
|
|
728
728
|
if (n.length === 0) return [];
|
|
729
|
-
let s = 0.15 + (1 - t) * 0.85, i = Array.isArray(n[0]) ? n : n.map(({ x: f, y: p, pressure: m =
|
|
729
|
+
let s = 0.15 + (1 - t) * 0.85, i = Array.isArray(n[0]) ? n : n.map(({ x: f, y: p, pressure: m = Dc }) => [f, p, m]);
|
|
730
730
|
if (i.length === 2) {
|
|
731
731
|
let f = i[1];
|
|
732
732
|
i = i.slice(0, -1);
|
|
733
733
|
for (let p = 1; p < 5; p++) i.push(zc(i[0], f, p / 4));
|
|
734
734
|
}
|
|
735
|
-
i.length === 1 && (i = [...i, [...Wt(i[0],
|
|
736
|
-
let l = [{ point: [i[0][0], i[0][1]], pressure: Vc(i[0][2]) ? i[0][2] : 0.25, vector: [...
|
|
735
|
+
i.length === 1 && (i = [...i, [...Wt(i[0], Rc), ...i[0].slice(2)]]);
|
|
736
|
+
let l = [{ point: [i[0][0], i[0][1]], pressure: Vc(i[0][2]) ? i[0][2] : 0.25, vector: [...Rc], distance: 0, runningLength: 0 }], a = !1, c = 0, u = l[0], d = i.length - 1;
|
|
737
737
|
for (let f = 1; f < i.length; f++) {
|
|
738
738
|
let p = r && f === d ? [i[f][0], i[f][1]] : zc(u.point, i[f], s);
|
|
739
|
-
if (
|
|
739
|
+
if (Rg(u.point, p)) continue;
|
|
740
740
|
let m = Pg(p, u.point);
|
|
741
741
|
if (c += m, f < d && !a) {
|
|
742
742
|
if (c < o) continue;
|
|
743
743
|
a = !0;
|
|
744
744
|
}
|
|
745
|
-
Nl(Hc, u.point, p), u = { point: p, pressure: Vc(i[f][2]) ? i[f][2] :
|
|
745
|
+
Nl(Hc, u.point, p), u = { point: p, pressure: Vc(i[f][2]) ? i[f][2] : Dc, vector: hf(Hc), distance: m, runningLength: c }, l.push(u);
|
|
746
746
|
}
|
|
747
747
|
return l[0].vector = ((h = l[1]) == null ? void 0 : h.vector) || [0, 0], l;
|
|
748
748
|
}
|
|
749
|
-
function
|
|
749
|
+
function Dl(n, e = {}) {
|
|
750
750
|
return Wg(Ug(n, e), e);
|
|
751
751
|
}
|
|
752
752
|
const jg = { class: "wov-eraser-stroke" }, Kg = { preserveAspectRatio: "none" }, qg = ["d"], Jg = "#88888833", Gg = /* @__PURE__ */ U({
|
|
@@ -767,7 +767,7 @@ const jg = { class: "wov-eraser-stroke" }, Kg = { preserveAspectRatio: "none" },
|
|
|
767
767
|
const C = (a + k) % Ic * 2;
|
|
768
768
|
f.push([c[C] - d, c[C + 1] - h]);
|
|
769
769
|
}
|
|
770
|
-
const m =
|
|
770
|
+
const m = Dl(f, {
|
|
771
771
|
size: u,
|
|
772
772
|
start: {
|
|
773
773
|
taper: 66,
|
|
@@ -894,10 +894,10 @@ const jg = { class: "wov-eraser-stroke" }, Kg = { preserveAspectRatio: "none" },
|
|
|
894
894
|
alt: ((k = B(l)) == null ? void 0 : k.alt) || "",
|
|
895
895
|
style: ge(y.value),
|
|
896
896
|
draggable: "false"
|
|
897
|
-
}, null, 12, Zg)) :
|
|
897
|
+
}, null, 12, Zg)) : V("", !0),
|
|
898
898
|
g.value ? (S(), A("div", e0, [
|
|
899
|
-
b("span", t0,
|
|
900
|
-
])) :
|
|
899
|
+
b("span", t0, De(g.value), 1)
|
|
900
|
+
])) : V("", !0)
|
|
901
901
|
]);
|
|
902
902
|
};
|
|
903
903
|
}
|
|
@@ -919,7 +919,7 @@ const jg = { class: "wov-eraser-stroke" }, Kg = { preserveAspectRatio: "none" },
|
|
|
919
919
|
connector: {}
|
|
920
920
|
},
|
|
921
921
|
setup(n) {
|
|
922
|
-
const e = n, t = Pe(e.entityId, Il), o = Pe(e.entityId, fe), r = Pe(e.entityId,
|
|
922
|
+
const e = n, t = Pe(e.entityId, Il), o = Pe(e.entityId, fe), r = Pe(e.entityId, Ro), s = Me(""), i = Me("");
|
|
923
923
|
function l(d, h) {
|
|
924
924
|
return (d + h) / 2;
|
|
925
925
|
}
|
|
@@ -953,13 +953,13 @@ const jg = { class: "wov-eraser-stroke" }, Kg = { preserveAspectRatio: "none" },
|
|
|
953
953
|
const v = d.points[y * 2], w = d.points[y * 2 + 1], k = (v - d.originalLeft) * f, C = (w - d.originalTop) * p;
|
|
954
954
|
d.hasPressure ? m.push([k, C, d.pressures[y]]) : m.push([k, C]);
|
|
955
955
|
}
|
|
956
|
-
const g =
|
|
956
|
+
const g = Dl(m, {
|
|
957
957
|
last: d.isComplete,
|
|
958
958
|
size: d.thickness,
|
|
959
959
|
simulatePressure: !d.hasPressure
|
|
960
960
|
});
|
|
961
961
|
if (s.value = a(g, d.pointCount, d.thickness), d.isComplete) {
|
|
962
|
-
const y = m.length === 1 ? d.thickness : 1, v =
|
|
962
|
+
const y = m.length === 1 ? d.thickness : 1, v = Dl(m, {
|
|
963
963
|
last: !0,
|
|
964
964
|
size: y,
|
|
965
965
|
simulatePressure: !d.hasPressure
|
|
@@ -991,7 +991,7 @@ const jg = { class: "wov-eraser-stroke" }, Kg = { preserveAspectRatio: "none" },
|
|
|
991
991
|
"stroke-linecap": "round",
|
|
992
992
|
"stroke-linejoin": "round"
|
|
993
993
|
}, null, 8, l0)
|
|
994
|
-
])) :
|
|
994
|
+
])) : V("", !0)
|
|
995
995
|
], 8, o0);
|
|
996
996
|
};
|
|
997
997
|
}
|
|
@@ -1174,7 +1174,7 @@ function gf(n, e, t, o) {
|
|
|
1174
1174
|
t -= a, o -= a;
|
|
1175
1175
|
}
|
|
1176
1176
|
}
|
|
1177
|
-
class
|
|
1177
|
+
class R {
|
|
1178
1178
|
/**
|
|
1179
1179
|
@internal
|
|
1180
1180
|
*/
|
|
@@ -1229,7 +1229,7 @@ class D {
|
|
|
1229
1229
|
let t = this.lastChild, o = e.firstChild, r = this.content.slice(), s = 0;
|
|
1230
1230
|
for (t.isText && t.sameMarkup(o) && (r[r.length - 1] = t.withText(t.text + o.text), s = 1); s < e.content.length; s++)
|
|
1231
1231
|
r.push(e.content[s]);
|
|
1232
|
-
return new
|
|
1232
|
+
return new R(r, this.size + e.size);
|
|
1233
1233
|
}
|
|
1234
1234
|
/**
|
|
1235
1235
|
Cut out the sub-fragment between the two given positions.
|
|
@@ -1243,13 +1243,13 @@ class D {
|
|
|
1243
1243
|
let l = this.content[s], a = i + l.nodeSize;
|
|
1244
1244
|
a > e && ((i < e || a > t) && (l.isText ? l = l.cut(Math.max(0, e - i), Math.min(l.text.length, t - i)) : l = l.cut(Math.max(0, e - i - 1), Math.min(l.content.size, t - i - 1))), o.push(l), r += l.nodeSize), i = a;
|
|
1245
1245
|
}
|
|
1246
|
-
return new
|
|
1246
|
+
return new R(o, r);
|
|
1247
1247
|
}
|
|
1248
1248
|
/**
|
|
1249
1249
|
@internal
|
|
1250
1250
|
*/
|
|
1251
1251
|
cutByIndex(e, t) {
|
|
1252
|
-
return e == t ?
|
|
1252
|
+
return e == t ? R.empty : e == 0 && t == this.content.length ? this : new R(this.content.slice(e, t));
|
|
1253
1253
|
}
|
|
1254
1254
|
/**
|
|
1255
1255
|
Create a new fragment in which the node at the given index is
|
|
@@ -1260,21 +1260,21 @@ class D {
|
|
|
1260
1260
|
if (o == t)
|
|
1261
1261
|
return this;
|
|
1262
1262
|
let r = this.content.slice(), s = this.size + t.nodeSize - o.nodeSize;
|
|
1263
|
-
return r[e] = t, new
|
|
1263
|
+
return r[e] = t, new R(r, s);
|
|
1264
1264
|
}
|
|
1265
1265
|
/**
|
|
1266
1266
|
Create a new fragment by prepending the given node to this
|
|
1267
1267
|
fragment.
|
|
1268
1268
|
*/
|
|
1269
1269
|
addToStart(e) {
|
|
1270
|
-
return new
|
|
1270
|
+
return new R([e].concat(this.content), this.size + e.nodeSize);
|
|
1271
1271
|
}
|
|
1272
1272
|
/**
|
|
1273
1273
|
Create a new fragment by appending the given node to this
|
|
1274
1274
|
fragment.
|
|
1275
1275
|
*/
|
|
1276
1276
|
addToEnd(e) {
|
|
1277
|
-
return new
|
|
1277
|
+
return new R(this.content.concat(e), this.size + e.nodeSize);
|
|
1278
1278
|
}
|
|
1279
1279
|
/**
|
|
1280
1280
|
Compare this fragment to another one.
|
|
@@ -1389,10 +1389,10 @@ class D {
|
|
|
1389
1389
|
*/
|
|
1390
1390
|
static fromJSON(e, t) {
|
|
1391
1391
|
if (!t)
|
|
1392
|
-
return
|
|
1392
|
+
return R.empty;
|
|
1393
1393
|
if (!Array.isArray(t))
|
|
1394
1394
|
throw new RangeError("Invalid input for Fragment.fromJSON");
|
|
1395
|
-
return new
|
|
1395
|
+
return new R(t.map(e.nodeFromJSON));
|
|
1396
1396
|
}
|
|
1397
1397
|
/**
|
|
1398
1398
|
Build a fragment from an array of nodes. Ensures that adjacent
|
|
@@ -1400,13 +1400,13 @@ class D {
|
|
|
1400
1400
|
*/
|
|
1401
1401
|
static fromArray(e) {
|
|
1402
1402
|
if (!e.length)
|
|
1403
|
-
return
|
|
1403
|
+
return R.empty;
|
|
1404
1404
|
let t, o = 0;
|
|
1405
1405
|
for (let r = 0; r < e.length; r++) {
|
|
1406
1406
|
let s = e[r];
|
|
1407
1407
|
o += s.nodeSize, r && s.isText && e[r - 1].sameMarkup(s) ? (t || (t = e.slice(0, r)), t[t.length - 1] = s.withText(t[t.length - 1].text + s.text)) : t && t.push(s);
|
|
1408
1408
|
}
|
|
1409
|
-
return new
|
|
1409
|
+
return new R(t || e, o);
|
|
1410
1410
|
}
|
|
1411
1411
|
/**
|
|
1412
1412
|
Create a fragment from something that can be interpreted as a
|
|
@@ -1416,17 +1416,17 @@ class D {
|
|
|
1416
1416
|
*/
|
|
1417
1417
|
static from(e) {
|
|
1418
1418
|
if (!e)
|
|
1419
|
-
return
|
|
1420
|
-
if (e instanceof
|
|
1419
|
+
return R.empty;
|
|
1420
|
+
if (e instanceof R)
|
|
1421
1421
|
return e;
|
|
1422
1422
|
if (Array.isArray(e))
|
|
1423
1423
|
return this.fromArray(e);
|
|
1424
1424
|
if (e.attrs)
|
|
1425
|
-
return new
|
|
1425
|
+
return new R([e], e.nodeSize);
|
|
1426
1426
|
throw new RangeError("Can not convert " + e + " to a Fragment" + (e.nodesBetween ? " (looks like multiple versions of prosemirror-model were loaded)" : ""));
|
|
1427
1427
|
}
|
|
1428
1428
|
}
|
|
1429
|
-
|
|
1429
|
+
R.empty = new R([], 0);
|
|
1430
1430
|
const Ui = { index: 0, offset: 0 };
|
|
1431
1431
|
function Kr(n, e) {
|
|
1432
1432
|
return Ui.index = n, Ui.offset = e, Ui;
|
|
@@ -1455,7 +1455,7 @@ function ms(n, e) {
|
|
|
1455
1455
|
}
|
|
1456
1456
|
return !0;
|
|
1457
1457
|
}
|
|
1458
|
-
let ye = class
|
|
1458
|
+
let ye = class Rl {
|
|
1459
1459
|
/**
|
|
1460
1460
|
@internal
|
|
1461
1461
|
*/
|
|
@@ -1553,8 +1553,8 @@ let ye = class Dl {
|
|
|
1553
1553
|
*/
|
|
1554
1554
|
static setFrom(e) {
|
|
1555
1555
|
if (!e || Array.isArray(e) && e.length == 0)
|
|
1556
|
-
return
|
|
1557
|
-
if (e instanceof
|
|
1556
|
+
return Rl.none;
|
|
1557
|
+
if (e instanceof Rl)
|
|
1558
1558
|
return [e];
|
|
1559
1559
|
let t = e.slice();
|
|
1560
1560
|
return t.sort((o, r) => o.type.rank - r.type.rank), t;
|
|
@@ -1628,7 +1628,7 @@ class j {
|
|
|
1628
1628
|
let o = t.openStart || 0, r = t.openEnd || 0;
|
|
1629
1629
|
if (typeof o != "number" || typeof r != "number")
|
|
1630
1630
|
throw new RangeError("Invalid input for Slice.fromJSON");
|
|
1631
|
-
return new j(
|
|
1631
|
+
return new j(R.fromJSON(e, t.content), o, r);
|
|
1632
1632
|
}
|
|
1633
1633
|
/**
|
|
1634
1634
|
Create a slice from a fragment by taking the maximum possible
|
|
@@ -1643,7 +1643,7 @@ class j {
|
|
|
1643
1643
|
return new j(e, o, r);
|
|
1644
1644
|
}
|
|
1645
1645
|
}
|
|
1646
|
-
j.empty = new j(
|
|
1646
|
+
j.empty = new j(R.empty, 0, 0);
|
|
1647
1647
|
function yf(n, e, t) {
|
|
1648
1648
|
let { index: o, offset: r } = n.findIndex(e), s = n.maybeChild(o), { index: i, offset: l } = n.findIndex(t);
|
|
1649
1649
|
if (r == e || s.isText) {
|
|
@@ -1708,7 +1708,7 @@ function Zn(n, e) {
|
|
|
1708
1708
|
}
|
|
1709
1709
|
function bf(n, e, t, o, r) {
|
|
1710
1710
|
let s = n.depth > r && _l(n, e, r + 1), i = o.depth > r && _l(t, o, r + 1), l = [];
|
|
1711
|
-
return cr(null, n, r, l), s && i && e.index(r) == t.index(r) ? (kf(s, i), Qn(Zn(s, bf(n, e, t, o, r + 1)), l)) : (s && Qn(Zn(s, ys(n, e, r + 1)), l), cr(e, t, r, l), i && Qn(Zn(i, ys(t, o, r + 1)), l)), cr(o, null, r, l), new
|
|
1711
|
+
return cr(null, n, r, l), s && i && e.index(r) == t.index(r) ? (kf(s, i), Qn(Zn(s, bf(n, e, t, o, r + 1)), l)) : (s && Qn(Zn(s, ys(n, e, r + 1)), l), cr(e, t, r, l), i && Qn(Zn(i, ys(t, o, r + 1)), l)), cr(o, null, r, l), new R(l);
|
|
1712
1712
|
}
|
|
1713
1713
|
function ys(n, e, t) {
|
|
1714
1714
|
let o = [];
|
|
@@ -1716,12 +1716,12 @@ function ys(n, e, t) {
|
|
|
1716
1716
|
let r = _l(n, e, t + 1);
|
|
1717
1717
|
Qn(Zn(r, ys(n, e, t + 1)), o);
|
|
1718
1718
|
}
|
|
1719
|
-
return cr(e, null, t, o), new
|
|
1719
|
+
return cr(e, null, t, o), new R(o);
|
|
1720
1720
|
}
|
|
1721
1721
|
function d0(n, e) {
|
|
1722
1722
|
let t = e.depth - n.openStart, r = e.node(t).copy(n.content);
|
|
1723
1723
|
for (let s = t - 1; s >= 0; s--)
|
|
1724
|
-
r = e.node(s).copy(
|
|
1724
|
+
r = e.node(s).copy(R.from(r));
|
|
1725
1725
|
return {
|
|
1726
1726
|
start: r.resolveNoCache(n.openStart + t),
|
|
1727
1727
|
end: r.resolveNoCache(r.content.size - n.openEnd - t)
|
|
@@ -2026,7 +2026,7 @@ let cn = class Pl {
|
|
|
2026
2026
|
@internal
|
|
2027
2027
|
*/
|
|
2028
2028
|
constructor(e, t, o, r = ye.none) {
|
|
2029
|
-
this.type = e, this.attrs = t, this.marks = r, this.content = o ||
|
|
2029
|
+
this.type = e, this.attrs = t, this.marks = r, this.content = o || R.empty;
|
|
2030
2030
|
}
|
|
2031
2031
|
/**
|
|
2032
2032
|
The array of this node's child nodes.
|
|
@@ -2315,7 +2315,7 @@ let cn = class Pl {
|
|
|
2315
2315
|
can optionally pass `start` and `end` indices into the
|
|
2316
2316
|
replacement fragment.
|
|
2317
2317
|
*/
|
|
2318
|
-
canReplace(e, t, o =
|
|
2318
|
+
canReplace(e, t, o = R.empty, r = 0, s = o.childCount) {
|
|
2319
2319
|
let i = this.contentMatchAt(e).matchFragment(o, r, s), l = i && i.matchFragment(this.content, t);
|
|
2320
2320
|
if (!l || !l.validEnd)
|
|
2321
2321
|
return !1;
|
|
@@ -2386,7 +2386,7 @@ let cn = class Pl {
|
|
|
2386
2386
|
throw new RangeError("Invalid text node in JSON");
|
|
2387
2387
|
return e.text(t.text, o);
|
|
2388
2388
|
}
|
|
2389
|
-
let r =
|
|
2389
|
+
let r = R.fromJSON(e, t.content), s = e.nodeType(t.type).create(t.attrs, r, o);
|
|
2390
2390
|
return s.type.checkAttrs(s.attrs), s;
|
|
2391
2391
|
}
|
|
2392
2392
|
};
|
|
@@ -2514,7 +2514,7 @@ class lo {
|
|
|
2514
2514
|
function s(i, l) {
|
|
2515
2515
|
let a = i.matchFragment(e, o);
|
|
2516
2516
|
if (a && (!t || a.validEnd))
|
|
2517
|
-
return
|
|
2517
|
+
return R.from(l.map((c) => c.createAndFill()));
|
|
2518
2518
|
for (let c = 0; c < i.next.length; c++) {
|
|
2519
2519
|
let { type: u, next: d } = i.next[c];
|
|
2520
2520
|
if (!(u.isText || u.hasRequiredAttrs()) && r.indexOf(d) == -1) {
|
|
@@ -2897,7 +2897,7 @@ let Kc = class If {
|
|
|
2897
2897
|
create(e = null, t, o) {
|
|
2898
2898
|
if (this.isText)
|
|
2899
2899
|
throw new Error("NodeType.create can't construct text nodes");
|
|
2900
|
-
return new cn(this, this.computeAttrs(e),
|
|
2900
|
+
return new cn(this, this.computeAttrs(e), R.from(t), ye.setFrom(o));
|
|
2901
2901
|
}
|
|
2902
2902
|
/**
|
|
2903
2903
|
Like [`create`](https://prosemirror.net/docs/ref/#model.NodeType.create), but check the given content
|
|
@@ -2905,7 +2905,7 @@ let Kc = class If {
|
|
|
2905
2905
|
if it doesn't match.
|
|
2906
2906
|
*/
|
|
2907
2907
|
createChecked(e = null, t, o) {
|
|
2908
|
-
return t =
|
|
2908
|
+
return t = R.from(t), this.checkContent(t), new cn(this, this.computeAttrs(e), t, ye.setFrom(o));
|
|
2909
2909
|
}
|
|
2910
2910
|
/**
|
|
2911
2911
|
Like [`create`](https://prosemirror.net/docs/ref/#model.NodeType.create), but see if it is
|
|
@@ -2916,13 +2916,13 @@ let Kc = class If {
|
|
|
2916
2916
|
`Fragment.empty` as content.
|
|
2917
2917
|
*/
|
|
2918
2918
|
createAndFill(e = null, t, o) {
|
|
2919
|
-
if (e = this.computeAttrs(e), t =
|
|
2919
|
+
if (e = this.computeAttrs(e), t = R.from(t), t.size) {
|
|
2920
2920
|
let i = this.contentMatch.fillBefore(t);
|
|
2921
2921
|
if (!i)
|
|
2922
2922
|
return null;
|
|
2923
2923
|
t = i.append(t);
|
|
2924
2924
|
}
|
|
2925
|
-
let r = this.contentMatch.matchFragment(t), s = r && r.fillBefore(
|
|
2925
|
+
let r = this.contentMatch.matchFragment(t), s = r && r.fillBefore(R.empty, !0);
|
|
2926
2926
|
return s ? new cn(this, e, t.append(s), ye.setFrom(o)) : null;
|
|
2927
2927
|
}
|
|
2928
2928
|
/**
|
|
@@ -3314,7 +3314,7 @@ const Nf = {
|
|
|
3314
3314
|
script: !0,
|
|
3315
3315
|
style: !0,
|
|
3316
3316
|
title: !0
|
|
3317
|
-
},
|
|
3317
|
+
}, Df = { ol: !0, ul: !0 }, Mr = 1, Ll = 2, ur = 4;
|
|
3318
3318
|
function Jc(n, e, t) {
|
|
3319
3319
|
return e != null ? (e ? Mr : 0) | (e === "full" ? Ll : 0) : n && n.whitespace == "pre" ? Mr | Ll : t & ~ur;
|
|
3320
3320
|
}
|
|
@@ -3326,7 +3326,7 @@ class qr {
|
|
|
3326
3326
|
if (!this.match) {
|
|
3327
3327
|
if (!this.type)
|
|
3328
3328
|
return [];
|
|
3329
|
-
let t = this.type.contentMatch.fillBefore(
|
|
3329
|
+
let t = this.type.contentMatch.fillBefore(R.from(e));
|
|
3330
3330
|
if (t)
|
|
3331
3331
|
this.match = this.type.contentMatch.matchFragment(t);
|
|
3332
3332
|
else {
|
|
@@ -3344,8 +3344,8 @@ class qr {
|
|
|
3344
3344
|
o.text.length == r[0].length ? this.content.pop() : this.content[this.content.length - 1] = s.withText(s.text.slice(0, s.text.length - r[0].length));
|
|
3345
3345
|
}
|
|
3346
3346
|
}
|
|
3347
|
-
let t =
|
|
3348
|
-
return !e && this.match && (t = t.append(this.match.fillBefore(
|
|
3347
|
+
let t = R.from(this.content);
|
|
3348
|
+
return !e && this.match && (t = t.append(this.match.fillBefore(R.empty, !0))), this.type ? this.type.create(this.attrs, t, this.marks) : t;
|
|
3349
3349
|
}
|
|
3350
3350
|
inlineContext(e) {
|
|
3351
3351
|
return this.type ? this.type.inlineContent : this.content.length ? this.content[0].isInline : e.parentNode && !Nf.hasOwnProperty(e.parentNode.nodeName.toLowerCase());
|
|
@@ -3394,7 +3394,7 @@ class Gc {
|
|
|
3394
3394
|
let r = this.localPreserveWS, s = this.top;
|
|
3395
3395
|
(e.tagName == "PRE" || /pre/.test(e.style && e.style.whiteSpace)) && (this.localPreserveWS = !0);
|
|
3396
3396
|
let i = e.nodeName.toLowerCase(), l;
|
|
3397
|
-
|
|
3397
|
+
Df.hasOwnProperty(i) && this.parser.normalizeLists && I0(e);
|
|
3398
3398
|
let a = this.options.ruleFromNode && this.options.ruleFromNode(e) || (l = this.parser.matchTag(e, this, o));
|
|
3399
3399
|
e: if (a ? a.ignore : A0.hasOwnProperty(i))
|
|
3400
3400
|
this.findInside(e), this.ignoreFallback(e, t);
|
|
@@ -3636,7 +3636,7 @@ class Gc {
|
|
|
3636
3636
|
function I0(n) {
|
|
3637
3637
|
for (let e = n.firstChild, t = null; e; e = e.nextSibling) {
|
|
3638
3638
|
let o = e.nodeType == 1 ? e.nodeName.toLowerCase() : null;
|
|
3639
|
-
o &&
|
|
3639
|
+
o && Df.hasOwnProperty(o) && t ? (t.appendChild(e), e = t) : o == "li" ? t = e : o && (t = null);
|
|
3640
3640
|
}
|
|
3641
3641
|
}
|
|
3642
3642
|
function O0(n, e) {
|
|
@@ -3784,9 +3784,9 @@ function ji(n) {
|
|
|
3784
3784
|
const Zc = /* @__PURE__ */ new WeakMap();
|
|
3785
3785
|
function N0(n) {
|
|
3786
3786
|
let e = Zc.get(n);
|
|
3787
|
-
return e === void 0 && Zc.set(n, e =
|
|
3787
|
+
return e === void 0 && Zc.set(n, e = D0(n)), e;
|
|
3788
3788
|
}
|
|
3789
|
-
function
|
|
3789
|
+
function D0(n) {
|
|
3790
3790
|
let e = null;
|
|
3791
3791
|
function t(o) {
|
|
3792
3792
|
if (o && typeof o == "object")
|
|
@@ -3842,15 +3842,15 @@ function ss(n, e, t, o) {
|
|
|
3842
3842
|
}
|
|
3843
3843
|
return { dom: a, contentDOM: l };
|
|
3844
3844
|
}
|
|
3845
|
-
const
|
|
3846
|
-
function
|
|
3845
|
+
const Rf = 65535, _f = Math.pow(2, 16);
|
|
3846
|
+
function R0(n, e) {
|
|
3847
3847
|
return n + e * _f;
|
|
3848
3848
|
}
|
|
3849
3849
|
function eu(n) {
|
|
3850
|
-
return n &
|
|
3850
|
+
return n & Rf;
|
|
3851
3851
|
}
|
|
3852
3852
|
function _0(n) {
|
|
3853
|
-
return (n - (n &
|
|
3853
|
+
return (n - (n & Rf)) / _f;
|
|
3854
3854
|
}
|
|
3855
3855
|
const Pf = 1, Lf = 2, is = 4, Bf = 8;
|
|
3856
3856
|
class Bl {
|
|
@@ -3929,7 +3929,7 @@ class ht {
|
|
|
3929
3929
|
let h = c ? e == a ? -1 : e == d ? 1 : t : t, f = a + r + (h < 0 ? 0 : u);
|
|
3930
3930
|
if (o)
|
|
3931
3931
|
return f;
|
|
3932
|
-
let p = e == (t < 0 ? a : d) ? null :
|
|
3932
|
+
let p = e == (t < 0 ? a : d) ? null : R0(l / 3, e - a), m = e == a ? Lf : e == d ? Pf : is;
|
|
3933
3933
|
return (t < 0 ? e != a : e != d) && (m |= Bf), new Bl(f, m, p);
|
|
3934
3934
|
}
|
|
3935
3935
|
r += u - c;
|
|
@@ -4175,7 +4175,7 @@ function Ca(n, e, t) {
|
|
|
4175
4175
|
let s = n.child(r);
|
|
4176
4176
|
s.content.size && (s = s.copy(Ca(s.content, e, s))), s.isInline && (s = e(s, t, r)), o.push(s);
|
|
4177
4177
|
}
|
|
4178
|
-
return
|
|
4178
|
+
return R.fromArray(o);
|
|
4179
4179
|
}
|
|
4180
4180
|
class On extends st {
|
|
4181
4181
|
/**
|
|
@@ -4267,7 +4267,7 @@ class Nn extends st {
|
|
|
4267
4267
|
if (!t)
|
|
4268
4268
|
return Ne.fail("No node at mark step's position");
|
|
4269
4269
|
let o = t.type.create(t.attrs, null, this.mark.addToSet(t.marks));
|
|
4270
|
-
return Ne.fromReplace(e, this.pos, this.pos + 1, new j(
|
|
4270
|
+
return Ne.fromReplace(e, this.pos, this.pos + 1, new j(R.from(o), 0, t.isLeaf ? 0 : 1));
|
|
4271
4271
|
}
|
|
4272
4272
|
invert(e) {
|
|
4273
4273
|
let t = e.nodeAt(this.pos);
|
|
@@ -4311,7 +4311,7 @@ class ao extends st {
|
|
|
4311
4311
|
if (!t)
|
|
4312
4312
|
return Ne.fail("No node at mark step's position");
|
|
4313
4313
|
let o = t.type.create(t.attrs, null, this.mark.removeFromSet(t.marks));
|
|
4314
|
-
return Ne.fromReplace(e, this.pos, this.pos + 1, new j(
|
|
4314
|
+
return Ne.fromReplace(e, this.pos, this.pos + 1, new j(R.from(o), 0, t.isLeaf ? 0 : 1));
|
|
4315
4315
|
}
|
|
4316
4316
|
invert(e) {
|
|
4317
4317
|
let t = e.nodeAt(this.pos);
|
|
@@ -4510,13 +4510,13 @@ function Ma(n, e, t, o = t.contentMatch, r = !0) {
|
|
|
4510
4510
|
if (r && c.isText && t.whitespace != "pre") {
|
|
4511
4511
|
let h, f = /\r?\n|\r/g, p;
|
|
4512
4512
|
for (; h = f.exec(c.text); )
|
|
4513
|
-
p || (p = new j(
|
|
4513
|
+
p || (p = new j(R.from(t.schema.text(" ", t.allowedMarks(c.marks))), 0, 0)), i.push(new $e(l + h.index, l + h.index + h[0].length, p));
|
|
4514
4514
|
}
|
|
4515
4515
|
}
|
|
4516
4516
|
l = u;
|
|
4517
4517
|
}
|
|
4518
4518
|
if (!o.validEnd) {
|
|
4519
|
-
let a = o.fillBefore(
|
|
4519
|
+
let a = o.fillBefore(R.empty, !0);
|
|
4520
4520
|
n.replace(l, l, new j(a, 0, 0));
|
|
4521
4521
|
}
|
|
4522
4522
|
for (let a = i.length - 1; a >= 0; a--)
|
|
@@ -4538,12 +4538,12 @@ function Ho(n) {
|
|
|
4538
4538
|
return null;
|
|
4539
4539
|
}
|
|
4540
4540
|
function $0(n, e, t) {
|
|
4541
|
-
let { $from: o, $to: r, depth: s } = e, i = o.before(s + 1), l = r.after(s + 1), a = i, c = l, u =
|
|
4541
|
+
let { $from: o, $to: r, depth: s } = e, i = o.before(s + 1), l = r.after(s + 1), a = i, c = l, u = R.empty, d = 0;
|
|
4542
4542
|
for (let p = s, m = !1; p > t; p--)
|
|
4543
|
-
m || o.index(p) > 0 ? (m = !0, u =
|
|
4544
|
-
let h =
|
|
4543
|
+
m || o.index(p) > 0 ? (m = !0, u = R.from(o.node(p).copy(u)), d++) : a--;
|
|
4544
|
+
let h = R.empty, f = 0;
|
|
4545
4545
|
for (let p = s, m = !1; p > t; p--)
|
|
4546
|
-
m || r.after(p + 1) < r.end(p) ? (m = !0, h =
|
|
4546
|
+
m || r.after(p + 1) < r.end(p) ? (m = !0, h = R.from(r.node(p).copy(h)), f++) : c++;
|
|
4547
4547
|
n.step(new Fe(a, c, i, l, new j(u.append(h), d, f), u.size - d, !0));
|
|
4548
4548
|
}
|
|
4549
4549
|
function $f(n, e, t = null, o = n) {
|
|
@@ -4570,14 +4570,14 @@ function F0(n, e) {
|
|
|
4570
4570
|
return !a || !a.validEnd ? null : i;
|
|
4571
4571
|
}
|
|
4572
4572
|
function H0(n, e, t) {
|
|
4573
|
-
let o =
|
|
4573
|
+
let o = R.empty;
|
|
4574
4574
|
for (let i = t.length - 1; i >= 0; i--) {
|
|
4575
4575
|
if (o.size) {
|
|
4576
4576
|
let l = t[i].type.contentMatch.matchFragment(o);
|
|
4577
4577
|
if (!l || !l.validEnd)
|
|
4578
4578
|
throw new RangeError("Wrapper type given to Transform.wrap does not form valid content of its parent wrapper");
|
|
4579
4579
|
}
|
|
4580
|
-
o =
|
|
4580
|
+
o = R.from(t[i].type.create(t[i].attrs, o));
|
|
4581
4581
|
}
|
|
4582
4582
|
let r = e.start, s = e.end;
|
|
4583
4583
|
n.step(new Fe(r, s, r, s, new j(o, 0, 0), t.length, !0));
|
|
@@ -4596,7 +4596,7 @@ function V0(n, e, t, o, r) {
|
|
|
4596
4596
|
}
|
|
4597
4597
|
c === !1 && Ff(n, i, l, s), Ma(n, n.mapping.slice(s).map(l, 1), o, void 0, c === null);
|
|
4598
4598
|
let u = n.mapping.slice(s), d = u.map(l, 1), h = u.map(l + i.nodeSize, 1);
|
|
4599
|
-
return n.step(new Fe(d, h, d + 1, h - 1, new j(
|
|
4599
|
+
return n.step(new Fe(d, h, d + 1, h - 1, new j(R.from(o.create(a, null, i.marks)), 0, 0), 1, !0)), c === !0 && zf(n, i, l, s), !1;
|
|
4600
4600
|
}
|
|
4601
4601
|
});
|
|
4602
4602
|
}
|
|
@@ -4634,7 +4634,7 @@ function U0(n, e, t, o, r) {
|
|
|
4634
4634
|
return n.replaceWith(e, e + s.nodeSize, i);
|
|
4635
4635
|
if (!t.validContent(s.content))
|
|
4636
4636
|
throw new RangeError("Invalid content for node type " + t.name);
|
|
4637
|
-
n.step(new Fe(e, e + s.nodeSize, e + 1, e + s.nodeSize - 1, new j(
|
|
4637
|
+
n.step(new Fe(e, e + s.nodeSize, e + 1, e + s.nodeSize - 1, new j(R.from(i), 0, 0), 1, !0));
|
|
4638
4638
|
}
|
|
4639
4639
|
function dn(n, e, t = 1, o) {
|
|
4640
4640
|
let r = n.resolve(e), s = r.depth - t, i = o && o[o.length - 1] || r.parent;
|
|
@@ -4654,11 +4654,11 @@ function dn(n, e, t = 1, o) {
|
|
|
4654
4654
|
return r.node(s).canReplaceWith(l, l, a ? a.type : r.node(s + 1).type);
|
|
4655
4655
|
}
|
|
4656
4656
|
function j0(n, e, t = 1, o) {
|
|
4657
|
-
let r = n.doc.resolve(e), s =
|
|
4657
|
+
let r = n.doc.resolve(e), s = R.empty, i = R.empty;
|
|
4658
4658
|
for (let l = r.depth, a = r.depth - t, c = t - 1; l > a; l--, c--) {
|
|
4659
|
-
s =
|
|
4659
|
+
s = R.from(r.node(l).copy(s));
|
|
4660
4660
|
let u = o && o[c];
|
|
4661
|
-
i =
|
|
4661
|
+
i = R.from(u ? u.type.create(u.attrs, i) : r.node(l).copy(i));
|
|
4662
4662
|
}
|
|
4663
4663
|
n.step(new $e(e, e, new j(s.append(i), t, t), !0));
|
|
4664
4664
|
}
|
|
@@ -4763,7 +4763,7 @@ function Wf(n, e, t) {
|
|
|
4763
4763
|
}
|
|
4764
4764
|
class G0 {
|
|
4765
4765
|
constructor(e, t, o) {
|
|
4766
|
-
this.$from = e, this.$to = t, this.unplaced = o, this.frontier = [], this.placed =
|
|
4766
|
+
this.$from = e, this.$to = t, this.unplaced = o, this.frontier = [], this.placed = R.empty;
|
|
4767
4767
|
for (let r = 0; r <= e.depth; r++) {
|
|
4768
4768
|
let s = e.node(r);
|
|
4769
4769
|
this.frontier.push({
|
|
@@ -4772,7 +4772,7 @@ class G0 {
|
|
|
4772
4772
|
});
|
|
4773
4773
|
}
|
|
4774
4774
|
for (let r = e.depth; r > 0; r--)
|
|
4775
|
-
this.placed =
|
|
4775
|
+
this.placed = R.from(e.node(r).copy(this.placed));
|
|
4776
4776
|
}
|
|
4777
4777
|
get depth() {
|
|
4778
4778
|
return this.frontier.length - 1;
|
|
@@ -4811,7 +4811,7 @@ class G0 {
|
|
|
4811
4811
|
let i = r.firstChild;
|
|
4812
4812
|
for (let l = this.depth; l >= 0; l--) {
|
|
4813
4813
|
let { type: a, match: c } = this.frontier[l], u, d = null;
|
|
4814
|
-
if (t == 1 && (i ? c.matchType(i.type) || (d = c.fillBefore(
|
|
4814
|
+
if (t == 1 && (i ? c.matchType(i.type) || (d = c.fillBefore(R.from(i), !1)) : s && a.compatibleContent(s.type)))
|
|
4815
4815
|
return { sliceDepth: o, frontierDepth: l, parent: s, inject: d };
|
|
4816
4816
|
if (t == 2 && i && (u = c.findWrapping(i.type)))
|
|
4817
4817
|
return { sliceDepth: o, frontierDepth: l, parent: s, wrap: u };
|
|
@@ -4855,7 +4855,7 @@ class G0 {
|
|
|
4855
4855
|
c++, (c > 1 || a == 0 || m.content.size) && (d = g, u.push(Uf(m.mark(h.allowedMarks(m.marks)), c == 1 ? a : 0, c == l.childCount ? f : -1)));
|
|
4856
4856
|
}
|
|
4857
4857
|
let p = c == l.childCount;
|
|
4858
|
-
p || (f = -1), this.placed = or(this.placed, t,
|
|
4858
|
+
p || (f = -1), this.placed = or(this.placed, t, R.from(u)), this.frontier[t].match = d, p && f < 0 && o && o.type == this.frontier[this.depth].type && this.frontier.length > 1 && this.closeFrontierNode();
|
|
4859
4859
|
for (let m = 0, g = l; m < f; m++) {
|
|
4860
4860
|
let y = g.lastChild;
|
|
4861
4861
|
this.frontier.push({ type: y.type, match: y.contentMatchAt(y.childCount) }), g = y.content;
|
|
@@ -4901,10 +4901,10 @@ class G0 {
|
|
|
4901
4901
|
}
|
|
4902
4902
|
openFrontierNode(e, t = null, o) {
|
|
4903
4903
|
let r = this.frontier[this.depth];
|
|
4904
|
-
r.match = r.match.matchType(e), this.placed = or(this.placed, this.depth,
|
|
4904
|
+
r.match = r.match.matchType(e), this.placed = or(this.placed, this.depth, R.from(e.create(t, o))), this.frontier.push({ type: e, match: e.contentMatch });
|
|
4905
4905
|
}
|
|
4906
4906
|
closeFrontierNode() {
|
|
4907
|
-
let t = this.frontier.pop().match.fillBefore(
|
|
4907
|
+
let t = this.frontier.pop().match.fillBefore(R.empty, !0);
|
|
4908
4908
|
t.childCount && (this.placed = or(this.placed, this.frontier.length, t));
|
|
4909
4909
|
}
|
|
4910
4910
|
}
|
|
@@ -4923,7 +4923,7 @@ function Uf(n, e, t) {
|
|
|
4923
4923
|
if (e <= 0)
|
|
4924
4924
|
return n;
|
|
4925
4925
|
let o = n.content;
|
|
4926
|
-
return e > 1 && (o = o.replaceChild(0, Uf(o.firstChild, e - 1, o.childCount == 1 ? t - 1 : 0))), e > 0 && (o = n.type.contentMatch.fillBefore(o).append(o), t <= 0 && (o = o.append(n.type.contentMatch.matchFragment(o).fillBefore(
|
|
4926
|
+
return e > 1 && (o = o.replaceChild(0, Uf(o.firstChild, e - 1, o.childCount == 1 ? t - 1 : 0))), e > 0 && (o = n.type.contentMatch.fillBefore(o).append(o), t <= 0 && (o = o.append(n.type.contentMatch.matchFragment(o).fillBefore(R.empty, !0)))), n.copy(o);
|
|
4927
4927
|
}
|
|
4928
4928
|
function Ji(n, e, t, o, r) {
|
|
4929
4929
|
let s = n.node(e), i = r ? n.indexAfter(e) : n.index(e);
|
|
@@ -4995,7 +4995,7 @@ function jf(n, e, t, o, r) {
|
|
|
4995
4995
|
}
|
|
4996
4996
|
if (e > o) {
|
|
4997
4997
|
let s = r.contentMatchAt(0), i = s.fillBefore(n).append(n);
|
|
4998
|
-
n = i.append(s.matchFragment(i).fillBefore(
|
|
4998
|
+
n = i.append(s.matchFragment(i).fillBefore(R.empty, !0));
|
|
4999
4999
|
}
|
|
5000
5000
|
return n;
|
|
5001
5001
|
}
|
|
@@ -5004,7 +5004,7 @@ function Z0(n, e, t, o) {
|
|
|
5004
5004
|
let r = J0(n.doc, e, o.type);
|
|
5005
5005
|
r != null && (e = t = r);
|
|
5006
5006
|
}
|
|
5007
|
-
n.replaceRange(e, t, new j(
|
|
5007
|
+
n.replaceRange(e, t, new j(R.from(o), 0, 0));
|
|
5008
5008
|
}
|
|
5009
5009
|
function e1(n, e, t) {
|
|
5010
5010
|
let o = n.doc.resolve(e), r = n.doc.resolve(t), s = Kf(o, r);
|
|
@@ -5046,7 +5046,7 @@ class Oo extends st {
|
|
|
5046
5046
|
o[s] = t.attrs[s];
|
|
5047
5047
|
o[this.attr] = this.value;
|
|
5048
5048
|
let r = t.type.create(o, null, t.marks);
|
|
5049
|
-
return Ne.fromReplace(e, this.pos, this.pos + 1, new j(
|
|
5049
|
+
return Ne.fromReplace(e, this.pos, this.pos + 1, new j(R.from(r), 0, t.isLeaf ? 0 : 1));
|
|
5050
5050
|
}
|
|
5051
5051
|
getMap() {
|
|
5052
5052
|
return ht.empty;
|
|
@@ -5184,7 +5184,7 @@ class qf {
|
|
|
5184
5184
|
fragment, node, or array of nodes.
|
|
5185
5185
|
*/
|
|
5186
5186
|
replaceWith(e, t, o) {
|
|
5187
|
-
return this.replace(e, t, new j(
|
|
5187
|
+
return this.replace(e, t, new j(R.from(o), 0, 0));
|
|
5188
5188
|
}
|
|
5189
5189
|
/**
|
|
5190
5190
|
Delete the content between the given positions.
|
|
@@ -5447,7 +5447,7 @@ class le {
|
|
|
5447
5447
|
found.
|
|
5448
5448
|
*/
|
|
5449
5449
|
static findFrom(e, t, o = !1) {
|
|
5450
|
-
let r = e.parent.inlineContent ? new
|
|
5450
|
+
let r = e.parent.inlineContent ? new re(e) : Co(e.node(0), e.parent, e.pos, e.index(), t, o);
|
|
5451
5451
|
if (r)
|
|
5452
5452
|
return r;
|
|
5453
5453
|
for (let s = e.depth - 1; s >= 0; s--) {
|
|
@@ -5514,7 +5514,7 @@ class le {
|
|
|
5514
5514
|
returns the bookmark for that.
|
|
5515
5515
|
*/
|
|
5516
5516
|
getBookmark() {
|
|
5517
|
-
return
|
|
5517
|
+
return re.between(this.$anchor, this.$head).getBookmark();
|
|
5518
5518
|
}
|
|
5519
5519
|
}
|
|
5520
5520
|
le.prototype.visible = !0;
|
|
@@ -5530,7 +5530,7 @@ let nu = !1;
|
|
|
5530
5530
|
function ou(n) {
|
|
5531
5531
|
!nu && !n.parent.inlineContent && (nu = !0, console.warn("TextSelection endpoint not pointing into a node with inline content (" + n.parent.type.name + ")"));
|
|
5532
5532
|
}
|
|
5533
|
-
class
|
|
5533
|
+
class re extends le {
|
|
5534
5534
|
/**
|
|
5535
5535
|
Construct a text selection between the given points.
|
|
5536
5536
|
*/
|
|
@@ -5549,7 +5549,7 @@ class oe extends le {
|
|
|
5549
5549
|
if (!o.parent.inlineContent)
|
|
5550
5550
|
return le.near(o);
|
|
5551
5551
|
let r = e.resolve(t.map(this.anchor));
|
|
5552
|
-
return new
|
|
5552
|
+
return new re(r.parent.inlineContent ? r : o, o);
|
|
5553
5553
|
}
|
|
5554
5554
|
replace(e, t = j.empty) {
|
|
5555
5555
|
if (super.replace(e, t), t == j.empty) {
|
|
@@ -5558,7 +5558,7 @@ class oe extends le {
|
|
|
5558
5558
|
}
|
|
5559
5559
|
}
|
|
5560
5560
|
eq(e) {
|
|
5561
|
-
return e instanceof
|
|
5561
|
+
return e instanceof re && e.anchor == this.anchor && e.head == this.head;
|
|
5562
5562
|
}
|
|
5563
5563
|
getBookmark() {
|
|
5564
5564
|
return new yi(this.anchor, this.head);
|
|
@@ -5572,7 +5572,7 @@ class oe extends le {
|
|
|
5572
5572
|
static fromJSON(e, t) {
|
|
5573
5573
|
if (typeof t.anchor != "number" || typeof t.head != "number")
|
|
5574
5574
|
throw new RangeError("Invalid input for TextSelection.fromJSON");
|
|
5575
|
-
return new
|
|
5575
|
+
return new re(e.resolve(t.anchor), e.resolve(t.head));
|
|
5576
5576
|
}
|
|
5577
5577
|
/**
|
|
5578
5578
|
Create a text selection from non-resolved positions.
|
|
@@ -5598,10 +5598,10 @@ class oe extends le {
|
|
|
5598
5598
|
else
|
|
5599
5599
|
return le.near(t, o);
|
|
5600
5600
|
}
|
|
5601
|
-
return e.parent.inlineContent || (r == 0 ? e = t : (e = (le.findFrom(e, -o, !0) || le.findFrom(e, o, !0)).$anchor, e.pos < t.pos != r < 0 && (e = t))), new
|
|
5601
|
+
return e.parent.inlineContent || (r == 0 ? e = t : (e = (le.findFrom(e, -o, !0) || le.findFrom(e, o, !0)).$anchor, e.pos < t.pos != r < 0 && (e = t))), new re(e, t);
|
|
5602
5602
|
}
|
|
5603
5603
|
}
|
|
5604
|
-
le.jsonID("text",
|
|
5604
|
+
le.jsonID("text", re);
|
|
5605
5605
|
class yi {
|
|
5606
5606
|
constructor(e, t) {
|
|
5607
5607
|
this.anchor = e, this.head = t;
|
|
@@ -5610,7 +5610,7 @@ class yi {
|
|
|
5610
5610
|
return new yi(e.map(this.anchor), e.map(this.head));
|
|
5611
5611
|
}
|
|
5612
5612
|
resolve(e) {
|
|
5613
|
-
return
|
|
5613
|
+
return re.between(e.resolve(this.anchor), e.resolve(this.head));
|
|
5614
5614
|
}
|
|
5615
5615
|
}
|
|
5616
5616
|
class ee extends le {
|
|
@@ -5627,7 +5627,7 @@ class ee extends le {
|
|
|
5627
5627
|
return o ? le.near(s) : new ee(s);
|
|
5628
5628
|
}
|
|
5629
5629
|
content() {
|
|
5630
|
-
return new j(
|
|
5630
|
+
return new j(R.from(this.node), 0, 0);
|
|
5631
5631
|
}
|
|
5632
5632
|
eq(e) {
|
|
5633
5633
|
return e instanceof ee && e.anchor == this.anchor;
|
|
@@ -5720,7 +5720,7 @@ const n1 = {
|
|
|
5720
5720
|
};
|
|
5721
5721
|
function Co(n, e, t, o, r, s = !1) {
|
|
5722
5722
|
if (e.inlineContent)
|
|
5723
|
-
return
|
|
5723
|
+
return re.create(n, t);
|
|
5724
5724
|
for (let i = o - (r > 0 ? 0 : 1); r > 0 ? i < e.childCount : i >= 0; i += r) {
|
|
5725
5725
|
let l = e.child(i);
|
|
5726
5726
|
if (l.isAtom) {
|
|
@@ -6229,7 +6229,7 @@ function Qf(n, e, t) {
|
|
|
6229
6229
|
return !1;
|
|
6230
6230
|
if (t) {
|
|
6231
6231
|
let u = n.tr.step(c);
|
|
6232
|
-
u.setSelection(
|
|
6232
|
+
u.setSelection(re.create(u.doc, s)), t(u.scrollIntoView());
|
|
6233
6233
|
}
|
|
6234
6234
|
return !0;
|
|
6235
6235
|
}
|
|
@@ -6371,7 +6371,7 @@ const u1 = (n, e) => {
|
|
|
6371
6371
|
return !1;
|
|
6372
6372
|
if (e) {
|
|
6373
6373
|
let i = (!o.parentOffset && r.index() < r.parent.childCount ? o : r).pos, l = n.tr.insert(i, s.createAndFill());
|
|
6374
|
-
l.setSelection(
|
|
6374
|
+
l.setSelection(re.create(l.doc, i + 1)), e(l.scrollIntoView());
|
|
6375
6375
|
}
|
|
6376
6376
|
return !0;
|
|
6377
6377
|
}, sh = (n, e) => {
|
|
@@ -6404,7 +6404,7 @@ function d1(n) {
|
|
|
6404
6404
|
s.unshift(null);
|
|
6405
6405
|
}
|
|
6406
6406
|
let u = e.tr;
|
|
6407
|
-
(e.selection instanceof
|
|
6407
|
+
(e.selection instanceof re || e.selection instanceof mt) && u.deleteSelection();
|
|
6408
6408
|
let d = u.mapping.map(o.pos), h = dn(u.doc, d, s.length, s);
|
|
6409
6409
|
if (h || (s[0] = l ? { type: l } : null, h = dn(u.doc, d, s.length, s)), !h)
|
|
6410
6410
|
return !1;
|
|
@@ -6430,10 +6430,10 @@ function ih(n, e, t, o) {
|
|
|
6430
6430
|
let c = !a && e.parent.canReplace(e.index(), e.index() + 1);
|
|
6431
6431
|
if (c && (i = (l = r.contentMatchAt(r.childCount)).findWrapping(s.type)) && l.matchType(i[0] || s.type).validEnd) {
|
|
6432
6432
|
if (t) {
|
|
6433
|
-
let f = e.pos + s.nodeSize, p =
|
|
6433
|
+
let f = e.pos + s.nodeSize, p = R.empty;
|
|
6434
6434
|
for (let y = i.length - 1; y >= 0; y--)
|
|
6435
|
-
p =
|
|
6436
|
-
p =
|
|
6435
|
+
p = R.from(i[y].create(null, p));
|
|
6436
|
+
p = R.from(r.copy(p));
|
|
6437
6437
|
let m = n.tr.step(new Fe(e.pos - 1, f, e.pos, f, new j(p, 1, 0), i.length, !0)), g = m.doc.resolve(f + 2 * i.length);
|
|
6438
6438
|
g.nodeAfter && g.nodeAfter.type == r.type && yo(m.doc, g.pos) && m.join(g.pos), t(m.scrollIntoView());
|
|
6439
6439
|
}
|
|
@@ -6451,9 +6451,9 @@ function ih(n, e, t, o) {
|
|
|
6451
6451
|
g++;
|
|
6452
6452
|
if (f.canReplace(f.childCount, f.childCount, m.content)) {
|
|
6453
6453
|
if (t) {
|
|
6454
|
-
let y =
|
|
6454
|
+
let y = R.empty;
|
|
6455
6455
|
for (let w = p.length - 1; w >= 0; w--)
|
|
6456
|
-
y =
|
|
6456
|
+
y = R.from(p[w].copy(y));
|
|
6457
6457
|
let v = n.tr.step(new Fe(e.pos - p.length, e.pos + s.nodeSize, e.pos + g, e.pos + s.nodeSize - g, new j(y, p.length, 0), 0, !0));
|
|
6458
6458
|
t(v.scrollIntoView());
|
|
6459
6459
|
}
|
|
@@ -6470,7 +6470,7 @@ function lh(n) {
|
|
|
6470
6470
|
return !1;
|
|
6471
6471
|
s--;
|
|
6472
6472
|
}
|
|
6473
|
-
return r.node(s).isTextblock ? (t && t(e.tr.setSelection(
|
|
6473
|
+
return r.node(s).isTextblock ? (t && t(e.tr.setSelection(re.create(e.doc, n < 0 ? r.start(s) : r.end(s)))), !0) : !1;
|
|
6474
6474
|
};
|
|
6475
6475
|
}
|
|
6476
6476
|
const m1 = lh(-1), g1 = lh(1);
|
|
@@ -6543,9 +6543,9 @@ function w1(n, e, t, o = null) {
|
|
|
6543
6543
|
return l ? (n && k1(n, e, l, r, t), !0) : !1;
|
|
6544
6544
|
}
|
|
6545
6545
|
function k1(n, e, t, o, r) {
|
|
6546
|
-
let s =
|
|
6546
|
+
let s = R.empty;
|
|
6547
6547
|
for (let u = t.length - 1; u >= 0; u--)
|
|
6548
|
-
s =
|
|
6548
|
+
s = R.from(t[u].type.create(t[u].attrs, s));
|
|
6549
6549
|
n.step(new Fe(e.start - (o ? 2 : 0), e.end, e.start, e.end, new j(s, 0, 0), t.length, !0));
|
|
6550
6550
|
let i = 0;
|
|
6551
6551
|
for (let u = 0; u < t.length; u++)
|
|
@@ -6563,7 +6563,7 @@ function b1(n) {
|
|
|
6563
6563
|
}
|
|
6564
6564
|
function x1(n, e, t, o) {
|
|
6565
6565
|
let r = n.tr, s = o.end, i = o.$to.end(o.depth);
|
|
6566
|
-
s < i && (r.step(new Fe(s - 1, i, s, i, new j(
|
|
6566
|
+
s < i && (r.step(new Fe(s - 1, i, s, i, new j(R.from(t.create(null, o.parent.copy())), 1, 0), 1, !0)), o = new vs(r.doc.resolve(o.$from.pos), r.doc.resolve(i), o.depth));
|
|
6567
6567
|
const l = Ho(o);
|
|
6568
6568
|
if (l == null)
|
|
6569
6569
|
return !1;
|
|
@@ -6579,10 +6579,10 @@ function S1(n, e, t) {
|
|
|
6579
6579
|
if (o.mapping.map(t.end) != t.start + s.nodeAfter.nodeSize)
|
|
6580
6580
|
return !1;
|
|
6581
6581
|
let l = t.startIndex == 0, a = t.endIndex == r.childCount, c = s.node(-1), u = s.index(-1);
|
|
6582
|
-
if (!c.canReplace(u + (l ? 0 : 1), u + 1, i.content.append(a ?
|
|
6582
|
+
if (!c.canReplace(u + (l ? 0 : 1), u + 1, i.content.append(a ? R.empty : R.from(r))))
|
|
6583
6583
|
return !1;
|
|
6584
6584
|
let d = s.pos, h = d + i.nodeSize;
|
|
6585
|
-
return o.step(new Fe(d - (l ? 1 : 0), h + (a ? 1 : 0), d + 1, h - 1, new j((l ?
|
|
6585
|
+
return o.step(new Fe(d - (l ? 1 : 0), h + (a ? 1 : 0), d + 1, h - 1, new j((l ? R.empty : R.from(r.copy(R.empty))).append(a ? R.empty : R.from(r.copy(R.empty))), l ? 0 : 1, a ? 0 : 1), l ? 0 : 1)), e(o.scrollIntoView()), !0;
|
|
6586
6586
|
}
|
|
6587
6587
|
function C1(n) {
|
|
6588
6588
|
return function(e, t) {
|
|
@@ -6596,7 +6596,7 @@ function C1(n) {
|
|
|
6596
6596
|
if (a.type != n)
|
|
6597
6597
|
return !1;
|
|
6598
6598
|
if (t) {
|
|
6599
|
-
let c = a.lastChild && a.lastChild.type == l.type, u =
|
|
6599
|
+
let c = a.lastChild && a.lastChild.type == l.type, u = R.from(c ? n.create() : null), d = new j(R.from(n.create(null, R.from(l.type.create(null, u)))), c ? 3 : 1, 0), h = s.start, f = s.end;
|
|
6600
6600
|
t(e.tr.step(new Fe(h - (c ? 3 : 1), f, h, f, d, 1, !0)).scrollIntoView());
|
|
6601
6601
|
}
|
|
6602
6602
|
return !0;
|
|
@@ -6717,8 +6717,8 @@ function N1(n, e, t) {
|
|
|
6717
6717
|
}
|
|
6718
6718
|
const Ut = typeof navigator < "u" ? navigator : null, uu = typeof document < "u" ? document : null, Vn = Ut && Ut.userAgent || "", Fl = /Edge\/(\d+)/.exec(Vn), ah = /MSIE \d/.exec(Vn), Hl = /Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(Vn), dt = !!(ah || Hl || Fl), Pn = ah ? document.documentMode : Hl ? +Hl[1] : Fl ? +Fl[1] : 0, St = !dt && /gecko\/(\d+)/i.test(Vn);
|
|
6719
6719
|
St && +(/Firefox\/(\d+)/.exec(Vn) || [0, 0])[1];
|
|
6720
|
-
const Vl = !dt && /Chrome\/(\d+)/.exec(Vn), Ze = !!Vl, ch = Vl ? +Vl[1] : 0, rt = !dt && !!Ut && /Apple Computer/.test(Ut.vendor), Bo = rt && (/Mobile\/\w+/.test(Vn) || !!Ut && Ut.maxTouchPoints > 2), kt = Bo || (Ut ? /Mac/.test(Ut.platform) : !1), uh = Ut ? /Win/.test(Ut.platform) : !1, ln = /Android \d/.test(Vn), Hr = !!uu && "webkitFontSmoothing" in uu.documentElement.style,
|
|
6721
|
-
function
|
|
6720
|
+
const Vl = !dt && /Chrome\/(\d+)/.exec(Vn), Ze = !!Vl, ch = Vl ? +Vl[1] : 0, rt = !dt && !!Ut && /Apple Computer/.test(Ut.vendor), Bo = rt && (/Mobile\/\w+/.test(Vn) || !!Ut && Ut.maxTouchPoints > 2), kt = Bo || (Ut ? /Mac/.test(Ut.platform) : !1), uh = Ut ? /Win/.test(Ut.platform) : !1, ln = /Android \d/.test(Vn), Hr = !!uu && "webkitFontSmoothing" in uu.documentElement.style, D1 = Hr ? +(/\bAppleWebKit\/(\d+)/.exec(navigator.userAgent) || [0, 0])[1] : 0;
|
|
6721
|
+
function R1(n) {
|
|
6722
6722
|
let e = n.defaultView && n.defaultView.visualViewport;
|
|
6723
6723
|
return e ? {
|
|
6724
6724
|
left: 0,
|
|
@@ -6751,7 +6751,7 @@ function du(n, e, t) {
|
|
|
6751
6751
|
i = Lo(i);
|
|
6752
6752
|
continue;
|
|
6753
6753
|
}
|
|
6754
|
-
let l = i, a = l == s.body, c = a ?
|
|
6754
|
+
let l = i, a = l == s.body, c = a ? R1(s) : _1(l), u = 0, d = 0;
|
|
6755
6755
|
if (e.top < c.top + Qt(o, "top") ? d = -(c.top - e.top + Qt(r, "top")) : e.bottom > c.bottom - Qt(o, "bottom") && (d = e.bottom - e.top > c.bottom - c.top ? e.top + Qt(r, "top") - c.top : e.bottom - c.bottom + Qt(r, "bottom")), e.left < c.left + Qt(o, "left") ? u = -(c.left - e.left + Qt(r, "left")) : e.right > c.right - Qt(o, "right") && (u = e.right - c.right + Qt(r, "right")), u || d)
|
|
6756
6756
|
if (a)
|
|
6757
6757
|
s.defaultView.scrollBy(u, d);
|
|
@@ -6843,14 +6843,14 @@ function $1(n, e) {
|
|
|
6843
6843
|
for (let s = 0; s < t; s++) {
|
|
6844
6844
|
o.setEnd(n, s + 1), o.setStart(n, s);
|
|
6845
6845
|
let i = wn(o, 1);
|
|
6846
|
-
if (i.top != i.bottom &&
|
|
6846
|
+
if (i.top != i.bottom && Da(e, i)) {
|
|
6847
6847
|
r = { node: n, offset: s + (e.left >= (i.left + i.right) / 2 ? 1 : 0) };
|
|
6848
6848
|
break;
|
|
6849
6849
|
}
|
|
6850
6850
|
}
|
|
6851
6851
|
return o.detach(), r || { node: n, offset: 0 };
|
|
6852
6852
|
}
|
|
6853
|
-
function
|
|
6853
|
+
function Da(n, e) {
|
|
6854
6854
|
return n.left >= e.left - 1 && n.left <= e.right + 1 && n.top >= e.top - 1 && n.top <= e.bottom + 1;
|
|
6855
6855
|
}
|
|
6856
6856
|
function z1(n, e) {
|
|
@@ -6887,7 +6887,7 @@ function ph(n, e, t) {
|
|
|
6887
6887
|
let l = i.getClientRects();
|
|
6888
6888
|
for (let a = 0; a < l.length; a++) {
|
|
6889
6889
|
let c = l[a];
|
|
6890
|
-
if (
|
|
6890
|
+
if (Da(e, c))
|
|
6891
6891
|
return ph(i, e, c);
|
|
6892
6892
|
}
|
|
6893
6893
|
}
|
|
@@ -6902,7 +6902,7 @@ function V1(n, e) {
|
|
|
6902
6902
|
let i = (n.root.elementFromPoint ? n.root : t).elementFromPoint(e.left, e.top), l;
|
|
6903
6903
|
if (!i || !n.dom.contains(i.nodeType != 1 ? i.parentNode : i)) {
|
|
6904
6904
|
let c = n.dom.getBoundingClientRect();
|
|
6905
|
-
if (!
|
|
6905
|
+
if (!Da(e, c) || (i = ph(n.dom, e, c), !i))
|
|
6906
6906
|
return null;
|
|
6907
6907
|
}
|
|
6908
6908
|
if (rt)
|
|
@@ -7540,7 +7540,7 @@ class Ln extends Vr {
|
|
|
7540
7540
|
break;
|
|
7541
7541
|
}
|
|
7542
7542
|
}
|
|
7543
|
-
e.contentElement || (e.getContent = () =>
|
|
7543
|
+
e.contentElement || (e.getContent = () => R.empty);
|
|
7544
7544
|
}
|
|
7545
7545
|
return e;
|
|
7546
7546
|
}
|
|
@@ -7569,7 +7569,7 @@ class Ln extends Vr {
|
|
|
7569
7569
|
}
|
|
7570
7570
|
localCompositionInfo(e, t) {
|
|
7571
7571
|
let { from: o, to: r } = e.state.selection;
|
|
7572
|
-
if (!(e.state.selection instanceof
|
|
7572
|
+
if (!(e.state.selection instanceof re) || o < t || r > t + this.node.content.size)
|
|
7573
7573
|
return null;
|
|
7574
7574
|
let s = e.input.compositionNode;
|
|
7575
7575
|
if (!s || !this.dom.contains(s.parentNode))
|
|
@@ -8074,7 +8074,7 @@ function Ul(n, e, t, o, r) {
|
|
|
8074
8074
|
}
|
|
8075
8075
|
return s;
|
|
8076
8076
|
}
|
|
8077
|
-
function
|
|
8077
|
+
function Ra(n, e = null) {
|
|
8078
8078
|
let t = n.domSelectionRange(), o = n.state.doc;
|
|
8079
8079
|
if (!t.focusNode)
|
|
8080
8080
|
return null;
|
|
@@ -8129,7 +8129,7 @@ function fn(n, e = !1) {
|
|
|
8129
8129
|
ry(n);
|
|
8130
8130
|
else {
|
|
8131
8131
|
let { anchor: o, head: r } = t, s, i;
|
|
8132
|
-
wu && !(t instanceof
|
|
8132
|
+
wu && !(t instanceof re) && (t.$from.parent.inlineContent || (s = ku(n, t.from)), !t.empty && !t.$from.parent.inlineContent && (i = ku(n, t.to))), n.docView.setSelection(o, r, n, e), wu && (s && bu(s), i && bu(i)), t.visible ? n.dom.classList.remove("ProseMirror-hideselection") : (n.dom.classList.add("ProseMirror-hideselection"), "onselectionchange" in document && oy(n));
|
|
8133
8133
|
}
|
|
8134
8134
|
n.domObserver.setCurSelection(), n.domObserver.connectSelection();
|
|
8135
8135
|
}
|
|
@@ -8180,7 +8180,7 @@ function xu(n) {
|
|
|
8180
8180
|
n.lastSelectedViewDesc && (n.lastSelectedViewDesc.parent && n.lastSelectedViewDesc.deselectNode(), n.lastSelectedViewDesc = void 0);
|
|
8181
8181
|
}
|
|
8182
8182
|
function _a(n, e, t, o) {
|
|
8183
|
-
return n.someProp("createSelectionBetween", (r) => r(n, e, t)) ||
|
|
8183
|
+
return n.someProp("createSelectionBetween", (r) => r(n, e, t)) || re.between(e, t, o);
|
|
8184
8184
|
}
|
|
8185
8185
|
function Su(n) {
|
|
8186
8186
|
return n.editable && !n.hasFocus() ? !1 : Ch(n);
|
|
@@ -8208,13 +8208,13 @@ function kn(n, e) {
|
|
|
8208
8208
|
}
|
|
8209
8209
|
function Cu(n, e, t) {
|
|
8210
8210
|
let o = n.state.selection;
|
|
8211
|
-
if (o instanceof
|
|
8211
|
+
if (o instanceof re)
|
|
8212
8212
|
if (t.indexOf("s") > -1) {
|
|
8213
8213
|
let { $head: r } = o, s = r.textOffset ? null : e < 0 ? r.nodeBefore : r.nodeAfter;
|
|
8214
8214
|
if (!s || s.isText || !s.isLeaf)
|
|
8215
8215
|
return !1;
|
|
8216
8216
|
let i = n.state.doc.resolve(r.pos + s.nodeSize * (e < 0 ? -1 : 1));
|
|
8217
|
-
return kn(n, new
|
|
8217
|
+
return kn(n, new re(o.$anchor, i));
|
|
8218
8218
|
} else if (o.empty) {
|
|
8219
8219
|
if (n.endOfTextblock(e > 0 ? "forward" : "backward")) {
|
|
8220
8220
|
let r = jl(n.state, e);
|
|
@@ -8224,12 +8224,12 @@ function Cu(n, e, t) {
|
|
|
8224
8224
|
if (!s || s.isText)
|
|
8225
8225
|
return !1;
|
|
8226
8226
|
let l = e < 0 ? r.pos - s.nodeSize : r.pos;
|
|
8227
|
-
return s.isAtom || (i = n.docView.descAt(l)) && !i.contentDOM ? ee.isSelectable(s) ? kn(n, new ee(e < 0 ? n.state.doc.resolve(r.pos - s.nodeSize) : r)) : Hr ? kn(n, new
|
|
8227
|
+
return s.isAtom || (i = n.docView.descAt(l)) && !i.contentDOM ? ee.isSelectable(s) ? kn(n, new ee(e < 0 ? n.state.doc.resolve(r.pos - s.nodeSize) : r)) : Hr ? kn(n, new re(n.state.doc.resolve(e < 0 ? l : l + s.nodeSize))) : !1 : !1;
|
|
8228
8228
|
}
|
|
8229
8229
|
} else return !1;
|
|
8230
8230
|
else {
|
|
8231
8231
|
if (o instanceof ee && o.node.isInline)
|
|
8232
|
-
return kn(n, new
|
|
8232
|
+
return kn(n, new re(e > 0 ? o.$to : o.$from));
|
|
8233
8233
|
{
|
|
8234
8234
|
let r = jl(n.state, e);
|
|
8235
8235
|
return r ? kn(n, r) : !1;
|
|
@@ -8379,7 +8379,7 @@ function Mu(n, e) {
|
|
|
8379
8379
|
}
|
|
8380
8380
|
function Tu(n, e, t) {
|
|
8381
8381
|
let o = n.state.selection;
|
|
8382
|
-
if (o instanceof
|
|
8382
|
+
if (o instanceof re && !o.empty || t.indexOf("s") > -1 || kt && t.indexOf("m") > -1)
|
|
8383
8383
|
return !1;
|
|
8384
8384
|
let { $from: r, $to: s } = o;
|
|
8385
8385
|
if (!r.parent.inlineContent || n.endOfTextblock(e < 0 ? "up" : "down")) {
|
|
@@ -8394,7 +8394,7 @@ function Tu(n, e, t) {
|
|
|
8394
8394
|
return !1;
|
|
8395
8395
|
}
|
|
8396
8396
|
function Eu(n, e) {
|
|
8397
|
-
if (!(n.state.selection instanceof
|
|
8397
|
+
if (!(n.state.selection instanceof re))
|
|
8398
8398
|
return !0;
|
|
8399
8399
|
let { $head: t, $anchor: o, empty: r } = n.state.selection;
|
|
8400
8400
|
if (!t.sameParent(o))
|
|
@@ -8488,7 +8488,7 @@ function Th(n, e, t, o, r) {
|
|
|
8488
8488
|
if (n.someProp("transformPastedText", (h) => {
|
|
8489
8489
|
e = h(e, s || o, n);
|
|
8490
8490
|
}), s)
|
|
8491
|
-
return l = new j(
|
|
8491
|
+
return l = new j(R.from(n.state.schema.text(e.replace(/\r\n?/g, `
|
|
8492
8492
|
`))), 0, 0), n.someProp("transformPasted", (h) => {
|
|
8493
8493
|
l = h(l, n, !0);
|
|
8494
8494
|
}), l;
|
|
@@ -8556,13 +8556,13 @@ function py(n, e) {
|
|
|
8556
8556
|
i.push(u), r = r.matchType(u.type), s = a;
|
|
8557
8557
|
}
|
|
8558
8558
|
}), i)
|
|
8559
|
-
return
|
|
8559
|
+
return R.from(i);
|
|
8560
8560
|
}
|
|
8561
8561
|
return n;
|
|
8562
8562
|
}
|
|
8563
8563
|
function Eh(n, e, t = 0) {
|
|
8564
8564
|
for (let o = e.length - 1; o >= t; o--)
|
|
8565
|
-
n = e[o].create(null,
|
|
8565
|
+
n = e[o].create(null, R.from(n));
|
|
8566
8566
|
return n;
|
|
8567
8567
|
}
|
|
8568
8568
|
function Ah(n, e, t, o, r) {
|
|
@@ -8571,18 +8571,18 @@ function Ah(n, e, t, o, r) {
|
|
|
8571
8571
|
if (s)
|
|
8572
8572
|
return o.copy(o.content.replaceChild(o.childCount - 1, s));
|
|
8573
8573
|
if (o.contentMatchAt(o.childCount).matchType(r == n.length - 1 ? t.type : n[r + 1]))
|
|
8574
|
-
return o.copy(o.content.append(
|
|
8574
|
+
return o.copy(o.content.append(R.from(Eh(t, n, r + 1))));
|
|
8575
8575
|
}
|
|
8576
8576
|
}
|
|
8577
8577
|
function Ih(n, e) {
|
|
8578
8578
|
if (e == 0)
|
|
8579
8579
|
return n;
|
|
8580
|
-
let t = n.content.replaceChild(n.childCount - 1, Ih(n.lastChild, e - 1)), o = n.contentMatchAt(n.childCount).fillBefore(
|
|
8580
|
+
let t = n.content.replaceChild(n.childCount - 1, Ih(n.lastChild, e - 1)), o = n.contentMatchAt(n.childCount).fillBefore(R.empty, !0);
|
|
8581
8581
|
return n.copy(t.append(o));
|
|
8582
8582
|
}
|
|
8583
8583
|
function ql(n, e, t, o, r, s) {
|
|
8584
8584
|
let i = e < 0 ? n.firstChild : n.lastChild, l = i.content;
|
|
8585
|
-
return n.childCount > 1 && (s = 0), r < o - 1 && (l = ql(l, e, t, o, r + 1, s)), r >= t && (l = e < 0 ? i.contentMatchAt(0).fillBefore(l, s <= r).append(l) : l.append(i.contentMatchAt(i.childCount).fillBefore(
|
|
8585
|
+
return n.childCount > 1 && (s = 0), r < o - 1 && (l = ql(l, e, t, o, r + 1, s)), r >= t && (l = e < 0 ? i.contentMatchAt(0).fillBefore(l, s <= r).append(l) : l.append(i.contentMatchAt(i.childCount).fillBefore(R.empty, !0))), n.replaceChild(e < 0 ? 0 : n.childCount - 1, i.copy(l));
|
|
8586
8586
|
}
|
|
8587
8587
|
function Iu(n, e, t) {
|
|
8588
8588
|
return e < n.openStart && (n = new j(ql(n.content, -1, e, n.openStart, 0, n.openEnd), e, n.openEnd)), t < n.openEnd && (n = new j(ql(n.content, 1, t, n.openEnd, 0, 0), n.openStart, t)), n;
|
|
@@ -8637,7 +8637,7 @@ function vy(n, e) {
|
|
|
8637
8637
|
let a = t.nodes[o[l]];
|
|
8638
8638
|
if (!a || a.hasRequiredAttrs())
|
|
8639
8639
|
break;
|
|
8640
|
-
r =
|
|
8640
|
+
r = R.from(a.create(o[l + 1], r)), s++, i++;
|
|
8641
8641
|
}
|
|
8642
8642
|
return new j(r, s, i);
|
|
8643
8643
|
}
|
|
@@ -8656,7 +8656,7 @@ function by(n) {
|
|
|
8656
8656
|
}
|
|
8657
8657
|
rt && n.dom.addEventListener("input", () => null), Jl(n);
|
|
8658
8658
|
}
|
|
8659
|
-
function
|
|
8659
|
+
function Dn(n, e) {
|
|
8660
8660
|
n.input.lastSelectionOrigin = e, n.input.lastSelectionTime = Date.now();
|
|
8661
8661
|
}
|
|
8662
8662
|
function xy(n) {
|
|
@@ -8692,27 +8692,27 @@ function Cy(n, e) {
|
|
|
8692
8692
|
}
|
|
8693
8693
|
at.keydown = (n, e) => {
|
|
8694
8694
|
let t = e;
|
|
8695
|
-
if (n.input.shiftKey = t.keyCode == 16 || t.shiftKey, !
|
|
8695
|
+
if (n.input.shiftKey = t.keyCode == 16 || t.shiftKey, !Rh(n, t) && (n.input.lastKeyCode = t.keyCode, n.input.lastKeyCodeTime = Date.now(), !(ln && Ze && t.keyCode == 13)))
|
|
8696
8696
|
if (t.keyCode != 229 && n.domObserver.forceFlush(), Bo && t.keyCode == 13 && !t.ctrlKey && !t.altKey && !t.metaKey) {
|
|
8697
8697
|
let o = Date.now();
|
|
8698
8698
|
n.input.lastIOSEnter = o, n.input.lastIOSEnterFallbackTimeout = setTimeout(() => {
|
|
8699
8699
|
n.input.lastIOSEnter == o && (n.someProp("handleKeyDown", (r) => r(n, Kn(13, "Enter"))), n.input.lastIOSEnter = 0);
|
|
8700
8700
|
}, 200);
|
|
8701
|
-
} else n.someProp("handleKeyDown", (o) => o(n, t)) || fy(n, t) ? t.preventDefault() :
|
|
8701
|
+
} else n.someProp("handleKeyDown", (o) => o(n, t)) || fy(n, t) ? t.preventDefault() : Dn(n, "key");
|
|
8702
8702
|
};
|
|
8703
8703
|
at.keyup = (n, e) => {
|
|
8704
8704
|
e.keyCode == 16 && (n.input.shiftKey = !1);
|
|
8705
8705
|
};
|
|
8706
8706
|
at.keypress = (n, e) => {
|
|
8707
8707
|
let t = e;
|
|
8708
|
-
if (
|
|
8708
|
+
if (Rh(n, t) || !t.charCode || t.ctrlKey && !t.altKey || kt && t.metaKey)
|
|
8709
8709
|
return;
|
|
8710
8710
|
if (n.someProp("handleKeyPress", (r) => r(n, t))) {
|
|
8711
8711
|
t.preventDefault();
|
|
8712
8712
|
return;
|
|
8713
8713
|
}
|
|
8714
8714
|
let o = n.state.selection;
|
|
8715
|
-
if (!(o instanceof
|
|
8715
|
+
if (!(o instanceof re) || !o.$from.sameParent(o.$to)) {
|
|
8716
8716
|
let r = String.fromCharCode(t.charCode), s = () => n.state.tr.insertText(r).scrollIntoView();
|
|
8717
8717
|
!/[\r\n]/.test(r) && !n.someProp("handleTextInput", (i) => i(n, o.$from.pos, o.$to.pos, r, s)) && n.dispatch(s()), t.preventDefault();
|
|
8718
8718
|
}
|
|
@@ -8774,12 +8774,12 @@ function Ny(n, e, t) {
|
|
|
8774
8774
|
return !1;
|
|
8775
8775
|
let o = n.state.doc;
|
|
8776
8776
|
if (e == -1)
|
|
8777
|
-
return o.inlineContent ? (No(n,
|
|
8777
|
+
return o.inlineContent ? (No(n, re.create(o, 0, o.content.size)), !0) : !1;
|
|
8778
8778
|
let r = o.resolve(e);
|
|
8779
8779
|
for (let s = r.depth + 1; s > 0; s--) {
|
|
8780
8780
|
let i = s > r.depth ? r.nodeAfter : r.node(s), l = r.before(s);
|
|
8781
8781
|
if (i.inlineContent)
|
|
8782
|
-
No(n,
|
|
8782
|
+
No(n, re.create(o, l + 1, l + 1 + i.content.size));
|
|
8783
8783
|
else if (ee.isSelectable(i))
|
|
8784
8784
|
No(n, ee.create(o, l));
|
|
8785
8785
|
else
|
|
@@ -8790,18 +8790,18 @@ function Ny(n, e, t) {
|
|
|
8790
8790
|
function $a(n) {
|
|
8791
8791
|
return xs(n);
|
|
8792
8792
|
}
|
|
8793
|
-
const
|
|
8793
|
+
const Dh = kt ? "metaKey" : "ctrlKey";
|
|
8794
8794
|
lt.mousedown = (n, e) => {
|
|
8795
8795
|
let t = e;
|
|
8796
8796
|
n.input.shiftKey = t.shiftKey;
|
|
8797
8797
|
let o = $a(n), r = Date.now(), s = "singleClick";
|
|
8798
|
-
r - n.input.lastClick.time < 500 && My(t, n.input.lastClick) && !t[
|
|
8798
|
+
r - n.input.lastClick.time < 500 && My(t, n.input.lastClick) && !t[Dh] && n.input.lastClick.button == t.button && (n.input.lastClick.type == "singleClick" ? s = "doubleClick" : n.input.lastClick.type == "doubleClick" && (s = "tripleClick")), n.input.lastClick = { time: r, x: t.clientX, y: t.clientY, type: s, button: t.button };
|
|
8799
8799
|
let i = n.posAtCoords(ki(t));
|
|
8800
|
-
i && (s == "singleClick" ? (n.input.mouseDown && n.input.mouseDown.done(), n.input.mouseDown = new
|
|
8800
|
+
i && (s == "singleClick" ? (n.input.mouseDown && n.input.mouseDown.done(), n.input.mouseDown = new Dy(n, i, t, !!o)) : (s == "doubleClick" ? Iy : Oy)(n, i.pos, i.inside, t) ? t.preventDefault() : Dn(n, "pointer"));
|
|
8801
8801
|
};
|
|
8802
|
-
class
|
|
8802
|
+
class Dy {
|
|
8803
8803
|
constructor(e, t, o, r) {
|
|
8804
|
-
this.view = e, this.pos = t, this.event = o, this.flushed = r, this.delayedSelectionSync = !1, this.mightDrag = null, this.startDoc = e.state.doc, this.selectNode = !!o[
|
|
8804
|
+
this.view = e, this.pos = t, this.event = o, this.flushed = r, this.delayedSelectionSync = !1, this.mightDrag = null, this.startDoc = e.state.doc, this.selectNode = !!o[Dh], this.allowDefault = o.shiftKey;
|
|
8805
8805
|
let s, i;
|
|
8806
8806
|
if (t.inside > -1)
|
|
8807
8807
|
s = e.state.doc.nodeAt(t.inside), i = t.inside;
|
|
@@ -8819,7 +8819,7 @@ class Ry {
|
|
|
8819
8819
|
setUneditable: !!(this.target && St && !this.target.hasAttribute("contentEditable"))
|
|
8820
8820
|
}), 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(() => {
|
|
8821
8821
|
this.view.input.mouseDown == this && this.target.setAttribute("contentEditable", "false");
|
|
8822
|
-
}, 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)),
|
|
8822
|
+
}, 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)), Dn(e, "pointer");
|
|
8823
8823
|
}
|
|
8824
8824
|
done() {
|
|
8825
8825
|
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(() => fn(this.view)), this.view.input.mouseDown = null;
|
|
@@ -8828,7 +8828,7 @@ class Ry {
|
|
|
8828
8828
|
if (this.done(), !this.view.dom.contains(e.target))
|
|
8829
8829
|
return;
|
|
8830
8830
|
let t = this.pos;
|
|
8831
|
-
this.view.state.doc != this.startDoc && (t = this.view.posAtCoords(ki(e))), this.updateAllowDefault(e), this.allowDefault || !t ?
|
|
8831
|
+
this.view.state.doc != this.startDoc && (t = this.view.posAtCoords(ki(e))), this.updateAllowDefault(e), this.allowDefault || !t ? Dn(this.view, "pointer") : Ay(this.view, t.pos, t.inside, e, this.selectNode) ? e.preventDefault() : e.button == 0 && (this.flushed || // Safari ignores clicks on draggable elements
|
|
8832
8832
|
rt && this.mightDrag && !this.mightDrag.node.isAtom || // Chrome will sometimes treat a node selection as a
|
|
8833
8833
|
// cursor, but still report that the node is selected
|
|
8834
8834
|
// when asked through getSelection. You'll then get a
|
|
@@ -8836,31 +8836,31 @@ class Ry {
|
|
|
8836
8836
|
// (hidden) cursor is doesn't change the selection, and
|
|
8837
8837
|
// thus doesn't get a reaction from ProseMirror. This
|
|
8838
8838
|
// works around that.
|
|
8839
|
-
Ze && !this.view.state.selection.visible && Math.min(Math.abs(t.pos - this.view.state.selection.from), Math.abs(t.pos - this.view.state.selection.to)) <= 2) ? (No(this.view, le.near(this.view.state.doc.resolve(t.pos))), e.preventDefault()) :
|
|
8839
|
+
Ze && !this.view.state.selection.visible && Math.min(Math.abs(t.pos - this.view.state.selection.from), Math.abs(t.pos - this.view.state.selection.to)) <= 2) ? (No(this.view, le.near(this.view.state.doc.resolve(t.pos))), e.preventDefault()) : Dn(this.view, "pointer");
|
|
8840
8840
|
}
|
|
8841
8841
|
move(e) {
|
|
8842
|
-
this.updateAllowDefault(e),
|
|
8842
|
+
this.updateAllowDefault(e), Dn(this.view, "pointer"), e.buttons == 0 && this.done();
|
|
8843
8843
|
}
|
|
8844
8844
|
updateAllowDefault(e) {
|
|
8845
8845
|
!this.allowDefault && (Math.abs(this.event.x - e.clientX) > 4 || Math.abs(this.event.y - e.clientY) > 4) && (this.allowDefault = !0);
|
|
8846
8846
|
}
|
|
8847
8847
|
}
|
|
8848
8848
|
lt.touchstart = (n) => {
|
|
8849
|
-
n.input.lastTouch = Date.now(), $a(n),
|
|
8849
|
+
n.input.lastTouch = Date.now(), $a(n), Dn(n, "pointer");
|
|
8850
8850
|
};
|
|
8851
8851
|
lt.touchmove = (n) => {
|
|
8852
|
-
n.input.lastTouch = Date.now(),
|
|
8852
|
+
n.input.lastTouch = Date.now(), Dn(n, "pointer");
|
|
8853
8853
|
};
|
|
8854
8854
|
lt.contextmenu = (n) => $a(n);
|
|
8855
|
-
function
|
|
8855
|
+
function Rh(n, e) {
|
|
8856
8856
|
return n.composing ? !0 : rt && Math.abs(e.timeStamp - n.input.compositionEndedAt) < 500 ? (n.input.compositionEndedAt = -2e8, !0) : !1;
|
|
8857
8857
|
}
|
|
8858
|
-
const
|
|
8858
|
+
const Ry = ln ? 5e3 : -1;
|
|
8859
8859
|
at.compositionstart = at.compositionupdate = (n) => {
|
|
8860
8860
|
if (!n.composing) {
|
|
8861
8861
|
n.domObserver.flush();
|
|
8862
8862
|
let { state: e } = n, t = e.selection.$to;
|
|
8863
|
-
if (e.selection instanceof
|
|
8863
|
+
if (e.selection instanceof re && (e.storedMarks || !t.textOffset && t.parentOffset && t.nodeBefore.marks.some((o) => o.type.spec.inclusive === !1) || Ze && uh && _y(n)))
|
|
8864
8864
|
n.markCursor = n.state.storedMarks || t.marks(), xs(n, !0), n.markCursor = null;
|
|
8865
8865
|
else if (xs(n, !e.selection.empty), St && e.selection.empty && t.parentOffset && !t.textOffset && t.nodeBefore.marks.length) {
|
|
8866
8866
|
let o = n.domSelectionRange();
|
|
@@ -8878,7 +8878,7 @@ at.compositionstart = at.compositionupdate = (n) => {
|
|
|
8878
8878
|
}
|
|
8879
8879
|
n.input.composing = !0;
|
|
8880
8880
|
}
|
|
8881
|
-
_h(n,
|
|
8881
|
+
_h(n, Ry);
|
|
8882
8882
|
};
|
|
8883
8883
|
function _y(n) {
|
|
8884
8884
|
let { focusNode: e, focusOffset: t } = n.domSelectionRange();
|
|
@@ -8923,7 +8923,7 @@ function Ly() {
|
|
|
8923
8923
|
function xs(n, e = !1) {
|
|
8924
8924
|
if (!(ln && n.domObserver.flushingSoon >= 0)) {
|
|
8925
8925
|
if (n.domObserver.forceFlush(), Ph(n), e || n.docView && n.docView.dirty) {
|
|
8926
|
-
let t =
|
|
8926
|
+
let t = Ra(n), o = n.state.selection;
|
|
8927
8927
|
return t && !t.eq(o) ? n.dispatch(n.state.tr.setSelection(t)) : (n.markCursor || e) && !o.$from.node(o.$from.sharedDepth(o.to)).inlineContent ? n.dispatch(n.state.tr.deleteSelection()) : n.updateState(n.state), !0;
|
|
8928
8928
|
}
|
|
8929
8929
|
return !1;
|
|
@@ -8939,7 +8939,7 @@ function By(n, e) {
|
|
|
8939
8939
|
t.parentNode && t.parentNode.removeChild(t), n.focus();
|
|
8940
8940
|
}, 50);
|
|
8941
8941
|
}
|
|
8942
|
-
const Ar = dt && Pn < 15 || Bo &&
|
|
8942
|
+
const Ar = dt && Pn < 15 || Bo && D1 < 604;
|
|
8943
8943
|
lt.copy = at.cut = (n, e) => {
|
|
8944
8944
|
let t = e, o = n.state.selection, r = t.type == "cut";
|
|
8945
8945
|
if (o.empty)
|
|
@@ -9726,7 +9726,7 @@ class qy {
|
|
|
9726
9726
|
}
|
|
9727
9727
|
}
|
|
9728
9728
|
let c = null;
|
|
9729
|
-
s < 0 && r && e.input.lastFocus > Date.now() - 200 && Math.max(e.input.lastTouch, e.input.lastClick.time) < Date.now() - 300 && vi(o) && (c =
|
|
9729
|
+
s < 0 && r && e.input.lastFocus > Date.now() - 200 && Math.max(e.input.lastTouch, e.input.lastClick.time) < Date.now() - 300 && vi(o) && (c = Ra(e)) && c.eq(le.near(e.state.doc.resolve(0), 1)) ? (e.input.lastFocus = 0, fn(e), this.currentSelection.set(o), e.scrollToSelection()) : (s > -1 || r) && (s > -1 && (e.docView.markDirty(s, i), Jy(e)), e.input.badSafariComposition && (e.input.badSafariComposition = !1, Xy(e, a)), this.handleDOMChange(s, i, l, a), e.docView && e.docView.dirty ? e.updateState(e.state) : this.currentSelection.eq(o) || fn(e), this.currentSelection.set(o));
|
|
9730
9730
|
}
|
|
9731
9731
|
registerMutation(e, t) {
|
|
9732
9732
|
if (t.indexOf(e.target) > -1)
|
|
@@ -9761,12 +9761,12 @@ class qy {
|
|
|
9761
9761
|
});
|
|
9762
9762
|
}
|
|
9763
9763
|
}
|
|
9764
|
-
let
|
|
9764
|
+
let Du = /* @__PURE__ */ new WeakMap(), Ru = !1;
|
|
9765
9765
|
function Jy(n) {
|
|
9766
|
-
if (!
|
|
9767
|
-
if (n.requiresGeckoHackNode = St,
|
|
9766
|
+
if (!Du.has(n) && (Du.set(n, null), ["normal", "nowrap", "pre-line"].indexOf(getComputedStyle(n.dom).whiteSpace) !== -1)) {
|
|
9767
|
+
if (n.requiresGeckoHackNode = St, Ru)
|
|
9768
9768
|
return;
|
|
9769
|
-
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."),
|
|
9769
|
+
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."), Ru = !0;
|
|
9770
9770
|
}
|
|
9771
9771
|
}
|
|
9772
9772
|
function _u(n, e) {
|
|
@@ -9861,9 +9861,9 @@ const ev = /^(a|abbr|acronym|b|bd[io]|big|br|button|cite|code|data(list)?|del|df
|
|
|
9861
9861
|
function tv(n, e, t, o, r) {
|
|
9862
9862
|
let s = n.input.compositionPendingChanges || (n.composing ? n.input.compositionID : 0);
|
|
9863
9863
|
if (n.input.compositionPendingChanges = 0, e < 0) {
|
|
9864
|
-
let x = n.input.lastSelectionTime > Date.now() - 50 ? n.input.lastSelectionOrigin : null, M =
|
|
9864
|
+
let x = n.input.lastSelectionTime > Date.now() - 50 ? n.input.lastSelectionOrigin : null, M = Ra(n, x);
|
|
9865
9865
|
if (M && !n.state.selection.eq(M)) {
|
|
9866
|
-
if (Ze && ln && n.input.lastKeyCode === 13 && Date.now() - 100 < n.input.lastKeyCodeTime && n.someProp("handleKeyDown", (
|
|
9866
|
+
if (Ze && ln && n.input.lastKeyCode === 13 && Date.now() - 100 < n.input.lastKeyCodeTime && n.someProp("handleKeyDown", (D) => D(n, Kn(13, "Enter"))))
|
|
9867
9867
|
return;
|
|
9868
9868
|
let E = n.state.tr.setSelection(M);
|
|
9869
9869
|
x == "pointer" ? E.setMeta("pointer", !0) : x == "key" && E.scrollIntoView(), s && E.setMeta("composition", s), n.dispatch(E);
|
|
@@ -9880,7 +9880,7 @@ function tv(n, e, t, o, r) {
|
|
|
9880
9880
|
return;
|
|
9881
9881
|
}
|
|
9882
9882
|
if (!p)
|
|
9883
|
-
if (o && a instanceof
|
|
9883
|
+
if (o && a instanceof re && !a.empty && a.$head.sameParent(a.$anchor) && !n.composing && !(c.sel && c.sel.anchor != c.sel.head))
|
|
9884
9884
|
p = { start: a.from, endA: a.to, endB: a.to };
|
|
9885
9885
|
else {
|
|
9886
9886
|
if (c.sel) {
|
|
@@ -9892,7 +9892,7 @@ function tv(n, e, t, o, r) {
|
|
|
9892
9892
|
}
|
|
9893
9893
|
return;
|
|
9894
9894
|
}
|
|
9895
|
-
n.state.selection.from < n.state.selection.to && p.start == p.endB && n.state.selection instanceof
|
|
9895
|
+
n.state.selection.from < n.state.selection.to && p.start == p.endB && n.state.selection instanceof re && (p.start > n.state.selection.from && p.start <= n.state.selection.from + 2 && n.state.selection.from >= c.from ? p.start = n.state.selection.from : p.endA < n.state.selection.to && p.endA >= n.state.selection.to - 2 && n.state.selection.to <= c.to && (p.endB += n.state.selection.to - p.endA, p.endA = n.state.selection.to)), dt && Pn <= 11 && p.endB == p.start + 1 && p.endA == p.start && p.start > c.from && c.doc.textBetween(p.start - c.from - 1, p.start - c.from + 1) == " " && (p.start--, p.endA--, p.endB--);
|
|
9896
9896
|
let m = c.doc.resolveNoCache(p.start - c.from), g = c.doc.resolveNoCache(p.endB - c.from), y = u.resolve(p.start), v = m.sameParent(g) && m.parent.inlineContent && y.end() >= p.endA;
|
|
9897
9897
|
if ((Bo && n.input.lastIOSEnter > Date.now() - 225 && (!v || r.some((x) => x.nodeName == "DIV" || x.nodeName == "P")) || !v && m.pos < c.doc.content.size && (!m.sameParent(g) || !m.parent.inlineContent) && m.pos < g.pos && !/\S/.test(c.doc.textBetween(m.pos, g.pos, "", ""))) && n.someProp("handleKeyDown", (x) => x(n, Kn(13, "Enter")))) {
|
|
9898
9898
|
n.input.lastIOSEnter = 0;
|
|
@@ -9952,7 +9952,7 @@ function nv(n, e) {
|
|
|
9952
9952
|
let c = [];
|
|
9953
9953
|
for (let u = 0; u < e.childCount; u++)
|
|
9954
9954
|
c.push(a(e.child(u)));
|
|
9955
|
-
if (
|
|
9955
|
+
if (R.from(c).eq(n))
|
|
9956
9956
|
return { mark: l, type: i };
|
|
9957
9957
|
}
|
|
9958
9958
|
function ov(n, e, t, o, r) {
|
|
@@ -10645,8 +10645,8 @@ Ha(Uh, {
|
|
|
10645
10645
|
extendMarkRange: () => Av,
|
|
10646
10646
|
first: () => Iv,
|
|
10647
10647
|
focus: () => Nv,
|
|
10648
|
-
forEach: () =>
|
|
10649
|
-
insertContent: () =>
|
|
10648
|
+
forEach: () => Dv,
|
|
10649
|
+
insertContent: () => Rv,
|
|
10650
10650
|
insertContentAt: () => Lv,
|
|
10651
10651
|
joinBackward: () => zv,
|
|
10652
10652
|
joinDown: () => $v,
|
|
@@ -10680,8 +10680,8 @@ Ha(Uh, {
|
|
|
10680
10680
|
splitBlock: () => Iw,
|
|
10681
10681
|
splitListItem: () => Ow,
|
|
10682
10682
|
toggleList: () => Nw,
|
|
10683
|
-
toggleMark: () =>
|
|
10684
|
-
toggleNode: () =>
|
|
10683
|
+
toggleMark: () => Dw,
|
|
10684
|
+
toggleNode: () => Rw,
|
|
10685
10685
|
toggleWrap: () => _w,
|
|
10686
10686
|
undoInputRule: () => Pw,
|
|
10687
10687
|
unsetAllMarks: () => Lw,
|
|
@@ -10715,7 +10715,7 @@ var gv = () => ({ editor: n, view: e }) => (requestAnimationFrame(() => {
|
|
|
10715
10715
|
const { state: r } = t, s = r.doc.slice(n.from, n.to);
|
|
10716
10716
|
o.deleteRange(n.from, n.to);
|
|
10717
10717
|
const i = o.mapping.map(e);
|
|
10718
|
-
return o.insert(i, s.content), o.setSelection(new
|
|
10718
|
+
return o.insert(i, s.content), o.setSelection(new re(o.doc.resolve(Math.max(i - 1, 0)))), !0;
|
|
10719
10719
|
}, xv = () => ({ tr: n, dispatch: e }) => {
|
|
10720
10720
|
const { selection: t } = n, o = t.$anchor.node();
|
|
10721
10721
|
if (o.content.size > 0)
|
|
@@ -10801,7 +10801,7 @@ var Av = (n, e = {}) => ({ tr: t, state: o, dispatch: r }) => {
|
|
|
10801
10801
|
if (r) {
|
|
10802
10802
|
const d = Wa(a, s, e);
|
|
10803
10803
|
if (d && d.from <= c && d.to >= u) {
|
|
10804
|
-
const h =
|
|
10804
|
+
const h = re.create(i, d.from, d.to);
|
|
10805
10805
|
t.setSelection(h);
|
|
10806
10806
|
}
|
|
10807
10807
|
}
|
|
@@ -10814,7 +10814,7 @@ var Av = (n, e = {}) => ({ tr: t, state: o, dispatch: r }) => {
|
|
|
10814
10814
|
return !1;
|
|
10815
10815
|
};
|
|
10816
10816
|
function Kh(n) {
|
|
10817
|
-
return n instanceof
|
|
10817
|
+
return n instanceof re;
|
|
10818
10818
|
}
|
|
10819
10819
|
function Gn(n = 0, e = 0, t = 0) {
|
|
10820
10820
|
return Math.min(Math.max(n, e), t);
|
|
@@ -10828,7 +10828,7 @@ function qh(n, e = null) {
|
|
|
10828
10828
|
if (e === "end")
|
|
10829
10829
|
return o;
|
|
10830
10830
|
const r = t.from, s = o.to;
|
|
10831
|
-
return e === "all" ?
|
|
10831
|
+
return e === "all" ? re.create(n, Gn(0, r, s), Gn(n.content.size, r, s)) : re.create(n, Gn(e, r, s), Gn(e, r, s));
|
|
10832
10832
|
}
|
|
10833
10833
|
function Wu() {
|
|
10834
10834
|
return navigator.platform === "Android" || /android/i.test(navigator.userAgent);
|
|
@@ -10860,7 +10860,7 @@ var Nv = (n = null, e = {}) => ({ editor: t, view: o, tr: r, dispatch: s }) => {
|
|
|
10860
10860
|
return i(), !0;
|
|
10861
10861
|
const l = qh(r.doc, n) || t.state.selection, a = t.state.selection.eq(l);
|
|
10862
10862
|
return s && (a || r.setSelection(l), a && r.storedMarks && r.setStoredMarks(r.storedMarks), i()), !0;
|
|
10863
|
-
},
|
|
10863
|
+
}, Dv = (n, e) => (t) => n.every((o, r) => e(o, { ...t, index: r })), Rv = (n, e) => ({ tr: t, commands: o }) => o.insertContentAt({ from: t.selection.from, to: t.selection.to }, n, e), Jh = (n) => {
|
|
10864
10864
|
const e = n.childNodes;
|
|
10865
10865
|
for (let t = e.length - 1; t >= 0; t -= 1) {
|
|
10866
10866
|
const o = e[t];
|
|
@@ -10875,7 +10875,7 @@ function sr(n) {
|
|
|
10875
10875
|
return Jh(t);
|
|
10876
10876
|
}
|
|
10877
10877
|
function Nr(n, e, t) {
|
|
10878
|
-
if (n instanceof cn || n instanceof
|
|
10878
|
+
if (n instanceof cn || n instanceof R)
|
|
10879
10879
|
return n;
|
|
10880
10880
|
t = {
|
|
10881
10881
|
slice: !0,
|
|
@@ -10886,7 +10886,7 @@ function Nr(n, e, t) {
|
|
|
10886
10886
|
if (o)
|
|
10887
10887
|
try {
|
|
10888
10888
|
if (Array.isArray(n) && n.length > 0)
|
|
10889
|
-
return
|
|
10889
|
+
return R.fromArray(n.map((l) => e.nodeFromJSON(l)));
|
|
10890
10890
|
const i = e.nodeFromJSON(n);
|
|
10891
10891
|
return t.errorOnInvalidContent && i.check(), i;
|
|
10892
10892
|
} catch (s) {
|
|
@@ -10989,7 +10989,7 @@ var Pv = (n) => !("type" in n), Lv = (n, e, t) => ({ tr: o, dispatch: r, editor:
|
|
|
10989
10989
|
if (h) {
|
|
10990
10990
|
if (Array.isArray(e))
|
|
10991
10991
|
m = e.map((g) => g.text || "").join("");
|
|
10992
|
-
else if (e instanceof
|
|
10992
|
+
else if (e instanceof R) {
|
|
10993
10993
|
let g = "";
|
|
10994
10994
|
e.forEach((y) => {
|
|
10995
10995
|
y.text && (g += y.text);
|
|
@@ -11061,7 +11061,7 @@ var Kv = (n) => ({ editor: e, view: t, tr: o, dispatch: r }) => {
|
|
|
11061
11061
|
u && r && o.maybeStep(u);
|
|
11062
11062
|
}), !0;
|
|
11063
11063
|
};
|
|
11064
|
-
function
|
|
11064
|
+
function Dr(n, e, t = {}) {
|
|
11065
11065
|
const { from: o, to: r, empty: s } = n.selection, i = e ? Ve(e, n.schema) : null, l = [];
|
|
11066
11066
|
n.doc.nodesBetween(o, r, (d, h) => {
|
|
11067
11067
|
if (d.isText)
|
|
@@ -11078,7 +11078,7 @@ function Rr(n, e, t = {}) {
|
|
|
11078
11078
|
}
|
|
11079
11079
|
var qv = (n, e = {}) => ({ state: t, dispatch: o }) => {
|
|
11080
11080
|
const r = Ve(n, t.schema);
|
|
11081
|
-
return
|
|
11081
|
+
return Dr(t, r, e) ? c1(t, o) : !1;
|
|
11082
11082
|
}, Jv = () => ({ state: n, dispatch: e }) => sh(n, e), Gv = (n) => ({ state: e, dispatch: t }) => {
|
|
11083
11083
|
const o = Ve(n, e.schema);
|
|
11084
11084
|
return b1(o)(e, t);
|
|
@@ -11614,9 +11614,9 @@ function Yl(n, e, t = {}) {
|
|
|
11614
11614
|
}
|
|
11615
11615
|
function yw(n, e, t = {}) {
|
|
11616
11616
|
if (!e)
|
|
11617
|
-
return
|
|
11617
|
+
return Dr(n, null, t) || Yl(n, null, t);
|
|
11618
11618
|
const o = Si(e, n.schema);
|
|
11619
|
-
return o === "node" ?
|
|
11619
|
+
return o === "node" ? Dr(n, e, t) : o === "mark" ? Yl(n, e, t) : !1;
|
|
11620
11620
|
}
|
|
11621
11621
|
function Ju(n, e) {
|
|
11622
11622
|
return Array.isArray(e) ? e.some((t) => (typeof t == "string" ? t : t.name) === n.name) : e;
|
|
@@ -11761,7 +11761,7 @@ var xw = (n, e = {}) => ({ tr: t, state: o, dispatch: r }) => {
|
|
|
11761
11761
|
}), !0;
|
|
11762
11762
|
}, Ew = (n) => ({ tr: e, dispatch: t }) => {
|
|
11763
11763
|
if (t) {
|
|
11764
|
-
const { doc: o } = e, { from: r, to: s } = typeof n == "number" ? { from: n, to: n } : n, i =
|
|
11764
|
+
const { doc: o } = e, { from: r, to: s } = typeof n == "number" ? { from: n, to: n } : n, i = re.atStart(o).from, l = re.atEnd(o).to, a = Gn(r, i, l), c = Gn(s, i, l), u = re.create(o, a, c);
|
|
11765
11765
|
e.setSelection(u);
|
|
11766
11766
|
}
|
|
11767
11767
|
return !0;
|
|
@@ -11795,7 +11795,7 @@ var Iw = ({ keepMarks: n = !0 } = {}) => ({ tr: e, state: t, dispatch: o, editor
|
|
|
11795
11795
|
attrs: u
|
|
11796
11796
|
}
|
|
11797
11797
|
] : void 0), o) {
|
|
11798
|
-
if (p && (s instanceof
|
|
11798
|
+
if (p && (s instanceof re && e.deleteSelection(), e.split(e.mapping.map(l.pos), 1, f), h && !d && !l.parentOffset && l.parent.type !== h)) {
|
|
11799
11799
|
const m = e.mapping.map(l.before()), g = e.doc.resolve(m);
|
|
11800
11800
|
l.node(-1).canReplaceWith(g.index(), g.index() + 1, h) && e.setNodeMarkup(e.mapping.map(l.before()), h);
|
|
11801
11801
|
}
|
|
@@ -11815,10 +11815,10 @@ var Iw = ({ keepMarks: n = !0 } = {}) => ({ tr: e, state: t, dispatch: o, editor
|
|
|
11815
11815
|
if (a.depth === 2 || a.node(-3).type !== l || a.index(-2) !== a.node(-2).childCount - 1)
|
|
11816
11816
|
return !1;
|
|
11817
11817
|
if (r) {
|
|
11818
|
-
let y =
|
|
11818
|
+
let y = R.empty;
|
|
11819
11819
|
const v = a.index(-1) ? 1 : a.index(-2) ? 2 : 3;
|
|
11820
11820
|
for (let M = a.depth - v; M >= a.depth - 3; M -= 1)
|
|
11821
|
-
y =
|
|
11821
|
+
y = R.from(a.node(M).copy(y));
|
|
11822
11822
|
const w = (
|
|
11823
11823
|
// eslint-disable-next-line no-nested-ternary
|
|
11824
11824
|
a.indexAfter(-1) < a.node(-2).childCount ? 1 : a.indexAfter(-2) < a.node(-3).childCount ? 2 : 3
|
|
@@ -11826,7 +11826,7 @@ var Iw = ({ keepMarks: n = !0 } = {}) => ({ tr: e, state: t, dispatch: o, editor
|
|
|
11826
11826
|
...ls(h, a.node().type.name, a.node().attrs),
|
|
11827
11827
|
...e
|
|
11828
11828
|
}, C = ((i = l.contentMatch.defaultType) == null ? void 0 : i.createAndFill(k)) || void 0;
|
|
11829
|
-
y = y.append(
|
|
11829
|
+
y = y.append(R.from(l.createAndFill(null, C) || void 0));
|
|
11830
11830
|
const T = a.before(a.depth - (v - 1));
|
|
11831
11831
|
t.replace(T, a.after(-w), new j(y, 4 - v, 0));
|
|
11832
11832
|
let x = -1;
|
|
@@ -11834,7 +11834,7 @@ var Iw = ({ keepMarks: n = !0 } = {}) => ({ tr: e, state: t, dispatch: o, editor
|
|
|
11834
11834
|
if (x > -1)
|
|
11835
11835
|
return !1;
|
|
11836
11836
|
M.isTextblock && M.content.size === 0 && (x = E + 1);
|
|
11837
|
-
}), x > -1 && t.setSelection(
|
|
11837
|
+
}), x > -1 && t.setSelection(re.near(t.doc.resolve(x))), t.scrollIntoView();
|
|
11838
11838
|
}
|
|
11839
11839
|
return !0;
|
|
11840
11840
|
}
|
|
@@ -11893,16 +11893,16 @@ var Iw = ({ keepMarks: n = !0 } = {}) => ({ tr: e, state: t, dispatch: o, editor
|
|
|
11893
11893
|
const T = u().wrapInList(f, o), x = k.filter((M) => h.includes(M.type.name));
|
|
11894
11894
|
return s.ensureMarks(x), T ? !0 : c.clearNodes();
|
|
11895
11895
|
}).wrapInList(f, o).command(() => sl(s, f)).command(() => il(s, f)).run();
|
|
11896
|
-
},
|
|
11896
|
+
}, Dw = (n, e = {}, t = {}) => ({ state: o, commands: r }) => {
|
|
11897
11897
|
const { extendEmptyMarkRange: s = !1 } = t, i = hn(n, o.schema);
|
|
11898
11898
|
return Yl(o, i, e) ? r.unsetMark(i, { extendEmptyMarkRange: s }) : r.setMark(i, e);
|
|
11899
|
-
},
|
|
11900
|
-
const s = Ve(n, o.schema), i = Ve(e, o.schema), l =
|
|
11899
|
+
}, Rw = (n, e, t = {}) => ({ state: o, commands: r }) => {
|
|
11900
|
+
const s = Ve(n, o.schema), i = Ve(e, o.schema), l = Dr(o, s, t);
|
|
11901
11901
|
let a;
|
|
11902
11902
|
return o.selection.$anchor.sameParent(o.selection.$head) && (a = o.selection.$anchor.parent.attrs), l ? r.setNode(i, a) : r.setNode(s, { ...a, ...t });
|
|
11903
11903
|
}, _w = (n, e = {}) => ({ state: t, commands: o }) => {
|
|
11904
11904
|
const r = Ve(n, t.schema);
|
|
11905
|
-
return
|
|
11905
|
+
return Dr(t, r, e) ? o.lift(r) : o.wrapIn(r, e);
|
|
11906
11906
|
}, Pw = () => ({ state: n, dispatch: e }) => {
|
|
11907
11907
|
const t = n.plugins;
|
|
11908
11908
|
for (let o = 0; o < t.length; o += 1) {
|
|
@@ -12098,7 +12098,7 @@ function jw(n) {
|
|
|
12098
12098
|
const a = r.getMeta("applyInputRules");
|
|
12099
12099
|
return !!a && setTimeout(() => {
|
|
12100
12100
|
let { text: u } = a;
|
|
12101
|
-
typeof u == "string" ? u = u : u = Ci(
|
|
12101
|
+
typeof u == "string" ? u = u : u = Ci(R.from(u), i.schema);
|
|
12102
12102
|
const { from: d } = a, h = d + u.length;
|
|
12103
12103
|
Gr({
|
|
12104
12104
|
editor: e,
|
|
@@ -12271,8 +12271,8 @@ function Yw(n) {
|
|
|
12271
12271
|
Gw(x, s.find, i).forEach((E) => {
|
|
12272
12272
|
if (E.index === void 0)
|
|
12273
12273
|
return;
|
|
12274
|
-
const
|
|
12275
|
-
from: t.tr.mapping.map(
|
|
12274
|
+
const D = C + E.index + 1, P = D + E[0].length, _ = {
|
|
12275
|
+
from: t.tr.mapping.map(D),
|
|
12276
12276
|
to: t.tr.mapping.map(P)
|
|
12277
12277
|
}, $ = s.handler({
|
|
12278
12278
|
state: t,
|
|
@@ -12371,7 +12371,7 @@ function Qw(n) {
|
|
|
12371
12371
|
return;
|
|
12372
12372
|
if (v) {
|
|
12373
12373
|
let { text: C } = y;
|
|
12374
|
-
typeof C == "string" ? C = C : C = Ci(
|
|
12374
|
+
typeof C == "string" ? C = C : C = Ci(R.from(C), f.schema);
|
|
12375
12375
|
const { from: T } = y, x = T + C.length, M = Xw(C);
|
|
12376
12376
|
return a({
|
|
12377
12377
|
rule: u,
|
|
@@ -13751,34 +13751,34 @@ function ik(n) {
|
|
|
13751
13751
|
const E = x.exec(M);
|
|
13752
13752
|
if (E === null)
|
|
13753
13753
|
break;
|
|
13754
|
-
const
|
|
13754
|
+
const D = E.index, P = E[1];
|
|
13755
13755
|
if (!((p = E[2]) != null && p.endsWith(":::"))) {
|
|
13756
13756
|
if (P)
|
|
13757
13757
|
k += 1;
|
|
13758
13758
|
else if (k -= 1, k === 0) {
|
|
13759
|
-
const _ = M.slice(0,
|
|
13759
|
+
const _ = M.slice(0, D);
|
|
13760
13760
|
T = _.trim();
|
|
13761
|
-
const $ = d.slice(0, C +
|
|
13762
|
-
let
|
|
13761
|
+
const $ = d.slice(0, C + D + E[0].length);
|
|
13762
|
+
let W = [];
|
|
13763
13763
|
if (T)
|
|
13764
13764
|
if (l === "block")
|
|
13765
|
-
for (
|
|
13765
|
+
for (W = f.blockTokens(_), W.forEach((q) => {
|
|
13766
13766
|
q.text && (!q.tokens || q.tokens.length === 0) && (q.tokens = f.inlineTokens(q.text));
|
|
13767
|
-
});
|
|
13768
|
-
const q =
|
|
13767
|
+
}); W.length > 0; ) {
|
|
13768
|
+
const q = W[W.length - 1];
|
|
13769
13769
|
if (q.type === "paragraph" && (!q.text || q.text.trim() === ""))
|
|
13770
|
-
|
|
13770
|
+
W.pop();
|
|
13771
13771
|
else
|
|
13772
13772
|
break;
|
|
13773
13773
|
}
|
|
13774
13774
|
else
|
|
13775
|
-
|
|
13775
|
+
W = f.inlineTokens(T);
|
|
13776
13776
|
return {
|
|
13777
13777
|
type: e,
|
|
13778
13778
|
raw: $,
|
|
13779
13779
|
attributes: w,
|
|
13780
13780
|
content: T,
|
|
13781
|
-
tokens:
|
|
13781
|
+
tokens: W
|
|
13782
13782
|
};
|
|
13783
13783
|
}
|
|
13784
13784
|
}
|
|
@@ -13904,7 +13904,7 @@ function uk(n, e, t) {
|
|
|
13904
13904
|
for (u += 1; u < l.length; ) {
|
|
13905
13905
|
const C = l[u];
|
|
13906
13906
|
if (C.trim() === "") {
|
|
13907
|
-
const x = l.slice(u + 1).findIndex((
|
|
13907
|
+
const x = l.slice(u + 1).findIndex((D) => D.trim() !== "");
|
|
13908
13908
|
if (x === -1)
|
|
13909
13909
|
break;
|
|
13910
13910
|
if ((((r = (o = l[u + 1 + x].match(/^(\s*)/)) == null ? void 0 : o[1]) == null ? void 0 : r.length) || 0) > m) {
|
|
@@ -13994,7 +13994,7 @@ var Xa = class xp extends Ja {
|
|
|
13994
13994
|
return super.extend(t);
|
|
13995
13995
|
}
|
|
13996
13996
|
};
|
|
13997
|
-
function
|
|
13997
|
+
function Rr(n) {
|
|
13998
13998
|
return new Jw({
|
|
13999
13999
|
find: n.find,
|
|
14000
14000
|
handler: ({ state: e, range: t, match: o, pasteEvent: r }) => {
|
|
@@ -14275,11 +14275,11 @@ var mk = Xa.create({
|
|
|
14275
14275
|
},
|
|
14276
14276
|
addPasteRules() {
|
|
14277
14277
|
return [
|
|
14278
|
-
|
|
14278
|
+
Rr({
|
|
14279
14279
|
find: kk,
|
|
14280
14280
|
type: this.type
|
|
14281
14281
|
}),
|
|
14282
|
-
|
|
14282
|
+
Rr({
|
|
14283
14283
|
find: xk,
|
|
14284
14284
|
type: this.type
|
|
14285
14285
|
})
|
|
@@ -14343,11 +14343,11 @@ var mk = Xa.create({
|
|
|
14343
14343
|
},
|
|
14344
14344
|
addPasteRules() {
|
|
14345
14345
|
return [
|
|
14346
|
-
|
|
14346
|
+
Rr({
|
|
14347
14347
|
find: Mk,
|
|
14348
14348
|
type: this.type
|
|
14349
14349
|
}),
|
|
14350
|
-
|
|
14350
|
+
Rr({
|
|
14351
14351
|
find: Ek,
|
|
14352
14352
|
type: this.type
|
|
14353
14353
|
})
|
|
@@ -14414,7 +14414,7 @@ var mk = Xa.create({
|
|
|
14414
14414
|
};
|
|
14415
14415
|
}
|
|
14416
14416
|
}), Ap = Ik;
|
|
14417
|
-
const Ok = "aaa1rp3bb0ott3vie4c1le2ogado5udhabi7c0ademy5centure6ountant0s9o1tor4d0s1ult4e0g1ro2tna4f0l1rica5g0akhan5ency5i0g1rbus3force5tel5kdn3l0ibaba4pay4lfinanz6state5y2sace3tom5m0azon4ericanexpress7family11x2fam3ica3sterdam8nalytics7droid5quan4z2o0l2partments8p0le4q0uarelle8r0ab1mco4chi3my2pa2t0e3s0da2ia2sociates9t0hleta5torney7u0ction5di0ble3o3spost5thor3o0s4w0s2x0a2z0ure5ba0by2idu3namex4d1k2r0celona5laycard4s5efoot5gains6seball5ketball8uhaus5yern5b0c1t1va3cg1n2d1e0ats2uty4er2rlin4st0buy5t2f1g1h0arti5i0ble3d1ke2ng0o3o1z2j1lack0friday9ockbuster8g1omberg7ue3m0s1w2n0pparibas9o0ats3ehringer8fa2m1nd2o0k0ing5sch2tik2on4t1utique6x2r0adesco6idgestone9oadway5ker3ther5ussels7s1t1uild0ers6siness6y1zz3v1w1y1z0h3ca0b1fe2l0l1vinklein9m0era3p2non3petown5ital0one8r0avan4ds2e0er0s4s2sa1e1h1ino4t0ering5holic7ba1n1re3c1d1enter4o1rn3f0a1d2g1h0anel2nel4rity4se2t2eap3intai5ristmas6ome4urch5i0priani6rcle4sco3tadel4i0c2y3k1l0aims4eaning6ick2nic1que6othing5ud3ub0med6m1n1o0ach3des3ffee4llege4ogne5m0mbank4unity6pany2re3uter5sec4ndos3struction8ulting7tact3ractors9oking4l1p2rsica5untry4pon0s4rses6pa2r0edit0card4union9icket5own3s1uise0s6u0isinella9v1w1x1y0mru3ou3z2dad1nce3ta1e1ing3sun4y2clk3ds2e0al0er2s3gree4livery5l1oitte5ta3mocrat6ntal2ist5si0gn4v2hl2iamonds6et2gital5rect0ory7scount3ver5h2y2j1k1m1np2o0cs1tor4g1mains5t1wnload7rive4tv2ubai3nlop4pont4rban5vag2r2z2earth3t2c0o2deka3u0cation8e1g1mail3erck5nergy4gineer0ing9terprises10pson4quipment8r0icsson6ni3s0q1tate5t1u0rovision8s2vents5xchange6pert3osed4ress5traspace10fage2il1rwinds6th3mily4n0s2rm0ers5shion4t3edex3edback6rrari3ero6i0delity5o2lm2nal1nce1ial7re0stone6mdale6sh0ing5t0ness6j1k1lickr3ghts4r2orist4wers5y2m1o0o0d1tball6rd1ex2sale4um3undation8x2r0ee1senius7l1ogans4ntier7tr2ujitsu5n0d2rniture7tbol5yi3ga0l0lery3o1up4me0s3p1rden4y2b0iz3d0n2e0a1nt0ing5orge5f1g0ee3h1i0ft0s3ves2ing5l0ass3e1obal2o4m0ail3bh2o1x2n1odaddy5ld0point6f2o0dyear5g0le4p1t1v2p1q1r0ainger5phics5tis4een3ipe3ocery4up4s1t1u0cci3ge2ide2tars5ru3w1y2hair2mburg5ngout5us3bo2dfc0bank7ealth0care8lp1sinki6re1mes5iphop4samitsu7tachi5v2k0t2m1n1ockey4ldings5iday5medepot5goods5s0ense7nda3rse3spital5t0ing5t0els3mail5use3w2r1sbc3t1u0ghes5yatt3undai7ibm2cbc2e1u2d1e0ee3fm2kano4l1m0amat4db2mo0bilien9n0c1dustries8finiti5o2g1k1stitute6urance4e4t0ernational10uit4vestments10o1piranga7q1r0ish4s0maili5t0anbul7t0au2v3jaguar4va3cb2e0ep2tzt3welry6io2ll2m0p2nj2o0bs1urg4t1y2p0morgan6rs3uegos4niper7kaufen5ddi3e0rryhotels6properties14fh2g1h1i0a1ds2m1ndle4tchen5wi3m1n1oeln3matsu5sher5p0mg2n2r0d1ed3uokgroup8w1y0oto4z2la0caixa5mborghini8er3nd0rover6xess5salle5t0ino3robe5w0yer5b1c1ds2ease3clerc5frak4gal2o2xus4gbt3i0dl2fe0insurance9style7ghting6ke2lly3mited4o2ncoln4k2ve1ing5k1lc1p2oan0s3cker3us3l1ndon4tte1o3ve3pl0financial11r1s1t0d0a3u0ndbeck6xe1ury5v1y2ma0drid4if1son4keup4n0agement7go3p1rket0ing3s4riott5shalls7ttel5ba2c0kinsey7d1e0d0ia3et2lbourne7me1orial6n0u2rckmsd7g1h1iami3crosoft7l1ni1t2t0subishi9k1l0b1s2m0a2n1o0bi0le4da2e1i1m1nash3ey2ster5rmon3tgage6scow4to0rcycles9v0ie4p1q1r1s0d2t0n1r2u0seum3ic4v1w1x1y1z2na0b1goya4me2vy3ba2c1e0c1t0bank4flix4work5ustar5w0s2xt0direct7us4f0l2g0o2hk2i0co2ke1on3nja3ssan1y5l1o0kia3rton4w0ruz3tv4p1r0a1w2tt2u1yc2z2obi1server7ffice5kinawa6layan0group9lo3m0ega4ne1g1l0ine5oo2pen3racle3nge4g0anic5igins6saka4tsuka4t2vh3pa0ge2nasonic7ris2s1tners4s1y3y2ccw3e0t2f0izer5g1h0armacy6d1ilips5one2to0graphy6s4ysio5ics1tet2ures6d1n0g1k2oneer5zza4k1l0ace2y0station9umbing5s3m1n0c2ohl2ker3litie5rn2st3r0axi3ess3ime3o0d0uctions8f1gressive8mo2perties3y5tection8u0dential9s1t1ub2w0c2y2qa1pon3uebec3st5racing4dio4e0ad1lestate6tor2y4cipes5d0stone5umbrella9hab3ise0n3t2liance6n0t0als5pair3ort3ublican8st0aurant8view0s5xroth6ich0ardli6oh3l1o1p2o0cks3deo3gers4om3s0vp3u0gby3hr2n2w0e2yukyu6sa0arland6fe0ty4kura4le1on3msclub4ung5ndvik0coromant12ofi4p1rl2s1ve2xo3b0i1s2c0b1haeffler7midt4olarships8ol3ule3warz5ience5ot3d1e0arch3t2cure1ity6ek2lect4ner3rvices6ven3w1x0y3fr2g1h0angrila6rp3ell3ia1ksha5oes2p0ping5uji3w3i0lk2na1gles5te3j1k0i0n2y0pe4l0ing4m0art3ile4n0cf3o0ccer3ial4ftbank4ware6hu2lar2utions7ng1y2y2pa0ce3ort2t3r0l2s1t0ada2ples4r1tebank4farm7c0group6ockholm6rage3e3ream4udio2y3yle4u0cks3pplies3y2ort5rf1gery5zuki5v1watch4iss4x1y0dney4stems6z2tab1ipei4lk2obao4rget4tamotors6r2too4x0i3c0i2d0k2eam2ch0nology8l1masek5nnis4va3f1g1h0d1eater2re6iaa2ckets5enda4ps2res2ol4j0maxx4x2k0maxx5l1m0all4n1o0day3kyo3ols3p1ray3shiba5tal3urs3wn2yota3s3r0ade1ing4ining5vel0ers0insurance16ust3v2t1ube2i1nes3shu4v0s2w1z2ua1bank3s2g1k1nicom3versity8o2ol2ps2s1y1z2va0cations7na1guard7c1e0gas3ntures6risign5mögensberater2ung14sicherung10t2g1i0ajes4deo3g1king4llas4n1p1rgin4sa1ion4va1o3laanderen9n1odka3lvo3te1ing3o2yage5u2wales2mart4ter4ng0gou5tch0es6eather0channel12bcam3er2site5d0ding5ibo2r3f1hoswho6ien2ki2lliamhill9n0dows4e1ners6me2olterskluwer11odside6rk0s2ld3w2s1tc1f3xbox3erox4ihuan4n2xx2yz3yachts4hoo3maxun5ndex5e1odobashi7ga2kohama6u0tube6t1un3za0ppos4ra3ero3ip2m1one3uerich6w2", Nk = "ελ1υ2бг1ел3дети4ею2католик6ом3мкд2он1сква6онлайн5рг3рус2ф2сайт3рб3укр3қаз3հայ3ישראל5קום3ابوظبي5رامكو5لاردن4بحرين5جزائر5سعودية6عليان5مغرب5مارات5یران5بارت2زار4يتك3ھارت5تونس4سودان3رية5شبكة4عراق2ب2مان4فلسطين6قطر3كاثوليك6وم3مصر2ليسيا5وريتانيا7قع4همراه5پاکستان7ڀارت4कॉम3नेट3भारत0म्3ोत5संगठन5বাংলা5ভারত2ৰত4ਭਾਰਤ4ભારત4ଭାରତ4இந்தியா6லங்கை6சிங்கப்பூர்11భారత్5ಭಾರತ4ഭാരതം5ලංකා4คอม3ไทย3ລາວ3გე2みんな3アマゾン4クラウド4グーグル4コム2ストア3セール3ファッション6ポイント4世界2中信1国1國1文网3亚马逊3企业2佛山2信息2健康2八卦2公司1益2台湾1灣2商城1店1标2嘉里0大酒店5在线2大拿2天主教3娱乐2家電2广东2微博2慈善2我爱你3手机2招聘2政务1府2新加坡2闻2时尚2書籍2机构2淡马锡3游戏2澳門2点看2移动2组织机构4网址1店1站1络2联通2谷歌2购物2通販2集团2電訊盈科4飞利浦3食品2餐厅2香格里拉3港2닷넷1컴2삼성2한국2", Xl = "numeric", Ql = "ascii", Zl = "alpha", pr = "asciinumeric", lr = "alphanumeric", ea = "domain", Ip = "emoji",
|
|
14417
|
+
const Ok = "aaa1rp3bb0ott3vie4c1le2ogado5udhabi7c0ademy5centure6ountant0s9o1tor4d0s1ult4e0g1ro2tna4f0l1rica5g0akhan5ency5i0g1rbus3force5tel5kdn3l0ibaba4pay4lfinanz6state5y2sace3tom5m0azon4ericanexpress7family11x2fam3ica3sterdam8nalytics7droid5quan4z2o0l2partments8p0le4q0uarelle8r0ab1mco4chi3my2pa2t0e3s0da2ia2sociates9t0hleta5torney7u0ction5di0ble3o3spost5thor3o0s4w0s2x0a2z0ure5ba0by2idu3namex4d1k2r0celona5laycard4s5efoot5gains6seball5ketball8uhaus5yern5b0c1t1va3cg1n2d1e0ats2uty4er2rlin4st0buy5t2f1g1h0arti5i0ble3d1ke2ng0o3o1z2j1lack0friday9ockbuster8g1omberg7ue3m0s1w2n0pparibas9o0ats3ehringer8fa2m1nd2o0k0ing5sch2tik2on4t1utique6x2r0adesco6idgestone9oadway5ker3ther5ussels7s1t1uild0ers6siness6y1zz3v1w1y1z0h3ca0b1fe2l0l1vinklein9m0era3p2non3petown5ital0one8r0avan4ds2e0er0s4s2sa1e1h1ino4t0ering5holic7ba1n1re3c1d1enter4o1rn3f0a1d2g1h0anel2nel4rity4se2t2eap3intai5ristmas6ome4urch5i0priani6rcle4sco3tadel4i0c2y3k1l0aims4eaning6ick2nic1que6othing5ud3ub0med6m1n1o0ach3des3ffee4llege4ogne5m0mbank4unity6pany2re3uter5sec4ndos3struction8ulting7tact3ractors9oking4l1p2rsica5untry4pon0s4rses6pa2r0edit0card4union9icket5own3s1uise0s6u0isinella9v1w1x1y0mru3ou3z2dad1nce3ta1e1ing3sun4y2clk3ds2e0al0er2s3gree4livery5l1oitte5ta3mocrat6ntal2ist5si0gn4v2hl2iamonds6et2gital5rect0ory7scount3ver5h2y2j1k1m1np2o0cs1tor4g1mains5t1wnload7rive4tv2ubai3nlop4pont4rban5vag2r2z2earth3t2c0o2deka3u0cation8e1g1mail3erck5nergy4gineer0ing9terprises10pson4quipment8r0icsson6ni3s0q1tate5t1u0rovision8s2vents5xchange6pert3osed4ress5traspace10fage2il1rwinds6th3mily4n0s2rm0ers5shion4t3edex3edback6rrari3ero6i0delity5o2lm2nal1nce1ial7re0stone6mdale6sh0ing5t0ness6j1k1lickr3ghts4r2orist4wers5y2m1o0o0d1tball6rd1ex2sale4um3undation8x2r0ee1senius7l1ogans4ntier7tr2ujitsu5n0d2rniture7tbol5yi3ga0l0lery3o1up4me0s3p1rden4y2b0iz3d0n2e0a1nt0ing5orge5f1g0ee3h1i0ft0s3ves2ing5l0ass3e1obal2o4m0ail3bh2o1x2n1odaddy5ld0point6f2o0dyear5g0le4p1t1v2p1q1r0ainger5phics5tis4een3ipe3ocery4up4s1t1u0cci3ge2ide2tars5ru3w1y2hair2mburg5ngout5us3bo2dfc0bank7ealth0care8lp1sinki6re1mes5iphop4samitsu7tachi5v2k0t2m1n1ockey4ldings5iday5medepot5goods5s0ense7nda3rse3spital5t0ing5t0els3mail5use3w2r1sbc3t1u0ghes5yatt3undai7ibm2cbc2e1u2d1e0ee3fm2kano4l1m0amat4db2mo0bilien9n0c1dustries8finiti5o2g1k1stitute6urance4e4t0ernational10uit4vestments10o1piranga7q1r0ish4s0maili5t0anbul7t0au2v3jaguar4va3cb2e0ep2tzt3welry6io2ll2m0p2nj2o0bs1urg4t1y2p0morgan6rs3uegos4niper7kaufen5ddi3e0rryhotels6properties14fh2g1h1i0a1ds2m1ndle4tchen5wi3m1n1oeln3matsu5sher5p0mg2n2r0d1ed3uokgroup8w1y0oto4z2la0caixa5mborghini8er3nd0rover6xess5salle5t0ino3robe5w0yer5b1c1ds2ease3clerc5frak4gal2o2xus4gbt3i0dl2fe0insurance9style7ghting6ke2lly3mited4o2ncoln4k2ve1ing5k1lc1p2oan0s3cker3us3l1ndon4tte1o3ve3pl0financial11r1s1t0d0a3u0ndbeck6xe1ury5v1y2ma0drid4if1son4keup4n0agement7go3p1rket0ing3s4riott5shalls7ttel5ba2c0kinsey7d1e0d0ia3et2lbourne7me1orial6n0u2rckmsd7g1h1iami3crosoft7l1ni1t2t0subishi9k1l0b1s2m0a2n1o0bi0le4da2e1i1m1nash3ey2ster5rmon3tgage6scow4to0rcycles9v0ie4p1q1r1s0d2t0n1r2u0seum3ic4v1w1x1y1z2na0b1goya4me2vy3ba2c1e0c1t0bank4flix4work5ustar5w0s2xt0direct7us4f0l2g0o2hk2i0co2ke1on3nja3ssan1y5l1o0kia3rton4w0ruz3tv4p1r0a1w2tt2u1yc2z2obi1server7ffice5kinawa6layan0group9lo3m0ega4ne1g1l0ine5oo2pen3racle3nge4g0anic5igins6saka4tsuka4t2vh3pa0ge2nasonic7ris2s1tners4s1y3y2ccw3e0t2f0izer5g1h0armacy6d1ilips5one2to0graphy6s4ysio5ics1tet2ures6d1n0g1k2oneer5zza4k1l0ace2y0station9umbing5s3m1n0c2ohl2ker3litie5rn2st3r0axi3ess3ime3o0d0uctions8f1gressive8mo2perties3y5tection8u0dential9s1t1ub2w0c2y2qa1pon3uebec3st5racing4dio4e0ad1lestate6tor2y4cipes5d0stone5umbrella9hab3ise0n3t2liance6n0t0als5pair3ort3ublican8st0aurant8view0s5xroth6ich0ardli6oh3l1o1p2o0cks3deo3gers4om3s0vp3u0gby3hr2n2w0e2yukyu6sa0arland6fe0ty4kura4le1on3msclub4ung5ndvik0coromant12ofi4p1rl2s1ve2xo3b0i1s2c0b1haeffler7midt4olarships8ol3ule3warz5ience5ot3d1e0arch3t2cure1ity6ek2lect4ner3rvices6ven3w1x0y3fr2g1h0angrila6rp3ell3ia1ksha5oes2p0ping5uji3w3i0lk2na1gles5te3j1k0i0n2y0pe4l0ing4m0art3ile4n0cf3o0ccer3ial4ftbank4ware6hu2lar2utions7ng1y2y2pa0ce3ort2t3r0l2s1t0ada2ples4r1tebank4farm7c0group6ockholm6rage3e3ream4udio2y3yle4u0cks3pplies3y2ort5rf1gery5zuki5v1watch4iss4x1y0dney4stems6z2tab1ipei4lk2obao4rget4tamotors6r2too4x0i3c0i2d0k2eam2ch0nology8l1masek5nnis4va3f1g1h0d1eater2re6iaa2ckets5enda4ps2res2ol4j0maxx4x2k0maxx5l1m0all4n1o0day3kyo3ols3p1ray3shiba5tal3urs3wn2yota3s3r0ade1ing4ining5vel0ers0insurance16ust3v2t1ube2i1nes3shu4v0s2w1z2ua1bank3s2g1k1nicom3versity8o2ol2ps2s1y1z2va0cations7na1guard7c1e0gas3ntures6risign5mögensberater2ung14sicherung10t2g1i0ajes4deo3g1king4llas4n1p1rgin4sa1ion4va1o3laanderen9n1odka3lvo3te1ing3o2yage5u2wales2mart4ter4ng0gou5tch0es6eather0channel12bcam3er2site5d0ding5ibo2r3f1hoswho6ien2ki2lliamhill9n0dows4e1ners6me2olterskluwer11odside6rk0s2ld3w2s1tc1f3xbox3erox4ihuan4n2xx2yz3yachts4hoo3maxun5ndex5e1odobashi7ga2kohama6u0tube6t1un3za0ppos4ra3ero3ip2m1one3uerich6w2", Nk = "ελ1υ2бг1ел3дети4ею2католик6ом3мкд2он1сква6онлайн5рг3рус2ф2сайт3рб3укр3қаз3հայ3ישראל5קום3ابوظبي5رامكو5لاردن4بحرين5جزائر5سعودية6عليان5مغرب5مارات5یران5بارت2زار4يتك3ھارت5تونس4سودان3رية5شبكة4عراق2ب2مان4فلسطين6قطر3كاثوليك6وم3مصر2ليسيا5وريتانيا7قع4همراه5پاکستان7ڀارت4कॉम3नेट3भारत0म्3ोत5संगठन5বাংলা5ভারত2ৰত4ਭਾਰਤ4ભારત4ଭାରତ4இந்தியா6லங்கை6சிங்கப்பூர்11భారత్5ಭಾರತ4ഭാരതം5ලංකා4คอม3ไทย3ລາວ3გე2みんな3アマゾン4クラウド4グーグル4コム2ストア3セール3ファッション6ポイント4世界2中信1国1國1文网3亚马逊3企业2佛山2信息2健康2八卦2公司1益2台湾1灣2商城1店1标2嘉里0大酒店5在线2大拿2天主教3娱乐2家電2广东2微博2慈善2我爱你3手机2招聘2政务1府2新加坡2闻2时尚2書籍2机构2淡马锡3游戏2澳門2点看2移动2组织机构4网址1店1站1络2联通2谷歌2购物2通販2集团2電訊盈科4飞利浦3食品2餐厅2香格里拉3港2닷넷1컴2삼성2한국2", Xl = "numeric", Ql = "ascii", Zl = "alpha", pr = "asciinumeric", lr = "alphanumeric", ea = "domain", Ip = "emoji", Dk = "scheme", Rk = "slashscheme", ll = "whitespace";
|
|
14418
14418
|
function _k(n, e) {
|
|
14419
14419
|
return n in e || (e[n] = []), e[n];
|
|
14420
14420
|
}
|
|
@@ -14555,7 +14555,7 @@ ct.prototype = {
|
|
|
14555
14555
|
return r.j[n] = i, i;
|
|
14556
14556
|
}
|
|
14557
14557
|
};
|
|
14558
|
-
const
|
|
14558
|
+
const ie = (n, e, t, o, r) => n.ta(e, t, o, r), Se = (n, e, t, o, r) => n.tr(e, t, o, r), ed = (n, e, t, o, r) => n.ts(e, t, o, r), L = (n, e, t, o, r) => n.tt(e, t, o, r), tn = "WORD", ta = "UWORD", Op = "ASCIINUMERICAL", Np = "ALPHANUMERICAL", _r = "LOCALHOST", na = "TLD", oa = "UTLD", as = "SCHEME", To = "SLASH_SCHEME", Qa = "NUM", ra = "WS", Za = "NL", mr = "OPENBRACE", gr = "CLOSEBRACE", Os = "OPENBRACKET", Ns = "CLOSEBRACKET", Ds = "OPENPAREN", Rs = "CLOSEPAREN", _s = "OPENANGLEBRACKET", Ps = "CLOSEANGLEBRACKET", Ls = "FULLWIDTHLEFTPAREN", Bs = "FULLWIDTHRIGHTPAREN", $s = "LEFTCORNERBRACKET", zs = "RIGHTCORNERBRACKET", Fs = "LEFTWHITECORNERBRACKET", Hs = "RIGHTWHITECORNERBRACKET", Vs = "FULLWIDTHLESSTHAN", Ws = "FULLWIDTHGREATERTHAN", Us = "AMPERSAND", js = "APOSTROPHE", Ks = "ASTERISK", bn = "AT", qs = "BACKSLASH", Js = "BACKTICK", Gs = "CARET", Cn = "COLON", ec = "COMMA", Ys = "DOLLAR", $t = "DOT", Xs = "EQUALS", tc = "EXCLAMATION", wt = "HYPHEN", yr = "PERCENT", Qs = "PIPE", Zs = "PLUS", ei = "POUND", vr = "QUERY", nc = "QUOTE", Dp = "FULLWIDTHMIDDLEDOT", oc = "SEMI", zt = "SLASH", wr = "TILDE", ti = "UNDERSCORE", Rp = "EMOJI", ni = "SYM";
|
|
14559
14559
|
var _p = /* @__PURE__ */ Object.freeze({
|
|
14560
14560
|
__proto__: null,
|
|
14561
14561
|
ALPHANUMERICAL: Np,
|
|
@@ -14570,18 +14570,18 @@ var _p = /* @__PURE__ */ Object.freeze({
|
|
|
14570
14570
|
CLOSEANGLEBRACKET: Ps,
|
|
14571
14571
|
CLOSEBRACE: gr,
|
|
14572
14572
|
CLOSEBRACKET: Ns,
|
|
14573
|
-
CLOSEPAREN:
|
|
14573
|
+
CLOSEPAREN: Rs,
|
|
14574
14574
|
COLON: Cn,
|
|
14575
14575
|
COMMA: ec,
|
|
14576
14576
|
DOLLAR: Ys,
|
|
14577
14577
|
DOT: $t,
|
|
14578
|
-
EMOJI:
|
|
14578
|
+
EMOJI: Rp,
|
|
14579
14579
|
EQUALS: Xs,
|
|
14580
14580
|
EXCLAMATION: tc,
|
|
14581
14581
|
FULLWIDTHGREATERTHAN: Ws,
|
|
14582
14582
|
FULLWIDTHLEFTPAREN: Ls,
|
|
14583
14583
|
FULLWIDTHLESSTHAN: Vs,
|
|
14584
|
-
FULLWIDTHMIDDLEDOT:
|
|
14584
|
+
FULLWIDTHMIDDLEDOT: Dp,
|
|
14585
14585
|
FULLWIDTHRIGHTPAREN: Bs,
|
|
14586
14586
|
HYPHEN: wt,
|
|
14587
14587
|
LEFTCORNERBRACKET: $s,
|
|
@@ -14592,7 +14592,7 @@ var _p = /* @__PURE__ */ Object.freeze({
|
|
|
14592
14592
|
OPENANGLEBRACKET: _s,
|
|
14593
14593
|
OPENBRACE: mr,
|
|
14594
14594
|
OPENBRACKET: Os,
|
|
14595
|
-
OPENPAREN:
|
|
14595
|
+
OPENPAREN: Ds,
|
|
14596
14596
|
PERCENT: yr,
|
|
14597
14597
|
PIPE: Qs,
|
|
14598
14598
|
PLUS: Zs,
|
|
@@ -14621,7 +14621,7 @@ function $k(n = []) {
|
|
|
14621
14621
|
const e = {};
|
|
14622
14622
|
ct.groups = e;
|
|
14623
14623
|
const t = new ct();
|
|
14624
|
-
Qr == null && (Qr = nd(Ok)), Zr == null && (Zr = nd(Nk)), L(t, "'", js), L(t, "{", mr), L(t, "}", gr), L(t, "[", Os), L(t, "]", Ns), L(t, "(",
|
|
14624
|
+
Qr == null && (Qr = nd(Ok)), Zr == null && (Zr = nd(Nk)), L(t, "'", js), L(t, "{", mr), L(t, "}", gr), L(t, "[", Os), L(t, "]", Ns), L(t, "(", Ds), L(t, ")", Rs), L(t, "<", _s), L(t, ">", Ps), L(t, "(", Ls), L(t, ")", Bs), L(t, "「", $s), L(t, "」", zs), L(t, "『", Fs), L(t, "』", Hs), L(t, "<", Vs), L(t, ">", Ws), L(t, "&", Us), L(t, "*", Ks), L(t, "@", bn), L(t, "`", Js), L(t, "^", Gs), L(t, ":", Cn), L(t, ",", ec), L(t, "$", Ys), L(t, ".", $t), L(t, "=", Xs), L(t, "!", tc), L(t, "-", wt), L(t, "%", yr), L(t, "|", Qs), L(t, "+", Zs), L(t, "#", ei), L(t, "?", vr), L(t, '"', nc), L(t, "/", zt), L(t, ";", oc), L(t, "~", wr), L(t, "_", ti), L(t, "\\", qs), L(t, "・", Dp);
|
|
14625
14625
|
const o = Se(t, en, Qa, {
|
|
14626
14626
|
[Xl]: !0
|
|
14627
14627
|
});
|
|
@@ -14646,7 +14646,7 @@ function $k(n = []) {
|
|
|
14646
14646
|
[ll]: !0
|
|
14647
14647
|
});
|
|
14648
14648
|
L(t, dl, u), L(c, ul, a), L(c, dl, u), Se(c, cl, u), L(u, td), L(u, ul), Se(u, cl, u), L(u, dl, u);
|
|
14649
|
-
const d = Se(t, al,
|
|
14649
|
+
const d = Se(t, al, Rp, {
|
|
14650
14650
|
[Ip]: !0
|
|
14651
14651
|
});
|
|
14652
14652
|
L(d, "#"), Se(d, al, d), L(d, Lk, d);
|
|
@@ -14672,9 +14672,9 @@ function $k(n = []) {
|
|
|
14672
14672
|
}, e), n = n.sort((m, g) => m[0] > g[0] ? 1 : -1);
|
|
14673
14673
|
for (let m = 0; m < n.length; m++) {
|
|
14674
14674
|
const g = n[m][0], v = n[m][1] ? {
|
|
14675
|
-
[Rk]: !0
|
|
14676
|
-
} : {
|
|
14677
14675
|
[Dk]: !0
|
|
14676
|
+
} : {
|
|
14677
|
+
[Rk]: !0
|
|
14678
14678
|
};
|
|
14679
14679
|
g.indexOf("-") >= 0 ? v[ea] = !0 : Zt.test(g) ? en.test(g) ? v[pr] = !0 : v[Ql] = !0 : v[Xl] = !0, ed(t, g, g, v);
|
|
14680
14680
|
}
|
|
@@ -14977,40 +14977,40 @@ const rd = Ei("email", {
|
|
|
14977
14977
|
function Hk({
|
|
14978
14978
|
groups: n
|
|
14979
14979
|
}) {
|
|
14980
|
-
const e = n.domain.concat([Us, Ks, bn, qs, Js, Gs, Ys, Xs, wt, Qa, yr, Qs, Zs, ei, zt, ni, wr, ti]), t = [js, Cn, ec, $t, tc, yr, vr, nc, oc, _s, Ps, mr, gr, Ns, Os,
|
|
14981
|
-
|
|
14980
|
+
const e = n.domain.concat([Us, Ks, bn, qs, Js, Gs, Ys, Xs, wt, Qa, yr, Qs, Zs, ei, zt, ni, wr, ti]), t = [js, Cn, ec, $t, tc, yr, vr, nc, oc, _s, Ps, mr, gr, Ns, Os, Ds, Rs, Ls, Bs, $s, zs, Fs, Hs, Vs, Ws], o = [Us, js, Ks, qs, Js, Gs, Ys, Xs, wt, mr, gr, yr, Qs, Zs, ei, vr, zt, ni, wr, ti], r = vt(), s = L(r, wr);
|
|
14981
|
+
ie(s, o, s), ie(s, n.domain, s);
|
|
14982
14982
|
const i = vt(), l = vt(), a = vt();
|
|
14983
|
-
|
|
14983
|
+
ie(r, n.domain, i), ie(r, n.scheme, l), ie(r, n.slashscheme, a), ie(i, o, s), ie(i, n.domain, i);
|
|
14984
14984
|
const c = L(i, bn);
|
|
14985
14985
|
L(s, bn, c), L(l, bn, c), L(a, bn, c);
|
|
14986
14986
|
const u = L(s, $t);
|
|
14987
|
-
|
|
14987
|
+
ie(u, o, s), ie(u, n.domain, s);
|
|
14988
14988
|
const d = vt();
|
|
14989
|
-
|
|
14989
|
+
ie(c, n.domain, d), ie(d, n.domain, d);
|
|
14990
14990
|
const h = L(d, $t);
|
|
14991
|
-
|
|
14991
|
+
ie(h, n.domain, d);
|
|
14992
14992
|
const f = vt(rd);
|
|
14993
|
-
|
|
14993
|
+
ie(h, n.tld, f), ie(h, n.utld, f), L(c, _r, f);
|
|
14994
14994
|
const p = L(d, wt);
|
|
14995
|
-
L(p, wt, p),
|
|
14995
|
+
L(p, wt, p), ie(p, n.domain, d), ie(f, n.domain, d), L(f, $t, h), L(f, wt, p);
|
|
14996
14996
|
const m = L(f, Cn);
|
|
14997
|
-
|
|
14997
|
+
ie(m, n.numeric, rd);
|
|
14998
14998
|
const g = L(i, wt), y = L(i, $t);
|
|
14999
|
-
L(g, wt, g),
|
|
14999
|
+
L(g, wt, g), ie(g, n.domain, i), ie(y, o, s), ie(y, n.domain, i);
|
|
15000
15000
|
const v = vt(es);
|
|
15001
|
-
|
|
15001
|
+
ie(y, n.tld, v), ie(y, n.utld, v), ie(v, n.domain, i), ie(v, o, s), L(v, $t, y), L(v, wt, g), L(v, bn, c);
|
|
15002
15002
|
const w = L(v, Cn), k = vt(es);
|
|
15003
|
-
|
|
15003
|
+
ie(w, n.numeric, k);
|
|
15004
15004
|
const C = vt(es), T = vt();
|
|
15005
|
-
|
|
15006
|
-
const x = L(l, Cn), M = L(a, Cn), E = L(M, zt),
|
|
15007
|
-
|
|
15005
|
+
ie(C, e, C), ie(C, t, T), ie(T, e, C), ie(T, t, T), L(v, zt, C), L(k, zt, C);
|
|
15006
|
+
const x = L(l, Cn), M = L(a, Cn), E = L(M, zt), D = L(E, zt);
|
|
15007
|
+
ie(l, n.domain, i), L(l, $t, y), L(l, wt, g), ie(a, n.domain, i), L(a, $t, y), L(a, wt, g), ie(x, n.domain, C), L(x, zt, C), L(x, vr, C), ie(D, n.domain, C), ie(D, e, C), L(D, zt, C);
|
|
15008
15008
|
const P = [
|
|
15009
15009
|
[mr, gr],
|
|
15010
15010
|
// {}
|
|
15011
15011
|
[Os, Ns],
|
|
15012
15012
|
// []
|
|
15013
|
-
[
|
|
15013
|
+
[Ds, Rs],
|
|
15014
15014
|
// ()
|
|
15015
15015
|
[_s, Ps],
|
|
15016
15016
|
// <>
|
|
@@ -15024,12 +15024,12 @@ function Hk({
|
|
|
15024
15024
|
// <>
|
|
15025
15025
|
];
|
|
15026
15026
|
for (let _ = 0; _ < P.length; _++) {
|
|
15027
|
-
const [$,
|
|
15028
|
-
L(T, $, q), L(q,
|
|
15027
|
+
const [$, W] = P[_], q = L(C, $);
|
|
15028
|
+
L(T, $, q), L(q, W, C);
|
|
15029
15029
|
const ne = vt(es);
|
|
15030
|
-
|
|
15030
|
+
ie(q, e, ne);
|
|
15031
15031
|
const Z = vt();
|
|
15032
|
-
|
|
15032
|
+
ie(q, t), ie(ne, e, ne), ie(ne, t, Z), ie(Z, e, ne), ie(Z, t, Z), L(ne, W, C), L(Z, W, C);
|
|
15033
15033
|
}
|
|
15034
15034
|
return L(r, _r, v), L(r, Za, Fk), {
|
|
15035
15035
|
start: r,
|
|
@@ -15352,7 +15352,7 @@ var eb = Wo.create({
|
|
|
15352
15352
|
},
|
|
15353
15353
|
addPasteRules() {
|
|
15354
15354
|
return [
|
|
15355
|
-
|
|
15355
|
+
Rr({
|
|
15356
15356
|
find: (n) => {
|
|
15357
15357
|
const e = [];
|
|
15358
15358
|
if (n) {
|
|
@@ -15928,7 +15928,7 @@ function ts(n, e) {
|
|
|
15928
15928
|
const t = n == "vert" ? e > 0 ? "down" : "up" : e > 0 ? "right" : "left";
|
|
15929
15929
|
return function(o, r, s) {
|
|
15930
15930
|
let i = o.selection, l = e > 0 ? i.$to : i.$from, a = i.empty;
|
|
15931
|
-
if (i instanceof
|
|
15931
|
+
if (i instanceof re) {
|
|
15932
15932
|
if (!s.endOfTextblock(t) || l.depth == 0)
|
|
15933
15933
|
return !1;
|
|
15934
15934
|
a = !1, l = o.doc.resolve(e > 0 ? l.after() : l.before());
|
|
@@ -15952,11 +15952,11 @@ function mb(n, e) {
|
|
|
15952
15952
|
let { $from: t } = n.state.selection, o = t.parent.contentMatchAt(t.index()).findWrapping(n.state.schema.nodes.text);
|
|
15953
15953
|
if (!o)
|
|
15954
15954
|
return !1;
|
|
15955
|
-
let r =
|
|
15955
|
+
let r = R.empty;
|
|
15956
15956
|
for (let i = o.length - 1; i >= 0; i--)
|
|
15957
|
-
r =
|
|
15957
|
+
r = R.from(o[i].createAndFill(null, r));
|
|
15958
15958
|
let s = n.state.tr.replace(t.pos, t.pos, new j(r, 0, 0));
|
|
15959
|
-
return s.setSelection(
|
|
15959
|
+
return s.setSelection(re.near(s.doc.resolve(t.pos + 1))), n.dispatch(s), !1;
|
|
15960
15960
|
}
|
|
15961
15961
|
function gb(n) {
|
|
15962
15962
|
if (!(n.selection instanceof Ce))
|
|
@@ -16697,7 +16697,7 @@ const Nb = va({ phase: "capture" }, (n) => {
|
|
|
16697
16697
|
);
|
|
16698
16698
|
}
|
|
16699
16699
|
});
|
|
16700
|
-
function
|
|
16700
|
+
function Db(n) {
|
|
16701
16701
|
return n.trimEnd().split(/\r?\n/).map((e) => `<p>${e.replace(/&/g, "&").replace(/</g, "<").replace(/>/g, ">") || ""}</p>`).join("");
|
|
16702
16702
|
}
|
|
16703
16703
|
function Jp(n) {
|
|
@@ -16914,7 +16914,7 @@ function Uo() {
|
|
|
16914
16914
|
};
|
|
16915
16915
|
}
|
|
16916
16916
|
const Gp = 1, Yp = "Synced", gd = "application/x-woven-canvas", Xp = ft((n) => n.with(fe, hi));
|
|
16917
|
-
function
|
|
16917
|
+
function Rb(n) {
|
|
16918
16918
|
const e = [...Xp.current(n)];
|
|
16919
16919
|
if (e.length === 0) return null;
|
|
16920
16920
|
const { componentsById: t } = Fo(n), o = new Map([...t].filter(([, a]) => a.sync === "document")), r = Ht._getComponentId(n), s = [], i = En.zero();
|
|
@@ -17068,7 +17068,7 @@ function Fb(n, e = {}) {
|
|
|
17068
17068
|
if (l.editor.value || !f.clipboardData) return !1;
|
|
17069
17069
|
const p = r();
|
|
17070
17070
|
if (!p) return !1;
|
|
17071
|
-
const m = p._getContext(), g =
|
|
17071
|
+
const m = p._getContext(), g = Rb(m);
|
|
17072
17072
|
return g ? (f.clipboardData.setData(gd, JSON.stringify(g)), f.clipboardData.setData("text/plain", `${g.entities.length} block${g.entities.length === 1 ? "" : "s"}`), f.preventDefault(), !0) : !1;
|
|
17073
17073
|
}
|
|
17074
17074
|
function u(f) {
|
|
@@ -17081,7 +17081,7 @@ function Fb(n, e = {}) {
|
|
|
17081
17081
|
});
|
|
17082
17082
|
}
|
|
17083
17083
|
async function h(f) {
|
|
17084
|
-
var P, _, $,
|
|
17084
|
+
var P, _, $, W;
|
|
17085
17085
|
if (l.editor.value) return;
|
|
17086
17086
|
const p = document.activeElement;
|
|
17087
17087
|
if (p instanceof HTMLInputElement || p instanceof HTMLTextAreaElement || p != null && p.isContentEditable)
|
|
@@ -17096,7 +17096,7 @@ function Fb(n, e = {}) {
|
|
|
17096
17096
|
if (!o || !y.trim()) return;
|
|
17097
17097
|
const v = await s();
|
|
17098
17098
|
a = { plainText: y, html: g };
|
|
17099
|
-
const w = of.read(v), k = _e.read(v), C = [k.left + w.position[0] / k.zoom, k.top + w.position[1] / k.zoom], T =
|
|
17099
|
+
const w = of.read(v), k = _e.read(v), C = [k.left + w.position[0] / k.zoom, k.top + w.position[1] / k.zoom], T = Db(y), x = y.length > sa, M = ((W = n.value) == null ? void 0 : W.clientWidth) ?? ri, E = zb(T, x, k.zoom, M), D = cc(
|
|
17100
17100
|
v,
|
|
17101
17101
|
{
|
|
17102
17102
|
block: {
|
|
@@ -17111,7 +17111,7 @@ function Fb(n, e = {}) {
|
|
|
17111
17111
|
},
|
|
17112
17112
|
C
|
|
17113
17113
|
);
|
|
17114
|
-
wa(v, "text") && ze(v,
|
|
17114
|
+
wa(v, "text") && ze(v, D, ba, {}), Fm.spawn(v, { entityId: D, deselectOthers: !0 });
|
|
17115
17115
|
}
|
|
17116
17116
|
Mt(() => {
|
|
17117
17117
|
const f = n.value;
|
|
@@ -17928,29 +17928,29 @@ const i2 = { key: 1 }, l2 = ["innerHTML"], hc = /* @__PURE__ */ U({
|
|
|
17928
17928
|
async function p() {
|
|
17929
17929
|
var q, ne;
|
|
17930
17930
|
d.value && (d.value.style.opacity = "0");
|
|
17931
|
-
const M = await c(), E = fe.read(M, o.entityId),
|
|
17931
|
+
const M = await c(), E = fe.read(M, o.entityId), D = (((q = l.value) == null ? void 0 : q.width) ?? ri) / (((ne = i.value) == null ? void 0 : ne.zoom) ?? 1), P = Math.min(ri, D / 2), _ = Math.max(E.size[0], P), $ = fe.write(M, o.entityId);
|
|
17932
17932
|
$.size = [_, E.size[1]];
|
|
17933
|
-
const
|
|
17934
|
-
|
|
17933
|
+
const W = pt.write(M, o.entityId);
|
|
17934
|
+
W.constrainWidth = !0, Em.spawn(M), requestAnimationFrame(() => {
|
|
17935
17935
|
d.value && (d.value.style.opacity = ""), requestAnimationFrame(() => {
|
|
17936
17936
|
a.updateCounter.value++;
|
|
17937
17937
|
});
|
|
17938
17938
|
});
|
|
17939
17939
|
}
|
|
17940
17940
|
function m(M, E) {
|
|
17941
|
-
var
|
|
17942
|
-
const
|
|
17943
|
-
if (!
|
|
17944
|
-
const P = ((
|
|
17941
|
+
var W, q, ne;
|
|
17942
|
+
const D = s.value;
|
|
17943
|
+
if (!D) return !1;
|
|
17944
|
+
const P = ((W = E.clipboardData) == null ? void 0 : W.getData("text/html")) ?? "", _ = ((q = E.clipboardData) == null ? void 0 : q.getData("text/plain")) ?? "";
|
|
17945
17945
|
if (!/<[^>]+data-pm-slice=/.test(P)) {
|
|
17946
17946
|
E.preventDefault();
|
|
17947
17947
|
const Z = _.trimEnd().split(/\r?\n/).map((Y) => ({
|
|
17948
17948
|
type: "paragraph",
|
|
17949
17949
|
content: Y ? [{ type: "text", text: Y }] : []
|
|
17950
17950
|
}));
|
|
17951
|
-
return (ne = f.value) == null || ne.commands.insertContent(Z), !
|
|
17951
|
+
return (ne = f.value) == null || ne.commands.insertContent(Z), !D.constrainWidth && _.length > sa && p(), !0;
|
|
17952
17952
|
}
|
|
17953
|
-
return !
|
|
17953
|
+
return !D.constrainWidth && _.length > sa && p(), !1;
|
|
17954
17954
|
}
|
|
17955
17955
|
function g() {
|
|
17956
17956
|
var M, E;
|
|
@@ -18000,11 +18000,11 @@ const i2 = { key: 1 }, l2 = ["innerHTML"], hc = /* @__PURE__ */ U({
|
|
|
18000
18000
|
);
|
|
18001
18001
|
async function y(M) {
|
|
18002
18002
|
var _;
|
|
18003
|
-
const E = (_ = u.value) == null ? void 0 : _.position,
|
|
18003
|
+
const E = (_ = u.value) == null ? void 0 : _.position, D = l.value;
|
|
18004
18004
|
await po(), await new Promise(($) => requestAnimationFrame($));
|
|
18005
18005
|
const P = d.value;
|
|
18006
|
-
if (E &&
|
|
18007
|
-
const $ = E[0] +
|
|
18006
|
+
if (E && D && P) {
|
|
18007
|
+
const $ = E[0] + D.left, W = E[1] + D.top, q = M.view.posAtCoords({ left: $, top: W });
|
|
18008
18008
|
if (q) {
|
|
18009
18009
|
M.chain().focus().setTextSelection(q.pos).run();
|
|
18010
18010
|
return;
|
|
@@ -18022,7 +18022,7 @@ const i2 = { key: 1 }, l2 = ["innerHTML"], hc = /* @__PURE__ */ U({
|
|
|
18022
18022
|
rf(_, o.entityId);
|
|
18023
18023
|
return;
|
|
18024
18024
|
}
|
|
18025
|
-
const
|
|
18025
|
+
const W = (Y = d.value) == null ? void 0 : Y.closest(".wov-block"), q = (W == null ? void 0 : W.firstElementChild) ?? d.value;
|
|
18026
18026
|
if (!q) {
|
|
18027
18027
|
console.warn("EditableText: no element to measure");
|
|
18028
18028
|
return;
|
|
@@ -18043,7 +18043,7 @@ const i2 = { key: 1 }, l2 = ["innerHTML"], hc = /* @__PURE__ */ U({
|
|
|
18043
18043
|
const w = I(() => {
|
|
18044
18044
|
const M = s.value;
|
|
18045
18045
|
if (!M) return {};
|
|
18046
|
-
const [E,
|
|
18046
|
+
const [E, D] = o.block.flip, P = E ? -1 : 1, _ = D ? -1 : 1, $ = E || D;
|
|
18047
18047
|
return {
|
|
18048
18048
|
fontFamily: M.fontFamily,
|
|
18049
18049
|
fontSize: `${M.fontSizePx}px`,
|
|
@@ -18068,8 +18068,8 @@ const i2 = { key: 1 }, l2 = ["innerHTML"], hc = /* @__PURE__ */ U({
|
|
|
18068
18068
|
if (o.edited) return;
|
|
18069
18069
|
const E = M.target.closest("a");
|
|
18070
18070
|
if (!E) return;
|
|
18071
|
-
const
|
|
18072
|
-
|
|
18071
|
+
const D = E.getAttribute("href");
|
|
18072
|
+
D && (M.preventDefault(), M.stopPropagation(), window.open(D, "_blank", "noopener,noreferrer"));
|
|
18073
18073
|
}
|
|
18074
18074
|
return Le(() => {
|
|
18075
18075
|
f.value && (a.unregister(), f.value.destroy(), f.value = null);
|
|
@@ -18171,7 +18171,7 @@ const i2 = { key: 1 }, l2 = ["innerHTML"], hc = /* @__PURE__ */ U({
|
|
|
18171
18171
|
class: "wov-shape-content",
|
|
18172
18172
|
style: ge(h.value)
|
|
18173
18173
|
}, [
|
|
18174
|
-
G(hc,
|
|
18174
|
+
G(hc, Re(e, {
|
|
18175
18175
|
"block-element": r.value,
|
|
18176
18176
|
onEditEnd: p
|
|
18177
18177
|
}), null, 16, ["block-element"])
|
|
@@ -18241,7 +18241,7 @@ const i2 = { key: 1 }, l2 = ["innerHTML"], hc = /* @__PURE__ */ U({
|
|
|
18241
18241
|
style: ge({
|
|
18242
18242
|
backgroundImage: `url(${u.value})`
|
|
18243
18243
|
})
|
|
18244
|
-
}, null, 4)) :
|
|
18244
|
+
}, null, 4)) : V("", !0)
|
|
18245
18245
|
]));
|
|
18246
18246
|
}
|
|
18247
18247
|
}), p2 = ["data-text-empty"], m2 = /* @__PURE__ */ U({
|
|
@@ -18275,7 +18275,7 @@ const i2 = { key: 1 }, l2 = ["innerHTML"], hc = /* @__PURE__ */ U({
|
|
|
18275
18275
|
"data-text-empty": r.value || void 0,
|
|
18276
18276
|
style: ge({ width: s.value ? "100%" : "fit-content" })
|
|
18277
18277
|
}, [
|
|
18278
|
-
G(hc,
|
|
18278
|
+
G(hc, Re(e, {
|
|
18279
18279
|
"block-element": t.value,
|
|
18280
18280
|
onEditEnd: B(i)
|
|
18281
18281
|
}), null, 16, ["block-element", "onEditEnd"])
|
|
@@ -18312,11 +18312,11 @@ function tm(n) {
|
|
|
18312
18312
|
return n === "y" ? "height" : "width";
|
|
18313
18313
|
}
|
|
18314
18314
|
const v2 = /* @__PURE__ */ new Set(["top", "bottom"]);
|
|
18315
|
-
function
|
|
18315
|
+
function Rn(n) {
|
|
18316
18316
|
return v2.has(fo(n)) ? "y" : "x";
|
|
18317
18317
|
}
|
|
18318
18318
|
function nm(n) {
|
|
18319
|
-
return em(
|
|
18319
|
+
return em(Rn(n));
|
|
18320
18320
|
}
|
|
18321
18321
|
function w2(n, e, t) {
|
|
18322
18322
|
t === void 0 && (t = !1);
|
|
@@ -18392,7 +18392,7 @@ function xd(n, e, t) {
|
|
|
18392
18392
|
reference: o,
|
|
18393
18393
|
floating: r
|
|
18394
18394
|
} = n;
|
|
18395
|
-
const s =
|
|
18395
|
+
const s = Rn(e), i = nm(e), l = tm(i), a = fo(e), c = s === "y", u = o.x + o.width / 2 - r.width / 2, d = o.y + o.height / 2 - r.height / 2, h = o[l] / 2 - r[l] / 2;
|
|
18396
18396
|
let f;
|
|
18397
18397
|
switch (a) {
|
|
18398
18398
|
case "top":
|
|
@@ -18568,40 +18568,40 @@ const A2 = async (n, e, t) => {
|
|
|
18568
18568
|
} = Ai(n, e);
|
|
18569
18569
|
if ((t = s.arrow) != null && t.alignmentOffset)
|
|
18570
18570
|
return {};
|
|
18571
|
-
const y = fo(r), v =
|
|
18571
|
+
const y = fo(r), v = Rn(l), w = fo(l) === l, k = await (a.isRTL == null ? void 0 : a.isRTL(c.floating)), C = h || (w || !m ? [ai(l)] : k2(l)), T = p !== "none";
|
|
18572
18572
|
!h && T && C.push(...C2(l, m, p, k));
|
|
18573
18573
|
const x = [l, ...C], M = await a.detectOverflow(e, g), E = [];
|
|
18574
|
-
let
|
|
18574
|
+
let D = ((o = s.flip) == null ? void 0 : o.overflows) || [];
|
|
18575
18575
|
if (u && E.push(M[y]), d) {
|
|
18576
|
-
const
|
|
18577
|
-
E.push(M[
|
|
18576
|
+
const W = w2(r, i, k);
|
|
18577
|
+
E.push(M[W[0]], M[W[1]]);
|
|
18578
18578
|
}
|
|
18579
|
-
if (
|
|
18579
|
+
if (D = [...D, {
|
|
18580
18580
|
placement: r,
|
|
18581
18581
|
overflows: E
|
|
18582
|
-
}], !E.every((
|
|
18582
|
+
}], !E.every((W) => W <= 0)) {
|
|
18583
18583
|
var P, _;
|
|
18584
|
-
const
|
|
18585
|
-
if (q && (!(d === "alignment" ? v !==
|
|
18584
|
+
const W = (((P = s.flip) == null ? void 0 : P.index) || 0) + 1, q = x[W];
|
|
18585
|
+
if (q && (!(d === "alignment" ? v !== Rn(q) : !1) || // We leave the current main axis only if every placement on that axis
|
|
18586
18586
|
// overflows the main axis.
|
|
18587
|
-
|
|
18587
|
+
D.every((Y) => Rn(Y.placement) === v ? Y.overflows[0] > 0 : !0)))
|
|
18588
18588
|
return {
|
|
18589
18589
|
data: {
|
|
18590
|
-
index:
|
|
18591
|
-
overflows:
|
|
18590
|
+
index: W,
|
|
18591
|
+
overflows: D
|
|
18592
18592
|
},
|
|
18593
18593
|
reset: {
|
|
18594
18594
|
placement: q
|
|
18595
18595
|
}
|
|
18596
18596
|
};
|
|
18597
|
-
let ne = (_ =
|
|
18597
|
+
let ne = (_ = D.filter((Z) => Z.overflows[0] <= 0).sort((Z, Y) => Z.overflows[1] - Y.overflows[1])[0]) == null ? void 0 : _.placement;
|
|
18598
18598
|
if (!ne)
|
|
18599
18599
|
switch (f) {
|
|
18600
18600
|
case "bestFit": {
|
|
18601
18601
|
var $;
|
|
18602
|
-
const Z = ($ =
|
|
18602
|
+
const Z = ($ = D.filter((Y) => {
|
|
18603
18603
|
if (T) {
|
|
18604
|
-
const X =
|
|
18604
|
+
const X = Rn(Y.placement);
|
|
18605
18605
|
return X === v || // Create a bias to the `y` side axis due to horizontal
|
|
18606
18606
|
// reading directions favoring greater width.
|
|
18607
18607
|
X === "y";
|
|
@@ -18631,7 +18631,7 @@ async function N2(n, e) {
|
|
|
18631
18631
|
placement: t,
|
|
18632
18632
|
platform: o,
|
|
18633
18633
|
elements: r
|
|
18634
|
-
} = n, s = await (o.isRTL == null ? void 0 : o.isRTL(r.floating)), i = fo(t), l = Ii(t), a =
|
|
18634
|
+
} = n, s = await (o.isRTL == null ? void 0 : o.isRTL(r.floating)), i = fo(t), l = Ii(t), a = Rn(t) === "y", c = O2.has(i) ? -1 : 1, u = s && a ? -1 : 1, d = Ai(e, n);
|
|
18635
18635
|
let {
|
|
18636
18636
|
mainAxis: h,
|
|
18637
18637
|
crossAxis: f,
|
|
@@ -18653,7 +18653,7 @@ async function N2(n, e) {
|
|
|
18653
18653
|
y: f * u
|
|
18654
18654
|
};
|
|
18655
18655
|
}
|
|
18656
|
-
const
|
|
18656
|
+
const D2 = function(n) {
|
|
18657
18657
|
return n === void 0 && (n = 0), {
|
|
18658
18658
|
name: "offset",
|
|
18659
18659
|
options: n,
|
|
@@ -18675,7 +18675,7 @@ const R2 = function(n) {
|
|
|
18675
18675
|
};
|
|
18676
18676
|
}
|
|
18677
18677
|
};
|
|
18678
|
-
},
|
|
18678
|
+
}, R2 = function(n) {
|
|
18679
18679
|
return n === void 0 && (n = {}), {
|
|
18680
18680
|
name: "shift",
|
|
18681
18681
|
options: n,
|
|
@@ -18704,7 +18704,7 @@ const R2 = function(n) {
|
|
|
18704
18704
|
} = Ai(n, e), u = {
|
|
18705
18705
|
x: t,
|
|
18706
18706
|
y: o
|
|
18707
|
-
}, d = await s.detectOverflow(e, c), h =
|
|
18707
|
+
}, d = await s.detectOverflow(e, c), h = Rn(fo(r)), f = em(h);
|
|
18708
18708
|
let p = u[f], m = u[h];
|
|
18709
18709
|
if (i) {
|
|
18710
18710
|
const y = f === "y" ? "top" : "left", v = f === "y" ? "bottom" : "right", w = p + d[y], k = p - d[v];
|
|
@@ -18750,7 +18750,7 @@ function Gt(n) {
|
|
|
18750
18750
|
function pc(n) {
|
|
18751
18751
|
return Oi() ? n instanceof Node || n instanceof gt(n).Node : !1;
|
|
18752
18752
|
}
|
|
18753
|
-
function
|
|
18753
|
+
function Rt(n) {
|
|
18754
18754
|
return Oi() ? n instanceof Element || n instanceof gt(n).Element : !1;
|
|
18755
18755
|
}
|
|
18756
18756
|
function Kt(n) {
|
|
@@ -18785,7 +18785,7 @@ function Ni(n) {
|
|
|
18785
18785
|
}
|
|
18786
18786
|
const $2 = ["transform", "translate", "scale", "rotate", "perspective"], z2 = ["transform", "translate", "scale", "rotate", "perspective", "filter"], F2 = ["paint", "layout", "strict", "content"];
|
|
18787
18787
|
function mc(n) {
|
|
18788
|
-
const e = gc(), t =
|
|
18788
|
+
const e = gc(), t = Rt(n) ? _t(n) : n;
|
|
18789
18789
|
return $2.some((o) => t[o] ? t[o] !== "none" : !1) || (t.containerType ? t.containerType !== "normal" : !1) || !e && (t.backdropFilter ? t.backdropFilter !== "none" : !1) || !e && (t.filter ? t.filter !== "none" : !1) || z2.some((o) => (t.willChange || "").includes(o)) || F2.some((o) => (t.contain || "").includes(o));
|
|
18790
18790
|
}
|
|
18791
18791
|
function H2(n) {
|
|
@@ -18809,8 +18809,8 @@ function zo(n) {
|
|
|
18809
18809
|
function _t(n) {
|
|
18810
18810
|
return gt(n).getComputedStyle(n);
|
|
18811
18811
|
}
|
|
18812
|
-
function
|
|
18813
|
-
return
|
|
18812
|
+
function Di(n) {
|
|
18813
|
+
return Rt(n) ? {
|
|
18814
18814
|
scrollLeft: n.scrollLeft,
|
|
18815
18815
|
scrollTop: n.scrollTop
|
|
18816
18816
|
} : {
|
|
@@ -18858,9 +18858,9 @@ function rm(n) {
|
|
|
18858
18858
|
};
|
|
18859
18859
|
}
|
|
18860
18860
|
function yc(n) {
|
|
18861
|
-
return
|
|
18861
|
+
return Rt(n) ? n : n.contextElement;
|
|
18862
18862
|
}
|
|
18863
|
-
function
|
|
18863
|
+
function Do(n) {
|
|
18864
18864
|
const e = yc(n);
|
|
18865
18865
|
if (!Kt(e))
|
|
18866
18866
|
return Vt(1);
|
|
@@ -18890,14 +18890,14 @@ function ho(n, e, t, o) {
|
|
|
18890
18890
|
e === void 0 && (e = !1), t === void 0 && (t = !1);
|
|
18891
18891
|
const r = n.getBoundingClientRect(), s = yc(n);
|
|
18892
18892
|
let i = Vt(1);
|
|
18893
|
-
e && (o ?
|
|
18893
|
+
e && (o ? Rt(o) && (i = Do(o)) : i = Do(n));
|
|
18894
18894
|
const l = U2(s, t, o) ? sm(s) : Vt(0);
|
|
18895
18895
|
let a = (r.left + l.x) / i.x, c = (r.top + l.y) / i.y, u = r.width / i.x, d = r.height / i.y;
|
|
18896
18896
|
if (s) {
|
|
18897
|
-
const h = gt(s), f = o &&
|
|
18897
|
+
const h = gt(s), f = o && Rt(o) ? gt(o) : o;
|
|
18898
18898
|
let p = h, m = aa(p);
|
|
18899
18899
|
for (; m && o && f !== p; ) {
|
|
18900
|
-
const g =
|
|
18900
|
+
const g = Do(m), y = m.getBoundingClientRect(), v = _t(m), w = y.left + (m.clientLeft + parseFloat(v.paddingLeft)) * g.x, k = y.top + (m.clientTop + parseFloat(v.paddingTop)) * g.y;
|
|
18901
18901
|
a *= g.x, c *= g.y, u *= g.x, d *= g.y, a += w, c += k, p = gt(m), m = aa(p);
|
|
18902
18902
|
}
|
|
18903
18903
|
}
|
|
@@ -18908,12 +18908,12 @@ function ho(n, e, t, o) {
|
|
|
18908
18908
|
y: c
|
|
18909
18909
|
});
|
|
18910
18910
|
}
|
|
18911
|
-
function
|
|
18912
|
-
const t =
|
|
18911
|
+
function Ri(n, e) {
|
|
18912
|
+
const t = Di(n).scrollLeft;
|
|
18913
18913
|
return e ? e.left + t : ho(Gt(n)).left + t;
|
|
18914
18914
|
}
|
|
18915
18915
|
function im(n, e) {
|
|
18916
|
-
const t = n.getBoundingClientRect(), o = t.left + e.scrollLeft -
|
|
18916
|
+
const t = n.getBoundingClientRect(), o = t.left + e.scrollLeft - Ri(n, t), r = t.top + e.scrollTop;
|
|
18917
18917
|
return {
|
|
18918
18918
|
x: o,
|
|
18919
18919
|
y: r
|
|
@@ -18934,9 +18934,9 @@ function j2(n) {
|
|
|
18934
18934
|
scrollTop: 0
|
|
18935
18935
|
}, c = Vt(1);
|
|
18936
18936
|
const u = Vt(0), d = Kt(o);
|
|
18937
|
-
if ((d || !d && !s) && ((vo(o) !== "body" || Ur(i)) && (a =
|
|
18937
|
+
if ((d || !d && !s) && ((vo(o) !== "body" || Ur(i)) && (a = Di(o)), Kt(o))) {
|
|
18938
18938
|
const f = ho(o);
|
|
18939
|
-
c =
|
|
18939
|
+
c = Do(o), u.x = f.x + o.clientLeft, u.y = f.y + o.clientTop;
|
|
18940
18940
|
}
|
|
18941
18941
|
const h = i && !d && !s ? im(i, a) : Vt(0);
|
|
18942
18942
|
return {
|
|
@@ -18950,8 +18950,8 @@ function K2(n) {
|
|
|
18950
18950
|
return Array.from(n.getClientRects());
|
|
18951
18951
|
}
|
|
18952
18952
|
function q2(n) {
|
|
18953
|
-
const e = Gt(n), t =
|
|
18954
|
-
let i = -t.scrollLeft +
|
|
18953
|
+
const e = Gt(n), t = Di(n), o = n.ownerDocument.body, r = oo(e.scrollWidth, e.clientWidth, o.scrollWidth, o.clientWidth), s = oo(e.scrollHeight, e.clientHeight, o.scrollHeight, o.clientHeight);
|
|
18954
|
+
let i = -t.scrollLeft + Ri(n);
|
|
18955
18955
|
const l = -t.scrollTop;
|
|
18956
18956
|
return _t(o).direction === "rtl" && (i += oo(e.clientWidth, o.clientWidth) - r), {
|
|
18957
18957
|
width: r,
|
|
@@ -18969,7 +18969,7 @@ function J2(n, e) {
|
|
|
18969
18969
|
const u = gc();
|
|
18970
18970
|
(!u || u && e === "fixed") && (l = r.offsetLeft, a = r.offsetTop);
|
|
18971
18971
|
}
|
|
18972
|
-
const c =
|
|
18972
|
+
const c = Ri(o);
|
|
18973
18973
|
if (c <= 0) {
|
|
18974
18974
|
const u = o.ownerDocument, d = u.body, h = getComputedStyle(d), f = u.compatMode === "CSS1Compat" && parseFloat(h.marginLeft) + parseFloat(h.marginRight) || 0, p = Math.abs(o.clientWidth - d.clientWidth - f);
|
|
18975
18975
|
p <= Cd && (s -= p);
|
|
@@ -18983,7 +18983,7 @@ function J2(n, e) {
|
|
|
18983
18983
|
}
|
|
18984
18984
|
const G2 = /* @__PURE__ */ new Set(["absolute", "fixed"]);
|
|
18985
18985
|
function Y2(n, e) {
|
|
18986
|
-
const t = ho(n, !0, e === "fixed"), o = t.top + n.clientTop, r = t.left + n.clientLeft, s = Kt(n) ?
|
|
18986
|
+
const t = ho(n, !0, e === "fixed"), o = t.top + n.clientTop, r = t.left + n.clientLeft, s = Kt(n) ? Do(n) : Vt(1), i = n.clientWidth * s.x, l = n.clientHeight * s.y, a = r * s.x, c = o * s.y;
|
|
18987
18987
|
return {
|
|
18988
18988
|
width: i,
|
|
18989
18989
|
height: l,
|
|
@@ -18997,7 +18997,7 @@ function Md(n, e, t) {
|
|
|
18997
18997
|
o = J2(n, t);
|
|
18998
18998
|
else if (e === "document")
|
|
18999
18999
|
o = q2(Gt(n));
|
|
19000
|
-
else if (
|
|
19000
|
+
else if (Rt(e))
|
|
19001
19001
|
o = Y2(e, t);
|
|
19002
19002
|
else {
|
|
19003
19003
|
const r = sm(n);
|
|
@@ -19012,16 +19012,16 @@ function Md(n, e, t) {
|
|
|
19012
19012
|
}
|
|
19013
19013
|
function lm(n, e) {
|
|
19014
19014
|
const t = Fn(n);
|
|
19015
|
-
return t === e || !
|
|
19015
|
+
return t === e || !Rt(t) || zo(t) ? !1 : _t(t).position === "fixed" || lm(t, e);
|
|
19016
19016
|
}
|
|
19017
19017
|
function X2(n, e) {
|
|
19018
19018
|
const t = e.get(n);
|
|
19019
19019
|
if (t)
|
|
19020
19020
|
return t;
|
|
19021
|
-
let o = Br(n, [], !1).filter((l) =>
|
|
19021
|
+
let o = Br(n, [], !1).filter((l) => Rt(l) && vo(l) !== "body"), r = null;
|
|
19022
19022
|
const s = _t(n).position === "fixed";
|
|
19023
19023
|
let i = s ? Fn(n) : n;
|
|
19024
|
-
for (;
|
|
19024
|
+
for (; Rt(i) && !zo(i); ) {
|
|
19025
19025
|
const l = _t(i), a = mc(i);
|
|
19026
19026
|
!a && l.position === "fixed" && (r = null), (s ? !a && !r : !a && l.position === "static" && !!r && G2.has(r.position) || Ur(i) && !a && lm(n, i)) ? o = o.filter((u) => u !== i) : r = l, i = Fn(i);
|
|
19027
19027
|
}
|
|
@@ -19063,10 +19063,10 @@ function ex(n, e, t) {
|
|
|
19063
19063
|
};
|
|
19064
19064
|
const a = Vt(0);
|
|
19065
19065
|
function c() {
|
|
19066
|
-
a.x =
|
|
19066
|
+
a.x = Ri(r);
|
|
19067
19067
|
}
|
|
19068
19068
|
if (o || !o && !s)
|
|
19069
|
-
if ((vo(e) !== "body" || Ur(r)) && (l =
|
|
19069
|
+
if ((vo(e) !== "body" || Ur(r)) && (l = Di(e)), o) {
|
|
19070
19070
|
const f = ho(e, !0, s, e);
|
|
19071
19071
|
a.x = f.x + e.clientLeft, a.y = f.y + e.clientTop;
|
|
19072
19072
|
} else r && c();
|
|
@@ -19097,7 +19097,7 @@ function am(n, e) {
|
|
|
19097
19097
|
if (!Kt(n)) {
|
|
19098
19098
|
let r = Fn(n);
|
|
19099
19099
|
for (; r && !zo(r); ) {
|
|
19100
|
-
if (
|
|
19100
|
+
if (Rt(r) && !wl(r))
|
|
19101
19101
|
return r;
|
|
19102
19102
|
r = Fn(r);
|
|
19103
19103
|
}
|
|
@@ -19131,8 +19131,8 @@ const ox = {
|
|
|
19131
19131
|
getElementRects: tx,
|
|
19132
19132
|
getClientRects: K2,
|
|
19133
19133
|
getDimensions: Z2,
|
|
19134
|
-
getScale:
|
|
19135
|
-
isElement:
|
|
19134
|
+
getScale: Do,
|
|
19135
|
+
isElement: Rt,
|
|
19136
19136
|
isRTL: nx
|
|
19137
19137
|
};
|
|
19138
19138
|
function cm(n, e) {
|
|
@@ -19220,7 +19220,7 @@ function _i(n, e, t, o) {
|
|
|
19220
19220
|
}), d == null || d(), (y = f) == null || y.disconnect(), f = null, a && cancelAnimationFrame(p);
|
|
19221
19221
|
};
|
|
19222
19222
|
}
|
|
19223
|
-
const jo =
|
|
19223
|
+
const jo = D2, Ko = R2, qo = I2, sx = (n, e, t) => {
|
|
19224
19224
|
const o = /* @__PURE__ */ new Map(), r = {
|
|
19225
19225
|
platform: ox,
|
|
19226
19226
|
...t
|
|
@@ -19365,8 +19365,8 @@ const lx = ["menu-open"], Tt = /* @__PURE__ */ U({
|
|
|
19365
19365
|
u.value = !1;
|
|
19366
19366
|
}
|
|
19367
19367
|
function g(w) {
|
|
19368
|
-
var M, E,
|
|
19369
|
-
const k = w.target, C = (M = d.value) == null ? void 0 : M.contains(k), T = (E = h.value) == null ? void 0 : E.contains(k), x = (
|
|
19368
|
+
var M, E, D;
|
|
19369
|
+
const k = w.target, C = (M = d.value) == null ? void 0 : M.contains(k), T = (E = h.value) == null ? void 0 : E.contains(k), x = (D = k.closest) == null ? void 0 : D.call(k, ".wov-menu-dropdown");
|
|
19370
19370
|
!C && !T && !x && m();
|
|
19371
19371
|
}
|
|
19372
19372
|
function y() {
|
|
@@ -19385,7 +19385,7 @@ const lx = ["menu-open"], Tt = /* @__PURE__ */ U({
|
|
|
19385
19385
|
ref: d,
|
|
19386
19386
|
class: Ie(["wov-menu-dropdown-trigger", { "is-open": u.value }]),
|
|
19387
19387
|
"menu-open": u.value || void 0,
|
|
19388
|
-
onMousedown: k[0] || (k[0] =
|
|
19388
|
+
onMousedown: k[0] || (k[0] = Dt(() => {
|
|
19389
19389
|
}, ["prevent"])),
|
|
19390
19390
|
onClick: p,
|
|
19391
19391
|
onMouseenter: y,
|
|
@@ -19405,8 +19405,8 @@ const lx = ["menu-open"], Tt = /* @__PURE__ */ U({
|
|
|
19405
19405
|
style: ge(B(f))
|
|
19406
19406
|
}, [
|
|
19407
19407
|
de(w.$slots, "dropdown", { close: m })
|
|
19408
|
-
], 4)) :
|
|
19409
|
-
], 8, ["to"])) :
|
|
19408
|
+
], 4)) : V("", !0)
|
|
19409
|
+
], 8, ["to"])) : V("", !0)
|
|
19410
19410
|
], 64));
|
|
19411
19411
|
}
|
|
19412
19412
|
}), ax = {}, cx = {
|
|
@@ -19596,7 +19596,7 @@ const Et = /* @__PURE__ */ mo(ax, [["render", ux]]), dx = { class: "wov-menu-but
|
|
|
19596
19596
|
key: a.value,
|
|
19597
19597
|
class: Ie(["wov-menu-option wov-arrow-thickness-option", { "is-active": r.value === a.value }]),
|
|
19598
19598
|
onClick: (c) => s(a.value)
|
|
19599
|
-
},
|
|
19599
|
+
}, De(a.label), 11, gx)), 64))
|
|
19600
19600
|
]),
|
|
19601
19601
|
_: 1
|
|
19602
19602
|
}));
|
|
@@ -19727,7 +19727,7 @@ const Et = /* @__PURE__ */ mo(ax, [["render", ux]]), dx = { class: "wov-menu-but
|
|
|
19727
19727
|
ref: i,
|
|
19728
19728
|
class: "wov-color-picker-selector",
|
|
19729
19729
|
style: ge({ backgroundColor: f.value }),
|
|
19730
|
-
onPointerdown:
|
|
19730
|
+
onPointerdown: Dt(w, ["prevent"])
|
|
19731
19731
|
}, [
|
|
19732
19732
|
b("div", xx, [
|
|
19733
19733
|
b("div", {
|
|
@@ -19757,7 +19757,7 @@ const Et = /* @__PURE__ */ mo(ax, [["render", ux]]), dx = { class: "wov-menu-but
|
|
|
19757
19757
|
thumbColor: p.value,
|
|
19758
19758
|
background: g.value,
|
|
19759
19759
|
class: "wov-color-picker-opacity"
|
|
19760
|
-
}, null, 8, ["modelValue", "thumbColor", "background"])) :
|
|
19760
|
+
}, null, 8, ["modelValue", "thumbColor", "background"])) : V("", !0)
|
|
19761
19761
|
])
|
|
19762
19762
|
]);
|
|
19763
19763
|
};
|
|
@@ -19834,17 +19834,17 @@ const Et = /* @__PURE__ */ mo(ax, [["render", ux]]), dx = { class: "wov-menu-but
|
|
|
19834
19834
|
key: g,
|
|
19835
19835
|
class: Ie(["wov-color-bubble", { selected: c(g) }]),
|
|
19836
19836
|
style: ge({ backgroundColor: g }),
|
|
19837
|
-
onMousedown: m[1] || (m[1] =
|
|
19837
|
+
onMousedown: m[1] || (m[1] = Dt(() => {
|
|
19838
19838
|
}, ["prevent"])),
|
|
19839
19839
|
onClick: (y) => d(g)
|
|
19840
19840
|
}, null, 46, Ex))), 128)),
|
|
19841
19841
|
n.withPicker ? (S(), A("div", {
|
|
19842
19842
|
key: 0,
|
|
19843
19843
|
class: Ie(["wov-color-bubble wov-rainbow-bubble", { selected: u() }]),
|
|
19844
|
-
onMousedown: m[2] || (m[2] =
|
|
19844
|
+
onMousedown: m[2] || (m[2] = Dt(() => {
|
|
19845
19845
|
}, ["prevent"])),
|
|
19846
19846
|
onClick: h
|
|
19847
|
-
}, null, 34)) :
|
|
19847
|
+
}, null, 34)) : V("", !0)
|
|
19848
19848
|
]))
|
|
19849
19849
|
]));
|
|
19850
19850
|
}
|
|
@@ -19854,7 +19854,7 @@ const Et = /* @__PURE__ */ mo(ax, [["render", ux]]), dx = { class: "wov-menu-but
|
|
|
19854
19854
|
entityIds: {}
|
|
19855
19855
|
},
|
|
19856
19856
|
setup(n) {
|
|
19857
|
-
const e = n, { nextEditorTick: t } = Ee(), o = Wn(() => e.entityIds,
|
|
19857
|
+
const e = n, { nextEditorTick: t } = Ee(), o = Wn(() => e.entityIds, Ro), r = I(() => {
|
|
19858
19858
|
const c = /* @__PURE__ */ new Set();
|
|
19859
19859
|
for (const u of o.value.values())
|
|
19860
19860
|
if (u) {
|
|
@@ -19876,7 +19876,7 @@ const Et = /* @__PURE__ */ mo(ax, [["render", ux]]), dx = { class: "wov-menu-but
|
|
|
19876
19876
|
const u = Lr(c);
|
|
19877
19877
|
t((d) => {
|
|
19878
19878
|
for (const h of e.entityIds)
|
|
19879
|
-
|
|
19879
|
+
Ro.fromHex(d, h, u);
|
|
19880
19880
|
});
|
|
19881
19881
|
}
|
|
19882
19882
|
return (c, u) => (S(), K(Tt, { title: "Color" }, {
|
|
@@ -19955,14 +19955,14 @@ const Et = /* @__PURE__ */ mo(ax, [["render", ux]]), dx = { class: "wov-menu-but
|
|
|
19955
19955
|
ref: r,
|
|
19956
19956
|
class: "wov-menu-tooltip",
|
|
19957
19957
|
style: ge(B(i))
|
|
19958
|
-
},
|
|
19958
|
+
}, De((u = B(e)) == null ? void 0 : u.text), 5)) : V("", !0)
|
|
19959
19959
|
];
|
|
19960
19960
|
}),
|
|
19961
19961
|
_: 1
|
|
19962
19962
|
})
|
|
19963
|
-
], 8, ["to"])) :
|
|
19963
|
+
], 8, ["to"])) : V("", !0);
|
|
19964
19964
|
}
|
|
19965
|
-
}), Ox = { class: "wov-menu-button" }, Nx = ["onClick"],
|
|
19965
|
+
}), Ox = { class: "wov-menu-button" }, Nx = ["onClick"], Dx = /* @__PURE__ */ U({
|
|
19966
19966
|
__name: "PenStrokeThicknessButton",
|
|
19967
19967
|
props: {
|
|
19968
19968
|
entityIds: {}
|
|
@@ -20033,12 +20033,12 @@ const Et = /* @__PURE__ */ mo(ax, [["render", ux]]), dx = { class: "wov-menu-but
|
|
|
20033
20033
|
key: c.value,
|
|
20034
20034
|
class: Ie(["wov-menu-option wov-pen-thickness-option", { "is-active": s.value === c.value }]),
|
|
20035
20035
|
onClick: (u) => i(c.value)
|
|
20036
|
-
},
|
|
20036
|
+
}, De(c.label), 11, Nx)), 64))
|
|
20037
20037
|
]),
|
|
20038
20038
|
_: 1
|
|
20039
20039
|
}));
|
|
20040
20040
|
}
|
|
20041
|
-
}),
|
|
20041
|
+
}), Rx = { class: "wov-fill-color-button" }, _x = { class: "wov-fill-dropdown" }, Px = {
|
|
20042
20042
|
key: 0,
|
|
20043
20043
|
class: "wov-fill-mode-section"
|
|
20044
20044
|
}, Lx = ["title", "onClick"], Bx = {
|
|
@@ -20099,7 +20099,7 @@ const Et = /* @__PURE__ */ mo(ax, [["render", ux]]), dx = { class: "wov-menu-but
|
|
|
20099
20099
|
const h = z(!1);
|
|
20100
20100
|
return (f, p) => (S(), K(Tt, { title: "Fill Color" }, {
|
|
20101
20101
|
button: te(() => [
|
|
20102
|
-
b("div",
|
|
20102
|
+
b("div", Rx, [
|
|
20103
20103
|
p[1] || (p[1] = b("svg", {
|
|
20104
20104
|
viewBox: "0 0 20 20",
|
|
20105
20105
|
class: "wov-fill-color-icon",
|
|
@@ -20122,7 +20122,7 @@ const Et = /* @__PURE__ */ mo(ax, [["render", ux]]), dx = { class: "wov-menu-but
|
|
|
20122
20122
|
]),
|
|
20123
20123
|
dropdown: te(() => [
|
|
20124
20124
|
b("div", _x, [
|
|
20125
|
-
h.value ?
|
|
20125
|
+
h.value ? V("", !0) : (S(), A("div", Px, [
|
|
20126
20126
|
(S(), A(ce, null, Te(r, (m) => b("button", {
|
|
20127
20127
|
key: m.mode,
|
|
20128
20128
|
class: Ie(["wov-fill-mode-option", {
|
|
@@ -20145,7 +20145,7 @@ const Et = /* @__PURE__ */ mo(ax, [["render", ux]]), dx = { class: "wov-menu-but
|
|
|
20145
20145
|
"stroke-dasharray": m.mode === "none" ? "3 3" : ""
|
|
20146
20146
|
}, null, 8, $x)
|
|
20147
20147
|
])),
|
|
20148
|
-
b("span", null,
|
|
20148
|
+
b("span", null, De(m.label), 1)
|
|
20149
20149
|
], 10, Lx)), 64))
|
|
20150
20150
|
])),
|
|
20151
20151
|
G(Pi, {
|
|
@@ -20236,7 +20236,7 @@ const Et = /* @__PURE__ */ mo(ax, [["render", ux]]), dx = { class: "wov-menu-but
|
|
|
20236
20236
|
transform: "translate(2, 2) scale(0.16)"
|
|
20237
20237
|
}, null, 8, Ux)
|
|
20238
20238
|
])),
|
|
20239
|
-
b("span", null,
|
|
20239
|
+
b("span", null, De(u.label), 1)
|
|
20240
20240
|
], 10, Vx))), 128))
|
|
20241
20241
|
])
|
|
20242
20242
|
]),
|
|
@@ -20294,7 +20294,7 @@ const Et = /* @__PURE__ */ mo(ax, [["render", ux]]), dx = { class: "wov-menu-but
|
|
|
20294
20294
|
"stroke-opacity": a.kind === B(bt).None ? 0.3 : 1
|
|
20295
20295
|
}, null, 8, Gx)
|
|
20296
20296
|
])),
|
|
20297
|
-
b("span", null,
|
|
20297
|
+
b("span", null, De(a.label), 1)
|
|
20298
20298
|
], 10, qx)), 64))
|
|
20299
20299
|
]));
|
|
20300
20300
|
}
|
|
@@ -20366,13 +20366,13 @@ const Et = /* @__PURE__ */ mo(ax, [["render", ux]]), dx = { class: "wov-menu-but
|
|
|
20366
20366
|
]),
|
|
20367
20367
|
dropdown: te(() => [
|
|
20368
20368
|
b("div", Qx, [
|
|
20369
|
-
r.value ?
|
|
20369
|
+
r.value ? V("", !0) : (S(), K(Yx, {
|
|
20370
20370
|
key: 0,
|
|
20371
20371
|
currentStyle: a.value,
|
|
20372
20372
|
hasMultipleStyles: c.value,
|
|
20373
20373
|
onChange: d
|
|
20374
20374
|
}, null, 8, ["currentStyle", "hasMultipleStyles"])),
|
|
20375
|
-
r.value ?
|
|
20375
|
+
r.value ? V("", !0) : (S(), A("div", Zx)),
|
|
20376
20376
|
G(Pi, {
|
|
20377
20377
|
currentColor: l.value,
|
|
20378
20378
|
hideHighlight: i.value,
|
|
@@ -20441,7 +20441,7 @@ const Et = /* @__PURE__ */ mo(ax, [["render", ux]]), dx = { class: "wov-menu-but
|
|
|
20441
20441
|
key: c.url,
|
|
20442
20442
|
class: Ie(["wov-tape-image-bubble", { selected: s.value === c.url }]),
|
|
20443
20443
|
style: ge({ backgroundImage: `url(${c.url})` }),
|
|
20444
|
-
onMousedown: a[0] || (a[0] =
|
|
20444
|
+
onMousedown: a[0] || (a[0] = Dt(() => {
|
|
20445
20445
|
}, ["prevent"])),
|
|
20446
20446
|
onClick: (u) => i(c.url)
|
|
20447
20447
|
}, null, 46, oS)), 64))
|
|
@@ -20503,7 +20503,7 @@ const Et = /* @__PURE__ */ mo(ax, [["render", ux]]), dx = { class: "wov-menu-but
|
|
|
20503
20503
|
])]))
|
|
20504
20504
|
]),
|
|
20505
20505
|
_: 1
|
|
20506
|
-
})) :
|
|
20506
|
+
})) : V("", !0);
|
|
20507
20507
|
}
|
|
20508
20508
|
}), Nd = /* @__PURE__ */ U({
|
|
20509
20509
|
__name: "TextBoldButton",
|
|
@@ -20528,7 +20528,7 @@ const Et = /* @__PURE__ */ mo(ax, [["render", ux]]), dx = { class: "wov-menu-but
|
|
|
20528
20528
|
], -1)
|
|
20529
20529
|
])]),
|
|
20530
20530
|
_: 1
|
|
20531
|
-
}, 8, ["class", "onClick"])) :
|
|
20531
|
+
}, 8, ["class", "onClick"])) : V("", !0);
|
|
20532
20532
|
}
|
|
20533
20533
|
});
|
|
20534
20534
|
function cS(n, e) {
|
|
@@ -20727,7 +20727,7 @@ function kS() {
|
|
|
20727
20727
|
return e ? e.fonts.filter((t) => t.selectable) : [];
|
|
20728
20728
|
});
|
|
20729
20729
|
}
|
|
20730
|
-
const bS = { class: "wov-font-family-button" }, xS = { class: "wov-font-family-label" }, SS = { class: "wov-font-list" }, CS = ["onClick"], MS = ["src", "alt"],
|
|
20730
|
+
const bS = { class: "wov-font-family-button" }, xS = { class: "wov-font-family-label" }, SS = { class: "wov-font-list" }, CS = ["onClick"], MS = ["src", "alt"], Dd = /* @__PURE__ */ U({
|
|
20731
20731
|
__name: "TextFontFamilyButton",
|
|
20732
20732
|
props: {
|
|
20733
20733
|
entityIds: {}
|
|
@@ -20755,7 +20755,7 @@ const bS = { class: "wov-font-family-button" }, xS = { class: "wov-font-family-l
|
|
|
20755
20755
|
}, {
|
|
20756
20756
|
button: te(() => [
|
|
20757
20757
|
b("div", bS, [
|
|
20758
|
-
b("span", xS,
|
|
20758
|
+
b("span", xS, De(l.value), 1),
|
|
20759
20759
|
G(Et, { class: "wov-chevron-down" })
|
|
20760
20760
|
])
|
|
20761
20761
|
]),
|
|
@@ -20763,7 +20763,7 @@ const bS = { class: "wov-font-family-button" }, xS = { class: "wov-font-family-l
|
|
|
20763
20763
|
b("div", {
|
|
20764
20764
|
class: "wov-font-family-menu",
|
|
20765
20765
|
onWheel: c,
|
|
20766
|
-
onClick: d[0] || (d[0] =
|
|
20766
|
+
onClick: d[0] || (d[0] = Dt(() => {
|
|
20767
20767
|
}, ["stop"]))
|
|
20768
20768
|
}, [
|
|
20769
20769
|
b("div", SS, [
|
|
@@ -20781,13 +20781,13 @@ const bS = { class: "wov-font-family-button" }, xS = { class: "wov-font-family-l
|
|
|
20781
20781
|
key: 1,
|
|
20782
20782
|
class: "wov-font-name",
|
|
20783
20783
|
style: ge({ fontFamily: h.name })
|
|
20784
|
-
},
|
|
20784
|
+
}, De(h.displayName), 5))
|
|
20785
20785
|
], 10, CS))), 128))
|
|
20786
20786
|
])
|
|
20787
20787
|
], 32)
|
|
20788
20788
|
]),
|
|
20789
20789
|
_: 1
|
|
20790
|
-
})) :
|
|
20790
|
+
})) : V("", !0);
|
|
20791
20791
|
}
|
|
20792
20792
|
}), TS = { class: "wov-font-size-button" }, ES = { class: "wov-font-size-label" }, AS = ["onClick"], IS = {
|
|
20793
20793
|
key: 0,
|
|
@@ -20795,7 +20795,7 @@ const bS = { class: "wov-font-family-button" }, xS = { class: "wov-font-family-l
|
|
|
20795
20795
|
xmlns: "http://www.w3.org/2000/svg",
|
|
20796
20796
|
viewBox: "0 0 448 512",
|
|
20797
20797
|
fill: "currentColor"
|
|
20798
|
-
}, OS = { class: "wov-input-container" }, NS = ["value"],
|
|
20798
|
+
}, OS = { class: "wov-input-container" }, NS = ["value"], Rd = /* @__PURE__ */ U({
|
|
20799
20799
|
__name: "TextFontSizeButton",
|
|
20800
20800
|
props: {
|
|
20801
20801
|
entityIds: {}
|
|
@@ -20834,7 +20834,7 @@ const bS = { class: "wov-font-family-button" }, xS = { class: "wov-font-family-l
|
|
|
20834
20834
|
}, {
|
|
20835
20835
|
button: te(() => [
|
|
20836
20836
|
b("div", TS, [
|
|
20837
|
-
b("span", ES,
|
|
20837
|
+
b("span", ES, De(i.value), 1),
|
|
20838
20838
|
G(Et, { class: "wov-chevron-down" })
|
|
20839
20839
|
])
|
|
20840
20840
|
]),
|
|
@@ -20842,7 +20842,7 @@ const bS = { class: "wov-font-family-button" }, xS = { class: "wov-font-family-l
|
|
|
20842
20842
|
b("div", {
|
|
20843
20843
|
class: "wov-font-size-menu",
|
|
20844
20844
|
onWheel: d,
|
|
20845
|
-
onClick: f[0] || (f[0] =
|
|
20845
|
+
onClick: f[0] || (f[0] = Dt(() => {
|
|
20846
20846
|
}, ["stop"]))
|
|
20847
20847
|
}, [
|
|
20848
20848
|
(S(), A(ce, null, Te(r, (p) => b("div", {
|
|
@@ -20852,11 +20852,11 @@ const bS = { class: "wov-font-family-button" }, xS = { class: "wov-font-family-l
|
|
|
20852
20852
|
}, [
|
|
20853
20853
|
s.value === p.value ? (S(), A("svg", IS, [...f[1] || (f[1] = [
|
|
20854
20854
|
b("path", { d: "M438.6 105.4c12.5 12.5 12.5 32.8 0 45.3l-256 256c-12.5 12.5-32.8 12.5-45.3 0l-128-128c-12.5-12.5-12.5-32.8 0-45.3s32.8-12.5 45.3 0L160 338.7 393.4 105.4c12.5-12.5 32.8-12.5 45.3 0z" }, null, -1)
|
|
20855
|
-
])])) :
|
|
20855
|
+
])])) : V("", !0),
|
|
20856
20856
|
b("span", {
|
|
20857
20857
|
class: "wov-option-label",
|
|
20858
20858
|
style: ge({ fontSize: `${p.displayValue}px` })
|
|
20859
|
-
},
|
|
20859
|
+
}, De(p.label), 5)
|
|
20860
20860
|
], 10, AS)), 64)),
|
|
20861
20861
|
f[3] || (f[3] = b("div", { class: "wov-separator" }, null, -1)),
|
|
20862
20862
|
b("div", OS, [
|
|
@@ -20872,7 +20872,7 @@ const bS = { class: "wov-font-family-button" }, xS = { class: "wov-font-family-l
|
|
|
20872
20872
|
], 32)
|
|
20873
20873
|
]),
|
|
20874
20874
|
_: 1
|
|
20875
|
-
})) :
|
|
20875
|
+
})) : V("", !0);
|
|
20876
20876
|
}
|
|
20877
20877
|
}), _d = /* @__PURE__ */ U({
|
|
20878
20878
|
__name: "TextItalicButton",
|
|
@@ -20897,7 +20897,7 @@ const bS = { class: "wov-font-family-button" }, xS = { class: "wov-font-family-l
|
|
|
20897
20897
|
], -1)
|
|
20898
20898
|
])]),
|
|
20899
20899
|
_: 1
|
|
20900
|
-
}, 8, ["class", "onClick"])) :
|
|
20900
|
+
}, 8, ["class", "onClick"])) : V("", !0);
|
|
20901
20901
|
}
|
|
20902
20902
|
}), Pd = /* @__PURE__ */ U({
|
|
20903
20903
|
__name: "TextUnderlineButton",
|
|
@@ -20922,9 +20922,9 @@ const bS = { class: "wov-font-family-button" }, xS = { class: "wov-font-family-l
|
|
|
20922
20922
|
], -1)
|
|
20923
20923
|
])]),
|
|
20924
20924
|
_: 1
|
|
20925
|
-
}, 8, ["class", "onClick"])) :
|
|
20925
|
+
}, 8, ["class", "onClick"])) : V("", !0);
|
|
20926
20926
|
}
|
|
20927
|
-
}),
|
|
20927
|
+
}), DS = { class: "wov-link-input-container" }, RS = ["onKeydown"], Ld = /* @__PURE__ */ U({
|
|
20928
20928
|
__name: "TextLinkButton",
|
|
20929
20929
|
props: {
|
|
20930
20930
|
entityIds: {}
|
|
@@ -20976,7 +20976,7 @@ const bS = { class: "wov-font-family-button" }, xS = { class: "wov-font-family-l
|
|
|
20976
20976
|
], -1)
|
|
20977
20977
|
])]),
|
|
20978
20978
|
_: 1
|
|
20979
|
-
}, 8, ["class"])) :
|
|
20979
|
+
}, 8, ["class"])) : V("", !0)
|
|
20980
20980
|
], 512),
|
|
20981
20981
|
B(c) ? (S(), K($r, {
|
|
20982
20982
|
key: 0,
|
|
@@ -20988,10 +20988,10 @@ const bS = { class: "wov-font-family-button" }, xS = { class: "wov-font-family-l
|
|
|
20988
20988
|
ref: a,
|
|
20989
20989
|
class: "wov-link-input-dropdown",
|
|
20990
20990
|
style: ge(B(u)),
|
|
20991
|
-
onKeydown: g[2] || (g[2] =
|
|
20991
|
+
onKeydown: g[2] || (g[2] = Dt(() => {
|
|
20992
20992
|
}, ["stop"]))
|
|
20993
20993
|
}, [
|
|
20994
|
-
b("div",
|
|
20994
|
+
b("div", DS, [
|
|
20995
20995
|
Gd(b("input", {
|
|
20996
20996
|
ref_key: "inputRef",
|
|
20997
20997
|
ref: i,
|
|
@@ -20999,10 +20999,10 @@ const bS = { class: "wov-font-family-button" }, xS = { class: "wov-font-family-l
|
|
|
20999
20999
|
class: "wov-link-input",
|
|
21000
21000
|
placeholder: "Paste or type URL",
|
|
21001
21001
|
onKeydown: [
|
|
21002
|
-
Cc(
|
|
21003
|
-
g[1] || (g[1] = Cc(
|
|
21002
|
+
Cc(Dt(h, ["prevent"]), ["enter"]),
|
|
21003
|
+
g[1] || (g[1] = Cc(Dt((y) => r.value = !1, ["prevent"]), ["esc"]))
|
|
21004
21004
|
]
|
|
21005
|
-
}, null, 40,
|
|
21005
|
+
}, null, 40, RS), [
|
|
21006
21006
|
[Yd, s.value]
|
|
21007
21007
|
]),
|
|
21008
21008
|
s.value || B(t).linkHref ? (S(), A("button", {
|
|
@@ -21018,7 +21018,7 @@ const bS = { class: "wov-font-family-button" }, xS = { class: "wov-font-family-l
|
|
|
21018
21018
|
}, [
|
|
21019
21019
|
b("path", { d: "M342.6 150.6c12.5-12.5 12.5-32.8 0-45.3s-32.8-12.5-45.3 0L192 210.7 86.6 105.4c-12.5-12.5-32.8-12.5-45.3 0s-12.5 32.8 0 45.3L146.7 256 41.4 361.4c-12.5 12.5-12.5 32.8 0 45.3s32.8 12.5 45.3 0L192 301.3 297.4 406.6c12.5 12.5 12.5 32.8 0 45.3s32.8 12.5 45.3 0L237.3 256 342.6 150.6z" })
|
|
21020
21020
|
], -1)
|
|
21021
|
-
])])) :
|
|
21021
|
+
])])) : V("", !0),
|
|
21022
21022
|
b("button", {
|
|
21023
21023
|
class: "wov-link-action-button",
|
|
21024
21024
|
title: "Apply link",
|
|
@@ -21033,8 +21033,8 @@ const bS = { class: "wov-font-family-button" }, xS = { class: "wov-font-family-l
|
|
|
21033
21033
|
], -1)
|
|
21034
21034
|
])])
|
|
21035
21035
|
])
|
|
21036
|
-
], 36)) :
|
|
21037
|
-
], 8, ["to"])) :
|
|
21036
|
+
], 36)) : V("", !0)
|
|
21037
|
+
], 8, ["to"])) : V("", !0)
|
|
21038
21038
|
], 64));
|
|
21039
21039
|
}
|
|
21040
21040
|
}), _S = { class: "wov-text-color-button" }, PS = { class: "wov-text-icon-container" }, Bd = /* @__PURE__ */ U({
|
|
@@ -21078,7 +21078,7 @@ const bS = { class: "wov-font-family-button" }, xS = { class: "wov-font-family-l
|
|
|
21078
21078
|
}, null, 8, ["currentColor"])
|
|
21079
21079
|
]),
|
|
21080
21080
|
_: 1
|
|
21081
|
-
})) :
|
|
21081
|
+
})) : V("", !0);
|
|
21082
21082
|
}
|
|
21083
21083
|
}), LS = {
|
|
21084
21084
|
key: 0,
|
|
@@ -21199,7 +21199,7 @@ const bS = { class: "wov-font-family-button" }, xS = { class: "wov-font-family-l
|
|
|
21199
21199
|
])]))
|
|
21200
21200
|
]),
|
|
21201
21201
|
_: 1
|
|
21202
|
-
})) :
|
|
21202
|
+
})) : V("", !0);
|
|
21203
21203
|
}
|
|
21204
21204
|
}), zS = { class: "wov-text-group-button" }, FS = { class: "wov-text-group-dropdown" }, HS = { class: "wov-text-group-row wov-text-group-row-full" }, VS = { class: "wov-text-group-row" }, WS = /* @__PURE__ */ U({
|
|
21205
21205
|
__name: "TextButtonGroup",
|
|
@@ -21231,9 +21231,9 @@ const bS = { class: "wov-font-family-button" }, xS = { class: "wov-font-family-l
|
|
|
21231
21231
|
dropdown: te(() => [
|
|
21232
21232
|
b("div", FS, [
|
|
21233
21233
|
b("div", HS, [
|
|
21234
|
-
G(
|
|
21234
|
+
G(Dd, { entityIds: n.entityIds }, null, 8, ["entityIds"]),
|
|
21235
21235
|
a[1] || (a[1] = b("div", { class: "wov-text-group-spacer" }, null, -1)),
|
|
21236
|
-
G(
|
|
21236
|
+
G(Rd, { entityIds: n.entityIds }, null, 8, ["entityIds"])
|
|
21237
21237
|
]),
|
|
21238
21238
|
b("div", VS, [
|
|
21239
21239
|
G(Nd, { entityIds: n.entityIds }, null, 8, ["entityIds"]),
|
|
@@ -21246,14 +21246,14 @@ const bS = { class: "wov-font-family-button" }, xS = { class: "wov-font-family-l
|
|
|
21246
21246
|
n.showVerticalAlign ? (S(), K($d, {
|
|
21247
21247
|
key: 0,
|
|
21248
21248
|
entityIds: n.entityIds
|
|
21249
|
-
}, null, 8, ["entityIds"])) :
|
|
21249
|
+
}, null, 8, ["entityIds"])) : V("", !0)
|
|
21250
21250
|
])
|
|
21251
21251
|
])
|
|
21252
21252
|
]),
|
|
21253
21253
|
_: 1
|
|
21254
21254
|
})) : (S(), A(ce, { key: 1 }, [
|
|
21255
|
-
G(Rd, { entityIds: n.entityIds }, null, 8, ["entityIds"]),
|
|
21256
21255
|
G(Dd, { entityIds: n.entityIds }, null, 8, ["entityIds"]),
|
|
21256
|
+
G(Rd, { entityIds: n.entityIds }, null, 8, ["entityIds"]),
|
|
21257
21257
|
a[3] || (a[3] = b("div", {
|
|
21258
21258
|
divider: "",
|
|
21259
21259
|
class: "wov-divider"
|
|
@@ -21271,9 +21271,9 @@ const bS = { class: "wov-font-family-button" }, xS = { class: "wov-font-family-l
|
|
|
21271
21271
|
n.showVerticalAlign ? (S(), K($d, {
|
|
21272
21272
|
key: 0,
|
|
21273
21273
|
entityIds: n.entityIds
|
|
21274
|
-
}, null, 8, ["entityIds"])) :
|
|
21274
|
+
}, null, 8, ["entityIds"])) : V("", !0)
|
|
21275
21275
|
], 64))
|
|
21276
|
-
], 64)) :
|
|
21276
|
+
], 64)) : V("", !0);
|
|
21277
21277
|
}
|
|
21278
21278
|
}), US = /* @__PURE__ */ U({
|
|
21279
21279
|
__name: "CanvasBackground",
|
|
@@ -21309,9 +21309,9 @@ const bS = { class: "wov-font-family-button" }, xS = { class: "wov-font-family-l
|
|
|
21309
21309
|
d(M, T / 2, x / 2, C);
|
|
21310
21310
|
else
|
|
21311
21311
|
for (let E = 0; E < k.subdivisionStep; E++)
|
|
21312
|
-
for (let
|
|
21313
|
-
const P = (E + 0.5) * (T / k.subdivisionStep), _ = (
|
|
21314
|
-
d(M, P, _,
|
|
21312
|
+
for (let D = 0; D < k.subdivisionStep; D++) {
|
|
21313
|
+
const P = (E + 0.5) * (T / k.subdivisionStep), _ = (D + 0.5) * (x / k.subdivisionStep), W = E === 0 && D === 0 ? 2 * C : C;
|
|
21314
|
+
d(M, P, _, W);
|
|
21315
21315
|
}
|
|
21316
21316
|
return M.createPattern(u, "repeat");
|
|
21317
21317
|
}
|
|
@@ -21328,7 +21328,7 @@ const bS = { class: "wov-font-family-button" }, xS = { class: "wov-font-family-l
|
|
|
21328
21328
|
if (M.clearRect(0, 0, T, x), M.strokeStyle = k.strokeColor, k.subdivisionStep === 1)
|
|
21329
21329
|
f(M, 0, 0, T, 0, C), f(M, 0, 0, 0, x, C);
|
|
21330
21330
|
else {
|
|
21331
|
-
const E = T / k.subdivisionStep,
|
|
21331
|
+
const E = T / k.subdivisionStep, D = x / k.subdivisionStep;
|
|
21332
21332
|
for (let P = 0; P <= k.subdivisionStep; P++) {
|
|
21333
21333
|
const _ = P * E, $ = P % k.subdivisionStep === 0;
|
|
21334
21334
|
f(
|
|
@@ -21341,7 +21341,7 @@ const bS = { class: "wov-font-family-button" }, xS = { class: "wov-font-family-l
|
|
|
21341
21341
|
);
|
|
21342
21342
|
}
|
|
21343
21343
|
for (let P = 0; P <= k.subdivisionStep; P++) {
|
|
21344
|
-
const _ = P *
|
|
21344
|
+
const _ = P * D, $ = P % k.subdivisionStep === 0;
|
|
21345
21345
|
f(
|
|
21346
21346
|
M,
|
|
21347
21347
|
0,
|
|
@@ -21356,12 +21356,12 @@ const bS = { class: "wov-font-family-button" }, xS = { class: "wov-font-family-l
|
|
|
21356
21356
|
}
|
|
21357
21357
|
function m(v) {
|
|
21358
21358
|
let w = s.value.colWidth, k = s.value.rowHeight;
|
|
21359
|
-
const C = o.value.subdivisionStep, T = l.value.width, x = l.value.height, M = r.value.left, E = r.value.top,
|
|
21360
|
-
let _ = w * C, $ = k * C,
|
|
21359
|
+
const C = o.value.subdivisionStep, T = l.value.width, x = l.value.height, M = r.value.left, E = r.value.top, D = M + T / r.value.zoom, P = E + x / r.value.zoom;
|
|
21360
|
+
let _ = w * C, $ = k * C, W = 0, q = 0, ne = Number.POSITIVE_INFINITY, Z = Number.POSITIVE_INFINITY;
|
|
21361
21361
|
for (; ; ) {
|
|
21362
|
-
_ = C * w, $ = C * k,
|
|
21363
|
-
const yt = Math.ceil(
|
|
21364
|
-
if (Z = Math.round((yt -
|
|
21362
|
+
_ = C * w, $ = C * k, W = Math.floor(M / _) * _, q = Math.floor(E / $) * $;
|
|
21363
|
+
const yt = Math.ceil(D / _) * _, Oe = Math.ceil(P / $) * $;
|
|
21364
|
+
if (Z = Math.round((yt - W) / w), ne = Math.round((Oe - q) / k), Math.max(Z, ne) > 125)
|
|
21365
21365
|
w *= 2, k *= 2;
|
|
21366
21366
|
else
|
|
21367
21367
|
break;
|
|
@@ -21374,7 +21374,7 @@ const bS = { class: "wov-font-family-button" }, xS = { class: "wov-font-family-l
|
|
|
21374
21374
|
X / he
|
|
21375
21375
|
)
|
|
21376
21376
|
);
|
|
21377
|
-
const je = (
|
|
21377
|
+
const je = (W - M - w / 2) * r.value.zoom, be = (q - E - k / 2) * r.value.zoom;
|
|
21378
21378
|
v.save(), v.translate(je, be), v.fillStyle = pe, v.fillRect(
|
|
21379
21379
|
0,
|
|
21380
21380
|
0,
|
|
@@ -21384,12 +21384,12 @@ const bS = { class: "wov-font-family-button" }, xS = { class: "wov-font-family-l
|
|
|
21384
21384
|
}
|
|
21385
21385
|
function g(v) {
|
|
21386
21386
|
let w = s.value.colWidth, k = s.value.rowHeight;
|
|
21387
|
-
const C = o.value.subdivisionStep, T = l.value.width, x = l.value.height, M = r.value.left, E = r.value.top,
|
|
21388
|
-
let _ = w * C, $ = k * C,
|
|
21387
|
+
const C = o.value.subdivisionStep, T = l.value.width, x = l.value.height, M = r.value.left, E = r.value.top, D = M + T / r.value.zoom, P = E + x / r.value.zoom;
|
|
21388
|
+
let _ = w * C, $ = k * C, W = 0, q = 0, ne = Number.POSITIVE_INFINITY, Z = Number.POSITIVE_INFINITY;
|
|
21389
21389
|
for (; ; ) {
|
|
21390
|
-
_ = C * w, $ = C * k,
|
|
21391
|
-
const yt = Math.ceil(
|
|
21392
|
-
if (Z = Math.round((yt -
|
|
21390
|
+
_ = C * w, $ = C * k, W = Math.floor(M / _) * _, q = Math.floor(E / $) * $;
|
|
21391
|
+
const yt = Math.ceil(D / _) * _, Oe = Math.ceil(P / $) * $;
|
|
21392
|
+
if (Z = Math.round((yt - W) / w), ne = Math.round((Oe - q) / k), Math.max(Z, ne) > 200)
|
|
21393
21393
|
w *= 2, k *= 2;
|
|
21394
21394
|
else
|
|
21395
21395
|
break;
|
|
@@ -21402,7 +21402,7 @@ const bS = { class: "wov-font-family-button" }, xS = { class: "wov-font-family-l
|
|
|
21402
21402
|
X / he
|
|
21403
21403
|
)
|
|
21404
21404
|
);
|
|
21405
|
-
const je = (
|
|
21405
|
+
const je = (W - M) * r.value.zoom, be = (q - E) * r.value.zoom;
|
|
21406
21406
|
v.save(), v.translate(je, be), v.fillStyle = pe, v.fillRect(
|
|
21407
21407
|
0,
|
|
21408
21408
|
0,
|
|
@@ -21507,7 +21507,7 @@ const KS = /* @__PURE__ */ U({
|
|
|
21507
21507
|
entityIds: B(r)
|
|
21508
21508
|
}, () => [
|
|
21509
21509
|
G(Ix, { entityIds: B(r) }, null, 8, ["entityIds"])
|
|
21510
|
-
]) :
|
|
21510
|
+
]) : V("", !0),
|
|
21511
21511
|
B(s).has("shape") ? de(c.$slots, "button:shape", {
|
|
21512
21512
|
key: 1,
|
|
21513
21513
|
entityIds: B(r)
|
|
@@ -21515,13 +21515,13 @@ const KS = /* @__PURE__ */ U({
|
|
|
21515
21515
|
G(jx, { entityIds: B(r) }, null, 8, ["entityIds"]),
|
|
21516
21516
|
G(zx, { entityIds: B(r) }, null, 8, ["entityIds"]),
|
|
21517
21517
|
G(eS, { entityIds: B(r) }, null, 8, ["entityIds"])
|
|
21518
|
-
]) :
|
|
21518
|
+
]) : V("", !0),
|
|
21519
21519
|
B(s).has("penStroke") ? de(c.$slots, "button:penStroke", {
|
|
21520
21520
|
key: 2,
|
|
21521
21521
|
entityIds: B(r)
|
|
21522
21522
|
}, () => [
|
|
21523
|
-
G(
|
|
21524
|
-
]) :
|
|
21523
|
+
G(Dx, { entityIds: B(r) }, null, 8, ["entityIds"])
|
|
21524
|
+
]) : V("", !0),
|
|
21525
21525
|
B(s).has("elbowArrow") || B(s).has("arcArrow") ? (S(), A(ce, { key: 3 }, [
|
|
21526
21526
|
de(c.$slots, "button:arrowThickness", { entityIds: B(r) }, () => [
|
|
21527
21527
|
G(yx, { entityIds: B(r) }, null, 8, ["entityIds"])
|
|
@@ -21538,13 +21538,13 @@ const KS = /* @__PURE__ */ U({
|
|
|
21538
21538
|
side: "end"
|
|
21539
21539
|
}, null, 8, ["entityIds"])
|
|
21540
21540
|
])
|
|
21541
|
-
], 64)) :
|
|
21541
|
+
], 64)) : V("", !0),
|
|
21542
21542
|
B(s).has("tape") ? de(c.$slots, "button:tape", {
|
|
21543
21543
|
key: 4,
|
|
21544
21544
|
entityIds: B(r)
|
|
21545
21545
|
}, () => [
|
|
21546
21546
|
G(rS, { entityIds: B(r) }, null, 8, ["entityIds"])
|
|
21547
|
-
]) :
|
|
21547
|
+
]) : V("", !0),
|
|
21548
21548
|
B(s).has("text") ? de(c.$slots, "button:text", {
|
|
21549
21549
|
key: 5,
|
|
21550
21550
|
entityIds: B(r)
|
|
@@ -21553,7 +21553,7 @@ const KS = /* @__PURE__ */ U({
|
|
|
21553
21553
|
entityIds: B(r),
|
|
21554
21554
|
showVerticalAlign: B(s).has("verticalAlign")
|
|
21555
21555
|
}, null, 8, ["entityIds", "showVerticalAlign"])
|
|
21556
|
-
]) :
|
|
21556
|
+
]) : V("", !0),
|
|
21557
21557
|
G(dm)
|
|
21558
21558
|
], 32));
|
|
21559
21559
|
}
|
|
@@ -21573,11 +21573,11 @@ const KS = /* @__PURE__ */ U({
|
|
|
21573
21573
|
Xn(cf, { selectedIds: l, commonComponents: a });
|
|
21574
21574
|
const c = [0, 0, 0, 0];
|
|
21575
21575
|
function u(...T) {
|
|
21576
|
-
let x = 1 / 0, M = 1 / 0, E = -1 / 0,
|
|
21576
|
+
let x = 1 / 0, M = 1 / 0, E = -1 / 0, D = -1 / 0, P = !1;
|
|
21577
21577
|
for (const _ of T) {
|
|
21578
21578
|
if (!_) continue;
|
|
21579
21579
|
const $ = _.getBoundingClientRect();
|
|
21580
|
-
$.width <= 0 || (P = !0, x = Math.min(x, $.left), M = Math.min(M, $.top), E = Math.max(E, $.right),
|
|
21580
|
+
$.width <= 0 || (P = !0, x = Math.min(x, $.left), M = Math.min(M, $.top), E = Math.max(E, $.right), D = Math.max(D, $.bottom));
|
|
21581
21581
|
}
|
|
21582
21582
|
return P ? {
|
|
21583
21583
|
x,
|
|
@@ -21585,9 +21585,9 @@ const KS = /* @__PURE__ */ U({
|
|
|
21585
21585
|
left: x,
|
|
21586
21586
|
top: M,
|
|
21587
21587
|
right: E,
|
|
21588
|
-
bottom:
|
|
21588
|
+
bottom: D,
|
|
21589
21589
|
width: E - x,
|
|
21590
|
-
height:
|
|
21590
|
+
height: D - M,
|
|
21591
21591
|
toJSON: () => ({})
|
|
21592
21592
|
} : null;
|
|
21593
21593
|
}
|
|
@@ -21610,29 +21610,29 @@ const KS = /* @__PURE__ */ U({
|
|
|
21610
21610
|
return {
|
|
21611
21611
|
getBoundingClientRect: () => E
|
|
21612
21612
|
};
|
|
21613
|
-
const
|
|
21614
|
-
if (!
|
|
21613
|
+
const D = d.value;
|
|
21614
|
+
if (!D) return null;
|
|
21615
21615
|
const P = T.getBoundingClientRect();
|
|
21616
21616
|
return {
|
|
21617
21617
|
getBoundingClientRect() {
|
|
21618
21618
|
return {
|
|
21619
|
-
x: P.left +
|
|
21620
|
-
y: P.top +
|
|
21621
|
-
width:
|
|
21622
|
-
height:
|
|
21623
|
-
top: P.top +
|
|
21624
|
-
left: P.left +
|
|
21625
|
-
right: P.left +
|
|
21626
|
-
bottom: P.top +
|
|
21619
|
+
x: P.left + D[0],
|
|
21620
|
+
y: P.top + D[1],
|
|
21621
|
+
width: D[2] - D[0],
|
|
21622
|
+
height: D[3] - D[1],
|
|
21623
|
+
top: P.top + D[1],
|
|
21624
|
+
left: P.left + D[0],
|
|
21625
|
+
right: P.left + D[2],
|
|
21626
|
+
bottom: P.top + D[3]
|
|
21627
21627
|
};
|
|
21628
21628
|
}
|
|
21629
21629
|
};
|
|
21630
21630
|
}), p = z(null), m = {
|
|
21631
21631
|
name: "clampToViewport",
|
|
21632
21632
|
fn({ y: T, rects: x }) {
|
|
21633
|
-
const
|
|
21633
|
+
const D = window.innerHeight - x.floating.height - 8;
|
|
21634
21634
|
return {
|
|
21635
|
-
y: Math.max(8, Math.min(T,
|
|
21635
|
+
y: Math.max(8, Math.min(T, D))
|
|
21636
21636
|
};
|
|
21637
21637
|
}
|
|
21638
21638
|
}, { floatingStyles: g } = Jo(f, p, {
|
|
@@ -21676,7 +21676,7 @@ const KS = /* @__PURE__ */ U({
|
|
|
21676
21676
|
G(KS)
|
|
21677
21677
|
])
|
|
21678
21678
|
])
|
|
21679
|
-
], 4)) :
|
|
21679
|
+
], 4)) : V("", !0)
|
|
21680
21680
|
]),
|
|
21681
21681
|
_: 3
|
|
21682
21682
|
}));
|
|
@@ -21702,8 +21702,8 @@ const KS = /* @__PURE__ */ U({
|
|
|
21702
21702
|
}), (r, s) => (S(), K(ga, { name: "wov-loading-fade" }, {
|
|
21703
21703
|
default: te(() => [
|
|
21704
21704
|
n.isLoading ? (S(), A("div", GS, [
|
|
21705
|
-
b("div", YS,
|
|
21706
|
-
])) :
|
|
21705
|
+
b("div", YS, De(e.value), 1)
|
|
21706
|
+
])) : V("", !0)
|
|
21707
21707
|
]),
|
|
21708
21708
|
_: 1
|
|
21709
21709
|
}));
|
|
@@ -22353,9 +22353,9 @@ const KS = /* @__PURE__ */ U({
|
|
|
22353
22353
|
d.value = "Please enter a valid URL";
|
|
22354
22354
|
return;
|
|
22355
22355
|
}
|
|
22356
|
-
const E = c.value ?? Am(M),
|
|
22357
|
-
if (
|
|
22358
|
-
d.value =
|
|
22356
|
+
const E = c.value ?? Am(M), D = Im(M, E);
|
|
22357
|
+
if (D) {
|
|
22358
|
+
d.value = D;
|
|
22359
22359
|
return;
|
|
22360
22360
|
}
|
|
22361
22361
|
const P = Om(M, E);
|
|
@@ -22386,14 +22386,14 @@ const KS = /* @__PURE__ */ U({
|
|
|
22386
22386
|
_ = 600, $ = 400;
|
|
22387
22387
|
break;
|
|
22388
22388
|
}
|
|
22389
|
-
const
|
|
22389
|
+
const W = await e(), q = _e.read(W), ne = Hn.read(W), Z = q.left + ne.width / q.zoom / 2, Y = q.top + ne.height / q.zoom / 2, X = io.read(W);
|
|
22390
22390
|
X.enabled && (_ = Math.max(X.colWidth, Math.round(_ / X.colWidth) * X.colWidth), $ = Math.max(X.rowHeight, Math.round($ / X.rowHeight) * X.rowHeight));
|
|
22391
|
-
const se = di(
|
|
22392
|
-
ze(
|
|
22393
|
-
const he = fe.write(
|
|
22394
|
-
he.tag = "embed", he.position[0] = Z - _ / 2, he.position[1] = Y - $ / 2, he.size[0] = _, he.size[1] = $, io.snapPosition(
|
|
22395
|
-
const pe = Tl.write(
|
|
22396
|
-
pe.url = M, pe.embedUrl = P, pe.provider = E, ze(
|
|
22391
|
+
const se = di(W);
|
|
22392
|
+
ze(W, se, fe);
|
|
22393
|
+
const he = fe.write(W, se);
|
|
22394
|
+
he.tag = "embed", he.position[0] = Z - _ / 2, he.position[1] = Y - $ / 2, he.size[0] = _, he.size[1] = $, io.snapPosition(W, he.position), ze(W, se, Tl);
|
|
22395
|
+
const pe = Tl.write(W, se);
|
|
22396
|
+
pe.url = M, pe.embedUrl = P, pe.provider = E, ze(W, se, jd, {
|
|
22397
22397
|
id: crypto.randomUUID()
|
|
22398
22398
|
}), a.value = !1, c.value = null, u.value = "", r("select", void 0, ro.Select);
|
|
22399
22399
|
}
|
|
@@ -22414,7 +22414,7 @@ const KS = /* @__PURE__ */ U({
|
|
|
22414
22414
|
o();
|
|
22415
22415
|
}
|
|
22416
22416
|
return (M, E) => {
|
|
22417
|
-
var
|
|
22417
|
+
var D;
|
|
22418
22418
|
return S(), A(ce, null, [
|
|
22419
22419
|
b("button", {
|
|
22420
22420
|
ref_key: "buttonRef",
|
|
@@ -22467,7 +22467,7 @@ const KS = /* @__PURE__ */ U({
|
|
|
22467
22467
|
b("polyline", { points: "15 18 9 12 15 6" })
|
|
22468
22468
|
], -1)
|
|
22469
22469
|
])]),
|
|
22470
|
-
b("span", null,
|
|
22470
|
+
b("span", null, De((D = p.find((P) => P.value === c.value)) == null ? void 0 : D.label), 1)
|
|
22471
22471
|
]),
|
|
22472
22472
|
b("div", EC, [
|
|
22473
22473
|
Gd(b("input", {
|
|
@@ -22481,7 +22481,7 @@ const KS = /* @__PURE__ */ U({
|
|
|
22481
22481
|
}, null, 40, AC), [
|
|
22482
22482
|
[Yd, u.value]
|
|
22483
22483
|
]),
|
|
22484
|
-
d.value ? (S(), A("div", IC,
|
|
22484
|
+
d.value ? (S(), A("div", IC, De(d.value), 1)) : V("", !0),
|
|
22485
22485
|
b("button", {
|
|
22486
22486
|
class: "wov-embed-submit-button",
|
|
22487
22487
|
onClick: w
|
|
@@ -22577,18 +22577,18 @@ const KS = /* @__PURE__ */ U({
|
|
|
22577
22577
|
fill: "currentColor",
|
|
22578
22578
|
d: "M21.474 0H2.526C1.131 0 0 1.18 0 2.637v18.726C0 22.819 1.131 24 2.526 24h18.948C22.869 24 24 22.82 24 21.363V2.637C24 1.181 22.869 0 21.474 0m-11.01 5.388q.595-.607 1.474-.607q.854 0 1.448.607q.595.606.595 1.476c0 .87-.198 1.072-.595 1.476a1.95 1.95 0 0 1-1.448.607q-.879 0-1.474-.607q-.594-.606-.594-1.476c0-.87.198-1.072.594-1.476m3.13 11.49a4.9 4.9 0 0 1-2.018 2.136q-.724.422-1.19-.026q-.438-.422.26-1.002q.387-.29.646-.738q.258-.449.336-.923q.026-.21-.181-.21q-.517-.027-1.06-.581t-.543-1.37q0-.87.594-1.477a2.02 2.02 0 0 1 1.5-.633q.828 0 1.448.633q.62.605.724 1.37q.207 1.424-.517 2.822z"
|
|
22579
22579
|
}, null, -1)
|
|
22580
|
-
])])) :
|
|
22580
|
+
])])) : V("", !0)
|
|
22581
22581
|
]),
|
|
22582
|
-
b("span", MC,
|
|
22582
|
+
b("span", MC, De(P.label), 1)
|
|
22583
22583
|
], 8, mC)), 64))
|
|
22584
22584
|
])
|
|
22585
22585
|
], 64))
|
|
22586
|
-
], 4)) :
|
|
22587
|
-
], 8, ["to"])) :
|
|
22586
|
+
], 4)) : V("", !0)
|
|
22587
|
+
], 8, ["to"])) : V("", !0)
|
|
22588
22588
|
], 64);
|
|
22589
22589
|
};
|
|
22590
22590
|
}
|
|
22591
|
-
}), NC = "https://storage.googleapis.com/download/storage/v1/b/zine-maker-public/o/tapes%2F7e3b7dde-927d-4b09-aeb4-d49eac36d4ea.png?generation=1715183194653465&alt=media",
|
|
22591
|
+
}), NC = "https://storage.googleapis.com/download/storage/v1/b/zine-maker-public/o/tapes%2F7e3b7dde-927d-4b09-aeb4-d49eac36d4ea.png?generation=1715183194653465&alt=media", DC = /* @__PURE__ */ U({
|
|
22592
22592
|
__name: "TapeTool",
|
|
22593
22593
|
setup(n) {
|
|
22594
22594
|
const e = JSON.stringify({
|
|
@@ -22658,7 +22658,7 @@ const KS = /* @__PURE__ */ U({
|
|
|
22658
22658
|
_: 1
|
|
22659
22659
|
}, 8, ["drag-out-snapshot"]));
|
|
22660
22660
|
}
|
|
22661
|
-
}),
|
|
22661
|
+
}), RC = { class: "wov-toolbar-container" }, _C = /* @__PURE__ */ U({
|
|
22662
22662
|
__name: "Toolbar",
|
|
22663
22663
|
setup(n) {
|
|
22664
22664
|
const e = Xd(), { reset: t } = Un(), { nextEditorTick: o } = Ee(), r = z(null), s = z(null), i = ot(Io), l = I(() => i.value.leftMouseTool), a = [
|
|
@@ -22670,7 +22670,7 @@ const KS = /* @__PURE__ */ U({
|
|
|
22670
22670
|
aC,
|
|
22671
22671
|
fC,
|
|
22672
22672
|
lC,
|
|
22673
|
-
|
|
22673
|
+
DC,
|
|
22674
22674
|
uC,
|
|
22675
22675
|
cC
|
|
22676
22676
|
], c = ue("containerRef"), u = z(null), d = z(!1), h = z(null), f = z(null), p = z(1 / 0), m = z(0), g = z([]), y = z(8), v = z(48), { width: w } = fm(c);
|
|
@@ -22726,17 +22726,17 @@ const KS = /* @__PURE__ */ U({
|
|
|
22726
22726
|
function E() {
|
|
22727
22727
|
d.value = !d.value;
|
|
22728
22728
|
}
|
|
22729
|
-
function
|
|
22729
|
+
function D() {
|
|
22730
22730
|
d.value = !1;
|
|
22731
22731
|
}
|
|
22732
22732
|
function P(Y) {
|
|
22733
22733
|
const X = Y.target;
|
|
22734
|
-
f.value && !f.value.contains(X) && u.value && !u.value.contains(X) &&
|
|
22734
|
+
f.value && !f.value.contains(X) && u.value && !u.value.contains(X) && D();
|
|
22735
22735
|
}
|
|
22736
22736
|
me(d, (Y) => {
|
|
22737
22737
|
Y ? document.addEventListener("click", P, !0) : document.removeEventListener("click", P, !0);
|
|
22738
22738
|
}), me(x, (Y) => {
|
|
22739
|
-
Y ||
|
|
22739
|
+
Y || D();
|
|
22740
22740
|
});
|
|
22741
22741
|
function _(Y, X, se) {
|
|
22742
22742
|
s.value = X ?? null, o((he) => {
|
|
@@ -22750,7 +22750,7 @@ const KS = /* @__PURE__ */ U({
|
|
|
22750
22750
|
se.leftMouseTool = "drag-out", se.heldSnapshot = Y;
|
|
22751
22751
|
});
|
|
22752
22752
|
}
|
|
22753
|
-
function
|
|
22753
|
+
function W(Y, X) {
|
|
22754
22754
|
r.value = Y, s.value = X ?? null;
|
|
22755
22755
|
}
|
|
22756
22756
|
function q() {
|
|
@@ -22764,9 +22764,9 @@ const KS = /* @__PURE__ */ U({
|
|
|
22764
22764
|
heldTool: r,
|
|
22765
22765
|
setTool: _,
|
|
22766
22766
|
dragOutTool: $,
|
|
22767
|
-
onToolPointerDown:
|
|
22767
|
+
onToolPointerDown: W,
|
|
22768
22768
|
onToolPointerUp: q
|
|
22769
|
-
}), (Y, X) => (S(), A("div",
|
|
22769
|
+
}), (Y, X) => (S(), A("div", RC, [
|
|
22770
22770
|
G(ZS),
|
|
22771
22771
|
b("div", {
|
|
22772
22772
|
ref_key: "toolsContainerRef",
|
|
@@ -22801,7 +22801,7 @@ const KS = /* @__PURE__ */ U({
|
|
|
22801
22801
|
y2: "12"
|
|
22802
22802
|
})
|
|
22803
22803
|
], -1)
|
|
22804
|
-
])], 2)) :
|
|
22804
|
+
])], 2)) : V("", !0),
|
|
22805
22805
|
G(dm)
|
|
22806
22806
|
], 544),
|
|
22807
22807
|
B(c) ? (S(), K($r, {
|
|
@@ -22816,8 +22816,8 @@ const KS = /* @__PURE__ */ U({
|
|
|
22816
22816
|
style: ge(B(M))
|
|
22817
22817
|
}, [
|
|
22818
22818
|
B(e).default ? de(Y.$slots, "default", { key: 0 }) : (S(), A(ce, { key: 1 }, Te(a, (se, he) => G(Mc(se), { key: he })), 64))
|
|
22819
|
-
], 4)) :
|
|
22820
|
-
], 8, ["to"])) :
|
|
22819
|
+
], 4)) : V("", !0)
|
|
22820
|
+
], 8, ["to"])) : V("", !0)
|
|
22821
22821
|
]));
|
|
22822
22822
|
}
|
|
22823
22823
|
}), jM = /* @__PURE__ */ U({
|
|
@@ -22890,7 +22890,7 @@ const KS = /* @__PURE__ */ U({
|
|
|
22890
22890
|
alt: c.name,
|
|
22891
22891
|
class: "wov-user-avatar-img"
|
|
22892
22892
|
}, null, 8, LC)) : (S(), A(ce, { key: 1 }, [
|
|
22893
|
-
Sl(
|
|
22893
|
+
Sl(De(c.initials), 1)
|
|
22894
22894
|
], 64))
|
|
22895
22895
|
], 4))), 128))
|
|
22896
22896
|
])
|
|
@@ -22898,7 +22898,7 @@ const KS = /* @__PURE__ */ U({
|
|
|
22898
22898
|
t.value ? (S(), A("div", {
|
|
22899
22899
|
key: 0,
|
|
22900
22900
|
class: "wov-user-presence-dropdown",
|
|
22901
|
-
onWheel: a[1] || (a[1] =
|
|
22901
|
+
onWheel: a[1] || (a[1] = Dt(() => {
|
|
22902
22902
|
}, ["stop"]))
|
|
22903
22903
|
}, [
|
|
22904
22904
|
b("div", BC, [
|
|
@@ -22918,14 +22918,14 @@ const KS = /* @__PURE__ */ U({
|
|
|
22918
22918
|
alt: c.name,
|
|
22919
22919
|
class: "wov-user-avatar-img"
|
|
22920
22920
|
}, null, 8, $C)) : (S(), A(ce, { key: 1 }, [
|
|
22921
|
-
Sl(
|
|
22921
|
+
Sl(De(c.initials), 1)
|
|
22922
22922
|
], 64))
|
|
22923
22923
|
], 4),
|
|
22924
|
-
b("span", zC,
|
|
22924
|
+
b("span", zC, De(c.name), 1)
|
|
22925
22925
|
]))), 128))
|
|
22926
22926
|
])
|
|
22927
|
-
], 32)) :
|
|
22928
|
-
], 512)) :
|
|
22927
|
+
], 32)) : V("", !0)
|
|
22928
|
+
], 512)) : V("", !0);
|
|
22929
22929
|
}
|
|
22930
22930
|
}), ca = (n, e) => e.some((t) => n instanceof t);
|
|
22931
22931
|
let zd, Fd;
|
|
@@ -23324,7 +23324,7 @@ const fM = /* @__PURE__ */ mo(cM, [["render", dM]]), hM = /* @__PURE__ */ U({
|
|
|
23324
23324
|
connector: {}
|
|
23325
23325
|
},
|
|
23326
23326
|
setup(n) {
|
|
23327
|
-
const e = n, t = Pe(e.entityId,
|
|
23327
|
+
const e = n, t = Pe(e.entityId, Ro), o = Pe(e.entityId, fs), r = z(null), s = {
|
|
23328
23328
|
[Ge.Top]: "flex-start",
|
|
23329
23329
|
[Ge.Center]: "center",
|
|
23330
23330
|
[Ge.Bottom]: "flex-end"
|
|
@@ -23348,7 +23348,7 @@ const fM = /* @__PURE__ */ mo(cM, [["render", dM]]), hM = /* @__PURE__ */ U({
|
|
|
23348
23348
|
class: "wov-sticky-note",
|
|
23349
23349
|
style: ge(i.value)
|
|
23350
23350
|
}, [
|
|
23351
|
-
G(hc,
|
|
23351
|
+
G(hc, Re(e, {
|
|
23352
23352
|
"block-element": r.value,
|
|
23353
23353
|
onEditEnd: B(l)
|
|
23354
23354
|
}), null, 16, ["block-element", "onEditEnd"])
|
|
@@ -23585,7 +23585,7 @@ const kM = /* @__PURE__ */ U({
|
|
|
23585
23585
|
b("span", {
|
|
23586
23586
|
class: "wov-cursor-label",
|
|
23587
23587
|
style: ge({ backgroundColor: s.color })
|
|
23588
|
-
},
|
|
23588
|
+
}, De(s.name), 5)
|
|
23589
23589
|
], 4))), 128))
|
|
23590
23590
|
]));
|
|
23591
23591
|
}
|
|
@@ -23598,7 +23598,7 @@ const kM = /* @__PURE__ */ U({
|
|
|
23598
23598
|
isOnline: { type: Boolean }
|
|
23599
23599
|
},
|
|
23600
23600
|
setup(n) {
|
|
23601
|
-
return (e, t) => n.isOnline ?
|
|
23601
|
+
return (e, t) => n.isOnline ? V("", !0) : (S(), A("div", EM, "Working Offline"));
|
|
23602
23602
|
}
|
|
23603
23603
|
}), IM = {
|
|
23604
23604
|
key: 0,
|
|
@@ -23618,7 +23618,7 @@ const kM = /* @__PURE__ */ U({
|
|
|
23618
23618
|
o[1] || (o[1] = b("p", null, "Please refresh the page to continue.", -1)),
|
|
23619
23619
|
b("button", { onClick: e }, "Refresh")
|
|
23620
23620
|
])
|
|
23621
|
-
])) :
|
|
23621
|
+
])) : V("", !0);
|
|
23622
23622
|
}
|
|
23623
23623
|
}), NM = /* @__PURE__ */ U({
|
|
23624
23624
|
__name: "BackToContentButton",
|
|
@@ -23674,11 +23674,11 @@ const kM = /* @__PURE__ */ U({
|
|
|
23674
23674
|
}
|
|
23675
23675
|
}
|
|
23676
23676
|
if (!E) {
|
|
23677
|
-
const P = Math.floor(Math.random() * u.length), _ = u[P], $ = Eo.read(c, _),
|
|
23678
|
-
C =
|
|
23677
|
+
const P = Math.floor(Math.random() * u.length), _ = u[P], $ = Eo.read(c, _), W = ($.value[0] + $.value[2]) / 2, q = ($.value[1] + $.value[3]) / 2;
|
|
23678
|
+
C = W - x / 2, T = q - M / 2;
|
|
23679
23679
|
}
|
|
23680
|
-
const
|
|
23681
|
-
|
|
23680
|
+
const D = _e.write(c);
|
|
23681
|
+
D.left = C, D.top = T, D.zoom = v;
|
|
23682
23682
|
});
|
|
23683
23683
|
}
|
|
23684
23684
|
return (c, u) => i.value ? (S(), A("button", {
|
|
@@ -23702,9 +23702,9 @@ const kM = /* @__PURE__ */ U({
|
|
|
23702
23702
|
})
|
|
23703
23703
|
], -1),
|
|
23704
23704
|
Sl(" Back to content ", -1)
|
|
23705
|
-
])])) :
|
|
23705
|
+
])])) : V("", !0);
|
|
23706
23706
|
}
|
|
23707
|
-
}),
|
|
23707
|
+
}), DM = ["data-entity-id", "data-selected", "data-held-by-other", "data-hovered"], RM = /* @__PURE__ */ U({
|
|
23708
23708
|
__name: "WovenCanvasCore",
|
|
23709
23709
|
props: {
|
|
23710
23710
|
store: {},
|
|
@@ -23721,22 +23721,22 @@ const kM = /* @__PURE__ */ U({
|
|
|
23721
23721
|
async setup(n, { emit: e }) {
|
|
23722
23722
|
var bc, xc, Sc;
|
|
23723
23723
|
let t, o;
|
|
23724
|
-
const r = ft((O) => O.tracking(fe)), s = ft((O) => O.with(fe).tracking(Ec)), i = ft((O) => O.with(fe).tracking(hi)), l = ft((O) => O.with(fe).tracking(Al)), a = ft((O) => O.with(fe).tracking(Nm)), c = ft((O) => O.with(fe).tracking(ya)), u = ft((O) => O.with(fe).tracking(Ac)), d = ft((O) => O.tracking(Fi)), h = n, f = e, p = z(null), m = Me(null), g =
|
|
23724
|
+
const r = ft((O) => O.tracking(fe)), s = ft((O) => O.with(fe).tracking(Ec)), i = ft((O) => O.with(fe).tracking(hi)), l = ft((O) => O.with(fe).tracking(Al)), a = ft((O) => O.with(fe).tracking(Nm)), c = ft((O) => O.with(fe).tracking(ya)), u = ft((O) => O.with(fe).tracking(Ac)), d = ft((O) => O.tracking(Fi)), h = n, f = e, p = z(null), m = Me(null), g = Dm.parse(((bc = h.editor) == null ? void 0 : bc.user) ?? {}), y = /* @__PURE__ */ new Set(), v = /* @__PURE__ */ new Map(), w = Me([]), k = /* @__PURE__ */ new Map(), C = /* @__PURE__ */ new Map(), T = /* @__PURE__ */ new Set(), x = /* @__PURE__ */ new Map(), M = Me([]), E = z(!0), D = z(!1), P = z(!h.initialState), _ = Me(_e.default());
|
|
23725
23725
|
function $(O, J, N) {
|
|
23726
|
-
let
|
|
23727
|
-
|
|
23728
|
-
let
|
|
23729
|
-
return
|
|
23730
|
-
|
|
23726
|
+
let oe = k.get(O);
|
|
23727
|
+
oe || (oe = /* @__PURE__ */ new Map(), k.set(O, oe));
|
|
23728
|
+
let H = oe.get(J);
|
|
23729
|
+
return H || (H = /* @__PURE__ */ new Set(), oe.set(J, H)), H.add(N), () => {
|
|
23730
|
+
H.delete(N), H.size === 0 && (oe.delete(J), oe.size === 0 && k.delete(O));
|
|
23731
23731
|
};
|
|
23732
23732
|
}
|
|
23733
|
-
function
|
|
23734
|
-
const
|
|
23735
|
-
if (!
|
|
23736
|
-
const F =
|
|
23733
|
+
function W(O, J, N, oe = !1) {
|
|
23734
|
+
const H = k.get(J);
|
|
23735
|
+
if (!H) return;
|
|
23736
|
+
const F = H.get(N.name);
|
|
23737
23737
|
if (!F || F.size === 0) return;
|
|
23738
23738
|
let Be = null;
|
|
23739
|
-
|
|
23739
|
+
oe || (Be = N.snapshot(O, J));
|
|
23740
23740
|
for (const mn of F)
|
|
23741
23741
|
mn(Be);
|
|
23742
23742
|
}
|
|
@@ -23749,9 +23749,9 @@ const kM = /* @__PURE__ */ U({
|
|
|
23749
23749
|
function ne(O, J) {
|
|
23750
23750
|
const N = C.get(J.name);
|
|
23751
23751
|
if (!N || N.size === 0) return;
|
|
23752
|
-
const
|
|
23753
|
-
for (const
|
|
23754
|
-
|
|
23752
|
+
const oe = J.snapshot(O);
|
|
23753
|
+
for (const H of N)
|
|
23754
|
+
H(oe);
|
|
23755
23755
|
}
|
|
23756
23756
|
function Z(O) {
|
|
23757
23757
|
return T.add(O), () => {
|
|
@@ -23794,14 +23794,14 @@ const kM = /* @__PURE__ */ U({
|
|
|
23794
23794
|
documentId: yt
|
|
23795
23795
|
});
|
|
23796
23796
|
function pn(O) {
|
|
23797
|
-
var
|
|
23797
|
+
var oe;
|
|
23798
23798
|
const J = [], N = h.pluginOptions;
|
|
23799
23799
|
return (N == null ? void 0 : N.controls) !== !1 && J.push(Gm((N == null ? void 0 : N.controls) ?? {})), (N == null ? void 0 : N.selection) !== !1 && J.push(Km((N == null ? void 0 : N.selection) || void 0)), (N == null ? void 0 : N.eraser) !== !1 && J.push($m((N == null ? void 0 : N.eraser) || void 0)), (N == null ? void 0 : N.pen) !== !1 && J.push(zm()), (N == null ? void 0 : N.arrows) !== !1 && J.push(km((N == null ? void 0 : N.arrows) || void 0)), (N == null ? void 0 : N.tapes) !== !1 && J.push(Ym()), J.push(
|
|
23800
23800
|
wM({
|
|
23801
23801
|
store: O,
|
|
23802
23802
|
doubleClickSnapshot: h.doubleClickSnapshot
|
|
23803
23803
|
})
|
|
23804
|
-
), (
|
|
23804
|
+
), (oe = h.editor) != null && oe.plugins && J.push(...h.editor.plugins), J;
|
|
23805
23805
|
}
|
|
23806
23806
|
function jr() {
|
|
23807
23807
|
const O = h.store ?? {}, J = {
|
|
@@ -23811,28 +23811,28 @@ const kM = /* @__PURE__ */ U({
|
|
|
23811
23811
|
return O.websocket && (J.websocket = {
|
|
23812
23812
|
...O.websocket,
|
|
23813
23813
|
onVersionMismatch: (N) => {
|
|
23814
|
-
var
|
|
23815
|
-
|
|
23814
|
+
var oe, H;
|
|
23815
|
+
D.value = !0, (H = (oe = O.websocket) == null ? void 0 : oe.onVersionMismatch) == null || H.call(oe, N);
|
|
23816
23816
|
},
|
|
23817
23817
|
onConnectivityChange: (N) => {
|
|
23818
|
-
var
|
|
23819
|
-
E.value = N, (
|
|
23818
|
+
var oe, H;
|
|
23819
|
+
E.value = N, (H = (oe = O.websocket) == null ? void 0 : oe.onConnectivityChange) == null || H.call(oe, N);
|
|
23820
23820
|
}
|
|
23821
23821
|
}), J;
|
|
23822
23822
|
}
|
|
23823
23823
|
async function wo(O, J) {
|
|
23824
23824
|
const N = jr();
|
|
23825
23825
|
O || (delete N.persistence, delete N.websocket), J && (N.initialState = J), be = new wm(N);
|
|
23826
|
-
const
|
|
23826
|
+
const oe = {
|
|
23827
23827
|
...h.editor,
|
|
23828
23828
|
user: g,
|
|
23829
23829
|
plugins: pn(be),
|
|
23830
23830
|
controls: h.controls
|
|
23831
|
-
},
|
|
23832
|
-
return await
|
|
23833
|
-
components:
|
|
23834
|
-
singletons:
|
|
23835
|
-
}),
|
|
23831
|
+
}, H = new Rm(O, oe);
|
|
23832
|
+
return await H.initialize(), await be.initialize({
|
|
23833
|
+
components: H.components,
|
|
23834
|
+
singletons: H.singletons
|
|
23835
|
+
}), H;
|
|
23836
23836
|
}
|
|
23837
23837
|
async function Lt(O) {
|
|
23838
23838
|
O.nextTick((J) => {
|
|
@@ -23852,13 +23852,16 @@ const kM = /* @__PURE__ */ U({
|
|
|
23852
23852
|
}
|
|
23853
23853
|
let wc = null;
|
|
23854
23854
|
Mt(async () => {
|
|
23855
|
+
var N, oe, H;
|
|
23855
23856
|
if (!p.value) return;
|
|
23856
23857
|
wc = () => {
|
|
23857
|
-
var
|
|
23858
|
-
(
|
|
23858
|
+
var F;
|
|
23859
|
+
(F = p.value) == null || F.scrollTo(0, 0);
|
|
23859
23860
|
}, p.value.addEventListener("scroll", wc), m.value && (m.value.dispose(), be == null || be.close(), be = null, pe = 0);
|
|
23860
23861
|
const O = await wo(p.value, h.initialState);
|
|
23861
|
-
m.value = O, P.value = !1, await (Oe == null ? void 0 : Oe.init()), await (Oe == null ? void 0 : Oe.resumePendingUploads()), je = requestAnimationFrame(vc)
|
|
23862
|
+
m.value = O, P.value = !1, await (Oe == null ? void 0 : Oe.init()), await (Oe == null ? void 0 : Oe.resumePendingUploads()), je = requestAnimationFrame(vc);
|
|
23863
|
+
const J = (H = (oe = (N = m.value) == null ? void 0 : N.fonts) == null ? void 0 : oe[0]) == null ? void 0 : H.name;
|
|
23864
|
+
J && se.setDefaults("text", { fontFamily: J }), f("ready", m.value, be);
|
|
23862
23865
|
}), Le(() => {
|
|
23863
23866
|
var O;
|
|
23864
23867
|
je !== null && cancelAnimationFrame(je), Oe == null || Oe.close(), be == null || be.close(), (O = m.value) == null || O.dispose();
|
|
@@ -23866,11 +23869,11 @@ const kM = /* @__PURE__ */ U({
|
|
|
23866
23869
|
function mm(O) {
|
|
23867
23870
|
const { events: J, newIndex: N } = O.eventBuffer.readEvents(pe);
|
|
23868
23871
|
if (pe = N, J.length === 0) return;
|
|
23869
|
-
const { componentsById:
|
|
23872
|
+
const { componentsById: oe, singletonsById: H } = Fo(O);
|
|
23870
23873
|
for (const { entityId: F, eventType: Be, componentId: mn } of J) {
|
|
23871
23874
|
if (F === _m) {
|
|
23872
23875
|
if (Be === bo.CHANGED) {
|
|
23873
|
-
const At =
|
|
23876
|
+
const At = H.get(mn);
|
|
23874
23877
|
At && ne(O, At);
|
|
23875
23878
|
}
|
|
23876
23879
|
continue;
|
|
@@ -23881,26 +23884,26 @@ const kM = /* @__PURE__ */ U({
|
|
|
23881
23884
|
y.delete(F), k.delete(F);
|
|
23882
23885
|
else if (Be === bo.COMPONENT_ADDED) {
|
|
23883
23886
|
y.add(F);
|
|
23884
|
-
const At =
|
|
23885
|
-
At &&
|
|
23887
|
+
const At = oe.get(mn);
|
|
23888
|
+
At && W(O, F, At);
|
|
23886
23889
|
} else if (Be === bo.COMPONENT_REMOVED) {
|
|
23887
|
-
const At =
|
|
23888
|
-
At &&
|
|
23890
|
+
const At = oe.get(mn);
|
|
23891
|
+
At && W(O, F, At, !0);
|
|
23889
23892
|
} else if (Be === bo.CHANGED) {
|
|
23890
|
-
const At =
|
|
23891
|
-
At &&
|
|
23893
|
+
const At = oe.get(mn);
|
|
23894
|
+
At && W(O, F, At);
|
|
23892
23895
|
}
|
|
23893
23896
|
}
|
|
23894
23897
|
}
|
|
23895
23898
|
function gm(O) {
|
|
23896
|
-
var
|
|
23899
|
+
var oe;
|
|
23897
23900
|
let J = !1;
|
|
23898
|
-
for (const
|
|
23899
|
-
const F = fe.snapshot(O,
|
|
23901
|
+
for (const H of r.added(O)) {
|
|
23902
|
+
const F = fe.snapshot(O, H), Be = (oe = m.value) == null ? void 0 : oe.blockDefs[F.tag], mn = (Be == null ? void 0 : Be.stratum) ?? "content";
|
|
23900
23903
|
x.set(
|
|
23901
|
-
|
|
23904
|
+
H,
|
|
23902
23905
|
z({
|
|
23903
|
-
entityId:
|
|
23906
|
+
entityId: H,
|
|
23904
23907
|
block: F,
|
|
23905
23908
|
stratum: mn,
|
|
23906
23909
|
selected: !1,
|
|
@@ -23912,84 +23915,84 @@ const kM = /* @__PURE__ */ U({
|
|
|
23912
23915
|
})
|
|
23913
23916
|
), J = !0;
|
|
23914
23917
|
}
|
|
23915
|
-
for (const
|
|
23916
|
-
x.delete(
|
|
23917
|
-
for (const
|
|
23918
|
-
const F = x.get(
|
|
23918
|
+
for (const H of r.removed(O))
|
|
23919
|
+
x.delete(H), J = !0;
|
|
23920
|
+
for (const H of r.changed(O)) {
|
|
23921
|
+
const F = x.get(H);
|
|
23919
23922
|
if (F) {
|
|
23920
|
-
const Be = fe.snapshot(O,
|
|
23923
|
+
const Be = fe.snapshot(O, H);
|
|
23921
23924
|
F.value.block.rank !== Be.rank && (J = !0), F.value.block = Be;
|
|
23922
23925
|
}
|
|
23923
23926
|
}
|
|
23924
23927
|
let N = !1;
|
|
23925
|
-
for (const
|
|
23926
|
-
const F = Fi.snapshot(O,
|
|
23928
|
+
for (const H of d.addedOrChanged(O)) {
|
|
23929
|
+
const F = Fi.snapshot(O, H);
|
|
23927
23930
|
v.set(F.sessionId, F), N = !0;
|
|
23928
23931
|
}
|
|
23929
|
-
for (const
|
|
23930
|
-
const F = Fi.read(O,
|
|
23932
|
+
for (const H of d.removed(O)) {
|
|
23933
|
+
const F = Fi.read(O, H);
|
|
23931
23934
|
v.delete(F.sessionId), N = !0;
|
|
23932
23935
|
}
|
|
23933
23936
|
N && (w.value = Array.from(v.values()));
|
|
23934
|
-
for (const
|
|
23935
|
-
const F = x.get(
|
|
23937
|
+
for (const H of i.added(O)) {
|
|
23938
|
+
const F = x.get(H);
|
|
23936
23939
|
F && !F.value.selected && (F.value.selected = !0);
|
|
23937
23940
|
}
|
|
23938
|
-
for (const
|
|
23939
|
-
const F = x.get(
|
|
23941
|
+
for (const H of i.removed(O)) {
|
|
23942
|
+
const F = x.get(H);
|
|
23940
23943
|
F != null && F.value.selected && (F.value.selected = !1);
|
|
23941
23944
|
}
|
|
23942
|
-
for (const
|
|
23943
|
-
const F = x.get(
|
|
23944
|
-
F && (F.value.held = Al.snapshot(O,
|
|
23945
|
+
for (const H of l.addedOrChanged(O)) {
|
|
23946
|
+
const F = x.get(H);
|
|
23947
|
+
F && (F.value.held = Al.snapshot(O, H));
|
|
23945
23948
|
}
|
|
23946
|
-
for (const
|
|
23947
|
-
const F = x.get(
|
|
23949
|
+
for (const H of l.removed(O)) {
|
|
23950
|
+
const F = x.get(H);
|
|
23948
23951
|
F && F.value.held !== null && (F.value.held = null);
|
|
23949
23952
|
}
|
|
23950
|
-
for (const
|
|
23951
|
-
const F = x.get(
|
|
23953
|
+
for (const H of a.added(O)) {
|
|
23954
|
+
const F = x.get(H);
|
|
23952
23955
|
F && !F.value.hovered && (F.value.hovered = !0);
|
|
23953
23956
|
}
|
|
23954
|
-
for (const
|
|
23955
|
-
const F = x.get(
|
|
23957
|
+
for (const H of a.removed(O)) {
|
|
23958
|
+
const F = x.get(H);
|
|
23956
23959
|
F != null && F.value.hovered && (F.value.hovered = !1);
|
|
23957
23960
|
}
|
|
23958
|
-
for (const
|
|
23959
|
-
const F = x.get(
|
|
23961
|
+
for (const H of c.added(O)) {
|
|
23962
|
+
const F = x.get(H);
|
|
23960
23963
|
F && !F.value.edited && (F.value.edited = !0);
|
|
23961
23964
|
}
|
|
23962
|
-
for (const
|
|
23963
|
-
const F = x.get(
|
|
23965
|
+
for (const H of c.removed(O)) {
|
|
23966
|
+
const F = x.get(H);
|
|
23964
23967
|
F != null && F.value.edited && (F.value.edited = !1);
|
|
23965
23968
|
}
|
|
23966
|
-
for (const
|
|
23967
|
-
const F = x.get(
|
|
23968
|
-
F && (F.value.opacity = Ac.snapshot(O,
|
|
23969
|
+
for (const H of u.addedOrChanged(O)) {
|
|
23970
|
+
const F = x.get(H);
|
|
23971
|
+
F && (F.value.opacity = Ac.snapshot(O, H));
|
|
23969
23972
|
}
|
|
23970
|
-
for (const
|
|
23971
|
-
const F = x.get(
|
|
23973
|
+
for (const H of u.removed(O)) {
|
|
23974
|
+
const F = x.get(H);
|
|
23972
23975
|
F && F.value.opacity !== null && (F.value.opacity = null);
|
|
23973
23976
|
}
|
|
23974
|
-
for (const
|
|
23975
|
-
const F = x.get(
|
|
23976
|
-
F && (F.value.connector = Ec.snapshot(O,
|
|
23977
|
+
for (const H of s.addedOrChanged(O)) {
|
|
23978
|
+
const F = x.get(H);
|
|
23979
|
+
F && (F.value.connector = Ec.snapshot(O, H));
|
|
23977
23980
|
}
|
|
23978
|
-
for (const
|
|
23979
|
-
const F = x.get(
|
|
23981
|
+
for (const H of s.removed(O)) {
|
|
23982
|
+
const F = x.get(H);
|
|
23980
23983
|
F && F.value.connector !== null && (F.value.connector = null);
|
|
23981
23984
|
}
|
|
23982
23985
|
if (J) {
|
|
23983
|
-
const
|
|
23984
|
-
|
|
23986
|
+
const H = Array.from(x.values());
|
|
23987
|
+
H.sort((F, Be) => F.value.block.rank > Be.value.block.rank ? 1 : -1), M.value = H;
|
|
23985
23988
|
}
|
|
23986
23989
|
}
|
|
23987
23990
|
function ym(O) {
|
|
23988
|
-
const J = O.rotateZ !== 0, N = O.flip[0],
|
|
23989
|
-
if (!J && !N && !
|
|
23991
|
+
const J = O.rotateZ !== 0, N = O.flip[0], oe = O.flip[1];
|
|
23992
|
+
if (!J && !N && !oe)
|
|
23990
23993
|
return;
|
|
23991
|
-
const
|
|
23992
|
-
return J &&
|
|
23994
|
+
const H = [];
|
|
23995
|
+
return J && H.push(`rotate(${O.rotateZ}rad)`), N && H.push("scaleX(-1)"), oe && H.push("scaleY(-1)"), H.join(" ");
|
|
23993
23996
|
}
|
|
23994
23997
|
function kc(O) {
|
|
23995
23998
|
const { held: J } = O;
|
|
@@ -23998,7 +24001,7 @@ const kM = /* @__PURE__ */ U({
|
|
|
23998
24001
|
return (N == null ? void 0 : N.color) ?? null;
|
|
23999
24002
|
}
|
|
24000
24003
|
function vm(O) {
|
|
24001
|
-
const { block: J, stratum: N, opacity:
|
|
24004
|
+
const { block: J, stratum: N, opacity: oe } = O, H = kc(O), F = oe !== null ? oe.value / 255 : 1;
|
|
24002
24005
|
return {
|
|
24003
24006
|
position: "absolute",
|
|
24004
24007
|
left: `${J.position[0]}px`,
|
|
@@ -24010,7 +24013,7 @@ const kM = /* @__PURE__ */ U({
|
|
|
24010
24013
|
opacity: F,
|
|
24011
24014
|
pointerEvents: "none",
|
|
24012
24015
|
userSelect: "none",
|
|
24013
|
-
"--wov-held-by-color":
|
|
24016
|
+
"--wov-held-by-color": H ?? void 0,
|
|
24014
24017
|
// Delay fade-in (0→1) to allow dimensions to settle, but hide immediately (1→0)
|
|
24015
24018
|
transition: F === 1 ? "opacity 0ms 32ms" : void 0
|
|
24016
24019
|
};
|
|
@@ -24031,7 +24034,7 @@ const kM = /* @__PURE__ */ U({
|
|
|
24031
24034
|
background: n.background
|
|
24032
24035
|
}, () => [
|
|
24033
24036
|
G(US, { background: n.background }, null, 8, ["background"])
|
|
24034
|
-
]) :
|
|
24037
|
+
]) : V("", !0),
|
|
24035
24038
|
b("div", {
|
|
24036
24039
|
class: "wov-canvas",
|
|
24037
24040
|
style: ge({
|
|
@@ -24050,55 +24053,55 @@ const kM = /* @__PURE__ */ U({
|
|
|
24050
24053
|
"data-hovered": N.value.hovered || void 0,
|
|
24051
24054
|
class: "wov-block"
|
|
24052
24055
|
}, [
|
|
24053
|
-
de(O.$slots, `block:${N.value.block.tag}`,
|
|
24054
|
-
N.value.block.tag === "selection-box" ? (S(), K(iM,
|
|
24056
|
+
de(O.$slots, `block:${N.value.block.tag}`, Re({ ref_for: !0 }, N.value), () => [
|
|
24057
|
+
N.value.block.tag === "selection-box" ? (S(), K(iM, Re({
|
|
24055
24058
|
key: 0,
|
|
24056
24059
|
ref_for: !0
|
|
24057
|
-
}, N.value), null, 16)) : N.value.block.tag === "transform-box" ? (S(), K(aM,
|
|
24060
|
+
}, N.value), null, 16)) : N.value.block.tag === "transform-box" ? (S(), K(aM, Re({
|
|
24058
24061
|
key: 1,
|
|
24059
24062
|
ref_for: !0
|
|
24060
|
-
}, N.value), null, 16)) : N.value.block.tag === "transform-handle" ? (S(), K(fM,
|
|
24063
|
+
}, N.value), null, 16)) : N.value.block.tag === "transform-handle" ? (S(), K(fM, Re({
|
|
24061
24064
|
key: 2,
|
|
24062
24065
|
ref_for: !0
|
|
24063
|
-
}, N.value), null, 16)) : N.value.block.tag === "arrow-handle" ? (S(), K(mg,
|
|
24066
|
+
}, N.value), null, 16)) : N.value.block.tag === "arrow-handle" ? (S(), K(mg, Re({
|
|
24064
24067
|
key: 3,
|
|
24065
24068
|
ref_for: !0
|
|
24066
|
-
}, N.value), null, 16)) : N.value.block.tag === "arrow-terminal" ? (S(), K(wg,
|
|
24069
|
+
}, N.value), null, 16)) : N.value.block.tag === "arrow-terminal" ? (S(), K(wg, Re({
|
|
24067
24070
|
key: 4,
|
|
24068
24071
|
ref_for: !0
|
|
24069
|
-
}, N.value), null, 16)) : N.value.block.tag === "sticky-note" ? (S(), K(hM,
|
|
24072
|
+
}, N.value), null, 16)) : N.value.block.tag === "sticky-note" ? (S(), K(hM, Re({
|
|
24070
24073
|
key: 5,
|
|
24071
24074
|
ref_for: !0
|
|
24072
|
-
}, N.value), null, 16)) : N.value.block.tag === "eraser" ? (S(), K(Gg,
|
|
24075
|
+
}, N.value), null, 16)) : N.value.block.tag === "eraser" ? (S(), K(Gg, Re({
|
|
24073
24076
|
key: 6,
|
|
24074
24077
|
ref_for: !0
|
|
24075
|
-
}, N.value), null, 16)) : N.value.block.tag === "pen-stroke" ? (S(), K(c0,
|
|
24078
|
+
}, N.value), null, 16)) : N.value.block.tag === "pen-stroke" ? (S(), K(c0, Re({
|
|
24076
24079
|
key: 7,
|
|
24077
24080
|
ref_for: !0
|
|
24078
|
-
}, N.value), null, 16)) : N.value.block.tag === "arc-arrow" ? (S(), K(dg,
|
|
24081
|
+
}, N.value), null, 16)) : N.value.block.tag === "arc-arrow" ? (S(), K(dg, Re({
|
|
24079
24082
|
key: 8,
|
|
24080
24083
|
ref_for: !0
|
|
24081
|
-
}, N.value), null, 16)) : N.value.block.tag === "elbow-arrow" ? (S(), K(Mg,
|
|
24084
|
+
}, N.value), null, 16)) : N.value.block.tag === "elbow-arrow" ? (S(), K(Mg, Re({
|
|
24082
24085
|
key: 9,
|
|
24083
24086
|
ref_for: !0
|
|
24084
|
-
}, N.value), null, 16)) : N.value.block.tag === "text" ? (S(), K(m2,
|
|
24087
|
+
}, N.value), null, 16)) : N.value.block.tag === "text" ? (S(), K(m2, Re({
|
|
24085
24088
|
key: 10,
|
|
24086
24089
|
ref_for: !0
|
|
24087
|
-
}, N.value), null, 16)) : N.value.block.tag === "image" ? (S(), K(n0,
|
|
24090
|
+
}, N.value), null, 16)) : N.value.block.tag === "image" ? (S(), K(n0, Re({
|
|
24088
24091
|
key: 11,
|
|
24089
24092
|
ref_for: !0
|
|
24090
|
-
}, N.value), null, 16)) : N.value.block.tag === "shape" ? (S(), K(u2,
|
|
24093
|
+
}, N.value), null, 16)) : N.value.block.tag === "shape" ? (S(), K(u2, Re({
|
|
24091
24094
|
key: 12,
|
|
24092
24095
|
ref_for: !0
|
|
24093
|
-
}, N.value), null, 16)) : N.value.block.tag === "embed" ? (S(), K(Ig,
|
|
24096
|
+
}, N.value), null, 16)) : N.value.block.tag === "embed" ? (S(), K(Ig, Re({
|
|
24094
24097
|
key: 13,
|
|
24095
24098
|
ref_for: !0
|
|
24096
|
-
}, N.value), null, 16)) : N.value.block.tag === "tape" ? (S(), K(h2,
|
|
24099
|
+
}, N.value), null, 16)) : N.value.block.tag === "tape" ? (S(), K(h2, Re({
|
|
24097
24100
|
key: 14,
|
|
24098
24101
|
ref_for: !0
|
|
24099
|
-
}, N.value), null, 16)) :
|
|
24102
|
+
}, N.value), null, 16)) : V("", !0)
|
|
24100
24103
|
])
|
|
24101
|
-
], 12,
|
|
24104
|
+
], 12, DM))), 128))
|
|
24102
24105
|
], 4),
|
|
24103
24106
|
m.value ? de(O.$slots, "user-cursors", {
|
|
24104
24107
|
key: 1,
|
|
@@ -24111,28 +24114,28 @@ const kM = /* @__PURE__ */ U({
|
|
|
24111
24114
|
"current-session-id": B(g).sessionId,
|
|
24112
24115
|
camera: _.value
|
|
24113
24116
|
}, null, 8, ["users", "current-session-id", "camera"])
|
|
24114
|
-
]) :
|
|
24117
|
+
]) : V("", !0),
|
|
24115
24118
|
m.value ? (S(), K(JS, { key: 2 }, {
|
|
24116
24119
|
default: te((N) => [
|
|
24117
24120
|
de(O.$slots, "floating-menu", Cl(Ml(N)))
|
|
24118
24121
|
]),
|
|
24119
24122
|
_: 3
|
|
24120
|
-
})) :
|
|
24123
|
+
})) : V("", !0),
|
|
24121
24124
|
m.value ? de(O.$slots, "user-presence", {
|
|
24122
24125
|
key: 3,
|
|
24123
24126
|
users: w.value
|
|
24124
24127
|
}, () => [
|
|
24125
24128
|
G(HC, { users: w.value }, null, 8, ["users"])
|
|
24126
|
-
]) :
|
|
24129
|
+
]) : V("", !0),
|
|
24127
24130
|
m.value ? de(O.$slots, "toolbar", { key: 4 }, () => [
|
|
24128
24131
|
G(_C)
|
|
24129
|
-
]) :
|
|
24130
|
-
m.value ? de(O.$slots, "default", { key: 5 }) :
|
|
24132
|
+
]) : V("", !0),
|
|
24133
|
+
m.value ? de(O.$slots, "default", { key: 5 }) : V("", !0),
|
|
24131
24134
|
de(O.$slots, "offline-indicator", { isOnline: E.value }, () => [
|
|
24132
24135
|
G(AM, { "is-online": E.value }, null, 8, ["is-online"])
|
|
24133
24136
|
]),
|
|
24134
|
-
de(O.$slots, "version-mismatch", { versionMismatch:
|
|
24135
|
-
G(OM, { "version-mismatch":
|
|
24137
|
+
de(O.$slots, "version-mismatch", { versionMismatch: D.value }, () => [
|
|
24138
|
+
G(OM, { "version-mismatch": D.value }, null, 8, ["version-mismatch"])
|
|
24136
24139
|
]),
|
|
24137
24140
|
de(O.$slots, "back-to-content", {}, () => [
|
|
24138
24141
|
G(NM)
|
|
@@ -24142,11 +24145,11 @@ const kM = /* @__PURE__ */ U({
|
|
|
24142
24145
|
]),
|
|
24143
24146
|
m.value ? de(O.$slots, "file-drop-zone", { key: 6 }, () => [
|
|
24144
24147
|
G(kM)
|
|
24145
|
-
]) :
|
|
24148
|
+
]) : V("", !0),
|
|
24146
24149
|
m.value ? (S(), K(bM, {
|
|
24147
24150
|
key: 7,
|
|
24148
24151
|
options: h.copyPaste
|
|
24149
|
-
}, null, 8, ["options"])) :
|
|
24152
|
+
}, null, 8, ["options"])) : V("", !0)
|
|
24150
24153
|
], 512));
|
|
24151
24154
|
}
|
|
24152
24155
|
}), KM = /* @__PURE__ */ U({
|
|
@@ -24155,7 +24158,7 @@ const kM = /* @__PURE__ */ U({
|
|
|
24155
24158
|
setup(n) {
|
|
24156
24159
|
return (e, t) => (S(), K(Mm, null, {
|
|
24157
24160
|
default: te(() => [
|
|
24158
|
-
G(
|
|
24161
|
+
G(RM, Cl(Ml(e.$attrs)), Tm({ _: 2 }, [
|
|
24159
24162
|
Te(e.$slots, (o, r) => ({
|
|
24160
24163
|
name: r,
|
|
24161
24164
|
fn: te((s) => [
|
|
@@ -24205,7 +24208,7 @@ export {
|
|
|
24205
24208
|
Tt as MenuDropdown,
|
|
24206
24209
|
dm as MenuTooltip,
|
|
24207
24210
|
c0 as PenStroke,
|
|
24208
|
-
|
|
24211
|
+
Dx as PenStrokeThicknessButton,
|
|
24209
24212
|
uC as PenTool,
|
|
24210
24213
|
ps as SHAPES,
|
|
24211
24214
|
sC as SelectTool,
|
|
@@ -24218,13 +24221,13 @@ export {
|
|
|
24218
24221
|
QM as Synced,
|
|
24219
24222
|
h2 as TapeBlock,
|
|
24220
24223
|
rS as TapeImageButton,
|
|
24221
|
-
|
|
24224
|
+
DC as TapeTool,
|
|
24222
24225
|
Od as TextAlignmentButton,
|
|
24223
24226
|
m2 as TextBlock,
|
|
24224
24227
|
Nd as TextBoldButton,
|
|
24225
24228
|
Bd as TextColorButton,
|
|
24226
|
-
|
|
24227
|
-
|
|
24229
|
+
Dd as TextFontFamilyButton,
|
|
24230
|
+
Rd as TextFontSizeButton,
|
|
24228
24231
|
_d as TextItalicButton,
|
|
24229
24232
|
Ld as TextLinkButton,
|
|
24230
24233
|
dC as TextTool,
|