@woven-canvas/vue 1.2.1 → 1.3.0

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/index.js CHANGED
@@ -1,8 +1,8 @@
1
1
  import { Synced as Lh, defineCanvasSingleton as $h, CanvasStore as z0 } from "@woven-ecs/canvas-store";
2
2
  import { CanvasComponentDef as UA, CanvasSingletonDef as KA, CanvasStore as qA, Synced as JA, defineCanvasComponent as GA, defineCanvasSingleton as YA } from "@woven-ecs/canvas-store";
3
- import { ArrowHeadKind as Ze, ArcArrow as fn, ElbowArrow as hn, createArrowsPlugin as F0 } from "@woven-canvas/plugin-arrows";
4
- import { inject as pe, shallowRef as Te, onUnmounted as $e, defineComponent as q, computed as _, openBlock as T, createElementBlock as O, unref as H, Fragment as ue, createElementVNode as S, createCommentVNode as U, ref as z, onMounted as wt, createBlock as ne, renderList as Me, toDisplayString as Ne, normalizeStyle as ve, watch as me, normalizeClass as Ee, withAsyncContext as Dr, h as Xi, getCurrentInstance as Sc, watchEffect as Ws, nextTick as Jn, onBeforeUnmount as H0, markRaw as V0, customRef as W0, toValue as rt, reactive as Bh, readonly as Rl, createVNode as Z, mergeProps as Yo, getCurrentScope as zh, onScopeDispose as Fh, shallowReadonly as Po, provide as ho, withModifiers as Et, renderSlot as ye, Teleport as ps, withCtx as se, Transition as Cc, withDirectives as Hh, withKeys as Zu, vModelText as Vh, useSlots as Wh, resolveDynamicComponent as ba, createTextVNode as xa, normalizeProps as jh, guardReactiveProps as Uh, Suspense as j0, createSlots as U0 } from "vue";
5
- import { hasComponent as Fe, Color as Xo, EmbedProvider as de, Embed as Sa, Block as ie, Frame as js, FrameDropTarget as K0, UploadState as Wn, Asset as gn, Image as Us, getBlockDef as Kh, Grid as bn, RankBounds as qh, createEntity as Zi, addComponent as He, Synced as Tt, defineQuery as ct, Selected as Qi, Mouse as Ca, Camera as Pe, canBlockEdit as Tc, EditAfterPlacing as Mc, SelectBlock as q0, isAlive as J0, cascadeDelete as G0, getResources as ar, deselectAll as Ta, selectBlock as Ma, findFrameAtPoint as Y0, AssignFrameChildren as X0, Text as st, getDescendants as Z0, Aabb as jo, DeselectAll as Ec, Edited as Ac, Screen as Qn, TransformBoxStateSingleton as Jh, TransformBoxState as Q0, UpdateTransformBox as Gh, SelectionStateSingleton as el, SelectionState as Jr, TransformHandle as Qu, TransformHandleKind as ey, removeEntity as Ea, ResetKeyboard as ty, VerticalAlignment as Xe, StrokeKind as Ct, Shape as Gt, VerticalAlign as Ks, TextAlignment as un, getPluginResources as Io, Undo as Ic, Redo as qs, RemoveSelected as ny, detectEmbedProvider as oy, validateEmbedUrl as ry, resolveEmbedUrl as sy, Controls as Bt, Cursor as Oc, field as pn, defineEditorState as iy, defineEditorSystem as tl, isReadonly as nl, getPointerInput as _c, PointerButton as Yh, PlaceBlockEvent as Js, Held as Aa, on as ed, Key as Pl, Connector as td, Hovered as ly, Opacity as nd, User as Ll, Layer as ay, UserData as cy, Editor as uy, SINGLETON_ENTITY_ID as dy, EventType as Lo, resolveLayerRank as od, compareBlockOrder as fy } from "@woven-canvas/core";
3
+ import { ArrowHeadKind as Qe, ArcArrow as fn, ElbowArrow as hn, createArrowsPlugin as F0 } from "@woven-canvas/plugin-arrows";
4
+ import { inject as me, shallowRef as Te, onUnmounted as $e, defineComponent as q, computed as _, openBlock as T, createElementBlock as O, unref as H, Fragment as ue, createElementVNode as S, createCommentVNode as K, ref as z, onMounted as wt, createBlock as ne, renderList as Me, toDisplayString as Ne, normalizeStyle as ve, watch as pe, normalizeClass as Ee, withAsyncContext as Dr, h as Xi, getCurrentInstance as Sc, watchEffect as Ws, nextTick as Jn, onBeforeUnmount as H0, markRaw as V0, customRef as W0, toValue as rt, reactive as Bh, readonly as Rl, createVNode as Z, mergeProps as Yo, getCurrentScope as zh, onScopeDispose as Fh, shallowReadonly as Po, provide as ho, withModifiers as Et, renderSlot as ye, Teleport as ps, withCtx as se, Transition as Cc, withDirectives as Hh, withKeys as Zu, vModelText as Vh, useSlots as Wh, resolveDynamicComponent as ba, createTextVNode as xa, normalizeProps as jh, guardReactiveProps as Uh, Suspense as j0, createSlots as U0 } from "vue";
5
+ import { hasComponent as Fe, Color as Xo, EmbedProvider as de, Embed as Sa, Block as ie, Frame as js, FrameDropTarget as K0, UploadState as Wn, Asset as gn, Image as Us, getBlockDef as Kh, Grid as bn, RankBounds as qh, createEntity as Zi, addComponent as He, Synced as Tt, defineQuery as ct, Selected as Qi, Mouse as Ca, Camera as Pe, canBlockEdit as Tc, EditAfterPlacing as Mc, SelectBlock as q0, isAlive as J0, cascadeDelete as G0, getResources as ar, deselectAll as Ta, selectBlock as Ma, findFrameAtPoint as Y0, AssignFrameChildren as X0, Text as st, getDescendants as Z0, Aabb as jo, DeselectAll as Ec, Edited as Ac, Screen as Qn, TransformBoxStateSingleton as Jh, TransformBoxState as Q0, UpdateTransformBox as Gh, SelectionStateSingleton as el, SelectionState as Jr, TransformHandle as Qu, TransformHandleKind as ey, removeEntity as Ea, ResetKeyboard as ty, VerticalAlignment as Ze, StrokeKind as Ct, Shape as Gt, VerticalAlign as Ks, TextAlignment as un, getPluginResources as Io, Undo as Ic, Redo as qs, RemoveSelected as ny, detectEmbedProvider as oy, validateEmbedUrl as ry, resolveEmbedUrl as sy, Controls as Bt, Cursor as Oc, field as pn, defineEditorState as iy, defineEditorSystem as tl, isReadonly as nl, getPointerInput as _c, PointerButton as Yh, PlaceBlockEvent as Js, Held as Aa, on as ed, Key as Pl, Connector as td, Hovered as ly, Opacity as nd, User as Ll, Layer as ay, UserData as cy, Editor as uy, SINGLETON_ENTITY_ID as dy, EventType as Lo, resolveLayerRank as od, compareBlockOrder as fy } from "@woven-canvas/core";
6
6
  import { Arc as rn, Vec2 as An, Aabb as Pn, Rect as hy } from "@woven-canvas/math";
7
7
  import { EraserStroke as py, POINTS_CAPACITY as rd, createEraserPlugin as my } from "@woven-canvas/plugin-eraser";
8
8
  import { PenStrokeKind as Ia, PenStroke as Oa, createPenPlugin as gy } from "@woven-canvas/plugin-pen";
@@ -10,31 +10,31 @@ import { CONTROLS_PLUGIN_NAME as yy, DEFAULT_CONTROLS_OPTIONS as vy, CanvasContr
10
10
  import { createTapesPlugin as ky } from "@woven-canvas/plugin-tapes";
11
11
  const Xh = [
12
12
  {
13
- kind: Ze.None,
13
+ kind: Qe.None,
14
14
  label: "None",
15
15
  gap: 0,
16
16
  svg: ""
17
17
  },
18
18
  {
19
- kind: Ze.V,
19
+ kind: Qe.V,
20
20
  label: "Arrow",
21
21
  gap: 15,
22
22
  svg: '<polyline points="-10,-7 -1,0 -10,7" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" />'
23
23
  },
24
24
  {
25
- kind: Ze.Delta,
25
+ kind: Qe.Delta,
26
26
  label: "Triangle",
27
27
  gap: 20,
28
28
  svg: '<polygon points="-1,0 -12,-7 -12,7" fill="currentColor" />'
29
29
  },
30
30
  {
31
- kind: Ze.Circle,
31
+ kind: Qe.Circle,
32
32
  label: "Circle",
33
33
  gap: 0,
34
34
  svg: '<circle cx="-6" cy="0" r="6" fill="currentColor" />'
35
35
  },
36
36
  {
37
- kind: Ze.Diamond,
37
+ kind: Qe.Diamond,
38
38
  label: "Diamond",
39
39
  gap: 0,
40
40
  svg: '<polygon points="0,0 -7,-6 -14,0 -7,6" fill="currentColor" />'
@@ -49,7 +49,7 @@ const Zh = Symbol.for(
49
49
  "__woven_canvas_text_editing_options__"
50
50
  ), Nc = Symbol.for("__woven_canvas_toolbar__"), Ue = Symbol.for("__woven_canvas__");
51
51
  function _e(n, e) {
52
- const t = pe(Ue);
52
+ const t = me(Ue);
53
53
  if (!t)
54
54
  throw new Error("useComponent must be used within a WovenCanvas component");
55
55
  const o = Te(null), r = t.getEditor();
@@ -116,7 +116,7 @@ const by = { key: 0 }, xy = ["x1", "y1", "x2", "y2", "stroke", "stroke-width"],
116
116
  return `${y[0]},${y[1]} ${m[0]},${m[1]} ${p[0]},${p[1]} ${g[0]},${g[1]}`;
117
117
  });
118
118
  return (l, a) => t.value ? (T(), O("g", by, [
119
- n.kind === H(Ze).V && o.value ? (T(), O(ue, { key: 0 }, [
119
+ n.kind === H(Qe).V && o.value ? (T(), O(ue, { key: 0 }, [
120
120
  S("line", {
121
121
  x1: o.value.p1[0],
122
122
  y1: o.value.p1[1],
@@ -135,22 +135,22 @@ const by = { key: 0 }, xy = ["x1", "y1", "x2", "y2", "stroke", "stroke-width"],
135
135
  "stroke-width": n.thickness,
136
136
  "stroke-linecap": "round"
137
137
  }, null, 8, Sy)
138
- ], 64)) : n.kind === H(Ze).Delta && r.value ? (T(), O("polygon", {
138
+ ], 64)) : n.kind === H(Qe).Delta && r.value ? (T(), O("polygon", {
139
139
  key: 1,
140
140
  points: r.value,
141
141
  fill: n.color
142
- }, null, 8, Cy)) : n.kind === H(Ze).Circle && s.value ? (T(), O("circle", {
142
+ }, null, 8, Cy)) : n.kind === H(Qe).Circle && s.value ? (T(), O("circle", {
143
143
  key: 2,
144
144
  cx: s.value.center[0],
145
145
  cy: s.value.center[1],
146
146
  r: s.value.radius,
147
147
  fill: n.color
148
- }, null, 8, Ty)) : n.kind === H(Ze).Diamond && i.value ? (T(), O("polygon", {
148
+ }, null, 8, Ty)) : n.kind === H(Qe).Diamond && i.value ? (T(), O("polygon", {
149
149
  key: 3,
150
150
  points: i.value,
151
151
  fill: n.color
152
- }, null, 8, My)) : U("", !0)
153
- ])) : U("", !0);
152
+ }, null, 8, My)) : K("", !0)
153
+ ])) : K("", !0);
154
154
  }
155
155
  }), Iy = {
156
156
  class: "arrow-svg",
@@ -254,7 +254,7 @@ const by = { key: 0 }, xy = ["x1", "y1", "x2", "y2", "stroke", "stroke-width"],
254
254
  fill: "none",
255
255
  "stroke-width": u.value,
256
256
  "stroke-linecap": "round"
257
- }, null, 8, _y)) : U("", !0),
257
+ }, null, 8, _y)) : K("", !0),
258
258
  m.value ? (T(), O(ue, { key: 2 }, [
259
259
  m.value.startHead !== "none" ? (T(), ne(Ln, {
260
260
  key: 0,
@@ -264,7 +264,7 @@ const by = { key: 0 }, xy = ["x1", "y1", "x2", "y2", "stroke", "stroke-width"],
264
264
  "arrow-thickness": c.value,
265
265
  color: a.value,
266
266
  kind: m.value.startHead
267
- }, null, 8, ["position", "direction", "thickness", "arrow-thickness", "color", "kind"])) : U("", !0),
267
+ }, null, 8, ["position", "direction", "thickness", "arrow-thickness", "color", "kind"])) : K("", !0),
268
268
  m.value.endHead !== "none" ? (T(), ne(Ln, {
269
269
  key: 1,
270
270
  position: m.value.end,
@@ -273,7 +273,7 @@ const by = { key: 0 }, xy = ["x1", "y1", "x2", "y2", "stroke", "stroke-width"],
273
273
  "arrow-thickness": c.value,
274
274
  color: a.value,
275
275
  kind: m.value.endHead
276
- }, null, 8, ["position", "direction", "thickness", "arrow-thickness", "color", "kind"])) : U("", !0),
276
+ }, null, 8, ["position", "direction", "thickness", "arrow-thickness", "color", "kind"])) : K("", !0),
277
277
  d.value ? (T(), O(ue, { key: 2 }, [
278
278
  f.value && g.value ? (T(), O("path", {
279
279
  key: 0,
@@ -292,7 +292,7 @@ const by = { key: 0 }, xy = ["x1", "y1", "x2", "y2", "stroke", "stroke-width"],
292
292
  fill: "none",
293
293
  style: { "stroke-width": "calc(2px / var(--wov-zoom))" },
294
294
  "stroke-linecap": "round"
295
- }, null, 8, Ny)) : U("", !0),
295
+ }, null, 8, Ny)) : K("", !0),
296
296
  m.value.startHead !== "none" ? (T(), ne(Ln, {
297
297
  key: 2,
298
298
  position: m.value.start,
@@ -301,7 +301,7 @@ const by = { key: 0 }, xy = ["x1", "y1", "x2", "y2", "stroke", "stroke-width"],
301
301
  "arrow-thickness": c.value,
302
302
  color: "var(--wov-highlighted-block-outline-color)",
303
303
  kind: m.value.startHead
304
- }, null, 8, ["position", "direction", "arrow-thickness", "kind"])) : U("", !0),
304
+ }, null, 8, ["position", "direction", "arrow-thickness", "kind"])) : K("", !0),
305
305
  m.value.endHead !== "none" ? (T(), ne(Ln, {
306
306
  key: 3,
307
307
  position: m.value.end,
@@ -310,9 +310,9 @@ const by = { key: 0 }, xy = ["x1", "y1", "x2", "y2", "stroke", "stroke-width"],
310
310
  "arrow-thickness": c.value,
311
311
  color: "var(--wov-highlighted-block-outline-color)",
312
312
  kind: m.value.endHead
313
- }, null, 8, ["position", "direction", "arrow-thickness", "kind"])) : U("", !0)
314
- ], 64)) : U("", !0)
315
- ], 64)) : U("", !0)
313
+ }, null, 8, ["position", "direction", "arrow-thickness", "kind"])) : K("", !0)
314
+ ], 64)) : K("", !0)
315
+ ], 64)) : K("", !0)
316
316
  ]))
317
317
  ], 512));
318
318
  }
@@ -438,7 +438,7 @@ const Wy = /* @__PURE__ */ Oo(Fy, [["render", Vy]]), jy = {
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, Uy))), 128)) : U("", !0),
441
+ }, null, 8, Uy))), 128)) : K("", !0),
442
442
  p.value ? (T(), O(ue, { key: 1 }, [
443
443
  (T(!0), O(ue, null, Me(p.value.lines, (y, b) => (T(), O("line", {
444
444
  key: b,
@@ -459,7 +459,7 @@ const Wy = /* @__PURE__ */ Oo(Fy, [["render", Vy]]), jy = {
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"])) : U("", !0),
462
+ }, null, 8, ["position", "direction", "thickness", "arrow-thickness", "color", "kind"])) : K("", !0),
463
463
  p.value.endHead !== "none" ? (T(), ne(Ln, {
464
464
  key: 1,
465
465
  position: p.value.endPos,
@@ -468,7 +468,7 @@ const Wy = /* @__PURE__ */ Oo(Fy, [["render", Vy]]), jy = {
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"])) : U("", !0),
471
+ }, null, 8, ["position", "direction", "thickness", "arrow-thickness", "color", "kind"])) : K("", !0),
472
472
  l.value ? (T(), O(ue, { key: 2 }, [
473
473
  (T(!0), O(ue, null, Me(p.value.lines, (y, b) => (T(), O("line", {
474
474
  key: "hl-" + b,
@@ -489,7 +489,7 @@ const Wy = /* @__PURE__ */ Oo(Fy, [["render", Vy]]), jy = {
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"])) : U("", !0),
492
+ }, null, 8, ["position", "direction", "arrow-thickness", "kind"])) : K("", !0),
493
493
  p.value.endHead !== "none" ? (T(), ne(Ln, {
494
494
  key: 1,
495
495
  position: p.value.endPos,
@@ -498,9 +498,9 @@ const Wy = /* @__PURE__ */ Oo(Fy, [["render", Vy]]), jy = {
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"])) : U("", !0)
502
- ], 64)) : U("", !0)
503
- ], 64)) : U("", !0)
501
+ }, null, 8, ["position", "direction", "arrow-thickness", "kind"])) : K("", !0)
502
+ ], 64)) : K("", !0)
503
+ ], 64)) : K("", !0)
504
504
  ]))
505
505
  ], 512));
506
506
  }
@@ -653,7 +653,7 @@ function iv(n, e, t, o) {
653
653
  function op(n, e, t) {
654
654
  return Xt(n, $n(e, t));
655
655
  }
656
- const Ge = [0, 0], Cn = [0, 0], Tn = [0, 0];
656
+ const Ye = [0, 0], Cn = [0, 0], Tn = [0, 0];
657
657
  function lv(n, e) {
658
658
  let t = op(n, np(tp(jn(n, Xt(n, [1, 1])))), -e), o = [], r = 1 / 13;
659
659
  for (let s = r; s <= 1; s += r) o.push(Rc(t, n, Yr * 2 * s));
@@ -697,16 +697,16 @@ function hv(n, e = {}) {
697
697
  k = Math.max(0.01, k * Math.min(qe, kt));
698
698
  let Dt = (Be ? n[J] : n[J + 1]).vector, Sn = Be ? 1 : ud(re, Dt), yr = ud(re, x) < 0 && !R, oo = Sn !== null && Sn < 0;
699
699
  if (yr || oo) {
700
- zl(Ge, x), Bl(Ge, Ge, k);
701
- for (let Vt = 0; Vt <= 1; Vt += 0.07692307692307693) _a(Cn, Y, Ge), fd(Cn, Cn, Y, Yr * Vt), A = [Cn[0], Cn[1]], b.push(A), cd(Tn, Y, Ge), fd(Tn, Tn, Y, Yr * -Vt), D = [Tn[0], Tn[1]], w.push(D);
700
+ zl(Ye, x), Bl(Ye, Ye, k);
701
+ for (let Vt = 0; Vt <= 1; Vt += 0.07692307692307693) _a(Cn, Y, Ye), fd(Cn, Cn, Y, Yr * Vt), A = [Cn[0], Cn[1]], b.push(A), cd(Tn, Y, Ye), fd(Tn, Tn, Y, Yr * -Vt), D = [Tn[0], Tn[1]], w.push(D);
702
702
  M = A, E = D, oo && (R = !0);
703
703
  continue;
704
704
  }
705
705
  if (R = !1, Be) {
706
- zl(Ge, re), Bl(Ge, Ge, k), b.push(jn(Y, Ge)), w.push(Xt(Y, Ge));
706
+ zl(Ye, re), Bl(Ye, Ye, k), b.push(jn(Y, Ye)), w.push(Xt(Y, Ye));
707
707
  continue;
708
708
  }
709
- iv(Ge, Dt, re, Sn), zl(Ge, Ge), Bl(Ge, Ge, k), _a(Cn, Y, Ge), A = [Cn[0], Cn[1]], (J <= 1 || dd(M, A) > y) && (b.push(A), M = A), cd(Tn, Y, Ge), D = [Tn[0], Tn[1]], (J <= 1 || dd(E, D) > y) && (w.push(D), E = D), v = X, x = re;
709
+ iv(Ye, Dt, re, Sn), zl(Ye, Ye), Bl(Ye, Ye, k), _a(Cn, Y, Ye), A = [Cn[0], Cn[1]], (J <= 1 || dd(M, A) > y) && (b.push(A), M = A), cd(Tn, Y, Ye), D = [Tn[0], Tn[1]], (J <= 1 || dd(E, D) > y) && (w.push(D), E = D), v = X, x = re;
710
710
  }
711
711
  let N = [n[0].point[0], n[0].point[1]], W = n.length > 1 ? [n[n.length - 1].point[0], n[n.length - 1].point[1]] : Xt(n[0].point, [1, 1]), V = [], ee = [];
712
712
  if (n.length === 1) {
@@ -785,7 +785,7 @@ const mv = { class: "wov-eraser-stroke" }, gv = { preserveAspectRatio: "none" },
785
785
  g = m[v], y = m[v + 1], w += `${s(g[0], y[0]).toFixed(2)},${s(g[1], y[1]).toFixed(2)} `;
786
786
  return w += `${y[0].toFixed(2)},${y[1].toFixed(2)} `, w += "Z", w;
787
787
  }
788
- return me(
788
+ return pe(
789
789
  [t, o],
790
790
  ([l, a]) => {
791
791
  if (!l || !a) {
@@ -807,7 +807,7 @@ const mv = { class: "wov-eraser-stroke" }, gv = { preserveAspectRatio: "none" },
807
807
  }
808
808
  });
809
809
  function Ae() {
810
- const n = pe(Ue);
810
+ const n = me(Ue);
811
811
  if (!n)
812
812
  throw new Error("useEditorContext must be used within a WovenCanvas component");
813
813
  return {
@@ -907,7 +907,7 @@ const bv = { class: "wov-image-block" }, xv = {
907
907
  },
908
908
  async setup(n) {
909
909
  let e, t;
910
- const o = n, r = pe(Ue);
910
+ const o = n, r = me(Ue);
911
911
  if (!r)
912
912
  throw new Error("ImageBlock must be used within a WovenCanvas component");
913
913
  const s = r, i = _e(o.entityId, gn), l = _e(o.entityId, Us), a = s.getAssetManager(), c = _(() => {
@@ -967,7 +967,7 @@ const bv = { class: "wov-image-block" }, xv = {
967
967
  console.error("Failed to get display URL:", C), g.value = !0, m.value = !1;
968
968
  }
969
969
  }
970
- me(
970
+ pe(
971
971
  () => i.value,
972
972
  () => {
973
973
  w();
@@ -975,7 +975,7 @@ const bv = { class: "wov-image-block" }, xv = {
975
975
  { immediate: !0 }
976
976
  ), wt(() => {
977
977
  w();
978
- }), me(
978
+ }), pe(
979
979
  () => [o.block.size[0], o.block.size[1]],
980
980
  () => {
981
981
  const k = u();
@@ -1003,7 +1003,7 @@ const bv = { class: "wov-image-block" }, xv = {
1003
1003
  alt: ((x = H(l)) == null ? void 0 : x.alt) || "",
1004
1004
  style: ve(v.value),
1005
1005
  draggable: "false"
1006
- }, null, 12, Tv)) : U("", !0)
1006
+ }, null, 12, Tv)) : K("", !0)
1007
1007
  ]);
1008
1008
  };
1009
1009
  }
@@ -1053,7 +1053,7 @@ const bv = { class: "wov-image-block" }, xv = {
1053
1053
  const g = p[p.length - 1];
1054
1054
  return m += `L${g[0].toFixed(2)},${g[1].toFixed(2)} `, m += "Z", m;
1055
1055
  }
1056
- me(
1056
+ pe(
1057
1057
  [t, o],
1058
1058
  ([p, m]) => {
1059
1059
  if (!p || !m) {
@@ -1120,8 +1120,8 @@ const bv = { class: "wov-image-block" }, xv = {
1120
1120
  "stroke-linecap": "round",
1121
1121
  "stroke-linejoin": "round"
1122
1122
  }, null, 8, _v)
1123
- ])) : U("", !0),
1124
- U("", !0)
1123
+ ])) : K("", !0),
1124
+ K("", !0)
1125
1125
  ], 8, Ev);
