ooxml-excel-editor 1.16.1 → 1.16.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -2,34 +2,34 @@ var ja = Object.defineProperty, Ja = Object.defineProperties;
2
2
  var Ka = Object.getOwnPropertyDescriptors;
3
3
  var jt = Object.getOwnPropertySymbols;
4
4
  var Ga = Object.prototype.hasOwnProperty, Xa = Object.prototype.propertyIsEnumerable;
5
- var Jt = (m, x, p) => x in m ? ja(m, x, { enumerable: !0, configurable: !0, writable: !0, value: p }) : m[x] = p, W = (m, x) => {
6
- for (var p in x || (x = {}))
7
- Ga.call(x, p) && Jt(m, p, x[p]);
5
+ var Jt = (m, x, g) => x in m ? ja(m, x, { enumerable: !0, configurable: !0, writable: !0, value: g }) : m[x] = g, W = (m, x) => {
6
+ for (var g in x || (x = {}))
7
+ Ga.call(x, g) && Jt(m, g, x[g]);
8
8
  if (jt)
9
- for (var p of jt(x))
10
- Xa.call(x, p) && Jt(m, p, x[p]);
9
+ for (var g of jt(x))
10
+ Xa.call(x, g) && Jt(m, g, x[g]);
11
11
  return m;
12
12
  }, ke = (m, x) => Ja(m, Ka(x));
13
- import { ref as S, shallowRef as bt, defineComponent as ue, onBeforeUnmount as Le, openBlock as d, createElementBlock as v, createElementVNode as i, createCommentVNode as h, createTextVNode as L, toDisplayString as $, Fragment as O, unref as R, withModifiers as Ct, renderList as Q, computed as E, normalizeClass as ee, reactive as Za, withDirectives as X, vModelRadio as _e, vModelSelect as ct, vModelCheckbox as rt, withKeys as Ya, normalizeStyle as Ke, onMounted as yt, nextTick as Ce, watch as z, createBlock as se, Teleport as qa, renderSlot as le, createVNode as Kt } from "vue";
14
- import { r as kt, l as Yt, d as qt, f as Qt, a as Qa, k as pt, j as ye, e as es, b as gt, V as ts, P as as, D as Gt, g as ss, s as is, c as ns, h as ls, i as os, m as us, n as ds } from "./chunks/index-CKf3q6pu.js";
15
- import { B as Bn, C as zn, o as _n, p as Ln, E as On, F as Hn, q as Nn, G as Vn, K as Wn, O as Un, t as jn, W as Jn, u as Kn, v as Gn, w as Xn, x as Zn, y as Yn, z as qn, A as Qn, H as el, I as tl, J as al, L as sl, M as il, N as nl, Q as ll, R as ol, S as ul, T as dl, U as vl, X as ml, Y as fl, Z as cl, _ as rl, $ as pl, a0 as gl, a1 as bl, a2 as kl, S as Cl, a3 as yl, a4 as Sl, a5 as xl, a6 as hl, a7 as Fl, a8 as wl, a9 as Il, aa as Tl, ab as El, ac as $l, ad as Pl, ae as Rl, af as Ml, ag as Dl, ah as Al, ai as Bl, aj as zl, ak as _l, al as Ll, am as Ol, an as Hl, ao as Nl, ap as Vl, aq as Wl, ar as Ul, as as jl, at as Jl, au as Kl, av as Gl, aw as Xl, ax as Zl, ay as Yl } from "./chunks/index-CKf3q6pu.js";
16
- import { p as ea, a as oe, j as Se, b as vs, S as ms, i as fs, R as cs, l as rs, r as Xt, s as ps, c as gs, d as bs, e as ks, T as Cs, f as ys, g as Ss, k as xs, h as hs } from "./chunks/toolbar-builtins-IAxeMFn3.js";
13
+ import { ref as S, shallowRef as bt, defineComponent as ue, onBeforeUnmount as Le, openBlock as d, createElementBlock as v, createElementVNode as i, createCommentVNode as h, createTextVNode as L, toDisplayString as $, Fragment as O, unref as R, withModifiers as Ct, renderList as Q, computed as E, normalizeClass as ee, reactive as Za, withDirectives as X, vModelRadio as ze, vModelSelect as ct, vModelCheckbox as rt, withKeys as Ya, normalizeStyle as Ke, onMounted as yt, nextTick as Ce, watch as _, createBlock as se, Teleport as qa, renderSlot as le, createVNode as Kt } from "vue";
14
+ import { r as kt, l as Yt, d as qt, f as Qt, a as Qa, k as gt, j as ye, e as es, b as pt, V as ts, P as as, D as Gt, g as ss, s as is, c as ns, h as ls, i as os, m as us, n as ds } from "./chunks/index-Dg4LsUaW.js";
15
+ import { B as Bn, C as _n, o as zn, p as Ln, E as On, F as Hn, q as Nn, G as Vn, K as Wn, O as Un, t as jn, W as Jn, u as Kn, v as Gn, w as Xn, x as Zn, y as Yn, z as qn, A as Qn, H as el, I as tl, J as al, L as sl, M as il, N as nl, Q as ll, R as ol, S as ul, T as dl, U as vl, X as ml, Y as fl, Z as cl, _ as rl, $ as gl, a0 as pl, a1 as bl, a2 as kl, S as Cl, a3 as yl, a4 as Sl, a5 as xl, a6 as hl, a7 as Fl, a8 as wl, a9 as Il, aa as Tl, ab as El, ac as $l, ad as Pl, ae as Rl, af as Ml, ag as Dl, ah as Al, ai as Bl, aj as _l, ak as zl, al as Ll, am as Ol, an as Hl, ao as Nl, ap as Vl, aq as Wl, ar as Ul, as as jl, at as Jl, au as Kl, av as Gl, aw as Xl, ax as Zl, ay as Yl } from "./chunks/index-Dg4LsUaW.js";
16
+ import { p as ea, a as oe, j as Se, b as vs, S as ms, i as fs, R as cs, l as rs, r as Xt, s as gs, c as ps, d as bs, e as ks, T as Cs, f as ys, g as Ss, k as xs, h as hs } from "./chunks/toolbar-builtins-CeOlAWgM.js";
17
17
  function Fs() {
18
- const m = S(!1), x = S(null), p = bt(null), n = S(null), C = bt(null);
18
+ const m = S(!1), x = S(null), g = bt(null), n = S(null), C = bt(null);
19
19
  async function M(y, f) {
20
20
  var l;
21
- m.value = !0, x.value = null, p.value && kt(p.value), p.value = null, C.value = null, n.value = { stage: "read", ratio: 0 };
21
+ m.value = !0, x.value = null, g.value && kt(g.value), g.value = null, C.value = null, n.value = { stage: "read", ratio: 0 };
22
22
  try {
23
23
  const u = await Yt(y, (B, H) => {
24
24
  n.value = { stage: "read", ratio: H ? B / H : void 0 };
25
- }), g = qt(u);
26
- if (g === "xls") throw new Error("这是旧版 .xls(BIFF) 或加密文件,本预览器只支持 .xlsx/.xlsm。");
27
- if (g === "not-zip") throw new Error("文件不是有效的 .xlsx(非 ZIP 包)。");
28
- if (g === "empty") throw new Error("文件为空。");
25
+ }), p = qt(u);
26
+ if (p === "xls") throw new Error("这是旧版 .xls(BIFF) 或加密文件,本预览器只支持 .xlsx/.xlsm。");
27
+ if (p === "not-zip") throw new Error("文件不是有效的 .xlsx(非 ZIP 包)。");
28
+ if (p === "empty") throw new Error("文件为空。");
29
29
  let D = await ea(u, (B) => {
30
30
  n.value = B;
31
31
  });
32
- f && (D = (l = f(D)) != null ? l : D), Qt(D), C.value = u.slice(0), p.value = D;
32
+ f && (D = (l = f(D)) != null ? l : D), Qt(D), C.value = u.slice(0), g.value = D;
33
33
  } catch (u) {
34
34
  x.value = u != null && u.message && /预览器|损坏|加密|为空|ZIP/.test(u.message) ? u.message : Qa(u), console.error("[ooxml-preview] 解析失败:", u);
35
35
  } finally {
@@ -38,9 +38,9 @@ function Fs() {
38
38
  }
39
39
  function c(y, f) {
40
40
  var l;
41
- p.value && kt(p.value), C.value = null, x.value = null, n.value = null, p.value = f && (l = f(y)) != null ? l : y;
41
+ g.value && kt(g.value), C.value = null, x.value = null, n.value = null, g.value = f && (l = f(y)) != null ? l : y;
42
42
  }
43
- return { loading: m, error: x, workbook: p, load: M, loadModel: c, progress: n, sourceBuffer: C };
43
+ return { loading: m, error: x, workbook: g, load: M, loadModel: c, progress: n, sourceBuffer: C };
44
44
  }
45
45
  const ws = { class: "toolbar" }, Is = ["title"], Ts = {
46
46
  key: 0,
@@ -52,7 +52,7 @@ const ws = { class: "toolbar" }, Is = ["title"], Ts = {
52
52
  }, $s = { class: "meta" }, Ps = { title: "模型数据体积估算(确定性;非真实 JS 堆,实际堆约 1.5~3x)" }, Rs = { title: "JS 堆增量(performance.memory;仅 Chromium、整页口径、被安全分桶粗化)" }, Ms = { class: "export-wrap" }, Ds = {
53
53
  key: 0,
54
54
  class: "menu"
55
- }, As = { class: "zoom" }, Bs = ["value"], zs = ["value"], _s = ["value"], Ls = /* @__PURE__ */ ue({
55
+ }, As = { class: "zoom" }, Bs = ["value"], _s = ["value"], zs = ["value"], Ls = /* @__PURE__ */ ue({
56
56
  __name: "ViewerToolbar",
57
57
  props: {
58
58
  fileName: {},
@@ -66,16 +66,16 @@ const ws = { class: "toolbar" }, Is = ["title"], Ts = {
66
66
  },
67
67
  emits: ["update:zoom", "export-image", "export-pdf", "export-pdf-vector", "export-xlsx", "export-csv", "export-json", "print", "open-settings"],
68
68
  setup(m, { emit: x }) {
69
- const p = x, n = [0.5, 0.75, 1, 1.25, 1.5, 2];
69
+ const g = x, n = [0.5, 0.75, 1, 1.25, 1.5, 2];
70
70
  function C(l) {
71
- p("update:zoom", Math.min(3, Math.max(0.3, l)));
71
+ g("update:zoom", Math.min(3, Math.max(0.3, l)));
72
72
  }
73
73
  const M = S(!1);
74
74
  function c() {
75
75
  M.value = !M.value;
76
76
  }
77
77
  function y(l) {
78
- M.value = !1, p(l === "export-image" ? "export-image" : l === "export-pdf" ? "export-pdf" : l === "export-pdf-vector" ? "export-pdf-vector" : l === "export-xlsx" ? "export-xlsx" : l === "export-csv" ? "export-csv" : l === "export-json" ? "export-json" : l === "print" ? "print" : "open-settings");
78
+ M.value = !1, g(l === "export-image" ? "export-image" : l === "export-pdf" ? "export-pdf" : l === "export-pdf-vector" ? "export-pdf-vector" : l === "export-xlsx" ? "export-xlsx" : l === "export-csv" ? "export-csv" : l === "export-json" ? "export-json" : l === "print" ? "print" : "open-settings");
79
79
  }
80
80
  function f(l) {
81
81
  var u;
@@ -95,16 +95,16 @@ const ws = { class: "toolbar" }, Is = ["title"], Ts = {
95
95
  i("span", $s, [
96
96
  L($(m.sheetCount) + " 个工作表", 1),
97
97
  m.fileSize != null ? (d(), v(O, { key: 0 }, [
98
- L(" · 源文件 " + $(R(pt)(m.fileSize)), 1)
98
+ L(" · 源文件 " + $(R(gt)(m.fileSize)), 1)
99
99
  ], 64)) : h("", !0),
100
100
  m.dataBytes != null ? (d(), v(O, { key: 1 }, [
101
101
  u[11] || (u[11] = L(" · ", -1)),
102
- i("span", Ps, "数据约 " + $(R(pt)(m.dataBytes)), 1)
102
+ i("span", Ps, "数据约 " + $(R(gt)(m.dataBytes)), 1)
103
103
  ], 64)) : h("", !0),
104
104
  m.heapBytes != null ? (d(), v(O, { key: 2 }, [
105
105
  u[13] || (u[13] = L(" · ", -1)),
106
106
  i("span", Rs, [
107
- L("堆约 " + $(R(pt)(m.heapBytes)), 1),
107
+ L("堆约 " + $(R(gt)(m.heapBytes)), 1),
108
108
  u[12] || (u[12] = i("span", { class: "rough" }, "粗略", -1))
109
109
  ])
110
110
  ], 64)) : h("", !0)
@@ -121,63 +121,63 @@ const ws = { class: "toolbar" }, Is = ["title"], Ts = {
121
121
  ])]),
122
122
  M.value ? (d(), v("div", Ds, [
123
123
  i("button", {
124
- onClick: u[0] || (u[0] = (g) => y("export-xlsx"))
124
+ onClick: u[0] || (u[0] = (p) => y("export-xlsx"))
125
125
  }, "导出为 Excel (.xlsx)"),
126
126
  i("button", {
127
- onClick: u[1] || (u[1] = (g) => y("export-csv"))
127
+ onClick: u[1] || (u[1] = (p) => y("export-csv"))
128
128
  }, "导出为 CSV (.csv)"),
129
129
  i("button", {
130
- onClick: u[2] || (u[2] = (g) => y("export-json"))
130
+ onClick: u[2] || (u[2] = (p) => y("export-json"))
131
131
  }, "导出为 JSON (.json)"),
132
132
  u[15] || (u[15] = i("div", { class: "sep" }, null, -1)),
133
133
  i("button", {
134
- onClick: u[3] || (u[3] = (g) => y("export-image"))
134
+ onClick: u[3] || (u[3] = (p) => y("export-image"))
135
135
  }, "导出为图片 (PNG)"),
136
136
  i("button", {
137
- onClick: u[4] || (u[4] = (g) => y("export-pdf"))
137
+ onClick: u[4] || (u[4] = (p) => y("export-pdf"))
138
138
  }, "导出为 PDF (位图)"),
139
139
  i("button", {
140
- onClick: u[5] || (u[5] = (g) => y("export-pdf-vector"))
140
+ onClick: u[5] || (u[5] = (p) => y("export-pdf-vector"))
141
141
  }, "导出为 PDF (矢量·文字可选)"),
142
142
  i("button", {
143
- onClick: u[6] || (u[6] = (g) => y("print"))
143
+ onClick: u[6] || (u[6] = (p) => y("print"))
144
144
  }, "打印…"),
145
145
  u[16] || (u[16] = i("div", { class: "sep" }, null, -1)),
146
146
  i("button", {
147
- onClick: u[7] || (u[7] = (g) => y("open-settings"))
147
+ onClick: u[7] || (u[7] = (p) => y("open-settings"))
148
148
  }, "导出设置…")
149
149
  ])) : h("", !0)
150
150
  ]),
151
151
  i("div", As, [
152
152
  i("button", {
153
- onClick: u[8] || (u[8] = (g) => C(m.zoom - 0.1)),
153
+ onClick: u[8] || (u[8] = (p) => C(m.zoom - 0.1)),
154
154
  title: "缩小"
155
155
  }, "−"),
156
156
  i("select", {
157
157
  value: m.zoom,
158
- onChange: u[9] || (u[9] = (g) => C(parseFloat(g.target.value)))
158
+ onChange: u[9] || (u[9] = (p) => C(parseFloat(p.target.value)))
159
159
  }, [
160
- (d(), v(O, null, Q(n, (g) => i("option", {
161
- key: g,
162
- value: g
163
- }, $(Math.round(g * 100)) + "%", 9, zs)), 64)),
160
+ (d(), v(O, null, Q(n, (p) => i("option", {
161
+ key: p,
162
+ value: p
163
+ }, $(Math.round(p * 100)) + "%", 9, _s)), 64)),
164
164
  n.includes(m.zoom) ? h("", !0) : (d(), v("option", {
165
165
  key: 0,
166
166
  value: m.zoom
167
- }, $(Math.round(m.zoom * 100)) + "%", 9, _s))
167
+ }, $(Math.round(m.zoom * 100)) + "%", 9, zs))
168
168
  ], 40, Bs),
169
169
  i("button", {
170
- onClick: u[10] || (u[10] = (g) => C(m.zoom + 0.1)),
170
+ onClick: u[10] || (u[10] = (p) => C(m.zoom + 0.1)),
171
171
  title: "放大"
172
172
  }, "+")
173
173
  ])
174
174
  ]));
175
175
  }
