@stll/folio-vue 0.8.1 → 0.9.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (37) hide show
  1. package/dist/ListButtons-C1rU_Y1e.cjs +4 -0
  2. package/dist/{ListButtons-DXqMvba3.js → ListButtons-DMnOM2pN.js} +385 -410
  3. package/dist/{WatermarkDialog-r4wmldt4.js → WatermarkDialog-Cf9ISDvv.js} +1378 -1445
  4. package/dist/WatermarkDialog-ChJtT7Bs.cjs +15 -0
  5. package/dist/components/DocxEditor/pagedEditorRef.d.ts +2 -3
  6. package/dist/composables/index.d.ts +1 -2
  7. package/dist/composables/useDocxEditor.d.ts +26 -0
  8. package/dist/composables/useDocxEditorRefApi.d.ts +1 -0
  9. package/dist/composables/useFindReplace.d.ts +24 -22
  10. package/dist/composables/usePagesPointer.d.ts +9 -13
  11. package/dist/composables/useRemoteSelectionSync.d.ts +10 -0
  12. package/dist/composables/useSelectionSync.d.ts +17 -30
  13. package/dist/composables.cjs +2 -2
  14. package/dist/composables.js +80 -68
  15. package/dist/dialogs.cjs +1 -1
  16. package/dist/dialogs.js +1 -1
  17. package/dist/folio-vue.css +1 -1
  18. package/dist/index.cjs +1 -1
  19. package/dist/index.js +1578 -1174
  20. package/dist/styles/zIndex.d.ts +1 -0
  21. package/dist/styles.cjs +1 -1
  22. package/dist/styles.js +1 -1
  23. package/dist/ui.cjs +1 -1
  24. package/dist/ui.js +2 -2
  25. package/dist/useFindReplace-CL8Rbc3y.js +59 -0
  26. package/dist/useFindReplace-ZCrdvwEk.cjs +1 -0
  27. package/dist/useZoom-BYEcnpS0.cjs +1 -0
  28. package/dist/useZoom-C0p0o54p.js +656 -0
  29. package/dist/zIndex-CYoLNG_N.cjs +1 -0
  30. package/dist/{zIndex-BY0qa8Au.js → zIndex-Ei9BbHSW.js} +1 -0
  31. package/package.json +1 -1
  32. package/dist/ListButtons-BvsV1yti.cjs +0 -4
  33. package/dist/WatermarkDialog-DHfk8jrg.cjs +0 -15
  34. package/dist/components/sidebar/resolveItemPositions.d.ts +0 -22
  35. package/dist/useZoom-C7jhL696.cjs +0 -1
  36. package/dist/useZoom-zJvuJlUd.js +0 -615
  37. package/dist/zIndex-dFsQbASx.cjs +0 -1
@@ -1,13 +1,15 @@
1
- import { D as e, F as t, P as n, j as r, y as i } from "./WatermarkDialog-r4wmldt4.js";
1
+ import { D as e, F as t, P as n, j as r, y as i } from "./WatermarkDialog-Cf9ISDvv.js";
2
2
  import { Fragment as a, computed as o, createBlock as s, createCommentVNode as c, createElementBlock as l, createElementVNode as u, createTextVNode as d, createVNode as f, defineComponent as p, mergeProps as m, nextTick as h, normalizeClass as g, normalizeStyle as _, onBeforeUnmount as v, onMounted as y, openBlock as b, reactive as x, ref as S, renderList as C, renderSlot as w, resolveDynamicComponent as T, toDisplayString as E, toRef as D, unref as O, vModelSelect as k, vModelText as A, watch as j, withCtx as M, withDirectives as N, withKeys as P, withModifiers as F } from "vue";
3
3
  import { extractSelectionContext as I } from "@stll/folio-core/prosemirror/plugins/selectionTracker";
4
- import { pixelsToTwips as L, twipsToPixels as R } from "@stll/folio-core/utils/units";
5
- import { DISPLAY_MODES as z } from "@stll/folio-core/managers/EditorModeManager";
6
- import { redoDepth as B, undoDepth as V } from "prosemirror-history";
4
+ import { createRenderedDomContext as L } from "@stll/folio-core/render-dom/RenderedDomContext";
5
+ import { pixelsToTwips as R, twipsToPixels as z } from "@stll/folio-core/utils/units";
6
+ import { DISPLAY_MODES as B } from "@stll/folio-core/managers/EditorModeManager";
7
+ import { redoDepth as V, undoDepth as H } from "prosemirror-history";
7
8
  import { clearFormatting as ee } from "@stll/folio-core/prosemirror/commands/formatting";
8
- import { getTableContext as H } from "@stll/folio-core/prosemirror/extensions/nodes/TableExtension";
9
+ import { getTableContext as U } from "@stll/folio-core/prosemirror/extensions/nodes/TableExtension";
10
+ import { resolveSidebarItemPositions as W } from "@stll/folio-core/render-dom/resolveSidebarItemPositions";
9
11
  //#region src/components/CommentMarginMarkers.vue?vue&type=script&setup=true&lang.ts
10
- var U = ["title", "onClick"], te = /*#__PURE__*/ t(/* @__PURE__ */ p({
12
+ var G = ["title", "onClick"], K = /*#__PURE__*/ t(/* @__PURE__ */ p({
11
13
  __name: "CommentMarginMarkers",
12
14
  props: {
13
15
  comments: {},
@@ -62,12 +64,12 @@ var U = ["title", "onClick"], te = /*#__PURE__*/ t(/* @__PURE__ */ p({
62
64
  }, [f(n, {
63
65
  name: r.isResolved ? "chat_bubble_check" : "chat_bubble_outline",
64
66
  size: 18
65
- }, null, 8, ["name"])], 12, U))), 128))], 36)) : c("", !0);
67
+ }, null, 8, ["name"])], 12, G))), 128))], 36)) : c("", !0);
66
68
  }
67
- }), [["__scopeId", "data-v-bea4eef6"]]), W = { class: "doc-name" }, G = ["value"], K = {
69
+ }), [["__scopeId", "data-v-bea4eef6"]]), q = { class: "doc-name" }, J = ["value"], Y = {
68
70
  key: 1,
69
71
  class: "doc-name__text"
70
- }, q = /*#__PURE__*/ t(/* @__PURE__ */ p({
72
+ }, te = /*#__PURE__*/ t(/* @__PURE__ */ p({
71
73
  __name: "DocumentName",
72
74
  props: {
73
75
  modelValue: {},
@@ -89,16 +91,16 @@ var U = ["title", "onClick"], te = /*#__PURE__*/ t(/* @__PURE__ */ p({
89
91
  let t = e.target;
90
92
  t instanceof HTMLInputElement && (t.value.trim() || r("update:modelValue", "Untitled document.docx"));
91
93
  }
92
- return (t, n) => (b(), l("div", W, [e.editable ? (b(), l("input", {
94
+ return (t, n) => (b(), l("div", q, [e.editable ? (b(), l("input", {
93
95
  key: 0,
94
96
  class: "doc-name__input",
95
97
  value: i.value,
96
98
  placeholder: "Untitled document",
97
99
  onInput: a,
98
100
  onBlur: s
99
- }, null, 40, G)) : (b(), l("span", K, E(i.value || "Untitled document"), 1))]));
101
+ }, null, 40, J)) : (b(), l("span", Y, E(i.value || "Untitled document"), 1))]));
100
102
  }
101
- }), [["__scopeId", "data-v-ae6cb472"]]), J = ["aria-selected", "onMouseenter"], ne = { class: "docx-table-grid-inline__label" }, Y = /*#__PURE__*/ t(/* @__PURE__ */ p({
103
+ }), [["__scopeId", "data-v-ae6cb472"]]), ne = ["aria-selected", "onMouseenter"], re = { class: "docx-table-grid-inline__label" }, ie = /*#__PURE__*/ t(/* @__PURE__ */ p({
102
104
  __name: "TableGridInline",
103
105
  props: {
104
106
  gridRows: { default: 6 },
@@ -134,15 +136,15 @@ var U = ["title", "onClick"], te = /*#__PURE__*/ t(/* @__PURE__ */ p({
134
136
  i.value = e.r, s.value = e.c;
135
137
  },
136
138
  onClick: F(d, ["prevent"])
137
- }, null, 42, J))), 128))], 36), u("div", ne, E(i.value > 0 && s.value > 0 ? `${s.value} × ${i.value}` : "Select size"), 1)]));
139
+ }, null, 42, ne))), 128))], 36), u("div", re, E(i.value > 0 && s.value > 0 ? `${s.value} × ${i.value}` : "Select size"), 1)]));
138
140
  }