1126
1126
  };
1127
1127
  }
@@ -1141,11 +1141,11 @@ const bv = { class: "wov-image-block" }, xv = {
1141
1141
  heart: "M50,16 C44,7 37,0 26,0 11,0 0,12 0,28 0,60 16,65 50,100 84,65 100,60 100,28 100,12 89,0 74,0 63,0 56,7 50,16 Z",
1142
1142
  arrow: "M0,35 L60,35 L60,0 L100,50 L60,100 L60,65 L0,65 Z"
1143
1143
  };
1144
- function Ye(n) {
1144
+ function Xe(n) {
1145
1145
  this.content = n;
1146
1146
  }
1147
- Ye.prototype = {
1148
- constructor: Ye,
1147
+ Xe.prototype = {
1148
+ constructor: Xe,
1149
1149
  find: function(n) {
1150
1150
  for (var e = 0; e < this.content.length; e += 2)
1151
1151
  if (this.content[e] === n) return e;
@@ -1164,7 +1164,7 @@ Ye.prototype = {
1164
1164
  // given, the key of the binding will be replaced with that key.
1165
1165
  update: function(n, e, t) {
1166
1166
  var o = t && t != n ? this.remove(t) : this, r = o.find(n), s = o.content.slice();
1167
- return r == -1 ? s.push(t || n, e) : (s[r + 1] = e, t && (s[r] = t)), new Ye(s);
1167
+ return r == -1 ? s.push(t || n, e) : (s[r + 1] = e, t && (s[r] = t)), new Xe(s);
1168
1168
  },
1169
1169
  // :: (string) → OrderedMap
1170
1170
  // Return a map with the given key removed, if it existed.
@@ -1172,25 +1172,25 @@ Ye.prototype = {
1172
1172
  var e = this.find(n);
1173
1173
  if (e == -1) return this;
1174
1174
  var t = this.content.slice();
1175
- return t.splice(e, 2), new Ye(t);
1175
+ return t.splice(e, 2), new Xe(t);
1176
1176
  },
1177
1177
  // :: (string, any) → OrderedMap
1178
1178
  // Add a new key to the start of the map.
1179
1179
  addToStart: function(n, e) {
1180
- return new Ye([n, e].concat(this.remove(n).content));
1180
+ return new Xe([n, e].concat(this.remove(n).content));
1181
1181
  },
1182
1182
  // :: (string, any) → OrderedMap
1183
1183
  // Add a new key to the end of the map.
1184
1184
  addToEnd: function(n, e) {
1185
1185
  var t = this.remove(n).content.slice();
1186
- return t.push(n, e), new Ye(t);
1186
+ return t.push(n, e), new Xe(t);
1187
1187
  },
1188
1188
  // :: (string, string, any) → OrderedMap
1189
1189
  // Add a key after the given key. If `place` is not found, the new
1190
1190
  // key is added to the end.
1191
1191
  addBefore: function(n, e, t) {
1192
1192
  var o = this.remove(e), r = o.content.slice(), s = o.find(n);
1193
- return r.splice(s == -1 ? r.length : s, 0, e, t), new Ye(r);
1193
+ return r.splice(s == -1 ? r.length : s, 0, e, t), new Xe(r);
1194
1194
  },
1195
1195
  // :: ((key: string, value: any))
1196
1196
  // Call the given function for each key/value pair in the map, in
@@ -1203,20 +1203,20 @@ Ye.prototype = {
1203
1203
  // Create a new map by prepending the keys in this map that don't
1204
1204
  // appear in `map` before the keys in `map`.
1205
1205
  prepend: function(n) {
1206
- return n = Ye.from(n), n.size ? new Ye(n.content.concat(this.subtract(n).content)) : this;
1206
+ return n = Xe.from(n), n.size ? new Xe(n.content.concat(this.subtract(n).content)) : this;
1207
1207
  },
1208
1208
  // :: (union<Object, OrderedMap>) → OrderedMap
1209
1209
  // Create a new map by appending the keys in this map that don't
1210
1210
  // appear in `map` after the keys in `map`.
1211
1211
  append: function(n) {
1212
- return n = Ye.from(n), n.size ? new Ye(this.subtract(n).content.concat(n.content)) : this;
1212
+ return n = Xe.from(n), n.size ? new Xe(this.subtract(n).content.concat(n.content)) : this;
1213
1213
  },
1214
1214
  // :: (union<Object, OrderedMap>) → OrderedMap
1215
1215
  // Create a map containing all the keys in this map that don't
1216
1216
  // appear in `map`.
1217
1217
  subtract: function(n) {
1218
1218
  var e = this;
1219
- n = Ye.from(n);
1219
+ n = Xe.from(n);
1220
1220
  for (var t = 0; t < n.content.length; t += 2)
1221
1221
  e = e.remove(n.content[t]);
1222
1222
  return e;
@@ -1235,11 +1235,11 @@ Ye.prototype = {
1235
1235
  return this.content.length >> 1;
1236
1236
  }
1237
1237
  };
1238
- Ye.from = function(n) {
1239
- if (n instanceof Ye) return n;
1238
+ Xe.from = function(n) {
1239
+ if (n instanceof Xe) return n;
1240
1240
  var e = [];
1241
1241
  if (n) for (var t in n) e.push(t, n[t]);
1242
- return new Ye(e);
1242
+ return new Xe(e);
1243
1243
  };
1244
1244
  function rp(n, e, t) {
1245
1245
  for (let o = 0; ; o++) {
@@ -1290,7 +1290,7 @@ function sp(n, e, t, o) {
1290
1290
  t -= a, o -= a;
1291
1291
  }
1292
1292
  }
1293
- class L {
1293
+ class $ {
1294
1294
  /**
1295
1295
  @internal
1296
1296
  */
@@ -1345,7 +1345,7 @@ class L {
1345
1345
  let t = this.lastChild, o = e.firstChild, r = this.content.slice(), s = 0;
1346
1346
  for (t.isText && t.sameMarkup(o) && (r[r.length - 1] = t.withText(t.text + o.text), s = 1); s < e.content.length; s++)
1347
1347
  r.push(e.content[s]);
1348
- return new L(r, this.size + e.size);
1348
+ return new $(r, this.size + e.size);
1349
1349
  }
1350
1350
  /**
1351
1351
  Cut out the sub-fragment between the two given positions.
@@ -1359,13 +1359,13 @@ class L {
1359
1359
  let l = this.content[s], a = i + l.nodeSize;
1360
1360
  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;
1361
1361
  }
1362
- return new L(o, r);
1362
+ return new $(o, r);
1363
1363
  }
1364
1364
  /**
1365
1365
  @internal
1366
1366
  */
1367
1367
  cutByIndex(e, t) {
1368
- return e == t ? L.empty : e == 0 && t == this.content.length ? this : new L(this.content.slice(e, t));
1368
+ return e == t ? $.empty : e == 0 && t == this.content.length ? this : new $(this.content.slice(e, t));
1369
1369
  }
1370
1370
  /**
1371
1371
  Create a new fragment in which the node at the given index is
@@ -1376,21 +1376,21 @@ class L {
1376
1376
  if (o == t)
1377
1377
  return this;
1378
1378
  let r = this.content.slice(), s = this.size + t.nodeSize - o.nodeSize;
1379
- return r[e] = t, new L(r, s);
1379
+ return r[e] = t, new $(r, s);
1380
1380
  }
1381
1381
  /**
1382
1382
  Create a new fragment by prepending the given node to this
1383
1383
  fragment.
1384
1384
  */
1385
1385
  addToStart(e) {
1386
- return new L([e].concat(this.content), this.size + e.nodeSize);
1386
+ return new $([e].concat(this.content), this.size + e.nodeSize);
1387
1387
  }
1388
1388
  /**
1389
1389
  Create a new fragment by appending the given node to this
1390
1390
  fragment.
1391
1391
  */
1392
1392
  addToEnd(e) {
1393
- return new L(this.content.concat(e), this.size + e.nodeSize);
1393
+ return new $(this.content.concat(e), this.size + e.nodeSize);
1394
1394
  }
1395
1395
  /**
1396
1396
  Compare this fragment to another one.
@@ -1505,10 +1505,10 @@ class L {
1505
1505
  */
1506
1506
  static fromJSON(e, t) {
1507
1507
  if (!t)
1508
- return L.empty;
1508
+ return $.empty;
1509
1509
  if (!Array.isArray(t))
1510
1510
  throw new RangeError("Invalid input for Fragment.fromJSON");
1511
- return new L(t.map(e.nodeFromJSON));
1511
+ return new $(t.map(e.nodeFromJSON));
1512
1512
  }
1513
1513
  /**
1514
1514
  Build a fragment from an array of nodes. Ensures that adjacent
@@ -1516,13 +1516,13 @@ class L {
1516
1516
  */
1517
1517
  static fromArray(e) {
1518
1518
  if (!e.length)
1519
- return L.empty;
1519
+ return $.empty;
1520
1520
  let t, o = 0;
1521
1521
  for (let r = 0; r < e.length; r++) {
1522
1522
  let s = e[r];
1523
1523
  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);
1524
1524
  }
1525
- return new L(t || e, o);
1525
+ return new $(t || e, o);
1526
1526
  }
1527
1527
  /**
1528
1528
  Create a fragment from something that can be interpreted as a
@@ -1532,17 +1532,17 @@ class L {
1532
1532
  */
1533
1533
  static from(e) {
1534
1534
  if (!e)
1535
- return L.empty;
1536
- if (e instanceof L)
1535
+ return $.empty;
1536
+ if (e instanceof $)
1537
1537
  return e;
1538
1538
  if (Array.isArray(e))
1539
1539
  return this.fromArray(e);
1540
1540
  if (e.attrs)
1541
- return new L([e], e.nodeSize);
1541
+ return new $([e], e.nodeSize);
1542
1542
  throw new RangeError("Can not convert " + e + " to a Fragment" + (e.nodesBetween ? " (looks like multiple versions of prosemirror-model were loaded)" : ""));
1543
1543
  }
1544
1544
  }
1545
- L.empty = new L([], 0);
1545
+ $.empty = new $([], 0);
1546
1546
  const Fl = { index: 0, offset: 0 };
1547
1547
  function Ss(n, e) {
1548
1548
  return Fl.index = n, Fl.offset = e, Fl;
@@ -1744,7 +1744,7 @@ class G {
1744
1744
  let o = t.openStart || 0, r = t.openEnd || 0;
1745
1745
  if (typeof o != "number" || typeof r != "number")
1746
1746
  throw new RangeError("Invalid input for Slice.fromJSON");
1747
- return new G(L.fromJSON(e, t.content), o, r);
1747
+ return new G($.fromJSON(e, t.content), o, r);
1748
1748
  }
1749
1749
  /**
1750
1750
  Create a slice from a fragment by taking the maximum possible
@@ -1759,7 +1759,7 @@ class G {
1759
1759
  return new G(e, o, r);
1760
1760
  }
1761
1761
  }
1762
- G.empty = new G(L.empty, 0, 0);
1762
+ G.empty = new G($.empty, 0, 0);
1763
1763
  function ip(n, e, t) {
1764
1764
  let { index: o, offset: r } = n.findIndex(e), s = n.maybeChild(o), { index: i, offset: l } = n.findIndex(t);
1765
1765
  if (r == e || s.isText) {
@@ -1824,7 +1824,7 @@ function mo(n, e) {
1824
1824
  }
1825
1825
  function up(n, e, t, o, r) {
1826
1826
  let s = n.depth > r && Ra(n, e, r + 1), i = o.depth > r && Ra(t, o, r + 1), l = [];
1827
- return Nr(null, n, r, l), s && i && e.index(r) == t.index(r) ? (cp(s, i), po(mo(s, up(n, e, t, o, r + 1)), l)) : (s && po(mo(s, Qs(n, e, r + 1)), l), Nr(e, t, r, l), i && po(mo(i, Qs(t, o, r + 1)), l)), Nr(o, null, r, l), new L(l);
1827
+ return Nr(null, n, r, l), s && i && e.index(r) == t.index(r) ? (cp(s, i), po(mo(s, up(n, e, t, o, r + 1)), l)) : (s && po(mo(s, Qs(n, e, r + 1)), l), Nr(e, t, r, l), i && po(mo(i, Qs(t, o, r + 1)), l)), Nr(o, null, r, l), new $(l);
1828
1828
  }
1829
1829
  function Qs(n, e, t) {
1830
1830
  let o = [];
@@ -1832,12 +1832,12 @@ function Qs(n, e, t) {
1832
1832
  let r = Ra(n, e, t + 1);
1833
1833
  po(mo(r, Qs(n, e, t + 1)), o);
1834
1834
  }
1835
- return Nr(e, null, t, o), new L(o);
1835
+ return Nr(e, null, t, o), new $(o);
1836
1836
  }
1837
1837
  function $v(n, e) {
1838
1838
  let t = e.depth - n.openStart, r = e.node(t).copy(n.content);
1839
1839
  for (let s = t - 1; s >= 0; s--)
1840
- r = e.node(s).copy(L.from(r));
1840
+ r = e.node(s).copy($.from(r));
1841
1841
  return {
1842
1842
  start: r.resolveNoCache(n.openStart + t),
1843
1843
  end: r.resolveNoCache(r.content.size - n.openEnd - t)
@@ -2142,7 +2142,7 @@ let yn = class Pa {
2142
2142
  @internal
2143
2143
  */
2144
2144
  constructor(e, t, o, r = we.none) {
2145
- this.type = e, this.attrs = t, this.marks = r, this.content = o || L.empty;
2145
+ this.type = e, this.attrs = t, this.marks = r, this.content = o || $.empty;
2146
2146
  }
2147
2147
  /**
2148
2148
  The array of this node's child nodes.
@@ -2431,7 +2431,7 @@ let yn = class Pa {
2431
2431
  can optionally pass `start` and `end` indices into the
2432
2432
  replacement fragment.
2433
2433
  */
2434
- canReplace(e, t, o = L.empty, r = 0, s = o.childCount) {
2434
+ canReplace(e, t, o = $.empty, r = 0, s = o.childCount) {
2435
2435
  let i = this.contentMatchAt(e).matchFragment(o, r, s), l = i && i.matchFragment(this.content, t);
2436
2436
  if (!l || !l.validEnd)
2437
2437
  return !1;
@@ -2502,7 +2502,7 @@ let yn = class Pa {
2502
2502
  throw new RangeError("Invalid text node in JSON");
2503
2503
  return e.text(t.text, o);
2504
2504
  }
2505
- let r = L.fromJSON(e, t.content), s = e.nodeType(t.type).create(t.attrs, r, o);
2505
+ let r = $.fromJSON(e, t.content), s = e.nodeType(t.type).create(t.attrs, r, o);
2506
2506
  return s.type.checkAttrs(s.attrs), s;
2507
2507
  }
2508
2508
  };
@@ -2630,7 +2630,7 @@ class xo {
2630
2630
  function s(i, l) {
2631
2631
  let a = i.matchFragment(e, o);
2632
2632
  if (a && (!t || a.validEnd))
2633
- return L.from(l.map((c) => c.createAndFill()));
2633
+ return $.from(l.map((c) => c.createAndFill()));
2634
2634
  for (let c = 0; c < i.next.length; c++) {
2635
2635
  let { type: u, next: d } = i.next[c];
2636
2636
  if (!(u.isText || u.hasRequiredAttrs()) && r.indexOf(d) == -1) {
@@ -3013,7 +3013,7 @@ let bd = class vp {
3013
3013
  create(e = null, t, o) {
3014
3014
  if (this.isText)
3015
3015
  throw new Error("NodeType.create can't construct text nodes");
3016
- return new yn(this, this.computeAttrs(e), L.from(t), we.setFrom(o));
3016
+ return new yn(this, this.computeAttrs(e), $.from(t), we.setFrom(o));
3017
3017
  }
3018
3018
  /**
3019
3019
  Like [`create`](https://prosemirror.net/docs/ref/#model.NodeType.create), but check the given content
@@ -3021,7 +3021,7 @@ let bd = class vp {
3021
3021
  if it doesn't match.
3022
3022
  */
3023
3023
  createChecked(e = null, t, o) {
3024
- return t = L.from(t), this.checkContent(t), new yn(this, this.computeAttrs(e), t, we.setFrom(o));
3024
+ return t = $.from(t), this.checkContent(t), new yn(this, this.computeAttrs(e), t, we.setFrom(o));
3025
3025
  }
3026
3026
  /**
3027
3027
  Like [`create`](https://prosemirror.net/docs/ref/#model.NodeType.create), but see if it is
@@ -3032,13 +3032,13 @@ let bd = class vp {
3032
3032
  `Fragment.empty` as content.
3033
3033
  */
3034
3034
  createAndFill(e = null, t, o) {
3035
- if (e = this.computeAttrs(e), t = L.from(t), t.size) {
3035
+ if (e = this.computeAttrs(e), t = $.from(t), t.size) {
3036
3036
  let i = this.contentMatch.fillBefore(t);
3037
3037
  if (!i)
3038
3038
  return null;
3039
3039
  t = i.append(t);
3040
3040
  }
3041
- let r = this.contentMatch.matchFragment(t), s = r && r.fillBefore(L.empty, !0);
3041
+ let r = this.contentMatch.matchFragment(t), s = r && r.fillBefore($.empty, !0);
3042
3042
  return s ? new yn(this, e, t.append(s), we.setFrom(o)) : null;
3043
3043
  }
3044
3044
  /**
@@ -3193,7 +3193,7 @@ class wp {
3193
3193
  let t = this.spec = {};
3194
3194
  for (let r in e)
3195
3195
  t[r] = e[r];
3196
- t.nodes = Ye.from(e.nodes), t.marks = Ye.from(e.marks || {}), this.nodes = bd.compile(this.spec.nodes, this), this.marks = ol.compile(this.spec.marks, this);
3196
+ t.nodes = Xe.from(e.nodes), t.marks = Xe.from(e.marks || {}), this.nodes = bd.compile(this.spec.nodes, this), this.marks = ol.compile(this.spec.marks, this);
3197
3197
  let o = /* @__PURE__ */ Object.create(null);
3198
3198
  for (let r in this.nodes) {
3199
3199
  if (r in this.marks)
@@ -3442,7 +3442,7 @@ class Cs {
3442
3442
  if (!this.match) {
3443
3443
  if (!this.type)
3444
3444
  return [];
3445
- let t = this.type.contentMatch.fillBefore(L.from(e));
3445
+ let t = this.type.contentMatch.fillBefore($.from(e));
3446
3446
  if (t)
3447
3447
  this.match = this.type.contentMatch.matchFragment(t);
3448
3448
  else {
@@ -3460,8 +3460,8 @@ class Cs {
3460
3460
  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));
3461
3461
  }
3462
3462
  }
3463
- let t = L.from(this.content);
3464
- return !e && this.match && (t = t.append(this.match.fillBefore(L.empty, !0))), this.type ? this.type.create(this.attrs, t, this.marks) : t;
3463
+ let t = $.from(this.content);
3464
+ return !e && this.match && (t = t.append(this.match.fillBefore($.empty, !0))), this.type ? this.type.create(this.attrs, t, this.marks) : t;
3465
3465
  }
3466
3466
  inlineContext(e) {
3467
3467
  return this.type ? this.type.inlineContent : this.content.length ? this.content[0].isInline : e.parentNode && !kp.hasOwnProperty(e.parentNode.nodeName.toLowerCase());
@@ -4291,7 +4291,7 @@ function Pc(n, e, t) {
4291
4291
  let s = n.child(r);
4292
4292
  s.content.size && (s = s.copy(Pc(s.content, e, s))), s.isInline && (s = e(s, t, r)), o.push(s);
4293
4293
  }
4294
- return L.fromArray(o);
4294
+ return $.fromArray(o);
4295
4295
  }
4296
4296
  class Bn extends at {
4297
4297
  /**
@@ -4383,7 +4383,7 @@ class zn extends at {
4383
4383
  if (!t)
4384
4384
  return Le.fail("No node at mark step's position");
4385
4385
  let o = t.type.create(t.attrs, null, this.mark.addToSet(t.marks));
4386
- return Le.fromReplace(e, this.pos, this.pos + 1, new G(L.from(o), 0, t.isLeaf ? 0 : 1));
4386
+ return Le.fromReplace(e, this.pos, this.pos + 1, new G($.from(o), 0, t.isLeaf ? 0 : 1));
4387
4387
  }
4388
4388
  invert(e) {
4389
4389
  let t = e.nodeAt(this.pos);
@@ -4427,7 +4427,7 @@ class So extends at {
4427
4427
  if (!t)
4428
4428
  return Le.fail("No node at mark step's position");
4429
4429
  let o = t.type.create(t.attrs, null, this.mark.removeFromSet(t.marks));
4430
- return Le.fromReplace(e, this.pos, this.pos + 1, new G(L.from(o), 0, t.isLeaf ? 0 : 1));
4430
+ return Le.fromReplace(e, this.pos, this.pos + 1, new G($.from(o), 0, t.isLeaf ? 0 : 1));
4431
4431
  }
4432
4432
  invert(e) {
4433
4433
  let t = e.nodeAt(this.pos);
@@ -4626,13 +4626,13 @@ function Lc(n, e, t, o = t.contentMatch, r = !0) {
4626
4626
  if (r && c.isText && t.whitespace != "pre") {
4627
4627
  let f, h = /\r?\n|\r/g, p;
4628
4628
  for (; f = h.exec(c.text); )
4629
- p || (p = new G(L.from(t.schema.text(" ", t.allowedMarks(c.marks))), 0, 0)), i.push(new ze(l + f.index, l + f.index + f[0].length, p));
4629
+ p || (p = new G($.from(t.schema.text(" ", t.allowedMarks(c.marks))), 0, 0)), i.push(new ze(l + f.index, l + f.index + f[0].length, p));
4630
4630
  }
4631
4631
  }
4632
4632
  l = u;
4633
4633
  }
4634
4634
  if (!o.validEnd) {
4635
- let a = o.fillBefore(L.empty, !0);
4635
+ let a = o.fillBefore($.empty, !0);
4636
4636
  n.replace(l, l, new G(a, 0, 0));
4637
4637
  }
4638
4638
  for (let a = i.length - 1; a >= 0; a--)
@@ -4654,12 +4654,12 @@ function cr(n) {
4654
4654
  return null;
4655
4655
  }
4656
4656
  function u1(n, e, t) {
4657
- let { $from: o, $to: r, depth: s } = e, i = o.before(s + 1), l = r.after(s + 1), a = i, c = l, u = L.empty, d = 0;
4657
+ let { $from: o, $to: r, depth: s } = e, i = o.before(s + 1), l = r.after(s + 1), a = i, c = l, u = $.empty, d = 0;
4658
4658
  for (let p = s, m = !1; p > t; p--)
4659
- m || o.index(p) > 0 ? (m = !0, u = L.from(o.node(p).copy(u)), d++) : a--;
4660
- let f = L.empty, h = 0;
4659
+ m || o.index(p) > 0 ? (m = !0, u = $.from(o.node(p).copy(u)), d++) : a--;
4660
+ let f = $.empty, h = 0;
4661
4661
  for (let p = s, m = !1; p > t; p--)
4662
- m || r.after(p + 1) < r.end(p) ? (m = !0, f = L.from(r.node(p).copy(f)), h++) : c++;
4662
+ m || r.after(p + 1) < r.end(p) ? (m = !0, f = $.from(r.node(p).copy(f)), h++) : c++;
4663
4663
  n.step(new Ve(a, c, i, l, new G(u.append(f), d, h), u.size - d, !0));
4664
4664
  }
4665
4665
  function Ep(n, e, t = null, o = n) {
@@ -4686,14 +4686,14 @@ function f1(n, e) {
4686
4686
  return !a || !a.validEnd ? null : i;
4687
4687
  }
4688
4688
  function h1(n, e, t) {
4689
- let o = L.empty;
4689
+ let o = $.empty;
4690
4690
  for (let i = t.length - 1; i >= 0; i--) {
4691
4691
  if (o.size) {
4692
4692
  let l = t[i].type.contentMatch.matchFragment(o);
4693
4693
  if (!l || !l.validEnd)
4694
4694
  throw new RangeError("Wrapper type given to Transform.wrap does not form valid content of its parent wrapper");
4695
4695
  }
4696
- o = L.from(t[i].type.create(t[i].attrs, o));
4696
+ o = $.from(t[i].type.create(t[i].attrs, o));
4697
4697
  }
4698
4698
  let r = e.start, s = e.end;
4699
4699
  n.step(new Ve(r, s, r, s, new G(o, 0, 0), t.length, !0));
@@ -4712,7 +4712,7 @@ function p1(n, e, t, o, r) {
4712
4712
  }
4713
4713
  c === !1 && Ip(n, i, l, s), Lc(n, n.mapping.slice(s).map(l, 1), o, void 0, c === null);
4714
4714
  let u = n.mapping.slice(s), d = u.map(l, 1), f = u.map(l + i.nodeSize, 1);
4715
- return n.step(new Ve(d, f, d + 1, f - 1, new G(L.from(o.create(a, null, i.marks)), 0, 0), 1, !0)), c === !0 && Ap(n, i, l, s), !1;
4715
+ return n.step(new Ve(d, f, d + 1, f - 1, new G($.from(o.create(a, null, i.marks)), 0, 0), 1, !0)), c === !0 && Ap(n, i, l, s), !1;
4716
4716
  }
4717
4717
  });
4718
4718
  }
@@ -4750,7 +4750,7 @@ function g1(n, e, t, o, r) {
4750
4750
  return n.replaceWith(e, e + s.nodeSize, i);
4751
4751
  if (!t.validContent(s.content))
4752
4752
  throw new RangeError("Invalid content for node type " + t.name);
4753
- n.step(new Ve(e, e + s.nodeSize, e + 1, e + s.nodeSize - 1, new G(L.from(i), 0, 0), 1, !0));
4753
+ n.step(new Ve(e, e + s.nodeSize, e + 1, e + s.nodeSize - 1, new G($.from(i), 0, 0), 1, !0));
4754
4754
  }
4755
4755
  function wn(n, e, t = 1, o) {
4756
4756
  let r = n.resolve(e), s = r.depth - t, i = o && o[o.length - 1] || r.parent;
@@ -4770,11 +4770,11 @@ function wn(n, e, t = 1, o) {
4770
4770
  return r.node(s).canReplaceWith(l, l, a ? a.type : r.node(s + 1).type);
4771
4771
  }
4772
4772
  function y1(n, e, t = 1, o) {
4773
- let r = n.doc.resolve(e), s = L.empty, i = L.empty;
4773
+ let r = n.doc.resolve(e), s = $.empty, i = $.empty;
4774
4774
  for (let l = r.depth, a = r.depth - t, c = t - 1; l > a; l--, c--) {
4775
- s = L.from(r.node(l).copy(s));
4775
+ s = $.from(r.node(l).copy(s));
4776
4776
  let u = o && o[c];
4777
- i = L.from(u ? u.type.create(u.attrs, i) : r.node(l).copy(i));
4777
+ i = $.from(u ? u.type.create(u.attrs, i) : r.node(l).copy(i));
4778
4778
  }
4779
4779
  n.step(new ze(e, e, new G(s.append(i), t, t), !0));
4780
4780
  }
@@ -4879,7 +4879,7 @@ function Dp(n, e, t) {
4879
4879
  }
4880
4880
  class b1 {
4881
4881
  constructor(e, t, o) {
4882
- this.$from = e, this.$to = t, this.unplaced = o, this.frontier = [], this.placed = L.empty;
4882
+ this.$from = e, this.$to = t, this.unplaced = o, this.frontier = [], this.placed = $.empty;
4883
4883
  for (let r = 0; r <= e.depth; r++) {
4884
4884
  let s = e.node(r);
4885
4885
  this.frontier.push({
@@ -4888,7 +4888,7 @@ class b1 {
4888
4888
  });
4889
4889
  }
4890
4890
  for (let r = e.depth; r > 0; r--)
4891
- this.placed = L.from(e.node(r).copy(this.placed));
4891
+ this.placed = $.from(e.node(r).copy(this.placed));
4892
4892
  }
4893
4893
  get depth() {
4894
4894
  return this.frontier.length - 1;
@@ -4927,7 +4927,7 @@ class b1 {
4927
4927
  let i = r.firstChild;
4928
4928
  for (let l = this.depth; l >= 0; l--) {
4929
4929
  let { type: a, match: c } = this.frontier[l], u, d = null;
4930
- if (t == 1 && (i ? c.matchType(i.type) || (d = c.fillBefore(L.from(i), !1)) : s && a.compatibleContent(s.type)))
4930
+ if (t == 1 && (i ? c.matchType(i.type) || (d = c.fillBefore($.from(i), !1)) : s && a.compatibleContent(s.type)))
4931
4931
  return { sliceDepth: o, frontierDepth: l, parent: s, inject: d };
4932
4932
  if (t == 2 && i && (u = c.findWrapping(i.type)))
4933
4933
  return { sliceDepth: o, frontierDepth: l, parent: s, wrap: u };
@@ -4971,7 +4971,7 @@ class b1 {
4971
4971
  c++, (c > 1 || a == 0 || m.content.size) && (d = g, u.push(Np(m.mark(f.allowedMarks(m.marks)), c == 1 ? a : 0, c == l.childCount ? h : -1)));
4972
4972
  }
4973
4973
  let p = c == l.childCount;
4974
- p || (h = -1), this.placed = Er(this.placed, t, L.from(u)), this.frontier[t].match = d, p && h < 0 && o && o.type == this.frontier[this.depth].type && this.frontier.length > 1 && this.closeFrontierNode();
4974
+ p || (h = -1), this.placed = Er(this.placed, t, $.from(u)), this.frontier[t].match = d, p && h < 0 && o && o.type == this.frontier[this.depth].type && this.frontier.length > 1 && this.closeFrontierNode();
4975
4975
  for (let m = 0, g = l; m < h; m++) {
4976
4976
  let y = g.lastChild;
4977
4977
  this.frontier.push({ type: y.type, match: y.contentMatchAt(y.childCount) }), g = y.content;
@@ -5017,10 +5017,10 @@ class b1 {
5017
5017
  }
5018
5018
  openFrontierNode(e, t = null, o) {
5019
5019
  let r = this.frontier[this.depth];
5020
- r.match = r.match.matchType(e), this.placed = Er(this.placed, this.depth, L.from(e.create(t, o))), this.frontier.push({ type: e, match: e.contentMatch });
5020
+ r.match = r.match.matchType(e), this.placed = Er(this.placed, this.depth, $.from(e.create(t, o))), this.frontier.push({ type: e, match: e.contentMatch });
5021
5021
  }
5022
5022
  closeFrontierNode() {
5023
- let t = this.frontier.pop().match.fillBefore(L.empty, !0);
5023
+ let t = this.frontier.pop().match.fillBefore($.empty, !0);
5024
5024
  t.childCount && (this.placed = Er(this.placed, this.frontier.length, t));
5025
5025
  }
5026
5026
  }
@@ -5039,7 +5039,7 @@ function Np(n, e, t) {
5039
5039
  if (e <= 0)
5040
5040
  return n;
5041
5041
  let o = n.content;
5042
- return e > 1 && (o = o.replaceChild(0, Np(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(L.empty, !0)))), n.copy(o);
5042
+ return e > 1 && (o = o.replaceChild(0, Np(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($.empty, !0)))), n.copy(o);
5043
5043
  }
5044
5044
  function jl(n, e, t, o, r) {
5045
5045
  let s = n.node(e), i = r ? n.indexAfter(e) : n.index(e);
@@ -5111,7 +5111,7 @@ function Rp(n, e, t, o, r) {
5111
5111
  }
5112
5112
  if (e > o) {
5113
5113
  let s = r.contentMatchAt(0), i = s.fillBefore(n).append(n);
5114
- n = i.append(s.matchFragment(i).fillBefore(L.empty, !0));
5114
+ n = i.append(s.matchFragment(i).fillBefore($.empty, !0));
5115
5115
  }
5116
5116
  return n;
5117
5117
  }
@@ -5120,7 +5120,7 @@ function T1(n, e, t, o) {
5120
5120
  let r = k1(n.doc, e, o.type);
5121
5121
  r != null && (e = t = r);
5122
5122
  }
5123
- n.replaceRange(e, t, new G(L.from(o), 0, 0));
5123
+ n.replaceRange(e, t, new G($.from(o), 0, 0));
5124
5124
  }
5125
5125
  function M1(n, e, t) {
5126
5126
  let o = n.doc.resolve(e), r = n.doc.resolve(t), s = Pp(o, r);
@@ -5162,7 +5162,7 @@ class qo extends at {
5162
5162
  o[s] = t.attrs[s];
5163
5163
  o[this.attr] = this.value;
5164
5164
  let r = t.type.create(o, null, t.marks);
5165
- return Le.fromReplace(e, this.pos, this.pos + 1, new G(L.from(r), 0, t.isLeaf ? 0 : 1));
5165
+ return Le.fromReplace(e, this.pos, this.pos + 1, new G($.from(r), 0, t.isLeaf ? 0 : 1));
5166
5166
  }
5167
5167
  getMap() {
5168
5168
  return gt.empty;
@@ -5300,7 +5300,7 @@ class Lp {
5300
5300
  fragment, node, or array of nodes.
5301
5301
  */
5302
5302
  replaceWith(e, t, o) {
5303
- return this.replace(e, t, new G(L.from(o), 0, 0));
5303
+ return this.replace(e, t, new G($.from(o), 0, 0));
5304
5304
  }
5305
5305
  /**
5306
5306
  Delete the content between the given positions.
@@ -5743,7 +5743,7 @@ class oe extends ce {
5743
5743
  return o ? ce.near(s) : new oe(s);
5744
5744
  }
5745
5745
  content() {
5746
- return new G(L.from(this.node), 0, 0);
5746
+ return new G($.from(this.node), 0, 0);
5747
5747
  }
5748
5748
  eq(e) {
5749
5749
  return e instanceof oe && e.anchor == this.anchor;
@@ -6546,10 +6546,10 @@ function Gp(n, e, t, o) {
6546
6546
  let c = !a && e.parent.canReplace(e.index(), e.index() + 1);
6547
6547
  if (c && (i = (l = r.contentMatchAt(r.childCount)).findWrapping(s.type)) && l.matchType(i[0] || s.type).validEnd) {
6548
6548
  if (t) {
6549
- let h = e.pos + s.nodeSize, p = L.empty;
6549
+ let h = e.pos + s.nodeSize, p = $.empty;
6550
6550
  for (let y = i.length - 1; y >= 0; y--)
6551
- p = L.from(i[y].create(null, p));
6552
- p = L.from(r.copy(p));
6551
+ p = $.from(i[y].create(null, p));
6552
+ p = $.from(r.copy(p));
6553
6553
  let m = n.tr.step(new Ve(e.pos - 1, h, e.pos, h, new G(p, 1, 0), i.length, !0)), g = m.doc.resolve(h + 2 * i.length);
6554
6554
  g.nodeAfter && g.nodeAfter.type == r.type && Do(m.doc, g.pos) && m.join(g.pos), t(m.scrollIntoView());
6555
6555
  }
@@ -6567,9 +6567,9 @@ function Gp(n, e, t, o) {
6567
6567
  g++;
6568
6568
  if (h.canReplace(h.childCount, h.childCount, m.content)) {
6569
6569
  if (t) {
6570
- let y = L.empty;
6570
+ let y = $.empty;
6571
6571
  for (let w = p.length - 1; w >= 0; w--)
6572
- y = L.from(p[w].copy(y));
6572
+ y = $.from(p[w].copy(y));
6573
6573
  let b = n.tr.step(new Ve(e.pos - p.length, e.pos + s.nodeSize, e.pos + g, e.pos + s.nodeSize - g, new G(y, p.length, 0), 0, !0));
6574
6574
  t(b.scrollIntoView());
6575
6575
  }
@@ -6659,9 +6659,9 @@ function U1(n, e, t, o = null) {
6659
6659
  return l ? (n && K1(n, e, l, r, t), !0) : !1;
6660
6660
  }
6661
6661
  function K1(n, e, t, o, r) {
6662
- let s = L.empty;
6662
+ let s = $.empty;
6663
6663
  for (let u = t.length - 1; u >= 0; u--)
6664
- s = L.from(t[u].type.create(t[u].attrs, s));
6664
+ s = $.from(t[u].type.create(t[u].attrs, s));
6665
6665
  n.step(new Ve(e.start - (o ? 2 : 0), e.end, e.start, e.end, new G(s, 0, 0), t.length, !0));
6666
6666
  let i = 0;
6667
6667
  for (let u = 0; u < t.length; u++)
@@ -6679,7 +6679,7 @@ function q1(n) {
6679
6679
  }
6680
6680
  function J1(n, e, t, o) {
6681
6681
  let r = n.tr, s = o.end, i = o.$to.end(o.depth);
6682
- s < i && (r.step(new Ve(s - 1, i, s, i, new G(L.from(t.create(null, o.parent.copy())), 1, 0), 1, !0)), o = new ei(r.doc.resolve(o.$from.pos), r.doc.resolve(i), o.depth));
6682
+ s < i && (r.step(new Ve(s - 1, i, s, i, new G($.from(t.create(null, o.parent.copy())), 1, 0), 1, !0)), o = new ei(r.doc.resolve(o.$from.pos), r.doc.resolve(i), o.depth));
6683
6683
  const l = cr(o);
6684
6684
  if (l == null)
6685
6685
  return !1;
@@ -6695,10 +6695,10 @@ function G1(n, e, t) {
6695
6695
  if (o.mapping.map(t.end) != t.start + s.nodeAfter.nodeSize)
6696
6696
  return !1;
6697
6697
  let l = t.startIndex == 0, a = t.endIndex == r.childCount, c = s.node(-1), u = s.index(-1);
6698
- if (!c.canReplace(u + (l ? 0 : 1), u + 1, i.content.append(a ? L.empty : L.from(r))))
6698
+ if (!c.canReplace(u + (l ? 0 : 1), u + 1, i.content.append(a ? $.empty : $.from(r))))
6699
6699
  return !1;
6700
6700
  let d = s.pos, f = d + i.nodeSize;
6701
- return o.step(new Ve(d - (l ? 1 : 0), f + (a ? 1 : 0), d + 1, f - 1, new G((l ? L.empty : L.from(r.copy(L.empty))).append(a ? L.empty : L.from(r.copy(L.empty))), l ? 0 : 1, a ? 0 : 1), l ? 0 : 1)), e(o.scrollIntoView()), !0;
6701
+ return o.step(new Ve(d - (l ? 1 : 0), f + (a ? 1 : 0), d + 1, f - 1, new G((l ? $.empty : $.from(r.copy($.empty))).append(a ? $.empty : $.from(r.copy($.empty))), l ? 0 : 1, a ? 0 : 1), l ? 0 : 1)), e(o.scrollIntoView()), !0;
6702
6702
  }
6703
6703
  function Y1(n) {
6704
6704
  return function(e, t) {
@@ -6712,13 +6712,13 @@ function Y1(n) {
6712
6712
  if (a.type != n)
6713
6713
  return !1;
6714
6714
  if (t) {
6715
- let c = a.lastChild && a.lastChild.type == l.type, u = L.from(c ? n.create() : null), d = new G(L.from(n.create(null, L.from(l.type.create(null, u)))), c ? 3 : 1, 0), f = s.start, h = s.end;
6715
+ let c = a.lastChild && a.lastChild.type == l.type, u = $.from(c ? n.create() : null), d = new G($.from(n.create(null, $.from(l.type.create(null, u)))), c ? 3 : 1, 0), f = s.start, h = s.end;
6716
6716
  t(e.tr.step(new Ve(f - (c ? 3 : 1), h, f, h, d, 1, !0)).scrollIntoView());
6717
6717
  }
6718
6718
  return !0;
6719
6719
  };
6720
6720
  }
6721
- const Qe = function(n) {
6721
+ const et = function(n) {
6722
6722
  for (var e = 0; ; e++)
6723
6723
  if (n = n.previousSibling, !n)
6724
6724
  return e;
@@ -6743,7 +6743,7 @@ function Bd(n, e, t, o, r) {
6743
6743
  let i = n.parentNode;
6744
6744
  if (!i || i.nodeType != 1 || ms(n) || Z1.test(n.nodeName) || n.contentEditable == "false")
6745
6745
  return !1;
6746
- e = Qe(n) + (r < 0 ? 0 : 1), n = i;
6746
+ e = et(n) + (r < 0 ? 0 : 1), n = i;
6747
6747
  } else if (n.nodeType == 1) {
6748
6748
  let i = n.childNodes[e + (r < 0 ? -1 : 0)];
6749
6749
  if (i.nodeType == 1 && i.contentEditable == "false")
@@ -6769,7 +6769,7 @@ function Q1(n, e) {
6769
6769
  return null;
6770
6770
  n = n.childNodes[e - 1], e = Mt(n);
6771
6771
  } else if (n.parentNode && !ms(n))
6772
- e = Qe(n), n = n.parentNode;
6772
+ e = et(n), n = n.parentNode;
6773
6773
  else
6774
6774
  return null;
6775
6775
  }
@@ -6783,7 +6783,7 @@ function ew(n, e) {
6783
6783
  return null;
6784
6784
  n = n.childNodes[e], e = 0;
6785
6785
  } else if (n.parentNode && !ms(n))
6786
- e = Qe(n) + 1, n = n.parentNode;
6786
+ e = et(n) + 1, n = n.parentNode;
6787
6787
  else
6788
6788
  return null;
6789
6789
  }
@@ -6792,7 +6792,7 @@ function tw(n, e, t) {
6792
6792
  for (let o = e == 0, r = e == Mt(n); o || r; ) {
6793
6793
  if (n == t)
6794
6794
  return !0;
6795
- let s = Qe(n);
6795
+ let s = et(n);
6796
6796
  if (n = n.parentNode, !n)
6797
6797
  return !1;
6798
6798
  o = o && s == 0, r = r && s == Mt(n);
@@ -6833,7 +6833,7 @@ function ow(n, e, t) {
6833
6833
  }
6834
6834
  const Zt = typeof navigator < "u" ? navigator : null, zd = typeof document < "u" ? document : null, eo = Zt && Zt.userAgent || "", Fa = /Edge\/(\d+)/.exec(eo), Xp = /MSIE \d/.exec(eo), Ha = /Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(eo), mt = !!(Xp || Ha || Fa), Un = Xp ? document.documentMode : Ha ? +Ha[1] : Fa ? +Fa[1] : 0, At = !mt && /gecko\/(\d+)/i.test(eo);
6835
6835
  At && +(/Firefox\/(\d+)/.exec(eo) || [0, 0])[1];
6836
- const Va = !mt && /Chrome\/(\d+)/.exec(eo), tt = !!Va, Zp = Va ? +Va[1] : 0, lt = !mt && !!Zt && /Apple Computer/.test(Zt.vendor), tr = lt && (/Mobile\/\w+/.test(eo) || !!Zt && Zt.maxTouchPoints > 2), St = tr || (Zt ? /Mac/.test(Zt.platform) : !1), Qp = Zt ? /Win/.test(Zt.platform) : !1, mn = /Android \d/.test(eo), gs = !!zd && "webkitFontSmoothing" in zd.documentElement.style, rw = gs ? +(/\bAppleWebKit\/(\d+)/.exec(navigator.userAgent) || [0, 0])[1] : 0;
6836
+ const Va = !mt && /Chrome\/(\d+)/.exec(eo), nt = !!Va, Zp = Va ? +Va[1] : 0, lt = !mt && !!Zt && /Apple Computer/.test(Zt.vendor), tr = lt && (/Mobile\/\w+/.test(eo) || !!Zt && Zt.maxTouchPoints > 2), St = tr || (Zt ? /Mac/.test(Zt.platform) : !1), Qp = Zt ? /Win/.test(Zt.platform) : !1, mn = /Android \d/.test(eo), gs = !!zd && "webkitFontSmoothing" in zd.documentElement.style, rw = gs ? +(/\bAppleWebKit\/(\d+)/.exec(navigator.userAgent) || [0, 0])[1] : 0;
6837
6837
  function sw(n) {
6838
6838
  let e = n.defaultView && n.defaultView.visualViewport;
6839
6839
  return e ? {
@@ -7265,7 +7265,7 @@ class ys {
7265
7265
  }
7266
7266
  let r;
7267
7267
  if (e == this.dom && this.contentDOM)
7268
- r = t > Qe(this.contentDOM);
7268
+ r = t > et(this.contentDOM);
7269
7269
  else if (this.contentDOM && this.contentDOM != this.dom && this.dom.contains(this.contentDOM))
7270
7270
  r = e.compareDocumentPosition(this.contentDOM) & 2;
7271
7271
  else if (this.dom.firstChild) {
@@ -7355,12 +7355,12 @@ class ys {
7355
7355
  let s, i = !0;
7356
7356
  for (; s = o ? this.children[o - 1] : null, !(!s || s.dom.parentNode == this.contentDOM); o--, i = !1)
7357
7357
  ;
7358
- return s && t && i && !s.border && !s.domAtom ? s.domFromPos(s.size, t) : { node: this.contentDOM, offset: s ? Qe(s.dom) + 1 : 0 };
7358
+ return s && t && i && !s.border && !s.domAtom ? s.domFromPos(s.size, t) : { node: this.contentDOM, offset: s ? et(s.dom) + 1 : 0 };
7359
7359
  } else {
7360
7360
  let s, i = !0;
7361
7361
  for (; s = o < this.children.length ? this.children[o] : null, !(!s || s.dom.parentNode == this.contentDOM); o++, i = !1)
7362
7362
  ;
7363
- return s && i && !s.border && !s.domAtom ? s.domFromPos(0, t) : { node: this.contentDOM, offset: s ? Qe(s.dom) : this.contentDOM.childNodes.length };
7363
+ return s && i && !s.border && !s.domAtom ? s.domFromPos(0, t) : { node: this.contentDOM, offset: s ? et(s.dom) : this.contentDOM.childNodes.length };
7364
7364
  }
7365
7365
  }
7366
7366
  // Used to find a DOM range in a single parent for a given changed
@@ -7379,7 +7379,7 @@ class ys {
7379
7379
  for (let d = l; d > 0; d--) {
7380
7380
  let f = this.children[d - 1];
7381
7381
  if (f.size && f.dom.parentNode == this.contentDOM && !f.emptyChildAt(1)) {
7382
- r = Qe(f.dom) + 1;
7382
+ r = et(f.dom) + 1;
7383
7383
  break;
7384
7384
  }
7385
7385
  e -= f.size;
@@ -7391,7 +7391,7 @@ class ys {
7391
7391
  for (let u = l + 1; u < this.children.length; u++) {
7392
7392
  let d = this.children[u];
7393
7393
  if (d.size && d.dom.parentNode == this.contentDOM && !d.emptyChildAt(-1)) {
7394
- s = Qe(d.dom);
7394
+ s = et(d.dom);
7395
7395
  break;
7396
7396
  }
7397
7397
  t += d.size;
@@ -7436,7 +7436,7 @@ class ys {
7436
7436
  `), d && p == h.nodeValue.length)
7437
7437
  for (let m = h, g; m; m = m.parentNode) {
7438
7438
  if (g = m.nextSibling) {
7439
- g.nodeName == "BR" && (l = a = { node: g.parentNode, offset: Qe(g) + 1 });
7439
+ g.nodeName == "BR" && (l = a = { node: g.parentNode, offset: et(g) + 1 });
7440
7440
  break;
7441
7441
  }
7442
7442
  let y = m.pmViewDesc;
@@ -7656,7 +7656,7 @@ class Kn extends ys {
7656
7656
  break;
7657
7657
  }
7658
7658
  }
7659
- e.contentElement || (e.getContent = () => L.empty);
7659
+ e.contentElement || (e.getContent = () => $.empty);
7660
7660
  }
7661
7661
  return e;
7662
7662
  }
@@ -8058,7 +8058,7 @@ class Sw {
8058
8058
  for (; e instanceof To; )
8059
8059
  t = e, e = t.children[t.children.length - 1];
8060
8060
  (!e || // Empty textblock
8061
- !(e instanceof al) || /\n$/.test(e.node.text) || this.view.requiresGeckoHackNode && /\s$/.test(e.node.text)) && ((lt || tt) && e && e.dom.contentEditable == "false" && this.addHackNode("IMG", t), this.addHackNode("BR", this.top));
8061
+ !(e instanceof al) || /\n$/.test(e.node.text) || this.view.requiresGeckoHackNode && /\s$/.test(e.node.text)) && ((lt || nt) && e && e.dom.contentEditable == "false" && this.addHackNode("IMG", t), this.addHackNode("BR", this.top));
8062
8062
  }
8063
8063
  addHackNode(e, t) {
8064
8064
  if (t == this.top && this.index < t.children.length && t.children[this.index].matchesHack(e))
@@ -8234,7 +8234,7 @@ function dm(n) {
8234
8234
  function kn(n, e = !1) {
8235
8235
  let t = n.state.selection;
8236
8236
  if (fm(n, t), !!dm(n)) {
8237
- if (!e && n.input.mouseDown && n.input.mouseDown.allowDefault && tt) {
8237
+ if (!e && n.input.mouseDown && n.input.mouseDown.allowDefault && nt) {
8238
8238
  let o = n.domSelectionRange(), r = n.domObserver.currentSelection;
8239
8239
  if (o.anchorNode && r.anchorNode && Co(o.anchorNode, o.anchorOffset, r.anchorNode, r.anchorOffset)) {
8240
8240
  n.input.mouseDown.delayedSelectionSync = !0, n.domObserver.setCurSelection();
@@ -8250,7 +8250,7 @@ function kn(n, e = !1) {
8250
8250
  n.domObserver.setCurSelection(), n.domObserver.connectSelection();
8251
8251
  }
8252
8252
  }
8253
- const Jd = lt || tt && Zp < 63;
8253
+ const Jd = lt || nt && Zp < 63;
8254
8254
  function Gd(n, e) {
8255
8255
  let { node: t, offset: o } = n.docView.domFromPos(e, 0), r = o < t.childNodes.length ? t.childNodes[o] : null, s = o ? t.childNodes[o - 1] : null;
8256
8256
  if (lt && r && r.contentEditable == "false")
@@ -8283,7 +8283,7 @@ function Ow(n) {
8283
8283
  if (!e)
8284
8284
  return;
8285
8285
  let t = n.cursorWrapper.dom, o = t.nodeName == "IMG";
8286
- o ? e.collapse(t.parentNode, Qe(t) + 1) : e.collapse(t, 0), !o && !n.state.selection.visible && mt && Un <= 11 && (t.disabled = !0, t.disabled = !1);
8286
+ o ? e.collapse(t.parentNode, et(t) + 1) : e.collapse(t, 0), !o && !n.state.selection.visible && mt && Un <= 11 && (t.disabled = !0, t.disabled = !1);
8287
8287
  }
8288
8288
  function fm(n, e) {
8289
8289
  if (e instanceof oe) {
@@ -8386,7 +8386,7 @@ function Dw(n) {
8386
8386
  {
8387
8387
  let l = t.previousSibling;
8388
8388
  for (; l && Lr(l, -1); )
8389
- r = t.parentNode, s = Qe(l), l = l.previousSibling;
8389
+ r = t.parentNode, s = et(l), l = l.previousSibling;
8390
8390
  if (l)
8391
8391
  t = l, o = oi(t);
8392
8392
  else {
@@ -8418,7 +8418,7 @@ function Nw(n) {
8418
8418
  {
8419
8419
  let l = t.nextSibling;
8420
8420
  for (; l && Lr(l, 1); )
8421
- s = l.parentNode, i = Qe(l) + 1, l = l.nextSibling;
8421
+ s = l.parentNode, i = et(l) + 1, l = l.nextSibling;
8422
8422
  if (l)
8423
8423
  t = l, o = 0, r = oi(t);
8424
8424
  else {
@@ -8436,7 +8436,7 @@ function pm(n) {
8436
8436
  }
8437
8437
  function Rw(n, e) {
8438
8438
  for (; n && e == n.childNodes.length && !ms(n); )
8439
- e = Qe(n) + 1, n = n.parentNode;
8439
+ e = et(n) + 1, n = n.parentNode;
8440
8440
  for (; n && e < n.childNodes.length; ) {
8441
8441
  let t = n.childNodes[e];
8442
8442
  if (t.nodeType == 3)
@@ -8448,7 +8448,7 @@ function Rw(n, e) {
8448
8448
  }
8449
8449
  function Pw(n, e) {
8450
8450
  for (; n && !e && !ms(n); )
8451
- e = Qe(n), n = n.parentNode;
8451
+ e = et(n), n = n.parentNode;
8452
8452
  for (; n && e; ) {
8453
8453
  let t = n.childNodes[e - 1];
8454
8454
  if (t.nodeType == 3)
@@ -8478,7 +8478,7 @@ function Ka(n, e, t) {
8478
8478
  }
8479
8479
  function ef(n, e) {
8480
8480
  let t = n.state.doc.resolve(e);
8481
- if (!(tt || Qp) && t.parent.inlineContent) {
8481
+ if (!(nt || Qp) && t.parent.inlineContent) {
8482
8482
  let r = n.coordsAtPos(e);
8483
8483
  if (e > t.start()) {
8484
8484
  let s = n.coordsAtPos(e - 1), i = (s.top + s.bottom) / 2;
@@ -8604,7 +8604,7 @@ function mm(n, e, t, o, r) {
8604
8604
  if (n.someProp("transformPastedText", (f) => {
8605
8605
  e = f(e, s || o, n);
8606
8606
  }), s)
8607
- return l = new G(L.from(n.state.schema.text(e.replace(/\r\n?/g, `
8607
+ return l = new G($.from(n.state.schema.text(e.replace(/\r\n?/g, `
8608
8608
  `))), 0, 0), n.someProp("transformPasted", (f) => {
8609
8609
  l = f(l, n, !0);
8610
8610
  }), l;
@@ -8672,13 +8672,13 @@ function Fw(n, e) {
8672
8672
  i.push(u), r = r.matchType(u.type), s = a;
8673
8673
  }
8674
8674
  }), i)
8675
- return L.from(i);
8675
+ return $.from(i);
8676
8676
  }
8677
8677
  return n;
8678
8678
  }
8679
8679
  function gm(n, e, t = 0) {
8680
8680
  for (let o = e.length - 1; o >= t; o--)
8681
- n = e[o].create(null, L.from(n));
8681
+ n = e[o].create(null, $.from(n));
8682
8682
  return n;
8683
8683
  }
8684
8684
  function ym(n, e, t, o, r) {
@@ -8687,18 +8687,18 @@ function ym(n, e, t, o, r) {
8687
8687
  if (s)
8688
8688
  return o.copy(o.content.replaceChild(o.childCount - 1, s));
8689
8689
  if (o.contentMatchAt(o.childCount).matchType(r == n.length - 1 ? t.type : n[r + 1]))
8690
- return o.copy(o.content.append(L.from(gm(t, n, r + 1))));
8690
+ return o.copy(o.content.append($.from(gm(t, n, r + 1))));
8691
8691
  }
8692
8692
  }
8693
8693
  function vm(n, e) {
8694
8694
  if (e == 0)
8695
8695
  return n;
8696
- let t = n.content.replaceChild(n.childCount - 1, vm(n.lastChild, e - 1)), o = n.contentMatchAt(n.childCount).fillBefore(L.empty, !0);
8696
+ let t = n.content.replaceChild(n.childCount - 1, vm(n.lastChild, e - 1)), o = n.contentMatchAt(n.childCount).fillBefore($.empty, !0);
8697
8697
  return n.copy(t.append(o));
8698
8698
  }
8699
8699
  function qa(n, e, t, o, r, s) {
8700
8700
  let i = e < 0 ? n.firstChild : n.lastChild, l = i.content;
8701
- return n.childCount > 1 && (s = 0), r < o - 1 && (l = qa(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(L.empty, !0))), n.replaceChild(e < 0 ? 0 : n.childCount - 1, i.copy(l));
8701
+ return n.childCount > 1 && (s = 0), r < o - 1 && (l = qa(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($.empty, !0))), n.replaceChild(e < 0 ? 0 : n.childCount - 1, i.copy(l));
8702
8702
  }
8703
8703
  function rf(n, e, t) {
8704
8704
  return e < n.openStart && (n = new G(qa(n.content, -1, e, n.openStart, 0, n.openEnd), e, n.openEnd)), t < n.openEnd && (n = new G(qa(n.content, 1, t, n.openEnd, 0, 0), n.openStart, t)), n;
@@ -8733,7 +8733,7 @@ function Vw(n) {
8733
8733
  return t;
8734
8734
  }
8735
8735
  function Ww(n) {
8736
- let e = n.querySelectorAll(tt ? "span:not([class]):not([style])" : "span.Apple-converted-space");
8736
+ let e = n.querySelectorAll(nt ? "span:not([class]):not([style])" : "span.Apple-converted-space");
8737
8737
  for (let t = 0; t < e.length; t++) {
8738
8738
  let o = e[t];
8739
8739
  o.childNodes.length == 1 && o.textContent == " " && o.parentNode && o.parentNode.replaceChild(n.ownerDocument.createTextNode(" "), o);
@@ -8753,7 +8753,7 @@ function jw(n, e) {
8753
8753
  let a = t.nodes[o[l]];
8754
8754
  if (!a || a.hasRequiredAttrs())
8755
8755
  break;
8756
- r = L.from(a.create(o[l + 1], r)), s++, i++;
8756
+ r = $.from(a.create(o[l + 1], r)), s++, i++;
8757
8757
  }
8758
8758
  return new G(r, s, i);
8759
8759
  }
@@ -8808,7 +8808,7 @@ function Yw(n, e) {
8808
8808
  }
8809
8809
  ft.keydown = (n, e) => {
8810
8810
  let t = e;
8811
- if (n.input.shiftKey = t.keyCode == 16 || t.shiftKey, !xm(n, t) && (n.input.lastKeyCode = t.keyCode, n.input.lastKeyCodeTime = Date.now(), !(mn && tt && t.keyCode == 13)))
8811
+ if (n.input.shiftKey = t.keyCode == 16 || t.shiftKey, !xm(n, t) && (n.input.lastKeyCode = t.keyCode, n.input.lastKeyCodeTime = Date.now(), !(mn && nt && t.keyCode == 13)))
8812
8812
  if (t.keyCode != 229 && n.domObserver.forceFlush(), tr && t.keyCode == 13 && !t.ctrlKey && !t.altKey && !t.metaKey) {
8813
8813
  let o = Date.now();
8814
8814
  n.input.lastIOSEnter = o, n.input.lastIOSEnterFallbackTimeout = setTimeout(() => {
@@ -8952,7 +8952,7 @@ class rk {
8952
8952
  // (hidden) cursor is doesn't change the selection, and
8953
8953
  // thus doesn't get a reaction from ProseMirror. This
8954
8954
  // works around that.
8955
- tt && !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) ? (Jo(this.view, ce.near(this.view.state.doc.resolve(t.pos))), e.preventDefault()) : Fn(this.view, "pointer");
8955
+ nt && !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) ? (Jo(this.view, ce.near(this.view.state.doc.resolve(t.pos))), e.preventDefault()) : Fn(this.view, "pointer");
8956
8956
  }
8957
8957
  move(e) {
8958
8958
  this.updateAllowDefault(e), Fn(this.view, "pointer"), e.buttons == 0 && this.done();
@@ -8976,7 +8976,7 @@ ft.compositionstart = ft.compositionupdate = (n) => {
8976
8976
  if (!n.composing) {
8977
8977
  n.domObserver.flush();
8978
8978
  let { state: e } = n, t = e.selection.$to;
8979
- if (e.selection instanceof le && (e.storedMarks || !t.textOffset && t.parentOffset && t.nodeBefore.marks.some((o) => o.type.spec.inclusive === !1) || tt && Qp && ik(n)))
8979
+ if (e.selection instanceof le && (e.storedMarks || !t.textOffset && t.parentOffset && t.nodeBefore.marks.some((o) => o.type.spec.inclusive === !1) || nt && Qp && ik(n)))
8980
8980
  n.markCursor = n.state.storedMarks || t.marks(), ri(n, !0), n.markCursor = null;
8981
8981
  else if (ri(n, !e.selection.empty), At && e.selection.empty && t.parentOffset && !t.textOffset && t.nodeBefore.marks.length) {
8982
8982
  let o = n.domSelectionRange();
@@ -9123,7 +9123,7 @@ dt.dragstart = (n, e) => {
9123
9123
  }
9124
9124
  }
9125
9125
  let l = (i || n.state.selection).content(), { dom: a, text: c, slice: u } = Kc(n, l);
9126
- (!t.dataTransfer.files.length || !tt || Zp > 120) && t.dataTransfer.clearData(), t.dataTransfer.setData(ts ? "Text" : "text/html", a.innerHTML), t.dataTransfer.effectAllowed = "copyMove", ts || t.dataTransfer.setData("text/plain", c), n.dragging = new Mm(u, Em(n, t), i);
9126
+ (!t.dataTransfer.files.length || !nt || Zp > 120) && t.dataTransfer.clearData(), t.dataTransfer.setData(ts ? "Text" : "text/html", a.innerHTML), t.dataTransfer.effectAllowed = "copyMove", ts || t.dataTransfer.setData("text/plain", c), n.dragging = new Mm(u, Em(n, t), i);
9127
9127
  };
9128
9128
  dt.dragend = (n) => {
9129
9129
  let e = n.dragging;
@@ -9186,7 +9186,7 @@ dt.blur = (n, e) => {
9186
9186
  n.focused && (n.domObserver.stop(), n.dom.classList.remove("ProseMirror-focused"), n.domObserver.start(), t.relatedTarget && n.dom.contains(t.relatedTarget) && n.domObserver.currentSelection.clear(), n.focused = !1);
9187
9187
  };
9188
9188
  dt.beforeinput = (n, e) => {
9189
- if (tt && mn && e.inputType == "deleteContentBackward") {
9189
+ if (nt && mn && e.inputType == "deleteContentBackward") {
9190
9190
  n.domObserver.flushSoon();
9191
9191
  let { domChangeCount: o } = n.input;
9192
9192
  setTimeout(() => {
@@ -9864,7 +9864,7 @@ class wk {
9864
9864
  let { previousSibling: d, nextSibling: f } = e.addedNodes[u];
9865
9865
  (!d || Array.prototype.indexOf.call(e.addedNodes, d) < 0) && (r = d), (!f || Array.prototype.indexOf.call(e.addedNodes, f) < 0) && (s = f);
9866
9866
  }
9867
- let i = r && r.parentNode == e.target ? Qe(r) + 1 : 0, l = o.localPosFromDOM(e.target, i, -1), a = s && s.parentNode == e.target ? Qe(s) : e.target.childNodes.length, c = o.localPosFromDOM(e.target, a, 1);
9867
+ let i = r && r.parentNode == e.target ? et(r) + 1 : 0, l = o.localPosFromDOM(e.target, i, -1), a = s && s.parentNode == e.target ? et(s) : e.target.childNodes.length, c = o.localPosFromDOM(e.target, a, 1);
9868
9868
  return { from: l, to: c };
9869
9869
  } else return e.type == "attributes" ? { from: o.posAtStart - o.border, to: o.posAtEnd + o.border } : (this.lastChangedTextNode = e.target, {
9870
9870
  from: o.posAtStart,
@@ -9932,7 +9932,7 @@ function Sk(n, e) {
9932
9932
  }
9933
9933
  function Ck(n, e, t) {
9934
9934
  let { node: o, fromOffset: r, toOffset: s, from: i, to: l } = n.docView.parseRange(e, t), a = n.domSelectionRange(), c, u = a.anchorNode;
9935
- if (u && n.dom.contains(u.nodeType == 1 ? u : u.parentNode) && (c = [{ node: u, offset: a.anchorOffset }], ll(a) || c.push({ node: a.focusNode, offset: a.focusOffset })), tt && n.input.lastKeyCode === 8)
9935
+ if (u && n.dom.contains(u.nodeType == 1 ? u : u.parentNode) && (c = [{ node: u, offset: a.anchorOffset }], ll(a) || c.push({ node: a.focusNode, offset: a.focusOffset })), nt && n.input.lastKeyCode === 8)
9936
9936
  for (let g = s; g > r; g--) {
9937
9937
  let y = o.childNodes[g - 1], b = y.pmViewDesc;
9938
9938
  if (y.nodeName == "BR" && !b) {
@@ -9979,7 +9979,7 @@ function Ek(n, e, t, o, r) {
9979
9979
  if (n.input.compositionPendingChanges = 0, e < 0) {
9980
9980
  let x = n.input.lastSelectionTime > Date.now() - 50 ? n.input.lastSelectionOrigin : null, M = jc(n, x);
9981
9981
  if (M && !n.state.selection.eq(M)) {
9982
- if (tt && mn && n.input.lastKeyCode === 13 && Date.now() - 100 < n.input.lastKeyCodeTime && n.someProp("handleKeyDown", (A) => A(n, so(13, "Enter"))))
9982
+ if (nt && mn && n.input.lastKeyCode === 13 && Date.now() - 100 < n.input.lastKeyCodeTime && n.someProp("handleKeyDown", (A) => A(n, so(13, "Enter"))))
9983
9983
  return;
9984
9984
  let E = n.state.tr.setSelection(M);
9985
9985
  x == "pointer" ? E.setMeta("pointer", !0) : x == "key" && E.scrollIntoView(), s && E.setMeta("composition", s), n.dispatch(E);
@@ -10015,10 +10015,10 @@ function Ek(n, e, t, o, r) {
10015
10015
  return;
10016
10016
  }
10017
10017
  if (n.state.selection.anchor > p.start && Ik(u, p.start, p.endA, m, g) && n.someProp("handleKeyDown", (x) => x(n, so(8, "Backspace")))) {
10018
- mn && tt && n.domObserver.suppressSelectionUpdates();
10018
+ mn && nt && n.domObserver.suppressSelectionUpdates();
10019
10019
  return;
10020
10020
  }
10021
- tt && p.endB == p.start && (n.input.lastChromeDelete = Date.now()), mn && !b && m.start() != g.start() && g.parentOffset == 0 && m.depth == g.depth && c.sel && c.sel.anchor == c.sel.head && c.sel.head == p.endA && (p.endB -= 2, g = c.doc.resolveNoCache(p.endB - c.from), setTimeout(() => {
10021
+ nt && p.endB == p.start && (n.input.lastChromeDelete = Date.now()), mn && !b && m.start() != g.start() && g.parentOffset == 0 && m.depth == g.depth && c.sel && c.sel.anchor == c.sel.head && c.sel.head == p.endA && (p.endB -= 2, g = c.doc.resolveNoCache(p.endB - c.from), setTimeout(() => {
10022
10022
  n.someProp("handleKeyDown", function(x) {
10023
10023
  return x(n, so(13, "Enter"));
10024
10024
  });
@@ -10027,7 +10027,7 @@ function Ek(n, e, t, o, r) {
10027
10027
  let M = x || n.state.tr.replace(w, v, c.doc.slice(p.start - c.from, p.endB - c.from));
10028
10028
  if (c.sel) {
10029
10029
  let E = df(n, M.doc, c.sel);
10030
- E && !(tt && n.composing && E.empty && (p.start != p.endB || n.input.lastChromeDelete < Date.now() - 100) && (E.head == w || E.head == M.mapping.map(v) - 1) || mt && E.empty && E.head == w) && M.setSelection(E);
10030
+ E && !(nt && n.composing && E.empty && (p.start != p.endB || n.input.lastChromeDelete < Date.now() - 100) && (E.head == w || E.head == M.mapping.map(v) - 1) || mt && E.empty && E.head == w) && M.setSelection(E);
10031
10031
  }
10032
10032
  return s && M.setMeta("composition", s), M.scrollIntoView();
10033
10033
  }, C;
@@ -10068,7 +10068,7 @@ function Ak(n, e) {
10068
10068
  let c = [];
10069
10069
  for (let u = 0; u < e.childCount; u++)
10070
10070
  c.push(a(e.child(u)));
10071
- if (L.from(c).eq(n))
10071
+ if ($.from(c).eq(n))
10072
10072
  return { mark: l, type: i };
10073
10073
  }
10074
10074
  function Ik(n, e, t, o, r) {
@@ -10200,9 +10200,9 @@ class _m {
10200
10200
  let f = u == "preserve" && i && this.dom.style.overflowAnchor == null && lw(this);
10201
10201
  if (i) {
10202
10202
  this.domObserver.stop();
10203
- let h = d && (mt || tt) && !this.composing && !r.selection.empty && !e.selection.empty && _k(r.selection, e.selection);
10203
+ let h = d && (mt || nt) && !this.composing && !r.selection.empty && !e.selection.empty && _k(r.selection, e.selection);
10204
10204
  if (d) {
10205
- let p = tt ? this.trackWrites = this.domSelectionRange().focusNode : null;
10205
+ let p = nt ? this.trackWrites = this.domSelectionRange().focusNode : null;
10206
10206
  this.composing && (this.input.compositionNode = lk(this)), (s || !this.docView.update(e.doc, c, a, this)) && (this.docView.updateOuterDeco(c), this.docView.destroy(), this.docView = Kd(e.doc, c, a, this.dom, this)), p && (!this.trackWrites || !this.dom.contains(this.trackWrites)) && (h = !0);
10207
10207
  }
10208
10208
  h || !(this.input.mouseDown && this.domObserver.currentSelection.eq(this.domSelectionRange()) && _w(this)) ? kn(this, h) : (fm(this, e.selection), this.domObserver.setCurSelection()), this.domObserver.start();
@@ -10583,10 +10583,10 @@ var Gn = {
10583
10583
  221: "}",
10584
10584
  222: '"'
10585
10585
  }, Nk = typeof navigator < "u" && /Mac/.test(navigator.platform), Rk = typeof navigator < "u" && /MSIE \d|Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(navigator.userAgent);
10586
- for (var et = 0; et < 10; et++) Gn[48 + et] = Gn[96 + et] = String(et);
10587
- for (var et = 1; et <= 24; et++) Gn[et + 111] = "F" + et;
10588
- for (var et = 65; et <= 90; et++)
10589
- Gn[et] = String.fromCharCode(et + 32), li[et] = String.fromCharCode(et);
10586
+ for (var tt = 0; tt < 10; tt++) Gn[48 + tt] = Gn[96 + tt] = String(tt);
10587
+ for (var tt = 1; tt <= 24; tt++) Gn[tt + 111] = "F" + tt;
10588
+ for (var tt = 65; tt <= 90; tt++)
10589
+ Gn[tt] = String.fromCharCode(tt + 32), li[tt] = String.fromCharCode(tt);
10590
10590
  for (var Ql in Gn) li.hasOwnProperty(Ql) || (li[Ql] = Gn[Ql]);
10591
10591
  function Pk(n) {
10592
10592
  var e = Nk && n.metaKey && n.shiftKey && !n.ctrlKey && !n.altKey || Rk && n.shiftKey && n.key && n.key.length == 1 || n.key == "Unidentified", t = !e && n.key || (n.shiftKey ? li : Gn)[n.keyCode] || n.key || "Unidentified";
@@ -10991,7 +10991,7 @@ function Ir(n) {
10991
10991
  return $m(t);
10992
10992
  }
10993
10993
  function ss(n, e, t) {
10994
- if (n instanceof yn || n instanceof L)
10994
+ if (n instanceof yn || n instanceof $)
10995
10995
  return n;
10996
10996
  t = {
10997
10997
  slice: !0,
@@ -11002,7 +11002,7 @@ function ss(n, e, t) {
11002
11002
  if (o)
11003
11003
  try {
11004
11004
  if (Array.isArray(n) && n.length > 0)
11005
- return L.fromArray(n.map((l) => e.nodeFromJSON(l)));
11005
+ return $.fromArray(n.map((l) => e.nodeFromJSON(l)));
11006
11006
  const i = e.nodeFromJSON(n);
11007
11007
  return t.errorOnInvalidContent && i.check(), i;
11008
11008
  } catch (s) {
@@ -11105,7 +11105,7 @@ var lb = (n) => !("type" in n), ab = (n, e, t) => ({ tr: o, dispatch: r, editor:
11105
11105
  if (f) {
11106
11106
  if (Array.isArray(e))
11107
11107
  m = e.map((g) => g.text || "").join("");
11108
- else if (e instanceof L) {
11108
+ else if (e instanceof $) {
11109
11109
  let g = "";
11110
11110
  e.forEach((y) => {
11111
11111
  y.text && (g += y.text);
@@ -11931,10 +11931,10 @@ var o2 = ({ keepMarks: n = !0 } = {}) => ({ tr: e, state: t, dispatch: o, editor
11931
11931
  if (a.depth === 2 || a.node(-3).type !== l || a.index(-2) !== a.node(-2).childCount - 1)
11932
11932
  return !1;
11933
11933
  if (r) {
11934
- let y = L.empty;
11934
+ let y = $.empty;
11935
11935
  const b = a.index(-1) ? 1 : a.index(-2) ? 2 : 3;
11936
11936
  for (let M = a.depth - b; M >= a.depth - 3; M -= 1)
11937
- y = L.from(a.node(M).copy(y));
11937
+ y = $.from(a.node(M).copy(y));
11938
11938
  const w = (
11939
11939
  // eslint-disable-next-line no-nested-ternary
11940
11940
  a.indexAfter(-1) < a.node(-2).childCount ? 1 : a.indexAfter(-2) < a.node(-3).childCount ? 2 : 3
@@ -11942,7 +11942,7 @@ var o2 = ({ keepMarks: n = !0 } = {}) => ({ tr: e, state: t, dispatch: o, editor
11942
11942
  ...Bs(f, a.node().type.name, a.node().attrs),
11943
11943
  ...e
11944
11944
  }, k = ((i = l.contentMatch.defaultType) == null ? void 0 : i.createAndFill(v)) || void 0;
11945
- y = y.append(L.from(l.createAndFill(null, k) || void 0));
11945
+ y = y.append($.from(l.createAndFill(null, k) || void 0));
11946
11946
  const C = a.before(a.depth - (b - 1));
11947
11947
  t.replace(C, a.after(-w), new G(y, 4 - b, 0));
11948
11948
  let x = -1;
@@ -12214,7 +12214,7 @@ function w2(n) {
12214
12214
  const a = r.getMeta("applyInputRules");
12215
12215
  return !!a && setTimeout(() => {
12216
12216
  let { text: u } = a;
12217
- typeof u == "string" ? u = u : u = hl(L.from(u), i.schema);
12217
+ typeof u == "string" ? u = u : u = hl($.from(u), i.schema);
12218
12218
  const { from: d } = a, f = d + u.length;
12219
12219
  Ms({
12220
12220
  editor: e,
@@ -12487,7 +12487,7 @@ function M2(n) {
12487
12487
  return;
12488
12488
  if (b) {
12489
12489
  let { text: k } = y;
12490
- typeof k == "string" ? k = k : k = hl(L.from(k), h.schema);
12490
+ typeof k == "string" ? k = k : k = hl($.from(k), h.schema);
12491
12491
  const { from: C } = y, x = C + k.length, M = T2(k);
12492
12492
  return a({
12493
12493
  rule: u,
@@ -16068,9 +16068,9 @@ function Wx(n, e) {
16068
16068
  let { $from: t } = n.state.selection, o = t.parent.contentMatchAt(t.index()).findWrapping(n.state.schema.nodes.text);
16069
16069
  if (!o)
16070
16070
  return !1;
16071
- let r = L.empty;
16071
+ let r = $.empty;
16072
16072
  for (let i = o.length - 1; i >= 0; i--)
16073
- r = L.from(o[i].createAndFill(null, r));
16073
+ r = $.from(o[i].createAndFill(null, r));
16074
16074
  let s = n.state.tr.replace(t.pos, t.pos, new G(r, 0, 0));
16075
16075
  return s.setSelection(le.near(s.doc.resolve(t.pos + 1))), n.dispatch(s), !1;
16076
16076
  }
@@ -17143,13 +17143,13 @@ function aS(n, e, t, o) {
17143
17143
  function cS(n, e = {}) {
17144
17144
  const t = e.enabled ?? !0, o = e.canPasteTextAsBlock ?? !0;
17145
17145
  if (!t) return;
17146
- const { getEditor: r, nextEditorTick: s } = Ae(), i = pe(Ue), l = dr();
17146
+ const { getEditor: r, nextEditorTick: s } = Ae(), i = me(Ue), l = dr();
17147
17147
  let a = null;
17148
17148
  function c() {
17149
17149
  const p = document.activeElement;
17150
17150
  return p instanceof HTMLInputElement || p instanceof HTMLTextAreaElement || !!(p != null && p.isContentEditable);
17151
17151
  }
17152
- me(
17152
+ pe(
17153
17153
  () => l.editor.value,
17154
17154
  (p) => {
17155
17155
  if (!p || !a) return;
@@ -17229,7 +17229,7 @@ function cS(n, e = {}) {
17229
17229
  });
17230
17230
  }
17231
17231
  function to(n, e) {
17232
- const t = pe(Ue);
17232
+ const t = me(Ue);
17233
17233
  if (!t)
17234
17234
  throw new Error("useComponents must be used within a WovenCanvas component");
17235
17235
  const o = Te(/* @__PURE__ */ new Map()), r = /* @__PURE__ */ new Map();
@@ -17260,7 +17260,7 @@ function to(n, e) {
17260
17260
  c.delete(l), o.value = c;
17261
17261
  }
17262
17262
  }
17263
- return me(
17263
+ return pe(
17264
17264
  () => rt(n),
17265
17265
  (l, a) => {
17266
17266
  const c = new Set(l), u = new Set(a ?? []);
@@ -17277,7 +17277,7 @@ function to(n, e) {
17277
17277
  }), o;
17278
17278
  }
17279
17279
  function Vg() {
17280
- const n = pe(Ue);
17280
+ const n = me(Ue);
17281
17281
  if (!n)
17282
17282
  throw new Error("useImageCreation must be used within a WovenCanvas component");
17283
17283
  const { nextEditorTick: e } = Ae();
@@ -17367,7 +17367,7 @@ function dS(n) {
17367
17367
  });
17368
17368
  }
17369
17369
  function fS(n) {
17370
- const e = pe(Ue);
17370
+ const e = me(Ue);
17371
17371
  if (!e)
17372
17372
  throw new Error("useQuery must be used within a WovenCanvas component");
17373
17373
  const t = Te([]), o = ct((d) => d.with(...n)), r = /* @__PURE__ */ new Map();
@@ -17428,7 +17428,7 @@ function fS(n) {
17428
17428
  }), t;
17429
17429
  }
17430
17430
  function it(n) {
17431
- const e = pe(Ue);
17431
+ const e = me(Ue);
17432
17432
  if (!e)
17433
17433
  throw new Error("useSingleton must be used within a WovenCanvas component");
17434
17434
  const t = Te(n.default()), o = e.getEditor();
@@ -17612,7 +17612,7 @@ function Yf(n, e, t, o) {
17612
17612
  return r.remove(), l;
17613
17613
  }
17614
17614
  function SS(n) {
17615
- const { nextEditorTick: e } = Ae(), t = pe(Ue), o = to(n, st), r = it(Pe), s = it(Qn), i = dr(), l = pe(Dc, void 0), a = _(() => {
17615
+ const { nextEditorTick: e } = Ae(), t = me(Ue), o = to(n, st), r = it(Pe), s = it(Qn), i = dr(), l = me(Dc, void 0), a = _(() => {
17616
17616
  const w = l == null ? void 0 : l.value.extensions;
17617
17617
  return w && w.length > 0 ? [...Kf, ...w] : Kf;
17618
17618
  }), c = (w) => zb(w, a.value), u = (w) => Bb(w, a.value), d = (w, v) => {
@@ -17933,7 +17933,7 @@ function Wg(n) {
17933
17933
  transformBoxId: o.value.transformBoxId
17934
17934
  });
17935
17935
  }
17936
- me(
17936
+ pe(
17937
17937
  () => r.value,
17938
17938
  () => {
17939
17939
  s((u) => {
@@ -17968,7 +17968,7 @@ function CS(n) {
17968
17968
  return e.state === Jr.Dragging && e.draggedEntity !== null && Fe(n, e.draggedEntity, Qu) && Qu.read(n, e.draggedEntity).kind === ey.Stretch;
17969
17969
  }
17970
17970
  function xu() {
17971
- const n = pe(Nc);
17971
+ const n = me(Nc);
17972
17972
  if (!n)
17973
17973
  throw new Error("useToolbar must be used within a Toolbar component");
17974
17974
  return {
@@ -18046,10 +18046,10 @@ const _S = { key: 1 }, DS = ["innerHTML"], Tu = /* @__PURE__ */ q({
18046
18046
  emits: ["editEnd"],
18047
18047
  setup(n, { expose: e, emit: t }) {
18048
18048
  var E;
18049
- const o = n, r = t, s = _e(o.entityId, st), i = it(Pe), l = it(Qn), a = dr(), { nextEditorTick: c, getEditor: u } = Ae(), d = it(Ca), f = pe(Dc, void 0), h = z(null);
18049
+ const o = n, r = t, s = _e(o.entityId, st), i = it(Pe), l = it(Qn), a = dr(), { nextEditorTick: c, getEditor: u } = Ae(), d = it(Ca), f = me(Dc, void 0), h = z(null);
18050
18050
  e({ editableTextRef: h });
18051
18051
  const p = z(((E = s.value) == null ? void 0 : E.content) ?? ""), m = Te(null);
18052
- me(
18052
+ pe(
18053
18053
  () => {
18054
18054
  var A;
18055
18055
  return (A = s.value) == null ? void 0 : A.fontFamily;
@@ -18129,7 +18129,7 @@ const _S = { key: 1 }, DS = ["innerHTML"], Tu = /* @__PURE__ */ q({
18129
18129
  }
18130
18130
  });
18131
18131
  }
18132
- me(
18132
+ pe(
18133
18133
  () => o.edited,
18134
18134
  async (A) => {
18135
18135
  if (A) {
@@ -18172,7 +18172,7 @@ const _S = { key: 1 }, DS = ["innerHTML"], Tu = /* @__PURE__ */ q({
18172
18172
  r("editEnd", { content: D, ...X });
18173
18173
  });
18174
18174
  }
18175
- me(
18175
+ pe(
18176
18176
  () => {
18177
18177
  var A;
18178
18178
  return (A = s.value) == null ? void 0 : A.content;
@@ -18255,9 +18255,9 @@ const _S = { key: 1 }, DS = ["innerHTML"], Tu = /* @__PURE__ */ q({
18255
18255
  },
18256
18256
  setup(n) {
18257
18257
  const e = n, t = _e(e.entityId, Gt), o = _e(e.entityId, Ks), r = z(null), s = {
18258
- [Xe.Top]: "flex-start",
18259
- [Xe.Center]: "center",
18260
- [Xe.Bottom]: "flex-end"
18258
+ [Ze.Top]: "flex-start",
18259
+ [Ze.Center]: "center",
18260
+ [Ze.Bottom]: "flex-end"
18261
18261
  }, i = _(() => t.value ? `rgba(${t.value.fillRed}, ${t.value.fillGreen}, ${t.value.fillBlue}, ${(t.value.fillAlpha ?? 255) / 255})` : "rgba(0, 0, 0, 0)"), l = _(() => t.value ? t.value.strokeKind === Ct.None ? "none" : `rgba(${t.value.strokeRed}, ${t.value.strokeGreen}, ${t.value.strokeBlue}, ${t.value.strokeAlpha / 255})` : "rgba(0, 0, 0, 1)"), a = _(() => {
18262
18262
  var m;
18263
18263
  return ((m = t.value) == null ? void 0 : m.strokeWidth) ?? 2;
@@ -18281,7 +18281,7 @@ const _S = { key: 1 }, DS = ["innerHTML"], Tu = /* @__PURE__ */ q({
18281
18281
  var m;
18282
18282
  return {
18283
18283
  overflow: e.edited ? "visible" : "hidden",
18284
- alignItems: s[((m = o.value) == null ? void 0 : m.value) ?? Xe.Top]
18284
+ alignItems: s[((m = o.value) == null ? void 0 : m.value) ?? Ze.Top]
18285
18285
  };
18286
18286
  }), { nextEditorTick: h } = Ae();
18287
18287
  function p(m) {
@@ -18337,7 +18337,7 @@ const _S = { key: 1 }, DS = ["innerHTML"], Tu = /* @__PURE__ */ q({
18337
18337
  },
18338
18338
  async setup(n) {
18339
18339
  let e, t;
18340
- const o = n, r = pe(Ue);
18340
+ const o = n, r = me(Ue);
18341
18341
  if (!r)
18342
18342
  throw new Error("TapeBlock must be used within a WovenCanvas component");
18343
18343
  const s = r, i = _e(o.entityId, gn), l = _e(o.entityId, Us);
@@ -18376,7 +18376,7 @@ const _S = { key: 1 }, DS = ["innerHTML"], Tu = /* @__PURE__ */ q({
18376
18376
  console.error("Failed to get tape display URL:", v), m.value = !0, p.value = !1;
18377
18377
  }
18378
18378
  }
18379
- return me(
18379
+ return pe(
18380
18380
  () => i.value,
18381
18381
  () => {
18382
18382
  y();
@@ -18384,7 +18384,7 @@ const _S = { key: 1 }, DS = ["innerHTML"], Tu = /* @__PURE__ */ q({
18384
18384
  { immediate: !0 }
18385
18385
  ), wt(() => {
18386
18386
  y();
18387
- }), me(
18387
+ }), pe(
18388
18388
  () => o.block.size[1],
18389
18389
  () => {
18390
18390
  a().height > f && y();
@@ -18396,7 +18396,7 @@ const _S = { key: 1 }, DS = ["innerHTML"], Tu = /* @__PURE__ */ q({
18396
18396
  style: ve({
18397
18397
  backgroundImage: `url(${h.value})`
18398
18398
  })
18399
- }, null, 4)) : U("", !0)
18399
+ }, null, 4)) : K("", !0)
18400
18400
  ]));
18401
18401
  }
18402
18402
  }), zS = ["data-text-empty"], FS = /* @__PURE__ */ q({
@@ -19481,11 +19481,11 @@ function mr(n, e, t) {
19481
19481
  function C() {
19482
19482
  r.value || (g.value = !1);
19483
19483
  }
19484
- return me([s, i, l, r], w, {
19484
+ return pe([s, i, l, r], w, {
19485
19485
  flush: "sync"
19486
- }), me([c, u], k, {
19486
+ }), pe([c, u], k, {
19487
19487
  flush: "sync"
19488
- }), me(r, C, {
19488
+ }), pe(r, C, {
19489
19489
  flush: "sync"
19490
19490
  }), zh() && Fh(v), {
19491
19491
  x: Po(d),
@@ -19508,10 +19508,10 @@ const BC = ["menu-open"], Ot = /* @__PURE__ */ q({
19508
19508
  },
19509
19509
  emits: ["open", "close"],
19510
19510
  setup(n, { emit: e }) {
19511
- const t = n, o = e, r = pe("containerRef"), s = pe(Zh, null), i = pe(sd, 0), l = Math.random().toString(36).slice(2);
19511
+ const t = n, o = e, r = me("containerRef"), s = me(Zh, null), i = me(sd, 0), l = Math.random().toString(36).slice(2);
19512
19512
  ho(sd, i + 1);
19513
19513
  const { show: a, hide: c } = no(), u = z(!1);
19514
- s && me(
19514
+ s && pe(
19515
19515
  () => s.value.get(i),
19516
19516
  (w) => {
19517
19517
  w !== void 0 && w !== l && u.value && (u.value = !1);
@@ -19539,7 +19539,7 @@ const BC = ["menu-open"], Ot = /* @__PURE__ */ q({
19539
19539
  function b() {
19540
19540
  c();
19541
19541
  }
19542
- return me(u, (w) => {
19542
+ return pe(u, (w) => {
19543
19543
  w ? (c(), document.addEventListener("click", g, !0), s && (s.value.set(i, l), s.value = new Map(s.value)), o("open")) : (document.removeEventListener("click", g, !0), (s == null ? void 0 : s.value.get(i)) === l && (s.value.delete(i), s.value = new Map(s.value)), o("close"));
19544
19544
  }), $e(() => {
19545
19545
  document.removeEventListener("click", g, !0);
@@ -19569,8 +19569,8 @@ const BC = ["menu-open"], Ot = /* @__PURE__ */ q({
19569
19569
  style: ve(H(h))
19570
19570
  }, [
19571
19571
  ye(w.$slots, "dropdown", { close: m })
19572
- ], 4)) : U("", !0)
19573
- ], 8, ["to"])) : U("", !0)
19572
+ ], 4)) : K("", !0)
19573
+ ], 8, ["to"])) : K("", !0)
19574
19574
  ], 64));
19575
19575
  }
19576
19576
  }), zC = {}, FC = {
@@ -19591,7 +19591,7 @@ const _t = /* @__PURE__ */ Oo(zC, [["render", HC]]), VC = { class: "wov-menu-but
19591
19591
  },
19592
19592
  setup(n) {
19593
19593
  const e = n, { nextEditorTick: t } = Ae(), o = Te(null), r = _(() => {
19594
- const l = o.value ?? (e.side === "start" ? Ze.None : Ze.V);
19594
+ const l = o.value ?? (e.side === "start" ? Qe.None : Qe.V);
19595
19595
  return Gr(l);
19596
19596
  });
19597
19597
  t((l) => {
@@ -19602,7 +19602,7 @@ const _t = /* @__PURE__ */ Oo(zC, [["render", HC]]), VC = { class: "wov-menu-but
19602
19602
  if (a === null)
19603
19603
  a = d;
19604
19604
  else if (d !== a) {
19605
- o.value = e.side === "start" ? Ze.None : Ze.V;
19605
+ o.value = e.side === "start" ? Qe.None : Qe.V;
19606
19606
  return;
19607
19607
  }
19608
19608
  }
@@ -19611,7 +19611,7 @@ const _t = /* @__PURE__ */ Oo(zC, [["render", HC]]), VC = { class: "wov-menu-but
19611
19611
  if (a === null)
19612
19612
  a = d;
19613
19613
  else if (d !== a) {
19614
- o.value = e.side === "start" ? Ze.None : Ze.V;
19614
+ o.value = e.side === "start" ? Qe.None : Qe.V;
19615
19615
  return;
19616
19616
  }
19617
19617
  }
@@ -19773,7 +19773,7 @@ const _t = /* @__PURE__ */ Oo(zC, [["render", HC]]), VC = { class: "wov-menu-but
19773
19773
  emits: ["update:modelValue"],
19774
19774
  setup(n, { emit: e }) {
19775
19775
  const t = n, o = e, r = z(t.modelValue ?? "");
19776
- me(
19776
+ pe(
19777
19777
  () => t.modelValue,
19778
19778
  (u) => {
19779
19779
  u && u !== r.value && (r.value = u);
@@ -19856,7 +19856,7 @@ const _t = /* @__PURE__ */ Oo(zC, [["render", HC]]), VC = { class: "wov-menu-but
19856
19856
  key: 0,
19857
19857
  class: "wov-color-slider-gradient",
19858
19858
  style: ve({ background: n.background })
19859
- }, null, 4)) : U("", !0),
19859
+ }, null, 4)) : K("", !0),
19860
19860
  S("div", {
19861
19861
  class: "wov-color-slider-thumb",
19862
19862
  style: ve({
@@ -19900,12 +19900,12 @@ const _t = /* @__PURE__ */ Oo(zC, [["render", HC]]), VC = { class: "wov-menu-but
19900
19900
  function b(C) {
19901
19901
  y(C), o("update:modelValue", t.withOpacity ? Wf(Hf(C)) : C);
19902
19902
  }
19903
- y(t.modelValue), me(
19903
+ y(t.modelValue), pe(
19904
19904
  () => t.modelValue,
19905
19905
  (C) => {
19906
19906
  d.value || y(C);
19907
19907
  }
19908
- ), me([l, a, c], () => {
19908
+ ), pe([l, a, c], () => {
19909
19909
  d.value && o("update:modelValue", m.value);
19910
19910
  });
19911
19911
  function w(C) {
@@ -19960,7 +19960,7 @@ const _t = /* @__PURE__ */ Oo(zC, [["render", HC]]), VC = { class: "wov-menu-but
19960
19960
  thumbColor: p.value,
19961
19961
  background: g.value,
19962
19962
  class: "wov-color-picker-opacity"
19963
- }, null, 8, ["modelValue", "thumbColor", "background"])) : U("", !0)
19963
+ }, null, 8, ["modelValue", "thumbColor", "background"])) : K("", !0)
19964
19964
  ])
19965
19965
  ]));
19966
19966
  }
@@ -20046,7 +20046,7 @@ const _t = /* @__PURE__ */ Oo(zC, [["render", HC]]), VC = { class: "wov-menu-but
20046
20046
  onMousedown: m[2] || (m[2] = Et(() => {
20047
20047
  }, ["prevent"])),
20048
20048
  onClick: f
20049
- }, null, 34)) : U("", !0)
20049
+ }, null, 34)) : K("", !0)
20050
20050
  ]))
20051
20051
  ]));
20052
20052
  }
@@ -20167,7 +20167,7 @@ const _t = /* @__PURE__ */ Oo(zC, [["render", HC]]), VC = { class: "wov-menu-but
20167
20167
  ref: o,
20168
20168
  class: "wov-menu-tooltip",
20169
20169
  style: ve(H(i))
20170
- }, Ne((f = H(e)) == null ? void 0 : f.text), 5)) : U("", !0)
20170
+ }, Ne((f = H(e)) == null ? void 0 : f.text), 5)) : K("", !0)
20171
20171
  ];
20172
20172
  }),
20173
20173
  _: 1
@@ -20259,7 +20259,7 @@ const _t = /* @__PURE__ */ Oo(zC, [["render", HC]]), VC = { class: "wov-menu-but
20259
20259
  }, Ne(u.label), 11, uT)), 64))
20260
20260
  ]),
20261
20261
  _: 1
20262
- })) : U("", !0);
20262
+ })) : K("", !0);
20263
20263
  }
20264
20264
  }), fT = { class: "wov-fill-color-button" }, hT = { class: "wov-fill-dropdown" }, pT = {
20265
20265
  key: 0,
@@ -20345,7 +20345,7 @@ const _t = /* @__PURE__ */ Oo(zC, [["render", HC]]), VC = { class: "wov-menu-but
20345
20345
  ]),
20346
20346
  dropdown: se(() => [
20347
20347
  S("div", hT, [
20348
- h.value ? U("", !0) : (T(), O("div", pT, [
20348
+ h.value ? K("", !0) : (T(), O("div", pT, [
20349
20349
  (T(), O(ue, null, Me(s, (g) => S("button", {
20350
20350
  key: g.mode,
20351
20351
  class: Ee(["wov-fill-mode-option", {
@@ -20605,13 +20605,13 @@ const _t = /* @__PURE__ */ Oo(zC, [["render", HC]]), VC = { class: "wov-menu-but
20605
20605
  ]),
20606
20606
  dropdown: se(() => [
20607
20607
  S("div", _T, [
20608
- s.value ? U("", !0) : (T(), ne(IT, {
20608
+ s.value ? K("", !0) : (T(), ne(IT, {
20609
20609
  key: 0,
20610
20610
  currentStyle: c.value,
20611
20611
  hasMultipleStyles: u.value,
20612
20612
  onChange: f
20613
20613
  }, null, 8, ["currentStyle", "hasMultipleStyles"])),
20614
- s.value ? U("", !0) : (T(), O("div", DT, [
20614
+ s.value ? K("", !0) : (T(), O("div", DT, [
20615
20615
  S("input", {
20616
20616
  type: "range",
20617
20617
  min: "1",
@@ -20623,7 +20623,7 @@ const _t = /* @__PURE__ */ Oo(zC, [["render", HC]]), VC = { class: "wov-menu-but
20623
20623
  }, null, 40, NT),
20624
20624
  S("span", RT, Ne(h.value) + "px", 1)
20625
20625
  ])),
20626
- s.value ? U("", !0) : (T(), O("div", PT)),
20626
+ s.value ? K("", !0) : (T(), O("div", PT)),
20627
20627
  Z(Tl, {
20628
20628
  currentColor: a.value,
20629
20629
  hideHighlight: l.value,
@@ -20754,7 +20754,7 @@ const _t = /* @__PURE__ */ Oo(zC, [["render", HC]]), VC = { class: "wov-menu-but
20754
20754
  ])]))
20755
20755
  ]),
20756
20756
  _: 1
20757
- })) : U("", !0);
20757
+ })) : K("", !0);
20758
20758
  }
20759
20759
  }), uh = /* @__PURE__ */ q({
20760
20760
  __name: "TextBoldButton",
@@ -20779,7 +20779,7 @@ const _t = /* @__PURE__ */ Oo(zC, [["render", HC]]), VC = { class: "wov-menu-but
20779
20779
  ], -1)
20780
20780
  ])]),
20781
20781
  _: 1
20782
- }, 8, ["class", "onClick"])) : U("", !0);
20782
+ }, 8, ["class", "onClick"])) : K("", !0);
20783
20783
  }
20784
20784
  });
20785
20785
  function UT(n, e) {
@@ -20799,7 +20799,7 @@ function YT(n, e = !0, t) {
20799
20799
  GT() ? wt(n, t) : e ? n() : Jn(n);
20800
20800
  }
20801
20801
  function XT(n, e, t) {
20802
- return me(n, e, {
20802
+ return pe(n, e, {
20803
20803
  ...t,
20804
20804
  immediate: !0
20805
20805
  });
@@ -20913,7 +20913,7 @@ function tM(n, e, t = {}) {
20913
20913
  let s;
20914
20914
  const i = /* @__PURE__ */ eM(() => o && "ResizeObserver" in o), l = () => {
20915
20915
  s && (s.disconnect(), s = void 0);
20916
- }, a = me(_(() => {
20916
+ }, a = pe(_(() => {
20917
20917
  const u = rt(n);
20918
20918
  return Array.isArray(u) ? u.map((d) => $t(d)) : [$t(u)];
20919
20919
  }), (u) => {
@@ -20957,7 +20957,7 @@ function n0(n, e = {
20957
20957
  const d = $t(n);
20958
20958
  d && (i.value = "offsetWidth" in d ? d.offsetWidth : e.width, l.value = "offsetHeight" in d ? d.offsetHeight : e.height);
20959
20959
  });
20960
- const c = me(() => $t(n), (d) => {
20960
+ const c = pe(() => $t(n), (d) => {
20961
20961
  i.value = d ? e.width : 0, l.value = d ? e.height : 0;
20962
20962
  });
20963
20963
  function u() {
@@ -20970,7 +20970,7 @@ function n0(n, e = {
20970
20970
  };
20971
20971
  }
20972
20972
  function nM() {
20973
- const n = pe(Ue);
20973
+ const n = me(Ue);
20974
20974
  if (!n)
20975
20975
  throw new Error("useFonts must be used within a WovenCanvas component");
20976
20976
  return _(() => {
@@ -21040,7 +21040,7 @@ const oM = { class: "wov-font-family-button" }, rM = { class: "wov-font-family-l
21040
21040
  ], 32)
21041
21041
  ]),
21042
21042
  _: 1
21043
- })) : U("", !0);
21043
+ })) : K("", !0);
21044
21044
  }
21045
21045
  }), aM = { class: "wov-font-size-button" }, cM = { class: "wov-font-size-label" }, uM = ["onClick"], dM = {
21046
21046
  key: 0,
@@ -21105,7 +21105,7 @@ const oM = { class: "wov-font-family-button" }, rM = { class: "wov-font-family-l
21105
21105
  }, [
21106
21106
  s.value === p.value ? (T(), O("svg", dM, [...h[1] || (h[1] = [
21107
21107
  S("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)
21108
- ])])) : U("", !0),
21108
+ ])])) : K("", !0),
21109
21109
  S("span", {
21110
21110
  class: "wov-option-label",
21111
21111
  style: ve({ fontSize: `${p.displayValue}px` })
@@ -21125,7 +21125,7 @@ const oM = { class: "wov-font-family-button" }, rM = { class: "wov-font-family-l
21125
21125
  ], 32)
21126
21126
  ]),
21127
21127
  _: 1
21128
- })) : U("", !0);
21128
+ })) : K("", !0);
21129
21129
  }