176
176
  }), de = (m, x) => {
177
- const p = m.__vccOpts || m;
177
+ const g = m.__vccOpts || m;
178
178
  for (const [n, C] of x)
179
- p[n] = C;
180
- return p;
179
+ g[n] = C;
180
+ return g;
181
181
  }, Os = /* @__PURE__ */ de(Ls, [["__scopeId", "data-v-55f10e63"]]), Hs = { class: "sheet-tabs" }, Ns = ["onClick", "title"], Vs = /* @__PURE__ */ ue({
182
182
  __name: "SheetTabs",
183
183
  props: {
@@ -186,7 +186,7 @@ const ws = { class: "toolbar" }, Is = ["title"], Ts = {
186
186
  },
187
187
  emits: ["select"],
188
188
  setup(m, { emit: x }) {
189
- const p = m, n = x, C = E(() => p.workbook.sheets.filter((M) => M.state === "visible"));
189
+ const g = m, n = x, C = E(() => g.workbook.sheets.filter((M) => M.state === "visible"));
190
190
  return (M, c) => (d(), v("div", Hs, [
191
191
  (d(!0), v(O, null, Q(C.value, (y) => (d(), v("button", {
192
192
  key: y.index,
@@ -214,11 +214,11 @@ const ws = { class: "toolbar" }, Is = ["title"], Ts = {
214
214
  },
215
215
  emits: ["close", "export"],
216
216
  setup(m, { emit: x }) {
217
- const p = m, n = x, C = E(() => {
218
- const f = p.selection;
217
+ const g = m, n = x, C = E(() => {
218
+ const f = g.selection;
219
219
  return !!f && !(f.top === f.bottom && f.left === f.right);
220
220
  }), M = E(() => {
221
- const f = p.selection;
221
+ const f = g.selection;
222
222
  return f ? `${ye(f.left)}${f.top + 1}:${ye(f.right)}${f.bottom + 1}` : "";
223
223
  }), c = Za({
224
224
  action: "png",
@@ -260,7 +260,7 @@ const ws = { class: "toolbar" }, Is = ["title"], Ts = {
260
260
  "onUpdate:modelValue": l[1] || (l[1] = (u) => c.scope = u),
261
261
  disabled: !C.value
262
262
  }, null, 8, Xs), [
263
- [_e, c.scope]
263
+ [ze, c.scope]
264
264
  ]),
265
265
  l[18] || (l[18] = L(" 当前选区 ", -1)),
266
266
  C.value ? (d(), v("span", Zs, $(M.value), 1)) : (d(), v("span", Ys, "(未选多格)"))
@@ -271,7 +271,7 @@ const ws = { class: "toolbar" }, Is = ["title"], Ts = {
271
271
  value: "sheet",
272
272
  "onUpdate:modelValue": l[2] || (l[2] = (u) => c.scope = u)
273
273
  }, null, 512), [
274
- [_e, c.scope]
274
+ [ze, c.scope]
275
275
  ]),
276
276
  l[19] || (l[19] = L(" 当前工作表", -1))
277
277
  ]),
@@ -281,7 +281,7 @@ const ws = { class: "toolbar" }, Is = ["title"], Ts = {
281
281
  value: "all",
282
282
  "onUpdate:modelValue": l[3] || (l[3] = (u) => c.scope = u)
283
283
  }, null, 512), [
284
- [_e, c.scope]
284
+ [ze, c.scope]
285
285
  ]),
286
286
  L(" 全部工作表 (" + $(m.sheetCount) + ")", 1)
287
287
  ])
@@ -336,7 +336,7 @@ const ws = { class: "toolbar" }, Is = ["title"], Ts = {
336
336
  value: !1,
337
337
  "onUpdate:modelValue": l[7] || (l[7] = (u) => c.pdfVector = u)
338
338
  }, null, 512), [
339
- [_e, c.pdfVector]
339
+ [ze, c.pdfVector]
340
340
  ]),
341
341
  l[26] || (l[26] = L(" 位图 ", -1)),
342
342
  l[27] || (l[27] = i("span", { class: "hint" }, "(完整还原观感)", -1))
@@ -347,7 +347,7 @@ const ws = { class: "toolbar" }, Is = ["title"], Ts = {
347
347
  value: !0,
348
348
  "onUpdate:modelValue": l[8] || (l[8] = (u) => c.pdfVector = u)
349
349
  }, null, 512), [
350
- [_e, c.pdfVector]
350
+ [ze, c.pdfVector]
351
351
  ]),
352
352
  l[28] || (l[28] = L(" 矢量 ", -1)),
353
353
  l[29] || (l[29] = i("span", { class: "hint" }, "(文字可选可搜·清晰·文件小;中文需注册字体,否则该格转图)", -1))
@@ -420,14 +420,14 @@ const ws = { class: "toolbar" }, Is = ["title"], Ts = {
420
420
  }, ri = {
421
421
  key: 3,
422
422
  class: "lb"
423
- }, pi = /* @__PURE__ */ ue({
423
+ }, gi = /* @__PURE__ */ ue({
424
424
  __name: "ToolbarMenu",
425
425
  props: {
426
426
  items: {}
427
427
  },
428
428
  emits: ["pick"],
429
429
  setup(m, { emit: x }) {
430
- const p = x;
430
+ const g = x;
431
431
  let n = null;
432
432
  function C(c) {
433
433
  var y;
@@ -450,7 +450,7 @@ const ws = { class: "toolbar" }, Is = ["title"], Ts = {
450
450
  placeholder: f.input.placeholder,
451
451
  value: f.input.value,
452
452
  onKeydown: Ya((l) => {
453
- f.input.onCommit(l.target.value), p("pick", f);
453
+ f.input.onCommit(l.target.value), g("pick", f);
454
454
  }, ["enter"]),
455
455
  onClick: y[0] || (y[0] = Ct(() => {
456
456
  }, ["stop"]))
@@ -458,7 +458,7 @@ const ws = { class: "toolbar" }, Is = ["title"], Ts = {
458
458
  key: 2,
459
459
  class: ee(["mi", { active: f.active }]),
460
460
  disabled: f.disabled,
461
- onClick: (l) => p("pick", f),
461
+ onClick: (l) => g("pick", f),
462
462
  onMouseenter: (l) => C(f),
463
463
  onMouseleave: (l) => M(f)
464
464
  }, [
@@ -476,7 +476,7 @@ const ws = { class: "toolbar" }, Is = ["title"], Ts = {
476
476
  ], 64))), 128))
477
477
  ]));
478
478
  }
479
- }), Ge = /* @__PURE__ */ de(pi, [["__scopeId", "data-v-35d480c3"]]), gi = {
479
+ }), Ge = /* @__PURE__ */ de(gi, [["__scopeId", "data-v-35d480c3"]]), pi = {
480
480
  key: 0,
481
481
  class: "divider"
482
482
  }, bi = {
@@ -509,11 +509,11 @@ const ws = { class: "toolbar" }, Is = ["title"], Ts = {
509
509
  items: {}
510
510
  },
511
511
  setup(m) {
512
- const x = m, p = S(null), n = S(null), C = S([]), M = S(0), c = S(null);
512
+ const x = m, g = S(null), n = S(null), C = S([]), M = S(0), c = S(null);
513
513
  function y() {
514
514
  var A, F;
515
515
  const r = n.value;
516
- r && (C.value = Array.from(r.children).map((ve) => ve.offsetWidth), M.value = (F = (A = p.value) == null ? void 0 : A.clientWidth) != null ? F : 0);
516
+ r && (C.value = Array.from(r.children).map((ve) => ve.offsetWidth), M.value = (F = (A = g.value) == null ? void 0 : A.clientWidth) != null ? F : 0);
517
517
  }
518
518
  const f = E(() => {
519
519
  const r = M.value, A = C.value;
@@ -529,7 +529,7 @@ const ws = { class: "toolbar" }, Is = ["title"], Ts = {
529
529
  for (let U = 0; U < x.items.length && (Oe += A[U] + Zt, !(Oe > r)); U++)
530
530
  xe++;
531
531
  return Math.max(0, xe);
532
- }), l = E(() => x.items.slice(0, f.value)), u = E(() => x.items.slice(f.value)), g = Se.more;
532
+ }), l = E(() => x.items.slice(0, f.value)), u = E(() => x.items.slice(f.value)), p = Se.more;
533
533
  function D(r) {
534
534
  c.value = c.value === r ? null : r;
535
535
  }
@@ -541,24 +541,24 @@ const ws = { class: "toolbar" }, Is = ["title"], Ts = {
541
541
  var A;
542
542
  r.disabled || ((A = r.items) != null && A.length ? D(r.id) : (B(r), c.value = null));
543
543
  }
544
- function _(r) {
544
+ function z(r) {
545
545
  B(r), r.keepOpen || (c.value = null);
546
546
  }
547
- function J(r) {
547
+ function K(r) {
548
548
  return r.iconSvg ? oe(r.iconSvg) : null;
549
549
  }
550
550
  let T = null;
551
551
  function ie(r) {
552
- p.value && !p.value.contains(r.target) && (c.value = null);
552
+ g.value && !g.value.contains(r.target) && (c.value = null);
553
553
  }
554
554
  return yt(() => {
555
555
  Ce(y), T = new ResizeObserver(() => {
556
556
  var r, A;
557
- return M.value = (A = (r = p.value) == null ? void 0 : r.clientWidth) != null ? A : 0;
558
- }), p.value && T.observe(p.value), document.addEventListener("mousedown", ie);
557
+ return M.value = (A = (r = g.value) == null ? void 0 : r.clientWidth) != null ? A : 0;
558
+ }), g.value && T.observe(g.value), document.addEventListener("mousedown", ie);
559
559
  }), Le(() => {
560
560
  T == null || T.disconnect(), document.removeEventListener("mousedown", ie);
561
- }), z(
561
+ }), _(
562
562
  () => x.items.map((r) => {
563
563
  var A;
564
564
  return r.id + ((A = r.label) != null ? A : "");
@@ -567,7 +567,7 @@ const ws = { class: "toolbar" }, Is = ["title"], Ts = {
567
567
  ), (r, A) => (d(), v("div", {
568
568
  class: "action-toolbar",
569
569
  ref_key: "containerEl",
570
- ref: p
570
+ ref: g
571
571
  }, [
572
572
  i("div", {
573
573
  class: "measure",
@@ -578,11 +578,11 @@ const ws = { class: "toolbar" }, Is = ["title"], Ts = {
578
578
  (d(!0), v(O, null, Q(m.items, (F) => (d(), v(O, {
579
579
  key: "m" + F.id
580
580
  }, [
581
- F.type === "separator" ? (d(), v("span", gi)) : (d(), v("button", bi, [
582
- J(F) ? (d(), v("span", {
581
+ F.type === "separator" ? (d(), v("span", pi)) : (d(), v("button", bi, [
582
+ K(F) ? (d(), v("span", {
583
583
  key: 0,
584
584
  class: "ic",
585
- innerHTML: J(F)
585
+ innerHTML: K(F)
586
586
  }, null, 8, ki)) : F.icon ? (d(), v("span", Ci, $(F.icon), 1)) : h("", !0),
587
587
  F.label ? (d(), v("span", yi, $(F.label), 1)) : h("", !0),
588
588
  F.items ? (d(), v("span", {
@@ -603,10 +603,10 @@ const ws = { class: "toolbar" }, Is = ["title"], Ts = {
603
603
  title: F.title || F.label || F.id,
604
604
  onClick: (ve) => H(F)
605
605
  }, [
606
- J(F) ? (d(), v("span", {
606
+ K(F) ? (d(), v("span", {
607
607
  key: 0,
608
608
  class: "ic",
609
- innerHTML: J(F)
609
+ innerHTML: K(F)
610
610
  }, null, 8, wi)) : F.icon ? (d(), v("span", Ii, $(F.icon), 1)) : h("", !0),
611
611
  F.label ? (d(), v("span", Ti, $(F.label), 1)) : h("", !0),
612
612
  F.items ? (d(), v("span", {
@@ -618,7 +618,7 @@ const ws = { class: "toolbar" }, Is = ["title"], Ts = {
618
618
  F.items && c.value === F.id ? (d(), se(Ge, {
619
619
  key: 0,
620
620
  items: F.items,
621
- onPick: _
621
+ onPick: z
622
622
  }, null, 8, ["items"])) : h("", !0)
623
623
  ]))
624
624
  ], 64))), 128)),
@@ -630,13 +630,13 @@ const ws = { class: "toolbar" }, Is = ["title"], Ts = {
630
630
  }, [
631
631
  i("span", {
632
632
  class: "ic",
633
- innerHTML: R(oe)(R(g))
633
+ innerHTML: R(oe)(R(p))
634
634
  }, null, 8, Pi)
635
635
  ], 2),
636
636
  c.value === "__more" ? (d(), se(Ge, {
637
637
  key: 0,
638
638
  items: u.value,
639
- onPick: _
639
+ onPick: z
640
640
  }, null, 8, ["items"])) : h("", !0)
641
641
  ])) : h("", !0)
642
642
  ], 512));
@@ -644,7 +644,7 @@ const ws = { class: "toolbar" }, Is = ["title"], Ts = {
644
644
  }), Di = /* @__PURE__ */ de(Mi, [["__scopeId", "data-v-d4df1c57"]]), Ai = {
645
645
  class: "ribbon-tabs",
646
646
  role: "tablist"
647
- }, Bi = ["aria-selected", "onClick"], zi = ["innerHTML"], _i = { class: "ribbon-panel" }, Li = {
647
+ }, Bi = ["aria-selected", "onClick"], _i = ["innerHTML"], zi = { class: "ribbon-panel" }, Li = {
648
648
  key: 0,
649
649
  class: "rb-sep"
650
650
  }, Oi = { class: "rb-group" }, Hi = { class: "rb-group-body" }, Ni = {
@@ -678,22 +678,22 @@ const ws = { class: "toolbar" }, Is = ["title"], Ts = {
678
678
  },
679
679
  emits: ["update:activeSectionId", "open-settings"],
680
680
  setup(m, { emit: x }) {
681
- const p = m, n = x, C = S(null), M = S(null), c = E(() => p.groups.map((g) => ({ id: g.id, name: g.name, segs: vs(g.items) })));
682
- function y(g) {
683
- return g.iconSvg ? oe(g.iconSvg) : null;
681
+ const g = m, n = x, C = S(null), M = S(null), c = E(() => g.groups.map((p) => ({ id: p.id, name: p.name, segs: vs(p.items) })));
682
+ function y(p) {
683
+ return p.iconSvg ? oe(p.iconSvg) : null;
684
684
  }
685
- function f(g) {
685
+ function f(p) {
686
686
  var D, B;
687
- g.disabled || ((D = g.items) != null && D.length ? C.value = C.value === g.id ? null : g.id : ((B = g.onClick) == null || B.call(g), C.value = null));
687
+ p.disabled || ((D = p.items) != null && D.length ? C.value = C.value === p.id ? null : p.id : ((B = p.onClick) == null || B.call(p), C.value = null));
688
688
  }
689
- function l(g) {
689
+ function l(p) {
690
690
  var D;
691
- (D = g.onClick) == null || D.call(g), g.keepOpen || (C.value = null);
691
+ (D = p.onClick) == null || D.call(p), p.keepOpen || (C.value = null);
692
692
  }
693
- function u(g) {
694
- M.value && !M.value.contains(g.target) && (C.value = null);
693
+ function u(p) {
694
+ M.value && !M.value.contains(p.target) && (C.value = null);
695
695
  }
696
- return yt(() => document.addEventListener("mousedown", u)), Le(() => document.removeEventListener("mousedown", u)), (g, D) => (d(), v("div", {
696
+ return yt(() => document.addEventListener("mousedown", u)), Le(() => document.removeEventListener("mousedown", u)), (p, D) => (d(), v("div", {
697
697
  class: "ribbon",
698
698
  ref_key: "rootEl",
699
699
  ref: M
@@ -716,42 +716,42 @@ const ws = { class: "toolbar" }, Is = ["title"], Ts = {
716
716
  i("span", {
717
717
  class: "ic",
718
718
  innerHTML: R(oe)(R(Se).settings)
719
- }, null, 8, zi),
719
+ }, null, 8, _i),
720
720
  D[1] || (D[1] = i("span", { class: "lbl" }, "设置", -1))
721
721
  ])) : h("", !0)
722
722
  ]),
723
- i("div", _i, [
723
+ i("div", zi, [
724
724
  (d(!0), v(O, null, Q(c.value, (B, H) => (d(), v(O, {
725
725
  key: B.id
726
726
  }, [
727
727
  H > 0 ? (d(), v("div", Li)) : h("", !0),
728
728
  i("div", Oi, [
729
729
  i("div", Hi, [
730
- (d(!0), v(O, null, Q(B.segs, (_, J) => (d(), v(O, { key: J }, [
731
- _.kind === "large" ? (d(), v("div", Ni, [
730
+ (d(!0), v(O, null, Q(B.segs, (z, K) => (d(), v(O, { key: K }, [
731
+ z.kind === "large" ? (d(), v("div", Ni, [
732
732
  i("button", {
733
- class: ee(["rb-btn rb-large", { active: _.item.active, open: C.value === _.item.id }]),
734
- disabled: _.item.disabled,
735
- title: _.item.title || _.item.label,
736
- onClick: (T) => f(_.item)
733
+ class: ee(["rb-btn rb-large", { active: z.item.active, open: C.value === z.item.id }]),
734
+ disabled: z.item.disabled,
735
+ title: z.item.title || z.item.label,
736
+ onClick: (T) => f(z.item)
737
737
  }, [
738
- y(_.item) ? (d(), v("span", {
738
+ y(z.item) ? (d(), v("span", {
739
739
  key: 0,
740
740
  class: "ic-lg",
741
- innerHTML: y(_.item)
741
+ innerHTML: y(z.item)
742
742
  }, null, 8, Wi)) : h("", !0),
743
743
  i("span", Ui, [
744
- L($(_.item.label), 1),
745
- _.item.items ? (d(), v("span", ji, "▾")) : h("", !0)
744
+ L($(z.item.label), 1),
745
+ z.item.items ? (d(), v("span", ji, "▾")) : h("", !0)
746
746
  ])
747
747
  ], 10, Vi),
748
- _.item.items && C.value === _.item.id ? (d(), se(Ge, {
748
+ z.item.items && C.value === z.item.id ? (d(), se(Ge, {
749
749
  key: 0,
750
- items: _.item.items,
750
+ items: z.item.items,
751
751
  onPick: l
752
752
  }, null, 8, ["items"])) : h("", !0)
753
753
  ])) : (d(), v("div", Ji, [
754
- (d(!0), v(O, null, Q(_.rows, (T, ie) => (d(), v("div", {
754
+ (d(!0), v(O, null, Q(z.rows, (T, ie) => (d(), v("div", {
755
755
  key: ie,
756
756
  class: "rb-row"
757
757
  }, [
@@ -808,7 +808,7 @@ const ws = { class: "toolbar" }, Is = ["title"], Ts = {
808
808
  },
809
809
  emits: ["cancel"],
810
810
  setup(m, { emit: x }) {
811
- const p = x, n = {
811
+ const g = x, n = {
812
812
  render: "渲染中",
813
813
  compose: "合成中",
814
814
  paginate: "分页中",
@@ -817,7 +817,7 @@ const ws = { class: "toolbar" }, Is = ["title"], Ts = {
817
817
  convert: "批量转换"
818
818
  };
819
819
  return (C, M) => {
820
- var c, y, f, l, u, g, D;
820
+ var c, y, f, l, u, p, D;
821
821
  return d(), se(qa, { to: "body" }, [
822
822
  m.busy ? (d(), v("div", an, [
823
823
  i("div", sn, [
@@ -828,14 +828,14 @@ const ws = { class: "toolbar" }, Is = ["title"], Ts = {
828
828
  ((u = m.state) == null ? void 0 : u.ratio) != null ? (d(), v("div", {
829
829
  key: 0,
830
830
  class: "fill",
831
- style: Ke({ width: Math.round(((g = m.state.ratio) != null ? g : 0) * 100) + "%" })
831
+ style: Ke({ width: Math.round(((p = m.state.ratio) != null ? p : 0) * 100) + "%" })
832
832
  }, null, 4)) : h("", !0)
833
833
  ], 2),
834
834
  i("div", ln, [
835
835
  i("span", on, $(((D = m.state) == null ? void 0 : D.ratio) != null ? Math.round(m.state.ratio * 100) + "%" : "正在处理…"), 1),
836
836
  i("button", {
837
837
  class: "cancel",
838
- onClick: M[0] || (M[0] = (B) => p("cancel")),
838
+ onClick: M[0] || (M[0] = (B) => g("cancel")),
839
839
  title: "按 Esc 也可取消"
840
840
  }, "取消")
841
841
  ])
@@ -847,10 +847,10 @@ const ws = { class: "toolbar" }, Is = ["title"], Ts = {
847
847
  }), dn = /* @__PURE__ */ de(un, [["__scopeId", "data-v-629027ad"]]), vn = {
848
848
  key: 2,
849
849
  class: "formula-bar"
850
- }, mn = { class: "addr" }, fn = ["value", "title"], cn = ["title"], rn = { class: "ov-slot" }, pn = {
850
+ }, mn = { class: "addr" }, fn = ["value", "title"], cn = ["title"], rn = { class: "ov-slot" }, gn = {
851
851
  key: 1,
852
852
  class: "state"
853
- }, gn = { class: "loader" }, bn = { class: "loader-label" }, kn = { key: 0 }, Cn = { class: "loader-track" }, yn = {
853
+ }, pn = { class: "loader" }, bn = { class: "loader-label" }, kn = { key: 0 }, Cn = { class: "loader-track" }, yn = {
854
854
  key: 1,
855
855
  class: "loader-fill indeterminate"
856
856
  }, Sn = {
@@ -898,40 +898,40 @@ const ws = { class: "toolbar" }, Is = ["title"], Ts = {
898
898
  contextMenu: { type: [Boolean, Function], default: void 0 }
899
899
  },
900
900
  emits: ["rendered", "error", "progress", "cell-click", "cell-dblclick", "selection-change", "sheet-change", "hyperlink-click", "cell-change", "edit-start", "edit-commit", "dim-change", "dirty-change", "image-change", "struct-change", "permission-denied", "before-context-menu", "context-menu", "update:editable", "update:cellImageFit"],
901
- setup(m, { expose: x, emit: p }) {
901
+ setup(m, { expose: x, emit: g }) {
902
902
  const n = m, C = E(() => {
903
- var t;
904
- return (t = n.plugins) != null ? t : [];
903
+ var e;
904
+ return (e = n.plugins) != null ? e : [];
905
905
  }), M = E(
906
- () => Object.assign({}, ...C.value.map((t) => t.theme || {}), n.theme || {})
907
- ), c = E(() => !!n.cellStyle || C.value.some((t) => t.cellStyle));
908
- function y(t, a, s) {
906
+ () => Object.assign({}, ...C.value.map((e) => e.theme || {}), n.theme || {})
907
+ ), c = E(() => !!n.cellStyle || C.value.some((e) => e.cellStyle));
908
+ function y(e, a, s) {
909
909
  let o;
910
910
  const w = (I) => {
911
- const b = I == null ? void 0 : I(t, a, s);
911
+ const b = I == null ? void 0 : I(e, a, s);
912
912
  b && (o = W(W({}, o || {}), b));
913
913
  };
914
914
  for (const I of C.value) w(I.cellStyle);
915
915
  return w(n.cellStyle), o;
916
916
  }
917
- function f(t) {
917
+ function f(e) {
918
918
  var s, o;
919
- let a = t;
919
+ let a = e;
920
920
  for (const w of C.value) w.transformModel && (a = (s = w.transformModel(a)) != null ? s : a);
921
921
  return n.transformModel && (a = (o = n.transformModel(a)) != null ? o : a), a;
922
922
  }
923
923
  const l = S(null);
924
- z(() => n.editable, () => {
924
+ _(() => n.editable, () => {
925
925
  l.value = null;
926
926
  });
927
927
  const u = S(null);
928
- z(() => n.cellImageFit, () => {
928
+ _(() => n.cellImageFit, () => {
929
929
  u.value = null;
930
930
  });
931
- const g = E(() => {
932
- var t;
931
+ const p = E(() => {
932
+ var e;
933
933
  return {
934
- editable: (t = l.value) != null ? t : n.editable,
934
+ editable: (e = l.value) != null ? e : n.editable,
935
935
  pivotTable: n.pivotTable,
936
936
  conditionalFormat: n.conditionalFormat,
937
937
  cellReadOnly: n.cellReadOnly,
@@ -944,56 +944,56 @@ const ws = { class: "toolbar" }, Is = ["title"], Ts = {
944
944
  readOnlyPrompt: n.readOnlyPrompt
945
945
  };
946
946
  });
947
- function D(t, a) {
947
+ function D(e, a) {
948
948
  var o, w;
949
- const s = (o = n.editor) == null ? void 0 : o.call(n, t, a);
949
+ const s = (o = n.editor) == null ? void 0 : o.call(n, e, a);
950
950
  if (s) return s;
951
951
  for (const I of C.value) {
952
- const b = (w = I.editor) == null ? void 0 : w.call(I, t, a);
952
+ const b = (w = I.editor) == null ? void 0 : w.call(I, e, a);
953
953
  if (b) return b;
954
954
  }
955
955
  }
956
- const B = E(() => !!n.editor || C.value.some((t) => t.editor)), H = p, { loading: _, error: J, workbook: T, load: ie, loadModel: r, progress: A, sourceBuffer: F } = Fs(), ve = E(() => {
957
- var t, a;
958
- return (a = (t = F.value) == null ? void 0 : t.byteLength) != null ? a : null;
956
+ const B = E(() => !!n.editor || C.value.some((e) => e.editor)), H = g, { loading: z, error: K, workbook: T, load: ie, loadModel: r, progress: A, sourceBuffer: F } = Fs(), ve = E(() => {
957
+ var e, a;
958
+ return (a = (e = F.value) == null ? void 0 : e.byteLength) != null ? a : null;
959
959
  }), Oe = E(() => T.value ? es(T.value) : null), xe = S(null);
960
- let U = gt();
961
- z(_, (t) => {
960
+ let U = pt();
961
+ _(z, (e) => {
962
962
  var a;
963
- t && (U = (a = gt()) != null ? a : U);
963
+ e && (U = (a = pt()) != null ? a : U);
964
964
  });
965
- function ta(t) {
966
- return t ? us(t) ? t : ds(t, n.jsonOptions) : null;
965
+ function ta(e) {
966
+ return e ? us(e) ? e : ds(e, n.jsonOptions) : null;
967
967
  }
968
968
  const Xe = S(null), St = S(null), xt = E(() => {
969
- var t, a;
970
- return (a = (t = Xe.value) != null ? t : n.templateFile) != null ? a : null;
969
+ var e, a;
970
+ return (a = (e = Xe.value) != null ? e : n.templateFile) != null ? a : null;
971
971
  }), ht = E(() => {
972
- var t, a;
973
- return (a = (t = St.value) != null ? t : n.templateName) != null ? a : "";
972
+ var e, a;
973
+ return (a = (e = St.value) != null ? e : n.templateName) != null ? a : "";
974
974
  });
975
- function Ft(t, a) {
976
- Xe.value = t, St.value = a;
975
+ function Ft(e, a) {
976
+ Xe.value = e, St.value = a;
977
977
  }
978
978
  function wt() {
979
979
  Ft(null, null);
980
980
  }
981
981
  const It = S(null);
982
982
  function aa() {
983
- var t;
984
- (t = It.value) == null || t.click();
983
+ var e;
984
+ (e = It.value) == null || e.click();
985
985
  }
986
- function sa(t) {
986
+ function sa(e) {
987
987
  var s;
988
- const a = (s = t.target.files) == null ? void 0 : s[0];
989
- a && (Ft(a, a.name), t.target.value = "");
988
+ const a = (s = e.target.files) == null ? void 0 : s[0];
989
+ a && (Ft(a, a.name), e.target.value = "");
990
990
  }
991
991
  const ia = E(() => {
992
- var t, a;
993
- return n.fileName ? n.fileName : n.workbook ? "JSON 数据" : ((a = (t = T.value) == null ? void 0 : t.sheets[0]) == null ? void 0 : a.name) || "";
992
+ var e, a;
993
+ return n.fileName ? n.fileName : n.workbook ? "JSON 数据" : ((a = (e = T.value) == null ? void 0 : e.sheets[0]) == null ? void 0 : a.name) || "";
994
994
  });
995
- async function na(t) {
996
- const a = await Yt(t), s = qt(a);
995
+ async function na(e) {
996
+ const a = await Yt(e), s = qt(a);
997
997
  if (s === "xls") throw new Error("模板文件是旧版 .xls 或加密,仅支持 .xlsx/.xlsm");
998
998
  if (s === "not-zip") throw new Error("模板文件不是有效的 .xlsx(非 ZIP 包)");
999
999
  if (s === "empty") throw new Error("模板文件为空");
@@ -1001,14 +1001,14 @@ const ws = { class: "toolbar" }, Is = ["title"], Ts = {
1001
1001
  return Qt(o), o;
1002
1002
  }
1003
1003
  async function Tt() {
1004
- const t = xt.value, a = ta(n.workbook);
1004
+ const e = xt.value, a = ta(n.workbook);
1005
1005
  if (n.src) {
1006
- t && console.warn("[ooxml-excel-editor] :templateFile 只在 :workbook (JSON / 模型) 数据源下生效;xlsx 数据源已自带格式,模板已忽略."), await ie(n.src, f);
1006
+ e && console.warn("[ooxml-excel-editor] :templateFile 只在 :workbook (JSON / 模型) 数据源下生效;xlsx 数据源已自带格式,模板已忽略."), await ie(n.src, f);
1007
1007
  return;
1008
1008
  }
1009
- if (a && t) {
1009
+ if (a && e) {
1010
1010
  try {
1011
- const s = await na(t), o = gs(a, s);
1011
+ const s = await na(e), o = ps(a, s);
1012
1012
  r(o, f);
1013
1013
  } catch (s) {
1014
1014
  console.error("[ooxml-excel-editor] 模板加载失败,降级为纯 JSON 渲染:", s), r(a, f);
@@ -1019,43 +1019,43 @@ const ws = { class: "toolbar" }, Is = ["title"], Ts = {
1019
1019
  r(a, f);
1020
1020
  return;
1021
1021
  }
1022
- t && await ie(t, f);
1022
+ e && await ie(e, f);
1023
1023
  }
1024
1024
  const Et = E(() => {
1025
- const t = A.value;
1026
- return t ? t.stage === "read" ? "读取文件…" : t.stage === "parse" ? "解析中…" : "构建表格…" : "";
1025
+ const e = A.value;
1026
+ return e ? e.stage === "read" ? "读取文件…" : e.stage === "parse" ? "解析中…" : "构建表格…" : "";
1027
1027
  }), he = E(() => {
1028
- const t = A.value;
1029
- return t && t.ratio != null ? Math.round(t.ratio * 100) : null;
1030
- }), Z = S(0), $t = S(0), K = S(1), la = S(null), Fe = S(null), Ze = S(null), re = S(null), Ye = S(null), qe = S(null), Qe = S(null), et = S(null), we = bt(null), oa = S({ scrollX: 0, scrollY: 0, width: 0, height: 0, zoom: 1 }), pe = E(() => {
1028
+ const e = A.value;
1029
+ return e && e.ratio != null ? Math.round(e.ratio * 100) : null;
1030
+ }), Z = S(0), $t = S(0), j = S(1), la = S(null), Fe = S(null), Ze = S(null), re = S(null), Ye = S(null), qe = S(null), Qe = S(null), et = S(null), we = bt(null), oa = S({ scrollX: 0, scrollY: 0, width: 0, height: 0, zoom: 1 }), ge = E(() => {
1031
1031
  var a, s;
1032
- const t = T.value;
1033
- return t && (s = (a = t.sheets[Z.value]) != null ? a : t.sheets[0]) != null ? s : null;
1032
+ const e = T.value;
1033
+ return e && (s = (a = e.sheets[Z.value]) != null ? a : e.sheets[0]) != null ? s : null;
1034
1034
  }), me = S(0), Pt = S(!1), tt = S(null), at = S(null);
1035
- let e = null;
1035
+ let t = null;
1036
1036
  function He() {
1037
- e == null || e.render();
1037
+ t == null || t.render();
1038
1038
  }
1039
1039
  function ua() {
1040
- e == null || e.measure();
1040
+ t == null || t.measure();
1041
1041
  }
1042
1042
  function st() {
1043
- const t = pe.value, a = T.value;
1044
- !t || !a || !e || (e.rebuild(t, a, K.value, {
1043
+ const e = ge.value, a = T.value;
1044
+ !e || !a || !t || (t.rebuild(e, a, j.value, {
1045
1045
  theme: M.value,
1046
1046
  cellStyle: c.value ? y : void 0,
1047
1047
  cellImageFit: n.cellImageFit,
1048
1048
  readOnlyCellStyle: n.readOnlyCellStyle
1049
1049
  // Phase C 2026-06-08
1050
- }), e.setSourceBuffer(F.value));
1050
+ }), t.setSourceBuffer(F.value));
1051
1051
  }
1052
1052
  function da() {
1053
- const t = re.value;
1054
- t && (fe.value = null, e == null || e.setScroll(t.scrollLeft, t.scrollTop));
1053
+ const e = re.value;
1054
+ e && (fe.value = null, t == null || t.setScroll(e.scrollLeft, e.scrollTop));
1055
1055
  }
1056
1056
  let Ie = null;
1057
1057
  yt(() => {
1058
- Ut(), Ze.value && Fe.value && re.value && tt.value && at.value && Ye.value && qe.value && Qe.value && et.value && (e = new ts(
1058
+ Ut(), Ze.value && Fe.value && re.value && tt.value && at.value && Ye.value && qe.value && Qe.value && et.value && (t = new ts(
1059
1059
  {
1060
1060
  canvas: Ze.value,
1061
1061
  renderArea: Fe.value,
@@ -1065,895 +1065,901 @@ const ws = { class: "toolbar" }, Is = ["title"], Ts = {
1065
1065
  editorSlot: at.value
1066
1066
  },
1067
1067
  {
1068
- onRenderer: (t) => we.value = t,
1068
+ onRenderer: (e) => we.value = e,
1069
1069
  onRenderTick: () => me.value++,
1070
1070
  onSelectionChange: () => te.value++,
1071
- onCellClick: (t, a, s) => be("cell-click", { row: t, col: a, text: s }),
1072
- onCellDblClick: (t, a, s) => be("cell-dblclick", { row: t, col: a, text: s }),
1073
- onHyperlink: (t, a) => {
1074
- be("hyperlink-click", { url: t, cell: a }), n.openLinks && window.open(t, "_blank", "noopener");
1071
+ onCellClick: (e, a, s) => be("cell-click", { row: e, col: a, text: s }),
1072
+ onCellDblClick: (e, a, s) => be("cell-dblclick", { row: e, col: a, text: s }),
1073
+ onHyperlink: (e, a) => {
1074
+ be("hyperlink-click", { url: e, cell: a }), n.openLinks && window.open(e, "_blank", "noopener");
1075
1075
  },
1076
- onTooltip: (t) => fe.value = t,
1076
+ onTooltip: (e) => fe.value = e,
1077
1077
  onFindChange: () => dt.value++,
1078
1078
  onFilterChange: () => Lt.value++,
1079
- onActiveSheetChange: (t) => {
1080
- Z.value = t, $t.value++;
1079
+ onActiveSheetChange: (e) => {
1080
+ Z.value = e, $t.value++;
1081
1081
  },
1082
1082
  // core 新增表(透视新建工作表)→ 顶版本号让 SheetTabs 重读(workbook 是 shallowRef,push 不自动通知)
1083
- onEditEvent: (t, a) => be(t, a),
1084
- onContextMenuBefore: (t) => {
1083
+ onZoomChange: (e) => {
1084
+ j.value = e;
1085
+ },
1086
+ // 触屏 pinch/双击改缩放 → 同步工具栏 %(watch 会去重不再回 setZoom)
1087
+ onEditEvent: (e, a) => be(e, a),
1088
+ onContextMenuBefore: (e) => {
1085
1089
  for (const a of C.value)
1086
1090
  if (a.contextMenu) {
1087
- const s = a.contextMenu(t.ctx, t.items);
1088
- Array.isArray(s) && t.items.splice(0, t.items.length, ...s);
1091
+ const s = a.contextMenu(e.ctx, e.items);
1092
+ Array.isArray(s) && e.items.splice(0, e.items.length, ...s);
1089
1093
  }
1090
- n.contextMenu === !1 && t.preventDefault(), H("before-context-menu", t);
1094
+ n.contextMenu === !1 && e.preventDefault(), H("before-context-menu", e);
1091
1095
  },
1092
- onContextMenuShow: (t) => H("context-menu", t)
1096
+ onContextMenuShow: (e) => H("context-menu", e)
1093
1097
  }
1094
- ), oa.value = e.view, e.fileName = n.fileName, e.setEditConfig(g.value), e.setEditorResolver(B.value ? D : void 0), e.setLightboxEnabled(n.imageLightbox !== !1), e.setContextMenuTransform(typeof n.contextMenu == "function" ? n.contextMenu : null)), ft.value && (ce = new as(ft.value)), Tt(), Ie = new ResizeObserver(() => {
1098
+ ), oa.value = t.view, t.fileName = n.fileName, t.setEditConfig(p.value), t.setEditorResolver(B.value ? D : void 0), t.setLightboxEnabled(n.imageLightbox !== !1), t.setContextMenuTransform(typeof n.contextMenu == "function" ? n.contextMenu : null)), ft.value && (ce = new as(ft.value)), Tt(), Ie = new ResizeObserver(() => {
1095
1099
  ua(), He();
1096
1100
  }), Fe.value && Ie.observe(Fe.value);
1097
1101
  }), Le(() => {
1098
- Ie == null || Ie.disconnect(), e == null || e.dispose(), Wt.dispose(), ce == null || ce.dispose(), Je.forEach((t) => t()), T.value && kt(T.value);
1099
- }), z([() => n.src, () => n.workbook, () => n.templateFile, Xe], () => {
1102
+ Ie == null || Ie.disconnect(), t == null || t.dispose(), Wt.dispose(), ce == null || ce.dispose(), Je.forEach((e) => e()), T.value && kt(T.value);
1103
+ }), _([() => n.src, () => n.workbook, () => n.templateFile, Xe], () => {
1100
1104
  Tt();
1101
- }), z(() => n.fileName, (t) => {
1102
- e && (e.fileName = t);
1103
- }), z(g, (t) => e == null ? void 0 : e.setEditConfig(t)), z(() => n.contextMenu, (t) => e == null ? void 0 : e.setContextMenuTransform(typeof t == "function" ? t : null)), z([() => n.editor, C], () => e == null ? void 0 : e.setEditorResolver(B.value ? D : void 0)), z(() => n.cellImageFit, (t) => {
1104
- t && (e == null || e.setCellImageFit(t));
1105
- }), z(() => n.imageLightbox, (t) => e == null ? void 0 : e.setLightboxEnabled(t !== !1)), z(
1105
+ }), _(() => n.fileName, (e) => {
1106
+ t && (t.fileName = e);
1107
+ }), _(p, (e) => t == null ? void 0 : t.setEditConfig(e)), _(() => n.contextMenu, (e) => t == null ? void 0 : t.setContextMenuTransform(typeof e == "function" ? e : null)), _([() => n.editor, C], () => t == null ? void 0 : t.setEditorResolver(B.value ? D : void 0)), _(() => n.cellImageFit, (e) => {
1108
+ e && (t == null || t.setCellImageFit(e));
1109
+ }), _(() => n.imageLightbox, (e) => t == null ? void 0 : t.setLightboxEnabled(e !== !1)), _(
1106
1110
  () => [M.value, n.cellStyle, n.plugins],
1107
1111
  () => {
1108
1112
  we.value && st();
1109
1113
  },
1110
1114
  { deep: !0 }
1111
- ), z(() => n.plugins, () => Ut(), { deep: !1 }), z(T, async (t) => {
1112
- if (!t) return;
1113
- e == null || e.clearFilterState(), Z.value = t.activeSheet, await Ce(), st();
1114
- const a = gt();
1115
- xe.value = a != null && U != null ? Math.max(0, a - U) : null, H("rendered", t);
1116
- }), z(Z, (t) => {
1115
+ ), _(() => n.plugins, () => Ut(), { deep: !1 }), _(T, async (e) => {
1116
+ if (!e) return;
1117
+ t == null || t.clearFilterState(), Z.value = e.activeSheet, await Ce(), st();
1118
+ const a = pt();
1119
+ xe.value = a != null && U != null ? Math.max(0, a - U) : null, H("rendered", e);
1120
+ }), _(Z, (e) => {
1117
1121
  const a = T.value;
1118
- a != null && a.sheets[t] && be("sheet-change", { index: t, name: a.sheets[t].name });
1119
- }), z(J, (t) => {
1120
- t && H("error", t);
1121
- }), z(A, (t) => {
1122
- t && H("progress", t);
1123
- }), z(Z, async (t, a) => {
1122
+ a != null && a.sheets[e] && be("sheet-change", { index: e, name: a.sheets[e].name });
1123
+ }), _(K, (e) => {
1124
+ e && H("error", e);
1125
+ }), _(A, (e) => {
1126
+ e && H("progress", e);
1127
+ }), _(Z, async (e, a) => {
1124
1128
  var s;
1125
- a != null && (e == null || e.resetFilter((s = T.value) == null ? void 0 : s.sheets[a])), await Ce(), st();
1126
- }), z(K, (t) => e == null ? void 0 : e.setZoom(t));
1127
- const te = S(0), fe = S(null), j = E(() => {
1128
- var t;
1129
- return te.value, we.value, (t = e == null ? void 0 : e.getSelection()) != null ? t : null;
1129
+ a != null && (t == null || t.resetFilter((s = T.value) == null ? void 0 : s.sheets[a])), await Ce(), st();
1130
+ }), _(j, (e) => {
1131
+ t && Math.abs(t.getZoom() - e) < 1e-6 || t == null || t.setZoom(e);
1132
+ });
1133
+ const te = S(0), fe = S(null), J = E(() => {
1134
+ var e;
1135
+ return te.value, we.value, (e = t == null ? void 0 : t.getSelection()) != null ? e : null;
1130
1136
  }), it = E(() => {
1131
1137
  te.value;
1132
- const t = e == null ? void 0 : e.getActiveCell();
1133
- return t ? ye(t.col) + (t.row + 1) : "";
1138
+ const e = t == null ? void 0 : t.getActiveCell();
1139
+ return e ? ye(e.col) + (e.row + 1) : "";
1134
1140
  }), Rt = E(() => {
1135
- const t = j.value;
1136
- return !t || t.top === t.bottom && t.left === t.right ? "" : `${ye(t.left)}${t.top + 1}:${ye(t.right)}${t.bottom + 1}`;
1141
+ const e = J.value;
1142
+ return !e || e.top === e.bottom && e.left === e.right ? "" : `${ye(e.left)}${e.top + 1}:${ye(e.right)}${e.bottom + 1}`;
1137
1143
  }), Mt = E(() => {
1138
1144
  var s;
1139
1145
  te.value;
1140
- const t = we.value, a = e == null ? void 0 : e.getActiveCell();
1141
- return !t || !a ? "" : (s = t.cellFormula(a.row, a.col)) != null ? s : t.cellText(a.row, a.col);
1146
+ const e = we.value, a = t == null ? void 0 : t.getActiveCell();
1147
+ return !e || !a ? "" : (s = e.cellFormula(a.row, a.col)) != null ? s : e.cellText(a.row, a.col);
1142
1148
  }), va = E(() => {
1143
- var t;
1144
- return te.value, (t = e == null ? void 0 : e.isFormulaBarVisible()) != null ? t : !0;
1149
+ var e;
1150
+ return te.value, (e = t == null ? void 0 : t.isFormulaBarVisible()) != null ? e : !0;
1145
1151
  }), ae = S(""), Te = S(!1), Dt = S(null);
1146
1152
  function nt() {
1147
- const t = Dt.value;
1148
- t && (t.style.height = "auto", t.style.height = t.scrollHeight + "px");
1153
+ const e = Dt.value;
1154
+ e && (e.style.height = "auto", e.style.height = e.scrollHeight + "px");
1149
1155
  }
1150
- function ma(t) {
1151
- ae.value = t.target.value, nt();
1156
+ function ma(e) {
1157
+ ae.value = e.target.value, nt();
1152
1158
  }
1153
- const fa = E(() => (te.value, me.value, !!(e != null && e.canEditActiveCell()))), Ne = E(() => {
1154
- var t;
1155
- return te.value, me.value, (t = e == null ? void 0 : e.getCellEditString()) != null ? t : "";
1159
+ const fa = E(() => (te.value, me.value, !!(t != null && t.canEditActiveCell()))), Ne = E(() => {
1160
+ var e;
1161
+ return te.value, me.value, (e = t == null ? void 0 : t.getCellEditString()) != null ? e : "";
1156
1162
  });
1157
- z(Ne, (t) => {
1158
- Te.value || (ae.value = t);
1159
- }, { immediate: !0 }), z(ae, () => Ce(nt));
1163
+ _(Ne, (e) => {
1164
+ Te.value || (ae.value = e);
1165
+ }, { immediate: !0 }), _(ae, () => Ce(nt));
1160
1166
  function ca() {
1161
1167
  Te.value = !0, ae.value = Ne.value, Ce(nt);
1162
1168
  }
1163
- function At(t) {
1169
+ function At(e) {
1164
1170
  var a;
1165
- e == null || e.commitActiveCellValue(ae.value, t), Te.value = !1, ae.value = Ne.value, t === "down" && ((a = re.value) == null || a.focus());
1171
+ t == null || t.commitActiveCellValue(ae.value, e), Te.value = !1, ae.value = Ne.value, e === "down" && ((a = re.value) == null || a.focus());
1166
1172
  }
1167
1173
  function ra() {
1168
- var t;
1169
- Te.value = !1, ae.value = Ne.value, (t = re.value) == null || t.focus();
1174
+ var e;
1175
+ Te.value = !1, ae.value = Ne.value, (e = re.value) == null || e.focus();
1170
1176
  }
1171
- function pa() {
1177
+ function ga() {
1172
1178
  Te.value && At();
1173
1179
  }
1174
- function ga(t) {
1175
- t.stopPropagation(), t.key === "Enter" ? (t.preventDefault(), At("down")) : t.key === "Escape" && (t.preventDefault(), ra());
1180
+ function pa(e) {
1181
+ e.stopPropagation(), e.key === "Enter" ? (e.preventDefault(), At("down")) : e.key === "Escape" && (e.preventDefault(), ra());
1176
1182
  }
1177
1183
  const G = E(() => {
1178
- var t;
1179
- return te.value, (t = e == null ? void 0 : e.getSelectionStats()) != null ? t : null;
1184
+ var e;
1185
+ return te.value, (e = t == null ? void 0 : t.getSelectionStats()) != null ? e : null;
1180
1186
  });
1181
- function Ve(t) {
1182
- return isFinite(t) ? t.toLocaleString("en-US", { maximumFractionDigits: 2 }) : "—";
1187
+ function Ve(e) {
1188
+ return isFinite(e) ? e.toLocaleString("en-US", { maximumFractionDigits: 2 }) : "—";
1183
1189
  }
1184
- function ba(t) {
1185
- e == null || e.onMouseDown(t);
1190
+ function ba(e) {
1191
+ t == null || t.onMouseDown(e);
1186
1192
  }
1187
- function ka(t) {
1188
- e == null || e.onContextMenu(t);
1193
+ function ka(e) {
1194
+ t == null || t.onContextMenu(e);
1189
1195
  }
1190
- function Ca(t) {
1191
- e == null || e.onMouseMove(t);
1196
+ function Ca(e) {
1197
+ t == null || t.onMouseMove(e);
1192
1198
  }
1193
- function ya(t) {
1194
- e == null || e.onMouseUp(t);
1199
+ function ya(e) {
1200
+ t == null || t.onMouseUp(e);
1195
1201
  }
1196
1202
  function Sa() {
1197
- e == null || e.onMouseLeave();
1203
+ t == null || t.onMouseLeave();
1198
1204
  }
1199
- function xa(t) {
1200
- e == null || e.onDblClick(t);
1205
+ function xa(e) {
1206
+ t == null || t.onDblClick(e);
1201
1207
  }
1202
- function ha(t) {
1203
- e == null || e.onKeyDown(t);
1208
+ function ha(e) {
1209
+ t == null || t.onKeyDown(e);
1204
1210
  }
1205
- z(j, (t) => {
1206
- const a = e == null ? void 0 : e.getActiveCell();
1207
- t && a && be("selection-change", { range: t, active: a });
1211
+ _(J, (e) => {
1212
+ const a = t == null ? void 0 : t.getActiveCell();
1213
+ e && a && be("selection-change", { range: e, active: a });
1208
1214
  });
1209
- function lt(t, a) {
1215
+ function lt(e, a) {
1210
1216
  var s;
1211
- return (s = e == null ? void 0 : e.rectOf(t, a)) != null ? s : null;
1217
+ return (s = t == null ? void 0 : t.rectOf(e, a)) != null ? s : null;
1212
1218
  }
1213
- function ot(t) {
1219
+ function ot(e) {
1214
1220
  var a;
1215
- return (a = e == null ? void 0 : e.rectOfRange(t)) != null ? a : null;
1221
+ return (a = t == null ? void 0 : t.rectOfRange(e)) != null ? a : null;
1216
1222
  }
1217
1223
  const Ee = S(null), We = S(!1);
1218
1224
  let $e = null;
1219
1225
  function Bt() {
1220
1226
  $e == null || $e.abort();
1221
1227
  }
1222
- function Y(t, a) {
1223
- if (n.exportProgress === !1) return a(t);
1228
+ function Y(e, a) {
1229
+ if (n.exportProgress === !1) return a(e);
1224
1230
  const s = new AbortController();
1225
- $e = s, t != null && t.signal && (t.signal.aborted ? s.abort() : t.signal.addEventListener("abort", () => s.abort(), { once: !0 })), We.value = !0, Ee.value = null;
1231
+ $e = s, e != null && e.signal && (e.signal.aborted ? s.abort() : e.signal.addEventListener("abort", () => s.abort(), { once: !0 })), We.value = !0, Ee.value = null;
1226
1232
  const o = (I) => {
1227
1233
  var b;
1228
- Ee.value = I, (b = t == null ? void 0 : t.onProgress) == null || b.call(t, I);
1229
- }, w = ke(W({}, t != null ? t : {}), { onProgress: o, signal: s.signal });
1234
+ Ee.value = I, (b = e == null ? void 0 : e.onProgress) == null || b.call(e, I);
1235
+ }, w = ke(W({}, e != null ? e : {}), { onProgress: o, signal: s.signal });
1230
1236
  return a(w).finally(() => {
1231
1237
  We.value = !1, Ee.value = null, $e = null;
1232
1238
  });
1233
1239
  }
1234
- const Fa = (t) => Y(t, (a) => e.exportImage(a)), Pe = (t) => Y(t, (a) => e.downloadImage(a)), wa = (t) => Y(t, (a) => e.exportPdf(a)), Re = (t) => Y(t, (a) => e.downloadPdf(a)), Me = (t) => Y(t, (a) => e.print(a)), Ia = (t) => Y(t, (a) => e.downloadXlsx(a)), Ta = () => e == null ? void 0 : e.downloadCsv(), Ea = () => e == null ? void 0 : e.downloadJson(), $a = (t) => e ? e.openPrintPreview(t) : Promise.resolve(!1);
1235
- async function zt() {
1240
+ const Fa = (e) => Y(e, (a) => t.exportImage(a)), Pe = (e) => Y(e, (a) => t.downloadImage(a)), wa = (e) => Y(e, (a) => t.exportPdf(a)), Re = (e) => Y(e, (a) => t.downloadPdf(a)), Me = (e) => Y(e, (a) => t.print(a)), Ia = (e) => Y(e, (a) => t.downloadXlsx(a)), Ta = () => t == null ? void 0 : t.downloadCsv(), Ea = () => t == null ? void 0 : t.downloadJson(), $a = (e) => t ? t.openPrintPreview(e) : Promise.resolve(!1);
1241
+ async function _t() {
1236
1242
  try {
1237
1243
  await Re();
1238
- } catch (t) {
1239
- ut(t);
1244
+ } catch (e) {
1245
+ ut(e);
1240
1246
  }
1241
1247
  }
1242
- async function _t() {
1248
+ async function zt() {
1243
1249
  try {
1244
1250
  await Re({ vector: !0 });
1245
- } catch (t) {
1246
- ut(t);
1251
+ } catch (e) {
1252
+ ut(e);
1247
1253
  }
1248
1254
  }
1249
- function ut(t) {
1250
- const a = (t == null ? void 0 : t.message) || String(t);
1251
- console.error("[ooxml-excel-editor] 导出失败:", t), H("error", a), typeof window != "undefined" && window.alert && window.alert(a);
1255
+ function ut(e) {
1256
+ const a = (e == null ? void 0 : e.message) || String(e);
1257
+ console.error("[ooxml-excel-editor] 导出失败:", e), H("error", a), typeof window != "undefined" && window.alert && window.alert(a);
1252
1258
  }
1253
- const dt = S(0), Pa = E(() => (dt.value, !!(e != null && e.isFindDialogOpen())));
1259
+ const dt = S(0), Pa = E(() => (dt.value, !!(t != null && t.isFindDialogOpen())));
1254
1260
  function Ra() {
1255
- e == null || e.openFindReplaceDialog("find");
1261
+ t == null || t.openFindReplaceDialog("find");
1256
1262
  }
1257
1263
  function Ma() {
1258
- e != null && e.isFindDialogOpen() ? e.closeFindReplaceDialog() : e == null || e.openFindReplaceDialog("find");
1264
+ t != null && t.isFindDialogOpen() ? t.closeFindReplaceDialog() : t == null || t.openFindReplaceDialog("find");
1259
1265
  }
1260
- function Da(t) {
1261
- (t.ctrlKey || t.metaKey) && (t.key === "f" || t.key === "F") && (t.preventDefault(), Ra());
1266
+ function Da(e) {
1267
+ (e.ctrlKey || e.metaKey) && (e.key === "f" || e.key === "F") && (e.preventDefault(), Ra());
1262
1268
  }
1263
1269
  const Lt = S(0);
1264
1270
  function Aa() {
1265
- e == null || e.toggleAutoFilter();
1271
+ t == null || t.toggleAutoFilter();
1266
1272
  }
1267
1273
  function Ba() {
1268
- const t = pe.value, a = we.value;
1269
- if (!t || !a) return;
1270
- const s = t.freeze;
1274
+ const e = ge.value, a = we.value;
1275
+ if (!e || !a) return;
1276
+ const s = e.freeze;
1271
1277
  if (s.frozenRows || s.frozenCols)
1272
- t.freeze = { frozenRows: 0, frozenCols: 0 };
1278
+ e.freeze = { frozenRows: 0, frozenCols: 0 };
1273
1279
  else {
1274
- const o = e == null ? void 0 : e.getActiveCell();
1275
- t.freeze = { frozenRows: o ? o.row : 1, frozenCols: o ? o.col : 0 };
1280
+ const o = t == null ? void 0 : t.getActiveCell();
1281
+ e.freeze = { frozenRows: o ? o.row : 1, frozenCols: o ? o.col : 0 };
1276
1282
  }
1277
- a.rebuildMetrics(), e == null || e.refreshContentSize(), He();
1283
+ a.rebuildMetrics(), t == null || t.refreshContentSize(), He();
1278
1284
  }
1279
1285
  const De = S(!1);
1280
- async function za(t) {
1286
+ async function _a(e) {
1281
1287
  var I;
1282
1288
  De.value = !1;
1283
- const a = t.scope === "all" ? "all" : "active", s = t.scope === "selection" && (I = j.value) != null ? I : void 0, o = {
1289
+ const a = e.scope === "all" ? "all" : "active", s = e.scope === "selection" && (I = J.value) != null ? I : void 0, o = {
1284
1290
  target: a,
1285
1291
  range: s,
1286
- scale: t.scale,
1287
- includeHeaders: t.includeHeaders,
1288
- gridlines: t.gridlines
1289
- }, w = ke(W(W({}, t.format !== "auto" ? { format: t.format } : {}), t.orientation !== "auto" ? { orientation: t.orientation } : {}), {
1290
- fitToWidth: t.fitToWidth
1292
+ scale: e.scale,
1293
+ includeHeaders: e.includeHeaders,
1294
+ gridlines: e.gridlines
1295
+ }, w = ke(W(W({}, e.format !== "auto" ? { format: e.format } : {}), e.orientation !== "auto" ? { orientation: e.orientation } : {}), {
1296
+ fitToWidth: e.fitToWidth
1291
1297
  });
1292
1298
  try {
1293
- t.action === "png" ? await Pe(o) : t.action === "pdf" ? await Re(ke(W(W({}, o), w), { vector: t.pdfVector })) : await Me(W(W({}, o), w));
1299
+ e.action === "png" ? await Pe(o) : e.action === "pdf" ? await Re(ke(W(W({}, o), w), { vector: e.pdfVector })) : await Me(W(W({}, o), w));
1294
1300
  } catch (b) {
1295
1301
  ut(b);
1296
1302
  }
1297
1303
  }
1298
- function _a(t) {
1299
- e == null || e.setSelectionRange(t);
1304
+ function za(e) {
1305
+ t == null || t.setSelectionRange(e);
1300
1306
  }
1301
1307
  const Ae = {
1302
- load: (t) => ie(t, f),
1308
+ load: (e) => ie(e, f),
1303
1309
  getWorkbook: () => T.value,
1304
1310
  getActiveSheet: () => Z.value,
1305
- setActiveSheet: (t) => {
1311
+ setActiveSheet: (e) => {
1306
1312
  var a;
1307
- (a = T.value) != null && a.sheets[t] && (Z.value = t);
1313
+ (a = T.value) != null && a.sheets[e] && (Z.value = e);
1308
1314
  },
1309
- getSelection: () => j.value,
1315
+ getSelection: () => J.value,
1310
1316
  getSelectionRanges: () => {
1311
- var t;
1312
- return (t = e == null ? void 0 : e.getSelectionRanges()) != null ? t : [];
1317
+ var e;
1318
+ return (e = t == null ? void 0 : t.getSelectionRanges()) != null ? e : [];
1313
1319
  },
1314
1320
  hasMultiSelection: () => {
1315
- var t;
1316
- return (t = e == null ? void 0 : e.hasMultiSelection()) != null ? t : !1;
1321
+ var e;
1322
+ return (e = t == null ? void 0 : t.hasMultiSelection()) != null ? e : !1;
1317
1323
  },
1318
- setSelection: _a,
1319
- scrollToCell: (t, a, s) => {
1324
+ setSelection: za,
1325
+ scrollToCell: (e, a, s) => {
1320
1326
  var o;
1321
- return (o = e == null ? void 0 : e.scrollToCell(t, a, s)) != null ? o : !1;
1327
+ return (o = t == null ? void 0 : t.scrollToCell(e, a, s)) != null ? o : !1;
1322
1328
  },
1323
1329
  rectOf: lt,
1324
1330
  rectOfRange: ot,
1325
1331
  redraw: () => He(),
1326
- isCellEditable: (t, a) => {
1332
+ isCellEditable: (e, a) => {
1327
1333
  var s;
1328
- return (s = e == null ? void 0 : e.isCellEditable(t, a)) != null ? s : !1;
1334
+ return (s = t == null ? void 0 : t.isCellEditable(e, a)) != null ? s : !1;
1329
1335
  },
1330
- setEditableTargets: (t) => e == null ? void 0 : e.setEditableTargets(t),
1331
- getEditableTargets: () => e == null ? void 0 : e.getEditableTargets(),
1332
- sortActiveColumn: (t) => {
1336
+ setEditableTargets: (e) => t == null ? void 0 : t.setEditableTargets(e),
1337
+ getEditableTargets: () => t == null ? void 0 : t.getEditableTargets(),
1338
+ sortActiveColumn: (e) => {
1333
1339
  var a;
1334
- return (a = e == null ? void 0 : e.sortActiveColumn(t)) != null ? a : !1;
1340
+ return (a = t == null ? void 0 : t.sortActiveColumn(e)) != null ? a : !1;
1335
1341
  },
1336
- createPivotTable: (t) => {
1342
+ createPivotTable: (e) => {
1337
1343
  var a;
1338
- return (a = e == null ? void 0 : e.createPivotTable(t)) != null ? a : !1;
1344
+ return (a = t == null ? void 0 : t.createPivotTable(e)) != null ? a : !1;
1339
1345
  },
1340
- createPivotTableFromSelection: (t) => {
1346
+ createPivotTableFromSelection: (e) => {
1341
1347
  var a;
1342
- return (a = e == null ? void 0 : e.createPivotTableFromSelection(t)) != null ? a : !1;
1348
+ return (a = t == null ? void 0 : t.createPivotTableFromSelection(e)) != null ? a : !1;
1343
1349
  },
1344
1350
  openPivotTableDialog: () => {
1345
- var t;
1346
- return (t = e == null ? void 0 : e.openPivotTableDialog()) != null ? t : !1;
1351
+ var e;
1352
+ return (e = t == null ? void 0 : t.openPivotTableDialog()) != null ? e : !1;
1347
1353
  },
1348
1354
  getConditionalRules: () => {
1349
- var t;
1350
- return (t = e == null ? void 0 : e.getConditionalRules()) != null ? t : [];
1355
+ var e;
1356
+ return (e = t == null ? void 0 : t.getConditionalRules()) != null ? e : [];
1351
1357
  },
1352
- addConditionalRule: (t) => {
1358
+ addConditionalRule: (e) => {
1353
1359
  var a;
1354
- return (a = e == null ? void 0 : e.addConditionalRule(t)) != null ? a : !1;
1360
+ return (a = t == null ? void 0 : t.addConditionalRule(e)) != null ? a : !1;
1355
1361
  },
1356
- updateConditionalRule: (t, a) => {
1362
+ updateConditionalRule: (e, a) => {
1357
1363
  var s;
1358
- return (s = e == null ? void 0 : e.updateConditionalRule(t, a)) != null ? s : !1;
1364
+ return (s = t == null ? void 0 : t.updateConditionalRule(e, a)) != null ? s : !1;
1359
1365
  },
1360
- removeConditionalRule: (t) => {
1366
+ removeConditionalRule: (e) => {
1361
1367
  var a;
1362
- return (a = e == null ? void 0 : e.removeConditionalRule(t)) != null ? a : !1;
1368
+ return (a = t == null ? void 0 : t.removeConditionalRule(e)) != null ? a : !1;
1363
1369
  },
1364
- setConditionalRules: (t) => {
1370
+ setConditionalRules: (e) => {
1365
1371
  var a;
1366
- return (a = e == null ? void 0 : e.setConditionalRules(t)) != null ? a : !1;
1372
+ return (a = t == null ? void 0 : t.setConditionalRules(e)) != null ? a : !1;
1367
1373
  },
1368
1374
  openConditionalFormatDialog: () => {
1369
- var t;
1370
- return (t = e == null ? void 0 : e.openConditionalFormatDialog()) != null ? t : !1;
1375
+ var e;
1376
+ return (e = t == null ? void 0 : t.openConditionalFormatDialog()) != null ? e : !1;
1371
1377
  },
1372
- setSelectionNumberFormat: (t) => {
1378
+ setSelectionNumberFormat: (e) => {
1373
1379
  var a;
1374
- return (a = e == null ? void 0 : e.setSelectionNumberFormat(t)) != null ? a : !1;
1380
+ return (a = t == null ? void 0 : t.setSelectionNumberFormat(e)) != null ? a : !1;
1375
1381
  },
1376
1382
  openNumberFormatDialog: () => {
1377
- var t;
1378
- return (t = e == null ? void 0 : e.openNumberFormatDialog()) != null ? t : !1;
1383
+ var e;
1384
+ return (e = t == null ? void 0 : t.openNumberFormatDialog()) != null ? e : !1;
1379
1385
  },
1380
1386
  // WPS 工具栏样式/编辑便利 (1.16.0)
1381
1387
  getSelectionFontState: () => {
1382
- var t;
1383
- return (t = e == null ? void 0 : e.getSelectionFontState()) != null ? t : { bold: !1, italic: !1, underline: !1 };
1388
+ var e;
1389
+ return (e = t == null ? void 0 : t.getSelectionFontState()) != null ? e : { bold: !1, italic: !1, underline: !1 };
1384
1390
  },
1385
1391
  getSelectionAlignState: () => {
1386
- var t;
1387
- return (t = e == null ? void 0 : e.getSelectionAlignState()) != null ? t : {};
1392
+ var e;
1393
+ return (e = t == null ? void 0 : t.getSelectionAlignState()) != null ? e : {};
1388
1394
  },
1389
- toggleSelectionFont: (t) => {
1395
+ toggleSelectionFont: (e) => {
1390
1396
  var a;
1391
- return (a = e == null ? void 0 : e.toggleSelectionFont(t)) != null ? a : !1;
1397
+ return (a = t == null ? void 0 : t.toggleSelectionFont(e)) != null ? a : !1;
1392
1398
  },
1393
- setSelectionUnderline: (t) => {
1399
+ setSelectionUnderline: (e) => {
1394
1400
  var a;
1395
- return (a = e == null ? void 0 : e.setSelectionUnderline(t)) != null ? a : !1;
1401
+ return (a = t == null ? void 0 : t.setSelectionUnderline(e)) != null ? a : !1;
1396
1402
  },
1397
- setSelectionFontName: (t) => {
1403
+ setSelectionFontName: (e) => {
1398
1404
  var a;
1399
- return (a = e == null ? void 0 : e.setSelectionFontName(t)) != null ? a : !1;
1405
+ return (a = t == null ? void 0 : t.setSelectionFontName(e)) != null ? a : !1;
1400
1406
  },
1401
- setSelectionFontSize: (t) => {
1407
+ setSelectionFontSize: (e) => {
1402
1408
  var a;
1403
- return (a = e == null ? void 0 : e.setSelectionFontSize(t)) != null ? a : !1;
1409
+ return (a = t == null ? void 0 : t.setSelectionFontSize(e)) != null ? a : !1;
1404
1410
  },
1405
- adjustSelectionFontSize: (t) => {
1411
+ adjustSelectionFontSize: (e) => {
1406
1412
  var a;
1407
- return (a = e == null ? void 0 : e.adjustSelectionFontSize(t)) != null ? a : !1;
1413
+ return (a = t == null ? void 0 : t.adjustSelectionFontSize(e)) != null ? a : !1;
1408
1414
  },
1409
- setSelectionHAlign: (t) => {
1415
+ setSelectionHAlign: (e) => {
1410
1416
  var a;
1411
- return (a = e == null ? void 0 : e.setSelectionHAlign(t)) != null ? a : !1;
1417
+ return (a = t == null ? void 0 : t.setSelectionHAlign(e)) != null ? a : !1;
1412
1418
  },
1413
- setSelectionVAlign: (t) => {
1419
+ setSelectionVAlign: (e) => {
1414
1420
  var a;
1415
- return (a = e == null ? void 0 : e.setSelectionVAlign(t)) != null ? a : !1;
1421
+ return (a = t == null ? void 0 : t.setSelectionVAlign(e)) != null ? a : !1;
1416
1422
  },
1417
- setSelectionBorders: (t, a) => {
1423
+ setSelectionBorders: (e, a) => {
1418
1424
  var s;
1419
- return (s = e == null ? void 0 : e.setSelectionBorders(t, a)) != null ? s : !1;
1425
+ return (s = t == null ? void 0 : t.setSelectionBorders(e, a)) != null ? s : !1;
1420
1426
  },
1421
1427
  mergeCenterSelection: () => {
1422
- var t;
1423
- return (t = e == null ? void 0 : e.mergeCenterSelection()) != null ? t : !1;
1428
+ var e;
1429
+ return (e = t == null ? void 0 : t.mergeCenterSelection()) != null ? e : !1;
1424
1430
  },
1425
- clearSelectionCells: (t) => {
1431
+ clearSelectionCells: (e) => {
1426
1432
  var a;
1427
- return (a = e == null ? void 0 : e.clearSelectionCells(t)) != null ? a : !1;
1433
+ return (a = t == null ? void 0 : t.clearSelectionCells(e)) != null ? a : !1;
1428
1434
  },
1429
- freezePanes: (t) => {
1435
+ freezePanes: (e) => {
1430
1436
  var a;
1431
- return (a = e == null ? void 0 : e.freezePanes(t)) != null ? a : !1;
1437
+ return (a = t == null ? void 0 : t.freezePanes(e)) != null ? a : !1;
1432
1438
  },
1433
1439
  getFreezeState: () => {
1434
- var t;
1435
- return (t = e == null ? void 0 : e.getFreezeState()) != null ? t : { frozenRows: 0, frozenCols: 0 };
1440
+ var e;
1441
+ return (e = t == null ? void 0 : t.getFreezeState()) != null ? e : { frozenRows: 0, frozenCols: 0 };
1436
1442
  },
1437
- sortByKeys: (t) => {
1443
+ sortByKeys: (e) => {
1438
1444
  var a;
1439
- return (a = e == null ? void 0 : e.sortByKeys(t)) != null ? a : !1;
1445
+ return (a = t == null ? void 0 : t.sortByKeys(e)) != null ? a : !1;
1440
1446
  },
1441
1447
  openSortDialog: () => {
1442
- var t;
1443
- return (t = e == null ? void 0 : e.openSortDialog()) != null ? t : !1;
1448
+ var e;
1449
+ return (e = t == null ? void 0 : t.openSortDialog()) != null ? e : !1;
1444
1450
  },
1445
- setSelectionRowsHidden: (t) => {
1451
+ setSelectionRowsHidden: (e) => {
1446
1452
  var a;
1447
- return (a = e == null ? void 0 : e.setSelectionRowsHidden(t)) != null ? a : !1;
1453
+ return (a = t == null ? void 0 : t.setSelectionRowsHidden(e)) != null ? a : !1;
1448
1454
  },
1449
- setSelectionColsHidden: (t) => {
1455
+ setSelectionColsHidden: (e) => {
1450
1456
  var a;
1451
- return (a = e == null ? void 0 : e.setSelectionColsHidden(t)) != null ? a : !1;
1457
+ return (a = t == null ? void 0 : t.setSelectionColsHidden(e)) != null ? a : !1;
1452
1458
  },
1453
- autoFitSelection: (t) => {
1459
+ autoFitSelection: (e) => {
1454
1460
  var a;
1455
- return (a = e == null ? void 0 : e.autoFitSelection(t)) != null ? a : !1;
1461
+ return (a = t == null ? void 0 : t.autoFitSelection(e)) != null ? a : !1;
1456
1462
  },
1457
- adjustSelectionIndent: (t) => {
1463
+ adjustSelectionIndent: (e) => {
1458
1464
  var a;
1459
- return (a = e == null ? void 0 : e.adjustSelectionIndent(t)) != null ? a : !1;
1465
+ return (a = t == null ? void 0 : t.adjustSelectionIndent(e)) != null ? a : !1;
1460
1466
  },
1461
- adjustSelectionDecimals: (t) => {
1467
+ adjustSelectionDecimals: (e) => {
1462
1468
  var a;
1463
- return (a = e == null ? void 0 : e.adjustSelectionDecimals(t)) != null ? a : !1;
1469
+ return (a = t == null ? void 0 : t.adjustSelectionDecimals(e)) != null ? a : !1;
1464
1470
  },
1465
- applySelectionStyle: (t) => {
1471
+ applySelectionStyle: (e) => {
1466
1472
  var a;
1467
- return (a = e == null ? void 0 : e.applySelectionStyle(t)) != null ? a : !1;
1473
+ return (a = t == null ? void 0 : t.applySelectionStyle(e)) != null ? a : !1;
1468
1474
  },
1469
- applyTableStyle: (t) => {
1475
+ applyTableStyle: (e) => {
1470
1476
  var a;
1471
- return (a = e == null ? void 0 : e.applyTableStyle(t)) != null ? a : !1;
1477
+ return (a = t == null ? void 0 : t.applyTableStyle(e)) != null ? a : !1;
1472
1478
  },
1473
- fillSelection: (t, a) => {
1479
+ fillSelection: (e, a) => {
1474
1480
  var s;
1475
- return (s = e == null ? void 0 : e.fillSelection(t, a)) != null ? s : !1;
1481
+ return (s = t == null ? void 0 : t.fillSelection(e, a)) != null ? s : !1;
1476
1482
  },
1477
- fillSeries: (t) => {
1483
+ fillSeries: (e) => {
1478
1484
  var a;
1479
- return (a = e == null ? void 0 : e.fillSeries(t)) != null ? a : !1;
1485
+ return (a = t == null ? void 0 : t.fillSeries(e)) != null ? a : !1;
1480
1486
  },
1481
1487
  openFillSeriesDialog: () => {
1482
- var t;
1483
- return (t = e == null ? void 0 : e.openFillSeriesDialog()) != null ? t : !1;
1488
+ var e;
1489
+ return (e = t == null ? void 0 : t.openFillSeriesDialog()) != null ? e : !1;
1484
1490
  },
1485
1491
  flashFill: () => {
1486
- var t;
1487
- return (t = e == null ? void 0 : e.flashFill()) != null ? t : !1;
1492
+ var e;
1493
+ return (e = t == null ? void 0 : t.flashFill()) != null ? e : !1;
1488
1494
  },
1489
- convertSelection: (t) => {
1495
+ convertSelection: (e) => {
1490
1496
  var a;
1491
- return (a = e == null ? void 0 : e.convertSelection(t)) != null ? a : !1;
1497
+ return (a = t == null ? void 0 : t.convertSelection(e)) != null ? a : !1;
1492
1498
  },
1493
- autoSumSelection: (t) => {
1499
+ autoSumSelection: (e) => {
1494
1500
  var a;
1495
- return (a = e == null ? void 0 : e.autoSumSelection(t)) != null ? a : !1;
1501
+ return (a = t == null ? void 0 : t.autoSumSelection(e)) != null ? a : !1;
1496
1502
  },
1497
- openInsertFunctionDialog: (t) => {
1503
+ openInsertFunctionDialog: (e) => {
1498
1504
  var a;
1499
- return (a = e == null ? void 0 : e.openInsertFunctionDialog(t)) != null ? a : !1;
1505
+ return (a = t == null ? void 0 : t.openInsertFunctionDialog(e)) != null ? a : !1;
1500
1506
  },
1501
1507
  recalcAll: () => {
1502
- var t;
1503
- return (t = e == null ? void 0 : e.recalcAll()) != null ? t : !1;
1508
+ var e;
1509
+ return (e = t == null ? void 0 : t.recalcAll()) != null ? e : !1;
1504
1510
  },
1505
1511
  recalcActiveSheet: () => {
1506
- var t;
1507
- return (t = e == null ? void 0 : e.recalcActiveSheet()) != null ? t : !1;
1512
+ var e;
1513
+ return (e = t == null ? void 0 : t.recalcActiveSheet()) != null ? e : !1;
1508
1514
  },
1509
1515
  getCalcMode: () => {
1510
- var t;
1511
- return (t = e == null ? void 0 : e.getCalcMode()) != null ? t : "auto";
1516
+ var e;
1517
+ return (e = t == null ? void 0 : t.getCalcMode()) != null ? e : "auto";
1512
1518
  },
1513
- setCalcMode: (t) => e == null ? void 0 : e.setCalcMode(t),
1519
+ setCalcMode: (e) => t == null ? void 0 : t.setCalcMode(e),
1514
1520
  reapplyFilters: () => {
1515
- var t;
1516
- return (t = e == null ? void 0 : e.reapplyFilters()) != null ? t : !1;
1521
+ var e;
1522
+ return (e = t == null ? void 0 : t.reapplyFilters()) != null ? e : !1;
1517
1523
  },
1518
- toggleAutoFilter: () => e == null ? void 0 : e.toggleAutoFilter(),
1524
+ toggleAutoFilter: () => t == null ? void 0 : t.toggleAutoFilter(),
1519
1525
  hasFilters: () => {
1520
- var t;
1521
- return (t = e == null ? void 0 : e.hasFilters()) != null ? t : !1;
1526
+ var e;
1527
+ return (e = t == null ? void 0 : t.hasFilters()) != null ? e : !1;
1522
1528
  },
1523
- clearAllFilters: () => e == null ? void 0 : e.clearAllFilters(),
1524
- openFilterConditionDialog: (t) => e == null ? void 0 : e.openFilterConditionDialog(t),
1525
- applyFilterCondition: (t, a) => {
1529
+ clearAllFilters: () => t == null ? void 0 : t.clearAllFilters(),
1530
+ openFilterConditionDialog: (e) => t == null ? void 0 : t.openFilterConditionDialog(e),
1531
+ applyFilterCondition: (e, a) => {
1526
1532
  var s;
1527
- return (s = e == null ? void 0 : e.applyFilterCondition(t, a)) != null ? s : !1;
1533
+ return (s = t == null ? void 0 : t.applyFilterCondition(e, a)) != null ? s : !1;
1528
1534
  },
1529
- openFindReplaceDialog: (t) => e == null ? void 0 : e.openFindReplaceDialog(t),
1530
- closeFindReplaceDialog: () => e == null ? void 0 : e.closeFindReplaceDialog(),
1531
- isFindDialogOpen: () => !!(e != null && e.isFindDialogOpen()),
1532
- openDataValidationDialog: (t) => {
1535
+ openFindReplaceDialog: (e) => t == null ? void 0 : t.openFindReplaceDialog(e),
1536
+ closeFindReplaceDialog: () => t == null ? void 0 : t.closeFindReplaceDialog(),
1537
+ isFindDialogOpen: () => !!(t != null && t.isFindDialogOpen()),
1538
+ openDataValidationDialog: (e) => {
1533
1539
  var a;
1534
- return (a = e == null ? void 0 : e.openDataValidationDialog(t)) != null ? a : !1;
1540
+ return (a = t == null ? void 0 : t.openDataValidationDialog(e)) != null ? a : !1;
1535
1541
  },
1536
1542
  openRemoveDuplicatesDialog: () => {
1537
- var t;
1538
- return (t = e == null ? void 0 : e.openRemoveDuplicatesDialog()) != null ? t : !1;
1543
+ var e;
1544
+ return (e = t == null ? void 0 : t.openRemoveDuplicatesDialog()) != null ? e : !1;
1539
1545
  },
1540
1546
  openTextToColumnsDialog: () => {
1541
- var t;
1542
- return (t = e == null ? void 0 : e.openTextToColumnsDialog()) != null ? t : !1;
1547
+ var e;
1548
+ return (e = t == null ? void 0 : t.openTextToColumnsDialog()) != null ? e : !1;
1543
1549
  },
1544
1550
  hasAnyComment: () => {
1545
- var t;
1546
- return (t = e == null ? void 0 : e.hasAnyComment()) != null ? t : !1;
1551
+ var e;
1552
+ return (e = t == null ? void 0 : t.hasAnyComment()) != null ? e : !1;
1547
1553
  },
1548
1554
  activeHasComment: () => {
1549
- var t;
1550
- return (t = e == null ? void 0 : e.activeHasComment()) != null ? t : !1;
1555
+ var e;
1556
+ return (e = t == null ? void 0 : t.activeHasComment()) != null ? e : !1;
1551
1557
  },
1552
1558
  deleteActiveComment: () => {
1553
- var t;
1554
- return (t = e == null ? void 0 : e.deleteActiveComment()) != null ? t : !1;
1559
+ var e;
1560
+ return (e = t == null ? void 0 : t.deleteActiveComment()) != null ? e : !1;
1555
1561
  },
1556
- gotoComment: (t) => {
1562
+ gotoComment: (e) => {
1557
1563
  var a;
1558
- return (a = e == null ? void 0 : e.gotoComment(t)) != null ? a : !1;
1564
+ return (a = t == null ? void 0 : t.gotoComment(e)) != null ? a : !1;
1559
1565
  },
1560
1566
  toggleShowAllComments: () => {
1561
- var t;
1562
- return (t = e == null ? void 0 : e.toggleShowAllComments()) != null ? t : !1;
1567
+ var e;
1568
+ return (e = t == null ? void 0 : t.toggleShowAllComments()) != null ? e : !1;
1563
1569
  },
1564
1570
  isShowAllComments: () => {
1565
- var t;
1566
- return (t = e == null ? void 0 : e.isShowAllComments()) != null ? t : !1;
1571
+ var e;
1572
+ return (e = t == null ? void 0 : t.isShowAllComments()) != null ? e : !1;
1567
1573
  },
1568
1574
  isSelectionLocked: () => {
1569
- var t;
1570
- return (t = e == null ? void 0 : e.isSelectionLocked()) != null ? t : !0;
1575
+ var e;
1576
+ return (e = t == null ? void 0 : t.isSelectionLocked()) != null ? e : !0;
1571
1577
  },
1572
1578
  toggleCellLock: () => {
1573
- var t;
1574
- return (t = e == null ? void 0 : e.toggleCellLock()) != null ? t : !1;
1579
+ var e;
1580
+ return (e = t == null ? void 0 : t.toggleCellLock()) != null ? e : !1;
1575
1581
  },
1576
1582
  isSheetProtected: () => {
1577
- var t;
1578
- return (t = e == null ? void 0 : e.isSheetProtected()) != null ? t : !1;
1583
+ var e;
1584
+ return (e = t == null ? void 0 : t.isSheetProtected()) != null ? e : !1;
1579
1585
  },
1580
1586
  openProtectSheetDialog: () => {
1581
- var t;
1582
- return (t = e == null ? void 0 : e.openProtectSheetDialog()) != null ? t : !1;
1587
+ var e;
1588
+ return (e = t == null ? void 0 : t.openProtectSheetDialog()) != null ? e : !1;
1583
1589
  },
1584
1590
  openAllowEditRangesDialog: () => {
1585
- var t;
1586
- return (t = e == null ? void 0 : e.openAllowEditRangesDialog()) != null ? t : !1;
1591
+ var e;
1592
+ return (e = t == null ? void 0 : t.openAllowEditRangesDialog()) != null ? e : !1;
1587
1593
  },
1588
1594
  isWorkbookProtected: () => {
1589
- var t;
1590
- return (t = e == null ? void 0 : e.isWorkbookProtected()) != null ? t : !1;
1595
+ var e;
1596
+ return (e = t == null ? void 0 : t.isWorkbookProtected()) != null ? e : !1;
1591
1597
  },
1592
1598
  openProtectWorkbookDialog: () => {
1593
- var t;
1594
- return (t = e == null ? void 0 : e.openProtectWorkbookDialog()) != null ? t : !1;
1599
+ var e;
1600
+ return (e = t == null ? void 0 : t.openProtectWorkbookDialog()) != null ? e : !1;
1595
1601
  },
1596
- shareWorkbookNotice: () => e == null ? void 0 : e.shareWorkbookNotice(),
1602
+ shareWorkbookNotice: () => t == null ? void 0 : t.shareWorkbookNotice(),
1597
1603
  isGridLinesVisible: () => {
1598
- var t;
1599
- return (t = e == null ? void 0 : e.isGridLinesVisible()) != null ? t : !0;
1604
+ var e;
1605
+ return (e = t == null ? void 0 : t.isGridLinesVisible()) != null ? e : !0;
1600
1606
  },
1601
1607
  toggleGridLines: () => {
1602
- var t;
1603
- return (t = e == null ? void 0 : e.toggleGridLines()) != null ? t : !0;
1608
+ var e;
1609
+ return (e = t == null ? void 0 : t.toggleGridLines()) != null ? e : !0;
1604
1610
  },
1605
1611
  areHeadersVisible: () => {
1606
- var t;
1607
- return (t = e == null ? void 0 : e.areHeadersVisible()) != null ? t : !0;
1612
+ var e;
1613
+ return (e = t == null ? void 0 : t.areHeadersVisible()) != null ? e : !0;
1608
1614
  },
1609
1615
  toggleHeaders: () => {
1610
- var t;
1611
- return (t = e == null ? void 0 : e.toggleHeaders()) != null ? t : !0;
1616
+ var e;
1617
+ return (e = t == null ? void 0 : t.toggleHeaders()) != null ? e : !0;
1612
1618
  },
1613
1619
  isFormulaBarVisible: () => {
1614
- var t;
1615
- return (t = e == null ? void 0 : e.isFormulaBarVisible()) != null ? t : !0;
1620
+ var e;
1621
+ return (e = t == null ? void 0 : t.isFormulaBarVisible()) != null ? e : !0;
1616
1622
  },
1617
1623
  toggleFormulaBar: () => {
1618
- var t;
1619
- return (t = e == null ? void 0 : e.toggleFormulaBar()) != null ? t : !0;
1624
+ var e;
1625
+ return (e = t == null ? void 0 : t.toggleFormulaBar()) != null ? e : !0;
1620
1626
  },
1621
1627
  isTaskPaneOpen: () => {
1622
- var t;
1623
- return (t = e == null ? void 0 : e.isTaskPaneOpen()) != null ? t : !1;
1628
+ var e;
1629
+ return (e = t == null ? void 0 : t.isTaskPaneOpen()) != null ? e : !1;
1624
1630
  },
1625
1631
  toggleTaskPane: () => {
1626
- var t;
1627
- return (t = e == null ? void 0 : e.toggleTaskPane()) != null ? t : !1;
1632
+ var e;
1633
+ return (e = t == null ? void 0 : t.toggleTaskPane()) != null ? e : !1;
1628
1634
  },
1629
1635
  cutSelection: () => {
1630
- var t;
1631
- return (t = e == null ? void 0 : e.cutSelection()) != null ? t : Promise.resolve(!1);
1636
+ var e;
1637
+ return (e = t == null ? void 0 : t.cutSelection()) != null ? e : Promise.resolve(!1);
1632
1638
  },
1633
1639
  clearSelectionFormat: () => {
1634
- var t;
1635
- return (t = e == null ? void 0 : e.clearSelectionFormat()) != null ? t : !1;
1640
+ var e;
1641
+ return (e = t == null ? void 0 : t.clearSelectionFormat()) != null ? e : !1;
1636
1642
  },
1637
1643
  getPageSetup: () => {
1638
- var t;
1639
- return (t = e == null ? void 0 : e.getPageSetup()) != null ? t : {};
1644
+ var e;
1645
+ return (e = t == null ? void 0 : t.getPageSetup()) != null ? e : {};
1640
1646
  },
1641
- setPageSetup: (t) => {
1647
+ setPageSetup: (e) => {
1642
1648
  var a;
1643
- return (a = e == null ? void 0 : e.setPageSetup(t)) != null ? a : !1;
1649
+ return (a = t == null ? void 0 : t.setPageSetup(e)) != null ? a : !1;
1644
1650
  },
1645
- setPageBreaks: (t, a) => {
1651
+ setPageBreaks: (e, a) => {
1646
1652
  var s;
1647
- return (s = e == null ? void 0 : e.setPageBreaks(t, a)) != null ? s : !1;
1653
+ return (s = t == null ? void 0 : t.setPageBreaks(e, a)) != null ? s : !1;
1648
1654
  },
1649
1655
  setPrintAreaFromSelection: () => {
1650
- var t;
1651
- return (t = e == null ? void 0 : e.setPrintAreaFromSelection()) != null ? t : !1;
1656
+ var e;
1657
+ return (e = t == null ? void 0 : t.setPrintAreaFromSelection()) != null ? e : !1;
1652
1658
  },
1653
- togglePageBreakAt: (t) => {
1659
+ togglePageBreakAt: (e) => {
1654
1660
  var a;
1655
- return (a = e == null ? void 0 : e.togglePageBreakAt(t)) != null ? a : !1;
1661
+ return (a = t == null ? void 0 : t.togglePageBreakAt(e)) != null ? a : !1;
1656
1662
  },
1657
1663
  clearPageBreaks: () => {
1658
- var t;
1659
- return (t = e == null ? void 0 : e.clearPageBreaks()) != null ? t : !1;
1664
+ var e;
1665
+ return (e = t == null ? void 0 : t.clearPageBreaks()) != null ? e : !1;
1660
1666
  },
1661
1667
  openPageSetupDialog: () => {
1662
- var t;
1663
- return (t = e == null ? void 0 : e.openPageSetupDialog()) != null ? t : !1;
1668
+ var e;
1669
+ return (e = t == null ? void 0 : t.openPageSetupDialog()) != null ? e : !1;
1664
1670
  },
1665
- getBackground: () => e == null ? void 0 : e.getBackground(),
1666
- getWatermark: () => e == null ? void 0 : e.getWatermark(),
1667
- setBackground: (t) => {
1671
+ getBackground: () => t == null ? void 0 : t.getBackground(),
1672
+ getWatermark: () => t == null ? void 0 : t.getWatermark(),
1673
+ setBackground: (e) => {
1668
1674
  var a;
1669
- return (a = e == null ? void 0 : e.setBackground(t)) != null ? a : !1;
1675
+ return (a = t == null ? void 0 : t.setBackground(e)) != null ? a : !1;
1670
1676
  },
1671
- setWatermark: (t) => {
1677
+ setWatermark: (e) => {
1672
1678
  var a;
1673
- return (a = e == null ? void 0 : e.setWatermark(t)) != null ? a : !1;
1679
+ return (a = t == null ? void 0 : t.setWatermark(e)) != null ? a : !1;
1674
1680
  },
1675
1681
  openBackgroundDialog: () => {
1676
- var t;
1677
- return (t = e == null ? void 0 : e.openBackgroundDialog()) != null ? t : !1;
1682
+ var e;
1683
+ return (e = t == null ? void 0 : t.openBackgroundDialog()) != null ? e : !1;
1678
1684
  },
1679
- startFormatPainter: (t) => {
1685
+ startFormatPainter: (e) => {
1680
1686
  var a;
1681
- return (a = e == null ? void 0 : e.startFormatPainter(t)) != null ? a : !1;
1687
+ return (a = t == null ? void 0 : t.startFormatPainter(e)) != null ? a : !1;
1682
1688
  },
1683
1689
  isFormatPainterArmed: () => {
1684
- var t;
1685
- return (t = e == null ? void 0 : e.isFormatPainterArmed()) != null ? t : !1;
1690
+ var e;
1691
+ return (e = t == null ? void 0 : t.isFormatPainterArmed()) != null ? e : !1;
1686
1692
  },
1687
- cancelFormatPainter: () => e == null ? void 0 : e.cancelFormatPainter(),
1688
- getCellComment: (t, a) => {
1693
+ cancelFormatPainter: () => t == null ? void 0 : t.cancelFormatPainter(),
1694
+ getCellComment: (e, a) => {
1689
1695
  var s;
1690
- return (s = e == null ? void 0 : e.getCellComment(t, a)) != null ? s : "";
1696
+ return (s = t == null ? void 0 : t.getCellComment(e, a)) != null ? s : "";
1691
1697
  },
1692
- setCellComment: (t, a, s) => {
1698
+ setCellComment: (e, a, s) => {
1693
1699
  var o;
1694
- return (o = e == null ? void 0 : e.setCellComment(t, a, s)) != null ? o : !1;
1700
+ return (o = t == null ? void 0 : t.setCellComment(e, a, s)) != null ? o : !1;
1695
1701
  },
1696
- openCommentEditor: (t, a) => {
1702
+ openCommentEditor: (e, a) => {
1697
1703
  var s;
1698
- return (s = e == null ? void 0 : e.openCommentEditor(t, a)) != null ? s : !1;
1704
+ return (s = t == null ? void 0 : t.openCommentEditor(e, a)) != null ? s : !1;
1699
1705
  },
1700
- editCell: (t, a, s) => {
1706
+ editCell: (e, a, s) => {
1701
1707
  var o;
1702
- return (o = e == null ? void 0 : e.editCell(t, a, s)) != null ? o : !1;
1708
+ return (o = t == null ? void 0 : t.editCell(e, a, s)) != null ? o : !1;
1703
1709
  },
1704
- editRange: (t, a) => {
1710
+ editRange: (e, a) => {
1705
1711
  var s;
1706
- return (s = e == null ? void 0 : e.editRange(t, a)) != null ? s : !1;
1712
+ return (s = t == null ? void 0 : t.editRange(e, a)) != null ? s : !1;
1707
1713
  },
1708
- clearRange: (t) => {
1714
+ clearRange: (e) => {
1709
1715
  var a;
1710
- return (a = e == null ? void 0 : e.clearRange(t)) != null ? a : !1;
1716
+ return (a = t == null ? void 0 : t.clearRange(e)) != null ? a : !1;
1711
1717
  },
1712
- setStyle: (t, a) => {
1718
+ setStyle: (e, a) => {
1713
1719
  var s;
1714
- return (s = e == null ? void 0 : e.setStyle(t, a)) != null ? s : !1;
1720
+ return (s = t == null ? void 0 : t.setStyle(e, a)) != null ? s : !1;
1715
1721
  },
1716
1722
  getActiveFillColor: () => {
1717
- var t;
1718
- return (t = e == null ? void 0 : e.getActiveFillColor()) != null ? t : "#FFFFFF";
1723
+ var e;
1724
+ return (e = t == null ? void 0 : t.getActiveFillColor()) != null ? e : "#FFFFFF";
1719
1725
  },
1720
1726
  getActiveFontColor: () => {
1721
- var t;
1722
- return (t = e == null ? void 0 : e.getActiveFontColor()) != null ? t : "#000000";
1727
+ var e;
1728
+ return (e = t == null ? void 0 : t.getActiveFontColor()) != null ? e : "#000000";
1723
1729
  },
1724
- setSelectionFill: (t) => {
1730
+ setSelectionFill: (e) => {
1725
1731
  var a;
1726
- return (a = e == null ? void 0 : e.setSelectionFill(t)) != null ? a : !1;
1732
+ return (a = t == null ? void 0 : t.setSelectionFill(e)) != null ? a : !1;
1727
1733
  },
1728
- setSelectionFontColor: (t) => {
1734
+ setSelectionFontColor: (e) => {
1729
1735
  var a;
1730
- return (a = e == null ? void 0 : e.setSelectionFontColor(t)) != null ? a : !1;
1736
+ return (a = t == null ? void 0 : t.setSelectionFontColor(e)) != null ? a : !1;
1731
1737
  },
1732
1738
  getSelectionWrapState: () => {
1733
- var t;
1734
- return (t = e == null ? void 0 : e.getSelectionWrapState()) != null ? t : "none";
1739
+ var e;
1740
+ return (e = t == null ? void 0 : t.getSelectionWrapState()) != null ? e : "none";
1735
1741
  },
1736
1742
  toggleWrapTextOnSelection: () => {
1737
- var t;
1738
- return (t = e == null ? void 0 : e.toggleWrapTextOnSelection()) != null ? t : !1;
1743
+ var e;
1744
+ return (e = t == null ? void 0 : t.toggleWrapTextOnSelection()) != null ? e : !1;
1739
1745
  },
1740
- mergeCells: (t) => {
1746
+ mergeCells: (e) => {
1741
1747
  var a;
1742
- return (a = e == null ? void 0 : e.mergeCells(t)) != null ? a : !1;
1748
+ return (a = t == null ? void 0 : t.mergeCells(e)) != null ? a : !1;
1743
1749
  },
1744
- unmergeCells: (t) => {
1750
+ unmergeCells: (e) => {
1745
1751
  var a;
1746
- return (a = e == null ? void 0 : e.unmergeCells(t)) != null ? a : !1;
1752
+ return (a = t == null ? void 0 : t.unmergeCells(e)) != null ? a : !1;
1747
1753
  },
1748
- pasteText: (t, a) => {
1754
+ pasteText: (e, a) => {
1749
1755
  var s;
1750
- return (s = e == null ? void 0 : e.pasteText(t, a)) != null ? s : !1;
1756
+ return (s = t == null ? void 0 : t.pasteText(e, a)) != null ? s : !1;
1751
1757
  },
1752
- pasteRichHtml: (t, a, s) => {
1758
+ pasteRichHtml: (e, a, s) => {
1753
1759
  var o;
1754
- return (o = e == null ? void 0 : e.pasteRichHtml(t, a, s)) != null ? o : !1;
1760
+ return (o = t == null ? void 0 : t.pasteRichHtml(e, a, s)) != null ? o : !1;
1755
1761
  },
1756
1762
  getPasteBehavior: () => {
1757
- var t;
1758
- return (t = e == null ? void 0 : e.getPasteBehavior()) != null ? t : Gt;
1763
+ var e;
1764
+ return (e = t == null ? void 0 : t.getPasteBehavior()) != null ? e : Gt;
1759
1765
  },
1760
- setPasteBehavior: (t) => e == null ? void 0 : e.setPasteBehavior(t),
1766
+ setPasteBehavior: (e) => t == null ? void 0 : t.setPasteBehavior(e),
1761
1767
  openPasteConfigDialog: () => {
1762
- var t;
1763
- return (t = e == null ? void 0 : e.openPasteConfigDialog()) != null ? t : !1;
1768
+ var e;
1769
+ return (e = t == null ? void 0 : t.openPasteConfigDialog()) != null ? e : !1;
1764
1770
  },
1765
- pasteImageBlob: (t, a) => {
1771
+ pasteImageBlob: (e, a) => {
1766
1772
  var s;
1767
- return (s = e == null ? void 0 : e.pasteImageBlob(t, a)) != null ? s : Promise.resolve(!1);
1773
+ return (s = t == null ? void 0 : t.pasteImageBlob(e, a)) != null ? s : Promise.resolve(!1);
1768
1774
  },
1769
1775
  getImageInsertMode: () => {
1770
- var t;
1771
- return (t = e == null ? void 0 : e.getImageInsertMode()) != null ? t : "float";
1776
+ var e;
1777
+ return (e = t == null ? void 0 : t.getImageInsertMode()) != null ? e : "float";
1772
1778
  },
1773
- setImageInsertMode: (t) => e == null ? void 0 : e.setImageInsertMode(t),
1774
- insertImageBlob: (t, a, s) => {
1779
+ setImageInsertMode: (e) => t == null ? void 0 : t.setImageInsertMode(e),
1780
+ insertImageBlob: (e, a, s) => {
1775
1781
  var o;
1776
- return (o = e == null ? void 0 : e.insertImageBlob(t, a, s)) != null ? o : Promise.resolve(!1);
1782
+ return (o = t == null ? void 0 : t.insertImageBlob(e, a, s)) != null ? o : Promise.resolve(!1);
1777
1783
  },
1778
- openImagePicker: (t, a) => {
1784
+ openImagePicker: (e, a) => {
1779
1785
  var s;
1780
- return (s = e == null ? void 0 : e.openImagePicker(t, a)) != null ? s : !1;
1786
+ return (s = t == null ? void 0 : t.openImagePicker(e, a)) != null ? s : !1;
1781
1787
  },
1782
1788
  getImages: () => {
1783
- var t;
1784
- return (t = e == null ? void 0 : e.getImages()) != null ? t : [];
1789
+ var e;
1790
+ return (e = t == null ? void 0 : t.getImages()) != null ? e : [];
1785
1791
  },
1786
- addImage: (t) => {
1792
+ addImage: (e) => {
1787
1793
  var a;
1788
- return (a = e == null ? void 0 : e.addImage(t)) != null ? a : -1;
1794
+ return (a = t == null ? void 0 : t.addImage(e)) != null ? a : -1;
1789
1795
  },
1790
- removeImage: (t) => {
1796
+ removeImage: (e) => {
1791
1797
  var a;
1792
- return (a = e == null ? void 0 : e.removeImage(t)) != null ? a : !1;
1798
+ return (a = t == null ? void 0 : t.removeImage(e)) != null ? a : !1;
1793
1799
  },
1794
- moveImage: (t, a, s) => {
1800
+ moveImage: (e, a, s) => {
1795
1801
  var o;
1796
- return (o = e == null ? void 0 : e.moveImage(t, a, s)) != null ? o : !1;
1802
+ return (o = t == null ? void 0 : t.moveImage(e, a, s)) != null ? o : !1;
1797
1803
  },
1798
- resizeImage: (t, a, s) => {
1804
+ resizeImage: (e, a, s) => {
1799
1805
  var o;
1800
- return (o = e == null ? void 0 : e.resizeImage(t, a, s)) != null ? o : !1;
1806
+ return (o = t == null ? void 0 : t.resizeImage(e, a, s)) != null ? o : !1;
1801
1807
  },
1802
- resetImageSize: (t) => {
1808
+ resetImageSize: (e) => {
1803
1809
  var a;
1804
- return (a = e == null ? void 0 : e.resetImageSize(t)) != null ? a : Promise.resolve(!1);
1810
+ return (a = t == null ? void 0 : t.resetImageSize(e)) != null ? a : Promise.resolve(!1);
1805
1811
  },
1806
- setImageRotation: (t, a) => {
1812
+ setImageRotation: (e, a) => {
1807
1813
  var s;
1808
- return (s = e == null ? void 0 : e.setImageRotation(t, a)) != null ? s : !1;
1814
+ return (s = t == null ? void 0 : t.setImageRotation(e, a)) != null ? s : !1;
1809
1815
  },
1810
- rotateImage: (t, a) => {
1816
+ rotateImage: (e, a) => {
1811
1817
  var s;
1812
- return (s = e == null ? void 0 : e.rotateImage(t, a)) != null ? s : !1;
1818
+ return (s = t == null ? void 0 : t.rotateImage(e, a)) != null ? s : !1;
1813
1819
  },
1814
- setImageCrop: (t, a) => {
1820
+ setImageCrop: (e, a) => {
1815
1821
  var s;
1816
- return (s = e == null ? void 0 : e.setImageCrop(t, a)) != null ? s : !1;
1822
+ return (s = t == null ? void 0 : t.setImageCrop(e, a)) != null ? s : !1;
1817
1823
  },
1818
- enterImageCrop: (t) => {
1824
+ enterImageCrop: (e) => {
1819
1825
  var a;
1820
- return (a = e == null ? void 0 : e.enterImageCrop(t)) != null ? a : !1;
1826
+ return (a = t == null ? void 0 : t.enterImageCrop(e)) != null ? a : !1;
1821
1827
  },
1822
- exitImageCrop: () => e == null ? void 0 : e.exitImageCrop(),
1828
+ exitImageCrop: () => t == null ? void 0 : t.exitImageCrop(),
1823
1829
  getCellEditString: () => {
1824
- var t;
1825
- return (t = e == null ? void 0 : e.getCellEditString()) != null ? t : "";
1830
+ var e;
1831
+ return (e = t == null ? void 0 : t.getCellEditString()) != null ? e : "";
1826
1832
  },
1827
1833
  canEditActiveCell: () => {
1828
- var t;
1829
- return (t = e == null ? void 0 : e.canEditActiveCell()) != null ? t : !1;
1834
+ var e;
1835
+ return (e = t == null ? void 0 : t.canEditActiveCell()) != null ? e : !1;
1830
1836
  },
1831
- commitActiveCellValue: (t, a) => {
1837
+ commitActiveCellValue: (e, a) => {
1832
1838
  var s;
1833
- return (s = e == null ? void 0 : e.commitActiveCellValue(t, a)) != null ? s : !1;
1839
+ return (s = t == null ? void 0 : t.commitActiveCellValue(e, a)) != null ? s : !1;
1834
1840
  },
1835
1841
  getCellImages: () => {
1836
- var t;
1837
- return (t = e == null ? void 0 : e.getCellImages()) != null ? t : [];
1842
+ var e;
1843
+ return (e = t == null ? void 0 : t.getCellImages()) != null ? e : [];
1838
1844
  },
1839
- getCellImageAt: (t, a) => {
1845
+ getCellImageAt: (e, a) => {
1840
1846
  var s;
1841
- return (s = e == null ? void 0 : e.getCellImageAt(t, a)) != null ? s : null;
1847
+ return (s = t == null ? void 0 : t.getCellImageAt(e, a)) != null ? s : null;
1842
1848
  },
1843
- openImageLightbox: (t, a, s) => e == null ? void 0 : e.openImageLightbox(t, a, s),
1844
- setCellImageFit: (t) => e == null ? void 0 : e.setCellImageFit(t),
1845
- convertImageToCell: (t, a, s) => {
1849
+ openImageLightbox: (e, a, s) => t == null ? void 0 : t.openImageLightbox(e, a, s),
1850
+ setCellImageFit: (e) => t == null ? void 0 : t.setCellImageFit(e),
1851
+ convertImageToCell: (e, a, s) => {
1846
1852
  var o;
1847
- return (o = e == null ? void 0 : e.convertImageToCell(t, a, s)) != null ? o : !1;
1853
+ return (o = t == null ? void 0 : t.convertImageToCell(e, a, s)) != null ? o : !1;
1848
1854
  },
1849
- convertImageToCellAuto: (t) => {
1855
+ convertImageToCellAuto: (e) => {
1850
1856
  var a;
1851
- return (a = e == null ? void 0 : e.convertImageToCellAuto(t)) != null ? a : !1;
1857
+ return (a = t == null ? void 0 : t.convertImageToCellAuto(e)) != null ? a : !1;
1852
1858
  },
1853
- convertAllImagesToCells: (t) => {
1859
+ convertAllImagesToCells: (e) => {
1854
1860
  var a;
1855
- return (a = e == null ? void 0 : e.convertAllImagesToCells(t)) != null ? a : 0;
1861
+ return (a = t == null ? void 0 : t.convertAllImagesToCells(e)) != null ? a : 0;
1856
1862
  },
1857
- convertImagesInRangeToCell: (t) => Y({}, async (a) => {
1863
+ convertImagesInRangeToCell: (e) => Y({}, async (a) => {
1858
1864
  var s, o;
1859
- return (s = a.onProgress) == null || s.call(a, { stage: "convert", label: "选区浮动图批量嵌入…", ratio: void 0 }), (o = e == null ? void 0 : e.convertImagesInRangeToCell(t)) != null ? o : 0;
1865
+ return (s = a.onProgress) == null || s.call(a, { stage: "convert", label: "选区浮动图批量嵌入…", ratio: void 0 }), (o = t == null ? void 0 : t.convertImagesInRangeToCell(e)) != null ? o : 0;
1860
1866
  }),
1861
- convertCellImagesInRangeToFloat: (t, a) => Y({}, async (s) => {
1867
+ convertCellImagesInRangeToFloat: (e, a) => Y({}, async (s) => {
1862
1868
  var o, w;
1863
- return (o = s.onProgress) == null || o.call(s, { stage: "convert", label: "选区内嵌图批量浮动化…", ratio: void 0 }), (w = e == null ? void 0 : e.convertCellImagesInRangeToFloat(t, a)) != null ? w : 0;
1869
+ return (o = s.onProgress) == null || o.call(s, { stage: "convert", label: "选区内嵌图批量浮动化…", ratio: void 0 }), (w = t == null ? void 0 : t.convertCellImagesInRangeToFloat(e, a)) != null ? w : 0;
1864
1870
  }),
1865
- openContextMenu: (t, a, s) => e == null ? void 0 : e.openContextMenu(t, a, s),
1866
- closeContextMenu: () => e == null ? void 0 : e.closeContextMenu(),
1867
- convertCellImageToFloat: (t, a, s) => {
1871
+ openContextMenu: (e, a, s) => t == null ? void 0 : t.openContextMenu(e, a, s),
1872
+ closeContextMenu: () => t == null ? void 0 : t.closeContextMenu(),
1873
+ convertCellImageToFloat: (e, a, s) => {
1868
1874
  var o;
1869
- return (o = e == null ? void 0 : e.convertCellImageToFloat(t, a, s)) != null ? o : !1;
1875
+ return (o = t == null ? void 0 : t.convertCellImageToFloat(e, a, s)) != null ? o : !1;
1870
1876
  },
1871
- insertRows: (t, a) => {
1877
+ insertRows: (e, a) => {
1872
1878
  var s;
1873
- return (s = e == null ? void 0 : e.insertRows(t, a)) != null ? s : !1;
1879
+ return (s = t == null ? void 0 : t.insertRows(e, a)) != null ? s : !1;
1874
1880
  },
1875
- deleteRows: (t, a) => {
1881
+ deleteRows: (e, a) => {
1876
1882
  var s;
1877
- return (s = e == null ? void 0 : e.deleteRows(t, a)) != null ? s : !1;
1883
+ return (s = t == null ? void 0 : t.deleteRows(e, a)) != null ? s : !1;
1878
1884
  },
1879
- insertCols: (t, a) => {
1885
+ insertCols: (e, a) => {
1880
1886
  var s;
1881
- return (s = e == null ? void 0 : e.insertCols(t, a)) != null ? s : !1;
1887
+ return (s = t == null ? void 0 : t.insertCols(e, a)) != null ? s : !1;
1882
1888
  },
1883
- deleteCols: (t, a) => {
1889
+ deleteCols: (e, a) => {
1884
1890
  var s;
1885
- return (s = e == null ? void 0 : e.deleteCols(t, a)) != null ? s : !1;
1891
+ return (s = t == null ? void 0 : t.deleteCols(e, a)) != null ? s : !1;
1886
1892
  },
1887
- undo: () => e == null ? void 0 : e.undo(),
1888
- redo: () => e == null ? void 0 : e.redo(),
1893
+ undo: () => t == null ? void 0 : t.undo(),
1894
+ redo: () => t == null ? void 0 : t.redo(),
1889
1895
  canUndo: () => {
1890
- var t;
1891
- return (t = e == null ? void 0 : e.canUndo()) != null ? t : !1;
1896
+ var e;
1897
+ return (e = t == null ? void 0 : t.canUndo()) != null ? e : !1;
1892
1898
  },
1893
1899
  canRedo: () => {
1894
- var t;
1895
- return (t = e == null ? void 0 : e.canRedo()) != null ? t : !1;
1900
+ var e;
1901
+ return (e = t == null ? void 0 : t.canRedo()) != null ? e : !1;
1896
1902
  },
1897
1903
  getEditingCell: () => {
1898
- var t;
1899
- return (t = e == null ? void 0 : e.getEditingCell()) != null ? t : null;
1904
+ var e;
1905
+ return (e = t == null ? void 0 : t.getEditingCell()) != null ? e : null;
1900
1906
  },
1901
- getCellSnapshot: (t, a) => {
1907
+ getCellSnapshot: (e, a) => {
1902
1908
  var s;
1903
- return (s = e == null ? void 0 : e.getCellSnapshot(t, a)) != null ? s : null;
1909
+ return (s = t == null ? void 0 : t.getCellSnapshot(e, a)) != null ? s : null;
1904
1910
  },
1905
- inspectCell: (t, a) => {
1911
+ inspectCell: (e, a) => {
1906
1912
  var s;
1907
- return (s = e == null ? void 0 : e.inspectCell(t, a)) != null ? s : null;
1913
+ return (s = t == null ? void 0 : t.inspectCell(e, a)) != null ? s : null;
1908
1914
  },
1909
- beginEdit: (t, a) => {
1915
+ beginEdit: (e, a) => {
1910
1916
  var s;
1911
- return (s = e == null ? void 0 : e.beginEdit(t, a)) != null ? s : !1;
1917
+ return (s = t == null ? void 0 : t.beginEdit(e, a)) != null ? s : !1;
1912
1918
  },
1913
- cancelEdit: () => e == null ? void 0 : e.cancelEdit(),
1919
+ cancelEdit: () => t == null ? void 0 : t.cancelEdit(),
1914
1920
  isEditing: () => {
1915
- var t;
1916
- return (t = e == null ? void 0 : e.isEditing()) != null ? t : !1;
1921
+ var e;
1922
+ return (e = t == null ? void 0 : t.isEditing()) != null ? e : !1;
1917
1923
  },
1918
- setColumnWidth: (t, a) => {
1924
+ setColumnWidth: (e, a) => {
1919
1925
  var s;
1920
- return (s = e == null ? void 0 : e.setColumnWidth(t, a)) != null ? s : 0;
1926
+ return (s = t == null ? void 0 : t.setColumnWidth(e, a)) != null ? s : 0;
1921
1927
  },
1922
- setRowHeight: (t, a) => {
1928
+ setRowHeight: (e, a) => {
1923
1929
  var s;
1924
- return (s = e == null ? void 0 : e.setRowHeight(t, a)) != null ? s : 0;
1930
+ return (s = t == null ? void 0 : t.setRowHeight(e, a)) != null ? s : 0;
1925
1931
  },
1926
- autoFitColumns: (t) => {
1932
+ autoFitColumns: (e) => {
1927
1933
  var a;
1928
- return (a = e == null ? void 0 : e.autoFitColumns(t)) != null ? a : 0;
1934
+ return (a = t == null ? void 0 : t.autoFitColumns(e)) != null ? a : 0;
1929
1935
  },
1930
- autoFitRows: (t) => {
1936
+ autoFitRows: (e) => {
1931
1937
  var a;
1932
- return (a = e == null ? void 0 : e.autoFitRows(t)) != null ? a : 0;
1938
+ return (a = t == null ? void 0 : t.autoFitRows(e)) != null ? a : 0;
1933
1939
  },
1934
- resetColumnWidth: (t) => {
1940
+ resetColumnWidth: (e) => {
1935
1941
  var a;
1936
- return (a = e == null ? void 0 : e.resetColumnWidth(t)) != null ? a : 0;
1942
+ return (a = t == null ? void 0 : t.resetColumnWidth(e)) != null ? a : 0;
1937
1943
  },
1938
- resetRowHeight: (t) => {
1944
+ resetRowHeight: (e) => {
1939
1945
  var a;
1940
- return (a = e == null ? void 0 : e.resetRowHeight(t)) != null ? a : 0;
1946
+ return (a = t == null ? void 0 : t.resetRowHeight(e)) != null ? a : 0;
1941
1947
  },
1942
1948
  isRecalcReady: () => {
1943
- var t;
1944
- return (t = e == null ? void 0 : e.isRecalcReady()) != null ? t : !1;
1949
+ var e;
1950
+ return (e = t == null ? void 0 : t.isRecalcReady()) != null ? e : !1;
1945
1951
  },
1946
1952
  getVirtualExtent: () => {
1947
- var t;
1948
- return (t = e == null ? void 0 : e.getVirtualExtent()) != null ? t : { rows: 0, cols: 0 };
1953
+ var e;
1954
+ return (e = t == null ? void 0 : t.getVirtualExtent()) != null ? e : { rows: 0, cols: 0 };
1949
1955
  },
1950
1956
  isDirty: () => {
1951
- var t;
1952
- return (t = e == null ? void 0 : e.isDirty()) != null ? t : !1;
1957
+ var e;
1958
+ return (e = t == null ? void 0 : t.isDirty()) != null ? e : !1;
1953
1959
  },
1954
1960
  resetToOriginal: () => {
1955
- var t;
1956
- return (t = e == null ? void 0 : e.resetToOriginal()) != null ? t : !1;
1961
+ var e;
1962
+ return (e = t == null ? void 0 : t.resetToOriginal()) != null ? e : !1;
1957
1963
  },
1958
1964
  exportImage: Fa,
1959
1965
  downloadImage: Pe,
@@ -1961,63 +1967,63 @@ const ws = { class: "toolbar" }, Is = ["title"], Ts = {
1961
1967
  downloadPdf: Re,
1962
1968
  print: Me,
1963
1969
  openPrintPreview: $a,
1964
- exportXlsx: (t) => Y(t, (a) => e.exportXlsx(a)),
1965
- downloadXlsx: (t) => Y(t, (a) => e.downloadXlsx(a)),
1966
- exportJson: (t) => {
1970
+ exportXlsx: (e) => Y(e, (a) => t.exportXlsx(a)),
1971
+ downloadXlsx: (e) => Y(e, (a) => t.downloadXlsx(a)),
1972
+ exportJson: (e) => {
1967
1973
  var a;
1968
- return (a = e == null ? void 0 : e.exportJson(t)) != null ? a : "{}";
1974
+ return (a = t == null ? void 0 : t.exportJson(e)) != null ? a : "{}";
1969
1975
  },
1970
- downloadJson: (t) => e == null ? void 0 : e.downloadJson(t),
1971
- exportCsv: (t) => {
1976
+ downloadJson: (e) => t == null ? void 0 : t.downloadJson(e),
1977
+ exportCsv: (e) => {
1972
1978
  var a;
1973
- return (a = e == null ? void 0 : e.exportCsv(t)) != null ? a : "";
1979
+ return (a = t == null ? void 0 : t.exportCsv(e)) != null ? a : "";
1974
1980
  },
1975
- downloadCsv: (t) => e == null ? void 0 : e.downloadCsv(t),
1981
+ downloadCsv: (e) => t == null ? void 0 : t.downloadCsv(e),
1976
1982
  // ---- 数据读取(委托独立函数,自动绑 date1904 + 默认当前表) ----
1977
- getCellValue: (t, a, s) => {
1983
+ getCellValue: (e, a, s) => {
1978
1984
  const o = Be(s);
1979
- return o ? os(o, t, a) : null;
1985
+ return o ? os(o, e, a) : null;
1980
1986
  },
1981
- getCellText: (t, a, s) => {
1987
+ getCellText: (e, a, s) => {
1982
1988
  var w, I;
1983
1989
  const o = Be(s);
1984
- return o ? ls(o, t, a, (I = (w = T.value) == null ? void 0 : w.date1904) != null ? I : !1) : "";
1990
+ return o ? ls(o, e, a, (I = (w = T.value) == null ? void 0 : w.date1904) != null ? I : !1) : "";
1985
1991
  },
1986
- getSheetData: (t, a) => {
1992
+ getSheetData: (e, a) => {
1987
1993
  const s = Be(a);
1988
- return s ? ns(s, vt(t)) : [];
1994
+ return s ? ns(s, vt(e)) : [];
1989
1995
  },
1990
- getSheetJSON: (t, a) => {
1996
+ getSheetJSON: (e, a) => {
1991
1997
  const s = Be(a);
1992
- return s ? is(s, vt(t)) : [];
1998
+ return s ? is(s, vt(e)) : [];
1993
1999
  },
1994
- getRangeData: (t, a, s) => {
2000
+ getRangeData: (e, a, s) => {
1995
2001
  const o = Be(s);
1996
- return o ? ss(o, t, vt(a)) : [];
2002
+ return o ? ss(o, e, vt(a)) : [];
1997
2003
  }
1998
2004
  };
1999
- function Be(t) {
2005
+ function Be(e) {
2000
2006
  var s;
2001
2007
  const a = T.value;
2002
- return a && (s = a.sheets[t != null ? t : Z.value]) != null ? s : null;
2008
+ return a && (s = a.sheets[e != null ? e : Z.value]) != null ? s : null;
2003
2009
  }
2004
- function vt(t) {
2010
+ function vt(e) {
2005
2011
  var a, s;
2006
- return ke(W({}, t), { date1904: (s = (a = T.value) == null ? void 0 : a.date1904) != null ? s : !1 });
2012
+ return ke(W({}, e), { date1904: (s = (a = T.value) == null ? void 0 : a.date1904) != null ? s : !1 });
2007
2013
  }
2008
2014
  x(Ae);
2009
- const N = (t) => Se[t];
2010
- function P(t) {
2011
- return W({ kind: "builtin" }, t);
2015
+ const N = (e) => Se[e];
2016
+ function P(e) {
2017
+ return W({ kind: "builtin" }, e);
2012
2018
  }
2013
- function La(t) {
2019
+ function La(e) {
2014
2020
  var s, o, w, I, b;
2015
- const a = xs(t, { controller: e != null ? e : null, editable: !!n.editable, hasSelection: !!j.value });
2021
+ const a = xs(e, { controller: t != null ? t : null, editable: !!n.editable, hasSelection: !!J.value });
2016
2022
  if (a) return a;
2017
- switch (t) {
2023
+ switch (e) {
2018
2024
  case "find":
2019
2025
  return P({
2020
- id: t,
2026
+ id: e,
2021
2027
  iconSvg: N("find"),
2022
2028
  label: "查找",
2023
2029
  title: "查找和替换 (Ctrl+F)",
@@ -2026,26 +2032,26 @@ const ws = { class: "toolbar" }, Is = ["title"], Ts = {
2026
2032
  });
2027
2033
  case "filter":
2028
2034
  return P({
2029
- id: t,
2035
+ id: e,
2030
2036
  iconSvg: N("filter"),
2031
2037
  label: "筛选",
2032
2038
  title: "切换自动筛选",
2033
- active: !!((s = pe.value) != null && s.autoFilterRange),
2039
+ active: !!((s = ge.value) != null && s.autoFilterRange),
2034
2040
  onClick: Aa
2035
2041
  });
2036
2042
  case "clear-filter":
2037
2043
  return P({
2038
- id: t,
2044
+ id: e,
2039
2045
  iconSvg: N("clear-filter"),
2040
2046
  label: "清除筛选",
2041
2047
  title: "清除当前表全部筛选",
2042
- disabled: !(e != null && e.hasFilters()),
2043
- onClick: () => e == null ? void 0 : e.clearAllFilters()
2048
+ disabled: !(t != null && t.hasFilters()),
2049
+ onClick: () => t == null ? void 0 : t.clearAllFilters()
2044
2050
  });
2045
2051
  case "sort": {
2046
- const k = e == null ? void 0 : e.getSortState(), V = e == null ? void 0 : e.getActiveCell(), q = !V || !pe.value;
2052
+ const k = t == null ? void 0 : t.getSortState(), V = t == null ? void 0 : t.getActiveCell(), q = !V || !ge.value;
2047
2053
  return P({
2048
- id: t,
2054
+ id: e,
2049
2055
  iconSvg: N("sort"),
2050
2056
  label: "排序",
2051
2057
  title: V ? `按 ${ye(V.col)} 列排序` : "选中一个单元格后按该列排序",
@@ -2057,82 +2063,82 @@ const ws = { class: "toolbar" }, Is = ["title"], Ts = {
2057
2063
  label: "升序 (A → Z / 小 → 大)",
2058
2064
  active: !!(V && (k == null ? void 0 : k.col) === V.col && k.dir === "asc"),
2059
2065
  disabled: q,
2060
- onClick: () => e == null ? void 0 : e.sortActiveColumn("asc")
2066
+ onClick: () => t == null ? void 0 : t.sortActiveColumn("asc")
2061
2067
  }),
2062
2068
  P({
2063
2069
  id: "sort-desc",
2064
2070
  label: "降序 (Z → A / 大 → 小)",
2065
2071
  active: !!(V && (k == null ? void 0 : k.col) === V.col && k.dir === "desc"),
2066
2072
  disabled: q,
2067
- onClick: () => e == null ? void 0 : e.sortActiveColumn("desc")
2073
+ onClick: () => t == null ? void 0 : t.sortActiveColumn("desc")
2068
2074
  }),
2069
2075
  P({ id: "sort-custom-sep", type: "separator" }),
2070
- P({ id: "sort-custom", label: "自定义排序…", title: "多关键字排序", onClick: () => e == null ? void 0 : e.openSortDialog() })
2076
+ P({ id: "sort-custom", label: "自定义排序…", title: "多关键字排序", onClick: () => t == null ? void 0 : t.openSortDialog() })
2071
2077
  ]
2072
2078
  });
2073
2079
  }
2074
2080
  case "copy":
2075
2081
  return P({
2076
- id: t,
2082
+ id: e,
2077
2083
  iconSvg: N("copy"),
2078
2084
  label: "复制",
2079
2085
  title: "复制选区 (Ctrl+C)",
2080
- disabled: !j.value,
2081
- onClick: () => void (e == null ? void 0 : e.copySelection())
2086
+ disabled: !J.value,
2087
+ onClick: () => void (t == null ? void 0 : t.copySelection())
2082
2088
  });
2083
2089
  case "pivot-table":
2084
2090
  return n.pivotTable ? P({
2085
- id: t,
2091
+ id: e,
2086
2092
  iconSvg: N("pivot-table"),
2087
2093
  label: "透视表",
2088
2094
  title: "选择字段并基于当前选区创建静态透视汇总表",
2089
- disabled: !j.value || !n.editable,
2090
- onClick: () => e == null ? void 0 : e.openPivotTableDialog()
2095
+ disabled: !J.value || !n.editable,
2096
+ onClick: () => t == null ? void 0 : t.openPivotTableDialog()
2091
2097
  }) : null;
2092
2098
  case "conditional-format":
2093
2099
  return n.conditionalFormat ? P({
2094
- id: t,
2100
+ id: e,
2095
2101
  iconSvg: N("conditional-format"),
2096
2102
  label: "条件格式",
2097
2103
  title: "管理条件格式规则(新建/编辑/删除;新建套到当前选区)",
2098
2104
  disabled: !n.editable,
2099
- onClick: () => e == null ? void 0 : e.openConditionalFormatDialog()
2105
+ onClick: () => t == null ? void 0 : t.openConditionalFormatDialog()
2100
2106
  }) : null;
2101
2107
  case "number-format":
2102
2108
  return P({
2103
- id: t,
2109
+ id: e,
2104
2110
  iconSvg: N("number-format"),
2105
2111
  label: "数字格式",
2106
2112
  title: "设置单元格数字格式(数值/货币/百分比/日期/自定义)",
2107
- disabled: !j.value || !n.editable,
2108
- onClick: () => e == null ? void 0 : e.openNumberFormatDialog()
2113
+ disabled: !J.value || !n.editable,
2114
+ onClick: () => t == null ? void 0 : t.openNumberFormatDialog()
2109
2115
  });
2110
2116
  case "format-painter":
2111
2117
  return P({
2112
- id: t,
2118
+ id: e,
2113
2119
  iconSvg: N("format-painter"),
2114
2120
  label: "格式刷",
2115
2121
  title: "格式刷:先选源格点此采样,再点/拖目标刷上格式(Esc 取消)",
2116
- active: !!(e != null && e.isFormatPainterArmed()),
2117
- disabled: !j.value || !n.editable,
2118
- onClick: () => e != null && e.isFormatPainterArmed() ? e == null ? void 0 : e.cancelFormatPainter() : e == null ? void 0 : e.startFormatPainter()
2122
+ active: !!(t != null && t.isFormatPainterArmed()),
2123
+ disabled: !J.value || !n.editable,
2124
+ onClick: () => t != null && t.isFormatPainterArmed() ? t == null ? void 0 : t.cancelFormatPainter() : t == null ? void 0 : t.startFormatPainter()
2119
2125
  });
2120
2126
  case "wrap-text": {
2121
- const k = (o = e == null ? void 0 : e.getSelectionWrapState()) != null ? o : "none";
2127
+ const k = (o = t == null ? void 0 : t.getSelectionWrapState()) != null ? o : "none";
2122
2128
  return P({
2123
- id: t,
2129
+ id: e,
2124
2130
  iconSvg: N("wrap-text"),
2125
2131
  label: "自动换行",
2126
2132
  title: "自动换行(选区,WPS 风格 toggle)",
2127
2133
  active: k === "all",
2128
- disabled: !j.value || !n.editable,
2129
- onClick: () => void (e == null ? void 0 : e.toggleWrapTextOnSelection())
2134
+ disabled: !J.value || !n.editable,
2135
+ onClick: () => void (t == null ? void 0 : t.toggleWrapTextOnSelection())
2130
2136
  });
2131
2137
  }
2132
2138
  case "template": {
2133
2139
  const k = !!xt.value, V = ht.value, q = !!n.src && !n.workbook;
2134
2140
  return P({
2135
- id: t,
2141
+ id: e,
2136
2142
  iconSvg: N("template"),
2137
2143
  label: "模板",
2138
2144
  title: q ? "模板仅对 JSON / 模型数据源生效;当前是 .xlsx 数据源,模板不可用" : k ? `模板已加载:${V || "(未命名)"}` : "为 JSON / 模型数据源套用 .xlsx 模板的样式(边框 / 字体 / 列宽 / 合并 等);模板的文字内容会被丢弃",
@@ -2164,9 +2170,9 @@ const ws = { class: "toolbar" }, Is = ["title"], Ts = {
2164
2170
  });
2165
2171
  }
2166
2172
  case "image-tools": {
2167
- const k = j.value, V = e == null ? void 0 : e.getActiveCell(), q = ((I = (w = pe.value) == null ? void 0 : w.images.length) != null ? I : 0) > 0;
2173
+ const k = J.value, V = t == null ? void 0 : t.getActiveCell(), q = ((I = (w = ge.value) == null ? void 0 : w.images.length) != null ? I : 0) > 0;
2168
2174
  return P({
2169
- id: t,
2175
+ id: e,
2170
2176
  iconSvg: N("image-tools"),
2171
2177
  label: "图片工具",
2172
2178
  title: "浮动图 ⇄ 单元格内嵌图(WPS DISPIMG)互转",
@@ -2177,14 +2183,14 @@ const ws = { class: "toolbar" }, Is = ["title"], Ts = {
2177
2183
  label: "选区:浮动 → 嵌入",
2178
2184
  title: '把选区里"中心格在选区内"的浮动图,就近嵌入',
2179
2185
  disabled: !k || !q,
2180
- onClick: () => k && (e == null ? void 0 : e.convertImagesInRangeToCell(k))
2186
+ onClick: () => k && (t == null ? void 0 : t.convertImagesInRangeToCell(k))
2181
2187
  }),
2182
2188
  P({
2183
2189
  id: "img-sel-to-float",
2184
2190
  label: "选区:嵌入 → 浮动",
2185
2191
  title: "把选区内所有 DISPIMG 格拎成浮动图",
2186
2192
  disabled: !k,
2187
- onClick: () => k && (e == null ? void 0 : e.convertCellImagesInRangeToFloat(k))
2193
+ onClick: () => k && (t == null ? void 0 : t.convertCellImagesInRangeToFloat(k))
2188
2194
  }),
2189
2195
  P({ id: "img-sep", type: "separator" }),
2190
2196
  P({
@@ -2192,22 +2198,22 @@ const ws = { class: "toolbar" }, Is = ["title"], Ts = {
2192
2198
  label: "整表:浮动 → 嵌入",
2193
2199
  title: "全表浮动图按几何就近嵌入各自单元格",
2194
2200
  disabled: !q,
2195
- onClick: () => e == null ? void 0 : e.convertAllImagesToCells()
2201
+ onClick: () => t == null ? void 0 : t.convertAllImagesToCells()
2196
2202
  }),
2197
2203
  P({
2198
2204
  id: "img-col-to-cell",
2199
2205
  label: "整列:浮动 → 嵌入(活动列)",
2200
2206
  title: "把中心落在活动列的浮动图就近嵌入",
2201
2207
  disabled: !q || !V,
2202
- onClick: () => V && (e == null ? void 0 : e.convertAllImagesToCells(V.col))
2208
+ onClick: () => V && (t == null ? void 0 : t.convertAllImagesToCells(V.col))
2203
2209
  })
2204
2210
  ]
2205
2211
  });
2206
2212
  }
2207
2213
  case "freeze": {
2208
- const k = (b = pe.value) == null ? void 0 : b.freeze;
2214
+ const k = (b = ge.value) == null ? void 0 : b.freeze;
2209
2215
  return P({
2210
- id: t,
2216
+ id: e,
2211
2217
  iconSvg: N("freeze"),
2212
2218
  label: "冻结",
2213
2219
  title: "冻结/取消冻结(在活动单元格)",
@@ -2217,14 +2223,14 @@ const ws = { class: "toolbar" }, Is = ["title"], Ts = {
2217
2223
  }
2218
2224
  case "export":
2219
2225
  return P({
2220
- id: t,
2226
+ id: e,
2221
2227
  iconSvg: N("export"),
2222
2228
  label: "导出",
2223
2229
  title: "导出 / 打印",
2224
2230
  items: [
2225
2231
  P({ id: "export-png", label: "导出为图片 (PNG)", onClick: () => void Pe() }),
2226
- P({ id: "export-pdf", label: "导出为 PDF (位图)", onClick: zt }),
2227
- P({ id: "export-pdf-vector", label: "导出为 PDF (矢量·文字可选)", onClick: _t }),
2232
+ P({ id: "export-pdf", label: "导出为 PDF (位图)", onClick: _t }),
2233
+ P({ id: "export-pdf-vector", label: "导出为 PDF (矢量·文字可选)", onClick: zt }),
2228
2234
  P({ id: "export-print", label: "打印…", onClick: () => void Me() }),
2229
2235
  P({ id: "export-sep", type: "separator" }),
2230
2236
  P({ id: "export-settings", label: "导出设置…", onClick: () => De.value = !0 })
@@ -2232,38 +2238,38 @@ const ws = { class: "toolbar" }, Is = ["title"], Ts = {
2232
2238
  });
2233
2239
  case "zoom":
2234
2240
  return P({
2235
- id: t,
2241
+ id: e,
2236
2242
  iconSvg: N("zoom"),
2237
- label: Math.round(K.value * 100) + "%",
2243
+ label: Math.round(j.value * 100) + "%",
2238
2244
  title: "缩放",
2239
2245
  items: [50, 75, 100, 125, 150, 200].map(
2240
- (k) => P({ id: "zoom-" + k, label: k + "%", active: Math.round(K.value * 100) === k, onClick: () => K.value = k / 100 })
2246
+ (k) => P({ id: "zoom-" + k, label: k + "%", active: Math.round(j.value * 100) === k, onClick: () => j.value = k / 100 })
2241
2247
  )
2242
2248
  });
2243
2249
  default:
2244
2250
  return null;
2245
2251
  }
2246
2252
  }
2247
- function mt(t, a) {
2253
+ function mt(e, a) {
2248
2254
  var s, o, w;
2249
2255
  return {
2250
- id: t.id,
2251
- type: t.type,
2252
- iconSvg: t.iconSvg,
2253
- icon: t.icon,
2254
- label: t.label,
2255
- title: t.title,
2256
- active: !!((s = t.active) != null && s.call(t, Ae)),
2257
- disabled: !!((o = t.disabled) != null && o.call(t, Ae)),
2258
- onClick: t.onClick ? () => t.onClick(Ae) : void 0,
2259
- items: (w = t.items) == null ? void 0 : w.map((I) => mt(I, a)),
2256
+ id: e.id,
2257
+ type: e.type,
2258
+ iconSvg: e.iconSvg,
2259
+ icon: e.icon,
2260
+ label: e.label,
2261
+ title: e.title,
2262
+ active: !!((s = e.active) != null && s.call(e, Ae)),
2263
+ disabled: !!((o = e.disabled) != null && o.call(e, Ae)),
2264
+ onClick: e.onClick ? () => e.onClick(Ae) : void 0,
2265
+ items: (w = e.items) == null ? void 0 : w.map((I) => mt(I, a)),
2260
2266
  kind: a
2261
2267
  };
2262
2268
  }
2263
- function Oa(t, a) {
2269
+ function Oa(e, a) {
2264
2270
  var o, w, I;
2265
2271
  const s = [];
2266
- for (const b of t)
2272
+ for (const b of e)
2267
2273
  if (bs(b))
2268
2274
  s.push({ id: "br-" + s.length, type: "rowbreak", kind: "builtin" });
2269
2275
  else if (ks(b))
@@ -2276,52 +2282,52 @@ const ws = { class: "toolbar" }, Is = ["title"], Ts = {
2276
2282
  }
2277
2283
  return s;
2278
2284
  }
2279
- const Ot = E(() => fs(n.ribbon, n.toolbar)), ze = E(() => n.ribbonPersistKey === null ? null : n.ribbonPersistKey || cs), Ue = S(ze.value ? rs(ze.value) : null), ge = E(
2285
+ const Ot = E(() => fs(n.ribbon, n.toolbar)), _e = E(() => n.ribbonPersistKey === null ? null : n.ribbonPersistKey || cs), Ue = S(_e.value ? rs(_e.value) : null), pe = E(
2280
2286
  () => Xt({
2281
2287
  ribbon: n.ribbon,
2282
2288
  toolbar: n.toolbar,
2283
- userState: Ot.value && ze.value ? Ue.value : null
2289
+ userState: Ot.value && _e.value ? Ue.value : null
2284
2290
  })
2285
2291
  ), ne = S("");
2286
- z(
2287
- ge,
2288
- (t) => {
2289
- t.sections && (t.sections.some((a) => a.id === ne.value) || (ne.value = t.activeSectionId));
2292
+ _(
2293
+ pe,
2294
+ (e) => {
2295
+ e.sections && (e.sections.some((a) => a.id === ne.value) || (ne.value = e.activeSectionId));
2290
2296
  },
2291
2297
  { immediate: !0 }
2292
2298
  );
2293
2299
  const Ht = E(() => {
2294
2300
  var w, I;
2295
2301
  me.value, te.value, dt.value, Lt.value;
2296
- const t = ge.value;
2297
- if (!t.sections) return [];
2298
- const a = (w = t.sections.find((b) => b.id === ne.value)) != null ? w : t.sections[0], s = ps(a).map((b) => ({ id: b.id, name: b.name, items: Oa(b.tools, t.customItems) })), o = [];
2302
+ const e = pe.value;
2303
+ if (!e.sections) return [];
2304
+ const a = (w = e.sections.find((b) => b.id === ne.value)) != null ? w : e.sections[0], s = gs(a).map((b) => ({ id: b.id, name: b.name, items: Oa(b.tools, e.customItems) })), o = [];
2299
2305
  for (const b of C.value) for (const k of (I = b.toolbar) != null ? I : []) o.push(mt(k, "plugin"));
2300
2306
  return o.length && (s.length ? s[s.length - 1].items.push(...o) : s.push({ id: "plugins", name: "", items: o })), s;
2301
- }), Nt = E(() => Ht.value.flatMap((t) => t.items)), Vt = Nt, Ha = E(() => !!ge.value.sections && Nt.value.length > 0), Na = E(() => Ot.value), Wt = new ms();
2302
- function Va(t, a) {
2303
- const s = ze.value;
2304
- Ue.value = { v: 1, sections: t, activeSectionId: a }, s && hs(s, Ue.value);
2307
+ }), Nt = E(() => Ht.value.flatMap((e) => e.items)), Vt = Nt, Ha = E(() => !!pe.value.sections && Nt.value.length > 0), Na = E(() => Ot.value), Wt = new ms();
2308
+ function Va(e, a) {
2309
+ const s = _e.value;
2310
+ Ue.value = { v: 1, sections: e, activeSectionId: a }, s && hs(s, Ue.value);
2305
2311
  }
2306
2312
  function Wa() {
2307
2313
  var a, s, o, w, I;
2308
- const t = ge.value;
2314
+ const e = pe.value;
2309
2315
  Wt.show({
2310
- sections: (a = t.sections) != null ? a : [],
2316
+ sections: (a = e.sections) != null ? a : [],
2311
2317
  activeSectionId: ne.value,
2312
2318
  catalog: ys,
2313
- zoom: K.value,
2319
+ zoom: j.value,
2314
2320
  editable: (s = l.value) != null ? s : !!n.editable,
2315
2321
  cellImageFit: (w = (o = u.value) != null ? o : n.cellImageFit) != null ? w : "fill",
2316
- pasteBehavior: (I = e == null ? void 0 : e.getPasteBehavior()) != null ? I : Gt,
2322
+ pasteBehavior: (I = t == null ? void 0 : t.getPasteBehavior()) != null ? I : Gt,
2317
2323
  onRibbonChange: (b, k) => {
2318
2324
  Va(b, k), ne.value = k;
2319
2325
  },
2320
2326
  onRuntimeChange: (b) => {
2321
- b.zoom != null && (K.value = b.zoom), b.editable != null && (l.value = b.editable, H("update:editable", b.editable)), b.cellImageFit != null && (u.value = b.cellImageFit, e == null || e.setCellImageFit(b.cellImageFit), H("update:cellImageFit", b.cellImageFit)), b.pasteBehavior != null && (e == null || e.setPasteBehavior(b.pasteBehavior));
2327
+ b.zoom != null && (j.value = b.zoom), b.editable != null && (l.value = b.editable, H("update:editable", b.editable)), b.cellImageFit != null && (u.value = b.cellImageFit, t == null || t.setCellImageFit(b.cellImageFit), H("update:cellImageFit", b.cellImageFit)), b.pasteBehavior != null && (t == null || t.setPasteBehavior(b.pasteBehavior));
2322
2328
  },
2323
2329
  onReset: () => {
2324
- const b = ze.value;
2330
+ const b = _e.value;
2325
2331
  b && Ss(b), Ue.value = null;
2326
2332
  const k = Xt({ ribbon: n.ribbon, toolbar: n.toolbar, userState: null });
2327
2333
  ne.value = k.activeSectionId;
@@ -2330,20 +2336,20 @@ const ws = { class: "toolbar" }, Is = ["title"], Ts = {
2330
2336
  }
2331
2337
  const je = /* @__PURE__ */ new Map();
2332
2338
  let Je = [];
2333
- function be(t, a) {
2339
+ function be(e, a) {
2334
2340
  var s;
2335
- t === "dirty-change" && (Pt.value = !!(a != null && a.dirty)), H(t, a), (s = je.get(t)) == null || s.forEach((o) => o(a));
2341
+ e === "dirty-change" && (Pt.value = !!(a != null && a.dirty)), H(e, a), (s = je.get(e)) == null || s.forEach((o) => o(a));
2336
2342
  }
2337
2343
  function Ut() {
2338
2344
  var s;
2339
2345
  Je.forEach((o) => o()), Je = [], je.clear();
2340
- const t = (o, w) => {
2346
+ const e = (o, w) => {
2341
2347
  let I = je.get(o);
2342
2348
  I || je.set(o, I = /* @__PURE__ */ new Set()), I.add(w);
2343
- }, a = { viewer: Ae, on: t, redraw: () => He() };
2349
+ }, a = { viewer: Ae, on: e, redraw: () => He() };
2344
2350
  for (const o of C.value) {
2345
2351
  if (o.events)
2346
- for (const [I, b] of Object.entries(o.events)) b && t(I, b);
2352
+ for (const [I, b] of Object.entries(o.events)) b && e(I, b);
2347
2353
  const w = (s = o.setup) == null ? void 0 : s.call(o, a);
2348
2354
  typeof w == "function" && Je.push(w);
2349
2355
  }
@@ -2351,20 +2357,20 @@ const ws = { class: "toolbar" }, Is = ["title"], Ts = {
2351
2357
  const ft = S(null);
2352
2358
  let ce = null;
2353
2359
  function Ua() {
2354
- const t = { rectOf: lt, rectOfRange: ot, tick: me.value, workbook: T.value };
2355
- ce == null || ce.render(C.value, t);
2360
+ const e = { rectOf: lt, rectOfRange: ot, tick: me.value, workbook: T.value };
2361
+ ce == null || ce.render(C.value, e);
2356
2362
  }
2357
- return z([me, C], Ua, { flush: "post" }), (t, a) => (d(), v("div", {
2363
+ return _([me, C], Ua, { flush: "post" }), (e, a) => (d(), v("div", {
2358
2364
  class: "excel-viewer",
2359
2365
  ref_key: "rootEl",
2360
2366
  ref: la,
2361
2367
  onKeydown: Da
2362
2368
  }, [
2363
- R(T) ? le(t.$slots, "header", {
2369
+ R(T) ? le(e.$slots, "header", {
2364
2370
  key: 0,
2365
2371
  workbook: R(T),
2366
- zoom: K.value,
2367
- setZoom: (s) => K.value = s,
2372
+ zoom: j.value,
2373
+ setZoom: (s) => j.value = s,
2368
2374
  downloadImage: Pe,
2369
2375
  downloadPdf: Re,
2370
2376
  print: Me
@@ -2377,11 +2383,11 @@ const ws = { class: "toolbar" }, Is = ["title"], Ts = {
2377
2383
  "file-size": ve.value,
2378
2384
  "data-bytes": Oe.value,
2379
2385
  "heap-bytes": xe.value,
2380
- zoom: K.value,
2381
- "onUpdate:zoom": a[0] || (a[0] = (s) => K.value = s),
2386
+ zoom: j.value,
2387
+ "onUpdate:zoom": a[0] || (a[0] = (s) => j.value = s),
2382
2388
  onExportImage: a[1] || (a[1] = (s) => Pe()),
2383
- onExportPdf: zt,
2384
- onExportPdfVector: _t,
2389
+ onExportPdf: _t,
2390
+ onExportPdfVector: zt,
2385
2391
  onExportXlsx: a[2] || (a[2] = (s) => Ia()),
2386
2392
  onExportCsv: a[3] || (a[3] = (s) => Ta()),
2387
2393
  onExportJson: a[4] || (a[4] = (s) => Ea()),
@@ -2389,16 +2395,16 @@ const ws = { class: "toolbar" }, Is = ["title"], Ts = {
2389
2395
  onOpenSettings: a[6] || (a[6] = (s) => De.value = !0)
2390
2396
  }, null, 8, ["file-name", "modified", "template-name", "sheet-count", "file-size", "data-bytes", "heap-bytes", "zoom"])
2391
2397
  ], !0) : h("", !0),
2392
- R(T) && Ha.value ? le(t.$slots, "toolbar", {
2398
+ R(T) && Ha.value ? le(e.$slots, "toolbar", {
2393
2399
  key: 1,
2394
2400
  items: R(Vt)
2395
2401
  }, () => [
2396
- ge.value.singleSection ? (d(), se(Di, {
2402
+ pe.value.singleSection ? (d(), se(Di, {
2397
2403
  key: 1,
2398
2404
  items: R(Vt)
2399
2405
  }, null, 8, ["items"])) : (d(), se(tn, {
2400
2406
  key: 0,
2401
- sections: ge.value.sections,
2407
+ sections: pe.value.sections,
2402
2408
  "active-section-id": ne.value,
2403
2409
  groups: Ht.value,
2404
2410
  "show-settings": Na.value,
@@ -2420,8 +2426,8 @@ const ws = { class: "toolbar" }, Is = ["title"], Ts = {
2420
2426
  spellcheck: "false",
2421
2427
  onFocus: ca,
2422
2428
  onInput: ma,
2423
- onKeydown: ga,
2424
- onBlur: pa
2429
+ onKeydown: pa,
2430
+ onBlur: ga
2425
2431
  }, null, 40, fn)) : (d(), v("span", {
2426
2432
  key: 1,
2427
2433
  class: "content",
@@ -2479,7 +2485,7 @@ const ws = { class: "toolbar" }, Is = ["title"], Ts = {
2479
2485
  }, null, 512)
2480
2486
  ], 544),
2481
2487
  i("div", rn, [
2482
- le(t.$slots, "overlay", {
2488
+ le(e.$slots, "overlay", {
2483
2489
  rectOf: lt,
2484
2490
  rectOfRange: ot,
2485
2491
  tick: me.value
@@ -2499,13 +2505,13 @@ const ws = { class: "toolbar" }, Is = ["title"], Ts = {
2499
2505
  class: ee(["cell-tooltip", fe.value.kind]),
2500
2506
  style: Ke({ left: fe.value.x + "px", top: fe.value.y + "px" })
2501
2507
  }, $(fe.value.text), 7)) : h("", !0),
2502
- R(_) ? (d(), v("div", pn, [
2503
- le(t.$slots, "loading", {
2508
+ R(z) ? (d(), v("div", gn, [
2509
+ le(e.$slots, "loading", {
2504
2510
  progress: R(A),
2505
2511
  label: Et.value,
2506
2512
  pct: he.value
2507
2513
  }, () => [
2508
- i("div", gn, [
2514
+ i("div", pn, [
2509
2515
  i("div", bn, [
2510
2516
  L($(Et.value), 1),
2511
2517
  he.value != null ? (d(), v("span", kn, $(he.value) + "%", 1)) : h("", !0)
@@ -2519,18 +2525,18 @@ const ws = { class: "toolbar" }, Is = ["title"], Ts = {
2519
2525
  ])
2520
2526
  ])
2521
2527
  ], !0)
2522
- ])) : R(J) ? (d(), v("div", Sn, [
2523
- le(t.$slots, "error", { error: R(J) }, () => [
2524
- L("解析失败:" + $(R(J)), 1)
2528
+ ])) : R(K) ? (d(), v("div", Sn, [
2529
+ le(e.$slots, "error", { error: R(K) }, () => [
2530
+ L("解析失败:" + $(R(K)), 1)
2525
2531
  ], !0)
2526
2532
  ])) : R(T) ? h("", !0) : (d(), v("div", xn, [
2527
- le(t.$slots, "empty", {}, () => [
2533
+ le(e.$slots, "empty", {}, () => [
2528
2534
  a[11] || (a[11] = L("拖入或选择一个 .xlsx 文件", -1))
2529
2535
  ], !0)
2530
2536
  ]))
2531
2537
  ], 512),
2532
2538
  R(T) ? (d(), v("div", hn, [
2533
- le(t.$slots, "statusbar", {
2539
+ le(e.$slots, "statusbar", {
2534
2540
  stats: G.value,
2535
2541
  range: Rt.value || it.value
2536
2542
  }, () => [
@@ -2553,10 +2559,10 @@ const ws = { class: "toolbar" }, Is = ["title"], Ts = {
2553
2559
  }, null, 8, ["workbook", "active"])) : h("", !0),
2554
2560
  De.value && R(T) ? (d(), se(oi, {
2555
2561
  key: 5,
2556
- selection: j.value,
2562
+ selection: J.value,
2557
2563
  "sheet-count": R(T).sheets.filter((s) => s.state === "visible").length,
2558
2564
  onClose: a[9] || (a[9] = (s) => De.value = !1),
2559
- onExport: za
2565
+ onExport: _a
2560
2566
  }, null, 8, ["selection", "sheet-count"])) : h("", !0),
2561
2567
  i("input", {
2562
2568
  ref_key: "templateInputEl",
@@ -2566,7 +2572,7 @@ const ws = { class: "toolbar" }, Is = ["title"], Ts = {
2566
2572
  hidden: "",
2567
2573
  onChange: sa
2568
2574
  }, null, 544),
2569
- m.exportProgress !== !1 ? le(t.$slots, "export-progress", {
2575
+ m.exportProgress !== !1 ? le(e.$slots, "export-progress", {
2570
2576
  key: 6,
2571
2577
  state: Ee.value,
2572
2578
  busy: We.value,
@@ -2580,15 +2586,15 @@ const ws = { class: "toolbar" }, Is = ["title"], Ts = {
2580
2586
  ], !0) : h("", !0)
2581
2587
  ], 544));
2582
2588
  }
2583
- }), Tn = /* @__PURE__ */ de(In, [["__scopeId", "data-v-d5f5d23e"]]), Mn = {
2589
+ }), Tn = /* @__PURE__ */ de(In, [["__scopeId", "data-v-fb0591c2"]]), Mn = {
2584
2590
  install(m) {
2585
2591
  m.component("ExcelViewer", Tn);
2586
2592
  }
2587
2593
  };
2588
2594
  export {
2589
2595
  Bn as BuiltinFormulaEngine,
2590
- zn as CanvasRenderer,
2591
- _n as CellEditorHost,
2596
+ _n as CanvasRenderer,
2597
+ zn as CellEditorHost,
2592
2598
  Gt as DEFAULT_PASTE_BEHAVIOR,
2593
2599
  Ln as DEFAULT_THEME,
2594
2600
  On as EditController,
@@ -2628,11 +2634,11 @@ export {
2628
2634
  cl as downloadBlob,
2629
2635
  es as estimateWorkbookBytes,
2630
2636
  Qt as finalizeImages,
2631
- pt as formatBytes,
2637
+ gt as formatBytes,
2632
2638
  rl as formatValue,
2633
2639
  Qa as friendlyError,
2634
- pl as functionMeta,
2635
- gl as getCell,
2640
+ gl as functionMeta,
2641
+ pl as getCell,
2636
2642
  bl as getCellStyle,
2637
2643
  ls as getCellText,
2638
2644
  os as getCellValue,
@@ -2656,12 +2662,12 @@ export {
2656
2662
  Pl as openWorkbook,
2657
2663
  Rl as parseSignature,
2658
2664
  Ml as parseWorkbook,
2659
- gt as readHeapUsed,
2665
+ pt as readHeapUsed,
2660
2666
  Dl as removeImage,
2661
2667
  Al as resolveEditable,
2662
2668
  Bl as resolvePasteBehavior,
2663
- zl as restoreCell,
2664
- _l as restoreDimension,
2669
+ _l as restoreCell,
2670
+ zl as restoreDimension,
2665
2671
  Ll as restoreStructure,
2666
2672
  Ol as restoreWorkbookInto,
2667
2673
  kt as revokeImages,