ooxml-excel-editor 1.16.0 → 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/react.js CHANGED
@@ -1,21 +1,21 @@
1
- var Gn = Object.defineProperty, Xn = Object.defineProperties;
2
- var $n = Object.getOwnPropertyDescriptors;
3
- var dn = Object.getOwnPropertySymbols;
4
- var Zn = Object.prototype.hasOwnProperty, qn = Object.prototype.propertyIsEnumerable;
5
- var mn = (f, a, S) => a in f ? Gn(f, a, { enumerable: !0, configurable: !0, writable: !0, value: S }) : f[a] = S, V = (f, a) => {
6
- for (var S in a || (a = {}))
7
- Zn.call(a, S) && mn(f, S, a[S]);
8
- if (dn)
9
- for (var S of dn(a))
10
- qn.call(a, S) && mn(f, S, a[S]);
11
- return f;
12
- }, ae = (f, a) => Xn(f, $n(a));
13
- import { jsx as i, jsxs as m, Fragment as ye } from "react/jsx-runtime";
14
- import { useState as w, useRef as v, useCallback as gn, forwardRef as Yn, useMemo as Qn, useEffect as y, useReducer as er, useLayoutEffect as fn, useImperativeHandle as tr, Fragment as nr } from "react";
15
- import { p as In, R as rr, l as lr, S as or, i as ar, r as Cn, s as sr, a as se, b as cr, c as ir, d as ur, e as dr, T as mr, f as gr, g as fr, h as Cr, j as br, k as vr } from "./chunks/toolbar-builtins-DldwAB3X.js";
16
- import { r as bn, l as Fn, d as kn, f as Rn, a as hr, e as Sr, b as Qe, V as pr, P as xr, D as et, g as vn, s as hn, c as Sn, h as pn, i as xn, j as we, k as tt, m as Ir, n as Fr } from "./chunks/index-CoOchGdS.js";
17
- import { B as Or, C as zr, o as Lr, p as Wr, E as Hr, F as _r, q as Vr, G as Jr, K as Kr, O as Ur, t as jr, W as Gr, u as Xr, v as $r, w as Zr, x as qr, y as Yr, z as Qr, A as el, H as tl, I as nl, J as rl, L as ll, M as ol, N as al, Q as sl, R as cl, S as il, T as ul, U as dl, X as ml, Y as gl, Z as fl, _ as Cl, $ as bl, a0 as vl, a1 as hl, a2 as Sl, S as pl, a3 as xl, a4 as Il, a5 as Fl, a6 as kl, a7 as Rl, a8 as yl, a9 as wl, aa as Pl, ab as El, ac as Tl, ad as Nl, ae as Al, af as Dl, ag as Ml, ah as Bl, ai as Ol, aj as zl, ak as Ll, al as Wl, am as Hl, an as _l, ao as Vl, ap as Jl, aq as Kl, ar as Ul, as as jl, at as Gl, au as Xl, av as $l, aw as Zl, ax as ql, ay as Yl } from "./chunks/index-CoOchGdS.js";
18
- const kr = {
1
+ var _n = Object.defineProperty, Vn = Object.defineProperties;
2
+ var Jn = Object.getOwnPropertyDescriptors;
3
+ var rn = Object.getOwnPropertySymbols;
4
+ var Un = Object.prototype.hasOwnProperty, jn = Object.prototype.propertyIsEnumerable;
5
+ var ln = (v, s, k) => s in v ? _n(v, s, { enumerable: !0, configurable: !0, writable: !0, value: k }) : v[s] = k, _ = (v, s) => {
6
+ for (var k in s || (s = {}))
7
+ Un.call(s, k) && ln(v, k, s[k]);
8
+ if (rn)
9
+ for (var k of rn(s))
10
+ jn.call(s, k) && ln(v, k, s[k]);
11
+ return v;
12
+ }, re = (v, s) => Vn(v, Jn(s));
13
+ import { jsx as i, jsxs as m, Fragment as Ie } from "react/jsx-runtime";
14
+ import { useState as y, useRef as b, useCallback as on, forwardRef as Kn, useMemo as Gn, useEffect as R, useReducer as Xn, useLayoutEffect as an, useImperativeHandle as $n, Fragment as Zn } from "react";
15
+ import { p as Cn, R as Yn, l as qn, S as Qn, i as er, r as sn, s as tr, a as le, b as nr, c as rr, d as lr, e as or, T as ar, f as sr, g as cr, h as ir, j as ur, k as dr } from "./chunks/toolbar-builtins-CeOlAWgM.js";
16
+ import { r as cn, l as bn, d as vn, f as pn, a as gr, e as mr, b as Xe, V as fr, P as Cr, D as $e, g as un, s as dn, c as gn, h as mn, i as fn, j as Re, k as Ze, m as br, n as vr } from "./chunks/index-Dg4LsUaW.js";
17
+ import { B as Er, C as Tr, o as Dr, p as Nr, E as Ar, F as Mr, q as Br, G as Or, K as zr, O as Lr, t as Wr, W as Hr, u as _r, v as Vr, w as Jr, x as Ur, y as jr, z as Kr, A as Gr, H as Xr, I as $r, J as Zr, L as Yr, M as qr, N as Qr, Q as el, R as tl, S as nl, T as rl, U as ll, X as ol, Y as al, Z as sl, _ as cl, $ as il, a0 as ul, a1 as dl, a2 as gl, S as ml, a3 as fl, a4 as Cl, a5 as bl, a6 as vl, a7 as pl, a8 as hl, a9 as Sl, aa as xl, ab as Fl, ac as Il, ad as Rl, ae as kl, af as wl, ag as yl, ah as Pl, ai as El, aj as Tl, ak as Dl, al as Nl, am as Al, an as Ml, ao as Bl, ap as Ol, aq as zl, ar as Ll, as as Wl, at as Hl, au as _l, av as Vl, aw as Jl, ax as Ul, ay as jl } from "./chunks/index-Dg4LsUaW.js";
18
+ const pr = {
19
19
  render: "渲染中",
20
20
  compose: "合成中",
21
21
  paginate: "分页中",
@@ -23,130 +23,130 @@ const kr = {
23
23
  zip: "zip 压缩",
24
24
  convert: "批量转换"
25
25
  };
26
- function Rr({
27
- state: f,
28
- busy: a,
29
- onCancel: S
26
+ function hr({
27
+ state: v,
28
+ busy: s,
29
+ onCancel: k
30
30
  }) {
31
- var u;
32
- if (!a) return null;
33
- const F = f == null ? void 0 : f.ratio, M = (f == null ? void 0 : f.label) || kr[(u = f == null ? void 0 : f.stage) != null ? u : ""] || "处理中…";
31
+ var d;
32
+ if (!s) return null;
33
+ const P = v == null ? void 0 : v.ratio, z = (v == null ? void 0 : v.label) || pr[(d = v == null ? void 0 : v.stage) != null ? d : ""] || "处理中…";
34
34
  return /* @__PURE__ */ i("div", { className: "rxl-export-progress", role: "dialog", "aria-modal": "true", "aria-live": "polite", children: /* @__PURE__ */ m("div", { className: "card", children: [
35
- /* @__PURE__ */ i("div", { className: "title", children: M }),
36
- /* @__PURE__ */ i("div", { className: "bar" + (F == null ? " indeterminate" : ""), children: F != null ? /* @__PURE__ */ i("div", { className: "fill", style: { width: Math.round(F * 100) + "%" } }) : null }),
35
+ /* @__PURE__ */ i("div", { className: "title", children: z }),
36
+ /* @__PURE__ */ i("div", { className: "bar" + (P == null ? " indeterminate" : ""), children: P != null ? /* @__PURE__ */ i("div", { className: "fill", style: { width: Math.round(P * 100) + "%" } }) : null }),
37
37
  /* @__PURE__ */ m("div", { className: "row", children: [
38
- /* @__PURE__ */ i("span", { className: "pct", children: F != null ? Math.round(F * 100) + "%" : "正在处理…" }),
39
- /* @__PURE__ */ i("button", { className: "cancel", onClick: S, title: "按 Esc 也可取消", children: "取消" })
38
+ /* @__PURE__ */ i("span", { className: "pct", children: P != null ? Math.round(P * 100) + "%" : "正在处理…" }),
39
+ /* @__PURE__ */ i("button", { className: "cancel", onClick: k, title: "按 Esc 也可取消", children: "取消" })
40
40
  ] })
41
41
  ] }) });
42
42
  }
43
- function yr() {
44
- const [f, a] = w(!1), [S, F] = w(null), [M, u] = w(null), [A, O] = w(null), [ce, W] = w(null), z = v(null), be = gn(async (J, j) => {
45
- var G;
46
- a(!0), F(null), z.current && bn(z.current), z.current = null, u(null), W(null), O({ stage: "read", ratio: 0 });
43
+ function Sr() {
44
+ const [v, s] = y(!1), [k, P] = y(null), [z, d] = y(null), [V, M] = y(null), [oe, L] = y(null), B = b(null), fe = on(async (J, j) => {
45
+ var K;
46
+ s(!0), P(null), B.current && cn(B.current), B.current = null, d(null), L(null), M({ stage: "read", ratio: 0 });
47
47
  try {
48
- const p = await Fn(
48
+ const h = await bn(
49
49
  J,
50
- (Q, X) => O({ stage: "read", ratio: X ? Q / X : void 0 })
51
- ), D = kn(p);
52
- if (D === "xls") throw new Error("这是旧版 .xls(BIFF) 或加密文件,本预览器只支持 .xlsx/.xlsm。");
53
- if (D === "not-zip") throw new Error("文件不是有效的 .xlsx(非 ZIP 包)。");
54
- if (D === "empty") throw new Error("文件为空。");
55
- let I = await In(p, (Q) => O(Q));
56
- j && (I = (G = j(I)) != null ? G : I), Rn(I), W(p.slice(0)), z.current = I, u(I);
57
- } catch (p) {
58
- const D = p == null ? void 0 : p.message;
59
- F(D && /预览器|损坏|加密|为空|ZIP/.test(D) ? D : hr(p)), console.error("[ooxml-preview] 解析失败:", p);
50
+ (G, X) => M({ stage: "read", ratio: X ? G / X : void 0 })
51
+ ), N = vn(h);
52
+ if (N === "xls") throw new Error("这是旧版 .xls(BIFF) 或加密文件,本预览器只支持 .xlsx/.xlsm。");
53
+ if (N === "not-zip") throw new Error("文件不是有效的 .xlsx(非 ZIP 包)。");
54
+ if (N === "empty") throw new Error("文件为空。");
55
+ let x = await Cn(h, (G) => M(G));
56
+ j && (x = (K = j(x)) != null ? K : x), pn(x), L(h.slice(0)), B.current = x, d(x);
57
+ } catch (h) {
58
+ const N = h == null ? void 0 : h.message;
59
+ P(N && /预览器|损坏|加密|为空|ZIP/.test(N) ? N : gr(h)), console.error("[ooxml-preview] 解析失败:", h);
60
60
  } finally {
61
- a(!1), O(null);
61
+ s(!1), M(null);
62
62
  }
63
- }, []), Y = gn((J, j) => {
64
- var p;
65
- z.current && bn(z.current), W(null), F(null), O(null);
66
- const G = j && (p = j(J)) != null ? p : J;
67
- z.current = G, u(G);
63
+ }, []), Y = on((J, j) => {
64
+ var h;
65
+ B.current && cn(B.current), L(null), P(null), M(null);
66
+ const K = j && (h = j(J)) != null ? h : J;
67
+ B.current = K, d(K);
68
68
  }, []);
69
- return { loading: f, error: S, workbook: M, progress: A, load: be, loadModel: Y, sourceBuffer: ce };
69
+ return { loading: v, error: k, workbook: z, progress: V, load: fe, loadModel: Y, sourceBuffer: oe };
70
70
  }
71
- function Pe(f) {
72
- return isFinite(f) ? f.toLocaleString("en-US", { maximumFractionDigits: 2 }) : "—";
71
+ function ke(v) {
72
+ return isFinite(v) ? v.toLocaleString("en-US", { maximumFractionDigits: 2 }) : "—";
73
73
  }
74
- const Dr = Yn(function(a, S) {
75
- var Bt, Ot, zt, Lt, Wt, Ht, _t, Vt, Jt, Kt, Ut, jt, Gt, Xt, $t, Zt, qt, Yt;
76
- const { loading: F, error: M, workbook: u, progress: A, load: O, loadModel: ce, sourceBuffer: W } = yr(), z = (Bt = W == null ? void 0 : W.byteLength) != null ? Bt : null, be = Qn(() => u ? Sr(u) : null, [u]), Y = v(Qe());
77
- y(() => {
74
+ const wr = Kn(function(s, k) {
75
+ var Tt, Dt, Nt, At, Mt, Bt, Ot, zt, Lt, Wt, Ht, _t, Vt, Jt, Ut, jt;
76
+ const { loading: P, error: z, workbook: d, progress: V, load: M, loadModel: oe, sourceBuffer: L } = Sr(), B = (Tt = L == null ? void 0 : L.byteLength) != null ? Tt : null, fe = Gn(() => d ? mr(d) : null, [d]), Y = b(Xe());
77
+ R(() => {
78
78
  var e;
79
- F && (Y.current = (e = Qe()) != null ? e : Y.current);
80
- }, [F]);
81
- const [J, j] = w(null);
82
- y(() => {
83
- if (!u) return;
84
- const e = Qe();
79
+ P && (Y.current = (e = Xe()) != null ? e : Y.current);
80
+ }, [P]);
81
+ const [J, j] = y(null);
82
+ R(() => {
83
+ if (!d) return;
84
+ const e = Xe();
85
85
  j(e != null && Y.current != null ? Math.max(0, e - Y.current) : null);
86
- }, [u]);
87
- const G = (e) => e ? Ir(e) ? e : Fr(e, a.jsonOptions) : null, [p, D] = w(0), [I, Q] = w(1), [X, nt] = w(null), [Ee, rt] = w(null), lt = (Ot = X != null ? X : a.templateFile) != null ? Ot : null, ie = (zt = Ee != null ? Ee : a.templateName) != null ? zt : "", ot = () => {
88
- nt(null), rt(null);
89
- }, at = v(null), yn = () => {
86
+ }, [d]);
87
+ const K = (e) => e ? br(e) ? e : vr(e, s.jsonOptions) : null, [h, N] = y(0), [x, G] = y(1), [X, Ye] = y(null), [we, qe] = y(null), Qe = (Dt = X != null ? X : s.templateFile) != null ? Dt : null, ae = (Nt = we != null ? we : s.templateName) != null ? Nt : "", et = () => {
88
+ Ye(null), qe(null);
89
+ }, tt = b(null), hn = () => {
90
90
  var e;
91
- return (e = at.current) == null ? void 0 : e.click();
92
- }, wn = (e) => {
91
+ return (e = tt.current) == null ? void 0 : e.click();
92
+ }, Sn = (e) => {
93
93
  var n;
94
94
  const t = (n = e.target.files) == null ? void 0 : n[0];
95
- t && (nt(t), rt(t.name), e.target.value = "");
96
- }, st = a.fileName || (a.workbook ? "JSON 数据" : ((Lt = u == null ? void 0 : u.sheets[0]) == null ? void 0 : Lt.name) || ""), [Te, Ne] = w(!1), [ee, ve] = w(""), $ = a.ribbonPersistKey === null ? null : a.ribbonPersistKey || rr, [Pn, ct] = w(() => $ ? lr($) : null), he = v(null);
97
- he.current || (he.current = new or()), y(() => () => {
95
+ t && (Ye(t), qe(t.name), e.target.value = "");
96
+ }, nt = s.fileName || (s.workbook ? "JSON 数据" : ((At = d == null ? void 0 : d.sheets[0]) == null ? void 0 : At.name) || ""), [q, Ce] = y(""), $ = s.ribbonPersistKey === null ? null : s.ribbonPersistKey || Yn, [xn, rt] = y(() => $ ? qn($) : null), be = b(null);
97
+ be.current || (be.current = new Qn()), R(() => () => {
98
98
  var e;
99
- return (e = he.current) == null ? void 0 : e.dispose();
99
+ return (e = be.current) == null ? void 0 : e.dispose();
100
100
  }, []);
101
- const [ue, H] = w(null);
102
- y(() => {
101
+ const [se, W] = y(null);
102
+ R(() => {
103
103
  if (typeof document == "undefined") return;
104
104
  const e = (t) => {
105
105
  var n;
106
- (n = t.target) != null && n.closest("[data-tb-menu]") || H(null);
106
+ (n = t.target) != null && n.closest("[data-tb-menu]") || W(null);
107
107
  };
108
108
  return document.addEventListener("click", e), () => document.removeEventListener("click", e);
109
109
  }, []);
110
- const [, _] = er((e) => e + 1, 0), [En, it] = w(""), de = v(!1), ut = v(null), dt = () => {
111
- const e = ut.current;
110
+ const [, H] = Xn((e) => e + 1, 0), [Fn, lt] = y(""), ce = b(!1), ot = b(null), at = () => {
111
+ const e = ot.current;
112
112
  e && (e.style.height = "auto", e.style.height = e.scrollHeight + "px");
113
113
  };
114
- y(() => {
115
- dt();
114
+ R(() => {
115
+ at();
116
116
  });
117
- const mt = v(null), gt = v(null), te = v(null), ft = v(null), Ae = v(null), De = v(null), Me = v(null), Be = v(null), r = v(null), Oe = v(null), ze = v(null), Le = v(null), Se = v(null), We = v(/* @__PURE__ */ new Map()), C = v(a);
118
- C.current = a;
119
- const pe = (Wt = a.plugins) != null ? Wt : [], ne = v(pe);
120
- ne.current = pe;
121
- const re = v(u);
122
- re.current = u;
123
- const He = v(p);
124
- He.current = p;
125
- function Tn() {
126
- const e = ne.current, t = Object.assign({}, ...e.map((o) => o.theme || {}), C.current.theme || {}), n = e.map((o) => o.cellStyle).filter(Boolean);
127
- C.current.cellStyle && n.push(C.current.cellStyle);
128
- const l = n.length ? (o, c, s) => {
129
- let d;
130
- for (const h of n) {
131
- const x = h(o, c, s);
132
- x && (d = V(V({}, d || {}), x));
117
+ const st = b(null), ct = b(null), ie = b(null), it = b(null), ye = b(null), Pe = b(null), Ee = b(null), Te = b(null), r = b(null), De = b(null), Ne = b(null), Ae = b(null), ve = b(null), Me = b(/* @__PURE__ */ new Map()), f = b(s);
118
+ f.current = s;
119
+ const pe = (Mt = s.plugins) != null ? Mt : [], Q = b(pe);
120
+ Q.current = pe;
121
+ const ee = b(d);
122
+ ee.current = d;
123
+ const Be = b(h);
124
+ Be.current = h;
125
+ function In() {
126
+ const e = Q.current, t = Object.assign({}, ...e.map((o) => o.theme || {}), f.current.theme || {}), n = e.map((o) => o.cellStyle).filter(Boolean);
127
+ f.current.cellStyle && n.push(f.current.cellStyle);
128
+ const l = n.length ? (o, u, a) => {
129
+ let c;
130
+ for (const C of n) {
131
+ const S = C(o, u, a);
132
+ S && (c = _(_({}, c || {}), S));
133
133
  }
134
- return d;
134
+ return c;
135
135
  } : void 0;
136
- return { theme: t, cellStyle: l, cellImageFit: C.current.cellImageFit, readOnlyCellStyle: C.current.readOnlyCellStyle };
136
+ return { theme: t, cellStyle: l, cellImageFit: f.current.cellImageFit, readOnlyCellStyle: f.current.readOnlyCellStyle };
137
137
  }
138
- function le(e) {
138
+ function te(e) {
139
139
  var n, l;
140
140
  let t = e;
141
- for (const o of ne.current) o.transformModel && (t = (n = o.transformModel(t)) != null ? n : t);
142
- return C.current.transformModel && (t = (l = C.current.transformModel(t)) != null ? l : t), t;
141
+ for (const o of Q.current) o.transformModel && (t = (n = o.transformModel(t)) != null ? n : t);
142
+ return f.current.transformModel && (t = (l = f.current.transformModel(t)) != null ? l : t), t;
143
143
  }
144
- const xe = v(null), _e = v(null);
145
- function Ve() {
144
+ const he = b(null), Oe = b(null);
145
+ function ze() {
146
146
  var t;
147
- const e = C.current;
147
+ const e = f.current;
148
148
  return {
149
- editable: (t = xe.current) != null ? t : e.editable,
149
+ editable: (t = he.current) != null ? t : e.editable,
150
150
  pivotTable: e.pivotTable,
151
151
  conditionalFormat: e.conditionalFormat,
152
152
  cellReadOnly: e.cellReadOnly,
@@ -159,208 +159,210 @@ const Dr = Yn(function(a, S) {
159
159
  readOnlyPrompt: e.readOnlyPrompt
160
160
  };
161
161
  }
162
- function Ct() {
163
- if (C.current.editor || ne.current.some((t) => t.editor))
162
+ function ut() {
163
+ if (f.current.editor || Q.current.some((t) => t.editor))
164
164
  return (t, n) => {
165
- var o, c, s;
166
- const l = (c = (o = C.current).editor) == null ? void 0 : c.call(o, t, n);
165
+ var o, u, a;
166
+ const l = (u = (o = f.current).editor) == null ? void 0 : u.call(o, t, n);
167
167
  if (l) return l;
168
- for (const d of ne.current) {
169
- const h = (s = d.editor) == null ? void 0 : s.call(d, t, n);
170
- if (h) return h;
168
+ for (const c of Q.current) {
169
+ const C = (a = c.editor) == null ? void 0 : a.call(c, t, n);
170
+ if (C) return C;
171
171
  }
172
172
  };
173
173
  }
174
- const oe = (e, t) => {
174
+ const ne = (e, t) => {
175
175
  var n;
176
- return (n = We.current.get(e)) == null ? void 0 : n.forEach((l) => l(t));
176
+ return (n = Me.current.get(e)) == null ? void 0 : n.forEach((l) => l(t));
177
177
  }, Z = (e) => {
178
178
  var n, l, o;
179
179
  const t = String((n = e == null ? void 0 : e.message) != null ? n : e);
180
- console.error("[ooxml-excel-editor] 导出失败:", e), (o = (l = C.current).onError) == null || o.call(l, t), typeof window != "undefined" && window.alert && window.alert(t);
181
- }, [bt, Je] = w(null), [vt, ht] = w(!1), Ke = v(null), St = () => {
180
+ console.error("[ooxml-excel-editor] 导出失败:", e), (o = (l = f.current).onError) == null || o.call(l, t), typeof window != "undefined" && window.alert && window.alert(t);
181
+ }, [dt, Le] = y(null), [gt, mt] = y(!1), We = b(null), ft = () => {
182
182
  var e;
183
- return (e = Ke.current) == null ? void 0 : e.abort();
183
+ return (e = We.current) == null ? void 0 : e.abort();
184
184
  };
185
- function k(e, t) {
186
- if (C.current.exportProgress === !1) return t(e);
185
+ function F(e, t) {
186
+ if (f.current.exportProgress === !1) return t(e);
187
187
  const n = new AbortController();
188
- Ke.current = n, e != null && e.signal && (e.signal.aborted ? n.abort() : e.signal.addEventListener("abort", () => n.abort(), { once: !0 })), ht(!0), Je(null);
189
- const l = (c) => {
190
- var s;
191
- Je(c), (s = e == null ? void 0 : e.onProgress) == null || s.call(e, c);
192
- }, o = ae(V({}, e != null ? e : {}), { onProgress: l, signal: n.signal });
188
+ We.current = n, e != null && e.signal && (e.signal.aborted ? n.abort() : e.signal.addEventListener("abort", () => n.abort(), { once: !0 })), mt(!0), Le(null);
189
+ const l = (u) => {
190
+ var a;
191
+ Le(u), (a = e == null ? void 0 : e.onProgress) == null || a.call(e, u);
192
+ }, o = re(_({}, e != null ? e : {}), { onProgress: l, signal: n.signal });
193
193
  return t(o).finally(() => {
194
- ht(!1), Je(null), Ke.current = null;
194
+ mt(!1), Le(null), We.current = null;
195
195
  });
196
196
  }
197
- function Ue() {
198
- const e = Se.current, t = r.current;
197
+ function He() {
198
+ const e = ve.current, t = r.current;
199
199
  if (!e || !t) return;
200
200
  const n = {
201
201
  rectOf: (l, o) => t.rectOf(l, o),
202
202
  rectOfRange: (l) => t.rectOfRange(l),
203
203
  tick: 0,
204
- workbook: re.current
204
+ workbook: ee.current
205
205
  };
206
- e.render(ne.current, n);
206
+ e.render(Q.current, n);
207
207
  }
208
- fn(() => {
209
- const e = gt.current, t = mt.current, n = te.current, l = ft.current;
210
- if (!e || !t || !n || !l || !Le.current || !Ae.current || !De.current || !Me.current || !Be.current) return;
211
- const o = new pr(
208
+ an(() => {
209
+ const e = ct.current, t = st.current, n = ie.current, l = it.current;
210
+ if (!e || !t || !n || !l || !Ae.current || !ye.current || !Pe.current || !Ee.current || !Te.current) return;
211
+ const o = new fr(
212
212
  {
213
213
  canvas: e,
214
214
  renderArea: t,
215
215
  scroller: n,
216
216
  spacer: l,
217
- overlays: { main: Ae.current, frow: De.current, fcol: Me.current, corner: Be.current },
218
- editorSlot: Le.current
217
+ overlays: { main: ye.current, frow: Pe.current, fcol: Ee.current, corner: Te.current },
218
+ editorSlot: Ae.current
219
219
  },
220
220
  {
221
- onRenderer: () => _(),
222
- onRenderTick: () => Ue(),
221
+ onRenderer: () => H(),
222
+ onRenderTick: () => He(),
223
223
  // 插件 overlay 随每帧重定位(纯 DOM,不触发 React 重渲)
224
- onSelectionChange: () => _(),
225
- onCellClick: (s, d, h) => {
226
- var T, N;
227
- const x = { row: s, col: d, text: h };
228
- (N = (T = C.current).onCellClick) == null || N.call(T, x), oe("cell-click", x);
224
+ onSelectionChange: () => H(),
225
+ onCellClick: (a, c, C) => {
226
+ var T, D;
227
+ const S = { row: a, col: c, text: C };
228
+ (D = (T = f.current).onCellClick) == null || D.call(T, S), ne("cell-click", S);
229
229
  },
230
- onCellDblClick: (s, d, h) => {
231
- var T, N;
232
- const x = { row: s, col: d, text: h };
233
- (N = (T = C.current).onCellDblClick) == null || N.call(T, x), oe("cell-dblclick", x);
230
+ onCellDblClick: (a, c, C) => {
231
+ var T, D;
232
+ const S = { row: a, col: c, text: C };
233
+ (D = (T = f.current).onCellDblClick) == null || D.call(T, S), ne("cell-dblclick", S);
234
234
  },
235
- onHyperlink: (s, d) => {
236
- var h, x;
237
- (x = (h = C.current).onHyperlinkClick) == null || x.call(h, { url: s, cell: d }), oe("hyperlink-click", { url: s, cell: d }), C.current.openLinks !== !1 && window.open(s, "_blank", "noopener");
235
+ onHyperlink: (a, c) => {
236
+ var C, S;
237
+ (S = (C = f.current).onHyperlinkClick) == null || S.call(C, { url: a, cell: c }), ne("hyperlink-click", { url: a, cell: c }), f.current.openLinks !== !1 && window.open(a, "_blank", "noopener");
238
238
  },
239
- onTooltip: (s) => {
240
- Oe.current = s, _();
239
+ onTooltip: (a) => {
240
+ De.current = a, H();
241
241
  },
242
- onFindChange: () => _(),
243
- onFilterChange: () => _(),
244
- onActiveSheetChange: (s) => D(s),
245
- onEditEvent: (s, d) => {
246
- var h, x, T, N, Ce, Qt, en, tn, nn, rn, ln, on, an, sn, cn, un;
247
- s === "cell-change" ? (_(), (x = (h = C.current).onCellChange) == null || x.call(h, d)) : s === "edit-start" ? (N = (T = C.current).onEditStart) == null || N.call(T, d) : s === "edit-commit" ? (Qt = (Ce = C.current).onEditCommit) == null || Qt.call(Ce, d) : s === "dim-change" ? (tn = (en = C.current).onDimChange) == null || tn.call(en, d) : s === "dirty-change" ? (_(), (rn = (nn = C.current).onDirtyChange) == null || rn.call(nn, d)) : s === "image-change" ? (on = (ln = C.current).onImageChange) == null || on.call(ln, d) : s === "struct-change" ? (sn = (an = C.current).onStructChange) == null || sn.call(an, d) : s === "permission-denied" && ((un = (cn = C.current).onPermissionDenied) == null || un.call(cn, d)), oe(s, d);
242
+ onFindChange: () => H(),
243
+ onFilterChange: () => H(),
244
+ onActiveSheetChange: (a) => N(a),
245
+ onZoomChange: (a) => G(a),
246
+ // 触屏 pinch/双击 → 同步工具栏 %(effect 去重不再回 setZoom)
247
+ onEditEvent: (a, c) => {
248
+ var C, S, T, D, me, Kt, Gt, Xt, $t, Zt, Yt, qt, Qt, en, tn, nn;
249
+ a === "cell-change" ? (H(), (S = (C = f.current).onCellChange) == null || S.call(C, c)) : a === "edit-start" ? (D = (T = f.current).onEditStart) == null || D.call(T, c) : a === "edit-commit" ? (Kt = (me = f.current).onEditCommit) == null || Kt.call(me, c) : a === "dim-change" ? (Xt = (Gt = f.current).onDimChange) == null || Xt.call(Gt, c) : a === "dirty-change" ? (H(), (Zt = ($t = f.current).onDirtyChange) == null || Zt.call($t, c)) : a === "image-change" ? (qt = (Yt = f.current).onImageChange) == null || qt.call(Yt, c) : a === "struct-change" ? (en = (Qt = f.current).onStructChange) == null || en.call(Qt, c) : a === "permission-denied" && ((nn = (tn = f.current).onPermissionDenied) == null || nn.call(tn, c)), ne(a, c);
248
250
  },
249
- onContextMenuBefore: (s) => {
250
- var d, h, x;
251
- for (const T of (d = C.current.plugins) != null ? d : [])
251
+ onContextMenuBefore: (a) => {
252
+ var c, C, S;
253
+ for (const T of (c = f.current.plugins) != null ? c : [])
252
254
  if (T.contextMenu) {
253
- const N = T.contextMenu(s.ctx, s.items);
254
- Array.isArray(N) && s.items.splice(0, s.items.length, ...N);
255
+ const D = T.contextMenu(a.ctx, a.items);
256
+ Array.isArray(D) && a.items.splice(0, a.items.length, ...D);
255
257
  }
256
- (x = (h = C.current).onBeforeContextMenu) == null || x.call(h, s), C.current.contextMenu === !1 && s.preventDefault();
258
+ (S = (C = f.current).onBeforeContextMenu) == null || S.call(C, a), f.current.contextMenu === !1 && a.preventDefault();
257
259
  },
258
- onContextMenuShow: (s) => {
259
- var d, h;
260
- return (h = (d = C.current).onContextMenuShow) == null ? void 0 : h.call(d, s);
260
+ onContextMenuShow: (a) => {
261
+ var c, C;
262
+ return (C = (c = f.current).onContextMenuShow) == null ? void 0 : C.call(c, a);
261
263
  }
262
264
  }
263
265
  );
264
- o.fileName = C.current.fileName, o.setEditConfig(Ve()), o.setEditorResolver(Ct()), o.setContextMenuTransform(typeof C.current.contextMenu == "function" ? C.current.contextMenu : null), o.setLightboxEnabled(C.current.imageLightbox !== !1), r.current = o, ze.current && (Se.current = new xr(ze.current));
265
- const c = new ResizeObserver(() => {
266
+ o.fileName = f.current.fileName, o.setEditConfig(ze()), o.setEditorResolver(ut()), o.setContextMenuTransform(typeof f.current.contextMenu == "function" ? f.current.contextMenu : null), o.setLightboxEnabled(f.current.imageLightbox !== !1), r.current = o, Ne.current && (ve.current = new Cr(Ne.current));
267
+ const u = new ResizeObserver(() => {
266
268
  o.measure(), o.render();
267
269
  });
268
- return c.observe(t), () => {
269
- var s;
270
- c.disconnect(), o.dispose(), (s = Se.current) == null || s.dispose(), Se.current = null, r.current = null;
270
+ return u.observe(t), () => {
271
+ var a;
272
+ u.disconnect(), o.dispose(), (a = ve.current) == null || a.dispose(), ve.current = null, r.current = null;
271
273
  };
272
- }, []), y(() => {
273
- const e = lt, t = G(a.workbook);
274
+ }, []), R(() => {
275
+ const e = Qe, t = K(s.workbook);
274
276
  async function n(o) {
275
- const c = await Fn(o), s = kn(c);
276
- if (s === "xls") throw new Error("模板文件是旧版 .xls 或加密,仅支持 .xlsx/.xlsm");
277
- if (s === "not-zip") throw new Error("模板文件不是有效的 .xlsx(非 ZIP 包)");
278
- if (s === "empty") throw new Error("模板文件为空");
279
- const d = await In(c);
280
- return Rn(d), d;
277
+ const u = await bn(o), a = vn(u);
278
+ if (a === "xls") throw new Error("模板文件是旧版 .xls 或加密,仅支持 .xlsx/.xlsm");
279
+ if (a === "not-zip") throw new Error("模板文件不是有效的 .xlsx(非 ZIP 包)");
280
+ if (a === "empty") throw new Error("模板文件为空");
281
+ const c = await Cn(u);
282
+ return pn(c), c;
281
283
  }
282
284
  async function l() {
283
- if (a.src) {
284
- e && console.warn("[ooxml-excel-editor] templateFile 只在 workbook (JSON / 模型) 数据源下生效;xlsx 数据源已自带格式,模板已忽略."), await O(a.src, le);
285
+ if (s.src) {
286
+ e && console.warn("[ooxml-excel-editor] templateFile 只在 workbook (JSON / 模型) 数据源下生效;xlsx 数据源已自带格式,模板已忽略."), await M(s.src, te);
285
287
  return;
286
288
  }
287
289
  if (t && e) {
288
290
  try {
289
- const o = await n(e), c = ir(t, o);
290
- ce(c, le);
291
+ const o = await n(e), u = rr(t, o);
292
+ oe(u, te);
291
293
  } catch (o) {
292
- console.error("[ooxml-excel-editor] 模板加载失败,降级为纯 JSON 渲染:", o), ce(t, le);
294
+ console.error("[ooxml-excel-editor] 模板加载失败,降级为纯 JSON 渲染:", o), oe(t, te);
293
295
  }
294
296
  return;
295
297
  }
296
298
  if (t) {
297
- ce(t, le);
299
+ oe(t, te);
298
300
  return;
299
301
  }
300
- e && await O(e, le);
302
+ e && await M(e, te);
301
303
  }
302
304
  l();
303
- }, [a.src, a.workbook, a.templateFile, X]), y(() => {
304
- r.current && (r.current.fileName = a.fileName);
305
- }, [a.fileName]), y(() => {
305
+ }, [s.src, s.workbook, s.templateFile, X]), R(() => {
306
+ r.current && (r.current.fileName = s.fileName);
307
+ }, [s.fileName]), R(() => {
306
308
  var e;
307
- xe.current = null, (e = r.current) == null || e.setEditConfig(Ve());
308
- }, [a.editable, a.cellReadOnly, a.readOnlyRanges, a.editableTargets, a.strictDimensions, a.recalc, a.formulaEngine, a.pasteBehavior, a.readOnlyPrompt]), y(() => {
309
+ he.current = null, (e = r.current) == null || e.setEditConfig(ze());
310
+ }, [s.editable, s.cellReadOnly, s.readOnlyRanges, s.editableTargets, s.strictDimensions, s.recalc, s.formulaEngine, s.pasteBehavior, s.readOnlyPrompt]), R(() => {
309
311
  var e;
310
312
  (e = r.current) == null || e.setContextMenuTransform(
311
- typeof a.contextMenu == "function" ? a.contextMenu : null
313
+ typeof s.contextMenu == "function" ? s.contextMenu : null
312
314
  );
313
- }, [a.contextMenu]), y(() => {
315
+ }, [s.contextMenu]), R(() => {
314
316
  var e;
315
- (e = r.current) == null || e.setEditorResolver(Ct());
316
- }, [a.editor, a.plugins]), y(() => {
317
+ (e = r.current) == null || e.setEditorResolver(ut());
318
+ }, [s.editor, s.plugins]), R(() => {
317
319
  var e;
318
- _e.current = null, a.cellImageFit && ((e = r.current) == null || e.setCellImageFit(a.cellImageFit));
319
- }, [a.cellImageFit]), y(() => {
320
+ Oe.current = null, s.cellImageFit && ((e = r.current) == null || e.setCellImageFit(s.cellImageFit));
321
+ }, [s.cellImageFit]), R(() => {
320
322
  var e;
321
- (e = r.current) == null || e.setLightboxEnabled(a.imageLightbox !== !1);
322
- }, [a.imageLightbox]), y(() => {
323
+ (e = r.current) == null || e.setLightboxEnabled(s.imageLightbox !== !1);
324
+ }, [s.imageLightbox]), R(() => {
323
325
  var e, t;
324
- u && (D(u.activeSheet), (t = (e = C.current).onRendered) == null || t.call(e, u));
325
- }, [u]), y(() => {
326
+ d && (N(d.activeSheet), (t = (e = f.current).onRendered) == null || t.call(e, d));
327
+ }, [d]), R(() => {
326
328
  var e, t;
327
- M && ((t = (e = C.current).onError) == null || t.call(e, M));
328
- }, [M]), fn(() => {
329
- var l, o, c, s;
329
+ z && ((t = (e = f.current).onError) == null || t.call(e, z));
330
+ }, [z]), an(() => {
331
+ var l, o, u, a;
330
332
  const e = r.current;
331
- if (!e || !u) return;
332
- const t = (o = (l = u.sheets[p]) != null ? l : u.sheets[0]) != null ? o : null;
333
+ if (!e || !d) return;
334
+ const t = (o = (l = d.sheets[h]) != null ? l : d.sheets[0]) != null ? o : null;
333
335
  if (!t) return;
334
- e.rebuild(t, u, I, Tn()), e.setSourceBuffer(W), Ue();
335
- const n = { index: p, name: t.name };
336
- (s = (c = C.current).onSheetChange) == null || s.call(c, n), oe("sheet-change", n);
337
- }, [u, p, a.theme, a.cellStyle, a.plugins, W]), y(() => {
338
- var e;
339
- (e = r.current) == null || e.setZoom(I);
340
- }, [I]);
341
- const pt = v("");
342
- y(() => {
343
- var o, c;
336
+ e.rebuild(t, d, x, In()), e.setSourceBuffer(L), He();
337
+ const n = { index: h, name: t.name };
338
+ (a = (u = f.current).onSheetChange) == null || a.call(u, n), ne("sheet-change", n);
339
+ }, [d, h, s.theme, s.cellStyle, s.plugins, L]), R(() => {
340
+ const e = r.current;
341
+ e && Math.abs(e.getZoom() - x) < 1e-6 || e == null || e.setZoom(x);
342
+ }, [x]);
343
+ const Ct = b("");
344
+ R(() => {
345
+ var o, u;
344
346
  const e = r.current;
345
347
  if (!e) return;
346
348
  const t = e.getSelection(), n = e.getActiveCell(), l = t && n ? `${t.top},${t.left},${t.bottom},${t.right}` : "";
347
- if (l && l !== pt.current && n) {
348
- pt.current = l;
349
- const s = { range: t, active: n };
350
- (c = (o = C.current).onSelectionChange) == null || c.call(o, s), oe("selection-change", s);
349
+ if (l && l !== Ct.current && n) {
350
+ Ct.current = l;
351
+ const a = { range: t, active: n };
352
+ (u = (o = f.current).onSelectionChange) == null || u.call(o, a), ne("selection-change", a);
351
353
  }
352
354
  });
353
- const me = (e) => {
355
+ const ue = (e) => {
354
356
  var t;
355
- return (t = u == null ? void 0 : u.sheets[e != null ? e : p]) != null ? t : null;
356
- }, xt = (Ht = u == null ? void 0 : u.date1904) != null ? Ht : !1, je = (e) => ae(V({}, e), { date1904: xt });
357
- tr(
358
- S,
357
+ return (t = d == null ? void 0 : d.sheets[e != null ? e : h]) != null ? t : null;
358
+ }, bt = (Bt = d == null ? void 0 : d.date1904) != null ? Bt : !1, _e = (e) => re(_({}, e), { date1904: bt });
359
+ $n(
360
+ k,
359
361
  () => ({
360
- load: (e) => O(e, a.transformModel),
361
- getWorkbook: () => u,
362
- getActiveSheet: () => p,
363
- setActiveSheet: (e) => (u == null ? void 0 : u.sheets[e]) && D(e),
362
+ load: (e) => M(e, s.transformModel),
363
+ getWorkbook: () => d,
364
+ getActiveSheet: () => h,
365
+ setActiveSheet: (e) => (d == null ? void 0 : d.sheets[e]) && N(e),
364
366
  getSelection: () => {
365
367
  var e, t;
366
368
  return (t = (e = r.current) == null ? void 0 : e.getSelection()) != null ? t : null;
@@ -409,6 +411,38 @@ const Dr = Yn(function(a, S) {
409
411
  var t, n;
410
412
  return (n = (t = r.current) == null ? void 0 : t.sortActiveColumn(e)) != null ? n : !1;
411
413
  },
414
+ toggleAutoFilter: () => {
415
+ var e;
416
+ return (e = r.current) == null ? void 0 : e.toggleAutoFilter();
417
+ },
418
+ hasFilters: () => {
419
+ var e, t;
420
+ return (t = (e = r.current) == null ? void 0 : e.hasFilters()) != null ? t : !1;
421
+ },
422
+ clearAllFilters: () => {
423
+ var e;
424
+ return (e = r.current) == null ? void 0 : e.clearAllFilters();
425
+ },
426
+ openFilterConditionDialog: (e) => {
427
+ var t;
428
+ return (t = r.current) == null ? void 0 : t.openFilterConditionDialog(e);
429
+ },
430
+ applyFilterCondition: (e, t) => {
431
+ var n, l;
432
+ return (l = (n = r.current) == null ? void 0 : n.applyFilterCondition(e, t)) != null ? l : !1;
433
+ },
434
+ openFindReplaceDialog: (e) => {
435
+ var t;
436
+ return (t = r.current) == null ? void 0 : t.openFindReplaceDialog(e);
437
+ },
438
+ closeFindReplaceDialog: () => {
439
+ var e;
440
+ return (e = r.current) == null ? void 0 : e.closeFindReplaceDialog();
441
+ },
442
+ isFindDialogOpen: () => {
443
+ var e;
444
+ return !!((e = r.current) != null && e.isFindDialogOpen());
445
+ },
412
446
  createPivotTable: (e) => {
413
447
  var t, n;
414
448
  return (n = (t = r.current) == null ? void 0 : t.createPivotTable(e)) != null ? n : !1;
@@ -535,7 +569,7 @@ const Dr = Yn(function(a, S) {
535
569
  },
536
570
  getPasteBehavior: () => {
537
571
  var e, t;
538
- return (t = (e = r.current) == null ? void 0 : e.getPasteBehavior()) != null ? t : et;
572
+ return (t = (e = r.current) == null ? void 0 : e.getPasteBehavior()) != null ? t : $e;
539
573
  },
540
574
  setPasteBehavior: (e) => {
541
575
  var t;
@@ -649,13 +683,13 @@ const Dr = Yn(function(a, S) {
649
683
  var t, n;
650
684
  return (n = (t = r.current) == null ? void 0 : t.convertAllImagesToCells(e)) != null ? n : 0;
651
685
  },
652
- convertImagesInRangeToCell: (e) => k({}, async (t) => {
686
+ convertImagesInRangeToCell: (e) => F({}, async (t) => {
653
687
  var n, l, o;
654
688
  return (n = t.onProgress) == null || n.call(t, { stage: "convert", label: "选区浮动图批量嵌入…" }), (o = (l = r.current) == null ? void 0 : l.convertImagesInRangeToCell(e)) != null ? o : 0;
655
689
  }),
656
- convertCellImagesInRangeToFloat: (e, t) => k({}, async (n) => {
657
- var l, o, c;
658
- return (l = n.onProgress) == null || l.call(n, { stage: "convert", label: "选区内嵌图批量浮动化…" }), (c = (o = r.current) == null ? void 0 : o.convertCellImagesInRangeToFloat(e, t)) != null ? c : 0;
690
+ convertCellImagesInRangeToFloat: (e, t) => F({}, async (n) => {
691
+ var l, o, u;
692
+ return (l = n.onProgress) == null || l.call(n, { stage: "convert", label: "选区内嵌图批量浮动化…" }), (u = (o = r.current) == null ? void 0 : o.convertCellImagesInRangeToFloat(e, t)) != null ? u : 0;
659
693
  }),
660
694
  openContextMenu: (e, t, n) => {
661
695
  var l;
@@ -765,14 +799,14 @@ const Dr = Yn(function(a, S) {
765
799
  var e, t;
766
800
  return (t = (e = r.current) == null ? void 0 : e.resetToOriginal()) != null ? t : !1;
767
801
  },
768
- exportImage: (e) => k(e, (t) => r.current.exportImage(t)),
769
- downloadImage: (e) => k(e, (t) => r.current.downloadImage(t)),
770
- exportPdf: (e) => k(e, (t) => r.current.exportPdf(t)),
771
- downloadPdf: (e) => k(e, (t) => r.current.downloadPdf(t)),
772
- print: (e) => k(e, (t) => r.current.print(t)),
802
+ exportImage: (e) => F(e, (t) => r.current.exportImage(t)),
803
+ downloadImage: (e) => F(e, (t) => r.current.downloadImage(t)),
804
+ exportPdf: (e) => F(e, (t) => r.current.exportPdf(t)),
805
+ downloadPdf: (e) => F(e, (t) => r.current.downloadPdf(t)),
806
+ print: (e) => F(e, (t) => r.current.print(t)),
773
807
  openPrintPreview: (e) => r.current ? r.current.openPrintPreview(e) : Promise.resolve(!1),
774
- exportXlsx: (e) => k(e, (t) => r.current.exportXlsx(t)),
775
- downloadXlsx: (e) => k(e, (t) => r.current.downloadXlsx(t)),
808
+ exportXlsx: (e) => F(e, (t) => r.current.exportXlsx(t)),
809
+ downloadXlsx: (e) => F(e, (t) => r.current.downloadXlsx(t)),
776
810
  exportJson: (e) => {
777
811
  var t, n;
778
812
  return (n = (t = r.current) == null ? void 0 : t.exportJson(e)) != null ? n : "{}";
@@ -790,42 +824,42 @@ const Dr = Yn(function(a, S) {
790
824
  return (t = r.current) == null ? void 0 : t.downloadCsv(e);
791
825
  },
792
826
  getCellValue: (e, t, n) => {
793
- const l = me(n);
794
- return l ? xn(l, e, t) : null;
827
+ const l = ue(n);
828
+ return l ? fn(l, e, t) : null;
795
829
  },
796
830
  getCellText: (e, t, n) => {
797
- const l = me(n);
798
- return l ? pn(l, e, t, xt) : "";
831
+ const l = ue(n);
832
+ return l ? mn(l, e, t, bt) : "";
799
833
  },
800
834
  getSheetData: (e, t) => {
801
- const n = me(t);
802
- return n ? Sn(n, je(e)) : [];
835
+ const n = ue(t);
836
+ return n ? gn(n, _e(e)) : [];
803
837
  },
804
838
  getSheetJSON: (e, t) => {
805
- const n = me(t);
806
- return n ? hn(n, je(e)) : [];
839
+ const n = ue(t);
840
+ return n ? dn(n, _e(e)) : [];
807
841
  },
808
842
  getRangeData: (e, t, n) => {
809
- const l = me(n);
810
- return l ? vn(l, e, je(t)) : [];
843
+ const l = ue(n);
844
+ return l ? un(l, e, _e(t)) : [];
811
845
  }
812
846
  }),
813
847
  // eslint-disable-next-line react-hooks/exhaustive-deps
814
- [u, p]
848
+ [d, h]
815
849
  );
816
- const ge = (e) => {
850
+ const de = (e) => {
817
851
  var t, n;
818
- return (n = (t = re.current) == null ? void 0 : t.sheets[e != null ? e : He.current]) != null ? n : null;
819
- }, Ie = () => {
852
+ return (n = (t = ee.current) == null ? void 0 : t.sheets[e != null ? e : Be.current]) != null ? n : null;
853
+ }, Se = () => {
820
854
  var e, t;
821
- return (t = (e = re.current) == null ? void 0 : e.date1904) != null ? t : !1;
822
- }, Fe = v({
823
- load: (e) => O(e, le),
824
- getWorkbook: () => re.current,
825
- getActiveSheet: () => He.current,
855
+ return (t = (e = ee.current) == null ? void 0 : e.date1904) != null ? t : !1;
856
+ }, xe = b({
857
+ load: (e) => M(e, te),
858
+ getWorkbook: () => ee.current,
859
+ getActiveSheet: () => Be.current,
826
860
  setActiveSheet: (e) => {
827
861
  var t;
828
- (t = re.current) != null && t.sheets[e] && D(e);
862
+ (t = ee.current) != null && t.sheets[e] && N(e);
829
863
  },
830
864
  getSelection: () => {
831
865
  var e, t;
@@ -1060,6 +1094,38 @@ const Dr = Yn(function(a, S) {
1060
1094
  var e, t;
1061
1095
  return (t = (e = r.current) == null ? void 0 : e.reapplyFilters()) != null ? t : !1;
1062
1096
  },
1097
+ toggleAutoFilter: () => {
1098
+ var e;
1099
+ return (e = r.current) == null ? void 0 : e.toggleAutoFilter();
1100
+ },
1101
+ hasFilters: () => {
1102
+ var e, t;
1103
+ return (t = (e = r.current) == null ? void 0 : e.hasFilters()) != null ? t : !1;
1104
+ },
1105
+ clearAllFilters: () => {
1106
+ var e;
1107
+ return (e = r.current) == null ? void 0 : e.clearAllFilters();
1108
+ },
1109
+ openFilterConditionDialog: (e) => {
1110
+ var t;
1111
+ return (t = r.current) == null ? void 0 : t.openFilterConditionDialog(e);
1112
+ },
1113
+ applyFilterCondition: (e, t) => {
1114
+ var n, l;
1115
+ return (l = (n = r.current) == null ? void 0 : n.applyFilterCondition(e, t)) != null ? l : !1;
1116
+ },
1117
+ openFindReplaceDialog: (e) => {
1118
+ var t;
1119
+ return (t = r.current) == null ? void 0 : t.openFindReplaceDialog(e);
1120
+ },
1121
+ closeFindReplaceDialog: () => {
1122
+ var e;
1123
+ return (e = r.current) == null ? void 0 : e.closeFindReplaceDialog();
1124
+ },
1125
+ isFindDialogOpen: () => {
1126
+ var e;
1127
+ return !!((e = r.current) != null && e.isFindDialogOpen());
1128
+ },
1063
1129
  openDataValidationDialog: (e) => {
1064
1130
  var t, n;
1065
1131
  return (n = (t = r.current) == null ? void 0 : t.openDataValidationDialog(e)) != null ? n : !1;
@@ -1298,7 +1364,7 @@ const Dr = Yn(function(a, S) {
1298
1364
  },
1299
1365
  getPasteBehavior: () => {
1300
1366
  var e, t;
1301
- return (t = (e = r.current) == null ? void 0 : e.getPasteBehavior()) != null ? t : et;
1367
+ return (t = (e = r.current) == null ? void 0 : e.getPasteBehavior()) != null ? t : $e;
1302
1368
  },
1303
1369
  setPasteBehavior: (e) => {
1304
1370
  var t;
@@ -1412,13 +1478,13 @@ const Dr = Yn(function(a, S) {
1412
1478
  var t, n;
1413
1479
  return (n = (t = r.current) == null ? void 0 : t.convertAllImagesToCells(e)) != null ? n : 0;
1414
1480
  },
1415
- convertImagesInRangeToCell: (e) => k({}, async (t) => {
1481
+ convertImagesInRangeToCell: (e) => F({}, async (t) => {
1416
1482
  var n, l, o;
1417
1483
  return (n = t.onProgress) == null || n.call(t, { stage: "convert", label: "选区浮动图批量嵌入…" }), (o = (l = r.current) == null ? void 0 : l.convertImagesInRangeToCell(e)) != null ? o : 0;
1418
1484
  }),
1419
- convertCellImagesInRangeToFloat: (e, t) => k({}, async (n) => {
1420
- var l, o, c;
1421
- return (l = n.onProgress) == null || l.call(n, { stage: "convert", label: "选区内嵌图批量浮动化…" }), (c = (o = r.current) == null ? void 0 : o.convertCellImagesInRangeToFloat(e, t)) != null ? c : 0;
1485
+ convertCellImagesInRangeToFloat: (e, t) => F({}, async (n) => {
1486
+ var l, o, u;
1487
+ return (l = n.onProgress) == null || l.call(n, { stage: "convert", label: "选区内嵌图批量浮动化…" }), (u = (o = r.current) == null ? void 0 : o.convertCellImagesInRangeToFloat(e, t)) != null ? u : 0;
1422
1488
  }),
1423
1489
  openContextMenu: (e, t, n) => {
1424
1490
  var l;
@@ -1528,14 +1594,14 @@ const Dr = Yn(function(a, S) {
1528
1594
  var e, t;
1529
1595
  return (t = (e = r.current) == null ? void 0 : e.resetToOriginal()) != null ? t : !1;
1530
1596
  },
1531
- exportImage: (e) => k(e, (t) => r.current.exportImage(t)),
1532
- downloadImage: (e) => k(e, (t) => r.current.downloadImage(t)),
1533
- exportPdf: (e) => k(e, (t) => r.current.exportPdf(t)),
1534
- downloadPdf: (e) => k(e, (t) => r.current.downloadPdf(t)),
1535
- print: (e) => k(e, (t) => r.current.print(t)),
1597
+ exportImage: (e) => F(e, (t) => r.current.exportImage(t)),
1598
+ downloadImage: (e) => F(e, (t) => r.current.downloadImage(t)),
1599
+ exportPdf: (e) => F(e, (t) => r.current.exportPdf(t)),
1600
+ downloadPdf: (e) => F(e, (t) => r.current.downloadPdf(t)),
1601
+ print: (e) => F(e, (t) => r.current.print(t)),
1536
1602
  openPrintPreview: (e) => r.current ? r.current.openPrintPreview(e) : Promise.resolve(!1),
1537
- exportXlsx: (e) => k(e, (t) => r.current.exportXlsx(t)),
1538
- downloadXlsx: (e) => k(e, (t) => r.current.downloadXlsx(t)),
1603
+ exportXlsx: (e) => F(e, (t) => r.current.exportXlsx(t)),
1604
+ downloadXlsx: (e) => F(e, (t) => r.current.downloadXlsx(t)),
1539
1605
  exportJson: (e) => {
1540
1606
  var t, n;
1541
1607
  return (n = (t = r.current) == null ? void 0 : t.exportJson(e)) != null ? n : "{}";
@@ -1553,79 +1619,80 @@ const Dr = Yn(function(a, S) {
1553
1619
  return (t = r.current) == null ? void 0 : t.downloadCsv(e);
1554
1620
  },
1555
1621
  getCellValue: (e, t, n) => {
1556
- const l = ge(n);
1557
- return l ? xn(l, e, t) : null;
1622
+ const l = de(n);
1623
+ return l ? fn(l, e, t) : null;
1558
1624
  },
1559
1625
  getCellText: (e, t, n) => {
1560
- const l = ge(n);
1561
- return l ? pn(l, e, t, Ie()) : "";
1626
+ const l = de(n);
1627
+ return l ? mn(l, e, t, Se()) : "";
1562
1628
  },
1563
1629
  getSheetData: (e, t) => {
1564
- const n = ge(t);
1565
- return n ? Sn(n, ae(V({}, e), { date1904: Ie() })) : [];
1630
+ const n = de(t);
1631
+ return n ? gn(n, re(_({}, e), { date1904: Se() })) : [];
1566
1632
  },
1567
1633
  getSheetJSON: (e, t) => {
1568
- const n = ge(t);
1569
- return n ? hn(n, ae(V({}, e), { date1904: Ie() })) : [];
1634
+ const n = de(t);
1635
+ return n ? dn(n, re(_({}, e), { date1904: Se() })) : [];
1570
1636
  },
1571
1637
  getRangeData: (e, t, n) => {
1572
- const l = ge(n);
1573
- return l ? vn(l, e, ae(V({}, t), { date1904: Ie() })) : [];
1638
+ const l = de(n);
1639
+ return l ? un(l, e, re(_({}, t), { date1904: Se() })) : [];
1574
1640
  }
1575
1641
  }).current;
1576
- y(() => {
1642
+ R(() => {
1577
1643
  var l;
1578
- const e = /* @__PURE__ */ new Map(), t = [], n = (o, c) => {
1579
- let s = e.get(o);
1580
- s || e.set(o, s = /* @__PURE__ */ new Set()), s.add(c);
1644
+ const e = /* @__PURE__ */ new Map(), t = [], n = (o, u) => {
1645
+ let a = e.get(o);
1646
+ a || e.set(o, a = /* @__PURE__ */ new Set()), a.add(u);
1581
1647
  };
1582
1648
  for (const o of pe) {
1583
1649
  if (o.events)
1584
- for (const [s, d] of Object.entries(o.events)) d && n(s, d);
1585
- const c = (l = o.setup) == null ? void 0 : l.call(o, { viewer: Fe, on: n, redraw: () => {
1586
- var s;
1587
- return (s = r.current) == null ? void 0 : s.render();
1650
+ for (const [a, c] of Object.entries(o.events)) c && n(a, c);
1651
+ const u = (l = o.setup) == null ? void 0 : l.call(o, { viewer: xe, on: n, redraw: () => {
1652
+ var a;
1653
+ return (a = r.current) == null ? void 0 : a.render();
1588
1654
  } });
1589
- typeof c == "function" && t.push(c);
1655
+ typeof u == "function" && t.push(u);
1590
1656
  }
1591
- return We.current = e, Ue(), () => {
1592
- t.forEach((o) => o()), We.current = /* @__PURE__ */ new Map();
1657
+ return Me.current = e, He(), () => {
1658
+ t.forEach((o) => o()), Me.current = /* @__PURE__ */ new Map();
1593
1659
  };
1594
- }, [a.plugins]);
1595
- const Nn = (e) => {
1596
- (e.ctrlKey || e.metaKey) && (e.key === "f" || e.key === "F") && (e.preventDefault(), Ne(!0));
1597
- }, ke = () => {
1598
- var e, t;
1599
- Ne(!1), (e = r.current) == null || e.clearFind(), (t = te.current) == null || t.focus();
1600
- }, An = () => {
1660
+ }, [s.plugins]);
1661
+ const Rn = (e) => {
1662
+ var t;
1663
+ (e.ctrlKey || e.metaKey) && (e.key === "f" || e.key === "F") && (e.preventDefault(), (t = r.current) == null || t.openFindReplaceDialog("find"));
1664
+ }, kn = () => {
1665
+ const e = r.current;
1666
+ e != null && e.isFindDialogOpen() ? e.closeFindReplaceDialog() : e == null || e.openFindReplaceDialog("find");
1667
+ }, wn = () => {
1601
1668
  var t;
1602
- const e = te.current;
1603
- e && (Oe.current = null, (t = r.current) == null || t.setScroll(e.scrollLeft, e.scrollTop));
1604
- }, b = r.current, Ge = (_t = b == null ? void 0 : b.renderer) != null ? _t : null, K = (Vt = b == null ? void 0 : b.getActiveCell()) != null ? Vt : null, P = (Jt = b == null ? void 0 : b.getSelection()) != null ? Jt : null, It = K ? we(K.col) + (K.row + 1) : "", Ft = Ge && K ? (Kt = Ge.cellFormula(K.row, K.col)) != null ? Kt : Ge.cellText(K.row, K.col) : "", Dn = !!(b != null && b.canEditActiveCell()), Mn = (Ut = b == null ? void 0 : b.getCellEditString()) != null ? Ut : "", Xe = de.current ? En : Mn, Bn = () => {
1669
+ const e = ie.current;
1670
+ e && (De.current = null, (t = r.current) == null || t.setScroll(e.scrollLeft, e.scrollTop));
1671
+ }, p = r.current, Ve = (Ot = p == null ? void 0 : p.renderer) != null ? Ot : null, U = (zt = p == null ? void 0 : p.getActiveCell()) != null ? zt : null, w = (Lt = p == null ? void 0 : p.getSelection()) != null ? Lt : null, vt = U ? Re(U.col) + (U.row + 1) : "", pt = Ve && U ? (Wt = Ve.cellFormula(U.row, U.col)) != null ? Wt : Ve.cellText(U.row, U.col) : "", yn = !!(p != null && p.canEditActiveCell()), Pn = (Ht = p == null ? void 0 : p.getCellEditString()) != null ? Ht : "", Je = ce.current ? Fn : Pn, En = () => {
1605
1672
  var e;
1606
- de.current = !0, it((e = b == null ? void 0 : b.getCellEditString()) != null ? e : "");
1607
- }, kt = (e) => {
1673
+ ce.current = !0, lt((e = p == null ? void 0 : p.getCellEditString()) != null ? e : "");
1674
+ }, ht = (e) => {
1608
1675
  var t;
1609
- b == null || b.commitActiveCellValue(Xe, e), de.current = !1, e === "down" && ((t = te.current) == null || t.focus()), _();
1610
- }, On = () => {
1676
+ p == null || p.commitActiveCellValue(Je, e), ce.current = !1, e === "down" && ((t = ie.current) == null || t.focus()), H();
1677
+ }, Tn = () => {
1611
1678
  var e;
1612
- de.current = !1, (e = te.current) == null || e.focus(), _();
1613
- }, zn = () => {
1614
- de.current && kt();
1615
- }, Ln = (e) => {
1616
- e.stopPropagation(), e.key === "Enter" ? (e.preventDefault(), kt("down")) : e.key === "Escape" && (e.preventDefault(), On());
1617
- }, Wn = P && !(P.top === P.bottom && P.left === P.right) ? `${we(P.left)}${P.top + 1}:${we(P.right)}${P.bottom + 1}` : "", L = (jt = b == null ? void 0 : b.getSelectionStats()) != null ? jt : null, q = (Gt = b == null ? void 0 : b.getFindState()) != null ? Gt : { query: "", count: 0, index: -1, replace: "" }, R = (e) => br[e], g = (e) => V({ kind: "builtin" }, e), B = u == null ? void 0 : u.sheets[p], Rt = () => {
1679
+ ce.current = !1, (e = ie.current) == null || e.focus(), H();
1680
+ }, Dn = () => {
1681
+ ce.current && ht();
1682
+ }, Nn = (e) => {
1683
+ e.stopPropagation(), e.key === "Enter" ? (e.preventDefault(), ht("down")) : e.key === "Escape" && (e.preventDefault(), Tn());
1684
+ }, An = w && !(w.top === w.bottom && w.left === w.right) ? `${Re(w.left)}${w.top + 1}:${Re(w.right)}${w.bottom + 1}` : "", O = (_t = p == null ? void 0 : p.getSelectionStats()) != null ? _t : null, I = (e) => ur[e], g = (e) => _({ kind: "builtin" }, e), A = d == null ? void 0 : d.sheets[h], St = () => {
1618
1685
  var e;
1619
1686
  return void ((e = r.current) == null ? void 0 : e.downloadPdf().catch(Z));
1620
- }, yt = () => {
1687
+ }, xt = () => {
1621
1688
  var e;
1622
1689
  return void ((e = r.current) == null ? void 0 : e.downloadPdf({ vector: !0 }).catch(Z));
1623
- }, wt = () => {
1690
+ }, Ft = () => {
1624
1691
  var e;
1625
1692
  return void ((e = r.current) == null ? void 0 : e.print().catch(Z));
1626
- }, Hn = () => {
1693
+ }, Mn = () => {
1627
1694
  var l;
1628
- const e = B, t = r.current;
1695
+ const e = A, t = r.current;
1629
1696
  if (!e || !t) return;
1630
1697
  const n = e.freeze;
1631
1698
  if (n.frozenRows || n.frozenCols) e.freeze = { frozenRows: 0, frozenCols: 0 };
@@ -1635,92 +1702,92 @@ const Dr = Yn(function(a, S) {
1635
1702
  }
1636
1703
  (l = t.renderer) == null || l.rebuildMetrics(), t.refreshContentSize(), t.render();
1637
1704
  };
1638
- function _n(e) {
1639
- var l, o;
1640
- const t = r.current, n = vr(e, { controller: t, editable: !!a.editable, hasSelection: !!P });
1705
+ function Bn(e) {
1706
+ var l, o, u;
1707
+ const t = r.current, n = dr(e, { controller: t, editable: !!s.editable, hasSelection: !!w });
1641
1708
  if (n) return n;
1642
1709
  switch (e) {
1643
1710
  case "find":
1644
- return g({ id: e, iconSvg: R("find"), label: "查找", title: "查找 (Ctrl+F)", active: Te, onClick: () => Te ? ke() : Ne(!0) });
1711
+ return g({ id: e, iconSvg: I("find"), label: "查找", title: "查找和替换 (Ctrl+F)", active: !!((l = r.current) != null && l.isFindDialogOpen()), onClick: () => kn() });
1645
1712
  case "filter":
1646
- return g({ id: e, iconSvg: R("filter"), label: "筛选", title: "切换自动筛选", active: !!(B != null && B.autoFilterRange), onClick: () => t == null ? void 0 : t.toggleAutoFilter() });
1713
+ return g({ id: e, iconSvg: I("filter"), label: "筛选", title: "切换自动筛选", active: !!(A != null && A.autoFilterRange), onClick: () => t == null ? void 0 : t.toggleAutoFilter() });
1647
1714
  case "clear-filter":
1648
- return g({ id: e, iconSvg: R("clear-filter"), label: "清除筛选", title: "清除当前表全部筛选", disabled: !(t != null && t.hasFilters()), onClick: () => t == null ? void 0 : t.clearAllFilters() });
1715
+ return g({ id: e, iconSvg: I("clear-filter"), label: "清除筛选", title: "清除当前表全部筛选", disabled: !(t != null && t.hasFilters()), onClick: () => t == null ? void 0 : t.clearAllFilters() });
1649
1716
  case "sort": {
1650
- const c = t == null ? void 0 : t.getSortState(), s = t == null ? void 0 : t.getActiveCell(), d = !s || !B;
1717
+ const a = t == null ? void 0 : t.getSortState(), c = t == null ? void 0 : t.getActiveCell(), C = !c || !A;
1651
1718
  return g({
1652
1719
  id: e,
1653
- iconSvg: R("sort"),
1720
+ iconSvg: I("sort"),
1654
1721
  label: "排序",
1655
- title: s ? `按 ${we(s.col)} 列排序` : "选中一个单元格后按该列排序",
1656
- active: !!(s && (c == null ? void 0 : c.col) === s.col && c.dir),
1657
- disabled: d,
1722
+ title: c ? `按 ${Re(c.col)} 列排序` : "选中一个单元格后按该列排序",
1723
+ active: !!(c && (a == null ? void 0 : a.col) === c.col && a.dir),
1724
+ disabled: C,
1658
1725
  items: [
1659
- g({ id: "sort-asc", label: "升序 (A → Z / 小 → 大)", active: !!(s && (c == null ? void 0 : c.col) === s.col && c.dir === "asc"), disabled: d, onClick: () => t == null ? void 0 : t.sortActiveColumn("asc") }),
1660
- g({ id: "sort-desc", label: "降序 (Z → A / 大 → 小)", active: !!(s && (c == null ? void 0 : c.col) === s.col && c.dir === "desc"), disabled: d, onClick: () => t == null ? void 0 : t.sortActiveColumn("desc") }),
1726
+ g({ id: "sort-asc", label: "升序 (A → Z / 小 → 大)", active: !!(c && (a == null ? void 0 : a.col) === c.col && a.dir === "asc"), disabled: C, onClick: () => t == null ? void 0 : t.sortActiveColumn("asc") }),
1727
+ g({ id: "sort-desc", label: "降序 (Z → A / 大 → 小)", active: !!(c && (a == null ? void 0 : a.col) === c.col && a.dir === "desc"), disabled: C, onClick: () => t == null ? void 0 : t.sortActiveColumn("desc") }),
1661
1728
  g({ id: "sort-custom-sep", type: "separator" }),
1662
1729
  g({ id: "sort-custom", label: "自定义排序…", title: "多关键字排序", onClick: () => t == null ? void 0 : t.openSortDialog() })
1663
1730
  ]
1664
1731
  });
1665
1732
  }
1666
1733
  case "copy":
1667
- return g({ id: e, iconSvg: R("copy"), label: "复制", title: "复制选区 (Ctrl+C)", disabled: !P, onClick: () => void (t == null ? void 0 : t.copySelection()) });
1734
+ return g({ id: e, iconSvg: I("copy"), label: "复制", title: "复制选区 (Ctrl+C)", disabled: !w, onClick: () => void (t == null ? void 0 : t.copySelection()) });
1668
1735
  case "pivot-table":
1669
- return a.pivotTable ? g({ id: e, iconSvg: R("pivot-table"), label: "透视表", title: "选择字段并基于当前选区创建静态透视汇总表", disabled: !P || !a.editable, onClick: () => t == null ? void 0 : t.openPivotTableDialog() }) : null;
1736
+ return s.pivotTable ? g({ id: e, iconSvg: I("pivot-table"), label: "透视表", title: "选择字段并基于当前选区创建静态透视汇总表", disabled: !w || !s.editable, onClick: () => t == null ? void 0 : t.openPivotTableDialog() }) : null;
1670
1737
  // 功能未开启(默认):不渲染入口
1671
1738
  case "conditional-format":
1672
- return a.conditionalFormat ? g({ id: e, iconSvg: R("conditional-format"), label: "条件格式", title: "管理条件格式规则(新建/编辑/删除;新建套到当前选区)", disabled: !a.editable, onClick: () => t == null ? void 0 : t.openConditionalFormatDialog() }) : null;
1739
+ return s.conditionalFormat ? g({ id: e, iconSvg: I("conditional-format"), label: "条件格式", title: "管理条件格式规则(新建/编辑/删除;新建套到当前选区)", disabled: !s.editable, onClick: () => t == null ? void 0 : t.openConditionalFormatDialog() }) : null;
1673
1740
  // 功能未开启(默认):不渲染入口
1674
1741
  case "number-format":
1675
- return g({ id: e, iconSvg: R("number-format"), label: "数字格式", title: "设置单元格数字格式(数值/货币/百分比/日期/自定义)", disabled: !P || !a.editable, onClick: () => t == null ? void 0 : t.openNumberFormatDialog() });
1742
+ return g({ id: e, iconSvg: I("number-format"), label: "数字格式", title: "设置单元格数字格式(数值/货币/百分比/日期/自定义)", disabled: !w || !s.editable, onClick: () => t == null ? void 0 : t.openNumberFormatDialog() });
1676
1743
  case "format-painter":
1677
- return g({ id: e, iconSvg: R("format-painter"), label: "格式刷", title: "格式刷:先选源格点此采样,再点/拖目标刷上格式(Esc 取消)", active: !!(t != null && t.isFormatPainterArmed()), disabled: !P || !a.editable, onClick: () => t != null && t.isFormatPainterArmed() ? t == null ? void 0 : t.cancelFormatPainter() : t == null ? void 0 : t.startFormatPainter() });
1744
+ return g({ id: e, iconSvg: I("format-painter"), label: "格式刷", title: "格式刷:先选源格点此采样,再点/拖目标刷上格式(Esc 取消)", active: !!(t != null && t.isFormatPainterArmed()), disabled: !w || !s.editable, onClick: () => t != null && t.isFormatPainterArmed() ? t == null ? void 0 : t.cancelFormatPainter() : t == null ? void 0 : t.startFormatPainter() });
1678
1745
  case "wrap-text": {
1679
- const c = (l = t == null ? void 0 : t.getSelectionWrapState()) != null ? l : "none";
1680
- return g({ id: e, iconSvg: R("wrap-text"), label: "自动换行", title: "自动换行(选区,WPS 风格 toggle)", active: c === "all", disabled: !P || !a.editable, onClick: () => void (t == null ? void 0 : t.toggleWrapTextOnSelection()) });
1746
+ const a = (o = t == null ? void 0 : t.getSelectionWrapState()) != null ? o : "none";
1747
+ return g({ id: e, iconSvg: I("wrap-text"), label: "自动换行", title: "自动换行(选区,WPS 风格 toggle)", active: a === "all", disabled: !w || !s.editable, onClick: () => void (t == null ? void 0 : t.toggleWrapTextOnSelection()) });
1681
1748
  }
1682
1749
  case "template": {
1683
- const c = !!lt, s = ie, d = !!a.src && !a.workbook;
1750
+ const a = !!Qe, c = ae, C = !!s.src && !s.workbook;
1684
1751
  return g({
1685
1752
  id: e,
1686
- iconSvg: R("template"),
1753
+ iconSvg: I("template"),
1687
1754
  label: "模板",
1688
- title: d ? "模板仅对 JSON / 模型数据源生效;当前是 .xlsx 数据源,模板不可用" : c ? `模板已加载:${s || "(未命名)"}` : "为 JSON / 模型数据源套用 .xlsx 模板的样式;模板的文字内容会被丢弃",
1689
- active: c,
1690
- disabled: d,
1755
+ title: C ? "模板仅对 JSON / 模型数据源生效;当前是 .xlsx 数据源,模板不可用" : a ? `模板已加载:${c || "(未命名)"}` : "为 JSON / 模型数据源套用 .xlsx 模板的样式;模板的文字内容会被丢弃",
1756
+ active: a,
1757
+ disabled: C,
1691
1758
  items: [
1692
- g({ id: "tpl-default", label: (c ? "" : "✓ ") + "默认渲染", title: "不套模板,数据按默认样式渲染", disabled: !c, onClick: ot }),
1759
+ g({ id: "tpl-default", label: (a ? "" : "✓ ") + "默认渲染", title: "不套模板,数据按默认样式渲染", disabled: !a, onClick: et }),
1693
1760
  g({ id: "tpl-sep", type: "separator" }),
1694
- g({ id: "tpl-import", label: "导入 .xlsx 模板…", title: "选一份 .xlsx, 把它的 styling 套到当前 JSON 数据上", onClick: yn }),
1695
- g({ id: "tpl-clear", label: "清除模板", title: "切回默认样式渲染", disabled: !c, onClick: ot })
1761
+ g({ id: "tpl-import", label: "导入 .xlsx 模板…", title: "选一份 .xlsx, 把它的 styling 套到当前 JSON 数据上", onClick: hn }),
1762
+ g({ id: "tpl-clear", label: "清除模板", title: "切回默认样式渲染", disabled: !a, onClick: et })
1696
1763
  ]
1697
1764
  });
1698
1765
  }
1699
1766
  case "image-tools": {
1700
- const c = P, s = t == null ? void 0 : t.getActiveCell(), d = ((o = B == null ? void 0 : B.images.length) != null ? o : 0) > 0;
1767
+ const a = w, c = t == null ? void 0 : t.getActiveCell(), C = ((u = A == null ? void 0 : A.images.length) != null ? u : 0) > 0;
1701
1768
  return g({
1702
1769
  id: e,
1703
- iconSvg: R("image-tools"),
1770
+ iconSvg: I("image-tools"),
1704
1771
  label: "图片工具",
1705
1772
  title: "浮动图 ⇄ 单元格内嵌图(WPS DISPIMG)互转",
1706
- disabled: !a.editable,
1773
+ disabled: !s.editable,
1707
1774
  items: [
1708
- g({ id: "img-sel-to-cell", label: "选区:浮动 → 嵌入", title: '把选区里"中心格在选区内"的浮动图就近嵌入', disabled: !c || !d, onClick: () => c && (t == null ? void 0 : t.convertImagesInRangeToCell(c)) }),
1709
- g({ id: "img-sel-to-float", label: "选区:嵌入 → 浮动", title: "把选区内所有 DISPIMG 格拎成浮动图", disabled: !c, onClick: () => c && (t == null ? void 0 : t.convertCellImagesInRangeToFloat(c)) }),
1775
+ g({ id: "img-sel-to-cell", label: "选区:浮动 → 嵌入", title: '把选区里"中心格在选区内"的浮动图就近嵌入', disabled: !a || !C, onClick: () => a && (t == null ? void 0 : t.convertImagesInRangeToCell(a)) }),
1776
+ g({ id: "img-sel-to-float", label: "选区:嵌入 → 浮动", title: "把选区内所有 DISPIMG 格拎成浮动图", disabled: !a, onClick: () => a && (t == null ? void 0 : t.convertCellImagesInRangeToFloat(a)) }),
1710
1777
  g({ id: "img-sep", type: "separator" }),
1711
- g({ id: "img-all-to-cell", label: "整表:浮动 → 嵌入", title: "全表浮动图按几何就近嵌入各自单元格", disabled: !d, onClick: () => t == null ? void 0 : t.convertAllImagesToCells() }),
1712
- g({ id: "img-col-to-cell", label: "整列:浮动 → 嵌入(活动列)", title: "把中心落在活动列的浮动图就近嵌入", disabled: !d || !s, onClick: () => s && (t == null ? void 0 : t.convertAllImagesToCells(s.col)) })
1778
+ g({ id: "img-all-to-cell", label: "整表:浮动 → 嵌入", title: "全表浮动图按几何就近嵌入各自单元格", disabled: !C, onClick: () => t == null ? void 0 : t.convertAllImagesToCells() }),
1779
+ g({ id: "img-col-to-cell", label: "整列:浮动 → 嵌入(活动列)", title: "把中心落在活动列的浮动图就近嵌入", disabled: !C || !c, onClick: () => c && (t == null ? void 0 : t.convertAllImagesToCells(c.col)) })
1713
1780
  ]
1714
1781
  });
1715
1782
  }
1716
1783
  case "freeze": {
1717
- const c = B == null ? void 0 : B.freeze;
1718
- return g({ id: e, iconSvg: R("freeze"), label: "冻结", title: "冻结/取消冻结(在活动单元格)", active: !!(c && (c.frozenRows || c.frozenCols)), onClick: Hn });
1784
+ const a = A == null ? void 0 : A.freeze;
1785
+ return g({ id: e, iconSvg: I("freeze"), label: "冻结", title: "冻结/取消冻结(在活动单元格)", active: !!(a && (a.frozenRows || a.frozenCols)), onClick: Mn });
1719
1786
  }
1720
1787
  case "export":
1721
1788
  return g({
1722
1789
  id: e,
1723
- iconSvg: R("export"),
1790
+ iconSvg: I("export"),
1724
1791
  label: "导出",
1725
1792
  title: "导出 / 打印",
1726
1793
  items: [
@@ -1729,75 +1796,75 @@ const Dr = Yn(function(a, S) {
1729
1796
  g({ id: "export-json", label: "导出为 JSON (.json)", onClick: () => t == null ? void 0 : t.downloadJson() }),
1730
1797
  g({ id: "export-sep", type: "separator" }),
1731
1798
  g({ id: "export-png", label: "导出为图片 (PNG)", onClick: () => void (t == null ? void 0 : t.downloadImage().catch(Z)) }),
1732
- g({ id: "export-pdf", label: "导出为 PDF (位图)", onClick: Rt }),
1733
- g({ id: "export-pdf-vector", label: "导出为 PDF (矢量·文字可选)", onClick: yt }),
1734
- g({ id: "export-print", label: "打印…", onClick: wt })
1799
+ g({ id: "export-pdf", label: "导出为 PDF (位图)", onClick: St }),
1800
+ g({ id: "export-pdf-vector", label: "导出为 PDF (矢量·文字可选)", onClick: xt }),
1801
+ g({ id: "export-print", label: "打印…", onClick: Ft })
1735
1802
  ]
1736
1803
  });
1737
1804
  case "zoom":
1738
1805
  return g({
1739
1806
  id: e,
1740
- iconSvg: R("zoom"),
1741
- label: Math.round(I * 100) + "%",
1807
+ iconSvg: I("zoom"),
1808
+ label: Math.round(x * 100) + "%",
1742
1809
  title: "缩放",
1743
- items: [50, 75, 100, 125, 150, 200].map((c) => g({ id: "zoom-" + c, label: c + "%", active: Math.round(I * 100) === c, onClick: () => Q(c / 100) }))
1810
+ items: [50, 75, 100, 125, 150, 200].map((a) => g({ id: "zoom-" + a, label: a + "%", active: Math.round(x * 100) === a, onClick: () => G(a / 100) }))
1744
1811
  });
1745
1812
  }
1746
1813
  return null;
1747
1814
  }
1748
- function $e(e, t) {
1815
+ function Ue(e, t) {
1749
1816
  var l;
1750
1817
  const n = { kind: t, id: e.id, type: e.type, icon: e.icon, label: e.label, title: e.title };
1751
- return e.active && (n.active = !!e.active(Fe)), e.disabled && (n.disabled = !!e.disabled(Fe)), e.onClick && (n.onClick = () => {
1818
+ return e.active && (n.active = !!e.active(xe)), e.disabled && (n.disabled = !!e.disabled(xe)), e.onClick && (n.onClick = () => {
1752
1819
  var o;
1753
- return (o = e.onClick) == null ? void 0 : o.call(e, Fe);
1754
- }), (l = e.items) != null && l.length && (n.items = e.items.map((o) => $e(o, t))), n;
1820
+ return (o = e.onClick) == null ? void 0 : o.call(e, xe);
1821
+ }), (l = e.items) != null && l.length && (n.items = e.items.map((o) => Ue(o, t))), n;
1755
1822
  }
1756
- const Vn = (e, t) => {
1757
- var l, o, c;
1823
+ const On = (e, t) => {
1824
+ var l, o, u;
1758
1825
  const n = [];
1759
- for (const s of e)
1760
- if (ur(s)) n.push({ id: "br-" + n.length, type: "rowbreak", kind: "builtin" });
1761
- else if (dr(s)) n.push({ id: "sep-" + n.length, type: "separator", kind: "builtin" });
1762
- else if (t[s]) n.push($e(t[s], "custom"));
1826
+ for (const a of e)
1827
+ if (lr(a)) n.push({ id: "br-" + n.length, type: "rowbreak", kind: "builtin" });
1828
+ else if (or(a)) n.push({ id: "sep-" + n.length, type: "separator", kind: "builtin" });
1829
+ else if (t[a]) n.push(Ue(t[a], "custom"));
1763
1830
  else {
1764
- const d = _n(s);
1765
- d && (d.size = (c = (o = d.size) != null ? o : (l = mr[s]) == null ? void 0 : l.size) != null ? c : "small", n.push(d));
1831
+ const c = Bn(a);
1832
+ c && (c.size = (u = (o = c.size) != null ? o : (l = ar[a]) == null ? void 0 : l.size) != null ? u : "small", n.push(c));
1766
1833
  }
1767
1834
  return n;
1768
- }, Pt = ar(a.ribbon, a.toolbar), E = Cn({ ribbon: a.ribbon, toolbar: a.toolbar, userState: Pt && $ ? Pn : null });
1769
- y(() => {
1770
- E.sections && (E.sections.some((e) => e.id === ee) || ve(E.activeSectionId));
1771
- }, [E.sections, E.activeSectionId, ee]);
1772
- const Et = E.sections ? (Xt = E.sections.find((e) => e.id === ee)) != null ? Xt : E.sections[0] : null, Tt = (() => {
1835
+ }, It = er(s.ribbon, s.toolbar), E = sn({ ribbon: s.ribbon, toolbar: s.toolbar, userState: It && $ ? xn : null });
1836
+ R(() => {
1837
+ E.sections && (E.sections.some((e) => e.id === q) || Ce(E.activeSectionId));
1838
+ }, [E.sections, E.activeSectionId, q]);
1839
+ const Rt = E.sections ? (Vt = E.sections.find((e) => e.id === q)) != null ? Vt : E.sections[0] : null, kt = (() => {
1773
1840
  var n;
1774
- if (!Et) return [];
1775
- const e = sr(Et).map((l) => ({ id: l.id, name: l.name, items: Vn(l.tools, E.customItems) })), t = [];
1776
- for (const l of pe) for (const o of (n = l.toolbar) != null ? n : []) t.push($e(o, "plugin"));
1841
+ if (!Rt) return [];
1842
+ const e = tr(Rt).map((l) => ({ id: l.id, name: l.name, items: On(l.tools, E.customItems) })), t = [];
1843
+ for (const l of pe) for (const o of (n = l.toolbar) != null ? n : []) t.push(Ue(o, "plugin"));
1777
1844
  return t.length && (e.length ? e[e.length - 1].items.push(...t) : e.push({ id: "plugins", name: "", items: t })), e;
1778
- })(), Nt = Tt.flatMap((e) => e.items), Jn = Nt, Ze = !!E.sections && Nt.length > 0, qe = !E.singleSection && !!E.sections, Kn = Pt, Un = u ? u.sheets.filter((e) => e.state === "visible").length : 0, At = [0.5, 0.75, 1, 1.25, 1.5, 2], Re = (e) => Q(Math.min(3, Math.max(0.3, e))), jn = () => {
1779
- var e, t, n, l, o, c, s;
1780
- (s = he.current) == null || s.show({
1845
+ })(), wt = kt.flatMap((e) => e.items), zn = wt, je = !!E.sections && wt.length > 0, Ke = !E.singleSection && !!E.sections, Ln = It, Wn = d ? d.sheets.filter((e) => e.state === "visible").length : 0, yt = [0.5, 0.75, 1, 1.25, 1.5, 2], Fe = (e) => G(Math.min(3, Math.max(0.3, e))), Hn = () => {
1846
+ var e, t, n, l, o, u, a;
1847
+ (a = be.current) == null || a.show({
1781
1848
  sections: (e = E.sections) != null ? e : [],
1782
- activeSectionId: ee,
1783
- catalog: gr,
1784
- zoom: I,
1785
- editable: (t = xe.current) != null ? t : !!a.editable,
1786
- cellImageFit: (l = (n = _e.current) != null ? n : a.cellImageFit) != null ? l : "fill",
1787
- pasteBehavior: (c = (o = r.current) == null ? void 0 : o.getPasteBehavior()) != null ? c : et,
1788
- onRibbonChange: (d, h) => {
1789
- const x = { v: 1, sections: d, activeSectionId: h };
1790
- ct(x), $ && Cr($, x), ve(h);
1791
- },
1792
- onRuntimeChange: (d) => {
1793
- var h, x, T, N, Ce;
1794
- d.zoom != null && Re(d.zoom), d.editable != null && (xe.current = d.editable, (h = r.current) == null || h.setEditConfig(Ve()), (x = a.onEditableChange) == null || x.call(a, d.editable)), d.cellImageFit != null && (_e.current = d.cellImageFit, (T = r.current) == null || T.setCellImageFit(d.cellImageFit), (N = a.onCellImageFitChange) == null || N.call(a, d.cellImageFit)), d.pasteBehavior != null && ((Ce = r.current) == null || Ce.setPasteBehavior(d.pasteBehavior));
1849
+ activeSectionId: q,
1850
+ catalog: sr,
1851
+ zoom: x,
1852
+ editable: (t = he.current) != null ? t : !!s.editable,
1853
+ cellImageFit: (l = (n = Oe.current) != null ? n : s.cellImageFit) != null ? l : "fill",
1854
+ pasteBehavior: (u = (o = r.current) == null ? void 0 : o.getPasteBehavior()) != null ? u : $e,
1855
+ onRibbonChange: (c, C) => {
1856
+ const S = { v: 1, sections: c, activeSectionId: C };
1857
+ rt(S), $ && ir($, S), Ce(C);
1858
+ },
1859
+ onRuntimeChange: (c) => {
1860
+ var C, S, T, D, me;
1861
+ c.zoom != null && Fe(c.zoom), c.editable != null && (he.current = c.editable, (C = r.current) == null || C.setEditConfig(ze()), (S = s.onEditableChange) == null || S.call(s, c.editable)), c.cellImageFit != null && (Oe.current = c.cellImageFit, (T = r.current) == null || T.setCellImageFit(c.cellImageFit), (D = s.onCellImageFitChange) == null || D.call(s, c.cellImageFit)), c.pasteBehavior != null && ((me = r.current) == null || me.setPasteBehavior(c.pasteBehavior));
1795
1862
  },
1796
1863
  onReset: () => {
1797
- $ && fr($), ct(null), ve(Cn({ ribbon: a.ribbon, toolbar: a.toolbar, userState: null }).activeSectionId);
1864
+ $ && cr($), rt(null), Ce(sn({ ribbon: s.ribbon, toolbar: s.toolbar, userState: null }).activeSectionId);
1798
1865
  }
1799
1866
  });
1800
- }, Ye = ({ items: e, onPick: t, className: n = "rxl-tb-menu" }) => /* @__PURE__ */ i("div", { className: n, "data-tb-menu": "true", children: e.map((l) => l.type === "separator" ? /* @__PURE__ */ i("div", { className: "sep" }, l.id) : l.input ? /* @__PURE__ */ i(
1867
+ }, Ge = ({ items: e, onPick: t, className: n = "rxl-tb-menu" }) => /* @__PURE__ */ i("div", { className: n, "data-tb-menu": "true", children: e.map((l) => l.type === "separator" ? /* @__PURE__ */ i("div", { className: "sep" }, l.id) : l.input ? /* @__PURE__ */ i(
1801
1868
  "input",
1802
1869
  {
1803
1870
  className: "mi-input",
@@ -1827,15 +1894,15 @@ const Dr = Yn(function(a, S) {
1827
1894
  return (o = l.onHoverEnd) == null ? void 0 : o.call(l);
1828
1895
  },
1829
1896
  children: [
1830
- l.swatch ? /* @__PURE__ */ i("span", { className: "sw", style: { background: l.swatch } }) : l.iconSvg ? /* @__PURE__ */ i("span", { className: "ic", dangerouslySetInnerHTML: { __html: se(l.iconSvg) } }) : l.icon ? /* @__PURE__ */ i("span", { className: "ic-e", children: l.icon }) : null,
1897
+ l.swatch ? /* @__PURE__ */ i("span", { className: "sw", style: { background: l.swatch } }) : l.iconSvg ? /* @__PURE__ */ i("span", { className: "ic", dangerouslySetInnerHTML: { __html: le(l.iconSvg) } }) : l.icon ? /* @__PURE__ */ i("span", { className: "ic-e", children: l.icon }) : null,
1831
1898
  l.label && /* @__PURE__ */ i("span", { className: "lb", children: l.label })
1832
1899
  ]
1833
1900
  },
1834
1901
  l.id
1835
- )) }), U = ($t = b == null ? void 0 : b.getFilterPopup()) != null ? $t : null, fe = Oe.current, Dt = u ? u.sheets.map((e, t) => ({ s: e, i: t })).filter(({ s: e }) => e.state === "visible") : [], Mt = (e, t) => {
1902
+ )) }), ge = De.current, Pt = d ? d.sheets.map((e, t) => ({ s: e, i: t })).filter(({ s: e }) => e.state === "visible") : [], Et = (e, t) => {
1836
1903
  var o;
1837
1904
  if (e.type === "separator") return /* @__PURE__ */ i("span", { className: "rxl-rb-vsep" }, e.id);
1838
- const n = !!((o = e.items) != null && o.length), l = ue === e.id;
1905
+ const n = !!((o = e.items) != null && o.length), l = se === e.id;
1839
1906
  return /* @__PURE__ */ m("div", { className: "rxl-at-dd", "data-tb-menu": "true", children: [
1840
1907
  /* @__PURE__ */ m(
1841
1908
  "button",
@@ -1843,56 +1910,56 @@ const Dr = Yn(function(a, S) {
1843
1910
  className: "rxl-rb-btn " + (t ? "rxl-rb-large" : "rxl-rb-small") + (e.active ? " active" : "") + (l ? " open" : "") + (!t && n && e.label ? " combo" : ""),
1844
1911
  disabled: !!e.disabled,
1845
1912
  title: e.title || e.label || e.id,
1846
- onClick: (c) => {
1847
- var s;
1848
- c.stopPropagation(), !e.disabled && (n ? H(l ? null : e.id) : ((s = e.onClick) == null || s.call(e), H(null)));
1913
+ onClick: (u) => {
1914
+ var a;
1915
+ u.stopPropagation(), !e.disabled && (n ? W(l ? null : e.id) : ((a = e.onClick) == null || a.call(e), W(null)));
1849
1916
  },
1850
1917
  children: [
1851
- e.iconSvg ? /* @__PURE__ */ i("span", { className: t ? "rxl-rb-ic-lg" : "rxl-rb-ic-sm", dangerouslySetInnerHTML: { __html: se(e.iconSvg) } }) : e.icon ? /* @__PURE__ */ i("span", { className: "rxl-at-ic-e", children: e.icon }) : null,
1918
+ e.iconSvg ? /* @__PURE__ */ i("span", { className: t ? "rxl-rb-ic-lg" : "rxl-rb-ic-sm", dangerouslySetInnerHTML: { __html: le(e.iconSvg) } }) : e.icon ? /* @__PURE__ */ i("span", { className: "rxl-at-ic-e", children: e.icon }) : null,
1852
1919
  t ? /* @__PURE__ */ m("span", { className: "rxl-rb-lb", children: [
1853
1920
  e.label,
1854
1921
  n && /* @__PURE__ */ i("span", { className: "rxl-rb-caret-inline", children: "▾" })
1855
1922
  ] }) : (n || e.showLabel) && e.label ? /* @__PURE__ */ i("span", { className: "rxl-rb-lb-sm", children: e.label }) : null,
1856
- !t && n && /* @__PURE__ */ i("span", { className: "rxl-rb-caret", dangerouslySetInnerHTML: { __html: se(R("caret")) } })
1923
+ !t && n && /* @__PURE__ */ i("span", { className: "rxl-rb-caret", dangerouslySetInnerHTML: { __html: le(I("caret")) } })
1857
1924
  ]
1858
1925
  }
1859
1926
  ),
1860
- n && l && /* @__PURE__ */ i(Ye, { items: e.items, onPick: (c) => {
1861
- var s;
1862
- c.keepOpen || H(null), (s = c.onClick) == null || s.call(c);
1927
+ n && l && /* @__PURE__ */ i(Ge, { items: e.items, onPick: (u) => {
1928
+ var a;
1929
+ u.keepOpen || W(null), (a = u.onClick) == null || a.call(u);
1863
1930
  } })
1864
1931
  ] }, e.id);
1865
1932
  };
1866
- return /* @__PURE__ */ m("div", { className: "rxl" + (a.className ? " " + a.className : ""), style: a.style, onKeyDown: Nn, children: [
1867
- /* @__PURE__ */ i("input", { ref: at, type: "file", accept: ".xlsx,.xlsm", hidden: !0, onChange: wn }),
1868
- u && /* @__PURE__ */ m("div", { className: "rxl-toolbar", children: [
1869
- /* @__PURE__ */ m("span", { className: "file", title: ((Zt = r.current) != null && Zt.isDirty() ? "* 已修改(未保存) · " : "") + st + (ie ? " · 模板: " + ie : ""), children: [
1870
- ((qt = r.current) == null ? void 0 : qt.isDirty()) && /* @__PURE__ */ i("span", { className: "modified", title: "已修改(未保存)", children: "*" }),
1871
- st || "未命名工作簿",
1872
- ie && /* @__PURE__ */ m("span", { className: "tpl", children: [
1933
+ return /* @__PURE__ */ m("div", { className: "rxl" + (s.className ? " " + s.className : ""), style: s.style, onKeyDown: Rn, children: [
1934
+ /* @__PURE__ */ i("input", { ref: tt, type: "file", accept: ".xlsx,.xlsm", hidden: !0, onChange: Sn }),
1935
+ d && /* @__PURE__ */ m("div", { className: "rxl-toolbar", children: [
1936
+ /* @__PURE__ */ m("span", { className: "file", title: ((Jt = r.current) != null && Jt.isDirty() ? "* 已修改(未保存) · " : "") + nt + (ae ? " · 模板: " + ae : ""), children: [
1937
+ ((Ut = r.current) == null ? void 0 : Ut.isDirty()) && /* @__PURE__ */ i("span", { className: "modified", title: "已修改(未保存)", children: "*" }),
1938
+ nt || "未命名工作簿",
1939
+ ae && /* @__PURE__ */ m("span", { className: "tpl", children: [
1873
1940
  " · 模板: ",
1874
- ie
1941
+ ae
1875
1942
  ] })
1876
1943
  ] }),
1877
1944
  /* @__PURE__ */ m("span", { className: "meta", children: [
1878
- Un,
1945
+ Wn,
1879
1946
  " 个工作表",
1880
- z != null && /* @__PURE__ */ m(ye, { children: [
1947
+ B != null && /* @__PURE__ */ m(Ie, { children: [
1881
1948
  " · 源文件 ",
1882
- tt(z)
1949
+ Ze(B)
1883
1950
  ] }),
1884
- be != null && /* @__PURE__ */ m(ye, { children: [
1951
+ fe != null && /* @__PURE__ */ m(Ie, { children: [
1885
1952
  " · ",
1886
1953
  /* @__PURE__ */ m("span", { title: "模型数据体积估算(确定性;非真实 JS 堆,实际堆约 1.5~3x)", children: [
1887
1954
  "数据约 ",
1888
- tt(be)
1955
+ Ze(fe)
1889
1956
  ] })
1890
1957
  ] }),
1891
- J != null && /* @__PURE__ */ m(ye, { children: [
1958
+ J != null && /* @__PURE__ */ m(Ie, { children: [
1892
1959
  " · ",
1893
1960
  /* @__PURE__ */ m("span", { title: "JS 堆增量(performance.memory;仅 Chromium、整页口径、被安全分桶粗化)", children: [
1894
1961
  "堆约 ",
1895
- tt(J),
1962
+ Ze(J),
1896
1963
  /* @__PURE__ */ i("span", { className: "rough", children: "粗略" })
1897
1964
  ] })
1898
1965
  ] })
@@ -1902,9 +1969,9 @@ const Dr = Yn(function(a, S) {
1902
1969
  /* @__PURE__ */ m(
1903
1970
  "button",
1904
1971
  {
1905
- className: "rxl-export-btn" + (ue === "__header-export" ? " open" : ""),
1972
+ className: "rxl-export-btn" + (se === "__header-export" ? " open" : ""),
1906
1973
  onClick: (e) => {
1907
- e.stopPropagation(), H(ue === "__header-export" ? null : "__header-export");
1974
+ e.stopPropagation(), W(se === "__header-export" ? null : "__header-export");
1908
1975
  },
1909
1976
  title: "导出 / 打印",
1910
1977
  children: [
@@ -1913,8 +1980,8 @@ const Dr = Yn(function(a, S) {
1913
1980
  ]
1914
1981
  }
1915
1982
  ),
1916
- ue === "__header-export" && /* @__PURE__ */ i(
1917
- Ye,
1983
+ se === "__header-export" && /* @__PURE__ */ i(
1984
+ Ge,
1918
1985
  {
1919
1986
  items: [
1920
1987
  g({ id: "h-xlsx", label: "导出为 Excel (.xlsx)", onClick: () => {
@@ -1934,62 +2001,62 @@ const Dr = Yn(function(a, S) {
1934
2001
  var e;
1935
2002
  return void ((e = r.current) == null ? void 0 : e.downloadImage().catch(Z));
1936
2003
  } }),
1937
- g({ id: "h-pdf", label: "导出为 PDF (位图)", onClick: Rt }),
1938
- g({ id: "h-pdf-vec", label: "导出为 PDF (矢量·文字可选)", onClick: yt }),
1939
- g({ id: "h-print", label: "打印…", onClick: wt })
2004
+ g({ id: "h-pdf", label: "导出为 PDF (位图)", onClick: St }),
2005
+ g({ id: "h-pdf-vec", label: "导出为 PDF (矢量·文字可选)", onClick: xt }),
2006
+ g({ id: "h-print", label: "打印…", onClick: Ft })
1940
2007
  ],
1941
2008
  onPick: (e) => {
1942
2009
  var t;
1943
- H(null), (t = e.onClick) == null || t.call(e);
2010
+ W(null), (t = e.onClick) == null || t.call(e);
1944
2011
  },
1945
2012
  className: "rxl-tb-menu header-menu"
1946
2013
  }
1947
2014
  )
1948
2015
  ] }),
1949
2016
  /* @__PURE__ */ m("div", { className: "rxl-zoom", children: [
1950
- /* @__PURE__ */ i("button", { onClick: () => Re(I - 0.1), title: "缩小", children: "−" }),
1951
- /* @__PURE__ */ m("select", { value: I, onChange: (e) => Re(parseFloat(e.target.value)), children: [
1952
- At.map((e) => /* @__PURE__ */ m("option", { value: e, children: [
2017
+ /* @__PURE__ */ i("button", { onClick: () => Fe(x - 0.1), title: "缩小", children: "−" }),
2018
+ /* @__PURE__ */ m("select", { value: x, onChange: (e) => Fe(parseFloat(e.target.value)), children: [
2019
+ yt.map((e) => /* @__PURE__ */ m("option", { value: e, children: [
1953
2020
  Math.round(e * 100),
1954
2021
  "%"
1955
2022
  ] }, e)),
1956
- !At.includes(I) && /* @__PURE__ */ m("option", { value: I, children: [
1957
- Math.round(I * 100),
2023
+ !yt.includes(x) && /* @__PURE__ */ m("option", { value: x, children: [
2024
+ Math.round(x * 100),
1958
2025
  "%"
1959
2026
  ] }, "cur")
1960
2027
  ] }),
1961
- /* @__PURE__ */ i("button", { onClick: () => Re(I + 0.1), title: "放大", children: "+" })
2028
+ /* @__PURE__ */ i("button", { onClick: () => Fe(x + 0.1), title: "放大", children: "+" })
1962
2029
  ] })
1963
2030
  ] }),
1964
- u && Ze && qe && /* @__PURE__ */ m("div", { className: "rxl-ribbon-tabs", role: "tablist", children: [
2031
+ d && je && Ke && /* @__PURE__ */ m("div", { className: "rxl-ribbon-tabs", role: "tablist", children: [
1965
2032
  E.sections.map((e) => /* @__PURE__ */ i(
1966
2033
  "button",
1967
2034
  {
1968
- className: "rxl-ribbon-tab" + (e.id === ee ? " active" : ""),
2035
+ className: "rxl-ribbon-tab" + (e.id === q ? " active" : ""),
1969
2036
  role: "tab",
1970
- "aria-selected": e.id === ee,
1971
- onClick: () => ve(e.id),
2037
+ "aria-selected": e.id === q,
2038
+ onClick: () => Ce(e.id),
1972
2039
  children: e.name
1973
2040
  },
1974
2041
  e.id
1975
2042
  )),
1976
2043
  /* @__PURE__ */ i("span", { style: { flex: "1 1 auto" } }),
1977
- Kn && /* @__PURE__ */ m("button", { className: "rxl-ribbon-gear", title: "设置(工具板块 / 常规 / 视图)", onClick: jn, children: [
1978
- /* @__PURE__ */ i("span", { className: "ic", dangerouslySetInnerHTML: { __html: se(R("settings")) } }),
2044
+ Ln && /* @__PURE__ */ m("button", { className: "rxl-ribbon-gear", title: "设置(工具板块 / 常规 / 视图)", onClick: Hn, children: [
2045
+ /* @__PURE__ */ i("span", { className: "ic", dangerouslySetInnerHTML: { __html: le(I("settings")) } }),
1979
2046
  /* @__PURE__ */ i("span", { className: "lbl", children: "设置" })
1980
2047
  ] })
1981
2048
  ] }),
1982
- u && Ze && qe && /* @__PURE__ */ i("div", { className: "rxl-rb-panel", children: Tt.map((e, t) => /* @__PURE__ */ m(nr, { children: [
2049
+ d && je && Ke && /* @__PURE__ */ i("div", { className: "rxl-rb-panel", children: kt.map((e, t) => /* @__PURE__ */ m(Zn, { children: [
1983
2050
  t > 0 && /* @__PURE__ */ i("div", { className: "rxl-rb-sep" }),
1984
2051
  /* @__PURE__ */ m("div", { className: "rxl-rb-group", children: [
1985
- /* @__PURE__ */ i("div", { className: "rxl-rb-body", children: cr(e.items).map((n, l) => n.kind === "large" ? Mt(n.item, !0) : /* @__PURE__ */ i("div", { className: "rxl-rb-smalls", children: n.rows.map((o, c) => /* @__PURE__ */ i("div", { className: "rxl-rb-row", children: o.map((s) => Mt(s, !1)) }, c)) }, l)) }),
2052
+ /* @__PURE__ */ i("div", { className: "rxl-rb-body", children: nr(e.items).map((n, l) => n.kind === "large" ? Et(n.item, !0) : /* @__PURE__ */ i("div", { className: "rxl-rb-smalls", children: n.rows.map((o, u) => /* @__PURE__ */ i("div", { className: "rxl-rb-row", children: o.map((a) => Et(a, !1)) }, u)) }, l)) }),
1986
2053
  e.name && /* @__PURE__ */ i("div", { className: "rxl-rb-gname", children: e.name })
1987
2054
  ] })
1988
2055
  ] }, e.id)) }),
1989
- u && Ze && !qe && /* @__PURE__ */ i("div", { className: "rxl-action-toolbar", children: Jn.map((e) => {
2056
+ d && je && !Ke && /* @__PURE__ */ i("div", { className: "rxl-action-toolbar", children: zn.map((e) => {
1990
2057
  var l;
1991
2058
  if (e.type === "separator") return /* @__PURE__ */ i("span", { className: "rxl-at-divider" }, e.id);
1992
- const t = !!((l = e.items) != null && l.length), n = ue === e.id;
2059
+ const t = !!((l = e.items) != null && l.length), n = se === e.id;
1993
2060
  return /* @__PURE__ */ m("div", { className: "rxl-at-dd", "data-tb-menu": "true", children: [
1994
2061
  /* @__PURE__ */ m(
1995
2062
  "button",
@@ -1998,62 +2065,62 @@ const Dr = Yn(function(a, S) {
1998
2065
  disabled: !!e.disabled,
1999
2066
  title: e.title || e.label || e.id,
2000
2067
  onClick: (o) => {
2001
- var c;
2002
- o.stopPropagation(), !e.disabled && (t ? H(n ? null : e.id) : ((c = e.onClick) == null || c.call(e), H(null)));
2068
+ var u;
2069
+ o.stopPropagation(), !e.disabled && (t ? W(n ? null : e.id) : ((u = e.onClick) == null || u.call(e), W(null)));
2003
2070
  },
2004
2071
  children: [
2005
- e.iconSvg ? /* @__PURE__ */ i("span", { className: "rxl-at-ic", dangerouslySetInnerHTML: { __html: se(e.iconSvg) } }) : e.icon ? /* @__PURE__ */ i("span", { className: "rxl-at-ic-e", children: e.icon }) : null,
2072
+ e.iconSvg ? /* @__PURE__ */ i("span", { className: "rxl-at-ic", dangerouslySetInnerHTML: { __html: le(e.iconSvg) } }) : e.icon ? /* @__PURE__ */ i("span", { className: "rxl-at-ic-e", children: e.icon }) : null,
2006
2073
  e.label && /* @__PURE__ */ i("span", { className: "rxl-at-lb", children: e.label }),
2007
- t && /* @__PURE__ */ i("span", { className: "rxl-at-caret", dangerouslySetInnerHTML: { __html: se(R("caret")) } })
2074
+ t && /* @__PURE__ */ i("span", { className: "rxl-at-caret", dangerouslySetInnerHTML: { __html: le(I("caret")) } })
2008
2075
  ]
2009
2076
  }
2010
2077
  ),
2011
2078
  t && n && /* @__PURE__ */ i(
2012
- Ye,
2079
+ Ge,
2013
2080
  {
2014
2081
  items: e.items,
2015
2082
  onPick: (o) => {
2016
- var c;
2017
- o.keepOpen || H(null), (c = o.onClick) == null || c.call(o);
2083
+ var u;
2084
+ o.keepOpen || W(null), (u = o.onClick) == null || u.call(o);
2018
2085
  }
2019
2086
  }
2020
2087
  )
2021
2088
  ] }, e.id);
2022
2089
  }) }),
2023
- u && ((Yt = r.current) == null ? void 0 : Yt.isFormulaBarVisible()) !== !1 && /* @__PURE__ */ m("div", { className: "rxl-formula-bar", children: [
2024
- /* @__PURE__ */ i("span", { className: "addr", children: It || "—" }),
2090
+ d && ((jt = r.current) == null ? void 0 : jt.isFormulaBarVisible()) !== !1 && /* @__PURE__ */ m("div", { className: "rxl-formula-bar", children: [
2091
+ /* @__PURE__ */ i("span", { className: "addr", children: vt || "—" }),
2025
2092
  /* @__PURE__ */ i("span", { className: "fx", children: "fx" }),
2026
- Dn ? /* @__PURE__ */ i(
2093
+ yn ? /* @__PURE__ */ i(
2027
2094
  "textarea",
2028
2095
  {
2029
- ref: ut,
2096
+ ref: ot,
2030
2097
  className: "content content-input",
2031
- value: Xe,
2032
- title: Xe,
2098
+ value: Je,
2099
+ title: Je,
2033
2100
  rows: 1,
2034
2101
  spellCheck: !1,
2035
- onFocus: Bn,
2102
+ onFocus: En,
2036
2103
  onChange: (e) => {
2037
- it(e.target.value), dt();
2104
+ lt(e.target.value), at();
2038
2105
  },
2039
- onKeyDown: Ln,
2040
- onBlur: zn
2106
+ onKeyDown: Nn,
2107
+ onBlur: Dn
2041
2108
  }
2042
- ) : /* @__PURE__ */ i("span", { className: "content", title: Ft, children: Ft })
2109
+ ) : /* @__PURE__ */ i("span", { className: "content", title: pt, children: pt })
2043
2110
  ] }),
2044
- /* @__PURE__ */ m("div", { className: "rxl-render-area", ref: mt, children: [
2045
- /* @__PURE__ */ i("canvas", { ref: gt, className: "rxl-canvas" }),
2046
- /* @__PURE__ */ i("div", { className: "rxl-ov", ref: Ae }),
2047
- /* @__PURE__ */ i("div", { className: "rxl-ov", ref: Me }),
2048
- /* @__PURE__ */ i("div", { className: "rxl-ov", ref: De }),
2049
- /* @__PURE__ */ i("div", { className: "rxl-ov", ref: Be }),
2111
+ /* @__PURE__ */ m("div", { className: "rxl-render-area", ref: st, children: [
2112
+ /* @__PURE__ */ i("canvas", { ref: ct, className: "rxl-canvas" }),
2113
+ /* @__PURE__ */ i("div", { className: "rxl-ov", ref: ye }),
2114
+ /* @__PURE__ */ i("div", { className: "rxl-ov", ref: Ee }),
2115
+ /* @__PURE__ */ i("div", { className: "rxl-ov", ref: Pe }),
2116
+ /* @__PURE__ */ i("div", { className: "rxl-ov", ref: Te }),
2050
2117
  /* @__PURE__ */ i(
2051
2118
  "div",
2052
2119
  {
2053
2120
  className: "rxl-scroller",
2054
- ref: te,
2121
+ ref: ie,
2055
2122
  tabIndex: 0,
2056
- onScroll: An,
2123
+ onScroll: wn,
2057
2124
  onMouseDown: (e) => {
2058
2125
  var t;
2059
2126
  return (t = r.current) == null ? void 0 : t.onMouseDown(e.nativeEvent);
@@ -2082,263 +2149,143 @@ const Dr = Yn(function(a, S) {
2082
2149
  var t;
2083
2150
  return (t = r.current) == null ? void 0 : t.onContextMenu(e.nativeEvent);
2084
2151
  },
2085
- children: /* @__PURE__ */ i("div", { className: "rxl-spacer", ref: ft })
2152
+ children: /* @__PURE__ */ i("div", { className: "rxl-spacer", ref: it })
2086
2153
  }
2087
2154
  ),
2088
- /* @__PURE__ */ i("div", { className: "rxl-ov-slot", children: /* @__PURE__ */ i("div", { ref: ze }) }),
2089
- /* @__PURE__ */ i("div", { className: "rxl-editor-slot", ref: Le }),
2090
- Te && u && /* @__PURE__ */ m("div", { className: "rxl-findbar", children: [
2091
- /* @__PURE__ */ m("div", { className: "rxl-find-row", children: [
2092
- /* @__PURE__ */ i(
2093
- "input",
2094
- {
2095
- autoFocus: !0,
2096
- placeholder: "查找…",
2097
- value: q.query,
2098
- onChange: (e) => {
2099
- var t;
2100
- return (t = r.current) == null ? void 0 : t.setFindQuery(e.target.value);
2101
- },
2102
- onKeyDown: (e) => {
2103
- var t, n;
2104
- e.key === "Enter" ? e.shiftKey ? (t = r.current) == null || t.findPrev() : (n = r.current) == null || n.findNext() : e.key === "Escape" && ke();
2105
- }
2106
- }
2107
- ),
2108
- /* @__PURE__ */ i("span", { className: "count", children: q.count ? `${q.index + 1}/${q.count}` : "无结果" }),
2109
- /* @__PURE__ */ i("button", { onClick: () => {
2110
- var e;
2111
- return (e = r.current) == null ? void 0 : e.findPrev();
2112
- }, children: "↑" }),
2113
- /* @__PURE__ */ i("button", { onClick: () => {
2114
- var e;
2115
- return (e = r.current) == null ? void 0 : e.findNext();
2116
- }, children: "↓" }),
2117
- /* @__PURE__ */ i("button", { onClick: ke, children: "✕" })
2118
- ] }),
2119
- a.editable && /* @__PURE__ */ m("div", { className: "rxl-find-row", children: [
2120
- /* @__PURE__ */ i(
2121
- "input",
2122
- {
2123
- placeholder: "替换为…",
2124
- value: q.replace,
2125
- onChange: (e) => {
2126
- var t;
2127
- return (t = r.current) == null ? void 0 : t.setFindReplace(e.target.value);
2128
- },
2129
- onKeyDown: (e) => {
2130
- var t;
2131
- e.key === "Enter" ? (t = r.current) == null || t.replaceCurrent() : e.key === "Escape" && ke();
2132
- }
2133
- }
2134
- ),
2135
- /* @__PURE__ */ i("button", { className: "rxl-rep", disabled: !q.count, onClick: () => {
2136
- var e;
2137
- return (e = r.current) == null ? void 0 : e.replaceCurrent();
2138
- }, children: "替换" }),
2139
- /* @__PURE__ */ i("button", { className: "rxl-rep", disabled: !q.count, onClick: () => {
2140
- var e;
2141
- return (e = r.current) == null ? void 0 : e.replaceAll();
2142
- }, children: "全部替换" })
2143
- ] })
2144
- ] }),
2145
- U && /* @__PURE__ */ i(
2146
- wr,
2147
- {
2148
- values: U.values,
2149
- selected: U.selected,
2150
- x: U.x,
2151
- y: U.y,
2152
- sortDir: U.sortDir,
2153
- onApply: (e) => {
2154
- var t;
2155
- return (t = r.current) == null ? void 0 : t.applyFilterSelection(e);
2156
- },
2157
- onClear: () => {
2158
- var e;
2159
- return (e = r.current) == null ? void 0 : e.clearFilterColumn();
2160
- },
2161
- onClose: () => {
2162
- var e;
2163
- return (e = r.current) == null ? void 0 : e.closeFilterPopup();
2164
- },
2165
- onSort: (e) => {
2166
- var n, l;
2167
- const t = U.col;
2168
- (n = r.current) == null || n.closeFilterPopup(), (l = r.current) == null || l.sortColumn(t, e);
2169
- }
2170
- },
2171
- U.col
2172
- ),
2173
- fe && /* @__PURE__ */ i("div", { className: "rxl-tooltip " + fe.kind, style: { left: fe.x, top: fe.y }, children: fe.text }),
2174
- F && /* @__PURE__ */ i("div", { className: "rxl-state", children: (A == null ? void 0 : A.stage) === "read" ? "读取文件…" : (A == null ? void 0 : A.stage) === "parse" ? "解析中…" : "构建表格…" }),
2175
- !F && M && /* @__PURE__ */ m("div", { className: "rxl-state error", children: [
2155
+ /* @__PURE__ */ i("div", { className: "rxl-ov-slot", children: /* @__PURE__ */ i("div", { ref: Ne }) }),
2156
+ /* @__PURE__ */ i("div", { className: "rxl-editor-slot", ref: Ae }),
2157
+ ge && /* @__PURE__ */ i("div", { className: "rxl-tooltip " + ge.kind, style: { left: ge.x, top: ge.y }, children: ge.text }),
2158
+ P && /* @__PURE__ */ i("div", { className: "rxl-state", children: (V == null ? void 0 : V.stage) === "read" ? "读取文件…" : (V == null ? void 0 : V.stage) === "parse" ? "解析中…" : "构建表格…" }),
2159
+ !P && z && /* @__PURE__ */ m("div", { className: "rxl-state error", children: [
2176
2160
  "解析失败:",
2177
- M
2161
+ z
2178
2162
  ] }),
2179
- !F && !u && /* @__PURE__ */ i("div", { className: "rxl-state", children: "拖入或选择一个 .xlsx 文件" })
2163
+ !P && !d && /* @__PURE__ */ i("div", { className: "rxl-state", children: "拖入或选择一个 .xlsx 文件" })
2180
2164
  ] }),
2181
- u && /* @__PURE__ */ m("div", { className: "rxl-status-bar", children: [
2182
- /* @__PURE__ */ i("span", { style: { color: "#888" }, children: Wn || It }),
2165
+ d && /* @__PURE__ */ m("div", { className: "rxl-status-bar", children: [
2166
+ /* @__PURE__ */ i("span", { style: { color: "#888" }, children: An || vt }),
2183
2167
  /* @__PURE__ */ i("div", { className: "grow" }),
2184
- L && L.numCount > 0 ? /* @__PURE__ */ m(ye, { children: [
2168
+ O && O.numCount > 0 ? /* @__PURE__ */ m(Ie, { children: [
2185
2169
  /* @__PURE__ */ m("span", { children: [
2186
2170
  "计数 ",
2187
- L.count
2171
+ O.count
2188
2172
  ] }),
2189
2173
  /* @__PURE__ */ m("span", { children: [
2190
2174
  "求和 ",
2191
- Pe(L.sum)
2175
+ ke(O.sum)
2192
2176
  ] }),
2193
2177
  /* @__PURE__ */ m("span", { children: [
2194
2178
  "平均 ",
2195
- Pe(L.avg)
2179
+ ke(O.avg)
2196
2180
  ] }),
2197
2181
  /* @__PURE__ */ m("span", { children: [
2198
2182
  "最大 ",
2199
- Pe(L.max)
2183
+ ke(O.max)
2200
2184
  ] }),
2201
2185
  /* @__PURE__ */ m("span", { children: [
2202
2186
  "最小 ",
2203
- Pe(L.min)
2187
+ ke(O.min)
2204
2188
  ] })
2205
- ] }) : L && L.count > 0 ? /* @__PURE__ */ m("span", { children: [
2189
+ ] }) : O && O.count > 0 ? /* @__PURE__ */ m("span", { children: [
2206
2190
  "计数 ",
2207
- L.count
2191
+ O.count
2208
2192
  ] }) : null
2209
2193
  ] }),
2210
- u && Dt.length > 0 && /* @__PURE__ */ i("div", { className: "rxl-tabs", children: Dt.map(({ s: e, i: t }) => /* @__PURE__ */ i("button", { className: t === p ? "active" : "", onClick: () => D(t), children: e.name }, t)) }),
2211
- a.exportProgress !== !1 && (a.renderExportProgress ? a.renderExportProgress({ state: bt, busy: vt, cancel: St }) : /* @__PURE__ */ i(Rr, { state: bt, busy: vt, onCancel: St }))
2194
+ d && Pt.length > 0 && /* @__PURE__ */ i("div", { className: "rxl-tabs", children: Pt.map(({ s: e, i: t }) => /* @__PURE__ */ i("button", { className: t === h ? "active" : "", onClick: () => N(t), children: e.name }, t)) }),
2195
+ s.exportProgress !== !1 && (s.renderExportProgress ? s.renderExportProgress({ state: dt, busy: gt, cancel: ft }) : /* @__PURE__ */ i(hr, { state: dt, busy: gt, onCancel: ft }))
2212
2196
  ] });
2213
2197
  });
2214
- function wr(f) {
2215
- const a = f.selected.length ? new Set(f.selected) : new Set(f.values), [S, F] = w(a), M = (u) => {
2216
- const A = new Set(S);
2217
- A.has(u) ? A.delete(u) : A.add(u), F(A);
2218
- };
2219
- return /* @__PURE__ */ m("div", { className: "rxl-filterpop", style: { left: f.x, top: f.y }, children: [
2220
- /* @__PURE__ */ m("div", { className: "sort", children: [
2221
- /* @__PURE__ */ i("button", { className: f.sortDir === "asc" ? "on" : "", onClick: () => f.onSort("asc"), children: "↑ 升序" }),
2222
- /* @__PURE__ */ i("button", { className: f.sortDir === "desc" ? "on" : "", onClick: () => f.onSort("desc"), children: "↓ 降序" })
2223
- ] }),
2224
- /* @__PURE__ */ m("div", { className: "list", children: [
2225
- /* @__PURE__ */ m("label", { children: [
2226
- /* @__PURE__ */ i(
2227
- "input",
2228
- {
2229
- type: "checkbox",
2230
- checked: S.size === f.values.length,
2231
- ref: (u) => {
2232
- u && (u.indeterminate = S.size > 0 && S.size < f.values.length);
2233
- },
2234
- onChange: (u) => F(u.target.checked ? new Set(f.values) : /* @__PURE__ */ new Set())
2235
- }
2236
- ),
2237
- "(全选)"
2238
- ] }),
2239
- f.values.map((u) => /* @__PURE__ */ m("label", { children: [
2240
- /* @__PURE__ */ i("input", { type: "checkbox", checked: S.has(u), onChange: () => M(u) }),
2241
- u
2242
- ] }, u))
2243
- ] }),
2244
- /* @__PURE__ */ m("div", { className: "foot", children: [
2245
- /* @__PURE__ */ i("button", { onClick: f.onClear, children: "清除" }),
2246
- /* @__PURE__ */ i("button", { onClick: () => f.onApply([...S]), children: "确定" }),
2247
- /* @__PURE__ */ i("button", { onClick: f.onClose, children: "取消" })
2248
- ] })
2249
- ] });
2250
- }
2251
2198
  export {
2252
- Or as BuiltinFormulaEngine,
2253
- zr as CanvasRenderer,
2254
- Lr as CellEditorHost,
2255
- et as DEFAULT_PASTE_BEHAVIOR,
2256
- Wr as DEFAULT_THEME,
2257
- Hr as EditController,
2258
- Dr as ExcelViewer,
2259
- _r as FUNCTION_CATEGORIES,
2260
- Vr as FUNCTION_NAMES,
2261
- Jr as GridMetrics,
2262
- Kr as KEYBOARD_SHORTCUTS,
2263
- Ur as OverlayManager,
2264
- jr as PASTE_PRESET_VALUES_ONLY,
2265
- xr as PluginOverlayHost,
2266
- pr as ViewerController,
2267
- Gr as WorkbookExporter,
2268
- Xr as addImage,
2269
- $r as applyFlashProgram,
2270
- Zr as applyStyleOverride,
2271
- qr as buildCellSnapshot,
2272
- Yr as builtinFormulaEngineFactory,
2273
- Qr as canvasToBlob,
2274
- el as canvasToDataURL,
2275
- tl as captureStructure,
2276
- nl as cellContentForEngine,
2277
- rl as cellDisplayText,
2278
- ll as cellKey,
2279
- ol as clearCell,
2280
- al as cloneCell,
2281
- sl as cloneImageAnchor,
2282
- cl as cloneWorkbook,
2283
- we as colIndexToLetters,
2284
- il as defaultFormulaEngineFactory,
2285
- ul as definePlugin,
2286
- dl as deleteCols,
2287
- ml as deleteIntersectsMerge,
2288
- gl as deleteRows,
2289
- kn as detectFormat,
2290
- fl as downloadBlob,
2291
- Sr as estimateWorkbookBytes,
2292
- Rn as finalizeImages,
2293
- tt as formatBytes,
2294
- Cl as formatValue,
2295
- hr as friendlyError,
2296
- bl as functionMeta,
2297
- vl as getCell,
2298
- hl as getCellStyle,
2299
- pn as getCellText,
2300
- xn as getCellValue,
2301
- vn as getRangeData,
2302
- Sn as getSheetData,
2303
- Sl as getWorkbookJSON,
2304
- pl as hyperFormulaEngineFactory,
2305
- xl as inferFlashFill,
2306
- Il as insertCols,
2307
- Fl as insertRows,
2308
- kl as internStyle,
2309
- Rl as isDimCommand,
2310
- yl as isImageCommand,
2311
- wl as isStructCommand,
2312
- Ir as isWorkbookModel,
2313
- Fr as jsonToWorkbook,
2314
- Fn as loadArrayBuffer,
2315
- Pl as makeDefaultStyle,
2316
- El as mergeStyleOverride,
2317
- Tl as mergeTheme,
2318
- Nl as openWorkbook,
2319
- Al as parseSignature,
2320
- Dl as parseWorkbook,
2321
- Qe as readHeapUsed,
2322
- Ml as removeImage,
2323
- Bl as resolveEditable,
2324
- Ol as resolvePasteBehavior,
2325
- zl as restoreCell,
2326
- Ll as restoreDimension,
2327
- Wl as restoreStructure,
2328
- Hl as restoreWorkbookInto,
2329
- bn as revokeImages,
2330
- _l as rewriteWorkbookFormulas,
2331
- Vl as setCellValue,
2332
- Jl as setColumnWidth,
2333
- Kl as setImageRect,
2334
- Ul as setRangeValues,
2335
- jl as setRowHeight,
2336
- hn as sheetToJSON,
2337
- Gl as shiftFormulaRefs,
2338
- Xl as synthesizeFlashFill,
2339
- $l as toCsv,
2340
- Zl as toWorkbookJson,
2341
- yr as useExcelDocument,
2342
- ql as workbookToXlsxBlob,
2343
- Yl as workbookToXlsxBytes
2199
+ Er as BuiltinFormulaEngine,
2200
+ Tr as CanvasRenderer,
2201
+ Dr as CellEditorHost,
2202
+ $e as DEFAULT_PASTE_BEHAVIOR,
2203
+ Nr as DEFAULT_THEME,
2204
+ Ar as EditController,
2205
+ wr as ExcelViewer,
2206
+ Mr as FUNCTION_CATEGORIES,
2207
+ Br as FUNCTION_NAMES,
2208
+ Or as GridMetrics,
2209
+ zr as KEYBOARD_SHORTCUTS,
2210
+ Lr as OverlayManager,
2211
+ Wr as PASTE_PRESET_VALUES_ONLY,
2212
+ Cr as PluginOverlayHost,
2213
+ fr as ViewerController,
2214
+ Hr as WorkbookExporter,
2215
+ _r as addImage,
2216
+ Vr as applyFlashProgram,
2217
+ Jr as applyStyleOverride,
2218
+ Ur as buildCellSnapshot,
2219
+ jr as builtinFormulaEngineFactory,
2220
+ Kr as canvasToBlob,
2221
+ Gr as canvasToDataURL,
2222
+ Xr as captureStructure,
2223
+ $r as cellContentForEngine,
2224
+ Zr as cellDisplayText,
2225
+ Yr as cellKey,
2226
+ qr as clearCell,
2227
+ Qr as cloneCell,
2228
+ el as cloneImageAnchor,
2229
+ tl as cloneWorkbook,
2230
+ Re as colIndexToLetters,
2231
+ nl as defaultFormulaEngineFactory,
2232
+ rl as definePlugin,
2233
+ ll as deleteCols,
2234
+ ol as deleteIntersectsMerge,
2235
+ al as deleteRows,
2236
+ vn as detectFormat,
2237
+ sl as downloadBlob,
2238
+ mr as estimateWorkbookBytes,
2239
+ pn as finalizeImages,
2240
+ Ze as formatBytes,
2241
+ cl as formatValue,
2242
+ gr as friendlyError,
2243
+ il as functionMeta,
2244
+ ul as getCell,
2245
+ dl as getCellStyle,
2246
+ mn as getCellText,
2247
+ fn as getCellValue,
2248
+ un as getRangeData,
2249
+ gn as getSheetData,
2250
+ gl as getWorkbookJSON,
2251
+ ml as hyperFormulaEngineFactory,
2252
+ fl as inferFlashFill,
2253
+ Cl as insertCols,
2254
+ bl as insertRows,
2255
+ vl as internStyle,
2256
+ pl as isDimCommand,
2257
+ hl as isImageCommand,
2258
+ Sl as isStructCommand,
2259
+ br as isWorkbookModel,
2260
+ vr as jsonToWorkbook,
2261
+ bn as loadArrayBuffer,
2262
+ xl as makeDefaultStyle,
2263
+ Fl as mergeStyleOverride,
2264
+ Il as mergeTheme,
2265
+ Rl as openWorkbook,
2266
+ kl as parseSignature,
2267
+ wl as parseWorkbook,
2268
+ Xe as readHeapUsed,
2269
+ yl as removeImage,
2270
+ Pl as resolveEditable,
2271
+ El as resolvePasteBehavior,
2272
+ Tl as restoreCell,
2273
+ Dl as restoreDimension,
2274
+ Nl as restoreStructure,
2275
+ Al as restoreWorkbookInto,
2276
+ cn as revokeImages,
2277
+ Ml as rewriteWorkbookFormulas,
2278
+ Bl as setCellValue,
2279
+ Ol as setColumnWidth,
2280
+ zl as setImageRect,
2281
+ Ll as setRangeValues,
2282
+ Wl as setRowHeight,
2283
+ dn as sheetToJSON,
2284
+ Hl as shiftFormulaRefs,
2285
+ _l as synthesizeFlashFill,
2286
+ Vl as toCsv,
2287
+ Jl as toWorkbookJson,
2288
+ Sr as useExcelDocument,
2289
+ Ul as workbookToXlsxBlob,
2290
+ jl as workbookToXlsxBytes
2344
2291
  };