21130
21130
  }), hh = /* @__PURE__ */ q({
21131
21131
  __name: "TextItalicButton",
@@ -21150,7 +21150,7 @@ const oM = { class: "wov-font-family-button" }, rM = { class: "wov-font-family-l
21150
21150
  ], -1)
21151
21151
  ])]),
21152
21152
  _: 1
21153
- }, 8, ["class", "onClick"])) : U("", !0);
21153
+ }, 8, ["class", "onClick"])) : K("", !0);
21154
21154
  }
21155
21155
  }), ph = /* @__PURE__ */ q({
21156
21156
  __name: "TextUnderlineButton",
@@ -21175,7 +21175,7 @@ const oM = { class: "wov-font-family-button" }, rM = { class: "wov-font-family-l
21175
21175
  ], -1)
21176
21176
  ])]),
21177
21177
  _: 1
21178
- }, 8, ["class", "onClick"])) : U("", !0);
21178
+ }, 8, ["class", "onClick"])) : K("", !0);
21179
21179
  }
21180
21180
  }), pM = { class: "wov-link-input-container" }, mM = ["onKeydown"], mh = /* @__PURE__ */ q({
21181
21181
  __name: "TextLinkButton",
@@ -21183,7 +21183,7 @@ const oM = { class: "wov-font-family-button" }, rM = { class: "wov-font-family-l
21183
21183
  entityIds: {}
21184
21184
  },
21185
21185
  setup(n) {
21186
- const e = n, { state: t, commands: o } = nn(() => e.entityIds), r = z(!1), s = z(""), i = z(null), l = z(null), a = z(null), c = pe("containerRef"), { floatingStyles: u } = mr(l, a, {
21186
+ const e = n, { state: t, commands: o } = nn(() => e.entityIds), r = z(!1), s = z(""), i = z(null), l = z(null), a = z(null), c = me("containerRef"), { floatingStyles: u } = mr(l, a, {
21187
21187
  placement: "top",
21188
21188
  middleware: [fr(8), pr(), hr({ padding: 8 })],
21189
21189
  whileElementsMounted: Cl
@@ -21206,7 +21206,7 @@ const oM = { class: "wov-font-family-button" }, rM = { class: "wov-font-family-l
21206
21206
  const g = m.target;
21207
21207
  !((y = l.value) != null && y.contains(g)) && !((b = a.value) != null && b.contains(g)) && (r.value = !1);
21208
21208
  }
21209
- return me(r, (m) => {
21209
+ return pe(r, (m) => {
21210
21210
  m ? document.addEventListener("click", p, !0) : document.removeEventListener("click", p, !0);
21211
21211
  }), (m, g) => (T(), O(ue, null, [
21212
21212
  S("div", {
@@ -21229,7 +21229,7 @@ const oM = { class: "wov-font-family-button" }, rM = { class: "wov-font-family-l
21229
21229
  ], -1)
21230
21230
  ])]),
21231
21231
  _: 1
21232
- }, 8, ["class"])) : U("", !0)
21232
+ }, 8, ["class"])) : K("", !0)
21233
21233
  ], 512),
21234
21234
  H(c) ? (T(), ne(ps, {
21235
21235
  key: 0,
@@ -21271,7 +21271,7 @@ const oM = { class: "wov-font-family-button" }, rM = { class: "wov-font-family-l
21271
21271
  }, [
21272
21272
  S("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" })
21273
21273
  ], -1)
21274
- ])])) : U("", !0),
21274
+ ])])) : K("", !0),
21275
21275
  S("button", {
21276
21276
  class: "wov-link-action-button",
21277
21277
  title: "Apply link",
@@ -21286,8 +21286,8 @@ const oM = { class: "wov-font-family-button" }, rM = { class: "wov-font-family-l
21286
21286
  ], -1)
21287
21287
  ])])
