@eigenpal/docx-editor-vue 1.4.0 → 1.6.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 (42) hide show
  1. package/dist/KeyboardShortcutsDialog-Dohz9D39.cjs +1 -0
  2. package/dist/{KeyboardShortcutsDialog-BbuDgglK.js → KeyboardShortcutsDialog-OPAV0oVm.js} +351 -506
  3. package/dist/{MenuBar-CbONA9-a.js → MenuBar-BLKoZqG3.js} +813 -692
  4. package/dist/MenuBar-BP-XM0MI.cjs +4 -0
  5. package/dist/{TablePropertiesDialog-JWT68zEO.cjs → TablePropertiesDialog-B-FVOqkH.cjs} +1 -1
  6. package/dist/TablePropertiesDialog-B3oZIIjw.js +1145 -0
  7. package/dist/components/DocxEditor/types.d.ts +26 -0
  8. package/dist/components/Toolbar/presets.d.ts +0 -1
  9. package/dist/components/ui/fontPickerValue.d.ts +1 -0
  10. package/dist/components/ui/fontPickerValue.test.d.ts +1 -0
  11. package/dist/composables/imageOverlayRect.d.ts +44 -0
  12. package/dist/composables/imageOverlayRect.test.d.ts +1 -0
  13. package/dist/composables/useColorMode.d.ts +8 -0
  14. package/dist/composables/useCommentSidebarItems.test.d.ts +1 -0
  15. package/dist/composables/useDocxEditorRefApi.d.ts +4 -0
  16. package/dist/composables/useFileIO.d.ts +5 -0
  17. package/dist/composables/useFormattingActions.d.ts +5 -2
  18. package/dist/composables/useImageActions.d.ts +0 -6
  19. package/dist/composables/useMenuActions.d.ts +3 -1
  20. package/dist/composables/useParagraphStyleOptions.d.ts +18 -0
  21. package/dist/composables/useToolbarDropdowns.d.ts +1 -0
  22. package/dist/composables/useToolbarFontSize.d.ts +15 -0
  23. package/dist/composables.cjs +1 -1
  24. package/dist/composables.js +5 -4
  25. package/dist/dialogs.cjs +1 -1
  26. package/dist/dialogs.js +3 -3
  27. package/dist/docx-editor-vue.css +1 -1
  28. package/dist/index.cjs +4 -4
  29. package/dist/index.js +1375 -1258
  30. package/dist/plugin-api.cjs +1 -1
  31. package/dist/plugin-api.js +1 -1
  32. package/dist/ui.cjs +2 -2
  33. package/dist/ui.js +253 -230
  34. package/dist/{useCommentSidebarItems-CbNvNCd3.cjs → useCommentSidebarItems-DBeGKNGA.cjs} +1 -1
  35. package/dist/{useCommentSidebarItems-BHomCzpj.js → useCommentSidebarItems-DXbF857R.js} +2 -1
  36. package/dist/{useDragAutoScroll-BNPB-6SM.js → useDragAutoScroll-B21Ec-Zy.js} +6 -7
  37. package/dist/useDragAutoScroll-BPnc7LEO.cjs +1 -0
  38. package/package.json +4 -4
  39. package/dist/KeyboardShortcutsDialog-Bct8AJ0i.cjs +0 -1
  40. package/dist/MenuBar-m0JEaF1X.cjs +0 -4
  41. package/dist/TablePropertiesDialog-D5MIF3cj.js +0 -987
  42. package/dist/useDragAutoScroll-DCUotwOX.cjs +0 -1
@@ -1,49 +1,50 @@
1
- import { d as e, p as t } from "./KeyboardShortcutsDialog-BbuDgglK.js";
1
+ import { f as e, u as t } from "./KeyboardShortcutsDialog-OPAV0oVm.js";
2
2
  import { t as n } from "./_plugin-vue_export-helper-B52Kst-M.js";
3
- import { t as r } from "./useCommentSidebarItems-BHomCzpj.js";
3
+ import { t as r } from "./useCommentSidebarItems-DXbF857R.js";
4
4
  import { Fragment as i, computed as a, createBlock as o, createCommentVNode as s, createElementBlock as c, createElementVNode as l, createTextVNode as u, createVNode as d, defineComponent as f, nextTick as p, normalizeClass as m, normalizeStyle as h, onBeforeUnmount as g, onMounted as _, openBlock as v, reactive as y, ref as b, renderList as x, renderSlot as S, resolveDynamicComponent as C, toDisplayString as w, unref as T, vModelSelect as E, vModelText as D, watch as O, withCtx as k, withDirectives as A, withKeys as j, withModifiers as M } from "vue";
5
5
  import { generateThemeTintShadeMatrix as N, resolveColor as P, resolveColorToHex as F, resolveHighlightColor as I } from "@eigenpal/docx-editor-core/utils";
6
6
  import { redoDepth as L, undoDepth as R } from "prosemirror-history";
7
7
  import { extractSelectionContext as ee } from "@eigenpal/docx-editor-core/prosemirror/plugins/selectionTracker";
8
8
  import { clearFormatting as z } from "@eigenpal/docx-editor-core/prosemirror/commands/formatting";
9
9
  import { normalizeFontFamilies as B } from "@eigenpal/docx-editor-core/utils/fontOptions";
10
- import { getTableContext as V } from "@eigenpal/docx-editor-core/prosemirror/extensions/nodes/TableExtension";
11
- import { formatDate as H, getAvatarColor as U, getCommentText as W, getInitials as G, truncateText as K } from "@eigenpal/docx-editor-core/utils/comments";
12
- import { resolveItemPositions as q } from "@eigenpal/docx-editor-core/plugin-api/resolveItemPositions";
13
- import { SIDEBAR_DOCUMENT_SHIFT as J } from "@eigenpal/docx-editor-core/utils/sidebarConstants";
14
- import { pixelsToTwips as te, twipsToPixels as Y } from "@eigenpal/docx-editor-core/utils/units";
10
+ import { getStylePreviewProps as V, resolveParagraphStyleOptions as H } from "@eigenpal/docx-editor-core/utils/stylePreview";
11
+ import { getTableContext as U } from "@eigenpal/docx-editor-core/prosemirror/extensions/nodes/TableExtension";
12
+ import { formatDate as W, getAvatarColor as G, getCommentText as K, getInitials as q, truncateText as J } from "@eigenpal/docx-editor-core/utils/comments";
13
+ import { resolveItemPositions as Y } from "@eigenpal/docx-editor-core/plugin-api/resolveItemPositions";
14
+ import { SIDEBAR_DOCUMENT_SHIFT as X, SIDEBAR_WIDTH as te } from "@eigenpal/docx-editor-core/utils/sidebarConstants";
15
+ import { pixelsToTwips as ne, twipsToPixels as re } from "@eigenpal/docx-editor-core/utils/units";
15
16
  //#region src/components/ui/ColorPicker.vue?vue&type=script&setup=true&lang.ts
