@woven-canvas/vue 1.5.0 → 1.6.1

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 zh, defineCanvasSingleton as Fh, CanvasStore as H0 } from "@woven-ecs/canvas-store";
2
- import { CanvasComponentDef as oI, CanvasSingletonDef as rI, CanvasStore as sI, Synced as iI, defineCanvasComponent as lI, defineCanvasSingleton as aI } from "@woven-ecs/canvas-store";
2
+ import { CanvasComponentDef as iI, CanvasSingletonDef as lI, CanvasStore as aI, Synced as cI, defineCanvasComponent as uI, defineCanvasSingleton as dI } from "@woven-ecs/canvas-store";
3
3
  import { ArrowHeadKind as Qe, ArcArrow as fn, ElbowArrow as hn, createArrowsPlugin as V0 } from "@woven-canvas/plugin-arrows";
4
- import { inject as ge, shallowRef as Ae, onUnmounted as $e, defineComponent as q, computed as O, openBlock as C, createElementBlock as A, unref as F, Fragment as ie, createElementVNode as x, createCommentVNode as j, ref as B, onMounted as wt, createBlock as ee, renderList as Se, toDisplayString as _e, normalizeStyle as ve, watch as pe, normalizeClass as Te, withAsyncContext as Dr, h as Xi, getCurrentInstance as Cc, watchEffect as Ws, nextTick as Gn, onBeforeUnmount as W0, markRaw as j0, customRef as U0, toValue as st, reactive as Hh, readonly as Rl, createVNode as Z, mergeProps as Xo, getCurrentScope as Vh, onScopeDispose as Wh, shallowReadonly as Lo, provide as ho, withModifiers as At, renderSlot as me, Teleport as ps, withCtx as se, Transition as Mc, withDirectives as jh, withKeys as td, vModelText as Uh, useSlots as Kh, resolveDynamicComponent as xa, createTextVNode as Sa, normalizeProps as qh, guardReactiveProps as Jh, Suspense as K0, createSlots as q0 } from "vue";
5
- import { hasComponent as Fe, Color as Zo, EmbedProvider as de, Embed as Ca, Block as le, Frame as js, FrameDropTarget as J0, UploadState as jn, Asset as gn, Image as Us, getBlockDef as Gh, Grid as bn, RankBounds as Yh, createEntity as Zi, addComponent as He, Synced as Tt, defineQuery as ct, Selected as Qi, Mouse as Ma, Camera as Pe, canBlockEdit as Tc, EditAfterPlacing as Ec, SelectBlock as G0, isAlive as Y0, cascadeDelete as X0, getResources as cr, deselectAll as Ta, selectBlock as Ea, findFrameAtPoint as Z0, AssignFrameChildren as Q0, Text as it, getDescendants as ey, Aabb as Uo, DeselectAll as Ac, Edited as Ic, Screen as eo, TransformBoxStateSingleton as Oc, TransformBoxState as ty, UpdateTransformBox as _c, SelectionStateSingleton as el, SelectionState as Jr, TransformHandle as nd, TransformHandleKind as ny, removeEntity as Aa, ResetKeyboard as oy, VerticalAlignment as Ze, StrokeKind as Mt, Shape as Gt, VerticalAlign as Ks, ResizeMode as Pl, DuplicateSelected as ry, BringForwardSelected as sy, SendBackwardSelected as iy, RemoveSelected as Xh, TextAlignment as un, getPluginResources as Io, Undo as Dc, Redo as qs, detectEmbedProvider as ly, validateEmbedUrl as ay, resolveEmbedUrl as cy, Controls as Bt, Cursor as Nc, field as pn, defineEditorState as uy, defineEditorSystem as tl, isReadonly as nl, getPointerInput as Rc, PointerButton as Zh, PlaceBlockEvent as Js, Held as Ia, on as od, Key as Ll, Connector as rd, Hovered as dy, Opacity as sd, User as $l, Layer as fy, UserData as hy, Editor as py, SINGLETON_ENTITY_ID as my, EventType as $o, resolveLayerRank as id, compareBlockOrder as gy } from "@woven-canvas/core";
4
+ import { inject as ge, shallowRef as Ae, onUnmounted as $e, defineComponent as q, computed as O, openBlock as C, createElementBlock as A, unref as F, Fragment as ie, createElementVNode as x, createCommentVNode as j, ref as B, onMounted as kt, createBlock as ee, renderList as Se, toDisplayString as _e, normalizeStyle as ve, watch as pe, normalizeClass as Te, withAsyncContext as Dr, h as Xi, getCurrentInstance as Cc, watchEffect as Ws, nextTick as Gn, onBeforeUnmount as W0, markRaw as j0, customRef as U0, toValue as st, reactive as Hh, readonly as Rl, createVNode as Z, mergeProps as Xo, getCurrentScope as Vh, onScopeDispose as Wh, shallowReadonly as Lo, provide as ho, withModifiers as ut, renderSlot as me, Teleport as ps, withCtx as se, Transition as Mc, withDirectives as jh, withKeys as td, vModelText as Uh, useSlots as Kh, resolveDynamicComponent as xa, createTextVNode as Sa, normalizeProps as qh, guardReactiveProps as Jh, Suspense as K0, createSlots as q0 } from "vue";
5
+ import { hasComponent as Fe, Color as Zo, EmbedProvider as de, Embed as Ca, Block as le, Frame as js, FrameDropTarget as J0, UploadState as jn, Asset as gn, Image as Us, getBlockDef as Gh, Grid as bn, RankBounds as Yh, createEntity as Zi, addComponent as He, Synced as Et, defineQuery as ct, Selected as Qi, Mouse as Ma, Camera as Pe, canBlockEdit as Tc, EditAfterPlacing as Ec, SelectBlock as G0, isAlive as Y0, cascadeDelete as X0, getResources as cr, deselectAll as Ta, selectBlock as Ea, findFrameAtPoint as Z0, AssignFrameChildren as Q0, Text as it, getDescendants as ey, Aabb as Uo, DeselectAll as Ac, Edited as Ic, Screen as eo, TransformBoxStateSingleton as Oc, TransformBoxState as ty, UpdateTransformBox as _c, SelectionStateSingleton as el, SelectionState as Jr, TransformHandle as nd, TransformHandleKind as ny, removeEntity as Aa, ResetKeyboard as oy, VerticalAlignment as Ze, StrokeKind as Tt, Shape as Gt, VerticalAlign as Ks, ResizeMode as Pl, DuplicateSelected as ry, BringForwardSelected as sy, SendBackwardSelected as iy, RemoveSelected as Xh, TextAlignment as un, getPluginResources as Io, Undo as Dc, Redo as qs, detectEmbedProvider as ly, validateEmbedUrl as ay, resolveEmbedUrl as cy, Controls as Bt, Cursor as Nc, field as pn, defineEditorState as uy, defineEditorSystem as tl, isReadonly as nl, getPointerInput as Rc, PointerButton as Zh, PlaceBlockEvent as Js, Held as Ia, on as od, Key as Ll, Connector as rd, Hovered as dy, Opacity as sd, User as $l, Layer as fy, UserData as hy, Editor as py, SINGLETON_ENTITY_ID as my, EventType as $o, resolveLayerRank as id, compareBlockOrder as gy } from "@woven-canvas/core";
6
6
  import { Arc as rn, Vec2 as In, Aabb as Ln, Rect as yy } from "@woven-canvas/math";
7
7
  import { EraserStroke as vy, POINTS_CAPACITY as ld, createEraserPlugin as wy } from "@woven-canvas/plugin-eraser";
8
8
  import { PenStrokeKind as Oa, PenStroke as _a, createPenPlugin as ky } from "@woven-canvas/plugin-pen";