21288
21288
  ])
21289
- ], 36)) : U("", !0)
21290
- ], 8, ["to"])) : U("", !0)
21289
+ ], 36)) : K("", !0)
21290
+ ], 8, ["to"])) : K("", !0)
21291
21291
  ], 64));
21292
21292
  }
21293
21293
  }), gM = { class: "wov-text-color-button" }, yM = { class: "wov-text-icon-container" }, gh = /* @__PURE__ */ q({
@@ -21331,7 +21331,7 @@ const oM = { class: "wov-font-family-button" }, rM = { class: "wov-font-family-l
21331
21331
  }, null, 8, ["currentColor"])
21332
21332
  ]),
21333
21333
  _: 1
21334
- })) : U("", !0);
21334
+ })) : K("", !0);
21335
21335
  }
21336
21336
  }), vM = {
21337
21337
  key: 0,
@@ -21375,10 +21375,10 @@ const oM = { class: "wov-font-family-button" }, rM = { class: "wov-font-family-l
21375
21375
  entityIds: {}
21376
21376
  },
21377
21377
  setup(n) {
21378
- const e = n, { nextEditorTick: t } = Ae(), { state: o } = nn(() => e.entityIds), r = [Xe.Top, Xe.Center, Xe.Bottom], s = to(() => e.entityIds, Ks), i = _(() => {
21378
+ const e = n, { nextEditorTick: t } = Ae(), { state: o } = nn(() => e.entityIds), r = [Ze.Top, Ze.Center, Ze.Bottom], s = to(() => e.entityIds, Ks), i = _(() => {
21379
21379
  let a = null;
21380
21380
  for (const c of s.value.values()) {
21381
- const u = (c == null ? void 0 : c.value) ?? Xe.Top;
21381
+ const u = (c == null ? void 0 : c.value) ?? Ze.Top;
21382
21382
  if (a === null)
21383
21383
  a = u;
21384
21384
  else if (a !== u)
@@ -21387,7 +21387,7 @@ const oM = { class: "wov-font-family-button" }, rM = { class: "wov-font-family-l
21387
21387
  return a;
21388
21388
  });
21389
21389
  function l() {
21390
- const a = i.value ?? Xe.Top, c = r.indexOf(a), u = r[(c + 1) % r.length];
21390
+ const a = i.value ?? Ze.Top, c = r.indexOf(a), u = r[(c + 1) % r.length];
21391
21391
  t((d) => {
21392
21392
  for (const f of e.entityIds) {
21393
21393
  const h = Ks.write(d, f);
@@ -21401,7 +21401,7 @@ const oM = { class: "wov-font-family-button" }, rM = { class: "wov-font-family-l
21401
21401
  onClick: l
21402
21402
  }, {
21403
21403
  default: se(() => [
21404
- i.value === H(Xe).Top || i.value === null ? (T(), O("svg", vM, [...c[0] || (c[0] = [
21404
+ i.value === H(Ze).Top || i.value === null ? (T(), O("svg", vM, [...c[0] || (c[0] = [
21405
21405
  S("rect", {
21406
21406
  width: "14",
21407
21407
  height: "6",
@@ -21417,7 +21417,7 @@ const oM = { class: "wov-font-family-button" }, rM = { class: "wov-font-family-l
21417
21417
  rx: "2"
21418
21418
  }, null, -1),
21419
21419
  S("path", { d: "M2 2h20" }, null, -1)
21420
- ])])) : i.value === H(Xe).Center ? (T(), O("svg", wM, [...c[1] || (c[1] = [
21420
+ ])])) : i.value === H(Ze).Center ? (T(), O("svg", wM, [...c[1] || (c[1] = [
21421
21421
  S("rect", {
21422
21422
  width: "14",
21423
21423
  height: "6",
@@ -21452,7 +21452,7 @@ const oM = { class: "wov-font-family-button" }, rM = { class: "wov-font-family-l
21452
21452
  ])]))
21453
21453
  ]),
21454
21454
  _: 1
21455
- })) : U("", !0);
21455
+ })) : K("", !0);
21456
21456
  }
21457
21457
  }), bM = { class: "wov-text-group-button" }, xM = { class: "wov-text-group-dropdown" }, SM = { class: "wov-text-group-row wov-text-group-row-full" }, CM = { class: "wov-text-group-row" }, TM = /* @__PURE__ */ q({
21458
21458
  __name: "TextButtonGroup",
@@ -21461,7 +21461,7 @@ const oM = { class: "wov-font-family-button" }, rM = { class: "wov-font-family-l
21461
21461
  showVerticalAlign: { type: Boolean }
21462
21462
  },
21463
21463
  setup(n) {
21464
- const e = n, { state: t } = nn(() => e.entityIds), o = pe("containerRef"), { width: r } = n0(o), s = _(() => r.value > 0 && r.value < 600), i = z(/* @__PURE__ */ new Map());
21464
+ const e = n, { state: t } = nn(() => e.entityIds), o = me("containerRef"), { width: r } = n0(o), s = _(() => r.value > 0 && r.value < 600), i = z(/* @__PURE__ */ new Map());
21465
21465
  return ho(Zh, i), (l, a) => H(t).showTextMenuButtons ? (T(), O(ue, { key: 0 }, [
21466
21466
  s.value ? (T(), ne(Ot, {
21467
21467
  key: 0,
@@ -21499,7 +21499,7 @@ const oM = { class: "wov-font-family-button" }, rM = { class: "wov-font-family-l
21499
21499
  n.showVerticalAlign ? (T(), ne(yh, {
21500
21500
  key: 0,
21501
21501
  entityIds: n.entityIds
21502
- }, null, 8, ["entityIds"])) : U("", !0)
21502
+ }, null, 8, ["entityIds"])) : K("", !0)
21503
21503
  ])
21504
21504
  ])
21505
21505
  ]),
@@ -21524,9 +21524,9 @@ const oM = { class: "wov-font-family-button" }, rM = { class: "wov-font-family-l
21524
21524
  n.showVerticalAlign ? (T(), ne(yh, {
21525
21525
  key: 0,
21526
21526
  entityIds: n.entityIds
21527
- }, null, 8, ["entityIds"])) : U("", !0)
21527
+ }, null, 8, ["entityIds"])) : K("", !0)
21528
21528
  ], 64))
21529
- ], 64)) : U("", !0);
21529
+ ], 64)) : K("", !0);
21530
21530
  }