139
- }), [["__scopeId", "data-v-79c593ca"]]), re = {
141
+ }), [["__scopeId", "data-v-79c593ca"]]), ae = {
140
142
  class: "menu-bar",
141
143
  role: "menubar"
142
- }, ie = {
144
+ }, oe = {
143
145
  key: 1,
144
146
  class: "menu-bar__break-submenu"
145
- }, ae = ["onClick"], oe = /*#__PURE__*/ t(/* @__PURE__ */ p({
147
+ }, se = ["onClick"], X = /*#__PURE__*/ t(/* @__PURE__ */ p({
146
148
  __name: "MenuBar",
147
149
  props: {
148
150
  showFileOpen: {
@@ -238,7 +240,7 @@ var U = ["title", "onClick"], te = /*#__PURE__*/ t(/* @__PURE__ */ p({
238
240
  label: h("toolbar.reportIssue"),
239
241
  onClick: g("reportIssue")
240
242
  }]);
241
- return (t, r) => (b(), l("div", re, [
243
+ return (t, r) => (b(), l("div", ae, [
242
244
  f(O(d), {
243
245
  label: O(h)("toolbar.file"),
244
246
  items: _.value
@@ -251,12 +253,12 @@ var U = ["title", "onClick"], te = /*#__PURE__*/ t(/* @__PURE__ */ p({
251
253
  label: O(h)("toolbar.insert"),
252
254
  items: y.value
253
255
  }, {
254
- submenu: M(({ item: e, closeMenu: t }) => [e.key === "table" ? (b(), s(Y, {
256
+ submenu: M(({ item: e, closeMenu: t }) => [e.key === "table" ? (b(), s(ie, {
255
257
  key: 0,
256
258
  onInsert: (e, n) => {
257
259
  m("insert-table", e, n), t();
258
260
  }
259
- }, null, 8, ["onInsert"])) : e.key === "break" ? (b(), l("div", ie, [(b(!0), l(a, null, C(x.value, (e) => (b(), l("button", {
261
+ }, null, 8, ["onInsert"])) : e.key === "break" ? (b(), l("div", oe, [(b(!0), l(a, null, C(x.value, (e) => (b(), l("button", {
260
262
  key: e.action,
261
263
  type: "button",
262
264
  class: "menu-bar__break-item",
@@ -266,7 +268,7 @@ var U = ["title", "onClick"], te = /*#__PURE__*/ t(/* @__PURE__ */ p({
266
268
  }, [f(n, {
267
269
  name: e.icon,
268
270
  size: 18
269
- }, null, 8, ["name"]), u("span", null, E(e.label), 1)], 8, ae))), 128))])) : c("", !0)]),
271
+ }, null, 8, ["name"]), u("span", null, E(e.label), 1)], 8, se))), 128))])) : c("", !0)]),
270
272
  _: 1
271
273
  }, 8, ["label", "items"]),
272
274
  e.showHelpMenu ? (b(), s(O(d), {
@@ -276,13 +278,13 @@ var U = ["title", "onClick"], te = /*#__PURE__*/ t(/* @__PURE__ */ p({
276
278
  }, null, 8, ["label", "items"])) : c("", !0)
277
279
  ]));
278
280
  }
279
- }), [["__scopeId", "data-v-bd3f3f2c"]]), se = [
281
+ }), [["__scopeId", "data-v-bd3f3f2c"]]), ce = [
280
282
  "disabled",
281
283
  "aria-label",
282
284
  "title",
283
285
  "aria-expanded",
284
286
  "onClick"
285
- ], X = { class: "docx-icon-grid__panel" }, ce = ["title", "onClick"], le = /*#__PURE__*/ t(/* @__PURE__ */ p({
287
+ ], le = { class: "docx-icon-grid__panel" }, Z = ["title", "onClick"], ue = /*#__PURE__*/ t(/* @__PURE__ */ p({
286
288
  __name: "IconGridDropdown",
287
289
  props: {
288
290
  options: {},
@@ -318,8 +320,8 @@ var U = ["title", "onClick"], te = /*#__PURE__*/ t(/* @__PURE__ */ p({
318
320
  }, null, 8, ["name"]), f(n, {
319
321
  name: "arrow_drop_down",
320
322
  size: 14
321
- })], 10, se)]),
322
- panel: M(() => [u("div", X, [(b(!0), l(a, null, C(e.options, (t) => (b(), l("button", {
323
+ })], 10, ce)]),
324
+ panel: M(() => [u("div", le, [(b(!0), l(a, null, C(e.options, (t) => (b(), l("button", {
323
325
  key: t.value,
324
326
  type: "button",
325
327
  class: g(["docx-icon-grid__option", { "docx-icon-grid__option--active": e.activeValue === t.value }]),
@@ -328,11 +330,11 @@ var U = ["title", "onClick"], te = /*#__PURE__*/ t(/* @__PURE__ */ p({
328
330
  }, [f(n, {
329
331
  name: t.iconName,
330
332
  size: 18
331
- }, null, 8, ["name"])], 10, ce))), 128))])]),
333
+ }, null, 8, ["name"])], 10, Z))), 128))])]),
332
334
  _: 1
333
335
  }, 8, ["open"]));
334
336
  }
335
- }), [["__scopeId", "data-v-72fa875c"]]), ue = /* @__PURE__ */ p({
337
+ }), [["__scopeId", "data-v-72fa875c"]]), de = /* @__PURE__ */ p({
336
338
  __name: "ImageWrapDropdown",
337
339
  props: {
338
340
  imageContext: {},
@@ -379,7 +381,7 @@ var U = ["title", "onClick"], te = /*#__PURE__*/ t(/* @__PURE__ */ p({
379
381
  let e = t.imageContext;
380
382
  return e.displayMode === "float" && e.cssFloat === "left" ? "wrapRight" : e.displayMode === "float" && e.cssFloat === "right" ? "wrapLeft" : e.wrapType;
381
383
  }), l = o(() => a.value.find((e) => e.value === c.value) ?? a.value.at(0)), u = o(() => l.value?.iconName ?? "format_image_left"), d = o(() => l.value?.label ?? "");
382
- return (t, r) => (b(), s(le, {
384
+ return (t, r) => (b(), s(ue, {
383
385
  options: a.value,
384
386
  "active-value": c.value,
385
387
  "trigger-icon": u.value,
@@ -394,7 +396,7 @@ var U = ["title", "onClick"], te = /*#__PURE__*/ t(/* @__PURE__ */ p({
394
396
  "disabled"
395
397
  ]));
396
398
  }
397
- }), de = /* @__PURE__ */ p({
399
+ }), fe = /* @__PURE__ */ p({
398
400
  __name: "ImageTransformDropdown",
399
401
  props: { disabled: { type: Boolean } },
400
402
  emits: ["transform"],
@@ -425,7 +427,7 @@ var U = ["title", "onClick"], te = /*#__PURE__*/ t(/* @__PURE__ */ p({
425
427
  label: t(e.labelKey),
426
428
  iconName: e.iconName
427
429
  })));
428
- return (n, r) => (b(), s(le, {
430
+ return (n, r) => (b(), s(ue, {
429
431
  options: i.value,
430
432
  "trigger-icon": "rotate_right",
431
433
  "tooltip-content": O(t)("imageTransform.tooltip"),
@@ -437,10 +439,10 @@ var U = ["title", "onClick"], te = /*#__PURE__*/ t(/* @__PURE__ */ p({
437
439
  "disabled"
438
440
  ]));
439
441
  }
440
- }), Z = ["title", "onClick"], fe = {
442
+ }), pe = ["title", "onClick"], me = {
441
443
  key: 0,
442
444
  class: "editing-mode__label"
443
- }, pe = { class: "editing-mode__panel" }, me = ["onClick"], he = { class: "editing-mode__option-text" }, ge = { class: "editing-mode__option-label" }, _e = { class: "editing-mode__option-desc" }, ve = /*#__PURE__*/ t(/* @__PURE__ */ p({
445
+ }, he = { class: "editing-mode__panel" }, ge = ["onClick"], _e = { class: "editing-mode__option-text" }, ve = { class: "editing-mode__option-label" }, ye = { class: "editing-mode__option-desc" }, be = /*#__PURE__*/ t(/* @__PURE__ */ p({
444
446
  __name: "EditingModeDropdown",
445
447
  props: { modelValue: {} },
446
448
  emits: ["update:modelValue"],
@@ -493,13 +495,13 @@ var U = ["title", "onClick"], te = /*#__PURE__*/ t(/* @__PURE__ */ p({
493
495
  name: D.value.icon,
494
496
  size: 18
495
497
  }, null, 8, ["name"]),
496
- T.value ? c("", !0) : (b(), l("span", fe, E(O(d)(D.value.labelKey)), 1)),
498
+ T.value ? c("", !0) : (b(), l("span", me, E(O(d)(D.value.labelKey)), 1)),
497
499
  f(n, {
498
500
  name: "arrow_drop_down",
499
501
  size: 16
500
502
  })
501
- ], 10, Z)]),
502
- panel: M(() => [u("div", pe, [(b(), l(a, null, C(x, (t) => u("button", {
503
+ ], 10, pe)]),
504
+ panel: M(() => [u("div", he, [(b(), l(a, null, C(x, (t) => u("button", {
503
505
  key: t.value,
504
506
  type: "button",
505
507
  class: "editing-mode__option",
@@ -509,23 +511,23 @@ var U = ["title", "onClick"], te = /*#__PURE__*/ t(/* @__PURE__ */ p({
509
511
  name: t.icon,
510
512
  size: 20
511
513
  }, null, 8, ["name"]),
512
- u("span", he, [u("span", ge, E(O(d)(t.labelKey)), 1), u("span", _e, E(O(d)(t.descKey)), 1)]),
514
+ u("span", _e, [u("span", ve, E(O(d)(t.labelKey)), 1), u("span", ye, E(O(d)(t.descKey)), 1)]),
513
515
  t.value === e.modelValue ? (b(), s(n, {
514
516
  key: 0,
515
517
  name: "check",
516
518
  size: 18,
517
519
  class: "editing-mode__check"
518
520
  })) : c("", !0)
519
- ], 8, me)), 64))])]),
521
+ ], 8, ge)), 64))])]),
520
522
  _: 1
521
523
  }, 8, ["open"]));
522
524
  }
523
- }), [["__scopeId", "data-v-333d7e96"]]), ye = { class: "review-controls" }, be = [
525
+ }), [["__scopeId", "data-v-333d7e96"]]), xe = { class: "review-controls" }, Se = [
524
526
  "disabled",
525
527
  "aria-pressed",
526
528
  "aria-label",
527
529
  "title"
528
- ], xe = { class: "review-controls__toggle-label" }, Se = ["title", "onClick"], Ce = { class: "review-controls__display-label" }, we = ["onClick"], Te = { class: "review-controls__option-label" }, Ee = /*#__PURE__*/ t(/* @__PURE__ */ p({
530
+ ], Ce = { class: "review-controls__toggle-label" }, we = ["title", "onClick"], Te = { class: "review-controls__display-label" }, Ee = ["onClick"], De = { class: "review-controls__option-label" }, Oe = /*#__PURE__*/ t(/* @__PURE__ */ p({
529
531
  __name: "ReviewControls",
530
532
  props: {
531
533
  trackChangesOn: { type: Boolean },
@@ -550,7 +552,7 @@ var U = ["title", "onClick"], te = /*#__PURE__*/ t(/* @__PURE__ */ p({
550
552
  function w(e) {
551
553
  h("update:display-mode", e), _.value = !1;
552
554
  }
553
- return (t, r) => (b(), l("div", ye, [u("button", {
555
+ return (t, r) => (b(), l("div", xe, [u("button", {
554
556
  type: "button",
555
557
  class: g(["review-controls__toggle", { "review-controls__toggle--on": e.trackChangesOn }]),
556
558
  disabled: e.readOnly,
@@ -562,7 +564,7 @@ var U = ["title", "onClick"], te = /*#__PURE__*/ t(/* @__PURE__ */ p({
562
564
  }, [f(n, {
563
565
  name: "edit_note",
564
566
  size: 18
565
- }), u("span", xe, E(e.trackChangesOn ? O(d)("trackingOn") : O(d)("trackingOff")), 1)], 42, be), f(O(p), {
567
+ }), u("span", Ce, E(e.trackChangesOn ? O(d)("trackingOn") : O(d)("trackingOff")), 1)], 42, Se), f(O(p), {
566
568
  open: _.value,
567
569
  placement: "bottom-right",
568
570
  "onUpdate:open": r[4] ||= (e) => _.value = e,
@@ -579,49 +581,49 @@ var U = ["title", "onClick"], te = /*#__PURE__*/ t(/* @__PURE__ */ p({
579
581
  name: "visibility",
580
582
  size: 16
581
583
  }),
582
- u("span", Ce, E(x.value), 1),
584
+ u("span", Te, E(x.value), 1),
583
585
  f(n, {
584
586
  name: "arrow_drop_down",
585
587
  size: 16
586
588
  })
587
- ], 42, Se)]),
589
+ ], 42, we)]),
588
590
  panel: M(() => [u("div", {
589
591
  class: "review-controls__panel",
590
592
  onMousedown: r[3] ||= F(() => {}, ["prevent"])
591
- }, [(b(!0), l(a, null, C(O(z), (t) => (b(), l("button", {
593
+ }, [(b(!0), l(a, null, C(O(B), (t) => (b(), l("button", {
592
594
  key: t,
593
595
  type: "button",
594
596
  class: "review-controls__option",
595
597
  onClick: F((e) => w(t), ["prevent"])
596
- }, [u("span", Te, E(y(t)), 1), t === e.displayMode ? (b(), s(n, {
598
+ }, [u("span", De, E(y(t)), 1), t === e.displayMode ? (b(), s(n, {
597
599
  key: 0,
598
600
  name: "check",
599
601
  size: 18,
600
602
  class: "review-controls__check"
601
- })) : c("", !0)], 8, we))), 128))], 32)]),
603
+ })) : c("", !0)], 8, Ee))), 128))], 32)]),
602
604
  _: 1
603
605
  }, 8, ["open"])]));
604
606
  }
605
607
  }), [["__scopeId", "data-v-e54a1ec7"]]);
606
608
  //#endregion
607
609
  //#region src/utils/fontOptions.ts
608
- function De(e) {
610
+ function ke(e) {
609
611
  if (e === void 0) return;
610
612
  let t = e.map((e) => typeof e == "string" ? {
611
613
  name: e,
612
614
  fontFamily: e,
613
615
  category: "other"
614
616
  } : e);
615
- if (Oe()) {
617
+ if (Ae()) {
616
618
  let e = /* @__PURE__ */ new Set(), n = /* @__PURE__ */ new Set();
617
619
  for (let r of t) n.has(r.name) && !e.has(r.name) && (console.warn(`[DocxEditor] Duplicate font name in fontFamilies: "${r.name}"`), e.add(r.name)), n.add(r.name);
618
620
  }
619
621
  return t;
620
622
  }
621
- function Oe() {
623
+ function Ae() {
622
624
  return typeof process < "u" && process.env.NODE_ENV !== "production";
623
625
  }
624
- function ke(e, t) {
626
+ function je(e, t) {
625
627
  if (!e || e.length === 0) return [];
626
628
  let n = /* @__PURE__ */ new Set();
627
629
  for (let e of t) n.add(e.trim().toLowerCase());
@@ -634,7 +636,7 @@ function ke(e, t) {
634
636
  }
635
637
  //#endregion
636
638
  //#region src/components/Toolbar/presets.ts
637
- var Ae = [
639
+ var Me = [
638
640
  {
639
641
  name: "Arial",
640
642
  fontFamily: "Arial",
@@ -695,7 +697,7 @@ var Ae = [
695
697
  fontFamily: "Consolas",
696
698
  category: "monospace"
697
699
  }
698
- ], je = [
700
+ ], Ne = [
699
701
  8,
700
702
  9,
701
703
  10,
@@ -710,7 +712,7 @@ var Ae = [
710
712
  36,
711
713
  48,
712
714
  72
713
- ], Me = [
715
+ ], Pe = [
714
716
  {
715
717
  id: "Normal",
716
718
  label: "Normal",
@@ -741,7 +743,7 @@ var Ae = [
741
743
  label: "Heading 3",
742
744
  nameKey: "styles.heading3"
743
745
  }
744
- ], Ne = [
746
+ ], Fe = [
745
747
  {
746
748
  label: "Single",
747
749
  labelKey: "lineSpacing.single",
@@ -760,7 +762,7 @@ var Ae = [
760
762
  labelKey: "lineSpacing.double",
761
763
  value: 480
762
764
  }
763
- ], Pe = [
765
+ ], Ie = [
764
766
  .5,
765
767
  .75,
766
768
  1,
@@ -770,7 +772,7 @@ var Ae = [
770
772
  ];
771
773
  //#endregion
772
774
  //#region src/composables/useToolbarDropdowns.ts
773
- function Fe(e) {
775
+ function Le(e) {
774
776
  let t = S(null), n = S({
775
777
  top: 0,
776
778
  left: 0
@@ -822,7 +824,7 @@ function Fe(e) {
822
824
  }
823
825
  //#endregion
824
826
  //#region src/composables/useToolbarFontSize.ts
825
- function Ie(e) {
827
+ function Re(e) {
826
828
  let t = S(!1), n = (t) => e.execCommand("setFontSize", t * 2);
827
829
  function r() {
828
830
  t.value = !1, e.openDropdown.value = "size", e.recomputeDropdownPos("size");
@@ -842,11 +844,11 @@ function Ie(e) {
842
844
  }
843
845
  function s() {
844
846
  let t = e.currentFontSize.value;
845
- n(je.find((e) => e > t) || t + 1);
847
+ n(Ne.find((e) => e > t) || t + 1);
846
848
  }
847
849
  function c() {
848
850
  let t = e.currentFontSize.value;
849
- n([...je].reverse().find((e) => e < t) || Math.max(1, t - 1));
851
+ n([...Ne].reverse().find((e) => e < t) || Math.max(1, t - 1));
850
852
  }
851
853
  return {
852
854
  onSizeFocus: r,
@@ -859,7 +861,7 @@ function Ie(e) {
859
861
  }
860
862
  //#endregion
861
863
  //#region src/utils/stylePreview.ts
862
- var Le = {
864
+ var ze = {
863
865
  Title: 26,
864
866
  Subtitle: 18,
865
867
  Heading1: 24,
@@ -869,22 +871,22 @@ var Le = {
869
871
  Heading5: 13,
870
872
  Heading6: 13,
871
873
  Normal: 14
872
- }, Re = /* @__PURE__ */ new Set([
874
+ }, Be = /* @__PURE__ */ new Set([
873
875
  "Title",
874
876
  "Heading1",
875
877
  "Heading2",
876
878
  "Heading3"
877
- ]), ze = { Subtitle: "666666" }, Be = "#4a6c8c";
878
- function Ve(e) {
879
- let t = Le[e.styleId], n = {
879
+ ]), Ve = { Subtitle: "666666" }, He = "#4a6c8c";
880
+ function Ue(e) {
881
+ let t = ze[e.styleId], n = {
880
882
  fontSize: t ? `${t}px` : `${Math.min(Math.max(e.fontSize ? e.fontSize / 2 : 11, 11), 20)}px`,
881
883
  lineHeight: "1.3"
882
884
  };
883
- (e.bold ?? Re.has(e.styleId)) && (n.fontWeight = "bold"), e.italic && (n.fontStyle = "italic");
884
- let r = e.color ?? ze[e.styleId];
885
- return r ? n.color = `#${r}` : e.styleId.startsWith("Heading") && (n.color = Be), n;
885
+ (e.bold ?? Be.has(e.styleId)) && (n.fontWeight = "bold"), e.italic && (n.fontStyle = "italic");
886
+ let r = e.color ?? Ve[e.styleId];
887
+ return r ? n.color = `#${r}` : e.styleId.startsWith("Heading") && (n.color = He), n;
886
888
  }
887
- function He(e) {
889
+ function We(e) {
888
890
  return !e || e.length === 0 ? [] : e.filter((e) => e.type === "paragraph").filter((e) => e.qFormat ? !0 : !(e.hidden || e.semiHidden)).map((e) => ({
889
891
  styleId: e.styleId,
890
892
  name: e.name || e.styleId,
@@ -897,20 +899,20 @@ function He(e) {
897
899
  }
898
900
  //#endregion
899
901
  //#region src/composables/useParagraphStyleOptions.ts
900
- function Ue(e) {
902
+ function Ge(e) {
901
903
  let t = o(() => {
902
- let t = He(e.documentStyles());
904
+ let t = We(e.documentStyles());
903
905
  return t.length > 0 ? t.map((t) => {
904
- let n = Me.find((e) => e.id === t.styleId);
906
+ let n = Pe.find((e) => e.id === t.styleId);
905
907
  return {
906
908
  id: t.styleId,
907
909
  label: n ? e.t(n.nameKey) : t.name,
908
- previewStyle: Ve(t)
910
+ previewStyle: Ue(t)
909
911
  };
910
- }) : Me.map((t) => ({
912
+ }) : Pe.map((t) => ({
911
913
  id: t.id,
912
914
  label: e.t(t.nameKey),
913
- previewStyle: Ve({ styleId: t.id })
915
+ previewStyle: Ue({ styleId: t.id })
914
916
  }));
915
917
  });
916
918
  return {
@@ -923,29 +925,29 @@ function Ue(e) {
923
925
  }
924
926
  //#endregion
925
927
  //#region src/components/Toolbar.vue?vue&type=script&setup=true&lang.ts
926
- var We = {
928
+ var Ke = {
927
929
  key: 0,
928
930
  class: "basic-toolbar"
929
- }, Ge = [
931
+ }, qe = [
930
932
  "title",
931
933
  "aria-label",
932
934
  "disabled"
933
- ], Ke = [
935
+ ], Je = [
934
936
  "title",
935
937
  "aria-label",
936
938
  "disabled"
937
- ], qe = ["disabled", "title"], Je = ["aria-expanded", "title"], Ye = ["disabled", "title"], Xe = ["onMousedown"], Ze = ["aria-expanded", "title"], Qe = ["onMousedown"], $e = ["aria-expanded", "title"], et = {
939
+ ], Ye = ["disabled", "title"], Xe = ["aria-expanded", "title"], Ze = ["disabled", "title"], Qe = ["onMousedown"], $e = ["aria-expanded", "title"], et = ["onMousedown"], tt = ["aria-expanded", "title"], nt = {
938
940
  key: 0,
939
941
  class: "toolbar-dropdown__group-label"
940
- }, tt = ["onMousedown"], nt = ["title"], rt = [
942
+ }, rt = ["onMousedown"], it = ["title"], at = [
941
943
  "value",
942
944
  "title",
943
945
  "aria-expanded"
944
- ], it = ["title"], at = ["onMousedown"], ot = ["title", "aria-label"], st = ["title", "aria-label"], ct = ["title", "aria-label"], lt = ["title", "aria-label"], ut = ["title", "aria-label"], dt = ["title", "aria-label"], ft = ["title", "aria-label"], pt = ["aria-expanded", "title"], mt = ["title"], ht = ["title"], gt = ["title"], _t = ["title"], vt = ["title", "aria-label"], yt = ["title", "aria-label"], bt = [
946
+ ], ot = ["title"], st = ["onMousedown"], ct = ["title", "aria-label"], lt = ["title", "aria-label"], ut = ["title", "aria-label"], dt = ["title", "aria-label"], ft = ["title", "aria-label"], pt = ["title", "aria-label"], mt = ["title", "aria-label"], ht = ["aria-expanded", "title"], gt = ["title"], _t = ["title"], vt = ["title"], yt = ["title"], bt = ["title", "aria-label"], xt = ["title", "aria-label"], St = [
945
947
  "title",
946
948
  "aria-label",
947
949
  "disabled"
948
- ], xt = ["title", "aria-label"], St = ["aria-expanded", "title"], Ct = ["onMousedown"], wt = ["title", "aria-label"], Tt = ["title", "aria-label"], Et = ["title", "aria-label"], Dt = /*#__PURE__*/ t(/* @__PURE__ */ p({
950
+ ], Ct = ["title", "aria-label"], wt = ["aria-expanded", "title"], Tt = ["onMousedown"], Et = ["title", "aria-label"], Dt = ["title", "aria-label"], Ot = ["title", "aria-label"], kt = /*#__PURE__*/ t(/* @__PURE__ */ p({
949
951
  __name: "Toolbar",
950
952
  props: {
951
953
  view: { default: null },
@@ -1003,14 +1005,14 @@ var We = {
1003
1005
  "image-transform"
1004
1006
  ],
1005
1007
  setup(e, { emit: t }) {
1006
- let { ColorPicker: p } = i(), m = e, { t: h } = r(), v = t, y = o(() => m.zoomPercent ?? 100), x = o(() => m.isMinZoom ?? !1), T = o(() => m.isMaxZoom ?? !1), D = o(() => m.zoomPresets ?? Pe), k = o(() => m.showZoomControl ?? !0), A = S(null), j = S(null), M = S(null), N = S(null), L = S(null), R = S(null), { openDropdown: z, dropdownMenuStyle: H, toggleDropdown: U, recomputeDropdownPos: te } = Fe({
1008
+ let { ColorPicker: p } = i(), m = e, { t: h } = r(), v = t, y = o(() => m.zoomPercent ?? 100), x = o(() => m.isMinZoom ?? !1), T = o(() => m.isMaxZoom ?? !1), D = o(() => m.zoomPresets ?? Ie), k = o(() => m.showZoomControl ?? !0), A = S(null), j = S(null), M = S(null), N = S(null), L = S(null), R = S(null), { openDropdown: z, dropdownMenuStyle: B, toggleDropdown: U, recomputeDropdownPos: W } = Le({
1007
1009
  zoom: R,
1008
1010
  style: A,
1009
1011
  font: j,
1010
1012
  size: M,
1011
1013
  align: N,
1012
1014
  spacing: L
1013
- }), W = o(() => {
1015
+ }), G = o(() => {
1014
1016
  m.stateTick;
1015
1017
  let e = m.view;
1016
1018
  return e ? I(e.state) : {
@@ -1025,41 +1027,41 @@ var We = {
1025
1027
  inInsertion: !1,
1026
1028
  inDeletion: !1
1027
1029
  };
1028
- }), G = o(() => {
1029
- let e = W.value.textFormatting.fontFamily;
1030
- return e?.ascii || e?.hAnsi || "Arial";
1031
1030
  }), K = o(() => {
1032
- let e = W.value.textFormatting.fontSize;
1031
+ let e = G.value.textFormatting.fontFamily;
1032
+ return e?.ascii || e?.hAnsi || "Arial";
1033
+ }), q = o(() => {
1034
+ let e = G.value.textFormatting.fontSize;
1033
1035
  return e ? e / 2 : 11;
1034
- }), q = o(() => W.value.paragraphFormatting.alignment || "left"), J = o(() => {
1035
- switch (q.value) {
1036
+ }), J = o(() => G.value.paragraphFormatting.alignment || "left"), Y = o(() => {
1037
+ switch (J.value) {
1036
1038
  case "center": return "format_align_center";
1037
1039
  case "right": return "format_align_right";
1038
1040
  case "both": return "format_align_justify";
1039
1041
  default: return "format_align_left";
1040
1042
  }
1041
- }), { resolvedParagraphStyles: ne, currentStyleLabel: Y } = Ue({
1043
+ }), { resolvedParagraphStyles: te, currentStyleLabel: ne } = Ge({
1042
1044
  documentStyles: () => m.documentStyles,
1043
- currentStyleId: () => W.value.paragraphFormatting.styleId || "Normal",
1045
+ currentStyleId: () => G.value.paragraphFormatting.styleId || "Normal",
1044
1046
  t: h
1045
1047
  }), re = o(() => {
1046
1048
  m.stateTick;
1047
1049
  let e = m.view;
1048
- return e ? V(e.state) > 0 : !1;
1050
+ return e ? H(e.state) > 0 : !1;
1049
1051
  }), ie = o(() => {
1050
1052
  m.stateTick;
1051
1053
  let e = m.view;
1052
- return e ? B(e.state) > 0 : !1;
1054
+ return e ? V(e.state) > 0 : !1;
1053
1055
  }), ae = o(() => {
1054
- let e = W.value, t = e.inList && (e.listLevel ?? 0) > 0, n = (e.paragraphFormatting.indentLeft ?? 0) > 0;
1056
+ let e = G.value, t = e.inList && (e.listLevel ?? 0) > 0, n = (e.paragraphFormatting.indentLeft ?? 0) > 0;
1055
1057
  return t || n;
1056
1058
  }), oe = o(() => {
1057
- let e = W.value.textFormatting.color?.rgb;
1059
+ let e = G.value.textFormatting.color?.rgb;
1058
1060
  return e ? e.replace(/^#/, "").toUpperCase() : void 0;
1059
1061
  }), se = o(() => {
1060
- let e = W.value.textFormatting.highlight;
1062
+ let e = G.value.textFormatting.highlight;
1061
1063
  if (!(!e || e === "none")) return e.replace(/^#/, "").toUpperCase();
1062
- }), X = o(() => De(m.fontFamilies) ?? Ae), ce = o(() => ke(m.documentFonts, X.value.map((e) => e.name))), le = o(() => [
1064
+ }), X = o(() => ke(m.fontFamilies) ?? Me), ce = o(() => je(m.documentFonts, X.value.map((e) => e.name))), le = o(() => [
1063
1065
  {
1064
1066
  label: h("font.documentFonts"),
1065
1067
  fonts: ce.value
@@ -1091,16 +1093,16 @@ var We = {
1091
1093
  }
1092
1094
  r(...t)(n.state, (e) => n.dispatch(e), n), n.hasFocus() || n.focus(), z.value = null;
1093
1095
  }
1094
- function fe(e) {
1096
+ function ue(e) {
1095
1097
  Z("setFontFamily", e);
1096
1098
  }
1097
- let { onSizeFocus: pe, onSizeInput: me, commitFontSize: he, pickFontSize: ge, increaseFontSize: _e, decreaseFontSize: ye } = Ie({
1098
- currentFontSize: K,
1099
+ let { onSizeFocus: pe, onSizeInput: me, commitFontSize: he, pickFontSize: ge, increaseFontSize: _e, decreaseFontSize: ve } = Re({
1100
+ currentFontSize: q,
1099
1101
  openDropdown: z,
1100
- recomputeDropdownPos: te,
1102
+ recomputeDropdownPos: W,
1101
1103
  execCommand: Z
1102
1104
  });
1103
- function be(e) {
1105
+ function ye(e) {
1104
1106
  if (typeof e == "object" && e.auto) {
1105
1107
  Z("clearTextColor");
1106
1108
  return;
@@ -1121,22 +1123,22 @@ var We = {
1121
1123
  Z("setLineSpacing", e);
1122
1124
  }
1123
1125
  function Te(e) {
1124
- let t = W.value.paragraphFormatting.lineSpacing;
1126
+ let t = G.value.paragraphFormatting.lineSpacing;
1125
1127
  return t ? Math.abs(t - e) < 10 : e === 240;
1126
1128
  }
1127
- return (t, r) => e.view ? (b(), l("div", We, [
1129
+ return (t, r) => e.view ? (b(), l("div", Ke, [
1128
1130
  u("button", {
1129
1131
  title: O(h)("undoShortcut"),
1130
1132
  "aria-label": O(h)("undo"),
1131
1133
  disabled: !re.value,
1132
1134
  onMousedown: r[0] ||= F((e) => Z("undo"), ["prevent"])
1133
- }, [f(n, { name: "undo" })], 40, Ge),
1135
+ }, [f(n, { name: "undo" })], 40, qe),
1134
1136
  u("button", {
1135
1137
  title: O(h)("redoShortcut"),
1136
1138
  "aria-label": O(h)("redo"),
1137
1139
  disabled: !ie.value,
1138
1140
  onMousedown: r[1] ||= F((e) => Z("redo"), ["prevent"])
1139
- }, [f(n, { name: "redo" })], 40, Ke),
1141
+ }, [f(n, { name: "redo" })], 40, Je),
1140
1142
  r[42] ||= u("span", { class: "divider" }, null, -1),
1141
1143
  k.value ? (b(), l("div", {
1142
1144
  key: 0,
@@ -1149,7 +1151,7 @@ var We = {
1149
1151
  onMousedown: r[2] ||= F((e) => t.$emit("zoom-out"), ["prevent"]),
1150
1152
  disabled: x.value,
1151
1153
  title: O(h)("zoom.zoomOut")
1152
- }, " − ", 40, qe),
1154
+ }, " − ", 40, Ye),
1153
1155
  u("button", {
1154
1156
  class: "toolbar-dropdown__trigger zoom-trigger",
1155
1157
  onMousedown: r[3] ||= F((e) => O(U)("zoom"), ["prevent"]),
@@ -1160,22 +1162,22 @@ var We = {
1160
1162
  class: "chevron",
1161
1163
  name: "arrow_drop_down",
1162
1164
  size: 16
1163
- })], 40, Je),
1165
+ })], 40, Xe),
1164
1166
  u("button", {
1165
1167
  class: "size-btn",
1166
1168
  onMousedown: r[4] ||= F((e) => t.$emit("zoom-in"), ["prevent"]),
1167
1169
  disabled: T.value,
1168
1170
  title: O(h)("zoom.zoomIn")
1169
- }, " + ", 40, Ye),
1171
+ }, " + ", 40, Ze),
1170
1172
  O(z) === "zoom" ? (b(), l("div", {
1171
1173
  key: 0,
1172
- style: _(O(H)),
1174
+ style: _(O(B)),
1173
1175
  class: "toolbar-dropdown__menu zoom-menu"
1174
1176
  }, [(b(!0), l(a, null, C(D.value, (e) => (b(), l("button", {
1175
1177
  key: e,
1176
1178
  class: g(["toolbar-dropdown__item", { active: y.value === Math.round(e * 100) }]),
1177
1179
  onMousedown: F((n) => t.$emit("zoom-set", e), ["prevent"])
1178
- }, E(Math.round(e * 100)) + "% ", 43, Xe))), 128))], 4)) : c("", !0)
1180
+ }, E(Math.round(e * 100)) + "% ", 43, Qe))), 128))], 4)) : c("", !0)
1179
1181
  ], 512)) : c("", !0),
1180
1182
  r[43] ||= u("span", { class: "divider" }, null, -1),
1181
1183
  u("div", {
@@ -1188,19 +1190,19 @@ var We = {
1188
1190
  "aria-expanded": O(z) === "style",
1189
1191
  "aria-haspopup": "listbox",
1190
1192
  title: O(h)("styles.selectAriaLabel")
1191
- }, [d(E(O(Y)) + " ", 1), f(n, {
1193
+ }, [d(E(O(ne)) + " ", 1), f(n, {
1192
1194
  class: "chevron",
1193
1195
  name: "arrow_drop_down",
1194
1196
  size: 16
1195
- })], 40, Ze), O(z) === "style" ? (b(), l("div", {
1197
+ })], 40, $e), O(z) === "style" ? (b(), l("div", {
1196
1198
  key: 0,
1197
- style: _(O(H)),
1199
+ style: _(O(B)),
1198
1200
  class: "toolbar-dropdown__menu style-menu"
1199
- }, [(b(!0), l(a, null, C(O(ne), (e) => (b(), l("button", {
1201
+ }, [(b(!0), l(a, null, C(O(te), (e) => (b(), l("button", {
1200
1202
  key: e.id,
1201
- class: g(["toolbar-dropdown__item", { active: (W.value.paragraphFormatting.styleId || "Normal") === e.id }]),
1203
+ class: g(["toolbar-dropdown__item", { active: (G.value.paragraphFormatting.styleId || "Normal") === e.id }]),
1202
1204
  onMousedown: F((t) => Ce(e.id), ["prevent"])
1203
- }, [u("span", { style: _({ ...e.previewStyle }) }, E(e.label), 5)], 42, Qe))), 128))], 4)) : c("", !0)], 512),
1205
+ }, [u("span", { style: _({ ...e.previewStyle }) }, E(e.label), 5)], 42, et))), 128))], 4)) : c("", !0)], 512),
1204
1206
  r[44] ||= u("span", { class: "divider" }, null, -1),
1205
1207
  u("div", {
1206
1208
  class: "toolbar-dropdown",
@@ -1212,20 +1214,20 @@ var We = {
1212
1214
  "aria-expanded": O(z) === "font",
1213
1215
  "aria-haspopup": "listbox",
1214
1216
  title: O(h)("font.selectAriaLabel")
1215
- }, [d(E(G.value) + " ", 1), f(n, {
1217
+ }, [d(E(K.value) + " ", 1), f(n, {
1216
1218
  class: "chevron",
1217
1219
  name: "arrow_drop_down",
1218
1220
  size: 16
1219
- })], 40, $e), O(z) === "font" ? (b(), l("div", {
1221
+ })], 40, tt), O(z) === "font" ? (b(), l("div", {
1220
1222
  key: 0,
1221
- style: _(O(H)),
1223
+ style: _(O(B)),
1222
1224
  class: "toolbar-dropdown__menu font-menu"
1223
- }, [(b(!0), l(a, null, C(le.value, (e) => (b(), l(a, { key: e.label }, [e.fonts.length > 0 ? (b(), l("div", et, E(e.label), 1)) : c("", !0), (b(!0), l(a, null, C(e.fonts, (e) => (b(), l("button", {
1225
+ }, [(b(!0), l(a, null, C(le.value, (e) => (b(), l(a, { key: e.label }, [e.fonts.length > 0 ? (b(), l("div", nt, E(e.label), 1)) : c("", !0), (b(!0), l(a, null, C(e.fonts, (e) => (b(), l("button", {
1224
1226
  key: e.name,
1225
- class: g(["toolbar-dropdown__item", { active: G.value === e.name }]),
1227
+ class: g(["toolbar-dropdown__item", { active: K.value === e.name }]),
1226
1228
  style: _({ fontFamily: e.fontFamily }),
1227
- onMousedown: F((t) => fe(e.name), ["prevent"])
1228
- }, E(e.name), 47, tt))), 128))], 64))), 128))], 4)) : c("", !0)], 512),
1229
+ onMousedown: F((t) => ue(e.name), ["prevent"])
1230
+ }, E(e.name), 47, rt))), 128))], 64))), 128))], 4)) : c("", !0)], 512),
1229
1231
  u("div", {
1230
1232
  class: "toolbar-dropdown font-size-group",
1231
1233
  ref_key: "sizeDropdownRef",
@@ -1233,13 +1235,13 @@ var We = {
1233
1235
  }, [
1234
1236
  u("button", {
1235
1237
  class: "size-btn",
1236
- onMousedown: r[7] ||= F((...e) => O(ye) && O(ye)(...e), ["prevent"]),
1238
+ onMousedown: r[7] ||= F((...e) => O(ve) && O(ve)(...e), ["prevent"]),
1237
1239
  title: O(h)("decreaseFontSize")
1238
- }, " − ", 40, nt),
1240
+ }, " − ", 40, it),
1239
1241
  u("input", {
1240
1242
  class: "size-trigger size-input",
1241
1243
  type: "text",
1242
- value: K.value,
1244
+ value: q.value,
1243
1245
  title: O(h)("fontSize"),
1244
1246
  onMousedown: r[8] ||= F(() => {}, ["stop"]),
1245
1247
  onFocus: r[9] ||= (...e) => O(pe) && O(pe)(...e),
@@ -1248,56 +1250,56 @@ var We = {
1248
1250
  onInput: r[10] ||= (...e) => O(me) && O(me)(...e),
1249
1251
  onKeydown: [
1250
1252
  r[11] ||= P(F((e) => O(_e)(), ["prevent", "stop"]), ["up"]),
1251
- r[12] ||= P(F((e) => O(ye)(), ["prevent", "stop"]), ["down"]),
1253
+ r[12] ||= P(F((e) => O(ve)(), ["prevent", "stop"]), ["down"]),
1252
1254
  r[13] ||= P(F((e) => O(he)(e), ["prevent"]), ["enter"])
1253
1255
  ],
1254
1256
  onBlur: r[14] ||= (e) => O(he)(e)
1255
- }, null, 40, rt),
1257
+ }, null, 40, at),
1256
1258
  u("button", {
1257
1259
  class: "size-btn",
1258
1260
  onMousedown: r[15] ||= F((...e) => O(_e) && O(_e)(...e), ["prevent"]),
1259
1261
  title: O(h)("increaseFontSize")
1260
- }, " + ", 40, it),
1262
+ }, " + ", 40, ot),
1261
1263
  O(z) === "size" ? (b(), l("div", {
1262
1264
  key: 0,
1263
- style: _(O(H)),
1265
+ style: _(O(B)),
1264
1266
  class: "toolbar-dropdown__menu size-menu"
1265
- }, [(b(!0), l(a, null, C(O(je), (e) => (b(), l("button", {
1267
+ }, [(b(!0), l(a, null, C(O(Ne), (e) => (b(), l("button", {
1266
1268
  key: e,
1267
- class: g(["toolbar-dropdown__item", { active: K.value === e }]),
1269
+ class: g(["toolbar-dropdown__item", { active: q.value === e }]),
1268
1270
  onMousedown: F((t) => O(ge)(e), ["prevent"])
1269
- }, E(e), 43, at))), 128))], 4)) : c("", !0)
1271
+ }, E(e), 43, st))), 128))], 4)) : c("", !0)
1270
1272
  ], 512),
1271
1273
  r[45] ||= u("span", { class: "divider" }, null, -1),
1272
1274
  u("button", {
1273
1275
  title: O(h)("boldShortcut"),
1274
1276
  "aria-label": O(h)("bold"),
1275
- class: g({ active: W.value.textFormatting.bold }),
1277
+ class: g({ active: G.value.textFormatting.bold }),
1276
1278
  onMousedown: r[16] ||= F((e) => Z("toggleBold"), ["prevent"])
1277
- }, [f(n, { name: "format_bold" })], 42, ot),
1279
+ }, [f(n, { name: "format_bold" })], 42, ct),
1278
1280
  u("button", {
1279
1281
  title: O(h)("italicShortcut"),
1280
1282
  "aria-label": O(h)("italic"),
1281
- class: g({ active: W.value.textFormatting.italic }),
1283
+ class: g({ active: G.value.textFormatting.italic }),
1282
1284
  onMousedown: r[17] ||= F((e) => Z("toggleItalic"), ["prevent"])
1283
- }, [f(n, { name: "format_italic" })], 42, st),
1285
+ }, [f(n, { name: "format_italic" })], 42, lt),
1284
1286
  u("button", {
1285
1287
  title: O(h)("underlineShortcut"),
1286
1288
  "aria-label": O(h)("underline"),
1287
- class: g({ active: !!W.value.textFormatting.underline }),
1289
+ class: g({ active: !!G.value.textFormatting.underline }),
1288
1290
  onMousedown: r[18] ||= F((e) => Z("toggleUnderline"), ["prevent"])
1289
- }, [f(n, { name: "format_underlined" })], 42, ct),
1291
+ }, [f(n, { name: "format_underlined" })], 42, ut),
1290
1292
  u("button", {
1291
1293
  title: O(h)("formattingBar.strikethrough"),
1292
1294
  "aria-label": O(h)("formattingBar.strikethrough"),
1293
- class: g({ active: W.value.textFormatting.strike }),
1295
+ class: g({ active: G.value.textFormatting.strike }),
1294
1296
  onMousedown: r[19] ||= F((e) => Z("toggleStrike"), ["prevent"])
1295
- }, [f(n, { name: "strikethrough_s" })], 42, lt),
1297
+ }, [f(n, { name: "strikethrough_s" })], 42, dt),
1296
1298
  f(O(p), {
1297
1299
  mode: "text",
1298
1300
  value: oe.value,
1299
1301
  theme: e.theme ?? null,
1300
- onChange: be
1302
+ onChange: ye
1301
1303
  }, null, 8, ["value", "theme"]),
1302
1304
  f(O(p), {
1303
1305
  mode: "highlight",
@@ -1309,19 +1311,19 @@ var We = {
1309
1311
  title: O(h)("formattingBar.insertLinkShortcut"),
1310
1312
  "aria-label": O(h)("formattingBar.insertLink"),
1311
1313
  onMousedown: r[20] ||= F((e) => t.$emit("insert-link"), ["prevent"])
1312
- }, [f(n, { name: "link" })], 40, ut),
1314
+ }, [f(n, { name: "link" })], 40, ft),
1313
1315
  u("button", {
1314
1316
  title: O(h)("formattingBar.superscriptShortcut"),
1315
1317
  "aria-label": O(h)("formattingBar.superscript"),
1316
- class: g({ active: W.value.textFormatting.vertAlign === "superscript" }),
1318
+ class: g({ active: G.value.textFormatting.vertAlign === "superscript" }),
1317
1319
  onMousedown: r[21] ||= F((e) => Z("toggleSuperscript"), ["prevent"])
1318
- }, [f(n, { name: "superscript" })], 42, dt),
1320
+ }, [f(n, { name: "superscript" })], 42, pt),
1319
1321
  u("button", {
1320
1322
  title: O(h)("formattingBar.subscriptShortcut"),
1321
1323
  "aria-label": O(h)("formattingBar.subscript"),
1322
- class: g({ active: W.value.textFormatting.vertAlign === "subscript" }),
1324
+ class: g({ active: G.value.textFormatting.vertAlign === "subscript" }),
1323
1325
  onMousedown: r[22] ||= F((e) => Z("toggleSubscript"), ["prevent"])
1324
- }, [f(n, { name: "subscript" })], 42, ft),
1326
+ }, [f(n, { name: "subscript" })], 42, mt),
1325
1327
  r[46] ||= u("span", { class: "divider" }, null, -1),
1326
1328
  u("div", {
1327
1329
  class: "toolbar-dropdown",
@@ -1333,17 +1335,17 @@ var We = {
1333
1335
  "aria-expanded": O(z) === "align",
1334
1336
  "aria-haspopup": "listbox",
1335
1337
  title: O(h)("alignmentGroup")
1336
- }, [f(n, { name: J.value }, null, 8, ["name"]), f(n, {
1338
+ }, [f(n, { name: Y.value }, null, 8, ["name"]), f(n, {
1337
1339
  class: "chevron",
1338
1340
  name: "arrow_drop_down",
1339
1341
  size: 16
1340
- })], 40, pt), O(z) === "align" ? (b(), l("div", {
1342
+ })], 40, ht), O(z) === "align" ? (b(), l("div", {
1341
1343
  key: 0,
1342
- style: _(O(H)),
1344
+ style: _(O(B)),
1343
1345
  class: "toolbar-dropdown__menu align-strip"
1344
1346
  }, [
1345
1347
  u("button", {
1346
- class: g(["align-strip__btn", { active: q.value === "left" }]),
1348
+ class: g(["align-strip__btn", { active: J.value === "left" }]),
1347
1349
  title: `${O(h)("alignLeft")} (${O(h)("alignment.alignLeftShortcut")})`,
1348
1350
  onMousedown: r[24] ||= F((e) => {
1349
1351
  Z("alignLeft"), z.value = null;
@@ -1351,9 +1353,9 @@ var We = {
1351
1353
  }, [f(n, {
1352
1354
  name: "format_align_left",
1353
1355
  size: 18
1354
- })], 42, mt),
1356
+ })], 42, gt),
1355
1357
  u("button", {
1356
- class: g(["align-strip__btn", { active: q.value === "center" }]),
1358
+ class: g(["align-strip__btn", { active: J.value === "center" }]),
1357
1359
  title: `${O(h)("alignCenter")} (${O(h)("alignment.centerShortcut")})`,
1358
1360
  onMousedown: r[25] ||= F((e) => {
1359
1361
  Z("alignCenter"), z.value = null;
@@ -1361,9 +1363,9 @@ var We = {
1361
1363
  }, [f(n, {
1362
1364
  name: "format_align_center",
1363
1365
  size: 18
1364
- })], 42, ht),
1366
+ })], 42, _t),
1365
1367
  u("button", {
1366
- class: g(["align-strip__btn", { active: q.value === "right" }]),
1368
+ class: g(["align-strip__btn", { active: J.value === "right" }]),
1367
1369
  title: `${O(h)("alignRight")} (${O(h)("alignment.alignRightShortcut")})`,
1368
1370
  onMousedown: r[26] ||= F((e) => {
1369
1371
  Z("alignRight"), z.value = null;
@@ -1371,9 +1373,9 @@ var We = {
1371
1373
  }, [f(n, {
1372
1374
  name: "format_align_right",
1373
1375
  size: 18
1374
- })], 42, gt),
1376
+ })], 42, vt),
1375
1377
  u("button", {
1376
- class: g(["align-strip__btn", { active: q.value === "both" }]),
1378
+ class: g(["align-strip__btn", { active: J.value === "both" }]),
1377
1379
  title: `${O(h)("justify")} (${O(h)("alignment.justifyShortcut")})`,
1378
1380
  onMousedown: r[27] ||= F((e) => {
1379
1381
  Z("alignJustify"), z.value = null;
@@ -1381,31 +1383,31 @@ var We = {
1381
1383
  }, [f(n, {
1382
1384
  name: "format_align_justify",
1383
1385
  size: 18
1384
- })], 42, _t)
1386
+ })], 42, yt)
1385
1387
  ], 4)) : c("", !0)], 512),
1386
1388
  u("button", {
1387
1389
  title: O(h)("bulletList"),
1388
1390
  "aria-label": O(h)("bulletList"),
1389
- class: g({ active: W.value.inList && W.value.listType === "bullet" }),
1391
+ class: g({ active: G.value.inList && G.value.listType === "bullet" }),
1390
1392
  onMousedown: r[28] ||= F((e) => Z("toggleBulletList"), ["prevent"])
1391
- }, [f(n, { name: "format_list_bulleted" })], 42, vt),
1393
+ }, [f(n, { name: "format_list_bulleted" })], 42, bt),
1392
1394
  u("button", {
1393
1395
  title: O(h)("numberedList"),
1394
1396
  "aria-label": O(h)("numberedList"),
1395
- class: g({ active: W.value.inList && W.value.listType === "numbered" }),
1397
+ class: g({ active: G.value.inList && G.value.listType === "numbered" }),
1396
1398
  onMousedown: r[29] ||= F((e) => Z("toggleNumberedList"), ["prevent"])
1397
- }, [f(n, { name: "format_list_numbered" })], 42, yt),
1399
+ }, [f(n, { name: "format_list_numbered" })], 42, xt),
1398
1400
  u("button", {
1399
1401
  title: O(h)("decreaseIndent"),
1400
1402
  "aria-label": O(h)("decreaseIndent"),
1401
1403
  disabled: !ae.value,
1402
1404
  onMousedown: r[30] ||= F((e) => Z("outdent"), ["prevent"])
1403
- }, [f(n, { name: "format_indent_decrease" })], 40, bt),
1405
+ }, [f(n, { name: "format_indent_decrease" })], 40, St),
1404
1406
  u("button", {
1405
1407
  title: O(h)("increaseIndent"),
1406
1408
  "aria-label": O(h)("increaseIndent"),
1407
1409
  onMousedown: r[31] ||= F((e) => Z("indent"), ["prevent"])
1408
- }, [f(n, { name: "format_indent_increase" })], 40, xt),
1410
+ }, [f(n, { name: "format_indent_increase" })], 40, Ct),
1409
1411
  u("div", {
1410
1412
  class: "toolbar-dropdown",
1411
1413
  ref_key: "spacingDropdownRef",
@@ -1420,42 +1422,42 @@ var We = {
1420
1422
  class: "chevron",
1421
1423
  name: "arrow_drop_down",
1422
1424
  size: 16
1423
- })], 40, St), O(z) === "spacing" ? (b(), l("div", {
1425
+ })], 40, wt), O(z) === "spacing" ? (b(), l("div", {
1424
1426
  key: 0,
1425
- style: _(O(H)),
1427
+ style: _(O(B)),
1426
1428
  class: "toolbar-dropdown__menu"
1427
- }, [(b(!0), l(a, null, C(O(Ne), (e) => (b(), l("button", {
1429
+ }, [(b(!0), l(a, null, C(O(Fe), (e) => (b(), l("button", {
1428
1430
  key: e.value,
1429
1431
  class: g(["toolbar-dropdown__item", { active: Te(e.value) }]),
1430
1432
  onMousedown: F((t) => we(e.value), ["prevent"])
1431
- }, E(e.labelKey ? O(h)(e.labelKey) : e.label), 43, Ct))), 128))], 4)) : c("", !0)], 512),
1433
+ }, E(e.labelKey ? O(h)(e.labelKey) : e.label), 43, Tt))), 128))], 4)) : c("", !0)], 512),
1432
1434
  u("button", {
1433
1435
  title: O(h)("formattingBar.clearFormatting"),
1434
1436
  "aria-label": O(h)("formattingBar.clearFormatting"),
1435
1437
  onMousedown: F(xe, ["prevent"])
1436
- }, [f(n, { name: "format_clear" })], 40, wt),
1438
+ }, [f(n, { name: "format_clear" })], 40, Et),
1437
1439
  r[47] ||= u("span", { class: "divider" }, null, -1),