16
- var ne = [
17
+ var ie = [
17
18
  "disabled",
18
19
  "title",
19
20
  "aria-label"
20
- ], re = [
21
+ ], ae = [
21
22
  "disabled",
22
23
  "title",
23
24
  "aria-label",
24
25
  "aria-expanded"
25
- ], X = [
26
+ ], oe = [
26
27
  "disabled",
27
28
  "title",
28
29
  "aria-label",
29
30
  "aria-expanded"
30
- ], ie = { class: "docx-color-picker__button-stack" }, Z = ["aria-label"], ae = {
31
+ ], se = { class: "docx-color-picker__button-stack" }, Z = ["aria-label"], ce = {
31
32
  key: 0,
32
33
  class: "docx-color-picker__auto-icon docx-color-picker__auto-icon--none"
33
- }, oe = {
34
+ }, le = {
34
35
  key: 1,
35
36
  class: "docx-color-picker__auto-icon docx-color-picker__auto-icon--auto"
36
- }, se = { class: "docx-color-picker__section-label" }, ce = { class: "docx-color-picker__grid" }, le = [
37
+ }, ue = { class: "docx-color-picker__section-label" }, de = { class: "docx-color-picker__grid" }, fe = [
37
38
  "title",
38
39
  "aria-label",
39
40
  "aria-selected",
40
41
  "onClick"
41
- ], ue = { class: "docx-color-picker__section-label" }, de = { class: "docx-color-picker__grid" }, fe = [
42
+ ], pe = { class: "docx-color-picker__section-label" }, me = { class: "docx-color-picker__grid" }, he = [
42
43
  "title",
43
44
  "aria-label",
44
45
  "aria-selected",
45
46
  "onClick"
46
- ], pe = { class: "docx-color-picker__section-label" }, me = { class: "docx-color-picker__custom" }, he = ["onKeydown"], ge = ["disabled"], _e = /* @__PURE__ */ n(/* @__PURE__ */ f({
47
+ ], ge = { class: "docx-color-picker__section-label" }, _e = { class: "docx-color-picker__custom" }, ve = ["onKeydown"], ye = ["disabled"], be = /* @__PURE__ */ n(/* @__PURE__ */ f({
47
48
  __name: "ColorPicker",
48
49
  props: {
49
50
  mode: {},
@@ -66,7 +67,7 @@ var ne = [
66
67
  },
67
68
  emits: ["change"],
68
69
  setup(n, { emit: r }) {
69
- let o = n, f = r, { t: p } = e(), y = [
70
+ let o = n, f = r, { t: p } = t(), y = [
70
71
  {
71
72
  nameKey: "colorPicker.colors.darkRed",
72
73
  hex: "C00000"
@@ -145,37 +146,37 @@ var ne = [
145
146
  left: `${t.left}px`
146
147
  };
147
148
  }
148
- function te() {
149
+ function Y() {
149
150
  o.disabled || (L.value || J(), L.value = !L.value);
150
151
  }
151
- function Y(e, t = !0) {
152
+ function X(e, t = !0) {
152
153
  t && (B.value = e), f("change", e), L.value = !1;
153
154
  }
154
- function _e() {
155
+ function te() {
155
156
  o.disabled || f("change", B.value);
156
157
  }
157
- function ve(e) {
158
+ function ne(e) {
158
159
  if (o.mode === "highlight") {
159
- Y(e.hex);
160
+ X(e.hex);
160
161
  return;
161
162
  }
162
163
  let t = {
163
164
  themeColor: e.themeSlot,
164
165
  rgb: e.hex
165
166
  };
166
- e.tint && (t.themeTint = e.tint), e.shade && (t.themeShade = e.shade), Y(t);
167
+ e.tint && (t.themeTint = e.tint), e.shade && (t.themeShade = e.shade), X(t);
167
168
  }
168
- function Q(e) {
169
- Y(o.mode === "highlight" ? e : { rgb: e });
170
- }
171
- function ye() {
172
- Y(o.mode === "highlight" ? "none" : { auto: !0 }, !1);
169
+ function re(e) {
170
+ X(o.mode === "highlight" ? e : { rgb: e });
173
171
  }
174
172
  function be() {
173
+ X(o.mode === "highlight" ? "none" : { auto: !0 }, !1);
174
+ }
175
+ function xe() {
175
176
  let e = R.value.replace(/^#/, "").toUpperCase();
176
- C(e) && (Y(o.mode === "highlight" ? e : { rgb: e }), R.value = "");
177
+ C(e) && (X(o.mode === "highlight" ? e : { rgb: e }), R.value = "");
177
178
  }
178
- function xe(e) {
179
+ function Q(e) {
179
180
  e.target.tagName !== "INPUT" && e.preventDefault();
180
181
  }
181
182
  function Se(e) {
@@ -183,7 +184,7 @@ var ne = [
183
184
  let t = e.target;
184
185
  ee.value?.contains(t) || z.value?.contains(t) || (L.value = !1);
185
186
  }
186
- return _(() => document.addEventListener("mousedown", Se)), g(() => document.removeEventListener("mousedown", Se)), (e, r) => (v(), c("div", {
187
+ return _(() => document.addEventListener("mousedown", Se)), g(() => document.removeEventListener("mousedown", Se)), (t, r) => (v(), c("div", {
187
188
  ref_key: "containerRef",
188
189
  ref: ee,
189
190
  class: m(["docx-color-picker", n.className]),
@@ -198,14 +199,14 @@ var ne = [
198
199
  title: n.title ?? G.value,
199
200
  "aria-label": n.title ?? G.value,
200
201
  onMousedown: r[0] ||= M(() => {}, ["prevent"]),
201
- onClick: _e
202
- }, [d(t, {
202
+ onClick: te
203
+ }, [d(e, {
203
204
  name: K.value,
204
205
  size: 18
205
206
  }, null, 8, ["name"]), l("span", {
206
207
  class: m(["docx-color-picker__bar", { "is-light": W.value === "transparent" || E(W.value) }]),
207
208
  style: h({ background: W.value === "transparent" ? "#fff" : W.value })
208
- }, null, 6)], 40, ne), l("button", {
209
+ }, null, 6)], 40, ie), l("button", {
209
210
  type: "button",
210
211
  class: m(["docx-color-picker__arrow", { "is-open": L.value }]),
211
212
  disabled: n.disabled,
@@ -214,11 +215,11 @@ var ne = [
214
215
  "aria-haspopup": "true",
215
216
  "aria-expanded": L.value,
216
217
  onMousedown: r[1] ||= M(() => {}, ["prevent"]),
217
- onClick: te
218
- }, [d(t, {
218
+ onClick: Y
219
+ }, [d(e, {
219
220
  name: "arrow_drop_down",
220
221
  size: 18
221
- })], 42, re)], 2)) : (v(), c("button", {
222
+ })], 42, ae)], 2)) : (v(), c("button", {
222
223
  key: 1,
223
224
  type: "button",
224
225
  class: m(["docx-color-picker__button", { "is-open": L.value }]),
@@ -228,17 +229,17 @@ var ne = [
228
229
  "aria-haspopup": "true",
229
230
  "aria-expanded": L.value,
230
231
  onMousedown: r[2] ||= M(() => {}, ["prevent"]),
231
- onClick: te
232
- }, [l("span", ie, [d(t, {
232
+ onClick: Y
233
+ }, [l("span", se, [d(e, {
233
234
  name: K.value,
234
235
  size: 18
235
236
  }, null, 8, ["name"]), l("span", {
236
237
  class: m(["docx-color-picker__bar", { "is-light": U.value === "transparent" || E(U.value) }]),
237
238
  style: h({ background: U.value === "transparent" ? "#fff" : U.value })
238
- }, null, 6)]), d(t, {
239
+ }, null, 6)]), d(e, {
239
240
  name: "arrow_drop_down",
240
241
  size: 14
241
- })], 42, X)), L.value && !n.disabled ? (v(), c("div", {
242
+ })], 42, oe)), L.value && !n.disabled ? (v(), c("div", {
242
243
  key: 2,
243
244
  ref_key: "panelRef",
244
245
  ref: z,
@@ -246,17 +247,17 @@ var ne = [
246
247
  style: h(q.value),
247
248
  role: "dialog",
248
249
  "aria-label": T(p)("colorPicker.ariaLabel", { type: G.value }),
249
- onMousedown: xe
250
+ onMousedown: Q
250
251
  }, [
251
252
  l("button", {
252
253
  type: "button",
253
254
  class: "docx-color-picker__auto",
254
255
  onMousedown: r[3] ||= M(() => {}, ["prevent"]),
255
- onClick: ye
256
- }, [n.mode === "highlight" ? (v(), c("span", ae, [...r[10] ||= [l("span", { class: "docx-color-picker__auto-slash" }, null, -1)]])) : (v(), c("span", oe)), u(" " + w(n.autoLabel ?? (n.mode === "highlight" ? T(p)("colorPicker.noColor") : T(p)("colorPicker.automatic"))), 1)], 32),
256
+ onClick: be
257
+ }, [n.mode === "highlight" ? (v(), c("span", ce, [...r[10] ||= [l("span", { class: "docx-color-picker__auto-slash" }, null, -1)]])) : (v(), c("span", le)), u(" " + w(n.autoLabel ?? (n.mode === "highlight" ? T(p)("colorPicker.noColor") : T(p)("colorPicker.automatic"))), 1)], 32),
257
258
  r[12] ||= l("div", { class: "docx-color-picker__divider" }, null, -1),
258
- l("div", se, w(T(p)("colorPicker.themeColors")), 1),
259
- l("div", ce, [(v(!0), c(i, null, x(H.value, (e) => (v(), c("button", {
259
+ l("div", ue, w(T(p)("colorPicker.themeColors")), 1),
260
+ l("div", de, [(v(!0), c(i, null, x(H.value, (e) => (v(), c("button", {
260
261
  key: e.key,
261
262
  type: "button",
262
263
  class: m(["docx-color-picker__cell", { "is-selected": k(n.value, e.hex) }]),
@@ -265,11 +266,11 @@ var ne = [
265
266
  "aria-label": e.label,
266
267
  "aria-selected": k(n.value, e.hex),
267
268
  onMousedown: r[4] ||= M(() => {}, ["prevent"]),
268
- onClick: (t) => ve(e)
269
- }, null, 46, le))), 128))]),
269
+ onClick: (t) => ne(e)
270
+ }, null, 46, fe))), 128))]),
270
271
  r[13] ||= l("div", { class: "docx-color-picker__divider" }, null, -1),
271
- l("div", ue, w(T(p)("colorPicker.standardColors")), 1),
272
- l("div", de, [(v(), c(i, null, x(y, (e) => l("button", {
272
+ l("div", pe, w(T(p)("colorPicker.standardColors")), 1),
273
+ l("div", me, [(v(), c(i, null, x(y, (e) => l("button", {
273
274
  key: e.hex,
274
275
  type: "button",
275
276
  class: m(["docx-color-picker__cell", { "is-selected": k(n.value, e.hex) }]),
@@ -278,11 +279,11 @@ var ne = [
278
279
  "aria-label": T(p)(e.nameKey),
279
280
  "aria-selected": k(n.value, e.hex),
280
281
  onMousedown: r[5] ||= M(() => {}, ["prevent"]),
281
- onClick: (t) => Q(e.hex)
282
- }, null, 46, fe)), 64))]),
282
+ onClick: (t) => re(e.hex)
283
+ }, null, 46, he)), 64))]),
283
284
  r[14] ||= l("div", { class: "docx-color-picker__divider" }, null, -1),
284
- l("div", pe, w(T(p)("colorPicker.customColor")), 1),
285
- l("div", me, [
285
+ l("div", ge, w(T(p)("colorPicker.customColor")), 1),
286
+ l("div", _e, [
286
287
  r[11] ||= l("span", { class: "docx-color-picker__hash" }, "#", -1),
287
288
  A(l("input", {
288
289
  "onUpdate:modelValue": r[6] ||= (e) => R.value = e,
@@ -292,20 +293,20 @@ var ne = [
292
293
  maxlength: "6",
293
294
  "aria-label": "Custom hex color",
294
295
  onInput: r[7] ||= (e) => R.value = R.value.replace(/[^0-9A-Fa-f]/g, "").slice(0, 6),
295
- onKeydown: j(M(be, ["prevent"]), ["enter"]),
296
+ onKeydown: j(M(xe, ["prevent"]), ["enter"]),
296
297
  onMousedown: r[8] ||= M(() => {}, ["stop"])
297
- }, null, 40, he), [[D, R.value]]),
298
+ }, null, 40, ve), [[D, R.value]]),
298
299
  l("button", {
299
300
  type: "button",
300
301
  class: "docx-color-picker__apply-btn",
301
302
  disabled: !C(R.value),
302
303
  onMousedown: r[9] ||= M(() => {}, ["prevent"]),
303
- onClick: be
304
- }, w(T(p)("common.apply")), 41, ge)
304
+ onClick: xe
305
+ }, w(T(p)("common.apply")), 41, ye)
305
306
  ])
306
307
  ], 44, Z)) : s("", !0)], 6));
307
308
  }
308
- }), [["__scopeId", "data-v-2cbf59ab"]]), ve = 4, Q = /* @__PURE__ */ n(/* @__PURE__ */ f({
309
+ }), [["__scopeId", "data-v-e2472617"]]), xe = 4, Q = /* @__PURE__ */ n(/* @__PURE__ */ f({
309
310
  __name: "Popover",
310
311
  props: {
311
312
  open: { type: Boolean },
@@ -324,7 +325,7 @@ var ne = [
324
325
  let e = i.value;
325
326
  if (!e) return;
326
327
  let t = e.getBoundingClientRect(), r = { position: "fixed" };
327
- n.placement.startsWith("top") ? (r.bottom = `${Math.round(window.innerHeight - t.top + ve)}px`, r.top = "auto") : (r.top = `${Math.round(t.bottom + ve)}px`, r.bottom = "auto"), n.placement.endsWith("right") ? (r.right = `${Math.round(window.innerWidth - t.right)}px`, r.left = "auto") : (r.left = `${Math.round(t.left)}px`, r.right = "auto"), o.value = r;
328
+ n.placement.startsWith("top") ? (r.bottom = `${Math.round(window.innerHeight - t.top + xe)}px`, r.top = "auto") : (r.top = `${Math.round(t.bottom + xe)}px`, r.bottom = "auto"), n.placement.endsWith("right") ? (r.right = `${Math.round(window.innerWidth - t.right)}px`, r.left = "auto") : (r.left = `${Math.round(t.left)}px`, r.right = "auto"), o.value = r;
328
329
  }
329
330
  function u() {
330
331
  r("update:open", !n.open), n.open && r("close");
@@ -372,15 +373,15 @@ var ne = [
372
373
  onMousedown: n[0] ||= M(() => {}, ["stop"])
373
374
  }, [S(t.$slots, "panel", {}, void 0, !0)], 38)) : s("", !0)], 512));
374
375
  }
375
- }), [["__scopeId", "data-v-20a24bb6"]]), ye = ["title", "onClick"], be = {
376
+ }), [["__scopeId", "data-v-5878ce2a"]]), Se = ["title", "onClick"], Ce = {
376
377
  key: 0,
377
378
  class: "editing-mode__label"
378
- }, xe = { class: "editing-mode__panel" }, Se = ["onClick"], Ce = { class: "editing-mode__option-text" }, we = { class: "editing-mode__option-label" }, Te = { class: "editing-mode__option-desc" }, Ee = /* @__PURE__ */ n(/* @__PURE__ */ f({
379
+ }, we = { class: "editing-mode__panel" }, Te = ["onClick"], Ee = { class: "editing-mode__option-text" }, De = { class: "editing-mode__option-label" }, Oe = { class: "editing-mode__option-desc" }, ke = /* @__PURE__ */ n(/* @__PURE__ */ f({
379
380
  __name: "EditingModeDropdown",
380
381
  props: { modelValue: {} },
381
382
  emits: ["update:modelValue"],
382
383
  setup(n, { emit: r }) {
383
- let { t: u } = e(), f = n, p = r, h = [
384
+ let { t: u } = t(), f = n, p = r, h = [
384
385
  {
385
386
  value: "editing",
386
387
  labelKey: "editor.editing",
@@ -409,59 +410,59 @@ var ne = [
409
410
  }
410
411
  return _(() => {
411
412
  D = window.matchMedia("(max-width: 1400px)"), S.value = D.matches, D.addEventListener("change", O);
412
- }), g(() => D?.removeEventListener("change", O)), (e, r) => (v(), o(Q, {
413
+ }), g(() => D?.removeEventListener("change", O)), (t, r) => (v(), o(Q, {
413
414
  open: y.value,
414
415
  placement: "bottom-right",
415
416
  "onUpdate:open": r[0] ||= (e) => y.value = e,
416
417
  onClose: r[1] ||= (e) => y.value = !1
417
418
  }, {
418
- trigger: k(({ toggle: e }) => [l("button", {
419
+ trigger: k(({ toggle: t }) => [l("button", {
419
420
  type: "button",
420
421
  class: m(["editing-mode__trigger", {
421
422
  "editing-mode__trigger--open": y.value,
422
423
  "editing-mode__trigger--compact": S.value
423
424
  }]),
424
425
  title: `${T(u)(C.value.labelKey)} (Ctrl+Shift+E)`,
425
- onClick: M(e, ["prevent"])
426
+ onClick: M(t, ["prevent"])
426
427
  }, [
427
- d(t, {
428
+ d(e, {
428
429
  name: C.value.icon,
429
430
  size: 18
430
431
  }, null, 8, ["name"]),
431
- S.value ? s("", !0) : (v(), c("span", be, w(T(u)(C.value.labelKey)), 1)),
432
- d(t, {
432
+ S.value ? s("", !0) : (v(), c("span", Ce, w(T(u)(C.value.labelKey)), 1)),
433
+ d(e, {
433
434
  name: "arrow_drop_down",
434
435
  size: 16
435
436
  })
436
- ], 10, ye)]),
437
- panel: k(() => [l("div", xe, [(v(), c(i, null, x(h, (e) => l("button", {
438
- key: e.value,
437
+ ], 10, Se)]),
438
+ panel: k(() => [l("div", we, [(v(), c(i, null, x(h, (t) => l("button", {
439
+ key: t.value,
439
440
  type: "button",
440
441
  class: "editing-mode__option",
441
- onClick: M((t) => E(e.value), ["prevent"])
442
+ onClick: M((e) => E(t.value), ["prevent"])
442
443
  }, [
443
- d(t, {
444
- name: e.icon,
444
+ d(e, {
445
+ name: t.icon,
445
446
  size: 20
446
447
  }, null, 8, ["name"]),
447
- l("span", Ce, [l("span", we, w(T(u)(e.labelKey)), 1), l("span", Te, w(T(u)(e.descKey)), 1)]),
448
- e.value === n.modelValue ? (v(), o(t, {
448
+ l("span", Ee, [l("span", De, w(T(u)(t.labelKey)), 1), l("span", Oe, w(T(u)(t.descKey)), 1)]),
449
+ t.value === n.modelValue ? (v(), o(e, {
449
450
  key: 0,
450
451
  name: "check",
451
452
  size: 18,
452
453
  class: "editing-mode__check"
453
454
  })) : s("", !0)
454
- ], 8, Se)), 64))])]),
455
+ ], 8, Te)), 64))])]),
455
456
  _: 1
456
457
  }, 8, ["open"]));
457
458
  }
458
- }), [["__scopeId", "data-v-e7645f58"]]), De = [
459
+ }), [["__scopeId", "data-v-00df78da"]]), Ae = [
459
460
  "disabled",
460
461
  "aria-label",
461
462
  "title",
462
463
  "aria-expanded",
463
464
  "onClick"
464
- ], Oe = { class: "docx-icon-grid__panel" }, ke = ["title", "onClick"], Ae = /* @__PURE__ */ n(/* @__PURE__ */ f({
465
+ ], je = { class: "docx-icon-grid__panel" }, Me = ["title", "onClick"], Ne = /* @__PURE__ */ n(/* @__PURE__ */ f({
465
466
  __name: "IconGridDropdown",
466
467
  props: {
467
468
  options: {},
@@ -472,7 +473,7 @@ var ne = [
472
473
  ariaLabel: {}
473
474
  },
474
475
  emits: ["select"],
475
- setup(e, { emit: n }) {
476
+ setup(t, { emit: n }) {
476
477
  let r = n, a = b(!1);
477
478
  function s(e) {
478
479
  r("select", e), a.value = !1;
@@ -485,41 +486,41 @@ var ne = [
485
486
  trigger: k(({ toggle: n }) => [l("button", {
486
487
  type: "button",
487
488
  class: m(["docx-icon-grid__btn", { "docx-icon-grid__btn--open": a.value }]),
488
- disabled: e.disabled,
489
- "aria-label": e.ariaLabel ?? e.tooltipContent,
490
- title: e.tooltipContent,
489
+ disabled: t.disabled,
490
+ "aria-label": t.ariaLabel ?? t.tooltipContent,
491
+ title: t.tooltipContent,
491
492
  "aria-expanded": a.value,
492
493
  "aria-haspopup": "true",
493
494
  onClick: M(n, ["prevent"])
494
- }, [d(t, {
495
- name: e.triggerIcon,
495
+ }, [d(e, {
496
+ name: t.triggerIcon,
496
497
  size: 20
497
- }, null, 8, ["name"]), d(t, {
498
+ }, null, 8, ["name"]), d(e, {
498
499
  name: "arrow_drop_down",
499
500
  size: 14
500
- })], 10, De)]),
501
- panel: k(() => [l("div", Oe, [(v(!0), c(i, null, x(e.options, (n) => (v(), c("button", {
501
+ })], 10, Ae)]),
502
+ panel: k(() => [l("div", je, [(v(!0), c(i, null, x(t.options, (n) => (v(), c("button", {
502
503
  key: n.value,
503
504
  type: "button",
504
- class: m(["docx-icon-grid__option", { "docx-icon-grid__option--active": e.activeValue === n.value }]),
505
+ class: m(["docx-icon-grid__option", { "docx-icon-grid__option--active": t.activeValue === n.value }]),
505
506
  title: n.label,
506
507
  onClick: M((e) => s(n.value), ["prevent"])
507
- }, [d(t, {
508
+ }, [d(e, {
508
509
  name: n.iconName,
509
510
  size: 18
510
- }, null, 8, ["name"])], 10, ke))), 128))])]),
511
+ }, null, 8, ["name"])], 10, Me))), 128))])]),
511
512
  _: 1
512
513
  }, 8, ["open"]));
513
514
  }
514
- }), [["__scopeId", "data-v-435b9662"]]), je = /* @__PURE__ */ f({
515
+ }), [["__scopeId", "data-v-28013428"]]), Pe = /* @__PURE__ */ f({
515
516
  __name: "ImageWrapDropdown",
516
517
  props: {
517
518
  imageContext: {},
518
519
  disabled: { type: Boolean }
519
520
  },
520
521
  emits: ["change"],
521
- setup(t) {
522
- let n = t, { t: r } = e(), i = [
522
+ setup(e) {
523
+ let n = e, { t: r } = t(), i = [
523
524
  {
524
525
  value: "inline",
525
526
  labelKey: "imageWrap.inline",
@@ -558,13 +559,13 @@ var ne = [
558
559
  let e = n.imageContext;
559
560
  return e.displayMode === "float" && e.cssFloat === "left" ? "wrapRight" : e.displayMode === "float" && e.cssFloat === "right" ? "wrapLeft" : e.wrapType;
560
561
  }), l = a(() => s.value.find((e) => e.value === c.value) ?? s.value[0]);
561
- return (e, n) => (v(), o(Ae, {
562
+ return (t, n) => (v(), o(Ne, {
562
563
  options: s.value,
563
564
  "active-value": c.value,
564
565
  "trigger-icon": l.value.iconName,
565
566
  "tooltip-content": T(r)("imageWrap.tooltipPrefix", { label: l.value.label }),
566
- disabled: t.disabled,
567
- onSelect: n[0] ||= (t) => e.$emit("change", t)
567
+ disabled: e.disabled,
568
+ onSelect: n[0] ||= (e) => t.$emit("change", e)
568
569
  }, null, 8, [
569
570
  "options",
570
571
  "active-value",
@@ -573,12 +574,12 @@ var ne = [
573
574
  "disabled"
574
575
  ]));
575
576
  }
576
- }), Me = /* @__PURE__ */ f({
577
+ }), Fe = /* @__PURE__ */ f({
577
578
  __name: "ImageTransformDropdown",
578
579
  props: { disabled: { type: Boolean } },
579
580
  emits: ["transform"],
580
- setup(t) {
581
- let { t: n } = e(), r = [
581
+ setup(e) {
582
+ let { t: n } = t(), r = [
582
583
  {
583
584
  value: "rotateCW",
584
585
  labelKey: "imageTransform.rotateClockwise",
@@ -604,19 +605,19 @@ var ne = [
604
605
  label: n(e.labelKey),
605
606
  iconName: e.iconName
606
607
  })));
607
- return (e, r) => (v(), o(Ae, {
608
+ return (t, r) => (v(), o(Ne, {
608
609
  options: i.value,
609
610
  "trigger-icon": "rotate_right",
610
611
  "tooltip-content": T(n)("imageTransform.tooltip"),
611
- disabled: t.disabled,
612
- onSelect: r[0] ||= (t) => e.$emit("transform", t)
612
+ disabled: e.disabled,
613
+ onSelect: r[0] ||= (e) => t.$emit("transform", e)
613
614
  }, null, 8, [
614
615
  "options",
615
616
  "tooltip-content",
616
617
  "disabled"
617
618
  ]));
618
619
  }
619
- }), Ne = [
620
+ }), Ie = [
620
621
  {
621
622
  name: "Arial",
622
623
  fontFamily: "Arial",
@@ -677,7 +678,7 @@ var ne = [
677
678
  fontFamily: "Consolas",
678
679
  category: "monospace"
679
680
  }
680
- ], Pe = [
681
+ ], Le = [
681
682
  8,
682
683
  9,
683
684
  10,
@@ -692,62 +693,38 @@ var ne = [
692
693
  36,
693
694
  48,
694
695
  72
695
- ], Fe = [
696
+ ], Re = [
696
697
  {
697
698
  id: "Normal",
698
699
  label: "Normal",
699
- nameKey: "styles.normalText",
700
- previewStyle: { fontSize: "13px" }
700
+ nameKey: "styles.normalText"
701
701
  },
702
702
  {
703
703
  id: "Title",
704
704
  label: "Title",
705
- nameKey: "styles.title",
706
- previewStyle: {
707
- fontSize: "20px",
708
- fontWeight: "bold"
709
- }
705
+ nameKey: "styles.title"
710
706
  },
711
707
  {
712
708
  id: "Subtitle",
713
709
  label: "Subtitle",
714
- nameKey: "styles.subtitle",
715
- previewStyle: {
716
- fontSize: "15px",
717
- color: "#6b7280"
718
- }
710
+ nameKey: "styles.subtitle"
719
711
  },
720
712
  {
721
713
  id: "Heading1",
722
714
  label: "Heading 1",
723
- nameKey: "styles.heading1",
724
- previewStyle: {
725
- fontSize: "18px",
726
- fontWeight: "bold",
727
- color: "#4a6c8c"
728
- }
715
+ nameKey: "styles.heading1"
729
716
  },
730
717
  {
731
718
  id: "Heading2",
732
719
  label: "Heading 2",
733
- nameKey: "styles.heading2",
734
- previewStyle: {
735
- fontSize: "16px",
736
- fontWeight: "bold",
737
- color: "#4a6c8c"
738
- }
720
+ nameKey: "styles.heading2"
739
721
  },
740
722
  {
741
723
  id: "Heading3",
742
724
  label: "Heading 3",
743
- nameKey: "styles.heading3",
744
- previewStyle: {
745
- fontSize: "14px",
746
- fontWeight: "bold",
747
- color: "#4a6c8c"
748
- }
725
+ nameKey: "styles.heading3"
749
726
  }
750
- ], Ie = [
727
+ ], ze = [
751
728
  {
752
729
  label: "Single",
753
730
  labelKey: "lineSpacing.single",
@@ -766,7 +743,7 @@ var ne = [
766
743
  labelKey: "lineSpacing.double",
767
744
  value: 480
768
745
  }
769
- ], Le = [
746
+ ], Be = [
770
747
  .5,
771
748
  .75,
772
749
  1,
@@ -776,7 +753,7 @@ var ne = [
776
753
  ];
777
754
  //#endregion
778
755
  //#region src/composables/useToolbarDropdowns.ts
779
- function Re(e) {
756
+ function Ve(e) {
780
757
  let t = b(null), n = b({
781
758
  top: 0,
782
759
  left: 0
@@ -822,30 +799,98 @@ function Re(e) {
822
799
  return _(() => document.addEventListener("mousedown", c)), g(() => document.removeEventListener("mousedown", c)), {
823
800
  openDropdown: t,
824
801
  dropdownMenuStyle: o,
825
- toggleDropdown: s
802
+ toggleDropdown: s,
803
+ recomputeDropdownPos: i
804
+ };
805
+ }
806
+ //#endregion
807
+ //#region src/composables/useToolbarFontSize.ts
808
+ function He(e) {
809
+ let t = b(!1), n = (t) => e.execCommand("setFontSize", t * 2);
810
+ function r() {
811
+ t.value = !1, e.openDropdown.value = "size", e.recomputeDropdownPos("size");
812
+ }
813
+ function i() {
814
+ t.value = !0;
815
+ }
816
+ function a(r) {
817
+ if (t.value) {
818
+ let e = parseFloat(r.target.value);
819
+ isNaN(e) || n(Math.round(Math.min(Math.max(e, 1), 1638) * 2) / 2);
820
+ }
821
+ t.value = !1, e.openDropdown.value = null;
822
+ }
823
+ function o(r) {
824
+ t.value = !1, n(r), e.openDropdown.value = null;
825
+ }
826
+ function s() {
827
+ let t = e.currentFontSize.value;
828
+ n(Le.find((e) => e > t) || t + 1);
829
+ }
830
+ function c() {
831
+ let t = e.currentFontSize.value;
832
+ n([...Le].reverse().find((e) => e < t) || Math.max(1, t - 1));
833
+ }
834
+ return {
835
+ onSizeFocus: r,
836
+ onSizeInput: i,
837
+ commitFontSize: a,
838
+ pickFontSize: o,
839
+ increaseFontSize: s,
840
+ decreaseFontSize: c
841
+ };
842
+ }
843
+ //#endregion
844
+ //#region src/composables/useParagraphStyleOptions.ts
845
+ function Ue(e) {
846
+ let t = a(() => {
847
+ let t = H(e.documentStyles());
848
+ return t.length > 0 ? t.map((t) => {
849
+ let n = Re.find((e) => e.id === t.styleId);
850
+ return {
851
+ id: t.styleId,
852
+ label: n ? e.t(n.nameKey) : t.name,
853
+ previewStyle: V(t)
854
+ };
855
+ }) : Re.map((t) => ({
856
+ id: t.id,
857
+ label: e.t(t.nameKey),
858
+ previewStyle: V({ styleId: t.id })
859
+ }));
860
+ });
861
+ return {
862
+ resolvedParagraphStyles: t,
863
+ currentStyleLabel: a(() => {
864
+ let n = e.currentStyleId() || "Normal", r = t.value.find((e) => e.id === n);
865
+ return r ? r.label : n;
866
+ })
826
867
  };
827
868
  }
828
869
  //#endregion
829
870
  //#region src/components/Toolbar.vue?vue&type=script&setup=true&lang.ts
830
- var ze = {
871
+ var We = {
831
872
  key: 0,
832
873
  class: "basic-toolbar"
833
- }, Be = [
874
+ }, Ge = [
834
875
  "title",
835
876
  "aria-label",
836
877
  "disabled"
837
- ], Ve = [
878
+ ], Ke = [
838
879
  "title",
839
880
  "aria-label",
840
881
  "disabled"
841
- ], He = ["disabled", "title"], Ue = ["title"], We = ["disabled", "title"], Ge = ["onMousedown"], Ke = ["title"], qe = ["onMousedown"], Je = ["title"], Ye = {
882
+ ], qe = ["disabled", "title"], Je = ["aria-expanded", "title"], Ye = ["disabled", "title"], Xe = ["onMousedown"], Ze = ["aria-expanded", "title"], Qe = ["onMousedown"], $e = ["aria-expanded", "title"], et = {
842
883
  key: 0,
843
884
  class: "toolbar-dropdown__group-label"
844
- }, Xe = ["onMousedown"], Ze = ["title"], Qe = ["title"], $e = ["title"], et = ["onMousedown"], tt = ["title", "aria-label"], nt = ["title", "aria-label"], rt = ["title", "aria-label"], it = ["title", "aria-label"], at = ["title", "aria-label"], ot = ["title", "aria-label"], st = ["title", "aria-label"], ct = ["title"], lt = ["title", "aria-label"], ut = ["title", "aria-label"], dt = [
885
+ }, tt = ["onMousedown"], nt = ["title"], rt = [
886
+ "value",
887
+ "title",
888
+ "aria-expanded"
889
+ ], 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 = [
845
890
  "title",
846
891
  "aria-label",
847
892
  "disabled"
848
- ], ft = ["title", "aria-label"], pt = ["title"], mt = ["onMousedown"], ht = ["title", "aria-label"], gt = ["title", "aria-label"], _t = ["title", "aria-label"], vt = /* @__PURE__ */ n(/* @__PURE__ */ f({
893
+ ], xt = ["title", "aria-label"], St = ["aria-expanded", "title"], Ct = ["onMousedown"], wt = ["title", "aria-label"], Tt = ["title", "aria-label"], Et = ["title", "aria-label"], Dt = /* @__PURE__ */ n(/* @__PURE__ */ f({
849
894
  __name: "Toolbar",
850
895
  props: {
851
896
  view: {},
@@ -860,7 +905,8 @@ var ze = {
860
905
  commentsSidebarOpen: { type: Boolean },
861
906
  imageContext: {},
862
907
  theme: {},
863
- fontFamilies: {}
908
+ fontFamilies: {},
909
+ documentStyles: {}
864
910
  },
865
911
  emits: [
866
912
  "find-replace",
@@ -883,14 +929,14 @@ var ze = {
883
929
  "image-transform"
884
930
  ],
885
931
  setup(n, { emit: r }) {
886
- let f = n, { t: p } = e(), g = r, _ = a(() => f.zoomPercent ?? 100), y = a(() => f.isMinZoom ?? !1), C = a(() => f.isMaxZoom ?? !1), E = a(() => f.zoomPresets ?? Le), D = a(() => f.showZoomControl ?? !0), O = b(null), k = b(null), A = b(null), j = b(null), N = b(null), P = b(null), { openDropdown: F, dropdownMenuStyle: I, toggleDropdown: V } = Re({
887
- zoom: P,
932
+ let f = n, { t: p } = t(), g = r, _ = a(() => f.zoomPercent ?? 100), y = a(() => f.isMinZoom ?? !1), C = a(() => f.isMaxZoom ?? !1), E = a(() => f.zoomPresets ?? Be), D = a(() => f.showZoomControl ?? !0), O = b(null), k = b(null), A = b(null), N = b(null), P = b(null), F = b(null), { openDropdown: I, dropdownMenuStyle: V, toggleDropdown: H, recomputeDropdownPos: U } = Ve({
933
+ zoom: F,
888
934
  style: O,
889
935
  font: k,
890
936
  size: A,
891
- align: j,
892
- spacing: N
893
- }), H = a(() => {
937
+ align: N,
938
+ spacing: P
939
+ }), W = a(() => {
894
940
  f.stateTick;
895
941
  let e = f.view;
896
942
  return e ? ee(e.state) : {
@@ -905,55 +951,56 @@ var ze = {
905
951
  inInsertion: !1,
906
952
  inDeletion: !1
907
953
  };
908
- }), U = a(() => {
909
- let e = H.value.textFormatting.fontFamily;
954
+ }), G = a(() => {
955
+ let e = W.value.textFormatting.fontFamily;
910
956
  return e?.ascii || e?.hAnsi || "Arial";
911
- }), W = a(() => {
912
- let e = H.value.textFormatting.fontSize;
957
+ }), K = a(() => {
958
+ let e = W.value.textFormatting.fontSize;
913
959
  return e ? e / 2 : 11;
914
- }), G = a(() => H.value.paragraphFormatting.alignment || "left"), K = a(() => {
915
- switch (G.value) {
960
+ }), q = a(() => W.value.paragraphFormatting.alignment || "left"), J = a(() => {
961
+ switch (q.value) {
916
962
  case "center": return "format_align_center";
917
963
  case "right": return "format_align_right";
918
964
  case "both": return "format_align_justify";
919
965
  default: return "format_align_left";
920
966
  }
921
- }), q = a(() => {
922
- let e = H.value.paragraphFormatting.styleId || "Normal", t = Fe.find((t) => t.id === e);
923
- return t ? p(t.nameKey) : e;
924
- }), J = a(() => {
967
+ }), { resolvedParagraphStyles: Y, currentStyleLabel: X } = Ue({
968
+ documentStyles: () => f.documentStyles,
969
+ currentStyleId: () => W.value.paragraphFormatting.styleId || "Normal",
970
+ t: p
971
+ }), te = a(() => {
925
972
  f.stateTick;
926
973
  let e = f.view;
927
974
  return e ? R(e.state) > 0 : !1;
928
- }), te = a(() => {
975
+ }), ne = a(() => {
929
976
  f.stateTick;
930
977
  let e = f.view;
931
978
  return e ? L(e.state) > 0 : !1;
932
- }), Y = a(() => {
933
- let e = H.value, t = e.inList && (e.listLevel ?? 0) > 0, n = (e.paragraphFormatting.indentLeft ?? 0) > 0;
979
+ }), re = a(() => {
980
+ let e = W.value, t = e.inList && (e.listLevel ?? 0) > 0, n = (e.paragraphFormatting.indentLeft ?? 0) > 0;
934
981
  return t || n;
935
- }), ne = a(() => {
936
- let e = H.value.textFormatting.color?.rgb;
982
+ }), ie = a(() => {
983
+ let e = W.value.textFormatting.color?.rgb;
937
984
  return e ? e.replace(/^#/, "").toUpperCase() : void 0;
938
- }), re = a(() => {
939
- let e = H.value.textFormatting.highlight;
985
+ }), ae = a(() => {
986
+ let e = W.value.textFormatting.highlight;
940
987
  if (!(!e || e === "none")) return e.replace(/^#/, "").toUpperCase();
941
- }), X = a(() => B(f.fontFamilies) ?? Ne), ie = a(() => [
988
+ }), oe = a(() => B(f.fontFamilies) ?? Ie), se = a(() => [
942
989
  {
943
990
  label: p("font.sansSerif"),
944
- fonts: X.value.filter((e) => e.category === "sans-serif")
991
+ fonts: oe.value.filter((e) => e.category === "sans-serif")
945
992
  },
946
993
  {
947
994
  label: p("font.serif"),
948
- fonts: X.value.filter((e) => e.category === "serif")
995
+ fonts: oe.value.filter((e) => e.category === "serif")
949
996
  },
950
997
  {
951
998
  label: p("font.monospace"),
952
- fonts: X.value.filter((e) => e.category === "monospace")
999
+ fonts: oe.value.filter((e) => e.category === "monospace")
953
1000
  },
954
1001
  {
955
1002
  label: p("font.other"),
956
- fonts: X.value.filter((e) => !e.category || e.category === "other")
1003
+ fonts: oe.value.filter((e) => !e.category || e.category === "other")
957
1004
  }
958
1005
  ]);
959
1006
  function Z(e, ...t) {
@@ -964,139 +1011,143 @@ var ze = {
964
1011
  console.warn("[Toolbar] command not found:", e);
965
1012
  return;
966
1013
  }
967
- r(...t)(n.state, (e) => n.dispatch(e), n), n.hasFocus() || n.focus(), F.value = null;
1014
+ r(...t)(n.state, (e) => n.dispatch(e), n), n.hasFocus() || n.focus(), I.value = null;
968
1015
  }
969
- function ae(e) {
1016
+ function ce(e) {
970
1017
  Z("setFontFamily", e);
971
1018
  }
972
- function oe(e) {
973
- Z("setFontSize", e * 2);
974
- }
975
- function se() {
976
- let e = W.value;
977
- oe(Pe.find((t) => t > e) || e + 2);
978
- }
979
- function ce() {
980
- let e = W.value;
981
- oe([...Pe].reverse().find((t) => t < e) || Math.max(1, e - 2));
982
- }
983
- function le(e) {
1019
+ let { onSizeFocus: le, onSizeInput: ue, commitFontSize: de, pickFontSize: fe, increaseFontSize: pe, decreaseFontSize: me } = He({
1020
+ currentFontSize: K,
1021
+ openDropdown: I,
1022
+ recomputeDropdownPos: U,
1023
+ execCommand: Z
1024
+ });
1025
+ function he(e) {
984
1026
  if (typeof e == "object" && e.auto) {
985
1027
  Z("clearTextColor");
986
1028
  return;
987
1029
  }
988
1030
  Z("setTextColor", typeof e == "string" ? { rgb: e } : e);
989
1031
  }
990
- function ue() {
1032
+ function ge() {
991
1033
  let e = f.view;
992
1034
  e && (z(e.state, (t) => e.dispatch(t), e), e.hasFocus() || e.focus());
993
1035
  }
994
- function de(e) {
1036
+ function _e(e) {
995
1037
  Z("setHighlight", typeof e == "string" ? e : e.rgb ?? "none");
996
1038
  }
997
- function fe(e) {
998
- g("apply-style", e), F.value = null;
1039
+ function ve(e) {
1040
+ g("apply-style", e), I.value = null;
999
1041
  }
1000
- function pe(e) {
1042
+ function ye(e) {
1001
1043
  Z("setLineSpacing", e);
1002
1044
  }
1003
- function me(e) {
1004
- let t = H.value.paragraphFormatting.lineSpacing;
1045
+ function xe(e) {
1046
+ let t = W.value.paragraphFormatting.lineSpacing;
1005
1047
  return t ? Math.abs(t - e) < 10 : e === 240;
1006
1048
  }
1007
- return (e, r) => n.view ? (v(), c("div", ze, [
1049
+ return (t, r) => n.view ? (v(), c("div", We, [
1008
1050
  l("button", {
1009
1051
  title: T(p)("formattingBar.undoShortcut"),
1010
1052
  "aria-label": T(p)("formattingBar.undo"),
1011
- disabled: !J.value,
1053
+ disabled: !te.value,
1012
1054
  onMousedown: r[0] ||= M((e) => Z("undo"), ["prevent"])
1013
- }, [d(t, { name: "undo" })], 40, Be),
1055
+ }, [d(e, { name: "undo" })], 40, Ge),
1014
1056
  l("button", {
1015
1057
  title: T(p)("formattingBar.redoShortcut"),
1016
1058
  "aria-label": T(p)("formattingBar.redo"),
1017
- disabled: !te.value,
1059
+ disabled: !ne.value,
1018
1060
  onMousedown: r[1] ||= M((e) => Z("redo"), ["prevent"])
1019
- }, [d(t, { name: "redo" })], 40, Ve),
1020
- r[31] ||= l("span", { class: "divider" }, null, -1),
1061
+ }, [d(e, { name: "redo" })], 40, Ke),
1062
+ r[39] ||= l("span", { class: "divider" }, null, -1),
1021
1063
  D.value ? (v(), c("div", {
1022
1064
  key: 0,
1023
1065
  class: "toolbar-dropdown zoom-group",
1024
1066
  ref_key: "zoomDropdownRef",
1025
- ref: P
1067
+ ref: F
1026
1068
  }, [
1027
1069
  l("button", {
1028
1070
  class: "size-btn",
1029
- onMousedown: r[2] ||= M((t) => e.$emit("zoom-out"), ["prevent"]),
1071
+ onMousedown: r[2] ||= M((e) => t.$emit("zoom-out"), ["prevent"]),
1030
1072
  disabled: y.value,
1031
1073
  title: T(p)("zoom.zoomOut")
1032
- }, " − ", 40, He),
1074
+ }, " − ", 40, qe),
1033
1075
  l("button", {
1034
1076
  class: "toolbar-dropdown__trigger zoom-trigger",
1035
- onMousedown: r[3] ||= M((e) => T(V)("zoom"), ["prevent"]),
1077
+ onMousedown: r[3] ||= M((e) => T(H)("zoom"), ["prevent"]),
1078
+ "aria-expanded": T(I) === "zoom",
1079
+ "aria-haspopup": "listbox",
1036
1080
  title: T(p)("zoom.zoomLevel")
1037
- }, w(_.value) + "% ", 41, Ue),
1081
+ }, [u(w(_.value) + "% ", 1), d(e, {
1082
+ class: "chevron",
1083
+ name: "arrow_drop_down",
1084
+ size: 16
1085
+ })], 40, Je),
1038
1086
  l("button", {
1039
1087
  class: "size-btn",
1040
- onMousedown: r[4] ||= M((t) => e.$emit("zoom-in"), ["prevent"]),
1088
+ onMousedown: r[4] ||= M((e) => t.$emit("zoom-in"), ["prevent"]),
1041
1089
  disabled: C.value,
1042
1090
  title: T(p)("zoom.zoomIn")
1043
- }, " + ", 40, We),
1044
- T(F) === "zoom" ? (v(), c("div", {
1091
+ }, " + ", 40, Ye),
1092
+ T(I) === "zoom" ? (v(), c("div", {
1045
1093
  key: 0,
1046
- style: h(T(I)),
1094
+ style: h(T(V)),
1047
1095
  class: "toolbar-dropdown__menu zoom-menu"
1048
- }, [(v(!0), c(i, null, x(E.value, (t) => (v(), c("button", {
1049
- key: t,
1050
- class: m(["toolbar-dropdown__item", { active: _.value === Math.round(t * 100) }]),
1051
- onMousedown: M((n) => e.$emit("zoom-set", t), ["prevent"])
1052
- }, w(Math.round(t * 100)) + "% ", 43, Ge))), 128))], 4)) : s("", !0)
1096
+ }, [(v(!0), c(i, null, x(E.value, (e) => (v(), c("button", {
1097
+ key: e,
1098
+ class: m(["toolbar-dropdown__item", { active: _.value === Math.round(e * 100) }]),
1099
+ onMousedown: M((n) => t.$emit("zoom-set", e), ["prevent"])
1100
+ }, w(Math.round(e * 100)) + "% ", 43, Xe))), 128))], 4)) : s("", !0)
1053
1101
  ], 512)) : s("", !0),
1054
- r[32] ||= l("span", { class: "divider" }, null, -1),
1102
+ r[40] ||= l("span", { class: "divider" }, null, -1),
1055
1103
  l("div", {
1056
1104
  class: "toolbar-dropdown",
1057
1105
  ref_key: "styleDropdownRef",
1058
1106
  ref: O
1059
1107
  }, [l("button", {
1060
1108
  class: "toolbar-dropdown__trigger style-trigger",
1061
- onMousedown: r[5] ||= M((e) => T(V)("style"), ["prevent"]),
1109
+ onMousedown: r[5] ||= M((e) => T(H)("style"), ["prevent"]),
1110
+ "aria-expanded": T(I) === "style",
1111
+ "aria-haspopup": "listbox",
1062
1112
  title: T(p)("styles.selectAriaLabel")
1063
- }, [u(w(q.value) + " ", 1), d(t, {
1113
+ }, [u(w(T(X)) + " ", 1), d(e, {
1064
1114
  class: "chevron",
1065
1115
  name: "arrow_drop_down",
1066
1116
  size: 16
1067
- })], 40, Ke), T(F) === "style" ? (v(), c("div", {
1117
+ })], 40, Ze), T(I) === "style" ? (v(), c("div", {
1068
1118
  key: 0,
1069
- style: h(T(I)),
1119
+ style: h(T(V)),
1070
1120
  class: "toolbar-dropdown__menu style-menu"
1071
- }, [(v(!0), c(i, null, x(T(Fe), (e) => (v(), c("button", {
1121
+ }, [(v(!0), c(i, null, x(T(Y), (e) => (v(), c("button", {
1072
1122
  key: e.id,
1073
- class: m(["toolbar-dropdown__item", { active: (H.value.paragraphFormatting.styleId || "Normal") === e.id }]),
1074
- style: h(e.previewStyle),
1075
- onMousedown: M((t) => fe(e.id), ["prevent"])
1076
- }, w(T(p)(e.nameKey)), 47, qe))), 128))], 4)) : s("", !0)], 512),
1077
- r[33] ||= l("span", { class: "divider" }, null, -1),
1123
+ class: m(["toolbar-dropdown__item", { active: (W.value.paragraphFormatting.styleId || "Normal") === e.id }]),
1124
+ onMousedown: M((t) => ve(e.id), ["prevent"])
1125
+ }, [l("span", { style: h(e.previewStyle) }, w(e.label), 5)], 42, Qe))), 128))], 4)) : s("", !0)], 512),
1126
+ r[41] ||= l("span", { class: "divider" }, null, -1),
1078
1127
  l("div", {
1079
1128
  class: "toolbar-dropdown",
1080
1129
  ref_key: "fontDropdownRef",
1081
1130
  ref: k
1082
1131
  }, [l("button", {
1083
1132
  class: "toolbar-dropdown__trigger font-trigger",
1084
- onMousedown: r[6] ||= M((e) => T(V)("font"), ["prevent"]),
1133
+ onMousedown: r[6] ||= M((e) => T(H)("font"), ["prevent"]),
1134
+ "aria-expanded": T(I) === "font",
1135
+ "aria-haspopup": "listbox",
1085
1136
  title: T(p)("font.selectAriaLabel")
1086
- }, [u(w(U.value) + " ", 1), d(t, {
1137
+ }, [u(w(G.value) + " ", 1), d(e, {
1087
1138
  class: "chevron",
1088
1139
  name: "arrow_drop_down",
1089
1140
  size: 16
1090
- })], 40, Je), T(F) === "font" ? (v(), c("div", {
1141
+ })], 40, $e), T(I) === "font" ? (v(), c("div", {
1091
1142
  key: 0,
1092
- style: h(T(I)),
1143
+ style: h(T(V)),
1093
1144
  class: "toolbar-dropdown__menu font-menu"
1094
- }, [(v(!0), c(i, null, x(ie.value, (e) => (v(), c(i, { key: e.label }, [e.fonts.length > 0 ? (v(), c("div", Ye, w(e.label), 1)) : s("", !0), (v(!0), c(i, null, x(e.fonts, (e) => (v(), c("button", {
1145
+ }, [(v(!0), c(i, null, x(se.value, (e) => (v(), c(i, { key: e.label }, [e.fonts.length > 0 ? (v(), c("div", et, w(e.label), 1)) : s("", !0), (v(!0), c(i, null, x(e.fonts, (e) => (v(), c("button", {
1095
1146
  key: e.name,
1096
- class: m(["toolbar-dropdown__item", { active: U.value === e.name }]),
1147
+ class: m(["toolbar-dropdown__item", { active: G.value === e.name }]),
1097
1148
  style: h({ fontFamily: e.fontFamily }),
1098
- onMousedown: M((t) => ae(e.name), ["prevent"])
1099
- }, w(e.name), 47, Xe))), 128))], 64))), 128))], 4)) : s("", !0)], 512),
1149
+ onMousedown: M((t) => ce(e.name), ["prevent"])
1150
+ }, w(e.name), 47, tt))), 128))], 64))), 128))], 4)) : s("", !0)], 512),
1100
1151
  l("div", {
1101
1152
  class: "toolbar-dropdown font-size-group",
1102
1153
  ref_key: "sizeDropdownRef",
@@ -1104,218 +1155,238 @@ var ze = {
1104
1155
  }, [
1105
1156
  l("button", {
1106
1157
  class: "size-btn",
1107
- onMousedown: M(ce, ["prevent"]),
1158
+ onMousedown: r[7] ||= M((...e) => T(me) && T(me)(...e), ["prevent"]),
1108
1159
  title: T(p)("fontSize.decrease")
1109
- }, " − ", 40, Ze),
1110
- l("button", {
1111
- class: "toolbar-dropdown__trigger size-trigger",
1112
- onMousedown: r[7] ||= M((e) => T(V)("size"), ["prevent"]),
1113
- title: T(p)("fontSize.label")
1114
- }, w(W.value), 41, Qe),
1160
+ }, " − ", 40, nt),
1161
+ l("input", {
1162
+ class: "size-trigger size-input",
1163
+ type: "text",
1164
+ value: K.value,
1165
+ title: T(p)("fontSize.label"),
1166
+ onMousedown: r[8] ||= M(() => {}, ["stop"]),
1167
+ onFocus: r[9] ||= (...e) => T(le) && T(le)(...e),
1168
+ "aria-expanded": T(I) === "size",
1169
+ "aria-haspopup": "listbox",
1170
+ onInput: r[10] ||= (...e) => T(ue) && T(ue)(...e),
1171
+ onKeydown: [
1172
+ r[11] ||= j(M((e) => T(pe)(), ["prevent", "stop"]), ["up"]),
1173
+ r[12] ||= j(M((e) => T(me)(), ["prevent", "stop"]), ["down"]),
1174
+ r[13] ||= j(M((e) => T(de)(e), ["prevent"]), ["enter"])
1175
+ ],
1176
+ onBlur: r[14] ||= (e) => T(de)(e)
1177
+ }, null, 40, rt),
1115
1178
  l("button", {
1116
1179
  class: "size-btn",
1117
- onMousedown: M(se, ["prevent"]),
1180
+ onMousedown: r[15] ||= M((...e) => T(pe) && T(pe)(...e), ["prevent"]),
1118
1181
  title: T(p)("fontSize.increase")
1119
- }, " + ", 40, $e),
1120
- T(F) === "size" ? (v(), c("div", {
1182
+ }, " + ", 40, it),
1183
+ T(I) === "size" ? (v(), c("div", {
1121
1184
  key: 0,
1122
- style: h(T(I)),
1185
+ style: h(T(V)),
1123
1186
  class: "toolbar-dropdown__menu size-menu"
1124
- }, [(v(!0), c(i, null, x(T(Pe), (e) => (v(), c("button", {
1187
+ }, [(v(!0), c(i, null, x(T(Le), (e) => (v(), c("button", {
1125
1188
  key: e,
1126
- class: m(["toolbar-dropdown__item", { active: W.value === e }]),
1127
- onMousedown: M((t) => oe(e), ["prevent"])
1128
- }, w(e), 43, et))), 128))], 4)) : s("", !0)
1189
+ class: m(["toolbar-dropdown__item", { active: K.value === e }]),
1190
+ onMousedown: M((t) => T(fe)(e), ["prevent"])
1191
+ }, w(e), 43, at))), 128))], 4)) : s("", !0)
1129
1192
  ], 512),
1130
- r[34] ||= l("span", { class: "divider" }, null, -1),
1193
+ r[42] ||= l("span", { class: "divider" }, null, -1),
1131
1194
  l("button", {
1132
1195
  title: T(p)("formattingBar.boldShortcut"),
1133
1196
  "aria-label": T(p)("formattingBar.bold"),
1134
- class: m({ active: H.value.textFormatting.bold }),
1135
- onMousedown: r[8] ||= M((e) => Z("toggleBold"), ["prevent"])
1136
- }, [d(t, { name: "format_bold" })], 42, tt),
1197
+ class: m({ active: W.value.textFormatting.bold }),
1198
+ onMousedown: r[16] ||= M((e) => Z("toggleBold"), ["prevent"])
1199
+ }, [d(e, { name: "format_bold" })], 42, ot),
1137
1200
  l("button", {
1138
1201
  title: T(p)("formattingBar.italicShortcut"),
1139
1202
  "aria-label": T(p)("formattingBar.italic"),
1140
- class: m({ active: H.value.textFormatting.italic }),
1141
- onMousedown: r[9] ||= M((e) => Z("toggleItalic"), ["prevent"])
1142
- }, [d(t, { name: "format_italic" })], 42, nt),
1203
+ class: m({ active: W.value.textFormatting.italic }),
1204
+ onMousedown: r[17] ||= M((e) => Z("toggleItalic"), ["prevent"])
1205
+ }, [d(e, { name: "format_italic" })], 42, st),
1143
1206
  l("button", {
1144
1207
  title: T(p)("formattingBar.underlineShortcut"),
1145
1208
  "aria-label": T(p)("formattingBar.underline"),
1146
- class: m({ active: !!H.value.textFormatting.underline }),
1147
- onMousedown: r[10] ||= M((e) => Z("toggleUnderline"), ["prevent"])
1148
- }, [d(t, { name: "format_underlined" })], 42, rt),
1209
+ class: m({ active: !!W.value.textFormatting.underline }),
1210
+ onMousedown: r[18] ||= M((e) => Z("toggleUnderline"), ["prevent"])
1211
+ }, [d(e, { name: "format_underlined" })], 42, ct),
1149
1212
  l("button", {
1150
1213
  title: T(p)("formattingBar.strikethrough"),
1151
1214
  "aria-label": T(p)("formattingBar.strikethrough"),
1152
- class: m({ active: H.value.textFormatting.strike }),
1153
- onMousedown: r[11] ||= M((e) => Z("toggleStrike"), ["prevent"])
1154
- }, [d(t, { name: "strikethrough_s" })], 42, it),
1155
- d(_e, {
1215
+ class: m({ active: W.value.textFormatting.strike }),
1216
+ onMousedown: r[19] ||= M((e) => Z("toggleStrike"), ["prevent"])
1217
+ }, [d(e, { name: "strikethrough_s" })], 42, lt),
1218
+ d(be, {
1156
1219
  mode: "text",
1157
- value: ne.value,
1220
+ value: ie.value,
1158
1221
  theme: n.theme ?? null,
1159
- onChange: le
1222
+ onChange: he
1160
1223
  }, null, 8, ["value", "theme"]),
1161
- d(_e, {
1224
+ d(be, {
1162
1225
  mode: "highlight",
1163
- value: re.value,
1226
+ value: ae.value,
1164
1227
  theme: n.theme ?? null,
1165
- onChange: de
1228
+ onChange: _e
1166
1229
  }, null, 8, ["value", "theme"]),
1167
1230
  l("button", {
1168
1231
  title: T(p)("formattingBar.insertLinkShortcut"),
1169
1232
  "aria-label": T(p)("formattingBar.insertLink"),
1170
- onMousedown: r[12] ||= M((t) => e.$emit("insert-link"), ["prevent"])
1171
- }, [d(t, { name: "link" })], 40, at),
1233
+ onMousedown: r[20] ||= M((e) => t.$emit("insert-link"), ["prevent"])
1234
+ }, [d(e, { name: "link" })], 40, ut),
1172
1235
  l("button", {
1173
1236
  title: T(p)("formattingBar.superscriptShortcut"),
1174
1237
  "aria-label": T(p)("formattingBar.superscript"),
1175
- class: m({ active: H.value.textFormatting.vertAlign === "superscript" }),
1176
- onMousedown: r[13] ||= M((e) => Z("toggleSuperscript"), ["prevent"])
1177
- }, [d(t, { name: "superscript" })], 42, ot),
1238
+ class: m({ active: W.value.textFormatting.vertAlign === "superscript" }),
1239
+ onMousedown: r[21] ||= M((e) => Z("toggleSuperscript"), ["prevent"])
1240
+ }, [d(e, { name: "superscript" })], 42, dt),
1178
1241
  l("button", {
1179
1242
  title: T(p)("formattingBar.subscriptShortcut"),
1180
1243
  "aria-label": T(p)("formattingBar.subscript"),
1181
- class: m({ active: H.value.textFormatting.vertAlign === "subscript" }),
1182
- onMousedown: r[14] ||= M((e) => Z("toggleSubscript"), ["prevent"])
1183
- }, [d(t, { name: "subscript" })], 42, st),
1184
- r[35] ||= l("span", { class: "divider" }, null, -1),
1244
+ class: m({ active: W.value.textFormatting.vertAlign === "subscript" }),
1245
+ onMousedown: r[22] ||= M((e) => Z("toggleSubscript"), ["prevent"])
1246
+ }, [d(e, { name: "subscript" })], 42, ft),
1247
+ r[43] ||= l("span", { class: "divider" }, null, -1),
1185
1248
  l("div", {
1186
1249
  class: "toolbar-dropdown",
1187
1250
  ref_key: "alignDropdownRef",
1188
- ref: j
1251
+ ref: N
1189
1252
  }, [l("button", {
1190
1253
  class: "toolbar-dropdown__trigger align-trigger",
1191
- onMousedown: r[15] ||= M((e) => T(V)("align"), ["prevent"]),
1254
+ onMousedown: r[23] ||= M((e) => T(H)("align"), ["prevent"]),
1255
+ "aria-expanded": T(I) === "align",
1256
+ "aria-haspopup": "listbox",
1192
1257
  title: T(p)("formattingBar.groups.alignment")
1193
- }, [d(t, { name: K.value }, null, 8, ["name"]), d(t, {
1258
+ }, [d(e, { name: J.value }, null, 8, ["name"]), d(e, {
1194
1259
  class: "chevron",
1195
1260
  name: "arrow_drop_down",
1196
1261
  size: 16
1197
- })], 40, ct), T(F) === "align" ? (v(), c("div", {
1262
+ })], 40, pt), T(I) === "align" ? (v(), c("div", {
1198
1263
  key: 0,
1199
- style: h(T(I)),
1200
- class: "toolbar-dropdown__menu align-menu"
1264
+ style: h(T(V)),
1265
+ class: "toolbar-dropdown__menu align-strip"
1201
1266
  }, [
1202
1267
  l("button", {
1203
- class: m(["toolbar-dropdown__item dropdown-item--icon", { active: G.value === "left" }]),
1204
- onMousedown: r[16] ||= M((e) => {
1205
- Z("alignLeft"), F.value = null;
1268
+ class: m(["align-strip__btn", { active: q.value === "left" }]),
1269
+ title: `${T(p)("alignment.alignLeft")} (${T(p)("alignment.alignLeftShortcut")})`,
1270
+ onMousedown: r[24] ||= M((e) => {
1271
+ Z("alignLeft"), I.value = null;
1206
1272
  }, ["prevent"])
1207
- }, [d(t, {
1273
+ }, [d(e, {
1208
1274
  name: "format_align_left",
1209
1275
  size: 18
1210
- }), u(" " + w(T(p)("alignment.alignLeft")) + " (" + w(T(p)("alignment.alignLeftShortcut")) + ") ", 1)], 34),
1276
+ })], 42, mt),
1211
1277
  l("button", {
1212
- class: m(["toolbar-dropdown__item dropdown-item--icon", { active: G.value === "center" }]),
1213
- onMousedown: r[17] ||= M((e) => {
1214
- Z("alignCenter"), F.value = null;
1278
+ class: m(["align-strip__btn", { active: q.value === "center" }]),
1279
+ title: `${T(p)("alignment.center")} (${T(p)("alignment.centerShortcut")})`,
1280
+ onMousedown: r[25] ||= M((e) => {
1281
+ Z("alignCenter"), I.value = null;
1215
1282
  }, ["prevent"])
1216
- }, [d(t, {
1283
+ }, [d(e, {
1217
1284
  name: "format_align_center",
1218
1285
  size: 18
1219
- }), u(" " + w(T(p)("alignment.center")) + " (" + w(T(p)("alignment.centerShortcut")) + ") ", 1)], 34),
1286
+ })], 42, ht),
1220
1287
  l("button", {
1221
- class: m(["toolbar-dropdown__item dropdown-item--icon", { active: G.value === "right" }]),
1222
- onMousedown: r[18] ||= M((e) => {
1223
- Z("alignRight"), F.value = null;
1288
+ class: m(["align-strip__btn", { active: q.value === "right" }]),
1289
+ title: `${T(p)("alignment.alignRight")} (${T(p)("alignment.alignRightShortcut")})`,
1290
+ onMousedown: r[26] ||= M((e) => {
1291
+ Z("alignRight"), I.value = null;
1224
1292
  }, ["prevent"])
1225
- }, [d(t, {
1293
+ }, [d(e, {
1226
1294
  name: "format_align_right",
1227
1295
  size: 18
1228
- }), u(" " + w(T(p)("alignment.alignRight")) + " (" + w(T(p)("alignment.alignRightShortcut")) + ") ", 1)], 34),
1296
+ })], 42, gt),
1229
1297
  l("button", {
1230
- class: m(["toolbar-dropdown__item dropdown-item--icon", { active: G.value === "both" }]),
1231
- onMousedown: r[19] ||= M((e) => {
1232
- Z("alignJustify"), F.value = null;
1298
+ class: m(["align-strip__btn", { active: q.value === "both" }]),
1299
+ title: `${T(p)("alignment.justify")} (${T(p)("alignment.justifyShortcut")})`,
1300
+ onMousedown: r[27] ||= M((e) => {
1301
+ Z("alignJustify"), I.value = null;
1233
1302
  }, ["prevent"])
1234
- }, [d(t, {
1303
+ }, [d(e, {
1235
1304
  name: "format_align_justify",
1236
1305
  size: 18
1237
- }), u(" " + w(T(p)("alignment.justify")) + " (" + w(T(p)("alignment.justifyShortcut")) + ") ", 1)], 34)
1306
+ })], 42, _t)
1238
1307
  ], 4)) : s("", !0)], 512),
1239
1308
  l("button", {
1240
1309
  title: T(p)("lists.bulletList"),
1241
1310
  "aria-label": T(p)("lists.bulletList"),
1242
- class: m({ active: H.value.inList && H.value.listType === "bullet" }),
1243
- onMousedown: r[20] ||= M((e) => Z("toggleBulletList"), ["prevent"])
1244
- }, [d(t, { name: "format_list_bulleted" })], 42, lt),
1311
+ class: m({ active: W.value.inList && W.value.listType === "bullet" }),
1312
+ onMousedown: r[28] ||= M((e) => Z("toggleBulletList"), ["prevent"])
1313
+ }, [d(e, { name: "format_list_bulleted" })], 42, vt),
1245
1314
  l("button", {
1246
1315
  title: T(p)("lists.numberedList"),
1247
1316
  "aria-label": T(p)("lists.numberedList"),
1248
- class: m({ active: H.value.inList && H.value.listType === "numbered" }),
1249
- onMousedown: r[21] ||= M((e) => Z("toggleNumberedList"), ["prevent"])
1250
- }, [d(t, { name: "format_list_numbered" })], 42, ut),
1317
+ class: m({ active: W.value.inList && W.value.listType === "numbered" }),
1318
+ onMousedown: r[29] ||= M((e) => Z("toggleNumberedList"), ["prevent"])
1319
+ }, [d(e, { name: "format_list_numbered" })], 42, yt),
1251
1320
  l("button", {
1252
1321
  title: T(p)("lists.decreaseIndent"),
1253
1322
  "aria-label": T(p)("lists.decreaseIndent"),
1254
- disabled: !Y.value,
1255
- onMousedown: r[22] ||= M((e) => Z("outdent"), ["prevent"])
1256
- }, [d(t, { name: "format_indent_decrease" })], 40, dt),
1323
+ disabled: !re.value,
1324
+ onMousedown: r[30] ||= M((e) => Z("outdent"), ["prevent"])
1325
+ }, [d(e, { name: "format_indent_decrease" })], 40, bt),
1257
1326
  l("button", {
1258
1327
  title: T(p)("lists.increaseIndent"),
1259
1328
  "aria-label": T(p)("lists.increaseIndent"),
1260
- onMousedown: r[23] ||= M((e) => Z("indent"), ["prevent"])
1261
- }, [d(t, { name: "format_indent_increase" })], 40, ft),
1329
+ onMousedown: r[31] ||= M((e) => Z("indent"), ["prevent"])
1330
+ }, [d(e, { name: "format_indent_increase" })], 40, xt),
1262
1331
  l("div", {
1263
1332
  class: "toolbar-dropdown",
1264
1333
  ref_key: "spacingDropdownRef",
1265
- ref: N
1334
+ ref: P
1266
1335
  }, [l("button", {
1267
1336
  class: "toolbar-dropdown__trigger",
1268
- onMousedown: r[24] ||= M((e) => T(V)("spacing"), ["prevent"]),
1337
+ onMousedown: r[32] ||= M((e) => T(H)("spacing"), ["prevent"]),
1338
+ "aria-expanded": T(I) === "spacing",
1339
+ "aria-haspopup": "listbox",
1269
1340
  title: T(p)("lineSpacing.label")
1270
- }, [d(t, { name: "format_line_spacing" }), d(t, {
1341
+ }, [d(e, { name: "format_line_spacing" }), d(e, {
1271
1342
  class: "chevron",
1272
1343
  name: "arrow_drop_down",
1273
1344
  size: 16
1274
- })], 40, pt), T(F) === "spacing" ? (v(), c("div", {
1345
+ })], 40, St), T(I) === "spacing" ? (v(), c("div", {
1275
1346
  key: 0,
1276
- style: h(T(I)),
1347
+ style: h(T(V)),
1277
1348
  class: "toolbar-dropdown__menu"
1278
- }, [(v(!0), c(i, null, x(T(Ie), (e) => (v(), c("button", {
1349
+ }, [(v(!0), c(i, null, x(T(ze), (e) => (v(), c("button", {
1279
1350
  key: e.value,
1280
- class: m(["toolbar-dropdown__item", { active: me(e.value) }]),
1281
- onMousedown: M((t) => pe(e.value), ["prevent"])
1282
- }, w(e.labelKey ? T(p)(e.labelKey) : e.label), 43, mt))), 128))], 4)) : s("", !0)], 512),
1351
+ class: m(["toolbar-dropdown__item", { active: xe(e.value) }]),
1352
+ onMousedown: M((t) => ye(e.value), ["prevent"])
1353
+ }, w(e.labelKey ? T(p)(e.labelKey) : e.label), 43, Ct))), 128))], 4)) : s("", !0)], 512),
1283
1354
  l("button", {
1284
1355
  title: T(p)("formattingBar.clearFormatting"),
1285
1356
  "aria-label": T(p)("formattingBar.clearFormatting"),
1286
- onMousedown: M(ue, ["prevent"])
1287
- }, [d(t, { name: "format_clear" })], 40, ht),
1288
- r[36] ||= l("span", { class: "divider" }, null, -1),
1357
+ onMousedown: M(ge, ["prevent"])
1358
+ }, [d(e, { name: "format_clear" })], 40, wt),
1359
+ r[44] ||= l("span", { class: "divider" }, null, -1),
1289
1360
  l("button", {
1290
1361
  title: T(p)("formattingBar.commentsAndChanges"),
1291
1362
  "aria-label": T(p)("formattingBar.commentsAndChanges"),
1292
1363
  class: m({ active: n.commentsSidebarOpen }),
1293
- onMousedown: r[25] ||= M((t) => e.$emit("toggle-sidebar"), ["prevent"])
1294
- }, [d(t, { name: "comment" })], 42, gt),
1364
+ onMousedown: r[33] ||= M((e) => t.$emit("toggle-sidebar"), ["prevent"])
1365
+ }, [d(e, { name: "comment" })], 42, Tt),
1295
1366
  n.imageContext ? (v(), c(i, { key: 1 }, [
1296
- r[30] ||= l("span", { class: "divider" }, null, -1),
1297
- d(je, {
1367
+ r[38] ||= l("span", { class: "divider" }, null, -1),
1368
+ d(Pe, {
1298
1369
  "image-context": n.imageContext,
1299
- onChange: r[26] ||= (t) => e.$emit("image-wrap-type", t)
1370
+ onChange: r[34] ||= (e) => t.$emit("image-wrap-type", e)
1300
1371
  }, null, 8, ["image-context"]),
1301
- d(Me, { onTransform: r[27] ||= (t) => e.$emit("image-transform", t) }),
1372
+ d(Fe, { onTransform: r[35] ||= (e) => t.$emit("image-transform", e) }),
1302
1373
  l("button", {
1303
1374
  title: T(p)("formattingBar.imagePropertiesShortcut"),
1304
1375
  "aria-label": T(p)("formattingBar.imageProperties"),
1305
- onMousedown: r[28] ||= M((t) => e.$emit("image-properties"), ["prevent"])
1306
- }, [d(t, { name: "tune" })], 40, _t)
1376
+ onMousedown: r[36] ||= M((e) => t.$emit("image-properties"), ["prevent"])
1377
+ }, [d(e, { name: "tune" })], 40, Et)
1307
1378
  ], 64)) : s("", !0),
1308
- S(e.$slots, "table-context", {}, void 0, !0),
1309
- r[37] ||= l("span", { class: "divider" }, null, -1),
1310
- n.editorMode ? (v(), o(Ee, {
1379
+ S(t.$slots, "table-context", {}, void 0, !0),
1380
+ r[45] ||= l("span", { class: "divider" }, null, -1),
1381
+ n.editorMode ? (v(), o(ke, {
1311
1382
  key: 2,
1312
1383
  "model-value": n.editorMode,
1313
- "onUpdate:modelValue": r[29] ||= (t) => e.$emit("mode-change", t)
1384
+ "onUpdate:modelValue": r[37] ||= (e) => t.$emit("mode-change", e)
1314
1385
  }, null, 8, ["model-value"])) : s("", !0),
1315
- S(e.$slots, "toolbar-extra", {}, void 0, !0)
1386
+ S(t.$slots, "toolbar-extra", {}, void 0, !0)
1316
1387
  ])) : s("", !0);
1317
1388
  }
1318
- }), [["__scopeId", "data-v-9c584674"]]), yt = /* @__PURE__ */ f({
1389
+ }), [["__scopeId", "data-v-8271d639"]]), Ot = /* @__PURE__ */ f({
1319
1390
  __name: "TableCellFillPicker",
1320
1391
  props: {
1321
1392
  disabled: { type: Boolean },
@@ -1323,16 +1394,16 @@ var ze = {
1323
1394
  value: {}
1324
1395
  },
1325
1396
  emits: ["change"],
1326
- setup(t, { emit: n }) {
1327
- let r = n, { t: i } = e();
1397
+ setup(e, { emit: n }) {
1398
+ let r = n, { t: i } = t();
1328
1399
  function a(e) {
1329
1400
  typeof e == "string" && r("change", e === "none" ? "" : e.replace(/^#/, ""));
1330
1401
  }
1331
- return (e, n) => (v(), o(_e, {
1402
+ return (t, n) => (v(), o(be, {
1332
1403
  mode: "highlight",
1333
- value: t.value,
1334
- theme: t.theme ?? null,
1335
- disabled: t.disabled,
1404
+ value: e.value,
1405
+ theme: e.theme ?? null,
1406
+ disabled: e.disabled,
1336
1407
  title: T(i)("table.cellFillColor"),
1337
1408
  icon: "format_color_fill",
1338
1409
  "auto-label": T(i)("colorPicker.noColor"),
@@ -1345,11 +1416,11 @@ var ze = {
1345
1416
  "auto-label"
1346
1417
  ]));
1347
1418
  }
1348
- }), bt = ["disabled", "onClick"], xt = { class: "docx-tbp__panel" }, St = ["title", "onClick"], Ct = /* @__PURE__ */ n(/* @__PURE__ */ f({
1419
+ }), kt = ["disabled", "onClick"], At = { class: "docx-tbp__panel" }, jt = ["title", "onClick"], Mt = /* @__PURE__ */ n(/* @__PURE__ */ f({
1349
1420
  __name: "TableBorderPicker",
1350
1421
  props: { disabled: { type: Boolean } },
1351
1422
  emits: ["change"],
1352
- setup(e, { emit: n }) {
1423
+ setup(t, { emit: n }) {
1353
1424
  let r = n, a = b(!1), s = [
1354
1425
  {
1355
1426
  value: "all",
@@ -1413,27 +1484,27 @@ var ze = {
1413
1484
  trigger: k(({ toggle: n }) => [l("button", {
1414
1485
  type: "button",
1415
1486
  class: "docx-tbp__btn",
1416
- disabled: e.disabled,
1487
+ disabled: t.disabled,
1417
1488
  title: "Borders",
1418
1489
  onClick: M(n, ["prevent"])
1419
- }, [d(t, {
1490
+ }, [d(e, {
1420
1491
  name: "border_all",
1421
1492
  size: 20
1422
- })], 8, bt)]),
1423
- panel: k(() => [l("div", xt, [(v(), c(i, null, x(s, (e) => l("button", {
1424
- key: e.value,
1493
+ })], 8, kt)]),
1494
+ panel: k(() => [l("div", At, [(v(), c(i, null, x(s, (t) => l("button", {
1495
+ key: t.value,
1425
1496
  type: "button",
1426
1497
  class: "docx-tbp__option",
1427
- title: e.label,
1428
- onClick: M((t) => u(e.value), ["prevent"])
1429
- }, [d(t, {
1430
- name: e.icon,
1498
+ title: t.label,
1499
+ onClick: M((e) => u(t.value), ["prevent"])
1500
+ }, [d(e, {
1501
+ name: t.icon,
1431
1502
  size: 20
1432
- }, null, 8, ["name"])], 8, St)), 64))])]),
1503
+ }, null, 8, ["name"])], 8, jt)), 64))])]),
1433
1504
  _: 1
1434
1505
  }, 8, ["open"]));
1435
1506
  }
1436
- }), [["__scopeId", "data-v-51d7b6e0"]]), wt = /* @__PURE__ */ f({
1507
+ }), [["__scopeId", "data-v-47032801"]]), Nt = /* @__PURE__ */ f({
1437
1508
  __name: "TableBorderColorPicker",
1438
1509
  props: {
1439
1510
  disabled: { type: Boolean },
@@ -1441,16 +1512,16 @@ var ze = {
1441
1512
  value: {}
1442
1513
  },
1443
1514
  emits: ["change"],
1444
- setup(t, { emit: n }) {
1445
- let r = n, { t: i } = e();
1515
+ setup(e, { emit: n }) {
1516
+ let r = n, { t: i } = t();
1446
1517
  function a(e) {
1447
1518
  typeof e == "string" ? r("change", e.replace(/^#/, "")) : e.rgb ? r("change", e.rgb.replace(/^#/, "")) : e.auto && r("change", "000000");
1448
1519
  }
1449
- return (e, n) => (v(), o(_e, {
1520
+ return (t, n) => (v(), o(be, {
1450
1521
  mode: "border",
1451
- value: t.value,
1452
- theme: t.theme ?? null,
1453
- disabled: t.disabled,
1522
+ value: e.value,
1523
+ theme: e.theme ?? null,
1524
+ disabled: e.disabled,
1454
1525
  title: T(i)("table.borderColor"),
1455
1526
  onChange: a
1456
1527
  }, null, 8, [
@@ -1460,11 +1531,11 @@ var ze = {
1460
1531
  "title"
1461
1532
  ]));
1462
1533
  }
1463
- }), Tt = ["disabled", "onClick"], Et = { class: "docx-tbwidth__panel" }, Dt = ["onClick"], Ot = { class: "docx-tbwidth__label" }, kt = /* @__PURE__ */ n(/* @__PURE__ */ f({
1534
+ }), Pt = ["disabled", "onClick"], Ft = { class: "docx-tbwidth__panel" }, It = ["onClick"], Lt = { class: "docx-tbwidth__label" }, Rt = /* @__PURE__ */ n(/* @__PURE__ */ f({
1464
1535
  __name: "TableBorderWidthPicker",
1465
1536
  props: { disabled: { type: Boolean } },
1466
1537
  emits: ["change"],
1467
- setup(e, { emit: n }) {
1538
+ setup(t, { emit: n }) {
1468
1539
  let r = n, a = b(!1), s = [
1469
1540
  {
1470
1541
  label: "0.5pt",
@@ -1518,14 +1589,14 @@ var ze = {
1518
1589
  trigger: k(({ toggle: n }) => [l("button", {
1519
1590
  type: "button",
1520
1591
  class: "docx-tbwidth__btn",
1521
- disabled: e.disabled,
1592
+ disabled: t.disabled,
1522
1593
  title: "Border width",
1523
1594
  onClick: M(n, ["prevent"])
1524
- }, [d(t, {
1595
+ }, [d(e, {
1525
1596
  name: "line_weight",
1526
1597
  size: 20
1527
- })], 8, Tt)]),
1528
- panel: k(() => [l("div", Et, [(v(), c(i, null, x(s, (e) => l("button", {
1598
+ })], 8, Pt)]),
1599
+ panel: k(() => [l("div", Ft, [(v(), c(i, null, x(s, (e) => l("button", {
1529
1600
  key: e.eighths,
1530
1601
  type: "button",
1531
1602
  class: "docx-tbwidth__option",
@@ -1533,27 +1604,27 @@ var ze = {
1533
1604
  }, [l("span", {
1534
1605
  class: "docx-tbwidth__preview",
1535
1606
  style: h({ borderTopWidth: e.previewPx + "px" })
1536
- }, null, 4), l("span", Ot, w(e.label), 1)], 8, Dt)), 64))])]),
1607
+ }, null, 4), l("span", Lt, w(e.label), 1)], 8, It)), 64))])]),
1537
1608
  _: 1
1538
1609
  }, 8, ["open"]));
1539
1610
  }
1540
- }), [["__scopeId", "data-v-c134095d"]]), At = [
1611
+ }), [["__scopeId", "data-v-f11ca0b1"]]), zt = [
1541
1612
  "disabled",
1542
1613
  "title",
1543
1614
  "onClick"
1544
- ], jt = ["aria-label"], Mt = ["disabled"], Nt = ["disabled"], Pt = ["disabled"], Ft = ["disabled"], It = { class: "docx-tmore__section-label" }, Lt = { class: "docx-tmore__icon-row" }, Rt = ["title"], zt = ["title"], Bt = ["title"], Vt = { class: "docx-tmore__section-label" }, Ht = { class: "docx-tmore__icon-row" }, Ut = ["title"], Wt = ["title"], Gt = ["title"], Kt = { class: "docx-tmore__grow" }, qt = {
1615
+ ], Bt = ["aria-label"], Vt = ["disabled"], Ht = ["disabled"], Ut = ["disabled"], Wt = ["disabled"], Gt = { class: "docx-tmore__section-label" }, Kt = { class: "docx-tmore__icon-row" }, qt = ["title"], Jt = ["title"], Yt = ["title"], Xt = { class: "docx-tmore__section-label" }, Zt = { class: "docx-tmore__icon-row" }, Qt = ["title"], $t = ["title"], en = ["title"], tn = { class: "docx-tmore__grow" }, nn = {
1545
1616
  key: 0,
1546
1617
  class: "docx-tmore__sub"
1547
- }, Jt = { class: "docx-tmore__margin-grid" }, Yt = { class: "docx-tmore__field-label" }, Xt = ["onUpdate:modelValue"], Zt = { class: "docx-tmore__grow" }, Qt = {
1618
+ }, rn = { class: "docx-tmore__margin-grid" }, an = { class: "docx-tmore__field-label" }, on = ["onUpdate:modelValue"], sn = { class: "docx-tmore__grow" }, cn = {
1548
1619
  key: 1,
1549
1620
  class: "docx-tmore__sub"
1550
- }, $t = { class: "docx-tmore__row-field" }, en = { class: "docx-tmore__field-label" }, tn = { value: "auto" }, nn = { value: "atLeast" }, rn = { value: "exact" }, an = {
1621
+ }, ln = { class: "docx-tmore__row-field" }, un = { class: "docx-tmore__field-label" }, dn = { value: "auto" }, fn = { value: "atLeast" }, pn = { value: "exact" }, mn = {
1551
1622
  key: 0,
1552
1623
  class: "docx-tmore__row-field"
1553
- }, on = { class: "docx-tmore__field-label" }, sn = { class: "docx-tmore__grow" }, cn = {
1624
+ }, hn = { class: "docx-tmore__field-label" }, gn = { class: "docx-tmore__grow" }, _n = {
1554
1625
  key: 2,
1555
1626
  class: "docx-tmore__sub docx-tmore__sub--list"
1556
- }, ln = /* @__PURE__ */ n(/* @__PURE__ */ f({
1627
+ }, vn = /* @__PURE__ */ n(/* @__PURE__ */ f({
1557
1628
  __name: "TableMoreDropdown",
1558
1629
  props: {
1559
1630
  disabled: {
@@ -1579,7 +1650,7 @@ var ze = {
1579
1650
  "row-height"
1580
1651
  ],
1581
1652
  setup(n, { emit: r }) {
1582
- let a = n, u = r, { t: f } = e(), p = b(!1), h = b(!1), g = b(!1), _ = b(!1), S = y({
1653
+ let a = n, u = r, { t: f } = t(), p = b(!1), h = b(!1), g = b(!1), _ = b(!1), S = y({
1583
1654
  top: 0,
1584
1655
  bottom: 0,
1585
1656
  left: 108,
@@ -1616,22 +1687,22 @@ var ze = {
1616
1687
  function R(e) {
1617
1688
  u("cell-text-direction", e), p.value = !1;
1618
1689
  }
1619
- return (e, r) => (v(), o(Q, {
1690
+ return (t, r) => (v(), o(Q, {
1620
1691
  open: p.value,
1621
1692
  placement: "bottom-right",
1622
1693
  "onUpdate:open": r[34] ||= (e) => p.value = e,
1623
1694
  onClose: r[35] ||= (e) => p.value = !1
1624
1695
  }, {
1625
- trigger: k(({ toggle: e }) => [l("button", {
1696
+ trigger: k(({ toggle: t }) => [l("button", {
1626
1697
  type: "button",
1627
1698
  class: m(["docx-tmore__btn", { "docx-tmore__btn--open": p.value }]),
1628
1699
  disabled: n.disabled,
1629
1700
  title: T(f)("tableAdvanced.tableOptions"),
1630
- onClick: M(e, ["prevent"])
1631
- }, [d(t, {
1701
+ onClick: M(t, ["prevent"])
1702
+ }, [d(e, {
1632
1703
  name: "more_vert",
1633
1704
  size: 20
1634
- })], 10, At)]),
1705
+ })], 10, zt)]),
1635
1706
  panel: k(() => [l("div", {
1636
1707
  class: "docx-tmore__panel",
1637
1708
  role: "menu",
@@ -1641,7 +1712,7 @@ var ze = {
1641
1712
  type: "button",
1642
1713
  class: "docx-tmore__item",
1643
1714
  onClick: r[0] ||= M((e) => P("addRowAbove"), ["prevent"])
1644
- }, [d(t, {
1715
+ }, [d(e, {
1645
1716
  name: "add",
1646
1717
  size: 18
1647
1718
  }), l("span", null, w(T(f)("table.insertRowAbove")), 1)]),
@@ -1649,7 +1720,7 @@ var ze = {
1649
1720
  type: "button",
1650
1721
  class: "docx-tmore__item",
1651
1722
  onClick: r[1] ||= M((e) => P("addRowBelow"), ["prevent"])
1652
- }, [d(t, {
1723
+ }, [d(e, {
1653
1724
  name: "add",
1654
1725
  size: 18
1655
1726
  }), l("span", null, w(T(f)("table.insertRowBelow")), 1)]),
@@ -1657,7 +1728,7 @@ var ze = {
1657
1728
  type: "button",
1658
1729
  class: "docx-tmore__item",
1659
1730
  onClick: r[2] ||= M((e) => P("addColumnLeft"), ["prevent"])
1660
- }, [d(t, {
1731
+ }, [d(e, {
1661
1732
  name: "add",
1662
1733
  size: 18
1663
1734
  }), l("span", null, w(T(f)("table.insertColumnLeft")), 1)]),
@@ -1665,7 +1736,7 @@ var ze = {
1665
1736
  type: "button",
1666
1737
  class: "docx-tmore__item",
1667
1738
  onClick: r[3] ||= M((e) => P("addColumnRight"), ["prevent"])
1668
- }, [d(t, {
1739
+ }, [d(e, {
1669
1740
  name: "add",
1670
1741
  size: 18
1671
1742
  }), l("span", null, w(T(f)("table.insertColumnRight")), 1)]),
@@ -1675,113 +1746,113 @@ var ze = {
1675
1746
  class: "docx-tmore__item",
1676
1747
  disabled: N("mergeCells"),
1677
1748
  onClick: r[4] ||= M((e) => P("mergeCells"), ["prevent"])
1678
- }, [d(t, {
1749
+ }, [d(e, {
1679
1750
  name: "call_merge",
1680
1751
  size: 18
1681
- }), l("span", null, w(T(f)("table.mergeCells")), 1)], 8, Mt),
1752
+ }), l("span", null, w(T(f)("table.mergeCells")), 1)], 8, Vt),
1682
1753
  l("button", {
1683
1754
  type: "button",
1684
1755
  class: "docx-tmore__item",
1685
1756
  disabled: N("splitCell"),
1686
1757
  onClick: r[5] ||= M((e) => P("splitCell"), ["prevent"])
1687
- }, [d(t, {
1758
+ }, [d(e, {
1688
1759
  name: "call_split",
1689
1760
  size: 18
1690
- }), l("span", null, w(T(f)("table.splitCell")), 1)], 8, Nt),
1761
+ }), l("span", null, w(T(f)("table.splitCell")), 1)], 8, Ht),
1691
1762
  r[39] ||= l("div", { class: "docx-tmore__separator" }, null, -1),
1692
1763
  l("button", {
1693
1764
  type: "button",
1694
1765
  class: "docx-tmore__item docx-tmore__item--danger",
1695
1766
  disabled: N("deleteRow"),
1696
1767
  onClick: r[6] ||= M((e) => P("deleteRow"), ["prevent"])
1697
- }, [d(t, {
1768
+ }, [d(e, {
1698
1769
  name: "delete",
1699
1770
  size: 18
1700
- }), l("span", null, w(T(f)("table.deleteRow")), 1)], 8, Pt),
1771
+ }), l("span", null, w(T(f)("table.deleteRow")), 1)], 8, Ut),
1701
1772
  l("button", {
1702
1773
  type: "button",
1703
1774
  class: "docx-tmore__item docx-tmore__item--danger",
1704
1775
  disabled: N("deleteColumn"),
1705
1776
  onClick: r[7] ||= M((e) => P("deleteColumn"), ["prevent"])
1706
- }, [d(t, {
1777
+ }, [d(e, {
1707
1778
  name: "delete",
1708
1779
  size: 18
1709
- }), l("span", null, w(T(f)("table.deleteColumn")), 1)], 8, Ft),
1780
+ }), l("span", null, w(T(f)("table.deleteColumn")), 1)], 8, Wt),
1710
1781
  l("button", {
1711
1782
  type: "button",
1712
1783
  class: "docx-tmore__item docx-tmore__item--danger",
1713
1784
  onClick: r[8] ||= M((e) => P("deleteTable"), ["prevent"])
1714
- }, [d(t, {
1785
+ }, [d(e, {
1715
1786
  name: "delete",
1716
1787
  size: 18
1717
1788
  }), l("span", null, w(T(f)("table.deleteTable")), 1)]),
1718
1789
  r[40] ||= l("div", { class: "docx-tmore__separator" }, null, -1),
1719
- l("div", It, w(T(f)("tableAdvanced.verticalAlignment")), 1),
1720
- l("div", Lt, [
1790
+ l("div", Gt, w(T(f)("tableAdvanced.verticalAlignment")), 1),
1791
+ l("div", Kt, [
1721
1792
  l("button", {
1722
1793
  type: "button",
1723
1794
  class: "docx-tmore__icon-btn",
1724
1795
  title: T(f)("tableAdvanced.top"),
1725
1796
  onMousedown: r[9] ||= M(() => {}, ["prevent"]),
1726
1797
  onClick: r[10] ||= M((e) => P("verticalAlignTop"), ["prevent"])
1727
- }, [d(t, {
1798
+ }, [d(e, {
1728
1799
  name: "vertical_align_top",
1729
1800
  size: 16
1730
- })], 40, Rt),
1801
+ })], 40, qt),
1731
1802
  l("button", {
1732
1803
  type: "button",
1733
1804
  class: "docx-tmore__icon-btn",
1734
1805
  title: T(f)("tableAdvanced.middle"),
1735
1806
  onMousedown: r[11] ||= M(() => {}, ["prevent"]),
1736
1807
  onClick: r[12] ||= M((e) => P("verticalAlignMiddle"), ["prevent"])
1737
- }, [d(t, {
1808
+ }, [d(e, {
1738
1809
  name: "vertical_align_center",
1739
1810
  size: 16
1740
- })], 40, zt),
1811
+ })], 40, Jt),
1741
1812
  l("button", {
1742
1813
  type: "button",
1743
1814
  class: "docx-tmore__icon-btn",
1744
1815
  title: T(f)("tableAdvanced.bottom"),
1745
1816
  onMousedown: r[13] ||= M(() => {}, ["prevent"]),
1746
1817
  onClick: r[14] ||= M((e) => P("verticalAlignBottom"), ["prevent"])
1747
- }, [d(t, {
1818
+ }, [d(e, {
1748
1819
  name: "vertical_align_bottom",
1749
1820
  size: 16
1750
- })], 40, Bt)
1821
+ })], 40, Yt)
1751
1822
  ]),
1752
1823
  r[41] ||= l("div", { class: "docx-tmore__separator" }, null, -1),
1753
- l("div", Vt, w(T(f)("tableAdvanced.tableAlignment")), 1),
1754
- l("div", Ht, [
1824
+ l("div", Xt, w(T(f)("tableAdvanced.tableAlignment")), 1),
1825
+ l("div", Zt, [
1755
1826
  l("button", {
1756
1827
  type: "button",
1757
1828
  class: m(["docx-tmore__icon-btn", { "docx-tmore__icon-btn--active": n.currentJustification === "left" }]),
1758
1829
  title: T(f)("tableAdvanced.alignTableLeft"),
1759
1830
  onMousedown: r[15] ||= M(() => {}, ["prevent"]),
1760
1831
  onClick: r[16] ||= M((e) => P("alignTableLeft"), ["prevent"])
1761
- }, [d(t, {
1832
+ }, [d(e, {
1762
1833
  name: "format_align_left",
1763
1834
  size: 16
1764
- })], 42, Ut),
1835
+ })], 42, Qt),
1765
1836
  l("button", {
1766
1837
  type: "button",
1767
1838
  class: m(["docx-tmore__icon-btn", { "docx-tmore__icon-btn--active": n.currentJustification === "center" }]),
1768
1839
  title: T(f)("tableAdvanced.alignTableCenter"),
1769
1840
  onMousedown: r[17] ||= M(() => {}, ["prevent"]),
1770
1841
  onClick: r[18] ||= M((e) => P("alignTableCenter"), ["prevent"])
1771
- }, [d(t, {
1842
+ }, [d(e, {
1772
1843
  name: "format_align_center",
1773
1844
  size: 16
1774
- })], 42, Wt),
1845
+ })], 42, $t),
1775
1846
  l("button", {
1776
1847
  type: "button",
1777
1848
  class: m(["docx-tmore__icon-btn", { "docx-tmore__icon-btn--active": n.currentJustification === "right" }]),
1778
1849
  title: T(f)("tableAdvanced.alignTableRight"),
1779
1850
  onMousedown: r[19] ||= M(() => {}, ["prevent"]),
1780
1851
  onClick: r[20] ||= M((e) => P("alignTableRight"), ["prevent"])
1781
- }, [d(t, {
1852
+ }, [d(e, {
1782
1853
  name: "format_align_right",
1783
1854
  size: 16
1784
- })], 42, Gt)
1855
+ })], 42, en)
1785
1856
  ]),
1786
1857
  r[42] ||= l("div", { class: "docx-tmore__separator" }, null, -1),
1787
1858
  l("button", {
@@ -1789,17 +1860,17 @@ var ze = {
1789
1860
  class: "docx-tmore__item",
1790
1861
  onClick: r[21] ||= M((e) => h.value = !h.value, ["prevent"])
1791
1862
  }, [
1792
- d(t, {
1863
+ d(e, {
1793
1864
  name: "padding",
1794
1865
  size: 18
1795
1866
  }),
1796
- l("span", Kt, w(T(f)("tableAdvanced.cellMargins")), 1),
1797
- d(t, {
1867
+ l("span", tn, w(T(f)("tableAdvanced.cellMargins")), 1),
1868
+ d(e, {
1798
1869
  name: h.value ? "expand_less" : "expand_more",
1799
1870
  size: 18
1800
1871
  }, null, 8, ["name"])
1801
1872
  ]),
1802
- h.value ? (v(), c("div", qt, [l("div", Jt, [(v(), c(i, null, x([
1873
+ h.value ? (v(), c("div", nn, [l("div", rn, [(v(), c(i, null, x([
1803
1874
  "top",
1804
1875
  "bottom",
1805
1876
  "left",
@@ -1808,14 +1879,14 @@ var ze = {
1808
1879
  key: e,
1809
1880
  class: "docx-tmore__field"
1810
1881
  }, [
1811
- l("span", Yt, w(e), 1),
1882
+ l("span", an, w(e), 1),
1812
1883
  A(l("input", {
1813
1884
  type: "number",
1814
1885
  min: "0",
1815
1886
  step: "20",
1816
1887
  "onUpdate:modelValue": (t) => S[e] = t,
1817
1888
  class: "docx-tmore__input"
1818
- }, null, 8, Xt), [[
1889
+ }, null, 8, on), [[
1819
1890
  D,
1820
1891
  S[e],
1821
1892
  void 0,
@@ -1832,27 +1903,27 @@ var ze = {
1832
1903
  class: "docx-tmore__item",
1833
1904
  onClick: r[22] ||= M((e) => g.value = !g.value, ["prevent"])
1834
1905
  }, [
1835
- d(t, {
1906
+ d(e, {
1836
1907
  name: "height",
1837
1908
  size: 18
1838
1909
  }),
1839
- l("span", Zt, w(T(f)("tableAdvanced.rowHeight")), 1),
1840
- d(t, {
1910
+ l("span", sn, w(T(f)("tableAdvanced.rowHeight")), 1),
1911
+ d(e, {
1841
1912
  name: g.value ? "expand_less" : "expand_more",
1842
1913
  size: 18
1843
1914
  }, null, 8, ["name"])
1844
1915
  ]),
1845
- g.value ? (v(), c("div", Qt, [
1846
- l("label", $t, [l("span", en, w(T(f)("tableAdvanced.rule")), 1), A(l("select", {
1916
+ g.value ? (v(), c("div", cn, [
1917
+ l("label", ln, [l("span", un, w(T(f)("tableAdvanced.rule")), 1), A(l("select", {
1847
1918
  "onUpdate:modelValue": r[23] ||= (e) => j.value = e,
1848
1919
  class: "docx-tmore__select"
1849
1920
  }, [
1850
- l("option", tn, w(T(f)("tableAdvanced.heightRules.auto")), 1),
1851
- l("option", nn, w(T(f)("tableAdvanced.heightRules.atLeast")), 1),
1852
- l("option", rn, w(T(f)("tableAdvanced.heightRules.exact")), 1)
1921
+ l("option", dn, w(T(f)("tableAdvanced.heightRules.auto")), 1),
1922
+ l("option", fn, w(T(f)("tableAdvanced.heightRules.atLeast")), 1),
1923
+ l("option", pn, w(T(f)("tableAdvanced.heightRules.exact")), 1)
1853
1924
  ], 512), [[E, j.value]])]),
1854
- j.value === "auto" ? s("", !0) : (v(), c("label", an, [
1855
- l("span", on, w(T(f)("tableAdvanced.height")), 1),
1925
+ j.value === "auto" ? s("", !0) : (v(), c("label", mn, [
1926
+ l("span", hn, w(T(f)("tableAdvanced.height")), 1),
1856
1927
  A(l("input", {
1857
1928
  type: "number",
1858
1929
  min: "0",
@@ -1878,17 +1949,17 @@ var ze = {
1878
1949
  class: "docx-tmore__item",
1879
1950
  onClick: r[25] ||= M((e) => _.value = !_.value, ["prevent"])
1880
1951
  }, [
1881
- d(t, {
1952
+ d(e, {
1882
1953
  name: "text_rotation_none",
1883
1954
  size: 18
1884
1955
  }),
1885
- l("span", sn, w(T(f)("tableAdvanced.textDirection")), 1),
1886
- d(t, {
1956
+ l("span", gn, w(T(f)("tableAdvanced.textDirection")), 1),
1957
+ d(e, {
1887
1958
  name: _.value ? "expand_less" : "expand_more",
1888
1959
  size: 18
1889
1960
  }, null, 8, ["name"])
1890
1961
  ]),
1891
- _.value ? (v(), c("div", cn, [
1962
+ _.value ? (v(), c("div", _n, [
1892
1963
  l("button", {
1893
1964
  type: "button",
1894
1965
  class: "docx-tmore__sub-item",
@@ -1910,7 +1981,7 @@ var ze = {
1910
1981
  type: "button",
1911
1982
  class: "docx-tmore__item",
1912
1983
  onClick: r[29] ||= M((e) => P("toggleHeaderRow"), ["prevent"])
1913
- }, [d(t, {
1984
+ }, [d(e, {
1914
1985
  name: "table_rows",
1915
1986
  size: 18
1916
1987
  }), l("span", null, w(T(f)("tableAdvanced.toggleHeaderRow")), 1)]),
@@ -1918,7 +1989,7 @@ var ze = {
1918
1989
  type: "button",
1919
1990
  class: "docx-tmore__item",
1920
1991
  onClick: r[30] ||= M((e) => P("distributeColumns"), ["prevent"])
1921
- }, [d(t, {
1992
+ }, [d(e, {
1922
1993
  name: "view_column",
1923
1994
  size: 18
1924
1995
  }), l("span", null, w(T(f)("tableAdvanced.distributeColumns")), 1)]),
@@ -1926,7 +1997,7 @@ var ze = {
1926
1997
  type: "button",
1927
1998
  class: "docx-tmore__item",
1928
1999
  onClick: r[31] ||= M((e) => P("autoFit"), ["prevent"])
1929
- }, [d(t, {
2000
+ }, [d(e, {
1930
2001
  name: "fit_width",
1931
2002
  size: 18
1932
2003
  }), l("span", null, w(T(f)("tableAdvanced.autoFit")), 1)]),
@@ -1934,7 +2005,7 @@ var ze = {
1934
2005
  type: "button",
1935
2006
  class: "docx-tmore__item",
1936
2007
  onClick: r[32] ||= M((e) => P("toggleNoWrap"), ["prevent"])
1937
- }, [d(t, {
2008
+ }, [d(e, {
1938
2009
  name: "wrap_text",
1939
2010
  size: 18
1940
2011
  }), l("span", null, w(T(f)("tableAdvanced.toggleNoWrap")), 1)]),
@@ -1943,15 +2014,15 @@ var ze = {
1943
2014
  type: "button",
1944
2015
  class: "docx-tmore__item",
1945
2016
  onClick: r[33] ||= M((e) => P("tableProperties"), ["prevent"])
1946
- }, [d(t, {
2017
+ }, [d(e, {
1947
2018
  name: "settings",
1948
2019
  size: 18
1949
2020
  }), l("span", null, w(T(f)("tableAdvanced.tableProperties")), 1)])
1950
- ], 8, jt)]),
2021
+ ], 8, Bt)]),
1951
2022
  _: 1
1952
2023
  }, 8, ["open"]));
1953
2024
  }
1954
- }), [["__scopeId", "data-v-dbab3895"]]), un = /* @__PURE__ */ n(/* @__PURE__ */ f({
2025
+ }), [["__scopeId", "data-v-27bf8a6f"]]), yn = /* @__PURE__ */ n(/* @__PURE__ */ f({
1955
2026
  __name: "TableToolbar",
1956
2027
  props: {
1957
2028
  view: {},
@@ -1963,7 +2034,7 @@ var ze = {
1963
2034
  let t = e, n = a(() => {
1964
2035
  t.stateTick;
1965
2036
  let e = t.view;
1966
- return e ? V(e.state) : null;
2037
+ return e ? U(e.state) : null;
1967
2038
  }), r = a(() => !!n.value?.isInTable), o = a(() => {
1968
2039
  t.stateTick;
1969
2040
  let e = t.view;
@@ -1985,7 +2056,7 @@ var ze = {
1985
2056
  O([() => t.view, () => t.stateTick], () => {
1986
2057
  let e = t.view;
1987
2058
  if (!e) return;
1988
- let n = V(e.state), r = n.cellBorderColor;
2059
+ let n = U(e.state), r = n.cellBorderColor;
1989
2060
  !r || !n.isInTable || typeof r == "object" && "rgb" in r && typeof r.rgb == "string" && (h.color = { rgb: r.rgb });
1990
2061
  }, { immediate: !0 });
1991
2062
  function g(e, ...n) {
@@ -2058,17 +2129,17 @@ var ze = {
2058
2129
  }
2059
2130
  return (t, n) => r.value ? (v(), c(i, { key: 0 }, [
2060
2131
  n[0] ||= l("span", { class: "divider" }, null, -1),
2061
- d(Ct, { onChange: _ }),
2062
- d(wt, {
2132
+ d(Mt, { onChange: _ }),
2133
+ d(Nt, {
2063
2134
  theme: e.theme ?? null,
2064
2135
  onChange: y
2065
2136
  }, null, 8, ["theme"]),
2066
- d(kt, { onChange: b }),
2067
- d(yt, {
2137
+ d(Rt, { onChange: b }),
2138
+ d(Ot, {
2068
2139
  theme: e.theme ?? null,
2069
2140
  onChange: x
2070
2141
  }, null, 8, ["theme"]),
2071
- d(ln, {
2142
+ d(vn, {
2072
2143
  "can-split": o.value,
2073
2144
  "can-merge": u.value,
2074
2145
  "row-count": f.value,
@@ -2087,18 +2158,18 @@ var ze = {
2087
2158
  ])
2088
2159
  ], 64)) : s("", !0);
2089
2160
  }
2090
- }), [["__scopeId", "data-v-56725acf"]]), dn = /* @__PURE__ */ f({
2161
+ }), [["__scopeId", "data-v-b9fbce78"]]), bn = /* @__PURE__ */ f({
2091
2162
  __name: "Avatar",
2092
2163
  props: {
2093
2164
  name: { default: "U" },
2094
2165
  size: { default: 32 }
2095
2166
  },
2096
2167
  setup(e) {
2097
- let t = e, n = a(() => G(t.name || "U")), r = a(() => ({
2168
+ let t = e, n = a(() => q(t.name || "U")), r = a(() => ({
2098
2169
  width: t.size + "px",
2099
2170
  height: t.size + "px",
2100
2171
  borderRadius: "50%",
2101
- backgroundColor: U(t.name || "U"),
2172
+ backgroundColor: G(t.name || "U"),
2102
2173
  color: "#fff",
2103
2174
  display: "flex",
2104
2175
  alignItems: "center",
@@ -2112,13 +2183,13 @@ var ze = {
2112
2183
  style: h(r.value)
2113
2184
  }, w(n.value), 5));
2114
2185
  }
2115
- }), fn = {
2186
+ }), xn = {
2116
2187
  key: 0,
2117
2188
  class: "reply-thread"
2118
- }, pn = {
2189
+ }, Sn = {
2119
2190
  key: 0,
2120
2191
  class: "reply-thread__more"
2121
- }, mn = { class: "reply-thread__header" }, hn = { class: "reply-thread__author-block" }, gn = { class: "reply-thread__author" }, _n = { class: "reply-thread__date" }, vn = /* @__PURE__ */ n(/* @__PURE__ */ f({
2192
+ }, Cn = { class: "reply-thread__header" }, wn = { class: "reply-thread__author-block" }, Tn = { class: "reply-thread__author" }, En = { class: "reply-thread__date" }, Dn = /* @__PURE__ */ n(/* @__PURE__ */ f({
2122
2193
  __name: "ReplyThread",
2123
2194
  props: {
2124
2195
  replies: {},
@@ -2126,15 +2197,15 @@ var ze = {
2126
2197
  },
2127
2198
  setup(e) {
2128
2199
  let t = e, n = a(() => t.isExpanded ? t.replies : t.replies.slice(-1)), r = a(() => t.isExpanded ? 0 : Math.max(0, t.replies.length - 1));
2129
- return (t, a) => e.replies.length > 0 ? (v(), c("div", fn, [r.value > 0 ? (v(), c("div", pn, w(r.value) + " " + w(r.value === 1 ? "reply" : "replies"), 1)) : s("", !0), (v(!0), c(i, null, x(n.value, (t) => (v(), c("div", {
2200
+ return (t, a) => e.replies.length > 0 ? (v(), c("div", xn, [r.value > 0 ? (v(), c("div", Sn, w(r.value) + " " + w(r.value === 1 ? "reply" : "replies"), 1)) : s("", !0), (v(!0), c(i, null, x(n.value, (t) => (v(), c("div", {
2130
2201
  key: t.id,
2131
2202
  class: m(["reply-thread__item", { "reply-thread__item--expanded": e.isExpanded }])
2132
- }, [l("div", mn, [d(dn, {
2203
+ }, [l("div", Cn, [d(bn, {
2133
2204
  name: t.author,
2134
2205
  size: 28
2135
- }, null, 8, ["name"]), l("div", hn, [l("div", gn, w(t.author || "Unknown"), 1), l("div", _n, w(T(H)(t.date)), 1)])]), l("div", { class: m(["reply-thread__body", { "reply-thread__body--clamp": !e.isExpanded }]) }, w(T(W)(t.content)), 3)], 2))), 128))])) : s("", !0);
2206
+ }, null, 8, ["name"]), l("div", wn, [l("div", Tn, w(t.author || "Unknown"), 1), l("div", En, w(T(W)(t.date)), 1)])]), l("div", { class: m(["reply-thread__body", { "reply-thread__body--clamp": !e.isExpanded }]) }, w(T(K)(t.content)), 3)], 2))), 128))])) : s("", !0);
2136
2207
  }
2137
- }), [["__scopeId", "data-v-fc8a461d"]]), yn = ["onKeydown"], bn = { class: "reply-input__actions" }, xn = ["disabled"], Sn = /* @__PURE__ */ n(/* @__PURE__ */ f({
2208
+ }), [["__scopeId", "data-v-9634d553"]]), On = ["onKeydown"], kn = { class: "reply-input__actions" }, An = ["disabled"], jn = /* @__PURE__ */ n(/* @__PURE__ */ f({
2138
2209
  __name: "ReplyInput",
2139
2210
  emits: ["submit"],
2140
2211
  setup(e, { emit: t }) {
@@ -2166,14 +2237,14 @@ var ze = {
2166
2237
  j(M(h, ["prevent"]), ["enter"]),
2167
2238
  j(f, ["esc"])
2168
2239
  ]
2169
- }, null, 40, yn), [[D, o.value]]), l("div", bn, [l("button", {
2240
+ }, null, 40, On), [[D, o.value]]), l("div", kn, [l("button", {
2170
2241
  class: "reply-input__cancel",
2171
2242
  onClick: M(f, ["stop"])
2172
2243
  }, "Cancel"), l("button", {
2173
2244
  class: m(["reply-input__submit", { "reply-input__submit--active": u.value }]),
2174
2245
  disabled: !u.value,
2175
2246
  onClick: M(h, ["stop"])
2176
- }, "Reply", 10, xn)])], 64)) : (v(), c("input", {
2247
+ }, "Reply", 10, An)])], 64)) : (v(), c("input", {
2177
2248
  key: 0,
2178
2249
  readonly: "",
2179
2250
  placeholder: "Reply",
@@ -2182,13 +2253,13 @@ var ze = {
2182
2253
  onClick: M(d, ["stop"])
2183
2254
  }, null, 32))], 32));
2184
2255
  }
2185
- }), [["__scopeId", "data-v-aa3d5b08"]]), Cn = ["data-comment-id"], wn = {
2256
+ }), [["__scopeId", "data-v-1cfd229c"]]), Mn = ["data-comment-id"], Nn = {
2186
2257
  key: 0,
2187
2258
  class: "comment-card__resolved"
2188
- }, Tn = { class: "comment-card__head" }, En = { class: "comment-card__author-block" }, Dn = { class: "comment-card__author" }, On = { class: "comment-card__date" }, kn = {
2259
+ }, Pn = { class: "comment-card__head" }, Fn = { class: "comment-card__author-block" }, In = { class: "comment-card__author" }, Ln = { class: "comment-card__date" }, Rn = {
2189
2260
  key: 0,
2190
2261
  class: "comment-card__actions"
2191
- }, An = ["title"], jn = { class: "comment-card__body" }, Mn = /* @__PURE__ */ n(/* @__PURE__ */ f({
2262
+ }, zn = ["title"], Bn = { class: "comment-card__body" }, Vn = /* @__PURE__ */ n(/* @__PURE__ */ f({
2192
2263
  __name: "CommentCard",
2193
2264
  props: {
2194
2265
  comment: {},
@@ -2202,41 +2273,41 @@ var ze = {
2202
2273
  "unresolve",
2203
2274
  "delete"
2204
2275
  ],
2205
- setup(e, { emit: n }) {
2206
- let r = e, i = n, a = b(!1);
2276
+ setup(t, { emit: n }) {
2277
+ let r = t, i = n, a = b(!1);
2207
2278
  function u() {
2208
2279
  a.value = !1, i("delete", r.comment.id);
2209
2280
  }
2210
2281
  return (n, r) => (v(), c("div", {
2211
- class: m(["comment-card", { "comment-card--expanded": e.expanded }]),
2212
- "data-comment-id": e.comment.id,
2282
+ class: m(["comment-card", { "comment-card--expanded": t.expanded }]),
2283
+ "data-comment-id": t.comment.id,
2213
2284
  onClick: r[5] ||= (e) => n.$emit("click"),
2214
2285
  onMousedown: r[6] ||= M(() => {}, ["stop"])
2215
2286
  }, [
2216
- e.comment.done ? (v(), c("div", wn, [d(t, {
2287
+ t.comment.done ? (v(), c("div", Nn, [d(e, {
2217
2288
  name: "check",
2218
2289
  size: 12
2219
2290
  }), r[7] ||= l("span", null, "Resolved", -1)])) : s("", !0),
2220
- l("div", Tn, [
2221
- d(dn, {
2222
- name: e.comment.author,
2291
+ l("div", Pn, [
2292
+ d(bn, {
2293
+ name: t.comment.author,
2223
2294
  size: 32
2224
2295
  }, null, 8, ["name"]),
2225
- l("div", En, [l("div", Dn, w(e.comment.author || "Unknown"), 1), l("div", On, w(T(H)(e.comment.date)), 1)]),
2226
- e.expanded ? (v(), c("div", kn, [
2296
+ l("div", Fn, [l("div", In, w(t.comment.author || "Unknown"), 1), l("div", Ln, w(T(W)(t.comment.date)), 1)]),
2297
+ t.expanded ? (v(), c("div", Rn, [
2227
2298
  l("button", {
2228
2299
  class: "comment-card__icon-btn",
2229
- title: e.comment.done ? "Reopen" : "Resolve",
2230
- onClick: r[0] ||= M((t) => e.comment.done ? n.$emit("unresolve", e.comment.id) : n.$emit("resolve", e.comment.id), ["stop"])
2231
- }, [d(t, {
2232
- name: e.comment.done ? "undo" : "check",
2300
+ title: t.comment.done ? "Reopen" : "Resolve",
2301
+ onClick: r[0] ||= M((e) => t.comment.done ? n.$emit("unresolve", t.comment.id) : n.$emit("resolve", t.comment.id), ["stop"])
2302
+ }, [d(e, {
2303
+ name: t.comment.done ? "undo" : "check",
2233
2304
  size: 20
2234
- }, null, 8, ["name"])], 8, An),
2305
+ }, null, 8, ["name"])], 8, zn),
2235
2306
  l("button", {
2236
2307
  class: "comment-card__icon-btn",
2237
2308
  title: "More options",
2238
2309
  onClick: r[1] ||= M((e) => a.value = !a.value, ["stop"])
2239
- }, [d(t, {
2310
+ }, [d(e, {
2240
2311
  name: "more_vert",
2241
2312
  size: 20
2242
2313
  })]),
@@ -2251,74 +2322,75 @@ var ze = {
2251
2322
  }, "Delete")], 32)) : s("", !0)
2252
2323
  ])) : s("", !0)
2253
2324
  ]),
2254
- l("div", jn, w(T(W)(e.comment.content)), 1),
2255
- d(vn, {
2256
- replies: e.replies,
2257
- "is-expanded": e.expanded
2325
+ l("div", Bn, w(T(K)(t.comment.content)), 1),
2326
+ d(Dn, {
2327
+ replies: t.replies,
2328
+ "is-expanded": t.expanded
2258
2329
  }, null, 8, ["replies", "is-expanded"]),
2259
- e.expanded && !e.comment.done ? (v(), o(Sn, {
2330
+ t.expanded && !t.comment.done ? (v(), o(jn, {
2260
2331
  key: 1,
2261
- onSubmit: r[4] ||= (t) => n.$emit("reply", e.comment.id, t)
2332
+ onSubmit: r[4] ||= (e) => n.$emit("reply", t.comment.id, e)
2262
2333
  })) : s("", !0)
2263
- ], 42, Cn));
2334
+ ], 42, Mn));
2264
2335
  }
2265
- }), [["__scopeId", "data-v-b9e94a26"]]), Nn = ["data-comment-id"], Pn = /* @__PURE__ */ n(/* @__PURE__ */ f({
2336
+ }), [["__scopeId", "data-v-fc5f60de"]]), Hn = ["data-comment-id"], Un = /* @__PURE__ */ n(/* @__PURE__ */ f({
2266
2337
  __name: "ResolvedCommentMarker",
2267
2338
  props: { comment: {} },
2268
2339
  emits: ["toggle-expand"],
2269
- setup(e) {
2340
+ setup(t) {
2270
2341
  return (n, r) => (v(), c("div", {
2271
2342
  class: "resolved-comment-marker",
2272
- "data-comment-id": e.comment.id,
2343
+ "data-comment-id": t.comment.id,
2273
2344
  "data-comment-resolved": "true",
2274
2345
  onClick: r[0] ||= (e) => n.$emit("toggle-expand"),
2275
2346
  onMousedown: r[1] ||= M(() => {}, ["stop"])
2276
- }, [d(t, {
2347
+ }, [d(e, {
2277
2348
  name: "chat_bubble_check",
2278
2349
  size: 20
2279
- })], 40, Nn));
2350
+ })], 40, Hn));
2280
2351
  }
2281
- }), [["__scopeId", "data-v-c3b210c1"]]), Fn = { class: "tc-card__head" }, In = { class: "tc-card__author-block" }, Ln = { class: "tc-card__author" }, Rn = {
2352
+ }), [["__scopeId", "data-v-c4b9639d"]]), Wn = { class: "tc-card__head" }, Gn = { class: "tc-card__author-block" }, Kn = { class: "tc-card__author" }, qn = {
2282
2353
  key: 0,
2283
2354
  class: "tc-card__date"
2284
- }, zn = {
2355
+ }, Jn = {
2285
2356
  key: 0,
2286
2357
  class: "tc-card__actions"
2287
- }, Bn = ["title"], Vn = ["title"], Hn = { class: "tc-card__body" }, Un = { class: "tc-card__deleted" }, Wn = { class: "tc-card__inserted" }, Gn = { class: "tc-card__inserted" }, Kn = { class: "tc-card__deleted" }, qn = { class: "tc-card__changed" }, Jn = {
2358
+ }, Yn = ["title"], Xn = ["title"], Zn = { class: "tc-card__body" }, Qn = { class: "tc-card__deleted" }, $n = { class: "tc-card__inserted" }, er = { class: "tc-card__inserted" }, tr = { class: "tc-card__deleted" }, nr = { class: "tc-card__changed" }, rr = {
2288
2359
  key: 4,
2289
2360
  class: "tc-card__inserted"
2290
- }, Yn = {
2361
+ }, ir = {
2291
2362
  key: 5,
2292
2363
  class: "tc-card__deleted"
2293
- }, Xn = {
2364
+ }, ar = {
2294
2365
  key: 6,
2295
2366
  class: "tc-card__inserted"
2296
- }, Zn = {
2367
+ }, or = {
2297
2368
  key: 7,
2298
2369
  class: "tc-card__deleted"
2299
- }, Qn = {
2370
+ }, sr = {
2300
2371
  key: 8,
2301
2372
  class: "tc-card__changed"
2302
- }, $n = {
2373
+ }, cr = {
2303
2374
  key: 9,
2304
2375
  class: "tc-card__changed"
2305
- }, er = {
2376
+ }, lr = {
2306
2377
  key: 10,
2307
2378
  class: "tc-card__changed"
2308
- }, tr = {
2379
+ }, ur = {
2309
2380
  key: 11,
2310
2381
  class: "tc-card__changed"
2311
- }, nr = {
2382
+ }, dr = {
2312
2383
  key: 12,
2313
2384
  class: "tc-card__inserted"
2314
- }, rr = {
2385
+ }, fr = {
2315
2386
  key: 13,
2316
2387
  class: "tc-card__deleted"
2317
- }, ir = /* @__PURE__ */ n(/* @__PURE__ */ f({
2388
+ }, pr = /* @__PURE__ */ n(/* @__PURE__ */ f({
2318
2389
  __name: "TrackedChangeCard",
2319
2390
  props: {
2320
2391
  change: {},
2321
- expanded: { type: Boolean }
2392
+ expanded: { type: Boolean },
2393
+ replies: {}
2322
2394
  },
2323
2395
  emits: [
2324
2396
  "click",
@@ -2327,7 +2399,7 @@ var ze = {
2327
2399
  "reply"
2328
2400
  ],
2329
2401
  setup(n, { emit: r }) {
2330
- let { t: f } = e(), p = n, h = r, g = a(() => p.change.author || f("trackedChanges.unknown"));
2402
+ let { t: f } = t(), p = n, h = r, g = a(() => p.change.author || f("trackedChanges.unknown"));
2331
2403
  function _() {
2332
2404
  let e = new Set([p.change.revisionId]);
2333
2405
  p.change.type === "replacement" && p.change.insertionRevisionId != null && e.add(p.change.insertionRevisionId);
@@ -2340,46 +2412,50 @@ var ze = {
2340
2412
  function b() {
2341
2413
  for (let e of _()) h("reject-by-id", e);
2342
2414
  }
2343
- return (e, r) => (v(), c("div", {
2415
+ return (t, r) => (v(), c("div", {
2344
2416
  class: m(["tc-card", { "tc-card--expanded": n.expanded }]),
2345
- onClick: r[1] ||= (t) => e.$emit("click"),
2417
+ onClick: r[1] ||= (e) => t.$emit("click"),
2346
2418
  onMousedown: r[2] ||= M(() => {}, ["stop"])
2347
2419
  }, [
2348
- l("div", Fn, [
2349
- d(dn, {
2420
+ l("div", Wn, [
2421
+ d(bn, {
2350
2422
  name: g.value,
2351
2423
  size: 32
2352
2424
  }, null, 8, ["name"]),
2353
- l("div", In, [l("div", Ln, w(g.value), 1), n.change.date ? (v(), c("div", Rn, w(T(H)(n.change.date)), 1)) : s("", !0)]),
2354
- n.expanded ? (v(), c("div", zn, [l("button", {
2425
+ l("div", Gn, [l("div", Kn, w(g.value), 1), n.change.date ? (v(), c("div", qn, w(T(W)(n.change.date)), 1)) : s("", !0)]),
2426
+ n.expanded ? (v(), c("div", Jn, [l("button", {
2355
2427
  class: "tc-card__icon-btn",
2356
2428
  title: T(f)("common.accept"),
2357
2429
  onClick: M(y, ["stop"])
2358
- }, [d(t, {
2430
+ }, [d(e, {
2359
2431
  name: "check",
2360
2432
  size: 20
2361
- })], 8, Bn), l("button", {
2433
+ })], 8, Yn), l("button", {
2362
2434
  class: "tc-card__icon-btn",
2363
2435
  title: T(f)("common.reject"),
2364
2436
  onClick: M(b, ["stop"])
2365
- }, [d(t, {
2437
+ }, [d(e, {
2366
2438
  name: "close",
2367
2439
  size: 20
2368
- })], 8, Vn)])) : s("", !0)
2440
+ })], 8, Xn)])) : s("", !0)
2369
2441
  ]),
2370
- l("div", Hn, [n.change.type === "replacement" ? (v(), c(i, { key: 0 }, [
2442
+ l("div", Zn, [n.change.type === "replacement" ? (v(), c(i, { key: 0 }, [
2371
2443
  u(w(T(f)("trackedChanges.replaced")) + " ", 1),
2372
- l("span", Un, "\"" + w(T(K)(n.change.deletedText || "")) + "\"", 1),
2444
+ l("span", Qn, "\"" + w(T(J)(n.change.deletedText || "")) + "\"", 1),
2373
2445
  u(" " + w(T(f)("trackedChanges.with")) + " ", 1),
2374
- l("span", Wn, "\"" + w(T(K)(n.change.text)) + "\"", 1)
2375
- ], 64)) : n.change.type === "paragraphMarkInsertion" ? (v(), c(i, { key: 1 }, [u(w(T(f)("revisions.paragraphMarkInserted")), 1), n.change.text ? (v(), c(i, { key: 0 }, [r[3] ||= u(": ", -1), l("span", Gn, "\"" + w(T(K)(n.change.text)) + "\"", 1)], 64)) : s("", !0)], 64)) : n.change.type === "paragraphMarkDeletion" ? (v(), c(i, { key: 2 }, [u(w(T(f)("revisions.paragraphMarkDeleted")), 1), n.change.text ? (v(), c(i, { key: 0 }, [r[4] ||= u(": ", -1), l("span", Kn, "\"" + w(T(K)(n.change.text)) + "\"", 1)], 64)) : s("", !0)], 64)) : n.change.type === "paragraphPropertiesChanged" ? (v(), c(i, { key: 3 }, [u(w(T(f)("revisions.paragraphPropertiesChanged")), 1), n.change.text ? (v(), c(i, { key: 0 }, [r[5] ||= u(": ", -1), l("span", qn, "\"" + w(T(K)(n.change.text)) + "\"", 1)], 64)) : s("", !0)], 64)) : n.change.type === "rowInserted" ? (v(), c("span", Jn, w(T(f)("revisions.rowInserted")), 1)) : n.change.type === "rowDeleted" ? (v(), c("span", Yn, w(T(f)("revisions.rowDeleted")), 1)) : n.change.type === "cellInserted" ? (v(), c("span", Xn, w(T(f)("revisions.cellInserted")), 1)) : n.change.type === "cellDeleted" ? (v(), c("span", Zn, w(T(f)("revisions.cellDeleted")), 1)) : n.change.type === "cellMerged" ? (v(), c("span", Qn, w(T(f)("revisions.cellMerged")), 1)) : n.change.type === "rowPropertiesChanged" ? (v(), c("span", $n, w(T(f)("revisions.rowPropertiesChanged")), 1)) : n.change.type === "cellPropertiesChanged" ? (v(), c("span", er, w(T(f)("revisions.cellPropertiesChanged")), 1)) : n.change.type === "tablePropertiesChanged" ? (v(), c("span", tr, w(T(f)("revisions.tablePropertiesChanged")), 1)) : n.change.type === "tableInserted" ? (v(), c("span", nr, w(T(f)("revisions.tableInserted")), 1)) : n.change.type === "tableDeleted" ? (v(), c("span", rr, w(T(f)("revisions.tableDeleted")), 1)) : (v(), c(i, { key: 14 }, [u(w(n.change.type === "insertion" ? T(f)("trackedChanges.added") : T(f)("trackedChanges.deleted")) + " ", 1), l("span", { class: m(n.change.type === "insertion" ? "tc-card__inserted" : "tc-card__deleted") }, " \"" + w(T(K)(n.change.text)) + "\" ", 3)], 64))]),
2376
- n.expanded ? (v(), o(Sn, {
2446
+ l("span", $n, "\"" + w(T(J)(n.change.text)) + "\"", 1)
2447
+ ], 64)) : n.change.type === "paragraphMarkInsertion" ? (v(), c(i, { key: 1 }, [u(w(T(f)("revisions.paragraphMarkInserted")), 1), n.change.text ? (v(), c(i, { key: 0 }, [r[3] ||= u(": ", -1), l("span", er, "\"" + w(T(J)(n.change.text)) + "\"", 1)], 64)) : s("", !0)], 64)) : n.change.type === "paragraphMarkDeletion" ? (v(), c(i, { key: 2 }, [u(w(T(f)("revisions.paragraphMarkDeleted")), 1), n.change.text ? (v(), c(i, { key: 0 }, [r[4] ||= u(": ", -1), l("span", tr, "\"" + w(T(J)(n.change.text)) + "\"", 1)], 64)) : s("", !0)], 64)) : n.change.type === "paragraphPropertiesChanged" ? (v(), c(i, { key: 3 }, [u(w(T(f)("revisions.paragraphPropertiesChanged")), 1), n.change.text ? (v(), c(i, { key: 0 }, [r[5] ||= u(": ", -1), l("span", nr, "\"" + w(T(J)(n.change.text)) + "\"", 1)], 64)) : s("", !0)], 64)) : n.change.type === "rowInserted" ? (v(), c("span", rr, w(T(f)("revisions.rowInserted")), 1)) : n.change.type === "rowDeleted" ? (v(), c("span", ir, w(T(f)("revisions.rowDeleted")), 1)) : n.change.type === "cellInserted" ? (v(), c("span", ar, w(T(f)("revisions.cellInserted")), 1)) : n.change.type === "cellDeleted" ? (v(), c("span", or, w(T(f)("revisions.cellDeleted")), 1)) : n.change.type === "cellMerged" ? (v(), c("span", sr, w(T(f)("revisions.cellMerged")), 1)) : n.change.type === "rowPropertiesChanged" ? (v(), c("span", cr, w(T(f)("revisions.rowPropertiesChanged")), 1)) : n.change.type === "cellPropertiesChanged" ? (v(), c("span", lr, w(T(f)("revisions.cellPropertiesChanged")), 1)) : n.change.type === "tablePropertiesChanged" ? (v(), c("span", ur, w(T(f)("revisions.tablePropertiesChanged")), 1)) : n.change.type === "tableInserted" ? (v(), c("span", dr, w(T(f)("revisions.tableInserted")), 1)) : n.change.type === "tableDeleted" ? (v(), c("span", fr, w(T(f)("revisions.tableDeleted")), 1)) : (v(), c(i, { key: 14 }, [u(w(n.change.type === "insertion" ? T(f)("trackedChanges.added") : T(f)("trackedChanges.deleted")) + " ", 1), l("span", { class: m(n.change.type === "insertion" ? "tc-card__inserted" : "tc-card__deleted") }, " \"" + w(T(J)(n.change.text)) + "\" ", 3)], 64))]),
2448
+ d(Dn, {
2449
+ replies: n.replies,
2450
+ "is-expanded": n.expanded
2451
+ }, null, 8, ["replies", "is-expanded"]),
2452
+ n.expanded ? (v(), o(jn, {
2377
2453
  key: 0,
2378
- onSubmit: r[0] ||= (t) => e.$emit("reply", n.change.revisionId, t)
2454
+ onSubmit: r[0] ||= (e) => t.$emit("reply", n.change.revisionId, e)
2379
2455
  })) : s("", !0)
2380
2456
  ], 34));
2381
2457
  }
2382
- }), [["__scopeId", "data-v-317869c0"]]), ar = ["onKeydown"], or = { class: "add-comment-card__actions" }, sr = ["disabled"], cr = /* @__PURE__ */ n(/* @__PURE__ */ f({
2458
+ }), [["__scopeId", "data-v-aba5ffb2"]]), mr = ["onKeydown"], hr = { class: "add-comment-card__actions" }, gr = ["disabled"], _r = /* @__PURE__ */ n(/* @__PURE__ */ f({
2383
2459
  __name: "AddCommentCard",
2384
2460
  emits: ["submit", "cancel"],
2385
2461
  setup(e, { emit: t }) {
@@ -2408,16 +2484,16 @@ var ze = {
2408
2484
  j(M(s, ["exact", "prevent"]), ["enter"]),
2409
2485
  j(u, ["esc"])
2410
2486
  ]
2411
- }, null, 40, ar), [[D, r.value]]), l("div", or, [l("button", {
2487
+ }, null, 40, mr), [[D, r.value]]), l("div", hr, [l("button", {
2412
2488
  class: "add-comment-card__cancel",
2413
2489
  onClick: u
2414
2490
  }, "Cancel"), l("button", {
2415
2491
  class: m(["add-comment-card__submit", { "add-comment-card__submit--active": o.value }]),
2416
2492
  disabled: !o.value,
2417
2493
  onClick: s
2418
- }, "Comment", 10, sr)])], 32));
2494
+ }, "Comment", 10, gr)])], 32));
2419
2495
  }
2420
- }), [["__scopeId", "data-v-cc70979b"]]), lr = q, ur = ["data-card-id"], dr = 16, fr = 300, pr = /* @__PURE__ */ n(/* @__PURE__ */ f({
2496
+ }), [["__scopeId", "data-v-ddb8719d"]]), vr = Y, yr = ["data-card-id"], br = 16, xr = /* @__PURE__ */ n(/* @__PURE__ */ f({
2421
2497
  __name: "UnifiedSidebar",
2422
2498
  props: {
2423
2499
  isOpen: { type: Boolean },
@@ -2452,17 +2528,30 @@ var ze = {
2452
2528
  let t = p.value === e ? null : e;
2453
2529
  f.value = t, d("update:activeItemId", t);
2454
2530
  }
2455
- let y = r({
2531
+ function y(e) {
2532
+ e.stopPropagation(), !e.target.closest(".unified-sidebar__card-slot") && p.value !== null && (f.value = null, d("update:activeItemId", null));
2533
+ }
2534
+ let S = r({
2456
2535
  comments: a(() => n.comments),
2457
2536
  trackedChanges: a(() => n.trackedChanges),
2458
2537
  showResolved: a(() => n.showResolved ?? !1),
2459
2538
  isAddingComment: a(() => n.isAddingComment ?? !1),
2460
2539
  addCommentYPosition: a(() => n.addCommentYPosition ?? null)
2461
- }), S = b(null), E = b(/* @__PURE__ */ new Map()), D = /* @__PURE__ */ new Map(), A = null;
2462
- function j() {
2463
- let e = n.pagesContainer, t = y.value;
2540
+ }), E = b(null), D = b(/* @__PURE__ */ new Map()), A = /* @__PURE__ */ new Map(), j = null, M = null, N = /* @__PURE__ */ new Set();
2541
+ function P() {
2542
+ let e = E.value;
2543
+ if (!e || !M) return;
2544
+ let t = new Set(e.querySelectorAll("[data-card-id]"));
2545
+ if (!(t.size === N.size && [...t].every((e) => N.has(e)))) {
2546
+ M.disconnect();
2547
+ for (let e of t) M.observe(e);
2548
+ N = t;
2549
+ }
2550
+ }
2551
+ function F() {
2552
+ let e = n.pagesContainer, t = S.value;
2464
2553
  if (!e || t.length === 0) {
2465
- E.value = /* @__PURE__ */ new Map();
2554
+ D.value = /* @__PURE__ */ new Map();
2466
2555
  return;
2467
2556
  }
2468
2557
  let r = e.getBoundingClientRect(), i = /* @__PURE__ */ new Map();
@@ -2497,43 +2586,43 @@ var ze = {
2497
2586
  }
2498
2587
  t && s.set(e.anchorKey, c(t));
2499
2588
  }
2500
- let l = /* @__PURE__ */ new Map(), u = S.value;
2589
+ let l = /* @__PURE__ */ new Map(), u = E.value;
2501
2590
  if (u) for (let e of u.querySelectorAll("[data-card-id]")) {
2502
2591
  let t = e.dataset.cardId;
2503
2592
  t && l.set(t, e.offsetHeight);
2504
2593
  }
2505
2594
  let d = /* @__PURE__ */ new Map();
2506
- for (let { item: e, y: n } of lr(t, s, null, 1, l, D)) d.set(e.id, n);
2507
- E.value = d;
2595
+ for (let { item: e, y: n } of vr(t, s, null, 1, l, A)) d.set(e.id, n);
2596
+ D.value = d, P();
2508
2597
  }
2509
- let N = a(() => {
2598
+ let I = a(() => {
2510
2599
  let e = 0;
2511
- for (let t of E.value.values()) e = Math.max(e, t);
2600
+ for (let t of D.value.values()) e = Math.max(e, t);
2512
2601
  return e + 200;
2513
- }), P = a(() => {
2602
+ }), L = a(() => {
2514
2603
  let e = p.value;
2515
2604
  if (!e) return "";
2516
2605
  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; }`;
2517
2606
  if (e.startsWith("tc-")) {
2518
2607
  let t = e.split("-")[1];
2519
2608
  return `
2520
- .paged-editor__pages .docx-insertion[data-revision-id="${y.value.find((t) => t.id === e)?.change?.insertionRevisionId ?? Number(t)}"] { background-color: rgba(52, 168, 83, 0.2) !important; border-bottom: 2px solid #2e7d32 !important; }
2609
+ .paged-editor__pages .docx-insertion[data-revision-id="${S.value.find((t) => t.id === e)?.change?.insertionRevisionId ?? Number(t)}"] { background-color: rgba(52, 168, 83, 0.2) !important; border-bottom: 2px solid #2e7d32 !important; }
2521
2610
  .paged-editor__pages .docx-deletion[data-revision-id="${t}"] { background-color: rgba(211, 47, 47, 0.2) !important; text-decoration-thickness: 2px !important; }
2522
2611
  `;
2523
2612
  }
2524
2613
  return "";
2525
- }), F = a(() => {
2526
- let e = n.pageWidthPx / 2 + dr - J, t = E.value.size > 0 || y.value.length === 0;
2614
+ }), R = a(() => {
2615
+ let e = n.pageWidthPx / 2 + br - X, t = D.value.size > 0 || S.value.length === 0;
2527
2616
  return {
2528
2617
  position: "absolute",
2529
2618
  top: "0",
2530
2619
  left: `calc(50% + ${e}px)`,
2531
- width: fr + "px",
2620
+ width: te + "px",
2532
2621
  opacity: +!!t
2533
2622
  };
2534
2623
  });
2535
- function I(e) {
2536
- let t = E.value.get(e);
2624
+ function ee(e) {
2625
+ let t = D.value.get(e);
2537
2626
  return t == null ? {
2538
2627
  position: "static",
2539
2628
  marginBottom: "8px"
@@ -2545,22 +2634,22 @@ var ze = {
2545
2634
  transition: "top 0.15s ease"
2546
2635
  };
2547
2636
  }
2548
- let L = !1;
2549
- function R() {
2550
- L || (L = !0, requestAnimationFrame(() => {
2551
- L = !1, j();
2637
+ let z = !1;
2638
+ function B() {
2639
+ z || (z = !0, requestAnimationFrame(() => {
2640
+ z = !1, F();
2552
2641
  }));
2553
2642
  }
2554
2643
  O(() => [
2555
- y.value.length,
2644
+ S.value.length,
2556
2645
  p.value,
2557
2646
  n.pagesContainer,
2558
2647
  n.pageWidthPx,
2559
2648
  n.zoom,
2560
2649
  n.isAddingComment,
2561
2650
  n.addCommentYPosition
2562
- ], () => R(), { immediate: !0 });
2563
- function ee(e) {
2651
+ ], () => B(), { immediate: !0 });
2652
+ function V(e) {
2564
2653
  let t = e?.parentElement ?? null;
2565
2654
  for (; t;) {
2566
2655
  let e = getComputedStyle(t).overflowY;
@@ -2569,43 +2658,43 @@ var ze = {
2569
2658
  }
2570
2659
  return null;
2571
2660
  }
2572
- let z = null;
2573
- function B() {
2574
- z && z.removeEventListener("scroll", R), z = ee(n.pagesContainer), z && z.addEventListener("scroll", R, { passive: !0 });
2661
+ let H = null;
2662
+ function U() {
2663
+ H && H.removeEventListener("scroll", B), H = V(n.pagesContainer), H && H.addEventListener("scroll", B, { passive: !0 });
2575
2664
  }
2576
2665
  return _(() => {
2577
- R(), n.pagesContainer && (A = new ResizeObserver(() => R()), A.observe(n.pagesContainer), B());
2578
- }), O(() => n.pagesContainer, (e, t) => {
2579
- A?.disconnect(), A = null, e && (A = new ResizeObserver(() => R()), A.observe(e), B());
2666
+ M = new ResizeObserver(() => B()), B(), n.pagesContainer && (j = new ResizeObserver(() => B()), j.observe(n.pagesContainer), U());
2667
+ }), O(() => n.pagesContainer, (e) => {
2668
+ j?.disconnect(), j = null, e && (j = new ResizeObserver(() => B()), j.observe(e), U());
2580
2669
  }), g(() => {
2581
- A?.disconnect(), z && z.removeEventListener("scroll", R);
2582
- }), (t, n) => (v(), c(i, null, [P.value ? (v(), o(C("style"), { key: 0 }, {
2583
- default: k(() => [u(w(P.value), 1)]),
2670
+ j?.disconnect(), M?.disconnect(), H && H.removeEventListener("scroll", B);
2671
+ }), (t, n) => (v(), c(i, null, [L.value ? (v(), o(C("style"), { key: 0 }, {
2672
+ default: k(() => [u(w(L.value), 1)]),
2584
2673
  _: 1
2585
2674
  })) : s("", !0), e.isOpen ? (v(), c("aside", {
2586
2675
  key: 1,
2587
2676
  ref_key: "rootRef",
2588
- ref: S,
2677
+ ref: E,
2589
2678
  class: "unified-sidebar",
2590
- style: h(F.value),
2591
- onMousedown: n[11] ||= M(() => {}, ["stop"])
2679
+ style: h(R.value),
2680
+ onMousedown: y
2592
2681
  }, [l("div", {
2593
2682
  class: "unified-sidebar__inner",
2594
- style: h({ minHeight: N.value + "px" })
2595
- }, [(v(!0), c(i, null, x(T(y), (e) => (v(), c("div", {
2683
+ style: h({ minHeight: I.value + "px" })
2684
+ }, [(v(!0), c(i, null, x(T(S), (e) => (v(), c("div", {
2596
2685
  key: e.id,
2597
2686
  class: "unified-sidebar__card-slot",
2598
2687
  "data-card-id": e.id,
2599
- style: h(I(e.id))
2600
- }, [e.kind === "add-comment" ? (v(), o(cr, {
2688
+ style: h(ee(e.id))
2689
+ }, [e.kind === "add-comment" ? (v(), o(_r, {
2601
2690
  key: 0,
2602
2691
  onSubmit: n[0] ||= (e) => t.$emit("add-comment", e),
2603
2692
  onCancel: n[1] ||= (e) => t.$emit("cancel-add-comment")
2604
- })) : e.kind === "comment" && e.comment.done && p.value !== e.id ? (v(), o(Pn, {
2693
+ })) : e.kind === "comment" && e.comment.done && p.value !== e.id ? (v(), o(Un, {
2605
2694
  key: 1,
2606
2695
  comment: e.comment,
2607
2696
  onToggleExpand: (t) => m(e.id)
2608
- }, null, 8, ["comment", "onToggleExpand"])) : e.kind === "comment" ? (v(), o(Mn, {
2697
+ }, null, 8, ["comment", "onToggleExpand"])) : e.kind === "comment" ? (v(), o(Vn, {
2609
2698
  key: 2,
2610
2699
  comment: e.comment,
2611
2700
  replies: e.replies,
@@ -2620,9 +2709,10 @@ var ze = {
2620
2709
  "replies",
2621
2710
  "expanded",
2622
2711
  "onClick"
2623
- ])) : e.kind === "tracked-change" ? (v(), o(ir, {
2712
+ ])) : e.kind === "tracked-change" ? (v(), o(pr, {
2624
2713
  key: 3,
2625
2714
  change: e.change,
2715
+ replies: e.replies ?? [],
2626
2716
  expanded: p.value === e.id,
2627
2717
  onClick: (t) => m(e.id),
2628
2718
  onAccept: n[6] ||= (e, n) => t.$emit("accept-change", e, n),
@@ -2632,11 +2722,12 @@ var ze = {
2632
2722
  onReply: n[10] ||= (e, n) => t.$emit("tracked-change-reply", e, n)
2633
2723
  }, null, 8, [
2634
2724
  "change",
2725
+ "replies",
2635
2726
  "expanded",
2636
2727
  "onClick"
2637
- ])) : s("", !0)], 12, ur))), 128))], 4)], 36)) : s("", !0)], 64));
2728
+ ])) : s("", !0)], 12, yr))), 128))], 4)], 36)) : s("", !0)], 64));
2638
2729
  }
2639
- }), [["__scopeId", "data-v-1d084620"]]), mr = ["title", "onClick"], hr = /* @__PURE__ */ n(/* @__PURE__ */ f({
2730
+ }), [["__scopeId", "data-v-b5509735"]]), Sr = ["title", "onClick"], Cr = /* @__PURE__ */ n(/* @__PURE__ */ f({
2640
2731
  __name: "CommentMarginMarkers",
2641
2732
  props: {
2642
2733
  comments: {},
@@ -2647,8 +2738,8 @@ var ze = {
2647
2738
  resolvedCommentIds: {}
2648
2739
  },
2649
2740
  emits: ["marker-click"],
2650
- setup(e) {
2651
- let n = e, r = a(() => {
2741
+ setup(t) {
2742
+ let n = t, r = a(() => {
2652
2743
  if (n.sidebarOpen) return [];
2653
2744
  let e = n.pagesContainer;
2654
2745
  if (!e) return [];
@@ -2686,14 +2777,14 @@ var ze = {
2686
2777
  key: r.comment.id,
2687
2778
  class: "docx-comment-margin-markers__btn",
2688
2779
  title: r.isResolved ? "Resolved comment" : "Comment",
2689
- style: h({ top: r.y * e.zoom + "px" }),
2780
+ style: h({ top: r.y * t.zoom + "px" }),
2690
2781
  onClick: (e) => n.$emit("marker-click", r.comment.id)
2691
- }, [d(t, {
2782
+ }, [d(e, {
2692
2783
  name: r.isResolved ? "chat_bubble_check" : "chat_bubble_outline",
2693
2784
  size: 18
2694
- }, null, 8, ["name"])], 12, mr))), 128))], 36)) : s("", !0);
2785
+ }, null, 8, ["name"])], 12, Sr))), 128))], 36)) : s("", !0);
2695
2786
  }
2696
- }), [["__scopeId", "data-v-a20c82d9"]]), gr = ["aria-valuemax"], _r = { class: "docx-horizontal-ruler__ticks" }, vr = ["title", "onDblclick"], yr = 12240, br = 1440, xr = 1440, Sr = 567, Cr = 22, wr = "#4285f4", Tr = "#3367d6", Er = "#2a56c6", $ = 5, Dr = /* @__PURE__ */ n(/* @__PURE__ */ f({
2787
+ }), [["__scopeId", "data-v-b6c7e425"]]), wr = ["aria-valuemax"], Tr = { class: "docx-horizontal-ruler__ticks" }, Er = ["title", "onDblclick"], Dr = 12240, Or = 1440, kr = 1440, Ar = 567, jr = 22, Mr = "var(--doc-primary)", Nr = "var(--doc-primary)", Pr = "var(--doc-primary-hover)", $ = 5, Fr = /* @__PURE__ */ n(/* @__PURE__ */ f({
2697
2788
  __name: "HorizontalRuler",
2698
2789
  props: {
2699
2790
  sectionProps: {},
@@ -2727,15 +2818,15 @@ var ze = {
2727
2818
  setup(e, { emit: t }) {
2728
2819
  let n = e, r = t, o = Math.round($ * 1.6), u = b(null), d = b(null), f = b(null), p = b(0), m = b("");
2729
2820
  function _(e) {
2730
- return Y(e) * n.zoom;
2821
+ return re(e) * n.zoom;
2731
2822
  }
2732
2823
  function y(e) {
2733
- return Math.round(te(e / n.zoom));
2824
+ return Math.round(ne(e / n.zoom));
2734
2825
  }
2735
- let S = a(() => n.sectionProps?.pageWidth ?? yr), C = a(() => n.sectionProps?.marginLeft ?? br), T = a(() => n.sectionProps?.marginRight ?? br), E = a(() => S.value - C.value - T.value), D = a(() => _(S.value)), O = a(() => _(C.value)), k = a(() => _(T.value)), A = a(() => _(n.indentLeft)), j = a(() => _(n.indentRight)), N = a(() => n.hangingIndent ? -n.firstLineIndent : n.firstLineIndent), P = a(() => _(N.value)), F = a(() => O.value + A.value), I = a(() => D.value - k.value - j.value), L = a(() => O.value + A.value + P.value), R = a(() => ({
2826
+ let S = a(() => n.sectionProps?.pageWidth ?? Dr), C = a(() => n.sectionProps?.marginLeft ?? Or), T = a(() => n.sectionProps?.marginRight ?? Or), E = a(() => S.value - C.value - T.value), D = a(() => _(S.value)), O = a(() => _(C.value)), k = a(() => _(T.value)), A = a(() => _(n.indentLeft)), j = a(() => _(n.indentRight)), N = a(() => n.hangingIndent ? -n.firstLineIndent : n.firstLineIndent), P = a(() => _(N.value)), F = a(() => O.value + A.value), I = a(() => D.value - k.value - j.value), L = a(() => O.value + A.value + P.value), R = a(() => ({
2736
2827
  position: "relative",
2737
2828
  width: D.value + "px",
2738
- height: Cr + "px",
2829
+ height: jr + "px",
2739
2830
  backgroundColor: "transparent",
2740
2831
  overflow: "visible",
2741
2832
  userSelect: "none",
@@ -2745,9 +2836,9 @@ var ze = {
2745
2836
  top: 0,
2746
2837
  left: 0,
2747
2838
  width: O.value + "px",
2748
- height: Cr + "px",
2749
- backgroundColor: "rgba(0, 0, 0, 0.02)",
2750
- borderRight: "1px solid rgba(0,0,0,0.06)",
2839
+ height: jr + "px",
2840
+ backgroundColor: "var(--doc-shadow-subtle)",
2841
+ borderRight: "1px solid var(--doc-shadow-subtle)",
2751
2842
  cursor: n.editable ? "ew-resize" : "default",
2752
2843
  zIndex: 1
2753
2844
  })), z = a(() => ({
@@ -2755,15 +2846,15 @@ var ze = {
2755
2846
  top: 0,
2756
2847
  right: 0,
2757
2848
  width: k.value + "px",
2758
- height: Cr + "px",
2759
- backgroundColor: "rgba(0, 0, 0, 0.02)",
2760
- borderLeft: "1px solid rgba(0,0,0,0.06)",
2849
+ height: jr + "px",
2850
+ backgroundColor: "var(--doc-shadow-subtle)",
2851
+ borderLeft: "1px solid var(--doc-shadow-subtle)",
2761
2852
  cursor: n.editable ? "ew-resize" : "default",
2762
2853
  zIndex: 1
2763
2854
  })), B = a(() => {
2764
2855
  let e = [];
2765
2856
  if (n.unit === "inch") {
2766
- let t = xr / 8, n = Math.ceil(S.value / t);
2857
+ let t = kr / 8, n = Math.ceil(S.value / t);
2767
2858
  for (let r = 0; r <= n; r++) {
2768
2859
  let n = r * t;
2769
2860
  if (n > S.value) break;
@@ -2784,7 +2875,7 @@ var ze = {
2784
2875
  });
2785
2876
  }
2786
2877
  } else {
2787
- let t = Sr / 10, n = Math.ceil(S.value / t);
2878
+ let t = Ar / 10, n = Math.ceil(S.value / t);
2788
2879
  for (let r = 0; r <= n; r++) {
2789
2880
  let n = r * t;
2790
2881
  if (n > S.value) break;
@@ -2812,10 +2903,10 @@ var ze = {
2812
2903
  };
2813
2904
  }) : []);
2814
2905
  function H(e) {
2815
- return n.unit === "cm" ? (e / Sr).toFixed(1) + " cm" : (e / xr).toFixed(2) + "\"";
2906
+ return n.unit === "cm" ? (e / Ar).toFixed(1) + " cm" : (e / kr).toFixed(2) + "\"";
2816
2907
  }
2817
2908
  function U(e) {
2818
- return d.value === e ? Er : f.value === e ? Tr : wr;
2909
+ return d.value === e ? Pr : f.value === e ? Nr : Mr;
2819
2910
  }
2820
2911
  function W(e, t, r) {
2821
2912
  return {
@@ -2853,7 +2944,7 @@ var ze = {
2853
2944
  }
2854
2945
  let K = 0;
2855
2946
  function q(e, t) {
2856
- n.editable && (d.value = e, t.clientX, e === "leftMargin" ? K = C.value : e === "rightMargin" ? K = T.value : e === "leftIndent" ? K = n.indentLeft : e === "rightIndent" ? K = n.indentRight : e === "firstLineIndent" && (K = n.firstLineIndent), p.value = t.clientX - (u.value?.getBoundingClientRect().left ?? 0), m.value = H(K), document.addEventListener("mousemove", J), document.addEventListener("mouseup", ne));
2947
+ n.editable && (d.value = e, t.clientX, e === "leftMargin" ? K = C.value : e === "rightMargin" ? K = T.value : e === "leftIndent" ? K = n.indentLeft : e === "rightIndent" ? K = n.indentRight : e === "firstLineIndent" && (K = n.firstLineIndent), p.value = t.clientX - (u.value?.getBoundingClientRect().left ?? 0), m.value = H(K), document.addEventListener("mousemove", J), document.addEventListener("mouseup", Y));
2857
2948
  }
2858
2949
  function J(e) {
2859
2950
  if (!d.value || !u.value) return;
@@ -2861,13 +2952,13 @@ var ze = {
2861
2952
  if (!t) return;
2862
2953
  let n = e.clientX - t.left;
2863
2954
  p.value = n;
2864
- let r = y(n), i = re(d.value, r);
2865
- m.value = H(i), X(d.value, i);
2955
+ let r = y(n), i = X(d.value, r);
2956
+ m.value = H(i), te(d.value, i);
2866
2957
  }
2867
- function ne(e) {
2868
- d.value = null, document.removeEventListener("mousemove", J), document.removeEventListener("mouseup", ne);
2958
+ function Y(e) {
2959
+ d.value = null, document.removeEventListener("mousemove", J), document.removeEventListener("mouseup", Y);
2869
2960
  }
2870
- function re(e, t) {
2961
+ function X(e, t) {
2871
2962
  if (e === "leftMargin") {
2872
2963
  let e = S.value - T.value - 720;
2873
2964
  return Math.round(Math.max(0, Math.min(t, e)));
@@ -2887,7 +2978,7 @@ var ze = {
2887
2978
  let r = S.value - T.value - t, i = E.value - n.indentLeft - 720;
2888
2979
  return Math.round(Math.max(0, Math.min(r, i)));
2889
2980
  }
2890
- function X(e, t) {
2981
+ function te(e, t) {
2891
2982
  switch (e) {
2892
2983
  case "leftMargin":
2893
2984
  r("left-margin-change", t);
@@ -2907,7 +2998,7 @@ var ze = {
2907
2998
  }
2908
2999
  }
2909
3000
  return g(() => {
2910
- document.removeEventListener("mousemove", J), document.removeEventListener("mouseup", ne);
3001
+ document.removeEventListener("mousemove", J), document.removeEventListener("mouseup", Y);
2911
3002
  }), (t, n) => (v(), c("div", {
2912
3003
  ref_key: "rulerRef",
2913
3004
  ref: u,
@@ -2928,7 +3019,7 @@ var ze = {
2928
3019
  style: h(z.value),
2929
3020
  onMousedown: n[1] ||= M((t) => e.editable ? q("rightMargin", t) : null, ["prevent", "stop"])
2930
3021
  }, null, 36),
2931
- l("div", _r, [(v(!0), c(i, null, x(B.value, (e, t) => (v(), c(i, { key: t }, [l("div", {
3022
+ l("div", Tr, [(v(!0), c(i, null, x(B.value, (e, t) => (v(), c(i, { key: t }, [l("div", {
2932
3023
  class: "docx-horizontal-ruler__tick-line",
2933
3024
  style: h({
2934
3025
  left: e.position + "px",
@@ -2969,15 +3060,15 @@ var ze = {
2969
3060
  style: h({ left: e.px + "px" }),
2970
3061
  title: `${e.label}`,
2971
3062
  onDblclick: M((n) => t.$emit("tab-stop-remove", e.twips), ["prevent"])
2972
- }, "L", 44, vr))), 128)),
3063
+ }, "L", 44, Er))), 128)),
2973
3064
  d.value && m.value ? (v(), c("div", {
2974
3065
  key: 3,
2975
3066
  class: "docx-horizontal-ruler__tooltip",
2976
3067
  style: h({ left: p.value + "px" })
2977
3068
  }, w(m.value), 5)) : s("", !0)
2978
- ], 12, gr));
3069
+ ], 12, wr));
2979
3070
  }
2980
- }), [["__scopeId", "data-v-5644874e"]]), Or = { class: "docx-vertical-ruler__ticks" }, kr = 15840, Ar = 1440, jr = 1440, Mr = 567, Nr = 20, Pr = /* @__PURE__ */ n(/* @__PURE__ */ f({
3071
+ }), [["__scopeId", "data-v-e917c826"]]), Ir = { class: "docx-vertical-ruler__ticks" }, Lr = 15840, Rr = 1440, zr = 1440, Br = 567, Vr = 20, Hr = /* @__PURE__ */ n(/* @__PURE__ */ f({
2981
3072
  __name: "VerticalRuler",
2982
3073
  props: {
2983
3074
  sectionProps: {},
@@ -2992,14 +3083,14 @@ var ze = {
2992
3083
  setup(e, { emit: t }) {
2993
3084
  let n = e, r = t, o = b(null), u = b(null), d = b(null);
2994
3085
  function f(e) {
2995
- return Y(e) * n.zoom;
3086
+ return re(e) * n.zoom;
2996
3087
  }
2997
3088
  function p(e) {
2998
- return Math.round(te(e / n.zoom));
3089
+ return Math.round(ne(e / n.zoom));
2999
3090
  }
3000
- let m = a(() => n.sectionProps?.pageHeight ?? kr), _ = a(() => n.sectionProps?.marginTop ?? Ar), y = a(() => n.sectionProps?.marginBottom ?? Ar), S = a(() => f(m.value)), C = a(() => f(_.value)), T = a(() => f(y.value)), E = a(() => ({
3091
+ let m = a(() => n.sectionProps?.pageHeight ?? Lr), _ = a(() => n.sectionProps?.marginTop ?? Rr), y = a(() => n.sectionProps?.marginBottom ?? Rr), S = a(() => f(m.value)), C = a(() => f(_.value)), T = a(() => f(y.value)), E = a(() => ({
3001
3092
  position: "relative",
3002
- width: Nr + "px",
3093
+ width: Vr + "px",
3003
3094
  height: S.value + "px",
3004
3095
  backgroundColor: "transparent",
3005
3096
  overflow: "visible",
@@ -3008,7 +3099,7 @@ var ze = {
3008
3099
  })), D = a(() => {
3009
3100
  let e = [];
3010
3101
  if (n.unit === "inch") {
3011
- let t = jr / 8, n = Math.ceil(m.value / t);
3102
+ let t = zr / 8, n = Math.ceil(m.value / t);
3012
3103
  for (let r = 0; r <= n; r++) {
3013
3104
  let n = r * t;
3014
3105
  if (n > m.value) break;
@@ -3029,7 +3120,7 @@ var ze = {
3029
3120
  });
3030
3121
  }
3031
3122
  } else {
3032
- let t = Mr / 10, n = Math.ceil(m.value / t);
3123
+ let t = Br / 10, n = Math.ceil(m.value / t);
3033
3124
  for (let r = 0; r <= n; r++) {
3034
3125
  let n = r * t;
3035
3126
  if (n > m.value) break;
@@ -3054,7 +3145,7 @@ var ze = {
3054
3145
  position: "absolute",
3055
3146
  top: e - 5 + "px",
3056
3147
  right: 0,
3057
- width: Nr + "px",
3148
+ width: Vr + "px",
3058
3149
  height: "10px",
3059
3150
  cursor: n.editable ? "ns-resize" : "default",
3060
3151
  zIndex: u.value === null ? 1 : 10
@@ -3070,7 +3161,7 @@ var ze = {
3070
3161
  height: "0",
3071
3162
  borderTop: "5px solid transparent",
3072
3163
  borderBottom: "5px solid transparent",
3073
- borderRight: `8px solid ${t ? "var(--doc-primary-hover, #1557b0)" : "var(--doc-primary, #1a73e8)"}`,
3164
+ borderRight: `8px solid ${t ? "var(--doc-primary-hover)" : "var(--doc-primary)"}`,
3074
3165
  transition: "border-right-color 0.1s"
3075
3166
  };
3076
3167
  }
@@ -3097,7 +3188,7 @@ var ze = {
3097
3188
  "aria-label": "Vertical ruler",
3098
3189
  "aria-orientation": "vertical"
3099
3190
  }, [
3100
- l("div", Or, [(v(!0), c(i, null, x(D.value, (e, t) => (v(), c(i, { key: t }, [l("div", {
3191
+ l("div", Ir, [(v(!0), c(i, null, x(D.value, (e, t) => (v(), c(i, { key: t }, [l("div", {
3101
3192
  class: "docx-vertical-ruler__tick-line",
3102
3193
  style: h({
3103
3194
  top: e.position + "px",
@@ -3126,10 +3217,10 @@ var ze = {
3126
3217
  }, [l("div", { style: h(k("bottomMargin")) }, null, 4)], 36)) : s("", !0)
3127
3218
  ], 4));
3128
3219
  }
3129
- }), [["__scopeId", "data-v-6e1bbe22"]]), Fr = { class: "doc-name" }, Ir = ["value"], Lr = {
3220
+ }), [["__scopeId", "data-v-42fc6ef7"]]), Ur = { class: "doc-name" }, Wr = ["value"], Gr = {
3130
3221
  key: 1,
3131
3222
  class: "doc-name__text"
3132
- }, Rr = /* @__PURE__ */ n(/* @__PURE__ */ f({
3223
+ }, Kr = /* @__PURE__ */ n(/* @__PURE__ */ f({
3133
3224
  __name: "DocumentName",
3134
3225
  props: {
3135
3226
  modelValue: {},
@@ -3148,28 +3239,28 @@ var ze = {
3148
3239
  function s(e) {
3149
3240
  e.target.value.trim() || r("update:modelValue", "Untitled document.docx");
3150
3241
  }
3151
- return (t, n) => (v(), c("div", Fr, [e.editable ? (v(), c("input", {
3242
+ return (t, n) => (v(), c("div", Ur, [e.editable ? (v(), c("input", {
3152
3243
  key: 0,
3153
3244
  class: "doc-name__input",
3154
3245
  value: i.value,
3155
3246
  onInput: o,
3156
3247
  onBlur: s,
3157
3248
  placeholder: "Untitled document"
3158
- }, null, 40, Ir)) : (v(), c("span", Lr, w(i.value || "Untitled document"), 1))]));
3249
+ }, null, 40, Wr)) : (v(), c("span", Gr, w(i.value || "Untitled document"), 1))]));
3159
3250
  }
3160
- }), [["__scopeId", "data-v-d78ee2fa"]]), zr = ["disabled", "onClick"], Br = {
3251
+ }), [["__scopeId", "data-v-3f4b57cc"]]), qr = ["disabled", "onClick"], Jr = {
3161
3252
  key: 0,
3162
3253
  class: "docx-menu-dropdown__separator"
3163
- }, Vr = ["onMouseenter", "onMouseleave"], Hr = ["disabled", "onClick"], Ur = { class: "docx-menu-dropdown__label" }, Wr = {
3254
+ }, Yr = ["onMouseenter", "onMouseleave"], Xr = ["disabled", "onClick"], Zr = { class: "docx-menu-dropdown__label" }, Qr = {
3164
3255
  key: 1,
3165
3256
  class: "docx-menu-dropdown__shortcut"
3166
- }, Gr = {
3257
+ }, $r = {
3167
3258
  key: 2,
3168
3259
  class: "docx-menu-dropdown__chevron"
3169
- }, Kr = {
3260
+ }, ei = {
3170
3261
  key: 0,
3171
3262
  class: "docx-menu-dropdown__submenu"
3172
- }, qr = /* @__PURE__ */ n(/* @__PURE__ */ f({
3263
+ }, ti = /* @__PURE__ */ n(/* @__PURE__ */ f({
3173
3264
  __name: "MenuDropdown",
3174
3265
  props: {
3175
3266
  label: {},
@@ -3180,7 +3271,7 @@ var ze = {
3180
3271
  default: !1
3181
3272
  }
3182
3273
  },
3183
- setup(e) {
3274
+ setup(t) {
3184
3275
  function n(e) {
3185
3276
  return "type" in e && e.type === "separator";
3186
3277
  }
@@ -3199,47 +3290,47 @@ var ze = {
3199
3290
  trigger: k(({ toggle: n }) => [l("button", {
3200
3291
  type: "button",
3201
3292
  class: m(["docx-menu-dropdown__trigger", { "docx-menu-dropdown__trigger--open": r.value }]),
3202
- disabled: e.disabled,
3293
+ disabled: t.disabled,
3203
3294
  onMousedown: g[0] ||= M(() => {}, ["prevent"]),
3204
3295
  onClick: M(n, ["prevent"])
3205
- }, [u(w(e.label) + " ", 1), e.showChevron ? (v(), o(t, {
3296
+ }, [u(w(t.label) + " ", 1), t.showChevron ? (v(), o(e, {
3206
3297
  key: 0,
3207
3298
  name: "arrow_drop_down",
3208
3299
  size: 16
3209
- })) : s("", !0)], 42, zr)]),
3300
+ })) : s("", !0)], 42, qr)]),
3210
3301
  panel: k(() => [l("div", {
3211
3302
  class: "docx-menu-dropdown__menu",
3212
3303
  onMousedown: g[1] ||= M(() => {}, ["prevent"])
3213
- }, [(v(!0), c(i, null, x(e.items, (e, r) => (v(), c(i, { key: r }, [n(e) ? (v(), c("div", Br)) : (v(), c("div", {
3304
+ }, [(v(!0), c(i, null, x(t.items, (t, r) => (v(), c(i, { key: r }, [n(t) ? (v(), c("div", Jr)) : (v(), c("div", {
3214
3305
  key: 1,
3215
3306
  class: "docx-menu-dropdown__wrap",
3216
- onMouseenter: (t) => e.submenu ? a.value = r : void 0,
3217
- onMouseleave: (t) => e.submenu ? a.value = null : void 0
3307
+ onMouseenter: (e) => t.submenu ? a.value = r : void 0,
3308
+ onMouseleave: (e) => t.submenu ? a.value = null : void 0
3218
3309
  }, [l("button", {
3219
3310
  type: "button",
3220
- class: m(["docx-menu-dropdown__item", { "docx-menu-dropdown__item--disabled": e.disabled }]),
3221
- disabled: e.disabled,
3222
- onClick: M((t) => p(e), ["prevent"])
3311
+ class: m(["docx-menu-dropdown__item", { "docx-menu-dropdown__item--disabled": t.disabled }]),
3312
+ disabled: t.disabled,
3313
+ onClick: M((e) => p(t), ["prevent"])
3223
3314
  }, [
3224
- e.icon ? (v(), o(t, {
3315
+ t.icon ? (v(), o(e, {
3225
3316
  key: 0,
3226
- name: e.icon,
3317
+ name: t.icon,
3227
3318
  size: 18
3228
3319
  }, null, 8, ["name"])) : s("", !0),
3229
- l("span", Ur, w(e.label), 1),
3230
- e.shortcut ? (v(), c("span", Wr, w(e.shortcut), 1)) : s("", !0),
3231
- e.submenu ? (v(), c("span", Gr, [d(t, {
3320
+ l("span", Zr, w(t.label), 1),
3321
+ t.shortcut ? (v(), c("span", Qr, w(t.shortcut), 1)) : s("", !0),
3322
+ t.submenu ? (v(), c("span", $r, [d(e, {
3232
3323
  name: "keyboard_arrow_right",
3233
3324
  size: 16
3234
3325
  })])) : s("", !0)
3235
- ], 10, Hr), e.submenu && a.value === r ? (v(), c("div", Kr, [S(h.$slots, "submenu", {
3236
- item: e,
3326
+ ], 10, Xr), t.submenu && a.value === r ? (v(), c("div", ei, [S(h.$slots, "submenu", {
3327
+ item: t,
3237
3328
  closeMenu: f
3238
- }, void 0, !0)])) : s("", !0)], 40, Vr))], 64))), 128))], 32)]),
3329
+ }, void 0, !0)])) : s("", !0)], 40, Yr))], 64))), 128))], 32)]),
3239
3330
  _: 3
3240
3331
  }, 8, ["open"]));
3241
3332
  }
3242
- }), [["__scopeId", "data-v-65cffcb2"]]), Jr = ["aria-selected", "onMouseenter"], Yr = { class: "docx-table-grid-inline__label" }, Xr = /* @__PURE__ */ n(/* @__PURE__ */ f({
3333
+ }), [["__scopeId", "data-v-f87b9133"]]), ni = ["aria-selected", "onMouseenter"], ri = { class: "docx-table-grid-inline__label" }, ii = /* @__PURE__ */ n(/* @__PURE__ */ f({
3243
3334
  __name: "TableGridInline",
3244
3335
  props: {
3245
3336
  gridRows: { default: 6 },
@@ -3275,105 +3366,135 @@ var ze = {
3275
3366
  o.value = e.r, s.value = e.c;
3276
3367
  },
3277
3368
  onClick: M(d, ["prevent"])
3278
- }, null, 42, Jr))), 128))], 36), l("div", Yr, w(o.value > 0 && s.value > 0 ? `${s.value} × ${o.value}` : "Select size"), 1)]));
3369
+ }, null, 42, ni))), 128))], 36), l("div", ri, w(o.value > 0 && s.value > 0 ? `${s.value} × ${o.value}` : "Select size"), 1)]));
3279
3370
  }
3280
- }), [["__scopeId", "data-v-ecd8fc63"]]), Zr = {
3371
+ }), [["__scopeId", "data-v-62b10375"]]), ai = {
3281
3372
  class: "menu-bar",
3282
3373
  role: "menubar"
3283
- }, Qr = /* @__PURE__ */ n(/* @__PURE__ */ f({
3374
+ }, oi = {
3375
+ key: 1,
3376
+ class: "menu-bar__break-submenu"
3377
+ }, si = ["onClick"], ci = /* @__PURE__ */ n(/* @__PURE__ */ f({
3284
3378
  __name: "MenuBar",
3285
3379
  emits: ["action", "insert-table"],
3286
- setup(t, { emit: n }) {
3287
- let r = n, { t: i } = e();
3288
- function l(e) {
3289
- return () => r("action", e);
3380
+ setup(n, { emit: r }) {
3381
+ let u = r, { t: f } = t();
3382
+ function p(e) {
3383
+ return () => u("action", e);
3290
3384
  }
3291
- let u = a(() => [
3385
+ let m = a(() => [
3292
3386
  {
3293
3387
  icon: "file_upload",
3294
- label: i("toolbar.open"),
3295
- shortcut: i("toolbar.openShortcut"),
3296
- onClick: l("open")
3388
+ label: f("toolbar.open"),
3389
+ shortcut: f("toolbar.openShortcut"),
3390
+ onClick: p("open")
3297
3391
  },
3298
3392
  {
3299
3393
  icon: "file_download",
3300
- label: i("toolbar.save"),
3301
- shortcut: i("toolbar.saveShortcut"),
3302
- onClick: l("save")
3394
+ label: f("toolbar.save"),
3395
+ shortcut: f("toolbar.saveShortcut"),
3396
+ onClick: p("save")
3303
3397
  },
3304
3398
  { type: "separator" },
3305
3399
  {
3306
3400
  icon: "settings",
3307
- label: i("toolbar.pageSetup"),
3308
- onClick: l("pageSetup")
3401
+ label: f("toolbar.pageSetup"),
3402
+ onClick: p("pageSetup")
3309
3403
  }
3310
- ]), f = a(() => [{
3404
+ ]), h = a(() => [{
3311
3405
  icon: "format_textdirection_l_to_r",
3312
- label: i("toolbar.leftToRight"),
3313
- onClick: l("dirLTR")
3406
+ label: f("toolbar.leftToRight"),
3407
+ onClick: p("dirLTR")
3314
3408
  }, {
3315
3409
  icon: "format_textdirection_r_to_l",
3316
- label: i("toolbar.rightToLeft"),
3317
- onClick: l("dirRTL")
3318
- }]), p = a(() => [
3410
+ label: f("toolbar.rightToLeft"),
3411
+ onClick: p("dirRTL")
3412
+ }]), g = a(() => [
3319
3413
  {
3320
3414
  icon: "image",
3321
- label: i("toolbar.image"),
3322
- onClick: l("insertImage")
3415
+ label: f("toolbar.image"),
3416
+ onClick: p("insertImage")
3323
3417
  },
3324
3418
  {
3325
3419
  icon: "grid_on",
3326
- label: i("toolbar.table"),
3420
+ label: f("toolbar.table"),
3327
3421
  key: "table",
3328
3422
  submenu: !0
3329
3423
  },
3330
3424
  { type: "separator" },
3331
3425
  {
3332
3426
  icon: "page_break",
3333
- label: i("toolbar.pageBreak"),
3334
- onClick: l("insertPageBreak")
3427
+ label: f("toolbar.break"),
3428
+ key: "break",
3429
+ submenu: !0
3335
3430
  },
3336
3431
  {
3337
3432
  icon: "format_list_numbered",
3338
- label: i("toolbar.tableOfContents"),
3339
- onClick: l("insertTOC")
3433
+ label: f("toolbar.tableOfContents"),
3434
+ onClick: p("insertTOC")
3340
3435
  },
3341
3436
  {
3342
3437
  icon: "branding_watermark",
3343
- label: i("toolbar.watermark"),
3344
- onClick: l("watermark")
3438
+ label: f("toolbar.watermark"),
3439
+ onClick: p("watermark")
3345
3440
  }
3346
- ]), m = a(() => [{
3347
- label: i("toolbar.reportIssue"),
3348
- onClick: l("reportIssue")
3441
+ ]), _ = a(() => [
3442
+ {
3443
+ icon: "page_break",
3444
+ label: f("toolbar.pageBreak"),
3445
+ action: "insertPageBreak"
3446
+ },
3447
+ {
3448
+ icon: "horizontal_rule",
3449
+ label: f("toolbar.sectionBreakNextPage"),
3450
+ action: "insertSectionBreakNextPage"
3451
+ },
3452
+ {
3453
+ icon: "border_horizontal",
3454
+ label: f("toolbar.sectionBreakContinuous"),
3455
+ action: "insertSectionBreakContinuous"
3456
+ }
3457
+ ]), y = a(() => [{
3458
+ label: f("toolbar.reportIssue"),
3459
+ onClick: p("reportIssue")
3349
3460
  }]);
3350
- return (e, t) => (v(), c("div", Zr, [
3351
- d(qr, {
3352
- label: T(i)("toolbar.file"),
3353
- items: u.value
3461
+ return (t, n) => (v(), c("div", ai, [
3462
+ d(ti, {
3463
+ label: T(f)("toolbar.file"),
3464
+ items: m.value
3354
3465
  }, null, 8, ["label", "items"]),
3355
- d(qr, {
3356
- label: T(i)("toolbar.format"),
3357
- items: f.value
3466
+ d(ti, {
3467
+ label: T(f)("toolbar.format"),
3468
+ items: h.value
3358
3469
  }, null, 8, ["label", "items"]),
3359
- d(qr, {
3360
- label: T(i)("toolbar.insert"),
3361
- items: p.value
3470
+ d(ti, {
3471
+ label: T(f)("toolbar.insert"),
3472
+ items: g.value
3362
3473
  }, {
3363
- submenu: k(({ item: e, closeMenu: t }) => [e.key === "table" ? (v(), o(Xr, {
3474
+ submenu: k(({ item: t, closeMenu: n }) => [t.key === "table" ? (v(), o(ii, {
3364
3475
  key: 0,
3365
- onInsert: (e, n) => {
3366
- r("insert-table", e, n), t();
3476
+ onInsert: (e, t) => {
3477
+ u("insert-table", e, t), n();
3367
3478
  }
3368
- }, null, 8, ["onInsert"])) : s("", !0)]),
3479
+ }, null, 8, ["onInsert"])) : t.key === "break" ? (v(), c("div", oi, [(v(!0), c(i, null, x(_.value, (t) => (v(), c("button", {
3480
+ key: t.action,
3481
+ type: "button",
3482
+ class: "menu-bar__break-item",
3483
+ onClick: M(() => {
3484
+ u("action", t.action), n();
3485
+ }, ["prevent"])
3486
+ }, [d(e, {
3487
+ name: t.icon,
3488
+ size: 18
3489
+ }, null, 8, ["name"]), l("span", null, w(t.label), 1)], 8, si))), 128))])) : s("", !0)]),
3369
3490
  _: 1
3370
3491
  }, 8, ["label", "items"]),
3371
- d(qr, {
3372
- label: T(i)("toolbar.help"),
3373
- items: m.value
3492
+ d(ti, {
3493
+ label: T(f)("toolbar.help"),
3494
+ items: y.value
3374
3495
  }, null, 8, ["label", "items"])
3375
3496
  ]));
3376
3497
  }
3377
- }), [["__scopeId", "data-v-6fc03bf3"]]);
3498
+ }), [["__scopeId", "data-v-14562b7b"]]);
3378
3499
  //#endregion
3379
- export { je as C, _e as D, Q as E, Me as S, Ee as T, kt as _, Pr as a, yt as b, pr as c, Pn as d, Mn as f, ln as g, un as h, Rr as i, cr as l, vn as m, Xr as n, Dr as o, Sn as p, qr as r, hr as s, Qr as t, ir as u, wt as v, Ae as w, vt as x, Ct as y };
3500
+ export { Pe as C, be as D, Q as E, Fe as S, ke as T, Rt as _, Hr as a, Ot as b, xr as c, Un as d, Vn as f, vn as g, yn as h, Kr as i, _r as l, Dn as m, ii as n, Fr as o, jn as p, ti as r, Cr as s, ci as t, pr as u, Nt as v, Ne as w, Dt as x, Mt as y };