21531
21531
  }), MM = /* @__PURE__ */ q({
21532
21532
  __name: "CanvasBackground",
@@ -21542,7 +21542,7 @@ const oM = { class: "wov-font-family-button" }, rM = { class: "wov-font-family-l
21542
21542
  }, o = _(() => ({
21543
21543
  ...t,
21544
21544
  ...e.background
21545
- })), r = it(Pe), s = it(bn), i = pe("containerRef"), l = z({ width: 0, height: 0 });
21545
+ })), r = it(Pe), s = it(bn), i = me("containerRef"), l = z({ width: 0, height: 0 });
21546
21546
  let a = null;
21547
21547
  const c = z(null);
21548
21548
  let u = null;
@@ -21671,7 +21671,7 @@ const oM = { class: "wov-font-family-button" }, rM = { class: "wov-font-family-l
21671
21671
  const { width: v, height: k } = l.value;
21672
21672
  v === 0 || k === 0 || (b.width = v, b.height = k, w.clearRect(0, 0, v, k), w.fillStyle = o.value.color, w.fillRect(0, 0, v, k), o.value.kind === "dots" ? m(w) : o.value.kind === "grid" && g(w));
21673
21673
  }
21674
- return me(
21674
+ return pe(
21675
21675
  () => [o.value, r.value, s.value, l.value],
21676
21676
  () => {
21677
21677
  y();
@@ -21716,7 +21716,7 @@ const oM = { class: "wov-font-family-button" }, rM = { class: "wov-font-family-l
21716
21716
  var v;
21717
21717
  return ((v = o()) == null ? void 0 : v.readonly) === !0;
21718
21718
  }
21719
- const a = pe("containerRef");
21719
+ const a = me("containerRef");
21720
21720
  function c(v) {
21721
21721
  var k;
21722
21722
  l() || (k = v.dataTransfer) != null && k.types.some((C) => C === "Files" || C === "text/uri-list" || C === "text/html") && (i++, i === 1 && (s.value = !0));
@@ -21831,7 +21831,7 @@ function AM(n, e) {
21831
21831
  const IM = /* @__PURE__ */ q({
21832
21832
  __name: "FloatingMenuBar",
21833
21833
  setup(n) {
21834
- const e = Wh(), { reset: t } = no(), o = pe(Qh), { selectedIds: r, commonComponents: s } = o, i = /* @__PURE__ */ new Set([
21834
+ const e = Wh(), { reset: t } = no(), o = me(Qh), { selectedIds: r, commonComponents: s } = o, i = /* @__PURE__ */ new Set([
21835
21835
  "color",
21836
21836
  "text",
21837
21837
  "verticalAlign",
@@ -21866,7 +21866,7 @@ const IM = /* @__PURE__ */ q({
21866
21866
  entityIds: H(r)
21867
21867
  }, () => [
21868
21868
  Z(lT, { entityIds: H(r) }, null, 8, ["entityIds"])
21869
- ]) : U("", !0),
21869
+ ]) : K("", !0),
21870
21870
  H(s).has("shape") ? ye(c.$slots, "button:shape", {
21871
21871
  key: 1,
21872
21872
  entityIds: H(r)
@@ -21874,13 +21874,13 @@ const IM = /* @__PURE__ */ q({
21874
21874
  Z(CT, { entityIds: H(r) }, null, 8, ["entityIds"]),
21875
21875
  Z(vT, { entityIds: H(r) }, null, 8, ["entityIds"]),
21876
21876
  Z(LT, { entityIds: H(r) }, null, 8, ["entityIds"])
21877
- ]) : U("", !0),
21877
+ ]) : K("", !0),
21878
21878
  H(s).has("penStroke") ? ye(c.$slots, "button:penStroke", {
21879
21879
  key: 2,
21880
21880
  entityIds: H(r)
21881
21881
  }, () => [
21882
21882
  Z(dT, { entityIds: H(r) }, null, 8, ["entityIds"])
21883
- ]) : U("", !0),
21883
+ ]) : K("", !0),
21884
21884
  H(s).has("elbowArrow") || H(s).has("arcArrow") ? (T(), O(ue, { key: 3 }, [
21885
21885
  ye(c.$slots, "button:arrowThickness", { entityIds: H(r) }, () => [
21886
21886
  Z(JC, { entityIds: H(r) }, null, 8, ["entityIds"])
@@ -21897,13 +21897,13 @@ const IM = /* @__PURE__ */ q({
21897
21897
  side: "end"
21898
21898
  }, null, 8, ["entityIds"])
21899
21899
  ])
21900
- ], 64)) : U("", !0),
21900
+ ], 64)) : K("", !0),
21901
21901
  H(s).has("tape") ? ye(c.$slots, "button:tape", {
21902
21902
  key: 4,
21903
21903
  entityIds: H(r)
21904
21904
  }, () => [
21905
21905
  Z(FT, { entityIds: H(r) }, null, 8, ["entityIds"])
21906
- ]) : U("", !0),
21906
+ ]) : K("", !0),
21907
21907
  H(s).has("text") ? ye(c.$slots, "button:text", {
21908
21908
  key: 5,
21909
21909
  entityIds: H(r)
@@ -21912,13 +21912,13 @@ const IM = /* @__PURE__ */ q({
21912
21912
  entityIds: H(r),
21913
21913
  showVerticalAlign: H(s).has("verticalAlign")
21914
21914
  }, null, 8, ["entityIds", "showVerticalAlign"])
21915
- ]) : U("", !0)
21915
+ ]) : K("", !0)
21916
21916
  ], 32));