1438
1440
  u("button", {
1439
1441
  title: O(h)("formattingBar.commentsAndChanges"),
1440
1442
  "aria-label": O(h)("formattingBar.commentsAndChanges"),
1441
1443
  class: g({ active: e.commentsSidebarOpen }),
1442
1444
  onMousedown: r[33] ||= F((e) => t.$emit("toggle-sidebar"), ["prevent"])
1443
- }, [f(n, { name: "comment" })], 42, Tt),
1445
+ }, [f(n, { name: "comment" })], 42, Dt),
1444
1446
  e.imageContext ? (b(), l(a, { key: 1 }, [
1445
1447
  r[40] ||= u("span", { class: "divider" }, null, -1),
1446
- f(ue, {
1448
+ f(de, {
1447
1449
  "image-context": e.imageContext,
1448
1450
  onChange: r[34] ||= (e) => t.$emit("image-wrap-type", e)
1449
1451
  }, null, 8, ["image-context"]),
1450
- f(de, { onTransform: r[35] ||= (e) => t.$emit("image-transform", e) }),
1452
+ f(fe, { onTransform: r[35] ||= (e) => t.$emit("image-transform", e) }),
1451
1453
  u("button", {
1452
1454
  title: O(h)("formattingBar.imagePropertiesShortcut"),
1453
1455
  "aria-label": O(h)("formattingBar.imageProperties"),
1454
1456
  onMousedown: r[36] ||= F((e) => t.$emit("image-properties"), ["prevent"])
1455
- }, [f(n, { name: "tune" })], 40, Et)
1457
+ }, [f(n, { name: "tune" })], 40, Ot)
1456
1458
  ], 64)) : c("", !0),
