smart-editor-v3 1.5.0 → 1.5.3

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.
@@ -5,7 +5,7 @@ import "./style.css";
5
5
  import { NTooltip as qt, NButton as Se, NPopover as Yo, NDrawerContent as Zo, NDrawer as Qo, NInput as In, NCheckbox as er, NCard as tr, NDropdown as lt, NSelect as En, NColorPicker as Nn, NBackTop as nr, NModal as or, NFormItem as rr, NInputNumber as Rn, useMessage as lr, zhCN as Fn, enUS as Hn, dateZhCN as zn, dateEnUS as Dn, darkTheme as On, NMessageProvider as sr, NConfigProvider as Pn } from "naive-ui";
6
6
  import { createI18n as ir } from "vue-i18n";
7
7
  import { useStorage as nn, createGlobalState as ar, useTimeAgo as ur, useFullscreen as Vn, useOnline as cr, useWindowSize as jt, onClickOutside as Mt, useClipboard as dr, useElementBounding as pr, useThrottleFn as Wn, useDebounceFn as mr, useResizeObserver as hr, useFileDialog as Gt, useDark as Un, useTimestamp as fr, createInjectionState as br } from "@vueuse/core";
8
- import { ref as B, watch as de, openBlock as m, createElementBlock as M, Fragment as J, renderList as ve, unref as i, createElementVNode as v, toDisplayString as I, normalizeClass as K, createBlock as _, resolveDynamicComponent as oe, withCtx as T, createTextVNode as te, renderSlot as pe, computed as U, onMounted as Re, inject as gr, createVNode as g, createCommentVNode as H, normalizeStyle as le, isRef as je, h as _e, onUnmounted as vr, onBeforeUnmount as Xe, useAttrs as Kt, mergeProps as ge, withDirectives as nt, vShow as kt, nextTick as _r, onBeforeMount as Jn, provide as on, mergeModels as rn, useModel as yr } from "vue";
8
+ import { ref as B, watch as de, openBlock as m, createElementBlock as $, Fragment as W, renderList as ve, unref as i, createElementVNode as v, toDisplayString as I, normalizeClass as K, createBlock as _, resolveDynamicComponent as oe, withCtx as T, createTextVNode as te, renderSlot as pe, computed as V, onMounted as Re, inject as gr, createVNode as g, createCommentVNode as F, normalizeStyle as le, isRef as je, h as _e, onUnmounted as vr, onBeforeUnmount as Xe, useAttrs as Kt, mergeProps as ge, withDirectives as nt, vShow as kt, nextTick as _r, onBeforeMount as Jn, provide as on, mergeModels as rn, useModel as yr } from "vue";
9
9
  import Cr from "dexie";
10
10
  import wt from "hotkeys-js";
11
11
  import { Extension as $e, findParentNode as st, Node as Y, mergeAttributes as X, findChildren as _t, defaultBlockAt as qn, isActive as kr, isMacOS as wr, createStyleTag as xr, nodeInputRule as Ar, findParentNodeClosestToPos as Tr, callOrReturn as Sr, getExtensionField as $r } from "@tiptap/core";
@@ -1175,7 +1175,7 @@ function Te(r = 8) {
1175
1175
  return Math.random().toString(36).substring(2, r + 2);
1176
1176
  }
1177
1177
  function ze(r, e) {
1178
- const { options: n } = $(), o = `smart-editor:${n.value.editorKey}:${r}`;
1178
+ const { options: n } = M(), o = `smart-editor:${n.value.editorKey}:${r}`;
1179
1179
  if (r === "locale")
1180
1180
  return nn(o, n.value.locale);
1181
1181
  if (r === "recent")
@@ -1185,43 +1185,43 @@ function ze(r, e) {
1185
1185
  });
1186
1186
  throw new Error("[useStorage]", { cause: "Key is not valid" });
1187
1187
  }