21917
21917
  }
21918
21918
  }), OM = { class: "wov-floating-menu-inner" }, _M = /* @__PURE__ */ q({
21919
21919
  __name: "FloatingMenu",
21920
21920
  setup(n) {
21921
- const e = pe(Ue), t = fS([ie, Qi]), o = it(Pe), r = it(Qn), s = it(el), i = dr(), l = _(
21921
+ const e = me(Ue), t = fS([ie, Qi]), o = it(Pe), r = it(Qn), s = it(el), i = dr(), l = _(
21922
21922
  () => t.value.map((C) => C.entityId)
21923
21923
  ), a = _(() => {
21924
21924
  const C = e == null ? void 0 : e.getEditor();
@@ -21960,7 +21960,7 @@ const IM = /* @__PURE__ */ q({
21960
21960
  hy.getAabb(R, D.size, D.rotateZ, c), Pn.translate(c, [-C.left, -C.top]), Pn.scale(c, C.zoom), x === null ? x = Pn.clone(c) : Pn.union(x, c);
21961
21961
  }
21962
21962
  return x;
21963
- }), f = pe("containerRef"), h = _(() => {
21963
+ }), f = me("containerRef"), h = _(() => {
21964
21964
  const C = f == null ? void 0 : f.value;
21965
21965
  if (!C) return null;
21966
21966
  o.value, i.updateCounter.value;
@@ -22017,7 +22017,7 @@ const IM = /* @__PURE__ */ q({
22017
22017
  () => t.value.length > 0 && !y.value && !b.includes(s.value.state)
22018
22018
  ), v = z(!1);
22019
22019
  let k;
22020
- return me(w, (C) => {
22020
+ return pe(w, (C) => {
22021
22021
  clearTimeout(k), C ? k = setTimeout(() => {
22022
22022
  v.value = !0;
22023
22023
  }, 40) : v.value = !1;
@@ -22035,7 +22035,7 @@ const IM = /* @__PURE__ */ q({
22035
22035
  Z(IM)
22036
22036
  ])
22037
22037
  ])
22038
- ], 4)) : U("", !0)
22038
+ ], 4)) : K("", !0)
22039
22039
  ]),
22040
22040
  _: 3
22041
22041
  }));
@@ -22062,7 +22062,7 @@ const IM = /* @__PURE__ */ q({
22062
22062
  default: se(() => [
22063
22063
  n.isLoading ? (T(), O("div", DM, [
22064
22064
  S("div", NM, Ne(e.value), 1)
22065
- ])) : U("", !0)
22065
+ ])) : K("", !0)
22066
22066
  ]),
22067
22067
  _: 1
22068
22068
  }));