1457
1459
  w(t.$slots, "table-context", {}, void 0, !0),
1458
- e.showReviewControls ? (b(), l(a, { key: 2 }, [r[41] ||= u("span", { class: "divider" }, null, -1), f(Ee, {
1460
+ e.showReviewControls ? (b(), l(a, { key: 2 }, [r[41] ||= u("span", { class: "divider" }, null, -1), f(Oe, {
1459
1461
  "track-changes-on": e.trackChangesOn,
1460
1462
  "display-mode": e.displayMode,
1461
1463
  "read-only": e.readOnly,
@@ -1467,7 +1469,7 @@ var We = {
1467
1469
  "read-only"
1468
1470
  ])], 64)) : c("", !0),
1469
1471
  r[48] ||= u("span", { class: "divider" }, null, -1),
1470
- e.editorMode ? (b(), s(ve, {
1472
+ e.editorMode ? (b(), s(be, {
1471
1473
  key: 3,
1472
1474
  "model-value": e.editorMode,
1473
1475
  "onUpdate:modelValue": r[39] ||= (e) => t.$emit("mode-change", e)
@@ -1475,7 +1477,7 @@ var We = {
1475
1477
  w(t.$slots, "toolbar-extra", {}, void 0, !0)
1476
1478
  ])) : c("", !0);
1477
1479
  }
1478
- }), [["__scopeId", "data-v-e54d1eac"]]), Ot = ["aria-valuemax"], kt = { class: "docx-horizontal-ruler__ticks" }, At = ["title", "onDblclick"], jt = 12240, Mt = 1440, Nt = 1440, Pt = 567, Ft = "var(--doc-primary)", It = "var(--doc-primary)", Lt = "var(--doc-primary-hover)", Q = 5, Rt = /*#__PURE__*/ t(/* @__PURE__ */ p({
1480
+ }), [["__scopeId", "data-v-e54d1eac"]]), At = ["aria-valuemax"], jt = { class: "docx-horizontal-ruler__ticks" }, Mt = ["title", "onDblclick"], Nt = 12240, Pt = 1440, Ft = 1440, It = 567, Lt = "var(--doc-primary)", Rt = "var(--doc-primary)", zt = "var(--doc-primary-hover)", Q = 5, Bt = /*#__PURE__*/ t(/* @__PURE__ */ p({
1479
1481
  __name: "HorizontalRuler",
1480
1482
  props: {
1481
1483
  sectionProps: {},
@@ -1509,12 +1511,12 @@ var We = {
1509
1511
  setup(e, { emit: t }) {
1510
1512
  let n = e, r = t, i = Math.round(Q * 1.6), s = S(null), d = S(null), f = S(null), p = S(0), m = S("");
1511
1513
  function h(e) {
1512
- return R(e) * n.zoom;
1514
+ return z(e) * n.zoom;
1513
1515
  }
1514
1516
  function g(e) {
1515
- return Math.round(L(e / n.zoom));
1517
+ return Math.round(R(e / n.zoom));
1516
1518
  }
1517
- let y = o(() => n.sectionProps?.pageWidth ?? jt), x = o(() => n.sectionProps?.marginLeft ?? Mt), w = o(() => n.sectionProps?.marginRight ?? Mt), T = o(() => y.value - x.value - w.value), D = o(() => h(y.value)), O = o(() => h(x.value)), k = o(() => h(w.value)), A = o(() => h(n.indentLeft)), j = o(() => h(n.indentRight)), M = o(() => n.hangingIndent ? -n.firstLineIndent : n.firstLineIndent), N = o(() => h(M.value)), P = o(() => O.value + A.value), I = o(() => D.value - k.value - j.value), z = o(() => O.value + A.value + N.value), B = o(() => ({
1519
+ let y = o(() => n.sectionProps?.pageWidth ?? Nt), x = o(() => n.sectionProps?.marginLeft ?? Pt), w = o(() => n.sectionProps?.marginRight ?? Pt), T = o(() => y.value - x.value - w.value), D = o(() => h(y.value)), O = o(() => h(x.value)), k = o(() => h(w.value)), A = o(() => h(n.indentLeft)), j = o(() => h(n.indentRight)), M = o(() => n.hangingIndent ? -n.firstLineIndent : n.firstLineIndent), N = o(() => h(M.value)), P = o(() => O.value + A.value), I = o(() => D.value - k.value - j.value), L = o(() => O.value + A.value + N.value), B = o(() => ({
1518
1520
  position: "relative",
1519
1521
  width: D.value + "px",
1520
1522
  height: "22px",
@@ -1532,7 +1534,7 @@ var We = {
1532
1534
  borderRight: "1px solid var(--doc-shadow-subtle)",
1533
1535
  cursor: n.editable ? "ew-resize" : "default",
1534
1536
  zIndex: 1
1535
- })), ee = o(() => ({
1537
+ })), H = o(() => ({
1536
1538
  position: "absolute",
1537
1539
  top: 0,
1538
1540
  right: 0,
@@ -1542,10 +1544,10 @@ var We = {
1542
1544
  borderLeft: "1px solid var(--doc-shadow-subtle)",
1543
1545
  cursor: n.editable ? "ew-resize" : "default",
1544
1546
  zIndex: 1
1545
- })), H = o(() => {
1547
+ })), ee = o(() => {
1546
1548
  let e = [];
1547
1549
  if (n.unit === "inch") {
1548
- let t = Nt / 8, n = Math.ceil(y.value / t);
1550
+ let t = Ft / 8, n = Math.ceil(y.value / t);
1549
1551
  for (let r = 0; r <= n; r++) {
1550
1552
  let n = r * t;
1551
1553
  if (n > y.value) break;
@@ -1566,7 +1568,7 @@ var We = {
1566
1568
  });
1567
1569
  }
1568
1570
  } else {
1569
- let t = Pt / 10, n = Math.ceil(y.value / t);
1571
+ let t = It / 10, n = Math.ceil(y.value / t);
1570
1572
  for (let r = 0; r <= n; r++) {
1571
1573
  let n = r * t;
1572
1574
  if (n > y.value) break;
@@ -1590,16 +1592,16 @@ var We = {
1590
1592
  return {
1591
1593
  px: h(t),
1592
1594
  twips: t,
1593
- label: te(t)
1595
+ label: W(t)
1594
1596
  };
1595
1597
  }) : []);
1596
- function te(e) {
1597
- return n.unit === "cm" ? (e / Pt).toFixed(1) + " cm" : (e / Nt).toFixed(2) + "\"";
1598
- }
1599
1598
  function W(e) {
1600
- return d.value === e ? Lt : f.value === e ? It : Ft;
1599
+ return n.unit === "cm" ? (e / It).toFixed(1) + " cm" : (e / Ft).toFixed(2) + "\"";
1600
+ }
1601
+ function G(e) {
1602
+ return d.value === e ? zt : f.value === e ? Rt : Lt;
1601
1603
  }
1602
- function G(e, t, r) {
1604
+ function K(e, t, r) {
1603
1605
  return {
1604
1606
  position: "absolute",
1605
1607
  left: t - Q + "px",
@@ -1610,7 +1612,7 @@ var We = {
1610
1612
  ...e === "down" ? { top: 0 } : { bottom: 0 }
1611
1613
  };
1612
1614
  }
1613
- function K(e, t) {
1615
+ function q(e, t) {
1614
1616
  return e === "down" ? {
1615
1617
  position: "absolute",
1616
1618
  top: "1px",
@@ -1633,21 +1635,21 @@ var We = {
1633
1635
  transition: "border-bottom-color 0.1s"
1634
1636
  };
1635
1637
  }
1636
- let q = 0;
1637
- function J(e, t) {
1638
- n.editable && (d.value = e, e === "leftMargin" ? q = x.value : e === "rightMargin" ? q = w.value : e === "leftIndent" ? q = n.indentLeft : e === "rightIndent" ? q = n.indentRight : e === "firstLineIndent" && (q = n.firstLineIndent), p.value = t.clientX - (s.value?.getBoundingClientRect().left ?? 0), m.value = te(q), document.addEventListener("mousemove", ne), document.addEventListener("mouseup", Y));
1638
+ let J = 0;
1639
+ function Y(e, t) {
1640
+ n.editable && (d.value = e, e === "leftMargin" ? J = x.value : e === "rightMargin" ? J = w.value : e === "leftIndent" ? J = n.indentLeft : e === "rightIndent" ? J = n.indentRight : e === "firstLineIndent" && (J = n.firstLineIndent), p.value = t.clientX - (s.value?.getBoundingClientRect().left ?? 0), m.value = W(J), document.addEventListener("mousemove", te), document.addEventListener("mouseup", ne));
1639
1641
  }
1640
- function ne(e) {
1642
+ function te(e) {
1641
1643
  if (!d.value || !s.value) return;
1642
1644
  let t = s.value.getBoundingClientRect();
1643
1645
  if (!t) return;
1644
1646
  let n = e.clientX - t.left;
1645
1647
  p.value = n;
1646
1648
  let r = g(n), i = re(d.value, r);
1647
- m.value = te(i), ie(d.value, i);
1649
+ m.value = W(i), ie(d.value, i);
1648
1650
  }
1649
- function Y(e) {
1650
- d.value = null, document.removeEventListener("mousemove", ne), document.removeEventListener("mouseup", Y);
1651
+ function ne(e) {
1652
+ d.value = null, document.removeEventListener("mousemove", te), document.removeEventListener("mouseup", ne);
1651
1653
  }
1652
1654
  function re(e, t) {
1653
1655
  if (e === "leftMargin") {
@@ -1689,7 +1691,7 @@ var We = {
1689
1691
  }
1690
1692
  }
1691
1693
  return v(() => {
1692
- document.removeEventListener("mousemove", ne), document.removeEventListener("mouseup", Y);
1694
+ document.removeEventListener("mousemove", te), document.removeEventListener("mouseup", ne);
1693
1695
  }), (t, n) => (b(), l("div", {
1694
1696
  ref_key: "rulerRef",
1695
1697
  ref: s,
@@ -1703,14 +1705,14 @@ var We = {
1703
1705
  u("div", {
1704
1706
  class: "docx-horizontal-ruler__margin",
1705
1707
  style: _(V.value),
1706
- onMousedown: n[0] ||= F((t) => e.editable ? J("leftMargin", t) : null, ["prevent", "stop"])
1708
+ onMousedown: n[0] ||= F((t) => e.editable ? Y("leftMargin", t) : null, ["prevent", "stop"])
1707
1709
  }, null, 36),
1708
1710
  u("div", {
1709
1711
  class: "docx-horizontal-ruler__margin",
1710
- style: _(ee.value),
1711
- onMousedown: n[1] ||= F((t) => e.editable ? J("rightMargin", t) : null, ["prevent", "stop"])
1712
+ style: _(H.value),
1713
+ onMousedown: n[1] ||= F((t) => e.editable ? Y("rightMargin", t) : null, ["prevent", "stop"])
1712
1714
  }, null, 36),
1713
- u("div", kt, [(b(!0), l(a, null, C(H.value, (e, t) => (b(), l(a, { key: t }, [u("div", {
1715
+ u("div", jt, [(b(!0), l(a, null, C(ee.value, (e, t) => (b(), l(a, { key: t }, [u("div", {
1714
1716
  class: "docx-horizontal-ruler__tick-line",
1715
1717
  style: _({
1716
1718
  left: e.position + "px",
@@ -1724,42 +1726,42 @@ var We = {
1724
1726
  e.showFirstLineIndent ? (b(), l("div", {
1725
1727
  key: 0,
1726
1728
  class: "docx-ruler-indent",
1727
- style: _(G("down", z.value, d.value === "firstLineIndent")),
1728
- onMousedown: n[2] ||= F((t) => e.editable ? J("firstLineIndent", t) : null, ["prevent", "stop"]),
1729
+ style: _(K("down", L.value, d.value === "firstLineIndent")),
1730
+ onMousedown: n[2] ||= F((t) => e.editable ? Y("firstLineIndent", t) : null, ["prevent", "stop"]),
1729
1731
  onMouseenter: n[3] ||= (e) => f.value = "firstLineIndent",
1730
1732
  onMouseleave: n[4] ||= (e) => f.value = null
1731
- }, [u("div", { style: _(K("down", W("firstLineIndent"))) }, null, 4)], 36)) : c("", !0),
1733
+ }, [u("div", { style: _(q("down", G("firstLineIndent"))) }, null, 4)], 36)) : c("", !0),
1732
1734
  e.editable ? (b(), l("div", {
1733
1735
  key: 1,
1734
1736
  class: "docx-ruler-indent",
1735
- style: _(G("up", P.value, d.value === "leftIndent")),
1736
- onMousedown: n[5] ||= F((e) => J("leftIndent", e), ["prevent", "stop"]),
1737
+ style: _(K("up", P.value, d.value === "leftIndent")),
1738
+ onMousedown: n[5] ||= F((e) => Y("leftIndent", e), ["prevent", "stop"]),
1737
1739
  onMouseenter: n[6] ||= (e) => f.value = "leftIndent",
1738
1740
  onMouseleave: n[7] ||= (e) => f.value = null
1739
- }, [u("div", { style: _(K("up", W("leftIndent"))) }, null, 4)], 36)) : c("", !0),
1741
+ }, [u("div", { style: _(q("up", G("leftIndent"))) }, null, 4)], 36)) : c("", !0),
1740
1742
  e.editable ? (b(), l("div", {
1741
1743
  key: 2,
1742
1744
  class: "docx-ruler-indent",
1743
- style: _(G("down", I.value, d.value === "rightIndent")),
1744
- onMousedown: n[8] ||= F((e) => J("rightIndent", e), ["prevent", "stop"]),
1745
+ style: _(K("down", I.value, d.value === "rightIndent")),
1746
+ onMousedown: n[8] ||= F((e) => Y("rightIndent", e), ["prevent", "stop"]),
1745
1747
  onMouseenter: n[9] ||= (e) => f.value = "rightIndent",
1746
1748
  onMouseleave: n[10] ||= (e) => f.value = null
1747
- }, [u("div", { style: _(K("down", W("rightIndent"))) }, null, 4)], 36)) : c("", !0),
1749
+ }, [u("div", { style: _(q("down", G("rightIndent"))) }, null, 4)], 36)) : c("", !0),
1748
1750
  (b(!0), l(a, null, C(U.value, (e, n) => (b(), l("div", {
1749
1751
  key: n,
1750
1752
  class: "docx-horizontal-ruler__tab",
1751
1753
  style: _({ left: e.px + "px" }),
1752
1754
  title: `${e.label}`,
1753
1755
  onDblclick: F((n) => t.$emit("tab-stop-remove", e.twips), ["prevent"])
1754
- }, " L ", 44, At))), 128)),
1756
+ }, " L ", 44, Mt))), 128)),
1755
1757
  d.value && m.value ? (b(), l("div", {
1756
1758
  key: 3,
1757
1759
  class: "docx-horizontal-ruler__tooltip",
1758
1760
  style: _({ left: p.value + "px" })
1759
1761
  }, E(m.value), 5)) : c("", !0)
1760
- ], 12, Ot));
1762
+ ], 12, At));
1761
1763
  }
1762
- }), [["__scopeId", "data-v-6f3ea48c"]]), zt = ["disabled", "onClick"], Bt = { class: "docx-tbp__panel" }, Vt = ["title", "onClick"], Ht = /*#__PURE__*/ t(/* @__PURE__ */ p({
1764
+ }), [["__scopeId", "data-v-6f3ea48c"]]), Vt = ["disabled", "onClick"], Ht = { class: "docx-tbp__panel" }, Ut = ["title", "onClick"], Wt = /*#__PURE__*/ t(/* @__PURE__ */ p({
1763
1765
  __name: "TableBorderPicker",
1764
1766
  props: { disabled: { type: Boolean } },
1765
1767
  emits: ["change"],
@@ -1833,8 +1835,8 @@ var We = {
1833
1835
  }, [f(n, {
1834
1836
  name: "border_all",
1835
1837
  size: 20
1836
- })], 8, zt)]),
1837
- panel: M(() => [u("div", Bt, [(b(), l(a, null, C(d, (e) => u("button", {
1838
+ })], 8, Vt)]),
1839
+ panel: M(() => [u("div", Ht, [(b(), l(a, null, C(d, (e) => u("button", {
1838
1840
  key: e.value,
1839
1841
  type: "button",
1840
1842
  class: "docx-tbp__option",
@@ -1843,11 +1845,11 @@ var We = {
1843
1845
  }, [f(n, {
1844
1846
  name: e.icon,
1845
1847
  size: 20
1846
- }, null, 8, ["name"])], 8, Vt)), 64))])]),
1848
+ }, null, 8, ["name"])], 8, Ut)), 64))])]),
1847
1849
  _: 1
1848
1850
  }, 8, ["open"]));
1849
1851
  }
1850
- }), [["__scopeId", "data-v-4e30a014"]]), Ut = /* @__PURE__ */ p({
1852
+ }), [["__scopeId", "data-v-4e30a014"]]), Gt = /* @__PURE__ */ p({
1851
1853
  __name: "TableBorderColorPicker",
1852
1854
  props: {
1853
1855
  disabled: { type: Boolean },
@@ -1874,7 +1876,7 @@ var We = {
1874
1876
  "title"
1875
1877
  ]));
1876
1878
  }
1877
- }), Wt = ["disabled", "onClick"], Gt = { class: "docx-tbwidth__panel" }, Kt = ["onClick"], qt = { class: "docx-tbwidth__label" }, Jt = /*#__PURE__*/ t(/* @__PURE__ */ p({
1879
+ }), Kt = ["disabled", "onClick"], qt = { class: "docx-tbwidth__panel" }, Jt = ["onClick"], Yt = { class: "docx-tbwidth__label" }, Xt = /*#__PURE__*/ t(/* @__PURE__ */ p({
1878
1880
  __name: "TableBorderWidthPicker",
1879
1881
  props: { disabled: { type: Boolean } },
1880
1882
  emits: ["change"],
@@ -1938,8 +1940,8 @@ var We = {
1938
1940
  }, [f(n, {
1939
1941
  name: "line_weight",
1940
1942
  size: 20
1941
- })], 8, Wt)]),
1942
- panel: M(() => [u("div", Gt, [(b(), l(a, null, C(d, (e) => u("button", {
1943
+ })], 8, Kt)]),
1944
+ panel: M(() => [u("div", qt, [(b(), l(a, null, C(d, (e) => u("button", {
1943
1945
  key: e.eighths,
1944
1946
  type: "button",
1945
1947
  class: "docx-tbwidth__option",
@@ -1947,11 +1949,11 @@ var We = {
1947
1949
  }, [u("span", {
1948
1950
  class: "docx-tbwidth__preview",
1949
1951
  style: _({ borderTopWidth: e.previewPx + "px" })
1950
- }, null, 4), u("span", qt, E(e.label), 1)], 8, Kt)), 64))])]),
1952
+ }, null, 4), u("span", Yt, E(e.label), 1)], 8, Jt)), 64))])]),
1951
1953
  _: 1
1952
1954
  }, 8, ["open"]));
1953
1955
  }
