xiaodao-spreader 0.1.16 → 0.1.17

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.
@@ -1,4 +1,4 @@
1
- import { defineComponent as Vt, ref as H, computed as re, watch as vt, nextTick as Je, onMounted as cn, onBeforeUnmount as ll, openBlock as z, createElementBlock as oe, normalizeStyle as Tt, normalizeClass as it, toDisplayString as He, createElementVNode as d, createCommentVNode as nt, createBlock as Ue, Teleport as Ge, createVNode as ft, Transition as Jt, withCtx as Qt, Fragment as St, renderList as Dt, withModifiers as lt, unref as j, withDirectives as Wt, vShow as so, createTextVNode as Rn, vModelSelect as ml, vModelText as xn, vModelCheckbox as fo, reactive as Kt, watchEffect as vo, useModel as mo, mergeModels as go } from "vue";
1
+ import { defineComponent as Vt, ref as H, computed as ie, watch as vt, nextTick as Je, onMounted as cn, onBeforeUnmount as ll, openBlock as z, createElementBlock as oe, normalizeStyle as Tt, normalizeClass as it, toDisplayString as He, createElementVNode as d, createCommentVNode as nt, createBlock as Ue, Teleport as Ge, createVNode as ft, Transition as Jt, withCtx as Qt, Fragment as St, renderList as Dt, withModifiers as lt, unref as j, withDirectives as Wt, vShow as so, createTextVNode as Rn, vModelSelect as ml, vModelText as xn, vModelCheckbox as fo, reactive as Kt, watchEffect as vo, useModel as mo, mergeModels as go } from "vue";
2
2
  const Oe = 52, Le = 24, gl = 100, Jl = 24, Sl = 30, Bl = 24, Kl = 1e3, Dl = 500, hl = 11, po = 50, ho = {
3
3
  "zh-CN": {
4
4
  insert: "插入",
@@ -347,7 +347,7 @@ const Oe = 52, Le = 24, gl = 100, Jl = 24, Sl = 30, Bl = 24, Kl = 1e3, Dl = 500,
347
347
  findClose: "Close"
348
348
  }
349
349
  };
350
- function A(e, n) {
350
+ function E(e, n) {
351
351
  var l;
352
352
  return ((l = ho[e]) == null ? void 0 : l[n]) ?? n;
353
353
  }
@@ -550,15 +550,15 @@ function $o(e) {
550
550
  }
551
551
  }
552
552
  b < 0 && (b = o);