@@ -22070,7 +22070,7 @@ const IM = /* @__PURE__ */ q({
22070
22070
  }), PM = { class: "wov-action-bar" }, LM = /* @__PURE__ */ q({
22071
22071
  __name: "ActionBar",
22072
22072
  setup(n) {
22073
- const { getEditor: e } = Ae(), t = pe(Ue), o = z(!1), r = z(!1);
22073
+ const { getEditor: e } = Ae(), t = me(Ue), o = z(!1), r = z(!1);
22074
22074
  if (t) {
22075
22075
  const a = t.registerTickCallback((c) => {
22076
22076
  const { store: u } = Io(c, No);
@@ -22168,7 +22168,7 @@ const IM = /* @__PURE__ */ q({
22168
22168
  cursor: { default: "crosshair" }
22169
22169
  },
22170
22170
  setup(n) {
22171
- const e = n, t = pe(Nc);
22171
+ const e = n, t = me(Nc);
22172
22172
  if (!t)
22173
22173
  throw new Error("ToolbarButton must be used within a Toolbar component");
22174
22174
  const o = t, r = z(null), { show: s, hide: i } = no(), l = _(
@@ -22233,7 +22233,7 @@ const IM = /* @__PURE__ */ q({
22233
22233
  __name: "SelectTool",
22234
22234
  setup(n) {
22235
22235
  const { nextEditorTick: e } = Ae(), { activeTool: t } = xu();
22236
- return me(t, (o, r) => {
22236
+ return pe(t, (o, r) => {
22237
22237
  r === "select" && e((s) => {
22238
22238
  Ec.spawn(s);
22239
22239
  });
@@ -22283,7 +22283,7 @@ const IM = /* @__PURE__ */ q({
22283
22283
  }), jM = /* @__PURE__ */ q({
22284
22284
  __name: "StickyNoteTool",
22285
22285
  setup(n) {
22286
- const e = pe(Ue), t = _(() => JSON.stringify({
22286
+ const e = me(Ue), t = _(() => JSON.stringify({
22287
22287
  block: {
22288
22288
  tag: "sticky-note",
22289
22289
  size: [200, 200]
@@ -22298,7 +22298,7 @@ const IM = /* @__PURE__ */ q({
22298
22298
  ...e.getDefaults("text")
22299
22299
  },
22300
22300
  verticalAlign: {
22301
- value: Xe.Center
22301
+ value: Ze.Center
22302
22302
  }
22303
22303
  }));
22304
22304
  return (o, r) => (T(), ne(Ht, {
@@ -22324,7 +22324,7 @@ const IM = /* @__PURE__ */ q({
22324
22324
  }), UM = /* @__PURE__ */ q({
22325
22325
  __name: "ShapeTool",
22326
22326
  setup(n) {
22327
- const e = pe(Ue), t = _(() => JSON.stringify({
22327
+ const e = me(Ue), t = _(() => JSON.stringify({
22328
22328
  block: {
22329
22329
  tag: "shape",
22330
22330
  size: [200, 200]
@@ -22347,7 +22347,7 @@ const IM = /* @__PURE__ */ q({
22347
22347
  ...e.getDefaults("text")
22348
22348
  },
22349
22349
  verticalAlign: {
22350
- value: Xe.Center
22350
+ value: Ze.Center
22351
22351
  }
22352
22352
  }));
22353
22353
  return (o, r) => (T(), ne(Ht, {
@@ -22425,7 +22425,7 @@ const IM = /* @__PURE__ */ q({
22425
22425
  }), JM = /* @__PURE__ */ q({
22426
22426
  __name: "TextTool",
22427
22427
  setup(n) {
22428
- const e = pe(Ue), t = _(() => JSON.stringify({
22428
+ const e = me(Ue), t = _(() => JSON.stringify({
22429
22429
  block: {
22430
22430
  tag: "text",
22431
22431
  size: [10, 29]
@@ -22485,8 +22485,8 @@ const IM = /* @__PURE__ */ q({
22485
22485
  elbowArrow: {
22486
22486
  points: [0, 0, 0.5, 0, 0.5, 1, 1, 1],
22487
22487
  pointCount: 4,
22488
- startArrowHead: Ze.None,
22489
- endArrowHead: Ze.V
22488
+ startArrowHead: Qe.None,
22489
+ endArrowHead: Qe.V
22490
22490
  },
22491
22491
  connector: {}
22492
22492
  });
@@ -22651,7 +22651,7 @@ const IM = /* @__PURE__ */ q({
22651
22651
  }, hE = /* @__PURE__ */ q({
22652
22652
  __name: "EmbedTool",
22653
22653
  setup(n) {
22654
- const { nextEditorTick: e } = Ae(), { show: t, hide: o } = no(), { setTool: r } = xu(), s = z(null), i = z(null), l = z(null), a = z(!1), c = z(null), u = z(""), d = z(""), f = pe("containerRef"), { floatingStyles: h } = mr(s, i, {
22654
+ const { nextEditorTick: e } = Ae(), { show: t, hide: o } = no(), { setTool: r } = xu(), s = z(null), i = z(null), l = z(null), a = z(!1), c = z(null), u = z(""), d = z(""), f = me("containerRef"), { floatingStyles: h } = mr(s, i, {
22655
22655
  placement: "top",
22656
22656
  middleware: [fr(16), pr(), hr({ padding: 8 })],
22657
22657
  whileElementsMounted: Cl
@@ -22772,7 +22772,7 @@ const IM = /* @__PURE__ */ q({
22772
22772
  const E = M.target;
22773
22773
  s.value && !s.value.contains(E) && i.value && !i.value.contains(E) && (a.value = !1);
22774
22774
  }
22775
- me(a, (M) => {
22775
+ pe(a, (M) => {
22776
22776
  M ? document.addEventListener("click", k, !0) : document.removeEventListener("click", k, !0);
22777
22777
  });
22778
22778
  function C() {
@@ -22849,7 +22849,7 @@ const IM = /* @__PURE__ */ q({
22849
22849
  }, null, 40, dE), [
22850
22850
  [Vh, u.value]
22851
22851
  ]),
22852
- d.value ? (T(), O("div", fE, Ne(d.value), 1)) : U("", !0),
22852
+ d.value ? (T(), O("div", fE, Ne(d.value), 1)) : K("", !0),
22853
22853
  S("button", {
22854
22854
  class: "wov-embed-submit-button",
22855
22855
  onClick: w
@@ -22945,14 +22945,14 @@ const IM = /* @__PURE__ */ q({
22945
22945
  fill: "currentColor",
22946
22946
  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"
22947
22947
  }, null, -1)
22948
- ])])) : U("", !0)
22948
+ ])])) : K("", !0)
22949
22949
  ]),
22950
22950
  S("span", aE, Ne(D.label), 1)
22951
22951
  ], 8, ZM)), 64))
22952
22952
  ])
22953
22953
  ], 64))
22954
- ], 4)) : U("", !0)
22955
- ], 8, ["to"])) : U("", !0)
22954
+ ], 4)) : K("", !0)
22955
+ ], 8, ["to"])) : K("", !0)
22956
22956
  ], 64);
22957
22957
  };
22958
22958
  }
@@ -23078,7 +23078,7 @@ const IM = /* @__PURE__ */ q({
23078
23078
  mE,
23079
23079
  qM,
23080
23080
  KM
23081
- ], c = pe("containerRef"), u = z(null), d = z(!1), f = z(null), h = z(null), p = z(1 / 0), m = z(0), g = z([]), y = z(8), b = z(48), { width: w } = n0(c);
23081
+ ], c = me("containerRef"), u = z(null), d = z(!1), f = z(null), h = z(null), p = z(1 / 0), m = z(0), g = z([]), y = z(8), b = z(48), { width: w } = n0(c);
23082
23082
  function v() {
23083
23083
  return f.value ? Array.from(f.value.children).filter((X) => !X.classList.contains("wov-overflow-button") && !X.classList.contains("wov-menu-tooltip")) : [];
23084
23084
  }
@@ -23105,7 +23105,7 @@ const IM = /* @__PURE__ */ q({
23105
23105
  }
23106
23106
  p.value = Math.max(1, qe);
23107
23107
  }
23108
- me(w, () => {
23108
+ pe(w, () => {
23109
23109
  g.value.length > 0 && C();
23110
23110
  }), wt(() => {
23111
23111
  Jn(() => {
@@ -23138,9 +23138,9 @@ const IM = /* @__PURE__ */ q({
23138
23138
  const Y = X.target;
23139
23139
  h.value && !h.value.contains(Y) && u.value && !u.value.contains(Y) && A();
23140
23140
  }
23141
- me(d, (X) => {
23141
+ pe(d, (X) => {
23142
23142
  X ? document.addEventListener("click", D, !0) : document.removeEventListener("click", D, !0);
23143
- }), me(x, (X) => {
23143
+ }), pe(x, (X) => {
23144
23144
  X || A();
23145
23145
  });
23146
23146
  function R(X, Y) {
@@ -23207,7 +23207,7 @@ const IM = /* @__PURE__ */ q({
23207
23207
  y2: "12"
23208
23208
  })
23209
23209
  ], -1)
23210
- ])], 2)) : U("", !0)
23210
+ ])], 2)) : K("", !0)
23211
23211
  ], 544),
23212
23212
  H(c) ? (T(), ne(ps, {
23213
23213
  key: 0,
@@ -23221,8 +23221,8 @@ const IM = /* @__PURE__ */ q({
23221
23221
  style: ve(H(M))
23222
23222
  }, [
23223
23223
  H(e).default ? ye(X.$slots, "default", { key: 0 }) : (T(), O(ue, { key: 1 }, Me(a, (re, fe) => Z(ba(re), { key: fe })), 64))
23224
- ], 4)) : U("", !0)
23225
- ], 8, ["to"])) : U("", !0)
23224
+ ], 4)) : K("", !0)
23225
+ ], 8, ["to"])) : K("", !0)
23226
23226
  ]));
23227
23227
  }
23228
23228
  }), HA = /* @__PURE__ */ q({
@@ -23329,8 +23329,8 @@ const IM = /* @__PURE__ */ q({
23329
23329
  S("span", SE, Ne(c.name), 1)
23330
23330
  ]))), 128))
23331
23331
  ])
23332
- ], 32)) : U("", !0)
23333
- ], 512)) : U("", !0);
23332
+ ], 32)) : K("", !0)
23333
+ ], 512)) : K("", !0);
23334
23334
  }
23335
23335
  }), uc = (n, e) => e.some((t) => n instanceof t);
23336
23336
  let vh, wh;
@@ -23795,16 +23795,16 @@ const WE = /* @__PURE__ */ q({
23795
23795
  },
23796
23796
  setup(n) {
23797
23797
  const e = n, t = _e(e.entityId, Xo), o = _e(e.entityId, Ks), r = z(null), s = {
23798
- [Xe.Top]: "flex-start",
23799
- [Xe.Center]: "center",
23800
- [Xe.Bottom]: "flex-end"
23798
+ [Ze.Top]: "flex-start",
23799
+ [Ze.Center]: "center",
23800
+ [Ze.Bottom]: "flex-end"
23801
23801
  }, i = _(() => {
23802
23802
  var a;
23803
23803
  return {
23804
23804
  backgroundColor: t.value ? `rgb(${t.value.red}, ${t.value.green}, ${t.value.blue})` : void 0,
23805
23805
  // Min-height = block width to maintain square minimum
23806
23806
  minHeight: `${e.block.size[0]}px`,
23807
- alignItems: s[((a = o.value) == null ? void 0 : a.value) ?? Xe.Top]
23807
+ alignItems: s[((a = o.value) == null ? void 0 : a.value) ?? Ze.Top]
23808
23808
  };
23809
23809
  }), { handleEditEnd: l } = Wg({
23810
23810
  blockData: e,
@@ -26437,7 +26437,7 @@ const vA = /* @__PURE__ */ q({
26437
26437
  options: {}
26438
26438
  },
26439
26439
  setup(n) {
26440
- const e = n, t = pe("containerRef", z(null));
26440
+ const e = n, t = me("containerRef", z(null));
26441
26441
  return cS(t, e.options), (o, r) => ye(o.$slots, "default");
26442
26442
  }
26443
26443
  }), wA = { class: "wov-user-cursors" }, kA = {
@@ -26493,7 +26493,7 @@ const vA = /* @__PURE__ */ q({
26493
26493
  isOnline: { type: Boolean }
26494
26494
  },
26495
26495
  setup(n) {
26496
- return (e, t) => n.isOnline ? U("", !0) : (T(), O("div", CA, "Working Offline"));
26496
+ return (e, t) => n.isOnline ? K("", !0) : (T(), O("div", CA, "Working Offline"));
26497
26497
  }
26498
26498
  }), MA = {
26499
26499
  key: 0,
@@ -26513,12 +26513,12 @@ const vA = /* @__PURE__ */ q({
26513
26513
  o[1] || (o[1] = S("p", null, "Please refresh the page to continue.", -1)),
26514
26514
  S("button", { onClick: e }, "Refresh")
26515
26515
  ])
26516
- ])) : U("", !0);
26516
+ ])) : K("", !0);
26517
26517
  }
26518
26518
  }), AA = /* @__PURE__ */ q({
26519
26519
  __name: "BackToContentButton",
26520
26520
  setup(n) {
26521
- const { nextEditorTick: e } = Ae(), t = it(Pe), o = ct((c) => c.with(Tt, ie, jo)), r = z(0), s = pe(Ue);
26521
+ const { nextEditorTick: e } = Ae(), t = it(Pe), o = ct((c) => c.with(Tt, ie, jo)), r = z(0), s = me(Ue);
26522
26522
  if (s) {
26523
26523
  const c = s.registerTickCallback((u) => {
26524
26524
  o.addedOrRemoved(u).length > 0 && (r.value = o.current(u).length);
@@ -26597,7 +26597,7 @@ const vA = /* @__PURE__ */ q({
26597
26597
  })
26598
26598
  ], -1),
26599
26599
  xa(" Back to content ", -1)
26600
- ])])) : U("", !0);
26600
+ ])])) : K("", !0);
26601
26601
  }