1954
- }), [["__scopeId", "data-v-42a746ba"]]), Yt = /* @__PURE__ */ p({
1956
+ }), [["__scopeId", "data-v-42a746ba"]]), Zt = /* @__PURE__ */ p({
1955
1957
  __name: "TableCellFillPicker",
1956
1958
  props: {
1957
1959
  disabled: { type: Boolean },
@@ -1981,23 +1983,23 @@ var We = {
1981
1983
  "auto-label"
1982
1984
  ]));
1983
1985
  }
1984
- }), Xt = [
1986
+ }), Qt = [
1985
1987
  "disabled",
1986
1988
  "title",
1987
1989
  "onClick"
1988
- ], Zt = ["aria-label"], Qt = ["disabled"], $t = ["disabled"], en = ["disabled"], tn = ["disabled"], nn = { class: "docx-tmore__section-label" }, rn = { class: "docx-tmore__icon-row" }, an = ["title"], on = ["title"], sn = ["title"], cn = { class: "docx-tmore__section-label" }, ln = { class: "docx-tmore__icon-row" }, un = ["title"], dn = ["title"], fn = ["title"], pn = { class: "docx-tmore__grow" }, mn = {
1990
+ ], $t = ["aria-label"], en = ["disabled"], tn = ["disabled"], nn = ["disabled"], rn = ["disabled"], an = { class: "docx-tmore__section-label" }, on = { class: "docx-tmore__icon-row" }, sn = ["title"], cn = ["title"], ln = ["title"], un = { class: "docx-tmore__section-label" }, dn = { class: "docx-tmore__icon-row" }, fn = ["title"], pn = ["title"], mn = ["title"], hn = { class: "docx-tmore__grow" }, gn = {
1989
1991
  key: 0,
1990
1992
  class: "docx-tmore__sub"
1991
- }, hn = { class: "docx-tmore__margin-grid" }, gn = { class: "docx-tmore__field-label" }, _n = ["onUpdate:modelValue"], vn = { class: "docx-tmore__grow" }, yn = {
1993
+ }, _n = { class: "docx-tmore__margin-grid" }, vn = { class: "docx-tmore__field-label" }, yn = ["onUpdate:modelValue"], bn = { class: "docx-tmore__grow" }, xn = {
1992
1994
  key: 1,
1993
1995
  class: "docx-tmore__sub"
1994
- }, bn = { class: "docx-tmore__row-field" }, xn = { class: "docx-tmore__field-label" }, Sn = { value: "auto" }, Cn = { value: "atLeast" }, wn = { value: "exact" }, Tn = {
1996
+ }, Sn = { class: "docx-tmore__row-field" }, Cn = { class: "docx-tmore__field-label" }, wn = { value: "auto" }, Tn = { value: "atLeast" }, En = { value: "exact" }, Dn = {
1995
1997
  key: 0,
1996
1998
  class: "docx-tmore__row-field"
1997
- }, En = { class: "docx-tmore__field-label" }, Dn = { class: "docx-tmore__grow" }, On = {
1999
+ }, On = { class: "docx-tmore__field-label" }, kn = { class: "docx-tmore__grow" }, An = {
1998
2000
  key: 2,
1999
2001
  class: "docx-tmore__sub docx-tmore__sub--list"
2000
- }, kn = /*#__PURE__*/ t(/* @__PURE__ */ p({
2002
+ }, jn = /*#__PURE__*/ t(/* @__PURE__ */ p({
2001
2003
  __name: "TableMoreDropdown",
2002
2004
  props: {
2003
2005
  disabled: {
@@ -2075,7 +2077,7 @@ var We = {
2075
2077
  }, [f(n, {
2076
2078
  name: "more_vert",
2077
2079
  size: 20
2078
- })], 10, Xt)]),
2080
+ })], 10, Qt)]),
2079
2081
  panel: M(() => [u("div", {
2080
2082
  class: "docx-tmore__panel",
2081
2083
  role: "menu",
@@ -2122,7 +2124,7 @@ var We = {
2122
2124
  }, [f(n, {
2123
2125
  name: "call_merge",
2124
2126
  size: 18
2125
- }), u("span", null, E(O(m)("table.mergeCells")), 1)], 8, Qt),
2127
+ }), u("span", null, E(O(m)("table.mergeCells")), 1)], 8, en),
2126
2128
  u("button", {
2127
2129
  type: "button",
2128
2130
  class: "docx-tmore__item",
@@ -2131,7 +2133,7 @@ var We = {
2131
2133
  }, [f(n, {
2132
2134
  name: "call_split",
2133
2135
  size: 18
2134
- }), u("span", null, E(O(m)("table.splitCell")), 1)], 8, $t),
2136
+ }), u("span", null, E(O(m)("table.splitCell")), 1)], 8, tn),
2135
2137
  r[40] ||= u("div", { class: "docx-tmore__separator" }, null, -1),
2136
2138
  u("button", {
2137
2139
  type: "button",
@@ -2150,7 +2152,7 @@ var We = {
2150
2152
  }, [f(n, {
2151
2153
  name: "delete",
2152
2154
  size: 18
2153
- }), u("span", null, E(O(m)("deleteRow")), 1)], 8, en),
2155
+ }), u("span", null, E(O(m)("deleteRow")), 1)], 8, nn),
2154
2156
  u("button", {
2155
2157
  type: "button",
2156
2158
  class: "docx-tmore__item docx-tmore__item--danger",
@@ -2159,7 +2161,7 @@ var We = {
2159
2161
  }, [f(n, {
2160
2162
  name: "delete",
2161
2163
  size: 18
2162
- }), u("span", null, E(O(m)("deleteColumn")), 1)], 8, tn),
2164
+ }), u("span", null, E(O(m)("deleteColumn")), 1)], 8, rn),
2163
2165
  u("button", {
2164
2166
  type: "button",
2165
2167
  class: "docx-tmore__item docx-tmore__item--danger",
@@ -2169,8 +2171,8 @@ var We = {
2169
2171
  size: 18
2170
2172
  }), u("span", null, E(O(m)("table.deleteTable")), 1)]),
2171
2173
  r[42] ||= u("div", { class: "docx-tmore__separator" }, null, -1),
2172
- u("div", nn, E(O(m)("tableAdvanced.verticalAlignment")), 1),
2173
- u("div", rn, [
2174
+ u("div", an, E(O(m)("tableAdvanced.verticalAlignment")), 1),
2175
+ u("div", on, [
2174
2176
  u("button", {
2175
2177
  type: "button",
2176
2178
  class: "docx-tmore__icon-btn",
@@ -2180,7 +2182,7 @@ var We = {
2180
2182
  }, [f(n, {
2181
2183
  name: "vertical_align_top",
2182
2184
  size: 16
2183
- })], 40, an),
2185
+ })], 40, sn),
2184
2186
  u("button", {
2185
2187
  type: "button",
2186
2188
  class: "docx-tmore__icon-btn",
@@ -2190,7 +2192,7 @@ var We = {
2190
2192
  }, [f(n, {
2191
2193
  name: "vertical_align_center",
2192
2194
  size: 16
2193
- })], 40, on),
2195
+ })], 40, cn),
2194
2196
  u("button", {
2195
2197
  type: "button",
2196
2198
  class: "docx-tmore__icon-btn",
@@ -2200,11 +2202,11 @@ var We = {
2200
2202
  }, [f(n, {
2201
2203
  name: "vertical_align_bottom",
2202
2204
  size: 16
2203
- })], 40, sn)
2205
+ })], 40, ln)
2204
2206
  ]),
2205
2207
  r[43] ||= u("div", { class: "docx-tmore__separator" }, null, -1),
2206
- u("div", cn, E(O(m)("tableAdvanced.tableAlignment")), 1),
2207
- u("div", ln, [
2208
+ u("div", un, E(O(m)("tableAdvanced.tableAlignment")), 1),
2209
+ u("div", dn, [
2208
2210
  u("button", {
2209
2211
  type: "button",
2210
2212
  class: g(["docx-tmore__icon-btn", { "docx-tmore__icon-btn--active": e.currentJustification === "left" }]),
@@ -2214,7 +2216,7 @@ var We = {
2214
2216
  }, [f(n, {
2215
2217
  name: "format_align_left",
2216
2218
  size: 16
2217
- })], 42, un),
2219
+ })], 42, fn),
2218
2220
  u("button", {
2219
2221
  type: "button",
2220
2222
  class: g(["docx-tmore__icon-btn", { "docx-tmore__icon-btn--active": e.currentJustification === "center" }]),
@@ -2224,7 +2226,7 @@ var We = {
2224
2226
  }, [f(n, {
2225
2227
  name: "format_align_center",
2226
2228
  size: 16
2227
- })], 42, dn),
2229
+ })], 42, pn),
2228
2230
  u("button", {
2229
2231
  type: "button",
2230
2232
  class: g(["docx-tmore__icon-btn", { "docx-tmore__icon-btn--active": e.currentJustification === "right" }]),
@@ -2234,7 +2236,7 @@ var We = {
2234
2236
  }, [f(n, {
2235
2237
  name: "format_align_right",
2236
2238
  size: 16
2237
- })], 42, fn)
2239
+ })], 42, mn)
2238
2240
  ]),
2239
2241
  r[44] ||= u("div", { class: "docx-tmore__separator" }, null, -1),
2240
2242
  u("button", {
@@ -2246,13 +2248,13 @@ var We = {
2246
2248
  name: "padding",
2247
2249
  size: 18
2248
2250
  }),
2249
- u("span", pn, E(O(m)("tableAdvanced.cellMargins")), 1),
2251
+ u("span", hn, E(O(m)("tableAdvanced.cellMargins")), 1),
2250
2252
  f(n, {
2251
2253
  name: _.value ? "expand_less" : "expand_more",
2252
2254
  size: 18
2253
2255
  }, null, 8, ["name"])
2254
2256
  ]),