553
- const s = o > 0 ? n.slice(0, o) : "", k = b < n.length - 1 ? n.slice(b + 1) : "", B = n.slice(o, b + 1), F = /[0#?]/.test(B), w = B.includes(",");
554
- let S = B.replace(/,/g, "");
553
+ const s = o > 0 ? n.slice(0, o) : "", k = b < n.length - 1 ? n.slice(b + 1) : "", S = n.slice(o, b + 1), A = /[0#?]/.test(S), w = S.includes(",");
554
+ let B = S.replace(/,/g, "");
555
555
  if (r) {
556
- const Q = S.search(/E/i);
557
- Q >= 0 && (S = S.slice(0, Q));
556
+ const Q = B.search(/E/i);
557
+ Q >= 0 && (B = B.slice(0, Q));
558
558
  }
559
- const ie = S.indexOf("."), ue = ie >= 0 ? S.slice(0, ie) : S, m = ie >= 0 ? S.slice(ie + 1) : "", L = (m.match(/[0#?]/g) || []).length, Z = (m.match(/0/g) || []).length, ce = (ue.match(/0/g) || []).length;
559
+ const ae = B.indexOf("."), ue = ae >= 0 ? B.slice(0, ae) : B, m = ae >= 0 ? B.slice(ae + 1) : "", L = (m.match(/[0#?]/g) || []).length, Z = (m.match(/0/g) || []).length, ce = (ue.match(/0/g) || []).length;
560
560
  return {
561
- hasDigits: F,
561
+ hasDigits: A,
562
562
  decimals: L,
563
563
  minDecimals: Z,
564
564
  minIntDigits: ce,
@@ -657,7 +657,7 @@ function Gl(e) {
657
657
  }
658
658
  function Nn(e, n, l, t, r) {
659
659
  const u = Math.pow(10, n), o = Math.round((e + Number.EPSILON) * u) / u, b = o < 0, s = Math.abs(o);
660
- let B = new Intl.NumberFormat("en-US", {
660
+ let S = new Intl.NumberFormat("en-US", {
661
661
  useGrouping: t,
662
662
  minimumIntegerDigits: r,
663
663
  minimumFractionDigits: n,
@@ -665,14 +665,14 @@ function Nn(e, n, l, t, r) {
665
665
  maximumFractionDigits: n
666
666
  }).format(s);
667
667
  if (l < n && n > 0) {
668
- const w = B.indexOf(".");
668
+ const w = S.indexOf(".");
669
669
  if (w >= 0) {
670
- const M = B.substring(0, w);
671
- let S = B.substring(w + 1);
672
- S = S.replace(/0+$/, ""), S.length < l && (S = S + "0".repeat(l - S.length)), B = S ? `${M}.${S}` : M;
670
+ const M = S.substring(0, w);
671
+ let B = S.substring(w + 1);
672
+ B = B.replace(/0+$/, ""), B.length < l && (B = B + "0".repeat(l - B.length)), S = B ? `${M}.${B}` : M;
673
673
  }
674
674
  }
675
- return `${b ? "-" : ""}${B}`;
675
+ return `${b ? "-" : ""}${S}`;
676
676
  }
677
677
  function Hn(e, n) {
678
678
  if (e === 0)
@@ -702,41 +702,41 @@ function pl(e, n) {
702
702
  }
703
703
  function Go(e, n, l, t) {
704
704
  const r = e.getUTCFullYear(), u = e.getUTCMonth() + 1, o = e.getUTCDate(), b = e.getUTCDay(), s = l === "zh-CN";
705
- let k = "", B = !1;
706
- for (const F of n)
707
- switch (F.type) {
705
+ let k = "", S = !1;
706
+ for (const A of n)
707
+ switch (A.type) {
708
708
  case "literal":
709
- k += F.text ?? "";
709
+ k += A.text ?? "";
710
710
  break;
711
711
  case "year":
712
- k += F.len >= 4 ? String(r) : String(r % 100).padStart(2, "0");
712
+ k += A.len >= 4 ? String(r) : String(r % 100).padStart(2, "0");
713
713
  break;
714
714
  case "month":
715
- k += pl(B ? e.getUTCMinutes() : u, F.len);
715
+ k += pl(S ? e.getUTCMinutes() : u, A.len);
716
716
  break;
717
717
  case "monthName":
718
- k += F.len >= 4 ? s ? Ko[u - 1] : Po[u - 1] : s ? Vo[u - 1] : Uo[u - 1];
718
+ k += A.len >= 4 ? s ? Ko[u - 1] : Po[u - 1] : s ? Vo[u - 1] : Uo[u - 1];
719
719
  break;
720
720
  case "day":
721
- k += pl(o, F.len);
721
+ k += pl(o, A.len);
722
722
  break;
723
723
  case "weekday":
724
- k += F.len >= 4 ? s ? Bn[b] : Tn[b] : s ? Bn[b].slice(2) : Tn[b].slice(0, 3);
724
+ k += A.len >= 4 ? s ? Bn[b] : Tn[b] : s ? Bn[b].slice(2) : Tn[b].slice(0, 3);
725
725
  break;
726
726
  case "hour": {
727
727
  let w = e.getUTCHours();
728
- if (F.len === 0) {
728
+ if (A.len === 0) {
729
729
  const M = Math.floor(t * 86400);
730
730
  w = Math.floor(M / 3600);
731
731
  }
732
- k += String(w), B = !0;
732
+ k += String(w), S = !0;
733
733
  break;
734
734
  }
735
735
  case "minute":
736
- k += pl(e.getUTCMinutes(), F.len);
736
+ k += pl(e.getUTCMinutes(), A.len);
737
737
  break;
738
738
  case "second":
739
- k += pl(e.getUTCSeconds(), F.len);
739
+ k += pl(e.getUTCSeconds(), A.len);
740
740
  break;
741
741
  case "ampm": {
742
742
  const w = e.getUTCHours();
@@ -879,20 +879,20 @@ function qo(e, n, l, t) {
879
879
  function Jo(e) {
880
880
  const n = In(e);
881
881
  return [
882
- { label: A(e, "nfGeneral"), value: Ul },
883
- { label: A(e, "nfText"), value: dl },
884
- { label: A(e, "nfNumber"), value: "#,##0.00" },
885
- { label: A(e, "nfPercent"), value: "0.00%" },
886
- { label: A(e, "nfScientific"), value: "0.00E+00" },
887
- { label: A(e, "nfAccounting"), value: `${n}#,##0.00;(${n}#,##0.00);${n}"-"` },
888
- { label: A(e, "nfFinancial"), value: "#,##0.00;[Red](#,##0.00)" },
889
- { label: A(e, "nfCurrency"), value: n + "#,##0.00" },
890
- { label: A(e, "nfCurrencyRounded"), value: n + "#,##0" },
891
- { label: A(e, "nfDate"), value: e === "zh-CN" ? 'yyyy"年"m"月"d"日"' : "m/d/yyyy" },
892
- { label: A(e, "nfTime"), value: "h:mm:ss" },
893
- { label: A(e, "nfDateTime"), value: e === "zh-CN" ? 'yyyy"年"m"月"d"日" h:mm:ss' : "m/d/yyyy h:mm:ss" },
894
- { label: A(e, "nfDuration"), value: "[h]:mm:ss" },
895
- { label: A(e, "nfCustom"), value: On }
882
+ { label: E(e, "nfGeneral"), value: Ul },
883
+ { label: E(e, "nfText"), value: dl },
884
+ { label: E(e, "nfNumber"), value: "#,##0.00" },
885
+ { label: E(e, "nfPercent"), value: "0.00%" },
886
+ { label: E(e, "nfScientific"), value: "0.00E+00" },
887
+ { label: E(e, "nfAccounting"), value: `${n}#,##0.00;(${n}#,##0.00);${n}"-"` },
888
+ { label: E(e, "nfFinancial"), value: "#,##0.00;[Red](#,##0.00)" },
889
+ { label: E(e, "nfCurrency"), value: n + "#,##0.00" },
890
+ { label: E(e, "nfCurrencyRounded"), value: n + "#,##0" },
891
+ { label: E(e, "nfDate"), value: e === "zh-CN" ? 'yyyy"年"m"月"d"日"' : "m/d/yyyy" },
892
+ { label: E(e, "nfTime"), value: "h:mm:ss" },
893
+ { label: E(e, "nfDateTime"), value: e === "zh-CN" ? 'yyyy"年"m"月"d"日" h:mm:ss' : "m/d/yyyy h:mm:ss" },
894
+ { label: E(e, "nfDuration"), value: "[h]:mm:ss" },
895
+ { label: E(e, "nfCustom"), value: On }
896
896
  ];
897
897
  }
898
898
  const Qo = ["title"], ea = ["innerHTML"], ta = {
@@ -915,16 +915,16 @@ const Qo = ["title"], ea = ["innerHTML"], ta = {
915
915
  },
916
916
  emits: ["update:modelValue", "change", "update:modelOpen"],
917
917
  setup(e, { emit: n }) {
918
- const l = e, t = n, r = H(!1), u = H(0), o = H(null), b = H(null), s = H(null), k = H({ top: 0, up: !1 }), B = H(0), F = H(!1), w = re(() => l.options.find((me) => String(me.value) === String(l.modelValue))), M = re(() => l.menuWidth), S = re(() => Math.min(l.visibleCount, l.options.length)), ie = re(() => l.options.slice(u.value, u.value + S.value)), ue = re(() => u.value > 0), m = re(() => u.value + S.value < l.options.length), L = re(() => l.options.length > S.value);
918
+ const l = e, t = n, r = H(!1), u = H(0), o = H(null), b = H(null), s = H(null), k = H({ top: 0, up: !1 }), S = H(0), A = H(!1), w = ie(() => l.options.find((me) => String(me.value) === String(l.modelValue))), M = ie(() => l.menuWidth), B = ie(() => Math.min(l.visibleCount, l.options.length)), ae = ie(() => l.options.slice(u.value, u.value + B.value)), ue = ie(() => u.value > 0), m = ie(() => u.value + B.value < l.options.length), L = ie(() => l.options.length > B.value);
919
919
  function Z(me) {
920
- u.value = Math.max(0, Math.min(l.options.length - S.value, u.value + me));
920
+ u.value = Math.max(0, Math.min(l.options.length - B.value, u.value + me));
921
921
  }
922
922
  function ce() {
923
923
  r.value = !0, l.modelOpen !== void 0 && t("update:modelOpen", !0);
924
924
  const me = l.triggerEl ?? o.value;
925
925
  if (!me)
926
926
  return;
927
- const ge = me.getBoundingClientRect(), $e = S.value * 22 + (L.value ? 2 * 15 : 0) + 8, a = window.innerHeight - ge.bottom - 4 < $e && ge.top - 4 > $e;
927
+ const ge = me.getBoundingClientRect(), $e = B.value * 22 + (L.value ? 2 * 15 : 0) + 8, a = window.innerHeight - ge.bottom - 4 < $e && ge.top - 4 > $e;
928
928
  l.align === "right" ? k.value = {
929
929
  right: window.innerWidth - ge.right,
930
930
  top: a ? ge.top - $e - 4 : ge.bottom + 4,
@@ -935,7 +935,7 @@ const Qo = ["title"], ea = ["innerHTML"], ta = {
935
935
  up: a
936
936
  };
937
937
  const v = l.options.findIndex((he) => String(he.value) === String(l.modelValue));
938
- u.value = v >= 0 ? Math.max(0, Math.min(v - Math.floor(S.value / 2), l.options.length - S.value)) : 0;
938
+ u.value = v >= 0 ? Math.max(0, Math.min(v - Math.floor(B.value / 2), l.options.length - B.value)) : 0;
939
939
  }
940
940
  function Q() {
941
941
  r.value = !1, l.modelOpen !== void 0 && t("update:modelOpen", !1);
@@ -965,16 +965,16 @@ const Qo = ["title"], ea = ["innerHTML"], ta = {
965
965
  me !== void 0 && me !== r.value && (me ? ce() : Q());
966
966
  });
967
967
  function Ye(me) {
968
- r.value && (B.value = me.touches[0].clientY, F.value = !0);
968
+ r.value && (S.value = me.touches[0].clientY, A.value = !0);
969
969
  }
970
970
  function mt(me) {
971
- if (!r.value || !F.value)
971
+ if (!r.value || !A.value)
972
972
  return;
973
- const ge = me.touches[0].clientY - B.value;
974
- Math.abs(ge) > 5 && (Z(ge < 0 ? 1 : -1), B.value = me.touches[0].clientY);
973
+ const ge = me.touches[0].clientY - S.value;
974
+ Math.abs(ge) > 5 && (Z(ge < 0 ? 1 : -1), S.value = me.touches[0].clientY);
975
975
  }
976
976
  function ot() {
977
- F.value = !1;
977
+ A.value = !1;
978
978
  }
979
979
  function ut(me) {
980
980
  me.key === "Escape" && Q();
@@ -1044,7 +1044,7 @@ const Qo = ["title"], ea = ["innerHTML"], ta = {
1044
1044
  onTouchmove: mt,
1045
1045
  onTouchend: ot
1046
1046
  }, [
1047
- (z(!0), oe(St, null, Dt(ie.value, (a) => (z(), oe("button", {
1047
+ (z(!0), oe(St, null, Dt(ae.value, (a) => (z(), oe("button", {
1048
1048
  key: String(a.value),
1049
1049
  type: "button",
1050
1050
  class: it(["sp-dropdown__item", { "sp-dropdown__item--active": String(a.value) === String(e.modelValue) }]),
@@ -1224,27 +1224,27 @@ const Qo = ["title"], ea = ["innerHTML"], ta = {
1224
1224
  { key: "colorDarkCoffee", value: "#1F1800" },
1225
1225
  { key: "colorInkGreen", value: "#081C15" }
1226
1226
  ]
1227
- ], b = re(
1227
+ ], b = ie(
1228
1228
  () => t.colorKey === "fill" ? o : u
1229
1229
  );
1230
1230
  function s(L) {
1231
- return A(t.locale, L);
1231
+ return E(t.locale, L);
1232
1232
  }
1233
1233
  function k(L) {
1234
1234
  const Z = t.currentColor;
1235
1235
  return !Z && !L ? !0 : Z ? Z.toLowerCase() === L.toLowerCase() : !1;
1236
1236
  }
1237
- const B = H(!1), F = H(null), w = H(null), M = H({ top: 0 });
1237
+ const S = H(!1), A = H(null), w = H(null), M = H({ top: 0 });
1238
1238
  vt(() => t.modelOpen, (L) => {
1239
- L !== void 0 && L !== B.value && (L ? ie() : ue());
1239
+ L !== void 0 && L !== S.value && (L ? ae() : ue());
1240
1240
  });
1241
- function S(L) {
1242
- const Z = F.value, ce = w.value, Q = L.target;
1241
+ function B(L) {
1242
+ const Z = A.value, ce = w.value, Q = L.target;
1243
1243
  Z && Z.contains(Q) || ce && ce.contains(Q) || ue();
1244
1244
  }
1245
- function ie() {
1246
- B.value = !0, t.modelOpen !== void 0 && r("update:modelOpen", !0), Je(() => {
1247
- const L = t.triggerEl ?? F.value;
1245
+ function ae() {
1246
+ S.value = !0, t.modelOpen !== void 0 && r("update:modelOpen", !0), Je(() => {
1247
+ const L = t.triggerEl ?? A.value;
1248
1248
  if (L) {
1249
1249
  const Z = L.getBoundingClientRect(), ce = 150, Q = 120;
1250
1250
  let te = window.innerWidth - Z.right, ee = Z.bottom + 4, pe;
@@ -1256,26 +1256,26 @@ const Qo = ["title"], ea = ["innerHTML"], ta = {
1256
1256
  top: ee
1257
1257
  };
1258
1258
  }
1259
- document.addEventListener("pointerdown", S);
1259
+ document.addEventListener("pointerdown", B);
1260
1260
  });
1261
1261
  }
1262
1262
  function ue() {
1263
- B.value = !1, t.modelOpen !== void 0 && r("update:modelOpen", !1), document.removeEventListener("pointerdown", S);
1263
+ S.value = !1, t.modelOpen !== void 0 && r("update:modelOpen", !1), document.removeEventListener("pointerdown", B);
1264
1264
  }
1265
1265
  function m(L) {
1266
1266
  r("update:modelValue", L), r("change", L), ue();
1267
1267
  }
1268
1268
  return ll(() => {
1269
- document.removeEventListener("pointerdown", S);
1270
- }), n({ open: B, openMenu: ie, close: ue }), (L, Z) => (z(), oe("div", {
1269
+ document.removeEventListener("pointerdown", B);
1270
+ }), n({ open: S, openMenu: ae, close: ue }), (L, Z) => (z(), oe("div", {
1271
1271
  ref_key: "rootRef",
1272
- ref: F,
1272
+ ref: A,
1273
1273
  class: "color-picker"
1274
1274
  }, [
1275
1275
  (z(), Ue(Ge, { to: "body" }, [
1276
1276
  ft(Jt, { name: "menu-pop" }, {
1277
1277
  default: Qt(() => [
1278
- B.value ? (z(), oe("div", {
1278
+ S.value ? (z(), oe("div", {
1279
1279
  key: 0,
1280
1280
  ref_key: "menuRef",
1281
1281
  ref: w,
@@ -1361,42 +1361,42 @@ const Qo = ["title"], ea = ["innerHTML"], ta = {
1361
1361
  function k(L, Z) {
1362
1362
  return s[L].includes(Z) ? "thick" : b[L].includes(Z) ? "solid" : "dashed";
1363
1363
  }
1364
- const B = H(!1), F = H(null), w = H(null), M = H({ top: 0 });
1364
+ const S = H(!1), A = H(null), w = H(null), M = H({ top: 0 });
1365
1365
  vt(() => t.modelOpen, (L) => {
1366
- L !== void 0 && L !== B.value && (L ? ie() : ue());
1366
+ L !== void 0 && L !== S.value && (L ? ae() : ue());
1367
1367
  });
1368
- function S(L) {
1369
- const Z = F.value, ce = w.value, Q = L.target;
1368
+ function B(L) {
1369
+ const Z = A.value, ce = w.value, Q = L.target;
1370
1370
  Z && Z.contains(Q) || ce && ce.contains(Q) || ue();
1371
1371
  }
1372
- function ie() {
1373
- B.value = !0, t.modelOpen !== void 0 && r("update:modelOpen", !0), Je(() => {
1374
- const L = t.triggerEl ?? F.value;
1372
+ function ae() {
1373
+ S.value = !0, t.modelOpen !== void 0 && r("update:modelOpen", !0), Je(() => {
1374
+ const L = t.triggerEl ?? A.value;
1375
1375
  if (L) {
1376
1376
  const Z = L.getBoundingClientRect(), ce = 200, Q = 160;
1377
1377
  let te = window.innerWidth - Z.right, ee = Z.bottom + 4, pe;
1378
1378
  Z.left - Q < 4 && (te = void 0, pe = Math.max(4, Z.left)), ee + ce > window.innerHeight - 4 && (ee = Z.top - ce - 4), ee < 4 && (ee = 4), M.value = te !== void 0 ? { right: te, top: ee } : { left: pe, top: ee };
1379
1379
  }
1380
- document.addEventListener("pointerdown", S);
1380
+ document.addEventListener("pointerdown", B);
1381
1381
  });
1382
1382
  }
1383
1383
  function ue() {
1384
- B.value = !1, t.modelOpen !== void 0 && r("update:modelOpen", !1), document.removeEventListener("pointerdown", S);
1384
+ S.value = !1, t.modelOpen !== void 0 && r("update:modelOpen", !1), document.removeEventListener("pointerdown", B);
1385
1385
  }
1386
1386
  function m(L) {
1387
1387
  r("change", L), ue();
1388
1388
  }
1389
1389
  return ll(() => {
1390
- document.removeEventListener("pointerdown", S);
1391
- }), n({ open: B, openMenu: ie, close: ue }), (L, Z) => (z(), oe("div", {
1390
+ document.removeEventListener("pointerdown", B);
1391
+ }), n({ open: S, openMenu: ae, close: ue }), (L, Z) => (z(), oe("div", {
1392
1392
  ref_key: "rootRef",
1393
- ref: F,
1393
+ ref: A,
1394
1394
  class: "border-picker"
1395
1395
  }, [
1396
1396
  (z(), Ue(Ge, { to: "body" }, [
1397
1397
  ft(Jt, { name: "menu-pop" }, {
1398
1398
  default: Qt(() => [
1399
- B.value ? (z(), oe("div", {
1399
+ S.value ? (z(), oe("div", {
1400
1400
  key: 0,
1401
1401
  ref_key: "menuRef",
1402
1402
  ref: w,
@@ -1408,7 +1408,7 @@ const Qo = ["title"], ea = ["innerHTML"], ta = {
1408
1408
  (z(), oe(St, null, Dt(u, (ce) => d("button", {
1409
1409
  key: ce.key,
1410
1410
  class: "border-picker__item",
1411
- title: j(A)(e.locale, ce.i18nKey),
1411
+ title: j(E)(e.locale, ce.i18nKey),
1412
1412
  onClick: (Q) => m(ce.key)
1413
1413
  }, [
1414
1414
  (z(), oe("svg", da, [
@@ -1424,7 +1424,7 @@ const Qo = ["title"], ea = ["innerHTML"], ta = {
1424
1424
  "stroke-linecap": k(ce.key, Q.name) === "dashed" ? "round" : "square"
1425
1425
  }, null, 8, fa)), 64))
1426
1426
  ])),
1427
- d("span", va, He(j(A)(e.locale, ce.i18nKey)), 1)
1427
+ d("span", va, He(j(E)(e.locale, ce.i18nKey)), 1)
1428
1428
  ], 8, sa)), 64))
1429
1429
  ], 36)) : nt("", !0)
1430
1430
  ]),
@@ -1444,32 +1444,32 @@ const Qo = ["title"], ea = ["innerHTML"], ta = {
1444
1444
  setup(e, { expose: n, emit: l }) {
1445
1445
  const t = e, r = l, u = H(!1), o = H(null), b = H(null), s = H({ top: 0 });
1446
1446
  vt(() => t.modelOpen, (M) => {
1447
- M !== void 0 && M !== u.value && (M ? B() : F());
1447
+ M !== void 0 && M !== u.value && (M ? S() : A());
1448
1448
  });
1449
1449
  function k(M) {
1450
- const S = o.value, ie = b.value, ue = M.target;
1451
- S && S.contains(ue) || ie && ie.contains(ue) || F();
1450
+ const B = o.value, ae = b.value, ue = M.target;
1451
+ B && B.contains(ue) || ae && ae.contains(ue) || A();
1452
1452
  }
1453
- function B() {
1453
+ function S() {
1454
1454
  u.value = !0, t.modelOpen !== void 0 && r("update:modelOpen", !0), Je(() => {
1455
1455
  const M = t.triggerEl ?? o.value;
1456
1456
  if (M) {
1457
- const S = M.getBoundingClientRect(), ie = Mn.length * 30 + 12, ue = 160;
1458
- let m = window.innerWidth - S.right, L = S.bottom + 4, Z;
1459
- S.left - ue < 4 && (m = void 0, Z = Math.max(4, S.left)), L + ie > window.innerHeight - 4 && (L = S.top - ie - 4), L < 4 && (L = 4), s.value = m !== void 0 ? { right: m, top: L } : { left: Z, top: L };
1457
+ const B = M.getBoundingClientRect(), ae = Mn.length * 30 + 12, ue = 160;
1458
+ let m = window.innerWidth - B.right, L = B.bottom + 4, Z;
1459
+ B.left - ue < 4 && (m = void 0, Z = Math.max(4, B.left)), L + ae > window.innerHeight - 4 && (L = B.top - ae - 4), L < 4 && (L = 4), s.value = m !== void 0 ? { right: m, top: L } : { left: Z, top: L };
1460
1460
  }
1461
1461
  document.addEventListener("pointerdown", k);
1462
1462
  });
1463
1463
  }
1464
- function F() {
1464
+ function A() {
1465
1465
  u.value = !1, t.modelOpen !== void 0 && r("update:modelOpen", !1), document.removeEventListener("pointerdown", k);
1466
1466
  }
1467
1467
  function w(M) {
1468
- r("change", M), F();
1468
+ r("change", M), A();
1469
1469
  }
1470
1470
  return ll(() => {
1471
1471
  document.removeEventListener("pointerdown", k);
1472
- }), n({ open: u, openMenu: B, close: F }), (M, S) => (z(), oe("div", {
1472
+ }), n({ open: u, openMenu: S, close: A }), (M, B) => (z(), oe("div", {
1473
1473
  ref_key: "rootRef",
1474
1474
  ref: o,
1475
1475
  class: "merge-picker"
@@ -1487,20 +1487,20 @@ const Qo = ["title"], ea = ["innerHTML"], ta = {
1487
1487
  right: s.value.right !== void 0 ? s.value.right + "px" : void 0,
1488
1488
  top: s.value.top + "px"
1489
1489
  }),
1490
- onMousedown: S[0] || (S[0] = lt(() => {
1490
+ onMousedown: B[0] || (B[0] = lt(() => {
1491
1491
  }, ["stop"]))
1492
1492
  }, [
1493
- (z(!0), oe(St, null, Dt(j(Mn), (ie) => (z(), oe("button", {
1494
- key: ie.key,
1493
+ (z(!0), oe(St, null, Dt(j(Mn), (ae) => (z(), oe("button", {
1494
+ key: ae.key,
1495
1495
  class: "merge-picker__item",
1496
- title: j(A)(e.locale, ie.labelKey),
1497
- onClick: (ue) => w(ie.key)
1496
+ title: j(E)(e.locale, ae.labelKey),
1497
+ onClick: (ue) => w(ae.key)
1498
1498
  }, [
1499
1499
  d("span", {
1500
1500
  class: "merge-picker__icon",
1501
- innerHTML: ie.icon
1501
+ innerHTML: ae.icon
1502
1502
  }, null, 8, ha),
1503
- d("span", ba, He(j(A)(e.locale, ie.labelKey)), 1)
1503
+ d("span", ba, He(j(E)(e.locale, ae.labelKey)), 1)
1504
1504
  ], 8, pa))), 128))
1505
1505
  ], 36)) : nt("", !0)
1506
1506
  ]),
@@ -1524,33 +1524,33 @@ const Qo = ["title"], ea = ["innerHTML"], ta = {
1524
1524
  { key: "avg", labelKey: "avg" },
1525
1525
  { key: "count", labelKey: "count" }
1526
1526
  ], o = H(!1), b = H(null), s = H(null), k = H({ top: 0 });
1527
- vt(() => t.modelOpen, (S) => {
1528
- S !== void 0 && S !== o.value && (S ? F() : w());
1527
+ vt(() => t.modelOpen, (B) => {
1528
+ B !== void 0 && B !== o.value && (B ? A() : w());
1529
1529
  });
1530
- function B(S) {
1531
- const ie = b.value, ue = s.value, m = S.target;
1532
- ie && ie.contains(m) || ue && ue.contains(m) || w();
1530
+ function S(B) {
1531
+ const ae = b.value, ue = s.value, m = B.target;
1532
+ ae && ae.contains(m) || ue && ue.contains(m) || w();
1533
1533
  }
1534
- function F() {
1534
+ function A() {
1535
1535
  o.value = !0, t.modelOpen !== void 0 && r("update:modelOpen", !0), Je(() => {
1536
- const S = t.triggerEl ?? b.value;
1537
- if (S) {
1538
- const ie = S.getBoundingClientRect(), ue = u.length * 30 + 12, m = 160;
1539
- let L = window.innerWidth - ie.right, Z = ie.bottom + 4, ce;
1540
- ie.left - m < 4 && (L = void 0, ce = Math.max(4, ie.left)), Z + ue > window.innerHeight - 4 && (Z = ie.top - ue - 4), Z < 4 && (Z = 4), k.value = L !== void 0 ? { right: L, top: Z } : { left: ce, top: Z };
1536
+ const B = t.triggerEl ?? b.value;
1537
+ if (B) {
1538
+ const ae = B.getBoundingClientRect(), ue = u.length * 30 + 12, m = 160;
1539
+ let L = window.innerWidth - ae.right, Z = ae.bottom + 4, ce;
1540
+ ae.left - m < 4 && (L = void 0, ce = Math.max(4, ae.left)), Z + ue > window.innerHeight - 4 && (Z = ae.top - ue - 4), Z < 4 && (Z = 4), k.value = L !== void 0 ? { right: L, top: Z } : { left: ce, top: Z };
1541
1541
  }
1542
- document.addEventListener("pointerdown", B);
1542
+ document.addEventListener("pointerdown", S);
1543
1543
  });
1544
1544
  }
1545
1545
  function w() {
1546
- o.value = !1, t.modelOpen !== void 0 && r("update:modelOpen", !1), document.removeEventListener("pointerdown", B);
1546
+ o.value = !1, t.modelOpen !== void 0 && r("update:modelOpen", !1), document.removeEventListener("pointerdown", S);
1547
1547
  }
1548
- function M(S) {
1549
- t.disabled || (r("change", S), w());
1548
+ function M(B) {
1549
+ t.disabled || (r("change", B), w());
1550
1550
  }
1551
1551
  return ll(() => {
1552
- document.removeEventListener("pointerdown", B);
1553
- }), n({ open: o, openMenu: F, close: w }), (S, ie) => (z(), oe("div", {
1552
+ document.removeEventListener("pointerdown", S);
1553
+ }), n({ open: o, openMenu: A, close: w }), (B, ae) => (z(), oe("div", {
1554
1554
  ref_key: "rootRef",
1555
1555
  ref: b,
1556
1556
  class: "calc-picker"
@@ -1568,17 +1568,17 @@ const Qo = ["title"], ea = ["innerHTML"], ta = {
1568
1568
  right: k.value.right !== void 0 ? k.value.right + "px" : void 0,
1569
1569
  top: k.value.top + "px"
1570
1570
  }),
1571
- onMousedown: ie[0] || (ie[0] = lt(() => {
1571
+ onMousedown: ae[0] || (ae[0] = lt(() => {
1572
1572
  }, ["stop"]))
1573
1573
  }, [
1574
1574
  (z(), oe(St, null, Dt(u, (ue) => d("button", {
1575
1575
  key: ue.key,
1576
1576
  class: it(["calc-picker__item", { "calc-picker__item--disabled": e.disabled }]),
1577
1577
  disabled: e.disabled,
1578
- title: j(A)(e.locale, ue.labelKey),
1578
+ title: j(E)(e.locale, ue.labelKey),
1579
1579
  onClick: (m) => M(ue.key)
1580
1580
  }, [
1581
- d("span", ka, He(j(A)(e.locale, ue.labelKey)), 1)
1581
+ d("span", ka, He(j(E)(e.locale, ue.labelKey)), 1)
1582
1582
  ], 10, wa)), 64))
1583
1583
  ], 36)) : nt("", !0)
1584
1584
  ]),
@@ -1695,7 +1695,7 @@ const Qo = ["title"], ea = ["innerHTML"], ta = {
1695
1695
  selNumberFormat: {},
1696
1696
  nfOptions: {}
1697
1697
  },
1698
- emits: ["undo", "redo", "paint-format", "clear-format", "font-size-blur", "font-size-toggle", "font-size-step-up", "font-size-step-down", "bold-toggle", "italic-toggle", "underline-toggle", "strikethrough-toggle", "apply-text-color", "apply-fill-color", "apply-border", "wrap-toggle", "apply-merge", "calc-sum", "calc-avg", "calc-count", "font-family-change", "font-size-change", "h-align-change", "v-align-change", "font-size-input", "text-color-change", "fill-color-change", "number-format-change", "font-size-keydown", "find", "update:font-size-menu-open", "update:text-color-menu-open", "update:fill-color-menu-open", "update:border-menu-open", "update:merge-menu-open", "update:calc-menu-open", "border-change", "merge-change"],
1698
+ emits: ["undo", "redo", "paint-format", "clear-format", "font-size-blur", "font-size-toggle", "font-size-step-up", "font-size-step-down", "bold-toggle", "italic-toggle", "underline-toggle", "strikethrough-toggle", "apply-text-color", "apply-fill-color", "apply-border", "wrap-toggle", "apply-merge", "calc-sum", "calc-avg", "calc-count", "find", "font-family-change", "font-size-change", "h-align-change", "v-align-change", "font-size-input", "text-color-change", "fill-color-change", "number-format-change", "font-size-keydown", "update:font-size-menu-open", "update:text-color-menu-open", "update:fill-color-menu-open", "update:border-menu-open", "update:merge-menu-open", "update:calc-menu-open", "border-change", "merge-change"],
1699
1699
  setup(e, { emit: n }) {
1700
1700
  const l = [
1701
1701
  { name: "top", x1: 4, y1: 4, x2: 26, y2: 4 },
@@ -1753,11 +1753,11 @@ const Qo = ["title"], ea = ["innerHTML"], ta = {
1753
1753
  "sep7",
1754
1754
  "calc",
1755
1755
  "find"
1756
- ], b = H(null), s = H(null), k = H(null), B = H(null), F = H(null), w = H(null), M = H(null), S = H(null), ie = H(null), ue = H(/* @__PURE__ */ new Set()), m = H(!1), L = H(!1), Z = H(0), ce = /* @__PURE__ */ new Map(), Q = re(() => ue.value.size > 0);
1756
+ ], b = H(null), s = H(null), k = H(null), S = H(null), A = H(null), w = H(null), M = H(null), B = H(null), ae = H(null), ue = H(/* @__PURE__ */ new Set()), m = H(!1), L = H(!1), Z = H(0), ce = /* @__PURE__ */ new Map(), Q = ie(() => ue.value.size > 0);
1757
1757
  function te(R) {
1758
1758
  return ue.value.has(R);
1759
1759
  }
1760
- const ee = re(() => {
1760
+ const ee = ie(() => {
1761
1761
  const R = s.value;
1762
1762
  return R instanceof HTMLElement ? R : void 0;
1763
1763
  });
@@ -1824,7 +1824,7 @@ const Qo = ["title"], ea = ["innerHTML"], ta = {
1824
1824
  mt(C, ue.value) || (ue.value = C, Z.value++, C.size === 0 && (m.value = !1));
1825
1825
  }
1826
1826
  let $e = null;
1827
- const se = H(0), a = re(() => {
1827
+ const se = H(0), a = ie(() => {
1828
1828
  const R = k.value, c = { position: "fixed", top: "0px", right: "0px" };
1829
1829
  if (!R)
1830
1830
  return { ...T.themeVars, ...c };
@@ -1862,8 +1862,8 @@ const Qo = ["title"], ea = ["innerHTML"], ta = {
1862
1862
  }), ll(() => {
1863
1863
  ot && cancelAnimationFrame(ot), $e == null || $e.disconnect(), document.removeEventListener("pointerdown", he, !0), window.removeEventListener("resize", v), window.removeEventListener("load", me), window.removeEventListener("orientationchange", me);
1864
1864
  });
1865
- const T = e, y = n, U = re(
1866
- () => T.selNumberFormat === Pl ? A(T.locale, "nfMixed") : ""
1865
+ const T = e, y = n, U = ie(
1866
+ () => T.selNumberFormat === Pl ? E(T.locale, "nfMixed") : ""
1867
1867
  );
1868
1868
  return (R, c) => (z(), oe(St, null, [
1869
1869
  d("div", {
@@ -1878,7 +1878,7 @@ const Qo = ["title"], ea = ["innerHTML"], ta = {
1878
1878
  d("div", Ma, [
1879
1879
  d("button", {
1880
1880
  class: it(["toolbar-btn", { "toolbar-btn--disabled": !e.canUndo }]),
1881
- title: j(A)(e.locale, "undo"),
1881
+ title: j(E)(e.locale, "undo"),
1882
1882
  disabled: !e.canUndo,
1883
1883
  onClick: c[0] || (c[0] = (C) => y("undo"))
1884
1884
  }, [...c[44] || (c[44] = [
@@ -1899,7 +1899,7 @@ const Qo = ["title"], ea = ["innerHTML"], ta = {
1899
1899
  d("div", Ba, [
1900
1900
  d("button", {
1901
1901
  class: it(["toolbar-btn", { "toolbar-btn--disabled": !e.canRedo }]),
1902
- title: j(A)(e.locale, "redo"),
1902
+ title: j(E)(e.locale, "redo"),
1903
1903
  disabled: !e.canRedo,
1904
1904
  onClick: c[1] || (c[1] = (C) => y("redo"))
1905
1905
  }, [...c[45] || (c[45] = [
@@ -1923,7 +1923,7 @@ const Qo = ["title"], ea = ["innerHTML"], ta = {
1923
1923
  d("div", Da, [
1924
1924
  d("button", {
1925
1925
  class: it(["toolbar-btn", { "toolbar-btn--active": e.paintFmtActive }]),
1926
- title: j(A)(e.locale, "paintFormat"),
1926
+ title: j(E)(e.locale, "paintFormat"),
1927
1927
  disabled: !e.hasSelection,
1928
1928
  onClick: c[2] || (c[2] = (C) => y("paint-format"))
1929
1929
  }, [...c[46] || (c[46] = [
@@ -1944,7 +1944,7 @@ const Qo = ["title"], ea = ["innerHTML"], ta = {
1944
1944
  d("div", Ea, [
1945
1945
  d("button", {
1946
1946
  class: it(["toolbar-btn", { "toolbar-btn--disabled": !e.hasSelection }]),
1947
- title: j(A)(e.locale, "clearFormat"),
1947
+ title: j(E)(e.locale, "clearFormat"),
1948
1948
  disabled: !e.hasSelection,
1949
1949
  onClick: c[3] || (c[3] = (C) => y("clear-format"))
1950
1950
  }, [...c[47] || (c[47] = [
@@ -1981,7 +1981,7 @@ const Qo = ["title"], ea = ["innerHTML"], ta = {
1981
1981
  width: te("font") ? "100%" : 110,
1982
1982
  "menu-width": te("font") ? 120 : void 0,
1983
1983
  "visible-count": 8,
1984
- title: j(A)(e.locale, "fontFamily"),
1984
+ title: j(E)(e.locale, "fontFamily"),
1985
1985
  align: "right",
1986
1986
  onChange: c[4] || (c[4] = (C) => y("font-family-change", C))
1987
1987
  }, null, 8, ["model-value", "options", "width", "menu-width", "title"])
@@ -2000,7 +2000,7 @@ const Qo = ["title"], ea = ["innerHTML"], ta = {
2000
2000
  max: "72",
2001
2001
  step: "1",
2002
2002
  value: e.fontSizeInput,
2003
- title: j(A)(e.locale, "fontSize"),
2003
+ title: j(E)(e.locale, "fontSize"),
2004
2004
  onInput: c[5] || (c[5] = (C) => y("font-size-input", C.target.value)),
2005
2005
  onBlur: c[6] || (c[6] = (C) => y("font-size-blur")),
2006
2006
  onKeydown: c[7] || (c[7] = (C) => y("font-size-keydown", C))
@@ -2012,20 +2012,20 @@ const Qo = ["title"], ea = ["innerHTML"], ta = {
2012
2012
  width: te("fontSize") ? "100%" : 56,
2013
2013
  "menu-width": te("fontSize") ? 120 : 56,
2014
2014
  "visible-count": 9,
2015
- title: j(A)(e.locale, "fontSize"),
2015
+ title: j(E)(e.locale, "fontSize"),
2016
2016
  "hide-trigger": !0,
2017
2017
  "model-open": e.fontSizeMenuOpen,
2018
2018
  align: "right",
2019
- "trigger-el": ie.value,
2019
+ "trigger-el": ae.value,
2020
2020
  "onUpdate:modelOpen": c[8] || (c[8] = (C) => y("update:font-size-menu-open", C)),
2021
2021
  onChange: c[9] || (c[9] = (C) => y("font-size-change", C))
2022
2022
  }, null, 8, ["model-value", "options", "width", "menu-width", "title", "model-open", "trigger-el"]),
2023
2023
  d("button", {
2024
2024
  ref_key: "fontSizeArrowRef",
2025
- ref: ie,
2025
+ ref: ae,
2026
2026
  class: "toolbar-font-size__btn",
2027
2027
  type: "button",
2028
- title: j(A)(e.locale, "fontSize"),
2028
+ title: j(E)(e.locale, "fontSize"),
2029
2029
  onMousedown: c[10] || (c[10] = lt(() => {
2030
2030
  }, ["prevent"])),
2031
2031
  onClick: c[11] || (c[11] = (C) => y("font-size-toggle"))
@@ -2040,7 +2040,7 @@ const Qo = ["title"], ea = ["innerHTML"], ta = {
2040
2040
  d("button", {
2041
2041
  class: "toolbar-btn toolbar-btn--step",
2042
2042
  type: "button",
2043
- title: j(A)(e.locale, "fontSizeDecrease"),
2043
+ title: j(E)(e.locale, "fontSizeDecrease"),
2044
2044
  disabled: !e.hasSelection,
2045
2045
  onMousedown: c[12] || (c[12] = lt(() => {
2046
2046
  }, ["prevent"])),
@@ -2056,7 +2056,7 @@ const Qo = ["title"], ea = ["innerHTML"], ta = {
2056
2056
  d("button", {
2057
2057
  class: "toolbar-btn toolbar-btn--step",
2058
2058
  type: "button",
2059
- title: j(A)(e.locale, "fontSizeIncrease"),
2059
+ title: j(E)(e.locale, "fontSizeIncrease"),
2060
2060
  disabled: !e.hasSelection,
2061
2061
  onMousedown: c[14] || (c[14] = lt(() => {
2062
2062
  }, ["prevent"])),
@@ -2090,7 +2090,7 @@ const Qo = ["title"], ea = ["innerHTML"], ta = {
2090
2090
  d("div", Wa, [
2091
2091
  d("button", {
2092
2092
  class: it(["toolbar-btn", { "toolbar-btn--active": e.selFontWeight }]),
2093
- title: j(A)(e.locale, "bold"),
2093
+ title: j(E)(e.locale, "bold"),
2094
2094
  disabled: !e.hasSelection,
2095
2095
  onClick: c[16] || (c[16] = (C) => y("bold-toggle"))
2096
2096
  }, [...c[53] || (c[53] = [
@@ -2112,7 +2112,7 @@ const Qo = ["title"], ea = ["innerHTML"], ta = {
2112
2112
  d("div", Va, [
2113
2113
  d("button", {
2114
2114
  class: it(["toolbar-btn", { "toolbar-btn--active": e.selFontStyle }]),
2115
- title: j(A)(e.locale, "italic"),
2115
+ title: j(E)(e.locale, "italic"),
2116
2116
  disabled: !e.hasSelection,
2117
2117
  onClick: c[17] || (c[17] = (C) => y("italic-toggle"))
2118
2118
  }, [...c[54] || (c[54] = [
@@ -2134,7 +2134,7 @@ const Qo = ["title"], ea = ["innerHTML"], ta = {
2134
2134
  d("div", Ua, [
2135
2135
  d("button", {
2136
2136
  class: it(["toolbar-btn", { "toolbar-btn--active": e.selUnderline }]),
2137
- title: j(A)(e.locale, "underline"),
2137
+ title: j(E)(e.locale, "underline"),
2138
2138
  disabled: !e.hasSelection,
2139
2139
  onClick: c[18] || (c[18] = (C) => y("underline-toggle"))
2140
2140
  }, [...c[55] || (c[55] = [
@@ -2156,7 +2156,7 @@ const Qo = ["title"], ea = ["innerHTML"], ta = {
2156
2156
  d("div", Ya, [
2157
2157
  d("button", {
2158
2158
  class: it(["toolbar-btn", { "toolbar-btn--active": e.selStrikethrough }]),
2159
- title: j(A)(e.locale, "strikethrough"),
2159
+ title: j(E)(e.locale, "strikethrough"),
2160
2160
  disabled: !e.hasSelection,
2161
2161
  onClick: c[19] || (c[19] = (C) => y("strikethrough-toggle"))
2162
2162
  }, [...c[56] || (c[56] = [
@@ -2190,7 +2190,7 @@ const Qo = ["title"], ea = ["innerHTML"], ta = {
2190
2190
  d("div", ja, [
2191
2191
  d("button", {
2192
2192
  class: "toolbar-btn toolbar-split__main",
2193
- title: j(A)(e.locale, "fontColor"),
2193
+ title: j(E)(e.locale, "fontColor"),
2194
2194
  disabled: !e.hasSelection,
2195
2195
  onClick: c[20] || (c[20] = (C) => y("apply-text-color"))
2196
2196
  }, [
@@ -2206,9 +2206,9 @@ const Qo = ["title"], ea = ["innerHTML"], ta = {
2206
2206
  ], 8, Za),
2207
2207
  d("button", {
2208
2208
  ref_key: "textColorArrowRef",
2209
- ref: B,
2209
+ ref: S,
2210
2210
  class: "toolbar-btn toolbar-split__arrow",
2211
- title: j(A)(e.locale, "fontColor"),
2211
+ title: j(E)(e.locale, "fontColor"),
2212
2212
  disabled: !e.hasSelection,
2213
2213
  onClick: c[21] || (c[21] = (C) => y("update:text-color-menu-open", !e.textColorMenuOpen))
2214
2214
  }, [...c[59] || (c[59] = [
@@ -2224,7 +2224,7 @@ const Qo = ["title"], ea = ["innerHTML"], ta = {
2224
2224
  "color-key": "text",
2225
2225
  "current-color": e.selTextColor,
2226
2226
  locale: e.locale,
2227
- "trigger-el": B.value,
2227
+ "trigger-el": S.value,
2228
2228
  "onUpdate:modelOpen": c[22] || (c[22] = (C) => y("update:text-color-menu-open", C)),
2229
2229
  onChange: c[23] || (c[23] = (C) => y("text-color-change", C))
2230
2230
  }, null, 8, ["model-open", "current-color", "locale", "trigger-el"])
@@ -2239,7 +2239,7 @@ const Qo = ["title"], ea = ["innerHTML"], ta = {
2239
2239
  d("div", tr, [
2240
2240
  d("button", {
2241
2241
  class: "toolbar-btn toolbar-split__main",
2242
- title: j(A)(e.locale, "fillColor"),
2242
+ title: j(E)(e.locale, "fillColor"),
2243
2243
  disabled: !e.hasSelection,
2244
2244
  onClick: c[24] || (c[24] = (C) => y("apply-fill-color"))
2245
2245
  }, [
@@ -2253,9 +2253,9 @@ const Qo = ["title"], ea = ["innerHTML"], ta = {
2253
2253
  ], 8, lr),
2254
2254
  d("button", {
2255
2255
  ref_key: "fillColorArrowRef",
2256
- ref: F,
2256
+ ref: A,
2257
2257
  class: "toolbar-btn toolbar-split__arrow",
2258
- title: j(A)(e.locale, "fillColor"),
2258
+ title: j(E)(e.locale, "fillColor"),
2259
2259
  disabled: !e.hasSelection,
2260
2260
  onClick: c[25] || (c[25] = (C) => y("update:fill-color-menu-open", !e.fillColorMenuOpen))
2261
2261
  }, [...c[61] || (c[61] = [
@@ -2271,7 +2271,7 @@ const Qo = ["title"], ea = ["innerHTML"], ta = {
2271
2271
  "color-key": "fill",
2272
2272
  "current-color": e.selFillColor,
2273
2273
  locale: e.locale,
2274
- "trigger-el": F.value,
2274
+ "trigger-el": A.value,
2275
2275
  "onUpdate:modelOpen": c[26] || (c[26] = (C) => y("update:fill-color-menu-open", C)),
2276
2276
  onChange: c[27] || (c[27] = (C) => y("fill-color-change", C))
2277
2277
  }, null, 8, ["model-open", "current-color", "locale", "trigger-el"])
@@ -2286,7 +2286,7 @@ const Qo = ["title"], ea = ["innerHTML"], ta = {
2286
2286
  d("div", ir, [
2287
2287
  d("button", {
2288
2288
  class: "toolbar-btn toolbar-split__main",
2289
- title: j(A)(e.locale, "borders"),
2289
+ title: j(E)(e.locale, "borders"),
2290
2290
  disabled: !e.hasSelection,
2291
2291
  onClick: c[28] || (c[28] = (C) => y("apply-border"))
2292
2292
  }, [
@@ -2307,7 +2307,7 @@ const Qo = ["title"], ea = ["innerHTML"], ta = {
2307
2307
  ref_key: "borderArrowRef",
2308
2308
  ref: w,
2309
2309
  class: "toolbar-btn toolbar-split__arrow",
2310
- title: j(A)(e.locale, "borders"),
2310
+ title: j(E)(e.locale, "borders"),
2311
2311
  disabled: !e.hasSelection,
2312
2312
  onClick: c[29] || (c[29] = (C) => y("update:border-menu-open", !e.borderMenuOpen))
2313
2313
  }, [...c[62] || (c[62] = [
@@ -2353,7 +2353,7 @@ const Qo = ["title"], ea = ["innerHTML"], ta = {
2353
2353
  "menu-width": te("hAlign") ? 120 : void 0,
2354
2354
  "visible-count": 3,
2355
2355
  align: "right",
2356
- title: j(A)(e.locale, "hAlign"),
2356
+ title: j(E)(e.locale, "hAlign"),
2357
2357
  onChange: c[32] || (c[32] = (C) => y("h-align-change", C))
2358
2358
  }, null, 8, ["model-value", "options", "width", "menu-width", "title"])
2359
2359
  ])
@@ -2371,7 +2371,7 @@ const Qo = ["title"], ea = ["innerHTML"], ta = {
2371
2371
  "menu-width": te("vAlign") ? 120 : void 0,
2372
2372
  "visible-count": 3,
2373
2373
  align: "right",
2374
- title: j(A)(e.locale, "vAlign"),
2374
+ title: j(E)(e.locale, "vAlign"),
2375
2375
  onChange: c[33] || (c[33] = (C) => y("v-align-change", C))
2376
2376
  }, null, 8, ["model-value", "options", "width", "menu-width", "title"])
2377
2377
  ]),
@@ -2379,7 +2379,7 @@ const Qo = ["title"], ea = ["innerHTML"], ta = {
2379
2379
  d("button", {
2380
2380
  class: it(["toolbar-btn", { "toolbar-btn--active": e.selWrap }]),
2381
2381
  type: "button",
2382
- title: j(A)(e.locale, "wrap"),
2382
+ title: j(E)(e.locale, "wrap"),
2383
2383
  onClick: c[34] || (c[34] = (C) => y("wrap-toggle"))
2384
2384
  }, [...c[64] || (c[64] = [
2385
2385
  d("svg", {
@@ -2399,7 +2399,7 @@ const Qo = ["title"], ea = ["innerHTML"], ta = {
2399
2399
  d("div", hr, [
2400
2400
  d("button", {
2401
2401
  class: "toolbar-btn toolbar-split__main",
2402
- title: j(A)(e.locale, "mergeCenter"),
2402
+ title: j(E)(e.locale, "mergeCenter"),
2403
2403
  disabled: !e.hasSelection,
2404
2404
  onClick: c[35] || (c[35] = (C) => y("apply-merge"))
2405
2405
  }, [...c[65] || (c[65] = [
@@ -2414,7 +2414,7 @@ const Qo = ["title"], ea = ["innerHTML"], ta = {
2414
2414
  ref_key: "mergeArrowRef",
2415
2415
  ref: M,
2416
2416
  class: "toolbar-btn toolbar-split__arrow",
2417
- title: j(A)(e.locale, "mergeCells"),
2417
+ title: j(E)(e.locale, "mergeCells"),
2418
2418
  disabled: !e.hasSelection,
2419
2419
  onClick: c[36] || (c[36] = (C) => y("update:merge-menu-open", !e.mergeMenuOpen))
2420
2420
  }, [...c[66] || (c[66] = [
@@ -2458,7 +2458,7 @@ const Qo = ["title"], ea = ["innerHTML"], ta = {
2458
2458
  width: te("numFmt") ? "100%" : 92,
2459
2459
  "menu-width": (te("numFmt"), 150),
2460
2460
  "visible-count": 8,
2461
- title: j(A)(e.locale, "numberFormat"),
2461
+ title: j(E)(e.locale, "numberFormat"),
2462
2462
  "fallback-label": U.value,
2463
2463
  align: "right",
2464
2464
  onChange: c[39] || (c[39] = (C) => y("number-format-change", String(C)))
@@ -2484,7 +2484,7 @@ const Qo = ["title"], ea = ["innerHTML"], ta = {
2484
2484
  d("div", kr, [
2485
2485
  d("button", {
2486
2486
  class: "toolbar-btn toolbar-split__main",
2487
- title: j(A)(e.locale, "sum"),
2487
+ title: j(E)(e.locale, "sum"),
2488
2488
  disabled: !e.hasSelection || e.isSingleCell,
2489
2489
  onClick: c[40] || (c[40] = (C) => y("calc-sum"))
2490
2490
  }, [...c[69] || (c[69] = [
@@ -2497,9 +2497,9 @@ const Qo = ["title"], ea = ["innerHTML"], ta = {
2497
2497
  ])], 8, Rr),
2498
2498
  d("button", {
2499
2499
  ref_key: "calcArrowRef",
2500
- ref: S,
2500
+ ref: B,
2501
2501
  class: "toolbar-btn toolbar-split__arrow",
2502
- title: j(A)(e.locale, "calculate"),
2502
+ title: j(E)(e.locale, "calculate"),
2503
2503
  disabled: !e.hasSelection,
2504
2504
  onClick: c[41] || (c[41] = (C) => y("update:calc-menu-open", !e.calcMenuOpen))
2505
2505
  }, [...c[70] || (c[70] = [
@@ -2513,7 +2513,7 @@ const Qo = ["title"], ea = ["innerHTML"], ta = {
2513
2513
  ft(xa, {
2514
2514
  "model-open": e.calcMenuOpen,
2515
2515
  locale: e.locale,
2516
- "trigger-el": S.value,
2516
+ "trigger-el": B.value,
2517
2517
  disabled: e.isSingleCell,
2518
2518
  "onUpdate:modelOpen": c[42] || (c[42] = (C) => y("update:calc-menu-open", C)),
2519
2519
  onChange: c[43] || (c[43] = (C) => y(`calc-${C}`))
@@ -2528,7 +2528,7 @@ const Qo = ["title"], ea = ["innerHTML"], ta = {
2528
2528
  d("div", Mr, [
2529
2529
  d("button", {
2530
2530
  class: "toolbar-btn",
2531
- title: j(A)(e.locale, "find"),
2531
+ title: j(E)(e.locale, "find"),
2532
2532
  onClick: f
2533
2533
  }, [...c[71] || (c[71] = [
2534
2534
  d("svg", {
@@ -2589,7 +2589,7 @@ const Qo = ["title"], ea = ["innerHTML"], ta = {
2589
2589
  ]))
2590
2590
  ], 64));
2591
2591
  }
2592
- }), Fr = /* @__PURE__ */ Pt(Dr, [["__scopeId", "data-v-a54ebf3e"]]), Er = { class: "tab-list" }, Ar = ["onClick", "onDblclick", "onContextmenu"], Or = ["value"], Lr = {
2592
+ }), Fr = /* @__PURE__ */ Pt(Dr, [["__scopeId", "data-v-33051316"]]), Er = { class: "tab-list" }, Ar = ["onClick", "onDblclick", "onContextmenu"], Or = ["value"], Lr = {
2593
2593
  key: 1,
2594
2594
  class: "tab-item__name"
2595
2595
  }, $r = ["title"], Ir = /* @__PURE__ */ Vt({
@@ -2630,7 +2630,7 @@ const Qo = ["title"], ea = ["innerHTML"], ta = {
2630
2630
  ]),
2631
2631
  d("button", {
2632
2632
  class: "tab-bar__add-btn",
2633
- title: j(A)(e.locale, "addSheet"),
2633
+ title: j(E)(e.locale, "addSheet"),
2634
2634
  onClick: r[4] || (r[4] = (u) => l("add-sheet"))
2635
2635
  }, " + ", 8, $r)
2636
2636
  ], 32));
@@ -2653,7 +2653,7 @@ const Qo = ["title"], ea = ["innerHTML"], ta = {
2653
2653
  },
2654
2654
  emits: ["update:findText", "update:replaceText", "update:scope", "update:matchCase", "update:matchEntireCell", "prev", "next", "replace", "replace-all", "close"],
2655
2655
  setup(e, { emit: n }) {
2656
- const l = e, t = n, r = H(null), u = re(() => l.total > 0 ? `${l.currentIndex + 1}/${l.total}` : l.message || "");
2656
+ const l = e, t = n, r = H(null), u = ie(() => l.total > 0 ? `${l.currentIndex + 1}/${l.total}` : l.message || "");
2657
2657
  vt(
2658
2658
  () => l.focusToken,
2659
2659
  () => {
@@ -2678,50 +2678,50 @@ const Qo = ["title"], ea = ["innerHTML"], ta = {
2678
2678
  ref_key: "findInputRef",
2679
2679
  ref: r,
2680
2680
  class: "find-bar__input",
2681
- placeholder: j(A)(e.locale, "findPlaceholder"),
2681
+ placeholder: j(E)(e.locale, "findPlaceholder"),
2682
2682
  value: e.findText,
2683
- onInput: k[0] || (k[0] = (B) => t("update:findText", B.target.value)),
2683
+ onInput: k[0] || (k[0] = (S) => t("update:findText", S.target.value)),
2684
2684
  onKeydown: o
2685
2685
  }, null, 40, Nr),
2686
2686
  d("input", {
2687
2687
  class: "find-bar__input",
2688
- placeholder: j(A)(e.locale, "replacePlaceholder"),
2688
+ placeholder: j(E)(e.locale, "replacePlaceholder"),
2689
2689
  value: e.replaceText,
2690
- onInput: k[1] || (k[1] = (B) => t("update:replaceText", B.target.value)),
2690
+ onInput: k[1] || (k[1] = (S) => t("update:replaceText", S.target.value)),
2691
2691
  onKeydown: o
2692
2692
  }, null, 40, Hr),
2693
2693
  d("select", {
2694
2694
  class: "find-bar__select",
2695
2695
  value: e.scope,
2696
- title: j(A)(e.locale, "findScope"),
2696
+ title: j(E)(e.locale, "findScope"),
2697
2697
  onChange: b
2698
2698
  }, [
2699
- d("option", Kr, He(j(A)(e.locale, "scopeSheet")), 1),
2700
- d("option", Vr, He(j(A)(e.locale, "scopeWorkbook")), 1),
2701
- d("option", Pr, He(j(A)(e.locale, "scopeSelection")), 1)
2699
+ d("option", Kr, He(j(E)(e.locale, "scopeSheet")), 1),
2700
+ d("option", Vr, He(j(E)(e.locale, "scopeWorkbook")), 1),
2701
+ d("option", Pr, He(j(E)(e.locale, "scopeSelection")), 1)
2702
2702
  ], 40, Wr),
2703
2703
  d("label", Ur, [
2704
2704
  d("input", {
2705
2705
  type: "checkbox",
2706
2706
  checked: e.matchCase,
2707
- onChange: k[2] || (k[2] = (B) => t("update:matchCase", B.target.checked))
2707
+ onChange: k[2] || (k[2] = (S) => t("update:matchCase", S.target.checked))
2708
2708
  }, null, 40, Gr),
2709
- Rn(He(j(A)(e.locale, "matchCase")), 1)
2709
+ Rn(He(j(E)(e.locale, "matchCase")), 1)
2710
2710
  ]),
2711
2711
  d("label", Yr, [
2712
2712
  d("input", {
2713
2713
  type: "checkbox",
2714
2714
  checked: e.matchEntireCell,
2715
- onChange: k[3] || (k[3] = (B) => t("update:matchEntireCell", B.target.checked))
2715
+ onChange: k[3] || (k[3] = (S) => t("update:matchEntireCell", S.target.checked))
2716
2716
  }, null, 40, _r),
2717
- Rn(He(j(A)(e.locale, "matchEntireCell")), 1)
2717
+ Rn(He(j(E)(e.locale, "matchEntireCell")), 1)
2718
2718
  ]),
2719
2719
  d("span", Xr, He(u.value), 1),
2720
2720
  d("button", {
2721
2721
  class: "find-bar__btn find-bar__btn--icon",
2722
- title: j(A)(e.locale, "findPrev"),
2722
+ title: j(E)(e.locale, "findPrev"),
2723
2723
  disabled: e.total === 0,
2724
- onClick: k[4] || (k[4] = (B) => t("prev"))
2724
+ onClick: k[4] || (k[4] = (S) => t("prev"))
2725
2725
  }, [...k[9] || (k[9] = [
2726
2726
  d("svg", {
2727
2727
  viewBox: "0 0 1024 1024",
@@ -2732,9 +2732,9 @@ const Qo = ["title"], ea = ["innerHTML"], ta = {
2732
2732
  ])], 8, jr),
2733
2733
  d("button", {
2734
2734
  class: "find-bar__btn find-bar__btn--icon",
2735
- title: j(A)(e.locale, "findNext"),
2735
+ title: j(E)(e.locale, "findNext"),
2736
2736
  disabled: e.total === 0,
2737
- onClick: k[5] || (k[5] = (B) => t("next"))
2737
+ onClick: k[5] || (k[5] = (S) => t("next"))
2738
2738
  }, [...k[10] || (k[10] = [
2739
2739
  d("svg", {
2740
2740
  viewBox: "0 0 1024 1024",
@@ -2746,17 +2746,17 @@ const Qo = ["title"], ea = ["innerHTML"], ta = {
2746
2746
  d("button", {
2747
2747
  class: "find-bar__btn find-bar__btn--text",
2748
2748
  disabled: e.total === 0,
2749
- onClick: k[6] || (k[6] = (B) => t("replace"))
2750
- }, He(j(A)(e.locale, "replace")), 9, qr),
2749
+ onClick: k[6] || (k[6] = (S) => t("replace"))
2750
+ }, He(j(E)(e.locale, "replace")), 9, qr),
2751
2751
  d("button", {
2752
2752
  class: "find-bar__btn find-bar__btn--text",
2753
2753
  disabled: e.total === 0,
2754
- onClick: k[7] || (k[7] = (B) => t("replace-all"))
2755
- }, He(j(A)(e.locale, "replaceAll")), 9, Jr),
2754
+ onClick: k[7] || (k[7] = (S) => t("replace-all"))
2755
+ }, He(j(E)(e.locale, "replaceAll")), 9, Jr),
2756
2756
  d("button", {
2757
2757
  class: "find-bar__btn find-bar__btn--close",
2758
- title: j(A)(e.locale, "findClose"),
2759
- onClick: k[8] || (k[8] = (B) => t("close"))
2758
+ title: j(E)(e.locale, "findClose"),
2759
+ onClick: k[8] || (k[8] = (S) => t("close"))
2760
2760
  }, [...k[11] || (k[11] = [
2761
2761
  d("svg", {
2762
2762
  viewBox: "0 0 1024 1024",
@@ -2767,7 +2767,7 @@ const Qo = ["title"], ea = ["innerHTML"], ta = {
2767
2767
  ])], 8, Qr)
2768
2768
  ], 4)) : nt("", !0);
2769
2769
  }
2770
- }), ti = /* @__PURE__ */ Pt(ei, [["__scopeId", "data-v-0d187de9"]]), li = { class: "nf-dialog__header" }, ni = { class: "nf-dialog__title" }, oi = { class: "nf-dialog__body" }, ai = { class: "nf-field" }, ri = { class: "nf-field__label" }, ii = ["value"], ci = {
2770
+ }), ti = /* @__PURE__ */ Pt(ei, [["__scopeId", "data-v-8d54f890"]]), li = { class: "nf-dialog__header" }, ni = { class: "nf-dialog__title" }, oi = { class: "nf-dialog__body" }, ai = { class: "nf-field" }, ri = { class: "nf-field__label" }, ii = ["value"], ci = {
2771
2771
  key: 0,
2772
2772
  class: "nf-field"
2773
2773
  }, ui = { class: "nf-field__label" }, si = {
@@ -2798,7 +2798,7 @@ const Qo = ["title"], ea = ["innerHTML"], ta = {
2798
2798
  },
2799
2799
  emits: ["update:modelOpen", "apply"],
2800
2800
  setup(e, { emit: n }) {
2801
- const l = e, t = n, r = H(!1), u = H("general"), o = H(2), b = H(!1), s = H("$"), k = H("m/d/yyyy"), B = H("h:mm:ss"), F = H("m/d/yyyy h:mm:ss"), w = H("[h]:mm:ss"), M = H(""), S = H(null), ie = [
2801
+ const l = e, t = n, r = H(!1), u = H("general"), o = H(2), b = H(!1), s = H("$"), k = H("m/d/yyyy"), S = H("h:mm:ss"), A = H("m/d/yyyy h:mm:ss"), w = H("[h]:mm:ss"), M = H(""), B = H(null), ae = [
2802
2802
  { label: "¥", value: "¥" },
2803
2803
  { label: "$", value: "$" },
2804
2804
  { label: "€", value: "€" },
@@ -2813,9 +2813,9 @@ const Qo = ["title"], ea = ["innerHTML"], ta = {
2813
2813
  "m/d/yyyy hh:mm",
2814
2814
  "mm/dd/yyyy h:mm AM/PM",
2815
2815
  "d-mmm-yyyy hh:mm:ss"
2816
- ], ce = re(
2816
+ ], ce = ie(
2817
2817
  () => l.locale === "zh-CN" ? [...ue, ...m] : [...m, ...ue]
2818
- ), Q = ["h:mm:ss", "h:mm", "hh:mm:ss", "h:mm AM/PM", 'hh"时"mm"分"ss"秒"', "H:mm:ss"], te = re(
2818
+ ), Q = ["h:mm:ss", "h:mm", "hh:mm:ss", "h:mm AM/PM", 'hh"时"mm"分"ss"秒"', "H:mm:ss"], te = ie(
2819
2819
  () => l.locale === "zh-CN" ? [...L, ...Z] : [...Z, ...L]
2820
2820
  ), ee = ["[h]:mm:ss", "[h]:mm", "mm:ss", '[h]"小时"mm"分"ss"秒"', "[h]:mm:ss.00", 'd"天"h:mm:ss'], pe = {
2821
2821
  general: "nfCatGeneral",
@@ -2832,9 +2832,9 @@ const Qo = ["title"], ea = ["innerHTML"], ta = {
2832
2832
  duration: "nfCatDuration",
2833
2833
  text: "nfCatText",
2834
2834
  custom: "nfCatCustom"
2835
- }, Ve = re(
2835
+ }, Ve = ie(
2836
2836
  () => ["number", "currency", "currencyRounded", "accounting", "financial"].includes(u.value)
2837
- ), Ye = re(() => ["currency", "currencyRounded", "accounting"].includes(u.value)), mt = re(() => u.value === "date"), ot = re(() => u.value === "time"), ut = re(() => u.value === "dateTime"), me = re(() => u.value === "duration"), ge = re(
2837
+ ), Ye = ie(() => ["currency", "currencyRounded", "accounting"].includes(u.value)), mt = ie(() => u.value === "date"), ot = ie(() => u.value === "time"), ut = ie(() => u.value === "dateTime"), me = ie(() => u.value === "duration"), ge = ie(
2838
2838
  () => ["number", "currency", "accounting", "financial", "percent", "scientific"].includes(u.value)
2839
2839
  );
2840
2840
  function $e() {
@@ -2847,9 +2847,9 @@ const Qo = ["title"], ea = ["innerHTML"], ta = {
2847
2847
  if (u.value === "date")
2848
2848
  return k.value;
2849
2849
  if (u.value === "time")
2850
- return B.value;
2850
+ return S.value;
2851
2851
  if (u.value === "dateTime")
2852
- return F.value;
2852
+ return A.value;
2853
2853
  if (u.value === "duration")
2854
2854
  return w.value;
2855
2855
  const x = Math.max(0, Math.min(30, o.value));
@@ -2877,11 +2877,11 @@ const Qo = ["title"], ea = ["innerHTML"], ta = {
2877
2877
  }
2878
2878
  const P = /[yd]/i.test(x), Y = /h|s|AM\/PM/i.test(x);
2879
2879
  if (P && Y) {
2880
- u.value = "dateTime", te.value.includes(x) && (F.value = x);
2880
+ u.value = "dateTime", te.value.includes(x) && (A.value = x);
2881
2881
  return;
2882
2882
  }
2883
2883
  if (P || /AM\/PM/i.test(x)) {
2884
- Y && !P ? (u.value = "time", Q.includes(x) && (B.value = x)) : (u.value = "date", ce.value.includes(x) && (k.value = x));
2884
+ Y && !P ? (u.value = "time", Q.includes(x) && (S.value = x)) : (u.value = "date", ce.value.includes(x) && (k.value = x));
2885
2885
  return;
2886
2886
  }
2887
2887
  if (x.includes("%")) {
@@ -2892,7 +2892,7 @@ const Qo = ["title"], ea = ["innerHTML"], ta = {
2892
2892
  u.value = "scientific", o.value = v(x);
2893
2893
  return;
2894
2894
  }
2895
- const ze = ie.find((Pe) => x.startsWith(Pe.value));
2895
+ const ze = ae.find((Pe) => x.startsWith(Pe.value));
2896
2896
  if (x.includes("[Red](")) {
2897
2897
  u.value = "financial", b.value = x.includes(","), o.value = v(x);
2898
2898
  return;
@@ -2913,12 +2913,12 @@ const Qo = ["title"], ea = ["innerHTML"], ta = {
2913
2913
  function Ie() {
2914
2914
  }
2915
2915
  function f() {
2916
- k.value = ce.value[0], B.value = Q[0], F.value = te.value[0], w.value = ee[0];
2916
+ k.value = ce.value[0], S.value = Q[0], A.value = te.value[0], w.value = ee[0];
2917
2917
  }
2918
2918
  function T() {
2919
2919
  r.value = !0, l.modelOpen !== void 0 && t("update:modelOpen", !0), f(), a(l.currentFormat ?? ""), Je(() => {
2920
2920
  var x;
2921
- return (x = S.value) == null ? void 0 : x.focus();
2921
+ return (x = B.value) == null ? void 0 : x.focus();
2922
2922
  });
2923
2923
  }
2924
2924
  function y() {
@@ -2936,7 +2936,7 @@ const Qo = ["title"], ea = ["innerHTML"], ta = {
2936
2936
  vt(() => l.modelOpen, (x) => {
2937
2937
  x && !r.value ? T() : !x && r.value && y();
2938
2938
  });
2939
- const C = re(() => un(l.sampleValue, M.value, l.locale));
2939
+ const C = ie(() => un(l.sampleValue, M.value, l.locale));
2940
2940
  return (x, P) => (z(), Ue(Ge, { to: "body" }, [
2941
2941
  ft(Jt, { name: "nf-dialog" }, {
2942
2942
  default: Qt(() => [
@@ -2952,7 +2952,7 @@ const Qo = ["title"], ea = ["innerHTML"], ta = {
2952
2952
  }, ["stop"]))
2953
2953
  }, [
2954
2954
  d("div", li, [
2955
- d("span", ni, He(j(A)(e.locale, "nfDialogTitle")), 1),
2955
+ d("span", ni, He(j(E)(e.locale, "nfDialogTitle")), 1),
2956
2956
  d("button", {
2957
2957
  class: "nf-dialog__close",
2958
2958
  type: "button",
@@ -2968,7 +2968,7 @@ const Qo = ["title"], ea = ["innerHTML"], ta = {
2968
2968
  ]),
2969
2969
  d("div", oi, [
2970
2970
  d("div", ai, [
2971
- d("label", ri, He(j(A)(e.locale, "nfCategory")), 1),
2971
+ d("label", ri, He(j(E)(e.locale, "nfCategory")), 1),
2972
2972
  Wt(d("select", {
2973
2973
  "onUpdate:modelValue": P[0] || (P[0] = (Y) => u.value = Y),
2974
2974
  class: "nf-field__select",
@@ -2977,13 +2977,13 @@ const Qo = ["title"], ea = ["innerHTML"], ta = {
2977
2977
  (z(!0), oe(St, null, Dt(j(Xo), (Y) => (z(), oe("option", {
2978
2978
  key: Y,
2979
2979
  value: Y
2980
- }, He(j(A)(e.locale, pe[Y])), 9, ii))), 128))
2980
+ }, He(j(E)(e.locale, pe[Y])), 9, ii))), 128))
2981
2981
  ], 544), [
2982
2982
  [ml, u.value]
2983
2983
  ])
2984
2984
  ]),
2985
2985
  ge.value ? (z(), oe("div", ci, [
2986
- d("label", ui, He(j(A)(e.locale, "nfDecimals")), 1),
2986
+ d("label", ui, He(j(E)(e.locale, "nfDecimals")), 1),
2987
2987
  Wt(d("input", {
2988
2988
  "onUpdate:modelValue": P[1] || (P[1] = (Y) => o.value = Y),
2989
2989
  class: "nf-field__input",
@@ -3009,17 +3009,17 @@ const Qo = ["title"], ea = ["innerHTML"], ta = {
3009
3009
  }, null, 544), [
3010
3010
  [fo, b.value]
3011
3011
  ]),
3012
- d("span", null, He(j(A)(e.locale, "nfThousands")), 1)
3012
+ d("span", null, He(j(E)(e.locale, "nfThousands")), 1)
3013
3013
  ])
3014
3014
  ])) : nt("", !0),
3015
3015
  Ye.value ? (z(), oe("div", fi, [
3016
- d("label", vi, He(j(A)(e.locale, "nfSymbol")), 1),
3016
+ d("label", vi, He(j(E)(e.locale, "nfSymbol")), 1),
3017
3017
  Wt(d("select", {
3018
3018
  "onUpdate:modelValue": P[3] || (P[3] = (Y) => s.value = Y),
3019
3019
  class: "nf-field__select",
3020
3020
  onChange: he
3021
3021
  }, [
3022
- (z(), oe(St, null, Dt(ie, (Y) => d("option", {
3022
+ (z(), oe(St, null, Dt(ae, (Y) => d("option", {
3023
3023
  key: Y.value,
3024
3024
  value: Y.value
3025
3025
  }, He(Y.label), 9, mi)), 64))
@@ -3028,7 +3028,7 @@ const Qo = ["title"], ea = ["innerHTML"], ta = {
3028
3028
  ])
3029
3029
  ])) : nt("", !0),
3030
3030
  mt.value ? (z(), oe("div", gi, [
3031
- d("label", pi, He(j(A)(e.locale, "nfDateFormat")), 1),
3031
+ d("label", pi, He(j(E)(e.locale, "nfDateFormat")), 1),
3032
3032
  Wt(d("select", {
3033
3033
  "onUpdate:modelValue": P[4] || (P[4] = (Y) => k.value = Y),
3034
3034
  class: "nf-field__select",
@@ -3043,9 +3043,9 @@ const Qo = ["title"], ea = ["innerHTML"], ta = {
3043
3043
  ])
3044
3044
  ])) : nt("", !0),
3045
3045
  ot.value ? (z(), oe("div", bi, [
3046
- d("label", yi, He(j(A)(e.locale, "nfTimeFormat")), 1),
3046
+ d("label", yi, He(j(E)(e.locale, "nfTimeFormat")), 1),
3047
3047
  Wt(d("select", {
3048
- "onUpdate:modelValue": P[5] || (P[5] = (Y) => B.value = Y),
3048
+ "onUpdate:modelValue": P[5] || (P[5] = (Y) => S.value = Y),
3049
3049
  class: "nf-field__select",
3050
3050
  onChange: he
3051
3051
  }, [
@@ -3054,13 +3054,13 @@ const Qo = ["title"], ea = ["innerHTML"], ta = {
3054
3054
  value: Y
3055
3055
  }, He(Y), 9, Ci)), 64))
3056
3056
  ], 544), [
3057
- [ml, B.value]
3057
+ [ml, S.value]
3058
3058
  ])
3059
3059
  ])) : nt("", !0),
3060
3060
  ut.value ? (z(), oe("div", wi, [
3061
- d("label", ki, He(j(A)(e.locale, "nfDateTime")), 1),
3061
+ d("label", ki, He(j(E)(e.locale, "nfDateTime")), 1),
3062
3062
  Wt(d("select", {
3063
- "onUpdate:modelValue": P[6] || (P[6] = (Y) => F.value = Y),
3063
+ "onUpdate:modelValue": P[6] || (P[6] = (Y) => A.value = Y),
3064
3064
  class: "nf-field__select",
3065
3065
  onChange: he
3066
3066
  }, [
@@ -3069,11 +3069,11 @@ const Qo = ["title"], ea = ["innerHTML"], ta = {
3069
3069
  value: Y
3070
3070
  }, He(Y), 9, Ri))), 128))
3071
3071
  ], 544), [
3072
- [ml, F.value]
3072
+ [ml, A.value]
3073
3073
  ])
3074
3074
  ])) : nt("", !0),
3075
3075
  me.value ? (z(), oe("div", xi, [
3076
- d("label", Mi, He(j(A)(e.locale, "nfDuration")), 1),
3076
+ d("label", Mi, He(j(E)(e.locale, "nfDuration")), 1),
3077
3077
  Wt(d("select", {
3078
3078
  "onUpdate:modelValue": P[7] || (P[7] = (Y) => w.value = Y),
3079
3079
  class: "nf-field__select",
@@ -3088,10 +3088,10 @@ const Qo = ["title"], ea = ["innerHTML"], ta = {
3088
3088
  ])
3089
3089
  ])) : nt("", !0),
3090
3090
  d("div", Bi, [
3091
- d("label", Ti, He(j(A)(e.locale, "nfCustomCode")), 1),
3091
+ d("label", Ti, He(j(E)(e.locale, "nfCustomCode")), 1),
3092
3092
  Wt(d("textarea", {
3093
3093
  ref_key: "customCodeRef",
3094
- ref: S,
3094
+ ref: B,
3095
3095
  "onUpdate:modelValue": P[8] || (P[8] = (Y) => M.value = Y),
3096
3096
  class: "nf-field__textarea",
3097
3097
  rows: "2",
@@ -3104,7 +3104,7 @@ const Qo = ["title"], ea = ["innerHTML"], ta = {
3104
3104
  ]),
3105
3105
  d("div", Di, [
3106
3106
  d("div", Fi, [
3107
- d("span", Ei, He(j(A)(e.locale, "nfPreview")), 1),
3107
+ d("span", Ei, He(j(E)(e.locale, "nfPreview")), 1),
3108
3108
  d("span", Ai, He(C.value || "—"), 1)
3109
3109
  ]),
3110
3110
  d("div", Oi, [
@@ -3112,12 +3112,12 @@ const Qo = ["title"], ea = ["innerHTML"], ta = {
3112
3112
  class: "nf-btn nf-btn--primary",
3113
3113
  type: "button",
3114
3114
  onClick: U
3115
- }, He(j(A)(e.locale, "ok")), 1),
3115
+ }, He(j(E)(e.locale, "ok")), 1),
3116
3116
  d("button", {
3117
3117
  class: "nf-btn",
3118
3118
  type: "button",
3119
3119
  onClick: y
3120
- }, He(j(A)(e.locale, "cancel")), 1)
3120
+ }, He(j(E)(e.locale, "cancel")), 1)
3121
3121
  ])
3122
3122
  ])
3123
3123
  ], 34)
@@ -3268,31 +3268,30 @@ function Hi(e, n, l) {
3268
3268
  return !1;
3269
3269
  }
3270
3270
  function Wi(e, n, l, t, r) {
3271
- const u = e.trim();
3272
- let o = null, b = -1, s = null, k = 0;
3273
- for (let F = 0; F < u.length; F++) {
3274
- const w = u[F];
3275
- if (s) {
3276
- w === s && (u[F + 1] === s ? F++ : s = null);
3271
+ const u = e.trim(), o = ["<=", ">=", "<>"];
3272
+ let b = null, s = -1, k = null, S = 0;
3273
+ for (let w = 0; w < u.length; w++) {
3274
+ const M = u[w];
3275
+ if (k) {
3276
+ M === k && (u[w + 1] === k ? w++ : k = null);
3277
3277
  continue;
3278
3278
  }
3279
- if (w === '"' || w === "'") {
3280
- s = w;
3279
+ if (M === '"' || M === "'") {
3280
+ k = M;
3281
3281
  continue;
3282
3282
  }
3283
- if (w === "(" && k++, w === ")" && k--, k === 0 && (w === "<" || w === ">" || w === "=")) {
3284
- let M = null;
3285
- const S = u.slice(F, F + 2);
3286
- S === "<=" || S === ">=" || S === "<>" ? M = S : M = w, o = M, b = F, M.length === 2 && F++;
3283
+ if (M === "(" && S++, M === ")" && S--, S === 0 && (M === "<" || M === ">" || M === "=")) {
3284
+ const B = u.slice(w, w + 2);
3285
+ b = o.includes(B) ? B : M, s = w;
3287
3286
  break;
3288
3287
  }
3289
3288
  }
3290
- if (o && b >= 0) {
3291
- const F = u.slice(0, b).trim(), w = u.slice(b + o.length).trim(), M = Zt(F, n, l, t, r), S = Zt(w, n, l, t, r);
3292
- return Hi(M, S, o);
3289
+ if (b && s >= 0) {
3290
+ const w = u.slice(0, s).trim(), M = u.slice(s + b.length).trim(), B = Zt(w, n, l, t, r), ae = Zt(M, n, l, t, r);
3291
+ return Hi(B, ae, b);
3293
3292
  }
3294
- const B = Zt(u, n, l, t, r);
3295
- return Pn(B);
3293
+ const A = Zt(u, n, l, t, r);
3294
+ return Pn(A);
3296
3295
  }
3297
3296
  function tn(e) {
3298
3297
  const n = [];
@@ -3331,28 +3330,28 @@ function Zt(e, n, l, t, r) {
3331
3330
  return null;
3332
3331
  let s = 0;
3333
3332
  const k = () => {
3334
- let M = B();
3333
+ let M = S();
3335
3334
  for (; s < b.length; ) {
3336
- const S = b[s];
3337
- if (S.type === "op" && (S.val === "+" || S.val === "-"))
3338
- s++, M = ln(M, B(), S.val);
3335
+ const B = b[s];
3336
+ if (B.type === "op" && (B.val === "+" || B.val === "-"))
3337
+ s++, M = ln(M, S(), B.val);
3339
3338
  else
3340
3339
  break;
3341
3340
  }
3342
3341
  return M;
3343
- }, B = () => {
3344
- let M = F();
3342
+ }, S = () => {
3343
+ let M = A();
3345
3344
  for (; s < b.length; ) {
3346
- const S = b[s];
3347
- if (S.type === "op" && (S.val === "*" || S.val === "/"))
3348
- s++, M = ln(M, F(), S.val);
3345
+ const B = b[s];
3346
+ if (B.type === "op" && (B.val === "*" || B.val === "/"))
3347
+ s++, M = ln(M, A(), B.val);
3349
3348
  else
3350
3349
  break;
3351
3350
  }
3352
3351
  return M;
3353
- }, F = () => {
3352
+ }, A = () => {
3354
3353
  const M = b[s];
3355
- return M && M.type === "op" && M.val === "-" ? (s++, ln(0, F(), "-")) : M && M.type === "op" && M.val === "+" ? (s++, F()) : w();
3354
+ return M && M.type === "op" && M.val === "-" ? (s++, ln(0, A(), "-")) : M && M.type === "op" && M.val === "+" ? (s++, A()) : w();
3356
3355
  }, w = () => {
3357
3356
  const M = b[s];
3358
3357
  if (!M)
@@ -3363,18 +3362,18 @@ function Zt(e, n, l, t, r) {
3363
3362
  return s++, M.val;
3364
3363
  if (M.type === "lp") {
3365
3364
  s++;
3366
- const S = k();
3367
- return b[s] && b[s].type === "rp" && s++, S;
3365
+ const B = k();
3366
+ return b[s] && b[s].type === "rp" && s++, B;
3368
3367
  }
3369
3368
  if (M.type === "ref") {
3370
3369
  s++;
3371
- const S = Al(M.val, l, t);
3372
- return S ? sl(S.col, S.row, n, l, t) : null;
3370
+ const B = Al(M.val, l, t);
3371
+ return B ? sl(B.col, B.row, n, l, t) : null;
3373
3372
  }
3374
3373
  if (M.type === "func") {
3375
- const S = M.val.toUpperCase();
3374
+ const B = M.val.toUpperCase();
3376
3375
  if (s++, b[s] && b[s].type === "lp") {
3377
- const ie = b[s];
3376
+ const ae = b[s];
3378
3377
  let ue = 0, m = null, L = s;
3379
3378
  for (; L < b.length; L++)
3380
3379
  if (b[L].type === "lp")
@@ -3384,8 +3383,8 @@ function Zt(e, n, l, t, r) {
3384
3383
  break;
3385
3384
  }
3386
3385
  if (m) {
3387
- const Z = u.slice(ie.start + 1, m.start);
3388
- return s = L + 1, Un(S, Z, n, l, t, r + 1);
3386
+ const Z = u.slice(ae.start + 1, m.start);
3387
+ return s = L + 1, Un(B, Z, n, l, t, r + 1);
3389
3388
  }
3390
3389
  }
3391
3390
  return null;
@@ -3489,8 +3488,8 @@ function Un(e, n, l, t, r, u) {
3489
3488
  if (e === "COUNT") {
3490
3489
  let s = 0;
3491
3490
  for (let k = o.sc; k <= o.ec; k++)
3492
- for (let B = o.sr; B <= o.er; B++)
3493
- typeof sl(k, B, l, t, r) == "number" && s++;
3491
+ for (let S = o.sr; S <= o.er; S++)
3492
+ typeof sl(k, S, l, t, r) == "number" && s++;
3494
3493
  return s;
3495
3494
  }
3496
3495
  let b = 0;
@@ -3519,24 +3518,24 @@ function Un(e, n, l, t, r, u) {
3519
3518
  const b = Zt(o[0], l, t, r, u), s = En(o[1].trim(), t, r);
3520
3519
  if (!s)
3521
3520
  return null;
3522
- const k = Zt(o[2], l, t, r, u), B = typeof k == "number" ? k : parseFloat(String(k));
3523
- if (isNaN(B))
3521
+ const k = Zt(o[2], l, t, r, u), S = typeof k == "number" ? k : parseFloat(String(k));
3522
+ if (isNaN(S))
3524
3523
  return null;
3525
- const F = s.sc + (B - 1);
3526
- if (F < s.sc || F > s.ec)
3524
+ const A = s.sc + (S - 1);
3525
+ if (A < s.sc || A > s.ec)
3527
3526
  return null;
3528
3527
  if (o.length >= 4 ? Pn(Zt(o[3], l, t, r, u)) : !1) {
3529
- let M = -1, S = -1 / 0;
3530
- for (let ie = s.sr; ie <= s.er; ie++) {
3531
- const ue = sl(s.sc, ie, l, t, r);
3532
- typeof ue == "number" && typeof b == "number" && ue <= b && ue > S && (S = ue, M = ie);
3528
+ let M = -1, B = -1 / 0;
3529
+ for (let ae = s.sr; ae <= s.er; ae++) {
3530
+ const ue = sl(s.sc, ae, l, t, r);
3531
+ typeof ue == "number" && typeof b == "number" && ue <= b && ue > B && (B = ue, M = ae);
3533
3532
  }
3534
- return M >= 0 ? sl(F, M, l, t, r) : null;
3533
+ return M >= 0 ? sl(A, M, l, t, r) : null;
3535
3534
  }
3536
3535
  for (let M = s.sr; M <= s.er; M++) {
3537
- const S = sl(s.sc, M, l, t, r);
3538
- if (Ni(S, b))
3539
- return sl(F, M, l, t, r);
3536
+ const B = sl(s.sc, M, l, t, r);
3537
+ if (Ni(B, b))
3538
+ return sl(A, M, l, t, r);
3540
3539
  }
3541
3540
  return null;
3542
3541
  }
@@ -3584,12 +3583,12 @@ function Vi(e, n, l, t, r) {
3584
3583
  function Pi(e, n, l, t, r, u) {
3585
3584
  return n === 0 && l === 0 ? e : e.replace(
3586
3585
  /(\$?)([A-Z]+)(\$?)(\d+)/gi,
3587
- (o, b, s, k, B) => {
3588
- const F = b ? an(s) : an(s) + n, w = k ? parseInt(B, 10) - 1 : parseInt(B, 10) - 1 + l;
3586
+ (o, b, s, k, S) => {
3587
+ const A = b ? an(s) : an(s) + n, w = k ? parseInt(S, 10) - 1 : parseInt(S, 10) - 1 + l;
3589
3588
  let M;
3590
- F < 0 ? M = "A" : F >= t ? M = u(t - 1) : M = u(F);
3591
- let S;
3592
- return w < 0 ? S = "1" : w >= r ? S = String(r) : S = String(w + 1), (b || "") + M + (k || "") + S;
3589
+ A < 0 ? M = "A" : A >= t ? M = u(t - 1) : M = u(A);
3590
+ let B;
3591
+ return w < 0 ? B = "1" : w >= r ? B = String(r) : B = String(w + 1), (b || "") + M + (k || "") + B;
3593
3592
  }
3594
3593
  );
3595
3594
  }
@@ -3648,7 +3647,7 @@ function Gi(e, n) {
3648
3647
  vo(() => {
3649
3648
  l.rowCount = e.rowCount ?? n.rowCount, l.colCount = e.colCount ?? n.colCount, l.width = e.width, l.height = e.height, l.theme = e.theme ?? n.theme, l.locale = e.locale ?? n.locale;
3650
3649
  });
3651
- const t = re(() => l.locale === "zh-CN" ? "zh-CN" : "en-US"), r = l.colCount, u = l.rowCount, o = Kt({}), b = Kt({}), s = new Ui(), k = H(null), B = H("cell"), F = H({ col: 0, row: 0 }), w = H(null), M = H(""), S = H(new Array(r).fill(gl)), ie = H(new Array(u).fill(void 0)), ue = H(0), m = H(0), L = (Jl - qt) / 2, Z = /* @__PURE__ */ new Map();
3650
+ const t = ie(() => l.locale === "zh-CN" ? "zh-CN" : "en-US"), r = l.colCount, u = l.rowCount, o = Kt({}), b = Kt({}), s = new Ui(), k = H(null), S = H("cell"), A = H({ col: 0, row: 0 }), w = H(null), M = H(""), B = H(new Array(r).fill(gl)), ae = H(new Array(u).fill(void 0)), ue = H(0), m = H(0), L = (Jl - qt) / 2, Z = /* @__PURE__ */ new Map();
3652
3651
  let ce = null;
3653
3652
  function Q(O, I, W, le) {
3654
3653
  const fe = `${le} ${W} ${I}px ${O}`, Be = Z.get(fe);
@@ -3677,7 +3676,7 @@ function Gi(e, n) {
3677
3676
  const G = Math.max(h, I * 0.88), ke = Math.max($, I * 0.28), Ce = { ascent: G, descent: ke };
3678
3677
  return Z.set(fe, Ce), Ce;
3679
3678
  }
3680
- let te = (O, I) => `${O},${I}`, ee = () => null, pe = () => qt, Ve = re(() => [0]), Ye = () => Jl, mt = (O, I, W, le) => ({
3679
+ let te = (O, I) => `${O},${I}`, ee = () => null, pe = () => qt, Ve = ie(() => [0]), Ye = () => Jl, mt = (O, I, W, le) => ({
3681
3680
  startCol: Math.min(O, W),
3682
3681
  startRow: Math.min(I, le),
3683
3682
  endCol: Math.max(O, W),
@@ -3712,10 +3711,10 @@ function Gi(e, n) {
3712
3711
  return typeof (W == null ? void 0 : W.fontSize) == "number" && W.fontSize > 0 ? W.fontSize : qt;
3713
3712
  }
3714
3713
  pe = me;
3715
- const ge = re(() => {
3714
+ const ge = ie(() => {
3716
3715
  const O = [0];
3717
3716
  for (let I = 0; I < r; I++)
3718
- O.push(O[I] + S.value[I]);
3717
+ O.push(O[I] + B.value[I]);
3719
3718
  return O;
3720
3719
  });
3721
3720
  Ve = ge;
@@ -3724,7 +3723,7 @@ function Gi(e, n) {
3724
3723
  };
3725
3724
  function a(O) {
3726
3725
  var Ae;
3727
- const I = ie.value[O];
3726
+ const I = ae.value[O];
3728
3727
  if (I != null && I > 0)
3729
3728
  return I;
3730
3729
  let W, le, fe = 1;
@@ -3741,7 +3740,7 @@ function Gi(e, n) {
3741
3740
  Be.font = `${be} ${Ce} ${$}px ${ke}`;
3742
3741
  const gt = ee(h, O);
3743
3742
  let wt;
3744
- gt && h === gt.range.startCol && O === gt.range.startRow ? wt = Ve.value[gt.range.endCol + 1] - Ve.value[h] : wt = S.value[h], Bt = ut(Be, bt, Math.max(0, wt - 10), !0).length, Bt > fe && (fe = Bt);
3743
+ gt && h === gt.range.startCol && O === gt.range.startRow ? wt = Ve.value[gt.range.endCol + 1] - Ve.value[h] : wt = B.value[h], Bt = ut(Be, bt, Math.max(0, wt - 10), !0).length, Bt > fe && (fe = Bt);
3745
3744
  } else
3746
3745
  Bt = bt.split(`
3747
3746
  `).length, Bt > fe && (fe = Bt);
@@ -3752,14 +3751,14 @@ function Gi(e, n) {
3752
3751
  }
3753
3752
  Ye = a;
3754
3753
  function v(O) {
3755
- return ie.value[O] === void 0;
3754
+ return ae.value[O] === void 0;
3756
3755
  }
3757
- const he = re(() => {
3756
+ const he = ie(() => {
3758
3757
  const O = [0];
3759
3758
  for (let I = 0; I < u; I++)
3760
3759
  O.push(O[I] + Ye(I));
3761
3760
  return O;
3762
- }), Ie = re(() => ge.value[r]), f = re(() => he.value[u]);
3761
+ }), Ie = ie(() => ge.value[r]), f = ie(() => he.value[u]);
3763
3762
  function T(O, I) {
3764
3763
  return `${O},${I}`;
3765
3764
  }
@@ -3768,13 +3767,13 @@ function Gi(e, n) {
3768
3767
  Reflect.deleteProperty(o, O);
3769
3768
  }
3770
3769
  function U(O, I) {
3771
- B.value = "cell";
3770
+ S.value = "cell";
3772
3771
  const W = ee(O, I);
3773
- W ? (F.value = { col: W.range.startCol, row: W.range.startRow }, k.value = { ...W.range }) : (F.value = { col: O, row: I }, k.value = { startCol: O, startRow: I, endCol: O, endRow: I });
3772
+ W ? (A.value = { col: W.range.startCol, row: W.range.startRow }, k.value = { ...W.range }) : (A.value = { col: O, row: I }, k.value = { startCol: O, startRow: I, endCol: O, endRow: I });
3774
3773
  }
3775
3774
  function R(O, I, W, le, fe = "cell") {
3776
3775
  const Be = ee(O, I);
3777
- if (F.value = Be ? { col: Be.range.startCol, row: Be.range.startRow } : { col: O, row: I }, B.value = fe, fe === "row" || fe === "col") {
3776
+ if (A.value = Be ? { col: Be.range.startCol, row: Be.range.startRow } : { col: O, row: I }, S.value = fe, fe === "row" || fe === "col") {
3778
3777
  const Ne = Math.min(O, W), qe = Math.max(O, W), _e = Math.min(I, le), Qe = Math.max(I, le);
3779
3778
  k.value = { startCol: Ne, startRow: _e, endCol: qe, endRow: Qe };
3780
3779
  } else
@@ -3785,7 +3784,7 @@ function Gi(e, n) {
3785
3784
  }
3786
3785
  function C(O, I) {
3787
3786
  const W = k.value;
3788
- return W ? (B.value === "cell" || B.value === "all", O >= W.startCol && O <= W.endCol && I >= W.startRow && I <= W.endRow) : !1;
3787
+ return W ? (S.value === "cell" || S.value === "all", O >= W.startCol && O <= W.endCol && I >= W.startRow && I <= W.endRow) : !1;
3789
3788
  }
3790
3789
  function x(O, I) {
3791
3790
  return C(O, I);
@@ -3808,7 +3807,7 @@ function Gi(e, n) {
3808
3807
  const le = ge.value[W.range.endCol + 1] - ge.value[O], fe = he.value[W.range.endRow + 1] - he.value[I];
3809
3808
  return { w: le, h: fe };
3810
3809
  }
3811
- return { w: S.value[O], h: Ye(I) };
3810
+ return { w: B.value[O], h: Ye(I) };
3812
3811
  }
3813
3812
  function Pe(O, I, W, le) {
3814
3813
  let fe = Math.min(O, W), Be = Math.max(O, W), Ne = Math.min(I, le), qe = Math.max(I, le), _e = !0;
@@ -3833,7 +3832,7 @@ function Gi(e, n) {
3833
3832
  function D(O, I) {
3834
3833
  return rn(), Vi(O, I, o, r, u);
3835
3834
  }
3836
- function E(O, I, W) {
3835
+ function F(O, I, W) {
3837
3836
  var Ne, qe;
3838
3837
  const le = T(O, I);
3839
3838
  if (rn(), W === "" || W == null) {
@@ -3855,22 +3854,22 @@ function Gi(e, n) {
3855
3854
  let ve = () => {
3856
3855
  };
3857
3856
  function ne(O) {
3858
- w.value || (w.value = { ...F.value }, O !== void 0 ? M.value = O : M.value || (M.value = Fe(F.value.col, F.value.row)));
3857
+ w.value || (w.value = { ...A.value }, O !== void 0 ? M.value = O : M.value || (M.value = Fe(A.value.col, A.value.row)));
3859
3858
  }
3860
3859
  function de() {
3861
- w.value && (ve(), E(w.value.col, w.value.row, M.value), w.value = null, M.value = "");
3860
+ w.value && (ve(), F(w.value.col, w.value.row, M.value), w.value = null, M.value = "");
3862
3861
  }
3863
3862
  function q() {
3864
3863
  w.value = null, M.value = "";
3865
3864
  }
3866
3865
  function _(O, I) {
3867
- const W = F.value;
3866
+ const W = A.value;
3868
3867
  let le = Math.max(0, Math.min(r - 1, W.col + O)), fe = Math.max(0, Math.min(u - 1, W.row + I));
3869
3868
  const Be = ee(W.col, W.row), Ne = ee(le, fe);
3870
3869
  Be && Ne && Be.anchor === Ne.anchor && (O > 0 ? le = Be.range.endCol + 1 : O < 0 && (le = Be.range.startCol - 1), I > 0 ? fe = Be.range.endRow + 1 : I < 0 && (fe = Be.range.startRow - 1), le = Math.max(0, Math.min(r - 1, le)), fe = Math.max(0, Math.min(u - 1, fe))), U(le, fe);
3871
3870
  }
3872
3871
  function xe(O, I) {
3873
- const W = Math.max(0, $e.w - Oe - hl), le = Math.max(0, $e.h - Le - hl), fe = ge.value[O], Be = he.value[I], Ne = ee(O, I), qe = Ne ? ge.value[Ne.range.endCol + 1] - ge.value[O] : S.value[O], _e = Ne ? he.value[Ne.range.endRow + 1] - he.value[I] : Ye(I);
3872
+ const W = Math.max(0, $e.w - Oe - hl), le = Math.max(0, $e.h - Le - hl), fe = ge.value[O], Be = he.value[I], Ne = ee(O, I), qe = Ne ? ge.value[Ne.range.endCol + 1] - ge.value[O] : B.value[O], _e = Ne ? he.value[Ne.range.endRow + 1] - he.value[I] : Ye(I);
3874
3873
  let Qe = ue.value, Ae = m.value;
3875
3874
  fe < Qe ? Qe = fe : fe + qe > Qe + W && (Qe = fe + qe - W), Be < Ae ? Ae = Be : Be + _e > Ae + le && (Ae = Be + _e - le), se(Qe, Ae);
3876
3875
  }
@@ -3905,11 +3904,11 @@ function Gi(e, n) {
3905
3904
  merges: b,
3906
3905
  formulaDeps: s,
3907
3906
  selection: k,
3908
- activeCell: F,
3907
+ activeCell: A,
3909
3908
  editingCell: w,
3910
3909
  editValue: M,
3911
- colWidths: S,
3912
- rowHeights: ie,
3910
+ colWidths: B,
3911
+ rowHeights: ae,
3913
3912
  scrollX: ue,
3914
3913
  scrollY: m,
3915
3914
  BASE_CELL_VPAD: L,
@@ -3930,7 +3929,7 @@ function Gi(e, n) {
3930
3929
  selectAll: c,
3931
3930
  isSelected: C,
3932
3931
  isCellSelected: x,
3933
- selectionMode: B,
3932
+ selectionMode: S,
3934
3933
  cellKey: T,
3935
3934
  delCell: y,
3936
3935
  findMerge: P,
@@ -3939,7 +3938,7 @@ function Gi(e, n) {
3939
3938
  expandSelectionForMerges: Pe,
3940
3939
  getCellRaw: Fe,
3941
3940
  getCellValue: D,
3942
- setCellValue: E,
3941
+ setCellValue: F,
3943
3942
  clearCellsInRange: X,
3944
3943
  startEdit: ne,
3945
3944
  commitEdit: de,
@@ -4011,8 +4010,8 @@ function Yi(e, n) {
4011
4010
  return ($ = e.emitModelData) == null ? void 0 : $.call(e);
4012
4011
  }));
4013
4012
  }
4014
- const B = re(() => l.value.length > 0), F = re(() => t.value.length > 0), w = re(() => !!e.selection.value), M = H(null);
4015
- function S() {
4013
+ const S = ie(() => l.value.length > 0), A = ie(() => t.value.length > 0), w = ie(() => !!e.selection.value), M = H(null);
4014
+ function B() {
4016
4015
  var G;
4017
4016
  const h = e.selection.value;
4018
4017
  if (!h)
@@ -4023,7 +4022,7 @@ function Yi(e, n) {
4023
4022
  $[`${ke - h.startCol},${Ce - h.startRow}`] = ((G = e.cells[e.cellKey(ke, Ce)]) == null ? void 0 : G.style) ?? null;
4024
4023
  M.value = { styles: $ };
4025
4024
  }
4026
- function ie() {
4025
+ function ae() {
4027
4026
  var G, ke, Ce, be;
4028
4027
  const h = M.value, $ = e.selection.value;
4029
4028
  if (!(!h || !$)) {
@@ -4055,11 +4054,11 @@ function Yi(e, n) {
4055
4054
  (ke = e.scheduleRender) == null || ke.call(e), (Ce = e.emitModelData) == null || Ce.call(e);
4056
4055
  }
4057
4056
  }
4058
- const m = re(
4059
- () => bo.map((h) => ({ ...h, label: h.value === "" ? A(e.locale.value, "fontDefault") : h.label }))
4060
- ), L = re(
4057
+ const m = ie(
4058
+ () => bo.map((h) => ({ ...h, label: h.value === "" ? E(e.locale.value, "fontDefault") : h.label }))
4059
+ ), L = ie(
4061
4060
  () => yo.map((h) => ({ ...h, label: String(h.value) }))
4062
- ), Z = "\0", ce = re(() => {
4061
+ ), Z = "\0", ce = ie(() => {
4063
4062
  var ke;
4064
4063
  const h = e.selection.value;
4065
4064
  if (!h)
@@ -4074,7 +4073,7 @@ function Yi(e, n) {
4074
4073
  $ === void 0 ? $ = We : We !== $ && (G = !0);
4075
4074
  }
4076
4075
  return G ? Z : $ ?? "";
4077
- }), Q = re(() => {
4076
+ }), Q = ie(() => {
4078
4077
  const h = e.selection.value;
4079
4078
  if (!h)
4080
4079
  return qt;
@@ -4114,25 +4113,25 @@ function Yi(e, n) {
4114
4113
  function ut(h) {
4115
4114
  te("fontSize", h), pe.value = !1;
4116
4115
  }
4117
- const me = re(
4118
- () => So.map((h) => ({ label: A(e.locale.value, h.labelKey), value: h.value, icon: h.icon }))
4119
- ), ge = re(
4120
- () => Bo.map((h) => ({ label: A(e.locale.value, h.labelKey), value: h.value, icon: h.icon }))
4121
- ), $e = re(() => {
4116
+ const me = ie(
4117
+ () => So.map((h) => ({ label: E(e.locale.value, h.labelKey), value: h.value, icon: h.icon }))
4118
+ ), ge = ie(
4119
+ () => Bo.map((h) => ({ label: E(e.locale.value, h.labelKey), value: h.value, icon: h.icon }))
4120
+ ), $e = ie(() => {
4122
4121
  var ke;
4123
4122
  const h = e.selection.value;
4124
4123
  if (!h)
4125
4124
  return "left";
4126
4125
  const $ = (ke = e.cells[e.cellKey(h.startCol, h.startRow)]) == null ? void 0 : ke.style, G = typeof ($ == null ? void 0 : $.textAlign) == "string" ? $.textAlign : "";
4127
4126
  return G === "center" || G === "right" ? G : "left";
4128
- }), se = re(() => {
4127
+ }), se = ie(() => {
4129
4128
  var ke;
4130
4129
  const h = e.selection.value;
4131
4130
  if (!h)
4132
4131
  return "top";
4133
4132
  const $ = (ke = e.cells[e.cellKey(h.startCol, h.startRow)]) == null ? void 0 : ke.style, G = typeof ($ == null ? void 0 : $.verticalAlign) == "string" ? $.verticalAlign : "";
4134
4133
  return G === "middle" || G === "bottom" ? G : "top";
4135
- }), a = re(() => {
4134
+ }), a = ie(() => {
4136
4135
  var G;
4137
4136
  const h = e.selection.value;
4138
4137
  if (!h)
@@ -4201,14 +4200,14 @@ function Yi(e, n) {
4201
4200
  }
4202
4201
  return !ke && G === !0;
4203
4202
  }
4204
- const Y = re(() => P("fontWeight")), ze = re(() => P("fontStyle")), Pe = re(() => P("underline")), Ze = re(() => P("strikethrough"));
4203
+ const Y = ie(() => P("fontWeight")), ze = ie(() => P("fontStyle")), Pe = ie(() => P("underline")), Ze = ie(() => P("strikethrough"));
4205
4204
  function Fe() {
4206
4205
  te("fontWeight", Y.value ? "" : "bold");
4207
4206
  }
4208
4207
  function D() {
4209
4208
  te("fontStyle", ze.value ? "" : "italic");
4210
4209
  }
4211
- function E() {
4210
+ function F() {
4212
4211
  te("underline", Pe.value ? "" : "underline");
4213
4212
  }
4214
4213
  function X() {
@@ -4236,7 +4235,7 @@ function Yi(e, n) {
4236
4235
  function I() {
4237
4236
  te("backgroundColor", ne.value === "" ? "" : ne.value);
4238
4237
  }
4239
- const W = re(() => {
4238
+ const W = ie(() => {
4240
4239
  var ke;
4241
4240
  const h = e.selection.value;
4242
4241
  if (!h)
@@ -4251,7 +4250,7 @@ function Yi(e, n) {
4251
4250
  $ === void 0 ? $ = We : We !== $ && (G = !0);
4252
4251
  }
4253
4252
  return G ? "" : $ ?? "";
4254
- }), le = re(() => {
4253
+ }), le = ie(() => {
4255
4254
  var ke;
4256
4255
  const h = e.selection.value;
4257
4256
  if (!h)
@@ -4266,7 +4265,7 @@ function Yi(e, n) {
4266
4265
  $ === void 0 ? $ = We : We !== $ && (G = !0);
4267
4266
  }
4268
4267
  return G ? "" : $ ?? "";
4269
- }), fe = re(() => Jo(e.locale.value)), Be = H(!1), Ne = re(() => {
4268
+ }), fe = ie(() => Jo(e.locale.value)), Be = H(!1), Ne = ie(() => {
4270
4269
  var ke;
4271
4270
  const h = e.selection.value;
4272
4271
  if (!h)
@@ -4304,12 +4303,12 @@ function Yi(e, n) {
4304
4303
  saveUndo: b,
4305
4304
  undo: s,
4306
4305
  redo: k,
4307
- canUndo: B,
4308
- canRedo: F,
4306
+ canUndo: S,
4307
+ canRedo: A,
4309
4308
  hasSelection: w,
4310
4309
  paintFmt: M,
4311
- onPaintFormat: S,
4312
- applyPaintFormat: ie,
4310
+ onPaintFormat: B,
4311
+ applyPaintFormat: ae,
4313
4312
  clearFormat: ue,
4314
4313
  fontFamilyOptions: m,
4315
4314
  fontSizeOptions: L,
@@ -4341,7 +4340,7 @@ function Yi(e, n) {
4341
4340
  selStrikethrough: Ze,
4342
4341
  toggleFontWeight: Fe,
4343
4342
  toggleFontStyle: D,
4344
- toggleUnderline: E,
4343
+ toggleUnderline: F,
4345
4344
  toggleStrikethrough: X,
4346
4345
  cachedTextColor: ve,
4347
4346
  cachedFillColor: ne,
@@ -4418,7 +4417,7 @@ function Xi(e, n) {
4418
4417
  if (c && (y === "Top" && (f !== c.range.startCol || T !== c.range.startRow) || y === "Bottom" && (f !== c.range.startCol || T !== c.range.endRow) || y === "Left" && (f !== c.range.startCol || T !== c.range.startRow) || y === "Right" && (f !== c.range.endCol || T !== c.range.startRow)))
4419
4418
  return;
4420
4419
  const C = c ? c.anchor : e.cellKey(f, T), x = ((Fe = e.cells[C]) == null ? void 0 : Fe.value) ?? "", P = (D = e.cells[C]) != null && D.style ? { ...e.cells[C].style } : {}, Y = `border${y}Width`;
4421
- U === 0 ? R && Reflect.deleteProperty(P, Y) : (P[Y] = U, P.borderColor = r), ["Top", "Bottom", "Left", "Right"].some((E) => P[`border${E}Width`] !== void 0) || Reflect.deleteProperty(P, "borderColor");
4420
+ U === 0 ? R && Reflect.deleteProperty(P, Y) : (P[Y] = U, P.borderColor = r), ["Top", "Bottom", "Left", "Right"].some((F) => P[`border${F}Width`] !== void 0) || Reflect.deleteProperty(P, "borderColor");
4422
4421
  const Ze = Object.keys(P).length ? P : null;
4423
4422
  x === "" && Ze === null ? e.delCell(C) : e.cells[C] = { value: x, style: Ze };
4424
4423
  }
@@ -4436,8 +4435,8 @@ function Xi(e, n) {
4436
4435
  var Ze, Fe;
4437
4436
  const R = e.findMerge(f, T), c = R ? R.anchor : e.cellKey(f, T), C = ((Ze = e.cells[c]) == null ? void 0 : Ze.value) ?? "", x = (Fe = e.cells[c]) != null && Fe.style ? { ...e.cells[c].style } : {}, P = ["Top", "Bottom", "Left", "Right"], Y = [y.top, y.bottom, y.left, y.right];
4438
4437
  for (let D = 0; D < 4; D++) {
4439
- const E = `border${P[D]}Width`;
4440
- Y[D] === 0 ? U && Reflect.deleteProperty(x, E) : (x[E] = Y[D], x.borderColor = r);
4438
+ const F = `border${P[D]}Width`;
4439
+ Y[D] === 0 ? U && Reflect.deleteProperty(x, F) : (x[F] = Y[D], x.borderColor = r);
4441
4440
  }
4442
4441
  P.some((D) => x[`border${D}Width`] !== void 0) || Reflect.deleteProperty(x, "borderColor");
4443
4442
  const Pe = Object.keys(x).length ? x : null;
@@ -4466,10 +4465,10 @@ function Xi(e, n) {
4466
4465
  (y = e.scheduleRender) == null || y.call(e), (U = e.emitModelData) == null || U.call(e);
4467
4466
  }
4468
4467
  }
4469
- function B() {
4468
+ function S() {
4470
4469
  k(l.value);
4471
4470
  }
4472
- function F(f, T, y) {
4471
+ function A(f, T, y) {
4473
4472
  var c, C;
4474
4473
  const U = e.findMerge(f, T);
4475
4474
  if (U) {
@@ -4483,7 +4482,7 @@ function Xi(e, n) {
4483
4482
  function M(f) {
4484
4483
  w.value = f, f && (n.textColorMenuOpen.value = !1, n.fillColorMenuOpen.value = !1, t.value = !1, n.fontSizeMenuOpen.value = !1);
4485
4484
  }
4486
- function S(f, T, y, U) {
4485
+ function B(f, T, y, U) {
4487
4486
  const R = [];
4488
4487
  for (const c in e.merges) {
4489
4488
  const C = e.merges[c];
@@ -4492,12 +4491,12 @@ function Xi(e, n) {
4492
4491
  for (const c of R)
4493
4492
  Reflect.deleteProperty(e.merges, c);
4494
4493
  }
4495
- function ie() {
4494
+ function ae() {
4496
4495
  var R, c, C, x;
4497
4496
  const f = e.selection.value;
4498
4497
  if (!f || f.startCol === f.endCol && f.startRow === f.endRow)
4499
4498
  return;
4500
- n.saveUndo(), S(f.startCol, f.startRow, f.endCol, f.endRow);
4499
+ n.saveUndo(), B(f.startCol, f.startRow, f.endCol, f.endRow);
4501
4500
  const T = e.cellKey(f.startCol, f.startRow), y = ((R = e.cells[T]) == null ? void 0 : R.value) ?? "";
4502
4501
  for (let P = f.startCol; P <= f.endCol; P++)
4503
4502
  for (let Y = f.startRow; Y <= f.endRow; Y++)
@@ -4511,7 +4510,7 @@ function Xi(e, n) {
4511
4510
  if (!(!f || f.startCol === f.endCol)) {
4512
4511
  n.saveUndo();
4513
4512
  for (let R = f.startRow; R <= f.endRow; R++) {
4514
- S(f.startCol, R, f.endCol, R);
4513
+ B(f.startCol, R, f.endCol, R);
4515
4514
  const c = e.cellKey(f.startCol, R);
4516
4515
  (T = e.cells[c]) == null || T.value;
4517
4516
  for (let C = f.startCol + 1; C <= f.endCol; C++)
@@ -4526,7 +4525,7 @@ function Xi(e, n) {
4526
4525
  const f = e.selection.value;
4527
4526
  if (!f || f.startCol === f.endCol && f.startRow === f.endRow)
4528
4527
  return;
4529
- n.saveUndo(), S(f.startCol, f.startRow, f.endCol, f.endRow);
4528
+ n.saveUndo(), B(f.startCol, f.startRow, f.endCol, f.endRow);
4530
4529
  const T = e.cellKey(f.startCol, f.startRow);
4531
4530
  (y = e.cells[T]) == null || y.value;
4532
4531
  for (let c = f.startCol; c <= f.endCol; c++)
@@ -4537,19 +4536,19 @@ function Xi(e, n) {
4537
4536
  function L() {
4538
4537
  var T, y;
4539
4538
  const f = e.selection.value;
4540
- f && (n.saveUndo(), S(f.startCol, f.startRow, f.endCol, f.endRow), (T = e.scheduleRender) == null || T.call(e), (y = e.emitModelData) == null || y.call(e));
4539
+ f && (n.saveUndo(), B(f.startCol, f.startRow, f.endCol, f.endRow), (T = e.scheduleRender) == null || T.call(e), (y = e.emitModelData) == null || y.call(e));
4541
4540
  }
4542
4541
  function Z() {
4543
4542
  const f = e.selection.value;
4544
4543
  if (!f)
4545
4544
  return;
4546
4545
  const T = e.findMerge(f.startCol, f.startRow);
4547
- T && f.startCol === T.range.startCol && f.startRow === T.range.startRow && f.endCol === T.range.endCol && f.endRow === T.range.endRow ? L() : ie();
4546
+ T && f.startCol === T.range.startCol && f.startRow === T.range.startRow && f.endCol === T.range.endCol && f.endRow === T.range.endRow ? L() : ae();
4548
4547
  }
4549
4548
  function ce(f) {
4550
4549
  switch (f) {
4551
4550
  case "mergeCenter":
4552
- ie();
4551
+ ae();
4553
4552
  break;
4554
4553
  case "mergeAcross":
4555
4554
  ue();
@@ -4773,12 +4772,12 @@ function Xi(e, n) {
4773
4772
  setCellBorderSide: o,
4774
4773
  syncCellBorders: b,
4775
4774
  applyBorderToCell: s,
4776
- applyCachedBorder: B,
4777
- cellBorderWidth: F,
4775
+ applyCachedBorder: S,
4776
+ cellBorderWidth: A,
4778
4777
  mergeMenuOpen: w,
4779
4778
  onMergeMenuToggle: M,
4780
- removeOverlappingMerges: S,
4781
- mergeAndCenter: ie,
4779
+ removeOverlappingMerges: B,
4780
+ mergeAndCenter: ae,
4782
4781
  mergeAcross: ue,
4783
4782
  mergeCells: m,
4784
4783
  unmergeCells: L,
@@ -4808,10 +4807,10 @@ function ji(e, n, l, t) {
4808
4807
  return u != null && (r.width = `${u}px`), o != null && (r.height = `${o}px`), r["--sp-formula-bar-bg"] = e.formulaBarBg, r["--sp-formula-bar-border"] = e.formulaBarBorder, r["--sp-formula-bar-label-color"] = e.formulaBarLabelText, r["--sp-formula-bar-label-bg"] = e.formulaBarLabelBg, r["--sp-formula-bar-label-border"] = e.formulaBarLabelBorder, r["--sp-formula-bar-input-bg"] = e.formulaBarInputBg, r["--sp-formula-bar-input-border"] = e.formulaBarInputBorder, r["--sp-formula-bar-input-color"] = e.formulaBarInputText, r["--sp-formula-bar-input-focus-border"] = e.formulaBarInputFocusBorder, r["--sp-formula-bar-input-focus-shadow"] = e.formulaBarInputFocusShadow, r["--sp-wrapper-bg"] = e.wrapperBg, r["--sp-cell-editor-border"] = e.cellEditorBorder, r["--sp-cell-editor-color"] = e.cellEditorText, r["--sp-cell-editor-bg"] = e.cellEditorBg, r["--sp-cell-editor-shadow"] = e.cellEditorShadow, r["--sp-tab-bar-bg"] = e.tabBarBg, r["--sp-tab-bar-border"] = e.tabBarBorder, r["--sp-tab-active-bg"] = e.tabActiveBg, r["--sp-tab-active-color"] = e.tabActiveText, r["--sp-tab-active-border"] = e.tabActiveBorder, r["--sp-tab-inactive-bg"] = e.tabInactiveBg, r["--sp-tab-inactive-color"] = e.tabInactiveText, r["--sp-tab-inactive-border"] = e.tabInactiveBorder, r["--sp-tab-hover-bg"] = e.tabHoverBg, r["--sp-tab-add-btn-color"] = e.tabAddBtnColor, r["--sp-tab-add-btn-hover-bg"] = e.tabAddBtnHoverBg, r["--sp-tab-scroll-btn-color"] = e.tabScrollBtnColor, r["--sp-tab-scroll-btn-hover-bg"] = e.tabScrollBtnHoverBg, r["--sp-scroll-thumb"] = e.scrollbarThumb, r["--sp-scroll-thumb-hover"] = e.scrollbarThumbHover, r["--sp-scroll-btn-bg"] = e.scrollBtnBg, r["--sp-scroll-btn-color"] = e.scrollBtnColor, r["--sp-scroll-btn-hover-bg"] = e.scrollBtnHoverBg, r["--sp-scroll-btn-active-bg"] = e.scrollBtnActiveBg, r["--sp-scroll-track-bg"] = e.scrollTrackBg, r["--sp-toolbar-bg"] = e.toolbarBg, r["--sp-toolbar-border"] = e.toolbarBorder, r["--sp-toolbar-btn-color"] = e.toolbarBtnColor, r["--sp-toolbar-btn-hover-bg"] = e.toolbarBtnHoverBg, r["--sp-toolbar-btn-disabled-color"] = e.toolbarBtnDisabledColor, r["--sp-toolbar-btn-active-color"] = e.toolbarBtnActiveColor, r;
4809
4808
  }
4810
4809
  function Zi(e, n, l, t, r) {
4811
- function u(D, E) {
4810
+ function u(D, F) {
4812
4811
  var ne, de;
4813
- const X = E - D + 1, ve = B(D, E);
4814
- for (let q = D; q <= E; q++)
4812
+ const X = F - D + 1, ve = S(D, F);
4813
+ for (let q = D; q <= F; q++)
4815
4814
  for (let _ = 0; _ < e.colCount; _++)
4816
4815
  e.delCell(e.cellKey(_, q));
4817
4816
  for (let q = D; q < e.rowCount - X; q++) {
@@ -4830,48 +4829,48 @@ function Zi(e, n, l, t, r) {
4830
4829
  for (let q = 0; q < e.colCount; q++)
4831
4830
  (ne = e.syncCellBorders) == null || ne.call(e, q, D - 1), (de = e.syncCellBorders) == null || de.call(e, q, D);
4832
4831
  }
4833
- function o(D, E) {
4834
- const X = E - D + 1;
4835
- if (E >= e.rowCount - 1)
4832
+ function o(D, F) {
4833
+ const X = F - D + 1;
4834
+ if (F >= e.rowCount - 1)
4836
4835
  return;
4837
- const ve = w(D, E);
4838
- for (let ne = e.rowCount - 1; ne > E; ne--) {
4836
+ const ve = w(D, F);
4837
+ for (let ne = e.rowCount - 1; ne > F; ne--) {
4839
4838
  for (let de = 0; de < e.colCount; de++) {
4840
4839
  const q = e.cellKey(de, ne - X), _ = e.cellKey(de, ne);
4841
4840
  e.cells[q] ? e.cells[_] = e.cells[q] : e.delCell(_);
4842
4841
  }
4843
4842
  e.rowHeights.value[ne] = e.rowHeights.value[ne - X];
4844
4843
  }
4845
- for (let ne = E + 1; ne <= E + X; ne++) {
4844
+ for (let ne = F + 1; ne <= F + X; ne++) {
4846
4845
  for (let de = 0; de < e.colCount; de++)
4847
4846
  e.delCell(e.cellKey(de, ne));
4848
4847
  e.rowHeights.value[ne] = void 0;
4849
4848
  }
4850
4849
  k(ve);
4851
4850
  }
4852
- function b(D, E) {
4853
- const X = E - D + 1;
4854
- if (E >= e.colCount - 1)
4851
+ function b(D, F) {
4852
+ const X = F - D + 1;
4853
+ if (F >= e.colCount - 1)
4855
4854
  return;
4856
- const ve = M(D, E);
4857
- for (let ne = e.colCount - 1; ne > E; ne--) {
4855
+ const ve = M(D, F);
4856
+ for (let ne = e.colCount - 1; ne > F; ne--) {
4858
4857
  for (let de = 0; de < e.rowCount; de++) {
4859
4858
  const q = e.cellKey(ne - X, de), _ = e.cellKey(ne, de);
4860
4859
  e.cells[q] ? e.cells[_] = e.cells[q] : e.delCell(_);
4861
4860
  }
4862
4861
  e.colWidths.value[ne] = e.colWidths.value[ne - X];
4863
4862
  }
4864
- for (let ne = E + 1; ne <= E + X; ne++) {
4863
+ for (let ne = F + 1; ne <= F + X; ne++) {
4865
4864
  for (let de = 0; de < e.rowCount; de++)
4866
4865
  e.delCell(e.cellKey(ne, de));
4867
4866
  e.colWidths.value[ne] = gl;
4868
4867
  }
4869
4868
  k(ve);
4870
4869
  }
4871
- function s(D, E) {
4870
+ function s(D, F) {
4872
4871
  var ne, de;
4873
- const X = E - D + 1, ve = F(D, E);
4874
- for (let q = D; q <= E; q++)
4872
+ const X = F - D + 1, ve = A(D, F);
4873
+ for (let q = D; q <= F; q++)
4875
4874
  for (let _ = 0; _ < e.rowCount; _++)
4876
4875
  e.delCell(e.cellKey(q, _));
4877
4876
  for (let q = D; q < e.colCount - X; q++) {
@@ -4891,22 +4890,22 @@ function Zi(e, n, l, t, r) {
4891
4890
  (ne = e.syncCellBorders) == null || ne.call(e, D - 1, q), (de = e.syncCellBorders) == null || de.call(e, D, q);
4892
4891
  }
4893
4892
  function k(D) {
4894
- Object.keys(e.merges).forEach((E) => Reflect.deleteProperty(e.merges, E));
4895
- for (const E of D)
4896
- if (!(E.newRange.startCol > E.newRange.endCol || E.newRange.startRow > E.newRange.endRow) && (e.merges[E.newAnchorKey] = { ...E.newRange }, E.anchorCell)) {
4897
- const X = E.anchorCell.value, ve = E.anchorCell.style;
4898
- X === "" && (!ve || Object.keys(ve).length === 0) || (e.cells[E.newAnchorKey] = { value: X, style: ve && Object.keys(ve).length ? { ...ve } : null });
4893
+ Object.keys(e.merges).forEach((F) => Reflect.deleteProperty(e.merges, F));
4894
+ for (const F of D)
4895
+ if (!(F.newRange.startCol > F.newRange.endCol || F.newRange.startRow > F.newRange.endRow) && (e.merges[F.newAnchorKey] = { ...F.newRange }, F.anchorCell)) {
4896
+ const X = F.anchorCell.value, ve = F.anchorCell.style;
4897
+ X === "" && (!ve || Object.keys(ve).length === 0) || (e.cells[F.newAnchorKey] = { value: X, style: ve && Object.keys(ve).length ? { ...ve } : null });
4899
4898
  }
4900
4899
  }
4901
- function B(D, E) {
4902
- const X = E - D + 1, ve = [];
4900
+ function S(D, F) {
4901
+ const X = F - D + 1, ve = [];
4903
4902
  for (const ne in e.merges) {
4904
4903
  const de = e.merges[ne];
4905
4904
  if (!de)
4906
4905
  continue;
4907
4906
  const q = e.cells[ne] ? { value: e.cells[ne].value, style: e.cells[ne].style ? { ...e.cells[ne].style } : null } : { value: "", style: null }, { startCol: _, endCol: xe } = de;
4908
4907
  let { startRow: Te, endRow: st } = de;
4909
- if (Te > E) {
4908
+ if (Te > F) {
4910
4909
  Te -= X, st -= X, ve.push({
4911
4910
  newAnchorKey: e.cellKey(_, Te),
4912
4911
  newRange: { startCol: _, startRow: Te, endCol: xe, endRow: st }
@@ -4917,9 +4916,9 @@ function Zi(e, n, l, t, r) {
4917
4916
  ve.push({ newAnchorKey: ne, newRange: { startCol: _, startRow: Te, endCol: xe, endRow: st } });
4918
4917
  continue;
4919
4918
  }
4920
- if (Te >= D && st <= E || (Te >= D && Te <= E && (Te = D), st >= D && st <= E ? st = D - 1 : st > E && (st -= X), Te > st))
4919
+ if (Te >= D && st <= F || (Te >= D && Te <= F && (Te = D), st >= D && st <= F ? st = D - 1 : st > F && (st -= X), Te > st))
4921
4920
  continue;
4922
- const at = _, O = Te, I = e.cellKey(at, O), le = ne.split(",").map(Number)[1], fe = le >= D && le <= E || at !== de.startCol || O !== le;
4921
+ const at = _, O = Te, I = e.cellKey(at, O), le = ne.split(",").map(Number)[1], fe = le >= D && le <= F || at !== de.startCol || O !== le;
4923
4922
  ve.push({
4924
4923
  newAnchorKey: I,
4925
4924
  newRange: { startCol: _, startRow: Te, endCol: xe, endRow: st },
@@ -4928,8 +4927,8 @@ function Zi(e, n, l, t, r) {
4928
4927
  }
4929
4928
  return ve;
4930
4929
  }
4931
- function F(D, E) {
4932
- const X = E - D + 1, ve = [];
4930
+ function A(D, F) {
4931
+ const X = F - D + 1, ve = [];
4933
4932
  for (const ne in e.merges) {
4934
4933
  const de = e.merges[ne];
4935
4934
  if (!de)
@@ -4937,7 +4936,7 @@ function Zi(e, n, l, t, r) {
4937
4936
  const q = e.cells[ne] ? { value: e.cells[ne].value, style: e.cells[ne].style ? { ...e.cells[ne].style } : null } : { value: "", style: null };
4938
4937
  let { startCol: _, endCol: xe } = de;
4939
4938
  const { startRow: Te, endRow: st } = de;
4940
- if (_ > E) {
4939
+ if (_ > F) {
4941
4940
  _ -= X, xe -= X, ve.push({ newAnchorKey: e.cellKey(_, Te), newRange: { startCol: _, startRow: Te, endCol: xe, endRow: st } });
4942
4941
  continue;
4943
4942
  }
@@ -4945,9 +4944,9 @@ function Zi(e, n, l, t, r) {
4945
4944
  ve.push({ newAnchorKey: ne, newRange: { startCol: _, startRow: Te, endCol: xe, endRow: st } });
4946
4945
  continue;
4947
4946
  }
4948
- if (_ >= D && xe <= E || (_ >= D && _ <= E && (_ = D), xe >= D && xe <= E ? xe = D - 1 : xe > E && (xe -= X), _ > xe))
4947
+ if (_ >= D && xe <= F || (_ >= D && _ <= F && (_ = D), xe >= D && xe <= F ? xe = D - 1 : xe > F && (xe -= X), _ > xe))
4949
4948
  continue;
4950
- const at = _, O = Te, I = e.cellKey(at, O), le = ne.split(",").map(Number)[0], fe = le >= D && le <= E || at !== le || O !== de.startRow;
4949
+ const at = _, O = Te, I = e.cellKey(at, O), le = ne.split(",").map(Number)[0], fe = le >= D && le <= F || at !== le || O !== de.startRow;
4951
4950
  ve.push({
4952
4951
  newAnchorKey: I,
4953
4952
  newRange: { startCol: _, startRow: Te, endCol: xe, endRow: st },
@@ -4956,37 +4955,37 @@ function Zi(e, n, l, t, r) {
4956
4955
  }
4957
4956
  return ve;
4958
4957
  }
4959
- function w(D, E) {
4960
- const X = E - D + 1, ve = [];
4958
+ function w(D, F) {
4959
+ const X = F - D + 1, ve = [];
4961
4960
  for (const ne in e.merges) {
4962
4961
  const de = e.merges[ne];
4963
4962
  if (!de)
4964
4963
  continue;
4965
4964
  const { startCol: q, endCol: _ } = de;
4966
4965
  let { startRow: xe, endRow: Te } = de;
4967
- Te < D ? ve.push({ newAnchorKey: ne, newRange: { startCol: q, startRow: xe, endCol: _, endRow: Te } }) : xe > E ? (xe += X, Te += X, ve.push({ newAnchorKey: e.cellKey(q, xe), newRange: { startCol: q, startRow: xe, endCol: _, endRow: Te } })) : (Te += X, ve.push({ newAnchorKey: ne, newRange: { startCol: q, startRow: xe, endCol: _, endRow: Te } }));
4966
+ Te < D ? ve.push({ newAnchorKey: ne, newRange: { startCol: q, startRow: xe, endCol: _, endRow: Te } }) : xe > F ? (xe += X, Te += X, ve.push({ newAnchorKey: e.cellKey(q, xe), newRange: { startCol: q, startRow: xe, endCol: _, endRow: Te } })) : (Te += X, ve.push({ newAnchorKey: ne, newRange: { startCol: q, startRow: xe, endCol: _, endRow: Te } }));
4968
4967
  }
4969
4968
  return ve;
4970
4969
  }
4971
- function M(D, E) {
4972
- const X = E - D + 1, ve = [];
4970
+ function M(D, F) {
4971
+ const X = F - D + 1, ve = [];
4973
4972
  for (const ne in e.merges) {
4974
4973
  const de = e.merges[ne];
4975
4974
  if (!de)
4976
4975
  continue;
4977
4976
  let { startCol: q, endCol: _ } = de;
4978
4977
  const { startRow: xe, endRow: Te } = de;
4979
- _ < D ? ve.push({ newAnchorKey: ne, newRange: { startCol: q, startRow: xe, endCol: _, endRow: Te } }) : q > E ? (q += X, _ += X, ve.push({ newAnchorKey: e.cellKey(q, xe), newRange: { startCol: q, startRow: xe, endCol: _, endRow: Te } })) : (_ += X, ve.push({ newAnchorKey: ne, newRange: { startCol: q, startRow: xe, endCol: _, endRow: Te } }));
4978
+ _ < D ? ve.push({ newAnchorKey: ne, newRange: { startCol: q, startRow: xe, endCol: _, endRow: Te } }) : q > F ? (q += X, _ += X, ve.push({ newAnchorKey: e.cellKey(q, xe), newRange: { startCol: q, startRow: xe, endCol: _, endRow: Te } })) : (_ += X, ve.push({ newAnchorKey: ne, newRange: { startCol: q, startRow: xe, endCol: _, endRow: Te } }));
4980
4979
  }
4981
4980
  return ve;
4982
4981
  }
4983
- let S = 0;
4984
- function ie() {
4985
- return S++, `s_${S}`;
4982
+ let B = 0;
4983
+ function ae() {
4984
+ return B++, `s_${B}`;
4986
4985
  }
4987
4986
  function ue(D) {
4988
4987
  return {
4989
- id: ie(),
4988
+ id: ae(),
4990
4989
  name: D,
4991
4990
  cells: {},
4992
4991
  merges: {},
@@ -5004,8 +5003,8 @@ function Zi(e, n, l, t, r) {
5004
5003
  D && (D.cells = { ...e.cells }, D.merges = { ...e.merges }, D.selection = e.selection.value ? { ...e.selection.value } : null, D.activeCell = { ...e.activeCell.value }, D.scrollX = e.scrollX.value, D.scrollY = e.scrollY.value, D.colWidths = [...e.colWidths.value], D.rowHeights = [...e.rowHeights.value]);
5005
5004
  }
5006
5005
  function ce(D) {
5007
- const E = m.value[D];
5008
- E && (Object.keys(e.cells).forEach((X) => e.delCell(X)), Object.assign(e.cells, E.cells), Object.keys(e.merges).forEach((X) => Reflect.deleteProperty(e.merges, X)), E.merges && Object.assign(e.merges, E.merges), e.selection.value = E.selection ? { ...E.selection } : null, e.activeCell.value = { ...E.activeCell }, e.scrollX.value = E.scrollX, e.scrollY.value = E.scrollY, e.colWidths.value = [...E.colWidths], e.rowHeights.value = [...E.rowHeights], L.value = D);
5006
+ const F = m.value[D];
5007
+ F && (Object.keys(e.cells).forEach((X) => e.delCell(X)), Object.assign(e.cells, F.cells), Object.keys(e.merges).forEach((X) => Reflect.deleteProperty(e.merges, X)), F.merges && Object.assign(e.merges, F.merges), e.selection.value = F.selection ? { ...F.selection } : null, e.activeCell.value = { ...F.activeCell }, e.scrollX.value = F.scrollX, e.scrollY.value = F.scrollY, e.colWidths.value = [...F.colWidths], e.rowHeights.value = [...F.rowHeights], L.value = D);
5009
5008
  }
5010
5009
  function Q(D) {
5011
5010
  D === L.value || D < 0 || D >= m.value.length || (e.cancelEdit(), Z(), ce(D));
@@ -5016,15 +5015,15 @@ function Zi(e, n, l, t, r) {
5016
5015
  function ee(D) {
5017
5016
  return m.value.length <= 1 || (n.saveUndo(), e.cancelEdit(), m.value.splice(D, 1), ce(Math.min(D, m.value.length - 1))), L.value;
5018
5017
  }
5019
- function pe(D, E) {
5020
- m.value[D] && E.trim() && (n.saveUndo(), m.value[D].name = E.trim());
5018
+ function pe(D, F) {
5019
+ m.value[D] && F.trim() && (n.saveUndo(), m.value[D].name = F.trim());
5021
5020
  }
5022
5021
  function Ve(D) {
5023
5022
  n.saveUndo(), e.cancelEdit(), Z();
5024
- const E = m.value[D];
5025
- if (!E)
5023
+ const F = m.value[D];
5024
+ if (!F)
5026
5025
  return D;
5027
- let X = E.name;
5026
+ let X = F.name;
5028
5027
  const ve = X.match(/^(.*?)\s*\((\d+)\)$/);
5029
5028
  let ne = ve ? parseInt(ve[2], 10) + 1 : 2;
5030
5029
  ve && (X = ve[1]);
@@ -5033,29 +5032,29 @@ function Zi(e, n, l, t, r) {
5033
5032
  for (; q.has(de); )
5034
5033
  ne++, de = `${X} (${ne})`;
5035
5034
  const _ = {
5036
- id: ie(),
5035
+ id: ae(),
5037
5036
  name: de,
5038
- cells: { ...E.cells },
5039
- merges: E.merges ? { ...E.merges } : {},
5040
- selection: E.selection ? { ...E.selection } : null,
5041
- activeCell: E.activeCell ? { ...E.activeCell } : { col: 0, row: 0 },
5042
- scrollX: E.scrollX,
5043
- scrollY: E.scrollY,
5044
- colWidths: [...E.colWidths],
5045
- rowHeights: [...E.rowHeights]
5037
+ cells: { ...F.cells },
5038
+ merges: F.merges ? { ...F.merges } : {},
5039
+ selection: F.selection ? { ...F.selection } : null,
5040
+ activeCell: F.activeCell ? { ...F.activeCell } : { col: 0, row: 0 },
5041
+ scrollX: F.scrollX,
5042
+ scrollY: F.scrollY,
5043
+ colWidths: [...F.colWidths],
5044
+ rowHeights: [...F.rowHeights]
5046
5045
  };
5047
5046
  return m.value.splice(D + 1, 0, _), ce(D + 1), D + 1;
5048
5047
  }
5049
- function Ye(D, E) {
5048
+ function Ye(D, F) {
5050
5049
  var de;
5051
- const X = D + E;
5050
+ const X = D + F;
5052
5051
  if (X < 0 || X >= m.value.length)
5053
5052
  return;
5054
5053
  n.saveUndo();
5055
5054
  const ve = L.value, ne = m.value.splice(D, 1)[0];
5056
5055
  m.value.splice(X, 0, ne), ve === D ? L.value = X : D < ve && X >= ve ? L.value = ve - 1 : D > ve && X <= ve && (L.value = ve + 1), (de = e.scheduleRender) == null || de.call(e);
5057
5056
  }
5058
- const mt = re(() => m.value.length);
5057
+ const mt = ie(() => m.value.length);
5059
5058
  let ot = "";
5060
5059
  const ut = l;
5061
5060
  function me() {
@@ -5076,8 +5075,8 @@ function Zi(e, n, l, t, r) {
5076
5075
  xe != null && (q[_] = xe);
5077
5076
  }
5078
5077
  return Object.keys(q).length && (ne.rowHeights = q), ne;
5079
- }), E = JSON.stringify(D);
5080
- E !== ot && (ot = E, ut.value = D, r && (r.value = E));
5078
+ }), F = JSON.stringify(D);
5079
+ F !== ot && (ot = F, ut.value = D, r && (r.value = F));
5081
5080
  }
5082
5081
  e.emitModelData = me;
5083
5082
  let ge = !1;
@@ -5086,19 +5085,19 @@ function Zi(e, n, l, t, r) {
5086
5085
  ge = !1, me();
5087
5086
  }));
5088
5087
  }
5089
- const se = re(() => e.props.theme === "dark" ? Oo : Ao), a = re(() => ji(se.value, e.props.width, e.props.height, ul)), v = re(() => {
5088
+ const se = ie(() => e.props.theme === "dark" ? Oo : Ao), a = ie(() => ji(se.value, e.props.width, e.props.height, ul)), v = ie(() => {
5090
5089
  const D = {};
5091
- for (const [E, X] of Object.entries(a.value))
5092
- E.startsWith("--") && (D[E] = X);
5090
+ for (const [F, X] of Object.entries(a.value))
5091
+ F.startsWith("--") && (D[F] = X);
5093
5092
  return D;
5094
5093
  }), he = H(null), Ie = H(null), f = H(null), T = H(null), y = Kt({ w: 800, h: 600 });
5095
5094
  e.viewSize && vt(y, (D) => {
5096
5095
  e.viewSize && (e.viewSize.w = D.w, e.viewSize.h = D.h);
5097
5096
  }, { deep: !0 });
5098
- const U = 48, R = 28, c = 11, C = re(() => Math.max(0, e.totalWidth.value - Math.max(0, y.w - U - c))), x = re(() => Math.max(0, e.totalHeight.value - Math.max(0, y.h - R - c)));
5099
- function P(D, E) {
5097
+ const U = 48, R = 28, c = 11, C = ie(() => Math.max(0, e.totalWidth.value - Math.max(0, y.w - U - c))), x = ie(() => Math.max(0, e.totalHeight.value - Math.max(0, y.h - R - c)));
5098
+ function P(D, F) {
5100
5099
  const X = Math.max(0, y.w - U - c), ve = Math.max(0, y.h - R - c);
5101
- e.scrollX.value = Math.max(0, Math.min(D ?? e.scrollX.value, Math.max(0, e.totalWidth.value - X))), e.scrollY.value = Math.max(0, Math.min(E ?? e.scrollY.value, Math.max(0, e.totalHeight.value - ve)));
5100
+ e.scrollX.value = Math.max(0, Math.min(D ?? e.scrollX.value, Math.max(0, e.totalWidth.value - X))), e.scrollY.value = Math.max(0, Math.min(F ?? e.scrollY.value, Math.max(0, e.totalHeight.value - ve)));
5102
5101
  }
5103
5102
  e.clampScroll = P;
5104
5103
  function Y() {
@@ -5107,13 +5106,13 @@ function Zi(e, n, l, t, r) {
5107
5106
  }
5108
5107
  function ze(D = !1) {
5109
5108
  Je(() => {
5110
- const E = f.value;
5111
- if (E) {
5109
+ const F = f.value;
5110
+ if (F) {
5112
5111
  if (!e.editingCell.value && !Y()) {
5113
- document.activeElement === E && E.blur();
5112
+ document.activeElement === F && F.blur();
5114
5113
  return;
5115
5114
  }
5116
- E.focus({ preventScroll: !0 }), D && E.select();
5115
+ F.focus({ preventScroll: !0 }), D && F.select();
5117
5116
  }
5118
5117
  });
5119
5118
  }
@@ -5121,23 +5120,23 @@ function Zi(e, n, l, t, r) {
5121
5120
  ze();
5122
5121
  }
5123
5122
  function Ze() {
5124
- var E;
5123
+ var F;
5125
5124
  const D = e.selection.value;
5126
5125
  if (D) {
5127
5126
  n.saveUndo();
5128
5127
  for (let X = D.startRow; X <= D.endRow; X++)
5129
5128
  e.rowHeights.value[X] = void 0;
5130
- (E = e.scheduleRender) == null || E.call(e), me();
5129
+ (F = e.scheduleRender) == null || F.call(e), me();
5131
5130
  }
5132
5131
  }
5133
5132
  function Fe() {
5134
- var E;
5133
+ var F;
5135
5134
  const D = e.selection.value;
5136
5135
  if (D) {
5137
5136
  n.saveUndo();
5138
5137
  for (let X = D.startCol; X <= D.endCol; X++)
5139
5138
  e.colWidths.value[X] = gl;
5140
- (E = e.scheduleRender) == null || E.call(e), me();
5139
+ (F = e.scheduleRender) == null || F.call(e), me();
5141
5140
  }
5142
5141
  }
5143
5142
  return {
@@ -5182,12 +5181,12 @@ function qi(e, n, l, t, r) {
5182
5181
  let u = !1, o = null, b = 1;
5183
5182
  function s() {
5184
5183
  u || (u = !0, requestAnimationFrame(() => {
5185
- u = !1, B();
5184
+ u = !1, S();
5186
5185
  }));
5187
5186
  }
5188
5187
  e.scheduleRender = s;
5189
5188
  const k = "#444";
5190
- function B() {
5189
+ function S() {
5191
5190
  var Zl, al, wl, _t, el, kl, gn, pn, hn, bn, yn;
5192
5191
  const i = t.canvasRef.value;
5193
5192
  if (!i)
@@ -5212,25 +5211,25 @@ function qi(e, n, l, t, r) {
5212
5211
  const zt = Ll;
5213
5212
  let nl = Gt, ol = Ht;
5214
5213
  for (const J in e.merges) {
5215
- const ae = e.merges[J];
5216
- ae && (ae.startRow > zt || ae.endRow < Ht || ae.startCol > Yt || ae.endCol < Gt || (ae.startCol < nl && (nl = ae.startCol), ae.startRow < ol && (ol = ae.startRow)));
5214
+ const re = e.merges[J];
5215
+ re && (re.startRow > zt || re.endRow < Ht || re.startCol > Yt || re.endCol < Gt || (re.startCol < nl && (nl = re.startCol), re.startRow < ol && (ol = re.startRow)));
5217
5216
  }
5218
5217
  o.fillStyle = Ke.bg, o.fillRect(0, 0, V, p), o.fillStyle = Ke.gridBg, o.fillRect(Me, we, V - Me, p - we), o.save(), o.beginPath(), o.rect(Me, we, V - Me, p - we), o.clip();
5219
5218
  const Et = e.selection.value, Cl = e.editingCell.value;
5220
5219
  for (let J = ol; J <= zt; J++)
5221
- for (let ae = nl; ae <= Yt; ae++) {
5222
- const Ee = e.findMerge(ae, J);
5223
- if (Ee && !(ae === Ee.range.startCol && J === Ee.range.startRow))
5220
+ for (let re = nl; re <= Yt; re++) {
5221
+ const Ee = e.findMerge(re, J);
5222
+ if (Ee && !(re === Ee.range.startCol && J === Ee.range.startRow))
5224
5223
  continue;
5225
- const Xe = Me + xt[ae] - N, je = we + yt[J] - ye;
5226
- let rt = $t[ae], ct = Ot[J];
5227
- if (Ee && (rt = xt[Ee.range.endCol + 1] - xt[ae], ct = yt[Ee.range.endRow + 1] - yt[J]), Xe + rt < Me || je + ct < we || Xe > V || je > p)
5224
+ const Xe = Me + xt[re] - N, je = we + yt[J] - ye;
5225
+ let rt = $t[re], ct = Ot[J];
5226
+ if (Ee && (rt = xt[Ee.range.endCol + 1] - xt[re], ct = yt[Ee.range.endRow + 1] - yt[J]), Xe + rt < Me || je + ct < we || Xe > V || je > p)
5228
5227
  continue;
5229
- const Ct = e.findHighlight ? e.findHighlight(ae, J) : null, Nt = (Zl = e.cells[e.cellKey(ae, J)]) == null ? void 0 : Zl.style, Xt = typeof (Nt == null ? void 0 : Nt.backgroundColor) == "string" ? Nt.backgroundColor : "";
5230
- if (Xt && (o.fillStyle = Xt, o.fillRect(Xe, je, rt, ct)), Ct && (o.fillStyle = Ct === "active" ? Ke.findActiveBg : Ke.findMatchBg, o.fillRect(Xe, je, rt, ct)), e.isSelected(ae, J) && (o.fillStyle = Ke.selectionBg, e.selectionMode.value === "row" || e.selectionMode.value === "col" ? o.fillRect(Xe, je, $t[ae], Ot[J]) : o.fillRect(Xe, je, rt, ct)), e.activeCell.value.col === ae && e.activeCell.value.row === J && (o.strokeStyle = Ke.activeCellBorder, o.lineWidth = 2, o.strokeRect(Xe + 1, je + 1, rt - 2, ct - 2)), Ct === "active" && (o.strokeStyle = Ke.findActiveBg, o.lineWidth = 2, o.strokeRect(Xe + 1, je + 1, rt - 2, ct - 2)), o.strokeStyle = Ke.gridLine, o.lineWidth = 0.5, o.strokeRect(Xe + 0.25, je + 0.25, rt - 0.5, ct - 0.5), !(Cl && Cl.col === ae && Cl.row === J)) {
5231
- const De = (al = e.cells[e.cellKey(ae, J)]) == null ? void 0 : al.style, kt = e.getCellValue(ae, J), dt = typeof (De == null ? void 0 : De.numberFormat) == "string" ? De.numberFormat : "", pt = kt ? un(kt, dt, e.locale.value) : "";
5228
+ const Ct = e.findHighlight ? e.findHighlight(re, J) : null, Nt = (Zl = e.cells[e.cellKey(re, J)]) == null ? void 0 : Zl.style, Xt = typeof (Nt == null ? void 0 : Nt.backgroundColor) == "string" ? Nt.backgroundColor : "";
5229
+ if (Xt && (o.fillStyle = Xt, o.fillRect(Xe, je, rt, ct)), Ct && (o.fillStyle = Ct === "active" ? Ke.findActiveBg : Ke.findMatchBg, o.fillRect(Xe, je, rt, ct)), e.isSelected(re, J) && (o.fillStyle = Ke.selectionBg, e.selectionMode.value === "row" || e.selectionMode.value === "col" ? o.fillRect(Xe, je, $t[re], Ot[J]) : o.fillRect(Xe, je, rt, ct)), e.activeCell.value.col === re && e.activeCell.value.row === J && (o.strokeStyle = Ke.activeCellBorder, o.lineWidth = 2, o.strokeRect(Xe + 1, je + 1, rt - 2, ct - 2)), Ct === "active" && (o.strokeStyle = Ke.findActiveBg, o.lineWidth = 2, o.strokeRect(Xe + 1, je + 1, rt - 2, ct - 2)), o.strokeStyle = Ke.gridLine, o.lineWidth = 0.5, o.strokeRect(Xe + 0.25, je + 0.25, rt - 0.5, ct - 0.5), !(Cl && Cl.col === re && Cl.row === J)) {
5230
+ const De = (al = e.cells[e.cellKey(re, J)]) == null ? void 0 : al.style, kt = e.getCellValue(re, J), dt = typeof (De == null ? void 0 : De.numberFormat) == "string" ? De.numberFormat : "", pt = kt ? un(kt, dt, e.locale.value) : "";
5232
5231
  if (pt) {
5233
- const ht = e.cellFontSize(ae, J), Ft = typeof (De == null ? void 0 : De.fontFamily) == "string" && De.fontFamily ? De.fontFamily : Fl, et = (De == null ? void 0 : De.fontWeight) === "bold" ? "bold" : "normal", At = (De == null ? void 0 : De.fontStyle) === "italic" ? "italic" : "normal", It = (De == null ? void 0 : De.underline) === "underline", Mt = (De == null ? void 0 : De.strikethrough) === "line-through", rl = typeof (De == null ? void 0 : De.color) == "string" ? De.color : "", Rl = typeof (De == null ? void 0 : De.textAlign) == "string" ? De.textAlign : Dn(kt, dt) ? "right" : "left", xl = typeof (De == null ? void 0 : De.verticalAlign) == "string" ? De.verticalAlign : "top";
5232
+ const ht = e.cellFontSize(re, J), Ft = typeof (De == null ? void 0 : De.fontFamily) == "string" && De.fontFamily ? De.fontFamily : Fl, et = (De == null ? void 0 : De.fontWeight) === "bold" ? "bold" : "normal", At = (De == null ? void 0 : De.fontStyle) === "italic" ? "italic" : "normal", It = (De == null ? void 0 : De.underline) === "underline", Mt = (De == null ? void 0 : De.strikethrough) === "line-through", rl = typeof (De == null ? void 0 : De.color) == "string" ? De.color : "", Rl = typeof (De == null ? void 0 : De.textAlign) == "string" ? De.textAlign : Dn(kt, dt) ? "right" : "left", xl = typeof (De == null ? void 0 : De.verticalAlign) == "string" ? De.verticalAlign : "top";
5234
5233
  o.fillStyle = rl || Ke.cellText, o.font = `${At} ${et} ${ht}px ${Ft}`, o.textBaseline = "alphabetic", o.save(), o.beginPath(), o.rect(Xe + 5, je + 1, rt - 10, ct - 2), o.clip();
5235
5234
  const Cn = (De == null ? void 0 : De.wrap) === "wrap", $l = rt - 10;
5236
5235
  let ql = pt;
@@ -5261,15 +5260,15 @@ function qi(e, n, l, t, r) {
5261
5260
  }
5262
5261
  }
5263
5262
  for (let J = ol; J <= zt; J++)
5264
- for (let ae = nl; ae <= Yt; ae++) {
5265
- const Ee = e.findMerge(ae, J);
5266
- if (Ee && !(ae === Ee.range.startCol && J === Ee.range.startRow))
5263
+ for (let re = nl; re <= Yt; re++) {
5264
+ const Ee = e.findMerge(re, J);
5265
+ if (Ee && !(re === Ee.range.startCol && J === Ee.range.startRow))
5267
5266
  continue;
5268
- const Xe = Me + xt[ae] - N, je = we + yt[J] - ye;
5269
- let rt = $t[ae], ct = Ot[J];
5270
- if (Ee && (rt = xt[Ee.range.endCol + 1] - xt[ae], ct = yt[Ee.range.endRow + 1] - yt[J]), Xe + rt < Me || je + ct < we || Xe > V || je > p)
5267
+ const Xe = Me + xt[re] - N, je = we + yt[J] - ye;
5268
+ let rt = $t[re], ct = Ot[J];
5269
+ if (Ee && (rt = xt[Ee.range.endCol + 1] - xt[re], ct = yt[Ee.range.endRow + 1] - yt[J]), Xe + rt < Me || je + ct < we || Xe > V || je > p)
5271
5270
  continue;
5272
- const Ct = (wl = e.cells[e.cellKey(ae, J)]) == null ? void 0 : wl.style, Nt = (Ct == null ? void 0 : Ct.borderTopWidth) || 0, Xt = (Ct == null ? void 0 : Ct.borderLeftWidth) || 0, De = (Ct == null ? void 0 : Ct.borderBottomWidth) || 0, kt = (Ct == null ? void 0 : Ct.borderRightWidth) || 0;
5271
+ const Ct = (wl = e.cells[e.cellKey(re, J)]) == null ? void 0 : wl.style, Nt = (Ct == null ? void 0 : Ct.borderTopWidth) || 0, Xt = (Ct == null ? void 0 : Ct.borderLeftWidth) || 0, De = (Ct == null ? void 0 : Ct.borderBottomWidth) || 0, kt = (Ct == null ? void 0 : Ct.borderRightWidth) || 0;
5273
5272
  if (o.fillStyle = k, Ee) {
5274
5273
  const dt = Ee.range.startRow, pt = Ee.range.endRow, ht = Ee.range.startCol, Ft = Ee.range.endCol;
5275
5274
  for (let et = ht; et <= Ft; et++) {
@@ -5289,20 +5288,20 @@ function qi(e, n, l, t, r) {
5289
5288
  Mt > 0 && o.fillRect(Xe + rt - Mt, At, Mt, It);
5290
5289
  }
5291
5290
  } else {
5292
- const dt = Math.max(Nt, l.cellBorderWidth(ae, J - 1, "Bottom")), pt = Math.max(Xt, l.cellBorderWidth(ae - 1, J, "Right")), ht = Math.max(De, l.cellBorderWidth(ae, J + 1, "Top")), Ft = Math.max(kt, l.cellBorderWidth(ae + 1, J, "Left"));
5291
+ const dt = Math.max(Nt, l.cellBorderWidth(re, J - 1, "Bottom")), pt = Math.max(Xt, l.cellBorderWidth(re - 1, J, "Right")), ht = Math.max(De, l.cellBorderWidth(re, J + 1, "Top")), Ft = Math.max(kt, l.cellBorderWidth(re + 1, J, "Left"));
5293
5292
  (dt > 0 || pt > 0 || ht > 0 || Ft > 0) && (dt > 0 && o.fillRect(Xe, je, rt, dt), ht > 0 && o.fillRect(Xe, je + ct - ht, rt, ht), pt > 0 && o.fillRect(Xe, je, pt, ct), Ft > 0 && o.fillRect(Xe + rt - Ft, je, Ft, ct));
5294
5293
  }
5295
5294
  }
5296
5295
  for (let J = ol; J <= zt; J++)
5297
- for (let ae = nl; ae <= Yt; ae++) {
5298
- const Ee = e.findMerge(ae, J);
5299
- if (Ee && !(ae === Ee.range.startCol && J === Ee.range.startRow))
5296
+ for (let re = nl; re <= Yt; re++) {
5297
+ const Ee = e.findMerge(re, J);
5298
+ if (Ee && !(re === Ee.range.startCol && J === Ee.range.startRow))
5300
5299
  continue;
5301
- const Xe = Me + xt[ae] - N, je = we + yt[J] - ye;
5302
- let rt = $t[ae], ct = Ot[J];
5303
- if (Ee && (rt = xt[Ee.range.endCol + 1] - xt[ae], ct = yt[Ee.range.endRow + 1] - yt[J]), Xe + rt < Me || je + ct < we || Xe > V || je > p)
5300
+ const Xe = Me + xt[re] - N, je = we + yt[J] - ye;
5301
+ let rt = $t[re], ct = Ot[J];
5302
+ if (Ee && (rt = xt[Ee.range.endCol + 1] - xt[re], ct = yt[Ee.range.endRow + 1] - yt[J]), Xe + rt < Me || je + ct < we || Xe > V || je > p)
5304
5303
  continue;
5305
- const Ct = ((el = (_t = e.cells[e.cellKey(ae, J)]) == null ? void 0 : _t.style) == null ? void 0 : el.borderTopWidth) || 0, Nt = ((gn = (kl = e.cells[e.cellKey(ae, J)]) == null ? void 0 : kl.style) == null ? void 0 : gn.borderLeftWidth) || 0, Xt = ((hn = (pn = e.cells[e.cellKey(ae, J)]) == null ? void 0 : pn.style) == null ? void 0 : hn.borderBottomWidth) || 0, De = ((yn = (bn = e.cells[e.cellKey(ae, J)]) == null ? void 0 : bn.style) == null ? void 0 : yn.borderRightWidth) || 0;
5304
+ const Ct = ((el = (_t = e.cells[e.cellKey(re, J)]) == null ? void 0 : _t.style) == null ? void 0 : el.borderTopWidth) || 0, Nt = ((gn = (kl = e.cells[e.cellKey(re, J)]) == null ? void 0 : kl.style) == null ? void 0 : gn.borderLeftWidth) || 0, Xt = ((hn = (pn = e.cells[e.cellKey(re, J)]) == null ? void 0 : pn.style) == null ? void 0 : hn.borderBottomWidth) || 0, De = ((yn = (bn = e.cells[e.cellKey(re, J)]) == null ? void 0 : bn.style) == null ? void 0 : yn.borderRightWidth) || 0;
5306
5305
  if (o.fillStyle = k, Ee) {
5307
5306
  const kt = Ee.range.startRow, dt = Ee.range.endRow, pt = Ee.range.startCol, ht = Ee.range.endCol, Ft = Math.max(Ct, l.cellBorderWidth(pt, kt - 1, "Bottom")), et = Math.max(Nt, l.cellBorderWidth(pt - 1, kt, "Right"));
5308
5307
  Ft > 0 && et > 0 && o.fillRect(Xe - et, je - Ft, et, Ft);
@@ -5313,23 +5312,23 @@ function qi(e, n, l, t, r) {
5313
5312
  const Rl = Math.max(Xt, l.cellBorderWidth(ht, dt + 1, "Top")), xl = Math.max(De, l.cellBorderWidth(ht + 1, dt, "Left"));
5314
5313
  Rl > 0 && xl > 0 && o.fillRect(Xe + rt, je + ct, xl, Rl);
5315
5314
  } else {
5316
- const kt = Math.max(Ct, l.cellBorderWidth(ae, J - 1, "Bottom")), dt = Math.max(Nt, l.cellBorderWidth(ae - 1, J, "Right")), pt = Math.max(Xt, l.cellBorderWidth(ae, J + 1, "Top")), ht = Math.max(De, l.cellBorderWidth(ae + 1, J, "Left"));
5315
+ const kt = Math.max(Ct, l.cellBorderWidth(re, J - 1, "Bottom")), dt = Math.max(Nt, l.cellBorderWidth(re - 1, J, "Right")), pt = Math.max(Xt, l.cellBorderWidth(re, J + 1, "Top")), ht = Math.max(De, l.cellBorderWidth(re + 1, J, "Left"));
5317
5316
  kt > 0 && dt > 0 && o.fillRect(Xe - dt, je - kt, dt, kt), kt > 0 && ht > 0 && o.fillRect(Xe + rt, je - kt, ht, kt), pt > 0 && dt > 0 && o.fillRect(Xe - dt, je + ct, dt, pt), pt > 0 && ht > 0 && o.fillRect(Xe + rt, je + ct, ht, pt);
5318
5317
  }
5319
5318
  }
5320
5319
  o.restore(), o.fillStyle = Ke.headerBg, o.fillRect(Me, 0, V - Me, we);
5321
5320
  for (let J = Gt; J <= Yt; J++) {
5322
- const ae = Me + xt[J] - N, Ee = $t[J];
5323
- ae + Ee < Me || ae > V || (Et && J >= Et.startCol && J <= Et.endCol && (o.fillStyle = Ke.selectionBg, o.fillRect(ae, 0, Ee, we)), o.strokeStyle = Ke.headerBorder, o.lineWidth = 0.5, o.strokeRect(ae + 0.25, 0.25, Ee - 0.5, we - 0.5), Et && J >= Et.startCol && J <= Et.endCol && (o.strokeStyle = Ke.activeCellBorder, o.lineWidth = 2, o.beginPath(), o.moveTo(ae, we - 1), o.lineTo(ae + Ee, we - 1), o.stroke()), o.fillStyle = Ke.headerText, o.font = '11px -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif', o.textAlign = "center", o.textBaseline = "middle", o.fillText(tt(J), ae + Ee / 2, we / 2));
5321
+ const re = Me + xt[J] - N, Ee = $t[J];
5322
+ re + Ee < Me || re > V || (Et && J >= Et.startCol && J <= Et.endCol && (o.fillStyle = Ke.selectionBg, o.fillRect(re, 0, Ee, we)), o.strokeStyle = Ke.headerBorder, o.lineWidth = 0.5, o.strokeRect(re + 0.25, 0.25, Ee - 0.5, we - 0.5), Et && J >= Et.startCol && J <= Et.endCol && (o.strokeStyle = Ke.activeCellBorder, o.lineWidth = 2, o.beginPath(), o.moveTo(re, we - 1), o.lineTo(re + Ee, we - 1), o.stroke()), o.fillStyle = Ke.headerText, o.font = '11px -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif', o.textAlign = "center", o.textBaseline = "middle", o.fillText(tt(J), re + Ee / 2, we / 2));
5324
5323
  }
5325
5324
  o.strokeStyle = Ke.headerSep, o.lineWidth = 1, o.beginPath(), o.moveTo(Me, we + 0.5), o.lineTo(V, we + 0.5), o.stroke(), o.fillStyle = Ke.headerBg, o.fillRect(0, we, Me, p - we);
5326
5325
  for (let J = Ht; J <= zt; J++) {
5327
- const ae = we + yt[J] - ye, Ee = Ot[J];
5328
- ae + Ee < we || ae > p || (Et && J >= Et.startRow && J <= Et.endRow && (o.fillStyle = Ke.selectionBg, o.fillRect(0, ae, Me, Ee)), o.strokeStyle = Ke.headerBorder, o.lineWidth = 0.5, o.strokeRect(0.25, ae + 0.25, Me - 0.5, Ee - 0.5), Et && J >= Et.startRow && J <= Et.endRow && (o.strokeStyle = Ke.activeCellBorder, o.lineWidth = 2, o.beginPath(), o.moveTo(Me - 1, ae), o.lineTo(Me - 1, ae + Ee), o.stroke()), o.fillStyle = Ke.headerText, o.font = '11px -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif', o.textAlign = "center", o.textBaseline = "middle", o.fillText(String(J + 1), Me / 2, ae + Ee / 2 + 0.5));
5326
+ const re = we + yt[J] - ye, Ee = Ot[J];
5327
+ re + Ee < we || re > p || (Et && J >= Et.startRow && J <= Et.endRow && (o.fillStyle = Ke.selectionBg, o.fillRect(0, re, Me, Ee)), o.strokeStyle = Ke.headerBorder, o.lineWidth = 0.5, o.strokeRect(0.25, re + 0.25, Me - 0.5, Ee - 0.5), Et && J >= Et.startRow && J <= Et.endRow && (o.strokeStyle = Ke.activeCellBorder, o.lineWidth = 2, o.beginPath(), o.moveTo(Me - 1, re), o.lineTo(Me - 1, re + Ee), o.stroke()), o.fillStyle = Ke.headerText, o.font = '11px -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif', o.textAlign = "center", o.textBaseline = "middle", o.fillText(String(J + 1), Me / 2, re + Ee / 2 + 0.5));
5329
5328
  }
5330
5329
  o.strokeStyle = Ke.headerSep, o.lineWidth = 1, o.beginPath(), o.moveTo(Me + 0.5, we), o.lineTo(Me + 0.5, p), o.stroke(), o.fillStyle = Ke.headerBg, o.fillRect(0, 0, Me, we), o.strokeStyle = Ke.headerSep, o.lineWidth = 1, o.strokeRect(0.5, 0.5, Me - 0.5, we - 0.5);
5331
5330
  }
5332
- const F = re(() => tt(e.activeCell.value.col) + String(e.activeCell.value.row + 1)), w = H(""), M = H(!1), S = re(() => e.editingCell.value ? w.value : e.getCellRaw(e.activeCell.value.col, e.activeCell.value.row));
5331
+ const A = ie(() => tt(e.activeCell.value.col) + String(e.activeCell.value.row + 1)), w = H(""), M = H(!1), B = ie(() => e.editingCell.value ? w.value : e.getCellRaw(e.activeCell.value.col, e.activeCell.value.row));
5333
5332
  vt(
5334
5333
  () => e.editingCell.value,
5335
5334
  (i, g) => {
@@ -5346,7 +5345,7 @@ function qi(e, n, l, t, r) {
5346
5345
  e.editingCell.value || (w.value = "", L = !1);
5347
5346
  }
5348
5347
  );
5349
- function ie() {
5348
+ function ae() {
5350
5349
  e.editingCell.value || (e.ensureVisible(e.activeCell.value.col, e.activeCell.value.row), e.startEdit(), s());
5351
5350
  }
5352
5351
  function ue(i) {
@@ -5465,45 +5464,45 @@ function qi(e, n, l, t, r) {
5465
5464
  }
5466
5465
  function he(i, g) {
5467
5466
  i.preventDefault(), i.stopPropagation(), se(i.clientX, i.clientY, [
5468
- { label: A(e.locale.value, "insert"), action: () => {
5467
+ { label: E(e.locale.value, "insert"), action: () => {
5469
5468
  t.addSheet(), s();
5470
5469
  } },
5471
- { label: A(e.locale.value, "copy"), action: () => {
5470
+ { label: E(e.locale.value, "copy"), action: () => {
5472
5471
  t.dupSheet(g);
5473
5472
  } },
5474
- { label: A(e.locale.value, "rename"), action: () => {
5473
+ { label: E(e.locale.value, "rename"), action: () => {
5475
5474
  Ye(g);
5476
5475
  } },
5477
- { label: A(e.locale.value, "delete"), action: () => {
5476
+ { label: E(e.locale.value, "delete"), action: () => {
5478
5477
  t.removeSheet(g), s();
5479
5478
  }, disabled: t.sheetCount.value <= 1 },
5480
- { label: A(e.locale.value, "moveSheetLeft"), action: () => {
5479
+ { label: E(e.locale.value, "moveSheetLeft"), action: () => {
5481
5480
  t.moveSheet(g, -1);
5482
5481
  }, disabled: g === 0 },
5483
- { label: A(e.locale.value, "moveSheetRight"), action: () => {
5482
+ { label: E(e.locale.value, "moveSheetRight"), action: () => {
5484
5483
  t.moveSheet(g, 1);
5485
5484
  }, disabled: g === t.sheets.value.length - 1 }
5486
5485
  ]);
5487
5486
  }
5488
5487
  function Ie(i) {
5489
5488
  i.preventDefault(), !(i.target.closest(".tab-item") || i.target.closest(".tab-bar__add-btn")) && se(i.clientX, i.clientY, [
5490
- { label: A(e.locale.value, "insert"), action: () => {
5489
+ { label: E(e.locale.value, "insert"), action: () => {
5491
5490
  t.addSheet(), s();
5492
5491
  } }
5493
5492
  ]);
5494
5493
  }
5495
5494
  function f(i) {
5496
5495
  i.preventDefault(), e.selectAll(), s(), se(i.clientX, i.clientY, [
5497
- { label: A(e.locale.value, "cut"), action: () => {
5496
+ { label: E(e.locale.value, "cut"), action: () => {
5498
5497
  l.cutSelected(), t.emitModelData();
5499
5498
  } },
5500
- { label: A(e.locale.value, "copy"), action: () => l.copyToClipboard() },
5501
- { label: A(e.locale.value, "paste"), action: () => {
5499
+ { label: E(e.locale.value, "copy"), action: () => l.copyToClipboard() },
5500
+ { label: E(e.locale.value, "paste"), action: () => {
5502
5501
  n.saveUndo(), l.pasteFromClipboard().then(() => {
5503
5502
  s(), Je(() => t.emitModelData());
5504
5503
  });
5505
5504
  } },
5506
- { label: A(e.locale.value, "delete"), action: () => {
5505
+ { label: E(e.locale.value, "delete"), action: () => {
5507
5506
  n.saveUndo(), l.clearSelected();
5508
5507
  for (let g = 0; g < e.colCount; g++)
5509
5508
  e.colWidths.value[g] = gl;
@@ -5519,23 +5518,23 @@ function qi(e, n, l, t, r) {
5519
5518
  p && p.startCol === 0 && p.endCol === e.colCount - 1 && g >= p.startRow && g <= p.endRow || (e.selectRange(0, g, e.colCount - 1, g, "row"), s());
5520
5519
  const N = e.selection.value;
5521
5520
  se(i.clientX, i.clientY, [
5522
- { label: A(e.locale.value, "insert"), action: () => {
5521
+ { label: E(e.locale.value, "insert"), action: () => {
5523
5522
  n.saveUndo(), t.insertRows(N.startRow, N.endRow), s(), t.emitModelData();
5524
5523
  }, disabled: N.endRow >= e.rowCount - 1 },
5525
- { label: A(e.locale.value, "cut"), action: () => {
5524
+ { label: E(e.locale.value, "cut"), action: () => {
5526
5525
  n.saveUndo(), l.copyRowCol(), e.clearCellsInRange(0, e.colCount - 1, N.startRow, N.endRow), s(), t.emitModelData();
5527
5526
  } },
5528
- { label: A(e.locale.value, "copy"), action: () => l.copyRowCol() },
5529
- { label: A(e.locale.value, "paste"), action: () => {
5527
+ { label: E(e.locale.value, "copy"), action: () => l.copyRowCol() },
5528
+ { label: E(e.locale.value, "paste"), action: () => {
5530
5529
  n.saveUndo(), l.pasteFromClipboard().then(() => {
5531
5530
  s(), Je(() => t.emitModelData());
5532
5531
  });
5533
5532
  } },
5534
- { label: A(e.locale.value, "delete"), action: () => {
5533
+ { label: E(e.locale.value, "delete"), action: () => {
5535
5534
  n.saveUndo(), t.deleteRows(N.startRow, N.endRow), s(), t.emitModelData();
5536
5535
  } },
5537
- { label: `${A(e.locale.value, "rowHeight")}...`, action: () => P("row", K, V) },
5538
- { label: A(e.locale.value, "autoRowHeight"), action: () => t.resetRowHeight() }
5536
+ { label: `${E(e.locale.value, "rowHeight")}...`, action: () => P("row", K, V) },
5537
+ { label: E(e.locale.value, "autoRowHeight"), action: () => t.resetRowHeight() }
5539
5538
  ]);
5540
5539
  }
5541
5540
  function y(i, g) {
@@ -5544,45 +5543,45 @@ function qi(e, n, l, t, r) {
5544
5543
  p && p.startRow === 0 && p.endRow === e.rowCount - 1 && g >= p.startCol && g <= p.endCol || (e.selectRange(g, 0, g, e.rowCount - 1, "col"), s());
5545
5544
  const N = e.selection.value;
5546
5545
  se(i.clientX, i.clientY, [
5547
- { label: A(e.locale.value, "insert"), action: () => {
5546
+ { label: E(e.locale.value, "insert"), action: () => {
5548
5547
  n.saveUndo(), t.insertCols(N.startCol, N.endCol), s(), t.emitModelData();
5549
5548
  }, disabled: N.endCol >= e.colCount - 1 },
5550
- { label: A(e.locale.value, "cut"), action: () => {
5549
+ { label: E(e.locale.value, "cut"), action: () => {
5551
5550
  n.saveUndo(), l.copyRowCol(), e.clearCellsInRange(N.startCol, N.endCol, 0, e.rowCount - 1), s(), t.emitModelData();
5552
5551
  } },
5553
- { label: A(e.locale.value, "copy"), action: () => l.copyRowCol() },
5554
- { label: A(e.locale.value, "paste"), action: () => {
5552
+ { label: E(e.locale.value, "copy"), action: () => l.copyRowCol() },
5553
+ { label: E(e.locale.value, "paste"), action: () => {
5555
5554
  n.saveUndo(), l.pasteFromClipboard().then(() => {
5556
5555
  s(), Je(() => t.emitModelData());
5557
5556
  });
5558
5557
  } },
5559
- { label: A(e.locale.value, "delete"), action: () => {
5558
+ { label: E(e.locale.value, "delete"), action: () => {
5560
5559
  n.saveUndo(), t.deleteCols(N.startCol, N.endCol), s(), t.emitModelData();
5561
5560
  } },
5562
- { label: `${A(e.locale.value, "colWidth")}...`, action: () => P("col", K, V) },
5563
- { label: A(e.locale.value, "defaultColWidth"), action: () => t.resetColWidth() }
5561
+ { label: `${E(e.locale.value, "colWidth")}...`, action: () => P("col", K, V) },
5562
+ { label: E(e.locale.value, "defaultColWidth"), action: () => t.resetColWidth() }
5564
5563
  ]);
5565
5564
  }
5566
5565
  function U(i, g, K) {
5567
5566
  i.preventDefault(), e.isSelected(g, K) || (e.selectCell(g, K), s());
5568
5567
  const V = e.selection.value, p = !!(V && V.startCol === V.endCol && V.startRow === V.endRow);
5569
5568
  se(i.clientX, i.clientY, [
5570
- { label: A(e.locale.value, "cut"), action: () => {
5569
+ { label: E(e.locale.value, "cut"), action: () => {
5571
5570
  l.cutSelected(), t.emitModelData();
5572
5571
  } },
5573
- { label: A(e.locale.value, "copy"), action: () => l.copyToClipboard() },
5574
- { label: A(e.locale.value, "paste"), action: () => {
5572
+ { label: E(e.locale.value, "copy"), action: () => l.copyToClipboard() },
5573
+ { label: E(e.locale.value, "paste"), action: () => {
5575
5574
  n.saveUndo(), l.pasteFromClipboard().then(() => {
5576
5575
  s(), Je(() => t.emitModelData());
5577
5576
  });
5578
5577
  } },
5579
- { label: A(e.locale.value, "delete"), action: () => {
5578
+ { label: E(e.locale.value, "delete"), action: () => {
5580
5579
  n.saveUndo(), l.clearSelected(), s(), t.emitModelData();
5581
5580
  } },
5582
- { label: A(e.locale.value, "calculate"), children: [
5583
- { label: A(e.locale.value, "sum"), action: l.sumSelected, disabled: p },
5584
- { label: A(e.locale.value, "avg"), action: l.avgSelected, disabled: p },
5585
- { label: A(e.locale.value, "count"), action: l.countSelected, disabled: p }
5581
+ { label: E(e.locale.value, "calculate"), children: [
5582
+ { label: E(e.locale.value, "sum"), action: l.sumSelected, disabled: p },
5583
+ { label: E(e.locale.value, "avg"), action: l.avgSelected, disabled: p },
5584
+ { label: E(e.locale.value, "count"), action: l.countSelected, disabled: p }
5586
5585
  ] }
5587
5586
  ]);
5588
5587
  }
@@ -5636,11 +5635,11 @@ function qi(e, n, l, t, r) {
5636
5635
  return;
5637
5636
  const K = i.value.trim(), V = Number(K), p = i.type === "row", N = p ? Bl : Sl, ye = p ? Dl : Kl;
5638
5637
  if (K === "" || !Number.isFinite(V)) {
5639
- i.error = A(e.locale.value, "dimNumberError");
5638
+ i.error = E(e.locale.value, "dimNumberError");
5640
5639
  return;
5641
5640
  }
5642
5641
  if (V < N || V > ye) {
5643
- i.error = A(e.locale.value, "dimRangeError").replace("{min}", String(N)).replace("{max}", String(ye));
5642
+ i.error = E(e.locale.value, "dimRangeError").replace("{min}", String(N)).replace("{max}", String(ye));
5644
5643
  return;
5645
5644
  }
5646
5645
  const Me = V;
@@ -5655,7 +5654,7 @@ function qi(e, n, l, t, r) {
5655
5654
  function Fe() {
5656
5655
  x(), c.value = null;
5657
5656
  }
5658
- const D = re(() => {
5657
+ const D = ie(() => {
5659
5658
  var kl;
5660
5659
  const i = !e.editingCell.value, g = e.editingCell.value ?? e.activeCell.value, K = g.col, V = g.row, p = (kl = e.cells[e.cellKey(K, V)]) == null ? void 0 : kl.style, N = e.cellFontSize(K, V), ye = typeof (p == null ? void 0 : p.fontFamily) == "string" && p.fontFamily ? p.fontFamily : Fl, Me = (p == null ? void 0 : p.fontWeight) === "bold" ? "bold" : "normal", we = (p == null ? void 0 : p.fontStyle) === "italic" ? "italic" : "normal", Ke = (p == null ? void 0 : p.underline) === "underline" ? "underline" : (p == null ? void 0 : p.strikethrough) === "line-through" ? "line-through" : "none", xt = (p == null ? void 0 : p.underline) === "underline" && (p == null ? void 0 : p.strikethrough) === "line-through" ? "underline line-through" : Ke, yt = typeof (p == null ? void 0 : p.color) == "string" ? p.color : void 0, $t = typeof (p == null ? void 0 : p.backgroundColor) == "string" ? p.backgroundColor : void 0, Ot = typeof (p == null ? void 0 : p.numberFormat) == "string" ? p.numberFormat : "", Gt = e.editValue.value ?? e.getCellValue(K, V), fl = typeof (p == null ? void 0 : p.textAlign) == "string" ? p.textAlign : Dn(Gt, Ot) ? "right" : "left", Yt = typeof (p == null ? void 0 : p.verticalAlign) == "string" ? p.verticalAlign : "top", Ht = e.findMerge(K, V), Ll = Ht ? e.colPositions.value[Ht.range.endCol + 1] - e.colPositions.value[K] : e.colWidths.value[K], zt = Ht ? e.rowPositions.value[Ht.range.endRow + 1] - e.rowPositions.value[V] : e.getRowHeight(V), nl = 2, { ascent: ol, descent: Et } = e.measureFontMetrics(ye, N, Me, we), Cl = ol + Et, al = (e.editValue.value ? e.editValue.value.split(`
5661
5660
  `).length : 1) * Cl, wl = e.BASE_CELL_VPAD - nl;
@@ -5685,13 +5684,13 @@ function qi(e, n, l, t, r) {
5685
5684
  boxShadow: i ? "none" : void 0
5686
5685
  };
5687
5686
  });
5688
- function E() {
5687
+ function F() {
5689
5688
  return Math.max(0, t.viewSize.w - Oe - hl);
5690
5689
  }
5691
5690
  function X() {
5692
5691
  return Math.max(0, t.viewSize.h - Le - hl);
5693
5692
  }
5694
- const ve = re(() => E()), ne = re(() => X()), de = re(() => Math.max(0, ve.value - 11 * 2)), q = re(() => Math.max(0, ne.value - 11 * 2)), _ = re(() => t.maxScrollX.value <= 0 ? de.value : Math.max(24, E() / e.totalWidth.value * de.value)), xe = re(() => t.maxScrollX.value <= 0 ? 0 : e.scrollX.value / t.maxScrollX.value * (de.value - _.value)), Te = re(() => t.maxScrollY.value <= 0 ? q.value : Math.max(24, X() / e.totalHeight.value * q.value)), st = re(() => t.maxScrollY.value <= 0 ? 0 : e.scrollY.value / t.maxScrollY.value * (q.value - Te.value));
5693
+ const ve = ie(() => F()), ne = ie(() => X()), de = ie(() => Math.max(0, ve.value - 11 * 2)), q = ie(() => Math.max(0, ne.value - 11 * 2)), _ = ie(() => t.maxScrollX.value <= 0 ? de.value : Math.max(24, F() / e.totalWidth.value * de.value)), xe = ie(() => t.maxScrollX.value <= 0 ? 0 : e.scrollX.value / t.maxScrollX.value * (de.value - _.value)), Te = ie(() => t.maxScrollY.value <= 0 ? q.value : Math.max(24, X() / e.totalHeight.value * q.value)), st = ie(() => t.maxScrollY.value <= 0 ? 0 : e.scrollY.value / t.maxScrollY.value * (q.value - Te.value));
5695
5694
  let at = null, O = 0, I = 0;
5696
5695
  function W(i) {
5697
5696
  i.preventDefault(), at = "v", O = i.clientY, I = e.scrollY.value, document.addEventListener("mousemove", fe), document.addEventListener("mouseup", Be);
@@ -5721,7 +5720,7 @@ function qi(e, n, l, t, r) {
5721
5720
  if (at)
5722
5721
  return;
5723
5722
  const g = i.currentTarget.getBoundingClientRect(), K = i.clientX - g.left;
5724
- K < xe.value ? t.clampScroll(e.scrollX.value - E(), null) : K > xe.value + _.value && t.clampScroll(e.scrollX.value + E(), null), s();
5723
+ K < xe.value ? t.clampScroll(e.scrollX.value - F(), null) : K > xe.value + _.value && t.clampScroll(e.scrollX.value + F(), null), s();
5725
5724
  }
5726
5725
  let _e = !1, Qe = 0, Ae = 0, h = !1, $ = !1, G = 0, ke = 0, Ce = 0, be = 0, Re = 0, Se = 0, We = 0, bt = 0, Rt = !1, Bt = !1, gt = 0, wt = 0, Ut = "cell", Yl = 0, dn = -1, fn = -1;
5727
5726
  function Gn(i) {
@@ -6102,12 +6101,12 @@ function qi(e, n, l, t, r) {
6102
6101
  }
6103
6102
  return {
6104
6103
  scheduleRender: s,
6105
- render: B,
6106
- activeCellLabel: F,
6107
- formulaBarDisplay: S,
6104
+ render: S,
6105
+ activeCellLabel: A,
6106
+ formulaBarDisplay: B,
6108
6107
  formulaBarDraft: w,
6109
6108
  formulaBarExpanded: M,
6110
- onFormulaBarFocus: ie,
6109
+ onFormulaBarFocus: ae,
6111
6110
  onFormulaBarInput: ue,
6112
6111
  onFormulaBarKeydown: Q,
6113
6112
  onFormulaBarBlur: te,
@@ -6197,35 +6196,35 @@ function nn(e, n, l, t, r, u, o) {
6197
6196
  if (o) {
6198
6197
  for (let s = o.startRow; s <= o.endRow; s++)
6199
6198
  for (let k = o.startCol; k <= o.endCol; k++) {
6200
- const B = e[l(k, s)];
6201
- B && An(B.value, t, r, u) && b.push({ sheetIndex: n, col: k, row: s });
6199
+ const S = e[l(k, s)];
6200
+ S && An(S.value, t, r, u) && b.push({ sheetIndex: n, col: k, row: s });
6202
6201
  }
6203
6202
  return b;
6204
6203
  }
6205
6204
  for (const s in e) {
6206
6205
  const k = e[s];
6207
6206
  if (k && An(k.value, t, r, u)) {
6208
- const B = s.split(","), F = Number(B[0]), w = Number(B[1]);
6209
- !Number.isNaN(F) && !Number.isNaN(w) && b.push({ sheetIndex: n, col: F, row: w });
6207
+ const S = s.split(","), A = Number(S[0]), w = Number(S[1]);
6208
+ !Number.isNaN(A) && !Number.isNaN(w) && b.push({ sheetIndex: n, col: A, row: w });
6210
6209
  }
6211
6210
  }
6212
6211
  return b;
6213
6212
  }
6214
6213
  function tc(e, n, l, t) {
6215
- const r = H(!1), u = H(""), o = H(""), b = H("sheet"), s = H(!1), k = H(!1), B = H(-1), F = H([]), w = H(""), M = H(0), S = H(""), ie = re(() => {
6214
+ const r = H(!1), u = H(""), o = H(""), b = H("sheet"), s = H(!1), k = H(!1), S = H(-1), A = H([]), w = H(""), M = H(0), B = H(""), ae = ie(() => {
6216
6215
  const a = /* @__PURE__ */ new Set(), v = l.activeSheetIndex.value;
6217
- for (const he of F.value)
6216
+ for (const he of A.value)
6218
6217
  he.sheetIndex === v && a.add(`${he.col},${he.row}`);
6219
6218
  return a;
6220
- }), ue = re(() => {
6221
- if (B.value < 0 || B.value >= F.value.length)
6219
+ }), ue = ie(() => {
6220
+ if (S.value < 0 || S.value >= A.value.length)
6222
6221
  return null;
6223
- const a = F.value[B.value];
6222
+ const a = A.value[S.value];
6224
6223
  return a.sheetIndex !== l.activeSheetIndex.value ? null : `${a.col},${a.row}`;
6225
6224
  });
6226
6225
  e.findHighlight = (a, v) => {
6227
6226
  const he = `${a},${v}`;
6228
- return ue.value === he ? "active" : ie.value.has(he) ? "match" : null;
6227
+ return ue.value === he ? "active" : ae.value.has(he) ? "match" : null;
6229
6228
  };
6230
6229
  function m(a) {
6231
6230
  var Ie, f;
@@ -6248,8 +6247,8 @@ function tc(e, n, l, t) {
6248
6247
  }
6249
6248
  }
6250
6249
  function Z() {
6251
- if (S.value) {
6252
- w.value = S.value;
6250
+ if (B.value) {
6251
+ w.value = B.value;
6253
6252
  return;
6254
6253
  }
6255
6254
  if (!u.value) {
@@ -6257,11 +6256,11 @@ function tc(e, n, l, t) {
6257
6256
  return;
6258
6257
  }
6259
6258
  if (b.value === "selection" && !e.selection.value) {
6260
- w.value = A(e.locale.value, "findNeedSelection");
6259
+ w.value = E(e.locale.value, "findNeedSelection");
6261
6260
  return;
6262
6261
  }
6263
- if (F.value.length === 0) {
6264
- w.value = A(e.locale.value, "findNoResult");
6262
+ if (A.value.length === 0) {
6263
+ w.value = E(e.locale.value, "findNoResult");
6265
6264
  return;
6266
6265
  }
6267
6266
  w.value = "";
@@ -6299,12 +6298,12 @@ function tc(e, n, l, t) {
6299
6298
  k.value
6300
6299
  )
6301
6300
  );
6302
- F.value = v, v.length === 0 ? B.value = -1 : B.value >= v.length ? B.value = v.length - 1 : B.value < 0 && (B.value = 0), Z();
6301
+ A.value = v, v.length === 0 ? S.value = -1 : S.value >= v.length ? S.value = v.length - 1 : S.value < 0 && (S.value = 0), Z();
6303
6302
  }
6304
6303
  function Q() {
6305
- if (B.value < 0 || B.value >= F.value.length)
6304
+ if (S.value < 0 || S.value >= A.value.length)
6306
6305
  return;
6307
- const a = F.value[B.value];
6306
+ const a = A.value[S.value];
6308
6307
  a.sheetIndex !== l.activeSheetIndex.value && l.switchSheet(a.sheetIndex), b.value === "selection" ? e.activeCell.value = { col: a.col, row: a.row } : e.selectCell(a.col, a.row), e.ensureVisible(a.col, a.row);
6309
6308
  }
6310
6309
  const te = typeof requestAnimationFrame == "function" ? requestAnimationFrame : (a) => setTimeout(a, 16);
@@ -6316,52 +6315,52 @@ function tc(e, n, l, t) {
6316
6315
  }
6317
6316
  ee = !0, pe = a, te(() => {
6318
6317
  var v;
6319
- ee = !1, ce(), pe && F.value.length > 0 && B.value >= 0 && Q(), pe = !1, (v = e.scheduleRender) == null || v.call(e);
6318
+ ee = !1, ce(), pe && A.value.length > 0 && S.value >= 0 && Q(), pe = !1, (v = e.scheduleRender) == null || v.call(e);
6320
6319
  });
6321
6320
  }
6322
6321
  function Ye() {
6323
6322
  var a;
6324
- r.value = !0, M.value++, ce(), F.value.length > 0 && (B.value = 0, Q()), (a = e.scheduleRender) == null || a.call(e);
6323
+ r.value = !0, M.value++, ce(), A.value.length > 0 && (S.value = 0, Q()), (a = e.scheduleRender) == null || a.call(e);
6325
6324
  }
6326
6325
  function mt() {
6327
6326
  Ye();
6328
6327
  }
6329
6328
  function ot() {
6330
6329
  var a;
6331
- r.value = !1, F.value = [], B.value = -1, S.value = "", w.value = "", (a = e.scheduleRender) == null || a.call(e);
6330
+ r.value = !1, A.value = [], S.value = -1, B.value = "", w.value = "", (a = e.scheduleRender) == null || a.call(e);
6332
6331
  }
6333
6332
  function ut() {
6334
6333
  var a;
6335
- F.value.length !== 0 && (B.value = (B.value + 1) % F.value.length, Q(), (a = e.scheduleRender) == null || a.call(e));
6334
+ A.value.length !== 0 && (S.value = (S.value + 1) % A.value.length, Q(), (a = e.scheduleRender) == null || a.call(e));
6336
6335
  }
6337
6336
  function me() {
6338
6337
  var a;
6339
- F.value.length !== 0 && (B.value = (B.value - 1 + F.value.length) % F.value.length, Q(), (a = e.scheduleRender) == null || a.call(e));
6338
+ A.value.length !== 0 && (S.value = (S.value - 1 + A.value.length) % A.value.length, Q(), (a = e.scheduleRender) == null || a.call(e));
6340
6339
  }
6341
6340
  function ge() {
6342
6341
  var f, T;
6343
- if (B.value < 0 || B.value >= F.value.length)
6342
+ if (S.value < 0 || S.value >= A.value.length)
6344
6343
  return;
6345
- const a = F.value[B.value], v = m(a), he = Qi(v, u.value, o.value, s.value);
6344
+ const a = A.value[S.value], v = m(a), he = Qi(v, u.value, o.value, s.value);
6346
6345
  if (he === v)
6347
6346
  return;
6348
6347
  n.saveUndo(), L(a, he);
6349
- const Ie = B.value;
6350
- ce(), F.value.length > 0 ? (B.value = Math.min(Ie, F.value.length - 1), ut()) : B.value = -1, (f = e.emitModelData) == null || f.call(e), (T = e.scheduleRender) == null || T.call(e);
6348
+ const Ie = S.value;
6349
+ ce(), A.value.length > 0 ? (S.value = Math.min(Ie, A.value.length - 1), ut()) : S.value = -1, (f = e.emitModelData) == null || f.call(e), (T = e.scheduleRender) == null || T.call(e);
6351
6350
  }
6352
6351
  function $e() {
6353
6352
  var Ie, f;
6354
6353
  const a = u.value;
6355
- if (!a || F.value.length === 0)
6354
+ if (!a || A.value.length === 0)
6356
6355
  return;
6357
6356
  n.saveUndo();
6358
6357
  let v = 0;
6359
- const he = F.value.slice();
6358
+ const he = A.value.slice();
6360
6359
  for (const T of he) {
6361
6360
  const y = m(T), U = ec(y, a, o.value, s.value);
6362
6361
  U !== y && (L(T, U), v++);
6363
6362
  }
6364
- F.value = [], B.value = -1, S.value = A(e.locale.value, "findReplacedAll").replace("{n}", String(v)), Z(), (Ie = e.emitModelData) == null || Ie.call(e), (f = e.scheduleRender) == null || f.call(e);
6363
+ A.value = [], S.value = -1, B.value = E(e.locale.value, "findReplacedAll").replace("{n}", String(v)), Z(), (Ie = e.emitModelData) == null || Ie.call(e), (f = e.scheduleRender) == null || f.call(e);
6365
6364
  }
6366
6365
  function se() {
6367
6366
  const a = (v) => {
@@ -6373,9 +6372,9 @@ function tc(e, n, l, t) {
6373
6372
  window.addEventListener("keydown", a), ll(() => window.removeEventListener("keydown", a));
6374
6373
  }
6375
6374
  return vt(u, () => {
6376
- r.value && (S.value = "", B.value = 0, Ve(!0));
6375
+ r.value && (B.value = "", S.value = 0, Ve(!0));
6377
6376
  }), vt([b, s, k], () => {
6378
- r.value && (S.value = "", B.value = 0, Ve(!0));
6377
+ r.value && (B.value = "", S.value = 0, Ve(!0));
6379
6378
  }), vt(
6380
6379
  e.cells,
6381
6380
  () => {
@@ -6385,7 +6384,7 @@ function tc(e, n, l, t) {
6385
6384
  ), vt(
6386
6385
  () => e.selection.value,
6387
6386
  () => {
6388
- r.value && b.value === "selection" && (B.value = 0, Ve(!0));
6387
+ r.value && b.value === "selection" && (S.value = 0, Ve(!0));
6389
6388
  }
6390
6389
  ), vt(
6391
6390
  [() => n.undoStack.value.length, () => n.redoStack.value.length],
@@ -6399,11 +6398,11 @@ function tc(e, n, l, t) {
6399
6398
  scope: b,
6400
6399
  matchCase: s,
6401
6400
  matchEntireCell: k,
6402
- currentIndex: B,
6403
- results: F,
6401
+ currentIndex: S,
6402
+ results: A,
6404
6403
  message: w,
6405
6404
  focusToken: M,
6406
- activeSheetMatches: ie,
6405
+ activeSheetMatches: ae,
6407
6406
  activeMatchKey: ue,
6408
6407
  openFind: Ye,
6409
6408
  openReplace: mt,
@@ -6495,21 +6494,21 @@ const lc = { class: "formula-bar__cell-label" }, nc = { class: "formula-bar__but
6495
6494
  t
6496
6495
  );
6497
6496
  k.setupLifecycle();
6498
- const B = tc(
6497
+ const S = tc(
6499
6498
  r,
6500
6499
  o,
6501
6500
  s
6502
6501
  );
6503
- B.setupLifecycle();
6504
- const F = Kt(r), w = Kt(o), M = Kt(b), S = Kt(s), ie = s.sheets, ue = s.activeSheetIndex, m = Kt(k), L = Kt(B), Z = re(() => {
6505
- const se = F.selection;
6502
+ S.setupLifecycle();
6503
+ const A = Kt(r), w = Kt(o), M = Kt(b), B = Kt(s), ae = s.sheets, ue = s.activeSheetIndex, m = Kt(k), L = Kt(S), Z = ie(() => {
6504
+ const se = A.selection;
6506
6505
  return !!se && se.startCol === se.endCol && se.startRow === se.endRow;
6507
- }), ce = re(() => {
6506
+ }), ce = ie(() => {
6508
6507
  var he;
6509
6508
  const se = w.selNumberFormat;
6510
6509
  if (se !== Pl)
6511
6510
  return se;
6512
- const a = F.activeCell, v = (he = F.cells[F.cellKey(a.col, a.row)]) == null ? void 0 : he.style;
6511
+ const a = A.activeCell, v = (he = A.cells[A.cellKey(a.col, a.row)]) == null ? void 0 : he.style;
6513
6512
  return typeof (v == null ? void 0 : v.numberFormat) == "string" ? v.numberFormat : "";
6514
6513
  });
6515
6514
  function Q(se) {
@@ -6547,10 +6546,10 @@ const lc = { class: "formula-bar__cell-label" }, nc = { class: "formula-bar__but
6547
6546
  };
6548
6547
  return (se, a) => (z(), oe("div", {
6549
6548
  class: "spreadsheet-outer",
6550
- style: Tt(S.outerStyle)
6549
+ style: Tt(B.outerStyle)
6551
6550
  }, [
6552
6551
  ft(Fr, {
6553
- locale: F.locale,
6552
+ locale: A.locale,
6554
6553
  "can-undo": w.canUndo,
6555
6554
  "can-redo": w.canRedo,
6556
6555
  "paint-fmt-active": w.paintFmt !== null,
@@ -6583,7 +6582,7 @@ const lc = { class: "formula-bar__cell-label" }, nc = { class: "formula-bar__but
6583
6582
  "is-single-cell": Z.value,
6584
6583
  "sel-number-format": w.selNumberFormat,
6585
6584
  "nf-options": w.nfOptions,
6586
- "theme-vars": S.toolbarThemeVars,
6585
+ "theme-vars": B.toolbarThemeVars,
6587
6586
  onUndo: a[0] || (a[0] = (v) => w.undo()),
6588
6587
  onRedo: a[1] || (a[1] = (v) => w.redo()),
6589
6588
  onPaintFormat: w.onPaintFormat,
@@ -6621,7 +6620,7 @@ const lc = { class: "formula-bar__cell-label" }, nc = { class: "formula-bar__but
6621
6620
  onCalcSum: M.onCalcSum,
6622
6621
  onCalcAvg: M.onCalcAvg,
6623
6622
  onCalcCount: M.onCalcCount,
6624
- onFind: a[21] || (a[21] = (v) => j(B).openFind())
6623
+ onFind: a[21] || (a[21] = (v) => j(S).openFind())
6625
6624
  }, null, 8, ["locale", "can-undo", "can-redo", "paint-fmt-active", "has-selection", "font-family-options", "font-size-options", "sel-font-family", "sel-font-size", "font-size-input", "font-size-menu-open", "sel-font-weight", "sel-font-style", "sel-underline", "sel-strikethrough", "sel-text-color", "text-color-menu-open", "sel-fill-color", "fill-color-menu-open", "cached-text-color", "cached-fill-color", "border-menu-open", "cached-border", "h-align-options", "v-align-options", "sel-h-align", "sel-v-align", "sel-wrap", "merge-menu-open", "calc-menu-open", "is-single-cell", "sel-number-format", "nf-options", "theme-vars", "onPaintFormat", "onFontSizeBlur", "onFontSizeStepUp", "onFontSizeStepDown", "onBoldToggle", "onItalicToggle", "onUnderlineToggle", "onStrikethroughToggle", "onApplyTextColor", "onApplyFillColor", "onApplyBorder", "onWrapToggle", "onApplyMerge", "onCalcSum", "onCalcAvg", "onCalcCount"]),
6626
6625
  ft(ti, {
6627
6626
  open: L.open,
@@ -6634,22 +6633,22 @@ const lc = { class: "formula-bar__cell-label" }, nc = { class: "formula-bar__but
6634
6633
  total: L.results.length,
6635
6634
  message: L.message,
6636
6635
  "focus-token": L.focusToken,
6637
- locale: F.locale,
6638
- "theme-vars": S.toolbarThemeVars,
6639
- "onUpdate:findText": a[22] || (a[22] = (v) => j(B).findText.value = v),
6640
- "onUpdate:replaceText": a[23] || (a[23] = (v) => j(B).replaceText.value = v),
6641
- "onUpdate:scope": a[24] || (a[24] = (v) => j(B).scope.value = v),
6642
- "onUpdate:matchCase": a[25] || (a[25] = (v) => j(B).matchCase.value = v),
6643
- "onUpdate:matchEntireCell": a[26] || (a[26] = (v) => j(B).matchEntireCell.value = v),
6644
- onPrev: a[27] || (a[27] = (v) => j(B).findPrev()),
6645
- onNext: a[28] || (a[28] = (v) => j(B).findNext()),
6646
- onReplace: a[29] || (a[29] = (v) => j(B).replace()),
6647
- onReplaceAll: a[30] || (a[30] = (v) => j(B).replaceAll()),
6648
- onClose: a[31] || (a[31] = (v) => j(B).close())
6636
+ locale: A.locale,
6637
+ "theme-vars": B.toolbarThemeVars,
6638
+ "onUpdate:findText": a[22] || (a[22] = (v) => j(S).findText.value = v),
6639
+ "onUpdate:replaceText": a[23] || (a[23] = (v) => j(S).replaceText.value = v),
6640
+ "onUpdate:scope": a[24] || (a[24] = (v) => j(S).scope.value = v),
6641
+ "onUpdate:matchCase": a[25] || (a[25] = (v) => j(S).matchCase.value = v),
6642
+ "onUpdate:matchEntireCell": a[26] || (a[26] = (v) => j(S).matchEntireCell.value = v),
6643
+ onPrev: a[27] || (a[27] = (v) => j(S).findPrev()),
6644
+ onNext: a[28] || (a[28] = (v) => j(S).findNext()),
6645
+ onReplace: a[29] || (a[29] = (v) => j(S).replace()),
6646
+ onReplaceAll: a[30] || (a[30] = (v) => j(S).replaceAll()),
6647
+ onClose: a[31] || (a[31] = (v) => j(S).close())
6649
6648
  }, null, 8, ["open", "find-text", "replace-text", "scope", "match-case", "match-entire-cell", "current-index", "total", "message", "focus-token", "locale", "theme-vars"]),
6650
6649
  ft($i, {
6651
6650
  "model-open": w.nfDialogOpen,
6652
- locale: F.locale,
6651
+ locale: A.locale,
6653
6652
  "current-format": ce.value,
6654
6653
  "onUpdate:modelOpen": a[32] || (a[32] = (v) => Q(v)),
6655
6654
  onApply: a[33] || (a[33] = (v) => w.applyNumberFormatCode(v))
@@ -6785,7 +6784,7 @@ const lc = { class: "formula-bar__cell-label" }, nc = { class: "formula-bar__but
6785
6784
  ["prevent"]
6786
6785
  )),
6787
6786
  onFocus: a[49] || (a[49] = //@ts-ignore
6788
- (...v) => S.onCanvasFocus && S.onCanvasFocus(...v)),
6787
+ (...v) => B.onCanvasFocus && B.onCanvasFocus(...v)),
6789
6788
  onKeydown: a[50] || (a[50] = //@ts-ignore
6790
6789
  (...v) => m.onKeydown && m.onKeydown(...v)),
6791
6790
  onContextmenu: a[51] || (a[51] = //@ts-ignore
@@ -6806,7 +6805,7 @@ const lc = { class: "formula-bar__cell-label" }, nc = { class: "formula-bar__but
6806
6805
  d("textarea", {
6807
6806
  ref: ge,
6808
6807
  class: "cell-editor",
6809
- value: F.editValue,
6808
+ value: A.editValue,
6810
6809
  style: Tt(m.editInputStyle),
6811
6810
  onInput: a[55] || (a[55] = //@ts-ignore
6812
6811
  (...v) => m.onEditInput && m.onEditInput(...v)),
@@ -6821,7 +6820,7 @@ const lc = { class: "formula-bar__cell-label" }, nc = { class: "formula-bar__but
6821
6820
  onPaste: a[60] || (a[60] = //@ts-ignore
6822
6821
  (...v) => m.onEditPaste && m.onEditPaste(...v))
6823
6822
  }, null, 44, cc),
6824
- S.maxScrollY > 0 ? (z(), oe("div", {
6823
+ B.maxScrollY > 0 ? (z(), oe("div", {
6825
6824
  key: 0,
6826
6825
  class: "v-scrollbar",
6827
6826
  style: Tt({ top: j(Le) + "px", height: `calc(100% - ${j(Le) + j(hl)}px)` })
@@ -6830,7 +6829,7 @@ const lc = { class: "formula-bar__cell-label" }, nc = { class: "formula-bar__but
6830
6829
  class: "sb-btn sb-btn--up",
6831
6830
  title: "",
6832
6831
  onMousedown: a[61] || (a[61] = lt((v) => {
6833
- S.clampScroll(null, F.scrollY - 50), m.scheduleRender();
6832
+ B.clampScroll(null, A.scrollY - 50), m.scheduleRender();
6834
6833
  }, ["prevent"]))
6835
6834
  }, [...a[88] || (a[88] = [
6836
6835
  d("span", { class: "sb-arrow sb-arrow--up" }, null, -1)
@@ -6850,13 +6849,13 @@ const lc = { class: "formula-bar__cell-label" }, nc = { class: "formula-bar__but
6850
6849
  d("button", {
6851
6850
  class: "sb-btn sb-btn--down",
6852
6851
  onMousedown: a[64] || (a[64] = lt((v) => {
6853
- S.clampScroll(null, F.scrollY + 50), m.scheduleRender();
6852
+ B.clampScroll(null, A.scrollY + 50), m.scheduleRender();
6854
6853
  }, ["prevent"]))
6855
6854
  }, [...a[89] || (a[89] = [
6856
6855
  d("span", { class: "sb-arrow sb-arrow--down" }, null, -1)
6857
6856
  ])], 32)
6858
6857
  ], 4)) : nt("", !0),
6859
- S.maxScrollX > 0 ? (z(), oe("div", {
6858
+ B.maxScrollX > 0 ? (z(), oe("div", {
6860
6859
  key: 1,
6861
6860
  class: "h-scrollbar",
6862
6861
  style: Tt({ left: j(Oe) + "px", width: `calc(100% - ${j(Oe) + j(hl)}px)` })
@@ -6864,7 +6863,7 @@ const lc = { class: "formula-bar__cell-label" }, nc = { class: "formula-bar__but
6864
6863
  d("button", {
6865
6864
  class: "sb-btn sb-btn--left",
6866
6865
  onMousedown: a[65] || (a[65] = lt((v) => {
6867
- S.clampScroll(F.scrollX - 50, null), m.scheduleRender();
6866
+ B.clampScroll(A.scrollX - 50, null), m.scheduleRender();
6868
6867
  }, ["prevent"]))
6869
6868
  }, [...a[90] || (a[90] = [
6870
6869
  d("span", { class: "sb-arrow sb-arrow--left" }, null, -1)
@@ -6884,17 +6883,17 @@ const lc = { class: "formula-bar__cell-label" }, nc = { class: "formula-bar__but
6884
6883
  d("button", {
6885
6884
  class: "sb-btn sb-btn--right",
6886
6885
  onMousedown: a[68] || (a[68] = lt((v) => {
6887
- S.clampScroll(F.scrollX + 50, null), m.scheduleRender();
6886
+ B.clampScroll(A.scrollX + 50, null), m.scheduleRender();
6888
6887
  }, ["prevent"]))
6889
6888
  }, [...a[91] || (a[91] = [
6890
6889
  d("span", { class: "sb-arrow sb-arrow--right" }, null, -1)
6891
6890
  ])], 32)
6892
6891
  ], 4)) : nt("", !0),
6893
- S.maxScrollX > 0 && S.maxScrollY > 0 ? (z(), oe("div", uc)) : nt("", !0)
6892
+ B.maxScrollX > 0 && B.maxScrollY > 0 ? (z(), oe("div", uc)) : nt("", !0)
6894
6893
  ]),
6895
6894
  ft(zr, {
6896
- locale: F.locale,
6897
- sheets: j(ie),
6895
+ locale: A.locale,
6896
+ sheets: j(ae),
6898
6897
  "active-sheet-index": j(ue),
6899
6898
  "ren-tab": m.renTab,
6900
6899
  "ren-tab-val": m.renTabVal,
@@ -6906,7 +6905,7 @@ const lc = { class: "formula-bar__cell-label" }, nc = { class: "formula-bar__but
6906
6905
  onTabRenameCommit: m.commitTabRename,
6907
6906
  onTabbarContextmenu: a[74] || (a[74] = (v) => m.onTabBarCtx(v)),
6908
6907
  onAddSheet: a[75] || (a[75] = (v) => {
6909
- S.addSheet(), m.scheduleRender();
6908
+ B.addSheet(), m.scheduleRender();
6910
6909
  })
6911
6910
  }, null, 8, ["locale", "sheets", "active-sheet-index", "ren-tab", "ren-tab-val", "onTabRenameCommit"]),
6912
6911
  (z(), Ue(Ge, { to: "body" }, [