@@ -171,7 +171,7 @@ const My = { key: 0 }, Ty = ["x1", "y1", "x2", "y2", "stroke", "stroke-width"],
171
171
  setup(n) {
172
172
  const e = n, t = B(null), o = B(0), r = B(0), s = De(e.entityId, Zo), i = De(e.entityId, fn);
173
173
  let l = null;
174
- wt(() => {
174
+ kt(() => {
175
175
  t.value && (l = new ResizeObserver(() => {
176
176
  t.value && (o.value = t.value.clientWidth, r.value = t.value.clientHeight);
177
177
  }), l.observe(t.value), o.value = t.value.clientWidth, r.value = t.value.clientHeight);
@@ -354,7 +354,7 @@ const qy = /* @__PURE__ */ Oo(jy, [["render", Ky]]), Jy = {
354
354
  setup(n) {
355
355
  const e = n, t = B(null), o = B(0), r = B(0), s = De(e.entityId, Zo), i = De(e.entityId, hn), l = O(() => e.hovered || e.selected);
356
356
  let a = null;
357
- wt(() => {
357
+ kt(() => {
358
358
  t.value && (a = new ResizeObserver(() => {
359
359
  t.value && (o.value = t.value.clientWidth, r.value = t.value.clientHeight);
360
360
  }), a.observe(t.value), o.value = t.value.clientWidth, r.value = t.value.clientHeight);
@@ -693,8 +693,8 @@ function yv(n, e = {}) {
693
693
  let { pressure: X } = n[J], { point: Y, vector: re, distance: fe, runningLength: ke } = n[J], Be = J === n.length - 1;
694
694
  if (!Be && p - ke < 3) continue;
695
695
  r ? (s && (X = np(v, fe, t)), b = dd(t, r, X, i)) : b = t / 2, M === void 0 && (M = b);
696
- let qe = ke < m ? d(ke / m) : 1, bt = p - ke < g ? h((p - ke) / g) : 1;
697
- b = Math.max(0.01, b * Math.min(qe, bt));
696
+ let qe = ke < m ? d(ke / m) : 1, xt = p - ke < g ? h((p - ke) / g) : 1;
697
+ b = Math.max(0.01, b * Math.min(qe, xt));
698
698
  let Dt = (Be ? n[J] : n[J + 1]).vector, Cn = Be ? 1 : hd(re, Dt), yr = hd(re, S) < 0 && !N, oo = Cn !== null && Cn < 0;
699
699
  if (yr || oo) {
700
700
  Fl(Ye, S), zl(Ye, Ye, b);
@@ -973,7 +973,7 @@ const Mv = { class: "wov-image-block" }, Tv = {
973
973
  w();
974
974
  },
975
975
  { immediate: !0 }
976
- ), wt(() => {
976
+ ), kt(() => {
977
977
  w();
978
978
  }), pe(
979
979
  () => [o.block.size[0], o.block.size[1]],
@@ -4005,15 +4005,15 @@ class Ba {
4005
4005
  return (this.delInfo & $s) > 0;
4006
4006
  }
4007
4007
  }
4008
- class gt {
4008
+ class yt {
4009
4009
  /**
4010
4010
  Create a position map. The modifications to the document are
4011
4011
  represented as an array of numbers, in which each group of three
4012
4012
  represents a modified chunk as `[start, oldSize, newSize]`.
4013
4013
  */
4014
4014
  constructor(e, t = !1) {
4015
- if (this.ranges = e, this.inverted = t, !e.length && gt.empty)
4016
- return gt.empty;
4015
+ if (this.ranges = e, this.inverted = t, !e.length && yt.empty)
4016
+ return yt.empty;
4017
4017
  }
4018
4018
  /**
4019
4019
  @internal
@@ -4084,7 +4084,7 @@ class gt {
4084
4084
  map positions in the post-step document to the pre-step document.
4085
4085
  */
4086
4086
  invert() {
4087
- return new gt(this.ranges, !this.inverted);
4087
+ return new yt(this.ranges, !this.inverted);
4088
4088
  }
4089
4089
  /**
4090
4090
  @internal
@@ -4098,10 +4098,10 @@ class gt {
4098
4098
  sub-document to a larger document, or vice-versa.
4099
4099
  */
4100
4100
  static offset(e) {
4101
- return e == 0 ? gt.empty : new gt(e < 0 ? [0, -e, 0] : [0, 0, e]);
4101
+ return e == 0 ? yt.empty : new yt(e < 0 ? [0, -e, 0] : [0, 0, e]);
4102
4102
  }
4103
4103
  }
4104
- gt.empty = new gt([]);
4104
+ yt.empty = new yt([]);
4105
4105
  class Qr {
4106
4106
  /**
4107
4107
  Create a new mapping with the given position maps.
@@ -4217,7 +4217,7 @@ class at {
4217
4217
  and the new document.
4218
4218
  */
4219
4219
  getMap() {
4220
- return gt.empty;
4220
+ return yt.empty;
4221
4221
  }
4222
4222
  /**
4223
4223
  Try to merge this step with another one, to be applied directly
@@ -4467,7 +4467,7 @@ class ze extends at {
4467
4467
  return this.structure && za(e, this.from, this.to) ? Le.fail("Structure replace would overwrite content") : Le.fromReplace(e, this.from, this.to, this.slice);
4468
4468
  }
4469
4469
  getMap() {
4470
- return new gt([this.from, this.to - this.from, this.slice.size]);
4470
+ return new yt([this.from, this.to - this.from, this.slice.size]);
4471
4471
  }
4472
4472
  invert(e) {
4473
4473
  return new ze(this.from, this.from + this.slice.size, e.slice(this.from, this.to));
@@ -4522,7 +4522,7 @@ class Ve extends at {
4522
4522
  return o ? Le.fromReplace(e, this.from, this.to, o) : Le.fail("Content does not fit in gap");
4523
4523
  }
4524
4524
  getMap() {
4525
- return new gt([
4525
+ return new yt([
4526
4526
  this.from,
4527
4527
  this.gapFrom - this.from,
4528
4528
  this.insert,
@@ -5165,7 +5165,7 @@ class Jo extends at {
5165
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
- return gt.empty;
5168
+ return yt.empty;
5169
5169
  }
5170
5170
  invert(e) {
5171
5171
  return new Jo(this.pos, this.attr, e.nodeAt(this.pos).attrs[this.attr]);
@@ -5200,7 +5200,7 @@ class es extends at {
5200
5200
  return Le.ok(o);
5201
5201
  }
5202
5202
  getMap() {
5203
- return gt.empty;
5203
+ return yt.empty;
5204
5204
  }
5205
5205
  invert(e) {
5206
5206
  return new es(this.attr, e.attrs[this.attr]);
@@ -5579,7 +5579,7 @@ class ue {
5579
5579
  negative, it will search backwards first.
5580
5580
  */
5581
5581
  static near(e, t = 1) {
5582
- return this.findFrom(e, t) || this.findFrom(e, -t) || new yt(e.node(0));
5582
+ return this.findFrom(e, t) || this.findFrom(e, -t) || new vt(e.node(0));
5583
5583
  }
5584
5584
  /**
5585
5585
  Find the cursor or leaf node selection closest to the start of
@@ -5588,14 +5588,14 @@ class ue {
5588
5588
  exists.
5589
5589
  */
5590
5590
  static atStart(e) {
5591
- return Ho(e, e, 0, 0, 1) || new yt(e);
5591
+ return Ho(e, e, 0, 0, 1) || new vt(e);
5592
5592
  }
5593
5593
  /**
5594
5594
  Find the cursor or leaf node selection closest to the end of the
5595
5595
  given document.
5596
5596
  */
5597
5597
  static atEnd(e) {
5598
- return Ho(e, e, e.content.size, e.childCount, -1) || new yt(e);
5598
+ return Ho(e, e, e.content.size, e.childCount, -1) || new vt(e);
5599
5599
  }
5600
5600
  /**
5601
5601
  Deserialize the JSON representation of a selection. Must be
@@ -5791,7 +5791,7 @@ class Fc {
5791
5791
  return o && oe.isSelectable(o) ? new oe(t) : ue.near(t);
5792
5792
  }
5793
5793
  }
5794
- class yt extends ue {
5794
+ class vt extends ue {
5795
5795
  /**
5796
5796
  Create an all-selection over the given document.
5797
5797
  */
@@ -5813,25 +5813,25 @@ class yt extends ue {
5813
5813
  @internal
5814
5814
  */
5815
5815
  static fromJSON(e) {
5816
- return new yt(e);
5816
+ return new vt(e);
5817
5817
  }
5818
5818
  map(e) {
5819
- return new yt(e);
5819
+ return new vt(e);
5820
5820
  }
5821
5821
  eq(e) {
5822
- return e instanceof yt;
5822
+ return e instanceof vt;
5823
5823
  }
5824
5824
  getBookmark() {
5825
5825
  return D1;
5826
5826
  }
5827
5827
  }
5828
- ue.jsonID("all", yt);
5828
+ ue.jsonID("all", vt);
5829
5829
  const D1 = {
5830
5830
  map() {
5831
5831
  return this;
5832
5832
  },
5833
5833
  resolve(n) {
5834
- return new yt(n);
5834
+ return new vt(n);
5835
5835
  }
5836
5836
  };
5837
5837
  function Ho(n, e, t, o, r, s = !1) {
@@ -6480,7 +6480,7 @@ const F1 = (n, e) => {
6480
6480
  return !0;
6481
6481
  }, Gp = (n, e) => {
6482
6482
  let t = n.selection, { $from: o, $to: r } = t;
6483
- if (t instanceof yt || o.parent.inlineContent || r.parent.inlineContent)
6483
+ if (t instanceof vt || o.parent.inlineContent || r.parent.inlineContent)
6484
6484
  return !1;
6485
6485
  let s = jc(r.parent.contentMatchAt(r.indexAfter()));
6486
6486
  if (!s || !s.isTextblock)
@@ -6520,7 +6520,7 @@ function H1(n) {
6520
6520
  s.unshift(null);
6521
6521
  }
6522
6522
  let u = e.tr;
6523
- (e.selection instanceof ae || e.selection instanceof yt) && u.deleteSelection();
6523
+ (e.selection instanceof ae || e.selection instanceof vt) && u.deleteSelection();
6524
6524
  let d = u.mapping.map(o.pos), f = wn(u.doc, d, s.length, s);
6525
6525
  if (f || (s[0] = l ? { type: l } : null, f = wn(u.doc, d, s.length, s)), !f)
6526
6526
  return !1;
@@ -6739,7 +6739,7 @@ function Hd(n, e, t, o, r) {
6739
6739
  for (var s; ; ) {
6740
6740
  if (n == t && e == o)
6741
6741
  return !0;
6742
- if (e == (r < 0 ? 0 : Et(n))) {
6742
+ if (e == (r < 0 ? 0 : At(n))) {
6743
6743
  let i = n.parentNode;
6744
6744
  if (!i || i.nodeType != 1 || ms(n) || nw.test(n.nodeName) || n.contentEditable == "false")
6745
6745
  return !1;
@@ -6752,12 +6752,12 @@ function Hd(n, e, t, o, r) {
6752
6752
  else
6753
6753
  return !1;
6754
6754
  else
6755
- n = i, e = r < 0 ? Et(n) : 0;
6755
+ n = i, e = r < 0 ? At(n) : 0;
6756
6756
  } else
6757
6757
  return !1;
6758
6758
  }
6759
6759
  }
6760
- function Et(n) {
6760
+ function At(n) {
6761
6761
  return n.nodeType == 3 ? n.nodeValue.length : n.childNodes.length;
6762
6762
  }
6763
6763
  function ow(n, e) {
@@ -6767,7 +6767,7 @@ function ow(n, e) {
6767
6767
  if (n.nodeType == 1 && e > 0) {
6768
6768
  if (n.contentEditable == "false")
6769
6769
  return null;
6770
- n = n.childNodes[e - 1], e = Et(n);
6770
+ n = n.childNodes[e - 1], e = At(n);
6771
6771
  } else if (n.parentNode && !ms(n))
6772
6772
  e = et(n), n = n.parentNode;
6773
6773
  else
@@ -6789,13 +6789,13 @@ function rw(n, e) {
6789
6789
  }
6790
6790
  }
6791
6791
  function sw(n, e, t) {
6792
- for (let o = e == 0, r = e == Et(n); o || r; ) {
6792
+ for (let o = e == 0, r = e == At(n); o || r; ) {
6793
6793
  if (n == t)
6794
6794
  return !0;
6795
6795
  let s = et(n);
6796
6796
  if (n = n.parentNode, !n)
6797
6797
  return !1;
6798
- o = o && s == 0, r = r && s == Et(n);
6798
+ o = o && s == 0, r = r && s == At(n);
6799
6799
  }
6800
6800
  }
6801
6801
  function ms(n) {
@@ -6822,18 +6822,18 @@ function lw(n, e, t) {
6822
6822
  try {
6823
6823
  let o = n.caretPositionFromPoint(e, t);
6824
6824
  if (o)
6825
- return { node: o.offsetNode, offset: Math.min(Et(o.offsetNode), o.offset) };
6825
+ return { node: o.offsetNode, offset: Math.min(At(o.offsetNode), o.offset) };
6826
6826
  } catch {
6827
6827
  }
6828
6828
  if (n.caretRangeFromPoint) {
6829
6829
  let o = n.caretRangeFromPoint(e, t);
6830
6830
  if (o)
6831
- return { node: o.startContainer, offset: Math.min(Et(o.startContainer), o.startOffset) };
6831
+ return { node: o.startContainer, offset: Math.min(At(o.startContainer), o.startOffset) };
6832
6832
  }
6833
6833
  }
6834
- const Zt = typeof navigator < "u" ? navigator : null, Vd = typeof document < "u" ? document : null, to = Zt && Zt.userAgent || "", Ha = /Edge\/(\d+)/.exec(to), Qp = /MSIE \d/.exec(to), Va = /Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(to), mt = !!(Qp || Va || Ha), Kn = Qp ? document.documentMode : Va ? +Va[1] : Ha ? +Ha[1] : 0, It = !mt && /gecko\/(\d+)/i.test(to);
6834
+ const Zt = typeof navigator < "u" ? navigator : null, Vd = typeof document < "u" ? document : null, to = Zt && Zt.userAgent || "", Ha = /Edge\/(\d+)/.exec(to), Qp = /MSIE \d/.exec(to), Va = /Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(to), gt = !!(Qp || Va || Ha), Kn = Qp ? document.documentMode : Va ? +Va[1] : Ha ? +Ha[1] : 0, It = !gt && /gecko\/(\d+)/i.test(to);
6835
6835
  It && +(/Firefox\/(\d+)/.exec(to) || [0, 0])[1];
6836
- const Wa = !mt && /Chrome\/(\d+)/.exec(to), nt = !!Wa, em = Wa ? +Wa[1] : 0, lt = !mt && !!Zt && /Apple Computer/.test(Zt.vendor), nr = lt && (/Mobile\/\w+/.test(to) || !!Zt && Zt.maxTouchPoints > 2), Ct = nr || (Zt ? /Mac/.test(Zt.platform) : !1), tm = Zt ? /Win/.test(Zt.platform) : !1, mn = /Android \d/.test(to), gs = !!Vd && "webkitFontSmoothing" in Vd.documentElement.style, aw = gs ? +(/\bAppleWebKit\/(\d+)/.exec(navigator.userAgent) || [0, 0])[1] : 0;
6836
+ const Wa = !gt && /Chrome\/(\d+)/.exec(to), nt = !!Wa, em = Wa ? +Wa[1] : 0, lt = !gt && !!Zt && /Apple Computer/.test(Zt.vendor), nr = lt && (/Mobile\/\w+/.test(to) || !!Zt && Zt.maxTouchPoints > 2), Mt = nr || (Zt ? /Mac/.test(Zt.platform) : !1), tm = Zt ? /Win/.test(Zt.platform) : !1, mn = /Android \d/.test(to), gs = !!Vd && "webkitFontSmoothing" in Vd.documentElement.style, aw = gs ? +(/\bAppleWebKit\/(\d+)/.exec(navigator.userAgent) || [0, 0])[1] : 0;
6837
6837
  function cw(n) {
6838
6838
  let e = n.defaultView && n.defaultView.visualViewport;
6839
6839
  return e ? {
@@ -7068,24 +7068,24 @@ function im(n, e, t) {
7068
7068
  return t < 0 && !r ? (c++, u = -1) : t >= 0 && r == o.nodeValue.length ? (a--, u = 1) : t < 0 ? a-- : c++, kr(An(dn(o, a, c), u), u < 0);
7069
7069
  }
7070
7070
  if (!n.state.doc.resolve(e - (s || 0)).parent.inlineContent) {
7071
- if (s == null && r && (t < 0 || r == Et(o))) {
7071
+ if (s == null && r && (t < 0 || r == At(o))) {
7072
7072
  let a = o.childNodes[r - 1];
7073
7073
  if (a.nodeType == 1)
7074
7074
  return Gl(a.getBoundingClientRect(), !1);
7075
7075
  }
7076
- if (s == null && r < Et(o)) {
7076
+ if (s == null && r < At(o)) {
7077
7077
  let a = o.childNodes[r];
7078
7078
  if (a.nodeType == 1)
7079
7079
  return Gl(a.getBoundingClientRect(), !0);
7080
7080
  }
7081
7081
  return Gl(o.getBoundingClientRect(), t >= 0);
7082
7082
  }
7083
- if (s == null && r && (t < 0 || r == Et(o))) {
7084
- let a = o.childNodes[r - 1], c = a.nodeType == 3 ? dn(a, Et(a) - (i ? 0 : 1)) : a.nodeType == 1 && (a.nodeName != "BR" || !a.nextSibling) ? a : null;
7083
+ if (s == null && r && (t < 0 || r == At(o))) {
7084
+ let a = o.childNodes[r - 1], c = a.nodeType == 3 ? dn(a, At(a) - (i ? 0 : 1)) : a.nodeType == 1 && (a.nodeName != "BR" || !a.nextSibling) ? a : null;
7085
7085
  if (c)
7086
7086
  return kr(An(c, 1), !1);
7087
7087
  }
7088
- if (s == null && r < Et(o)) {
7088
+ if (s == null && r < At(o)) {
7089
7089
  let a = o.childNodes[r];
7090
7090
  for (; a.pmViewDesc && a.pmViewDesc.ignoreForCoords; )
7091
7091
  a = a.nextSibling;
@@ -8283,7 +8283,7 @@ function Rw(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, et(t) + 1) : e.collapse(t, 0), !o && !n.state.selection.visible && mt && Kn <= 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 && gt && Kn <= 11 && (t.disabled = !0, t.disabled = !1);
8287
8287
  }
8288
8288
  function pm(n, e) {
8289
8289
  if (e instanceof oe) {
@@ -8335,7 +8335,7 @@ function nf(n, e, t) {
8335
8335
  if (n.endOfTextblock(e > 0 ? "forward" : "backward")) {
8336
8336
  let r = Ka(n.state, e);
8337
8337
  return r && r instanceof oe ? On(n, r) : !1;
8338
- } else if (!(Ct && t.indexOf("m") > -1)) {
8338
+ } else if (!(Mt && t.indexOf("m") > -1)) {
8339
8339
  let r = o.$head, s = r.textOffset ? null : e < 0 ? r.nodeBefore : r.nodeAfter, i;
8340
8340
  if (!s || s.isText)
8341
8341
  return !1;
@@ -8495,7 +8495,7 @@ function of(n, e) {
8495
8495
  }
8496
8496
  function rf(n, e, t) {
8497
8497
  let o = n.state.selection;
8498
- if (o instanceof ae && !o.empty || t.indexOf("s") > -1 || Ct && t.indexOf("m") > -1)
8498
+ if (o instanceof ae && !o.empty || t.indexOf("s") > -1 || Mt && t.indexOf("m") > -1)
8499
8499
  return !1;
8500
8500
  let { $from: r, $to: s } = o;
8501
8501
  if (!r.parent.inlineContent || n.endOfTextblock(e < 0 ? "up" : "down")) {
@@ -8504,7 +8504,7 @@ function rf(n, e, t) {
8504
8504
  return On(n, i);
8505
8505
  }
8506
8506
  if (!r.parent.inlineContent) {
8507
- let i = e < 0 ? r : s, l = o instanceof yt ? ue.near(i, e) : ue.findFrom(i, e);
8507
+ let i = e < 0 ? r : s, l = o instanceof vt ? ue.near(i, e) : ue.findFrom(i, e);
8508
8508
  return l ? On(n, l) : !1;
8509
8509
  }
8510
8510
  return !1;
@@ -8545,24 +8545,24 @@ function Hw(n) {
8545
8545
  }
8546
8546
  function Vw(n, e) {
8547
8547
  let t = e.keyCode, o = Hw(e);
8548
- if (t == 8 || Ct && t == 72 && o == "c")
8548
+ if (t == 8 || Mt && t == 72 && o == "c")
8549
8549
  return sf(n, -1) || zo(n, -1);
8550
- if (t == 46 && !e.shiftKey || Ct && t == 68 && o == "c")
8550
+ if (t == 46 && !e.shiftKey || Mt && t == 68 && o == "c")
8551
8551
  return sf(n, 1) || zo(n, 1);
8552
8552
  if (t == 13 || t == 27)
8553
8553
  return !0;
8554
- if (t == 37 || Ct && t == 66 && o == "c") {
8554
+ if (t == 37 || Mt && t == 66 && o == "c") {
8555
8555
  let r = t == 37 ? of(n, n.state.selection.from) == "ltr" ? -1 : 1 : -1;
8556
8556
  return nf(n, r, o) || zo(n, r);
8557
- } else if (t == 39 || Ct && t == 70 && o == "c") {
8557
+ } else if (t == 39 || Mt && t == 70 && o == "c") {
8558
8558
  let r = t == 39 ? of(n, n.state.selection.from) == "ltr" ? 1 : -1 : 1;
8559
8559
  return nf(n, r, o) || zo(n, r);
8560
8560
  } else {
8561
- if (t == 38 || Ct && t == 80 && o == "c")
8561
+ if (t == 38 || Mt && t == 80 && o == "c")
8562
8562
  return rf(n, -1, o) || zo(n, -1);
8563
- if (t == 40 || Ct && t == 78 && o == "c")
8563
+ if (t == 40 || Mt && t == 78 && o == "c")
8564
8564
  return Fw(n) || rf(n, 1, o) || zo(n, 1);
8565
- if (o == (Ct ? "m" : "c") && (t == 66 || t == 73 || t == 89 || t == 90))
8565
+ if (o == (Mt ? "m" : "c") && (t == 66 || t == 73 || t == 89 || t == 90))
8566
8566
  return !0;
8567
8567
  }
8568
8568
  return !1;
@@ -8757,17 +8757,17 @@ function Jw(n, e) {
8757
8757
  }
8758
8758
  return new G(r, s, i);
8759
8759
  }
8760
- const dt = {}, ft = {}, Gw = { touchstart: !0, touchmove: !0 };
8760
+ const ft = {}, ht = {}, Gw = { touchstart: !0, touchmove: !0 };
8761
8761
  class Yw {
8762
8762
  constructor() {
8763
8763
  this.shiftKey = !1, this.mouseDown = null, this.lastKeyCode = null, this.lastKeyCodeTime = 0, this.lastClick = { time: 0, x: 0, y: 0, type: "", button: 0 }, this.lastSelectionOrigin = null, this.lastSelectionTime = 0, this.lastIOSEnter = 0, this.lastIOSEnterFallbackTimeout = -1, this.lastFocus = 0, this.lastTouch = 0, this.lastChromeDelete = 0, this.composing = !1, this.compositionNode = null, this.composingTimeout = -1, this.compositionNodes = [], this.compositionEndedAt = -2e8, this.compositionID = 1, this.badSafariComposition = !1, this.compositionPendingChanges = 0, this.domChangeCount = 0, this.eventHandlers = /* @__PURE__ */ Object.create(null), this.hideSelectionGuard = null;
8764
8764
  }
8765
8765
  }
8766
8766
  function Xw(n) {
8767
- for (let e in dt) {
8768
- let t = dt[e];
8767
+ for (let e in ft) {
8768
+ let t = ft[e];
8769
8769
  n.dom.addEventListener(e, n.input.eventHandlers[e] = (o) => {
8770
- Qw(n, o) && !Yc(n, o) && (n.editable || !(o.type in ft)) && t(n, o);
8770
+ Qw(n, o) && !Yc(n, o) && (n.editable || !(o.type in ht)) && t(n, o);
8771
8771
  }, Gw[e] ? { passive: !0 } : void 0);
8772
8772
  }
8773
8773
  lt && n.dom.addEventListener("input", () => null), Ga(n);
@@ -8804,9 +8804,9 @@ function Qw(n, e) {
8804
8804
  return !0;
8805
8805
  }
8806
8806
  function ek(n, e) {
8807
- !Yc(n, e) && dt[e.type] && (n.editable || !(e.type in ft)) && dt[e.type](n, e);
8807
+ !Yc(n, e) && ft[e.type] && (n.editable || !(e.type in ht)) && ft[e.type](n, e);
8808
8808
  }
8809
- ft.keydown = (n, e) => {
8809
+ ht.keydown = (n, e) => {
8810
8810
  let t = e;
8811
8811
  if (n.input.shiftKey = t.keyCode == 16 || t.shiftKey, !Cm(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(), nr && t.keyCode == 13 && !t.ctrlKey && !t.altKey && !t.metaKey) {
@@ -8816,12 +8816,12 @@ ft.keydown = (n, e) => {
8816
8816
  }, 200);
8817
8817
  } else n.someProp("handleKeyDown", (o) => o(n, t)) || Vw(n, t) ? t.preventDefault() : Hn(n, "key");
8818
8818
  };
8819
- ft.keyup = (n, e) => {
8819
+ ht.keyup = (n, e) => {
8820
8820
  e.keyCode == 16 && (n.input.shiftKey = !1);
8821
8821
  };
8822
- ft.keypress = (n, e) => {
8822
+ ht.keypress = (n, e) => {
8823
8823
  let t = e;
8824
- if (Cm(n, t) || !t.charCode || t.ctrlKey && !t.altKey || Ct && t.metaKey)
8824
+ if (Cm(n, t) || !t.charCode || t.ctrlKey && !t.altKey || Mt && t.metaKey)
8825
8825
  return;
8826
8826
  if (n.someProp("handleKeyPress", (r) => r(n, t))) {
8827
8827
  t.preventDefault();
@@ -8906,8 +8906,8 @@ function lk(n, e, t) {
8906
8906
  function Zc(n) {
8907
8907
  return ri(n);
8908
8908
  }
8909
- const Sm = Ct ? "metaKey" : "ctrlKey";
8910
- dt.mousedown = (n, e) => {
8909
+ const Sm = Mt ? "metaKey" : "ctrlKey";
8910
+ ft.mousedown = (n, e) => {
8911
8911
  let t = e;
8912
8912
  n.input.shiftKey = t.shiftKey;
8913
8913
  let o = Zc(n), r = Date.now(), s = "singleClick";
@@ -8961,18 +8961,18 @@ class ak {
8961
8961
  !this.allowDefault && (Math.abs(this.event.x - e.clientX) > 4 || Math.abs(this.event.y - e.clientY) > 4) && (this.allowDefault = !0);
8962
8962
  }
8963
8963
  }
8964
- dt.touchstart = (n) => {
8964
+ ft.touchstart = (n) => {
8965
8965
  n.input.lastTouch = Date.now(), Zc(n), Hn(n, "pointer");
8966
8966
  };
8967
- dt.touchmove = (n) => {
8967
+ ft.touchmove = (n) => {
8968
8968
  n.input.lastTouch = Date.now(), Hn(n, "pointer");
8969
8969
  };
8970
- dt.contextmenu = (n) => Zc(n);
8970
+ ft.contextmenu = (n) => Zc(n);
8971
8971
  function Cm(n, e) {
8972
8972
  return n.composing ? !0 : lt && Math.abs(e.timeStamp - n.input.compositionEndedAt) < 500 ? (n.input.compositionEndedAt = -2e8, !0) : !1;
8973
8973
  }
8974
8974
  const ck = mn ? 5e3 : -1;
8975
- ft.compositionstart = ft.compositionupdate = (n) => {
8975
+ ht.compositionstart = ht.compositionupdate = (n) => {
8976
8976
  if (!n.composing) {
8977
8977
  n.domObserver.flush();
8978
8978
  let { state: e } = n, t = e.selection.$to;
@@ -9003,7 +9003,7 @@ function uk(n) {
9003
9003
  let o = e.childNodes[t];
9004
9004
  return o.nodeType == 1 && o.contentEditable == "false";
9005
9005
  }
9006
- ft.compositionend = (n, e) => {
9006
+ ht.compositionend = (n, e) => {
9007
9007
  n.composing && (n.input.composing = !1, n.input.compositionEndedAt = e.timeStamp, n.input.compositionPendingChanges = n.domObserver.pendingRecords().length ? n.input.compositionID : 0, n.input.compositionNode = null, n.input.badSafariComposition ? n.domObserver.forceFlush() : n.input.compositionPendingChanges && Promise.resolve().then(() => n.domObserver.flush()), n.input.compositionID++, Mm(n, 20));
9008
9008
  };
9009
9009
  function Mm(n, e) {
@@ -9055,8 +9055,8 @@ function hk(n, e) {
9055
9055
  t.parentNode && t.parentNode.removeChild(t), n.focus();
9056
9056
  }, 50);
9057
9057
  }
9058
- const ts = mt && Kn < 15 || nr && aw < 604;
9059
- dt.copy = ft.cut = (n, e) => {
9058
+ const ts = gt && Kn < 15 || nr && aw < 604;
9059
+ ft.copy = ht.cut = (n, e) => {
9060
9060
  let t = e, o = n.state.selection, r = t.type == "cut";
9061
9061
  if (o.empty)
9062
9062
  return;
@@ -9092,7 +9092,7 @@ function Em(n) {
9092
9092
  let t = n.getData("text/uri-list");
9093
9093
  return t ? t.replace(/\r?\n/g, " ") : "";
9094
9094
  }
9095
- ft.paste = (n, e) => {
9095
+ ht.paste = (n, e) => {
9096
9096
  let t = e;
9097
9097
  if (n.composing && !mn)
9098
9098
  return;
@@ -9104,12 +9104,12 @@ class Am {
9104
9104
  this.slice = e, this.move = t, this.node = o;
9105
9105
  }
9106
9106
  }
9107
- const gk = Ct ? "altKey" : "ctrlKey";
9107
+ const gk = Mt ? "altKey" : "ctrlKey";
9108
9108
  function Im(n, e) {
9109
9109
  let t = n.someProp("dragCopies", (o) => !o(e));
9110
9110
  return t ?? !e[gk];
9111
9111
  }
9112
- dt.dragstart = (n, e) => {
9112
+ ft.dragstart = (n, e) => {
9113
9113
  let t = e, o = n.input.mouseDown;
9114
9114
  if (o && o.done(), !t.dataTransfer)
9115
9115
  return;
@@ -9125,14 +9125,14 @@ dt.dragstart = (n, e) => {
9125
9125
  let l = (i || n.state.selection).content(), { dom: a, text: c, slice: u } = Gc(n, l);
9126
9126
  (!t.dataTransfer.files.length || !nt || em > 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 Am(u, Im(n, t), i);
9127
9127
  };
9128
- dt.dragend = (n) => {
9128
+ ft.dragend = (n) => {
9129
9129
  let e = n.dragging;
9130
9130
  window.setTimeout(() => {
9131
9131
  n.dragging == e && (n.dragging = null);
9132
9132
  }, 50);
9133
9133
  };
9134
- ft.dragover = ft.dragenter = (n, e) => e.preventDefault();
9135
- ft.drop = (n, e) => {
9134
+ ht.dragover = ht.dragenter = (n, e) => e.preventDefault();
9135
+ ht.drop = (n, e) => {
9136
9136
  try {
9137
9137
  yk(n, e, n.dragging);
9138
9138
  } finally {
@@ -9176,16 +9176,16 @@ function yk(n, e, t) {
9176
9176
  }
9177
9177
  n.focus(), n.dispatch(a.setMeta("uiEvent", "drop"));
9178
9178
  }
9179
- dt.focus = (n) => {
9179
+ ft.focus = (n) => {
9180
9180
  n.input.lastFocus = Date.now(), n.focused || (n.domObserver.stop(), n.dom.classList.add("ProseMirror-focused"), n.domObserver.start(), n.focused = !0, setTimeout(() => {
9181
9181
  n.docView && n.hasFocus() && !n.domObserver.currentSelection.eq(n.domSelectionRange()) && kn(n);
9182
9182
  }, 20));
9183
9183
  };
9184
- dt.blur = (n, e) => {
9184
+ ft.blur = (n, e) => {
9185
9185
  let t = 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
- dt.beforeinput = (n, e) => {
9188
+ ft.beforeinput = (n, e) => {
9189
9189
  if (nt && mn && e.inputType == "deleteContentBackward") {
9190
9190
  n.domObserver.flushSoon();
9191
9191
  let { domChangeCount: o } = n.input;
@@ -9197,8 +9197,8 @@ dt.beforeinput = (n, e) => {
9197
9197
  }, 50);
9198
9198
  }
9199
9199
  };
9200
- for (let n in ft)
9201
- dt[n] = ft[n];
9200
+ for (let n in ht)
9201
+ ft[n] = ht[n];
9202
9202
  function rs(n, e) {
9203
9203
  if (n == e)
9204
9204
  return !0;
@@ -9216,7 +9216,7 @@ class si {
9216
9216
  }
9217
9217
  map(e, t, o, r) {
9218
9218
  let { pos: s, deleted: i } = e.mapResult(t.from + r, this.side < 0 ? -1 : 1);
9219
- return i ? null : new ut(s - o, s - o, this);
9219
+ return i ? null : new dt(s - o, s - o, this);
9220
9220
  }
9221
9221
  valid() {
9222
9222
  return !0;
@@ -9234,7 +9234,7 @@ class Jn {
9234
9234
  }
9235
9235
  map(e, t, o, r) {
9236
9236
  let s = e.map(t.from + r, this.spec.inclusiveStart ? -1 : 1) - o, i = e.map(t.to + r, this.spec.inclusiveEnd ? 1 : -1) - o;
9237
- return s >= i ? null : new ut(s, i, this);
9237
+ return s >= i ? null : new dt(s, i, this);
9238
9238
  }
9239
9239
  valid(e, t) {
9240
9240
  return t.from < t.to;
@@ -9257,7 +9257,7 @@ class Qc {
9257
9257
  if (s.deleted)
9258
9258
  return null;
9259
9259
  let i = e.mapResult(t.to + r, -1);
9260
- return i.deleted || i.pos <= s.pos ? null : new ut(s.pos - o, i.pos - o, this);
9260
+ return i.deleted || i.pos <= s.pos ? null : new dt(s.pos - o, i.pos - o, this);
9261
9261
  }
9262
9262
  valid(e, t) {
9263
9263
  let { index: o, offset: r } = e.content.findIndex(t.from), s;
@@ -9269,7 +9269,7 @@ class Qc {
9269
9269
  destroy() {
9270
9270
  }
9271
9271
  }
9272
- class ut {
9272
+ class dt {
9273
9273
  /**
9274
9274
  @internal
9275
9275
  */
@@ -9280,7 +9280,7 @@ class ut {
9280
9280
  @internal
9281
9281
  */
9282
9282
  copy(e, t) {
9283
- return new ut(e, t, this.type);
9283
+ return new dt(e, t, this.type);
9284
9284
  }
9285
9285
  /**
9286
9286
  @internal
@@ -9303,14 +9303,14 @@ class ut {
9303
9303
  widget's current document position.
9304
9304
  */
9305
9305
  static widget(e, t, o) {
9306
- return new ut(e, e, new si(t, o));
9306
+ return new dt(e, e, new si(t, o));
9307
9307
  }
9308
9308
  /**
9309
9309
  Creates an inline decoration, which adds the given attributes to
9310
9310
  each inline node between `from` and `to`.
9311
9311
  */
9312
9312
  static inline(e, t, o, r) {
9313
- return new ut(e, t, new Jn(o, r));
9313
+ return new dt(e, t, new Jn(o, r));
9314
9314
  }
9315
9315
  /**
9316
9316
  Creates a node decoration. `from` and `to` should point precisely
@@ -9318,7 +9318,7 @@ class ut {
9318
9318
  node, will receive the given attributes.
9319
9319
  */
9320
9320
  static node(e, t, o, r) {
9321
- return new ut(e, t, new Qc(o, r));
9321
+ return new dt(e, t, new Qc(o, r));
9322
9322
  }
9323
9323
  /**
9324
9324
  The spec provided when creating this decoration. Can be useful
@@ -9628,7 +9628,7 @@ function Om(n, e) {
9628
9628
  let t = [];
9629
9629
  for (let o = 0; o < n.length; o++) {
9630
9630
  let r = n[o];
9631
- t.push(new ut(r.from + e, r.to + e, r.type));
9631
+ t.push(new dt(r.from + e, r.to + e, r.type));
9632
9632
  }
9633
9633
  return t;
9634
9634
  }
@@ -9714,7 +9714,7 @@ const kk = {
9714
9714
  attributes: !0,
9715
9715
  attributeOldValue: !0,
9716
9716
  subtree: !0
9717
- }, bk = mt && Kn <= 11;
9717
+ }, bk = gt && Kn <= 11;
9718
9718
  class xk {
9719
9719
  constructor() {
9720
9720
  this.anchorNode = null, this.anchorOffset = 0, this.focusNode = null, this.focusOffset = 0;
@@ -9734,7 +9734,7 @@ class Sk {
9734
9734
  this.view = e, this.handleDOMChange = t, this.queue = [], this.flushingSoon = -1, this.observer = null, this.currentSelection = new xk(), this.onCharData = null, this.suppressingSelectionUpdates = !1, this.lastChangedTextNode = null, this.observer = window.MutationObserver && new window.MutationObserver((o) => {
9735
9735
  for (let r = 0; r < o.length; r++)
9736
9736
  this.queue.push(o[r]);
9737
- mt && Kn <= 11 && o.some((r) => r.type == "childList" && r.removedNodes.length || r.type == "characterData" && r.oldValue.length > r.target.nodeValue.length) ? this.flushSoon() : lt && e.composing && o.some((r) => r.type == "childList" && r.target.nodeName == "TR") ? (e.input.badSafariComposition = !0, this.flushSoon()) : this.flush();
9737
+ gt && Kn <= 11 && o.some((r) => r.type == "childList" && r.removedNodes.length || r.type == "characterData" && r.oldValue.length > r.target.nodeValue.length) ? this.flushSoon() : lt && e.composing && o.some((r) => r.type == "childList" && r.target.nodeName == "TR") ? (e.input.badSafariComposition = !0, this.flushSoon()) : this.flush();
9738
9738
  }), bk && (this.onCharData = (o) => {
9739
9739
  this.queue.push({ target: o.target, type: "characterData", oldValue: o.prevValue }), this.flushSoon();
9740
9740
  }), this.onSelectionChange = this.onSelectionChange.bind(this);
@@ -9775,7 +9775,7 @@ class Sk {
9775
9775
  if (tf(this.view)) {
9776
9776
  if (this.suppressingSelectionUpdates)
9777
9777
  return kn(this.view);
9778
- if (mt && Kn <= 11 && !this.view.state.selection.empty) {
9778
+ if (gt && Kn <= 11 && !this.view.state.selection.empty) {
9779
9779
  let e = this.view.domSelectionRange();
9780
9780
  if (e.focusNode && Co(e.focusNode, e.focusOffset, e.anchorNode, e.anchorOffset))
9781
9781
  return this.flushSoon();
@@ -9859,7 +9859,7 @@ class Sk {
9859
9859
  if (o.contentDOM && o.contentDOM != o.dom && !o.contentDOM.contains(e.target))
9860
9860
  return { from: o.posBefore, to: o.posAfter };
9861
9861
  let r = e.previousSibling, s = e.nextSibling;
9862
- if (mt && Kn <= 11 && e.addedNodes.length)
9862
+ if (gt && Kn <= 11 && e.addedNodes.length)
9863
9863
  for (let u = 0; u < e.addedNodes.length; u++) {
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);
@@ -10008,7 +10008,7 @@ function _k(n, e, t, o, r) {
10008
10008
  }
10009
10009
  return;
10010
10010
  }
10011
- n.state.selection.from < n.state.selection.to && p.start == p.endB && n.state.selection instanceof ae && (p.start > n.state.selection.from && p.start <= n.state.selection.from + 2 && n.state.selection.from >= c.from ? p.start = n.state.selection.from : p.endA < n.state.selection.to && p.endA >= n.state.selection.to - 2 && n.state.selection.to <= c.to && (p.endB += n.state.selection.to - p.endA, p.endA = n.state.selection.to)), mt && Kn <= 11 && p.endB == p.start + 1 && p.endA == p.start && p.start > c.from && c.doc.textBetween(p.start - c.from - 1, p.start - c.from + 1) == "  " && (p.start--, p.endA--, p.endB--);
10011
+ n.state.selection.from < n.state.selection.to && p.start == p.endB && n.state.selection instanceof ae && (p.start > n.state.selection.from && p.start <= n.state.selection.from + 2 && n.state.selection.from >= c.from ? p.start = n.state.selection.from : p.endA < n.state.selection.to && p.endA >= n.state.selection.to - 2 && n.state.selection.to <= c.to && (p.endB += n.state.selection.to - p.endA, p.endA = n.state.selection.to)), gt && Kn <= 11 && p.endB == p.start + 1 && p.endA == p.start && p.start > c.from && c.doc.textBetween(p.start - c.from - 1, p.start - c.from + 1) == "  " && (p.start--, p.endA--, p.endB--);
10012
10012
  let m = c.doc.resolveNoCache(p.start - c.from), g = c.doc.resolveNoCache(p.endB - c.from), y = u.resolve(p.start), k = m.sameParent(g) && m.parent.inlineContent && y.end() >= p.endA;
10013
10013
  if ((nr && n.input.lastIOSEnter > Date.now() - 225 && (!k || r.some((S) => S.nodeName == "DIV" || S.nodeName == "P")) || !k && m.pos < c.doc.content.size && (!m.sameParent(g) || !m.parent.inlineContent) && m.pos < g.pos && !/\S/.test(c.doc.textBetween(m.pos, g.pos, "", ""))) && n.someProp("handleKeyDown", (S) => S(n, so(13, "Enter")))) {
10014
10014
  n.input.lastIOSEnter = 0;
@@ -10027,13 +10027,13 @@ function _k(n, e, t, o, r) {
10027
10027
  let T = S || 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 = pf(n, T.doc, c.sel);
10030
- E && !(nt && n.composing && E.empty && (p.start != p.endB || n.input.lastChromeDelete < Date.now() - 100) && (E.head == w || E.head == T.mapping.map(v) - 1) || mt && E.empty && E.head == w) && T.setSelection(E);
10030
+ E && !(nt && n.composing && E.empty && (p.start != p.endB || n.input.lastChromeDelete < Date.now() - 100) && (E.head == w || E.head == T.mapping.map(v) - 1) || gt && E.empty && E.head == w) && T.setSelection(E);
10031
10031
  }
10032
10032
  return s && T.setMeta("composition", s), T.scrollIntoView();
10033
10033
  }, M;
10034
10034
  if (k)
10035
10035
  if (m.pos == g.pos) {
10036
- mt && Kn <= 11 && m.parentOffset == 0 && (n.domObserver.suppressSelectionUpdates(), setTimeout(() => kn(n), 20));
10036
+ gt && Kn <= 11 && m.parentOffset == 0 && (n.domObserver.suppressSelectionUpdates(), setTimeout(() => kn(n), 20));
10037
10037
  let S = b(n.state.tr.delete(w, v)), T = u.resolve(p.start).marksAcross(u.resolve(p.endA));
10038
10038
  T && S.ensureMarks(T), n.dispatch(S);
10039
10039
  } else if (
@@ -10200,7 +10200,7 @@ class Nm {
10200
10200
  let f = u == "preserve" && i && this.dom.style.overflowAnchor == null && dw(this);
10201
10201
  if (i) {
10202
10202
  this.domObserver.stop();
10203
- let h = d && (mt || nt) && !this.composing && !r.selection.empty && !e.selection.empty && Pk(r.selection, e.selection);
10203
+ let h = d && (gt || nt) && !this.composing && !r.selection.empty && !e.selection.empty && Pk(r.selection, e.selection);
10204
10204
  if (d) {
10205
10205
  let p = nt ? this.trackWrites = this.domSelectionRange().focusNode : null;
10206
10206
  this.composing && (this.input.compositionNode = dk(this)), (s || !this.docView.update(e.doc, c, a, this)) && (this.docView.updateOuterDeco(c), this.docView.destroy(), this.docView = Gd(e.doc, c, a, this.dom, this)), p && (!this.trackWrites || !this.dom.contains(this.trackWrites)) && (h = !0);
@@ -10275,7 +10275,7 @@ class Nm {
10275
10275
  Query whether the view has focus.
10276
10276
  */
10277
10277
  hasFocus() {
10278
- if (mt) {
10278
+ if (gt) {
10279
10279
  let e = this.root.activeElement;
10280
10280
  if (e == this.dom)
10281
10281
  return !0;
@@ -10465,12 +10465,12 @@ function gf(n) {
10465
10465
  if (typeof t == "function" && (t = t(n.state)), t)
10466
10466
  for (let o in t)
10467
10467
  o == "class" ? e.class += " " + t[o] : o == "style" ? e.style = (e.style ? e.style + ";" : "") + t[o] : !e[o] && o != "contenteditable" && o != "nodeName" && (e[o] = String(t[o]));
10468
- }), e.translate || (e.translate = "no"), [ut.node(0, n.state.doc.content.size, e)];
10468
+ }), e.translate || (e.translate = "no"), [dt.node(0, n.state.doc.content.size, e)];
10469
10469
  }
10470
10470
  function yf(n) {
10471
10471
  if (n.markCursor) {
10472
10472
  let e = document.createElement("img");
10473
- e.className = "ProseMirror-separator", e.setAttribute("mark-placeholder", "true"), e.setAttribute("alt", ""), n.cursorWrapper = { dom: e, deco: ut.widget(n.state.selection.from, e, { raw: !0, marks: n.markCursor }) };
10473
+ e.className = "ProseMirror-separator", e.setAttribute("mark-placeholder", "true"), e.setAttribute("alt", ""), n.cursorWrapper = { dom: e, deco: dt.widget(n.state.selection.from, e, { raw: !0, marks: n.markCursor }) };
10474
10474
  } else
10475
10475
  n.cursorWrapper = null;
10476
10476
  }
@@ -11225,7 +11225,7 @@ var Eb = (n, e) => ({ tr: t, state: o, dispatch: r }) => {
11225
11225
  }), a;
11226
11226
  }, Ab = () => ({ tr: n, dispatch: e }) => (e && n.scrollIntoView(), !0), Ib = () => ({ tr: n, dispatch: e }) => {
11227
11227
  if (e) {
11228
- const t = new yt(n.doc);
11228
+ const t = new vt(n.doc);
11229
11229
  n.setSelection(t);
11230
11230
  }
11231
11231
  return !0;
@@ -14547,11 +14547,11 @@ function hx(n, e) {
14547
14547
  e[o].indexOf(n) >= 0 && (t[o] = !0);
14548
14548
  return t;
14549
14549
  }
14550
- function pt(n = null) {
14550
+ function mt(n = null) {
14551
14551
  this.j = {}, this.jr = [], this.jd = null, this.t = n;
14552
14552
  }
14553
- pt.groups = {};
14554
- pt.prototype = {
14553
+ mt.groups = {};
14554
+ mt.prototype = {
14555
14555
  accepts() {
14556
14556
  return !!this.t;
14557
14557
  },
@@ -14604,9 +14604,9 @@ pt.prototype = {
14604
14604
  * @returns {State<T>} taken after the given input
14605
14605
  */
14606
14606
  tr(n, e, t, o) {
14607
- o = o || pt.groups;
14607
+ o = o || mt.groups;
14608
14608
  let r;
14609
- return e && e.j ? r = e : (r = new pt(e), t && o && co(e, t, o)), this.jr.push([n, r]), r;
14609
+ return e && e.j ? r = e : (r = new mt(e), t && o && co(e, t, o)), this.jr.push([n, r]), r;
14610
14610
  },
14611
14611
  /**
14612
14612
  * Short for "take transitions", will take as many sequential transitions as
@@ -14654,13 +14654,13 @@ pt.prototype = {
14654
14654
  * @returns {State<T>} taken after the given input
14655
14655
  */
14656
14656
  tt(n, e, t, o) {
14657
- o = o || pt.groups;
14657
+ o = o || mt.groups;
14658
14658
  const r = this;
14659
14659
  if (e && e.j)
14660
14660
  return r.j[n] = e, e;
14661
14661
  const s = e;
14662
14662
  let i, l = r.go(n);
14663
- if (l ? (i = new pt(), Object.assign(i.j, l.j), i.jr.push.apply(i.jr, l.jr), i.jd = l.jd, i.t = l.t) : i = new pt(), s) {
14663
+ if (l ? (i = new mt(), Object.assign(i.j, l.j), i.jr.push.apply(i.jr, l.jr), i.jd = l.jd, i.t = l.t) : i = new mt(), s) {
14664
14664
  if (o)
14665
14665
  if (i.t && typeof i.t == "string") {
14666
14666
  const a = Object.assign(hx(i.t, o), t);
@@ -14671,7 +14671,7 @@ pt.prototype = {
14671
14671
  return r.j[n] = i, i;
14672
14672
  }
14673
14673
  };
14674
- const ce = (n, e, t, o, r) => n.ta(e, t, o, r), Ie = (n, e, t, o, r) => n.tr(e, t, o, r), Nf = (n, e, t, o, r) => n.ts(e, t, o, r), H = (n, e, t, o, r) => n.tt(e, t, o, r), cn = "WORD", nc = "UWORD", bg = "ASCIINUMERICAL", xg = "ALPHANUMERICAL", as = "LOCALHOST", oc = "TLD", rc = "UTLD", zs = "SCHEME", Wo = "SLASH_SCHEME", fu = "NUM", sc = "WS", hu = "NL", zr = "OPENBRACE", Fr = "CLOSEBRACE", fi = "OPENBRACKET", hi = "CLOSEBRACKET", pi = "OPENPAREN", mi = "CLOSEPAREN", gi = "OPENANGLEBRACKET", yi = "CLOSEANGLEBRACKET", vi = "FULLWIDTHLEFTPAREN", wi = "FULLWIDTHRIGHTPAREN", ki = "LEFTCORNERBRACKET", bi = "RIGHTCORNERBRACKET", xi = "LEFTWHITECORNERBRACKET", Si = "RIGHTWHITECORNERBRACKET", Ci = "FULLWIDTHLESSTHAN", Mi = "FULLWIDTHGREATERTHAN", Ti = "AMPERSAND", Ei = "APOSTROPHE", Ai = "ASTERISK", _n = "AT", Ii = "BACKSLASH", Oi = "BACKTICK", _i = "CARET", Rn = "COLON", pu = "COMMA", Di = "DOLLAR", Kt = "DOT", Ni = "EQUALS", mu = "EXCLAMATION", St = "HYPHEN", Hr = "PERCENT", Ri = "PIPE", Pi = "PLUS", Li = "POUND", Vr = "QUERY", gu = "QUOTE", Sg = "FULLWIDTHMIDDLEDOT", yu = "SEMI", qt = "SLASH", Wr = "TILDE", $i = "UNDERSCORE", Cg = "EMOJI", Bi = "SYM";
14674
+ const ce = (n, e, t, o, r) => n.ta(e, t, o, r), Ie = (n, e, t, o, r) => n.tr(e, t, o, r), Nf = (n, e, t, o, r) => n.ts(e, t, o, r), H = (n, e, t, o, r) => n.tt(e, t, o, r), cn = "WORD", nc = "UWORD", bg = "ASCIINUMERICAL", xg = "ALPHANUMERICAL", as = "LOCALHOST", oc = "TLD", rc = "UTLD", zs = "SCHEME", Wo = "SLASH_SCHEME", fu = "NUM", sc = "WS", hu = "NL", zr = "OPENBRACE", Fr = "CLOSEBRACE", fi = "OPENBRACKET", hi = "CLOSEBRACKET", pi = "OPENPAREN", mi = "CLOSEPAREN", gi = "OPENANGLEBRACKET", yi = "CLOSEANGLEBRACKET", vi = "FULLWIDTHLEFTPAREN", wi = "FULLWIDTHRIGHTPAREN", ki = "LEFTCORNERBRACKET", bi = "RIGHTCORNERBRACKET", xi = "LEFTWHITECORNERBRACKET", Si = "RIGHTWHITECORNERBRACKET", Ci = "FULLWIDTHLESSTHAN", Mi = "FULLWIDTHGREATERTHAN", Ti = "AMPERSAND", Ei = "APOSTROPHE", Ai = "ASTERISK", _n = "AT", Ii = "BACKSLASH", Oi = "BACKTICK", _i = "CARET", Rn = "COLON", pu = "COMMA", Di = "DOLLAR", Kt = "DOT", Ni = "EQUALS", mu = "EXCLAMATION", Ct = "HYPHEN", Hr = "PERCENT", Ri = "PIPE", Pi = "PLUS", Li = "POUND", Vr = "QUERY", gu = "QUOTE", Sg = "FULLWIDTHMIDDLEDOT", yu = "SEMI", qt = "SLASH", Wr = "TILDE", $i = "UNDERSCORE", Cg = "EMOJI", Bi = "SYM";
14675
14675
  var Mg = /* @__PURE__ */ Object.freeze({
14676
14676
  __proto__: null,
14677
14677
  ALPHANUMERICAL: xg,
@@ -14699,7 +14699,7 @@ var Mg = /* @__PURE__ */ Object.freeze({
14699
14699
  FULLWIDTHLESSTHAN: Ci,
14700
14700
  FULLWIDTHMIDDLEDOT: Sg,
14701
14701
  FULLWIDTHRIGHTPAREN: wi,
14702
- HYPHEN: St,
14702
+ HYPHEN: Ct,
14703
14703
  LEFTCORNERBRACKET: ki,
14704
14704
  LEFTWHITECORNERBRACKET: xi,
14705
14705
  LOCALHOST: as,
@@ -14735,9 +14735,9 @@ const ln = /[a-z]/, xr = new RegExp("\\p{L}", "u"), sa = new RegExp("\\p{Emoji}"
14735
14735
  let Is = null, Os = null;
14736
14736
  function gx(n = []) {
14737
14737
  const e = {};
14738
- pt.groups = e;
14739
- const t = new pt();
14740
- Is == null && (Is = Pf(ax)), Os == null && (Os = Pf(cx)), H(t, "'", Ei), H(t, "{", zr), H(t, "}", Fr), H(t, "[", fi), H(t, "]", hi), H(t, "(", pi), H(t, ")", mi), H(t, "<", gi), H(t, ">", yi), H(t, "(", vi), H(t, ")", wi), H(t, "「", ki), H(t, "」", bi), H(t, "『", xi), H(t, "』", Si), H(t, "<", Ci), H(t, ">", Mi), H(t, "&", Ti), H(t, "*", Ai), H(t, "@", _n), H(t, "`", Oi), H(t, "^", _i), H(t, ":", Rn), H(t, ",", pu), H(t, "$", Di), H(t, ".", Kt), H(t, "=", Ni), H(t, "!", mu), H(t, "-", St), H(t, "%", Hr), H(t, "|", Ri), H(t, "+", Pi), H(t, "#", Li), H(t, "?", Vr), H(t, '"', gu), H(t, "/", qt), H(t, ";", yu), H(t, "~", Wr), H(t, "_", $i), H(t, "\\", Ii), H(t, "・", Sg);
14738
+ mt.groups = e;
14739
+ const t = new mt();
14740
+ Is == null && (Is = Pf(ax)), Os == null && (Os = Pf(cx)), H(t, "'", Ei), H(t, "{", zr), H(t, "}", Fr), H(t, "[", fi), H(t, "]", hi), H(t, "(", pi), H(t, ")", mi), H(t, "<", gi), H(t, ">", yi), H(t, "(", vi), H(t, ")", wi), H(t, "「", ki), H(t, "」", bi), H(t, "『", xi), H(t, "』", Si), H(t, "<", Ci), H(t, ">", Mi), H(t, "&", Ti), H(t, "*", Ai), H(t, "@", _n), H(t, "`", Oi), H(t, "^", _i), H(t, ":", Rn), H(t, ",", pu), H(t, "$", Di), H(t, ".", Kt), H(t, "=", Ni), H(t, "!", mu), H(t, "-", Ct), H(t, "%", Hr), H(t, "|", Ri), H(t, "+", Pi), H(t, "#", Li), H(t, "?", Vr), H(t, '"', gu), H(t, "/", qt), H(t, ";", yu), H(t, "~", Wr), H(t, "_", $i), H(t, "\\", Ii), H(t, "・", Sg);
14741
14741
  const o = Ie(t, an, fu, {
14742
14742
  [Za]: !0
14743
14743
  });
@@ -14796,7 +14796,7 @@ function gx(n = []) {
14796
14796
  }
14797
14797
  return Nf(t, "localhost", as, {
14798
14798
  ascii: !0
14799
- }), t.jd = new pt(Bi), {
14799
+ }), t.jd = new mt(Bi), {
14800
14800
  start: t,
14801
14801
  tokens: Object.assign({
14802
14802
  groups: e
@@ -14837,9 +14837,9 @@ function En(n, e, t, o, r) {
14837
14837
  const i = e.length;
14838
14838
  for (let l = 0; l < i - 1; l++) {
14839
14839
  const a = e[l];
14840
- n.j[a] ? s = n.j[a] : (s = new pt(o), s.jr = r.slice(), n.j[a] = s), n = s;
14840
+ n.j[a] ? s = n.j[a] : (s = new mt(o), s.jr = r.slice(), n.j[a] = s), n = s;
14841
14841
  }
14842
- return s = new pt(t), s.jr = r.slice(), n.j[e[i - 1]] = s, s;
14842
+ return s = new mt(t), s.jr = r.slice(), n.j[e[i - 1]] = s, s;
14843
14843
  }
14844
14844
  function Pf(n) {
14845
14845
  const e = [], t = [];
@@ -15089,38 +15089,38 @@ const $f = gl("email", {
15089
15089
  const n = this.tk;
15090
15090
  return n.length >= 2 && n[0].t !== as && n[1].t === Rn;
15091
15091
  }
15092
- }), xt = (n) => new pt(n);
15092
+ }), St = (n) => new mt(n);
15093
15093
  function wx({
15094
15094
  groups: n
15095
15095
  }) {
15096
- const e = n.domain.concat([Ti, Ai, _n, Ii, Oi, _i, Di, Ni, St, fu, Hr, Ri, Pi, Li, qt, Bi, Wr, $i]), t = [Ei, Rn, pu, Kt, mu, Hr, Vr, gu, yu, gi, yi, zr, Fr, hi, fi, pi, mi, vi, wi, ki, bi, xi, Si, Ci, Mi], o = [Ti, Ei, Ai, Ii, Oi, _i, Di, Ni, St, zr, Fr, Hr, Ri, Pi, Li, Vr, qt, Bi, Wr, $i], r = xt(), s = H(r, Wr);
15096
+ const e = n.domain.concat([Ti, Ai, _n, Ii, Oi, _i, Di, Ni, Ct, fu, Hr, Ri, Pi, Li, qt, Bi, Wr, $i]), t = [Ei, Rn, pu, Kt, mu, Hr, Vr, gu, yu, gi, yi, zr, Fr, hi, fi, pi, mi, vi, wi, ki, bi, xi, Si, Ci, Mi], o = [Ti, Ei, Ai, Ii, Oi, _i, Di, Ni, Ct, zr, Fr, Hr, Ri, Pi, Li, Vr, qt, Bi, Wr, $i], r = St(), s = H(r, Wr);
15097
15097
  ce(s, o, s), ce(s, n.domain, s);
15098
- const i = xt(), l = xt(), a = xt();
15098
+ const i = St(), l = St(), a = St();
15099
15099
  ce(r, n.domain, i), ce(r, n.scheme, l), ce(r, n.slashscheme, a), ce(i, o, s), ce(i, n.domain, i);
15100
15100
  const c = H(i, _n);
15101
15101
  H(s, _n, c), H(l, _n, c), H(a, _n, c);
15102
15102
  const u = H(s, Kt);
15103
15103
  ce(u, o, s), ce(u, n.domain, s);
15104
- const d = xt();
15104
+ const d = St();
15105
15105
  ce(c, n.domain, d), ce(d, n.domain, d);
15106
15106
  const f = H(d, Kt);
15107
15107
  ce(f, n.domain, d);
15108
- const h = xt($f);
15108
+ const h = St($f);
15109
15109
  ce(f, n.tld, h), ce(f, n.utld, h), H(c, as, h);
15110
- const p = H(d, St);
15111
- H(p, St, p), ce(p, n.domain, d), ce(h, n.domain, d), H(h, Kt, f), H(h, St, p);
15110
+ const p = H(d, Ct);
15111
+ H(p, Ct, p), ce(p, n.domain, d), ce(h, n.domain, d), H(h, Kt, f), H(h, Ct, p);
15112
15112
  const m = H(h, Rn);
15113
15113
  ce(m, n.numeric, $f);
15114
- const g = H(i, St), y = H(i, Kt);
15115
- H(g, St, g), ce(g, n.domain, i), ce(y, o, s), ce(y, n.domain, i);
15116
- const k = xt(_s);
15117
- ce(y, n.tld, k), ce(y, n.utld, k), ce(k, n.domain, i), ce(k, o, s), H(k, Kt, y), H(k, St, g), H(k, _n, c);
15118
- const w = H(k, Rn), v = xt(_s);
15114
+ const g = H(i, Ct), y = H(i, Kt);
15115
+ H(g, Ct, g), ce(g, n.domain, i), ce(y, o, s), ce(y, n.domain, i);
15116
+ const k = St(_s);
15117
+ ce(y, n.tld, k), ce(y, n.utld, k), ce(k, n.domain, i), ce(k, o, s), H(k, Kt, y), H(k, Ct, g), H(k, _n, c);
15118
+ const w = H(k, Rn), v = St(_s);
15119
15119
  ce(w, n.numeric, v);
15120
- const b = xt(_s), M = xt();
15120
+ const b = St(_s), M = St();
15121
15121
  ce(b, e, b), ce(b, t, M), ce(M, e, b), ce(M, t, M), H(k, qt, b), H(v, qt, b);
15122
15122
  const S = H(l, Rn), T = H(a, Rn), E = H(T, qt), _ = H(E, qt);
15123
- ce(l, n.domain, i), H(l, Kt, y), H(l, St, g), ce(a, n.domain, i), H(a, Kt, y), H(a, St, g), ce(S, n.domain, b), H(S, qt, b), H(S, Vr, b), ce(_, n.domain, b), ce(_, e, b), H(_, qt, b);
15123
+ ce(l, n.domain, i), H(l, Kt, y), H(l, Ct, g), ce(a, n.domain, i), H(a, Kt, y), H(a, Ct, g), ce(S, n.domain, b), H(S, qt, b), H(S, Vr, b), ce(_, n.domain, b), ce(_, e, b), H(_, qt, b);
15124
15124
  const D = [
15125
15125
  [zr, Fr],
15126
15126
  // {}
@@ -15142,9 +15142,9 @@ function wx({
15142
15142
  for (let N = 0; N < D.length; N++) {
15143
15143
  const [R, W] = D[N], V = H(b, R);
15144
15144
  H(M, R, V), H(V, W, b);
15145
- const te = xt(_s);
15145
+ const te = St(_s);
15146
15146
  ce(V, e, te);
15147
- const J = xt();
15147
+ const J = St();
15148
15148
  ce(V, t), ce(te, e, te), ce(te, t, J), ce(J, e, te), ce(J, t, J), H(te, W, b), H(J, W, b);
15149
15149
  }
15150
15150
  return H(r, as, k), H(r, hu, vx), {
@@ -15184,7 +15184,7 @@ const bx = typeof console < "u" && console && console.warn || (() => {
15184
15184
  initialized: !1
15185
15185
  };
15186
15186
  function Sx() {
15187
- return pt.groups = {}, xe.scanner = null, xe.parser = null, xe.tokenQueue = [], xe.pluginQueue = [], xe.customSchemes = [], xe.initialized = !1, xe;
15187
+ return mt.groups = {}, xe.scanner = null, xe.parser = null, xe.tokenQueue = [], xe.pluginQueue = [], xe.customSchemes = [], xe.initialized = !1, xe;
15188
15188
  }
15189
15189
  function zf(n, e = !1) {
15190
15190
  if (xe.initialized && bx(`linkifyjs: already initialized - will not register custom scheme "${n}" ${xx}`), !/^[0-9a-z]+(-[0-9a-z]+)*$/.test(n))
@@ -16078,7 +16078,7 @@ function Jx(n) {
16078
16078
  if (!(n.selection instanceof Oe))
16079
16079
  return null;
16080
16080
  let e = document.createElement("div");
16081
- return e.className = "ProseMirror-gapcursor", Ee.create(n.doc, [ut.widget(n.selection.head, e, { key: "gapcursor" })]);
16081
+ return e.className = "ProseMirror-gapcursor", Ee.create(n.doc, [dt.widget(n.selection.head, e, { key: "gapcursor" })]);
16082
16082
  }
16083
16083
  var zi = 200, We = function() {
16084
16084
  };
@@ -16531,7 +16531,7 @@ Me.create({
16531
16531
  if (l += 1, this.options.mode === "deepest" && i - l > 0 || this.options.mode === "shallowest" && l > 1)
16532
16532
  return this.options.mode === "deepest";
16533
16533
  s.push(
16534
- ut.node(c, c + a.nodeSize, {
16534
+ dt.node(c, c + a.nodeSize, {
16535
16535
  class: this.options.className
16536
16536
  })
16537
16537
  );
@@ -16592,7 +16592,7 @@ Me.create({
16592
16592
  if ((c || !this.options.showOnlyCurrent) && u) {
16593
16593
  const d = [this.options.emptyNodeClass];
16594
16594
  i && d.push(this.options.emptyEditorClass);
16595
- const f = ut.node(a, a + l.nodeSize, {
16595
+ const f = dt.node(a, a + l.nodeSize, {
16596
16596
  class: d.join(" "),
16597
16597
  [n]: typeof this.options.placeholder == "function" ? this.options.placeholder({
16598
16598
  editor: this.editor,
@@ -16626,7 +16626,7 @@ Me.create({
16626
16626
  props: {
16627
16627
  decorations(t) {
16628
16628
  return t.selection.empty || n.isFocused || !n.isEditable || Yb(t.selection) || n.view.dragging ? null : Ee.create(t.doc, [
16629
- ut.inline(t.selection.from, t.selection.to, {
16629
+ dt.inline(t.selection.from, t.selection.to, {
16630
16630
  class: e.className
16631
16631
  })
16632
16632
  ]);
@@ -16730,7 +16730,7 @@ function us(n, e, t) {
16730
16730
  const r = e.block.size ?? [100, 100], s = [t[0] - r[0] / 2, t[1] - r[1] / 2];
16731
16731
  bn.snapPosition(n, s);
16732
16732
  const [i, l] = s, a = e.block.rank ?? Yh.genNext(n), c = Zi(n);
16733
- "synced" in e || He(n, c, Tt, {
16733
+ "synced" in e || He(n, c, Et, {
16734
16734
  id: crypto.randomUUID()
16735
16735
  });
16736
16736
  const u = Object.assign({}, e.block, {
@@ -16991,14 +16991,14 @@ function lS(n) {
16991
16991
  for (const f of ey(n, d))
16992
16992
  t.add(f);
16993
16993
  e = [...t];
16994
- const { componentsById: o } = cr(n), r = new Map([...o].filter(([, d]) => d.sync === "document")), s = Tt._getComponentId(n), i = /* @__PURE__ */ new Set();
16994
+ const { componentsById: o } = cr(n), r = new Map([...o].filter(([, d]) => d.sync === "document")), s = Et._getComponentId(n), i = /* @__PURE__ */ new Set();
16995
16995
  for (const d of e)
16996
- Fe(n, d, Tt) && i.add(Tt.read(n, d).id);
16996
+ Fe(n, d, Et) && i.add(Et.read(n, d).id);
16997
16997
  const l = new Set(e), a = [], c = Ln.zero();
16998
16998
  let u = !1;
16999
16999
  for (const d of e) {
17000
17000
  const f = {};
17001
- Fe(n, d, Tt) && (f[Vg] = Tt.snapshot(n, d));
17001
+ Fe(n, d, Et) && (f[Vg] = Et.snapshot(n, d));
17002
17002
  for (const h of n.entityBuffer.getComponentIds(d)) {
17003
17003
  if (h === s) continue;
17004
17004
  const p = r.get(h);
@@ -17033,7 +17033,7 @@ function aS(n, e) {
17033
17033
  return null;
17034
17034
  }
17035
17035
  if (!t || t.version !== Hg || !Array.isArray(t.entities) || t.entities.length === 0) return null;
17036
- const { componentsByName: o } = cr(n), r = Tt._getComponentId(n), s = [];
17036
+ const { componentsByName: o } = cr(n), r = Et._getComponentId(n), s = [];
17037
17037
  for (const i of t.entities) {
17038
17038
  const l = /* @__PURE__ */ new Map();
17039
17039
  for (const [a, c] of Object.entries(i)) {
@@ -17054,7 +17054,7 @@ function cS(n, e, t) {
17054
17054
  for (const [s, i] of Object.entries(e))
17055
17055
  if (((r = i == null ? void 0 : i.def) == null ? void 0 : r.type) === "ref") {
17056
17056
  const l = t[s];
17057
- o[s] = l != null && Fe(n, l, Tt) ? Tt.read(n, l).id : null;
17057
+ o[s] = l != null && Fe(n, l, Et) ? Et.read(n, l).id : null;
17058
17058
  }
17059
17059
  return o;
17060
17060
  }
@@ -17076,7 +17076,7 @@ function dS(n, e, t, o, r) {
17076
17076
  }
17077
17077
  function Jf(n, e, t, o) {
17078
17078
  if (e.length === 0) return;
17079
- const { componentsById: r } = cr(n), s = new Map([...r].filter(([, h]) => h.sync === "document")), i = Tt._getComponentId(n), l = le._getComponentId(n);
17079
+ const { componentsById: r } = cr(n), s = new Map([...r].filter(([, h]) => h.sync === "document")), i = Et._getComponentId(n), l = le._getComponentId(n);
17080
17080
  let a;
17081
17081
  if (o)
17082
17082
  a = In.clone(o), In.sub(a, t);
@@ -17093,7 +17093,7 @@ function Jf(n, e, t, o) {
17093
17093
  const u = /* @__PURE__ */ new Map(), d = [];
17094
17094
  for (const h of c) {
17095
17095
  const p = Zi(n), m = h.get(i);
17096
- m != null && m.id && u.set(m.id, p), He(n, p, Tt, { id: crypto.randomUUID() });
17096
+ m != null && m.id && u.set(m.id, p), He(n, p, Et, { id: crypto.randomUUID() });
17097
17097
  for (const [g, y] of h) {
17098
17098
  if (g === i) continue;
17099
17099
  const k = s.get(g);
@@ -17220,7 +17220,7 @@ function hS(n, e = {}) {
17220
17220
  );
17221
17221
  Tc(k, "text") && He(k, _, Ec, {}), G0.spawn(k, { entityId: _, deselectOthers: !0 });
17222
17222
  }
17223
- wt(() => {
17223
+ kt(() => {
17224
17224
  const p = n.value;
17225
17225
  p && (p.addEventListener("paste", h), p.addEventListener("copy", d), p.addEventListener("cut", f));
17226
17226
  }), $e(() => {
@@ -18258,21 +18258,21 @@ const PS = { key: 1 }, LS = ["innerHTML"], Au = /* @__PURE__ */ q({
18258
18258
  [Ze.Top]: "flex-start",
18259
18259
  [Ze.Center]: "center",
18260
18260
  [Ze.Bottom]: "flex-end"
18261
- }, i = O(() => t.value ? `rgba(${t.value.fillRed}, ${t.value.fillGreen}, ${t.value.fillBlue}, ${(t.value.fillAlpha ?? 255) / 255})` : "rgba(0, 0, 0, 0)"), l = O(() => t.value ? t.value.strokeKind === Mt.None ? "none" : `rgba(${t.value.strokeRed}, ${t.value.strokeGreen}, ${t.value.strokeBlue}, ${t.value.strokeAlpha / 255})` : "rgba(0, 0, 0, 1)"), a = O(() => {
18261
+ }, i = O(() => t.value ? `rgba(${t.value.fillRed}, ${t.value.fillGreen}, ${t.value.fillBlue}, ${(t.value.fillAlpha ?? 255) / 255})` : "rgba(0, 0, 0, 0)"), l = O(() => t.value ? t.value.strokeKind === Tt.None ? "none" : `rgba(${t.value.strokeRed}, ${t.value.strokeGreen}, ${t.value.strokeBlue}, ${t.value.strokeAlpha / 255})` : "rgba(0, 0, 0, 1)"), a = O(() => {
18262
18262
  var m;
18263
18263
  return ((m = t.value) == null ? void 0 : m.strokeWidth) ?? 2;
18264
18264
  }), c = O(() => {
18265
18265
  var m;
18266
- return ((m = t.value) == null ? void 0 : m.strokeKind) ?? Mt.Solid;
18266
+ return ((m = t.value) == null ? void 0 : m.strokeKind) ?? Tt.Solid;
18267
18267
  }), u = O(() => {
18268
18268
  var m;
18269
18269
  return Ys[((m = t.value) == null ? void 0 : m.kind) ?? "rectangle"] ?? Ys.rectangle;
18270
18270
  }), d = O(() => {
18271
18271
  const m = a.value;
18272
18272
  switch (c.value) {
18273
- case Mt.Dashed:
18273
+ case Tt.Dashed:
18274
18274
  return `${m * 3} ${m * 3}`;
18275
- case Mt.None:
18275
+ case Tt.None:
18276
18276
  return "";
18277
18277
  default:
18278
18278
  return "";
@@ -18382,7 +18382,7 @@ const PS = { key: 1 }, LS = ["innerHTML"], Au = /* @__PURE__ */ q({
18382
18382
  y();
18383
18383
  },
18384
18384
  { immediate: !0 }
18385
- ), wt(() => {
18385
+ ), kt(() => {
18386
18386
  y();
18387
18387
  }), pe(
18388
18388
  () => o.block.size[1],
@@ -18903,7 +18903,7 @@ function kl() {
18903
18903
  function Ro(n) {
18904
18904
  return Iu(n) ? (n.nodeName || "").toLowerCase() : "#document";
18905
18905
  }
18906
- function vt(n) {
18906
+ function wt(n) {
18907
18907
  var e;
18908
18908
  return (n == null || (e = n.ownerDocument) == null ? void 0 : e.defaultView) || window;
18909
18909
  }
@@ -18912,16 +18912,16 @@ function on(n) {
18912
18912
  return (e = (Iu(n) ? n.ownerDocument : n.document) || window.document) == null ? void 0 : e.documentElement;
18913
18913
  }
18914
18914
  function Iu(n) {
18915
- return kl() ? n instanceof Node || n instanceof vt(n).Node : !1;
18915
+ return kl() ? n instanceof Node || n instanceof wt(n).Node : !1;
18916
18916
  }
18917
18917
  function zt(n) {
18918
- return kl() ? n instanceof Element || n instanceof vt(n).Element : !1;
18918
+ return kl() ? n instanceof Element || n instanceof wt(n).Element : !1;
18919
18919
  }
18920
18920
  function en(n) {
18921
- return kl() ? n instanceof HTMLElement || n instanceof vt(n).HTMLElement : !1;
18921
+ return kl() ? n instanceof HTMLElement || n instanceof wt(n).HTMLElement : !1;
18922
18922
  }
18923
18923
  function rh(n) {
18924
- return !kl() || typeof ShadowRoot > "u" ? !1 : n instanceof ShadowRoot || n instanceof vt(n).ShadowRoot;
18924
+ return !kl() || typeof ShadowRoot > "u" ? !1 : n instanceof ShadowRoot || n instanceof wt(n).ShadowRoot;
18925
18925
  }
18926
18926
  const mC = /* @__PURE__ */ new Set(["inline", "contents"]);
18927
18927
  function vs(n) {
@@ -18971,7 +18971,7 @@ function sr(n) {
18971
18971
  return SC.has(Ro(n));
18972
18972
  }
18973
18973
  function Ft(n) {
18974
- return vt(n).getComputedStyle(n);
18974
+ return wt(n).getComputedStyle(n);
18975
18975
  }
18976
18976
  function xl(n) {
18977
18977
  return zt(n) ? {
@@ -19001,7 +19001,7 @@ function Yg(n) {
19001
19001
  function hs(n, e, t) {
19002
19002
  var o;
19003
19003
  e === void 0 && (e = []), t === void 0 && (t = !0);
19004
- const r = Yg(n), s = r === ((o = n.ownerDocument) == null ? void 0 : o.body), i = vt(r);
19004
+ const r = Yg(n), s = r === ((o = n.ownerDocument) == null ? void 0 : o.body), i = wt(r);
19005
19005
  if (s) {
19006
19006
  const l = uc(i);
19007
19007
  return e.concat(i, i.visualViewport || [], vs(r) ? r : [], l && t ? hs(l) : []);
@@ -19041,14 +19041,14 @@ function Yo(n) {
19041
19041
  }
19042
19042
  const CC = /* @__PURE__ */ Yt(0);
19043
19043
  function Zg(n) {
19044
- const e = vt(n);
19044
+ const e = wt(n);
19045
19045
  return !_u() || !e.visualViewport ? CC : {
19046
19046
  x: e.visualViewport.offsetLeft,
19047
19047
  y: e.visualViewport.offsetTop
19048
19048
  };
19049
19049
  }
19050
19050
  function MC(n, e, t) {
19051
- return e === void 0 && (e = !1), !t || e && t !== vt(n) ? !1 : e;
19051
+ return e === void 0 && (e = !1), !t || e && t !== wt(n) ? !1 : e;
19052
19052
  }
19053
19053
  function Eo(n, e, t, o) {
19054
19054
  e === void 0 && (e = !1), t === void 0 && (t = !1);
@@ -19058,11 +19058,11 @@ function Eo(n, e, t, o) {
19058
19058
  const l = MC(s, t, o) ? Zg(s) : Yt(0);
19059
19059
  let a = (r.left + l.x) / i.x, c = (r.top + l.y) / i.y, u = r.width / i.x, d = r.height / i.y;
19060
19060
  if (s) {
19061
- const f = vt(s), h = o && zt(o) ? vt(o) : o;
19061
+ const f = wt(s), h = o && zt(o) ? wt(o) : o;
19062
19062
  let p = f, m = uc(p);
19063
19063
  for (; m && o && h !== p; ) {
19064
19064
  const g = Yo(m), y = m.getBoundingClientRect(), k = Ft(m), w = y.left + (m.clientLeft + parseFloat(k.paddingLeft)) * g.x, v = y.top + (m.clientTop + parseFloat(k.paddingTop)) * g.y;
19065
- a *= g.x, c *= g.y, u *= g.x, d *= g.y, a += w, c += v, p = vt(m), m = uc(p);
19065
+ a *= g.x, c *= g.y, u *= g.x, d *= g.y, a += w, c += v, p = wt(m), m = uc(p);
19066
19066
  }
19067
19067
  }
19068
19068
  return ji({
@@ -19126,7 +19126,7 @@ function AC(n) {
19126
19126
  }
19127
19127
  const sh = 25;
19128
19128
  function IC(n, e) {
19129
- const t = vt(n), o = on(n), r = t.visualViewport;
19129
+ const t = wt(n), o = on(n), r = t.visualViewport;
19130
19130
  let s = o.clientWidth, i = o.clientHeight, l = 0, a = 0;
19131
19131
  if (r) {
19132
19132
  s = r.width, i = r.height;
@@ -19255,7 +19255,7 @@ function lh(n, e) {
19255
19255
  return on(n) === t && (t = t.ownerDocument.body), t;
19256
19256
  }
19257
19257
  function t0(n, e) {
19258
- const t = vt(n);
19258
+ const t = wt(n);
19259
19259
  if (bl(n))
19260
19260
  return t;
19261
19261
  if (!en(n)) {
@@ -19498,7 +19498,7 @@ function gr(n, e, t) {
19498
19498
  update: w
19499
19499
  };
19500
19500
  }
19501
- const VC = ["menu-open"], kt = /* @__PURE__ */ q({
19501
+ const VC = ["menu-open"], bt = /* @__PURE__ */ q({
19502
19502
  __name: "MenuDropdown",
19503
19503
  props: {
19504
19504
  title: {},
@@ -19549,7 +19549,7 @@ const VC = ["menu-open"], kt = /* @__PURE__ */ q({
19549
19549
  ref: d,
19550
19550
  class: Te(["wov-menu-dropdown-trigger", { "is-open": u.value }]),
19551
19551
  "menu-open": u.value || void 0,
19552
- onMousedown: v[0] || (v[0] = At(() => {
19552
+ onMousedown: v[0] || (v[0] = ut(() => {
19553
19553
  }, ["prevent"])),
19554
19554
  onClick: p,
19555
19555
  onMouseenter: y,
@@ -19637,7 +19637,7 @@ const _t = /* @__PURE__ */ Oo(WC, [["render", UC]]), KC = { class: "wov-menu-but
19637
19637
  const a = e.side === "start";
19638
19638
  return `<line x1="${a ? 8 : 4}" y1="12" x2="${a ? 20 : 16}" y2="12" stroke="currentColor" stroke-width="2" stroke-linecap="round" /><g transform="${`translate(${a ? 4 : 20}, 12) scale(${a ? "-0.8, 0.8" : "0.8"})`}">${l.svg}</g>`;
19639
19639
  }
19640
- return (l, a) => (C(), ee(kt, {
19640
+ return (l, a) => (C(), ee(bt, {
19641
19641
  title: n.side === "start" ? "Start Arrow Head" : "End Arrow Head"
19642
19642
  }, {
19643
19643
  button: se(() => [
@@ -19718,7 +19718,7 @@ const _t = /* @__PURE__ */ Oo(WC, [["render", UC]]), KC = { class: "wov-menu-but
19718
19718
  }
19719
19719
  });
19720
19720
  }
19721
- return (i, l) => (C(), ee(kt, { title: "Thickness" }, {
19721
+ return (i, l) => (C(), ee(bt, { title: "Thickness" }, {
19722
19722
  button: se(() => [
19723
19723
  x("div", YC, [
19724
19724
  l[0] || (l[0] = x("svg", {
@@ -19904,7 +19904,7 @@ const _t = /* @__PURE__ */ Oo(WC, [["render", UC]]), KC = { class: "wov-menu-but
19904
19904
  var i;
19905
19905
  (i = t()) == null || i.command(r.command), s();
19906
19906
  }
19907
- return (r, s) => (C(), ee(kt, { title: "More" }, {
19907
+ return (r, s) => (C(), ee(bt, { title: "More" }, {
19908
19908
  button: se(() => [...s[0] || (s[0] = [
19909
19909
  x("div", { class: "wov-block-operations-button" }, [
19910
19910
  x("svg", {
@@ -20038,7 +20038,7 @@ const _t = /* @__PURE__ */ Oo(WC, [["render", UC]]), KC = { class: "wov-menu-but
20038
20038
  ref_key: "sliderRef",
20039
20039
  ref: r,
20040
20040
  class: "wov-color-slider",
20041
- onPointerdown: At(i, ["prevent"])
20041
+ onPointerdown: ut(i, ["prevent"])
20042
20042
  }, [
20043
20043
  n.background ? (C(), A("div", {
20044
20044
  key: 0,
@@ -20118,7 +20118,7 @@ const _t = /* @__PURE__ */ Oo(WC, [["render", UC]]), KC = { class: "wov-menu-but
20118
20118
  ref: i,
20119
20119
  class: "wov-color-picker-selector",
20120
20120
  style: ve({ backgroundColor: h.value }),
20121
- onPointerdown: At(w, ["prevent"])
20121
+ onPointerdown: ut(w, ["prevent"])
20122
20122
  }, [
20123
20123
  x("div", uM, [
20124
20124
  x("div", {
@@ -20224,14 +20224,14 @@ const _t = /* @__PURE__ */ Oo(WC, [["render", UC]]), KC = { class: "wov-menu-but
20224
20224
  key: g,
20225
20225
  class: Te(["wov-color-bubble", { selected: c(g) }]),
20226
20226
  style: ve({ backgroundColor: g }),
20227
- onMousedown: m[1] || (m[1] = At(() => {
20227
+ onMousedown: m[1] || (m[1] = ut(() => {
20228
20228
  }, ["prevent"])),
20229
20229
  onClick: (y) => d(g)
20230
20230
  }, null, 46, mM))), 128)),
20231
20231
  n.withPicker ? (C(), A("div", {
20232
20232
  key: 0,
20233
20233
  class: Te(["wov-color-bubble wov-rainbow-bubble", { selected: u() }]),
20234
- onMousedown: m[2] || (m[2] = At(() => {
20234
+ onMousedown: m[2] || (m[2] = ut(() => {
20235
20235
  }, ["prevent"])),
20236
20236
  onClick: f
20237
20237
  }, null, 34)) : j("", !0)
@@ -20270,7 +20270,7 @@ const _t = /* @__PURE__ */ Oo(WC, [["render", UC]]), KC = { class: "wov-menu-but
20270
20270
  Zo.fromHex(d, f, u);
20271
20271
  });
20272
20272
  }
20273
- return (c, u) => (C(), ee(kt, { title: "Color" }, {
20273
+ return (c, u) => (C(), ee(bt, { title: "Color" }, {
20274
20274
  button: se(() => [
20275
20275
  x("div", gM, [
20276
20276
  x("div", yM, [
@@ -20307,7 +20307,7 @@ const _t = /* @__PURE__ */ Oo(WC, [["render", UC]]), KC = { class: "wov-menu-but
20307
20307
  placement: s,
20308
20308
  middleware: [hr(8), mr(), pr({ padding: 8 })]
20309
20309
  }), l = Symbol("menu-tooltip"), a = O(() => Ns.value[0] === l);
20310
- wt(() => {
20310
+ kt(() => {
20311
20311
  Ns.value.push(l);
20312
20312
  }), $e(() => {
20313
20313
  Ns.value = Ns.value.filter((u) => u !== l);
@@ -20371,7 +20371,7 @@ const _t = /* @__PURE__ */ Oo(WC, [["render", UC]]), KC = { class: "wov-menu-but
20371
20371
  }
20372
20372
  });
20373
20373
  }
20374
- return (a, c) => s.value ? (C(), ee(kt, {
20374
+ return (a, c) => s.value ? (C(), ee(bt, {
20375
20375
  key: 0,
20376
20376
  title: "Thickness"
20377
20377
  }, {
@@ -20480,7 +20480,7 @@ const _t = /* @__PURE__ */ Oo(WC, [["render", UC]]), KC = { class: "wov-menu-but
20480
20480
  });
20481
20481
  }
20482
20482
  const h = B(!1);
20483
- return (p, m) => (C(), ee(kt, { title: "Fill Color" }, {
20483
+ return (p, m) => (C(), ee(bt, { title: "Fill Color" }, {
20484
20484
  button: se(() => [
20485
20485
  x("div", SM, [
20486
20486
  m[1] || (m[1] = x("svg", {
@@ -20578,7 +20578,7 @@ const _t = /* @__PURE__ */ Oo(WC, [["render", UC]]), KC = { class: "wov-menu-but
20578
20578
  }
20579
20579
  });
20580
20580
  }
20581
- return (c, u) => (C(), ee(kt, { title: "Shape Type" }, {
20581
+ return (c, u) => (C(), ee(bt, { title: "Shape Type" }, {
20582
20582
  button: se(() => [
20583
20583
  x("div", OM, [
20584
20584
  u[0] || (u[0] = x("svg", {
@@ -20640,15 +20640,15 @@ const _t = /* @__PURE__ */ Oo(WC, [["render", UC]]), KC = { class: "wov-menu-but
20640
20640
  emits: ["change"],
20641
20641
  setup(n, { emit: e }) {
20642
20642
  const t = e, o = [
20643
- { kind: Mt.Solid, label: "Solid" },
20644
- { kind: Mt.Dashed, label: "Dashed" },
20645
- { kind: Mt.None, label: "None" }
20643
+ { kind: Tt.Solid, label: "Solid" },
20644
+ { kind: Tt.Dashed, label: "Dashed" },
20645
+ { kind: Tt.None, label: "None" }
20646
20646
  ];
20647
20647
  function r(i) {
20648
20648
  switch (i) {
20649
- case Mt.Dashed:
20649
+ case Tt.Dashed:
20650
20650
  return "6 6";
20651
- case Mt.None:
20651
+ case Tt.None:
20652
20652
  return "";
20653
20653
  default:
20654
20654
  return "";
@@ -20674,7 +20674,7 @@ const _t = /* @__PURE__ */ Oo(WC, [["render", UC]]), KC = { class: "wov-menu-but
20674
20674
  y2: "4",
20675
20675
  "stroke-linecap": "round",
20676
20676
  "stroke-dasharray": r(a.kind),
20677
- "stroke-opacity": a.kind === F(Mt).None ? 0.3 : 1
20677
+ "stroke-opacity": a.kind === F(Tt).None ? 0.3 : 1
20678
20678
  }, null, 8, zM)
20679
20679
  ])),
20680
20680
  x("span", null, _e(a.label), 1)
@@ -20708,7 +20708,7 @@ const _t = /* @__PURE__ */ Oo(WC, [["render", UC]]), KC = { class: "wov-menu-but
20708
20708
  return Array.from(m);
20709
20709
  }), l = O(() => i.value.length > 1), a = O(() => i.value[0] ?? "#000000"), c = O(() => {
20710
20710
  const m = r.value.values().next().value;
20711
- return (m == null ? void 0 : m.strokeKind) ?? Mt.Solid;
20711
+ return (m == null ? void 0 : m.strokeKind) ?? Tt.Solid;
20712
20712
  }), u = O(() => {
20713
20713
  const m = /* @__PURE__ */ new Set();
20714
20714
  for (const g of r.value.values())
@@ -20744,7 +20744,7 @@ const _t = /* @__PURE__ */ Oo(WC, [["render", UC]]), KC = { class: "wov-menu-but
20744
20744
  }
20745
20745
  });
20746
20746
  }
20747
- return (m, g) => (C(), ee(kt, { title: "Stroke Color" }, {
20747
+ return (m, g) => (C(), ee(bt, { title: "Stroke Color" }, {
20748
20748
  button: se(() => [
20749
20749
  x("div", HM, [
20750
20750
  g[1] || (g[1] = x("svg", {
@@ -20836,7 +20836,7 @@ const _t = /* @__PURE__ */ Oo(WC, [["render", UC]]), KC = { class: "wov-menu-but
20836
20836
  }
20837
20837
  });
20838
20838
  }
20839
- return (l, a) => (C(), ee(kt, { title: "Tape Style" }, {
20839
+ return (l, a) => (C(), ee(bt, { title: "Tape Style" }, {
20840
20840
  button: se(() => [
20841
20841
  x("div", JM, [
20842
20842
  x("div", {
@@ -20852,7 +20852,7 @@ const _t = /* @__PURE__ */ Oo(WC, [["render", UC]]), KC = { class: "wov-menu-but
20852
20852
  key: c.url,
20853
20853
  class: Te(["wov-tape-image-bubble", { selected: s.value === c.url }]),
20854
20854
  style: ve({ backgroundImage: `url(${c.url})` }),
20855
- onMousedown: a[0] || (a[0] = At(() => {
20855
+ onMousedown: a[0] || (a[0] = ut(() => {
20856
20856
  }, ["prevent"])),
20857
20857
  onClick: (u) => i(c.url)
20858
20858
  }, null, 46, YM)), 64))
@@ -20861,22 +20861,27 @@ const _t = /* @__PURE__ */ Oo(WC, [["render", UC]]), KC = { class: "wov-menu-but
20861
20861
  _: 1
20862
20862
  }));
20863
20863
  }
20864
- }), ZM = {
20864
+ }), ZM = [
20865
+ { label: "Small", value: 16, displayValue: 10 },
20866
+ { label: "Medium", value: 24, displayValue: 12 },
20867
+ { label: "Large", value: 40, displayValue: 16 },
20868
+ { label: "Huge", value: 96, displayValue: 20 }
20869
+ ], QM = {
20865
20870
  key: 0,
20866
20871
  xmlns: "http://www.w3.org/2000/svg",
20867
20872
  viewBox: "0 0 448 512",
20868
20873
  fill: "currentColor"
20869
- }, QM = {
20874
+ }, eT = {
20870
20875
  key: 1,
20871
20876
  xmlns: "http://www.w3.org/2000/svg",
20872
20877
  viewBox: "0 0 448 512",
20873
20878
  fill: "currentColor"
20874
- }, eT = {
20879
+ }, tT = {
20875
20880
  key: 2,
20876
20881
  xmlns: "http://www.w3.org/2000/svg",
20877
20882
  viewBox: "0 0 448 512",
20878
20883
  fill: "currentColor"
20879
- }, tT = {
20884
+ }, nT = {
20880
20885
  key: 3,
20881
20886
  xmlns: "http://www.w3.org/2000/svg",
20882
20887
  viewBox: "0 0 448 512",
@@ -20903,13 +20908,13 @@ const _t = /* @__PURE__ */ Oo(WC, [["render", UC]]), KC = { class: "wov-menu-but
20903
20908
  onClick: s
20904
20909
  }, {
20905
20910
  default: se(() => [
20906
- F(t).alignment === F(un).Left ? (C(), A("svg", ZM, [...l[0] || (l[0] = [
20911
+ F(t).alignment === F(un).Left ? (C(), A("svg", QM, [...l[0] || (l[0] = [
20907
20912
  x("path", { d: "M288 64c0 17.7-14.3 32-32 32L32 96C14.3 96 0 81.7 0 64S14.3 32 32 32l224 0c17.7 0 32 14.3 32 32zm0 256c0 17.7-14.3 32-32 32L32 352c-17.7 0-32-14.3-32-32s14.3-32 32-32l224 0c17.7 0 32 14.3 32 32zM0 192c0-17.7 14.3-32 32-32l384 0c17.7 0 32 14.3 32 32s-14.3 32-32 32L32 224c-17.7 0-32-14.3-32-32zM448 448c0 17.7-14.3 32-32 32L32 480c-17.7 0-32-14.3-32-32s14.3-32 32-32l384 0c17.7 0 32 14.3 32 32z" }, null, -1)
20908
- ])])) : F(t).alignment === F(un).Center ? (C(), A("svg", QM, [...l[1] || (l[1] = [
20913
+ ])])) : F(t).alignment === F(un).Center ? (C(), A("svg", eT, [...l[1] || (l[1] = [
20909
20914
  x("path", { d: "M352 64c0-17.7-14.3-32-32-32L128 32c-17.7 0-32 14.3-32 32s14.3 32 32 32l192 0c17.7 0 32-14.3 32-32zm96 128c0-17.7-14.3-32-32-32L32 160c-17.7 0-32 14.3-32 32s14.3 32 32 32l384 0c17.7 0 32-14.3 32-32zM0 448c0 17.7 14.3 32 32 32l384 0c17.7 0 32-14.3 32-32s-14.3-32-32-32L32 416c-17.7 0-32 14.3-32 32zM352 320c0-17.7-14.3-32-32-32l-192 0c-17.7 0-32 14.3-32 32s14.3 32 32 32l192 0c17.7 0 32-14.3 32-32z" }, null, -1)
20910
- ])])) : F(t).alignment === F(un).Right ? (C(), A("svg", eT, [...l[2] || (l[2] = [
20915
+ ])])) : F(t).alignment === F(un).Right ? (C(), A("svg", tT, [...l[2] || (l[2] = [
20911
20916
  x("path", { d: "M448 64c0 17.7-14.3 32-32 32L192 96c-17.7 0-32-14.3-32-32s14.3-32 32-32l224 0c17.7 0 32 14.3 32 32zm0 256c0 17.7-14.3 32-32 32l-224 0c-17.7 0-32-14.3-32-32s14.3-32 32-32l224 0c17.7 0 32 14.3 32 32zM0 192c0-17.7 14.3-32 32-32l384 0c17.7 0 32 14.3 32 32s-14.3 32-32 32L32 224c-17.7 0-32-14.3-32-32zM448 448c0 17.7-14.3 32-32 32L32 480c-17.7 0-32-14.3-32-32s14.3-32 32-32l384 0c17.7 0 32 14.3 32 32z" }, null, -1)
20912
- ])])) : (C(), A("svg", tT, [...l[3] || (l[3] = [
20917
+ ])])) : (C(), A("svg", nT, [...l[3] || (l[3] = [
20913
20918
  x("path", { d: "M448 64c0-17.7-14.3-32-32-32L32 32C14.3 32 0 46.3 0 64S14.3 96 32 96l384 0c17.7 0 32-14.3 32-32zm0 256c0-17.7-14.3-32-32-32L32 288c-17.7 0-32 14.3-32 32s14.3 32 32 32l384 0c17.7 0 32-14.3 32-32zM0 192c0 17.7 14.3 32 32 32l384 0c17.7 0 32-14.3 32-32s-14.3-32-32-32L32 160c-17.7 0-32 14.3-32 32zM448 448c0-17.7-14.3-32-32-32L32 416c-17.7 0-32 14.3-32 32s14.3 32 32 32l384 0c17.7 0 32-14.3 32-32z" }, null, -1)
20914
20919
  ])]))
20915
20920
  ]),
@@ -20942,29 +20947,29 @@ const _t = /* @__PURE__ */ Oo(WC, [["render", UC]]), KC = { class: "wov-menu-but
20942
20947
  }, 8, ["class", "onClick"])) : j("", !0);
20943
20948
  }
20944
20949
  });
20945
- function nT(n, e) {
20950
+ function oT(n, e) {
20946
20951
  return Vh() ? (Wh(n, e), !0) : !1;
20947
20952
  }
20948
- const oT = typeof window < "u" && typeof document < "u";
20953
+ const rT = typeof window < "u" && typeof document < "u";
20949
20954
  typeof WorkerGlobalScope < "u" && globalThis instanceof WorkerGlobalScope;
20950
- const rT = Object.prototype.toString, sT = (n) => rT.call(n) === "[object Object]", Ps = () => {
20955
+ const sT = Object.prototype.toString, iT = (n) => sT.call(n) === "[object Object]", Ps = () => {
20951
20956
  };
20952
20957
  function Hs(n) {
20953
20958
  return Array.isArray(n) ? n : [n];
20954
20959
  }
20955
- function iT(n) {
20960
+ function lT(n) {
20956
20961
  return Cc();
20957
20962
  }
20958
- function lT(n, e = !0, t) {
20959
- iT() ? wt(n, t) : e ? n() : Gn(n);
20963
+ function aT(n, e = !0, t) {
20964
+ lT() ? kt(n, t) : e ? n() : Gn(n);
20960
20965
  }
20961
- function aT(n, e, t) {
20966
+ function cT(n, e, t) {
20962
20967
  return pe(n, e, {
20963
20968
  ...t,
20964
20969
  immediate: !0
20965
20970
  });
20966
20971
  }
20967
- const Tl = oT ? window : void 0;
20972
+ const Tl = rT ? window : void 0;
20968
20973
  function $t(n) {
20969
20974
  var e;
20970
20975
  const t = st(n);
@@ -20975,7 +20980,7 @@ function ga(...n) {
20975
20980
  const o = Hs(st(n[0])).filter((r) => r != null);
20976
20981
  return o.every((r) => typeof r != "string") ? o : void 0;
20977
20982
  });
20978
- return aT(() => {
20983
+ return cT(() => {
20979
20984
  var o, r;
20980
20985
  return [
20981
20986
  (o = (r = t.value) === null || r === void 0 ? void 0 : r.map((s) => $t(s))) !== null && o !== void 0 ? o : [Tl].filter((s) => s != null),
@@ -20985,13 +20990,13 @@ function ga(...n) {
20985
20990
  ];
20986
20991
  }, ([o, r, s, i], l, a) => {
20987
20992
  if (!(o != null && o.length) || !(r != null && r.length) || !(s != null && s.length)) return;
20988
- const c = sT(i) ? { ...i } : i, u = o.flatMap((d) => r.flatMap((f) => s.map((h) => e(d, f, h, c))));
20993
+ const c = iT(i) ? { ...i } : i, u = o.flatMap((d) => r.flatMap((f) => s.map((h) => e(d, f, h, c))));
20989
20994
  a(() => {
20990
20995
  u.forEach((d) => d());
20991
20996
  });
20992
20997
  }, { flush: "post" });
20993
20998
  }
20994
- function cT(n, e, t = {}) {
20999
+ function uT(n, e, t = {}) {
20995
21000
  const { window: o = Tl, ignore: r = [], capture: s = !0, detectIframe: i = !1, controls: l = !1 } = t;
20996
21001
  if (!o) return l ? {
20997
21002
  stop: Ps,
@@ -21057,21 +21062,21 @@ function cT(n, e, t = {}) {
21057
21062
  } : m;
21058
21063
  }
21059
21064
  // @__NO_SIDE_EFFECTS__
21060
- function uT() {
21065
+ function dT() {
21061
21066
  const n = Ae(!1), e = Cc();
21062
- return e && wt(() => {
21067
+ return e && kt(() => {
21063
21068
  n.value = !0;
21064
21069
  }, e), n;
21065
21070
  }
21066
21071
  // @__NO_SIDE_EFFECTS__
21067
- function dT(n) {
21068
- const e = /* @__PURE__ */ uT();
21072
+ function fT(n) {
21073
+ const e = /* @__PURE__ */ dT();
21069
21074
  return O(() => (e.value, !!n()));
21070
21075
  }
21071
- function fT(n, e, t = {}) {
21076
+ function hT(n, e, t = {}) {
21072
21077
  const { window: o = Tl, ...r } = t;
21073
21078
  let s;
21074
- const i = /* @__PURE__ */ dT(() => o && "ResizeObserver" in o), l = () => {
21079
+ const i = /* @__PURE__ */ fT(() => o && "ResizeObserver" in o), l = () => {
21075
21080
  s && (s.disconnect(), s = void 0);
21076
21081
  }, a = pe(O(() => {
21077
21082
  const u = st(n);
@@ -21087,7 +21092,7 @@ function fT(n, e, t = {}) {
21087
21092
  }), c = () => {
21088
21093
  l(), a();
21089
21094
  };
21090
- return nT(c), {
21095
+ return oT(c), {
21091
21096
  isSupported: i,
21092
21097
  stop: c
21093
21098
  };
@@ -21099,7 +21104,7 @@ function r0(n, e = {
21099
21104
  const { window: o = Tl, box: r = "content-box" } = t, s = O(() => {
21100
21105
  var d;
21101
21106
  return (d = $t(n)) === null || d === void 0 || (d = d.namespaceURI) === null || d === void 0 ? void 0 : d.includes("svg");
21102
- }), i = Ae(e.width), l = Ae(e.height), { stop: a } = fT(n, ([d]) => {
21107
+ }), i = Ae(e.width), l = Ae(e.height), { stop: a } = hT(n, ([d]) => {
21103
21108
  const f = r === "border-box" ? d.borderBoxSize : r === "content-box" ? d.contentBoxSize : d.devicePixelContentBoxSize;
21104
21109
  if (o && s.value) {
21105
21110
  const h = $t(n);
@@ -21113,7 +21118,7 @@ function r0(n, e = {
21113
21118
  } else
21114
21119
  i.value = d.contentRect.width, l.value = d.contentRect.height;
21115
21120
  }, t);
21116
- lT(() => {
21121
+ aT(() => {
21117
21122
  const d = $t(n);
21118
21123
  d && (i.value = "offsetWidth" in d ? d.offsetWidth : e.width, l.value = "offsetHeight" in d ? d.offsetHeight : e.height);
21119
21124
  });
@@ -21129,7 +21134,7 @@ function r0(n, e = {
21129
21134
  stop: u
21130
21135
  };
21131
21136
  }
21132
- function hT() {
21137
+ function pT() {
21133
21138
  const n = ge(Ue);
21134
21139
  if (!n)
21135
21140
  throw new Error("useFonts must be used within a WovenCanvas component");
@@ -21138,13 +21143,13 @@ function hT() {
21138
21143
  return e ? e.fonts.filter((t) => t.selectable) : [];
21139
21144
  });
21140
21145
  }
21141
- const pT = { class: "wov-font-family-button" }, mT = { class: "wov-font-family-label" }, gT = { class: "wov-font-list" }, yT = ["onClick"], vT = ["src", "alt"], ph = /* @__PURE__ */ q({
21146
+ const mT = { class: "wov-font-family-button" }, gT = { class: "wov-font-family-label" }, yT = { class: "wov-font-list" }, vT = ["onClick"], wT = ["src", "alt"], ph = /* @__PURE__ */ q({
21142
21147
  __name: "TextFontFamilyButton",
21143
21148
  props: {
21144
21149
  entityIds: {}
21145
21150
  },
21146
21151
  setup(n) {
21147
- const e = n, { state: t, commands: o } = nn(() => e.entityIds), r = hT(), s = O(() => r.value.map((u) => ({
21152
+ const e = n, { state: t, commands: o } = nn(() => e.entityIds), r = pT(), s = O(() => r.value.map((u) => ({
21148
21153
  name: u.name,
21149
21154
  displayName: u.displayName,
21150
21155
  previewImage: u.previewImage
@@ -21160,13 +21165,13 @@ const pT = { class: "wov-font-family-button" }, mT = { class: "wov-font-family-l
21160
21165
  function c(u) {
21161
21166
  u.stopPropagation();
21162
21167
  }
21163
- return (u, d) => F(t).showTextMenuButtons ? (C(), ee(kt, {
21168
+ return (u, d) => F(t).showTextMenuButtons ? (C(), ee(bt, {
21164
21169
  key: 0,
21165
21170
  title: "Font Family"
21166
21171
  }, {
21167
21172
  button: se(() => [
21168
- x("div", pT, [
21169
- x("span", mT, _e(l.value), 1),
21173
+ x("div", mT, [
21174
+ x("span", gT, _e(l.value), 1),
21170
21175
  Z(_t, { class: "wov-chevron-down" })
21171
21176
  ])
21172
21177
  ]),
@@ -21174,10 +21179,10 @@ const pT = { class: "wov-font-family-button" }, mT = { class: "wov-font-family-l
21174
21179
  x("div", {
21175
21180
  class: "wov-font-family-menu",
21176
21181
  onWheel: c,
21177
- onClick: d[0] || (d[0] = At(() => {
21182
+ onClick: d[0] || (d[0] = ut(() => {
21178
21183
  }, ["stop"]))
21179
21184
  }, [
21180
- x("div", gT, [
21185
+ x("div", yT, [
21181
21186
  (C(!0), A(ie, null, Se(s.value, (f) => (C(), A("div", {
21182
21187
  key: f.name,
21183
21188
  class: Te(["wov-font-item", { active: i.value === f.name }]),
@@ -21190,97 +21195,142 @@ const pT = { class: "wov-font-family-button" }, mT = { class: "wov-font-family-l
21190
21195
  alt: f.name,
21191
21196
  loading: "lazy",
21192
21197
  decoding: "async"
21193
- }, null, 8, vT)) : (C(), A("span", {
21198
+ }, null, 8, wT)) : (C(), A("span", {
21194
21199
  key: 1,
21195
21200
  class: "wov-font-name",
21196
21201
  style: ve({ fontFamily: f.name })
21197
21202
  }, _e(f.displayName), 5))
21198
- ], 10, yT))), 128))
21203
+ ], 10, vT))), 128))
21199
21204
  ])
21200
21205
  ], 32)
21201
21206
  ]),
21202
21207
  _: 1
21203
21208
  })) : j("", !0);
21204
21209
  }
21205
- }), wT = { class: "wov-font-size-button" }, kT = { class: "wov-font-size-label" }, bT = ["onClick"], xT = {
21210
+ }), kT = { class: "wov-font-size-button" }, bT = { class: "wov-font-size-label" }, xT = ["onClick"], ST = {
21206
21211
  key: 0,
21207
21212
  class: "wov-check-icon",
21208
21213
  xmlns: "http://www.w3.org/2000/svg",
21209
21214
  viewBox: "0 0 448 512",
21210
21215
  fill: "currentColor"
21211
- }, ST = { class: "wov-input-container" }, CT = ["value"], mh = /* @__PURE__ */ q({
21216
+ }, CT = { class: "wov-input-container" }, MT = ["value"], TT = { class: "wov-size-stepper" }, ET = 1, mh = /* @__PURE__ */ q({
21212
21217
  __name: "TextFontSizeButton",
21213
21218
  props: {
21214
- entityIds: {}
21219
+ entityIds: {},
21220
+ sizeOptions: { default: () => ZM }
21215
21221
  },
21216
21222
  setup(n) {
21217
- const e = n, { state: t, commands: o } = nn(() => e.entityIds), r = [
21218
- { label: "Small", value: 16, displayValue: 10 },
21219
- { label: "Medium", value: 24, displayValue: 12 },
21220
- { label: "Large", value: 40, displayValue: 16 },
21221
- { label: "Huge", value: 96, displayValue: 20 }
21222
- ], s = O(() => t.fontSize), i = O(() => {
21223
- const f = s.value;
21224
- if (f === null) return "Mixed";
21225
- const h = r.find((p) => p.value === f);
21226
- return h ? h.label : `${+f.toFixed(1)} px`;
21223
+ const e = n, { state: t, commands: o } = nn(() => e.entityIds), r = B(null), s = O(() => t.fontSize), i = O(() => {
21224
+ const h = s.value;
21225
+ if (h === null) return "Mixed";
21226
+ const p = e.sizeOptions.find((m) => m.value === h);
21227
+ return p ? p.label : `${+h.toFixed(1)} px`;
21227
21228
  }), l = O(() => {
21228
- const f = s.value;
21229
- return f === null ? "" : String(+f.toFixed(1));
21229
+ const h = s.value;
21230
+ return h === null ? "" : String(+h.toFixed(1));
21230
21231
  });
21231
- function a(f) {
21232
- o.setFontSize(f);
21232
+ function a(h) {
21233
+ o.setFontSize(h);
21233
21234
  }
21234
- function c(f) {
21235
- const h = f.target, p = Number.parseFloat(h.value);
21236
- !Number.isNaN(p) && p > 0 && a(p);
21235
+ function c(h) {
21236
+ const p = h.target, m = Number.parseFloat(p.value);
21237
+ if (Number.isNaN(m) || m <= 0) {
21238
+ p.value = l.value;
21239
+ return;
21240
+ }
21241
+ a(m);
21237
21242
  }
21238
- function u(f) {
21239
- f.key === "Enter" && f.target.blur();
21243
+ function u(h) {
21244
+ var y;
21245
+ const p = Number.parseFloat(((y = r.value) == null ? void 0 : y.value) ?? ""), m = Number.isNaN(p) ? s.value : p;
21246
+ if (m === null) return;
21247
+ const g = Math.max(+(m + h).toFixed(1), ET);
21248
+ r.value && (r.value.value = String(g)), a(g);
21240
21249
  }
21241
- function d(f) {
21242
- f.stopPropagation();
21250
+ function d(h) {
21251
+ h.key === "Enter" ? h.target.blur() : h.key === "ArrowUp" ? (h.preventDefault(), u(1)) : h.key === "ArrowDown" && (h.preventDefault(), u(-1));
21243
21252
  }
21244
- return (f, h) => F(t).showTextMenuButtons ? (C(), ee(kt, {
21253
+ function f(h) {
21254
+ h.stopPropagation();
21255
+ }
21256
+ return (h, p) => F(t).showTextMenuButtons ? (C(), ee(bt, {
21245
21257
  key: 0,
21246
21258
  title: "Font Size"
21247
21259
  }, {
21248
21260
  button: se(() => [
21249
- x("div", wT, [
21250
- x("span", kT, _e(i.value), 1),
21261
+ x("div", kT, [
21262
+ x("span", bT, _e(i.value), 1),
21251
21263
  Z(_t, { class: "wov-chevron-down" })
21252
21264
  ])
21253
21265
  ]),
21254
21266
  dropdown: se(() => [
21255
21267
  x("div", {
21256
21268
  class: "wov-font-size-menu",
21257
- onWheel: d,
21258
- onClick: h[0] || (h[0] = At(() => {
21269
+ onWheel: f,
21270
+ onClick: p[4] || (p[4] = ut(() => {
21271
+ }, ["stop"])),
21272
+ onKeydown: p[5] || (p[5] = ut(() => {
21259
21273
  }, ["stop"]))
21260
21274
  }, [
21261
- (C(), A(ie, null, Se(r, (p) => x("div", {
21262
- key: p.value,
21263
- class: Te(["wov-font-size-option", { active: s.value === p.value }]),
21264
- onClick: (m) => a(p.value)
21275
+ (C(!0), A(ie, null, Se(n.sizeOptions, (m) => (C(), A("div", {
21276
+ key: m.value,
21277
+ class: Te(["wov-font-size-option", { active: s.value === m.value }]),
21278
+ onClick: (g) => a(m.value)
21265
21279
  }, [
21266
- s.value === p.value ? (C(), A("svg", xT, [...h[1] || (h[1] = [
21280
+ s.value === m.value ? (C(), A("svg", ST, [...p[6] || (p[6] = [
21267
21281
  x("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)
21268
21282
  ])])) : j("", !0),
21269
21283
  x("span", {
21270
21284
  class: "wov-option-label",
21271
- style: ve({ fontSize: `${p.displayValue}px` })
21272
- }, _e(p.label), 5)
21273
- ], 10, bT)), 64)),
21274
- h[3] || (h[3] = x("div", { class: "wov-separator" }, null, -1)),
21275
- x("div", ST, [
21285
+ style: ve({ fontSize: `${m.displayValue}px` })
21286
+ }, _e(m.label), 5)
21287
+ ], 10, xT))), 128)),
21288
+ p[10] || (p[10] = x("div", { class: "wov-separator" }, null, -1)),
21289
+ x("div", CT, [
21276
21290
  x("input", {
21291
+ ref_key: "inputRef",
21292
+ ref: r,
21277
21293
  class: "wov-custom-input",
21278
21294
  value: l.value,
21279
- onInput: c,
21280
- onKeydown: u,
21295
+ onChange: c,
21296
+ onKeydown: d,
21281
21297
  placeholder: "Custom size"
21282
- }, null, 40, CT),
21283
- h[2] || (h[2] = x("span", { class: "wov-px-suffix" }, "px", -1))
21298
+ }, null, 40, MT),
21299
+ p[9] || (p[9] = x("span", { class: "wov-px-suffix" }, "px", -1)),
21300
+ x("div", TT, [
21301
+ x("button", {
21302
+ class: "wov-size-stepper-button",
21303
+ title: "Increase size",
21304
+ onMousedown: p[0] || (p[0] = ut(() => {
21305
+ }, ["prevent"])),
21306
+ onClick: p[1] || (p[1] = (m) => u(1))
21307
+ }, [...p[7] || (p[7] = [
21308
+ x("svg", {
21309
+ class: "wov-size-stepper-icon up",
21310
+ xmlns: "http://www.w3.org/2000/svg",
21311
+ viewBox: "0 0 512 320",
21312
+ fill: "currentColor"
21313
+ }, [
21314
+ x("path", { d: "M233.4 278.6c12.5 12.5 32.8 12.5 45.3 0l192-192c12.5-12.5 12.5-32.8 0-45.3s-32.8-12.5-45.3 0L256 210.7 86.6 41.4c-12.5-12.5-32.8-12.5-45.3 0s-12.5 32.8 0 45.3l192 192z" })
21315
+ ], -1)
21316
+ ])], 32),
21317
+ x("button", {
21318
+ class: "wov-size-stepper-button",
21319
+ title: "Decrease size",
21320
+ onMousedown: p[2] || (p[2] = ut(() => {
21321
+ }, ["prevent"])),
21322
+ onClick: p[3] || (p[3] = (m) => u(-1))
21323
+ }, [...p[8] || (p[8] = [
21324
+ x("svg", {
21325
+ class: "wov-size-stepper-icon",
21326
+ xmlns: "http://www.w3.org/2000/svg",
21327
+ viewBox: "0 0 512 320",
21328
+ fill: "currentColor"
21329
+ }, [
21330
+ x("path", { d: "M233.4 278.6c12.5 12.5 32.8 12.5 45.3 0l192-192c12.5-12.5 12.5-32.8 0-45.3s-32.8-12.5-45.3 0L256 210.7 86.6 41.4c-12.5-12.5-32.8-12.5-45.3 0s-12.5 32.8 0 45.3l192 192z" })
21331
+ ], -1)
21332
+ ])], 32)
21333
+ ])
21284
21334
  ])
21285
21335
  ], 32)
21286
21336
  ]),
@@ -21337,7 +21387,7 @@ const pT = { class: "wov-font-family-button" }, mT = { class: "wov-font-family-l
21337
21387
  _: 1
21338
21388
  }, 8, ["class", "onClick"])) : j("", !0);
21339
21389
  }
21340
- }), MT = { class: "wov-link-input-container" }, TT = ["onKeydown"], vh = /* @__PURE__ */ q({
21390
+ }), AT = { class: "wov-link-input-container" }, IT = ["onKeydown"], vh = /* @__PURE__ */ q({
21341
21391
  __name: "TextLinkButton",
21342
21392
  props: {
21343
21393
  entityIds: {}
@@ -21401,10 +21451,10 @@ const pT = { class: "wov-font-family-button" }, mT = { class: "wov-font-family-l
21401
21451
  ref: a,
21402
21452
  class: "wov-link-input-dropdown",
21403
21453
  style: ve(F(u)),
21404
- onKeydown: g[2] || (g[2] = At(() => {
21454
+ onKeydown: g[2] || (g[2] = ut(() => {
21405
21455
  }, ["stop"]))
21406
21456
  }, [
21407
- x("div", MT, [
21457
+ x("div", AT, [
21408
21458
  jh(x("input", {
21409
21459
  ref_key: "inputRef",
21410
21460
  ref: i,
@@ -21412,10 +21462,10 @@ const pT = { class: "wov-font-family-button" }, mT = { class: "wov-font-family-l
21412
21462
  class: "wov-link-input",
21413
21463
  placeholder: "Paste or type URL",
21414
21464
  onKeydown: [
21415
- td(At(f, ["prevent"]), ["enter"]),
21416
- g[1] || (g[1] = td(At((y) => r.value = !1, ["prevent"]), ["esc"]))
21465
+ td(ut(f, ["prevent"]), ["enter"]),
21466
+ g[1] || (g[1] = td(ut((y) => r.value = !1, ["prevent"]), ["esc"]))
21417
21467
  ]
21418
- }, null, 40, TT), [
21468
+ }, null, 40, IT), [
21419
21469
  [Uh, s.value]
21420
21470
  ]),
21421
21471
  s.value || F(t).linkHref ? (C(), A("button", {
@@ -21450,7 +21500,7 @@ const pT = { class: "wov-font-family-button" }, mT = { class: "wov-font-family-l
21450
21500
  ], 8, ["to"])) : j("", !0)
21451
21501
  ], 64));
21452
21502
  }
21453
- }), ET = { class: "wov-text-color-button" }, AT = { class: "wov-text-icon-container" }, wh = /* @__PURE__ */ q({
21503
+ }), OT = { class: "wov-text-color-button" }, _T = { class: "wov-text-icon-container" }, wh = /* @__PURE__ */ q({
21454
21504
  __name: "TextColorButton",
21455
21505
  props: {
21456
21506
  entityIds: {}
@@ -21460,13 +21510,13 @@ const pT = { class: "wov-font-family-button" }, mT = { class: "wov-font-family-l
21460
21510
  function i(l) {
21461
21511
  o.setColor(ds(l));
21462
21512
  }
21463
- return (l, a) => F(t).showTextMenuButtons ? (C(), ee(kt, {
21513
+ return (l, a) => F(t).showTextMenuButtons ? (C(), ee(bt, {
21464
21514
  key: 0,
21465
21515
  title: "Text Color"
21466
21516
  }, {
21467
21517
  button: se(() => [
21468
- x("div", ET, [
21469
- x("div", AT, [
21518
+ x("div", OT, [
21519
+ x("div", _T, [
21470
21520
  a[0] || (a[0] = x("svg", {
21471
21521
  xmlns: "http://www.w3.org/2000/svg",
21472
21522
  viewBox: "0 0 640 640",
@@ -21493,7 +21543,7 @@ const pT = { class: "wov-font-family-button" }, mT = { class: "wov-font-family-l
21493
21543
  _: 1
21494
21544
  })) : j("", !0);
21495
21545
  }
21496
- }), IT = {
21546
+ }), DT = {
21497
21547
  key: 0,
21498
21548
  xmlns: "http://www.w3.org/2000/svg",
21499
21549
  width: "24",
@@ -21505,7 +21555,7 @@ const pT = { class: "wov-font-family-button" }, mT = { class: "wov-font-family-l
21505
21555
  "stroke-linecap": "round",
21506
21556
  "stroke-linejoin": "round",
21507
21557
  class: "lucide lucide-align-vertical-justify-start-icon lucide-align-vertical-justify-start"
21508
- }, OT = {
21558
+ }, NT = {
21509
21559
  key: 1,
21510
21560
  xmlns: "http://www.w3.org/2000/svg",
21511
21561
  width: "24",
@@ -21517,7 +21567,7 @@ const pT = { class: "wov-font-family-button" }, mT = { class: "wov-font-family-l
21517
21567
  "stroke-linecap": "round",
21518
21568
  "stroke-linejoin": "round",
21519
21569
  class: "lucide lucide-align-vertical-justify-center-icon lucide-align-vertical-justify-center"
21520
- }, _T = {
21570
+ }, RT = {
21521
21571
  key: 2,
21522
21572
  xmlns: "http://www.w3.org/2000/svg",
21523
21573
  width: "24",
@@ -21561,7 +21611,7 @@ const pT = { class: "wov-font-family-button" }, mT = { class: "wov-font-family-l
21561
21611
  onClick: l
21562
21612
  }, {
21563
21613
  default: se(() => [
21564
- i.value === F(Ze).Top || i.value === null ? (C(), A("svg", IT, [...c[0] || (c[0] = [
21614
+ i.value === F(Ze).Top || i.value === null ? (C(), A("svg", DT, [...c[0] || (c[0] = [
21565
21615
  x("rect", {
21566
21616
  width: "14",
21567
21617
  height: "6",
@@ -21577,7 +21627,7 @@ const pT = { class: "wov-font-family-button" }, mT = { class: "wov-font-family-l
21577
21627
  rx: "2"
21578
21628
  }, null, -1),
21579
21629
  x("path", { d: "M2 2h20" }, null, -1)
21580
- ])])) : i.value === F(Ze).Center ? (C(), A("svg", OT, [...c[1] || (c[1] = [
21630
+ ])])) : i.value === F(Ze).Center ? (C(), A("svg", NT, [...c[1] || (c[1] = [
21581
21631
  x("rect", {
21582
21632
  width: "14",
21583
21633
  height: "6",
@@ -21593,7 +21643,7 @@ const pT = { class: "wov-font-family-button" }, mT = { class: "wov-font-family-l
21593
21643
  rx: "2"
21594
21644
  }, null, -1),
21595
21645
  x("path", { d: "M2 12h20" }, null, -1)
21596
- ])])) : (C(), A("svg", _T, [...c[2] || (c[2] = [
21646
+ ])])) : (C(), A("svg", RT, [...c[2] || (c[2] = [
21597
21647
  x("rect", {
21598
21648
  width: "14",
21599
21649
  height: "6",
@@ -21614,7 +21664,7 @@ const pT = { class: "wov-font-family-button" }, mT = { class: "wov-font-family-l
21614
21664
  _: 1
21615
21665
  })) : j("", !0);
21616
21666
  }
21617
- }), DT = { class: "wov-text-group-button" }, NT = { class: "wov-text-group-dropdown" }, RT = { class: "wov-text-group-row wov-text-group-row-full" }, PT = { class: "wov-text-group-row" }, LT = /* @__PURE__ */ q({
21667
+ }), PT = { class: "wov-text-group-button" }, LT = { class: "wov-text-group-dropdown" }, $T = { class: "wov-text-group-row wov-text-group-row-full" }, BT = { class: "wov-text-group-row" }, zT = /* @__PURE__ */ q({
21618
21668
  __name: "TextButtonGroup",
21619
21669
  props: {
21620
21670
  entityIds: {},
@@ -21623,13 +21673,13 @@ const pT = { class: "wov-font-family-button" }, mT = { class: "wov-font-family-l
21623
21673
  setup(n) {
21624
21674
  const e = n, { state: t } = nn(() => e.entityIds), o = ge("containerRef"), { width: r } = r0(o), s = O(() => r.value > 0 && r.value < 600), i = B(/* @__PURE__ */ new Map());
21625
21675
  return ho(ep, i), (l, a) => F(t).showTextMenuButtons ? (C(), A(ie, { key: 0 }, [
21626
- s.value ? (C(), ee(kt, {
21676
+ s.value ? (C(), ee(bt, {
21627
21677
  key: 0,
21628
21678
  title: "Text Formatting",
21629
21679
  placement: "top"
21630
21680
  }, {
21631
21681
  button: se(() => [
21632
- x("div", DT, [
21682
+ x("div", PT, [
21633
21683
  a[0] || (a[0] = x("svg", {
21634
21684
  xmlns: "http://www.w3.org/2000/svg",
21635
21685
  viewBox: "0 0 640 640",
@@ -21642,13 +21692,13 @@ const pT = { class: "wov-font-family-button" }, mT = { class: "wov-font-family-l
21642
21692
  ])
21643
21693
  ]),
21644
21694
  dropdown: se(() => [
21645
- x("div", NT, [
21646
- x("div", RT, [
21695
+ x("div", LT, [
21696
+ x("div", $T, [
21647
21697
  Z(ph, { entityIds: n.entityIds }, null, 8, ["entityIds"]),
21648
21698
  a[1] || (a[1] = x("div", { class: "wov-text-group-spacer" }, null, -1)),
21649
21699
  Z(mh, { entityIds: n.entityIds }, null, 8, ["entityIds"])
21650
21700
  ]),
21651
- x("div", PT, [
21701
+ x("div", BT, [
21652
21702
  Z(hh, { entityIds: n.entityIds }, null, 8, ["entityIds"]),
21653
21703
  Z(gh, { entityIds: n.entityIds }, null, 8, ["entityIds"]),
21654
21704
  Z(yh, { entityIds: n.entityIds }, null, 8, ["entityIds"]),
@@ -21688,7 +21738,7 @@ const pT = { class: "wov-font-family-button" }, mT = { class: "wov-font-family-l
21688
21738
  ], 64))
21689
21739
  ], 64)) : j("", !0);
21690
21740
  }
21691
- }), $T = /* @__PURE__ */ q({
21741
+ }), FT = /* @__PURE__ */ q({
21692
21742
  __name: "CanvasBackground",
21693
21743
  props: {
21694
21744
  background: {}
@@ -21773,8 +21823,8 @@ const pT = { class: "wov-font-family-button" }, mT = { class: "wov-font-family-l
21773
21823
  let N = w * b, R = v * b, W = 0, V = 0, te = Number.POSITIVE_INFINITY, J = Number.POSITIVE_INFINITY;
21774
21824
  for (; ; ) {
21775
21825
  N = b * w, R = b * v, W = Math.floor(T / N) * N, V = Math.floor(E / R) * R;
21776
- const bt = Math.ceil(_ / N) * N, Dt = Math.ceil(D / R) * R;
21777
- if (J = Math.round((bt - W) / w), te = Math.round((Dt - V) / v), Math.max(J, te) > 125)
21826
+ const xt = Math.ceil(_ / N) * N, Dt = Math.ceil(D / R) * R;
21827
+ if (J = Math.round((xt - W) / w), te = Math.round((Dt - V) / v), Math.max(J, te) > 125)
21778
21828
  w *= 2, v *= 2;
21779
21829
  else
21780
21830
  break;
@@ -21801,8 +21851,8 @@ const pT = { class: "wov-font-family-button" }, mT = { class: "wov-font-family-l
21801
21851
  let N = w * b, R = v * b, W = 0, V = 0, te = Number.POSITIVE_INFINITY, J = Number.POSITIVE_INFINITY;
21802
21852
  for (; ; ) {
21803
21853
  N = b * w, R = b * v, W = Math.floor(T / N) * N, V = Math.floor(E / R) * R;
21804
- const bt = Math.ceil(_ / N) * N, Dt = Math.ceil(D / R) * R;
21805
- if (J = Math.round((bt - W) / w), te = Math.round((Dt - V) / v), Math.max(J, te) > 200)
21854
+ const xt = Math.ceil(_ / N) * N, Dt = Math.ceil(D / R) * R;
21855
+ if (J = Math.round((xt - W) / w), te = Math.round((Dt - V) / v), Math.max(J, te) > 200)
21806
21856
  w *= 2, v *= 2;
21807
21857
  else
21808
21858
  break;
@@ -21837,7 +21887,7 @@ const pT = { class: "wov-font-family-button" }, mT = { class: "wov-font-family-l
21837
21887
  y();
21838
21888
  },
21839
21889
  { deep: !0 }
21840
- ), wt(() => {
21890
+ ), kt(() => {
21841
21891
  const k = i == null ? void 0 : i.value;
21842
21892
  if (k) {
21843
21893
  const w = () => {
@@ -21864,7 +21914,7 @@ const pT = { class: "wov-font-family-button" }, mT = { class: "wov-font-family-l
21864
21914
  }
21865
21915
  }, null, 512));
21866
21916
  }
21867
- }), BT = /* @__PURE__ */ q({
21917
+ }), HT = /* @__PURE__ */ q({
21868
21918
  __name: "FileDropZone",
21869
21919
  props: {
21870
21920
  maxSize: { default: 400 }
@@ -21887,7 +21937,7 @@ const pT = { class: "wov-font-family-button" }, mT = { class: "wov-font-family-l
21887
21937
  function d() {
21888
21938
  i = 0, s.value = !1;
21889
21939
  }
21890
- wt(() => {
21940
+ kt(() => {
21891
21941
  const v = a == null ? void 0 : a.value;
21892
21942
  v && (v.addEventListener("dragenter", c), v.addEventListener("dragleave", u), v.addEventListener("drop", d));
21893
21943
  }), $e(() => {
@@ -21971,7 +22021,7 @@ const pT = { class: "wov-font-family-button" }, mT = { class: "wov-font-family-l
21971
22021
  }, null, 34));
21972
22022
  }
21973
22023
  });
21974
- function zT(n, e) {
22024
+ function VT(n, e) {
21975
22025
  if (e.length === 0) return /* @__PURE__ */ new Set();
21976
22026
  const t = e[0].tag, o = n.blockDefs[t];
21977
22027
  if (!o) return /* @__PURE__ */ new Set();
@@ -21988,13 +22038,13 @@ function zT(n, e) {
21988
22038
  }
21989
22039
  return r;
21990
22040
  }
21991
- function FT(n, e) {
22041
+ function WT(n, e) {
21992
22042
  return e.length === 0 ? !1 : e.every(({ tag: t }) => {
21993
22043
  var o;
21994
22044
  return ((o = n.blockDefs[t]) == null ? void 0 : o.showOperations) ?? !0;
21995
22045
  });
21996
22046
  }
21997
- const HT = /* @__PURE__ */ q({
22047
+ const jT = /* @__PURE__ */ q({
21998
22048
  __name: "FloatingMenuBar",
21999
22049
  setup(n) {
22000
22050
  const e = Kh(), { reset: t } = no(), o = ge(tp), { selectedIds: r, commonComponents: s, showOperations: i } = o, l = /* @__PURE__ */ new Set([
@@ -22081,7 +22131,7 @@ const HT = /* @__PURE__ */ q({
22081
22131
  key: 6,
22082
22132
  entityIds: F(r)
22083
22133
  }, () => [
22084
- Z(LT, {
22134
+ Z(zT, {
22085
22135
  entityIds: F(r),
22086
22136
  showVerticalAlign: F(s).has("verticalAlign")
22087
22137
  }, null, 8, ["entityIds", "showVerticalAlign"])
@@ -22097,7 +22147,7 @@ const HT = /* @__PURE__ */ q({
22097
22147
  ], 64)) : j("", !0)
22098
22148
  ], 32));
22099
22149
  }
22100
- }), VT = { class: "wov-floating-menu-inner" }, WT = /* @__PURE__ */ q({
22150
+ }), UT = { class: "wov-floating-menu-inner" }, KT = /* @__PURE__ */ q({
22101
22151
  __name: "FloatingMenu",
22102
22152
  setup(n) {
22103
22153
  const e = ge(Ue), t = gS([le, Qi]), o = ot(Pe), r = ot(eo), s = ot(el), i = fr(), l = O(
@@ -22106,10 +22156,10 @@ const HT = /* @__PURE__ */ q({
22106
22156
  () => t.value.map((T) => ({ tag: T.block.value.tag }))
22107
22157
  ), c = O(() => {
22108
22158
  const T = e == null ? void 0 : e.getEditor();
22109
- return T ? zT(T, a.value) : /* @__PURE__ */ new Set();
22159
+ return T ? VT(T, a.value) : /* @__PURE__ */ new Set();
22110
22160
  }), u = O(() => {
22111
22161
  const T = e == null ? void 0 : e.getEditor();
22112
- return T ? FT(T, a.value) : !1;
22162
+ return T ? WT(T, a.value) : !1;
22113
22163
  });
22114
22164
  ho(tp, { selectedIds: l, commonComponents: c, showOperations: u });
22115
22165
  const d = [0, 0, 0, 0];
@@ -22213,9 +22263,9 @@ const HT = /* @__PURE__ */ q({
22213
22263
  class: "wov-floating-menu",
22214
22264
  style: ve(F(k))
22215
22265
  }, [
22216
- x("div", VT, [
22266
+ x("div", UT, [
22217
22267
  me(T.$slots, "default", {}, () => [
22218
- Z(HT)
22268
+ Z(jT)
22219
22269
  ])
22220
22270
  ])
22221
22271
  ], 4)) : j("", !0)
@@ -22223,10 +22273,10 @@ const HT = /* @__PURE__ */ q({
22223
22273
  _: 3
22224
22274
  }));
22225
22275
  }
22226
- }), jT = {
22276
+ }), qT = {
22227
22277
  key: 0,
22228
22278
  class: "wov-loading-overlay"
22229
- }, UT = { class: "wov-loading-spinner" }, KT = /* @__PURE__ */ q({
22279
+ }, JT = { class: "wov-loading-spinner" }, GT = /* @__PURE__ */ q({
22230
22280
  __name: "LoadingOverlay",
22231
22281
  props: {
22232
22282
  isLoading: { type: Boolean }
@@ -22234,7 +22284,7 @@ const HT = /* @__PURE__ */ q({
22234
22284
  setup(n) {
22235
22285
  const e = B("|"), t = ["|", "/", "-", "\\"];
22236
22286
  let o = null;
22237
- return wt(() => {
22287
+ return kt(() => {
22238
22288
  o = setInterval(() => {
22239
22289
  const r = t.indexOf(e.value);
22240
22290
  e.value = t[(r + 1) % t.length];
@@ -22243,14 +22293,14 @@ const HT = /* @__PURE__ */ q({
22243
22293
  o !== null && clearInterval(o);
22244
22294
  }), (r, s) => (C(), ee(Mc, { name: "wov-loading-fade" }, {
22245
22295
  default: se(() => [
22246
- n.isLoading ? (C(), A("div", jT, [
22247
- x("div", UT, _e(e.value), 1)
22296
+ n.isLoading ? (C(), A("div", qT, [
22297
+ x("div", JT, _e(e.value), 1)
22248
22298
  ])) : j("", !0)
22249
22299
  ]),
22250
22300
  _: 1
22251
22301
  }));
22252
22302
  }
22253
- }), qT = { class: "wov-action-bar" }, JT = /* @__PURE__ */ q({
22303
+ }), YT = { class: "wov-action-bar" }, XT = /* @__PURE__ */ q({
22254
22304
  __name: "ActionBar",
22255
22305
  setup(n) {
22256
22306
  const { getEditor: e } = Ce(), t = ge(Ue), o = B(!1), r = B(!1);
@@ -22273,7 +22323,7 @@ const HT = /* @__PURE__ */ q({
22273
22323
  const a = e();
22274
22324
  a == null || a.command(Xh);
22275
22325
  }
22276
- return (a, c) => (C(), A("div", qT, [
22326
+ return (a, c) => (C(), A("div", YT, [
22277
22327
  x("button", {
22278
22328
  class: "wov-action-button",
22279
22329
  onClick: s,
@@ -22389,30 +22439,30 @@ const HT = /* @__PURE__ */ q({
22389
22439
  me(h.$slots, "default")
22390
22440
  ], 34));
22391
22441
  }
22392
- }), GT = '<?xml version="1.0" encoding="UTF-8"?><svg id="Layer_1" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 4.35 4.75" width="20" height="20"><defs><style>.cls-1{stroke:#fff;stroke-miterlimit:10;stroke-width:.25px;}</style></defs><path class="cls-1" d="M2.39,2.88s-.04.01-.05.02c-.01,0-.02.01-.03.02,0,.01-.02.02-.03.05l-.77,1.44c-.07.13-.1.19-.14.2-.03.01-.07,0-.1-.01-.03-.02-.05-.09-.09-.23L.16.41c-.03-.13-.05-.19-.03-.23.02-.03.04-.05.08-.06.04,0,.1.02.21.08l3.59,1.94c.13.07.19.1.2.14.01.03,0,.07-.01.1-.02.03-.09.05-.23.09l-1.58.4Z"/></svg>', YT = '<?xml version="1.0" encoding="UTF-8"?><svg id="Layer_1" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 4.08 4.75" width="24" height="24"><defs><style>.cls-1{fill:#fff;stroke:#000;stroke-linecap:round;stroke-linejoin:round;stroke-width:.25px;}.cls-2{fill:none;stroke:#fff;stroke-miterlimit:10;stroke-width:.51px;}</style></defs><path class="cls-1" d="M.89,2.25v.63M.89,2.25V.75c0-.21.17-.38.38-.38s.38.17.38.38M.89,2.25c0-.21-.17-.37-.38-.37s-.38.17-.38.37v.5c0,1.04.86,1.87,1.91,1.87s1.91-.84,1.91-1.87v-1.25c0-.21-.17-.38-.38-.38s-.38.17.38.38M1.66.75v1.38M1.66.75v-.25c0-.21.17-.38.38-.38s.38.17.38.38v.25M2.42.75v1.38M2.42.75c0-.21.17-.38.38-.38s.38.17.38.38v.75M3.19,1.5v.63"/><line class="cls-2" x1="2.8" y1=".77" x2="2.8" y2="2.03"/><line class="cls-2" x1="2.04" y1=".64" x2="2.04" y2="2.02"/><line class="cls-2" x1="1.27" y1=".84" x2="1.27" y2="2.29"/></svg>', XT = '<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"/><path d="M4 8v-2a2 2 0 0 1 2 -2h2" /><path d="M4 16v2a2 2 0 0 0 2 2h2" /><path d="M16 4h2a2 2 0 0 1 2 2v2" /><path d="M16 20h2a2 2 0 0 0 2 -2v-2" /><path d="M9 12l6 0" /><path d="M12 9l0 6" /></svg>', ko = {
22442
+ }), ZT = '<?xml version="1.0" encoding="UTF-8"?><svg id="Layer_1" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 4.35 4.75" width="20" height="20"><defs><style>.cls-1{stroke:#fff;stroke-miterlimit:10;stroke-width:.25px;}</style></defs><path class="cls-1" d="M2.39,2.88s-.04.01-.05.02c-.01,0-.02.01-.03.02,0,.01-.02.02-.03.05l-.77,1.44c-.07.13-.1.19-.14.2-.03.01-.07,0-.1-.01-.03-.02-.05-.09-.09-.23L.16.41c-.03-.13-.05-.19-.03-.23.02-.03.04-.05.08-.06.04,0,.1.02.21.08l3.59,1.94c.13.07.19.1.2.14.01.03,0,.07-.01.1-.02.03-.09.05-.23.09l-1.58.4Z"/></svg>', QT = '<?xml version="1.0" encoding="UTF-8"?><svg id="Layer_1" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 4.08 4.75" width="24" height="24"><defs><style>.cls-1{fill:#fff;stroke:#000;stroke-linecap:round;stroke-linejoin:round;stroke-width:.25px;}.cls-2{fill:none;stroke:#fff;stroke-miterlimit:10;stroke-width:.51px;}</style></defs><path class="cls-1" d="M.89,2.25v.63M.89,2.25V.75c0-.21.17-.38.38-.38s.38.17.38.38M.89,2.25c0-.21-.17-.37-.38-.37s-.38.17-.38.37v.5c0,1.04.86,1.87,1.91,1.87s1.91-.84,1.91-1.87v-1.25c0-.21-.17-.38-.38-.38s-.38.17.38.38M1.66.75v1.38M1.66.75v-.25c0-.21.17-.38.38-.38s.38.17.38.38v.25M2.42.75v1.38M2.42.75c0-.21.17-.38.38-.38s.38.17.38.38v.75M3.19,1.5v.63"/><line class="cls-2" x1="2.8" y1=".77" x2="2.8" y2="2.03"/><line class="cls-2" x1="2.04" y1=".64" x2="2.04" y2="2.02"/><line class="cls-2" x1="1.27" y1=".84" x2="1.27" y2="2.29"/></svg>', eE = '<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"/><path d="M4 8v-2a2 2 0 0 1 2 -2h2" /><path d="M4 16v2a2 2 0 0 0 2 2h2" /><path d="M16 4h2a2 2 0 0 1 2 2v2" /><path d="M16 20h2a2 2 0 0 0 2 -2v-2" /><path d="M9 12l6 0" /><path d="M12 9l0 6" /></svg>', ko = {
22393
22443
  Select: "select",
22394
22444
  Hand: "hand",
22395
22445
  Crosshair: "crosshair"
22396
- }, ZT = {
22446
+ }, tE = {
22397
22447
  [ko.Select]: {
22398
- makeSvg: () => GT,
22448
+ makeSvg: () => ZT,
22399
22449
  hotspot: [1, 0],
22400
22450
  rotationOffset: 0
22401
22451
  },
22402
22452
  [ko.Hand]: {
22403
- makeSvg: () => YT,
22453
+ makeSvg: () => QT,
22404
22454
  hotspot: [12, 12],
22405
22455
  rotationOffset: 0
22406
22456
  },
22407
22457
  [ko.Crosshair]: {
22408
- makeSvg: () => XT,
22458
+ makeSvg: () => eE,
22409
22459
  hotspot: [12, 12],
22410
22460
  rotationOffset: 0
22411
22461
  }
22412
- }, QT = {
22462
+ }, nE = {
22413
22463
  viewBox: "0 0 20 20",
22414
22464
  style: { "fill-rule": "evenodd", "clip-rule": "evenodd", "stroke-miterlimit": "10" }
22415
- }, eE = /* @__PURE__ */ q({
22465
+ }, oE = /* @__PURE__ */ q({
22416
22466
  __name: "SelectTool",
22417
22467
  setup(n) {
22418
22468
  const { nextEditorTick: e } = Ce(), { activeTool: t } = Mu();
@@ -22426,7 +22476,7 @@ const HT = /* @__PURE__ */ q({
22426
22476
  cursor: F(ko).Select
22427
22477
  }, {
22428
22478
  default: se(() => [
22429
- (C(), A("svg", QT, [...r[0] || (r[0] = [
22479
+ (C(), A("svg", nE, [...r[0] || (r[0] = [
22430
22480
  x("g", { transform: "matrix(4.21053,0,0,4.21053,0.842105,0)" }, [
22431
22481
  x("path", {
22432
22482
  fill: "none",
@@ -22440,7 +22490,7 @@ const HT = /* @__PURE__ */ q({
22440
22490
  _: 1
22441
22491
  }, 8, ["cursor"]));
22442
22492
  }
22443
- }), tE = /* @__PURE__ */ q({
22493
+ }), rE = /* @__PURE__ */ q({
22444
22494
  __name: "HandTool",
22445
22495
  setup(n) {
22446
22496
  return (e, t) => (C(), ee(Ht, {
@@ -22463,7 +22513,7 @@ const HT = /* @__PURE__ */ q({
22463
22513
  _: 1
22464
22514
  }, 8, ["cursor"]));
22465
22515
  }
22466
- }), nE = /* @__PURE__ */ q({
22516
+ }), sE = /* @__PURE__ */ q({
22467
22517
  __name: "StickyNoteTool",
22468
22518
  setup(n) {
22469
22519
  const e = ge(Ue), t = O(() => JSON.stringify({
@@ -22504,7 +22554,7 @@ const HT = /* @__PURE__ */ q({
22504
22554
  _: 1
22505
22555
  }, 8, ["drag-out-snapshot", "placement-snapshot"]));
22506
22556
  }
22507
- }), oE = /* @__PURE__ */ q({
22557
+ }), iE = /* @__PURE__ */ q({
22508
22558
  __name: "ShapeTool",
22509
22559
  setup(n) {
22510
22560
  const e = ge(Ue), t = O(() => JSON.stringify({
@@ -22514,7 +22564,7 @@ const HT = /* @__PURE__ */ q({
22514
22564
  },
22515
22565
  shape: {
22516
22566
  kind: "rectangle",
22517
- strokeKind: Mt.Solid,
22567
+ strokeKind: Tt.Solid,
22518
22568
  strokeWidth: 2,
22519
22569
  strokeRed: 0,
22520
22570
  strokeGreen: 0,
@@ -22558,7 +22608,7 @@ const HT = /* @__PURE__ */ q({
22558
22608
  _: 1
22559
22609
  }, 8, ["drag-out-snapshot", "draw-snapshot"]));
22560
22610
  }
22561
- }), rE = /* @__PURE__ */ q({
22611
+ }), lE = /* @__PURE__ */ q({
22562
22612
  __name: "EraserTool",
22563
22613
  setup(n) {
22564
22614
  return (e, t) => (C(), ee(Ht, {
@@ -22577,7 +22627,7 @@ const HT = /* @__PURE__ */ q({
22577
22627
  _: 1
22578
22628
  }));
22579
22629
  }
22580
- }), sE = /* @__PURE__ */ q({
22630
+ }), aE = /* @__PURE__ */ q({
22581
22631
  __name: "PenTool",
22582
22632
  setup(n) {
22583
22633
  return (e, t) => (C(), ee(Ht, {
@@ -22605,7 +22655,7 @@ const HT = /* @__PURE__ */ q({
22605
22655
  _: 1
22606
22656
  }));
22607
22657
  }
22608
- }), iE = /* @__PURE__ */ q({
22658
+ }), cE = /* @__PURE__ */ q({
22609
22659
  __name: "TextTool",
22610
22660
  setup(n) {
22611
22661
  const e = ge(Ue), t = O(() => JSON.stringify({
@@ -22657,7 +22707,7 @@ const HT = /* @__PURE__ */ q({
22657
22707
  _: 1
22658
22708
  }, 8, ["drag-out-snapshot", "placement-snapshot"]));
22659
22709
  }
22660
- }), lE = /* @__PURE__ */ q({
22710
+ }), uE = /* @__PURE__ */ q({
22661
22711
  __name: "ElbowArrowTool",
22662
22712
  setup(n) {
22663
22713
  const e = JSON.stringify({
@@ -22695,7 +22745,7 @@ const HT = /* @__PURE__ */ q({
22695
22745
  _: 1
22696
22746
  }, 8, ["drag-out-snapshot"]));
22697
22747
  }
22698
- }), aE = /* @__PURE__ */ q({
22748
+ }), dE = /* @__PURE__ */ q({
22699
22749
  __name: "ImageTool",
22700
22750
  setup(n) {
22701
22751
  const { nextEditorTick: e } = Ce(), { show: t, hide: o } = no(), { setTool: r } = Mu(), { createImageBlock: s } = jg(), i = B(null), l = B(null);
@@ -22766,7 +22816,7 @@ const HT = /* @__PURE__ */ q({
22766
22816
  }, null, 544)
22767
22817
  ], 544));
22768
22818
  }
22769
- }), cE = { class: "wov-embed-provider-grid" }, uE = ["onClick"], dE = { class: "wov-embed-provider-icon" }, fE = {
22819
+ }), fE = { class: "wov-embed-provider-grid" }, hE = ["onClick"], pE = { class: "wov-embed-provider-icon" }, mE = {
22770
22820
  key: 0,
22771
22821
  viewBox: "0 0 24 24",
22772
22822
  fill: "none",
@@ -22774,7 +22824,7 @@ const HT = /* @__PURE__ */ q({
22774
22824
  "stroke-width": "1.5",
22775
22825
  "stroke-linecap": "round",
22776
22826
  "stroke-linejoin": "round"
22777
- }, hE = {
22827
+ }, gE = {
22778
22828
  key: 1,
22779
22829
  viewBox: "0 0 24 24",
22780
22830
  fill: "none",
@@ -22782,7 +22832,7 @@ const HT = /* @__PURE__ */ q({
22782
22832
  "stroke-width": "1.5",
22783
22833
  "stroke-linecap": "round",
22784
22834
  "stroke-linejoin": "round"
22785
- }, pE = {
22835
+ }, yE = {
22786
22836
  key: 2,
22787
22837
  viewBox: "0 0 24 24",
22788
22838
  fill: "none",
@@ -22790,7 +22840,7 @@ const HT = /* @__PURE__ */ q({
22790
22840
  "stroke-width": "1.5",
22791
22841
  "stroke-linecap": "round",
22792
22842
  "stroke-linejoin": "round"
22793
- }, mE = {
22843
+ }, vE = {
22794
22844
  key: 3,
22795
22845
  viewBox: "0 0 24 24",
22796
22846
  fill: "none",
@@ -22798,7 +22848,7 @@ const HT = /* @__PURE__ */ q({
22798
22848
  "stroke-width": "1.5",
22799
22849
  "stroke-linecap": "round",
22800
22850
  "stroke-linejoin": "round"
22801
- }, gE = {
22851
+ }, wE = {
22802
22852
  key: 4,
22803
22853
  viewBox: "0 0 24 24",
22804
22854
  fill: "none",
@@ -22806,7 +22856,7 @@ const HT = /* @__PURE__ */ q({
22806
22856
  "stroke-width": "1.5",
22807
22857
  "stroke-linecap": "round",
22808
22858
  "stroke-linejoin": "round"
22809
- }, yE = {
22859
+ }, kE = {
22810
22860
  key: 5,
22811
22861
  viewBox: "0 0 24 24",
22812
22862
  fill: "none",
@@ -22814,7 +22864,7 @@ const HT = /* @__PURE__ */ q({
22814
22864
  "stroke-width": "1.5",
22815
22865
  "stroke-linecap": "round",
22816
22866
  "stroke-linejoin": "round"
22817
- }, vE = {
22867
+ }, bE = {
22818
22868
  key: 6,
22819
22869
  viewBox: "0 0 24 24",
22820
22870
  fill: "none",
@@ -22822,16 +22872,16 @@ const HT = /* @__PURE__ */ q({
22822
22872
  "stroke-width": "1.5",
22823
22873
  "stroke-linecap": "round",
22824
22874
  "stroke-linejoin": "round"
22825
- }, wE = {
22875
+ }, xE = {
22826
22876
  key: 7,
22827
22877
  xmlns: "http://www.w3.org/2000/svg",
22828
22878
  width: "24",
22829
22879
  height: "24",
22830
22880
  viewBox: "0 0 24 24"
22831
- }, kE = { class: "wov-embed-provider-label" }, bE = { class: "wov-embed-panel-header" }, xE = { class: "wov-embed-url-form" }, SE = ["placeholder"], CE = {
22881
+ }, SE = { class: "wov-embed-provider-label" }, CE = { class: "wov-embed-panel-header" }, ME = { class: "wov-embed-url-form" }, TE = ["placeholder"], EE = {
22832
22882
  key: 0,
22833
22883
  class: "wov-embed-url-error"
22834
- }, ME = /* @__PURE__ */ q({
22884
+ }, AE = /* @__PURE__ */ q({
22835
22885
  __name: "EmbedTool",
22836
22886
  setup(n) {
22837
22887
  const { nextEditorTick: e } = Ce(), { show: t, hide: o } = no(), { setTool: r } = Mu(), s = B(null), i = B(null), l = B(null), a = B(!1), c = B(null), u = B(""), d = B(""), f = ge("containerRef"), { floatingStyles: h } = gr(s, i, {
@@ -23002,7 +23052,7 @@ const HT = /* @__PURE__ */ q({
23002
23052
  style: ve(F(h))
23003
23053
  }, [
23004
23054
  c.value ? (C(), A(ie, { key: 1 }, [
23005
- x("div", bE, [
23055
+ x("div", CE, [
23006
23056
  x("button", {
23007
23057
  class: "wov-embed-back-button",
23008
23058
  onClick: k
@@ -23020,7 +23070,7 @@ const HT = /* @__PURE__ */ q({
23020
23070
  ])]),
23021
23071
  x("span", null, _e((_ = p.find((D) => D.value === c.value)) == null ? void 0 : _.label), 1)
23022
23072
  ]),
23023
- x("div", xE, [
23073
+ x("div", ME, [
23024
23074
  jh(x("input", {
23025
23075
  ref_key: "urlInputRef",
23026
23076
  ref: l,
@@ -23029,10 +23079,10 @@ const HT = /* @__PURE__ */ q({
23029
23079
  placeholder: m.value,
23030
23080
  class: "wov-embed-url-input",
23031
23081
  onKeydown: v
23032
- }, null, 40, SE), [
23082
+ }, null, 40, TE), [
23033
23083
  [Uh, u.value]
23034
23084
  ]),
23035
- d.value ? (C(), A("div", CE, _e(d.value), 1)) : j("", !0),
23085
+ d.value ? (C(), A("div", EE, _e(d.value), 1)) : j("", !0),
23036
23086
  x("button", {
23037
23087
  class: "wov-embed-submit-button",
23038
23088
  onClick: w
@@ -23040,17 +23090,17 @@ const HT = /* @__PURE__ */ q({
23040
23090
  ])
23041
23091
  ], 64)) : (C(), A(ie, { key: 0 }, [
23042
23092
  E[10] || (E[10] = x("div", { class: "wov-embed-panel-header" }, "Add embed", -1)),
23043
- x("div", cE, [
23093
+ x("div", fE, [
23044
23094
  (C(), A(ie, null, Se(p, (D) => x("button", {
23045
23095
  key: D.value,
23046
23096
  class: "wov-embed-provider-button",
23047
23097
  onClick: (N) => y(D.value)
23048
23098
  }, [
23049
- x("span", dE, [
23050
- D.icon === "youtube" ? (C(), A("svg", fE, [...E[2] || (E[2] = [
23099
+ x("span", pE, [
23100
+ D.icon === "youtube" ? (C(), A("svg", mE, [...E[2] || (E[2] = [
23051
23101
  x("path", { d: "M2.5 17V7a2 2 0 0 1 2-2h15a2 2 0 0 1 2 2v10a2 2 0 0 1-2 2h-15a2 2 0 0 1-2-2z" }, null, -1),
23052
23102
  x("path", { d: "m10 15 5-3-5-3z" }, null, -1)
23053
- ])])) : D.icon === "spotify" ? (C(), A("svg", hE, [...E[3] || (E[3] = [
23103
+ ])])) : D.icon === "spotify" ? (C(), A("svg", gE, [...E[3] || (E[3] = [
23054
23104
  x("circle", {
23055
23105
  cx: "12",
23056
23106
  cy: "12",
@@ -23059,14 +23109,14 @@ const HT = /* @__PURE__ */ q({
23059
23109
  x("path", { d: "M8 11.973c2.5-1.473 5.5-.973 7.5.527" }, null, -1),
23060
23110
  x("path", { d: "M9 15c1.5-1 4-.5 5.5.5" }, null, -1),
23061
23111
  x("path", { d: "M7 9c3-2 7-1 10 1" }, null, -1)
23062
- ])])) : D.icon === "map" ? (C(), A("svg", pE, [...E[4] || (E[4] = [
23112
+ ])])) : D.icon === "map" ? (C(), A("svg", yE, [...E[4] || (E[4] = [
23063
23113
  x("path", { d: "M12 2C8.13 2 5 5.13 5 9c0 5.25 7 13 7 13s7-7.75 7-13c0-3.87-3.13-7-7-7z" }, null, -1),
23064
23114
  x("circle", {
23065
23115
  cx: "12",
23066
23116
  cy: "9",
23067
23117
  r: "2.5"
23068
23118
  }, null, -1)
23069
- ])])) : D.icon === "calendar" ? (C(), A("svg", mE, [...E[5] || (E[5] = [
23119
+ ])])) : D.icon === "calendar" ? (C(), A("svg", vE, [...E[5] || (E[5] = [
23070
23120
  x("rect", {
23071
23121
  x: "3",
23072
23122
  y: "4",
@@ -23093,7 +23143,7 @@ const HT = /* @__PURE__ */ q({
23093
23143
  x2: "21",
23094
23144
  y2: "10"
23095
23145
  }, null, -1)
23096
- ])])) : D.icon === "slides" ? (C(), A("svg", gE, [...E[6] || (E[6] = [
23146
+ ])])) : D.icon === "slides" ? (C(), A("svg", wE, [...E[6] || (E[6] = [
23097
23147
  x("rect", {
23098
23148
  x: "2",
23099
23149
  y: "3",
@@ -23114,24 +23164,24 @@ const HT = /* @__PURE__ */ q({
23114
23164
  x2: "12",
23115
23165
  y2: "21"
23116
23166
  }, null, -1)
23117
- ])])) : D.icon === "figma" ? (C(), A("svg", yE, [...E[7] || (E[7] = [
23167
+ ])])) : D.icon === "figma" ? (C(), A("svg", kE, [...E[7] || (E[7] = [
23118
23168
  x("path", { d: "M5 5.5A3.5 3.5 0 0 1 8.5 2H12v7H8.5A3.5 3.5 0 0 1 5 5.5z" }, null, -1),
23119
23169
  x("path", { d: "M12 2h3.5a3.5 3.5 0 1 1 0 7H12V2z" }, null, -1),
23120
23170
  x("path", { d: "M12 12.5a3.5 3.5 0 1 1 7 0 3.5 3.5 0 1 1-7 0z" }, null, -1),
23121
23171
  x("path", { d: "M5 19.5A3.5 3.5 0 0 1 8.5 16H12v3.5a3.5 3.5 0 1 1-7 0z" }, null, -1),
23122
23172
  x("path", { d: "M5 12.5A3.5 3.5 0 0 1 8.5 9H12v7H8.5A3.5 3.5 0 0 1 5 12.5z" }, null, -1)
23123
- ])])) : D.icon === "gist" ? (C(), A("svg", vE, [...E[8] || (E[8] = [
23173
+ ])])) : D.icon === "gist" ? (C(), A("svg", bE, [...E[8] || (E[8] = [
23124
23174
  x("polyline", { points: "16 18 22 12 16 6" }, null, -1),
23125
23175
  x("polyline", { points: "8 6 2 12 8 18" }, null, -1)
23126
- ])])) : D.icon === "tldraw" ? (C(), A("svg", wE, [...E[9] || (E[9] = [
23176
+ ])])) : D.icon === "tldraw" ? (C(), A("svg", xE, [...E[9] || (E[9] = [
23127
23177
  x("path", {
23128
23178
  fill: "currentColor",
23129
23179
  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"
23130
23180
  }, null, -1)
23131
23181
  ])])) : j("", !0)
23132
23182
  ]),
23133
- x("span", kE, _e(D.label), 1)
23134
- ], 8, uE)), 64))
23183
+ x("span", SE, _e(D.label), 1)
23184
+ ], 8, hE)), 64))
23135
23185
  ])
23136
23186
  ], 64))
23137
23187
  ], 4)) : j("", !0)
@@ -23139,7 +23189,7 @@ const HT = /* @__PURE__ */ q({
23139
23189
  ], 64);
23140
23190
  };
23141
23191
  }
23142
- }), TE = "https://storage.googleapis.com/download/storage/v1/b/zine-maker-public/o/tapes%2F7e3b7dde-927d-4b09-aeb4-d49eac36d4ea.png?generation=1715183194653465&alt=media", EE = /* @__PURE__ */ q({
23192
+ }), IE = "https://storage.googleapis.com/download/storage/v1/b/zine-maker-public/o/tapes%2F7e3b7dde-927d-4b09-aeb4-d49eac36d4ea.png?generation=1715183194653465&alt=media", OE = /* @__PURE__ */ q({
23143
23193
  __name: "TapeTool",
23144
23194
  setup(n) {
23145
23195
  const e = JSON.stringify({
@@ -23151,7 +23201,7 @@ const HT = /* @__PURE__ */ q({
23151
23201
  thickness: 30
23152
23202
  },
23153
23203
  asset: {
23154
- identifier: TE,
23204
+ identifier: IE,
23155
23205
  uploadState: "complete"
23156
23206
  }
23157
23207
  });
@@ -23209,7 +23259,7 @@ const HT = /* @__PURE__ */ q({
23209
23259
  _: 1
23210
23260
  }, 8, ["drag-out-snapshot"]));
23211
23261
  }
23212
- }), AE = /* @__PURE__ */ q({
23262
+ }), _E = /* @__PURE__ */ q({
23213
23263
  __name: "FrameTool",
23214
23264
  setup(n) {
23215
23265
  const e = O(() => JSON.stringify({
@@ -23245,22 +23295,22 @@ const HT = /* @__PURE__ */ q({
23245
23295
  _: 1
23246
23296
  }, 8, ["drag-out-snapshot", "draw-snapshot"]));
23247
23297
  }
23248
- }), IE = { class: "wov-toolbar-container" }, OE = /* @__PURE__ */ q({
23298
+ }), DE = { class: "wov-toolbar-container" }, NE = /* @__PURE__ */ q({
23249
23299
  __name: "Toolbar",
23250
23300
  setup(n) {
23251
23301
  const e = Kh(), { reset: t } = no(), { nextEditorTick: o } = Ce(), r = B(null), s = B(null), i = ot(Bt), l = O(() => i.value.activeToolName), a = [
23252
- eE,
23253
- tE,
23254
- iE,
23255
- aE,
23256
- ME,
23257
23302
  oE,
23303
+ rE,
23304
+ cE,
23305
+ dE,
23258
23306
  AE,
23259
- lE,
23260
- nE,
23261
- EE,
23307
+ iE,
23308
+ _E,
23309
+ uE,
23262
23310
  sE,
23263
- rE
23311
+ OE,
23312
+ aE,
23313
+ lE
23264
23314
  ], c = ge("containerRef"), u = B(null), d = B(!1), f = B(null), h = B(null), p = B(1 / 0), m = B(0), g = B([]), y = B(8), k = B(48), { width: w } = r0(c);
23265
23315
  function v() {
23266
23316
  return f.value ? Array.from(f.value.children).filter((X) => !X.classList.contains("wov-overflow-button") && !X.classList.contains("wov-menu-tooltip")) : [];
@@ -23279,8 +23329,8 @@ const HT = /* @__PURE__ */ q({
23279
23329
  if (g.value.length === 0) return;
23280
23330
  const re = w.value - 40 - 20, fe = y.value, ke = k.value;
23281
23331
  let Be = 0, qe = 0;
23282
- for (let bt = 0; bt < g.value.length; bt++) {
23283
- const Dt = g.value[bt], Cn = Be > 0 ? Dt + fe : Dt, Vt = g.value.length - bt - 1 > 0 ? ke : 0;
23332
+ for (let xt = 0; xt < g.value.length; xt++) {
23333
+ const Dt = g.value[xt], Cn = Be > 0 ? Dt + fe : Dt, Vt = g.value.length - xt - 1 > 0 ? ke : 0;
23284
23334
  if (Be + Cn + Vt <= re)
23285
23335
  Be += Cn, qe++;
23286
23336
  else
@@ -23290,7 +23340,7 @@ const HT = /* @__PURE__ */ q({
23290
23340
  }
23291
23341
  pe(w, () => {
23292
23342
  g.value.length > 0 && M();
23293
- }), wt(() => {
23343
+ }), kt(() => {
23294
23344
  Gn(() => {
23295
23345
  b(), M();
23296
23346
  });
@@ -23355,8 +23405,8 @@ const HT = /* @__PURE__ */ q({
23355
23405
  dragOutTool: R,
23356
23406
  onToolPointerDown: W,
23357
23407
  onToolPointerUp: V
23358
- }), (X, Y) => (C(), A("div", IE, [
23359
- Z(JT),
23408
+ }), (X, Y) => (C(), A("div", DE, [
23409
+ Z(XT),
23360
23410
  x("div", {
23361
23411
  ref_key: "toolsContainerRef",
23362
23412
  ref: f,
@@ -23408,7 +23458,7 @@ const HT = /* @__PURE__ */ q({
23408
23458
  ], 8, ["to"])) : j("", !0)
23409
23459
  ]));
23410
23460
  }
23411
- }), QA = /* @__PURE__ */ q({
23461
+ }), nI = /* @__PURE__ */ q({
23412
23462
  __name: "ArcArrowTool",
23413
23463
  setup(n) {
23414
23464
  return (e, t) => (C(), ee(Ht, {
@@ -23432,14 +23482,14 @@ const HT = /* @__PURE__ */ q({
23432
23482
  _: 1
23433
23483
  }));
23434
23484
  }
23435
- }), _E = { class: "wov-user-presence-avatars" }, DE = ["src", "alt"], NE = { class: "wov-user-presence-list" }, RE = ["src", "alt"], PE = { class: "wov-user-presence-name" }, LE = 4, $E = /* @__PURE__ */ q({
23485
+ }), RE = { class: "wov-user-presence-avatars" }, PE = ["src", "alt"], LE = { class: "wov-user-presence-list" }, $E = ["src", "alt"], BE = { class: "wov-user-presence-name" }, zE = 4, FE = /* @__PURE__ */ q({
23436
23486
  __name: "UserPresence",
23437
23487
  props: {
23438
23488
  users: {}
23439
23489
  },
23440
23490
  setup(n) {
23441
23491
  const e = n, t = B(!1), o = B(null);
23442
- cT(o, () => {
23492
+ uT(o, () => {
23443
23493
  t.value = !1;
23444
23494
  });
23445
23495
  function r(l) {
@@ -23455,7 +23505,7 @@ const HT = /* @__PURE__ */ q({
23455
23505
  avatar: l.avatar,
23456
23506
  initials: r(l.name)
23457
23507
  }))
23458
- ), i = O(() => s.value.slice(0, LE));
23508
+ ), i = O(() => s.value.slice(0, zE));
23459
23509
  return (l, a) => n.users.length > 1 ? (C(), A("div", {
23460
23510
  key: 0,
23461
23511
  ref_key: "containerRef",
@@ -23466,7 +23516,7 @@ const HT = /* @__PURE__ */ q({
23466
23516
  class: Te(["wov-user-presence-trigger", { "is-open": t.value }]),
23467
23517
  onClick: a[0] || (a[0] = (c) => t.value = !t.value)
23468
23518
  }, [
23469
- x("div", _E, [
23519
+ x("div", RE, [
23470
23520
  (C(!0), A(ie, null, Se(i.value, (c) => (C(), A("div", {
23471
23521
  key: c.sessionId,
23472
23522
  class: "wov-user-avatar",
@@ -23477,7 +23527,7 @@ const HT = /* @__PURE__ */ q({
23477
23527
  src: c.avatar,
23478
23528
  alt: c.name,
23479
23529
  class: "wov-user-avatar-img"
23480
- }, null, 8, DE)) : (C(), A(ie, { key: 1 }, [
23530
+ }, null, 8, PE)) : (C(), A(ie, { key: 1 }, [
23481
23531
  Sa(_e(c.initials), 1)
23482
23532
  ], 64))
23483
23533
  ], 4))), 128))
@@ -23486,10 +23536,10 @@ const HT = /* @__PURE__ */ q({
23486
23536
  t.value ? (C(), A("div", {
23487
23537
  key: 0,
23488
23538
  class: "wov-user-presence-dropdown",
23489
- onWheel: a[1] || (a[1] = At(() => {
23539
+ onWheel: a[1] || (a[1] = ut(() => {
23490
23540
  }, ["stop"]))
23491
23541
  }, [
23492
- x("div", NE, [
23542
+ x("div", LE, [
23493
23543
  (C(!0), A(ie, null, Se(s.value, (c) => (C(), A("div", {
23494
23544
  key: c.sessionId,
23495
23545
  class: "wov-user-presence-item"
@@ -23505,11 +23555,11 @@ const HT = /* @__PURE__ */ q({
23505
23555
  src: c.avatar,
23506
23556
  alt: c.name,
23507
23557
  class: "wov-user-avatar-img"
23508
- }, null, 8, RE)) : (C(), A(ie, { key: 1 }, [
23558
+ }, null, 8, $E)) : (C(), A(ie, { key: 1 }, [
23509
23559
  Sa(_e(c.initials), 1)
23510
23560
  ], 64))
23511
23561
  ], 4),
23512
- x("span", PE, _e(c.name), 1)
23562
+ x("span", BE, _e(c.name), 1)
23513
23563
  ]))), 128))
23514
23564
  ])
23515
23565
  ], 32)) : j("", !0)
@@ -23517,7 +23567,7 @@ const HT = /* @__PURE__ */ q({
23517
23567
  }
23518
23568
  }), dc = (n, e) => e.some((t) => n instanceof t);
23519
23569
  let bh, xh;
23520
- function BE() {
23570
+ function HE() {
23521
23571
  return bh || (bh = [
23522
23572
  IDBDatabase,
23523
23573
  IDBObjectStore,
@@ -23526,7 +23576,7 @@ function BE() {
23526
23576
  IDBTransaction
23527
23577
  ]);
23528
23578
  }
23529
- function zE() {
23579
+ function VE() {
23530
23580
  return xh || (xh = [
23531
23581
  IDBCursor.prototype.advance,
23532
23582
  IDBCursor.prototype.continue,
@@ -23534,7 +23584,7 @@ function zE() {
23534
23584
  ]);
23535
23585
  }
23536
23586
  const fc = /* @__PURE__ */ new WeakMap(), ya = /* @__PURE__ */ new WeakMap(), El = /* @__PURE__ */ new WeakMap();
23537
- function FE(n) {
23587
+ function WE(n) {
23538
23588
  const e = new Promise((t, o) => {
23539
23589
  const r = () => {
23540
23590
  n.removeEventListener("success", s), n.removeEventListener("error", i);
@@ -23547,7 +23597,7 @@ function FE(n) {
23547
23597
  });
23548
23598
  return El.set(e, n), e;
23549
23599
  }
23550
- function HE(n) {
23600
+ function jE(n) {
23551
23601
  if (fc.has(n))
23552
23602
  return;
23553
23603
  const e = new Promise((t, o) => {
@@ -23582,26 +23632,26 @@ let hc = {
23582
23632
  function s0(n) {
23583
23633
  hc = n(hc);
23584
23634
  }
23585
- function VE(n) {
23586
- return zE().includes(n) ? function(...e) {
23635
+ function UE(n) {
23636
+ return VE().includes(n) ? function(...e) {
23587
23637
  return n.apply(pc(this), e), bo(this.request);
23588
23638
  } : function(...e) {
23589
23639
  return bo(n.apply(pc(this), e));
23590
23640
  };
23591
23641
  }
23592
- function WE(n) {
23593
- return typeof n == "function" ? VE(n) : (n instanceof IDBTransaction && HE(n), dc(n, BE()) ? new Proxy(n, hc) : n);
23642
+ function KE(n) {
23643
+ return typeof n == "function" ? UE(n) : (n instanceof IDBTransaction && jE(n), dc(n, HE()) ? new Proxy(n, hc) : n);
23594
23644
  }
23595
23645
  function bo(n) {
23596
23646
  if (n instanceof IDBRequest)
23597
- return FE(n);
23647
+ return WE(n);
23598
23648
  if (ya.has(n))
23599
23649
  return ya.get(n);
23600
- const e = WE(n);
23650
+ const e = KE(n);
23601
23651
  return e !== n && (ya.set(n, e), El.set(e, n)), e;
23602
23652
  }
23603
23653
  const pc = (n) => El.get(n);
23604
- function jE(n, e, { blocked: t, upgrade: o, blocking: r, terminated: s } = {}) {
23654
+ function qE(n, e, { blocked: t, upgrade: o, blocking: r, terminated: s } = {}) {
23605
23655
  const i = indexedDB.open(n, e), l = bo(i);
23606
23656
  return o && i.addEventListener("upgradeneeded", (a) => {
23607
23657
  o(bo(i.result), a.oldVersion, a.newVersion, bo(i.transaction), a);
@@ -23615,16 +23665,16 @@ function jE(n, e, { blocked: t, upgrade: o, blocking: r, terminated: s } = {}) {
23615
23665
  }).catch(() => {
23616
23666
  }), l;
23617
23667
  }
23618
- const UE = ["get", "getKey", "getAll", "getAllKeys", "count"], KE = ["put", "add", "delete", "clear"], va = /* @__PURE__ */ new Map();
23668
+ const JE = ["get", "getKey", "getAll", "getAllKeys", "count"], GE = ["put", "add", "delete", "clear"], va = /* @__PURE__ */ new Map();
23619
23669
  function Sh(n, e) {
23620
23670
  if (!(n instanceof IDBDatabase && !(e in n) && typeof e == "string"))
23621
23671
  return;
23622
23672
  if (va.get(e))
23623
23673
  return va.get(e);
23624
- const t = e.replace(/FromIndex$/, ""), o = e !== t, r = KE.includes(t);
23674
+ const t = e.replace(/FromIndex$/, ""), o = e !== t, r = GE.includes(t);
23625
23675
  if (
23626
23676
  // Bail if the target doesn't exist on the target. Eg, getAll isn't in Edge.
23627
- !(t in (o ? IDBIndex : IDBObjectStore).prototype) || !(r || UE.includes(t))
23677
+ !(t in (o ? IDBIndex : IDBObjectStore).prototype) || !(r || JE.includes(t))
23628
23678
  )
23629
23679
  return;
23630
23680
  const s = async function(i, ...l) {
@@ -23642,9 +23692,9 @@ s0((n) => ({
23642
23692
  get: (e, t, o) => Sh(e, t) || n.get(e, t, o),
23643
23693
  has: (e, t) => !!Sh(e, t) || n.has(e, t)
23644
23694
  }));
23645
- const qE = ["continue", "continuePrimaryKey", "advance"], Ch = {}, mc = /* @__PURE__ */ new WeakMap(), i0 = /* @__PURE__ */ new WeakMap(), JE = {
23695
+ const YE = ["continue", "continuePrimaryKey", "advance"], Ch = {}, mc = /* @__PURE__ */ new WeakMap(), i0 = /* @__PURE__ */ new WeakMap(), XE = {
23646
23696
  get(n, e) {
23647
- if (!qE.includes(e))
23697
+ if (!YE.includes(e))
23648
23698
  return n[e];
23649
23699
  let t = Ch[e];
23650
23700
  return t || (t = Ch[e] = function(...o) {
@@ -23652,12 +23702,12 @@ const qE = ["continue", "continuePrimaryKey", "advance"], Ch = {}, mc = /* @__PU
23652
23702
  }), t;
23653
23703
  }
23654
23704
  };
23655
- async function* GE(...n) {
23705
+ async function* ZE(...n) {
23656
23706
  let e = this;
23657
23707
  if (e instanceof IDBCursor || (e = await e.openCursor(...n)), !e)
23658
23708
  return;
23659
23709
  e = e;
23660
- const t = new Proxy(e, JE);
23710
+ const t = new Proxy(e, XE);
23661
23711
  for (i0.set(t, e), El.set(t, pc(e)); e; )
23662
23712
  yield t, e = await (mc.get(t) || e.continue()), mc.delete(t);
23663
23713
  }
@@ -23667,21 +23717,21 @@ function Mh(n, e) {
23667
23717
  s0((n) => ({
23668
23718
  ...n,
23669
23719
  get(e, t, o) {
23670
- return Mh(e, t) ? GE : n.get(e, t, o);
23720
+ return Mh(e, t) ? ZE : n.get(e, t, o);
23671
23721
  },
23672
23722
  has(e, t) {
23673
23723
  return Mh(e, t) || n.has(e, t);
23674
23724
  }
23675
23725
  }));
23676
23726
  async function gc(n, e) {
23677
- const t = await jE(n, 1, {
23727
+ const t = await qE(n, 1, {
23678
23728
  upgrade(o) {
23679
23729
  o.objectStoreNames.contains(e) || o.createObjectStore(e);
23680
23730
  }
23681
23731
  });
23682
- return new YE(t, e);
23732
+ return new QE(t, e);
23683
23733
  }
23684
- var YE = class {
23734
+ var QE = class {
23685
23735
  constructor(n, e) {
23686
23736
  this.db = n, this.storeName = e;
23687
23737
  }
@@ -23707,7 +23757,7 @@ var YE = class {
23707
23757
  close() {
23708
23758
  this.db.close();
23709
23759
  }
23710
- }, XE = class {
23760
+ }, e3 = class {
23711
23761
  constructor(n) {
23712
23762
  this.jobsStore = null, this.binariesStore = null, this.blobUrls = /* @__PURE__ */ new Map(), this.uploading = /* @__PURE__ */ new Set(), this.uploadPromises = /* @__PURE__ */ new Map(), this.startListeners = /* @__PURE__ */ new Set(), this.completeListeners = /* @__PURE__ */ new Set(), this.errorListeners = /* @__PURE__ */ new Set(), this.persisting = /* @__PURE__ */ new Set(), this.persistStartListeners = /* @__PURE__ */ new Set(), this.persistEndListeners = /* @__PURE__ */ new Set(), this.provider = n.provider, this.documentId = n.documentId, this.maxRetries = n.provider.maxRetries ?? 3, this.retryDelay = n.provider.retryDelay ?? 5e3;
23713
23763
  }
@@ -23937,7 +23987,7 @@ var YE = class {
23937
23987
  s && (s.reject(r), this.uploadPromises.delete(n));
23938
23988
  }
23939
23989
  }
23940
- }, ZE = "wovencanvas-assets", QE = "blobs", e3 = class {
23990
+ }, t3 = "wovencanvas-assets", n3 = "blobs", o3 = class {
23941
23991
  constructor() {
23942
23992
  this.store = null, this.initPromise = null, this.maxRetries = 3, this.retryDelay = 5e3;
23943
23993
  }
@@ -23960,10 +24010,10 @@ var YE = class {
23960
24010
  this.store && (this.store.close(), this.store = null, this.initPromise = null);
23961
24011
  }
23962
24012
  getStore() {
23963
- return this.store ? Promise.resolve(this.store) : (this.initPromise || (this.initPromise = gc(ZE, QE).then((n) => (this.store = n, n))), this.initPromise);
24013
+ return this.store ? Promise.resolve(this.store) : (this.initPromise || (this.initPromise = gc(t3, n3).then((n) => (this.store = n, n))), this.initPromise);
23964
24014
  }
23965
24015
  };
23966
- const t3 = /* @__PURE__ */ q({
24016
+ const r3 = /* @__PURE__ */ q({
23967
24017
  __name: "StickyNote",
23968
24018
  props: {
23969
24019
  entityId: {},
@@ -24013,14 +24063,14 @@ const t3 = /* @__PURE__ */ q({
24013
24063
  /** Checkpoint ID for squashing edited block history, or empty string if none */
24014
24064
  editedCheckpoint: pn.string().default("").max(36)
24015
24065
  }
24016
- ), n3 = JSON.stringify({
24066
+ ), s3 = JSON.stringify({
24017
24067
  block: { tag: "text", size: [10, 29] },
24018
24068
  text: { constrainWidth: !1, fontSizePx: 24 }
24019
24069
  }), qr = Fh(
24020
24070
  { name: "doubleClickState" },
24021
24071
  {
24022
24072
  /** JSON-serialized BlockSnapshot, or empty string to disable */
24023
- snapshot: pn.string().max(1024).default(n3),
24073
+ snapshot: pn.string().max(1024).default(s3),
24024
24074
  lastClickTime: pn.float64().default(0),
24025
24075
  lastClickWorldX: pn.float64().default(0),
24026
24076
  lastClickWorldY: pn.float64().default(0)
@@ -24054,7 +24104,7 @@ function Eh(n, e, t, o, r) {
24054
24104
  const u = Nc.write(n);
24055
24105
  u.cursorKind = "select", u.rotation = 0;
24056
24106
  }
24057
- function o3(n) {
24107
+ function i3(n) {
24058
24108
  const e = Ui.read(n);
24059
24109
  if (e.editedCheckpoint) {
24060
24110
  const t = e.editedCheckpoint;
@@ -24063,9 +24113,9 @@ function o3(n) {
24063
24113
  o.onSettled(() => o.squashToCheckpoint(t), { frames: 5 });
24064
24114
  }
24065
24115
  }
24066
- const r3 = tl({ phase: "capture" }, (n) => {
24116
+ const l3 = tl({ phase: "capture" }, (n) => {
24067
24117
  if (nl(n)) return;
24068
- Th.removed(n).length > 0 && Th.current(n).length === 0 && o3(n);
24118
+ Th.removed(n).length > 0 && Th.current(n).length === 0 && i3(n);
24069
24119
  const e = Bt.read(n);
24070
24120
  if (!e.heldSnapshot || e.leftMouseTool === "draw") return;
24071
24121
  const t = Rc(n, [Zh.Left]);
@@ -24094,7 +24144,7 @@ const r3 = tl({ phase: "capture" }, (n) => {
24094
24144
  "placement"
24095
24145
  );
24096
24146
  }
24097
- }), s3 = 400, i3 = 10, l3 = tl({ phase: "capture" }, (n) => {
24147
+ }), a3 = 400, c3 = 10, u3 = tl({ phase: "capture" }, (n) => {
24098
24148
  var d, f;
24099
24149
  if (nl(n)) return;
24100
24150
  const e = qr.read(n);
@@ -24106,7 +24156,7 @@ const r3 = tl({ phase: "capture" }, (n) => {
24106
24156
  const r = o.find((h) => h.type === "click" && !h.obscured);
24107
24157
  if (!r || r.intersects.some((h) => !Fe(n, h, js))) return;
24108
24158
  const i = performance.now(), l = i - e.lastClickTime, a = r.worldPosition[0] - e.lastClickWorldX, c = r.worldPosition[1] - e.lastClickWorldY, u = Math.sqrt(a * a + c * c);
24109
- if (l < s3 && u < i3) {
24159
+ if (l < a3 && u < c3) {
24110
24160
  let h;
24111
24161
  try {
24112
24162
  h = JSON.parse(e.snapshot);
@@ -24129,7 +24179,7 @@ const r3 = tl({ phase: "capture" }, (n) => {
24129
24179
  h.lastClickTime = i, h.lastClickWorldX = r.worldPosition[0], h.lastClickWorldY = r.worldPosition[1];
24130
24180
  }
24131
24181
  });
24132
- function a3() {
24182
+ function d3() {
24133
24183
  if (typeof globalThis < "u")
24134
24184
  return globalThis;
24135
24185
  if (typeof self < "u")
@@ -24139,15 +24189,15 @@ function a3() {
24139
24189
  if (typeof global < "u")
24140
24190
  return global;
24141
24191
  }
24142
- function c3() {
24143
- const n = a3();
24192
+ function f3() {
24193
+ const n = d3();
24144
24194
  if (n.__xstate__)
24145
24195
  return n.__xstate__;
24146
24196
  }
24147
- const u3 = (n) => {
24197
+ const h3 = (n) => {
24148
24198
  if (typeof window > "u")
24149
24199
  return;
24150
- const e = c3();
24200
+ const e = f3();
24151
24201
  e && e.register(n);
24152
24202
  };
24153
24203
  class Ah {
@@ -24179,8 +24229,8 @@ class Ah {
24179
24229
  this._last = null;
24180
24230
  }
24181
24231
  }
24182
- const a0 = ".", d3 = "", c0 = "", f3 = "#", h3 = "*", u0 = "xstate.init", p3 = "xstate.error", yc = "xstate.stop";
24183
- function m3(n, e) {
24232
+ const a0 = ".", p3 = "", c0 = "", m3 = "#", g3 = "*", u0 = "xstate.init", y3 = "xstate.error", yc = "xstate.stop";
24233
+ function v3(n, e) {
24184
24234
  return {
24185
24235
  type: `xstate.after.${n}.${e}`
24186
24236
  };
@@ -24191,7 +24241,7 @@ function vc(n, e) {
24191
24241
  output: e
24192
24242
  };
24193
24243
  }
24194
- function g3(n, e) {
24244
+ function w3(n, e) {
24195
24245
  return {
24196
24246
  type: `xstate.done.actor.${n}`,
24197
24247
  output: e,
@@ -24216,7 +24266,7 @@ function Ut(n) {
24216
24266
  throw n;
24217
24267
  });
24218
24268
  }
24219
- const y3 = typeof Symbol == "function" && Symbol.observable || "@@observable";
24269
+ const k3 = typeof Symbol == "function" && Symbol.observable || "@@observable";
24220
24270
  function h0(n, e) {
24221
24271
  const t = Ih(n), o = Ih(e);
24222
24272
  return typeof o == "string" ? typeof t == "string" ? o === t : !1 : typeof t == "string" ? t in o : Object.keys(t).every((r) => r in o ? h0(t[r], o[r]) : !1);
@@ -24240,14 +24290,14 @@ function Nu(n) {
24240
24290
  return e.push(t), e;
24241
24291
  }
24242
24292
  function Ih(n) {
24243
- if (Z3(n))
24293
+ if (tA(n))
24244
24294
  return n.value;
24245
24295
  if (typeof n != "string")
24246
24296
  return n;
24247
24297
  const e = Nu(n);
24248
- return v3(e);
24298
+ return b3(e);
24249
24299
  }
24250
- function v3(n) {
24300
+ function b3(n) {
24251
24301
  if (n.length === 1)
24252
24302
  return n[0];
24253
24303
  const e = {};
@@ -24285,7 +24335,7 @@ function wc(n, e, t, o) {
24285
24335
  function m0(n) {
24286
24336
  return Array.isArray(n);
24287
24337
  }
24288
- function w3(n) {
24338
+ function x3(n) {
24289
24339
  return n.type.startsWith("xstate.error.actor");
24290
24340
  }
24291
24341
  function jo(n) {
@@ -24294,7 +24344,7 @@ function jo(n) {
24294
24344
  } : e);
24295
24345
  }
24296
24346
  function g0(n) {
24297
- if (!(n === void 0 || n === d3))
24347
+ if (!(n === void 0 || n === p3))
24298
24348
  return Wn(n);
24299
24349
  }
24300
24350
  function kc(n, e, t) {
@@ -24316,8 +24366,8 @@ function Ru(n, e) {
24316
24366
  const [, o, r] = t, i = n.getStateNodeById(r).config.invoke;
24317
24367
  return (Array.isArray(i) ? i[o] : i).src;
24318
24368
  }
24319
- function k3(n, e) {
24320
- if (e === n || e === h3)
24369
+ function S3(n, e) {
24370
+ if (e === n || e === g3)
24321
24371
  return !0;
24322
24372
  if (!e.endsWith(".*"))
24323
24373
  return !1;
@@ -24334,8 +24384,8 @@ function k3(n, e) {
24334
24384
  function Dh(n, e) {
24335
24385
  return `${n.sessionId}.${e}`;
24336
24386
  }
24337
- let b3 = 0;
24338
- function x3(n, e) {
24387
+ let C3 = 0;
24388
+ function M3(n, e) {
24339
24389
  const t = /* @__PURE__ */ new Map(), o = /* @__PURE__ */ new Map(), r = /* @__PURE__ */ new WeakMap(), s = /* @__PURE__ */ new Set(), i = {}, {
24340
24390
  clock: l,
24341
24391
  logger: a
@@ -24380,7 +24430,7 @@ function x3(n, e) {
24380
24430
  _snapshot: {
24381
24431
  _scheduledEvents: ((e == null ? void 0 : e.snapshot) && e.snapshot.scheduler) ?? {}
24382
24432
  },
24383
- _bookId: () => `x:${b3++}`,
24433
+ _bookId: () => `x:${C3++}`,
24384
24434
  _register: (f, h) => (t.set(f, h), f),
24385
24435
  _unregister: (f) => {
24386
24436
  t.delete(f.sessionId);
@@ -24439,10 +24489,10 @@ function x3(n, e) {
24439
24489
  }
24440
24490
  let wa = !1;
24441
24491
  const Pu = 1;
24442
- let ht = /* @__PURE__ */ function(n) {
24492
+ let pt = /* @__PURE__ */ function(n) {
24443
24493
  return n[n.NotStarted = 0] = "NotStarted", n[n.Running = 1] = "Running", n[n.Stopped = 2] = "Stopped", n;
24444
24494
  }({});
24445
- const S3 = {
24495
+ const T3 = {
24446
24496
  clock: {
24447
24497
  setTimeout: (n, e) => setTimeout(n, e),
24448
24498
  clearTimeout: (n) => clearTimeout(n)
@@ -24450,7 +24500,7 @@ const S3 = {
24450
24500
  logger: console.log.bind(console),
24451
24501
  devTools: !1
24452
24502
  };
24453
- class C3 {
24503
+ class E3 {
24454
24504
  /**
24455
24505
  * Creates a new actor instance for the given logic with the provided options,
24456
24506
  * if any.
@@ -24459,9 +24509,9 @@ class C3 {
24459
24509
  * @param options Actor options
24460
24510
  */
24461
24511
  constructor(e, t) {
24462
- this.logic = e, this._snapshot = void 0, this.clock = void 0, this.options = void 0, this.id = void 0, this.mailbox = new Ah(this._process.bind(this)), this.observers = /* @__PURE__ */ new Set(), this.eventListeners = /* @__PURE__ */ new Map(), this.logger = void 0, this._processingStatus = ht.NotStarted, this._parent = void 0, this._syncSnapshot = void 0, this.ref = void 0, this._actorScope = void 0, this.systemId = void 0, this.sessionId = void 0, this.system = void 0, this._doneEvent = void 0, this.src = void 0, this._deferred = [];
24512
+ this.logic = e, this._snapshot = void 0, this.clock = void 0, this.options = void 0, this.id = void 0, this.mailbox = new Ah(this._process.bind(this)), this.observers = /* @__PURE__ */ new Set(), this.eventListeners = /* @__PURE__ */ new Map(), this.logger = void 0, this._processingStatus = pt.NotStarted, this._parent = void 0, this._syncSnapshot = void 0, this.ref = void 0, this._actorScope = void 0, this.systemId = void 0, this.sessionId = void 0, this.system = void 0, this._doneEvent = void 0, this.src = void 0, this._deferred = [];
24463
24513
  const o = {
24464
- ...S3,
24514
+ ...T3,
24465
24515
  ...t
24466
24516
  }, {
24467
24517
  clock: r,
@@ -24472,7 +24522,7 @@ class C3 {
24472
24522
  systemId: c,
24473
24523
  inspect: u
24474
24524
  } = o;
24475
- this.system = i ? i.system : x3(this, {
24525
+ this.system = i ? i.system : M3(this, {
24476
24526
  clock: r,
24477
24527
  logger: s
24478
24528
  }), u && !i && this.system.inspect(kc(u)), this.sessionId = this.system._bookId(), this.id = a ?? this.sessionId, this.logger = (t == null ? void 0 : t.logger) ?? this.system._logger, this.clock = (t == null ? void 0 : t.clock) ?? this.system._clock, this._parent = i, this._syncSnapshot = l, this.options = o, this.src = o.src ?? e, this.ref = this, this._actorScope = {
@@ -24519,7 +24569,7 @@ class C3 {
24519
24569
  wa = h;
24520
24570
  }
24521
24571
  };
24522
- this._processingStatus === ht.Running ? f() : this._deferred.push(f);
24572
+ this._processingStatus === pt.Running ? f() : this._deferred.push(f);
24523
24573
  }
24524
24574
  }, this.send = this.send.bind(this), this.system._sendInspectionEvent({
24525
24575
  type: "@xstate.actor",
@@ -24568,7 +24618,7 @@ class C3 {
24568
24618
  } catch (l) {
24569
24619
  Ut(l);
24570
24620
  }
24571
- this._stopProcedure(), this._complete(), this._doneEvent = g3(this.id, this._snapshot.output), this._parent && this.system._relay(this, this._parent, this._doneEvent);
24621
+ this._stopProcedure(), this._complete(), this._doneEvent = w3(this.id, this._snapshot.output), this._parent && this.system._relay(this, this._parent, this._doneEvent);
24572
24622
  break;
24573
24623
  case "error":
24574
24624
  this._error(this._snapshot.error);
@@ -24643,7 +24693,7 @@ class C3 {
24643
24693
  subscribe(e, t, o) {
24644
24694
  var s;
24645
24695
  const r = kc(e, t, o);
24646
- if (this._processingStatus !== ht.Stopped)
24696
+ if (this._processingStatus !== pt.Stopped)
24647
24697
  this.observers.add(r);
24648
24698
  else
24649
24699
  switch (this._snapshot.status) {
@@ -24685,7 +24735,7 @@ class C3 {
24685
24735
  }
24686
24736
  /** Starts the Actor from the initial state */
24687
24737
  start() {
24688
- if (this._processingStatus === ht.Running)
24738
+ if (this._processingStatus === pt.Running)
24689
24739
  return this;
24690
24740
  this._syncSnapshot && this.subscribe({
24691
24741
  next: (o) => {
@@ -24696,7 +24746,7 @@ class C3 {
24696
24746
  },
24697
24747
  error: () => {
24698
24748
  }
24699
- }), this.system._register(this.sessionId, this), this.systemId && this.system._set(this.systemId, this), this._processingStatus = ht.Running;
24749
+ }), this.system._register(this.sessionId, this), this.systemId && this.system._set(this.systemId, this), this._processingStatus = pt.Running;
24700
24750
  const e = f0(this.options.input);
24701
24751
  switch (this.system._sendInspectionEvent({
24702
24752
  type: "@xstate.event",
@@ -24744,7 +24794,7 @@ class C3 {
24744
24794
  this.update(t, e), e.type === yc && (this._stopProcedure(), this._complete());
24745
24795
  }
24746
24796
  _stop() {
24747
- return this._processingStatus === ht.Stopped ? this : (this.mailbox.clear(), this._processingStatus === ht.NotStarted ? (this._processingStatus = ht.Stopped, this) : (this.mailbox.enqueue({
24797
+ return this._processingStatus === pt.Stopped ? this : (this.mailbox.clear(), this._processingStatus === pt.NotStarted ? (this._processingStatus = pt.Stopped, this) : (this.mailbox.enqueue({
24748
24798
  type: yc
24749
24799
  }), this));
24750
24800
  }
@@ -24790,11 +24840,11 @@ class C3 {
24790
24840
  // right now, they are being stopped within the machine's transition
24791
24841
  // but that could throw and leave us with "orphaned" active actors
24792
24842
  _stopProcedure() {
24793
- return this._processingStatus !== ht.Running ? this : (this.system.scheduler.cancelAll(this), this.mailbox.clear(), this.mailbox = new Ah(this._process.bind(this)), this._processingStatus = ht.Stopped, this.system._unregister(this), this);
24843
+ return this._processingStatus !== pt.Running ? this : (this.system.scheduler.cancelAll(this), this.mailbox.clear(), this.mailbox = new Ah(this._process.bind(this)), this._processingStatus = pt.Stopped, this.system._unregister(this), this);
24794
24844
  }
24795
24845
  /** @internal */
24796
24846
  _send(e) {
24797
- this._processingStatus !== ht.Stopped && this.mailbox.enqueue(e);
24847
+ this._processingStatus !== pt.Stopped && this.mailbox.enqueue(e);
24798
24848
  }
24799
24849
  /**
24800
24850
  * Sends an event to the running Actor to trigger a transition.
@@ -24808,7 +24858,7 @@ class C3 {
24808
24858
  const {
24809
24859
  devTools: e
24810
24860
  } = this.options;
24811
- e && (typeof e == "function" ? e : u3)(this);
24861
+ e && (typeof e == "function" ? e : h3)(this);
24812
24862
  }
24813
24863
  toJSON() {
24814
24864
  return {
@@ -24832,7 +24882,7 @@ class C3 {
24832
24882
  getPersistedSnapshot(e) {
24833
24883
  return this.logic.getPersistedSnapshot(this._snapshot, e);
24834
24884
  }
24835
- [y3]() {
24885
+ [k3]() {
24836
24886
  return this;
24837
24887
  }
24838
24888
  /**
@@ -24854,9 +24904,9 @@ class C3 {
24854
24904
  }
24855
24905
  }
24856
24906
  function Ki(n, ...[e]) {
24857
- return new C3(n, e);
24907
+ return new E3(n, e);
24858
24908
  }
24859
- function M3(n, e, t, o, {
24909
+ function A3(n, e, t, o, {
24860
24910
  sendId: r
24861
24911
  }) {
24862
24912
  const s = typeof r == "function" ? r(t, o) : r;
@@ -24864,7 +24914,7 @@ function M3(n, e, t, o, {
24864
24914
  sendId: s
24865
24915
  }, void 0];
24866
24916
  }
24867
- function T3(n, e) {
24917
+ function I3(n, e) {
24868
24918
  n.defer(() => {
24869
24919
  n.system.scheduler.cancel(n.self, e.sendId);
24870
24920
  });
@@ -24872,9 +24922,9 @@ function T3(n, e) {
24872
24922
  function Lu(n) {
24873
24923
  function e(t, o) {
24874
24924
  }
24875
- return e.type = "xstate.cancel", e.sendId = n, e.resolve = M3, e.execute = T3, e;
24925
+ return e.type = "xstate.cancel", e.sendId = n, e.resolve = A3, e.execute = I3, e;
24876
24926
  }
24877
- function E3(n, e, t, o, {
24927
+ function O3(n, e, t, o, {
24878
24928
  id: r,
24879
24929
  systemId: s,
24880
24930
  src: i,
@@ -24907,11 +24957,11 @@ function E3(n, e, t, o, {
24907
24957
  input: f
24908
24958
  }, void 0];
24909
24959
  }
24910
- function A3(n, {
24960
+ function _3(n, {
24911
24961
  actorRef: e
24912
24962
  }) {
24913
24963
  e && n.defer(() => {
24914
- e._processingStatus !== ht.Stopped && e.start();
24964
+ e._processingStatus !== pt.Stopped && e.start();
24915
24965
  });
24916
24966
  }
24917
24967
  function $u(...[n, {
@@ -24922,9 +24972,9 @@ function $u(...[n, {
24922
24972
  } = {}]) {
24923
24973
  function s(i, l) {
24924
24974
  }
24925
- return s.type = "xstate.spawnChild", s.id = e, s.systemId = t, s.src = n, s.input = o, s.syncSnapshot = r, s.resolve = E3, s.execute = A3, s;
24975
+ return s.type = "xstate.spawnChild", s.id = e, s.systemId = t, s.src = n, s.input = o, s.syncSnapshot = r, s.resolve = O3, s.execute = _3, s;
24926
24976
  }
24927
- function I3(n, e, t, o, {
24977
+ function D3(n, e, t, o, {
24928
24978
  actorRef: r
24929
24979
  }) {
24930
24980
  const s = typeof r == "function" ? r(t, o) : r, i = typeof s == "string" ? e.children[s] : s;
@@ -24942,9 +24992,9 @@ function y0(n, e) {
24942
24992
  y0(n, o);
24943
24993
  n.system._unregister(e);
24944
24994
  }
24945
- function O3(n, e) {
24995
+ function N3(n, e) {
24946
24996
  if (e) {
24947
- if (y0(n, e), e._processingStatus !== ht.Running) {
24997
+ if (y0(n, e), e._processingStatus !== pt.Running) {
24948
24998
  n.stopChild(e);
24949
24999
  return;
24950
25000
  }
@@ -24956,7 +25006,7 @@ function O3(n, e) {
24956
25006
  function Al(n) {
24957
25007
  function e(t, o) {
24958
25008
  }
24959
- return e.type = "xstate.stopChild", e.actorRef = n, e.resolve = I3, e.execute = O3, e;
25009
+ return e.type = "xstate.stopChild", e.actorRef = n, e.resolve = D3, e.execute = N3, e;
24960
25010
  }
24961
25011
  function Il(n, e, t, o) {
24962
25012
  const {
@@ -25045,16 +25095,16 @@ function k0(n, e) {
25045
25095
  function zu(n, e) {
25046
25096
  return e.type === "compound" ? ir(e).some((t) => t.type === "final" && n.has(t)) : e.type === "parallel" ? ir(e).every((t) => zu(n, t)) : e.type === "final";
25047
25097
  }
25048
- const Ol = (n) => n[0] === f3;
25049
- function _3(n, e) {
25050
- return n.transitions.get(e) || [...n.transitions.keys()].filter((o) => k3(e, o)).sort((o, r) => r.length - o.length).flatMap((o) => n.transitions.get(o));
25098
+ const Ol = (n) => n[0] === m3;
25099
+ function R3(n, e) {
25100
+ return n.transitions.get(e) || [...n.transitions.keys()].filter((o) => S3(e, o)).sort((o, r) => r.length - o.length).flatMap((o) => n.transitions.get(o));
25051
25101
  }
25052
- function D3(n) {
25102
+ function P3(n) {
25053
25103
  const e = n.config.after;
25054
25104
  if (!e)
25055
25105
  return [];
25056
25106
  const t = (r) => {
25057
- const s = m3(r, n.id), i = s.type;
25107
+ const s = v3(r, n.id), i = s.type;
25058
25108
  return n.entry.push(Vu(s, {
25059
25109
  id: i,
25060
25110
  delay: r
@@ -25080,7 +25130,7 @@ function D3(n) {
25080
25130
  });
25081
25131
  }
25082
25132
  function Pn(n, e, t) {
25083
- const o = g0(t.target), r = t.reenter ?? !1, s = L3(n, o), i = {
25133
+ const o = g0(t.target), r = t.reenter ?? !1, s = z3(n, o), i = {
25084
25134
  ...t,
25085
25135
  actions: Wn(t.actions),
25086
25136
  guard: t.guard,
@@ -25096,7 +25146,7 @@ function Pn(n, e, t) {
25096
25146
  };
25097
25147
  return i;
25098
25148
  }
25099
- function N3(n) {
25149
+ function L3(n) {
25100
25150
  const e = /* @__PURE__ */ new Map();
25101
25151
  if (n.config.on)
25102
25152
  for (const t of Object.keys(n.config.on)) {
@@ -25129,7 +25179,7 @@ function N3(n) {
25129
25179
  }
25130
25180
  return e;
25131
25181
  }
25132
- function R3(n) {
25182
+ function $3(n) {
25133
25183
  const e = [], t = (o) => {
25134
25184
  Object.values(o).forEach((r) => {
25135
25185
  if (r.config.route && r.config.id) {
@@ -25145,7 +25195,7 @@ function R3(n) {
25145
25195
  };
25146
25196
  t(n.states), e.length > 0 && n.transitions.set("xstate.route", e);
25147
25197
  }
25148
- function P3(n, e) {
25198
+ function B3(n, e) {
25149
25199
  const t = typeof e == "string" ? n.states[e] : e ? n.states[e.target] : void 0;
25150
25200
  if (!t && e)
25151
25201
  throw new Error(
@@ -25166,7 +25216,7 @@ function P3(n, e) {
25166
25216
  };
25167
25217
  return o;
25168
25218
  }
25169
- function L3(n, e) {
25219
+ function z3(n, e) {
25170
25220
  if (e !== void 0)
25171
25221
  return e.map((t) => {
25172
25222
  if (typeof t != "string")
@@ -25259,15 +25309,15 @@ function Gi(n, e) {
25259
25309
  return r.concat(l);
25260
25310
  }, []));
25261
25311
  }
25262
- function $3(n, e, t, o) {
25312
+ function F3(n, e, t, o) {
25263
25313
  const s = lr(n, e).next(t, o);
25264
25314
  return !s || !s.length ? n.next(t, o) : s;
25265
25315
  }
25266
- function B3(n, e, t, o) {
25316
+ function H3(n, e, t, o) {
25267
25317
  const r = Object.keys(e), s = lr(n, r[0]), i = Fu(s, e[r[0]], t, o);
25268
25318
  return !i || !i.length ? n.next(t, o) : i;
25269
25319
  }
25270
- function z3(n, e, t, o) {
25320
+ function V3(n, e, t, o) {
25271
25321
  const r = [];
25272
25322
  for (const s of Object.keys(e)) {
25273
25323
  const i = e[s];
@@ -25279,9 +25329,9 @@ function z3(n, e, t, o) {
25279
25329
  return r.length ? r : n.next(t, o);
25280
25330
  }
25281
25331
  function Fu(n, e, t, o) {
25282
- return typeof e == "string" ? $3(n, e, t, o) : Object.keys(e).length === 1 ? B3(n, e, t, o) : z3(n, e, t, o);
25332
+ return typeof e == "string" ? F3(n, e, t, o) : Object.keys(e).length === 1 ? H3(n, e, t, o) : V3(n, e, t, o);
25283
25333
  }
25284
- function F3(n) {
25334
+ function W3(n) {
25285
25335
  return Object.keys(n.states).map((e) => n.states[e]).filter((e) => e.type === "history");
25286
25336
  }
25287
25337
  function Qn(n, e) {
@@ -25290,7 +25340,7 @@ function Qn(n, e) {
25290
25340
  t = t.parent;
25291
25341
  return t.parent === e;
25292
25342
  }
25293
- function H3(n, e) {
25343
+ function j3(n, e) {
25294
25344
  const t = new Set(n), o = new Set(e);
25295
25345
  for (const r of t)
25296
25346
  if (o.has(r))
@@ -25306,7 +25356,7 @@ function S0(n, e, t) {
25306
25356
  let s = !1;
25307
25357
  const i = /* @__PURE__ */ new Set();
25308
25358
  for (const l of o)
25309
- if (H3(bc([r], e, t), bc([l], e, t)))
25359
+ if (j3(bc([r], e, t), bc([l], e, t)))
25310
25360
  if (Qn(r.source, l.source))
25311
25361
  i.add(l);
25312
25362
  else {
@@ -25321,7 +25371,7 @@ function S0(n, e, t) {
25321
25371
  }
25322
25372
  return Array.from(o);
25323
25373
  }
25324
- function V3(n) {
25374
+ function U3(n) {
25325
25375
  const [e, ...t] = n;
25326
25376
  for (const o of ws(e, void 0))
25327
25377
  if (t.every((r) => Qn(r, o)))
@@ -25349,7 +25399,7 @@ function C0(n, e) {
25349
25399
  return;
25350
25400
  if (!n.reenter && t.every((r) => r === n.source || Qn(r, n.source)))
25351
25401
  return n.source;
25352
- const o = V3(t.concat(n.source));
25402
+ const o = U3(t.concat(n.source));
25353
25403
  if (o)
25354
25404
  return o;
25355
25405
  if (!n.reenter)
@@ -25367,7 +25417,7 @@ function bc(n, e, t) {
25367
25417
  }
25368
25418
  return [...o];
25369
25419
  }
25370
- function W3(n, e) {
25420
+ function K3(n, e) {
25371
25421
  if (n.length !== e.size)
25372
25422
  return !1;
25373
25423
  for (const t of n)
@@ -25375,7 +25425,7 @@ function W3(n, e) {
25375
25425
  return !1;
25376
25426
  return !0;
25377
25427
  }
25378
- function j3(n, e, t, o, r) {
25428
+ function q3(n, e, t, o, r) {
25379
25429
  return xc([{
25380
25430
  target: [...x0(n)],
25381
25431
  source: n,
@@ -25398,11 +25448,11 @@ function xc(n, e, t, o, r, s) {
25398
25448
  let c = e.historyValue;
25399
25449
  const u = S0(n, a, c);
25400
25450
  let d = e;
25401
- r || ([d, c] = J3(d, o, t, u, a, c, s, t.actionExecutor)), d = ar(d, o, t, u.flatMap((h) => h.actions), s, void 0), d = K3(d, o, t, u, a, s, c, r);
25451
+ r || ([d, c] = X3(d, o, t, u, a, c, s, t.actionExecutor)), d = ar(d, o, t, u.flatMap((h) => h.actions), s, void 0), d = G3(d, o, t, u, a, s, c, r);
25402
25452
  const f = [...a];
25403
25453
  d.status === "done" && (d = ar(d, o, t, f.sort((h, p) => p.order - h.order).flatMap((h) => h.exit), s, void 0));
25404
25454
  try {
25405
- return c === e.historyValue && W3(e._nodes, a) ? [d, i] : [Ao(d, {
25455
+ return c === e.historyValue && K3(e._nodes, a) ? [d, i] : [Ao(d, {
25406
25456
  _nodes: f,
25407
25457
  historyValue: c
25408
25458
  }), i];
@@ -25413,16 +25463,16 @@ function xc(n, e, t, o, r, s) {
25413
25463
  t.actionExecutor = l;
25414
25464
  }
25415
25465
  }
25416
- function U3(n, e, t, o, r) {
25466
+ function J3(n, e, t, o, r) {
25417
25467
  if (o.output === void 0)
25418
25468
  return;
25419
25469
  const s = vc(r.id, r.output !== void 0 && r.parent ? wc(r.output, n.context, e, t.self) : void 0);
25420
25470
  return wc(o.output, n.context, s, t.self);
25421
25471
  }
25422
- function K3(n, e, t, o, r, s, i, l) {
25472
+ function G3(n, e, t, o, r, s, i, l) {
25423
25473
  let a = n;
25424
25474
  const c = /* @__PURE__ */ new Set(), u = /* @__PURE__ */ new Set();
25425
- q3(o, i, u, c), l && u.add(n.machine.root);
25475
+ Y3(o, i, u, c), l && u.add(n.machine.root);
25426
25476
  const d = /* @__PURE__ */ new Set();
25427
25477
  for (const f of [...c].sort((h, p) => h.order - p.order)) {
25428
25478
  r.add(f);
@@ -25446,13 +25496,13 @@ function K3(n, e, t, o, r, s, i, l) {
25446
25496
  continue;
25447
25497
  a = Ao(a, {
25448
25498
  status: "done",
25449
- output: U3(a, e, t, a.machine.root, g)
25499
+ output: J3(a, e, t, a.machine.root, g)
25450
25500
  });
25451
25501
  }
25452
25502
  }
25453
25503
  return a;
25454
25504
  }
25455
- function q3(n, e, t, o) {
25505
+ function Y3(n, e, t, o) {
25456
25506
  for (const r of n) {
25457
25507
  const s = C0(r, e);
25458
25508
  for (const l of r.target || [])
@@ -25500,13 +25550,13 @@ function M0(n, e, t, o, r) {
25500
25550
  function ka(n, e, t, o, r) {
25501
25551
  M0(t, o, r, ws(n, e));
25502
25552
  }
25503
- function J3(n, e, t, o, r, s, i, l) {
25553
+ function X3(n, e, t, o, r, s, i, l) {
25504
25554
  let a = n;
25505
25555
  const c = bc(o, r, s);
25506
25556
  c.sort((d, f) => f.order - d.order);
25507
25557
  let u;
25508
25558
  for (const d of c)
25509
- for (const f of F3(d)) {
25559
+ for (const f of W3(d)) {
25510
25560
  let h;
25511
25561
  f.history === "deep" ? h = (p) => Bu(p) && Qn(p, d) : h = (p) => p.parent === d, u ?? (u = {
25512
25562
  ...s
@@ -25516,7 +25566,7 @@ function J3(n, e, t, o, r, s, i, l) {
25516
25566
  a = ar(a, e, t, [...d.exit, ...d.invoke.map((f) => Al(f.id))], i, void 0), r.delete(d);
25517
25567
  return [a, u || s];
25518
25568
  }
25519
- function G3(n, e) {
25569
+ function Z3(n, e) {
25520
25570
  return n.implementations.actions[e];
25521
25571
  }
25522
25572
  function T0(n, e, t, o, r, s) {
@@ -25529,7 +25579,7 @@ function T0(n, e, t, o, r, s) {
25529
25579
  // the existing type of `.actions` assumes non-nullable `TExpressionAction`
25530
25580
  // it's fine to cast this here to get a common type and lack of errors in the rest of the code
25531
25581
  // our logic below makes sure that we call those 2 "variants" correctly
25532
- G3(i, typeof a == "string" ? a : a.type)
25582
+ Z3(i, typeof a == "string" ? a : a.type)
25533
25583
  ), d = {
25534
25584
  context: l.context,
25535
25585
  event: e,
@@ -25596,7 +25646,7 @@ function ba(n, e, t, o) {
25596
25646
  };
25597
25647
  let l = e;
25598
25648
  if (l.type !== u0) {
25599
- const c = l, u = w3(c), d = Ph(c, r);
25649
+ const c = l, u = x3(c), d = Ph(c, r);
25600
25650
  if (u && !d.length)
25601
25651
  return r = Ao(n, {
25602
25652
  status: "error",
@@ -25618,7 +25668,7 @@ function ba(n, e, t, o) {
25618
25668
  }
25619
25669
  let a = !0;
25620
25670
  for (; r.status === "active"; ) {
25621
- let c = a ? Y3(r, l) : [];
25671
+ let c = a ? Q3(r, l) : [];
25622
25672
  const u = c.length ? r : void 0;
25623
25673
  if (!c.length) {
25624
25674
  if (!o.length)
@@ -25639,7 +25689,7 @@ function Rh(n, e, t) {
25639
25689
  function Ph(n, e) {
25640
25690
  return e.machine.getTransitionData(e, n);
25641
25691
  }
25642
- function Y3(n, e) {
25692
+ function Q3(n, e) {
25643
25693
  const t = /* @__PURE__ */ new Set(), o = n._nodes.filter(Bu);
25644
25694
  for (const r of o)
25645
25695
  e: for (const s of [r].concat(ws(r, void 0)))
@@ -25652,22 +25702,22 @@ function Y3(n, e) {
25652
25702
  }
25653
25703
  return S0(Array.from(t), new Set(n._nodes), n.historyValue);
25654
25704
  }
25655
- function X3(n, e) {
25705
+ function eA(n, e) {
25656
25706
  const t = qi(Gi(n, e));
25657
25707
  return k0(n, [...t]);
25658
25708
  }
25659
- function Z3(n) {
25709
+ function tA(n) {
25660
25710
  return !!n && typeof n == "object" && "machine" in n && "value" in n;
25661
25711
  }
25662
- const Q3 = function(e) {
25712
+ const nA = function(e) {
25663
25713
  return h0(e, this.value);
25664
- }, eA = function(e) {
25714
+ }, oA = function(e) {
25665
25715
  return this.tags.has(e);
25666
- }, tA = function(e) {
25716
+ }, rA = function(e) {
25667
25717
  const t = this.machine.getTransitionData(this, e);
25668
25718
  return !!(t != null && t.length) && // Check that at least one transition is not forbidden
25669
25719
  t.some((o) => o.target !== void 0 || o.actions.length);
25670
- }, nA = function() {
25720
+ }, sA = function() {
25671
25721
  const {
25672
25722
  _nodes: e,
25673
25723
  tags: t,
@@ -25683,7 +25733,7 @@ const Q3 = function(e) {
25683
25733
  ...c,
25684
25734
  tags: Array.from(t)
25685
25735
  };
25686
- }, oA = function() {
25736
+ }, iA = function() {
25687
25737
  return this._nodes.reduce((e, t) => (t.meta !== void 0 && (e[t.id] = t.meta), e), {});
25688
25738
  };
25689
25739
  function Vs(n, e) {
@@ -25698,11 +25748,11 @@ function Vs(n, e) {
25698
25748
  tags: new Set(n._nodes.flatMap((t) => t.tags)),
25699
25749
  children: n.children,
25700
25750
  historyValue: n.historyValue || {},
25701
- matches: Q3,
25702
- hasTag: eA,
25703
- can: tA,
25704
- getMeta: oA,
25705
- toJSON: nA
25751
+ matches: nA,
25752
+ hasTag: oA,
25753
+ can: rA,
25754
+ getMeta: iA,
25755
+ toJSON: sA
25706
25756
  };
25707
25757
  }
25708
25758
  function Ao(n, e = {}) {
@@ -25711,7 +25761,7 @@ function Ao(n, e = {}) {
25711
25761
  ...e
25712
25762
  }, n.machine);
25713
25763
  }
25714
- function rA(n) {
25764
+ function lA(n) {
25715
25765
  if (typeof n != "object" || n === null)
25716
25766
  return {};
25717
25767
  const e = {};
@@ -25723,7 +25773,7 @@ function rA(n) {
25723
25773
  }
25724
25774
  return e;
25725
25775
  }
25726
- function sA(n, e) {
25776
+ function aA(n, e) {
25727
25777
  const {
25728
25778
  _nodes: t,
25729
25779
  tags: o,
@@ -25750,7 +25800,7 @@ function sA(n, e) {
25750
25800
  ...f,
25751
25801
  context: E0(i),
25752
25802
  children: h,
25753
- historyValue: rA(f.historyValue)
25803
+ historyValue: lA(f.historyValue)
25754
25804
  };
25755
25805
  }
25756
25806
  function E0(n) {
@@ -25774,7 +25824,7 @@ function E0(n) {
25774
25824
  }
25775
25825
  return e ?? n;
25776
25826
  }
25777
- function iA(n, e, t, o, {
25827
+ function cA(n, e, t, o, {
25778
25828
  event: r,
25779
25829
  id: s,
25780
25830
  delay: i
@@ -25800,7 +25850,7 @@ function iA(n, e, t, o, {
25800
25850
  delay: u
25801
25851
  }, void 0];
25802
25852
  }
25803
- function lA(n, e) {
25853
+ function uA(n, e) {
25804
25854
  const {
25805
25855
  event: t,
25806
25856
  delay: o,
@@ -25817,9 +25867,9 @@ function lA(n, e) {
25817
25867
  function Vu(n, e) {
25818
25868
  function t(o, r) {
25819
25869
  }
25820
- return t.type = "xstate.raise", t.event = n, t.id = e == null ? void 0 : e.id, t.delay = e == null ? void 0 : e.delay, t.resolve = iA, t.execute = lA, t;
25870
+ return t.type = "xstate.raise", t.event = n, t.id = e == null ? void 0 : e.id, t.delay = e == null ? void 0 : e.delay, t.resolve = cA, t.execute = uA, t;
25821
25871
  }
25822
- function aA(n, {
25872
+ function dA(n, {
25823
25873
  machine: e,
25824
25874
  context: t
25825
25875
  }, o, r) {
@@ -25854,11 +25904,11 @@ function aA(n, {
25854
25904
  return (i, l) => {
25855
25905
  const a = s(i, l);
25856
25906
  return r[a.id] = a, n.defer(() => {
25857
- a._processingStatus !== ht.Stopped && a.start();
25907
+ a._processingStatus !== pt.Stopped && a.start();
25858
25908
  }), a;
25859
25909
  };
25860
25910
  }
25861
- function cA(n, e, t, o, {
25911
+ function fA(n, e, t, o, {
25862
25912
  assignment: r
25863
25913
  }) {
25864
25914
  if (!e.context)
@@ -25866,7 +25916,7 @@ function cA(n, e, t, o, {
25866
25916
  const s = {}, i = {
25867
25917
  context: e.context,
25868
25918
  event: t.event,
25869
- spawn: aA(n, e, t.event, s),
25919
+ spawn: dA(n, e, t.event, s),
25870
25920
  self: n.self,
25871
25921
  system: n.system
25872
25922
  };
@@ -25890,7 +25940,7 @@ function cA(n, e, t, o, {
25890
25940
  function fo(n) {
25891
25941
  function e(t, o) {
25892
25942
  }
25893
- return e.type = "xstate.assign", e.assignment = n, e.resolve = cA, e;
25943
+ return e.type = "xstate.assign", e.assignment = n, e.resolve = fA, e;
25894
25944
  }
25895
25945
  const Lh = /* @__PURE__ */ new WeakMap();
25896
25946
  function Fo(n, e, t) {
@@ -25899,7 +25949,7 @@ function Fo(n, e, t) {
25899
25949
  [e]: t()
25900
25950
  }, Lh.set(n, o)), o[e];
25901
25951
  }
25902
- const uA = {}, Mr = (n) => typeof n == "string" ? {
25952
+ const hA = {}, Mr = (n) => typeof n == "string" ? {
25903
25953
  type: n
25904
25954
  } : typeof n == "function" ? "resolve" in n ? {
25905
25955
  type: n.type
@@ -25912,13 +25962,13 @@ class Yi {
25912
25962
  _parent: this,
25913
25963
  _key: r,
25914
25964
  _machine: this.machine
25915
- })) : uA, this.type === "compound" && !this.config.initial)
25965
+ })) : hA, this.type === "compound" && !this.config.initial)
25916
25966
  throw new Error(`No initial state specified for compound state node "#${this.id}". Try adding { initial: "${Object.keys(this.states)[0]}" } to the state config.`);
25917
25967
  this.history = this.config.history === !0 ? "shallow" : this.config.history || !1, this.entry = Wn(this.config.entry).slice(), this.exit = Wn(this.config.exit).slice(), this.meta = this.config.meta, this.output = this.type === "final" || !this.parent ? this.config.output : void 0, this.tags = Wn(e.tags).slice();
25918
25968
  }
25919
25969
  /** @internal */
25920
25970
  _initialize() {
25921
- this.transitions = N3(this), this.config.always && (this.always = jo(this.config.always).map((e) => Pn(this, c0, e))), Object.keys(this.states).forEach((e) => {
25971
+ this.transitions = L3(this), this.config.always && (this.always = jo(this.config.always).map((e) => Pn(this, c0, e))), Object.keys(this.states).forEach((e) => {
25922
25972
  this.states[e]._initialize();
25923
25973
  });
25924
25974
  }
@@ -25996,16 +26046,16 @@ class Yi {
25996
26046
  return Fo(this, "on", () => [...this.transitions].flatMap(([t, o]) => o.map((r) => [t, r])).reduce((t, [o, r]) => (t[o] = t[o] || [], t[o].push(r), t), {}));
25997
26047
  }
25998
26048
  get after() {
25999
- return Fo(this, "delayedTransitions", () => D3(this));
26049
+ return Fo(this, "delayedTransitions", () => P3(this));
26000
26050
  }
26001
26051
  get initial() {
26002
- return Fo(this, "initial", () => P3(this, this.config.initial));
26052
+ return Fo(this, "initial", () => B3(this, this.config.initial));
26003
26053
  }
26004
26054
  /** @internal */
26005
26055
  next(e, t) {
26006
26056
  const o = t.type, r = [];
26007
26057
  let s;
26008
- const i = Fo(this, `candidates-${o}`, () => _3(this, o));
26058
+ const i = Fo(this, `candidates-${o}`, () => R3(this, o));
26009
26059
  for (const l of i) {
26010
26060
  const {
26011
26061
  guard: a
@@ -26051,7 +26101,7 @@ ${d.message}`);
26051
26101
  return Array.from(t);
26052
26102
  }
26053
26103
  }
26054
- const dA = "#";
26104
+ const pA = "#";
26055
26105
  class Wu {
26056
26106
  constructor(e, t) {
26057
26107
  this.config = e, this.version = void 0, this.schemas = void 0, this.implementations = void 0, this.__xstatenode = !0, this.idMap = /* @__PURE__ */ new Map(), this.root = void 0, this.id = void 0, this.states = void 0, this.events = void 0, this.id = e.id || "(machine)", this.implementations = {
@@ -26062,7 +26112,7 @@ class Wu {
26062
26112
  }, this.version = this.config.version, this.schemas = this.config.schemas, this.transition = this.transition.bind(this), this.getInitialSnapshot = this.getInitialSnapshot.bind(this), this.getPersistedSnapshot = this.getPersistedSnapshot.bind(this), this.restoreSnapshot = this.restoreSnapshot.bind(this), this.start = this.start.bind(this), this.root = new Yi(e, {
26063
26113
  _key: this.id,
26064
26114
  _machine: this
26065
- }), this.root._initialize(), R3(this.root), this.states = this.root.states, this.events = this.root.events;
26115
+ }), this.root._initialize(), $3(this.root), this.states = this.root.states, this.events = this.root.events;
26066
26116
  }
26067
26117
  /**
26068
26118
  * Clones this state machine with the provided implementations.
@@ -26098,7 +26148,7 @@ class Wu {
26098
26148
  });
26099
26149
  }
26100
26150
  resolveState(e) {
26101
- const t = X3(this.root, e.value), o = qi(Gi(this.root, t));
26151
+ const t = eA(this.root, e.value), o = qi(Gi(this.root, t));
26102
26152
  return Vs({
26103
26153
  _nodes: [...o],
26104
26154
  context: e.context || {},
@@ -26162,7 +26212,7 @@ class Wu {
26162
26212
  * `ActorRef`.
26163
26213
  */
26164
26214
  getInitialSnapshot(e, t) {
26165
- const o = f0(t), r = [], s = this._getPreInitialState(e, o, r), [i] = j3(this.root, s, e, o, r), {
26215
+ const o = f0(t), r = [], s = this._getPreInitialState(e, o, r), [i] = q3(this.root, s, e, o, r), {
26166
26216
  snapshot: l
26167
26217
  } = ba(i, o, e, r);
26168
26218
  return l;
@@ -26173,7 +26223,7 @@ class Wu {
26173
26223
  });
26174
26224
  }
26175
26225
  getStateNodeById(e) {
26176
- const t = Nu(e), o = t.slice(1), r = Ol(t[0]) ? t[0].slice(dA.length) : t[0], s = this.idMap.get(r);
26226
+ const t = Nu(e), o = t.slice(1), r = Ol(t[0]) ? t[0].slice(pA.length) : t[0], s = this.idMap.get(r);
26177
26227
  if (!s)
26178
26228
  throw new Error(`Child state node '#${r}' does not exist on machine '${this.id}'`);
26179
26229
  return Ji(s, o);
@@ -26185,7 +26235,7 @@ class Wu {
26185
26235
  return this.definition;
26186
26236
  }
26187
26237
  getPersistedSnapshot(e, t) {
26188
- return sA(e, t);
26238
+ return aA(e, t);
26189
26239
  }
26190
26240
  restoreSnapshot(e, t) {
26191
26241
  const o = {}, r = e.children;
@@ -26248,7 +26298,7 @@ class Wu {
26248
26298
  return u(a.context, o), a;
26249
26299
  }
26250
26300
  }
26251
- function fA(n, e, t, o, {
26301
+ function mA(n, e, t, o, {
26252
26302
  event: r
26253
26303
  }) {
26254
26304
  const s = typeof r == "function" ? r(t, o) : r;
@@ -26256,7 +26306,7 @@ function fA(n, e, t, o, {
26256
26306
  event: s
26257
26307
  }, void 0];
26258
26308
  }
26259
- function hA(n, {
26309
+ function gA(n, {
26260
26310
  event: e
26261
26311
  }) {
26262
26312
  n.defer(() => n.emit(e));
@@ -26264,12 +26314,12 @@ function hA(n, {
26264
26314
  function A0(n) {
26265
26315
  function e(t, o) {
26266
26316
  }
26267
- return e.type = "xstate.emit", e.event = n, e.resolve = fA, e.execute = hA, e;
26317
+ return e.type = "xstate.emit", e.event = n, e.resolve = mA, e.execute = gA, e;
26268
26318
  }
26269
26319
  let Sc = /* @__PURE__ */ function(n) {
26270
26320
  return n.Parent = "#_parent", n.Internal = "#_internal", n;
26271
26321
  }({});
26272
- function pA(n, e, t, o, {
26322
+ function yA(n, e, t, o, {
26273
26323
  to: r,
26274
26324
  event: s,
26275
26325
  id: i,
@@ -26304,10 +26354,10 @@ function pA(n, e, t, o, {
26304
26354
  delay: d
26305
26355
  }, void 0];
26306
26356
  }
26307
- function mA(n, e, t) {
26357
+ function vA(n, e, t) {
26308
26358
  typeof t.to == "string" && (t.to = e.children[t.to]);
26309
26359
  }
26310
- function gA(n, e) {
26360
+ function wA(n, e) {
26311
26361
  n.defer(() => {
26312
26362
  const {
26313
26363
  to: t,
@@ -26324,19 +26374,19 @@ function gA(n, e) {
26324
26374
  // at this point, in a deferred task, it should already be mutated by retryResolveSendTo
26325
26375
  // if it initially started as a string
26326
26376
  t,
26327
- o.type === p3 ? d0(n.self.id, o.data) : o
26377
+ o.type === y3 ? d0(n.self.id, o.data) : o
26328
26378
  );
26329
26379
  });
26330
26380
  }
26331
26381
  function ju(n, e, t) {
26332
26382
  function o(r, s) {
26333
26383
  }
26334
- return o.type = "xstate.sendTo", o.to = n, o.event = e, o.id = t == null ? void 0 : t.id, o.delay = t == null ? void 0 : t.delay, o.resolve = pA, o.retryResolve = mA, o.execute = gA, o;
26384
+ return o.type = "xstate.sendTo", o.to = n, o.event = e, o.id = t == null ? void 0 : t.id, o.delay = t == null ? void 0 : t.delay, o.resolve = yA, o.retryResolve = vA, o.execute = wA, o;
26335
26385
  }
26336
- function yA(n, e) {
26386
+ function kA(n, e) {
26337
26387
  return ju(Sc.Parent, n, e);
26338
26388
  }
26339
- function vA(n, e, t, o, {
26389
+ function bA(n, e, t, o, {
26340
26390
  collect: r
26341
26391
  }) {
26342
26392
  const s = [], i = function(a) {
@@ -26351,7 +26401,7 @@ function vA(n, e, t, o, {
26351
26401
  }, i.sendTo = (...l) => {
26352
26402
  s.push(ju(...l));
26353
26403
  }, i.sendParent = (...l) => {
26354
- s.push(yA(...l));
26404
+ s.push(kA(...l));
26355
26405
  }, i.spawnChild = (...l) => {
26356
26406
  s.push($u(...l));
26357
26407
  }, i.stopChild = (...l) => {
@@ -26367,12 +26417,12 @@ function vA(n, e, t, o, {
26367
26417
  system: n.system
26368
26418
  }, o), [e, void 0, s];
26369
26419
  }
26370
- function wA(n) {
26420
+ function xA(n) {
26371
26421
  function e(t, o) {
26372
26422
  }
26373
- return e.type = "xstate.enqueueActions", e.collect = n, e.resolve = vA, e;
26423
+ return e.type = "xstate.enqueueActions", e.collect = n, e.resolve = bA, e;
26374
26424
  }
26375
- function kA(n, e, t, o, {
26425
+ function SA(n, e, t, o, {
26376
26426
  value: r,
26377
26427
  label: s
26378
26428
  }) {
@@ -26381,7 +26431,7 @@ function kA(n, e, t, o, {
26381
26431
  label: s
26382
26432
  }, void 0];
26383
26433
  }
26384
- function bA({
26434
+ function CA({
26385
26435
  logger: n
26386
26436
  }, {
26387
26437
  value: e,
@@ -26389,7 +26439,7 @@ function bA({
26389
26439
  }) {
26390
26440
  t ? n(t, e) : n(e);
26391
26441
  }
26392
- function xA(n = ({
26442
+ function MA(n = ({
26393
26443
  context: t,
26394
26444
  event: o
26395
26445
  }) => ({
@@ -26398,9 +26448,9 @@ function xA(n = ({
26398
26448
  }), e) {
26399
26449
  function t(o, r) {
26400
26450
  }
26401
- return t.type = "xstate.log", t.value = n, t.label = e, t.resolve = kA, t.execute = bA, t;
26451
+ return t.type = "xstate.log", t.value = n, t.label = e, t.resolve = SA, t.execute = CA, t;
26402
26452
  }
26403
- function SA(n, e) {
26453
+ function TA(n, e) {
26404
26454
  return new Wu(n, e);
26405
26455
  }
26406
26456
  function I0({
@@ -26414,15 +26464,15 @@ function I0({
26414
26464
  assign: fo,
26415
26465
  sendTo: ju,
26416
26466
  raise: Vu,
26417
- log: xA,
26467
+ log: MA,
26418
26468
  cancel: Lu,
26419
26469
  stopChild: Al,
26420
- enqueueActions: wA,
26470
+ enqueueActions: xA,
26421
26471
  emit: A0,
26422
26472
  spawnChild: $u,
26423
26473
  createStateConfig: (s) => s,
26424
26474
  createAction: (s) => s,
26425
- createMachine: (s) => SA({
26475
+ createMachine: (s) => TA({
26426
26476
  ...s,
26427
26477
  schemas: n
26428
26478
  }, {
@@ -26449,9 +26499,9 @@ function I0({
26449
26499
  })
26450
26500
  };
26451
26501
  }
26452
- const CA = 4, $h = 1, Bh = "draw", MA = I0({
26502
+ const EA = 4, $h = 1, Bh = "draw", AA = I0({
26453
26503
  guards: {
26454
- isThresholdReached: ({ context: n, event: e }) => In.distance(n.pointingStartWorld, e.worldPosition) * e.cameraZoom >= CA
26504
+ isThresholdReached: ({ context: n, event: e }) => In.distance(n.pointingStartWorld, e.worldPosition) * e.cameraZoom >= EA
26455
26505
  },
26456
26506
  actions: {
26457
26507
  setPointingStart: fo({
@@ -26554,15 +26604,15 @@ const CA = 4, $h = 1, Bh = "draw", MA = I0({
26554
26604
  }
26555
26605
  }
26556
26606
  }
26557
- }), TA = tl({ phase: "capture", priority: 100 }, (n) => {
26607
+ }), IA = tl({ phase: "capture", priority: 100 }, (n) => {
26558
26608
  if (nl(n)) return;
26559
26609
  const e = Bt.read(n);
26560
26610
  if (e.leftMouseTool !== Bh || !e.heldSnapshot) return;
26561
26611
  const t = Bt.getButtons(n, Bh);
26562
26612
  if (t.length === 0) return;
26563
26613
  const o = Rc(n, t);
26564
- o.length !== 0 && l0.run(n, MA, o);
26565
- }), EA = tl({ phase: "update" }, (n) => {
26614
+ o.length !== 0 && l0.run(n, AA, o);
26615
+ }), OA = tl({ phase: "update" }, (n) => {
26566
26616
  if (nl(n)) return;
26567
26617
  const { store: e } = Io(n, No);
26568
26618
  od(n, Dc, () => {
@@ -26570,7 +26620,7 @@ const CA = 4, $h = 1, Bh = "draw", MA = I0({
26570
26620
  }), od(n, qs, () => {
26571
26621
  e.canRedo() && (Ta(n), e.redo());
26572
26622
  });
26573
- }), AA = [
26623
+ }), _A = [
26574
26624
  {
26575
26625
  name: "Figtree",
26576
26626
  displayName: "Figtree",
@@ -26596,17 +26646,17 @@ const CA = 4, $h = 1, Bh = "draw", MA = I0({
26596
26646
  previewImage: "https://storage.googleapis.com/scrolly-page-fonts/EBGaramond.png"
26597
26647
  }
26598
26648
  ];
26599
- function IA(n) {
26649
+ function DA(n) {
26600
26650
  return {
26601
26651
  name: No,
26602
26652
  resources: { store: n.store, getDefaults: n.getDefaults },
26603
26653
  singletons: [Ui, qr, l0],
26604
- systems: [r3, TA, l3, EA],
26654
+ systems: [l3, IA, u3, OA],
26605
26655
  setup(e) {
26606
26656
  n.doubleClickSnapshot && (qr.write(e).snapshot = n.doubleClickSnapshot);
26607
26657
  },
26608
- cursors: ZT,
26609
- fonts: AA,
26658
+ cursors: tE,
26659
+ fonts: _A,
26610
26660
  keybinds: [
26611
26661
  { command: Dc.name, key: Ll.Z, mod: !0 },
26612
26662
  { command: qs.name, key: Ll.Y, mod: !0 },
@@ -26614,7 +26664,7 @@ function IA(n) {
26614
26664
  ]
26615
26665
  };
26616
26666
  }
26617
- const OA = /* @__PURE__ */ q({
26667
+ const NA = /* @__PURE__ */ q({
26618
26668
  __name: "ClipboardHandler",
26619
26669
  props: {
26620
26670
  options: {}
@@ -26623,12 +26673,12 @@ const OA = /* @__PURE__ */ q({
26623
26673
  const e = n, t = ge("containerRef", B(null));
26624
26674
  return hS(t, e.options), (o, r) => me(o.$slots, "default");
26625
26675
  }
26626
- }), _A = { class: "wov-user-cursors" }, DA = {
26676
+ }), RA = { class: "wov-user-cursors" }, PA = {
26627
26677
  class: "wov-cursor-svg",
26628
26678
  viewBox: "0 0 4.35 4.75",
26629
26679
  width: "20",
26630
26680
  height: "20"
26631
- }, NA = ["fill"], RA = "M2.39,2.88s-.04.01-.05.02c-.01,0-.02.01-.03.02,0,.01-.02.02-.03.05l-.77,1.44c-.07.13-.1.19-.14.2-.03.01-.07,0-.1-.01-.03-.02-.05-.09-.09-.23L.16.41c-.03-.13-.05-.19-.03-.23.02-.03.04-.05.08-.06.04,0,.1.02.21.08l3.59,1.94c.13.07.19.1.2.14.01.03,0,.07-.01.1-.02.03-.09.05-.23.09l-1.58.4Z", PA = /* @__PURE__ */ q({
26681
+ }, LA = ["fill"], $A = "M2.39,2.88s-.04.01-.05.02c-.01,0-.02.01-.03.02,0,.01-.02.02-.03.05l-.77,1.44c-.07.13-.1.19-.14.2-.03.01-.07,0-.1-.01-.03-.02-.05-.09-.09-.23L.16.41c-.03-.13-.05-.19-.03-.23.02-.03.04-.05.08-.06.04,0,.1.02.21.08l3.59,1.94c.13.07.19.1.2.14.01.03,0,.07-.01.1-.02.03-.09.05-.23.09l-1.58.4Z", BA = /* @__PURE__ */ q({
26632
26682
  __name: "UserCursors",
26633
26683
  props: {
26634
26684
  users: {},
@@ -26643,7 +26693,7 @@ const OA = /* @__PURE__ */ q({
26643
26693
  screenY: (o.position[1] - e.camera.top) * e.camera.zoom
26644
26694
  }))
26645
26695
  );
26646
- return (o, r) => (C(), A("div", _A, [
26696
+ return (o, r) => (C(), A("div", RA, [
26647
26697
  (C(!0), A(ie, null, Se(t.value, (s) => (C(), A("div", {
26648
26698
  key: s.sessionId,
26649
26699
  class: "wov-user-cursor",
@@ -26651,14 +26701,14 @@ const OA = /* @__PURE__ */ q({
26651
26701
  transform: `translate(${s.screenX}px, ${s.screenY}px)`
26652
26702
  })
26653
26703
  }, [
26654
- (C(), A("svg", DA, [
26704
+ (C(), A("svg", PA, [
26655
26705
  x("path", {
26656
26706
  fill: s.color,
26657
26707
  stroke: "#fff",
26658
26708
  "stroke-miterlimit": "10",
26659
26709
  "stroke-width": ".25",
26660
- d: RA
26661
- }, null, 8, NA)
26710
+ d: $A
26711
+ }, null, 8, LA)
26662
26712
  ])),
26663
26713
  x("span", {
26664
26714
  class: "wov-cursor-label",
@@ -26667,21 +26717,21 @@ const OA = /* @__PURE__ */ q({
26667
26717
  ], 4))), 128))
26668
26718
  ]));
26669
26719
  }
26670
- }), LA = {
26720
+ }), zA = {
26671
26721
  key: 0,
26672
26722
  class: "wov-offline-indicator"
26673
- }, $A = /* @__PURE__ */ q({
26723
+ }, FA = /* @__PURE__ */ q({
26674
26724
  __name: "OfflineIndicator",
26675
26725
  props: {
26676
26726
  isOnline: { type: Boolean }
26677
26727
  },
26678
26728
  setup(n) {
26679
- return (e, t) => n.isOnline ? j("", !0) : (C(), A("div", LA, "Working Offline"));
26729
+ return (e, t) => n.isOnline ? j("", !0) : (C(), A("div", zA, "Working Offline"));
26680
26730
  }
26681
- }), BA = {
26731
+ }), HA = {
26682
26732
  key: 0,
26683
26733
  class: "wov-version-mismatch-overlay"
26684
- }, zA = /* @__PURE__ */ q({
26734
+ }, VA = /* @__PURE__ */ q({
26685
26735
  __name: "VersionMismatch",
26686
26736
  props: {
26687
26737
  versionMismatch: { type: Boolean }
@@ -26690,7 +26740,7 @@ const OA = /* @__PURE__ */ q({
26690
26740
  function e() {
26691
26741
  window.location.reload();
26692
26742
  }
26693
- return (t, o) => n.versionMismatch ? (C(), A("div", BA, [
26743
+ return (t, o) => n.versionMismatch ? (C(), A("div", HA, [
26694
26744
  x("div", { class: "wov-version-mismatch-dialog" }, [
26695
26745
  o[0] || (o[0] = x("p", null, "A new version is available.", -1)),
26696
26746
  o[1] || (o[1] = x("p", null, "Please refresh the page to continue.", -1)),
@@ -26698,10 +26748,10 @@ const OA = /* @__PURE__ */ q({
26698
26748
  ])
26699
26749
  ])) : j("", !0);
26700
26750
  }
26701
- }), FA = /* @__PURE__ */ q({
26751
+ }), WA = /* @__PURE__ */ q({
26702
26752
  __name: "BackToContentButton",
26703
26753
  setup(n) {
26704
- const { nextEditorTick: e } = Ce(), t = ot(Pe), o = ct((c) => c.with(Tt, le, Uo)), r = B(0), s = ge(Ue);
26754
+ const { nextEditorTick: e } = Ce(), t = ot(Pe), o = ct((c) => c.with(Et, le, Uo)), r = B(0), s = ge(Ue);
26705
26755
  if (s) {
26706
26756
  const c = s.registerTickCallback((u) => {
26707
26757
  o.addedOrRemoved(u).length > 0 && (r.value = o.current(u).length);
@@ -26782,7 +26832,7 @@ const OA = /* @__PURE__ */ q({
26782
26832
  Sa(" Back to content ", -1)
26783
26833
  ])])) : j("", !0);
26784
26834
  }
26785
- }), HA = ["data-entity-id", "data-selected", "data-held-by-other", "data-hovered", "data-edited"], VA = /* @__PURE__ */ q({
26835
+ }), jA = ["data-entity-id", "data-selected", "data-held-by-other", "data-hovered", "data-edited"], UA = /* @__PURE__ */ q({
26786
26836
  __name: "WovenCanvasCore",
26787
26837
  props: {
26788
26838
  store: {},
@@ -26808,7 +26858,7 @@ const OA = /* @__PURE__ */ q({
26808
26858
  "transform-handle": YS,
26809
26859
  "arrow-handle": Wy,
26810
26860
  "arrow-terminal": qy,
26811
- "sticky-note": t3,
26861
+ "sticky-note": r3,
26812
26862
  eraser: Sv,
26813
26863
  "pen-stroke": $v,
26814
26864
  "arc-arrow": zy,
@@ -26869,7 +26919,7 @@ const OA = /* @__PURE__ */ q({
26869
26919
  P.delete(U), P.size === 0 && D.delete(I);
26870
26920
  };
26871
26921
  }
26872
- function bt(I, U) {
26922
+ function xt(I, U) {
26873
26923
  const P = D.get(U.name);
26874
26924
  if (!P || P.size === 0) return;
26875
26925
  const K = U.snapshot(I);
@@ -26913,15 +26963,15 @@ const OA = /* @__PURE__ */ q({
26913
26963
  });
26914
26964
  let Vt = 0, Wt = null, Je = null;
26915
26965
  const O0 = ((Yu = (Gu = g.store) == null ? void 0 : Gu.persistence) == null ? void 0 : Yu.documentId) ?? "default";
26916
- let Ge = new XE({
26917
- provider: g.assetProvider ?? new e3(),
26966
+ let Ge = new e3({
26967
+ provider: g.assetProvider ?? new o3(),
26918
26968
  documentId: O0
26919
26969
  });
26920
26970
  function _0(I) {
26921
26971
  var K;
26922
26972
  const U = [], P = g.pluginOptions;
26923
26973
  return (P == null ? void 0 : P.controls) !== !1 && U.push(Sy((P == null ? void 0 : P.controls) ?? {})), (P == null ? void 0 : P.eraser) !== !1 && U.push(wy((P == null ? void 0 : P.eraser) || void 0)), (P == null ? void 0 : P.pen) !== !1 && U.push(ky()), (P == null ? void 0 : P.arrows) !== !1 && U.push(V0((P == null ? void 0 : P.arrows) || void 0)), (P == null ? void 0 : P.tapes) !== !1 && U.push(Cy()), U.push(
26924
- IA({
26974
+ DA({
26925
26975
  store: I,
26926
26976
  doubleClickSnapshot: g.doubleClickSnapshot,
26927
26977
  // Live read of the creation-defaults registry so the placement systems can
@@ -26994,7 +27044,7 @@ const OA = /* @__PURE__ */ q({
26994
27044
  X();
26995
27045
  };
26996
27046
  let Dl = null;
26997
- wt(async () => {
27047
+ kt(async () => {
26998
27048
  var P, K, z;
26999
27049
  if (!v.value) return;
27000
27050
  X(), window.addEventListener("online", bs), window.addEventListener("offline", bs), Ku = () => {
@@ -27030,7 +27080,7 @@ const OA = /* @__PURE__ */ q({
27030
27080
  if (L === my) {
27031
27081
  if (ne === $o.CHANGED) {
27032
27082
  const ye = z.get(he);
27033
- ye && bt(I, ye);
27083
+ ye && xt(I, ye);
27034
27084
  }
27035
27085
  continue;
27036
27086
  }
@@ -27254,7 +27304,7 @@ const OA = /* @__PURE__ */ q({
27254
27304
  key: 0,
27255
27305
  background: n.background
27256
27306
  }, () => [
27257
- Z($T, { background: n.background }, null, 8, ["background"])
27307
+ Z(FT, { background: n.background }, null, 8, ["background"])
27258
27308
  ]) : j("", !0),
27259
27309
  (C(), A(ie, null, Se(k, (P) => (C(), A(ie, {
27260
27310
  key: P.class
@@ -27288,7 +27338,7 @@ const OA = /* @__PURE__ */ q({
27288
27338
  ref_for: !0
27289
27339
  }, K.value), null, 16)) : j("", !0)
27290
27340
  ])
27291
- ], 12, HA)) : j("", !0)
27341
+ ], 12, jA)) : j("", !0)
27292
27342
  ], 64))), 128))
27293
27343
  ], 6)
27294
27344
  ], 64))), 64)),
@@ -27298,13 +27348,13 @@ const OA = /* @__PURE__ */ q({
27298
27348
  currentSessionId: F(M).sessionId,
27299
27349
  camera: fe.value
27300
27350
  }, () => [
27301
- Z(PA, {
27351
+ Z(BA, {
27302
27352
  users: E.value,
27303
27353
  "current-session-id": F(M).sessionId,
27304
27354
  camera: fe.value
27305
27355
  }, null, 8, ["users", "current-session-id", "camera"])
27306
27356
  ]) : j("", !0),
27307
- b.value ? (C(), ee(WT, { key: 2 }, {
27357
+ b.value ? (C(), ee(KT, { key: 2 }, {
27308
27358
  default: se((P) => [
27309
27359
  me(I.$slots, "floating-menu", qh(Jh(P)))
27310
27360
  ]),
@@ -27314,35 +27364,35 @@ const OA = /* @__PURE__ */ q({
27314
27364
  key: 3,
27315
27365
  users: E.value
27316
27366
  }, () => [
27317
- Z($E, { users: E.value }, null, 8, ["users"])
27367
+ Z(FE, { users: E.value }, null, 8, ["users"])
27318
27368
  ]) : j("", !0),
27319
27369
  b.value ? me(I.$slots, "toolbar", { key: 4 }, () => [
27320
- Z(OE)
27370
+ Z(NE)
27321
27371
  ]) : j("", !0),
27322
27372
  b.value ? me(I.$slots, "default", { key: 5 }) : j("", !0),
27323
27373
  me(I.$slots, "offline-indicator", { isOnline: V.value }, () => [
27324
- Z($A, { "is-online": V.value }, null, 8, ["is-online"])
27374
+ Z(FA, { "is-online": V.value }, null, 8, ["is-online"])
27325
27375
  ]),
27326
27376
  me(I.$slots, "version-mismatch", { versionMismatch: Y.value }, () => [
27327
- Z(zA, { "version-mismatch": Y.value }, null, 8, ["version-mismatch"])
27377
+ Z(VA, { "version-mismatch": Y.value }, null, 8, ["version-mismatch"])
27328
27378
  ]),
27329
27379
  me(I.$slots, "back-to-content", {}, () => [
27330
- Z(FA)
27380
+ Z(WA)
27331
27381
  ]),
27332
27382
  me(I.$slots, "loading", { isLoading: re.value }, () => [
27333
- Z(KT, { "is-loading": re.value }, null, 8, ["is-loading"])
27383
+ Z(GT, { "is-loading": re.value }, null, 8, ["is-loading"])
27334
27384
  ]),
27335
27385
  b.value ? me(I.$slots, "file-drop-zone", { key: 6 }, () => [
27336
- Z(BT)
27386
+ Z(HT)
27337
27387
  ]) : j("", !0),
27338
- b.value ? (C(), ee(OA, {
27388
+ b.value ? (C(), ee(NA, {
27339
27389
  key: 7,
27340
27390
  options: g.copyPaste
27341
27391
  }, null, 8, ["options"])) : j("", !0),
27342
27392
  Z(wM)
27343
27393
  ], 512));
27344
27394
  }
27345
- }), eI = /* @__PURE__ */ q({
27395
+ }), oI = /* @__PURE__ */ q({
27346
27396
  inheritAttrs: !1,
27347
27397
  __name: "WovenCanvas",
27348
27398
  setup(n, { expose: e }) {
@@ -27354,7 +27404,7 @@ const OA = /* @__PURE__ */ q({
27354
27404
  }
27355
27405
  }), (o, r) => (C(), ee(K0, null, {
27356
27406
  default: se(() => [
27357
- Z(VA, Xo({
27407
+ Z(UA, Xo({
27358
27408
  ref_key: "core",
27359
27409
  ref: t
27360
27410
  }, o.$attrs), q0({ _: 2 }, [
@@ -27373,7 +27423,7 @@ const OA = /* @__PURE__ */ q({
27373
27423
  export {
27374
27424
  Qh as ARROW_HEADS,
27375
27425
  zy as ArcArrow,
27376
- QA as ArcArrowTool,
27426
+ nI as ArcArrowTool,
27377
27427
  Wy as ArrowHandle,
27378
27428
  $n as ArrowHead,
27379
27429
  uh as ArrowHeadButton,
@@ -27381,51 +27431,52 @@ export {
27381
27431
  ZC as ArrowThicknessButton,
27382
27432
  eM as AspectLockButton,
27383
27433
  sM as BlockOperationsButton,
27384
- ZT as CURSORS,
27385
- $T as CanvasBackground,
27386
- oI as CanvasComponentDef,
27387
- rI as CanvasSingletonDef,
27388
- sI as CanvasStore,
27434
+ tE as CURSORS,
27435
+ FT as CanvasBackground,
27436
+ iI as CanvasComponentDef,
27437
+ lI as CanvasSingletonDef,
27438
+ aI as CanvasStore,
27389
27439
  vM as ColorButton,
27390
27440
  fM as ColorPicker,
27391
27441
  ko as CursorKind,
27442
+ ZM as DEFAULT_FONT_SIZE_OPTIONS,
27392
27443
  No as EDITING_PLUGIN_NAME,
27393
27444
  Au as EditableText,
27394
- IA as EditingPlugin,
27445
+ DA as EditingPlugin,
27395
27446
  Qy as ElbowArrow,
27396
- lE as ElbowArrowTool,
27447
+ uE as ElbowArrowTool,
27397
27448
  ov as EmbedBlock,
27398
- ME as EmbedTool,
27449
+ AE as EmbedTool,
27399
27450
  Sv as Eraser,
27400
- rE as EraserTool,
27401
- BT as FileDropZone,
27402
- WT as FloatingMenu,
27403
- HT as FloatingMenuBar,
27451
+ lE as EraserTool,
27452
+ HT as FileDropZone,
27453
+ KT as FloatingMenu,
27454
+ jT as FloatingMenuBar,
27404
27455
  Cv as FrameBlock,
27405
- tE as HandTool,
27456
+ rE as HandTool,
27406
27457
  _t as IconChevronDown,
27407
27458
  Ov as ImageBlock,
27408
- aE as ImageTool,
27409
- KT as LoadingOverlay,
27459
+ dE as ImageTool,
27460
+ GT as LoadingOverlay,
27410
27461
  Po as MenuButton,
27411
- kt as MenuDropdown,
27462
+ bt as MenuDropdown,
27412
27463
  wM as MenuTooltip,
27413
27464
  $v as PenStroke,
27414
27465
  xM as PenStrokeThicknessButton,
27415
- sE as PenTool,
27466
+ aE as PenTool,
27416
27467
  Ys as SHAPES,
27417
- eE as SelectTool,
27468
+ oE as SelectTool,
27418
27469
  zv as SelectionBox,
27419
27470
  zS as ShapeBlock,
27420
27471
  IM as ShapeFillColorButton,
27421
27472
  PM as ShapeKindButton,
27422
27473
  qM as ShapeStrokeColorButton,
27423
- oE as ShapeTool,
27424
- nE as StickyNoteTool,
27425
- iI as Synced,
27474
+ iE as ShapeTool,
27475
+ sE as StickyNoteTool,
27476
+ cI as Synced,
27426
27477
  VS as TapeBlock,
27427
27478
  XM as TapeImageButton,
27428
- EE as TapeTool,
27479
+ OE as TapeTool,
27429
27480
  fh as TextAlignmentButton,
27430
27481
  jS as TextBlock,
27431
27482
  hh as TextBoldButton,
@@ -27434,24 +27485,24 @@ export {
27434
27485
  mh as TextFontSizeButton,
27435
27486
  gh as TextItalicButton,
27436
27487
  vh as TextLinkButton,
27437
- iE as TextTool,
27488
+ cE as TextTool,
27438
27489
  yh as TextUnderlineButton,
27439
- OE as Toolbar,
27490
+ NE as Toolbar,
27440
27491
  Ht as ToolbarButton,
27441
27492
  KS as TransformBox,
27442
27493
  YS as TransformHandle,
27443
- $E as UserPresence,
27494
+ FE as UserPresence,
27444
27495
  Ue as WOVEN_CANVAS_KEY,
27445
- eI as WovenCanvas,
27446
- zT as computeCommonComponents,
27447
- FT as computeShowOperations,
27448
- lI as defineCanvasComponent,
27449
- aI as defineCanvasSingleton,
27496
+ oI as WovenCanvas,
27497
+ VT as computeCommonComponents,
27498
+ WT as computeShowOperations,
27499
+ uI as defineCanvasComponent,
27500
+ dI as defineCanvasSingleton,
27450
27501
  Gr as getArrowHead,
27451
27502
  De as useComponent,
27452
27503
  Sn as useComponents,
27453
27504
  Ce as useEditorContext,
27454
- hT as useFonts,
27505
+ pT as useFonts,
27455
27506
  jg as useImageCreation,
27456
27507
  gS as useQuery,
27457
27508
  ot as useSingleton,