26602
26602
  }), IA = ["data-entity-id", "data-selected", "data-held-by-other", "data-hovered", "data-edited"], OA = /* @__PURE__ */ q({
26603
26603
  __name: "WovenCanvasCore",
@@ -26657,37 +26657,41 @@ const vA = /* @__PURE__ */ q({
26657
26657
  }
26658
26658
  V.value = ee.value;
26659
26659
  }
26660
- const Y = z(!1), re = z(!g.initialState), fe = Te(Pe.default());
26661
- function ke(I, j, $) {
26662
- let K = A.get(I);
26663
- K || (K = /* @__PURE__ */ new Map(), A.set(I, K));
26664
- let B = K.get(j);
26665
- return B || (B = /* @__PURE__ */ new Set(), K.set(j, B)), B.add($), () => {
26666
- B.delete($), B.size === 0 && (K.delete(j), K.size === 0 && A.delete(I));
26660
+ const Y = z(!1), re = z(!g.initialState);
26661
+ pe(V, (I) => {
26662
+ I || (re.value = !1);
26663
+ });
26664
+ const fe = Te(Pe.default());
26665
+ function ke(I, j, P) {
26666
+ let U = A.get(I);
26667
+ U || (U = /* @__PURE__ */ new Map(), A.set(I, U));
26668
+ let B = U.get(j);
26669
+ return B || (B = /* @__PURE__ */ new Set(), U.set(j, B)), B.add(P), () => {
26670
+ B.delete(P), B.size === 0 && (U.delete(j), U.size === 0 && A.delete(I));
26667
26671
  };
26668
26672
  }
26669
- function Be(I, j, $, K = !1) {
26673
+ function Be(I, j, P, U = !1) {
26670
26674
  const B = A.get(j);
26671
26675
  if (!B) return;
26672
- const P = B.get($.name);
26673
- if (!P || P.size === 0) return;
26676
+ const L = B.get(P.name);
26677
+ if (!L || L.size === 0) return;
26674
26678
  let te = null;
26675
- K || (te = $.snapshot(I, j));
26676
- for (const he of P)
26679
+ U || (te = P.snapshot(I, j));
26680
+ for (const he of L)
26677
26681
  he(te);
26678
26682
  }
26679
26683
  function qe(I, j) {
26680
- let $ = D.get(I);
26681
- return $ || ($ = /* @__PURE__ */ new Set(), D.set(I, $)), $.add(j), () => {
26682
- $.delete(j), $.size === 0 && D.delete(I);
26684
+ let P = D.get(I);
26685
+ return P || (P = /* @__PURE__ */ new Set(), D.set(I, P)), P.add(j), () => {
26686
+ P.delete(j), P.size === 0 && D.delete(I);
26683
26687
  };
26684
26688
  }
26685
26689
  function kt(I, j) {
26686
- const $ = D.get(j.name);
26687
- if (!$ || $.size === 0) return;
26688
- const K = j.snapshot(I);
26689
- for (const B of $)
26690
- B(K);
26690
+ const P = D.get(j.name);
26691
+ if (!P || P.size === 0) return;
26692
+ const U = j.snapshot(I);
26693
+ for (const B of P)
26694
+ B(U);
26691
26695
  }
26692
26696
  function Dt(I) {
26693
26697
  return R.add(I), () => {
@@ -26703,7 +26707,7 @@ const vA = /* @__PURE__ */ q({
26703
26707
  const oo = {
26704
26708
  hasEntity: (I) => x.has(I),
26705
26709
  getEditor: () => k.value,
26706
- getAssetManager: () => Je,
26710
+ getAssetManager: () => Ge,
26707
26711
  getSessionId: Sn,
26708
26712
  getUserBySessionId: yr,
26709
26713
  subscribeComponent: ke,
@@ -26724,16 +26728,16 @@ const vA = /* @__PURE__ */ q({
26724
26728
  var j;
26725
26729
  (j = k.value) == null || j.nextTick(I);
26726
26730
  });
26727
- let Vt = 0, Wt = null, nt = null;
26731
+ let Vt = 0, Wt = null, Je = null;
26728
26732
  const A0 = ((qu = (Ku = g.store) == null ? void 0 : Ku.persistence) == null ? void 0 : qu.documentId) ?? "default";
26729
- let Je = new zE({
26733
+ let Ge = new zE({
26730
26734
  provider: g.assetProvider ?? new VE(),
26731
26735
  documentId: A0
26732
26736
  });
26733
26737
  function I0(I) {
26734
- var K;
26735
- const j = [], $ = g.pluginOptions;
26736
- return ($ == null ? void 0 : $.controls) !== !1 && j.push(wy(($ == null ? void 0 : $.controls) ?? {})), ($ == null ? void 0 : $.eraser) !== !1 && j.push(my(($ == null ? void 0 : $.eraser) || void 0)), ($ == null ? void 0 : $.pen) !== !1 && j.push(gy()), ($ == null ? void 0 : $.arrows) !== !1 && j.push(F0(($ == null ? void 0 : $.arrows) || void 0)), ($ == null ? void 0 : $.tapes) !== !1 && j.push(ky()), j.push(
26738
+ var U;
26739
+ const j = [], P = g.pluginOptions;
26740
+ return (P == null ? void 0 : P.controls) !== !1 && j.push(wy((P == null ? void 0 : P.controls) ?? {})), (P == null ? void 0 : P.eraser) !== !1 && j.push(my((P == null ? void 0 : P.eraser) || void 0)), (P == null ? void 0 : P.pen) !== !1 && j.push(gy()), (P == null ? void 0 : P.arrows) !== !1 && j.push(F0((P == null ? void 0 : P.arrows) || void 0)), (P == null ? void 0 : P.tapes) !== !1 && j.push(ky()), j.push(
26737
26741
  yA({
26738
26742
  store: I,
26739
26743
  doubleClickSnapshot: g.doubleClickSnapshot,
@@ -26741,7 +26745,7 @@ const vA = /* @__PURE__ */ q({
26741
26745
  // apply them in ECS (e.g. inherit the last-used font when a snapshot omits it).
26742
26746
  getDefaults: (B) => oo.getDefaults(B)
26743
26747
  })
26744
- ), (K = g.editor) != null && K.plugins && j.push(...g.editor.plugins), j;
26748
+ ), (U = g.editor) != null && U.plugins && j.push(...g.editor.plugins), j;
26745
26749
  }
26746
26750
  function O0() {
26747
26751
  const I = g.store ?? {}, j = {
@@ -26750,47 +26754,51 @@ const vA = /* @__PURE__ */ q({
26750
26754
  };
26751
26755
  return I.websocket && (j.websocket = {
26752
26756
  ...I.websocket,
26753
- onVersionMismatch: ($) => {
26754
- var K, B;
26755
- Y.value = !0, (B = (K = I.websocket) == null ? void 0 : K.onVersionMismatch) == null || B.call(K, $);
26757
+ onVersionMismatch: (P) => {
26758
+ var U, B;
26759
+ Y.value = !0, (B = (U = I.websocket) == null ? void 0 : U.onVersionMismatch) == null || B.call(U, P);
26760
+ },
26761
+ onConnectivityChange: (P) => {
26762
+ var U, B;
26763
+ ee.value = P, X(), (B = (U = I.websocket) == null ? void 0 : U.onConnectivityChange) == null || B.call(U, P);
26756
26764
  },
26757
- onConnectivityChange: ($) => {
26758
- var K, B;
26759
- ee.value = $, X(), (B = (K = I.websocket) == null ? void 0 : K.onConnectivityChange) == null || B.call(K, $);
26765
+ onSync: () => {
26766
+ var P, U;
26767
+ re.value = !1, (U = (P = I.websocket) == null ? void 0 : P.onSync) == null || U.call(P);
26760
26768
  }
26761
26769
  }), j;
26762
26770
  }
26763
26771
  async function Vu(I, j) {
26764
- const $ = O0();
26765
- I || (delete $.persistence, delete $.websocket), j && ($.initialState = j), nt = new z0($);
26766
- const K = {
26772
+ const P = O0();
26773
+ I || (delete P.persistence, delete P.websocket), j && (P.initialState = j), Je = new z0(P);
26774
+ const U = {
26767
26775
  ...g.editor,
26768
26776
  user: C,
26769
- plugins: I0(nt),
26777
+ plugins: I0(Je),
26770
26778
  controls: g.controls
26771
- }, B = new uy(I, K);
26772
- return await B.initialize(), await nt.initialize({
26779
+ }, B = new uy(I, U);
26780
+ return await B.initialize(), await Je.initialize({
26773
26781
  components: B.components,
26774
26782
  singletons: B.singletons
26775
26783
  }), B;
26776
26784
  }
26777
26785
  async function ks(I) {
26778
26786
  I.nextTick((j) => {
26779
- nt && nt.sync(j), D0(j), N0(j);
26780
- for (const $ of R)
26781
- $(j);
26787
+ Je && Je.sync(j), D0(j), N0(j);
26788
+ for (const P of R)
26789
+ P(j);
26782
26790
  }), await I.tick();
26783
26791
  }
26784
26792
  async function _l() {
26785
- !k.value || !nt || (await ks(k.value), g.autoRender !== !1 ? Wt = requestAnimationFrame(_l) : Wt = null);
26793
+ !k.value || !Je || (await ks(k.value), g.autoRender !== !1 ? Wt = requestAnimationFrame(_l) : Wt = null);
26786
26794
  }
26787
26795
  async function _0() {
26788
- !k.value || !nt || await ks(k.value);
26796
+ !k.value || !Je || await ks(k.value);
26789
26797
  }
26790
- if (e({ render: _0 }), me(
26798
+ if (e({ render: _0 }), pe(
26791
26799
  () => g.autoRender,
26792
26800
  (I) => {
26793
- I === !1 ? Wt !== null && (cancelAnimationFrame(Wt), Wt = null) : Wt === null && k.value && nt && (Wt = requestAnimationFrame(_l));
26801
+ I === !1 ? Wt !== null && (cancelAnimationFrame(Wt), Wt = null) : Wt === null && k.value && Je && (Wt = requestAnimationFrame(_l));
26794
26802
  }
26795
26803
  ), qe(Pe.name, (I) => {
26796
26804
  I && (fe.value = I);
@@ -26804,39 +26812,39 @@ const vA = /* @__PURE__ */ q({
26804
26812
  };
26805
26813
  let Dl = null;
26806
26814
  wt(async () => {
26807
- var $, K, B;
26815
+ var P, U, B;
26808
26816
  if (!v.value) return;
26809
26817
  X(), window.addEventListener("online", bs), window.addEventListener("offline", bs), Wu = () => {
26810
- var P;
26811
- (P = v.value) == null || P.scrollTo(0, 0);
26812
- }, v.value.addEventListener("scroll", Wu), k.value && (k.value.dispose(), nt == null || nt.close(), nt = null, Vt = 0);
26818
+ var L;
26819
+ (L = v.value) == null || L.scrollTo(0, 0);
26820
+ }, v.value.addEventListener("scroll", Wu), k.value && (k.value.dispose(), Je == null || Je.close(), Je = null, Vt = 0);
26813
26821
  const I = await Vu(v.value, g.initialState);
26814
- if (k.value = I, re.value = !1, await (Je == null ? void 0 : Je.init()), Je) {
26815
- const P = (te, he) => {
26822
+ if (k.value = I, Je.isSynced && (re.value = !1), await (Ge == null ? void 0 : Ge.init()), Ge) {
26823
+ const L = (te, he) => {
26816
26824
  I.nextTick((ge) => {
26817
26825
  for (const jt of l.current(ge))
26818
26826
  gn.read(ge, jt).identifier === te && gn.patch(ge, jt, { uploadState: he });
26819
26827
  });
26820
26828
  };
26821
- Je.onUploadStart((te) => P(te, Wn.Uploading)), Je.onUploadComplete((te) => P(te, Wn.Complete)), Je.onUploadError((te) => P(te, Wn.Failed));
26829
+ Ge.onUploadStart((te) => L(te, Wn.Uploading)), Ge.onUploadComplete((te) => L(te, Wn.Complete)), Ge.onUploadError((te) => L(te, Wn.Failed));
26822
26830
  }
26823
- await (Je == null ? void 0 : Je.resumePendingUploads()), me(V, (P, te) => {
26824
- P && !te && (Je == null || Je.resumePendingUploads().catch((he) => console.error("Failed to resume uploads:", he)));
26831
+ await (Ge == null ? void 0 : Ge.resumePendingUploads()), pe(V, (L, te) => {
26832
+ L && !te && (Ge == null || Ge.resumePendingUploads().catch((he) => console.error("Failed to resume uploads:", he)));
26825
26833
  }), Dl = setTimeout(() => {
26826
26834
  J.value = !0, X();
26827
26835
  }, 3e3), g.autoRender !== !1 && (Wt = requestAnimationFrame(_l));
26828
- const j = (B = (K = ($ = k.value) == null ? void 0 : $.fonts) == null ? void 0 : K[0]) == null ? void 0 : B.name;
26829
- j && oo.setDefaults("text", { fontFamily: j }), w("ready", k.value, nt);
26836
+ const j = (B = (U = (P = k.value) == null ? void 0 : P.fonts) == null ? void 0 : U[0]) == null ? void 0 : B.name;
26837
+ j && oo.setDefaults("text", { fontFamily: j }), w("ready", k.value, Je);
26830
26838
  }), $e(() => {
26831
26839
  var I;
26832
- Wt !== null && cancelAnimationFrame(Wt), Dl !== null && clearTimeout(Dl), window.removeEventListener("online", bs), window.removeEventListener("offline", bs), Je == null || Je.close(), nt == null || nt.close(), (I = k.value) == null || I.dispose();
26840
+ Wt !== null && cancelAnimationFrame(Wt), Dl !== null && clearTimeout(Dl), window.removeEventListener("online", bs), window.removeEventListener("offline", bs), Ge == null || Ge.close(), Je == null || Je.close(), (I = k.value) == null || I.dispose();
26833
26841
  });
26834
26842
  function D0(I) {
26835
- const { events: j, newIndex: $ } = I.eventBuffer.readEvents(Vt);
26836
- if (Vt = $, j.length === 0) return;
26837
- const { componentsById: K, singletonsById: B } = ar(I);
26838
- for (const { entityId: P, eventType: te, componentId: he } of j) {
26839
- if (P === dy) {
26843
+ const { events: j, newIndex: P } = I.eventBuffer.readEvents(Vt);
26844
+ if (Vt = P, j.length === 0) return;
26845
+ const { componentsById: U, singletonsById: B } = ar(I);
26846
+ for (const { entityId: L, eventType: te, componentId: he } of j) {
26847
+ if (L === dy) {
26840
26848
  if (te === Lo.CHANGED) {
26841
26849
  const ge = B.get(he);
26842
26850
  ge && kt(I, ge);
@@ -26844,32 +26852,32 @@ const vA = /* @__PURE__ */ q({
26844
26852
  continue;
26845
26853
  }
26846
26854
  if (te === Lo.ADDED)
26847
- x.add(P);
26855
+ x.add(L);
26848
26856
  else if (te === Lo.REMOVED)
26849
- x.delete(P), A.delete(P);
26857
+ x.delete(L), A.delete(L);
26850
26858
  else if (te === Lo.COMPONENT_ADDED) {
26851
- x.add(P);
26852
- const ge = K.get(he);
26853
- ge && Be(I, P, ge);
26859
+ x.add(L);
26860
+ const ge = U.get(he);
26861
+ ge && Be(I, L, ge);
26854
26862
  } else if (te === Lo.COMPONENT_REMOVED) {
26855
- const ge = K.get(he);
26856
- ge && Be(I, P, ge, !0);
26863
+ const ge = U.get(he);
26864
+ ge && Be(I, L, ge, !0);
26857
26865
  } else if (te === Lo.CHANGED) {
26858
- const ge = K.get(he);
26859
- ge && Be(I, P, ge);
26866
+ const ge = U.get(he);
26867
+ ge && Be(I, L, ge);
26860
26868
  }
26861
26869
  }
26862
26870
  }
26863
26871
  function N0(I) {
26864
- var K;
26872
+ var U;
26865
26873
  let j = !1;
26866
26874
  for (const B of i.added(I)) {
26867
- const P = ie.snapshot(I, B), te = (K = k.value) == null ? void 0 : K.blockDefs[P.tag], he = (te == null ? void 0 : te.stratum) ?? "content";
26875
+ const L = ie.snapshot(I, B), te = (U = k.value) == null ? void 0 : U.blockDefs[L.tag], he = (te == null ? void 0 : te.stratum) ?? "content";
26868
26876
  N.set(
26869
26877
  B,
26870
26878
  z({
26871
26879
  entityId: B,
26872
- block: P,
26880
+ block: L,
26873
26881
  stratum: he,
26874
26882
  selected: !1,
26875
26883
  held: null,
@@ -26883,73 +26891,73 @@ const vA = /* @__PURE__ */ q({
26883
26891
  for (const B of i.removed(I))
26884
26892
  N.delete(B), j = !0;
26885
26893
  for (const B of i.changed(I)) {
26886
- const P = N.get(B);
26887
- if (P) {
26894
+ const L = N.get(B);
26895
+ if (L) {
26888
26896
  const te = ie.snapshot(I, B);
26889
- (P.value.block.rank !== te.rank || P.value.block.parentId !== te.parentId || P.value.block.layerId !== te.layerId) && (j = !0), P.value.block = te;
26897
+ (L.value.block.rank !== te.rank || L.value.block.parentId !== te.parentId || L.value.block.layerId !== te.layerId) && (j = !0), L.value.block = te;
26890
26898
  }
26891
26899
  }
26892
26900
  (m.addedOrChanged(I).length > 0 || m.removed(I).length > 0) && (j = !0);
26893
- let $ = !1;
26901
+ let P = !1;
26894
26902
  for (const B of p.addedOrChanged(I)) {
26895
- const P = Ll.snapshot(I, B);
26896
- M.set(P.sessionId, P), $ = !0;
26903
+ const L = Ll.snapshot(I, B);
26904
+ M.set(L.sessionId, L), P = !0;
26897
26905
  }
26898
26906
  for (const B of p.removed(I)) {
26899
- const P = Ll.read(I, B);
26900
- M.delete(P.sessionId), $ = !0;
26907
+ const L = Ll.read(I, B);
26908
+ M.delete(L.sessionId), P = !0;
26901
26909
  }
26902
- $ && (E.value = Array.from(M.values()));
26910
+ P && (E.value = Array.from(M.values()));
26903
26911
  for (const B of c.added(I)) {
26904
- const P = N.get(B);
26905
- P && !P.value.selected && (P.value.selected = !0);
26912
+ const L = N.get(B);
26913
+ L && !L.value.selected && (L.value.selected = !0);
26906
26914
  }
26907
26915
  for (const B of c.removed(I)) {
26908
- const P = N.get(B);
26909
- P != null && P.value.selected && (P.value.selected = !1);
26916
+ const L = N.get(B);
26917
+ L != null && L.value.selected && (L.value.selected = !1);
26910
26918
  }
26911
26919
  for (const B of u.addedOrChanged(I)) {
26912
- const P = N.get(B);
26913
- P && (P.value.held = Aa.snapshot(I, B));
26920
+ const L = N.get(B);
26921
+ L && (L.value.held = Aa.snapshot(I, B));
26914
26922
  }
26915
26923
  for (const B of u.removed(I)) {
26916
- const P = N.get(B);
26917
- P && P.value.held !== null && (P.value.held = null);
26924
+ const L = N.get(B);
26925
+ L && L.value.held !== null && (L.value.held = null);
26918
26926
  }
26919
26927
  for (const B of d.added(I)) {
26920
- const P = N.get(B);
26921
- P && !P.value.hovered && (P.value.hovered = !0);
26928
+ const L = N.get(B);
26929
+ L && !L.value.hovered && (L.value.hovered = !0);
26922
26930
  }
26923
26931
  for (const B of d.removed(I)) {
26924
- const P = N.get(B);
26925
- P != null && P.value.hovered && (P.value.hovered = !1);
26932
+ const L = N.get(B);
26933
+ L != null && L.value.hovered && (L.value.hovered = !1);
26926
26934
  }
26927
26935
  for (const B of f.added(I)) {
26928
- const P = N.get(B);
26929
- P && !P.value.edited && (P.value.edited = !0);
26936
+ const L = N.get(B);
26937
+ L && !L.value.edited && (L.value.edited = !0);
26930
26938
  }
26931
26939
  for (const B of f.removed(I)) {
26932
- const P = N.get(B);
26933
- P != null && P.value.edited && (P.value.edited = !1);
26940
+ const L = N.get(B);
26941
+ L != null && L.value.edited && (L.value.edited = !1);
26934
26942
  }
26935
26943
  for (const B of h.addedOrChanged(I)) {
26936
- const P = N.get(B);
26937
- P && (P.value.opacity = nd.snapshot(I, B));
26944
+ const L = N.get(B);
26945
+ L && (L.value.opacity = nd.snapshot(I, B));
26938
26946
  }
26939
26947
  for (const B of h.removed(I)) {
26940
- const P = N.get(B);
26941
- P && P.value.opacity !== null && (P.value.opacity = null);
26948
+ const L = N.get(B);
26949
+ L && L.value.opacity !== null && (L.value.opacity = null);
26942
26950
  }
26943
26951
  for (const B of a.addedOrChanged(I)) {
26944
- const P = N.get(B);
26945
- P && (P.value.connector = td.snapshot(I, B));
26952
+ const L = N.get(B);
26953
+ L && (L.value.connector = td.snapshot(I, B));
26946
26954
  }
26947
26955
  for (const B of a.removed(I)) {
26948
- const P = N.get(B);
26949
- P && P.value.connector !== null && (P.value.connector = null);
26956
+ const L = N.get(B);
26957
+ L && L.value.connector !== null && (L.value.connector = null);
26950
26958
  }
26951
26959
  if (j) {
26952
- const B = Array.from(N.values()), P = (te) => {
26960
+ const B = Array.from(N.values()), L = (te) => {
26953
26961
  const he = N.get(te);
26954
26962
  if (!he) return null;
26955
26963
  const ge = he.value;
@@ -26967,71 +26975,71 @@ const vA = /* @__PURE__ */ q({
26967
26975
  parentId: he.value.block.parentId,
26968
26976
  layerRank: od(I, he.value.entityId)
26969
26977
  };
26970
- return fy(P, ge, jt);
26978
+ return fy(L, ge, jt);
26971
26979
  }), W.value = B;
26972
26980
  }
26973
26981
  }
26974
26982
  function R0(I) {
26975
- const j = I.rotateZ !== 0, $ = I.flip[0], K = I.flip[1];
26976
- if (!j && !$ && !K)
26983
+ const j = I.rotateZ !== 0, P = I.flip[0], U = I.flip[1];
26984
+ if (!j && !P && !U)
26977
26985
  return;
26978
26986
  const B = [];
26979
- return j && B.push(`rotate(${I.rotateZ}rad)`), $ && B.push("scaleX(-1)"), K && B.push("scaleY(-1)"), B.join(" ");
26987
+ return j && B.push(`rotate(${I.rotateZ}rad)`), P && B.push("scaleX(-1)"), U && B.push("scaleY(-1)"), B.join(" ");
26980
26988
  }
26981
26989
  function ju(I) {
26982
26990
  const { held: j } = I;
26983
26991
  if (!j || !j.sessionId || j.sessionId === C.sessionId) return null;
26984
- const $ = yr(j.sessionId);
26985
- return ($ == null ? void 0 : $.color) ?? null;
26992
+ const P = yr(j.sessionId);
26993
+ return (P == null ? void 0 : P.color) ?? null;
26986
26994
  }
26987
- function xs(I, j, $, K) {
26988
- const B = I - K[0], P = j - K[1];
26989
- if ($.rotateZ === 0) return [B, P];
26990
- const te = $.size[0] / 2, he = $.size[1] / 2, ge = B - te, jt = P - he, vr = Math.cos(-$.rotateZ), wr = Math.sin(-$.rotateZ);
26995
+ function xs(I, j, P, U) {
26996
+ const B = I - U[0], L = j - U[1];
26997
+ if (P.rotateZ === 0) return [B, L];
26998
+ const te = P.size[0] / 2, he = P.size[1] / 2, ge = B - te, jt = L - he, vr = Math.cos(-P.rotateZ), wr = Math.sin(-P.rotateZ);
26991
26999
  return [ge * vr - jt * wr + te, ge * wr + jt * vr + he];
26992
27000
  }
26993
27001
  function Nl(I) {
26994
- let j = I.block.position[0], $ = I.block.position[1], K = I.block.parentId;
27002
+ let j = I.block.position[0], P = I.block.position[1], U = I.block.parentId;
26995
27003
  const B = /* @__PURE__ */ new Set();
26996
- for (; K !== null && !B.has(K); ) {
26997
- B.add(K);
26998
- const P = N.get(K);
26999
- if (!P) break;
27000
- j += P.value.block.position[0], $ += P.value.block.position[1], K = P.value.block.parentId;
27004
+ for (; U !== null && !B.has(U); ) {
27005
+ B.add(U);
27006
+ const L = N.get(U);
27007
+ if (!L) break;
27008
+ j += L.value.block.position[0], P += L.value.block.position[1], U = L.value.block.parentId;
27001
27009
  }
27002
- return [j, $];
27010
+ return [j, P];
27003
27011
  }
27004
27012
  function P0(I) {
27005
- var $, K;
27006
- const j = ($ = k.value) == null ? void 0 : $.blockDefs[I];
27007
- return ((K = j == null ? void 0 : j.components) == null ? void 0 : K.some((B) => B === js)) ?? !1;
27013
+ var P, U;
27014
+ const j = (P = k.value) == null ? void 0 : P.blockDefs[I];
27015
+ return ((U = j == null ? void 0 : j.components) == null ? void 0 : U.some((B) => B === js)) ?? !1;
27008
27016
  }
27009
27017
  function L0(I) {
27010
- let j = -1 / 0, $ = -1 / 0, K = 1 / 0, B = 1 / 0, P = I.block.parentId;
27011
- for (; P !== null; ) {
27012
- const te = N.get(P);
27018
+ let j = -1 / 0, P = -1 / 0, U = 1 / 0, B = 1 / 0, L = I.block.parentId;
27019
+ for (; L !== null; ) {
27020
+ const te = N.get(L);
27013
27021
  if (!te) break;
27014
27022
  if (P0(te.value.block.tag)) {
27015
27023
  const he = te.value.block, ge = Nl(te.value);
27016
- j = Math.max(j, ge[0]), $ = Math.max($, ge[1]), K = Math.min(K, ge[0] + he.size[0]), B = Math.min(B, ge[1] + he.size[1]);
27024
+ j = Math.max(j, ge[0]), P = Math.max(P, ge[1]), U = Math.min(U, ge[0] + he.size[0]), B = Math.min(B, ge[1] + he.size[1]);
27017
27025
  }
27018
- P = te.value.block.parentId;
27026
+ L = te.value.block.parentId;
27019
27027
  }
27020
- return j === -1 / 0 ? null : [j, $, K, B];
27028
+ return j === -1 / 0 ? null : [j, P, U, B];
27021
27029
  }
27022
27030
  function $0(I) {
27023
27031
  const j = L0(I);
27024
27032
  if (!j) return;
27025
- const [$, K, B, P] = j, te = I.block, he = Nl(I);
27033
+ const [P, U, B, L] = j, te = I.block, he = Nl(I);
27026
27034
  if (te.rotateZ === 0) {
27027
- const Ju = K - he[1], Gu = $ - he[0], Yu = he[1] + te.size[1] - P, Xu = he[0] + te.size[0] - B;
27035
+ const Ju = U - he[1], Gu = P - he[0], Yu = he[1] + te.size[1] - L, Xu = he[0] + te.size[0] - B;
27028
27036
  return Ju <= 0 && Gu <= 0 && Yu <= 0 && Xu <= 0 ? void 0 : `inset(${Ju}px ${Xu}px ${Yu}px ${Gu}px)`;
27029
27037
  }
27030
- const ge = xs($, K, te, he), jt = xs(B, K, te, he), vr = xs(B, P, te, he), wr = xs($, P, te, he);
27038
+ const ge = xs(P, U, te, he), jt = xs(B, U, te, he), vr = xs(B, L, te, he), wr = xs(P, L, te, he);
27031
27039
  return `polygon(${ge[0]}px ${ge[1]}px, ${jt[0]}px ${jt[1]}px, ${vr[0]}px ${vr[1]}px, ${wr[0]}px ${wr[1]}px)`;
27032
27040
  }
27033
27041
  function B0(I) {
27034
- const { block: j, opacity: $ } = I, K = ju(I), B = $ !== null ? $.value / 255 : 1, P = I.edited ? void 0 : $0(I), te = Nl(I);
27042
+ const { block: j, opacity: P } = I, U = ju(I), B = P !== null ? P.value / 255 : 1, L = I.edited ? void 0 : $0(I), te = Nl(I);
27035
27043
  return {
27036
27044
  position: "absolute",
27037
27045
  left: `${te[0]}px`,
@@ -27042,10 +27050,10 @@ const vA = /* @__PURE__ */ q({
27042
27050
  opacity: B,
27043
27051
  pointerEvents: "none",
27044
27052
  userSelect: "none",
27045
- "--wov-held-by-color": K ?? void 0,
27053
+ "--wov-held-by-color": U ?? void 0,
27046
27054
  // Delay fade-in (0→1) to allow dimensions to settle, but hide immediately (1→0)
27047
27055
  transition: B === 1 ? "opacity 0ms 32ms" : void 0,
27048
- clipPath: P
27056
+ clipPath: L
27049
27057
  };
27050
27058
  }
27051
27059
  return (I, j) => (T(), O("div", {
@@ -27064,13 +27072,13 @@ const vA = /* @__PURE__ */ q({
27064
27072
  background: n.background
27065
27073
  }, () => [
27066
27074
  Z(MM, { background: n.background }, null, 8, ["background"])
27067
- ]) : U("", !0),
27068
- (T(), O(ue, null, Me(b, ($) => (T(), O(ue, {
27069
- key: $.class
27075
+ ]) : K("", !0),
27076
+ (T(), O(ue, null, Me(b, (P) => (T(), O(ue, {
27077
+ key: P.class
27070
27078
  }, [
27071
- $.stratum === "content" ? ye(I.$slots, "render-layer", { key: 0 }) : U("", !0),
27079
+ P.stratum === "content" ? ye(I.$slots, "render-layer", { key: 0 }) : K("", !0),
27072
27080
  S("div", {
27073
- class: Ee($.class),
27081
+ class: Ee(P.class),
27074
27082
  style: ve({
27075
27083
  position: "absolute",
27076
27084
  transformOrigin: "0 0",
@@ -27078,26 +27086,26 @@ const vA = /* @__PURE__ */ q({
27078
27086
  "--wov-zoom": fe.value.zoom
27079
27087
  })
27080
27088
  }, [
27081
- (T(!0), O(ue, null, Me(W.value, (K) => (T(), O(ue, {
27082
- key: K.value.entityId
27089
+ (T(!0), O(ue, null, Me(W.value, (U) => (T(), O(ue, {
27090
+ key: U.value.entityId
27083
27091
  }, [
27084
- K.value.stratum === $.stratum && !y.value.has(K.value.block.tag) ? (T(), O("div", {
27092
+ U.value.stratum === P.stratum && !y.value.has(U.value.block.tag) ? (T(), O("div", {
27085
27093
  key: 0,
27086
- "data-entity-id": K.value.entityId,
27087
- style: ve(B0(K.value)),
27088
- "data-selected": K.value.selected || void 0,
27089
- "data-held-by-other": ju(K.value) !== null || void 0,
27090
- "data-hovered": K.value.hovered || void 0,
27091
- "data-edited": K.value.edited || void 0,
27094
+ "data-entity-id": U.value.entityId,
27095
+ style: ve(B0(U.value)),
27096
+ "data-selected": U.value.selected || void 0,
27097
+ "data-held-by-other": ju(U.value) !== null || void 0,
27098
+ "data-hovered": U.value.hovered || void 0,
27099
+ "data-edited": U.value.edited || void 0,
27092
27100
  class: "wov-block"
27093
27101
  }, [
27094
- ye(I.$slots, `block:${K.value.block.tag}`, Yo({ ref_for: !0 }, K.value), () => [
27095
- s[K.value.block.tag] ? (T(), ne(ba(s[K.value.block.tag]), Yo({
27102
+ ye(I.$slots, `block:${U.value.block.tag}`, Yo({ ref_for: !0 }, U.value), () => [
27103
+ s[U.value.block.tag] ? (T(), ne(ba(s[U.value.block.tag]), Yo({
27096
27104
  key: 0,
27097
27105
  ref_for: !0
27098
- }, K.value), null, 16)) : U("", !0)
27106
+ }, U.value), null, 16)) : K("", !0)
27099
27107
  ])
27100
- ], 12, IA)) : U("", !0)
27108
+ ], 12, IA)) : K("", !0)
27101
27109
  ], 64))), 128))
27102
27110
  ], 6)
27103
27111
  ], 64))), 64)),
@@ -27112,23 +27120,23 @@ const vA = /* @__PURE__ */ q({
27112
27120
  "current-session-id": H(C).sessionId,
27113
27121
  camera: fe.value
27114
27122
  }, null, 8, ["users", "current-session-id", "camera"])
27115
- ]) : U("", !0),
27123
+ ]) : K("", !0),
27116
27124
  k.value ? (T(), ne(_M, { key: 2 }, {
27117
- default: se(($) => [
27118
- ye(I.$slots, "floating-menu", jh(Uh($)))
27125
+ default: se((P) => [
27126
+ ye(I.$slots, "floating-menu", jh(Uh(P)))
27119
27127
  ]),
27120
27128
  _: 3
27121
- })) : U("", !0),
27129
+ })) : K("", !0),
27122
27130
  k.value ? ye(I.$slots, "user-presence", {
27123
27131
  key: 3,
27124
27132
  users: E.value
27125
27133
  }, () => [
27126
27134
  Z(TE, { users: E.value }, null, 8, ["users"])
27127
- ]) : U("", !0),
27135
+ ]) : K("", !0),
27128
27136
  k.value ? ye(I.$slots, "toolbar", { key: 4 }, () => [
27129
27137
  Z(vE)
27130
- ]) : U("", !0),
27131
- k.value ? ye(I.$slots, "default", { key: 5 }) : U("", !0),
27138
+ ]) : K("", !0),
27139
+ k.value ? ye(I.$slots, "default", { key: 5 }) : K("", !0),
27132
27140
  ye(I.$slots, "offline-indicator", { isOnline: V.value }, () => [
27133
27141
  Z(TA, { "is-online": V.value }, null, 8, ["is-online"])
27134
27142
  ]),
@@ -27143,11 +27151,11 @@ const vA = /* @__PURE__ */ q({
27143
27151
  ]),
27144
27152
  k.value ? ye(I.$slots, "file-drop-zone", { key: 6 }, () => [
27145
27153
  Z(EM)
27146
- ]) : U("", !0),
27154
+ ]) : K("", !0),
27147
27155
  k.value ? (T(), ne(vA, {
27148
27156
  key: 7,
27149
27157
  options: g.copyPaste
27150
- }, null, 8, ["options"])) : U("", !0),
27158
+ }, null, 8, ["options"])) : K("", !0),
27151
27159
  Z(aT)
27152
27160
  ], 512));
27153
27161
  }