2255
- _.value ? (b(), l("div", mn, [u("div", hn, [(b(), l(a, null, C([
2257
+ _.value ? (b(), l("div", gn, [u("div", _n, [(b(), l(a, null, C([
2256
2258
  "top",
2257
2259
  "bottom",
2258
2260
  "left",
@@ -2261,14 +2263,14 @@ var We = {
2261
2263
  key: e,
2262
2264
  class: "docx-tmore__field"
2263
2265
  }, [
2264
- u("span", gn, E(e), 1),
2266
+ u("span", vn, E(e), 1),
2265
2267
  N(u("input", {
2266
2268
  type: "number",
2267
2269
  min: "0",
2268
2270
  step: "20",
2269
2271
  "onUpdate:modelValue": (t) => w[e] = t,
2270
2272
  class: "docx-tmore__input"
2271
- }, null, 8, _n), [[
2273
+ }, null, 8, yn), [[
2272
2274
  A,
2273
2275
  w[e],
2274
2276
  void 0,
@@ -2289,23 +2291,23 @@ var We = {
2289
2291
  name: "height",
2290
2292
  size: 18
2291
2293
  }),
2292
- u("span", vn, E(O(m)("tableAdvanced.rowHeight")), 1),
2294
+ u("span", bn, E(O(m)("tableAdvanced.rowHeight")), 1),
2293
2295
  f(n, {
2294
2296
  name: v.value ? "expand_less" : "expand_more",
2295
2297
  size: 18
2296
2298
  }, null, 8, ["name"])
2297
2299
  ]),
2298
- v.value ? (b(), l("div", yn, [
2299
- u("label", bn, [u("span", xn, E(O(m)("tableAdvanced.rule")), 1), N(u("select", {
2300
+ v.value ? (b(), l("div", xn, [
2301
+ u("label", Sn, [u("span", Cn, E(O(m)("tableAdvanced.rule")), 1), N(u("select", {
2300
2302
  "onUpdate:modelValue": r[24] ||= (e) => D.value = e,
2301
2303
  class: "docx-tmore__select"
2302
2304
  }, [
2303
- u("option", Sn, E(O(m)("tableAdvanced.heightRules.auto")), 1),
2304
- u("option", Cn, E(O(m)("tableAdvanced.heightRules.atLeast")), 1),
2305
- u("option", wn, E(O(m)("tableAdvanced.heightRules.exact")), 1)
2305
+ u("option", wn, E(O(m)("tableAdvanced.heightRules.auto")), 1),
2306
+ u("option", Tn, E(O(m)("tableAdvanced.heightRules.atLeast")), 1),
2307
+ u("option", En, E(O(m)("tableAdvanced.heightRules.exact")), 1)
2306
2308
  ], 512), [[k, D.value]])]),
2307
- D.value === "auto" ? c("", !0) : (b(), l("label", Tn, [
2308
- u("span", En, E(O(m)("tableAdvanced.height")), 1),
2309
+ D.value === "auto" ? c("", !0) : (b(), l("label", Dn, [
2310
+ u("span", On, E(O(m)("tableAdvanced.height")), 1),
2309
2311
  N(u("input", {
2310
2312
  type: "number",
2311
2313
  min: "0",
@@ -2335,13 +2337,13 @@ var We = {
2335
2337
  name: "text_rotation_none",
2336
2338
  size: 18
2337
2339
  }),
2338
- u("span", Dn, E(O(m)("textDirection")), 1),
2340
+ u("span", kn, E(O(m)("textDirection")), 1),
2339
2341
  f(n, {
2340
2342
  name: y.value ? "expand_less" : "expand_more",
2341
2343
  size: 18
2342
2344
  }, null, 8, ["name"])
2343
2345
  ]),
2344
- y.value ? (b(), l("div", On, [
2346
+ y.value ? (b(), l("div", An, [
2345
2347
  u("button", {
2346
2348
  type: "button",
2347
2349
  class: "docx-tmore__sub-item",
@@ -2400,11 +2402,11 @@ var We = {
2400
2402
  name: "settings",
2401
2403
  size: 18
2402
2404
  }), u("span", null, E(O(m)("tableAdvanced.tableProperties")), 1)])
2403
- ], 8, Zt)]),
2405
+ ], 8, $t)]),
2404
2406
  _: 1
2405
2407
  }, 8, ["open"]));
2406
2408
  }
2407
- }), [["__scopeId", "data-v-5d357bc4"]]), An = /*#__PURE__*/ t(/* @__PURE__ */ p({
2409
+ }), [["__scopeId", "data-v-5d357bc4"]]), Mn = /*#__PURE__*/ t(/* @__PURE__ */ p({
2408
2410
  __name: "TableToolbar",
2409
2411
  props: {
2410
2412
  view: {},
@@ -2416,7 +2418,7 @@ var We = {
2416
2418
  let n = e, r = o(() => {
2417
2419
  n.stateTick;
2418
2420
  let e = n.view;
2419
- return e ? H(e.state) : null;
2421
+ return e ? U(e.state) : null;
2420
2422
  }), i = o(() => !!r.value?.isInTable), s = o(() => {
2421
2423
  n.stateTick;
2422
2424
  let e = n.view;
@@ -2441,7 +2443,7 @@ var We = {
2441
2443
  j([() => n.view, () => n.stateTick], () => {
2442
2444
  let e = n.view;
2443
2445
  if (!e) return;
2444
- let t = H(e.state), r = t.cellBorderColor;
2446
+ let t = U(e.state), r = t.cellBorderColor;
2445
2447
  !r || !t.isInTable || typeof r == "object" && "rgb" in r && typeof r.rgb == "string" && (y.color = { rgb: r.rgb });
2446
2448
  }, { immediate: !0 });
2447
2449
  function x(e, ...t) {
@@ -2527,14 +2529,14 @@ var We = {
2527
2529
  onRowHeight: A
2528
2530
  }), (t, n) => i.value ? (b(), l(a, { key: 0 }, [
2529
2531
  n[0] ||= u("span", { class: "divider" }, null, -1),
2530
- f(Ht, { onChange: S }),
2531
- f(Ut, m({ theme: e.theme ?? null }, p.value, { onChange: C }), null, 16, ["theme"]),
2532
- f(Jt, { onChange: w }),
2533
- f(Yt, {
2532
+ f(Wt, { onChange: S }),
2533
+ f(Gt, m({ theme: e.theme ?? null }, p.value, { onChange: C }), null, 16, ["theme"]),
2534
+ f(Xt, { onChange: w }),
2535
+ f(Zt, {
2534
2536
  theme: e.theme ?? null,
2535
2537
  onChange: T
2536
2538
  }, null, 8, ["theme"]),
2537
- f(kn, {
2539
+ f(jn, {
2538
2540
  "can-split": s.value,
2539
2541
  "can-merge": h.value,
2540
2542
  "row-count": g.value,
@@ -2553,7 +2555,7 @@ var We = {
2553
2555
  ])
2554
2556
  ], 64)) : c("", !0);
2555
2557
  }
2556
- }), [["__scopeId", "data-v-90f8e7a0"]]), jn = { class: "docx-vertical-ruler__ticks" }, Mn = 15840, Nn = 1440, Pn = 1440, Fn = 567, In = /*#__PURE__*/ t(/* @__PURE__ */ p({
2558
+ }), [["__scopeId", "data-v-90f8e7a0"]]), Nn = { class: "docx-vertical-ruler__ticks" }, Pn = 15840, Fn = 1440, In = 1440, Ln = 567, Rn = /*#__PURE__*/ t(/* @__PURE__ */ p({
2557
2559
  __name: "VerticalRuler",
2558
2560
  props: {
2559
2561
  sectionProps: {},
@@ -2568,12 +2570,12 @@ var We = {
2568
2570
  setup(e, { emit: t }) {
2569
2571
  let n = e, r = t, i = S(null), s = S(null);
2570
2572
  function d(e) {
2571
- return R(e) * n.zoom;
2573
+ return z(e) * n.zoom;
2572
2574
  }
2573
2575
  function f(e) {
2574
- return Math.round(L(e / n.zoom));
2576
+ return Math.round(R(e / n.zoom));
2575
2577
  }
2576
- let p = o(() => n.sectionProps?.pageHeight ?? Mn), m = o(() => n.sectionProps?.marginTop ?? Nn), h = o(() => n.sectionProps?.marginBottom ?? Nn), g = o(() => d(p.value)), y = o(() => d(m.value)), x = o(() => d(h.value)), w = o(() => ({
2578
+ let p = o(() => n.sectionProps?.pageHeight ?? Pn), m = o(() => n.sectionProps?.marginTop ?? Fn), h = o(() => n.sectionProps?.marginBottom ?? Fn), g = o(() => d(p.value)), y = o(() => d(m.value)), x = o(() => d(h.value)), w = o(() => ({
2577
2579
  position: "relative",
2578
2580
  width: "20px",
2579
2581
  height: g.value + "px",
@@ -2584,7 +2586,7 @@ var We = {
2584
2586
  })), T = o(() => {
2585
2587
  let e = [];
2586
2588
  if (n.unit === "inch") {
2587
- let t = Pn / 8, n = Math.ceil(p.value / t);
2589
+ let t = In / 8, n = Math.ceil(p.value / t);
2588
2590
  for (let r = 0; r <= n; r++) {
2589
2591
  let n = r * t;
2590
2592
  if (n > p.value) break;
@@ -2605,7 +2607,7 @@ var We = {
2605
2607
  });
2606
2608
  }
2607
2609
  } else {
2608
- let t = Fn / 10, n = Math.ceil(p.value / t);
2610
+ let t = Ln / 10, n = Math.ceil(p.value / t);
2609
2611
  for (let r = 0; r <= n; r++) {
2610
2612
  let n = r * t;
2611
2613
  if (n > p.value) break;
@@ -2671,7 +2673,7 @@ var We = {
2671
2673
  "aria-label": "Vertical ruler",
2672
2674
  "aria-orientation": "vertical"
2673
2675
  }, [
2674
- u("div", jn, [(b(!0), l(a, null, C(T.value, (e, t) => (b(), l(a, { key: t }, [u("div", {
2676
+ u("div", Nn, [(b(!0), l(a, null, C(T.value, (e, t) => (b(), l(a, { key: t }, [u("div", {
2675
2677
  class: "docx-vertical-ruler__tick-line",
2676
2678
  style: _({
2677
2679
  top: e.position + "px",
@@ -2703,10 +2705,10 @@ var We = {
2703
2705
  }), [["__scopeId", "data-v-f7ccbd38"]]);
2704
2706
  //#endregion
2705
2707
  //#region src/utils/comments.ts
2706
- function Ln(e) {
2708
+ function zn(e) {
2707
2709
  return e?.length ? e.flatMap((e) => e.content.filter((e) => e.type === "run").flatMap((e) => "content" in e ? e.content : []).filter((e) => e.type === "text").map((e) => "text" in e ? e.text : "")).join("") : "";
2708
2710
  }
2709
- function Rn(e) {
2711
+ function Bn(e) {
2710
2712
  return e ? new Date(e).toLocaleString(void 0, {
2711
2713
  hour: "numeric",
2712
2714
  minute: "2-digit",
@@ -2714,10 +2716,10 @@ function Rn(e) {
2714
2716
  day: "numeric"
2715
2717
  }) : "";
2716
2718
  }
2717
- function zn(e) {
2719
+ function Vn(e) {
2718
2720
  return e.split(/\s+/).map((e) => e[0]).join("").toUpperCase().slice(0, 2);
2719
2721
  }
2720
- var Bn = [
2722
+ var Hn = [
2721
2723
  "#6DCCB1",
2722
2724
  "#79AAD9",
2723
2725
  "#EE789D",
@@ -2731,28 +2733,28 @@ var Bn = [
2731
2733
  "#E15759",
2732
2734
  "#76B7B2"
2733
2735
  ];
2734
- function Vn(e) {
2736
+ function Un(e) {
2735
2737
  let t = 0;
2736
2738
  for (let n = 0; n < e.length; n++) t = e.charCodeAt(n) + ((t << 5) - t);
2737
- return Bn[Math.abs(t) % Bn.length] ?? "#888888";
2739
+ return Hn[Math.abs(t) % Hn.length] ?? "#888888";
2738
2740
  }
2739
2741
  function $(e, t = 50) {
2740
2742
  return e.length > t ? e.slice(0, t) + "..." : e;
2741
2743
  }
2742
2744
  //#endregion
2743
2745
  //#region src/components/sidebar/Avatar.vue
2744
- var Hn = /* @__PURE__ */ p({
2746
+ var Wn = /* @__PURE__ */ p({
2745
2747
  __name: "Avatar",
2746
2748
  props: {
2747
2749
  name: { default: "U" },
2748
2750
  size: { default: 32 }
2749
2751
  },
2750
2752
  setup(e) {
2751
- let t = e, n = o(() => zn(t.name || "U")), r = o(() => ({
2753
+ let t = e, n = o(() => Vn(t.name || "U")), r = o(() => ({
2752
2754
  width: t.size + "px",
2753
2755
  height: t.size + "px",
2754
2756
  borderRadius: "50%",
2755
- backgroundColor: Vn(t.name || "U"),
2757
+ backgroundColor: Un(t.name || "U"),
2756
2758
  color: "#fff",
2757
2759
  display: "flex",
2758
2760
  alignItems: "center",
@@ -2766,13 +2768,13 @@ var Hn = /* @__PURE__ */ p({
2766
2768
  style: _(r.value)
2767
2769
  }, E(n.value), 5));
2768
2770
  }
2769
- }), Un = {
2771
+ }), Gn = {
2770
2772
  key: 0,
2771
2773
  class: "reply-thread"
2772
- }, Wn = {
2774
+ }, Kn = {
2773
2775
  key: 0,
2774
2776
  class: "reply-thread__more"
2775
- }, Gn = { class: "reply-thread__header" }, Kn = { class: "reply-thread__author-block" }, qn = { class: "reply-thread__author" }, Jn = { class: "reply-thread__date" }, Yn = /*#__PURE__*/ t(/* @__PURE__ */ p({
2777
+ }, qn = { class: "reply-thread__header" }, Jn = { class: "reply-thread__author-block" }, Yn = { class: "reply-thread__author" }, Xn = { class: "reply-thread__date" }, Zn = /*#__PURE__*/ t(/* @__PURE__ */ p({
2776
2778
  __name: "ReplyThread",
2777
2779
  props: {
2778
2780
  replies: {},
@@ -2780,15 +2782,15 @@ var Hn = /* @__PURE__ */ p({
2780
2782
  },
2781
2783
  setup(e) {
2782
2784
  let t = e, n = o(() => t.isExpanded ? t.replies : t.replies.slice(-1)), r = o(() => t.isExpanded ? 0 : Math.max(0, t.replies.length - 1));
2783
- return (t, i) => e.replies.length > 0 ? (b(), l("div", Un, [r.value > 0 ? (b(), l("div", Wn, E(r.value) + " " + E(r.value === 1 ? "reply" : "replies"), 1)) : c("", !0), (b(!0), l(a, null, C(n.value, (t) => (b(), l("div", {
2785
+ return (t, i) => e.replies.length > 0 ? (b(), l("div", Gn, [r.value > 0 ? (b(), l("div", Kn, E(r.value) + " " + E(r.value === 1 ? "reply" : "replies"), 1)) : c("", !0), (b(!0), l(a, null, C(n.value, (t) => (b(), l("div", {
2784
2786
  key: t.id,
2785
2787
  class: g(["reply-thread__item", { "reply-thread__item--expanded": e.isExpanded }])
2786
- }, [u("div", Gn, [f(Hn, {
2788
+ }, [u("div", qn, [f(Wn, {
2787
2789
  name: t.author,
2788
2790
  size: 28
2789
- }, null, 8, ["name"]), u("div", Kn, [u("div", qn, E(t.author || "Unknown"), 1), u("div", Jn, E(O(Rn)(t.date)), 1)])]), u("div", { class: g(["reply-thread__body", { "reply-thread__body--clamp": !e.isExpanded }]) }, E(O(Ln)(t.content)), 3)], 2))), 128))])) : c("", !0);
2791
+ }, null, 8, ["name"]), u("div", Jn, [u("div", Yn, E(t.author || "Unknown"), 1), u("div", Xn, E(O(Bn)(t.date)), 1)])]), u("div", { class: g(["reply-thread__body", { "reply-thread__body--clamp": !e.isExpanded }]) }, E(O(zn)(t.content)), 3)], 2))), 128))])) : c("", !0);
2790
2792
  }
2791
- }), [["__scopeId", "data-v-06331fac"]]), Xn = ["onKeydown"], Zn = { class: "reply-input__actions" }, Qn = ["disabled"], $n = /*#__PURE__*/ t(/* @__PURE__ */ p({
2793
+ }), [["__scopeId", "data-v-06331fac"]]), Qn = ["onKeydown"], $n = { class: "reply-input__actions" }, er = ["disabled"], tr = /*#__PURE__*/ t(/* @__PURE__ */ p({
2792
2794
  __name: "ReplyInput",
2793
2795
  emits: ["submit"],
2794
2796
  setup(e, { emit: t }) {
@@ -2820,14 +2822,14 @@ var Hn = /* @__PURE__ */ p({
2820
2822
  P(F(p, ["prevent"]), ["enter"]),
2821
2823
  P(f, ["esc"])
2822
2824
  ]
2823
- }, null, 40, Xn), [[A, i.value]]), u("div", Zn, [u("button", {
2825
+ }, null, 40, Qn), [[A, i.value]]), u("div", $n, [u("button", {
2824
2826
  class: "reply-input__cancel",
2825
2827
  onClick: F(f, ["stop"])
2826
2828
  }, "Cancel"), u("button", {
2827
2829
  class: g(["reply-input__submit", { "reply-input__submit--active": c.value }]),
2828
2830
  disabled: !c.value,
2829
2831
  onClick: F(p, ["stop"])
2830
- }, " Reply ", 10, Qn)])], 64)) : (b(), l("input", {
2832
+ }, " Reply ", 10, er)])], 64)) : (b(), l("input", {
2831
2833
  key: 0,
2832
2834
  readonly: "",
2833
2835
  placeholder: "Reply",
@@ -2836,13 +2838,13 @@ var Hn = /* @__PURE__ */ p({
2836
2838
  onClick: F(d, ["stop"])
2837
2839
  }, null, 32))], 32));
2838
2840
  }
2839
- }), [["__scopeId", "data-v-fea8646c"]]), er = ["data-comment-id"], tr = {
2841
+ }), [["__scopeId", "data-v-fea8646c"]]), nr = ["data-comment-id"], rr = {
2840
2842
  key: 0,
2841
2843
  class: "comment-card__resolved"
2842
- }, nr = { class: "comment-card__head" }, rr = { class: "comment-card__author-block" }, ir = { class: "comment-card__author" }, ar = { class: "comment-card__date" }, or = {
2844
+ }, ir = { class: "comment-card__head" }, ar = { class: "comment-card__author-block" }, or = { class: "comment-card__author" }, sr = { class: "comment-card__date" }, cr = {
2843
2845
  key: 0,
2844
2846
  class: "comment-card__actions"
2845
- }, sr = ["title"], cr = { class: "comment-card__body" }, lr = /*#__PURE__*/ t(/* @__PURE__ */ p({
2847
+ }, lr = ["title"], ur = { class: "comment-card__body" }, dr = /*#__PURE__*/ t(/* @__PURE__ */ p({
2846
2848
  __name: "CommentCard",
2847
2849
  props: {
2848
2850
  comment: {},
@@ -2867,17 +2869,17 @@ var Hn = /* @__PURE__ */ p({
2867
2869
  onClick: r[5] ||= (e) => t.$emit("click"),
2868
2870
  onMousedown: r[6] ||= F(() => {}, ["stop"])
2869
2871
  }, [
2870
- e.comment.done ? (b(), l("div", tr, [f(n, {
2872
+ e.comment.done ? (b(), l("div", rr, [f(n, {
2871
2873
  name: "check",
2872
2874
  size: 12
2873
2875
  }), r[7] ||= u("span", null, "Resolved", -1)])) : c("", !0),
2874
- u("div", nr, [
2875
- f(Hn, {
2876
+ u("div", ir, [
2877
+ f(Wn, {
2876
2878
  name: e.comment.author,
2877
2879
  size: 32
2878
2880
  }, null, 8, ["name"]),
2879
- u("div", rr, [u("div", ir, E(e.comment.author || "Unknown"), 1), u("div", ar, E(O(Rn)(e.comment.date)), 1)]),
2880
- e.expanded ? (b(), l("div", or, [
2881
+ u("div", ar, [u("div", or, E(e.comment.author || "Unknown"), 1), u("div", sr, E(O(Bn)(e.comment.date)), 1)]),
2882
+ e.expanded ? (b(), l("div", cr, [
2881
2883
  u("button", {
2882
2884
  class: "comment-card__icon-btn",
2883
2885
  title: e.comment.done ? "Reopen" : "Resolve",
@@ -2885,7 +2887,7 @@ var Hn = /* @__PURE__ */ p({
2885
2887
  }, [f(n, {
2886
2888
  name: e.comment.done ? "undo" : "check",
2887
2889
  size: 20
2888
- }, null, 8, ["name"])], 8, sr),
2890
+ }, null, 8, ["name"])], 8, lr),
2889
2891
  u("button", {
2890
2892
  class: "comment-card__icon-btn",
2891
2893
  title: "More options",
@@ -2905,18 +2907,18 @@ var Hn = /* @__PURE__ */ p({
2905
2907
  }, "Delete")], 32)) : c("", !0)
2906
2908
  ])) : c("", !0)
2907
2909
  ]),
2908
- u("div", cr, E(O(Ln)(e.comment.content)), 1),
2909
- f(Yn, {
2910
+ u("div", ur, E(O(zn)(e.comment.content)), 1),
2911
+ f(Zn, {
2910
2912
  replies: e.replies,
2911
2913
  "is-expanded": e.expanded
2912
2914
  }, null, 8, ["replies", "is-expanded"]),
2913
- e.expanded && !e.comment.done ? (b(), s($n, {
2915
+ e.expanded && !e.comment.done ? (b(), s(tr, {
2914
2916
  key: 1,
2915
2917
  onSubmit: r[4] ||= (n) => t.$emit("reply", e.comment.id, n)
2916
2918
  })) : c("", !0)
2917
- ], 42, er));
2919
+ ], 42, nr));
2918
2920
  }
2919
- }), [["__scopeId", "data-v-7a3ee7ac"]]), ur = ["data-comment-id"], dr = /*#__PURE__*/ t(/* @__PURE__ */ p({
2921
+ }), [["__scopeId", "data-v-7a3ee7ac"]]), fr = ["data-comment-id"], pr = /*#__PURE__*/ t(/* @__PURE__ */ p({
2920
2922
  __name: "ResolvedCommentMarker",
2921
2923
  props: { comment: {} },
2922
2924
  emits: ["toggle-expand"],
@@ -2930,45 +2932,45 @@ var Hn = /* @__PURE__ */ p({
2930
2932
  }, [f(n, {
2931
2933
  name: "chat_bubble_check",
2932
2934
  size: 20
2933
- })], 40, ur));
2935
+ })], 40, fr));
2934
2936
  }
2935
- }), [["__scopeId", "data-v-d0c228f6"]]), fr = { class: "tc-card__head" }, pr = { class: "tc-card__author-block" }, mr = { class: "tc-card__author" }, hr = {
2937
+ }), [["__scopeId", "data-v-d0c228f6"]]), mr = { class: "tc-card__head" }, hr = { class: "tc-card__author-block" }, gr = { class: "tc-card__author" }, _r = {
2936
2938
  key: 0,
2937
2939
  class: "tc-card__date"
2938
- }, gr = {
2940
+ }, vr = {
2939
2941
  key: 0,
2940
2942
  class: "tc-card__actions"
2941
- }, _r = ["title"], vr = ["title"], yr = { class: "tc-card__body" }, br = { class: "tc-card__deleted" }, xr = { class: "tc-card__inserted" }, Sr = { class: "tc-card__inserted" }, Cr = { class: "tc-card__deleted" }, wr = { class: "tc-card__changed" }, Tr = {
2943
+ }, yr = ["title"], br = ["title"], xr = { class: "tc-card__body" }, Sr = { class: "tc-card__deleted" }, Cr = { class: "tc-card__inserted" }, wr = { class: "tc-card__inserted" }, Tr = { class: "tc-card__deleted" }, Er = { class: "tc-card__changed" }, Dr = {
2942
2944
  key: 4,
2943
2945
  class: "tc-card__inserted"
2944
- }, Er = {
2946
+ }, Or = {
2945
2947
  key: 5,
2946
2948
  class: "tc-card__deleted"
2947
- }, Dr = {
2949
+ }, kr = {
2948
2950
  key: 6,
2949
2951
  class: "tc-card__inserted"
2950
- }, Or = {
2952
+ }, Ar = {
2951
2953
  key: 7,
2952
2954
  class: "tc-card__deleted"
2953
- }, kr = {
2955
+ }, jr = {
2954
2956
  key: 8,
2955
2957
  class: "tc-card__changed"
2956
- }, Ar = {
2958
+ }, Mr = {
2957
2959
  key: 9,
2958
2960
  class: "tc-card__changed"
2959
- }, jr = {
2961
+ }, Nr = {
2960
2962
  key: 10,
2961
2963
  class: "tc-card__changed"
2962
- }, Mr = {
2964
+ }, Pr = {
2963
2965
  key: 11,
2964
2966
  class: "tc-card__changed"
2965
- }, Nr = {
2967
+ }, Fr = {
2966
2968
  key: 12,
2967
2969
  class: "tc-card__inserted"
2968
- }, Pr = {
2970
+ }, Ir = {
2969
2971
  key: 13,
2970
2972
  class: "tc-card__deleted"
2971
- }, Fr = /*#__PURE__*/ t(/* @__PURE__ */ p({
2973
+ }, Lr = /*#__PURE__*/ t(/* @__PURE__ */ p({
2972
2974
  __name: "TrackedChangeCard",
2973
2975
  props: {
2974
2976
  change: {},
@@ -3000,45 +3002,45 @@ var Hn = /* @__PURE__ */ p({
3000
3002
  onClick: r[1] ||= (e) => t.$emit("click"),
3001
3003
  onMousedown: r[2] ||= F(() => {}, ["stop"])
3002
3004
  }, [
3003
- u("div", fr, [
3004
- f(Hn, {
3005
+ u("div", mr, [
3006
+ f(Wn, {
3005
3007
  name: h.value,
3006
3008
  size: 32
3007
3009
  }, null, 8, ["name"]),
3008
- u("div", pr, [u("div", mr, E(h.value), 1), e.change.date ? (b(), l("div", hr, E(O(Rn)(e.change.date)), 1)) : c("", !0)]),
3009
- e.expanded ? (b(), l("div", gr, [u("button", {
3010
+ u("div", hr, [u("div", gr, E(h.value), 1), e.change.date ? (b(), l("div", _r, E(O(Bn)(e.change.date)), 1)) : c("", !0)]),
3011
+ e.expanded ? (b(), l("div", vr, [u("button", {
3010
3012
  class: "tc-card__icon-btn",
3011
3013
  title: O(i)("acceptChange"),
3012
3014
  onClick: F(v, ["stop"])
3013
3015
  }, [f(n, {
3014
3016
  name: "check",
3015
3017
  size: 20
3016
- })], 8, _r), u("button", {
3018
+ })], 8, yr), u("button", {
3017
3019
  class: "tc-card__icon-btn",
3018
3020
  title: O(i)("rejectChange"),
3019
3021
  onClick: F(y, ["stop"])
3020
3022
  }, [f(n, {
3021
3023
  name: "close",
3022
3024
  size: 20
3023
- })], 8, vr)])) : c("", !0)
3025
+ })], 8, br)])) : c("", !0)
3024
3026
  ]),
3025
- u("div", yr, [e.change.type === "replacement" ? (b(), l(a, { key: 0 }, [
3027
+ u("div", xr, [e.change.type === "replacement" ? (b(), l(a, { key: 0 }, [
3026
3028
  d(E(O(i)("trackedChanges.replaced")) + " ", 1),
3027
- u("span", br, "\"" + E(O($)(e.change.deletedText || "")) + "\"", 1),
3029
+ u("span", Sr, "\"" + E(O($)(e.change.deletedText || "")) + "\"", 1),
3028
3030
  d(" " + E(O(i)("trackedChanges.with")) + " ", 1),
3029
- u("span", xr, "\"" + E(O($)(e.change.text)) + "\"", 1)
3030
- ], 64)) : e.change.type === "paragraphMarkInsertion" ? (b(), l(a, { key: 1 }, [d(E(O(i)("revisions.paragraphMarkInserted")), 1), e.change.text ? (b(), l(a, { key: 0 }, [r[3] ||= d(": ", -1), u("span", Sr, "\"" + E(O($)(e.change.text)) + "\"", 1)], 64)) : c("", !0)], 64)) : e.change.type === "paragraphMarkDeletion" ? (b(), l(a, { key: 2 }, [d(E(O(i)("revisions.paragraphMarkDeleted")), 1), e.change.text ? (b(), l(a, { key: 0 }, [r[4] ||= d(": ", -1), u("span", Cr, "\"" + E(O($)(e.change.text)) + "\"", 1)], 64)) : c("", !0)], 64)) : e.change.type === "paragraphPropertiesChanged" ? (b(), l(a, { key: 3 }, [d(E(O(i)("revisions.paragraphPropertiesChanged")), 1), e.change.text ? (b(), l(a, { key: 0 }, [r[5] ||= d(": ", -1), u("span", wr, "\"" + E(O($)(e.change.text)) + "\"", 1)], 64)) : c("", !0)], 64)) : e.change.type === "rowInserted" ? (b(), l("span", Tr, E(O(i)("revisions.rowInserted")), 1)) : e.change.type === "rowDeleted" ? (b(), l("span", Er, E(O(i)("revisions.rowDeleted")), 1)) : e.change.type === "cellInserted" ? (b(), l("span", Dr, E(O(i)("revisions.cellInserted")), 1)) : e.change.type === "cellDeleted" ? (b(), l("span", Or, E(O(i)("revisions.cellDeleted")), 1)) : e.change.type === "cellMerged" ? (b(), l("span", kr, E(O(i)("revisions.cellMerged")), 1)) : e.change.type === "rowPropertiesChanged" ? (b(), l("span", Ar, E(O(i)("revisions.rowPropertiesChanged")), 1)) : e.change.type === "cellPropertiesChanged" ? (b(), l("span", jr, E(O(i)("revisions.cellPropertiesChanged")), 1)) : e.change.type === "tablePropertiesChanged" ? (b(), l("span", Mr, E(O(i)("revisions.tablePropertiesChanged")), 1)) : e.change.type === "tableInserted" ? (b(), l("span", Nr, E(O(i)("revisions.tableInserted")), 1)) : e.change.type === "tableDeleted" ? (b(), l("span", Pr, E(O(i)("revisions.tableDeleted")), 1)) : (b(), l(a, { key: 14 }, [d(E(e.change.type === "insertion" ? O(i)("inserted") : O(i)("deleted")) + " ", 1), u("span", { class: g(e.change.type === "insertion" ? "tc-card__inserted" : "tc-card__deleted") }, " \"" + E(O($)(e.change.text)) + "\" ", 3)], 64))]),
3031
- f(Yn, {
3031
+ u("span", Cr, "\"" + E(O($)(e.change.text)) + "\"", 1)
3032
+ ], 64)) : e.change.type === "paragraphMarkInsertion" ? (b(), l(a, { key: 1 }, [d(E(O(i)("revisions.paragraphMarkInserted")), 1), e.change.text ? (b(), l(a, { key: 0 }, [r[3] ||= d(": ", -1), u("span", wr, "\"" + E(O($)(e.change.text)) + "\"", 1)], 64)) : c("", !0)], 64)) : e.change.type === "paragraphMarkDeletion" ? (b(), l(a, { key: 2 }, [d(E(O(i)("revisions.paragraphMarkDeleted")), 1), e.change.text ? (b(), l(a, { key: 0 }, [r[4] ||= d(": ", -1), u("span", Tr, "\"" + E(O($)(e.change.text)) + "\"", 1)], 64)) : c("", !0)], 64)) : e.change.type === "paragraphPropertiesChanged" ? (b(), l(a, { key: 3 }, [d(E(O(i)("revisions.paragraphPropertiesChanged")), 1), e.change.text ? (b(), l(a, { key: 0 }, [r[5] ||= d(": ", -1), u("span", Er, "\"" + E(O($)(e.change.text)) + "\"", 1)], 64)) : c("", !0)], 64)) : e.change.type === "rowInserted" ? (b(), l("span", Dr, E(O(i)("revisions.rowInserted")), 1)) : e.change.type === "rowDeleted" ? (b(), l("span", Or, E(O(i)("revisions.rowDeleted")), 1)) : e.change.type === "cellInserted" ? (b(), l("span", kr, E(O(i)("revisions.cellInserted")), 1)) : e.change.type === "cellDeleted" ? (b(), l("span", Ar, E(O(i)("revisions.cellDeleted")), 1)) : e.change.type === "cellMerged" ? (b(), l("span", jr, E(O(i)("revisions.cellMerged")), 1)) : e.change.type === "rowPropertiesChanged" ? (b(), l("span", Mr, E(O(i)("revisions.rowPropertiesChanged")), 1)) : e.change.type === "cellPropertiesChanged" ? (b(), l("span", Nr, E(O(i)("revisions.cellPropertiesChanged")), 1)) : e.change.type === "tablePropertiesChanged" ? (b(), l("span", Pr, E(O(i)("revisions.tablePropertiesChanged")), 1)) : e.change.type === "tableInserted" ? (b(), l("span", Fr, E(O(i)("revisions.tableInserted")), 1)) : e.change.type === "tableDeleted" ? (b(), l("span", Ir, E(O(i)("revisions.tableDeleted")), 1)) : (b(), l(a, { key: 14 }, [d(E(e.change.type === "insertion" ? O(i)("inserted") : O(i)("deleted")) + " ", 1), u("span", { class: g(e.change.type === "insertion" ? "tc-card__inserted" : "tc-card__deleted") }, " \"" + E(O($)(e.change.text)) + "\" ", 3)], 64))]),
3033
+ f(Zn, {
3032
3034
  replies: e.replies,
3033
3035
  "is-expanded": e.expanded
3034
3036
  }, null, 8, ["replies", "is-expanded"]),
3035
- e.expanded ? (b(), s($n, {
3037
+ e.expanded ? (b(), s(tr, {
3036
3038
  key: 0,
3037
3039
  onSubmit: r[0] ||= (n) => t.$emit("reply", e.change.revisionId, n)
3038
3040
  })) : c("", !0)
3039
3041
  ], 34));
3040
3042
  }
3041
- }), [["__scopeId", "data-v-510d39b5"]]), Ir = ["onKeydown"], Lr = { class: "add-comment-card__actions" }, Rr = ["disabled"], zr = /*#__PURE__*/ t(/* @__PURE__ */ p({
3043
+ }), [["__scopeId", "data-v-510d39b5"]]), Rr = ["onKeydown"], zr = { class: "add-comment-card__actions" }, Br = ["disabled"], Vr = /*#__PURE__*/ t(/* @__PURE__ */ p({
3042
3044
  __name: "AddCommentCard",
3043
3045
  emits: ["submit", "cancel"],
3044
3046
  setup(e, { emit: t }) {
@@ -3067,53 +3069,19 @@ var Hn = /* @__PURE__ */ p({
3067
3069
  P(F(s, ["exact", "prevent"]), ["enter"]),
3068
3070
  P(c, ["esc"])
3069
3071
  ]
3070
- }, null, 40, Ir), [[A, r.value]]), u("div", Lr, [u("button", {
3072
+ }, null, 40, Rr), [[A, r.value]]), u("div", zr, [u("button", {
3071
3073
  class: "add-comment-card__cancel",
3072
3074
  onClick: c
3073
3075
  }, "Cancel"), u("button", {
3074
3076
  class: g(["add-comment-card__submit", { "add-comment-card__submit--active": a.value }]),
3075
3077
  disabled: !a.value,
3076
3078
  onClick: s
3077
- }, " Comment ", 10, Rr)])], 32));
3079
+ }, " Comment ", 10, Br)])], 32));
3078
3080
  }
3079
3081
  }), [["__scopeId", "data-v-2939f9cd"]]);
3080
3082
  //#endregion
3081
- //#region src/components/sidebar/resolveItemPositions.ts
3082
- function Br(e, t, n, r, i) {
3083
- if (e.length === 0) return [];
3084
- let a = [];
3085
- for (let r of e) {
3086
- let e;
3087
- if (r.fixedY != null && (e = r.fixedY * n), e == null && r.anchorKey) {
3088
- let i = t.get(r.anchorKey);
3089
- i != null && (e = i * n);
3090
- }
3091
- if (e == null) {
3092
- let t = i.get(r.id);
3093
- t != null && (e = t);
3094
- }
3095
- e != null && (a.push({
3096
- item: r,
3097
- targetY: e
3098
- }), i.set(r.id, e));
3099
- }
3100
- a.sort((e, t) => {
3101
- let n = e.targetY - t.targetY;
3102
- return n === 0 ? (e.item.priority ?? 0) - (t.item.priority ?? 0) : n;
3103
- });
3104
- let o = [], s = 0;
3105
- for (let e of a) {
3106
- let t = r.get(e.item.id) ?? e.item.estimatedHeight ?? 80, n = Math.max(e.targetY, s + 8);
3107
- o.push({
3108
- item: e.item,
3109
- y: n
3110
- }), s = n + t;
3111
- }
3112
- return o;
3113
- }
3114
- //#endregion
3115
3083
  //#region src/composables/useCommentSidebarItems.ts
3116
- function Vr({ comments: e, trackedChanges: t, showResolved: n, isAddingComment: r, addCommentYPosition: i }) {
3084
+ function Hr({ comments: e, trackedChanges: t, showResolved: n, isAddingComment: r, addCommentYPosition: i }) {
3117
3085
  return o(() => {
3118
3086
  let a = [];
3119
3087
  r?.value && i?.value != null && a.push({
@@ -3156,7 +3124,7 @@ function Vr({ comments: e, trackedChanges: t, showResolved: n, isAddingComment:
3156
3124
  }
3157
3125
  //#endregion
3158
3126
  //#region src/components/UnifiedSidebar.vue?vue&type=script&setup=true&lang.ts
3159
- var Hr = ["data-card-id"], Ur = 16, Wr = /*#__PURE__*/ t(/* @__PURE__ */ p({
3127
+ var Ur = ["data-card-id"], Wr = 16, Gr = /*#__PURE__*/ t(/* @__PURE__ */ p({
3160
3128
  __name: "UnifiedSidebar",
3161
3129
  props: {
3162
3130
  isOpen: { type: Boolean },
@@ -3196,7 +3164,7 @@ var Hr = ["data-card-id"], Ur = 16, Wr = /*#__PURE__*/ t(/* @__PURE__ */ p({
3196
3164
  let t = e.target;
3197
3165
  t instanceof HTMLElement && t.closest(".unified-sidebar__card-slot") || f.value !== null && (i.value = null, r("update:activeItemId", null));
3198
3166
  }
3199
- let h = Vr({
3167
+ let h = Hr({
3200
3168
  comments: D(n, "comments"),
3201
3169
  trackedChanges: D(n, "trackedChanges"),
3202
3170
  showResolved: o(() => n.showResolved ?? !1),
@@ -3257,14 +3225,21 @@ var Hr = ["data-card-id"], Ur = 16, Wr = /*#__PURE__*/ t(/* @__PURE__ */ p({
3257
3225
  t && l.set(t, e.offsetHeight);
3258
3226
  }
3259
3227
  let d = /* @__PURE__ */ new Map();
3260
- for (let { item: e, y: n } of Br(t, s, 1, l, w)) d.set(e.id, n);
3228
+ for (let { item: n, y: r } of W({
3229
+ items: t,
3230
+ anchorPositions: s,
3231
+ renderedDomContext: L(e),
3232
+ zoom: 1,
3233
+ cardHeights: l,
3234
+ lastKnown: w
3235
+ })) d.set(n.id, r);
3261
3236
  x.value = d, P();
3262
3237
  }
3263
3238
  let I = o(() => {
3264
3239
  let e = 0;
3265
3240
  for (let t of x.value.values()) e = Math.max(e, t);
3266
3241
  return e + 200;
3267
- }), L = o(() => {
3242
+ }), R = o(() => {
3268
3243
  let e = f.value;
3269
3244
  if (!e) return "";
3270
3245
  if (e.startsWith("comment-")) return `.paged-editor__pages [data-comment-id="${e.slice(8)}"] { background-color: rgba(255, 212, 0, 0.35) !important; border-bottom: 2px solid rgba(255, 212, 0, 0.7) !important; }`;
@@ -3276,8 +3251,8 @@ var Hr = ["data-card-id"], Ur = 16, Wr = /*#__PURE__*/ t(/* @__PURE__ */ p({
3276
3251
  `;
3277
3252
  }
3278
3253
  return "";
3279
- }), R = o(() => {
3280
- let e = n.pageWidthPx / 2 + Ur - 176, t = x.value.size > 0 || h.value.length === 0;
3254
+ }), z = o(() => {
3255
+ let e = n.pageWidthPx / 2 + Wr - 176, t = x.value.size > 0 || h.value.length === 0;
3281
3256
  return {
3282
3257
  position: "absolute",
3283
3258
  top: "0",
@@ -3286,7 +3261,7 @@ var Hr = ["data-card-id"], Ur = 16, Wr = /*#__PURE__*/ t(/* @__PURE__ */ p({
3286
3261
  opacity: +!!t
3287
3262
  };
3288
3263
  });
3289
- function z(e) {
3264
+ function B(e) {
3290
3265
  let t = x.value.get(e);
3291
3266
  return t == null ? {
3292
3267
  position: "static",
@@ -3299,10 +3274,10 @@ var Hr = ["data-card-id"], Ur = 16, Wr = /*#__PURE__*/ t(/* @__PURE__ */ p({
3299
3274
  transition: "top 0.15s ease"
3300
3275
  };
3301
3276
  }
3302
- let B = !1;
3303
- function V() {
3304
- B || (B = !0, requestAnimationFrame(() => {
3305
- B = !1, F();
3277
+ let V = !1;
3278
+ function H() {
3279
+ V || (V = !0, requestAnimationFrame(() => {
3280
+ V = !1, F();
3306
3281
  }));
3307
3282
  }
3308
3283
  j(() => [
@@ -3313,7 +3288,7 @@ var Hr = ["data-card-id"], Ur = 16, Wr = /*#__PURE__*/ t(/* @__PURE__ */ p({
3313
3288
  n.zoom,
3314
3289
  n.isAddingComment,
3315
3290
  n.addCommentYPosition
3316
- ], () => V(), { immediate: !0 });
3291
+ ], () => H(), { immediate: !0 });
3317
3292
  function ee(e) {
3318
3293
  let t = e?.parentElement ?? null;
3319
3294
  for (; t;) {
@@ -3323,25 +3298,25 @@ var Hr = ["data-card-id"], Ur = 16, Wr = /*#__PURE__*/ t(/* @__PURE__ */ p({
3323
3298
  }
3324
3299
  return null;
3325
3300
  }
3326
- let H = null;
3327
- function U() {
3328
- H && H.removeEventListener("scroll", V), H = ee(n.pagesContainer), H && H.addEventListener("scroll", V, { passive: !0 });
3301
+ let U = null;
3302
+ function G() {
3303
+ U && U.removeEventListener("scroll", H), U = ee(n.pagesContainer), U && U.addEventListener("scroll", H, { passive: !0 });
3329
3304
  }
3330
3305
  return y(() => {
3331
- A = new ResizeObserver(() => V()), V(), n.pagesContainer && (k = new ResizeObserver(() => V()), k.observe(n.pagesContainer), U());
3306
+ A = new ResizeObserver(() => H()), H(), n.pagesContainer && (k = new ResizeObserver(() => H()), k.observe(n.pagesContainer), G());
3332
3307
  }), j(() => n.pagesContainer, (e) => {
3333
- k?.disconnect(), k = null, e && (k = new ResizeObserver(() => V()), k.observe(e), U());
3308
+ k?.disconnect(), k = null, e && (k = new ResizeObserver(() => H()), k.observe(e), G());
3334
3309
  }), v(() => {
3335
- k?.disconnect(), A?.disconnect(), H && H.removeEventListener("scroll", V);
3336
- }), (t, n) => (b(), l(a, null, [L.value ? (b(), s(T("style"), { key: 0 }, {
3337
- default: M(() => [d(E(L.value), 1)]),
3310
+ k?.disconnect(), A?.disconnect(), U && U.removeEventListener("scroll", H);
3311
+ }), (t, n) => (b(), l(a, null, [R.value ? (b(), s(T("style"), { key: 0 }, {
3312
+ default: M(() => [d(E(R.value), 1)]),
3338
3313
  _: 1
3339
3314
  })) : c("", !0), e.isOpen ? (b(), l("aside", {
3340
3315
  key: 1,
3341
3316
  ref_key: "rootRef",
3342
3317
  ref: g,
3343
3318
  class: "unified-sidebar",
3344
- style: _(R.value),
3319
+ style: _(z.value),
3345
3320
  onMousedown: m
3346
3321
  }, [u("div", {
3347
3322
  class: "unified-sidebar__inner",
@@ -3350,16 +3325,16 @@ var Hr = ["data-card-id"], Ur = 16, Wr = /*#__PURE__*/ t(/* @__PURE__ */ p({
3350
3325
  key: e.id,
3351
3326
  class: "unified-sidebar__card-slot",
3352
3327
  "data-card-id": e.id,
3353
- style: _(z(e.id))
3354
- }, [e.kind === "add-comment" ? (b(), s(zr, {
3328
+ style: _(B(e.id))
3329
+ }, [e.kind === "add-comment" ? (b(), s(Vr, {
3355
3330
  key: 0,
3356
3331
  onSubmit: n[0] ||= (e) => t.$emit("add-comment", e),
3357
3332
  onCancel: n[1] ||= (e) => t.$emit("cancel-add-comment")
3358
- })) : e.kind === "comment" && e.comment.done && f.value !== e.id ? (b(), s(dr, {
3333
+ })) : e.kind === "comment" && e.comment.done && f.value !== e.id ? (b(), s(pr, {
3359
3334
  key: 1,
3360
3335
  comment: e.comment,
3361
3336
  onToggleExpand: (t) => p(e.id)
3362
- }, null, 8, ["comment", "onToggleExpand"])) : e.kind === "comment" ? (b(), s(lr, {
3337
+ }, null, 8, ["comment", "onToggleExpand"])) : e.kind === "comment" ? (b(), s(dr, {
3363
3338
  key: 2,
3364
3339
  comment: e.comment,
3365
3340
  replies: e.replies,
@@ -3374,7 +3349,7 @@ var Hr = ["data-card-id"], Ur = 16, Wr = /*#__PURE__*/ t(/* @__PURE__ */ p({
3374
3349
  "replies",
3375
3350
  "expanded",
3376
3351
  "onClick"
3377
- ])) : e.kind === "tracked-change" ? (b(), s(Fr, {
3352
+ ])) : e.kind === "tracked-change" ? (b(), s(Lr, {
3378
3353
  key: 3,
3379
3354
  change: e.change,
3380
3355
  replies: e.replies ?? [],
@@ -3390,9 +3365,9 @@ var Hr = ["data-card-id"], Ur = 16, Wr = /*#__PURE__*/ t(/* @__PURE__ */ p({
3390
3365
  "replies",
3391
3366
  "expanded",
3392
3367
  "onClick"
3393
- ])) : c("", !0)], 12, Hr))), 128))], 4)], 36)) : c("", !0)], 64));
3368
+ ])) : c("", !0)], 12, Ur))), 128))], 4)], 36)) : c("", !0)], 64));
3394
3369
  }
3395
- }), [["__scopeId", "data-v-fbafe53a"]]), Gr = /*#__PURE__*/ t(/* @__PURE__ */ p({
3370
+ }), [["__scopeId", "data-v-e91a4f24"]]), Kr = /*#__PURE__*/ t(/* @__PURE__ */ p({
3396
3371
  __name: "StylePicker",
3397
3372
  props: {
3398
3373
  value: {},
@@ -3451,12 +3426,12 @@ var Hr = ["data-card-id"], Ur = 16, Wr = /*#__PURE__*/ t(/* @__PURE__ */ p({
3451
3426
  "class"
3452
3427
  ]));
3453
3428
  }
3454
- }), [["__scopeId", "data-v-06469e2c"]]), Kr = [
3429
+ }), [["__scopeId", "data-v-06469e2c"]]), qr = [
3455
3430
  "disabled",
3456
3431
  "title",
3457
3432
  "aria-expanded",
3458
3433
  "onClick"
3459
- ], qr = { class: "docx-align__panel" }, Jr = ["title", "onClick"], Yr = /*#__PURE__*/ t(/* @__PURE__ */ p({
3434
+ ], Jr = { class: "docx-align__panel" }, Yr = ["title", "onClick"], Xr = /*#__PURE__*/ t(/* @__PURE__ */ p({
3460
3435
  __name: "AlignmentButtons",
3461
3436
  props: {
3462
3437
  value: { default: "left" },
@@ -3515,8 +3490,8 @@ var Hr = ["data-card-id"], Ur = 16, Wr = /*#__PURE__*/ t(/* @__PURE__ */ p({
3515
3490
  }, null, 8, ["name"]), f(n, {
3516
3491
  name: "arrow_drop_down",
3517
3492
  size: 14
3518
- })], 10, Kr)]),
3519
- panel: M(() => [u("div", qr, [(b(), l(a, null, C(m, (t) => u("button", {
3493
+ })], 10, qr)]),
3494
+ panel: M(() => [u("div", Jr, [(b(), l(a, null, C(m, (t) => u("button", {
3520
3495
  key: t.value,
3521
3496
  type: "button",
3522
3497
  class: g(["docx-align__option", { "docx-align__option--active": e.value === t.value }]),
@@ -3525,11 +3500,11 @@ var Hr = ["data-card-id"], Ur = 16, Wr = /*#__PURE__*/ t(/* @__PURE__ */ p({
3525
3500
  }, [f(n, {
3526
3501
  name: t.icon,
3527
3502
  size: 20
3528
- }, null, 8, ["name"])], 10, Jr)), 64))])]),
3503
+ }, null, 8, ["name"])], 10, Yr)), 64))])]),
3529
3504
  _: 1
3530
3505
  }, 8, ["open"]));
3531
3506
  }
3532
- }), [["__scopeId", "data-v-088792b0"]]), Xr = { class: "docx-list-btns" }, Zr = ["disabled"], Qr = ["disabled"], $r = ["disabled"], ei = ["disabled"], ti = /*#__PURE__*/ t(/* @__PURE__ */ p({
3507
+ }), [["__scopeId", "data-v-088792b0"]]), Zr = { class: "docx-list-btns" }, Qr = ["disabled"], $r = ["disabled"], ei = ["disabled"], ti = ["disabled"], ni = /*#__PURE__*/ t(/* @__PURE__ */ p({
3533
3508
  __name: "ListButtons",
3534
3509
  props: {
3535
3510
  listState: {},
@@ -3553,7 +3528,7 @@ var Hr = ["data-card-id"], Ur = 16, Wr = /*#__PURE__*/ t(/* @__PURE__ */ p({
3553
3528
  "outdent"
3554
3529
  ],
3555
3530
  setup(e) {
3556
- return (t, r) => (b(), l("span", Xr, [
3531
+ return (t, r) => (b(), l("span", Zr, [
3557
3532
  u("button", {
3558
3533
  type: "button",
3559
3534
  class: g(["docx-list-btns__btn", { "docx-list-btns__btn--active": e.listState?.isInList && e.listState?.type === "bullet" }]),
@@ -3563,7 +3538,7 @@ var Hr = ["data-card-id"], Ur = 16, Wr = /*#__PURE__*/ t(/* @__PURE__ */ p({
3563
3538
  }, [f(n, {
3564
3539
  name: "format_list_bulleted",
3565
3540
  size: 20
3566
- })], 10, Zr),
3541
+ })], 10, Qr),
3567
3542
  u("button", {
3568
3543
  type: "button",
3569
3544
  class: g(["docx-list-btns__btn", { "docx-list-btns__btn--active": e.listState?.isInList && e.listState?.type === "numbered" }]),
@@ -3573,7 +3548,7 @@ var Hr = ["data-card-id"], Ur = 16, Wr = /*#__PURE__*/ t(/* @__PURE__ */ p({
3573
3548
  }, [f(n, {
3574
3549
  name: "format_list_numbered",
3575
3550
  size: 20
3576
- })], 10, Qr),
3551
+ })], 10, $r),
3577
3552
  e.showIndentButtons ? (b(), l(a, { key: 0 }, [u("button", {
3578
3553
  type: "button",
3579
3554
  class: "docx-list-btns__btn",
@@ -3583,7 +3558,7 @@ var Hr = ["data-card-id"], Ur = 16, Wr = /*#__PURE__*/ t(/* @__PURE__ */ p({
3583
3558
  }, [f(n, {
3584
3559
  name: "format_indent_decrease",
3585
3560
  size: 20
3586
- })], 8, $r), u("button", {
3561
+ })], 8, ei), u("button", {
3587
3562
  type: "button",
3588
3563
  class: "docx-list-btns__btn",
3589
3564
  disabled: e.disabled,
@@ -3592,9 +3567,9 @@ var Hr = ["data-card-id"], Ur = 16, Wr = /*#__PURE__*/ t(/* @__PURE__ */ p({
3592
3567
  }, [f(n, {
3593
3568
  name: "format_indent_increase",
3594
3569
  size: 20
3595
- })], 8, ei)], 64)) : c("", !0)
3570
+ })], 8, ti)], 64)) : c("", !0)
3596
3571
  ]));
3597
3572
  }
3598
3573
  }), [["__scopeId", "data-v-82fa229d"]]);
3599
3574
  //#endregion
3600
- export { le as C, te as D, q as E, ue as S, Y as T, Ht as _, zr as a, ve as b, lr as c, In as d, An as f, Ut as g, Jt as h, Wr as i, $n as l, Yt as m, Yr as n, Fr as o, kn as p, Gr as r, dr as s, ti as t, Yn as u, Rt as v, oe as w, de as x, Dt as y };
3575
+ export { ue as C, K as D, te as E, de as S, ie as T, Wt as _, Vr as a, be as b, dr as c, Rn as d, Mn as f, Gt as g, Xt as h, Gr as i, tr as l, Zt as m, Xr as n, Lr as o, jn as p, Kr as r, pr as s, ni as t, Zn as u, Bt as v, X as w, fe as x, kt as y };