1188
- const $ = ar(() => {
1188
+ const M = ar(() => {
1189
1189
  const r = B(Te()), e = B(null), n = B(!1), o = B(Pt.page), t = B(Pt), l = B(null), s = B({
1190
1190
  enabled: !1,
1191
1191
  once: !0,
1192
1192
  marks: []
1193
1193
  }), a = ({
1194
- enabled: w,
1194
+ enabled: y,
1195
1195
  once: A,
1196
1196
  marks: x
1197
1197
  }) => {
1198
- s.value.enabled = w, s.value.once = A, s.value.marks = x;
1199
- }, u = B([]), d = `#smart-editor-${Te(4)}`, p = B(!1), h = B(!1), b = B(!1), f = (w) => {
1200
- e.value = w;
1201
- }, C = B(!1), y = (w) => {
1202
- const A = Object.keys(w).includes("value") ? w.value : w;
1198
+ s.value.enabled = y, s.value.once = A, s.value.marks = x;
1199
+ }, u = B([]), d = `#smart-editor-${Te(4)}`, p = B(!1), h = B(!1), b = B(!1), f = (y) => {
1200
+ e.value = y;
1201
+ }, k = B(!1), C = (y) => {
1202
+ const A = Object.keys(y).includes("value") ? y.value : y;
1203
1203
  t.value = {
1204
1204
  ...t.value,
1205
1205
  ...Object.keys(A).reduce((L, N) => (A[N] !== void 0 && (L[N] = A[N]), L), {})
1206
1206
  };
1207
1207
  const x = ze("locale");
1208
1208
  return x.value || (x.value = t.value.locale), t.value;
1209
- }, k = () => {
1209
+ }, w = () => {
1210
1210
  e.value = void 0, h.value = !1, u.value = [], n.value = !0, l.value = null;
1211
1211
  };
1212
1212
  return de(
1213
1213
  () => {
1214
- var w;
1215
- return (w = t.value.document) == null ? void 0 : w.readOnly;
1214
+ var y;
1215
+ return (y = t.value.document) == null ? void 0 : y.readOnly;
1216
1216
  },
1217
- (w) => {
1217
+ (y) => {
1218
1218
  var A;
1219
- (A = e.value) == null || A.setEditable(!w), r.value = Te();
1219
+ (A = e.value) == null || A.setEditable(!y), r.value = Te();
1220
1220
  }
1221
1221
  ), de(
1222
1222
  () => t.value.page,
1223
1223
  ({
1224
- defaultBackground: w,
1224
+ defaultBackground: y,
1225
1225
  defaultMargin: A,
1226
1226
  defaultOrientation: x,
1227
1227
  watermark: L
@@ -1232,7 +1232,7 @@ const $ = ar(() => {
1232
1232
  (R) => R.default
1233
1233
  ),
1234
1234
  margin: A,
1235
- background: w,
1235
+ background: y,
1236
1236
  orientation: x,
1237
1237
  watermark: L,
1238
1238
  header: !0,
@@ -1264,11 +1264,11 @@ const $ = ar(() => {
1264
1264
  searchReplace: h,
1265
1265
  options: t,
1266
1266
  container: d,
1267
- setOptions: y,
1268
- resetStore: k,
1269
- toolbarHover: C
1267
+ setOptions: C,
1268
+ resetStore: w,
1269
+ toolbarHover: k
1270
1270
  };
1271
- }), { options: gl } = $(), vl = ir({
1271
+ }), { options: gl } = M(), vl = ir({
1272
1272
  legacy: !1,
1273
1273
  locale: gl.value.locale || "zh_CN",
1274
1274
  defaultLocale: "zh_CN",
@@ -1290,7 +1290,7 @@ function we(r) {
1290
1290
  let n = r;
1291
1291
  return e && (n = n.replace(/ctrl/gi, "⌘").replace(/shift/gi, "⇧").replace(/alt/gi, "⌥").replace(/Enter/gi, "Return").replace(/Backspace/gi, "Delete")), n;
1292
1292
  }
1293
- const z = (r, e) => {
1293
+ const H = (r, e) => {
1294
1294
  const n = r.__vccOpts || r;
1295
1295
  for (const [o, t] of e)
1296
1296
  n[o] = t;
@@ -1298,7 +1298,7 @@ const z = (r, e) => {
1298
1298
  }, _l = { class: "keyboard-shortcuts" }, yl = { class: "keyboard-shortcuts-title" }, Cl = { class: "keyboard-shortcuts" }, kl = { class: "keyboard-shortcut" }, wl = { key: 0 }, xl = ["textContent"], Al = {
1299
1299
  __name: "shortcuts",
1300
1300
  setup(r) {
1301
- const { options: e } = $(), { document: n } = e.value, o = B([
1301
+ const { options: e } = M(), { document: n } = e.value, o = B([
1302
1302
  {
1303
1303
  title: c("shortcut.commonlyUsed"),
1304
1304
  items: [
@@ -1455,11 +1455,11 @@ const z = (r, e) => {
1455
1455
  keys: ["---", "Enter"]
1456
1456
  }
1457
1457
  ]
1458
- }), (t, l) => (m(), M("div", _l, [
1459
- (m(!0), M(J, null, ve(i(o), (s, a) => (m(), M(J, { key: a }, [
1458
+ }), (t, l) => (m(), $("div", _l, [
1459
+ (m(!0), $(W, null, ve(i(o), (s, a) => (m(), $(W, { key: a }, [
1460
1460
  v("div", yl, I(s.title), 1),
1461
1461
  v("ul", Cl, [
1462
- (m(!0), M(J, null, ve(s.items, (u, d) => (m(), M("li", { key: d }, [
1462
+ (m(!0), $(W, null, ve(s.items, (u, d) => (m(), $("li", { key: d }, [
1463
1463
  v("span", {
1464
1464
  class: K(u.className ? `keyboard-shortcut-${u.className}` : "")
1465
1465
  }, [
@@ -1471,14 +1471,14 @@ const z = (r, e) => {
1471
1471
  te(I(u.label), 1)
1472
1472
  ]),
1473
1473
  _: 2
1474
- }, 1024)) : (m(), M("span", {
1474
+ }, 1024)) : (m(), $("span", {
1475
1475
  key: 1,
1476
1476
  class: K(u.className || "")
1477
1477
  }, I(u.label), 3))
1478
1478
  ], 2),
1479
1479
  v("div", kl, [
1480
- (m(!0), M(J, null, ve(u.keys, (p) => (m(), M(J, { key: p }, [
1481
- p !== "TEXT" ? (m(), M("kbd", wl, I(i(we)(p)), 1)) : (m(), M("span", {
1480
+ (m(!0), $(W, null, ve(u.keys, (p) => (m(), $(W, { key: p }, [
1481
+ p !== "TEXT" ? (m(), $("kbd", wl, I(i(we)(p)), 1)) : (m(), $("span", {
1482
1482
  key: 1,
1483
1483
  textContent: I(("t" in t ? t.t : i(c))("shortcut.text"))
1484
1484
  }, null, 8, xl))
@@ -1489,7 +1489,7 @@ const z = (r, e) => {
1489
1489
  ], 64))), 128))
1490
1490
  ]));
1491
1491
  }
1492
- }, Tl = /* @__PURE__ */ z(Al, [["__scopeId", "data-v-e708c2e3"]]), Sl = {
1492
+ }, Tl = /* @__PURE__ */ H(Al, [["__scopeId", "data-v-e708c2e3"]]), Sl = {
1493
1493
  class: "p-x-8 p-y-4",
1494
1494
  style: { fontSize: "12px" }
1495
1495
  }, $l = {
@@ -1501,7 +1501,7 @@ const z = (r, e) => {
1501
1501
  }
1502
1502
  },
1503
1503
  setup(r) {
1504
- const { container: e } = $();
1504
+ const { container: e } = M();
1505
1505
  return (n, o) => {
1506
1506
  const t = qt;
1507
1507
  return m(), _(t, {
@@ -1548,7 +1548,7 @@ const Be = {
1548
1548
  }, Ml = { class: "smart-status-bar" }, Bl = { class: "smart-status-bar-left" }, Ll = { key: 0 }, Il = { class: "smart-word-count" }, El = { class: "smart-word-count-detail" }, Nl = { class: "smart-word-count-title" }, Rl = { key: 0 }, Fl = { class: "smart-status" }, Hl = { class: "smart-status-saved button-text" }, zl = ["textContent"], Dl = ["textContent"], Ol = { class: "smart-document-status-container smart-status" }, Pl = ["textContent"], Vl = ["textContent"], Wl = { class: "smart-document-button-container" }, Ul = { class: "smart-shortcuts-drawer-header" }, Jl = {
1549
1549
  __name: "index",
1550
1550
  setup(r) {
1551
- const { container: e, options: n, page: o, editor: t, savedAt: l } = $(), s = B(!1), a = B(!1), u = U(() => {
1551
+ const { container: e, options: n, page: o, editor: t, savedAt: l } = M(), s = B(!1), a = B(!1), u = V(() => {
1552
1552
  if (t.value) {
1553
1553
  const { selection: x } = t.value.state;
1554
1554
  return t.value.state.doc.textBetween(
@@ -1570,11 +1570,11 @@ const Be = {
1570
1570
  Re(() => {
1571
1571
  d.value = Vn(document.querySelector(e)), Tt("f11, command+f11", d.value.toggle);
1572
1572
  });
1573
- const b = B(!1), f = cr(), C = gr("saveContent");
1574
- function y() {
1575
- C(), b.value = !1;
1573
+ const b = B(!1), f = cr(), k = gr("saveContent");
1574
+ function C() {
1575
+ k(), b.value = !1;
1576
1576
  }
1577
- function k() {
1577
+ function w() {
1578
1578
  Lt.content.get(n.value.editorKey).then((x) => {
1579
1579
  var L;
1580
1580
  x ? (L = t.value) == null || L.chain().setContent(x.content, !0).focus().run() : Be.message.error(c("save.cache.error.message"));
@@ -1584,7 +1584,7 @@ const Be = {
1584
1584
  b.value = !1;
1585
1585
  });
1586
1586
  }
1587
- function w() {
1587
+ function y() {
1588
1588
  window.open(n.value.feedbackUrl, "_blank");
1589
1589
  }
1590
1590
  function A() {
@@ -1592,8 +1592,8 @@ const Be = {
1592
1592
  }
1593
1593
  return (x, L) => {
1594
1594
  var j;
1595
- const N = Se, R = $l, F = Yo, W = Tl, S = Zo, V = Qo;
1596
- return m(), M(J, null, [
1595
+ const N = Se, R = $l, D = Yo, q = Tl, S = Zo, U = Qo;
1596
+ return m(), $(W, null, [
1597
1597
  v("div", Ml, [
1598
1598
  v("div", Bl, [
1599
1599
  g(R, {
@@ -1640,7 +1640,7 @@ const Be = {
1640
1640
  class: "smart-status-bar-button",
1641
1641
  quaternary: "",
1642
1642
  size: "tiny",
1643
- onClick: L[0] || (L[0] = (q) => s.value = !0)
1643
+ onClick: L[0] || (L[0] = (J) => s.value = !0)
1644
1644
  }, {
1645
1645
  default: T(() => L[6] || (L[6] = [
1646
1646
  v("i", { class: "i-sed:shortcut" }, null, -1)
@@ -1654,13 +1654,13 @@ const Be = {
1654
1654
  content: `${(j = i(d)) != null && j.isFullscreen ? ("t" in x ? x.t : i(c))("fullscreen.disable") : ("t" in x ? x.t : i(c))("fullscreen.title")} (F11 / ⌘+F11)`
1655
1655
  }, {
1656
1656
  default: T(() => {
1657
- var q;
1657
+ var J;
1658
1658
  return [
1659
1659
  g(N, {
1660
1660
  class: "smart-status-bar-button",
1661
1661
  quaternary: "",
1662
1662
  size: "tiny",
1663
- onClick: (q = i(d)) == null ? void 0 : q.toggle
1663
+ onClick: (J = i(d)) == null ? void 0 : J.toggle
1664
1664
  }, {
1665
1665
  default: T(() => {
1666
1666
  var Q;
@@ -1702,7 +1702,7 @@ const Be = {
1702
1702
  class: "smart-status-bar-button",
1703
1703
  quaternary: "",
1704
1704
  size: "tiny",
1705
- onClick: w
1705
+ onClick: y
1706
1706
  }, {
1707
1707
  default: T(() => L[8] || (L[8] = [
1708
1708
  v("i", { class: "i-sed:feedback" }, null, -1)
@@ -1713,12 +1713,12 @@ const Be = {
1713
1713
  _: 1
1714
1714
  }, 8, ["content"]),
1715
1715
  L[9] || (L[9] = v("div", { class: "smart-status-bar-split" }, null, -1)),
1716
- g(F, {
1716
+ g(D, {
1717
1717
  placement: "top",
1718
1718
  to: i(e),
1719
1719
  "show-arrow": !1,
1720
1720
  raw: "",
1721
- "onUpdate:show": L[1] || (L[1] = (q) => a.value = q)
1721
+ "onUpdate:show": L[1] || (L[1] = (J) => a.value = J)
1722
1722
  }, {
1723
1723
  trigger: T(() => [
1724
1724
  g(N, {
@@ -1727,7 +1727,7 @@ const Be = {
1727
1727
  size: "tiny"
1728
1728
  }, {
1729
1729
  default: T(() => [
1730
- i(u) > 0 ? (m(), M("span", Ll, I(i(u)) + "/ ", 1)) : H("", !0),
1730
+ i(u) > 0 ? (m(), $("span", Ll, I(i(u)) + "/ ", 1)) : F("", !0),
1731
1731
  v("span", Il, I(i(t).storage.characterCount.characters()), 1),
1732
1732
  te(" " + I(("t" in x ? x.t : i(c))("wordCount.characters")) + " ", 1),
1733
1733
  v("i", {
@@ -1739,7 +1739,7 @@ const Be = {
1739
1739
  })
1740
1740
  ]),
1741
1741
  default: T(() => {
1742
- var q, Q;
1742
+ var J, Q;
1743
1743
  return [
1744
1744
  v("div", El, [
1745
1745
  v("div", Nl, I(("t" in x ? x.t : i(c))("wordCount.title")), 1),
@@ -1752,24 +1752,24 @@ const Be = {
1752
1752
  te(I(("t" in x ? x.t : i(c))("wordCount.selection")) + " ", 1),
1753
1753
  v("span", null, I(i(u)), 1)
1754
1754
  ]),
1755
- ((q = i(n).document) == null ? void 0 : q.characterLimit) ?? !1 ? (m(), M("li", Rl, [
1755
+ ((J = i(n).document) == null ? void 0 : J.characterLimit) ?? !1 ? (m(), $("li", Rl, [
1756
1756
  te(I(("t" in x ? x.t : i(c))("wordCount.limit")) + " ", 1),
1757
1757
  v("span", null, I(((Q = i(n).document) == null ? void 0 : Q.characterLimit) ?? 0), 1)
1758
- ])) : H("", !0)
1758
+ ])) : F("", !0)
1759
1759
  ])
1760
1760
  ])
1761
1761
  ];
1762
1762
  }),
1763
1763
  _: 1
1764
1764
  }, 8, ["to"]),
1765
- g(F, {
1765
+ g(D, {
1766
1766
  placement: "top",
1767
1767
  show: i(b),
1768
1768
  to: i(e),
1769
1769
  "show-arrow": !1,
1770
1770
  raw: "",
1771
1771
  trigger: "click",
1772
- "onUpdate:show": L[2] || (L[2] = (q) => b.value = q)
1772
+ "onUpdate:show": L[2] || (L[2] = (J) => b.value = J)
1773
1773
  }, {
1774
1774
  trigger: T(() => [
1775
1775
  g(N, {
@@ -1783,10 +1783,10 @@ const Be = {
1783
1783
  class: K(["smart-status-online i-sed:pluse", { offline: !i(f) }])
1784
1784
  }, null, 2),
1785
1785
  v("span", Hl, [
1786
- i(l) ? (m(), M("span", {
1786
+ i(l) ? (m(), $("span", {
1787
1787
  key: 0,
1788
1788
  textContent: I(("t" in x ? x.t : i(c))("save.savedAtText", { time: i(dn)(i(l)) }))
1789
- }, null, 8, zl)) : (m(), M("span", {
1789
+ }, null, 8, zl)) : (m(), $("span", {
1790
1790
  key: 1,
1791
1791
  class: "unsaved",
1792
1792
  textContent: I(("t" in x ? x.t : i(c))("save.unsaved"))
@@ -1802,10 +1802,10 @@ const Be = {
1802
1802
  v("div", null, I(("t" in x ? x.t : i(c))("save.network")) + " " + I(i(f) ? ("t" in x ? x.t : i(c))("save.online") : ("t" in x ? x.t : i(c))("save.offline")), 1),
1803
1803
  v("div", null, [
1804
1804
  te(I(("t" in x ? x.t : i(c))("save.savedAt")) + " ", 1),
1805
- i(l) ? (m(), M("span", {
1805
+ i(l) ? (m(), $("span", {
1806
1806
  key: 0,
1807
1807
  textContent: I(("t" in x ? x.t : i(c))("save.savedAtText", { time: i(dn)(i(l)) }))
1808
- }, null, 8, Pl)) : (m(), M("span", {
1808
+ }, null, 8, Pl)) : (m(), $("span", {
1809
1809
  key: 1,
1810
1810
  textContent: I(("t" in x ? x.t : i(c))("save.unsaved"))
1811
1811
  }, null, 8, Vl))
@@ -1814,7 +1814,7 @@ const Be = {
1814
1814
  g(N, {
1815
1815
  size: "tiny",
1816
1816
  type: "primary",
1817
- onClick: y
1817
+ onClick: C
1818
1818
  }, {
1819
1819
  default: T(() => [
1820
1820
  te(I(("t" in x ? x.t : i(c))("save.text")), 1)
@@ -1823,7 +1823,7 @@ const Be = {
1823
1823
  }),
1824
1824
  g(N, {
1825
1825
  size: "tiny",
1826
- onClick: k
1826
+ onClick: w
1827
1827
  }, {
1828
1828
  default: T(() => [
1829
1829
  te(I(("t" in x ? x.t : i(c))("save.cache.text")), 1)
@@ -1837,9 +1837,9 @@ const Be = {
1837
1837
  }, 8, ["show", "to"])
1838
1838
  ])
1839
1839
  ]),
1840
- g(V, {
1840
+ g(U, {
1841
1841
  show: i(s),
1842
- "onUpdate:show": L[3] || (L[3] = (q) => je(s) ? s.value = q : null),
1842
+ "onUpdate:show": L[3] || (L[3] = (J) => je(s) ? s.value = J : null),
1843
1843
  width: 320,
1844
1844
  "trap-focus": !1,
1845
1845
  "block-scroll": !1,
@@ -1854,7 +1854,7 @@ const Be = {
1854
1854
  ])
1855
1855
  ]),
1856
1856
  default: T(() => [
1857
- g(W)
1857
+ g(q)
1858
1858
  ]),
1859
1859
  _: 1
1860
1860
  })
@@ -1864,7 +1864,7 @@ const Be = {
1864
1864
  ], 64);
1865
1865
  };
1866
1866
  }
1867
- }, ql = /* @__PURE__ */ z(Jl, [["__scopeId", "data-v-a66f175f"]]), vo = ["table", "orderedList", "bulletList"], jl = $e.create({
1867
+ }, ql = /* @__PURE__ */ H(Jl, [["__scopeId", "data-v-a66f175f"]]), vo = ["table", "orderedList", "bulletList"], jl = $e.create({
1868
1868
  name: "selection",
1869
1869
  addProseMirrorPlugins() {
1870
1870
  const { editor: r } = this;
@@ -1902,7 +1902,7 @@ const Be = {
1902
1902
  return !1;
1903
1903
  if (n.attrs.vnode) {
1904
1904
  if (r.isActive("image") || r.isActive("video") || r.isActive("audio") || r.isActive("file")) {
1905
- const { options: l } = $(), { id: s, src: a } = n.attrs;
1905
+ const { options: l } = M(), { id: s, src: a } = n.attrs;
1906
1906
  (t = (o = l.value).onFileDelete) == null || t.call(o, s, a);
1907
1907
  }
1908
1908
  return e().focus().deleteSelection().run(), !0;
@@ -1928,7 +1928,7 @@ function it(r) {
1928
1928
  const Gl = { class: "smart-search-replace-container" }, Kl = { class: "smart-search-text" }, Xl = { class: "smart-replace-text" }, Yl = { class: "smart-advanced-options" }, Zl = { class: "smart-button-actions" }, Ql = {
1929
1929
  __name: "search-replace",
1930
1930
  setup(r) {
1931
- const { editor: e, searchReplace: n } = $(), o = B(null);
1931
+ const { editor: e, searchReplace: n } = M(), o = B(null);
1932
1932
  Re(() => {
1933
1933
  o.value = document.querySelector("body");
1934
1934
  });
@@ -1939,23 +1939,23 @@ const Gl = { class: "smart-search-replace-container" }, Kl = { class: "smart-sea
1939
1939
  Tt("ctrl+f, command+f", () => {
1940
1940
  n.value = !0;
1941
1941
  });
1942
- const d = U(
1942
+ const d = V(
1943
1943
  () => {
1944
- var w, A;
1945
- return ((A = (w = e.value) == null ? void 0 : w.storage.searchAndReplace) == null ? void 0 : A.results.length) || 0;
1944
+ var y, A;
1945
+ return ((A = (y = e.value) == null ? void 0 : y.storage.searchAndReplace) == null ? void 0 : A.results.length) || 0;
1946
1946
  }
1947
1947
  );
1948
1948
  function p() {
1949
- var w;
1950
- s.value = "", a.value = "", (w = e.value) == null || w.commands.resetIndex();
1949
+ var y;
1950
+ s.value = "", a.value = "", (y = e.value) == null || y.commands.resetIndex();
1951
1951
  }
1952
- function h(w = !1) {
1953
- e.value && (w && e.value.commands.resetIndex(), e.value.commands.setSearchTerm(s.value), e.value.commands.setReplaceTerm(a.value), e.value.commands.setCaseSensitive(u.value));
1952
+ function h(y = !1) {
1953
+ e.value && (y && e.value.commands.resetIndex(), e.value.commands.setSearchTerm(s.value), e.value.commands.setReplaceTerm(a.value), e.value.commands.setCaseSensitive(u.value));
1954
1954
  }
1955
1955
  function b() {
1956
1956
  if (!e.value)
1957
1957
  return;
1958
- const { results: w, resultIndex: A } = e.value.storage.searchAndReplace, x = w[A];
1958
+ const { results: y, resultIndex: A } = e.value.storage.searchAndReplace, x = y[A];
1959
1959
  if (!x)
1960
1960
  return;
1961
1961
  e.value.commands.setTextSelection(x);
@@ -1966,40 +1966,40 @@ const Gl = { class: "smart-search-replace-container" }, Kl = { class: "smart-sea
1966
1966
  }
1967
1967
  de(
1968
1968
  () => s.value.trim(),
1969
- (w, A) => {
1970
- w || p(), w !== A && h(!0);
1969
+ (y, A) => {
1970
+ y || p(), y !== A && h(!0);
1971
1971
  }
1972
1972
  ), de(
1973
1973
  () => a.value.trim(),
1974
- (w, A) => w === A ? null : h()
1974
+ (y, A) => y === A ? null : h()
1975
1975
  ), de(
1976
1976
  () => u,
1977
- (w, A) => {
1978
- w !== A && h(!0);
1977
+ (y, A) => {
1978
+ y !== A && h(!0);
1979
1979
  }
1980
1980
  );
1981
1981
  function f() {
1982
- var w;
1983
- (w = e.value) == null || w.commands.nextSearchResult(), b();
1982
+ var y;
1983
+ (y = e.value) == null || y.commands.nextSearchResult(), b();
1984
1984
  }
1985
- function C() {
1986
- var w;
1987
- (w = e.value) == null || w.commands.previousSearchResult(), b();
1985
+ function k() {
1986
+ var y;
1987
+ (y = e.value) == null || y.commands.previousSearchResult(), b();
1988
1988
  }
1989
- function y() {
1990
- var w;
1991
- (w = e.value) == null || w.commands.replace(), b();
1989
+ function C() {
1990
+ var y;
1991
+ (y = e.value) == null || y.commands.replace(), b();
1992
1992
  }
1993
- const k = () => {
1994
- var w;
1995
- return (w = e.value) == null ? void 0 : w.commands.replaceAll();
1993
+ const w = () => {
1994
+ var y;
1995
+ return (y = e.value) == null ? void 0 : y.commands.replaceAll();
1996
1996
  };
1997
1997
  return de(
1998
1998
  () => n.value,
1999
- (w) => {
2000
- s.value = w ? it(e.value) : "";
1999
+ (y) => {
2000
+ s.value = y ? it(e.value) : "";
2001
2001
  }
2002
- ), (w, A) => {
2002
+ ), (y, A) => {
2003
2003
  const x = In, L = Se, N = er, R = tr;
2004
2004
  return i(n) ? (m(), _(i(Br), {
2005
2005
  key: 0,
@@ -2010,24 +2010,24 @@ const Gl = { class: "smart-search-replace-container" }, Kl = { class: "smart-sea
2010
2010
  default: T(() => [
2011
2011
  g(R, {
2012
2012
  "header-style": "cursor:move",
2013
- title: ("t" in w ? w.t : i(c))("search.title"),
2013
+ title: ("t" in y ? y.t : i(c))("search.title"),
2014
2014
  closable: "",
2015
2015
  style: { width: "420px", "box-shadow": "0 1px 2px -2px rgba(0, 0, 0, .08), 0 3px 6px 0 rgba(0, 0, 0, .06), 0 5px 12px 4px rgba(0, 0, 0, .04)" },
2016
- onClose: A[3] || (A[3] = (F) => n.value = !1)
2016
+ onClose: A[3] || (A[3] = (D) => n.value = !1)
2017
2017
  }, {
2018
2018
  default: T(() => [
2019
2019
  v("div", Gl, [
2020
2020
  v("div", Kl, [
2021
2021
  g(x, {
2022
2022
  value: i(s),
2023
- "onUpdate:value": A[0] || (A[0] = (F) => je(s) ? s.value = F : null),
2024
- placeholder: ("t" in w ? w.t : i(c))("search.searchText"),
2023
+ "onUpdate:value": A[0] || (A[0] = (D) => je(s) ? s.value = D : null),
2024
+ placeholder: ("t" in y ? y.t : i(c))("search.searchText"),
2025
2025
  clearable: ""
2026
2026
  }, {
2027
2027
  suffix: T(() => {
2028
- var F, W, S;
2028
+ var D, q, S;
2029
2029
  return [
2030
- te(I(i(s) !== "" && i(d) !== 0 ? ((S = (W = (F = i(e)) == null ? void 0 : F.storage) == null ? void 0 : W.searchAndReplace) == null ? void 0 : S.resultIndex) + 1 : 0) + " / " + I(i(d)), 1)
2030
+ te(I(i(s) !== "" && i(d) !== 0 ? ((S = (q = (D = i(e)) == null ? void 0 : D.storage) == null ? void 0 : q.searchAndReplace) == null ? void 0 : S.resultIndex) + 1 : 0) + " / " + I(i(d)), 1)
2031
2031
  ];
2032
2032
  }),
2033
2033
  _: 1
@@ -2045,7 +2045,7 @@ const Gl = { class: "smart-search-replace-container" }, Kl = { class: "smart-sea
2045
2045
  g(L, {
2046
2046
  disabled: i(d) === 0,
2047
2047
  quaternary: "",
2048
- onClick: C
2048
+ onClick: k
2049
2049
  }, {
2050
2050
  default: T(() => A[5] || (A[5] = [
2051
2051
  v("i", {
@@ -2059,18 +2059,18 @@ const Gl = { class: "smart-search-replace-container" }, Kl = { class: "smart-sea
2059
2059
  v("div", Xl, [
2060
2060
  g(x, {
2061
2061
  value: i(a),
2062
- "onUpdate:value": A[1] || (A[1] = (F) => je(a) ? a.value = F : null),
2063
- placeholder: ("t" in w ? w.t : i(c))("search.replaceText"),
2062
+ "onUpdate:value": A[1] || (A[1] = (D) => je(a) ? a.value = D : null),
2063
+ placeholder: ("t" in y ? y.t : i(c))("search.replaceText"),
2064
2064
  clearable: ""
2065
2065
  }, null, 8, ["value", "placeholder"])
2066
2066
  ]),
2067
2067
  v("div", Yl, [
2068
2068
  g(N, {
2069
2069
  checked: i(u),
2070
- "onUpdate:checked": A[2] || (A[2] = (F) => je(u) ? u.value = F : null)
2070
+ "onUpdate:checked": A[2] || (A[2] = (D) => je(u) ? u.value = D : null)
2071
2071
  }, {
2072
2072
  default: T(() => [
2073
- te(I(("t" in w ? w.t : i(c))("search.caseSensitive")), 1)
2073
+ te(I(("t" in y ? y.t : i(c))("search.caseSensitive")), 1)
2074
2074
  ]),
2075
2075
  _: 1
2076
2076
  }, 8, ["checked"])
@@ -2079,20 +2079,20 @@ const Gl = { class: "smart-search-replace-container" }, Kl = { class: "smart-sea
2079
2079
  g(L, {
2080
2080
  disabled: i(d) === 0,
2081
2081
  quaternary: "",
2082
- onClick: y
2082
+ onClick: C
2083
2083
  }, {
2084
2084
  default: T(() => [
2085
- te(I(("t" in w ? w.t : i(c))("search.replace")), 1)
2085
+ te(I(("t" in y ? y.t : i(c))("search.replace")), 1)
2086
2086
  ]),
2087
2087
  _: 1
2088
2088
  }, 8, ["disabled"]),
2089
2089
  g(L, {
2090
2090
  disabled: i(d) === 0,
2091
2091
  quaternary: "",
2092
- onClick: k
2092
+ onClick: w
2093
2093
  }, {
2094
2094
  default: T(() => [
2095
- te(I(("t" in w ? w.t : i(c))("search.replaceAll")), 1)
2095
+ te(I(("t" in y ? y.t : i(c))("search.replaceAll")), 1)
2096
2096
  ]),
2097
2097
  _: 1
2098
2098
  }, 8, ["disabled"]),
@@ -2102,7 +2102,7 @@ const Gl = { class: "smart-search-replace-container" }, Kl = { class: "smart-sea
2102
2102
  onClick: f
2103
2103
  }, {
2104
2104
  default: T(() => [
2105
- te(I(("t" in w ? w.t : i(c))("search.search")), 1)
2105
+ te(I(("t" in y ? y.t : i(c))("search.search")), 1)
2106
2106
  ]),
2107
2107
  _: 1
2108
2108
  }, 8, ["disabled"])
@@ -2113,17 +2113,17 @@ const Gl = { class: "smart-search-replace-container" }, Kl = { class: "smart-sea
2113
2113
  }, 8, ["title"])
2114
2114
  ]),
2115
2115
  _: 1
2116
- }, 8, ["container-element"])) : H("", !0);
2116
+ }, 8, ["container-element"])) : F("", !0);
2117
2117
  };
2118
2118
  }
2119
- }, es = /* @__PURE__ */ z(Ql, [["__scopeId", "data-v-05d6139f"]]), ts = {
2119
+ }, es = /* @__PURE__ */ H(Ql, [["__scopeId", "data-v-05d6139f"]]), ts = {
2120
2120
  __name: "common",
2121
2121
  setup(r) {
2122
- const { container: e, editor: n, blockMenu: o } = $(), t = B(!1);
2122
+ const { container: e, editor: n, blockMenu: o } = M(), t = B(!1);
2123
2123
  function l(u) {
2124
2124
  return () => _e("i", { class: `${u}`, style: "font-size: 16px;" });
2125
2125
  }
2126
- const s = U(() => [
2126
+ const s = V(() => [
2127
2127
  {
2128
2128
  label: c("blockMenu.clearFormat"),
2129
2129
  key: "clearFormat",
@@ -2135,8 +2135,8 @@ const Gl = { class: "smart-search-replace-container" }, Kl = { class: "smart-sea
2135
2135
  const u = n.value ? Ne(n.value) : null, d = () => {
2136
2136
  var f;
2137
2137
  let b = 0;
2138
- return (f = n.value) == null || f.state.doc.descendants((C, y) => {
2139
- C === u && (b = y + C.nodeSize);
2138
+ return (f = n.value) == null || f.state.doc.descendants((k, C) => {
2139
+ k === u && (b = C + k.nodeSize);
2140
2140
  }), b;
2141
2141
  };
2142
2142
  (h = n.value) == null || h.chain().focus(d() - 1).run();
@@ -2153,8 +2153,8 @@ const Gl = { class: "smart-search-replace-container" }, Kl = { class: "smart-sea
2153
2153
  const u = n.value ? Ne(n.value) : null, d = () => {
2154
2154
  var f;
2155
2155
  let b = 0;
2156
- return (f = n.value) == null || f.state.doc.descendants((C, y) => {
2157
- C === u && (b = y + C.nodeSize);
2156
+ return (f = n.value) == null || f.state.doc.descendants((k, C) => {
2157
+ k === u && (b = C + k.nodeSize);
2158
2158
  }), b;
2159
2159
  }, p = u == null ? void 0 : u.type.create(
2160
2160
  {
@@ -2240,21 +2240,21 @@ const Gl = { class: "smart-search-replace-container" }, Kl = { class: "smart-sea
2240
2240
  }, 8, ["to", "options"]);
2241
2241
  };
2242
2242
  }
2243
- }, ns = /* @__PURE__ */ z(ts, [["__scopeId", "data-v-60ea9768"]]), os = {
2243
+ }, ns = /* @__PURE__ */ H(ts, [["__scopeId", "data-v-60ea9768"]]), os = {
2244
2244
  __name: "node",
2245
2245
  setup(r) {
2246
- const { container: e, editor: n, blockMenu: o, options: t, assistantBox: l } = $(), s = B(!1), a = B(!1), u = B(""), d = B("");
2247
- function p(C) {
2248
- return () => _e("i", { class: `${C}`, style: "font-size: 16px;" });
2246
+ const { container: e, editor: n, blockMenu: o, options: t, assistantBox: l } = M(), s = B(!1), a = B(!1), u = B(""), d = B("");
2247
+ function p(k) {
2248
+ return () => _e("i", { class: `${k}`, style: "font-size: 16px;" });
2249
2249
  }
2250
- const h = U(() => {
2251
- var C, y, k, w, A, x, L, N, R, F, W, S, V, j, q, Q, G, ue, ee, fe, ke, Le, De;
2250
+ const h = V(() => {
2251
+ var k, C, w, y, A, x, L, N, R, D, q, S, U, j, J, Q, G, ue, ee, fe, ke, Le, De;
2252
2252
  return [
2253
2253
  {
2254
2254
  label: c("assistant.text"),
2255
2255
  key: "assistant",
2256
2256
  icon: p("i-sed:assistant"),
2257
- show: !!((y = (C = t.value) == null ? void 0 : C.assistant) != null && y.enabled && ((k = n.value) != null && k.isActive("paragraph") || (w = n.value) != null && w.isActive("heading")) && ((N = (L = (x = (A = n.value) == null ? void 0 : A.state) == null ? void 0 : x.selection) == null ? void 0 : L.$from) != null && N.nodeAfter)),
2257
+ show: !!((C = (k = t.value) == null ? void 0 : k.assistant) != null && C.enabled && ((w = n.value) != null && w.isActive("paragraph") || (y = n.value) != null && y.isActive("heading")) && ((N = (L = (x = (A = n.value) == null ? void 0 : A.state) == null ? void 0 : x.selection) == null ? void 0 : L.$from) != null && N.nodeAfter)),
2258
2258
  props: {
2259
2259
  onClick: () => {
2260
2260
  b();
@@ -2264,7 +2264,7 @@ const Gl = { class: "smart-search-replace-container" }, Kl = { class: "smart-sea
2264
2264
  {
2265
2265
  type: "divider",
2266
2266
  key: "d1",
2267
- show: !!((F = (R = t.value) == null ? void 0 : R.assistant) != null && F.enabled && ((W = n.value) != null && W.isActive("paragraph") || (S = n.value) != null && S.isActive("heading")) && ((Q = (q = (j = (V = n.value) == null ? void 0 : V.state) == null ? void 0 : j.selection) == null ? void 0 : q.$from) != null && Q.nodeAfter))
2267
+ show: !!((D = (R = t.value) == null ? void 0 : R.assistant) != null && D.enabled && ((q = n.value) != null && q.isActive("paragraph") || (S = n.value) != null && S.isActive("heading")) && ((Q = (J = (j = (U = n.value) == null ? void 0 : U.state) == null ? void 0 : j.selection) == null ? void 0 : J.$from) != null && Q.nodeAfter))
2268
2268
  },
2269
2269
  {
2270
2270
  key: "insert",
@@ -2622,19 +2622,19 @@ const Gl = { class: "smart-search-replace-container" }, Kl = { class: "smart-sea
2622
2622
  ];
2623
2623
  });
2624
2624
  function b() {
2625
- var k, w, A, x;
2626
- l.value = !0, (k = n.value) == null || k.commands.selectParentNode(), (w = n.value) == null || w.commands.focus();
2627
- const { from: C, to: y } = ((A = n.value) == null ? void 0 : A.state.selection) ?? {};
2628
- (x = n.value) == null || x.commands.setTextSelection({ from: C ?? 0, to: y ?? 0 });
2625
+ var w, y, A, x;
2626
+ l.value = !0, (w = n.value) == null || w.commands.selectParentNode(), (y = n.value) == null || y.commands.focus();
2627
+ const { from: k, to: C } = ((A = n.value) == null ? void 0 : A.state.selection) ?? {};
2628
+ (x = n.value) == null || x.commands.setTextSelection({ from: k ?? 0, to: C ?? 0 });
2629
2629
  }
2630
- async function f(C) {
2631
- n.value.commands.focus(), o.value = C, s.value = C;
2630
+ async function f(k) {
2631
+ n.value.commands.focus(), o.value = k, s.value = k;
2632
2632
  }
2633
- return (C, y) => {
2633
+ return (k, C) => {
2634
2634
  var A;
2635
- const k = Se, w = lt;
2636
- return m(), M(J, null, [
2637
- g(w, {
2635
+ const w = Se, y = lt;
2636
+ return m(), $(W, null, [
2637
+ g(y, {
2638
2638
  to: `${i(e)} .smart-page-container`,
2639
2639
  placement: "bottom-end",
2640
2640
  options: i(h),
@@ -2644,13 +2644,13 @@ const Gl = { class: "smart-search-replace-container" }, Kl = { class: "smart-sea
2644
2644
  default: T(() => {
2645
2645
  var x, L;
2646
2646
  return [
2647
- g(k, {
2647
+ g(w, {
2648
2648
  class: K(["smart-menu-button", { active: i(s) && ((x = i(n)) == null ? void 0 : x.isEditable) !== !1 }]),
2649
2649
  quaternary: "",
2650
2650
  size: "small",
2651
2651
  disabled: ((L = i(n)) == null ? void 0 : L.isEditable) === !1
2652
2652
  }, {
2653
- default: T(() => y[1] || (y[1] = [
2653
+ default: T(() => C[1] || (C[1] = [
2654
2654
  v("div", { class: "smart-button-content" }, [
2655
2655
  v("i", { class: "i-sed:block-add" })
2656
2656
  ], -1)
@@ -2665,13 +2665,13 @@ const Gl = { class: "smart-search-replace-container" }, Kl = { class: "smart-sea
2665
2665
  key: 0,
2666
2666
  visible: i(a),
2667
2667
  header: i(d),
2668
- onClose: y[0] || (y[0] = (x) => a.value = !1),
2669
- onSuccess: C.handleInsert
2670
- }, null, 40, ["visible", "header", "onSuccess"])) : H("", !0)
2668
+ onClose: C[0] || (C[0] = (x) => a.value = !1),
2669
+ onSuccess: k.handleInsert
2670
+ }, null, 40, ["visible", "header", "onSuccess"])) : F("", !0)
2671
2671
  ], 64);
2672
2672
  };
2673
2673
  }
2674
- }, rs = /* @__PURE__ */ z(os, [["__scopeId", "data-v-bf3fad98"]]);
2674
+ }, rs = /* @__PURE__ */ H(os, [["__scopeId", "data-v-bf3fad98"]]);
2675
2675
  function ls(r, e) {
2676
2676
  const n = document.querySelector(
2677
2677
  `${e} .smart-node-focused, ${e} .ProseMirror-gapcursor`
@@ -2684,7 +2684,7 @@ function ls(r, e) {
2684
2684
  const ss = {
2685
2685
  __name: "index",
2686
2686
  setup(r) {
2687
- const { editor: e, container: n } = $(), o = B(!1), t = B(0), l = B("auto");
2687
+ const { editor: e, container: n } = M(), o = B(!1), t = B(0), l = B("auto");
2688
2688
  function s() {
2689
2689
  l.value = e.value && it(e.value).length > 0 ? "none" : "auto";
2690
2690
  const { offsetTop: a } = ls(e, n);
@@ -2698,7 +2698,7 @@ const ss = {
2698
2698
  e && ((a = e.value) == null || a.off("selectionUpdate", s), (u = e.value) == null || u.off("focus", s));
2699
2699
  }), (a, u) => {
2700
2700
  const d = rs, p = ns;
2701
- return i(o) ? (m(), M("div", {
2701
+ return i(o) ? (m(), $("div", {
2702
2702
  key: 0,
2703
2703
  class: "smart-block-menu-hander",
2704
2704
  style: le(
@@ -2710,7 +2710,7 @@ const ss = {
2710
2710
  }, [
2711
2711
  g(d),
2712
2712
  g(p)
2713
- ], 4)) : H("", !0);
2713
+ ], 4)) : F("", !0);
2714
2714
  };
2715
2715
  }
2716
2716
  }, is = { class: "assistant_panel" }, as = { class: "assistant_panel_body" }, us = {
@@ -2728,10 +2728,10 @@ const ss = {
2728
2728
  }, gs = ["onClick"], vs = { class: "prompt_item_icon" }, _s = { class: "prompt_item_text" }, ys = {
2729
2729
  __name: "input",
2730
2730
  setup(r) {
2731
- const { options: e, editor: n, assistantBox: o } = $(), t = B(!1), l = B(""), s = B(!1), a = B(30), u = B(0), d = B(0), p = B({
2731
+ const { options: e, editor: n, assistantBox: o } = M(), t = B(!1), l = B(""), s = B(!1), a = B(30), u = B(0), d = B(0), p = B({
2732
2732
  content: "",
2733
2733
  error: !1
2734
- }), h = B(null), b = B(null), f = B(null), C = U(() => [
2734
+ }), h = B(null), b = B(null), f = B(null), k = V(() => [
2735
2735
  {
2736
2736
  category: "continue_write",
2737
2737
  iconSvg: "assistant-keep-write",
@@ -2778,44 +2778,44 @@ const ss = {
2778
2778
  title: c("assistant.menu.audit")
2779
2779
  }
2780
2780
  ]);
2781
- function y() {
2782
- d.value < l.value.length ? (p.value.content += l.value.charAt(d.value), d.value++, setTimeout(y, a.value)) : s.value = !1;
2781
+ function C() {
2782
+ d.value < l.value.length ? (p.value.content += l.value.charAt(d.value), d.value++, setTimeout(C, a.value)) : s.value = !1;
2783
2783
  }
2784
- function k() {
2785
- u.value < l.value.length && !s.value && (s.value = !0, y());
2784
+ function w() {
2785
+ u.value < l.value.length && !s.value && (s.value = !0, C());
2786
2786
  }
2787
2787
  de(l, () => {
2788
- k();
2788
+ w();
2789
2789
  });
2790
- async function w(R) {
2790
+ async function y(R) {
2791
2791
  if (R && (b.value = R), !b.value)
2792
2792
  return;
2793
2793
  l.value = "", s.value = !1, u.value = 0, d.value = 0, p.value = {
2794
2794
  content: "",
2795
2795
  error: !1
2796
2796
  };
2797
- const { aiTalk: F, handleError: W, handleMessage: S } = e.value.assistant;
2797
+ const { aiTalk: D, handleError: q, handleMessage: S } = e.value.assistant;
2798
2798
  f.value = new AbortController();
2799
- const { signal: V } = f.value;
2799
+ const { signal: U } = f.value;
2800
2800
  t.value = !0;
2801
2801
  try {
2802
- const j = await F({
2802
+ const j = await D({
2803
2803
  msg: it(n.value),
2804
2804
  category: b.value.category,
2805
- signal: V
2805
+ signal: U
2806
2806
  });
2807
2807
  if (!j.ok) {
2808
- W(new Error("请求失败")), A();
2808
+ q(new Error("请求失败")), A();
2809
2809
  return;
2810
2810
  }
2811
- const q = j.body.getReader();
2812
- if (!q) {
2813
- W(new Error("内容错误")), A();
2811
+ const J = j.body.getReader();
2812
+ if (!J) {
2813
+ q(new Error("内容错误")), A();
2814
2814
  return;
2815
2815
  }
2816
2816
  const Q = new TextDecoder();
2817
2817
  for (; ; ) {
2818
- const { done: G, value: ue } = await q.read();
2818
+ const { done: G, value: ue } = await J.read();
2819
2819
  let ee = "";
2820
2820
  if (G) {
2821
2821
  t.value = !1;
@@ -2832,7 +2832,7 @@ const ss = {
2832
2832
  }
2833
2833
  }
2834
2834
  } catch (j) {
2835
- j.name === "AbortError" && (t.value = !1), W(new Error("请求错误")), A();
2835
+ j.name === "AbortError" && (t.value = !1), q(new Error("请求错误")), A();
2836
2836
  }
2837
2837
  }
2838
2838
  function A() {
@@ -2843,35 +2843,35 @@ const ss = {
2843
2843
  f.value && f.value.abort();
2844
2844
  }
2845
2845
  function L() {
2846
- var F, W;
2847
- const { to: R } = (F = n.value) == null ? void 0 : F.state.selection;
2848
- (W = n.value) == null || W.chain().focus().insertContentAt(R, p.value.content).run();
2846
+ var D, q;
2847
+ const { to: R } = (D = n.value) == null ? void 0 : D.state.selection;
2848
+ (q = n.value) == null || q.chain().focus().insertContentAt(R, p.value.content).run();
2849
2849
  }
2850
2850
  function N() {
2851
- var W, S;
2852
- const { from: R, to: F } = (W = n.value) == null ? void 0 : W.state.selection;
2853
- (S = n.value) == null || S.chain().focus().insertContentAt({ from: R, to: F }, p.value.content).run();
2851
+ var q, S;
2852
+ const { from: R, to: D } = (q = n.value) == null ? void 0 : q.state.selection;
2853
+ (S = n.value) == null || S.chain().focus().insertContentAt({ from: R, to: D }, p.value.content).run();
2854
2854
  }
2855
2855
  return Xe(() => {
2856
2856
  f.value && f.value.abort();
2857
- }), (R, F) => (m(), M("div", is, [
2857
+ }), (R, D) => (m(), $("div", is, [
2858
2858
  v("div", as, [
2859
- i(p).content === "" || i(t) ? (m(), M("div", us, [
2860
- F[3] || (F[3] = v("div", { class: "title_icon" }, null, -1)),
2861
- i(t) ? (m(), M(J, { key: 1 }, [
2859
+ i(p).content === "" || i(t) ? (m(), $("div", us, [
2860
+ D[3] || (D[3] = v("div", { class: "title_icon" }, null, -1)),
2861
+ i(t) ? (m(), $(W, { key: 1 }, [
2862
2862
  v("div", null, I(i(c)("assistant.loading")), 1),
2863
2863
  v("div", {
2864
2864
  class: "stop",
2865
2865
  onClick: x
2866
2866
  }, [
2867
- F[1] || (F[1] = v("i", { class: "i-sed:assistant-stop text-[#497fed]" }, null, -1)),
2867
+ D[1] || (D[1] = v("i", { class: "i-sed:assistant-stop text-[#497fed]" }, null, -1)),
2868
2868
  v("span", ds, I(i(c)("assistant.stop")), 1),
2869
- F[2] || (F[2] = v("span", { class: "stop_en" }, "ESC", -1))
2869
+ D[2] || (D[2] = v("span", { class: "stop_en" }, "ESC", -1))
2870
2870
  ])
2871
- ], 64)) : (m(), M("div", cs, I(i(c)("assistant.ask")), 1))
2872
- ])) : H("", !0),
2873
- i(p).content !== "" ? (m(), M("div", ps, [
2874
- i(t) ? H("", !0) : (m(), M("div", ms, [
2871
+ ], 64)) : (m(), $("div", cs, I(i(c)("assistant.ask")), 1))
2872
+ ])) : F("", !0),
2873
+ i(p).content !== "" ? (m(), $("div", ps, [
2874
+ i(t) ? F("", !0) : (m(), $("div", ms, [
2875
2875
  v("button", {
2876
2876
  class: "operation_button primary",
2877
2877
  onClick: L
@@ -2882,7 +2882,7 @@ const ss = {
2882
2882
  }, I(i(c)("assistant.replace")), 1),
2883
2883
  v("button", {
2884
2884
  class: "operation_button",
2885
- onClick: F[0] || (F[0] = (W) => w(i(b)))
2885
+ onClick: D[0] || (D[0] = (q) => y(i(b)))
2886
2886
  }, I(i(c)("assistant.rewrite")), 1),
2887
2887
  v("button", {
2888
2888
  class: "operation_button",
@@ -2896,25 +2896,25 @@ const ss = {
2896
2896
  innerHTML: i(p).content
2897
2897
  }, null, 8, hs),
2898
2898
  v("div", fs, I(i(c)("assistant.comment")), 1)
2899
- ])) : H("", !0)
2899
+ ])) : F("", !0)
2900
2900
  ]),
2901
- i(p).content === "" ? (m(), M("div", bs, [
2902
- (m(!0), M(J, null, ve(i(C), (W, S) => (m(), M("div", {
2901
+ i(p).content === "" ? (m(), $("div", bs, [
2902
+ (m(!0), $(W, null, ve(i(k), (q, S) => (m(), $("div", {
2903
2903
  key: S,
2904
2904
  class: "prompt_item",
2905
- onClick: (V) => w(W)
2905
+ onClick: (U) => y(q)
2906
2906
  }, [
2907
2907
  v("div", vs, [
2908
2908
  v("i", {
2909
- class: K(`i-sed:${W.iconSvg}`)
2909
+ class: K(`i-sed:${q.iconSvg}`)
2910
2910
  }, null, 2)
2911
2911
  ]),
2912
- v("div", _s, I(W.title), 1)
2912
+ v("div", _s, I(q.title), 1)
2913
2913
  ], 8, gs))), 128))
2914
- ])) : H("", !0)
2914
+ ])) : F("", !0)
2915
2915
  ]));
2916
2916
  }
2917
- }, Cs = /* @__PURE__ */ z(ys, [["__scopeId", "data-v-0a4456ba"]]), ks = { class: "smart-button-content" }, ws = { class: "smart-button-text" }, xs = {
2917
+ }, Cs = /* @__PURE__ */ H(ys, [["__scopeId", "data-v-0a4456ba"]]), ks = { class: "smart-button-content" }, ws = { class: "smart-button-text" }, xs = {
2918
2918
  key: 1,
2919
2919
  class: "smart-button-kbd"
2920
2920
  }, As = { class: "smart-button-content" }, Ts = { class: "smart-button-text" }, Ss = {
@@ -2999,26 +2999,26 @@ const ss = {
2999
2999
  },
3000
3000
  emits: ["toggle-popup"],
3001
3001
  setup(r, { emit: e }) {
3002
- const n = r, o = e, t = Kt(), { container: l, editor: s } = $();
3003
- function a(...y) {
3004
- t.onMenuClickThrough ? t.onMenuClickThrough(...y) : t.onMenuClick && t.onMenuClick(...y);
3002
+ const n = r, o = e, t = Kt(), { container: l, editor: s } = M();
3003
+ function a(...C) {
3004
+ t.onMenuClickThrough ? t.onMenuClickThrough(...C) : t.onMenuClick && t.onMenuClick(...C);
3005
3005
  }
3006
3006
  const u = B(!1), d = B(!1);
3007
- function p(y) {
3008
- d.value = y;
3007
+ function p(C) {
3008
+ d.value = C;
3009
3009
  }
3010
3010
  function h() {
3011
3011
  return n.tooltip === !1 ? "" : n.huge && n.tooltip ? `${n.tooltip}${n.shortcut ? ` (${we(n.shortcut)})` : ""}` : n.text ? `${n.tooltip ? n.tooltip : n.text}${n.shortcut ? ` (${we(n.shortcut)})` : ""}` : "";
3012
3012
  }
3013
3013
  de(
3014
3014
  () => n.popupVisible,
3015
- (y) => {
3016
- d.value = y;
3015
+ (C) => {
3016
+ d.value = C;
3017
3017
  }
3018
3018
  );
3019
3019
  const b = B(null), f = B(null);
3020
- function C(y) {
3021
- o("toggle-popup", y);
3020
+ function k(C) {
3021
+ o("toggle-popup", C);
3022
3022
  }
3023
3023
  return Mt(
3024
3024
  f,
@@ -3028,8 +3028,8 @@ const ss = {
3028
3028
  {
3029
3029
  ignore: [b, ".smart-popup"]
3030
3030
  }
3031
- ), (y, k) => {
3032
- const w = Se, A = lt, x = En, L = qt;
3031
+ ), (C, w) => {
3032
+ const y = Se, A = lt, x = En, L = qt;
3033
3033
  return m(), _(L, {
3034
3034
  show: i(u) && !i(d) && r.showTooltip,
3035
3035
  placement: "bottom",
@@ -3037,15 +3037,15 @@ const ss = {
3037
3037
  "show-arrow": !1
3038
3038
  }, {
3039
3039
  trigger: T(() => {
3040
- var N, R, F, W;
3040
+ var N, R, D, q;
3041
3041
  return [
3042
3042
  v("div", {
3043
3043
  class: "smart-menu-button-wrap",
3044
- onClick: k[2] || (k[2] = (S) => u.value = !1),
3045
- onMouseover: k[3] || (k[3] = (S) => u.value = !0),
3046
- onMouseleave: k[4] || (k[4] = (S) => u.value = !1)
3044
+ onClick: w[2] || (w[2] = (S) => u.value = !1),
3045
+ onMouseover: w[3] || (w[3] = (S) => u.value = !0),
3046
+ onMouseleave: w[4] || (w[4] = (S) => u.value = !1)
3047
3047
  }, [
3048
- r.menuType === "button" ? (m(), _(w, ge({
3048
+ r.menuType === "button" ? (m(), _(y, ge({
3049
3049
  key: 0,
3050
3050
  class: ["smart-menu-button", {
3051
3051
  "show-text": !r.hideText,
@@ -3057,13 +3057,13 @@ const ss = {
3057
3057
  }, i(t), { onClick: a }), {
3058
3058
  default: T(() => [
3059
3059
  v("div", ks, [
3060
- pe(y.$slots, "default", {}, void 0, !0),
3061
- r.ico ? (m(), M("i", {
3060
+ pe(C.$slots, "default", {}, void 0, !0),
3061
+ r.ico ? (m(), $("i", {
3062
3062
  key: 0,
3063
3063
  class: K(`${r.ico}`)
3064
- }, null, 2)) : H("", !0),
3064
+ }, null, 2)) : F("", !0),
3065
3065
  v("p", ws, I(r.text), 1),
3066
- r.shortcutText ? (m(), M("kbd", xs, I(i(we)(r.shortcutText)), 1)) : H("", !0)
3066
+ r.shortcutText ? (m(), $("kbd", xs, I(i(we)(r.shortcutText)), 1)) : F("", !0)
3067
3067
  ])
3068
3068
  ]),
3069
3069
  _: 3
@@ -3077,7 +3077,7 @@ const ss = {
3077
3077
  default: T(() => {
3078
3078
  var S;
3079
3079
  return [
3080
- g(w, ge({
3080
+ g(y, ge({
3081
3081
  class: ["smart-menu-button has-arrow", {
3082
3082
  "show-text": !r.hideText,
3083
3083
  active: r.popupVisible
@@ -3088,15 +3088,15 @@ const ss = {
3088
3088
  }, i(t)), {
3089
3089
  default: T(() => [
3090
3090
  v("div", As, [
3091
- pe(y.$slots, "default", {}, void 0, !0),
3092
- r.ico ? (m(), M("i", {
3091
+ pe(C.$slots, "default", {}, void 0, !0),
3092
+ r.ico ? (m(), $("i", {
3093
3093
  key: 0,
3094
3094
  class: K(`${r.ico}`)
3095
- }, null, 2)) : H("", !0),
3095
+ }, null, 2)) : F("", !0),
3096
3096
  v("p", Ts, I(r.text), 1),
3097
- r.shortcutText ? (m(), M("kbd", Ss, I(i(we)(r.shortcutText)), 1)) : H("", !0)
3097
+ r.shortcutText ? (m(), $("kbd", Ss, I(i(we)(r.shortcutText)), 1)) : F("", !0)
3098
3098
  ]),
3099
- k[5] || (k[5] = v("span", { class: "smart-button-icon-arrow" }, [
3099
+ w[5] || (w[5] = v("span", { class: "smart-button-icon-arrow" }, [
3100
3100
  v("i", { class: "i-sed:arrow-down" })
3101
3101
  ], -1))
3102
3102
  ]),
@@ -3112,17 +3112,17 @@ const ss = {
3112
3112
  value: r.selectValue
3113
3113
  }, i(t), {
3114
3114
  options: r.selectOptions,
3115
- disabled: r.disabled || ((F = i(s)) == null ? void 0 : F.isEditable) === !1,
3115
+ disabled: r.disabled || ((D = i(s)) == null ? void 0 : D.isEditable) === !1,
3116
3116
  to: i(l),
3117
3117
  "onUpdate:show": p,
3118
3118
  "onUpdate:value": a
3119
3119
  }), {
3120
3120
  default: T(() => [
3121
- pe(y.$slots, "default", {}, void 0, !0)
3121
+ pe(C.$slots, "default", {}, void 0, !0)
3122
3122
  ]),
3123
3123
  _: 3
3124
- }, 16, ["value", "options", "disabled", "to"])) : r.menuType === "popup" ? (m(), M(J, { key: 3 }, [
3125
- r.popupHandle === "arrow" ? (m(), _(w, ge({
3124
+ }, 16, ["value", "options", "disabled", "to"])) : r.menuType === "popup" ? (m(), $(W, { key: 3 }, [
3125
+ r.popupHandle === "arrow" ? (m(), _(y, ge({
3126
3126
  key: 0,
3127
3127
  class: ["smart-menu-button has-arrow", {
3128
3128
  "show-text": !r.hideText,
@@ -3130,20 +3130,20 @@ const ss = {
3130
3130
  }],
3131
3131
  quaternary: "",
3132
3132
  size: "small",
3133
- disabled: r.disabled || ((W = i(s)) == null ? void 0 : W.isEditable) === !1
3133
+ disabled: r.disabled || ((q = i(s)) == null ? void 0 : q.isEditable) === !1
3134
3134
  }, i(t)), {
3135
3135
  default: T(() => [
3136
3136
  v("div", {
3137
3137
  class: "smart-button-content",
3138
3138
  onClick: a
3139
3139
  }, [
3140
- pe(y.$slots, "default", {}, void 0, !0),
3141
- r.ico ? (m(), M("i", {
3140
+ pe(C.$slots, "default", {}, void 0, !0),
3141
+ r.ico ? (m(), $("i", {
3142
3142
  key: 0,
3143
3143
  class: K(`${r.ico}`)
3144
- }, null, 2)) : H("", !0),
3144
+ }, null, 2)) : F("", !0),
3145
3145
  v("p", $s, I(r.text), 1),
3146
- r.shortcutText ? (m(), M("kbd", Ms, I(i(we)(r.shortcutText)), 1)) : H("", !0)
3146
+ r.shortcutText ? (m(), $("kbd", Ms, I(i(we)(r.shortcutText)), 1)) : F("", !0)
3147
3147
  ]),
3148
3148
  g(L, {
3149
3149
  show: r.popupVisible,
@@ -3157,8 +3157,8 @@ const ss = {
3157
3157
  ref_key: "popupHandleRef",
3158
3158
  ref: b,
3159
3159
  class: "smart-button-icon-arrow smart-button-handle",
3160
- onClick: k[0] || (k[0] = (S) => C(!r.popupVisible))
3161
- }, k[6] || (k[6] = [
3160
+ onClick: w[0] || (w[0] = (S) => k(!r.popupVisible))
3161
+ }, w[6] || (w[6] = [
3162
3162
  v("i", { class: "i-sed:arrow-down" }, null, -1)
3163
3163
  ]), 512)
3164
3164
  ]),
@@ -3168,7 +3168,7 @@ const ss = {
3168
3168
  ref: f,
3169
3169
  class: "smart-popup-content p-x-8 p-y-4"
3170
3170
  }, [
3171
- pe(y.$slots, "content", {}, void 0, !0)
3171
+ pe(C.$slots, "content", {}, void 0, !0)
3172
3172
  ], 512)
3173
3173
  ]),
3174
3174
  _: 3
@@ -3184,9 +3184,9 @@ const ss = {
3184
3184
  trigger: "click"
3185
3185
  }, {
3186
3186
  trigger: T(() => {
3187
- var S, V;
3187
+ var S, U;
3188
3188
  return [
3189
- g(w, ge({
3189
+ g(y, ge({
3190
3190
  ref_key: "popupHandleRef",
3191
3191
  ref: b,
3192
3192
  class: ["smart-menu-button", {
@@ -3195,21 +3195,21 @@ const ss = {
3195
3195
  }],
3196
3196
  quaternary: "",
3197
3197
  size: "small",
3198
- disabled: r.disabled || ((V = i(s)) == null ? void 0 : V.isEditable) === !1
3198
+ disabled: r.disabled || ((U = i(s)) == null ? void 0 : U.isEditable) === !1
3199
3199
  }, i(t), {
3200
- onClick: k[1] || (k[1] = (j) => C(!r.popupVisible))
3200
+ onClick: w[1] || (w[1] = (j) => k(!r.popupVisible))
3201
3201
  }), {
3202
3202
  default: T(() => [
3203
3203
  v("div", Bs, [
3204
- pe(y.$slots, "default", {}, void 0, !0),
3205
- r.ico ? (m(), M("i", {
3204
+ pe(C.$slots, "default", {}, void 0, !0),
3205
+ r.ico ? (m(), $("i", {
3206
3206
  key: 0,
3207
3207
  class: K(`${r.ico}`)
3208
- }, null, 2)) : H("", !0),
3208
+ }, null, 2)) : F("", !0),
3209
3209
  v("p", Ls, I(r.text), 1),
3210
- r.shortcutText ? (m(), M("kbd", Is, I(i(we)(r.shortcutText)), 1)) : H("", !0)
3210
+ r.shortcutText ? (m(), $("kbd", Is, I(i(we)(r.shortcutText)), 1)) : F("", !0)
3211
3211
  ]),
3212
- k[7] || (k[7] = v("span", { class: "smart-button-icon-arrow" }, [
3212
+ w[7] || (w[7] = v("span", { class: "smart-button-icon-arrow" }, [
3213
3213
  v("i", { class: "i-sed:arrow-down" })
3214
3214
  ], -1))
3215
3215
  ]),
@@ -3223,12 +3223,12 @@ const ss = {
3223
3223
  ref: f,
3224
3224
  class: "smart-popup-content p-x-8 p-y-4"
3225
3225
  }, [
3226
- pe(y.$slots, "content", {}, void 0, !0)
3226
+ pe(C.$slots, "content", {}, void 0, !0)
3227
3227
  ], 512)
3228
3228
  ]),
3229
3229
  _: 3
3230
3230
  }, 8, ["show", "to"]))
3231
- ], 64)) : H("", !0)
3231
+ ], 64)) : F("", !0)
3232
3232
  ], 32)
3233
3233
  ];
3234
3234
  }),
@@ -3239,7 +3239,7 @@ const ss = {
3239
3239
  }, 8, ["show", "to"]);
3240
3240
  };
3241
3241
  }
3242
- }, E = /* @__PURE__ */ z(Ns, [["__scopeId", "data-v-ccc2f840"]]);
3242
+ }, E = /* @__PURE__ */ H(Ns, [["__scopeId", "data-v-ccc2f840"]]);
3243
3243
  function ye() {
3244
3244
  const r = B(!1);
3245
3245
  return { popupVisible: r, togglePopup: (n) => {
@@ -3256,10 +3256,10 @@ const Rs = ["id"], Fs = { class: "smart-color-picker-default-button" }, Hs = { c
3256
3256
  },
3257
3257
  emits: ["change", "update:visible"],
3258
3258
  setup(r, { emit: e }) {
3259
- const n = r, o = e, { popupVisible: t } = ye(), { options: l } = $(), s = ze("recent"), a = ["#B12318", "#EB3323", "#F6C143", "#FFFE55", "#A0CD63", "#4FAD5B", "#4CAFEA", "#2D70BA", "#06215C", "#68389B"], u = B(n.defaultColor), d = `#color-picker-${Te(4)}`;
3259
+ const n = r, o = e, { popupVisible: t } = ye(), { options: l } = M(), s = ze("recent"), a = ["#B12318", "#EB3323", "#F6C143", "#FFFE55", "#A0CD63", "#4FAD5B", "#4CAFEA", "#2D70BA", "#06215C", "#68389B"], u = B(n.defaultColor), d = `#color-picker-${Te(4)}`;
3260
3260
  function p(f) {
3261
- t.value = !0, s.value.colors.forEach((C, y) => {
3262
- C === f && s.value.colors.splice(y, 1);
3261
+ t.value = !0, s.value.colors.forEach((k, C) => {
3262
+ k === f && s.value.colors.splice(C, 1);
3263
3263
  }), s.value.colors.unshift(f), s.value.colors.length > 10 && s.value.colors.splice(10, 1), o("change", f), o("update:visible");
3264
3264
  }
3265
3265
  function h(f) {
@@ -3268,18 +3268,18 @@ const Rs = ["id"], Fs = { class: "smart-color-picker-default-button" }, Hs = { c
3268
3268
  function b() {
3269
3269
  return _e("div", { class: "smart-color-picker-render" }, "更多颜色");
3270
3270
  }
3271
- return (f, C) => {
3272
- var w;
3273
- const y = Se, k = Nn;
3274
- return m(), M("div", {
3271
+ return (f, k) => {
3272
+ var y;
3273
+ const C = Se, w = Nn;
3274
+ return m(), $("div", {
3275
3275
  id: d.substr(1),
3276
3276
  class: "smart-color-picker-container"
3277
3277
  }, [
3278
3278
  v("div", Fs, [
3279
- g(y, {
3279
+ g(C, {
3280
3280
  size: "small",
3281
3281
  block: "",
3282
- onClick: C[0] || (C[0] = (A) => h(i(u)))
3282
+ onClick: k[0] || (k[0] = (A) => h(i(u)))
3283
3283
  }, {
3284
3284
  default: T(() => [
3285
3285
  te(I(("t" in f ? f.t : i(c))("colorPicker.default")), 1)
@@ -3288,7 +3288,7 @@ const Rs = ["id"], Fs = { class: "smart-color-picker-default-button" }, Hs = { c
3288
3288
  })
3289
3289
  ]),
3290
3290
  v("div", Hs, [
3291
- (m(!0), M(J, null, ve((w = i(l).dicts) == null ? void 0 : w.colors, (A, x) => (m(), M("div", {
3291
+ (m(!0), $(W, null, ve((y = i(l).dicts) == null ? void 0 : y.colors, (A, x) => (m(), $("div", {
3292
3292
  key: x,
3293
3293
  class: "smart-color-picker-item",
3294
3294
  style: le({ backgroundColor: A }),
@@ -3300,29 +3300,29 @@ const Rs = ["id"], Fs = { class: "smart-color-picker-default-button" }, Hs = { c
3300
3300
  textContent: I(("t" in f ? f.t : i(c))("colorPicker.standard"))
3301
3301
  }, null, 8, Ds),
3302
3302
  v("div", Os, [
3303
- (m(), M(J, null, ve(a, (A, x) => v("div", {
3303
+ (m(), $(W, null, ve(a, (A, x) => v("div", {
3304
3304
  key: x,
3305
3305
  class: "smart-color-picker-item",
3306
3306
  style: le({ backgroundColor: A }),
3307
3307
  onClick: (L) => h(A)
3308
3308
  }, null, 12, Ps)), 64))
3309
3309
  ]),
3310
- i(s).colors.length > 0 ? (m(), M(J, { key: 0 }, [
3310
+ i(s).colors.length > 0 ? (m(), $(W, { key: 0 }, [
3311
3311
  v("div", {
3312
3312
  class: "smart-color-picker-group-title",
3313
3313
  textContent: I(("t" in f ? f.t : i(c))("colorPicker.recent"))
3314
3314
  }, null, 8, Vs),
3315
3315
  v("div", Ws, [
3316
- (m(!0), M(J, null, ve(i(s).colors, (A, x) => (m(), M("div", {
3316
+ (m(!0), $(W, null, ve(i(s).colors, (A, x) => (m(), $("div", {
3317
3317
  key: x,
3318
3318
  class: "smart-color-picker-item",
3319
3319
  style: le({ backgroundColor: A }),
3320
3320
  onClick: (L) => h(A)
3321
3321
  }, null, 12, Us))), 128))
3322
3322
  ])
3323
- ], 64)) : H("", !0),
3324
- C[1] || (C[1] = v("div", { class: "smart-color-picker-divider" }, null, -1)),
3325
- g(k, {
3323
+ ], 64)) : F("", !0),
3324
+ k[1] || (k[1] = v("div", { class: "smart-color-picker-divider" }, null, -1)),
3325
+ g(w, {
3326
3326
  to: d,
3327
3327
  placement: "right",
3328
3328
  "render-label": b,
@@ -3331,7 +3331,7 @@ const Rs = ["id"], Fs = { class: "smart-color-picker-default-button" }, Hs = { c
3331
3331
  ], 8, Rs);
3332
3332
  };
3333
3333
  }
3334
- }, at = /* @__PURE__ */ z(Js, [["__scopeId", "data-v-06db8e81"]]), qs = {
3334
+ }, at = /* @__PURE__ */ H(Js, [["__scopeId", "data-v-06db8e81"]]), qs = {
3335
3335
  __name: "background-color",
3336
3336
  props: {
3337
3337
  text: {
@@ -3349,7 +3349,7 @@ const Rs = ["id"], Fs = { class: "smart-color-picker-default-button" }, Hs = { c
3349
3349
  },
3350
3350
  emits: ["change"],
3351
3351
  setup(r, { emit: e }) {
3352
- const n = r, o = e, { popupVisible: t, togglePopup: l } = ye(), { editor: s } = $(), a = B("");
3352
+ const n = r, o = e, { popupVisible: t, togglePopup: l } = ye(), { editor: s } = M(), a = B("");
3353
3353
  function u(d) {
3354
3354
  var p, h;
3355
3355
  if (a.value = d, n.modeless) {
@@ -3388,7 +3388,7 @@ const Rs = ["id"], Fs = { class: "smart-color-picker-default-button" }, Hs = { c
3388
3388
  }, 8, ["text", "popup-visible", "onTogglePopup"]);
3389
3389
  };
3390
3390
  }
3391
- }, _o = /* @__PURE__ */ z(qs, [["__scopeId", "data-v-5e0cc688"]]), js = {
3391
+ }, _o = /* @__PURE__ */ H(qs, [["__scopeId", "data-v-5e0cc688"]]), js = {
3392
3392
  __name: "color",
3393
3393
  props: {
3394
3394
  text: {
@@ -3406,7 +3406,7 @@ const Rs = ["id"], Fs = { class: "smart-color-picker-default-button" }, Hs = { c
3406
3406
  },
3407
3407
  emits: ["change"],
3408
3408
  setup(r, { emit: e }) {
3409
- const n = r, o = e, { popupVisible: t, togglePopup: l } = ye(), { editor: s } = $(), a = B("");
3409
+ const n = r, o = e, { popupVisible: t, togglePopup: l } = ye(), { editor: s } = M(), a = B("");
3410
3410
  function u(d) {
3411
3411
  var p, h;
3412
3412
  if (a.value = d, n.modeless) {
@@ -3445,10 +3445,10 @@ const Rs = ["id"], Fs = { class: "smart-color-picker-default-button" }, Hs = { c
3445
3445
  }, 8, ["text", "popup-visible", "onTogglePopup"]);
3446
3446
  };
3447
3447
  }
3448
- }, yo = /* @__PURE__ */ z(js, [["__scopeId", "data-v-de44b29f"]]), Co = {
3448
+ }, yo = /* @__PURE__ */ H(js, [["__scopeId", "data-v-de44b29f"]]), Co = {
3449
3449
  __name: "strike",
3450
3450
  setup(r) {
3451
- const { editor: e } = $();
3451
+ const { editor: e } = M();
3452
3452
  return (n, o) => {
3453
3453
  var l, s;
3454
3454
  const t = E;
@@ -3468,7 +3468,7 @@ const Rs = ["id"], Fs = { class: "smart-color-picker-default-button" }, Hs = { c
3468
3468
  }, ko = {
3469
3469
  __name: "underline",
3470
3470
  setup(r) {
3471
- const { editor: e } = $();
3471
+ const { editor: e } = M();
3472
3472
  return (n, o) => {
3473
3473
  var l, s;
3474
3474
  const t = E;
@@ -3489,7 +3489,7 @@ const Rs = ["id"], Fs = { class: "smart-color-picker-default-button" }, Hs = { c
3489
3489
  }, wo = {
3490
3490
  __name: "italic",
3491
3491
  setup(r) {
3492
- const { editor: e } = $();
3492
+ const { editor: e } = M();
3493
3493
  return (n, o) => {
3494
3494
  var l, s;
3495
3495
  const t = E;
@@ -3510,7 +3510,7 @@ const Rs = ["id"], Fs = { class: "smart-color-picker-default-button" }, Hs = { c
3510
3510
  }, xo = {
3511
3511
  __name: "bold",
3512
3512
  setup(r) {
3513
- const { editor: e } = $();
3513
+ const { editor: e } = M();
3514
3514
  return (n, o) => {
3515
3515
  var l, s;
3516
3516
  const t = E;
@@ -3531,7 +3531,7 @@ const Rs = ["id"], Fs = { class: "smart-color-picker-default-button" }, Hs = { c
3531
3531
  }, Gs = {
3532
3532
  __name: "assistant",
3533
3533
  setup(r) {
3534
- const { editor: e, assistantBox: n } = $();
3534
+ const { editor: e, assistantBox: n } = M();
3535
3535
  function o() {
3536
3536
  var t;
3537
3537
  n.value = !0, (t = e.value) == null || t.commands.focus();
@@ -3548,7 +3548,7 @@ const Rs = ["id"], Fs = { class: "smart-color-picker-default-button" }, Hs = { c
3548
3548
  }, Ks = {
3549
3549
  __name: "color",
3550
3550
  setup(r) {
3551
- const { popupVisible: e, togglePopup: n } = ye(), { editor: o } = $(), t = B(""), l = B("");
3551
+ const { popupVisible: e, togglePopup: n } = ye(), { editor: o } = M(), t = B(""), l = B("");
3552
3552
  function s(a) {
3553
3553
  var u;
3554
3554
  t.value = a, a !== "" && ((u = o.value) == null || u.chain().focus().updateAttributes("highlightBlock", { backgroundColor: a }).run());
@@ -3584,10 +3584,10 @@ const Rs = ["id"], Fs = { class: "smart-color-picker-default-button" }, Hs = { c
3584
3584
  }, 8, ["text", "popup-visible", "onTogglePopup"]);
3585
3585
  };
3586
3586
  }
3587
- }, Xs = /* @__PURE__ */ z(Ks, [["__scopeId", "data-v-dd8e0ec3"]]), Ys = {
3587
+ }, Xs = /* @__PURE__ */ H(Ks, [["__scopeId", "data-v-dd8e0ec3"]]), Ys = {
3588
3588
  __name: "delete",
3589
3589
  setup(r) {
3590
- const { editor: e } = $();
3590
+ const { editor: e } = M();
3591
3591
  return (n, o) => {
3592
3592
  const t = E;
3593
3593
  return m(), _(t, {
@@ -3604,7 +3604,7 @@ const Rs = ["id"], Fs = { class: "smart-color-picker-default-button" }, Hs = { c
3604
3604
  }, Zs = {
3605
3605
  __name: "copy",
3606
3606
  setup(r) {
3607
- const { editor: e } = $();
3607
+ const { editor: e } = M();
3608
3608
  function n() {
3609
3609
  const o = e.value ? Ne(e.value) : null;
3610
3610
  if (o) {
@@ -3626,7 +3626,7 @@ const Rs = ["id"], Fs = { class: "smart-color-picker-default-button" }, Hs = { c
3626
3626
  }, Qs = {
3627
3627
  __name: "word-wrap",
3628
3628
  setup(r) {
3629
- const { editor: e } = $();
3629
+ const { editor: e } = M();
3630
3630
  function n() {
3631
3631
  var t, l;
3632
3632
  const o = e.value ? Ne(e.value) : null;
@@ -3648,7 +3648,7 @@ const Rs = ["id"], Fs = { class: "smart-color-picker-default-button" }, Hs = { c
3648
3648
  }, ei = {
3649
3649
  __name: "line-numbers",
3650
3650
  setup(r) {
3651
- const { editor: e } = $();
3651
+ const { editor: e } = M();
3652
3652
  function n() {
3653
3653
  var t, l;
3654
3654
  const o = e.value ? Ne(e.value) : null;
@@ -3670,7 +3670,7 @@ const Rs = ["id"], Fs = { class: "smart-color-picker-default-button" }, Hs = { c
3670
3670
  }, ti = {
3671
3671
  __name: "themes",
3672
3672
  setup(r) {
3673
- const { editor: e } = $(), n = [
3673
+ const { editor: e } = M(), n = [
3674
3674
  { label: c("bubbleMenu.code.themes.dark"), value: "dark" },
3675
3675
  { label: c("bubbleMenu.code.themes.light"), value: "light" }
3676
3676
  ];
@@ -3695,7 +3695,7 @@ const Rs = ["id"], Fs = { class: "smart-color-picker-default-button" }, Hs = { c
3695
3695
  }, ni = {
3696
3696
  __name: "languages",
3697
3697
  setup(r) {
3698
- const { editor: e } = $(), n = Object.keys(Ir).map((t) => ({ label: t, value: t }));
3698
+ const { editor: e } = M(), n = Object.keys(Ir).map((t) => ({ label: t, value: t }));
3699
3699
  function o(t) {
3700
3700
  var s;
3701
3701
  const l = e.value ? Ne(e.value) : null;
@@ -3718,7 +3718,7 @@ const Rs = ["id"], Fs = { class: "smart-color-picker-default-button" }, Hs = { c
3718
3718
  }, oi = {
3719
3719
  __name: "cell-border",
3720
3720
  setup(r) {
3721
- const { editor: e } = $(), n = U(() => [
3721
+ const { editor: e } = M(), n = V(() => [
3722
3722
  {
3723
3723
  label: c("table.border.cellLeft"),
3724
3724
  key: "cellLeft",
@@ -4282,7 +4282,7 @@ const Rs = ["id"], Fs = { class: "smart-color-picker-default-button" }, Hs = { c
4282
4282
  }, ri = {
4283
4283
  __name: "cell-line",
4284
4284
  setup(r) {
4285
- const { editor: e } = $();
4285
+ const { editor: e } = M();
4286
4286
  function n() {
4287
4287
  var o;
4288
4288
  (o = e.value) == null || o.chain().focus().toggleCellLine().run();
@@ -4307,7 +4307,7 @@ const Rs = ["id"], Fs = { class: "smart-color-picker-default-button" }, Hs = { c
4307
4307
  }
4308
4308
  },
4309
4309
  setup(r) {
4310
- const { popupVisible: e, togglePopup: n } = ye(), { editor: o } = $(), t = B("");
4310
+ const { popupVisible: e, togglePopup: n } = ye(), { editor: o } = M(), t = B("");
4311
4311
  function l(s) {
4312
4312
  var a, u;
4313
4313
  t.value = s, s === "" ? (a = o.value) == null || a.chain().focus().setCellAttribute("backgroundColor", "transparent").run() : (u = o.value) == null || u.chain().focus().setCellAttribute("backgroundColor", s).run();
@@ -4343,10 +4343,10 @@ const Rs = ["id"], Fs = { class: "smart-color-picker-default-button" }, Hs = { c
4343
4343
  }, 8, ["text", "popup-visible", "onTogglePopup"]);
4344
4344
  };
4345
4345
  }
4346
- }, si = /* @__PURE__ */ z(li, [["__scopeId", "data-v-ce6b29b9"]]), ii = {
4346
+ }, si = /* @__PURE__ */ H(li, [["__scopeId", "data-v-ce6b29b9"]]), ii = {
4347
4347
  __name: "merge-split",
4348
4348
  setup(r) {
4349
- const { editor: e } = $(), n = U(() => e.value ? e.value.can().mergeCells() ? "i-sed:table-merge" : "i-sed:table-split" : "i-sed:table-merge");
4349
+ const { editor: e } = M(), n = V(() => e.value ? e.value.can().mergeCells() ? "i-sed:table-merge" : "i-sed:table-split" : "i-sed:table-merge");
4350
4350
  function o() {
4351
4351
  var t;
4352
4352
  (t = e.value) == null || t.chain().focus().mergeOrSplit().run();
@@ -4365,7 +4365,7 @@ const Rs = ["id"], Fs = { class: "smart-color-picker-default-button" }, Hs = { c
4365
4365
  }, ai = {
4366
4366
  __name: "delete-row",
4367
4367
  setup(r) {
4368
- const { editor: e } = $();
4368
+ const { editor: e } = M();
4369
4369
  function n() {
4370
4370
  var o;
4371
4371
  (o = e.value) == null || o.chain().focus().deleteRow().run();
@@ -4382,7 +4382,7 @@ const Rs = ["id"], Fs = { class: "smart-color-picker-default-button" }, Hs = { c
4382
4382
  }, ui = {
4383
4383
  __name: "delete-column",
4384
4384
  setup(r) {
4385
- const { editor: e } = $();
4385
+ const { editor: e } = M();
4386
4386
  function n() {
4387
4387
  var o;
4388
4388
  (o = e.value) == null || o.chain().focus().deleteColumn().run();
@@ -4399,7 +4399,7 @@ const Rs = ["id"], Fs = { class: "smart-color-picker-default-button" }, Hs = { c
4399
4399
  }, ci = {
4400
4400
  __name: "add-row-after",
4401
4401
  setup(r) {
4402
- const { editor: e } = $();
4402
+ const { editor: e } = M();
4403
4403
  function n() {
4404
4404
  var o;
4405
4405
  (o = e.value) == null || o.chain().focus().addRowAfter().run();
@@ -4416,7 +4416,7 @@ const Rs = ["id"], Fs = { class: "smart-color-picker-default-button" }, Hs = { c
4416
4416
  }, di = {
4417
4417
  __name: "add-row-before",
4418
4418
  setup(r) {
4419
- const { editor: e } = $();
4419
+ const { editor: e } = M();
4420
4420
  function n() {
4421
4421
  var o;
4422
4422
  (o = e.value) == null || o.chain().focus().addRowBefore().run();
@@ -4433,7 +4433,7 @@ const Rs = ["id"], Fs = { class: "smart-color-picker-default-button" }, Hs = { c
4433
4433
  }, pi = {
4434
4434
  __name: "add-column-after",
4435
4435
  setup(r) {
4436
- const { editor: e } = $();
4436
+ const { editor: e } = M();
4437
4437
  function n() {
4438
4438
  var o;
4439
4439
  (o = e.value) == null || o.chain().focus().addColumnAfter().run();
@@ -4450,7 +4450,7 @@ const Rs = ["id"], Fs = { class: "smart-color-picker-default-button" }, Hs = { c
4450
4450
  }, mi = {
4451
4451
  __name: "add-column-before",
4452
4452
  setup(r) {
4453
- const { editor: e } = $();
4453
+ const { editor: e } = M();
4454
4454
  function n() {
4455
4455
  var o;
4456
4456
  (o = e.value) == null || o.chain().focus().addColumnBefore().run();
@@ -4468,7 +4468,7 @@ const Rs = ["id"], Fs = { class: "smart-color-picker-default-button" }, Hs = { c
4468
4468
  __name: "vertical-bottom",
4469
4469
  emits: "update:popupVisible",
4470
4470
  setup(r, { emit: e }) {
4471
- const n = e, { editor: o } = $();
4471
+ const n = e, { editor: o } = M();
4472
4472
  function t() {
4473
4473
  var s;
4474
4474
  n("update:popupVisible"), (s = o.value) == null || s.chain().focus().setCellAttribute("cellVertical", "bottom").run();
@@ -4493,7 +4493,7 @@ const Rs = ["id"], Fs = { class: "smart-color-picker-default-button" }, Hs = { c
4493
4493
  __name: "vertical-middle",
4494
4494
  emits: "update:popupVisible",
4495
4495
  setup(r, { emit: e }) {
4496
- const n = e, { editor: o } = $();
4496
+ const n = e, { editor: o } = M();
4497
4497
  function t() {
4498
4498
  var s;
4499
4499
  n("update:popupVisible"), (s = o.value) == null || s.chain().focus().setCellAttribute("cellVertical", "middle").run();
@@ -4518,7 +4518,7 @@ const Rs = ["id"], Fs = { class: "smart-color-picker-default-button" }, Hs = { c
4518
4518
  __name: "vertical-top",
4519
4519
  emits: "update:popupVisible",
4520
4520
  setup(r, { emit: e }) {
4521
- const n = e, { editor: o } = $();
4521
+ const n = e, { editor: o } = M();
4522
4522
  function t() {
4523
4523
  var s;
4524
4524
  n("update:popupVisible"), (s = o.value) == null || s.chain().focus().setCellAttribute("cellVertical", "top").run();
@@ -4542,7 +4542,7 @@ const Rs = ["id"], Fs = { class: "smart-color-picker-default-button" }, Hs = { c
4542
4542
  }, gi = { class: "smart-text-align-group" }, vi = {
4543
4543
  __name: "vertical-dropdown",
4544
4544
  setup(r) {
4545
- const { popupVisible: e, togglePopup: n } = ye(), { editor: o } = $(), t = U(() => {
4545
+ const { popupVisible: e, togglePopup: n } = ye(), { editor: o } = M(), t = V(() => {
4546
4546
  var s;
4547
4547
  if (!o.value)
4548
4548
  return "top";
@@ -4573,7 +4573,7 @@ const Rs = ["id"], Fs = { class: "smart-color-picker-default-button" }, Hs = { c
4573
4573
  }, _i = {
4574
4574
  __name: "auto",
4575
4575
  setup(r) {
4576
- const { editor: e } = $();
4576
+ const { editor: e } = M();
4577
4577
  function n() {
4578
4578
  var t;
4579
4579
  (t = e.value) == null || t.chain().focus().toggleTableAuto().run();
@@ -4596,7 +4596,7 @@ const Rs = ["id"], Fs = { class: "smart-color-picker-default-button" }, Hs = { c
4596
4596
  }, yi = {
4597
4597
  __name: "width",
4598
4598
  setup(r) {
4599
- const { editor: e } = $();
4599
+ const { editor: e } = M();
4600
4600
  function n() {
4601
4601
  var t;
4602
4602
  (t = e.value) == null || t.chain().focus().toggleWidthAuto().run();
@@ -4619,7 +4619,7 @@ const Rs = ["id"], Fs = { class: "smart-color-picker-default-button" }, Hs = { c
4619
4619
  }, Ci = {
4620
4620
  __name: "border",
4621
4621
  setup(r) {
4622
- const { editor: e } = $(), n = U(() => {
4622
+ const { editor: e } = M(), n = V(() => {
4623
4623
  var l;
4624
4624
  if (!e.value)
4625
4625
  return "i-sed:table-border";
@@ -4642,7 +4642,7 @@ const Rs = ["id"], Fs = { class: "smart-color-picker-default-button" }, Hs = { c
4642
4642
  }, ki = {
4643
4643
  __name: "delete",
4644
4644
  setup(r) {
4645
- const { editor: e } = $();
4645
+ const { editor: e } = M();
4646
4646
  function n() {
4647
4647
  var o;
4648
4648
  (o = e.value) == null || o.chain().focus().deleteTable().run();
@@ -4659,7 +4659,7 @@ const Rs = ["id"], Fs = { class: "smart-color-picker-default-button" }, Hs = { c
4659
4659
  }, wi = {
4660
4660
  __name: "float-right",
4661
4661
  setup(r) {
4662
- const { editor: e } = $();
4662
+ const { editor: e } = M();
4663
4663
  function n() {
4664
4664
  var t;
4665
4665
  (t = e.value) == null || t.chain().focus().updateImage({ display: "right" }).run();
@@ -4683,7 +4683,7 @@ const Rs = ["id"], Fs = { class: "smart-color-picker-default-button" }, Hs = { c
4683
4683
  }, xi = {
4684
4684
  __name: "float-no",
4685
4685
  setup(r) {
4686
- const { editor: e } = $();
4686
+ const { editor: e } = M();
4687
4687
  function n() {
4688
4688
  var t;
4689
4689
  (t = e.value) == null || t.chain().focus().updateImage({ display: "inline" }).run();
@@ -4707,7 +4707,7 @@ const Rs = ["id"], Fs = { class: "smart-color-picker-default-button" }, Hs = { c
4707
4707
  }, Ai = {
4708
4708
  __name: "float-left",
4709
4709
  setup(r) {
4710
- const { editor: e } = $();
4710
+ const { editor: e } = M();
4711
4711
  function n() {
4712
4712
  var t;
4713
4713
  (t = e.value) == null || t.chain().focus().updateImage({ display: "left" }).run();
@@ -4731,7 +4731,7 @@ const Rs = ["id"], Fs = { class: "smart-color-picker-default-button" }, Hs = { c
4731
4731
  }, Ti = { class: "smart-text-align-group" }, Si = {
4732
4732
  __name: "float-dropdown",
4733
4733
  setup(r) {
4734
- const { popupVisible: e, togglePopup: n } = ye(), { editor: o } = $(), t = U(() => {
4734
+ const { popupVisible: e, togglePopup: n } = ye(), { editor: o } = M(), t = V(() => {
4735
4735
  var a;
4736
4736
  if (!o.value)
4737
4737
  return "no";
@@ -4768,7 +4768,7 @@ const Rs = ["id"], Fs = { class: "smart-color-picker-default-button" }, Hs = { c
4768
4768
  }, $i = {
4769
4769
  __name: "describe",
4770
4770
  setup(r) {
4771
- const { editor: e } = $();
4771
+ const { editor: e } = M();
4772
4772
  function n() {
4773
4773
  var s, a;
4774
4774
  const { describe: l } = (s = e.value) == null ? void 0 : s.getAttributes("image");
@@ -4798,7 +4798,7 @@ const Rs = ["id"], Fs = { class: "smart-color-picker-default-button" }, Hs = { c
4798
4798
  }, Mi = {
4799
4799
  __name: "chapter",
4800
4800
  setup(r) {
4801
- const { editor: e } = $();
4801
+ const { editor: e } = M();
4802
4802
  function n() {
4803
4803
  var t, l;
4804
4804
  const { chapter: o } = (t = e.value) == null ? void 0 : t.getAttributes("image");
@@ -4816,15 +4816,15 @@ const Rs = ["id"], Fs = { class: "smart-color-picker-default-button" }, Hs = { c
4816
4816
  }, Bi = {
4817
4817
  __name: "menus",
4818
4818
  setup(r) {
4819
- const { options: e, editor: n } = $();
4819
+ const { options: e, editor: n } = M();
4820
4820
  return (o, t) => {
4821
4821
  var O, Z, ce, ut, ct, dt, pt, mt, Ye, Ze, tn;
4822
- const l = Mi, s = $i, a = Si, u = ki, d = Ci, p = yi, h = _i, b = vi, f = mi, C = pi, y = di, k = ci, w = ui, A = ai, x = ii, L = si, N = ri, R = oi, F = ni, W = ti, S = ei, V = Qs, j = Zs, q = Ys, Q = Xs, G = Gs, ue = xo, ee = wo, fe = ko, ke = Co, Le = yo, De = _o;
4823
- return (O = i(n)) != null && O.isActive("map") || (Z = i(n)) != null && Z.getAttributes("bubble").bubble || (ce = i(n)) != null && ce.isActive("pagination") || (ut = i(n)) != null && ut.isActive("horizontalRule") || (ct = i(n)) != null && ct.getAttributes("image").error ? (m(), M(J, { key: 0 }, [], 64)) : (dt = i(n)) != null && dt.isActive("image") && !((pt = i(n)) != null && pt.getAttributes("image").error) ? (m(), M(J, { key: 1 }, [
4822
+ const l = Mi, s = $i, a = Si, u = ki, d = Ci, p = yi, h = _i, b = vi, f = mi, k = pi, C = di, w = ci, y = ui, A = ai, x = ii, L = si, N = ri, R = oi, D = ni, q = ti, S = ei, U = Qs, j = Zs, J = Ys, Q = Xs, G = Gs, ue = xo, ee = wo, fe = ko, ke = Co, Le = yo, De = _o;
4823
+ return (O = i(n)) != null && O.isActive("map") || (Z = i(n)) != null && Z.getAttributes("bubble").bubble || (ce = i(n)) != null && ce.isActive("pagination") || (ut = i(n)) != null && ut.isActive("horizontalRule") || (ct = i(n)) != null && ct.getAttributes("image").error ? (m(), $(W, { key: 0 }, [], 64)) : (dt = i(n)) != null && dt.isActive("image") && !((pt = i(n)) != null && pt.getAttributes("image").error) ? (m(), $(W, { key: 1 }, [
4824
4824
  g(l),
4825
4825
  g(s),
4826
4826
  g(a)
4827
- ], 64)) : (mt = i(n)) != null && mt.isActive("table") ? (m(), M(J, { key: 2 }, [
4827
+ ], 64)) : (mt = i(n)) != null && mt.isActive("table") ? (m(), $(W, { key: 2 }, [
4828
4828
  g(u),
4829
4829
  t[0] || (t[0] = v("div", { class: "smart-bubble-menu-divider" }, null, -1)),
4830
4830
  g(d),
@@ -4833,33 +4833,33 @@ const Rs = ["id"], Fs = { class: "smart-color-picker-default-button" }, Hs = { c
4833
4833
  g(b),
4834
4834
  t[1] || (t[1] = v("div", { class: "smart-bubble-menu-divider" }, null, -1)),
4835
4835
  g(f),
4836
- g(C),
4837
- g(y),
4838
4836
  g(k),
4837
+ g(C),
4839
4838
  g(w),
4839
+ g(y),
4840
4840
  g(A),
4841
4841
  g(x),
4842
4842
  t[2] || (t[2] = v("div", { class: "smart-bubble-menu-divider" }, null, -1)),
4843
4843
  g(L),
4844
4844
  g(N),
4845
4845
  g(R)
4846
- ], 64)) : (Ye = i(n)) != null && Ye.isActive("codeBlock") ? (m(), M(J, { key: 3 }, [
4847
- g(F),
4848
- g(W),
4846
+ ], 64)) : (Ye = i(n)) != null && Ye.isActive("codeBlock") ? (m(), $(W, { key: 3 }, [
4847
+ g(D),
4848
+ g(q),
4849
4849
  t[3] || (t[3] = v("div", { class: "smart-bubble-menu-divider" }, null, -1)),
4850
4850
  g(S),
4851
- g(V),
4851
+ g(U),
4852
4852
  t[4] || (t[4] = v("div", { class: "smart-bubble-menu-divider" }, null, -1)),
4853
4853
  g(j),
4854
- g(q)
4855
- ], 64)) : (Ze = i(n)) != null && Ze.isActive("highlightBlock") ? (m(), M(J, { key: 4 }, [
4854
+ g(J)
4855
+ ], 64)) : (Ze = i(n)) != null && Ze.isActive("highlightBlock") ? (m(), $(W, { key: 4 }, [
4856
4856
  g(Q),
4857
- g(q)
4858
- ], 64)) : (m(), M(J, { key: 5 }, [
4859
- (tn = i(e).assistant) != null && tn.enabled ? (m(), M(J, { key: 0 }, [
4857
+ g(J)
4858
+ ], 64)) : (m(), $(W, { key: 5 }, [
4859
+ (tn = i(e).assistant) != null && tn.enabled ? (m(), $(W, { key: 0 }, [
4860
4860
  g(G),
4861
4861
  t[5] || (t[5] = v("div", { class: "smart-bubble-menu-divider" }, null, -1))
4862
- ], 64)) : H("", !0),
4862
+ ], 64)) : F("", !0),
4863
4863
  g(ue),
4864
4864
  g(ee),
4865
4865
  g(fe),
@@ -4870,10 +4870,10 @@ const Rs = ["id"], Fs = { class: "smart-color-picker-default-button" }, Hs = { c
4870
4870
  ], 64));
4871
4871
  };
4872
4872
  }
4873
- }, Li = /* @__PURE__ */ z(Bi, [["__scopeId", "data-v-24c01023"]]), Ii = {
4873
+ }, Li = /* @__PURE__ */ H(Bi, [["__scopeId", "data-v-24c01023"]]), Ii = {
4874
4874
  __name: "index",
4875
4875
  setup(r) {
4876
- const { options: e, blockMenu: n, editor: o, painter: t, assistantBox: l } = $(), s = B(null), a = B({
4876
+ const { options: e, blockMenu: n, editor: o, painter: t, assistantBox: l } = M(), s = B(null), a = B({
4877
4877
  appendTo: "parent",
4878
4878
  maxWidth: 580,
4879
4879
  zIndex: 99,
@@ -4903,10 +4903,10 @@ const Rs = ["id"], Fs = { class: "smart-color-picker-default-button" }, Hs = { c
4903
4903
  "tippy-options": i(a)
4904
4904
  }, {
4905
4905
  default: T(() => {
4906
- var b, f, C, y;
4906
+ var b, f, k, C;
4907
4907
  return [
4908
- (f = (b = i(e)) == null ? void 0 : b.document) != null && f.enableBubbleMenu && !i(l) ? (m(), _(p, { key: 0 })) : H("", !0),
4909
- (y = (C = i(e)) == null ? void 0 : C.assistant) != null && y.enabled && i(l) ? (m(), _(h, { key: 1 })) : H("", !0)
4908
+ (f = (b = i(e)) == null ? void 0 : b.document) != null && f.enableBubbleMenu && !i(l) ? (m(), _(p, { key: 0 })) : F("", !0),
4909
+ (C = (k = i(e)) == null ? void 0 : k.assistant) != null && C.enabled && i(l) ? (m(), _(h, { key: 1 })) : F("", !0)
4910
4910
  ];
4911
4911
  }),
4912
4912
  _: 1
@@ -4916,16 +4916,16 @@ const Rs = ["id"], Fs = { class: "smart-color-picker-default-button" }, Hs = { c
4916
4916
  };
4917
4917
  }
4918
4918
  }, yt = (r, e) => e.view.domAtPos(r).node.offsetParent !== null, mn = (r, e) => {
4919
- const { state: n, view: o, extensionManager: t } = r, { schema: l, selection: s } = n, { empty: a, $anchor: u } = s, d = !!t.extensions.find((k) => k.name === "gapCursor");
4919
+ const { state: n, view: o, extensionManager: t } = r, { schema: l, selection: s } = n, { empty: a, $anchor: u } = s, d = !!t.extensions.find((w) => w.name === "gapCursor");
4920
4920
  if (!a || u.parent.type !== l.nodes.detailsSummary || !d || e === "right" && u.parentOffset !== u.parent.nodeSize - 2) return !1;
4921
- const p = st((k) => k.type === l.nodes.details)(s);
4921
+ const p = st((w) => w.type === l.nodes.details)(s);
4922
4922
  if (!p) return !1;
4923
- const h = _t(p.node, (k) => k.type === l.nodes.detailsContent);
4923
+ const h = _t(p.node, (w) => w.type === l.nodes.detailsContent);
4924
4924
  if (!h.length || yt(p.start + h[0].pos + 1, r)) return !1;
4925
4925
  const b = n.doc.resolve(p.pos + p.node.nodeSize), f = ln.findFrom(b, 1, !1);
4926
4926
  if (!f) return !1;
4927
- const { tr: C } = n, y = new ln(f);
4928
- return C.setSelection(y), C.scrollIntoView(), o.dispatch(C), !0;
4927
+ const { tr: k } = n, C = new ln(f);
4928
+ return k.setSelection(C), k.scrollIntoView(), o.dispatch(k), !0;
4929
4929
  }, Ei = Y.create({ name: "details", content: "detailsSummary detailsContent", group: "block", defining: !0, isolating: !0, allowGapCursor: !1, addOptions: () => ({ persist: !1, openClassName: "is-open", HTMLAttributes: {} }), addAttributes() {
4930
4930
  return this.options.persist ? { open: { default: !1, parseHTML: (r) => r.hasAttribute("open"), renderHTML: ({ open: r }) => r ? { open: "" } : {} } } : [];
4931
4931
  }, parseHTML: () => [{ tag: "details" }], renderHTML({ HTMLAttributes: r }) {
@@ -4972,12 +4972,12 @@ const Rs = ["id"], Fs = { class: "smart-color-picker-default-button" }, Hs = { c
4972
4972
  const d = ((n = u.toJSON()) === null || n === void 0 ? void 0 : n.content) || [];
4973
4973
  return e().insertContentAt({ from: a.start, to: a.end }, { type: this.name, content: [{ type: "detailsSummary" }, { type: "detailsContent", content: d }] }).setTextSelection(a.start + 2).run();
4974
4974
  }, unsetDetails: () => ({ state: r, chain: e }) => {
4975
- const { selection: n, schema: o } = r, t = st((y) => y.type === this.type)(n);
4975
+ const { selection: n, schema: o } = r, t = st((C) => C.type === this.type)(n);
4976
4976
  if (!t) return !1;
4977
- const l = _t(t.node, (y) => y.type === o.nodes.detailsSummary), s = _t(t.node, (y) => y.type === o.nodes.detailsContent);
4977
+ const l = _t(t.node, (C) => C.type === o.nodes.detailsSummary), s = _t(t.node, (C) => C.type === o.nodes.detailsContent);
4978
4978
  if (!l.length || !s.length) return !1;
4979
- const a = l[0], u = s[0], d = t.pos, p = r.doc.resolve(d), h = { from: d, to: d + t.node.nodeSize }, b = u.node.content.toJSON() || [], f = p.parent.type.contentMatch.defaultType, C = [f == null ? void 0 : f.create(null, a.node.content).toJSON(), ...b];
4980
- return e().insertContentAt(h, C).setTextSelection(d + 1).run();
4979
+ const a = l[0], u = s[0], d = t.pos, p = r.doc.resolve(d), h = { from: d, to: d + t.node.nodeSize }, b = u.node.content.toJSON() || [], f = p.parent.type.contentMatch.defaultType, k = [f == null ? void 0 : f.create(null, a.node.content).toJSON(), ...b];
4980
+ return e().insertContentAt(h, k).setTextSelection(d + 1).run();
4981
4981
  } };
4982
4982
  }, addKeyboardShortcuts() {
4983
4983
  return { Backspace: () => {
@@ -4995,8 +4995,8 @@ const Rs = ["id"], Fs = { class: "smart-color-picker-default-button" }, Hs = { c
4995
4995
  if (!d || !a.canReplaceWith(u, u, d)) return !1;
4996
4996
  const p = d.createAndFill();
4997
4997
  if (!p) return !1;
4998
- const h = s ? l.after() + 1 : l.after(-1), b = e.tr.replaceWith(h, h, p), f = b.doc.resolve(h), C = jn.near(f, 1);
4999
- return b.setSelection(C), b.scrollIntoView(), n.dispatch(b), !0;
4998
+ const h = s ? l.after() + 1 : l.after(-1), b = e.tr.replaceWith(h, h, p), f = b.doc.resolve(h), k = jn.near(f, 1);
4999
+ return b.setSelection(k), b.scrollIntoView(), n.dispatch(b), !0;
5000
5000
  }, ArrowRight: ({ editor: r }) => mn(r, "right"), ArrowDown: ({ editor: r }) => mn(r, "down") };
5001
5001
  }, addProseMirrorPlugins() {
5002
5002
  return [new Fe({ key: new Ue("detailsSelection"), appendTransaction: (r, e, n) => {
@@ -5004,10 +5004,10 @@ const Rs = ["id"], Fs = { class: "smart-color-picker-default-button" }, Hs = { c
5004
5004
  if (!r.some((b) => b.selectionSet) || !e.selection.empty || !n.selection.empty || !kr(n, t.name)) return;
5005
5005
  const { $from: s } = n.selection;
5006
5006
  if (yt(s.pos, o)) return;
5007
- const a = ((b, f, C) => {
5008
- for (let y = b.depth; y > 0; y -= 1) {
5009
- const k = b.node(y), w = f(k), A = yt(b.start(y), C);
5010
- if (w && A) return { pos: y > 0 ? b.before(y) : 0, start: b.start(y), depth: y, node: k };
5007
+ const a = ((b, f, k) => {
5008
+ for (let C = b.depth; C > 0; C -= 1) {
5009
+ const w = b.node(C), y = f(w), A = yt(b.start(C), k);
5010
+ if (y && A) return { pos: C > 0 ? b.before(C) : 0, start: b.start(C), depth: C, node: w };
5011
5011
  }
5012
5012
  })(s, (b) => b.type === t, o);
5013
5013
  if (!a) return;
@@ -5025,21 +5025,21 @@ const Rs = ["id"], Fs = { class: "smart-color-picker-default-button" }, Hs = { c
5025
5025
  return u.doc.descendants((h, b) => {
5026
5026
  const f = t(u, b, h);
5027
5027
  if (h.isText && h.text && f) {
5028
- let C;
5029
- for (; C = e.exec(h.text); ) {
5030
- const y = b + C.index, k = y + C[0].length, w = C.slice(1).find(Boolean);
5031
- if (w) {
5032
- const A = d.$from.pos - d.$to.pos, x = d.$anchor.pos >= y && d.$anchor.pos <= k, L = d.$from.pos >= y && d.$to.pos <= k, N = A === 0 && x || L;
5033
- N && o.isEditable || p.push(xt.widget(y, () => {
5028
+ let k;
5029
+ for (; k = e.exec(h.text); ) {
5030
+ const C = b + k.index, w = C + k[0].length, y = k.slice(1).find(Boolean);
5031
+ if (y) {
5032
+ const A = d.$from.pos - d.$to.pos, x = d.$anchor.pos >= C && d.$anchor.pos <= w, L = d.$from.pos >= C && d.$to.pos <= w, N = A === 0 && x || L;
5033
+ N && o.isEditable || p.push(xt.widget(C, () => {
5034
5034
  const R = document.createElement("span");
5035
5035
  R.classList.add("Tiptap-mathematics-render"), o.isEditable && R.classList.add("Tiptap-mathematics-render--editable");
5036
5036
  try {
5037
- co.render(w, R, n);
5037
+ co.render(y, R, n);
5038
5038
  } catch {
5039
- R.innerHTML = w;
5039
+ R.innerHTML = y;
5040
5040
  }
5041
5041
  return R;
5042
- })), p.push(xt.inline(y, k, { class: N && o.isEditable ? "Tiptap-mathematics-editor" : "Tiptap-mathematics-editor Tiptap-mathematics-editor--hidden", style: N && o.isEditable ? void 0 : "display: inline-block; height: 0; opacity: 0; overflow: hidden; position: absolute; width: 0;" }));
5042
+ })), p.push(xt.inline(C, w, { class: N && o.isEditable ? "Tiptap-mathematics-editor" : "Tiptap-mathematics-editor Tiptap-mathematics-editor--hidden", style: N && o.isEditable ? void 0 : "display: inline-block; height: 0; opacity: 0; overflow: hidden; position: absolute; width: 0;" }));
5043
5043
  }
5044
5044
  }
5045
5045
  }
@@ -5174,7 +5174,7 @@ const Pi = ({ getId: r, anchorTypes: e = ["heading"] }) => new Fe({ key: new Ue(
5174
5174
  __name: "attachment-view",
5175
5175
  props: se,
5176
5176
  setup(r) {
5177
- const e = r, { options: n } = $();
5177
+ const e = r, { options: n } = M();
5178
5178
  return (o, t) => (m(), _(i(ie), { class: "attachment-view" }, {
5179
5179
  default: T(() => [
5180
5180
  (m(), _(oe(i(n).render.attachment.view()), {
@@ -5184,7 +5184,7 @@ const Pi = ({ getId: r, anchorTypes: e = ["heading"] }) => new Fe({ key: new Ue(
5184
5184
  _: 1
5185
5185
  }));
5186
5186
  }
5187
- }, Ji = /* @__PURE__ */ z(Ui, [["__scopeId", "data-v-589f28b1"]]), qi = Y.create({
5187
+ }, Ji = /* @__PURE__ */ H(Ui, [["__scopeId", "data-v-589f28b1"]]), qi = Y.create({
5188
5188
  name: "attachment",
5189
5189
  group: "inline",
5190
5190
  inline: !0,
@@ -5196,6 +5196,9 @@ const Pi = ({ getId: r, anchorTypes: e = ["heading"] }) => new Fe({ key: new Ue(
5196
5196
  },
5197
5197
  title: {
5198
5198
  default: "附件"
5199
+ },
5200
+ cid: {
5201
+ default: null
5199
5202
  }
5200
5203
  };
5201
5204
  },
@@ -5224,7 +5227,7 @@ const Pi = ({ getId: r, anchorTypes: e = ["heading"] }) => new Fe({ key: new Ue(
5224
5227
  __name: "audio-view",
5225
5228
  props: se,
5226
5229
  setup(r) {
5227
- const e = r, { options: n } = $();
5230
+ const e = r, { options: n } = M();
5228
5231
  return (o, t) => (m(), _(i(ie), { class: "audio-view" }, {
5229
5232
  default: T(() => {
5230
5233
  var l;
@@ -5237,7 +5240,7 @@ const Pi = ({ getId: r, anchorTypes: e = ["heading"] }) => new Fe({ key: new Ue(
5237
5240
  _: 1
5238
5241
  }));
5239
5242
  }
5240
- }, Gi = /* @__PURE__ */ z(ji, [["__scopeId", "data-v-79d61048"]]), Ki = Y.create({
5243
+ }, Gi = /* @__PURE__ */ H(ji, [["__scopeId", "data-v-79d61048"]]), Ki = Y.create({
5241
5244
  name: "audio",
5242
5245
  group: "block",
5243
5246
  atom: !0,
@@ -5254,6 +5257,9 @@ const Pi = ({ getId: r, anchorTypes: e = ["heading"] }) => new Fe({ key: new Ue(
5254
5257
  },
5255
5258
  title: {
5256
5259
  default: "默认音频标题"
5260
+ },
5261
+ cid: {
5262
+ default: null
5257
5263
  }
5258
5264
  };
5259
5265
  },
@@ -5285,7 +5291,7 @@ const Pi = ({ getId: r, anchorTypes: e = ["heading"] }) => new Fe({ key: new Ue(
5285
5291
  __name: "bubble-block",
5286
5292
  props: se,
5287
5293
  setup(r) {
5288
- const { toolbarHover: e, options: n } = $(), o = B(null), t = B(!1), l = B(!1), s = B(!1), a = B({});
5294
+ const { toolbarHover: e, options: n } = M(), o = B(null), t = B(!1), l = B(!1), s = B(!1), a = B({});
5289
5295
  Mt(o, () => {
5290
5296
  if (!e.value) {
5291
5297
  if (t.value) {
@@ -5294,11 +5300,11 @@ const Pi = ({ getId: r, anchorTypes: e = ["heading"] }) => new Fe({ key: new Ue(
5294
5300
  }
5295
5301
  t.value = !1;
5296
5302
  }
5297
- }, { controls: !0 });
5303
+ });
5298
5304
  function u() {
5299
5305
  if (t.value = !t.value, t.value) {
5300
- const { top: d, right: p, bottom: h, left: b, width: f, height: C } = pr(o), { width: y, height: k } = jt();
5301
- l.value = b.value > y.value / 2, s.value = d.value < k.value / 2, a.value = {}, l.value ? a.value.right = `${y.value - p.value - f.value}px` : a.value.left = `${b.value - f.value}px`, s.value ? a.value.top = `${d.value + f.value + 10}px` : a.value.bottom = `${k.value - h.value + C.value + 10}px`;
5306
+ const { top: d, right: p, bottom: h, left: b, width: f, height: k } = pr(o), { width: C, height: w } = jt();
5307
+ l.value = b.value > C.value / 2, s.value = d.value < w.value / 2, a.value = {}, l.value ? a.value.right = `${C.value - p.value - f.value}px` : a.value.left = `${b.value - f.value}px`, s.value ? a.value.top = `${d.value + f.value + 10}px` : a.value.bottom = `${w.value - h.value + k.value + 10}px`;
5302
5308
  }
5303
5309
  }
5304
5310
  return (d, p) => (m(), _(i(ie), {
@@ -5309,19 +5315,20 @@ const Pi = ({ getId: r, anchorTypes: e = ["heading"] }) => new Fe({ key: new Ue(
5309
5315
  default: T(() => [
5310
5316
  i(n).render.bubble ? (m(), _(oe(i(n).render.bubble()), {
5311
5317
  key: 0,
5312
- "node-view-props": { ...d.props }
5318
+ "show-bubble": i(t),
5319
+ onToggleBubble: u
5313
5320
  }, {
5314
5321
  default: T(() => [
5315
5322
  g(i(At), { class: "bubble-block-input smart-scrollbar" })
5316
5323
  ]),
5317
5324
  _: 1
5318
- }, 8, ["node-view-props"])) : (m(), M(J, { key: 1 }, [
5325
+ }, 40, ["show-bubble"])) : (m(), $(W, { key: 1 }, [
5319
5326
  v("span", {
5320
5327
  class: "bubble-block-label",
5321
5328
  contenteditable: "false",
5322
5329
  onClick: u
5323
5330
  }, [
5324
- i(n).render.bubbleIcon ? (m(), _(oe(i(n).render.bubbleIcon), { key: 0 })) : (m(), M("i", Xi))
5331
+ i(n).render.bubbleIcon ? (m(), _(oe(i(n).render.bubbleIcon()), { key: 0 })) : (m(), $("i", Xi))
5325
5332
  ]),
5326
5333
  nt(v("div", {
5327
5334
  class: K(["bubble-block-content", [
@@ -5341,7 +5348,7 @@ const Pi = ({ getId: r, anchorTypes: e = ["heading"] }) => new Fe({ key: new Ue(
5341
5348
  _: 1
5342
5349
  }, 512));
5343
5350
  }
5344
- }, Zi = /* @__PURE__ */ z(Yi, [["__scopeId", "data-v-7241892b"]]), Qi = Y.create({
5351
+ }, Zi = /* @__PURE__ */ H(Yi, [["__scopeId", "data-v-64ceb567"]]), Qi = Y.create({
5345
5352
  name: "bubble",
5346
5353
  inline: !0,
5347
5354
  group: "inline",
@@ -5405,7 +5412,7 @@ const Pi = ({ getId: r, anchorTypes: e = ["heading"] }) => new Fe({ key: new Ue(
5405
5412
  __name: "calculator-view",
5406
5413
  props: se,
5407
5414
  setup(r) {
5408
- const e = r, { options: n } = $();
5415
+ const e = r, { options: n } = M();
5409
5416
  return (o, t) => (m(), _(i(ie), { class: "calculator-view" }, {
5410
5417
  default: T(() => [
5411
5418
  (m(), _(oe(i(n).render.calculator.view()), {
@@ -5415,7 +5422,7 @@ const Pi = ({ getId: r, anchorTypes: e = ["heading"] }) => new Fe({ key: new Ue(
5415
5422
  _: 1
5416
5423
  }));
5417
5424
  }
5418
- }, na = /* @__PURE__ */ z(ta, [["__scopeId", "data-v-df4b872f"]]), oa = Y.create({
5425
+ }, na = /* @__PURE__ */ H(ta, [["__scopeId", "data-v-df4b872f"]]), oa = Y.create({
5419
5426
  name: "calculator",
5420
5427
  group: "block",
5421
5428
  atom: !0,
@@ -5454,7 +5461,7 @@ const Pi = ({ getId: r, anchorTypes: e = ["heading"] }) => new Fe({ key: new Ue(
5454
5461
  __name: "catalog-view",
5455
5462
  props: se,
5456
5463
  setup(r) {
5457
- const e = r, { options: n } = $();
5464
+ const e = r, { options: n } = M();
5458
5465
  return (o, t) => (m(), _(i(ie), { class: "catalog-view" }, {
5459
5466
  default: T(() => [
5460
5467
  (m(), _(oe(i(n).render.catalog.view()), {
@@ -5464,7 +5471,7 @@ const Pi = ({ getId: r, anchorTypes: e = ["heading"] }) => new Fe({ key: new Ue(
5464
5471
  _: 1
5465
5472
  }));
5466
5473
  }
5467
- }, la = /* @__PURE__ */ z(ra, [["__scopeId", "data-v-1d4c29ac"]]), sa = Y.create({
5474
+ }, la = /* @__PURE__ */ H(ra, [["__scopeId", "data-v-1d4c29ac"]]), sa = Y.create({
5468
5475
  name: "catalog",
5469
5476
  group: "inline",
5470
5477
  inline: !0,
@@ -5511,7 +5518,7 @@ const Pi = ({ getId: r, anchorTypes: e = ["heading"] }) => new Fe({ key: new Ue(
5511
5518
  __name: "code-block",
5512
5519
  props: se,
5513
5520
  setup(r) {
5514
- const { options: e } = $(), n = B(null), o = B(null), t = B(!1), l = B(!1), s = B(null), a = B([]);
5521
+ const { options: e } = M(), n = B(null), o = B(null), t = B(!1), l = B(!1), s = B(null), a = B([]);
5515
5522
  async function u() {
5516
5523
  if (r.editor.isEditable || r.node.attrs.language !== "python")
5517
5524
  return;
@@ -5591,45 +5598,45 @@ const Pi = ({ getId: r, anchorTypes: e = ["heading"] }) => new Fe({ key: new Ue(
5591
5598
  class: K(["code-view", d.node.attrs.theme])
5592
5599
  }, {
5593
5600
  default: T(() => [
5594
- !d.editor.view.editable && d.node.attrs.language === "python" ? (m(), M("div", ia, [
5595
- i(l) ? H("", !0) : (m(), M("div", {
5601
+ !d.editor.view.editable && d.node.attrs.language === "python" ? (m(), $("div", ia, [
5602
+ i(l) ? F("", !0) : (m(), $("div", {
5596
5603
  key: 0,
5597
5604
  class: K(["status", i(t) ? "runed" : "unrun"])
5598
5605
  }, null, 2)),
5599
- i(l) ? (m(), M("div", aa)) : H("", !0),
5606
+ i(l) ? (m(), $("div", aa)) : F("", !0),
5600
5607
  v("div", {
5601
5608
  class: "run",
5602
5609
  onClick: u
5603
5610
  }, p[0] || (p[0] = [
5604
5611
  v("i", { class: "i-sed:code-run" }, null, -1)
5605
5612
  ]))
5606
- ])) : H("", !0),
5613
+ ])) : F("", !0),
5607
5614
  v("div", null, [
5608
5615
  v("div", {
5609
5616
  ref_key: "containerRef",
5610
5617
  ref: n,
5611
5618
  class: K(["node-code-block", d.node.attrs.theme])
5612
5619
  }, [
5613
- d.editor.isEditable ? (m(), M("div", {
5620
+ d.editor.isEditable ? (m(), $("div", {
5614
5621
  key: 0,
5615
5622
  contenteditable: "false",
5616
5623
  class: "show-code-block-toolbar",
5617
5624
  textContent: I(("t" in d ? d.t : i(c))("node.codeBlockMenu"))
5618
- }, null, 8, ua)) : H("", !0)
5625
+ }, null, 8, ua)) : F("", !0)
5619
5626
  ], 2)
5620
5627
  ]),
5621
- i(a).length ? (m(), M("div", {
5628
+ i(a).length ? (m(), $("div", {
5622
5629
  key: 1,
5623
5630
  class: K(["output", d.node.attrs.theme])
5624
5631
  }, [
5625
5632
  v("div", ca, [
5626
- (m(!0), M(J, null, ve(i(a), (h, b) => (m(), M("div", {
5633
+ (m(!0), $(W, null, ve(i(a), (h, b) => (m(), $("div", {
5627
5634
  key: b,
5628
5635
  class: K(["row", h.type])
5629
5636
  }, I(h.text), 3))), 128))
5630
5637
  ])
5631
- ], 2)) : H("", !0),
5632
- d.editor.view.editable ? H("", !0) : (m(), M("div", {
5638
+ ], 2)) : F("", !0),
5639
+ d.editor.view.editable ? F("", !0) : (m(), $("div", {
5633
5640
  key: 2,
5634
5641
  ref_key: "target",
5635
5642
  ref: s,
@@ -5640,7 +5647,7 @@ const Pi = ({ getId: r, anchorTypes: e = ["heading"] }) => new Fe({ key: new Ue(
5640
5647
  _: 1
5641
5648
  }, 8, ["class"]));
5642
5649
  }
5643
- }, pa = /* @__PURE__ */ z(da, [["__scopeId", "data-v-909f4666"]]), ma = Y.create({
5650
+ }, pa = /* @__PURE__ */ H(da, [["__scopeId", "data-v-909f4666"]]), ma = Y.create({
5644
5651
  name: "codeBlock",
5645
5652
  group: "block",
5646
5653
  content: "text*",
@@ -5693,7 +5700,7 @@ const Pi = ({ getId: r, anchorTypes: e = ["heading"] }) => new Fe({ key: new Ue(
5693
5700
  __name: "code-online-view",
5694
5701
  props: se,
5695
5702
  setup(r) {
5696
- const e = r, { options: n } = $();
5703
+ const e = r, { options: n } = M();
5697
5704
  return (o, t) => (m(), _(i(ie), { class: "code-online-view" }, {
5698
5705
  default: T(() => [
5699
5706
  (m(), _(oe(i(n).render.codeOnline.view()), {
@@ -5703,7 +5710,7 @@ const Pi = ({ getId: r, anchorTypes: e = ["heading"] }) => new Fe({ key: new Ue(
5703
5710
  _: 1
5704
5711
  }));
5705
5712
  }
5706
- }, fa = /* @__PURE__ */ z(ha, [["__scopeId", "data-v-ad2a6a54"]]), ba = Y.create({
5713
+ }, fa = /* @__PURE__ */ H(ha, [["__scopeId", "data-v-ad2a6a54"]]), ba = Y.create({
5707
5714
  name: "codeOnline",
5708
5715
  group: "block",
5709
5716
  atom: !0,
@@ -6242,8 +6249,8 @@ class xe {
6242
6249
  let b = d ? e == u ? -1 : e == h ? 1 : n : n, f = u + t + (b < 0 ? 0 : p);
6243
6250
  if (o)
6244
6251
  return f;
6245
- let C = e == (n < 0 ? u : h) ? null : va(a / 3, e - u), y = e == u ? No : e == h ? Eo : Ct;
6246
- return (n < 0 ? e != u : e != h) && (y |= Ro), new _n(f, y, C);
6252
+ let k = e == (n < 0 ? u : h) ? null : va(a / 3, e - u), C = e == u ? No : e == h ? Eo : Ct;
6253
+ return (n < 0 ? e != u : e != h) && (C |= Ro), new _n(f, C, k);
6247
6254
  }
6248
6255
  t += p - d;
6249
6256
  }
@@ -7314,21 +7321,21 @@ const zo = Y.create({
7314
7321
  }
7315
7322
  let b;
7316
7323
  if (t) {
7317
- const k = d.content().toJSON(), w = Ho(k), A = An(o - 1);
7324
+ const w = d.content().toJSON(), y = Ho(w), A = An(o - 1);
7318
7325
  b = xn({
7319
- content: [w, ...A]
7326
+ content: [y, ...A]
7320
7327
  });
7321
7328
  } else {
7322
- const k = An(o);
7329
+ const w = An(o);
7323
7330
  b = xn({
7324
- content: k
7331
+ content: w
7325
7332
  });
7326
7333
  }
7327
7334
  const f = a.type.schema.nodeFromJSON(b);
7328
7335
  if (f === null)
7329
7336
  return;
7330
- const C = d.$anchor.parent.type;
7331
- return ((k) => !(!k.contentMatch.matchType(this.type) || !this.options.nestedColumns && k.name === et.name))(C) ? (l = l.setSelection(d), l = l.replaceSelectionWith(f, !1), s(l)) : void 0;
7337
+ const k = d.$anchor.parent.type;
7338
+ return ((w) => !(!w.contentMatch.matchType(this.type) || !this.options.nestedColumns && w.name === et.name))(k) ? (l = l.setSelection(d), l = l.replaceSelectionWith(f, !1), s(l)) : void 0;
7332
7339
  } catch (a) {
7333
7340
  console.error(a);
7334
7341
  }
@@ -7381,20 +7388,20 @@ const zo = Y.create({
7381
7388
  if (u !== a + 1) return !1;
7382
7389
  const d = s.node.type.contentMatch.defaultType, p = d == null ? void 0 : d.createAndFill();
7383
7390
  if (!p) return !1;
7384
- const h = e.doc.resolve(s.pos + 1), b = u - 1, f = s.node.child(b), C = h.posAtIndex(b, s.depth);
7391
+ const h = e.doc.resolve(s.pos + 1), b = u - 1, f = s.node.child(b), k = h.posAtIndex(b, s.depth);
7385
7392
  if (!f.eq(p)) return !1;
7386
- const y = t.node(-3);
7387
- if (!y) return !1;
7388
- const k = t.indexAfter(-3), w = qn(y.contentMatchAt(k));
7389
- if (!w || !y.canReplaceWith(k, k, w)) return !1;
7390
- const A = w.createAndFill();
7393
+ const C = t.node(-3);
7394
+ if (!C) return !1;
7395
+ const w = t.indexAfter(-3), y = qn(C.contentMatchAt(w));
7396
+ if (!y || !C.canReplaceWith(w, w, y)) return !1;
7397
+ const A = y.createAndFill();
7391
7398
  if (!A) return !1;
7392
7399
  const { tr: x } = e, L = t.after(-2);
7393
7400
  x.replaceWith(L, L, A);
7394
7401
  const N = x.doc.resolve(L), R = jn.near(N, 1);
7395
7402
  x.setSelection(R);
7396
- const F = C, W = C + f.nodeSize;
7397
- return x.delete(F, W), x.scrollIntoView(), n.dispatch(x), !0;
7403
+ const D = k, q = k + f.nodeSize;
7404
+ return x.delete(D, q), x.scrollIntoView(), n.dispatch(x), !0;
7398
7405
  } };
7399
7406
  } }), Aa = xa.extend({
7400
7407
  addProseMirrorPlugins() {
@@ -7420,7 +7427,7 @@ const zo = Y.create({
7420
7427
  __name: "embed-video-wrapper",
7421
7428
  props: se,
7422
7429
  setup(r) {
7423
- const e = r, { options: n } = $();
7430
+ const e = r, { options: n } = M();
7424
7431
  return (o, t) => (m(), _(i(ie), null, {
7425
7432
  default: T(() => [
7426
7433
  (m(), _(oe(i(n).render.embedVideo.view()), {
@@ -7430,7 +7437,7 @@ const zo = Y.create({
7430
7437
  _: 1
7431
7438
  }));
7432
7439
  }
7433
- }, { options: Sa } = $(), $a = Y.create({
7440
+ }, { options: Sa } = M(), $a = Y.create({
7434
7441
  name: "embedVideo",
7435
7442
  group: "block",
7436
7443
  atom: !0,
@@ -7480,7 +7487,7 @@ const zo = Y.create({
7480
7487
  __name: "file-view",
7481
7488
  props: se,
7482
7489
  setup(r) {
7483
- const e = r, { options: n } = $();
7490
+ const e = r, { options: n } = M();
7484
7491
  return (o, t) => (m(), _(i(ie), { class: "file-view" }, {
7485
7492
  default: T(() => [
7486
7493
  (m(), _(oe(i(n).render.file.view()), {
@@ -7490,7 +7497,7 @@ const zo = Y.create({
7490
7497
  _: 1
7491
7498
  }));
7492
7499
  }
7493
- }, Ba = /* @__PURE__ */ z(Ma, [["__scopeId", "data-v-40e74acc"]]), La = Y.create({
7500
+ }, Ba = /* @__PURE__ */ H(Ma, [["__scopeId", "data-v-40e74acc"]]), La = Y.create({
7494
7501
  name: "file",
7495
7502
  group: "block",
7496
7503
  atom: !0,
@@ -7514,6 +7521,9 @@ const zo = Y.create({
7514
7521
  // 0: 折叠,1:展开
7515
7522
  isExpand: {
7516
7523
  default: 0
7524
+ },
7525
+ cid: {
7526
+ default: null
7517
7527
  }
7518
7528
  };
7519
7529
  },
@@ -7542,7 +7552,7 @@ const zo = Y.create({
7542
7552
  __name: "flow-chart-view",
7543
7553
  props: se,
7544
7554
  setup(r) {
7545
- const e = r, { options: n } = $();
7555
+ const e = r, { options: n } = M();
7546
7556
  return (o, t) => (m(), _(i(ie), { class: "flow-chart-view" }, {
7547
7557
  default: T(() => [
7548
7558
  (m(), _(oe(i(n).render.flowChart.view()), {
@@ -7552,7 +7562,7 @@ const zo = Y.create({
7552
7562
  _: 1
7553
7563
  }));
7554
7564
  }
7555
- }, Ea = /* @__PURE__ */ z(Ia, [["__scopeId", "data-v-0a059ca6"]]), Na = Y.create({
7565
+ }, Ea = /* @__PURE__ */ H(Ia, [["__scopeId", "data-v-0a059ca6"]]), Na = Y.create({
7556
7566
  name: "flowchart",
7557
7567
  group: "block",
7558
7568
  atom: !0,
@@ -7624,7 +7634,7 @@ const zo = Y.create({
7624
7634
  unsetFontSize: () => ({ chain: r }) => r().setMark("textStyle", { fontSize: null }).removeEmptyTextStyle().run()
7625
7635
  };
7626
7636
  }
7627
- }), { painter: zt, setPainter: Dt } = $(), Oo = $e.create({
7637
+ }), { painter: zt, setPainter: Dt } = M(), Oo = $e.create({
7628
7638
  name: "painter",
7629
7639
  addCommands() {
7630
7640
  return {
@@ -7694,7 +7704,7 @@ const zo = Y.create({
7694
7704
  __name: "gallery-view",
7695
7705
  props: se,
7696
7706
  setup(r) {
7697
- const e = r, { options: n } = $();
7707
+ const e = r, { options: n } = M();
7698
7708
  return (o, t) => (m(), _(i(ie), { class: "gallery-view" }, {
7699
7709
  default: T(() => [
7700
7710
  (m(), _(oe(i(n).render.gallery.view()), {
@@ -7704,7 +7714,7 @@ const zo = Y.create({
7704
7714
  _: 1
7705
7715
  }));
7706
7716
  }
7707
- }, Fa = /* @__PURE__ */ z(Ra, [["__scopeId", "data-v-6c1afe5f"]]), Ha = Y.create({
7717
+ }, Fa = /* @__PURE__ */ H(Ra, [["__scopeId", "data-v-6c1afe5f"]]), Ha = Y.create({
7708
7718
  name: "gallery",
7709
7719
  group: "block",
7710
7720
  atom: !0,
@@ -7715,6 +7725,9 @@ const zo = Y.create({
7715
7725
  },
7716
7726
  imgTitleArr: {
7717
7727
  default: null
7728
+ },
7729
+ cid: {
7730
+ default: null
7718
7731
  }
7719
7732
  };
7720
7733
  },
@@ -8014,7 +8027,7 @@ const Ua = $e.create({
8014
8027
  __name: "iframe-view",
8015
8028
  props: se,
8016
8029
  setup(r) {
8017
- const e = r, { options: n } = $();
8030
+ const e = r, { options: n } = M();
8018
8031
  return (o, t) => (m(), _(i(ie), { class: "iframe-view" }, {
8019
8032
  default: T(() => [
8020
8033
  (m(), _(oe(i(n).render.iframe.view()), {
@@ -8024,7 +8037,7 @@ const Ua = $e.create({
8024
8037
  _: 1
8025
8038
  }));
8026
8039
  }
8027
- }, ja = /* @__PURE__ */ z(qa, [["__scopeId", "data-v-4241f141"]]), Ga = Y.create({
8040
+ }, ja = /* @__PURE__ */ H(qa, [["__scopeId", "data-v-4241f141"]]), Ga = Y.create({
8028
8041
  name: "iframe",
8029
8042
  group: "block",
8030
8043
  atom: !0,
@@ -8083,26 +8096,26 @@ const Tn = (r) => typeof r == "number", Xa = ["src", "alt"], Ya = {
8083
8096
  __name: "image-view",
8084
8097
  props: se,
8085
8098
  setup(r) {
8086
- const e = U(() => {
8087
- const { src: S, alt: V, width: j, height: q } = r.node.attrs, Q = Tn(j) ? `${j}px` : j, G = Tn(q) ? `${q}px` : q;
8099
+ const e = V(() => {
8100
+ const { src: S, alt: U, width: j, height: J } = r.node.attrs, Q = Tn(j) ? `${j}px` : j, G = Tn(J) ? `${J}px` : J;
8088
8101
  return {
8089
8102
  src: S || void 0,
8090
- alt: V || void 0,
8103
+ alt: U || void 0,
8091
8104
  style: {
8092
8105
  width: Q || void 0,
8093
8106
  height: G || void 0
8094
8107
  }
8095
8108
  };
8096
- }), n = `inline-read-view-${Te()}`, o = U(() => r.node.attrs.display || void 0), t = U(() => r.node.attrs.chapter || "N"), l = U(() => r.node.attrs.lockAspectRatio ?? !0), s = U(() => {
8109
+ }), n = `inline-read-view-${Te()}`, o = V(() => r.node.attrs.display || void 0), t = V(() => r.node.attrs.chapter || "N"), l = V(() => r.node.attrs.lockAspectRatio ?? !0), s = V(() => {
8097
8110
  const S = ["image-title"];
8098
8111
  return typeof r.node.attrs.describe == "string" && r.node.attrs.describe === "N" && S.push("image-title--hide"), S;
8099
- }), a = U(() => {
8112
+ }), a = V(() => {
8100
8113
  const S = ["image-view", n];
8101
8114
  return typeof o.value == "string" && S.push(`image-view--${o.value}`), typeof t.value == "string" && S.push(`image-view--${t.value}`), S;
8102
- }), u = U(() => {
8115
+ }), u = V(() => {
8103
8116
  const { style: { width: S } } = e.value;
8104
8117
  return { width: S === "100%" ? S : void 0 };
8105
- }), d = U(() => {
8118
+ }), d = V(() => {
8106
8119
  const { style: { width: S } } = e.value;
8107
8120
  return { width: S === "100%" ? "calc(100% - 2px)" : void 0 };
8108
8121
  }), p = B(!1), h = B(null);
@@ -8113,13 +8126,13 @@ const Tn = (r) => typeof r == "number", Xa = ["src", "alt"], Ya = {
8113
8126
  p.value = !0, r.editor.commands.setNodeSelection(r.getPos());
8114
8127
  }
8115
8128
  const f = B({ width: 0, height: 0 });
8116
- function C(S) {
8129
+ function k(S) {
8117
8130
  f.value.width = S.target.width, f.value.height = S.target.height;
8118
8131
  }
8119
- const y = B({
8132
+ const C = B({
8120
8133
  width: 1e4,
8121
8134
  height: 1e4
8122
- }), k = ["tl", "tr", "bl", "br"], w = B(!1), A = B({
8135
+ }), w = ["tl", "tr", "bl", "br"], y = B(!1), A = B({
8123
8136
  width: 0,
8124
8137
  height: 0
8125
8138
  }), x = B({
@@ -8129,40 +8142,40 @@ const Tn = (r) => typeof r == "number", Xa = ["src", "alt"], Ya = {
8129
8142
  h: 0,
8130
8143
  dir: ""
8131
8144
  });
8132
- function L(S, V) {
8145
+ function L(S, U) {
8133
8146
  if (t.value === "Y")
8134
8147
  return;
8135
8148
  S.preventDefault(), S.stopPropagation(), x.value.x = S.clientX, x.value.y = S.clientY;
8136
- const j = f.value.width, q = f.value.height, Q = j / q;
8149
+ const j = f.value.width, J = f.value.height, Q = j / J;
8137
8150
  let G = Number(r.node.attrs.width), ue = Number(r.node.attrs.height);
8138
- const ee = y.value.width;
8139
- G && !ue ? (G = G > ee ? ee : G, ue = Math.round(G / Q)) : ue && !G ? (G = Math.round(ue * Q), G = G > ee ? ee : G) : !G && !ue ? (G = j > ee ? ee : j, ue = Math.round(G / Q)) : G = G > ee ? ee : G, x.value.w = G, x.value.h = ue, x.value.dir = V, w.value = !0, F();
8151
+ const ee = C.value.width;
8152
+ G && !ue ? (G = G > ee ? ee : G, ue = Math.round(G / Q)) : ue && !G ? (G = Math.round(ue * Q), G = G > ee ? ee : G) : !G && !ue ? (G = j > ee ? ee : j, ue = Math.round(G / Q)) : G = G > ee ? ee : G, x.value.w = G, x.value.h = ue, x.value.dir = U, y.value = !0, D();
8140
8153
  }
8141
8154
  const N = Wn((S) => {
8142
- if (S.preventDefault(), S.stopPropagation(), !w.value)
8155
+ if (S.preventDefault(), S.stopPropagation(), !y.value)
8143
8156
  return;
8144
- const { x: V, y: j, w: q, h: Q, dir: G } = x.value, ue = (S.clientX - V) * (/l/.test(G) ? -1 : 1), ee = (S.clientY - j) * (/t/.test(G) ? -1 : 1), fe = Ka(q + ue, 20, y.value.width), ke = l.value ? null : Math.max(Q + ee, 20);
8157
+ const { x: U, y: j, w: J, h: Q, dir: G } = x.value, ue = (S.clientX - U) * (/l/.test(G) ? -1 : 1), ee = (S.clientY - j) * (/t/.test(G) ? -1 : 1), fe = Ka(J + ue, 20, C.value.width), ke = l.value ? null : Math.max(Q + ee, 20);
8145
8158
  A.value = {
8146
8159
  width: fe,
8147
8160
  height: fe * (f.value.height / f.value.width)
8148
8161
  }, r.updateAttributes({ width: fe, height: ke });
8149
8162
  }, 16);
8150
8163
  function R(S) {
8151
- S.preventDefault(), S.stopPropagation(), w.value && (w.value = !1, x.value = {
8164
+ S.preventDefault(), S.stopPropagation(), y.value && (y.value = !1, x.value = {
8152
8165
  x: 0,
8153
8166
  y: 0,
8154
8167
  w: 0,
8155
8168
  h: 0,
8156
8169
  dir: ""
8157
- }, W(), b());
8170
+ }, q(), b());
8158
8171
  }
8159
- function F() {
8172
+ function D() {
8160
8173
  document == null || document.addEventListener("mousemove", N, !0), document == null || document.addEventListener("mouseup", R, !0);
8161
8174
  }
8162
- function W() {
8175
+ function q() {
8163
8176
  document == null || document.removeEventListener("mousemove", N, !0), document == null || document.removeEventListener("mouseup", R, !0);
8164
8177
  }
8165
- return (S, V) => (m(), _(i(ie), {
8178
+ return (S, U) => (m(), _(i(ie), {
8166
8179
  ref_key: "imageViewRef",
8167
8180
  ref: h,
8168
8181
  class: K(i(a)),
@@ -8173,35 +8186,35 @@ const Tn = (r) => typeof r == "number", Xa = ["src", "alt"], Ya = {
8173
8186
  v("div", {
8174
8187
  class: K([{
8175
8188
  "image-view__body--focused": S.selected,
8176
- "image-view__body--resizing": i(w)
8189
+ "image-view__body--resizing": i(y)
8177
8190
  }, "image-view__body"]),
8178
8191
  style: le(i(d)),
8179
8192
  contenteditable: "false"
8180
8193
  }, [
8181
- i(e).src ? (m(), M("img", {
8194
+ i(e).src ? (m(), $("img", {
8182
8195
  key: 0,
8183
8196
  src: i(e).src,
8184
8197
  alt: i(e).alt,
8185
8198
  style: le(i(e).style),
8186
8199
  class: "image-view__body__image",
8187
- onLoad: C,
8200
+ onLoad: k,
8188
8201
  onClick: b
8189
- }, null, 44, Xa)) : (m(), M("div", Ya)),
8202
+ }, null, 44, Xa)) : (m(), $("div", Ya)),
8190
8203
  nt(v("div", Za, [
8191
8204
  te(I(i(A).width) + " ", 1),
8192
- V[0] || (V[0] = v("i", { class: "i-sed:x" }, null, -1)),
8205
+ U[0] || (U[0] = v("i", { class: "i-sed:x" }, null, -1)),
8193
8206
  te(" " + I(Math.round(i(A).height)), 1)
8194
8207
  ], 512), [
8195
- [kt, i(w)]
8208
+ [kt, i(y)]
8196
8209
  ]),
8197
8210
  nt(v("div", Qa, [
8198
- (m(), M(J, null, ve(k, (j) => v("span", {
8211
+ (m(), $(W, null, ve(w, (j) => v("span", {
8199
8212
  key: j,
8200
8213
  class: K([`image-resizer__handler--${j}`, "image-resizer__handler"]),
8201
- onMousedown: (q) => L(q, j)
8214
+ onMousedown: (J) => L(J, j)
8202
8215
  }, null, 42, eu)), 64))
8203
8216
  ], 512), [
8204
- [kt, S.editor.view.editable && (S.selected || i(w)) && i(t) === "N"]
8217
+ [kt, S.editor.view.editable && (S.selected || i(y)) && i(t) === "N"]
8205
8218
  ])
8206
8219
  ], 6),
8207
8220
  g(i(At), {
@@ -8212,7 +8225,7 @@ const Tn = (r) => typeof r == "number", Xa = ["src", "alt"], Ya = {
8212
8225
  _: 1
8213
8226
  }, 8, ["class", "style"]));
8214
8227
  }
8215
- }, nu = /* @__PURE__ */ z(tu, [["__scopeId", "data-v-8e666c9d"]]), ou = {
8228
+ }, nu = /* @__PURE__ */ H(tu, [["__scopeId", "data-v-26202538"]]), ou = {
8216
8229
  "size-small": 100,
8217
8230
  "size-medium": 400,
8218
8231
  "size-large": "100%"
@@ -8659,7 +8672,7 @@ const cu = $e.create({
8659
8672
  __name: "inline-audio-view",
8660
8673
  props: se,
8661
8674
  setup(r) {
8662
- const e = r, { options: n } = $();
8675
+ const e = r, { options: n } = M();
8663
8676
  return (o, t) => (m(), _(i(ie), { class: "inline-audio-view" }, {
8664
8677
  default: T(() => [
8665
8678
  (m(), _(oe(i(n).render.inlineAudio.view()), {
@@ -8669,7 +8682,7 @@ const cu = $e.create({
8669
8682
  _: 1
8670
8683
  }));
8671
8684
  }
8672
- }, pu = /* @__PURE__ */ z(du, [["__scopeId", "data-v-274f74bf"]]), mu = Y.create({
8685
+ }, pu = /* @__PURE__ */ H(du, [["__scopeId", "data-v-274f74bf"]]), mu = Y.create({
8673
8686
  name: "inlineAudio",
8674
8687
  group: "inline",
8675
8688
  inline: !0,
@@ -8681,6 +8694,9 @@ const cu = $e.create({
8681
8694
  },
8682
8695
  title: {
8683
8696
  default: "音频"
8697
+ },
8698
+ cid: {
8699
+ default: null
8684
8700
  }
8685
8701
  };
8686
8702
  },
@@ -8709,7 +8725,7 @@ const cu = $e.create({
8709
8725
  __name: "inline-gallery-view",
8710
8726
  props: se,
8711
8727
  setup(r) {
8712
- const e = r, { options: n } = $();
8728
+ const e = r, { options: n } = M();
8713
8729
  return (o, t) => (m(), _(i(ie), { class: "inline-gallery-view" }, {
8714
8730
  default: T(() => [
8715
8731
  (m(), _(oe(i(n).render.inlineGallery.view()), {
@@ -8719,7 +8735,7 @@ const cu = $e.create({
8719
8735
  _: 1
8720
8736
  }));
8721
8737
  }
8722
- }, fu = /* @__PURE__ */ z(hu, [["__scopeId", "data-v-0adcd46c"]]), bu = Y.create({
8738
+ }, fu = /* @__PURE__ */ H(hu, [["__scopeId", "data-v-0adcd46c"]]), bu = Y.create({
8723
8739
  name: "inlineGallery",
8724
8740
  group: "inline",
8725
8741
  inline: !0,
@@ -8731,6 +8747,9 @@ const cu = $e.create({
8731
8747
  },
8732
8748
  imgTitleArr: {
8733
8749
  default: null
8750
+ },
8751
+ cid: {
8752
+ default: null
8734
8753
  }
8735
8754
  };
8736
8755
  },
@@ -8759,7 +8778,7 @@ const cu = $e.create({
8759
8778
  __name: "inline-read-view",
8760
8779
  props: se,
8761
8780
  setup(r) {
8762
- const e = r, { options: n } = $();
8781
+ const e = r, { options: n } = M();
8763
8782
  return (o, t) => (m(), _(i(ie), { class: "inline-read-view" }, {
8764
8783
  default: T(() => [
8765
8784
  (m(), _(oe(i(n).render.inlineRead.view()), {
@@ -8769,7 +8788,7 @@ const cu = $e.create({
8769
8788
  _: 1
8770
8789
  }));
8771
8790
  }
8772
- }, vu = /* @__PURE__ */ z(gu, [["__scopeId", "data-v-7a8c36eb"]]), _u = Y.create({
8791
+ }, vu = /* @__PURE__ */ H(gu, [["__scopeId", "data-v-7a8c36eb"]]), _u = Y.create({
8773
8792
  name: "inlineRead",
8774
8793
  group: "inline",
8775
8794
  inline: !0,
@@ -8818,7 +8837,7 @@ const cu = $e.create({
8818
8837
  __name: "inline-video-view",
8819
8838
  props: se,
8820
8839
  setup(r) {
8821
- const e = r, { options: n } = $();
8840
+ const e = r, { options: n } = M();
8822
8841
  return (o, t) => (m(), _(i(ie), { class: "inline-video-view" }, {
8823
8842
  default: T(() => [
8824
8843
  (m(), _(oe(i(n).render.inlineVideo.view()), {
@@ -8828,7 +8847,7 @@ const cu = $e.create({
8828
8847
  _: 1
8829
8848
  }));
8830
8849
  }
8831
- }, Cu = /* @__PURE__ */ z(yu, [["__scopeId", "data-v-46c44557"]]), ku = Y.create({
8850
+ }, Cu = /* @__PURE__ */ H(yu, [["__scopeId", "data-v-46c44557"]]), ku = Y.create({
8832
8851
  name: "inlineVideo",
8833
8852
  group: "inline",
8834
8853
  inline: !0,
@@ -8840,6 +8859,12 @@ const cu = $e.create({
8840
8859
  },
8841
8860
  title: {
8842
8861
  default: "视频"
8862
+ },
8863
+ cid: {
8864
+ default: null
8865
+ },
8866
+ download: {
8867
+ default: !1
8843
8868
  }
8844
8869
  };
8845
8870
  },
@@ -8907,7 +8932,7 @@ const cu = $e.create({
8907
8932
  __name: "map-view",
8908
8933
  props: se,
8909
8934
  setup(r) {
8910
- const e = r, { options: n } = $();
8935
+ const e = r, { options: n } = M();
8911
8936
  return (o, t) => (m(), _(i(ie), { class: "map-view" }, {
8912
8937
  default: T(() => [
8913
8938
  (m(), _(oe(i(n).render.map.view()), {
@@ -8917,7 +8942,7 @@ const cu = $e.create({
8917
8942
  _: 1
8918
8943
  }));
8919
8944
  }
8920
- }, Au = /* @__PURE__ */ z(xu, [["__scopeId", "data-v-ace23d22"]]), Tu = Y.create({
8945
+ }, Au = /* @__PURE__ */ H(xu, [["__scopeId", "data-v-ace23d22"]]), Tu = Y.create({
8921
8946
  name: "map",
8922
8947
  group: "inline",
8923
8948
  inline: !0,
@@ -8957,7 +8982,7 @@ const cu = $e.create({
8957
8982
  __name: "mind-map-view",
8958
8983
  props: se,
8959
8984
  setup(r) {
8960
- const e = r, { options: n } = $();
8985
+ const e = r, { options: n } = M();
8961
8986
  return (o, t) => (m(), _(i(ie), { class: "mind-map-view" }, {
8962
8987
  default: T(() => [
8963
8988
  (m(), _(oe(i(n).render.mindMap.view()), {
@@ -8967,7 +8992,7 @@ const cu = $e.create({
8967
8992
  _: 1
8968
8993
  }));
8969
8994
  }
8970
- }, $u = /* @__PURE__ */ z(Su, [["__scopeId", "data-v-679d2a07"]]), Mu = Y.create({
8995
+ }, $u = /* @__PURE__ */ H(Su, [["__scopeId", "data-v-679d2a07"]]), Mu = Y.create({
8971
8996
  name: "mindMap",
8972
8997
  group: "block",
8973
8998
  atom: !0,
@@ -9027,7 +9052,7 @@ const cu = $e.create({
9027
9052
  __name: "paper-view",
9028
9053
  props: se,
9029
9054
  setup(r) {
9030
- const e = r, { options: n } = $();
9055
+ const e = r, { options: n } = M();
9031
9056
  return (o, t) => (m(), _(i(ie), null, {
9032
9057
  default: T(() => [
9033
9058
  (m(), _(oe(i(n).render.paper.view()), {
@@ -9146,7 +9171,7 @@ const cu = $e.create({
9146
9171
  __name: "read-view",
9147
9172
  props: se,
9148
9173
  setup(r) {
9149
- const e = r, { options: n } = $();
9174
+ const e = r, { options: n } = M();
9150
9175
  return (o, t) => (m(), _(i(ie), null, {
9151
9176
  default: T(() => [
9152
9177
  (m(), _(oe(i(n).render.read.view()), {
@@ -9210,7 +9235,7 @@ const cu = $e.create({
9210
9235
  __name: "recorder-view",
9211
9236
  props: se,
9212
9237
  setup(r) {
9213
- const e = r, { options: n } = $();
9238
+ const e = r, { options: n } = M();
9214
9239
  return (o, t) => (m(), _(i(ie), { class: "recorder-view" }, {
9215
9240
  default: T(() => [
9216
9241
  (m(), _(oe(i(n).render.recorder.view()), {
@@ -9220,7 +9245,7 @@ const cu = $e.create({
9220
9245
  _: 1
9221
9246
  }));
9222
9247
  }
9223
- }, zu = /* @__PURE__ */ z(Hu, [["__scopeId", "data-v-f23b5306"]]), Du = Y.create({
9248
+ }, zu = /* @__PURE__ */ H(Hu, [["__scopeId", "data-v-f23b5306"]]), Du = Y.create({
9224
9249
  name: "recorder",
9225
9250
  group: "block",
9226
9251
  atom: !0,
@@ -9310,9 +9335,9 @@ const cu = $e.create({
9310
9335
  if (/bottom/.test(l.target.className)) {
9311
9336
  let u = l.screenX;
9312
9337
  const d = l.target.classList.contains("bottom-left") ? -1 : 1, p = (h) => {
9313
- const b = s.clientWidth, f = h.screenX - u, C = b + d * f, y = document.querySelector(".ProseMirror").clientWidth, k = 40, w = y - 32, A = Math.max(
9314
- k,
9315
- Math.min(w, C)
9338
+ const b = s.clientWidth, f = h.screenX - u, k = b + d * f, C = document.querySelector(".ProseMirror").clientWidth, w = 40, y = C - 32, A = Math.max(
9339
+ w,
9340
+ Math.min(y, k)
9316
9341
  );
9317
9342
  s.style.width = `${A}px`, a.attrs.width = A;
9318
9343
  const x = s.clientWidth, L = s.clientHeight, N = vt(s, e);
@@ -9325,9 +9350,9 @@ const cu = $e.create({
9325
9350
  if (/top/.test(l.target.className)) {
9326
9351
  let u = l.screenX;
9327
9352
  const d = l.target.classList.contains("top-left") ? -1 : 1, p = (h) => {
9328
- const b = s.clientWidth, f = h.screenX - u, C = b + d * f, y = document.querySelector(".ProseMirror").clientWidth, k = 40, w = y - 32, A = Math.max(
9329
- k,
9330
- Math.min(w, C)
9353
+ const b = s.clientWidth, f = h.screenX - u, k = b + d * f, C = document.querySelector(".ProseMirror").clientWidth, w = 40, y = C - 32, A = Math.max(
9354
+ w,
9355
+ Math.min(y, k)
9331
9356
  );
9332
9357
  s.style.width = `${A}px`, a.attrs.width = A;
9333
9358
  const x = s.clientWidth, L = s.clientHeight, N = vt(s, e);
@@ -9532,13 +9557,13 @@ const qu = new Ue(
9532
9557
  caseSensitive: h,
9533
9558
  lastCaseSensitive: b,
9534
9559
  resultIndex: f,
9535
- lastResultIndex: C
9560
+ lastResultIndex: k
9536
9561
  } = r.storage.searchAndReplace;
9537
- if (!a && p === d && b === h && C === f)
9562
+ if (!a && p === d && b === h && k === f)
9538
9563
  return u;
9539
9564
  if (o(d), t(h), l(f), !d)
9540
9565
  return r.storage.searchAndReplace.results = [], He.empty;
9541
- const { decorationsToReturn: y, results: k } = Vu(
9566
+ const { decorationsToReturn: C, results: w } = Vu(
9542
9567
  s,
9543
9568
  Pu(
9544
9569
  d,
@@ -9548,7 +9573,7 @@ const qu = new Ue(
9548
9573
  e,
9549
9574
  f
9550
9575
  );
9551
- return r.storage.searchAndReplace.results = k, y;
9576
+ return r.storage.searchAndReplace.results = w, C;
9552
9577
  }
9553
9578
  },
9554
9579
  props: {
@@ -9587,7 +9612,7 @@ const qu = new Ue(
9587
9612
  __name: "svg-view",
9588
9613
  props: se,
9589
9614
  setup(r) {
9590
- const e = U(() => {
9615
+ const e = V(() => {
9591
9616
  const { viewBox: n, width: o, height: t, content: l } = r.node.attrs;
9592
9617
  return {
9593
9618
  viewBox: n,
@@ -9647,10 +9672,10 @@ const qu = new Ue(
9647
9672
  function $n(r, e, n, o, t, l) {
9648
9673
  let s = 0, a = !0, u = e.firstChild;
9649
9674
  const d = r.firstChild, { tableBorder: p, widthAuto: h, tableAuto: b } = r.attrs;
9650
- for (let f = 0, C = 0; f < d.childCount; f += 1) {
9651
- const { colspan: y, colwidth: k } = d.child(f).attrs;
9652
- for (let w = 0; w < y; w += 1, C += 1) {
9653
- const A = t === C ? l : k && k[w], x = A && !h ? `${A}px` : "";
9675
+ for (let f = 0, k = 0; f < d.childCount; f += 1) {
9676
+ const { colspan: C, colwidth: w } = d.child(f).attrs;
9677
+ for (let y = 0; y < C; y += 1, k += 1) {
9678
+ const A = t === k ? l : w && w[y], x = A && !h ? `${A}px` : "";
9654
9679
  s += A || o, A || (a = !1), u ? (u.style.width !== x && (u.style.width = x), u = u.nextSibling) : e.appendChild(document.createElement("col")).style.width = x;
9655
9680
  }
9656
9681
  }
@@ -9660,10 +9685,10 @@ function $n(r, e, n, o, t, l) {
9660
9685
  }
9661
9686
  if (a ? (n.style.width = `${s}px`, n.style.minWidth = "") : (n.style.width = "", n.style.minWidth = `${s}px`), b) {
9662
9687
  n.style.width = "100%", n.style.minWidth = "", u = e.firstChild;
9663
- for (let f = 0, C = 0; f < d.childCount; f += 1) {
9664
- const { colspan: y, colwidth: k } = d.child(f).attrs;
9665
- for (let w = 0; w < y; w += 1, C += 1) {
9666
- const A = t === C ? l : k && k[w], x = A && !h ? `${A / s * 100}%` : "";
9688
+ for (let f = 0, k = 0; f < d.childCount; f += 1) {
9689
+ const { colspan: C, colwidth: w } = d.child(f).attrs;
9690
+ for (let y = 0; y < C; y += 1, k += 1) {
9691
+ const A = t === k ? l : w && w[y], x = A && !h ? `${A / s * 100}%` : "";
9667
9692
  u ? (u.style.width !== x && (u.style.width = x), u = u.nextSibling) : e.appendChild(document.createElement("col")).style.width = x;
9668
9693
  }
9669
9694
  }
@@ -9687,10 +9712,10 @@ function Zu(r, e, n, o, t) {
9687
9712
  if (!u)
9688
9713
  return {};
9689
9714
  for (let b = 0, f = 0; b < u.childCount; b += 1) {
9690
- const { colspan: C, colwidth: y } = u.child(b).attrs;
9691
- for (let k = 0; k < C; k += 1, f += 1) {
9692
- const w = o === f ? t : y && y[k], A = w ? `${w}px` : "";
9693
- l += w || n, w || (s = !1), a.push(["col", A ? { style: `width: ${A}` } : {}]);
9715
+ const { colspan: k, colwidth: C } = u.child(b).attrs;
9716
+ for (let w = 0; w < k; w += 1, f += 1) {
9717
+ const y = o === f ? t : C && C[w], A = y ? `${y}px` : "";
9718
+ l += y || n, y || (s = !1), a.push(["col", A ? { style: `width: ${A}` } : {}]);
9694
9719
  }
9695
9720
  }
9696
9721
  if (r)
@@ -10067,7 +10092,7 @@ const Jo = Y.create({
10067
10092
  __name: "video-view",
10068
10093
  props: se,
10069
10094
  setup(r) {
10070
- const e = r, { options: n } = $();
10095
+ const e = r, { options: n } = M();
10071
10096
  return (o, t) => (m(), _(i(ie), { class: "video-view" }, {
10072
10097
  default: T(() => [
10073
10098
  (m(), _(oe(i(n).render.video.view()), {
@@ -10077,7 +10102,7 @@ const Jo = Y.create({
10077
10102
  _: 1
10078
10103
  }));
10079
10104
  }
10080
- }, oc = /* @__PURE__ */ z(nc, [["__scopeId", "data-v-845d85f9"]]), rc = Y.create({
10105
+ }, oc = /* @__PURE__ */ H(nc, [["__scopeId", "data-v-845d85f9"]]), rc = Y.create({
10081
10106
  name: "video",
10082
10107
  group: "block",
10083
10108
  atom: !0,
@@ -10094,6 +10119,12 @@ const Jo = Y.create({
10094
10119
  },
10095
10120
  title: {
10096
10121
  default: "默认视频标题"
10122
+ },
10123
+ cid: {
10124
+ default: null
10125
+ },
10126
+ download: {
10127
+ default: !1
10097
10128
  }
10098
10129
  };
10099
10130
  },
@@ -10118,7 +10149,7 @@ const Jo = Y.create({
10118
10149
  addNodeView() {
10119
10150
  return ae(oc);
10120
10151
  }
10121
- }), { options: jo, container: lc, tableOfContents: sc } = $(), { document: Bn } = jo.value, Ln = ze("locale"), ic = [
10152
+ }), { options: jo, container: lc, tableOfContents: sc } = M(), { document: Bn } = jo.value, Ln = ze("locale"), ic = [
10122
10153
  Ua,
10123
10154
  Eu,
10124
10155
  Nu,
@@ -10257,11 +10288,11 @@ const Jo = Y.create({
10257
10288
  __name: "index",
10258
10289
  setup(r) {
10259
10290
  var d, p, h, b;
10260
- const { options: e, editor: n, painter: o, setEditor: t, editorDestroyed: l } = $(), s = mr(async ({ editor: f }) => {
10291
+ const { options: e, editor: n, painter: o, setEditor: t, editorDestroyed: l } = M(), s = mr(async ({ editor: f }) => {
10261
10292
  try {
10262
10293
  await Lt.content.put({ content_id: e.value.editorKey, content: f.getHTML(), version: mo().unix(), hashMd: ho(JSON.stringify(f.getJSON())) });
10263
- } catch (C) {
10264
- Be.message.error(C.message);
10294
+ } catch (k) {
10295
+ Be.message.error(k.message);
10265
10296
  }
10266
10297
  }, 2e3), a = new Kn({
10267
10298
  editable: !((d = e.value.document) != null && d.readOnly),
@@ -10278,26 +10309,26 @@ const Jo = Y.create({
10278
10309
  });
10279
10310
  t(a);
10280
10311
  function u() {
10281
- var C, y;
10282
- if (document.querySelector("#katex-style") === null && !((C = e.value.toolbar) != null && C.disableMenuItems.includes("math"))) {
10283
- const k = document.createElement("link");
10284
- k.href = "https://cdnjs.cloudflare.com/ajax/libs/KaTeX/0.16.9/katex.min.css", k.rel = "stylesheet", k.id = "katex-style", (y = document.querySelector("head")) == null || y.append(k);
10312
+ var k, C;
10313
+ if (document.querySelector("#katex-style") === null && !((k = e.value.toolbar) != null && k.disableMenuItems.includes("math"))) {
10314
+ const w = document.createElement("link");
10315
+ w.href = "https://cdnjs.cloudflare.com/ajax/libs/KaTeX/0.16.9/katex.min.css", w.rel = "stylesheet", w.id = "katex-style", (C = document.querySelector("head")) == null || C.append(w);
10285
10316
  }
10286
10317
  }
10287
10318
  return Re(() => u()), Xe(() => {
10288
10319
  a.destroy();
10289
- }), (f, C) => {
10290
- var w;
10291
- const y = Ii, k = ss;
10292
- return m(), M(J, null, [
10320
+ }), (f, k) => {
10321
+ var y;
10322
+ const C = Ii, w = ss;
10323
+ return m(), $(W, null, [
10293
10324
  g(i(Xn), {
10294
10325
  editor: i(n),
10295
10326
  class: K(["smart-editor-container", {
10296
10327
  "format-painter": i(o).enabled
10297
10328
  }])
10298
10329
  }, null, 8, ["editor", "class"]),
10299
- i(n) && !i(l) ? (m(), _(y, { key: 0 })) : H("", !0),
10300
- (w = i(e).document) != null && w.enableBlockMenu && i(n) && !i(l) ? (m(), _(k, { key: 1 })) : H("", !0)
10330
+ i(n) && !i(l) ? (m(), _(C, { key: 0 })) : F("", !0),
10331
+ (y = i(e).document) != null && y.enableBlockMenu && i(n) && !i(l) ? (m(), _(w, { key: 1 })) : F("", !0)
10301
10332
  ], 64);
10302
10333
  };
10303
10334
  }
@@ -10305,7 +10336,7 @@ const Jo = Y.create({
10305
10336
  __name: "toc",
10306
10337
  emits: ["close"],
10307
10338
  setup(r, { emit: e }) {
10308
- const n = e, { container: o, editor: t, tableOfContents: l } = $();
10339
+ const n = e, { container: o, editor: t, tableOfContents: l } = M();
10309
10340
  function s(a) {
10310
10341
  if (!t.value)
10311
10342
  return;
@@ -10324,7 +10355,7 @@ const Jo = Y.create({
10324
10355
  const h = t.value.view.posAtDOM(d, 0), { tr: b } = t.value.view.state;
10325
10356
  b.setSelection(new Bt(b.doc.resolve(h))), t.value.view.dispatch(b), t.value.view.focus();
10326
10357
  }
10327
- return (a, u) => (m(), M("div", uc, [
10358
+ return (a, u) => (m(), $("div", uc, [
10328
10359
  v("div", cc, [
10329
10360
  u[2] || (u[2] = v("i", { class: "icon-toc i-sed:toc" }, null, -1)),
10330
10361
  te(" " + I(("t" in a ? a.t : i(c))("toc.title")) + " ", 1),
@@ -10336,11 +10367,11 @@ const Jo = Y.create({
10336
10367
  ]))
10337
10368
  ]),
10338
10369
  v("div", dc, [
10339
- i(l).length === 0 ? (m(), M("div", {
10370
+ i(l).length === 0 ? (m(), $("div", {
10340
10371
  key: 0,
10341
10372
  class: "smart-toc-empty",
10342
10373
  textContent: I(("t" in a ? a.t : i(c))("toc.empty"))
10343
- }, null, 8, pc)) : (m(!0), M(J, { key: 1 }, ve(i(l), (d) => (m(), M("div", {
10374
+ }, null, 8, pc)) : (m(!0), $(W, { key: 1 }, ve(i(l), (d) => (m(), $("div", {
10344
10375
  key: d.id,
10345
10376
  class: K(["smart-toc-item", {
10346
10377
  active: d.isActive,
@@ -10354,16 +10385,16 @@ const Jo = Y.create({
10354
10385
  ])
10355
10386
  ]));
10356
10387
  }
10357
- }, bc = /* @__PURE__ */ z(fc, [["__scopeId", "data-v-5e6e7219"]]), gc = { class: "smart-page-container" }, vc = { class: "smart-zoomable-container smart-scrollbar" }, _c = {
10388
+ }, bc = /* @__PURE__ */ H(fc, [["__scopeId", "data-v-5e6e7219"]]), gc = { class: "smart-page-container" }, vc = { class: "smart-zoomable-container smart-scrollbar" }, _c = {
10358
10389
  __name: "page",
10359
10390
  setup(r) {
10360
- const { container: e, page: n } = $(), o = U(() => {
10391
+ const { container: e, page: n } = M(), o = V(() => {
10361
10392
  const { width: u, height: d } = n.value.size ?? { width: 0, height: 0 };
10362
10393
  return {
10363
10394
  width: n.value.orientation === "portrait" ? u : d,
10364
10395
  height: n.value.orientation === "portrait" ? d : u
10365
10396
  };
10366
- }), t = U(() => `calc(${o.value.width}cm * ${n.value.zoomLevel ? n.value.zoomLevel / 100 : 1})`), l = B("");
10397
+ }), t = V(() => `calc(${o.value.width}cm * ${n.value.zoomLevel ? n.value.zoomLevel / 100 : 1})`), l = B("");
10367
10398
  function s() {
10368
10399
  const u = document.querySelector(`${e} .smart-zoomable-container`);
10369
10400
  if (!u) {
@@ -10387,11 +10418,11 @@ const Jo = Y.create({
10387
10418
  a.value = Vn(document.querySelector(e)), s();
10388
10419
  }), (u, d) => {
10389
10420
  const p = bc, h = ac, b = nr, f = es;
10390
- return m(), M("div", gc, [
10421
+ return m(), $("div", gc, [
10391
10422
  i(n).showToc ? (m(), _(p, {
10392
10423
  key: 0,
10393
- onClose: d[0] || (d[0] = (C) => i(n).showToc = !1)
10394
- })) : H("", !0),
10424
+ onClose: d[0] || (d[0] = (k) => i(n).showToc = !1)
10425
+ })) : F("", !0),
10395
10426
  v("div", vc, [
10396
10427
  v("div", {
10397
10428
  class: "smart-zoomable-content",
@@ -10410,13 +10441,13 @@ const Jo = Y.create({
10410
10441
  ], 4)
10411
10442
  ], 4)
10412
10443
  ]),
10413
- i(n).showTool ? (m(), M("div", {
10444
+ i(n).showTool ? (m(), $("div", {
10414
10445
  key: 1,
10415
10446
  class: "smart-tool-container",
10416
- onClose: d[1] || (d[1] = (C) => i(n).showTool = !1)
10447
+ onClose: d[1] || (d[1] = (k) => i(n).showTool = !1)
10417
10448
  }, [
10418
10449
  pe(u.$slots, "editor_tool", {}, void 0, !0)
10419
- ], 32)) : H("", !0),
10450
+ ], 32)) : F("", !0),
10420
10451
  g(b, {
10421
10452
  to: `${i(e)} .smart-zoomable-container`,
10422
10453
  "listen-to": `${i(e)} .smart-zoomable-container`,
@@ -10428,7 +10459,7 @@ const Jo = Y.create({
10428
10459
  ]);
10429
10460
  };
10430
10461
  }
10431
- }, yc = /* @__PURE__ */ z(_c, [["__scopeId", "data-v-3bbfcc1b"]]), Cc = {
10462
+ }, yc = /* @__PURE__ */ H(_c, [["__scopeId", "data-v-3bbfcc1b"]]), Cc = {
10432
10463
  __name: "scrollable",
10433
10464
  setup(r, { expose: e }) {
10434
10465
  const n = B(null), o = B(null), t = B(!0), l = B(!0);
@@ -10454,12 +10485,12 @@ const Jo = Y.create({
10454
10485
  }
10455
10486
  return e({
10456
10487
  update: p
10457
- }), (h, b) => (m(), M("div", {
10488
+ }), (h, b) => (m(), $("div", {
10458
10489
  ref_key: "wraperRef",
10459
10490
  ref: n,
10460
10491
  class: "smart-scrollable-container"
10461
10492
  }, [
10462
- i(t) ? H("", !0) : (m(), M("div", {
10493
+ i(t) ? F("", !0) : (m(), $("div", {
10463
10494
  key: 0,
10464
10495
  class: "smart-scrollable-control scrollable-left",
10465
10496
  onClick: a
@@ -10473,7 +10504,7 @@ const Jo = Y.create({
10473
10504
  }, [
10474
10505
  pe(h.$slots, "default", {}, void 0, !0)
10475
10506
  ], 2),
10476
- i(l) ? H("", !0) : (m(), M("div", {
10507
+ i(l) ? F("", !0) : (m(), $("div", {
10477
10508
  key: 1,
10478
10509
  class: "smart-scrollable-control scrollable-right",
10479
10510
  onClick: u
@@ -10482,10 +10513,10 @@ const Jo = Y.create({
10482
10513
  ])))
10483
10514
  ], 512));
10484
10515
  }
10485
- }, kc = /* @__PURE__ */ z(Cc, [["__scopeId", "data-v-6daae147"]]), wc = {
10516
+ }, kc = /* @__PURE__ */ H(Cc, [["__scopeId", "data-v-6daae147"]]), wc = {
10486
10517
  __name: "redo",
10487
10518
  setup(r) {
10488
- const { editor: e } = $();
10519
+ const { editor: e } = M();
10489
10520
  return (n, o) => {
10490
10521
  var l;
10491
10522
  const t = E;
@@ -10505,7 +10536,7 @@ const Jo = Y.create({
10505
10536
  }, xc = {
10506
10537
  __name: "undo",
10507
10538
  setup(r) {
10508
- const { editor: e } = $();
10539
+ const { editor: e } = M();
10509
10540
  return (n, o) => {
10510
10541
  var l;
10511
10542
  const t = E;
@@ -10525,7 +10556,7 @@ const Jo = Y.create({
10525
10556
  }, Ac = {
10526
10557
  __name: "import-word",
10527
10558
  setup(r) {
10528
- const { editor: e, options: n } = $();
10559
+ const { editor: e, options: n } = M();
10529
10560
  function o() {
10530
10561
  const { open: t, onChange: l } = Gt({
10531
10562
  accept: ".docx",
@@ -10552,7 +10583,7 @@ const Jo = Y.create({
10552
10583
  }, Tc = {
10553
10584
  __name: "search-replace",
10554
10585
  setup(r) {
10555
- const { searchReplace: e } = $();
10586
+ const { searchReplace: e } = M();
10556
10587
  return (n, o) => {
10557
10588
  const t = E;
10558
10589
  return m(), _(t, {
@@ -10574,7 +10605,7 @@ const Jo = Y.create({
10574
10605
  },
10575
10606
  emits: ["close"],
10576
10607
  setup(r, { emit: e }) {
10577
- const n = e, o = Kt(), { container: t } = $(), l = {
10608
+ const n = e, o = Kt(), { container: t } = M(), l = {
10578
10609
  width: o.width
10579
10610
  };
10580
10611
  return (s, a) => {
@@ -10591,10 +10622,10 @@ const Jo = Y.create({
10591
10622
  "onUpdate:show": a[0] || (a[0] = (d) => n("close"))
10592
10623
  }), {
10593
10624
  header: T(() => [
10594
- s.$attrs.ico ? (m(), M("i", {
10625
+ s.$attrs.ico ? (m(), $("i", {
10595
10626
  key: 0,
10596
10627
  class: K(`i-sed:${s.$attrs.ico}`)
10597
- }, null, 2)) : H("", !0),
10628
+ }, null, 2)) : F("", !0),
10598
10629
  v("span", null, I(s.$attrs.header), 1)
10599
10630
  ]),
10600
10631
  action: T(() => [
@@ -10610,7 +10641,7 @@ const Jo = Y.create({
10610
10641
  }, $c = { class: "smart-link-container" }, Mc = { class: "smart-button-actions" }, Bc = {
10611
10642
  __name: "link",
10612
10643
  setup(r) {
10613
- const { editor: e } = $(), n = B(!1), o = B(""), t = B(""), l = B({ text: !1, href: !1 });
10644
+ const { editor: e } = M(), n = B(!1), o = B(""), t = B(""), l = B({ text: !1, href: !1 });
10614
10645
  function s() {
10615
10646
  var a, u;
10616
10647
  if (o.value === "") {
@@ -10633,18 +10664,18 @@ const Jo = Y.create({
10633
10664
  }
10634
10665
  ), (a, u) => {
10635
10666
  const d = E, p = In, h = rr, b = Se, f = Sc;
10636
- return m(), M(J, null, [
10667
+ return m(), $(W, null, [
10637
10668
  g(d, {
10638
10669
  ico: "i-sed:link",
10639
10670
  text: ("t" in a ? a.t : i(c))("insert.link.text"),
10640
10671
  "hide-text": "",
10641
- onMenuClick: u[0] || (u[0] = (C) => n.value = !0)
10672
+ onMenuClick: u[0] || (u[0] = (k) => n.value = !0)
10642
10673
  }, null, 8, ["text"]),
10643
10674
  g(f, {
10644
10675
  visible: i(n),
10645
10676
  header: ("t" in a ? a.t : i(c))("insert.link.title"),
10646
10677
  width: "420px",
10647
- onClose: u[4] || (u[4] = (C) => n.value = !1)
10678
+ onClose: u[4] || (u[4] = (k) => n.value = !1)
10648
10679
  }, {
10649
10680
  default: T(() => [
10650
10681
  v("div", $c, [
@@ -10656,7 +10687,7 @@ const Jo = Y.create({
10656
10687
  default: T(() => [
10657
10688
  g(p, {
10658
10689
  value: i(o),
10659
- "onUpdate:value": u[1] || (u[1] = (C) => je(o) ? o.value = C : null),
10690
+ "onUpdate:value": u[1] || (u[1] = (k) => je(o) ? o.value = k : null),
10660
10691
  valueModifiers: { trim: !0 },
10661
10692
  placeholder: ("t" in a ? a.t : i(c))("insert.link.hrefTextTip")
10662
10693
  }, null, 8, ["value", "placeholder"])
@@ -10672,7 +10703,7 @@ const Jo = Y.create({
10672
10703
  default: T(() => [
10673
10704
  g(p, {
10674
10705
  value: i(t),
10675
- "onUpdate:value": u[2] || (u[2] = (C) => je(t) ? t.value = C : null),
10706
+ "onUpdate:value": u[2] || (u[2] = (k) => je(t) ? t.value = k : null),
10676
10707
  placeholder: ("t" in a ? a.t : i(c))("insert.link.hrefTip")
10677
10708
  }, null, 8, ["value", "placeholder"])
10678
10709
  ]),
@@ -10682,7 +10713,7 @@ const Jo = Y.create({
10682
10713
  v("div", Mc, [
10683
10714
  g(b, {
10684
10715
  quaternary: "",
10685
- onClick: u[3] || (u[3] = (C) => n.value = !1)
10716
+ onClick: u[3] || (u[3] = (k) => n.value = !1)
10686
10717
  }, {
10687
10718
  default: T(() => [
10688
10719
  te(I(("t" in a ? a.t : i(c))("insert.link.cancel")), 1)
@@ -10705,10 +10736,10 @@ const Jo = Y.create({
10705
10736
  ], 64);
10706
10737
  };
10707
10738
  }
10708
- }, Lc = /* @__PURE__ */ z(Bc, [["__scopeId", "data-v-c068e1fc"]]), Ic = ["onMouseover"], Ec = { class: "smart-table-custom" }, Nc = ["textContent"], Rc = {
10739
+ }, Lc = /* @__PURE__ */ H(Bc, [["__scopeId", "data-v-c068e1fc"]]), Ic = ["onMouseover"], Ec = { class: "smart-table-custom" }, Nc = ["textContent"], Rc = {
10709
10740
  __name: "table",
10710
10741
  setup(r) {
10711
- const { popupVisible: e, togglePopup: n } = ye(), { editor: o } = $(), t = Array.from({ length: 8 }, () => Array.from({ length: 10 }, () => "")), l = B({ rows: 0, cols: 0 });
10742
+ const { popupVisible: e, togglePopup: n } = ye(), { editor: o } = M(), t = Array.from({ length: 8 }, () => Array.from({ length: 10 }, () => "")), l = B({ rows: 0, cols: 0 });
10712
10743
  function s(p, h) {
10713
10744
  return l.value.rows && l.value.rows > p && l.value.cols && l.value.cols > h;
10714
10745
  }
@@ -10724,8 +10755,8 @@ const Jo = Y.create({
10724
10755
  p === 0 || p > 1e3 || h === 0 || h > 30 || ((b = o.value) == null || b.chain().focus().insertTable({ rows: p, cols: h, withHeaderRow: !1 }).run(), e.value = !1);
10725
10756
  }
10726
10757
  return (p, h) => {
10727
- const b = Rn, f = Se, C = E;
10728
- return m(), _(C, {
10758
+ const b = Rn, f = Se, k = E;
10759
+ return m(), _(k, {
10729
10760
  ico: "i-sed:table",
10730
10761
  text: ("t" in p ? p.t : i(c))("table.insert.text"),
10731
10762
  tooltip: ("t" in p ? p.t : i(c))("table.insert.tip"),
@@ -10739,14 +10770,14 @@ const Jo = Y.create({
10739
10770
  class: "smart-table-grid",
10740
10771
  onMouseleave: u
10741
10772
  }, [
10742
- (m(!0), M(J, null, ve(i(t), (y, k) => (m(), M("div", {
10743
- key: k,
10773
+ (m(!0), $(W, null, ve(i(t), (C, w) => (m(), $("div", {
10774
+ key: w,
10744
10775
  class: "row"
10745
10776
  }, [
10746
- (m(!0), M(J, null, ve(y, (w, A) => (m(), M("div", {
10777
+ (m(!0), $(W, null, ve(C, (y, A) => (m(), $("div", {
10747
10778
  key: A,
10748
- class: K(["cell", { selected: s(k, A) }]),
10749
- onMouseover: (x) => a(k, A),
10779
+ class: K(["cell", { selected: s(w, A) }]),
10780
+ onMouseover: (x) => a(w, A),
10750
10781
  onClick: d
10751
10782
  }, null, 42, Ic))), 128))
10752
10783
  ]))), 128))
@@ -10758,7 +10789,7 @@ const Jo = Y.create({
10758
10789
  }, null, 8, Nc),
10759
10790
  g(b, {
10760
10791
  value: i(l).rows,
10761
- "onUpdate:value": h[0] || (h[0] = (y) => i(l).rows = y),
10792
+ "onUpdate:value": h[0] || (h[0] = (C) => i(l).rows = C),
10762
10793
  size: "small",
10763
10794
  max: 1e3,
10764
10795
  min: 0
@@ -10770,7 +10801,7 @@ const Jo = Y.create({
10770
10801
  }, 8, ["value"]),
10771
10802
  g(b, {
10772
10803
  value: i(l).cols,
10773
- "onUpdate:value": h[1] || (h[1] = (y) => i(l).cols = y),
10804
+ "onUpdate:value": h[1] || (h[1] = (C) => i(l).cols = C),
10774
10805
  size: "small",
10775
10806
  max: 30,
10776
10807
  min: 0
@@ -10797,10 +10828,10 @@ const Jo = Y.create({
10797
10828
  }, 8, ["text", "tooltip", "popup-visible", "onTogglePopup"]);
10798
10829
  };
10799
10830
  }
10800
- }, Fc = /* @__PURE__ */ z(Rc, [["__scopeId", "data-v-59fdbaae"]]), Hc = {
10831
+ }, Fc = /* @__PURE__ */ H(Rc, [["__scopeId", "data-v-59fdbaae"]]), Hc = {
10801
10832
  __name: "image",
10802
10833
  setup(r) {
10803
- const { editor: e, options: n } = $(), { onChange: o, open: t } = Gt({
10834
+ const { editor: e, options: n } = M(), { onChange: o, open: t } = Gt({
10804
10835
  accept: n.value.imageAccept.toString(),
10805
10836
  multiple: !1,
10806
10837
  reset: !0
@@ -10824,7 +10855,7 @@ const Jo = Y.create({
10824
10855
  }, zc = {
10825
10856
  __name: "ordered-list",
10826
10857
  setup(r) {
10827
- const { editor: e } = $(), n = U(() => [
10858
+ const { editor: e } = M(), n = V(() => [
10828
10859
  { label: c("list.ordered.decimal"), key: "decimal", icon: o("ordered-list-decimal") },
10829
10860
  { label: c("list.ordered.lowerRoman"), key: "lower-roman", icon: o("ordered-list-lower-roman") },
10830
10861
  { label: c("list.ordered.upperRoman"), key: "upper-roman", icon: o("ordered-list-upper-roman") },
@@ -10840,19 +10871,19 @@ const Jo = Y.create({
10840
10871
  return;
10841
10872
  const s = (a = e.value) == null ? void 0 : a.chain().focus();
10842
10873
  (u = e.value) != null && u.isActive("orderedList") ? e.value.getAttributes("orderedList").listStyleType === l ? s == null || s.toggleOrderedList().run() : (d = e.value) == null || d.view.state.doc.descendants((b, f) => {
10843
- var C, y;
10874
+ var k, C;
10844
10875
  if (b.type.name === "orderedList") {
10845
- const { state: k } = e.value, { selection: w } = k, { $from: A } = w;
10876
+ const { state: w } = e.value, { selection: y } = w, { $from: A } = y;
10846
10877
  if (b !== A.node(A.depth - 2))
10847
10878
  return;
10848
- const x = (C = e.value) == null ? void 0 : C.view.state.tr.setNodeMarkup(
10879
+ const x = (k = e.value) == null ? void 0 : k.view.state.tr.setNodeMarkup(
10849
10880
  f,
10850
10881
  void 0,
10851
10882
  {
10852
10883
  listStyleType: l
10853
10884
  }
10854
10885
  );
10855
- (y = e.value) == null || y.view.dispatch(x);
10886
+ (C = e.value) == null || C.view.dispatch(x);
10856
10887
  }
10857
10888
  }) : (h = (p = s == null ? void 0 : s.toggleOrderedList()) == null ? void 0 : p.updateAttributes("orderedList", { listStyleType: l })) == null || h.run();
10858
10889
  }
@@ -10872,7 +10903,7 @@ const Jo = Y.create({
10872
10903
  }, Dc = {
10873
10904
  __name: "bullet-list",
10874
10905
  setup(r) {
10875
- const { editor: e } = $(), n = U(() => [
10906
+ const { editor: e } = M(), n = V(() => [
10876
10907
  { label: c("list.bullet.disc"), key: "disc", icon: o("bullet-list-disc") },
10877
10908
  { label: c("list.bullet.circle"), key: "circle", icon: o("bullet-list-circle") },
10878
10909
  { label: c("list.bullet.square"), key: "square", icon: o("bullet-list-square") }
@@ -10903,7 +10934,7 @@ const Jo = Y.create({
10903
10934
  }, Oc = {
10904
10935
  __name: "line-height",
10905
10936
  setup(r) {
10906
- const { options: e, editor: n } = $(), o = U(() => {
10937
+ const { options: e, editor: n } = M(), o = V(() => {
10907
10938
  var l;
10908
10939
  return (l = e.value.dicts) == null ? void 0 : l.lineHeights.map((s) => {
10909
10940
  var a;
@@ -10937,7 +10968,7 @@ const Jo = Y.create({
10937
10968
  }, Pc = {
10938
10969
  __name: "outdent",
10939
10970
  setup(r) {
10940
- const { editor: e } = $();
10971
+ const { editor: e } = M();
10941
10972
  return (n, o) => {
10942
10973
  const t = E;
10943
10974
  return m(), _(t, {
@@ -10955,7 +10986,7 @@ const Jo = Y.create({
10955
10986
  }, Vc = {
10956
10987
  __name: "indent",
10957
10988
  setup(r) {
10958
- const { editor: e } = $();
10989
+ const { editor: e } = M();
10959
10990
  return (n, o) => {
10960
10991
  const t = E;
10961
10992
  return m(), _(t, {
@@ -10973,7 +11004,7 @@ const Jo = Y.create({
10973
11004
  }, Wc = {
10974
11005
  __name: "align-justify",
10975
11006
  setup(r) {
10976
- const { editor: e } = $();
11007
+ const { editor: e } = M();
10977
11008
  return (n, o) => {
10978
11009
  var l, s;
10979
11010
  const t = E;
@@ -10994,7 +11025,7 @@ const Jo = Y.create({
10994
11025
  }, Uc = {
10995
11026
  __name: "align-right",
10996
11027
  setup(r) {
10997
- const { editor: e } = $();
11028
+ const { editor: e } = M();
10998
11029
  function n() {
10999
11030
  var o;
11000
11031
  (o = e.value) != null && o.can().chain().focus().setTextAlign("right").run() && e.value.chain().focus().setTextAlign("right").run();
@@ -11016,7 +11047,7 @@ const Jo = Y.create({
11016
11047
  }, Jc = {
11017
11048
  __name: "align-center",
11018
11049
  setup(r) {
11019
- const { editor: e } = $();
11050
+ const { editor: e } = M();
11020
11051
  function n() {
11021
11052
  var o;
11022
11053
  (o = e.value) != null && o.can().chain().focus().setTextAlign("center").run() && e.value.chain().focus().setTextAlign("center").run();
@@ -11038,7 +11069,7 @@ const Jo = Y.create({
11038
11069
  }, qc = {
11039
11070
  __name: "align-left",
11040
11071
  setup(r) {
11041
- const { editor: e } = $();
11072
+ const { editor: e } = M();
11042
11073
  function n() {
11043
11074
  var o;
11044
11075
  (o = e.value) != null && o.can().chain().focus().setTextAlign("left").run() && e.value.chain().focus().setTextAlign("left").run();
@@ -11060,7 +11091,7 @@ const Jo = Y.create({
11060
11091
  }, jc = { class: "smart-text-align-group" }, Gc = {
11061
11092
  __name: "align-dropdown",
11062
11093
  setup(r) {
11063
- const { popupVisible: e, togglePopup: n } = ye(), { editor: o } = $(), t = U(() => !o.value || o.value.isActive({ textAlign: "justify" }) ? "left" : o.value.isActive({ textAlign: "center" }) ? "center" : o.value.isActive({ textAlign: "right" }) ? "right" : o.value.isActive({ textAlign: "justify" }) ? "justify" : "left");
11094
+ const { popupVisible: e, togglePopup: n } = ye(), { editor: o } = M(), t = V(() => !o.value || o.value.isActive({ textAlign: "justify" }) ? "left" : o.value.isActive({ textAlign: "center" }) ? "center" : o.value.isActive({ textAlign: "right" }) ? "right" : o.value.isActive({ textAlign: "justify" }) ? "justify" : "left");
11064
11095
  return (l, s) => {
11065
11096
  var b;
11066
11097
  const a = qc, u = Jc, d = Uc, p = Wc, h = E;
@@ -11088,7 +11119,7 @@ const Jo = Y.create({
11088
11119
  }, Kc = {
11089
11120
  __name: "superscript",
11090
11121
  setup(r) {
11091
- const { editor: e } = $();
11122
+ const { editor: e } = M();
11092
11123
  return (n, o) => {
11093
11124
  var l, s;
11094
11125
  const t = E;
@@ -11109,7 +11140,7 @@ const Jo = Y.create({
11109
11140
  }, Xc = {
11110
11141
  __name: "subscript",
11111
11142
  setup(r) {
11112
- const { editor: e } = $();
11143
+ const { editor: e } = M();
11113
11144
  return (n, o) => {
11114
11145
  var l, s;
11115
11146
  const t = E;
@@ -11130,7 +11161,7 @@ const Jo = Y.create({
11130
11161
  }, Yc = {
11131
11162
  __name: "code",
11132
11163
  setup(r) {
11133
- const { editor: e } = $();
11164
+ const { editor: e } = M();
11134
11165
  return (n, o) => {
11135
11166
  var l, s;
11136
11167
  const t = E;
@@ -11151,7 +11182,7 @@ const Jo = Y.create({
11151
11182
  }, Zc = {
11152
11183
  __name: "font-size",
11153
11184
  setup(r) {
11154
- const { editor: e } = $(), n = [
11185
+ const { editor: e } = M(), n = [
11155
11186
  { label: "12", value: "12px", order: 1 },
11156
11187
  { label: "14", value: "14px", order: 2 },
11157
11188
  { label: "16", value: "16px", order: 3 },
@@ -11190,26 +11221,26 @@ const Jo = Y.create({
11190
11221
  }, Qc = {
11191
11222
  __name: "font-family",
11192
11223
  setup(r) {
11193
- const { options: e, editor: n } = $(), o = ze("recent"), t = B([]);
11224
+ const { options: e, editor: n } = M(), o = ze("recent"), t = B([]);
11194
11225
  function l(p) {
11195
11226
  if (!p || p === "default")
11196
11227
  return !0;
11197
- const h = "Cambria", b = "text", f = 100, C = 100, y = document.createElement("canvas"), k = y.getContext("2d", { willReadFrequently: !0 });
11198
- y.width = f, y.height = C, k && (k.textAlign = "center", k.fillStyle = "black", k.textBaseline = "middle");
11199
- const w = (A) => {
11200
- if (!k)
11228
+ const h = "Cambria", b = "text", f = 100, k = 100, C = document.createElement("canvas"), w = C.getContext("2d", { willReadFrequently: !0 });
11229
+ C.width = f, C.height = k, w && (w.textAlign = "center", w.fillStyle = "black", w.textBaseline = "middle");
11230
+ const y = (A) => {
11231
+ if (!w)
11201
11232
  return [];
11202
- k.clearRect(0, 0, f, C), k.font = `${C / 4}px ${A}, ${h}`, k.fillText(b, f / 2, C / 2);
11203
- const { data: x } = k.getImageData(0, 0, f, C);
11233
+ w.clearRect(0, 0, f, k), w.font = `${k / 4}px ${A}, ${h}`, w.fillText(b, f / 2, k / 2);
11234
+ const { data: x } = w.getImageData(0, 0, f, k);
11204
11235
  return Array.from(x).filter((L) => L !== 0);
11205
11236
  };
11206
- return w(h).join("") !== w(p).join("");
11237
+ return y(h).join("") !== y(p).join("");
11207
11238
  }
11208
- const s = U(() => {
11239
+ const s = V(() => {
11209
11240
  var f;
11210
- const p = (C) => C.map((y) => ({
11211
- ...y,
11212
- disabled: !l(y.value)
11241
+ const p = (k) => k.map((C) => ({
11242
+ ...C,
11243
+ disabled: !l(C.value)
11213
11244
  })), h = [
11214
11245
  {
11215
11246
  type: "group",
@@ -11217,14 +11248,14 @@ const Jo = Y.create({
11217
11248
  label: c("base.fontFamily.all"),
11218
11249
  children: p((f = e.value.dicts) == null ? void 0 : f.fonts) ?? []
11219
11250
  }
11220
- ], b = (C) => C.map(
11221
- (y) => {
11222
- var k;
11223
- return ((k = e.value.dicts) == null ? void 0 : k.fonts.find(
11224
- ({ value: w }) => w === y
11251
+ ], b = (k) => k.map(
11252
+ (C) => {
11253
+ var w;
11254
+ return ((w = e.value.dicts) == null ? void 0 : w.fonts.find(
11255
+ ({ value: y }) => y === C
11225
11256
  )) ?? {
11226
- label: y,
11227
- item: y
11257
+ label: C,
11258
+ item: C
11228
11259
  };
11229
11260
  }
11230
11261
  );
@@ -11251,14 +11282,14 @@ const Jo = Y.create({
11251
11282
  const h = JSON.stringify((b = n.value) == null ? void 0 : b.getJSON()).match(/"fontFamily":"([^"]+)"/g);
11252
11283
  if (h)
11253
11284
  for (const f of h) {
11254
- const C = f.replace('"fontFamily":"', "").replace('"', "");
11255
- t.value.includes(C) || t.value.push(C);
11285
+ const k = f.replace('"fontFamily":"', "").replace('"', "");
11286
+ t.value.includes(k) || t.value.push(k);
11256
11287
  }
11257
11288
  }
11258
11289
  function d(p) {
11259
11290
  var h, b;
11260
- p && p !== "default" ? (o.value.fonts.forEach((f, C) => {
11261
- f === p && o.value.fonts.splice(C, 1);
11291
+ p && p !== "default" ? (o.value.fonts.forEach((f, k) => {
11292
+ f === p && o.value.fonts.splice(k, 1);
11262
11293
  }), o.value.fonts.unshift(p), o.value.fonts.length > 10 && o.value.fonts.splice(10, 1), (h = n.value) == null || h.chain().focus().setFontFamily(p).run()) : (b = n.value) == null || b.chain().focus().unsetFontFamily().run(), u();
11263
11294
  }
11264
11295
  return de(
@@ -11286,7 +11317,7 @@ const Jo = Y.create({
11286
11317
  }, ed = {
11287
11318
  __name: "heading",
11288
11319
  setup(r) {
11289
- const { editor: e } = $(), n = U(() => {
11320
+ const { editor: e } = M(), n = V(() => {
11290
11321
  const l = [
11291
11322
  { label: c("base.heading.paragraph"), desc: "text", value: "paragraph" }
11292
11323
  ];
@@ -11299,7 +11330,7 @@ const Jo = Y.create({
11299
11330
  });
11300
11331
  }
11301
11332
  return l;
11302
- }), o = U(() => {
11333
+ }), o = V(() => {
11303
11334
  var s;
11304
11335
  const l = (a) => {
11305
11336
  var u;
@@ -11345,10 +11376,10 @@ const Jo = Y.create({
11345
11376
  }, null, 8, ["text", "placeholder", "select-value", "select-options", "disabled"]);
11346
11377
  };
11347
11378
  }
11348
- }, td = /* @__PURE__ */ z(ed, [["__scopeId", "data-v-346e4792"]]), nd = {
11379
+ }, td = /* @__PURE__ */ H(ed, [["__scopeId", "data-v-346e4792"]]), nd = {
11349
11380
  __name: "clear-format",
11350
11381
  setup(r) {
11351
- const { editor: e } = $();
11382
+ const { editor: e } = M();
11352
11383
  function n() {
11353
11384
  var o, t;
11354
11385
  (o = e.value) == null || o.commands.unsetFormatPainter(), (t = e.value) == null || t.chain().focus().unsetAllMarks().run();
@@ -11366,7 +11397,7 @@ const Jo = Y.create({
11366
11397
  }, od = {
11367
11398
  __name: "format-painter",
11368
11399
  setup(r) {
11369
- const { editor: e, painter: n } = $();
11400
+ const { editor: e, painter: n } = M();
11370
11401
  function o(t) {
11371
11402
  var l;
11372
11403
  n.value.enabled = !n.value.enabled, n.value.enabled && ((l = e.value) == null || l.chain().focus().setFormatPainter(t).run());
@@ -11389,7 +11420,7 @@ const Jo = Y.create({
11389
11420
  }, rd = { class: "smart-classic-menu" }, ld = { class: "smart-virtual-group" }, sd = { class: "smart-virtual-group" }, id = { class: "smart-virtual-group" }, ad = { class: "smart-virtual-group" }, ud = { class: "smart-virtual-group" }, cd = { class: "smart-virtual-group" }, dd = { class: "smart-virtual-group" }, pd = { class: "smart-virtual-group" }, md = {
11390
11421
  __name: "classic",
11391
11422
  setup(r) {
11392
- const e = B(null), n = B(!1), { editor: o, options: t, toolbarHover: l } = $(), s = B(!1), a = B(""), u = B("");
11423
+ const e = B(null), n = B(!1), { editor: o, options: t, toolbarHover: l } = M(), s = B(!1), a = B(""), u = B("");
11393
11424
  function d(f) {
11394
11425
  return () => _e("i", { class: `${f}`, style: "font-size: 16px;" });
11395
11426
  }
@@ -11405,7 +11436,7 @@ const Jo = Y.create({
11405
11436
  function h(f) {
11406
11437
  l.value = f;
11407
11438
  }
11408
- const b = U(() => [
11439
+ const b = V(() => [
11409
11440
  {
11410
11441
  label: c("moreBar.quote"),
11411
11442
  key: "quote",
@@ -11423,8 +11454,8 @@ const Jo = Y.create({
11423
11454
  icon: d("i-sed:split-block"),
11424
11455
  props: {
11425
11456
  onClick: () => {
11426
- var f, C;
11427
- (f = o.value) == null || f.chain().focus().enter().run(), (C = o.value) == null || C.chain().focus().setHorizontalRule().run();
11457
+ var f, k;
11458
+ (f = o.value) == null || f.chain().focus().enter().run(), (k = o.value) == null || k.chain().focus().setHorizontalRule().run();
11428
11459
  }
11429
11460
  }
11430
11461
  },
@@ -11652,8 +11683,8 @@ const Jo = Y.create({
11652
11683
  icon: d("i-sed:code-block"),
11653
11684
  props: {
11654
11685
  onClick: () => {
11655
- var f, C;
11656
- (f = o.value) == null || f.chain().focus().setCodeBlock().run(), (C = o.value) == null || C.chain().focus().enter().run();
11686
+ var f, k;
11687
+ (f = o.value) == null || f.chain().focus().setCodeBlock().run(), (k = o.value) == null || k.chain().focus().enter().run();
11657
11688
  }
11658
11689
  }
11659
11690
  },
@@ -11777,10 +11808,10 @@ const Jo = Y.create({
11777
11808
  show: !!t.value.render.paper
11778
11809
  }
11779
11810
  ]);
11780
- return (f, C) => {
11811
+ return (f, k) => {
11781
11812
  var Ye;
11782
- const y = Se, k = lt, w = od, A = nd, x = td, L = Qc, N = Zc, R = xo, F = wo, W = ko, S = Co, V = yo, j = _o, q = Yc, Q = Xc, G = Kc, ue = Gc, ee = Vc, fe = Pc, ke = Oc, Le = Dc, De = zc, O = Hc, Z = Fc, ce = Lc, ut = Tc, ct = Ac, dt = xc, pt = wc, mt = kc;
11783
- return m(), M(J, null, [
11813
+ const C = Se, w = lt, y = od, A = nd, x = td, L = Qc, N = Zc, R = xo, D = wo, q = ko, S = Co, U = yo, j = _o, J = Yc, Q = Xc, G = Kc, ue = Gc, ee = Vc, fe = Pc, ke = Oc, Le = Dc, De = zc, O = Hc, Z = Fc, ce = Lc, ut = Tc, ct = Ac, dt = xc, pt = wc, mt = kc;
11814
+ return m(), $(W, null, [
11784
11815
  nt((m(), _(mt, {
11785
11816
  ref_key: "scrollableRef",
11786
11817
  ref: e,
@@ -11789,13 +11820,13 @@ const Jo = Y.create({
11789
11820
  default: T(() => [
11790
11821
  v("div", rd, [
11791
11822
  v("div", ld, [
11792
- g(k, {
11823
+ g(w, {
11793
11824
  trigger: "click",
11794
11825
  options: i(b),
11795
- "onUpdate:show": C[0] || (C[0] = (Ze) => n.value = Ze)
11826
+ "onUpdate:show": k[0] || (k[0] = (Ze) => n.value = Ze)
11796
11827
  }, {
11797
11828
  default: T(() => [
11798
- g(y, {
11829
+ g(C, {
11799
11830
  quaternary: "",
11800
11831
  size: "small",
11801
11832
  class: "smart-classic-menu-insert"
@@ -11814,7 +11845,7 @@ const Jo = Y.create({
11814
11845
  }, 8, ["options"])
11815
11846
  ]),
11816
11847
  v("div", sd, [
11817
- g(w),
11848
+ g(y),
11818
11849
  g(A)
11819
11850
  ]),
11820
11851
  v("div", id, [
@@ -11822,14 +11853,14 @@ const Jo = Y.create({
11822
11853
  g(L),
11823
11854
  g(N),
11824
11855
  g(R),
11825
- g(F),
11826
- g(W),
11856
+ g(D),
11857
+ g(q),
11827
11858
  g(S),
11828
- g(V),
11859
+ g(U),
11829
11860
  g(j)
11830
11861
  ]),
11831
11862
  v("div", ad, [
11832
- g(q),
11863
+ g(J),
11833
11864
  g(Q),
11834
11865
  g(G)
11835
11866
  ]),
@@ -11854,7 +11885,7 @@ const Jo = Y.create({
11854
11885
  g(dt),
11855
11886
  g(pt)
11856
11887
  ]),
11857
- C[2] || (C[2] = v("div", { class: "smart-virtual-group" }, null, -1))
11888
+ k[2] || (k[2] = v("div", { class: "smart-virtual-group" }, null, -1))
11858
11889
  ])
11859
11890
  ]),
11860
11891
  _: 1
@@ -11865,23 +11896,23 @@ const Jo = Y.create({
11865
11896
  key: 0,
11866
11897
  visible: i(s),
11867
11898
  header: i(u),
11868
- onClose: C[1] || (C[1] = (Ze) => s.value = !1),
11899
+ onClose: k[1] || (k[1] = (Ze) => s.value = !1),
11869
11900
  onSuccess: p
11870
- }, null, 40, ["visible", "header"])) : H("", !0)
11901
+ }, null, 40, ["visible", "header"])) : F("", !0)
11871
11902
  ], 64);
11872
11903
  };
11873
11904
  }
11874
- }, hd = /* @__PURE__ */ z(md, [["__scopeId", "data-v-4734f00e"]]), fd = {}, bd = { class: "smart-toolbar-container" };
11905
+ }, hd = /* @__PURE__ */ H(md, [["__scopeId", "data-v-4734f00e"]]), fd = {}, bd = { class: "smart-toolbar-container" };
11875
11906
  function gd(r, e) {
11876
11907
  const n = hd;
11877
- return m(), M("div", bd, [
11908
+ return m(), $("div", bd, [
11878
11909
  g(n)
11879
11910
  ]);
11880
11911
  }
11881
- const vd = /* @__PURE__ */ z(fd, [["render", gd], ["__scopeId", "data-v-3d91acb0"]]), _d = {
11912
+ const vd = /* @__PURE__ */ H(fd, [["render", gd], ["__scopeId", "data-v-3d91acb0"]]), _d = {
11882
11913
  __name: "message-api",
11883
11914
  setup(r) {
11884
- return Be.message = lr(), (e, n) => (m(), M("div"));
11915
+ return Be.message = lr(), (e, n) => (m(), $("div"));
11885
11916
  }
11886
11917
  }, yd = ["id"], Cd = {
11887
11918
  key: 0,
@@ -11926,26 +11957,26 @@ const vd = /* @__PURE__ */ z(fd, [["render", gd], ["__scopeId", "data-v-3d91acb0
11926
11957
  editor: h,
11927
11958
  setOptions: b,
11928
11959
  resetStore: f,
11929
- page: C,
11930
- editorDestroyed: y
11931
- } = $();
11960
+ page: k,
11961
+ editorDestroyed: C
11962
+ } = M();
11932
11963
  Jn(() => {
11933
- y.value = !1, b(o), t("beforeCreate");
11964
+ C.value = !1, b(o), t("beforeCreate");
11934
11965
  }), Xe(() => {
11935
- W();
11966
+ q();
11936
11967
  });
11937
- const k = U(() => {
11968
+ const w = V(() => {
11938
11969
  var S;
11939
11970
  return !((S = u.value.document) != null && S.readOnly);
11940
- }), w = ze("locale"), A = B(!1), x = Wn(async () => {
11941
- var V, j, q, Q, G, ue, ee, fe;
11942
- if ((V = u.value.document) != null && V.readOnly)
11971
+ }), y = ze("locale"), A = B(!1), x = Wn(async () => {
11972
+ var U, j, J, Q, G, ue, ee, fe;
11973
+ if ((U = u.value.document) != null && U.readOnly)
11943
11974
  return;
11944
11975
  let S = null;
11945
11976
  try {
11946
11977
  S = Be.message.loading(c("save.saving"), { placement: "bottom", closable: !0 });
11947
11978
  const ke = mo().unix(), Le = ho(JSON.stringify((j = h.value) == null ? void 0 : j.getJSON()));
11948
- if (await Lt.content.put({ content_id: u.value.editorKey, content: (q = h.value) == null ? void 0 : q.getHTML(), version: ke, hashMd: Le }), !await ((fe = (Q = u.value) == null ? void 0 : Q.onSave) == null ? void 0 : fe.call(
11979
+ if (await Lt.content.put({ content_id: u.value.editorKey, content: (J = h.value) == null ? void 0 : J.getHTML(), version: ke, hashMd: Le }), !await ((fe = (Q = u.value) == null ? void 0 : Q.onSave) == null ? void 0 : fe.call(
11949
11980
  Q,
11950
11981
  {
11951
11982
  html: (G = h.value) == null ? void 0 : G.getHTML(),
@@ -11974,36 +12005,36 @@ const vd = /* @__PURE__ */ z(fd, [["render", gd], ["__scopeId", "data-v-3d91acb0
11974
12005
  t("changed", { editor: S }), A.value = !0;
11975
12006
  }), h.value.on("selectionUpdate", ({ editor: S }) => {
11976
12007
  t("changed:selection", { editor: S });
11977
- }), h.value.on("transaction", ({ editor: S, transaction: V }) => {
11978
- t("changed:transaction", { editor: S, transaction: V });
11979
- }), h.value.on("focus", ({ editor: S, event: V }) => {
11980
- t("focus", { editor: S, event: V });
12008
+ }), h.value.on("transaction", ({ editor: S, transaction: U }) => {
12009
+ t("changed:transaction", { editor: S, transaction: U });
12010
+ }), h.value.on("focus", ({ editor: S, event: U }) => {
12011
+ t("focus", { editor: S, event: U });
11981
12012
  }), h.value.on(
11982
12013
  "contentError",
11983
- ({ editor: S, error: V, disableCollaboration: j }) => {
11984
- t("contentError", { editor: S, error: V, disableCollaboration: j });
12014
+ ({ editor: S, error: U, disableCollaboration: j }) => {
12015
+ t("contentError", { editor: S, error: U, disableCollaboration: j });
11985
12016
  }
11986
- ), h.value.on("blur", ({ editor: S, event: V }) => {
11987
- t("blur", { editor: S, event: V });
12017
+ ), h.value.on("blur", ({ editor: S, event: U }) => {
12018
+ t("blur", { editor: S, event: U });
11988
12019
  }), h.value.on("destroy", () => {
11989
12020
  f(), t("destroy");
11990
12021
  }));
11991
12022
  }
11992
12023
  ), de(
11993
- () => C.value.showToc,
12024
+ () => k.value.showToc,
11994
12025
  (S) => {
11995
12026
  t("changed:pageShowToc", S);
11996
12027
  }
11997
12028
  );
11998
12029
  const { locale: L } = go();
11999
- L.value = w.value;
12030
+ L.value = y.value;
12000
12031
  function N(S) {
12001
12032
  if (!["zh_CN", "en_US"].includes(S))
12002
12033
  throw new Error('"params" must be one of "zh-CN" or "en-US".');
12003
12034
  if (L.value === S)
12004
12035
  return;
12005
- const V = ze("locale");
12006
- V.value = S, L.value = V.value;
12036
+ const U = ze("locale");
12037
+ U.value = S, L.value = U.value;
12007
12038
  }
12008
12039
  function R(S = "html") {
12009
12040
  if (!h.value)
@@ -12021,16 +12052,16 @@ const vd = /* @__PURE__ */ z(fd, [["render", gd], ["__scopeId", "data-v-3d91acb0
12021
12052
  () => b(o),
12022
12053
  { deep: !0 }
12023
12054
  );
12024
- const F = () => {
12055
+ const D = () => {
12025
12056
  var S;
12026
12057
  return (S = h.value) == null ? void 0 : S.commands.unsetFormatPainter();
12027
12058
  };
12028
12059
  Tt("ctrl+s,command+s", () => {
12029
- x(), F();
12060
+ x(), D();
12030
12061
  }), Tt("esc", () => {
12031
- F();
12062
+ D();
12032
12063
  });
12033
- function W() {
12064
+ function q() {
12034
12065
  var S;
12035
12066
  (S = h.value) == null || S.destroy(), pn("ctrl+s,command+s"), pn("esc"), f();
12036
12067
  }
@@ -12067,17 +12098,17 @@ const vd = /* @__PURE__ */ z(fd, [["render", gd], ["__scopeId", "data-v-3d91acb0
12067
12098
  getHTML: () => R("html"),
12068
12099
  getJSON: () => R("json"),
12069
12100
  saveContent: x
12070
- }), (S, V) => {
12071
- const j = _d, q = sr, Q = vd, G = yc, ue = ql, ee = Pn;
12101
+ }), (S, U) => {
12102
+ const j = _d, J = sr, Q = vd, G = yc, ue = ql, ee = Pn;
12072
12103
  return m(), _(ee, {
12073
12104
  "cls-prefix": "se",
12074
12105
  "theme-overrides": i(l) ? i(bo) : i(fo),
12075
- locale: i(w) !== "en_US" ? i(Fn) : i(Hn),
12076
- "date-locale": i(w) !== "en_US" ? i(zn) : i(Dn),
12106
+ locale: i(y) !== "en_US" ? i(Fn) : i(Hn),
12107
+ "date-locale": i(y) !== "en_US" ? i(zn) : i(Dn),
12077
12108
  theme: i(l) ? i(On) : null
12078
12109
  }, {
12079
12110
  default: T(() => [
12080
- g(q, null, {
12111
+ g(J, null, {
12081
12112
  default: T(() => [
12082
12113
  g(j)
12083
12114
  ]),
@@ -12088,9 +12119,9 @@ const vd = /* @__PURE__ */ z(fd, [["render", gd], ["__scopeId", "data-v-3d91acb0
12088
12119
  class: "smart-editor-container",
12089
12120
  style: le({ height: i(u).height })
12090
12121
  }, [
12091
- i(k) ? (m(), M("header", Cd, [
12122
+ i(w) ? (m(), $("header", Cd, [
12092
12123
  (m(), _(Q, { key: i(a) }))
12093
- ])) : H("", !0),
12124
+ ])) : F("", !0),
12094
12125
  v("main", kd, [
12095
12126
  g(G, null, {
12096
12127
  editor_tool: T(() => [
@@ -12099,9 +12130,9 @@ const vd = /* @__PURE__ */ z(fd, [["render", gd], ["__scopeId", "data-v-3d91acb0
12099
12130
  _: 3
12100
12131
  })
12101
12132
  ]),
12102
- i(k) ? (m(), M("footer", wd, [
12133
+ i(w) ? (m(), $("footer", wd, [
12103
12134
  g(ue)
12104
- ])) : H("", !0)
12135
+ ])) : F("", !0)
12105
12136
  ], 12, yd)
12106
12137
  ]),
12107
12138
  _: 3
@@ -12206,7 +12237,7 @@ const vd = /* @__PURE__ */ z(fd, [["render", gd], ["__scopeId", "data-v-3d91acb0
12206
12237
  ]
12207
12238
  },
12208
12239
  imageAccept: ["image/jpeg", "image/gif", "image/png", "image/jpg"]
12209
- }, [Ad, D] = br(() => {
12240
+ }, [Ad, z] = br(() => {
12210
12241
  const r = `#smart-editor-slim-${Te(4)}`, e = B(xd), n = B(null), o = (d) => {
12211
12242
  n.value = d;
12212
12243
  }, t = B(null), l = (d) => {
@@ -12314,239 +12345,234 @@ const vd = /* @__PURE__ */ z(fd, [["render", gd], ["__scopeId", "data-v-3d91acb0
12314
12345
  },
12315
12346
  emits: ["toggle-popup"],
12316
12347
  setup(r, { emit: e }) {
12317
- const n = r, o = e, t = Kt(), { container: l, editor: s } = D();
12318
- function a(...y) {
12319
- t.onMenuClickThrough ? t.onMenuClickThrough(...y) : t.onMenuClick && t.onMenuClick(...y);
12348
+ const n = r, o = e, t = Kt(), { container: l, config: s } = z();
12349
+ function a(...w) {
12350
+ t.onMenuClickThrough ? t.onMenuClickThrough(...w) : t.onMenuClick && t.onMenuClick(...w);
12320
12351
  }
12321
12352
  const u = B(!1), d = B(!1);
12322
- function p(y) {
12323
- d.value = y;
12353
+ function p(w) {
12354
+ d.value = w;
12324
12355
  }
12325
12356
  function h() {
12326
12357
  return n.tooltip === !1 ? "" : n.huge && n.tooltip ? `${n.tooltip}${n.shortcut ? ` (${we(n.shortcut)})` : ""}` : n.text ? `${n.tooltip ? n.tooltip : n.text}${n.shortcut ? ` (${we(n.shortcut)})` : ""}` : "";
12327
12358
  }
12359
+ const b = V(() => {
12360
+ var w;
12361
+ return !((w = s.value) != null && w.readOnly);
12362
+ });
12328
12363
  de(
12329
12364
  () => n.popupVisible,
12330
- (y) => {
12331
- d.value = y;
12365
+ (w) => {
12366
+ d.value = w;
12332
12367
  }
12333
12368
  );
12334
- const b = B(null), f = B(null);
12335
- function C(y) {
12336
- o("toggle-popup", y);
12369
+ const f = B(null), k = B(null);
12370
+ function C(w) {
12371
+ o("toggle-popup", w);
12337
12372
  }
12338
12373
  return Mt(
12339
- f,
12374
+ k,
12340
12375
  () => {
12341
12376
  o("toggle-popup", !1);
12342
12377
  },
12343
12378
  {
12344
- ignore: [b, ".smart-popup"]
12379
+ ignore: [f, ".smart-popup"]
12345
12380
  }
12346
- ), (y, k) => {
12347
- const w = Se, A = lt, x = En, L = qt;
12348
- return m(), _(L, {
12381
+ ), (w, y) => {
12382
+ const A = Se, x = lt, L = En, N = qt;
12383
+ return m(), _(N, {
12349
12384
  show: i(u) && !i(d) && r.showTooltip,
12350
12385
  placement: "bottom",
12351
12386
  to: i(l),
12352
12387
  "show-arrow": !1
12353
12388
  }, {
12354
- trigger: T(() => {
12355
- var N, R, F, W;
12356
- return [
12357
- v("div", {
12358
- class: "smart-menu-button-wrap",
12359
- onClick: k[2] || (k[2] = (S) => u.value = !1),
12360
- onMouseover: k[3] || (k[3] = (S) => u.value = !0),
12361
- onMouseleave: k[4] || (k[4] = (S) => u.value = !1)
12362
- }, [
12363
- r.menuType === "button" ? (m(), _(w, ge({
12389
+ trigger: T(() => [
12390
+ v("div", {
12391
+ class: "smart-menu-button-wrap",
12392
+ onClick: y[2] || (y[2] = (R) => u.value = !1),
12393
+ onMouseover: y[3] || (y[3] = (R) => u.value = !0),
12394
+ onMouseleave: y[4] || (y[4] = (R) => u.value = !1)
12395
+ }, [
12396
+ r.menuType === "button" ? (m(), _(A, ge({
12397
+ key: 0,
12398
+ class: ["smart-menu-button", {
12399
+ "show-text": !r.hideText,
12400
+ active: r.menuActive && i(b) !== !1
12401
+ }],
12402
+ quaternary: "",
12403
+ size: "small",
12404
+ disabled: r.disabled || i(b) === !1
12405
+ }, i(t), { onClick: a }), {
12406
+ default: T(() => [
12407
+ v("div", Td, [
12408
+ pe(w.$slots, "default", {}, void 0, !0),
12409
+ r.ico ? (m(), $("i", {
12410
+ key: 0,
12411
+ class: K(`${r.ico}`)
12412
+ }, null, 2)) : F("", !0),
12413
+ v("p", Sd, I(r.text), 1),
12414
+ r.shortcutText ? (m(), $("kbd", $d, I(i(we)(r.shortcutText)), 1)) : F("", !0)
12415
+ ])
12416
+ ]),
12417
+ _: 3
12418
+ }, 16, ["class", "disabled"])) : r.menuType === "dropdown" ? (m(), _(x, ge({ key: 1 }, i(t), {
12419
+ trigger: "click",
12420
+ options: r.selectOptions,
12421
+ to: i(l),
12422
+ "onUpdate:show": p,
12423
+ onSelect: i(t).onChangeas
12424
+ }), {
12425
+ default: T(() => [
12426
+ g(A, ge({
12427
+ class: ["smart-menu-button has-arrow", {
12428
+ "show-text": !r.hideText,
12429
+ active: r.popupVisible
12430
+ }],
12431
+ quaternary: "",
12432
+ size: "small",
12433
+ disabled: r.disabled || i(b) === !1
12434
+ }, i(t)), {
12435
+ default: T(() => [
12436
+ v("div", Md, [
12437
+ pe(w.$slots, "default", {}, void 0, !0),
12438
+ r.ico ? (m(), $("i", {
12439
+ key: 0,
12440
+ class: K(`${r.ico}`)
12441
+ }, null, 2)) : F("", !0),
12442
+ v("p", Bd, I(r.text), 1),
12443
+ r.shortcutText ? (m(), $("kbd", Ld, I(i(we)(r.shortcutText)), 1)) : F("", !0)
12444
+ ]),
12445
+ y[5] || (y[5] = v("span", { class: "smart-button-icon-arrow" }, [
12446
+ v("i", { class: "i-sed:arrow-down" })
12447
+ ], -1))
12448
+ ]),
12449
+ _: 3
12450
+ }, 16, ["class", "disabled"])
12451
+ ]),
12452
+ _: 3
12453
+ }, 16, ["options", "to", "onSelect"])) : r.menuType === "select" ? (m(), _(L, ge({
12454
+ key: 2,
12455
+ size: "tiny",
12456
+ placement: "bottom-left",
12457
+ value: r.selectValue
12458
+ }, i(t), {
12459
+ options: r.selectOptions,
12460
+ disabled: r.disabled || i(b) === !1,
12461
+ to: i(l),
12462
+ "onUpdate:show": p,
12463
+ "onUpdate:value": a
12464
+ }), {
12465
+ default: T(() => [
12466
+ pe(w.$slots, "default", {}, void 0, !0)
12467
+ ]),
12468
+ _: 3
12469
+ }, 16, ["value", "options", "disabled", "to"])) : r.menuType === "popup" ? (m(), $(W, { key: 3 }, [
12470
+ r.popupHandle === "arrow" ? (m(), _(A, ge({
12364
12471
  key: 0,
12365
- class: ["smart-menu-button", {
12472
+ class: ["smart-menu-button has-arrow", {
12366
12473
  "show-text": !r.hideText,
12367
- active: r.menuActive && ((N = i(s)) == null ? void 0 : N.isEditable) !== !1
12474
+ active: r.popupVisible
12368
12475
  }],
12369
12476
  quaternary: "",
12370
12477
  size: "small",
12371
- disabled: r.disabled || ((R = i(s)) == null ? void 0 : R.isEditable) === !1
12372
- }, i(t), { onClick: a }), {
12478
+ disabled: r.disabled || i(b) === !1
12479
+ }, i(t)), {
12373
12480
  default: T(() => [
12374
- v("div", Td, [
12375
- pe(y.$slots, "default", {}, void 0, !0),
12376
- r.ico ? (m(), M("i", {
12481
+ v("div", {
12482
+ class: "smart-button-content",
12483
+ onClick: a
12484
+ }, [
12485
+ pe(w.$slots, "default", {}, void 0, !0),
12486
+ r.ico ? (m(), $("i", {
12377
12487
  key: 0,
12378
12488
  class: K(`${r.ico}`)
12379
- }, null, 2)) : H("", !0),
12380
- v("p", Sd, I(r.text), 1),
12381
- r.shortcutText ? (m(), M("kbd", $d, I(i(we)(r.shortcutText)), 1)) : H("", !0)
12382
- ])
12489
+ }, null, 2)) : F("", !0),
12490
+ v("p", Id, I(r.text), 1),
12491
+ r.shortcutText ? (m(), $("kbd", Ed, I(i(we)(r.shortcutText)), 1)) : F("", !0)
12492
+ ]),
12493
+ g(N, {
12494
+ show: r.popupVisible,
12495
+ placement: "bottom",
12496
+ to: i(l),
12497
+ "show-arrow": !1,
12498
+ trigger: "click"
12499
+ }, {
12500
+ trigger: T(() => [
12501
+ v("span", {
12502
+ ref_key: "popupHandleRef",
12503
+ ref: f,
12504
+ class: "smart-button-icon-arrow smart-button-handle",
12505
+ onClick: y[0] || (y[0] = (R) => C(!r.popupVisible))
12506
+ }, y[6] || (y[6] = [
12507
+ v("i", { class: "i-sed:arrow-down" }, null, -1)
12508
+ ]), 512)
12509
+ ]),
12510
+ default: T(() => [
12511
+ v("div", {
12512
+ ref_key: "popupContentRef",
12513
+ ref: k,
12514
+ class: "smart-popup-content p-x-8 p-y-4"
12515
+ }, [
12516
+ pe(w.$slots, "content", {}, void 0, !0)
12517
+ ], 512)
12518
+ ]),
12519
+ _: 3
12520
+ }, 8, ["show", "to"])
12383
12521
  ]),
12384
12522
  _: 3
12385
- }, 16, ["class", "disabled"])) : r.menuType === "dropdown" ? (m(), _(A, ge({ key: 1 }, i(t), {
12386
- trigger: "click",
12387
- options: r.selectOptions,
12523
+ }, 16, ["class", "disabled"])) : (m(), _(N, {
12524
+ key: 1,
12525
+ show: r.popupVisible,
12526
+ placement: "bottom-start",
12388
12527
  to: i(l),
12389
- "onUpdate:show": p,
12390
- onSelect: i(t).onChangeas
12391
- }), {
12392
- default: T(() => {
12393
- var S;
12394
- return [
12395
- g(w, ge({
12396
- class: ["smart-menu-button has-arrow", {
12397
- "show-text": !r.hideText,
12398
- active: r.popupVisible
12399
- }],
12400
- quaternary: "",
12401
- size: "small",
12402
- disabled: r.disabled || ((S = i(s)) == null ? void 0 : S.isEditable) === !1
12403
- }, i(t)), {
12404
- default: T(() => [
12405
- v("div", Md, [
12406
- pe(y.$slots, "default", {}, void 0, !0),
12407
- r.ico ? (m(), M("i", {
12408
- key: 0,
12409
- class: K(`${r.ico}`)
12410
- }, null, 2)) : H("", !0),
12411
- v("p", Bd, I(r.text), 1),
12412
- r.shortcutText ? (m(), M("kbd", Ld, I(i(we)(r.shortcutText)), 1)) : H("", !0)
12413
- ]),
12414
- k[5] || (k[5] = v("span", { class: "smart-button-icon-arrow" }, [
12415
- v("i", { class: "i-sed:arrow-down" })
12416
- ], -1))
12528
+ "show-arrow": !1,
12529
+ trigger: "click"
12530
+ }, {
12531
+ trigger: T(() => [
12532
+ g(A, ge({
12533
+ ref_key: "popupHandleRef",
12534
+ ref: f,
12535
+ class: ["smart-menu-button", {
12536
+ "show-text": !r.hideText,
12537
+ active: r.menuActive && i(b) !== !1
12538
+ }],
12539
+ quaternary: "",
12540
+ size: "small",
12541
+ disabled: r.disabled || i(b) === !1
12542
+ }, i(t), {
12543
+ onClick: y[1] || (y[1] = (R) => C(!r.popupVisible))
12544
+ }), {
12545
+ default: T(() => [
12546
+ v("div", Nd, [
12547
+ pe(w.$slots, "default", {}, void 0, !0),
12548
+ r.ico ? (m(), $("i", {
12549
+ key: 0,
12550
+ class: K(`${r.ico}`)
12551
+ }, null, 2)) : F("", !0),
12552
+ v("p", Rd, I(r.text), 1),
12553
+ r.shortcutText ? (m(), $("kbd", Fd, I(i(we)(r.shortcutText)), 1)) : F("", !0)
12417
12554
  ]),
12418
- _: 3
12419
- }, 16, ["class", "disabled"])
12420
- ];
12421
- }),
12422
- _: 3
12423
- }, 16, ["options", "to", "onSelect"])) : r.menuType === "select" ? (m(), _(x, ge({
12424
- key: 2,
12425
- size: "tiny",
12426
- placement: "bottom-left",
12427
- value: r.selectValue
12428
- }, i(t), {
12429
- options: r.selectOptions,
12430
- disabled: r.disabled || ((F = i(s)) == null ? void 0 : F.isEditable) === !1,
12431
- to: i(l),
12432
- "onUpdate:show": p,
12433
- "onUpdate:value": a
12434
- }), {
12555
+ y[7] || (y[7] = v("span", { class: "smart-button-icon-arrow" }, [
12556
+ v("i", { class: "i-sed:arrow-down" })
12557
+ ], -1))
12558
+ ]),
12559
+ _: 3
12560
+ }, 16, ["class", "disabled"])
12561
+ ]),
12435
12562
  default: T(() => [
12436
- pe(y.$slots, "default", {}, void 0, !0)
12563
+ v("div", {
12564
+ ref_key: "popupContentRef",
12565
+ ref: k,
12566
+ class: "smart-popup-content p-x-8 p-y-4"
12567
+ }, [
12568
+ pe(w.$slots, "content", {}, void 0, !0)
12569
+ ], 512)
12437
12570
  ]),
12438
12571
  _: 3
12439
- }, 16, ["value", "options", "disabled", "to"])) : r.menuType === "popup" ? (m(), M(J, { key: 3 }, [
12440
- r.popupHandle === "arrow" ? (m(), _(w, ge({
12441
- key: 0,
12442
- class: ["smart-menu-button has-arrow", {
12443
- "show-text": !r.hideText,
12444
- active: r.popupVisible
12445
- }],
12446
- quaternary: "",
12447
- size: "small",
12448
- disabled: r.disabled || ((W = i(s)) == null ? void 0 : W.isEditable) === !1
12449
- }, i(t)), {
12450
- default: T(() => [
12451
- v("div", {
12452
- class: "smart-button-content",
12453
- onClick: a
12454
- }, [
12455
- pe(y.$slots, "default", {}, void 0, !0),
12456
- r.ico ? (m(), M("i", {
12457
- key: 0,
12458
- class: K(`${r.ico}`)
12459
- }, null, 2)) : H("", !0),
12460
- v("p", Id, I(r.text), 1),
12461
- r.shortcutText ? (m(), M("kbd", Ed, I(i(we)(r.shortcutText)), 1)) : H("", !0)
12462
- ]),
12463
- g(L, {
12464
- show: r.popupVisible,
12465
- placement: "bottom",
12466
- to: i(l),
12467
- "show-arrow": !1,
12468
- trigger: "click"
12469
- }, {
12470
- trigger: T(() => [
12471
- v("span", {
12472
- ref_key: "popupHandleRef",
12473
- ref: b,
12474
- class: "smart-button-icon-arrow smart-button-handle",
12475
- onClick: k[0] || (k[0] = (S) => C(!r.popupVisible))
12476
- }, k[6] || (k[6] = [
12477
- v("i", { class: "i-sed:arrow-down" }, null, -1)
12478
- ]), 512)
12479
- ]),
12480
- default: T(() => [
12481
- v("div", {
12482
- ref_key: "popupContentRef",
12483
- ref: f,
12484
- class: "smart-popup-content p-x-8 p-y-4"
12485
- }, [
12486
- pe(y.$slots, "content", {}, void 0, !0)
12487
- ], 512)
12488
- ]),
12489
- _: 3
12490
- }, 8, ["show", "to"])
12491
- ]),
12492
- _: 3
12493
- }, 16, ["class", "disabled"])) : (m(), _(L, {
12494
- key: 1,
12495
- show: r.popupVisible,
12496
- placement: "bottom-start",
12497
- to: i(l),
12498
- "show-arrow": !1,
12499
- trigger: "click"
12500
- }, {
12501
- trigger: T(() => {
12502
- var S, V;
12503
- return [
12504
- g(w, ge({
12505
- ref_key: "popupHandleRef",
12506
- ref: b,
12507
- class: ["smart-menu-button", {
12508
- "show-text": !r.hideText,
12509
- active: r.menuActive && ((S = i(s)) == null ? void 0 : S.isEditable) !== !1
12510
- }],
12511
- quaternary: "",
12512
- size: "small",
12513
- disabled: r.disabled || ((V = i(s)) == null ? void 0 : V.isEditable) === !1
12514
- }, i(t), {
12515
- onClick: k[1] || (k[1] = (j) => C(!r.popupVisible))
12516
- }), {
12517
- default: T(() => [
12518
- v("div", Nd, [
12519
- pe(y.$slots, "default", {}, void 0, !0),
12520
- r.ico ? (m(), M("i", {
12521
- key: 0,
12522
- class: K(`${r.ico}`)
12523
- }, null, 2)) : H("", !0),
12524
- v("p", Rd, I(r.text), 1),
12525
- r.shortcutText ? (m(), M("kbd", Fd, I(i(we)(r.shortcutText)), 1)) : H("", !0)
12526
- ]),
12527
- k[7] || (k[7] = v("span", { class: "smart-button-icon-arrow" }, [
12528
- v("i", { class: "i-sed:arrow-down" })
12529
- ], -1))
12530
- ]),
12531
- _: 3
12532
- }, 16, ["class", "disabled"])
12533
- ];
12534
- }),
12535
- default: T(() => [
12536
- v("div", {
12537
- ref_key: "popupContentRef",
12538
- ref: f,
12539
- class: "smart-popup-content p-x-8 p-y-4"
12540
- }, [
12541
- pe(y.$slots, "content", {}, void 0, !0)
12542
- ], 512)
12543
- ]),
12544
- _: 3
12545
- }, 8, ["show", "to"]))
12546
- ], 64)) : H("", !0)
12547
- ], 32)
12548
- ];
12549
- }),
12572
+ }, 8, ["show", "to"]))
12573
+ ], 64)) : F("", !0)
12574
+ ], 32)
12575
+ ]),
12550
12576
  default: T(() => [
12551
12577
  v("span", Hd, I(h()), 1)
12552
12578
  ]),
@@ -12554,10 +12580,10 @@ const vd = /* @__PURE__ */ z(fd, [["render", gd], ["__scopeId", "data-v-3d91acb0
12554
12580
  }, 8, ["show", "to"]);
12555
12581
  };
12556
12582
  }
12557
- }, P = /* @__PURE__ */ z(zd, [["__scopeId", "data-v-0e68d6d1"]]), Dd = {
12583
+ }, P = /* @__PURE__ */ H(zd, [["__scopeId", "data-v-61894092"]]), Dd = {
12558
12584
  __name: "cell-border",
12559
12585
  setup(r) {
12560
- const { editor: e } = D(), n = U(() => [
12586
+ const { editor: e } = z(), n = V(() => [
12561
12587
  {
12562
12588
  label: c("table.border.cellLeft"),
12563
12589
  key: "cellLeft",
@@ -13121,7 +13147,7 @@ const vd = /* @__PURE__ */ z(fd, [["render", gd], ["__scopeId", "data-v-3d91acb0
13121
13147
  }, Od = {
13122
13148
  __name: "cell-line",
13123
13149
  setup(r) {
13124
- const { editor: e } = D();
13150
+ const { editor: e } = z();
13125
13151
  function n() {
13126
13152
  var o;
13127
13153
  (o = e.value) == null || o.chain().focus().toggleCellLine().run();
@@ -13147,10 +13173,10 @@ const vd = /* @__PURE__ */ z(fd, [["render", gd], ["__scopeId", "data-v-3d91acb0
13147
13173
  },
13148
13174
  emits: ["change", "update:visible"],
13149
13175
  setup(r, { emit: e }) {
13150
- const n = r, o = e, { popupVisible: t } = ye(), { slimOptions: l } = D(), s = ze("recent"), a = ["#B12318", "#EB3323", "#F6C143", "#FFFE55", "#A0CD63", "#4FAD5B", "#4CAFEA", "#2D70BA", "#06215C", "#68389B"], u = B(n.defaultColor), d = `#color-picker-${Te(4)}`;
13176
+ const n = r, o = e, { popupVisible: t } = ye(), { slimOptions: l } = z(), s = ze("recent"), a = ["#B12318", "#EB3323", "#F6C143", "#FFFE55", "#A0CD63", "#4FAD5B", "#4CAFEA", "#2D70BA", "#06215C", "#68389B"], u = B(n.defaultColor), d = `#color-picker-${Te(4)}`;
13151
13177
  function p(f) {
13152
- t.value = !0, s.value.colors.forEach((C, y) => {
13153
- C === f && s.value.colors.splice(y, 1);
13178
+ t.value = !0, s.value.colors.forEach((k, C) => {
13179
+ k === f && s.value.colors.splice(C, 1);
13154
13180
  }), s.value.colors.unshift(f), s.value.colors.length > 10 && s.value.colors.splice(10, 1), o("change", f), o("update:visible");
13155
13181
  }
13156
13182
  function h(f) {
@@ -13159,18 +13185,18 @@ const vd = /* @__PURE__ */ z(fd, [["render", gd], ["__scopeId", "data-v-3d91acb0
13159
13185
  function b() {
13160
13186
  return _e("div", { class: "smart-color-picker-render" }, "更多颜色");
13161
13187
  }
13162
- return (f, C) => {
13163
- var w;
13164
- const y = Se, k = Nn;
13165
- return m(), M("div", {
13188
+ return (f, k) => {
13189
+ var y;
13190
+ const C = Se, w = Nn;
13191
+ return m(), $("div", {
13166
13192
  id: d.substr(1),
13167
13193
  class: "smart-color-picker-container"
13168
13194
  }, [
13169
13195
  v("div", Vd, [
13170
- g(y, {
13196
+ g(C, {
13171
13197
  size: "small",
13172
13198
  block: "",
13173
- onClick: C[0] || (C[0] = (A) => h(i(u)))
13199
+ onClick: k[0] || (k[0] = (A) => h(i(u)))
13174
13200
  }, {
13175
13201
  default: T(() => [
13176
13202
  te(I(("t" in f ? f.t : i(c))("colorPicker.default")), 1)
@@ -13179,7 +13205,7 @@ const vd = /* @__PURE__ */ z(fd, [["render", gd], ["__scopeId", "data-v-3d91acb0
13179
13205
  })
13180
13206
  ]),
13181
13207
  v("div", Wd, [
13182
- (m(!0), M(J, null, ve((w = i(l).dicts) == null ? void 0 : w.colors, (A, x) => (m(), M("div", {
13208
+ (m(!0), $(W, null, ve((y = i(l).dicts) == null ? void 0 : y.colors, (A, x) => (m(), $("div", {
13183
13209
  key: x,
13184
13210
  class: "smart-color-picker-item",
13185
13211
  style: le({ backgroundColor: A }),
@@ -13191,29 +13217,29 @@ const vd = /* @__PURE__ */ z(fd, [["render", gd], ["__scopeId", "data-v-3d91acb0
13191
13217
  textContent: I(("t" in f ? f.t : i(c))("colorPicker.standard"))
13192
13218
  }, null, 8, Jd),
13193
13219
  v("div", qd, [
13194
- (m(), M(J, null, ve(a, (A, x) => v("div", {
13220
+ (m(), $(W, null, ve(a, (A, x) => v("div", {
13195
13221
  key: x,
13196
13222
  class: "smart-color-picker-item",
13197
13223
  style: le({ backgroundColor: A }),
13198
13224
  onClick: (L) => h(A)
13199
13225
  }, null, 12, jd)), 64))
13200
13226
  ]),
13201
- i(s).colors.length > 0 ? (m(), M(J, { key: 0 }, [
13227
+ i(s).colors.length > 0 ? (m(), $(W, { key: 0 }, [
13202
13228
  v("div", {
13203
13229
  class: "smart-color-picker-group-title",
13204
13230
  textContent: I(("t" in f ? f.t : i(c))("colorPicker.recent"))
13205
13231
  }, null, 8, Gd),
13206
13232
  v("div", Kd, [
13207
- (m(!0), M(J, null, ve(i(s).colors, (A, x) => (m(), M("div", {
13233
+ (m(!0), $(W, null, ve(i(s).colors, (A, x) => (m(), $("div", {
13208
13234
  key: x,
13209
13235
  class: "smart-color-picker-item",
13210
13236
  style: le({ backgroundColor: A }),
13211
13237
  onClick: (L) => h(A)
13212
13238
  }, null, 12, Xd))), 128))
13213
13239
  ])
13214
- ], 64)) : H("", !0),
13215
- C[1] || (C[1] = v("div", { class: "smart-color-picker-divider" }, null, -1)),
13216
- g(k, {
13240
+ ], 64)) : F("", !0),
13241
+ k[1] || (k[1] = v("div", { class: "smart-color-picker-divider" }, null, -1)),
13242
+ g(w, {
13217
13243
  to: d,
13218
13244
  placement: "right",
13219
13245
  "render-label": b,
@@ -13222,7 +13248,7 @@ const vd = /* @__PURE__ */ z(fd, [["render", gd], ["__scopeId", "data-v-3d91acb0
13222
13248
  ], 8, Pd);
13223
13249
  };
13224
13250
  }
13225
- }, Go = /* @__PURE__ */ z(Yd, [["__scopeId", "data-v-a5541020"]]), Zd = {
13251
+ }, Go = /* @__PURE__ */ H(Yd, [["__scopeId", "data-v-a5541020"]]), Zd = {
13226
13252
  __name: "cell-background",
13227
13253
  props: {
13228
13254
  defaultColor: {
@@ -13231,7 +13257,7 @@ const vd = /* @__PURE__ */ z(fd, [["render", gd], ["__scopeId", "data-v-3d91acb0
13231
13257
  }
13232
13258
  },
13233
13259
  setup(r) {
13234
- const { popupVisible: e, togglePopup: n } = ye(), { editor: o } = D(), t = B("");
13260
+ const { popupVisible: e, togglePopup: n } = ye(), { editor: o } = z(), t = B("");
13235
13261
  function l(s) {
13236
13262
  var a, u;
13237
13263
  t.value = s, s === "" ? (a = o.value) == null || a.chain().focus().setCellAttribute("backgroundColor", "transparent").run() : (u = o.value) == null || u.chain().focus().setCellAttribute("backgroundColor", s).run();
@@ -13267,10 +13293,10 @@ const vd = /* @__PURE__ */ z(fd, [["render", gd], ["__scopeId", "data-v-3d91acb0
13267
13293
  }, 8, ["text", "popup-visible", "onTogglePopup"]);
13268
13294
  };
13269
13295
  }
13270
- }, Qd = /* @__PURE__ */ z(Zd, [["__scopeId", "data-v-9819f9f0"]]), ep = {
13296
+ }, Qd = /* @__PURE__ */ H(Zd, [["__scopeId", "data-v-9819f9f0"]]), ep = {
13271
13297
  __name: "merge-split",
13272
13298
  setup(r) {
13273
- const { editor: e } = D(), n = U(() => e.value ? e.value.can().mergeCells() ? "i-sed:table-merge" : "i-sed:table-split" : "i-sed:table-merge");
13299
+ const { editor: e } = z(), n = V(() => e.value ? e.value.can().mergeCells() ? "i-sed:table-merge" : "i-sed:table-split" : "i-sed:table-merge");
13274
13300
  function o() {
13275
13301
  var t;
13276
13302
  (t = e.value) == null || t.chain().focus().mergeOrSplit().run();
@@ -13289,7 +13315,7 @@ const vd = /* @__PURE__ */ z(fd, [["render", gd], ["__scopeId", "data-v-3d91acb0
13289
13315
  }, tp = {
13290
13316
  __name: "delete-row",
13291
13317
  setup(r) {
13292
- const { editor: e } = D();
13318
+ const { editor: e } = z();
13293
13319
  function n() {
13294
13320
  var o;
13295
13321
  (o = e.value) == null || o.chain().focus().deleteRow().run();
@@ -13306,7 +13332,7 @@ const vd = /* @__PURE__ */ z(fd, [["render", gd], ["__scopeId", "data-v-3d91acb0
13306
13332
  }, np = {
13307
13333
  __name: "delete-column",
13308
13334
  setup(r) {
13309
- const { editor: e } = D();
13335
+ const { editor: e } = z();
13310
13336
  function n() {
13311
13337
  var o;
13312
13338
  (o = e.value) == null || o.chain().focus().deleteColumn().run();
@@ -13323,7 +13349,7 @@ const vd = /* @__PURE__ */ z(fd, [["render", gd], ["__scopeId", "data-v-3d91acb0
13323
13349
  }, op = {
13324
13350
  __name: "add-row-after",
13325
13351
  setup(r) {
13326
- const { editor: e } = D();
13352
+ const { editor: e } = z();
13327
13353
  function n() {
13328
13354
  var o;
13329
13355
  (o = e.value) == null || o.chain().focus().addRowAfter().run();
@@ -13340,7 +13366,7 @@ const vd = /* @__PURE__ */ z(fd, [["render", gd], ["__scopeId", "data-v-3d91acb0
13340
13366
  }, rp = {
13341
13367
  __name: "add-row-before",
13342
13368
  setup(r) {
13343
- const { editor: e } = D();
13369
+ const { editor: e } = z();
13344
13370
  function n() {
13345
13371
  var o;
13346
13372
  (o = e.value) == null || o.chain().focus().addRowBefore().run();
@@ -13357,7 +13383,7 @@ const vd = /* @__PURE__ */ z(fd, [["render", gd], ["__scopeId", "data-v-3d91acb0
13357
13383
  }, lp = {
13358
13384
  __name: "add-column-after",
13359
13385
  setup(r) {
13360
- const { editor: e } = D();
13386
+ const { editor: e } = z();
13361
13387
  function n() {
13362
13388
  var o;
13363
13389
  (o = e.value) == null || o.chain().focus().addColumnAfter().run();
@@ -13374,7 +13400,7 @@ const vd = /* @__PURE__ */ z(fd, [["render", gd], ["__scopeId", "data-v-3d91acb0
13374
13400
  }, sp = {
13375
13401
  __name: "add-column-before",
13376
13402
  setup(r) {
13377
- const { editor: e } = D();
13403
+ const { editor: e } = z();
13378
13404
  function n() {
13379
13405
  var o;
13380
13406
  (o = e.value) == null || o.chain().focus().addColumnBefore().run();
@@ -13392,7 +13418,7 @@ const vd = /* @__PURE__ */ z(fd, [["render", gd], ["__scopeId", "data-v-3d91acb0
13392
13418
  __name: "vertical-bottom",
13393
13419
  emits: "update:popupVisible",
13394
13420
  setup(r, { emit: e }) {
13395
- const n = e, { editor: o } = D();
13421
+ const n = e, { editor: o } = z();
13396
13422
  function t() {
13397
13423
  var s;
13398
13424
  n("update:popupVisible"), (s = o.value) == null || s.chain().focus().setCellAttribute("cellVertical", "bottom").run();
@@ -13417,7 +13443,7 @@ const vd = /* @__PURE__ */ z(fd, [["render", gd], ["__scopeId", "data-v-3d91acb0
13417
13443
  __name: "vertical-middle",
13418
13444
  emits: "update:popupVisible",
13419
13445
  setup(r, { emit: e }) {
13420
- const n = e, { editor: o } = D();
13446
+ const n = e, { editor: o } = z();
13421
13447
  function t() {
13422
13448
  var s;
13423
13449
  n("update:popupVisible"), (s = o.value) == null || s.chain().focus().setCellAttribute("cellVertical", "middle").run();
@@ -13442,7 +13468,7 @@ const vd = /* @__PURE__ */ z(fd, [["render", gd], ["__scopeId", "data-v-3d91acb0
13442
13468
  __name: "vertical-top",
13443
13469
  emits: "update:popupVisible",
13444
13470
  setup(r, { emit: e }) {
13445
- const n = e, { editor: o } = D();
13471
+ const n = e, { editor: o } = z();
13446
13472
  function t() {
13447
13473
  var s;
13448
13474
  n("update:popupVisible"), (s = o.value) == null || s.chain().focus().setCellAttribute("cellVertical", "top").run();
@@ -13466,7 +13492,7 @@ const vd = /* @__PURE__ */ z(fd, [["render", gd], ["__scopeId", "data-v-3d91acb0
13466
13492
  }, cp = { class: "smart-text-align-group" }, dp = {
13467
13493
  __name: "vertical-dropdown",
13468
13494
  setup(r) {
13469
- const { popupVisible: e, togglePopup: n } = ye(), { editor: o } = D(), t = U(() => {
13495
+ const { popupVisible: e, togglePopup: n } = ye(), { editor: o } = z(), t = V(() => {
13470
13496
  var s;
13471
13497
  if (!o.value)
13472
13498
  return "top";
@@ -13497,7 +13523,7 @@ const vd = /* @__PURE__ */ z(fd, [["render", gd], ["__scopeId", "data-v-3d91acb0
13497
13523
  }, pp = {
13498
13524
  __name: "auto",
13499
13525
  setup(r) {
13500
- const { editor: e } = D();
13526
+ const { editor: e } = z();
13501
13527
  function n() {
13502
13528
  var t;
13503
13529
  (t = e.value) == null || t.chain().focus().toggleTableAuto().run();
@@ -13520,7 +13546,7 @@ const vd = /* @__PURE__ */ z(fd, [["render", gd], ["__scopeId", "data-v-3d91acb0
13520
13546
  }, mp = {
13521
13547
  __name: "width",
13522
13548
  setup(r) {
13523
- const { editor: e } = D();
13549
+ const { editor: e } = z();
13524
13550
  function n() {
13525
13551
  var t;
13526
13552
  (t = e.value) == null || t.chain().focus().toggleWidthAuto().run();
@@ -13543,7 +13569,7 @@ const vd = /* @__PURE__ */ z(fd, [["render", gd], ["__scopeId", "data-v-3d91acb0
13543
13569
  }, hp = {
13544
13570
  __name: "border",
13545
13571
  setup(r) {
13546
- const { editor: e } = D(), n = U(() => {
13572
+ const { editor: e } = z(), n = V(() => {
13547
13573
  var l;
13548
13574
  if (!e.value)
13549
13575
  return "i-sed:table-border";
@@ -13566,7 +13592,7 @@ const vd = /* @__PURE__ */ z(fd, [["render", gd], ["__scopeId", "data-v-3d91acb0
13566
13592
  }, fp = {
13567
13593
  __name: "delete",
13568
13594
  setup(r) {
13569
- const { editor: e } = D();
13595
+ const { editor: e } = z();
13570
13596
  function n() {
13571
13597
  var o;
13572
13598
  (o = e.value) == null || o.chain().focus().deleteTable().run();
@@ -13583,11 +13609,11 @@ const vd = /* @__PURE__ */ z(fd, [["render", gd], ["__scopeId", "data-v-3d91acb0
13583
13609
  }, bp = {
13584
13610
  __name: "menus",
13585
13611
  setup(r) {
13586
- const { editor: e, showTableBar: n } = D();
13612
+ const { editor: e, showTableBar: n } = z();
13587
13613
  return (o, t) => {
13588
13614
  var L;
13589
- const l = fp, s = hp, a = mp, u = pp, d = dp, p = sp, h = lp, b = rp, f = op, C = np, y = tp, k = ep, w = Qd, A = Od, x = Dd;
13590
- return (L = i(e)) != null && L.isActive("tableCell") && i(n) ? (m(), M(J, { key: 0 }, [
13615
+ const l = fp, s = hp, a = mp, u = pp, d = dp, p = sp, h = lp, b = rp, f = op, k = np, C = tp, w = ep, y = Qd, A = Od, x = Dd;
13616
+ return (L = i(e)) != null && L.isActive("tableCell") && i(n) ? (m(), $(W, { key: 0 }, [
13591
13617
  g(l),
13592
13618
  t[0] || (t[0] = v("div", { class: "smart-bubble-menu-divider" }, null, -1)),
13593
13619
  g(s),
@@ -13599,20 +13625,20 @@ const vd = /* @__PURE__ */ z(fd, [["render", gd], ["__scopeId", "data-v-3d91acb0
13599
13625
  g(h),
13600
13626
  g(b),
13601
13627
  g(f),
13602
- g(C),
13603
- g(y),
13604
13628
  g(k),
13605
- t[2] || (t[2] = v("div", { class: "smart-bubble-menu-divider" }, null, -1)),
13629
+ g(C),
13606
13630
  g(w),
13631
+ t[2] || (t[2] = v("div", { class: "smart-bubble-menu-divider" }, null, -1)),
13632
+ g(y),
13607
13633
  g(A),
13608
13634
  g(x)
13609
- ], 64)) : H("", !0);
13635
+ ], 64)) : F("", !0);
13610
13636
  };
13611
13637
  }
13612
- }, gp = /* @__PURE__ */ z(bp, [["__scopeId", "data-v-bd0d430f"]]), vp = {
13638
+ }, gp = /* @__PURE__ */ H(bp, [["__scopeId", "data-v-bd0d430f"]]), vp = {
13613
13639
  __name: "index",
13614
13640
  setup(r) {
13615
- const { editor: e } = D(), n = B(null), o = B({
13641
+ const { editor: e } = z(), n = B(null), o = B({
13616
13642
  appendTo: "parent",
13617
13643
  maxWidth: 580,
13618
13644
  zIndex: 99,
@@ -13743,15 +13769,21 @@ function yp(r) {
13743
13769
  const Cp = {
13744
13770
  __name: "editor",
13745
13771
  setup(r) {
13746
- const { editor: e, setEditor: n, config: o } = D(), t = new Kn({
13747
- editable: !0,
13748
- autofocus: !0,
13772
+ const { editor: e, setEditor: n, config: o } = z(), t = new Kn({
13773
+ editable: !o.value.readOnly,
13774
+ autofocus: "end",
13749
13775
  content: "",
13750
13776
  extensions: [...yp(o.value)]
13751
13777
  });
13752
13778
  n(t), Xe(() => {
13753
13779
  t.destroy();
13754
- });
13780
+ }), de(
13781
+ o,
13782
+ (s) => {
13783
+ t && (t.setEditable(!s.readOnly), t.commands.focus("end"));
13784
+ },
13785
+ { deep: !0 }
13786
+ );
13755
13787
  function l() {
13756
13788
  var a;
13757
13789
  if (document.querySelector("#katex-style") === null) {
@@ -13761,19 +13793,19 @@ const Cp = {
13761
13793
  }
13762
13794
  return Re(() => l()), (s, a) => {
13763
13795
  const u = vp;
13764
- return m(), M(J, null, [
13796
+ return m(), $(W, null, [
13765
13797
  g(i(Xn), {
13766
13798
  editor: i(e),
13767
13799
  class: "smart-editor-slim"
13768
13800
  }, null, 8, ["editor"]),
13769
- i(e) ? (m(), _(u, { key: 0 })) : H("", !0)
13801
+ i(e) ? (m(), _(u, { key: 0 })) : F("", !0)
13770
13802
  ], 64);
13771
13803
  };
13772
13804
  }
13773
- }, kp = /* @__PURE__ */ z(Cp, [["__scopeId", "data-v-4896df72"]]), wp = {
13805
+ }, kp = /* @__PURE__ */ H(Cp, [["__scopeId", "data-v-a8c77fda"]]), wp = {
13774
13806
  __name: "redo",
13775
13807
  setup(r) {
13776
- const { editor: e } = D();
13808
+ const { editor: e } = z();
13777
13809
  return (n, o) => {
13778
13810
  var l;
13779
13811
  const t = P;
@@ -13793,7 +13825,7 @@ const Cp = {
13793
13825
  }, xp = {
13794
13826
  __name: "undo",
13795
13827
  setup(r) {
13796
- const { editor: e } = D();
13828
+ const { editor: e } = z();
13797
13829
  return (n, o) => {
13798
13830
  var l;
13799
13831
  const t = P;
@@ -13813,7 +13845,7 @@ const Cp = {
13813
13845
  }, Ap = {
13814
13846
  __name: "fill",
13815
13847
  setup(r) {
13816
- const { editor: e } = D();
13848
+ const { editor: e } = z();
13817
13849
  function n() {
13818
13850
  var o;
13819
13851
  (o = e.value) == null || o.chain().focus().setFillNode().run();
@@ -13831,7 +13863,7 @@ const Cp = {
13831
13863
  }, Tp = {
13832
13864
  __name: "math",
13833
13865
  setup(r) {
13834
- const { editor: e } = D();
13866
+ const { editor: e } = z();
13835
13867
  function n() {
13836
13868
  var o;
13837
13869
  (o = e.value) == null || o.chain().focus().insertContent("$\\LaTeX$").run();
@@ -13849,7 +13881,7 @@ const Cp = {
13849
13881
  }, Sp = ["onMouseover"], $p = { class: "smart-table-custom" }, Mp = ["textContent"], Bp = {
13850
13882
  __name: "table",
13851
13883
  setup(r) {
13852
- const { popupVisible: e, togglePopup: n } = ye(), { editor: o } = D(), t = Array.from({ length: 8 }, () => Array.from({ length: 10 }, () => "")), l = B({ rows: 0, cols: 0 });
13884
+ const { popupVisible: e, togglePopup: n } = ye(), { editor: o } = z(), t = Array.from({ length: 8 }, () => Array.from({ length: 10 }, () => "")), l = B({ rows: 0, cols: 0 });
13853
13885
  function s(p, h) {
13854
13886
  return l.value.rows && l.value.rows > p && l.value.cols && l.value.cols > h;
13855
13887
  }
@@ -13865,8 +13897,8 @@ const Cp = {
13865
13897
  p === 0 || p > 1e3 || h === 0 || h > 30 || ((b = o.value) == null || b.chain().focus().insertTable({ rows: p, cols: h, withHeaderRow: !1 }).run(), e.value = !1);
13866
13898
  }
13867
13899
  return (p, h) => {
13868
- const b = Rn, f = Se, C = P;
13869
- return m(), _(C, {
13900
+ const b = Rn, f = Se, k = P;
13901
+ return m(), _(k, {
13870
13902
  ico: "i-sed:table",
13871
13903
  text: ("t" in p ? p.t : i(c))("table.insert.text"),
13872
13904
  tooltip: ("t" in p ? p.t : i(c))("table.insert.tip"),
@@ -13880,14 +13912,14 @@ const Cp = {
13880
13912
  class: "smart-table-grid",
13881
13913
  onMouseleave: u
13882
13914
  }, [
13883
- (m(!0), M(J, null, ve(i(t), (y, k) => (m(), M("div", {
13884
- key: k,
13915
+ (m(!0), $(W, null, ve(i(t), (C, w) => (m(), $("div", {
13916
+ key: w,
13885
13917
  class: "row"
13886
13918
  }, [
13887
- (m(!0), M(J, null, ve(y, (w, A) => (m(), M("div", {
13919
+ (m(!0), $(W, null, ve(C, (y, A) => (m(), $("div", {
13888
13920
  key: A,
13889
- class: K(["cell", { selected: s(k, A) }]),
13890
- onMouseover: (x) => a(k, A),
13921
+ class: K(["cell", { selected: s(w, A) }]),
13922
+ onMouseover: (x) => a(w, A),
13891
13923
  onClick: d
13892
13924
  }, null, 42, Sp))), 128))
13893
13925
  ]))), 128))
@@ -13899,7 +13931,7 @@ const Cp = {
13899
13931
  }, null, 8, Mp),
13900
13932
  g(b, {
13901
13933
  value: i(l).rows,
13902
- "onUpdate:value": h[0] || (h[0] = (y) => i(l).rows = y),
13934
+ "onUpdate:value": h[0] || (h[0] = (C) => i(l).rows = C),
13903
13935
  size: "small",
13904
13936
  max: 1e3,
13905
13937
  min: 0
@@ -13911,7 +13943,7 @@ const Cp = {
13911
13943
  }, 8, ["value"]),
13912
13944
  g(b, {
13913
13945
  value: i(l).cols,
13914
- "onUpdate:value": h[1] || (h[1] = (y) => i(l).cols = y),
13946
+ "onUpdate:value": h[1] || (h[1] = (C) => i(l).cols = C),
13915
13947
  size: "small",
13916
13948
  max: 30,
13917
13949
  min: 0
@@ -13938,10 +13970,10 @@ const Cp = {
13938
13970
  }, 8, ["text", "tooltip", "popup-visible", "onTogglePopup"]);
13939
13971
  };
13940
13972
  }
13941
- }, Lp = /* @__PURE__ */ z(Bp, [["__scopeId", "data-v-46850e3f"]]), Ip = {
13973
+ }, Lp = /* @__PURE__ */ H(Bp, [["__scopeId", "data-v-46850e3f"]]), Ip = {
13942
13974
  __name: "image",
13943
13975
  setup(r) {
13944
- const { slimOptions: e, editor: n } = D(), { onChange: o, open: t } = Gt({
13976
+ const { slimOptions: e, editor: n } = z(), { onChange: o, open: t } = Gt({
13945
13977
  accept: e.value.imageAccept.toString(),
13946
13978
  multiple: !1,
13947
13979
  reset: !0
@@ -13965,7 +13997,7 @@ const Cp = {
13965
13997
  }, Ep = {
13966
13998
  __name: "line-height",
13967
13999
  setup(r) {
13968
- const { editor: e, slimOptions: n } = D(), o = U(() => {
14000
+ const { editor: e, slimOptions: n } = z(), o = V(() => {
13969
14001
  var l;
13970
14002
  return (l = n.value.dicts) == null ? void 0 : l.lineHeights.map((s) => {
13971
14003
  var a;
@@ -13999,7 +14031,7 @@ const Cp = {
13999
14031
  }, Np = {
14000
14032
  __name: "align-justify",
14001
14033
  setup(r) {
14002
- const { editor: e } = D();
14034
+ const { editor: e } = z();
14003
14035
  return (n, o) => {
14004
14036
  var l, s;
14005
14037
  const t = P;
@@ -14020,7 +14052,7 @@ const Cp = {
14020
14052
  }, Rp = {
14021
14053
  __name: "align-right",
14022
14054
  setup(r) {
14023
- const { editor: e } = D();
14055
+ const { editor: e } = z();
14024
14056
  function n() {
14025
14057
  var o;
14026
14058
  (o = e.value) != null && o.can().chain().focus().setTextAlign("right").run() && e.value.chain().focus().setTextAlign("right").run();
@@ -14042,7 +14074,7 @@ const Cp = {
14042
14074
  }, Fp = {
14043
14075
  __name: "align-center",
14044
14076
  setup(r) {
14045
- const { editor: e } = D();
14077
+ const { editor: e } = z();
14046
14078
  function n() {
14047
14079
  var o;
14048
14080
  (o = e.value) != null && o.can().chain().focus().setTextAlign("center").run() && e.value.chain().focus().setTextAlign("center").run();
@@ -14064,7 +14096,7 @@ const Cp = {
14064
14096
  }, Hp = {
14065
14097
  __name: "align-left",
14066
14098
  setup(r) {
14067
- const { editor: e } = D();
14099
+ const { editor: e } = z();
14068
14100
  function n() {
14069
14101
  var o;
14070
14102
  (o = e.value) != null && o.can().chain().focus().setTextAlign("left").run() && e.value.chain().focus().setTextAlign("left").run();
@@ -14086,7 +14118,7 @@ const Cp = {
14086
14118
  }, zp = { class: "smart-text-align-group" }, Dp = {
14087
14119
  __name: "align-dropdown",
14088
14120
  setup(r) {
14089
- const { popupVisible: e, togglePopup: n } = ye(), { editor: o } = D(), t = U(() => !o.value || o.value.isActive({ textAlign: "justify" }) ? "left" : o.value.isActive({ textAlign: "center" }) ? "center" : o.value.isActive({ textAlign: "right" }) ? "right" : o.value.isActive({ textAlign: "justify" }) ? "justify" : "left");
14121
+ const { popupVisible: e, togglePopup: n } = ye(), { editor: o } = z(), t = V(() => !o.value || o.value.isActive({ textAlign: "justify" }) ? "left" : o.value.isActive({ textAlign: "center" }) ? "center" : o.value.isActive({ textAlign: "right" }) ? "right" : o.value.isActive({ textAlign: "justify" }) ? "justify" : "left");
14090
14122
  return (l, s) => {
14091
14123
  var b;
14092
14124
  const a = Hp, u = Fp, d = Rp, p = Np, h = P;
@@ -14114,7 +14146,7 @@ const Cp = {
14114
14146
  }, Op = {
14115
14147
  __name: "superscript",
14116
14148
  setup(r) {
14117
- const { editor: e } = D();
14149
+ const { editor: e } = z();
14118
14150
  return (n, o) => {
14119
14151
  var l, s;
14120
14152
  const t = P;
@@ -14135,7 +14167,7 @@ const Cp = {
14135
14167
  }, Pp = {
14136
14168
  __name: "subscript",
14137
14169
  setup(r) {
14138
- const { editor: e } = D();
14170
+ const { editor: e } = z();
14139
14171
  return (n, o) => {
14140
14172
  var l, s;
14141
14173
  const t = P;
@@ -14156,7 +14188,7 @@ const Cp = {
14156
14188
  }, Vp = {
14157
14189
  __name: "code",
14158
14190
  setup(r) {
14159
- const { editor: e } = D();
14191
+ const { editor: e } = z();
14160
14192
  return (n, o) => {
14161
14193
  var l, s;
14162
14194
  const t = P;
@@ -14192,7 +14224,7 @@ const Cp = {
14192
14224
  },
14193
14225
  emits: ["change"],
14194
14226
  setup(r, { emit: e }) {
14195
- const n = r, o = e, { popupVisible: t, togglePopup: l } = ye(), { editor: s } = D(), a = B("");
14227
+ const n = r, o = e, { popupVisible: t, togglePopup: l } = ye(), { editor: s } = z(), a = B("");
14196
14228
  function u(d) {
14197
14229
  var p, h;
14198
14230
  if (a.value = d, n.modeless) {
@@ -14231,7 +14263,7 @@ const Cp = {
14231
14263
  }, 8, ["text", "popup-visible", "onTogglePopup"]);
14232
14264
  };
14233
14265
  }
14234
- }, Up = /* @__PURE__ */ z(Wp, [["__scopeId", "data-v-816de0e1"]]), Jp = {
14266
+ }, Up = /* @__PURE__ */ H(Wp, [["__scopeId", "data-v-816de0e1"]]), Jp = {
14235
14267
  __name: "color",
14236
14268
  props: {
14237
14269
  text: {
@@ -14249,7 +14281,7 @@ const Cp = {
14249
14281
  },
14250
14282
  emits: ["change"],
14251
14283
  setup(r, { emit: e }) {
14252
- const n = r, o = e, { popupVisible: t, togglePopup: l } = ye(), { editor: s } = D(), a = B("");
14284
+ const n = r, o = e, { popupVisible: t, togglePopup: l } = ye(), { editor: s } = z(), a = B("");
14253
14285
  function u(d) {
14254
14286
  var p, h;
14255
14287
  if (a.value = d, n.modeless) {
@@ -14288,10 +14320,10 @@ const Cp = {
14288
14320
  }, 8, ["text", "popup-visible", "onTogglePopup"]);
14289
14321
  };
14290
14322
  }
14291
- }, qp = /* @__PURE__ */ z(Jp, [["__scopeId", "data-v-710f5e19"]]), jp = {
14323
+ }, qp = /* @__PURE__ */ H(Jp, [["__scopeId", "data-v-710f5e19"]]), jp = {
14292
14324
  __name: "strike",
14293
14325
  setup(r) {
14294
- const { editor: e } = D();
14326
+ const { editor: e } = z();
14295
14327
  return (n, o) => {
14296
14328
  var l, s;
14297
14329
  const t = P;
@@ -14311,7 +14343,7 @@ const Cp = {
14311
14343
  }, Gp = {
14312
14344
  __name: "underline",
14313
14345
  setup(r) {
14314
- const { editor: e } = D();
14346
+ const { editor: e } = z();
14315
14347
  return (n, o) => {
14316
14348
  var l, s;
14317
14349
  const t = P;
@@ -14332,7 +14364,7 @@ const Cp = {
14332
14364
  }, Kp = {
14333
14365
  __name: "italic",
14334
14366
  setup(r) {
14335
- const { editor: e } = D();
14367
+ const { editor: e } = z();
14336
14368
  return (n, o) => {
14337
14369
  var l, s;
14338
14370
  const t = P;
@@ -14353,7 +14385,7 @@ const Cp = {
14353
14385
  }, Xp = {
14354
14386
  __name: "bold",
14355
14387
  setup(r) {
14356
- const { editor: e } = D();
14388
+ const { editor: e } = z();
14357
14389
  return (n, o) => {
14358
14390
  var l, s;
14359
14391
  const t = P;
@@ -14374,7 +14406,7 @@ const Cp = {
14374
14406
  }, Yp = {
14375
14407
  __name: "font-size",
14376
14408
  setup(r) {
14377
- const { editor: e } = D(), n = [
14409
+ const { editor: e } = z(), n = [
14378
14410
  { label: "12", value: "12px", order: 1 },
14379
14411
  { label: "14", value: "14px", order: 2 },
14380
14412
  { label: "16", value: "16px", order: 3 },
@@ -14413,26 +14445,26 @@ const Cp = {
14413
14445
  }, Zp = {
14414
14446
  __name: "font-family",
14415
14447
  setup(r) {
14416
- const { slimOptions: e, editor: n } = D(), o = ze("recent"), t = B([]);
14448
+ const { slimOptions: e, editor: n } = z(), o = ze("recent"), t = B([]);
14417
14449
  function l(p) {
14418
14450
  if (!p || p === "default")
14419
14451
  return !0;
14420
- const h = "Cambria", b = "text", f = 100, C = 100, y = document.createElement("canvas"), k = y.getContext("2d", { willReadFrequently: !0 });
14421
- y.width = f, y.height = C, k && (k.textAlign = "center", k.fillStyle = "black", k.textBaseline = "middle");
14422
- const w = (A) => {
14423
- if (!k)
14452
+ const h = "Cambria", b = "text", f = 100, k = 100, C = document.createElement("canvas"), w = C.getContext("2d", { willReadFrequently: !0 });
14453
+ C.width = f, C.height = k, w && (w.textAlign = "center", w.fillStyle = "black", w.textBaseline = "middle");
14454
+ const y = (A) => {
14455
+ if (!w)
14424
14456
  return [];
14425
- k.clearRect(0, 0, f, C), k.font = `${C / 4}px ${A}, ${h}`, k.fillText(b, f / 2, C / 2);
14426
- const { data: x } = k.getImageData(0, 0, f, C);
14457
+ w.clearRect(0, 0, f, k), w.font = `${k / 4}px ${A}, ${h}`, w.fillText(b, f / 2, k / 2);
14458
+ const { data: x } = w.getImageData(0, 0, f, k);
14427
14459
  return Array.from(x).filter((L) => L !== 0);
14428
14460
  };
14429
- return w(h).join("") !== w(p).join("");
14461
+ return y(h).join("") !== y(p).join("");
14430
14462
  }
14431
- const s = U(() => {
14463
+ const s = V(() => {
14432
14464
  var f;
14433
- const p = (C) => C.map((y) => ({
14434
- ...y,
14435
- disabled: !l(y.value)
14465
+ const p = (k) => k.map((C) => ({
14466
+ ...C,
14467
+ disabled: !l(C.value)
14436
14468
  })), h = [
14437
14469
  {
14438
14470
  type: "group",
@@ -14440,14 +14472,14 @@ const Cp = {
14440
14472
  label: c("base.fontFamily.all"),
14441
14473
  children: p((f = e.value.dicts) == null ? void 0 : f.fonts) ?? []
14442
14474
  }
14443
- ], b = (C) => C.map(
14444
- (y) => {
14445
- var k;
14446
- return ((k = e.value.dicts) == null ? void 0 : k.fonts.find(
14447
- ({ value: w }) => w === y
14475
+ ], b = (k) => k.map(
14476
+ (C) => {
14477
+ var w;
14478
+ return ((w = e.value.dicts) == null ? void 0 : w.fonts.find(
14479
+ ({ value: y }) => y === C
14448
14480
  )) ?? {
14449
- label: y,
14450
- item: y
14481
+ label: C,
14482
+ item: C
14451
14483
  };
14452
14484
  }
14453
14485
  );
@@ -14474,14 +14506,14 @@ const Cp = {
14474
14506
  const h = JSON.stringify((b = n.value) == null ? void 0 : b.getJSON()).match(/"fontFamily":"([^"]+)"/g);
14475
14507
  if (h)
14476
14508
  for (const f of h) {
14477
- const C = f.replace('"fontFamily":"', "").replace('"', "");
14478
- t.value.includes(C) || t.value.push(C);
14509
+ const k = f.replace('"fontFamily":"', "").replace('"', "");
14510
+ t.value.includes(k) || t.value.push(k);
14479
14511
  }
14480
14512
  }
14481
14513
  function d(p) {
14482
14514
  var h, b;
14483
- p && p !== "default" ? (o.value.fonts.forEach((f, C) => {
14484
- f === p && o.value.fonts.splice(C, 1);
14515
+ p && p !== "default" ? (o.value.fonts.forEach((f, k) => {
14516
+ f === p && o.value.fonts.splice(k, 1);
14485
14517
  }), o.value.fonts.unshift(p), o.value.fonts.length > 10 && o.value.fonts.splice(10, 1), (h = n.value) == null || h.chain().focus().setFontFamily(p).run()) : (b = n.value) == null || b.chain().focus().unsetFontFamily().run(), u();
14486
14518
  }
14487
14519
  return de(
@@ -14509,7 +14541,7 @@ const Cp = {
14509
14541
  }, Qp = {
14510
14542
  __name: "heading",
14511
14543
  setup(r) {
14512
- const { editor: e } = D(), n = U(() => {
14544
+ const { editor: e } = z(), n = V(() => {
14513
14545
  const l = [
14514
14546
  { label: c("base.heading.paragraph"), desc: "text", value: "paragraph" }
14515
14547
  ];
@@ -14522,7 +14554,7 @@ const Cp = {
14522
14554
  });
14523
14555
  }
14524
14556
  return l;
14525
- }), o = U(() => {
14557
+ }), o = V(() => {
14526
14558
  var s;
14527
14559
  const l = (a) => {
14528
14560
  var u;
@@ -14568,10 +14600,10 @@ const Cp = {
14568
14600
  }, null, 8, ["text", "placeholder", "select-value", "select-options", "disabled"]);
14569
14601
  };
14570
14602
  }
14571
- }, em = /* @__PURE__ */ z(Qp, [["__scopeId", "data-v-8a16bdad"]]), tm = {
14603
+ }, em = /* @__PURE__ */ H(Qp, [["__scopeId", "data-v-8a16bdad"]]), tm = {
14572
14604
  __name: "clear-format",
14573
14605
  setup(r) {
14574
- const { editor: e } = D();
14606
+ const { editor: e } = z();
14575
14607
  function n() {
14576
14608
  var o, t;
14577
14609
  (o = e.value) == null || o.commands.unsetFormatPainter(), (t = e.value) == null || t.chain().focus().unsetAllMarks().run();
@@ -14589,10 +14621,10 @@ const Cp = {
14589
14621
  }, nm = { class: "smart-classic-menu" }, om = {
14590
14622
  __name: "toolbar",
14591
14623
  setup(r) {
14592
- const { config: e } = D();
14624
+ const { config: e } = z();
14593
14625
  return (n, o) => {
14594
- const t = tm, l = em, s = Zp, a = Yp, u = Xp, d = Kp, p = Gp, h = jp, b = qp, f = Up, C = Vp, y = Pp, k = Op, w = Dp, A = Ep, x = Ip, L = Lp, N = Tp, R = Ap, F = xp, W = wp;
14595
- return m(), M("div", nm, [
14626
+ const t = tm, l = em, s = Zp, a = Yp, u = Xp, d = Kp, p = Gp, h = jp, b = qp, f = Up, k = Vp, C = Pp, w = Op, y = Dp, A = Ep, x = Ip, L = Lp, N = Tp, R = Ap, D = xp, q = wp;
14627
+ return m(), $("div", nm, [
14596
14628
  g(t),
14597
14629
  g(l),
14598
14630
  g(s),
@@ -14603,21 +14635,24 @@ const Cp = {
14603
14635
  g(h),
14604
14636
  g(b),
14605
14637
  g(f),
14606
- g(C),
14607
- g(y),
14608
14638
  g(k),
14639
+ g(C),
14609
14640
  g(w),
14641
+ g(y),
14610
14642
  g(A),
14611
14643
  g(x),
14612
14644
  g(L),
14613
14645
  g(N),
14614
- i(e).canFill ? (m(), _(R, { key: 0 })) : H("", !0),
14615
- g(F),
14616
- g(W)
14646
+ i(e).canFill ? (m(), _(R, { key: 0 })) : F("", !0),
14647
+ g(D),
14648
+ g(q)
14617
14649
  ]);
14618
14650
  };
14619
14651
  }
14620
- }, rm = /* @__PURE__ */ z(om, [["__scopeId", "data-v-941be6af"]]), lm = ["id"], sm = { class: "smart-toolbar" }, im = { class: "smart-main" }, Kh = /* @__PURE__ */ Object.assign({ name: "SmartEditorSlim" }, {
14652
+ }, rm = /* @__PURE__ */ H(om, [["__scopeId", "data-v-941be6af"]]), lm = ["id"], sm = {
14653
+ key: 0,
14654
+ class: "smart-toolbar"
14655
+ }, im = { class: "smart-main" }, Kh = /* @__PURE__ */ Object.assign({ name: "SmartEditorSlim" }, {
14621
14656
  __name: "index",
14622
14657
  props: /* @__PURE__ */ rn(["config"], {
14623
14658
  modelValue: {},
@@ -14634,56 +14669,57 @@ const Cp = {
14634
14669
  valueDark: "dark",
14635
14670
  valueLight: "light"
14636
14671
  }
14637
- ), { container: l, locale: s, editor: a, setConfig: u, showTableBar: d } = D();
14672
+ ), { container: l, locale: s, editor: a, setConfig: u, showTableBar: d } = z();
14638
14673
  Jn(() => {
14639
14674
  u(n.config);
14640
14675
  });
14641
14676
  function p(C) {
14642
- const y = {
14677
+ const w = {
14643
14678
  "&amp;": "&"
14644
14679
  // '&lt;': '<',
14645
14680
  // '&gt;': '>',
14646
14681
  // '&quot;': '"',
14647
14682
  // '&#39;': "'",
14648
14683
  };
14649
- return C.replace(/&amp;/g, (k) => y[k]);
14684
+ return C.replace(/&amp;/g, (y) => w[y]);
14650
14685
  }
14651
- function h(C) {
14652
- const y = /\$([^$]*)\$/g;
14686
+ const h = V(() => !n.config.readOnly);
14687
+ function b(C) {
14688
+ const w = /\$([^$]*)\$/g;
14653
14689
  if (!C)
14654
14690
  return "";
14655
- const k = p(C);
14656
- return k ? k.replace(y, (w, A) => `<span class="Tiptap-mathematics-render Tiptap-mathematics-render--editable ProseMirror-widget">${co.renderToString(
14657
- A,
14691
+ const y = p(C);
14692
+ return y ? y.replace(w, (A, x) => `<span class="Tiptap-mathematics-render Tiptap-mathematics-render--editable ProseMirror-widget">${co.renderToString(
14693
+ x,
14658
14694
  { throwOnError: !1 }
14659
14695
  )}</span>`) : "";
14660
14696
  }
14661
- const b = yr(r, "modelValue");
14697
+ const f = yr(r, "modelValue");
14662
14698
  Re(() => {
14663
14699
  var C;
14664
- (C = a.value) == null || C.commands.setContent(b.value);
14700
+ (C = a.value) == null || C.commands.setContent(f.value);
14665
14701
  });
14666
- function f() {
14702
+ function k() {
14667
14703
  var C;
14668
14704
  (C = a.value) == null || C.destroy();
14669
14705
  }
14670
14706
  return Xe(() => {
14671
- f();
14707
+ k();
14672
14708
  }), de(
14673
14709
  () => a.value,
14674
14710
  () => {
14675
14711
  a.value && (a.value.on("create", () => {
14676
- o("getHtml", h(a.value.getHTML()));
14712
+ o("getHtml", b(a.value.getHTML()));
14677
14713
  }), a.value.on("update", () => {
14678
- o("getHtml", h(a.value.getHTML())), b.value = a.value.getJSON();
14714
+ o("getHtml", b(a.value.getHTML())), f.value = a.value.getJSON();
14679
14715
  }), a.value.on("selectionUpdate", ({ editor: C }) => {
14680
- const { $from: y } = C.state.selection;
14681
- d.value = y.parent.type.name === "tableCell";
14716
+ const { $from: w } = C.state.selection;
14717
+ d.value = w.parent.type.name === "tableCell";
14682
14718
  }));
14683
14719
  }
14684
- ), (C, y) => {
14685
- const k = rm, w = kp, A = Pn;
14686
- return m(), _(A, {
14720
+ ), (C, w) => {
14721
+ const y = rm, A = kp, x = Pn;
14722
+ return m(), _(x, {
14687
14723
  "cls-prefix": "se",
14688
14724
  "theme-overrides": i(t) ? i(bo) : i(fo),
14689
14725
  locale: i(s) !== "en_US" ? i(Fn) : i(Hn),
@@ -14695,11 +14731,11 @@ const Cp = {
14695
14731
  id: i(l).substr(1),
14696
14732
  class: "smart-editor-slim-container"
14697
14733
  }, [
14698
- v("header", sm, [
14699
- g(k)
14700
- ]),
14734
+ i(h) ? (m(), $("header", sm, [
14735
+ g(y)
14736
+ ])) : F("", !0),
14701
14737
  v("main", im, [
14702
- g(w)
14738
+ g(A)
14703
14739
  ])
14704
14740
  ], 8, lm)
14705
14741
  ]),