@silurus/ooxml 0.78.1 → 0.79.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +39 -1
- package/THIRD_PARTY_NOTICES.md +13 -0
- package/dist/{canvas-viewer-mechanics-B4K_t5X_.js → canvas-viewer-mechanics-D9tsuHnG.js} +1 -1
- package/dist/chart-number-format-tjYUR9eS.js +435 -0
- package/dist/dash-Cyc-sevN.js +786 -0
- package/dist/{document-pull-client-5AakVD6e.js → document-pull-client-YiU8M4LO.js} +2119 -2113
- package/dist/{docx-bjhRwb2u.js → docx-a1UpmRf8.js} +65 -56
- package/dist/docx.mjs +4 -4
- package/dist/docx_parser_bg.wasm +0 -0
- package/dist/index.mjs +3 -3
- package/dist/{line-distribute-BVFW1-Hs.js → line-distribute-pDqovJpT.js} +1 -1
- package/dist/{line-metrics-DS0NS2Iq.js → line-metrics-DjKxiIUD.js} +4089 -3210
- package/dist/math.mjs +1 -1
- package/dist/node.mjs +322 -322
- package/dist/{pptx-D1rCrHGR.js → pptx-t5ABdzfd.js} +192 -183
- package/dist/pptx.mjs +5 -5
- package/dist/pptx_parser_bg.wasm +0 -0
- package/dist/region-map.mjs +12708 -0
- package/dist/{render-DhlT5jxZ.js → render-BjIEuFIG.js} +1 -1
- package/dist/render-worker-host-BB320snY.js +27 -0
- package/dist/render-worker-host-BjEPZBwf.js +27 -0
- package/dist/render-worker-host-hZ0o4OD7.js +27 -0
- package/dist/{resource-measurement-BA-4Q-II.js → resource-measurement-D8EiTm_E.js} +1 -1
- package/dist/{session-C_HGxbRD.js → session-Bhe_eY-s.js} +10 -10
- package/dist/{slide-pull-client-BiC4sVGi.js → slide-pull-client-BQ8gJPTq.js} +584 -583
- package/dist/three-d.mjs +2158 -0
- package/dist/types/docx.d.ts +185 -16
- package/dist/types/index.d.ts +196 -20
- package/dist/types/math.d.ts +1 -1
- package/dist/types/node.d.ts +157 -1
- package/dist/types/pptx.d.ts +187 -16
- package/dist/types/region-map.d.ts +520 -0
- package/dist/types/three-d.d.ts +520 -0
- package/dist/types/xlsx.d.ts +186 -16
- package/dist/{worksheet-pull-client-BnvgeqfG.js → worksheet-pull-client-T0EzdEEQ.js} +13 -13
- package/dist/{xlsx-BG_WYSc0.js → xlsx-CsDDMJIK.js} +442 -414
- package/dist/xlsx.mjs +5 -5
- package/dist/xlsx_parser_bg.wasm +0 -0
- package/package.json +13 -1
- package/dist/render-worker-host-CtJo7hc9.js +0 -27
- package/dist/render-worker-host-D8vv-Asx.js +0 -27
- package/dist/render-worker-host-DAjG9nmw.js +0 -27
- /package/dist/{highlight-rect-CAkCWJ37.js → highlight-rect-cCvVU-MW.js} +0 -0
- /package/dist/{mathjax-CMjda8Ip.js → mathjax-Dqo857oC.js} +0 -0
- /package/dist/{transfer-DCu4c2BL.js → transfer-3QEJrsJa.js} +0 -0
- /package/dist/{visible-index-CgyJLAS_.js → visible-index-CKvgpUrf.js} +0 -0
|
@@ -1,11 +1,13 @@
|
|
|
1
1
|
import { t as e } from "./chunk-DmhlhrBa.js";
|
|
2
|
-
import { $t as t, A as n, B as r, C as i, Ct as a, D as o, Dt as s, Et as c, It as l, J as u, Kt as d, Lt as f, M as p, O as m, Ot as h,
|
|
3
|
-
import { C as
|
|
4
|
-
import { a as
|
|
5
|
-
import { i as
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
2
|
+
import { $t as t, A as n, B as r, C as i, Ct as a, D as o, Dt as s, Et as c, It as l, J as u, Kt as d, Lt as f, M as p, O as m, Ot as h, Qt as g, R as _, S as v, T as y, Tt as b, Ut as x, V as S, Xt as C, Yt as w, Zt as T, _ as E, _t as D, a as O, an as k, c as A, d as j, en as M, f as ee, g as te, gt as N, h as P, ht as F, in as I, it as L, j as R, kt as z, m as ne, mt as B, n as V, nn as H, on as re, p as ie, pt as U, q as ae, qt as oe, rn as se, s as ce, sn as le, tn as ue, u as de, vt as fe, w as pe, y as me, z as he } from "./line-metrics-DjKxiIUD.js";
|
|
3
|
+
import { C as W, E as G, S as K, T as ge, _ as _e, a as ve, b as ye, d as q, f as be, h as xe, i as Se, l as Ce, m as we, p as Te, t as Ee, u as De, v as Oe, w as ke, x as Ae, y as je } from "./canvas-viewer-mechanics-D9tsuHnG.js";
|
|
4
|
+
import { a as Me, i as Ne, t as Pe } from "./bounded-raw-part-cache-C6ro6Ezf.js";
|
|
5
|
+
import { a as Fe, i as Ie, o as Le } from "./chart-number-format-tjYUR9eS.js";
|
|
6
|
+
import { _ as Re, a as ze, g as J, h as Be } from "./dash-Cyc-sevN.js";
|
|
7
|
+
import { i as Ve } from "./resource-measurement-D8EiTm_E.js";
|
|
8
|
+
import { t as He } from "./mathjax-Dqo857oC.js";
|
|
9
|
+
import { n as Ue, r as We, t as Ge } from "./visible-index-CKvgpUrf.js";
|
|
10
|
+
import { a as Ke, c as qe, d as Je, i as Ye, l as Xe, n as Ze, o as Qe, s as $e, t as et, u as tt } from "./worksheet-pull-client-T0EzdEEQ.js";
|
|
9
11
|
//#region packages/core/src/sparkline/renderer.ts
|
|
10
12
|
function nt(e, t, n) {
|
|
11
13
|
let { values: r } = n;
|
|
@@ -29,7 +31,7 @@ function nt(e, t, n) {
|
|
|
29
31
|
e.moveTo(s, t), e.lineTo(s + l, t), e.stroke(), e.restore();
|
|
30
32
|
}
|
|
31
33
|
let v = r.length, y = (e) => v === 1 ? s + l / 2 : s + e / (v - 1) * l;
|
|
32
|
-
e.save(), e.strokeStyle = i, e.lineCap = "round", e.lineJoin = "round", e.lineWidth = (n.lineWeight ?? .75) *
|
|
34
|
+
e.save(), e.strokeStyle = i, e.lineCap = "round", e.lineJoin = "round", e.lineWidth = (n.lineWeight ?? .75) * Re, e.beginPath();
|
|
33
35
|
let b = !1, x = n.displayEmptyCellsAs ?? "gap";
|
|
34
36
|
for (let t = 0; t < v; t++) {
|
|
35
37
|
let n = r[t];
|
|
@@ -642,16 +644,16 @@ function Vt(e) {
|
|
|
642
644
|
}
|
|
643
645
|
function Ht() {
|
|
644
646
|
let e = /* @__PURE__ */ new Date();
|
|
645
|
-
return
|
|
647
|
+
return Le(new Date(Date.UTC(e.getFullYear(), e.getMonth(), e.getDate())), !1);
|
|
646
648
|
}
|
|
647
649
|
function Ut() {
|
|
648
|
-
return
|
|
650
|
+
return Le(new Date(Date.now()), !1);
|
|
649
651
|
}
|
|
650
652
|
function Wt(e, t, n) {
|
|
651
|
-
return Math.floor(
|
|
653
|
+
return Math.floor(Le(new Date(Date.UTC(e, t - 1, n)), !1));
|
|
652
654
|
}
|
|
653
655
|
function Gt(e) {
|
|
654
|
-
return
|
|
656
|
+
return Fe(Math.floor(e), !1);
|
|
655
657
|
}
|
|
656
658
|
function Kt(e) {
|
|
657
659
|
let t = Gt(e);
|
|
@@ -833,7 +835,7 @@ function sn(e) {
|
|
|
833
835
|
};
|
|
834
836
|
}
|
|
835
837
|
function cn(e, t, n = !1) {
|
|
836
|
-
let r =
|
|
838
|
+
let r = Fe(e, n), i = r.getUTCFullYear(), a = r.getUTCMonth() + 1, o = r.getUTCDate(), s = r.getUTCDay(), c = r.getUTCHours(), l = r.getUTCMinutes(), u = r.getUTCSeconds(), d = t.split(";")[0], f = /am\/pm|a\/p/i.test(d), p = null, m = () => p ??= sn(r), h = "", g = 0, _ = !1;
|
|
837
839
|
for (; g < d.length;) {
|
|
838
840
|
let t = d[g];
|
|
839
841
|
if (t === "\"") {
|
|
@@ -921,7 +923,7 @@ function hn(e) {
|
|
|
921
923
|
}
|
|
922
924
|
function gn(e, t, n, r = !1) {
|
|
923
925
|
if (t === 14 && !n) {
|
|
924
|
-
let t = typeof navigator > "u" ? void 0 : navigator.language, n =
|
|
926
|
+
let t = typeof navigator > "u" ? void 0 : navigator.language, n = Fe(e, r);
|
|
925
927
|
return { text: Jt(t).format(n) };
|
|
926
928
|
}
|
|
927
929
|
let i = en[t];
|
|
@@ -1156,11 +1158,11 @@ function Dn(e, t, n) {
|
|
|
1156
1158
|
}
|
|
1157
1159
|
if (r.exp) {
|
|
1158
1160
|
let e = Math.max(r.intSpec.length, 1), t = r.fracSpec.length, n = 0, i = 0;
|
|
1159
|
-
o !== 0 && (i = Math.floor(Math.log10(o)), i = Math.floor(i / e) * e, n = o / 10 ** i, parseFloat(
|
|
1160
|
-
let [s, c = ""] =
|
|
1161
|
+
o !== 0 && (i = Math.floor(Math.log10(o)), i = Math.floor(i / e) * e, n = o / 10 ** i, parseFloat(Ie(n, t)) >= 10 ** e && (i += e, n = o / 10 ** i));
|
|
1162
|
+
let [s, c = ""] = Ie(n, t).split(".");
|
|
1161
1163
|
return a + On(r, wn(s, r.intSpec, !1), Tn(c, r.fracSpec), "E" + (i < 0 ? "-" : r.exp.plus ? "+" : "") + String(Math.abs(i)).padStart(r.exp.width, "0"));
|
|
1162
1164
|
}
|
|
1163
|
-
let s = r.fracSpec.length, [c, l = ""] =
|
|
1165
|
+
let s = r.fracSpec.length, [c, l = ""] = Ie(o, s).split("."), u = c.replace(/^0+/, ""), d = /[0]/.test(r.intSpec) || r.intSpec === "" && !1;
|
|
1164
1166
|
return u === "" && d && (u = "0"), a + On(r, wn(u, r.intSpec, r.grouping), Tn(l, r.fracSpec), "");
|
|
1165
1167
|
}
|
|
1166
1168
|
function On(e, t, n, r) {
|
|
@@ -1211,7 +1213,7 @@ function kn(e, t) {
|
|
|
1211
1213
|
var An = u;
|
|
1212
1214
|
function jn(e, t) {
|
|
1213
1215
|
let n = An;
|
|
1214
|
-
return new
|
|
1216
|
+
return new le(`XLSX renderer ${e.resource} exceeded its hard limit of ${n} entries`, {
|
|
1215
1217
|
stage: "rendering",
|
|
1216
1218
|
violation: {
|
|
1217
1219
|
format: "xlsx",
|
|
@@ -1477,7 +1479,7 @@ var Zn = (e) => {
|
|
|
1477
1479
|
return typeof t == "string" ? t : void 0;
|
|
1478
1480
|
};
|
|
1479
1481
|
function Qn(e, t) {
|
|
1480
|
-
let n = e === 2 ||
|
|
1482
|
+
let n = e === 2 || R(t);
|
|
1481
1483
|
return {
|
|
1482
1484
|
needBidi: n,
|
|
1483
1485
|
baseRtl: n && Xn(e, t)
|
|
@@ -1509,10 +1511,10 @@ function tr(e, t = 8) {
|
|
|
1509
1511
|
return e / t;
|
|
1510
1512
|
}
|
|
1511
1513
|
function nr(e) {
|
|
1512
|
-
return Math.round(e *
|
|
1514
|
+
return Math.round(e * Re);
|
|
1513
1515
|
}
|
|
1514
1516
|
function rr(e) {
|
|
1515
|
-
return e /
|
|
1517
|
+
return e / Re;
|
|
1516
1518
|
}
|
|
1517
1519
|
//#endregion
|
|
1518
1520
|
//#region packages/xlsx/src/internal/grid-axis-geometry.ts
|
|
@@ -1794,24 +1796,24 @@ function cr(e, t) {
|
|
|
1794
1796
|
//#region packages/xlsx/src/vertical-text.ts
|
|
1795
1797
|
function lr(e, t, n, r, i, a = !1) {
|
|
1796
1798
|
let o = t.codePointAt(0) ?? 0, s = ee(o);
|
|
1797
|
-
if (a &&
|
|
1798
|
-
e.save(), e.translate(n, r + i / 2), e.textAlign = "center", e.textBaseline = "middle",
|
|
1799
|
+
if (a && ie(o)) {
|
|
1800
|
+
e.save(), e.translate(n, r + i / 2), e.textAlign = "center", e.textBaseline = "middle", A(e, () => e.fillText(t, 0, 0)), e.restore();
|
|
1799
1801
|
return;
|
|
1800
1802
|
}
|
|
1801
1803
|
if (s === "Tr") {
|
|
1802
|
-
let a =
|
|
1804
|
+
let a = de(o);
|
|
1803
1805
|
if (a !== null) {
|
|
1804
1806
|
e.fillText(String.fromCodePoint(a), n, r);
|
|
1805
1807
|
return;
|
|
1806
1808
|
}
|
|
1807
|
-
if (
|
|
1809
|
+
if (ne(o)) {
|
|
1808
1810
|
e.fillText(t, n, r);
|
|
1809
1811
|
return;
|
|
1810
1812
|
}
|
|
1811
1813
|
e.save(), e.translate(n, r + i / 2), e.rotate(Math.PI / 2), e.textAlign = "center", e.textBaseline = "middle", e.fillText(t, 0, 0), e.restore();
|
|
1812
1814
|
return;
|
|
1813
1815
|
}
|
|
1814
|
-
let c = s === "Tu" ?
|
|
1816
|
+
let c = s === "Tu" ? j(o) : null;
|
|
1815
1817
|
e.fillText(c === null ? t : String.fromCodePoint(c), n, r);
|
|
1816
1818
|
}
|
|
1817
1819
|
//#endregion
|
|
@@ -1824,12 +1826,12 @@ function ur(e) {
|
|
|
1824
1826
|
function dr(e, t) {
|
|
1825
1827
|
return t ? `${e}|duo:${t.clr1}:${t.clr2}` : e;
|
|
1826
1828
|
}
|
|
1827
|
-
var fr =
|
|
1829
|
+
var fr = g.map((e) => `"${e}"`).join(", "), pr = t.map((e) => `"${e}"`).join(", "), mr = `"Calibri", "Carlito", "Cambria", "Caladea", Arial, "Noto Naskh Arabic", "Noto Sans Arabic", ${fr}, sans-serif`, hr = `"Cambria", "Caladea", "Times New Roman", "Liberation Serif", "Noto Naskh Arabic", "Noto Sans Arabic", ${pr}, serif`, gr = "\"Courier New\", \"Liberation Mono\", monospace";
|
|
1828
1830
|
function _r(e) {
|
|
1829
|
-
let t = e ?
|
|
1831
|
+
let t = e ? H(e) : null, n = se(e);
|
|
1830
1832
|
if (!t) return n === "serif" ? hr : n === "mono" ? gr : mr;
|
|
1831
1833
|
let r = n === "serif";
|
|
1832
|
-
return `${
|
|
1834
|
+
return `${ue(t, r ? "serif" : "sans").map((e) => `"${e}"`).join(", ")}, "Calibri", "Carlito", "Cambria", "Caladea", Arial, "Noto Naskh Arabic", "Noto Sans Arabic", ${r ? pr : fr}, ${r ? "serif" : "sans-serif"}`;
|
|
1833
1835
|
}
|
|
1834
1836
|
function vr(e) {
|
|
1835
1837
|
return e ? `"${e}", ${_r(e)}` : mr;
|
|
@@ -1843,7 +1845,7 @@ function xr(e, t, n, r) {
|
|
|
1843
1845
|
}
|
|
1844
1846
|
var Sr = "#7a7a7a";
|
|
1845
1847
|
function Cr(e, t) {
|
|
1846
|
-
let n = t *
|
|
1848
|
+
let n = t * Re, r = typeof OffscreenCanvas < "u" ? new OffscreenCanvas(1, 1) : typeof document < "u" ? document.createElement("canvas") : null;
|
|
1847
1849
|
if (!r) return 8;
|
|
1848
1850
|
let i = r.getContext("2d");
|
|
1849
1851
|
if (!i) return 8;
|
|
@@ -1865,8 +1867,8 @@ function Tr(e, t, n, r, i, a, o) {
|
|
|
1865
1867
|
if (!(i <= 0 || a <= 0)) {
|
|
1866
1868
|
if (o) {
|
|
1867
1869
|
let a = e.createLinearGradient(n, r, n + i, r);
|
|
1868
|
-
a.addColorStop(0,
|
|
1869
|
-
} else e.fillStyle =
|
|
1870
|
+
a.addColorStop(0, w(t, .85)), a.addColorStop(1, w(t, .15)), e.fillStyle = a;
|
|
1871
|
+
} else e.fillStyle = w(t);
|
|
1870
1872
|
e.fillRect(n, r, i, a);
|
|
1871
1873
|
}
|
|
1872
1874
|
}
|
|
@@ -2060,11 +2062,11 @@ function kr(e, t, n, r) {
|
|
|
2060
2062
|
if (Dr.has(s)) return Dr.get(s);
|
|
2061
2063
|
let c = Or[t];
|
|
2062
2064
|
if (!c) return Dr.set(s, null), null;
|
|
2063
|
-
let l = c.length, u =
|
|
2065
|
+
let l = c.length, u = T(l, l);
|
|
2064
2066
|
if (!u) return Dr.set(s, null), null;
|
|
2065
2067
|
let d = u.getContext("2d");
|
|
2066
2068
|
if (!d) return Dr.set(s, null), null;
|
|
2067
|
-
d.fillStyle =
|
|
2069
|
+
d.fillStyle = w(r), d.fillRect(0, 0, l, l), d.fillStyle = w(n);
|
|
2068
2070
|
for (let e = 0; e < l; e++) {
|
|
2069
2071
|
let t = c[e];
|
|
2070
2072
|
for (let n = 0; n < l; n++) t & 1 << l - 1 - n && d.fillRect(n, e, 1, 1);
|
|
@@ -2081,12 +2083,12 @@ function Ar(e, t, n, r, i, a) {
|
|
|
2081
2083
|
let o = t.patternType;
|
|
2082
2084
|
if (!o || o === "none") return !1;
|
|
2083
2085
|
let s = t.fgColor ?? "000000", c = t.bgColor ?? "FFFFFF";
|
|
2084
|
-
if (o === "solid") return e.fillStyle =
|
|
2086
|
+
if (o === "solid") return e.fillStyle = w(s), e.fillRect(n, r, i, a), !0;
|
|
2085
2087
|
let l = kr(e, o, s, c);
|
|
2086
2088
|
if (l) e.fillStyle = l;
|
|
2087
2089
|
else {
|
|
2088
2090
|
let t = Er(o);
|
|
2089
|
-
e.fillStyle = t >= 1 ?
|
|
2091
|
+
e.fillStyle = t >= 1 ? w(s) : Pr(s, c, t);
|
|
2090
2092
|
}
|
|
2091
2093
|
return e.fillRect(n, r, i, a), !0;
|
|
2092
2094
|
}
|
|
@@ -2101,7 +2103,7 @@ function jr(e, t, n, r, i, a) {
|
|
|
2101
2103
|
}
|
|
2102
2104
|
for (let e of t.stops) {
|
|
2103
2105
|
let t = Math.min(1, Math.max(0, e.position));
|
|
2104
|
-
o.addColorStop(t,
|
|
2106
|
+
o.addColorStop(t, w(e.color));
|
|
2105
2107
|
}
|
|
2106
2108
|
return o;
|
|
2107
2109
|
}
|
|
@@ -2115,11 +2117,11 @@ function Pr(e, t, n) {
|
|
|
2115
2117
|
return `rgb(${Math.round(a * d + c * (1 - d))},${Math.round(o * d + l * (1 - d))},${Math.round(s * d + u * (1 - d))})`;
|
|
2116
2118
|
}
|
|
2117
2119
|
function Fr(e, t, n = 1, r) {
|
|
2118
|
-
let i = Math.round(e *
|
|
2119
|
-
return r ? Math.max(i, Math.round(
|
|
2120
|
+
let i = Math.round(e * Re * n * t);
|
|
2121
|
+
return r ? Math.max(i, Math.round(V(r, e * Re * t))) : i;
|
|
2120
2122
|
}
|
|
2121
2123
|
function Ir(e, t = 1) {
|
|
2122
|
-
return `${e.italic ? "italic " : ""}${e.bold ? "bold " : ""}${Math.max(1, Math.round(e.size *
|
|
2124
|
+
return `${e.italic ? "italic " : ""}${e.bold ? "bold " : ""}${Math.max(1, Math.round(e.size * Re * t))}px ${vr(e.name)}`;
|
|
2123
2125
|
}
|
|
2124
2126
|
function Lr(e, t, n, r, i, a, o, s, c, l) {
|
|
2125
2127
|
if (t.length === 0) return;
|
|
@@ -2158,10 +2160,10 @@ function Rr(e, t, n) {
|
|
|
2158
2160
|
}
|
|
2159
2161
|
function zr(e, t, n, r, i, a, o = 1) {
|
|
2160
2162
|
if (e.save(), e.strokeStyle = i, e.lineWidth = .5, e.beginPath(), a) {
|
|
2161
|
-
let i = r - 1, a = r + 1, s = i +
|
|
2163
|
+
let i = r - 1, a = r + 1, s = i + B(i, .5, o), c = a + B(a, .5, o);
|
|
2162
2164
|
e.moveTo(t, s), e.lineTo(n, s), e.moveTo(t, c), e.lineTo(n, c);
|
|
2163
2165
|
} else {
|
|
2164
|
-
let i = r +
|
|
2166
|
+
let i = r + B(r, .5, o);
|
|
2165
2167
|
e.moveTo(t, i), e.lineTo(n, i);
|
|
2166
2168
|
}
|
|
2167
2169
|
e.stroke(), e.restore();
|
|
@@ -2228,7 +2230,7 @@ function Wr(e, t) {
|
|
|
2228
2230
|
let n = t;
|
|
2229
2231
|
for (; n < e.length;) {
|
|
2230
2232
|
let t = e[e.length - n - 1], r = e[e.length - n], i = t?.codePointAt(0), a = r?.codePointAt(0);
|
|
2231
|
-
if (i !== void 0 && a !== void 0 &&
|
|
2233
|
+
if (i !== void 0 && a !== void 0 && y(i) && y(a)) n++;
|
|
2232
2234
|
else break;
|
|
2233
2235
|
}
|
|
2234
2236
|
return n >= e.length ? t : n;
|
|
@@ -2248,7 +2250,7 @@ function Kr(e, t, n) {
|
|
|
2248
2250
|
let r = [], i = [], a = 0;
|
|
2249
2251
|
for (; a < t.length;) {
|
|
2250
2252
|
let e = t[a], n = e.codePointAt(0) ?? 0;
|
|
2251
|
-
if (
|
|
2253
|
+
if (pe(n)) i.push(e), a += n > 65535 ? 2 : 1;
|
|
2252
2254
|
else if (e === " ") {
|
|
2253
2255
|
let e = a;
|
|
2254
2256
|
for (; e < t.length && t[e] === " ";) e++;
|
|
@@ -2257,10 +2259,10 @@ function Kr(e, t, n) {
|
|
|
2257
2259
|
let e = a;
|
|
2258
2260
|
for (; e < t.length;) {
|
|
2259
2261
|
let n = t[e], r = n.codePointAt(0) ?? 0;
|
|
2260
|
-
if (n === " " ||
|
|
2262
|
+
if (n === " " || pe(r)) break;
|
|
2261
2263
|
e += r > 65535 ? 2 : 1;
|
|
2262
2264
|
}
|
|
2263
|
-
let n = t.slice(a, e), r =
|
|
2265
|
+
let n = t.slice(a, e), r = P(n) ? v(n) : null;
|
|
2264
2266
|
if (r && r.length > 0) {
|
|
2265
2267
|
let e = 0;
|
|
2266
2268
|
for (let t of r) i.push(n.slice(e, t)), e = t;
|
|
@@ -2314,7 +2316,7 @@ function qr(e, t, n, r, i) {
|
|
|
2314
2316
|
let a = e.measureText(t).width;
|
|
2315
2317
|
if (o.length > 0 && s + a > i) {
|
|
2316
2318
|
let i = o.flatMap((e) => [...e.text]), a = Ur(i, [...t]);
|
|
2317
|
-
a > 0 ? a = Wr(i, a) : !
|
|
2319
|
+
a > 0 ? a = Wr(i, a) : !P(t) && !P(o[o.length - 1]?.text ?? "") && !/^\s/u.test(t) && !/\s$/u.test(i.at(-1) ?? "") && (a = Gr(i, [...t]));
|
|
2318
2320
|
let u = o[o.length - 1], d = [...u.text];
|
|
2319
2321
|
a > d.length && (a = d.length);
|
|
2320
2322
|
let f = null;
|
|
@@ -2340,21 +2342,21 @@ function qr(e, t, n, r, i) {
|
|
|
2340
2342
|
width: a
|
|
2341
2343
|
}), s += a, n.size > c && (c = n.size, l = n.name);
|
|
2342
2344
|
}, g = (t, n) => {
|
|
2343
|
-
let a =
|
|
2345
|
+
let a = v(t);
|
|
2344
2346
|
if (a.length === 0) {
|
|
2345
2347
|
h(t, n);
|
|
2346
2348
|
return;
|
|
2347
2349
|
}
|
|
2348
2350
|
e.font = Ir(Xr(n), r);
|
|
2349
|
-
let o = (t) => e.measureText(t).width, c =
|
|
2351
|
+
let o = (t) => e.measureText(t).width, c = me(t), l = t.length, u = 0;
|
|
2350
2352
|
for (; u < l;) {
|
|
2351
|
-
let e = i - s, r =
|
|
2353
|
+
let e = i - s, r = te(t, a, u, e, o, c);
|
|
2352
2354
|
if (r <= u) {
|
|
2353
2355
|
if (s > 0) {
|
|
2354
2356
|
p();
|
|
2355
2357
|
continue;
|
|
2356
2358
|
}
|
|
2357
|
-
let n = a.find((e) => e > u) ?? l, i = t.slice(u, n), d =
|
|
2359
|
+
let n = a.find((e) => e > u) ?? l, i = t.slice(u, n), d = E(i), f = te(i, d, 0, e, o, c);
|
|
2358
2360
|
f <= 0 && (f = d.length > 0 ? d[0] : i.length), r = u + f;
|
|
2359
2361
|
}
|
|
2360
2362
|
h(t.slice(u, r), n), u = r, u < l && p();
|
|
@@ -2365,7 +2367,7 @@ function qr(e, t, n, r, i) {
|
|
|
2365
2367
|
for (; i < e.text.length;) {
|
|
2366
2368
|
let t = e.text[i], n = t.codePointAt(0) ?? 0;
|
|
2367
2369
|
if (n === 10) r.push("\n"), i += 1;
|
|
2368
|
-
else if (
|
|
2370
|
+
else if (pe(n)) r.push(t), i += n > 65535 ? 2 : 1;
|
|
2369
2371
|
else if (t === " ") {
|
|
2370
2372
|
let t = i;
|
|
2371
2373
|
for (; t < e.text.length && e.text[t] === " ";) t++;
|
|
@@ -2374,13 +2376,13 @@ function qr(e, t, n, r, i) {
|
|
|
2374
2376
|
let t = i;
|
|
2375
2377
|
for (; t < e.text.length;) {
|
|
2376
2378
|
let n = e.text[t], r = n.codePointAt(0) ?? 0;
|
|
2377
|
-
if (n === " " || n === "\n" ||
|
|
2379
|
+
if (n === " " || n === "\n" || pe(r)) break;
|
|
2378
2380
|
t += r > 65535 ? 2 : 1;
|
|
2379
2381
|
}
|
|
2380
2382
|
r.push(e.text.slice(i, t)), i = t;
|
|
2381
2383
|
}
|
|
2382
2384
|
}
|
|
2383
|
-
for (let e of r) e === "\n" ? (m(), f++) :
|
|
2385
|
+
for (let e of r) e === "\n" ? (m(), f++) : P(e) ? g(e, t) : h(e, t);
|
|
2384
2386
|
}
|
|
2385
2387
|
return (o.length > 0 || a.length > 0) && m(), a;
|
|
2386
2388
|
}
|
|
@@ -2426,19 +2428,19 @@ function Zr(e, t, n, r, i, a, o, s) {
|
|
|
2426
2428
|
let f = t[d], p = Xr(f.font);
|
|
2427
2429
|
e.font = Ir(p, a);
|
|
2428
2430
|
let m = s.fontColor ?? f.font.color;
|
|
2429
|
-
e.fillStyle = m ?
|
|
2431
|
+
e.fillStyle = m ? w(m) : "#000000";
|
|
2430
2432
|
let h = Fr(f.font.size, a), g = 0;
|
|
2431
2433
|
f.font.vertAlign === "superscript" ? g = -Math.round(h * .35) : f.font.vertAlign === "subscript" && (g = Math.round(h * .1)), e.fillText(f.text, u, r + g);
|
|
2432
2434
|
let _ = Fr(p.size, a);
|
|
2433
2435
|
if (f.font.underline || f.font.strike) {
|
|
2434
2436
|
let t = Jr(i, r, _);
|
|
2435
2437
|
if (f.font.underline) {
|
|
2436
|
-
let n = m ?
|
|
2438
|
+
let n = m ? w(m) : "#000000", r = f.font.underlineStyle === "double" || f.font.underlineStyle === "doubleAccounting";
|
|
2437
2439
|
zr(e, u, u + f.width, t.underline + g, n, r, o);
|
|
2438
2440
|
}
|
|
2439
2441
|
if (f.font.strike) {
|
|
2440
|
-
let n = t.strike + g, r = n +
|
|
2441
|
-
e.save(), e.strokeStyle = m ?
|
|
2442
|
+
let n = t.strike + g, r = n + B(n, .5, o);
|
|
2443
|
+
e.save(), e.strokeStyle = m ? w(m) : "#000000", e.lineWidth = .5, e.beginPath(), e.moveTo(u, r), e.lineTo(u + f.width, r), e.stroke(), e.restore();
|
|
2442
2444
|
}
|
|
2443
2445
|
}
|
|
2444
2446
|
u += f.width;
|
|
@@ -2671,8 +2673,8 @@ function mi(e) {
|
|
|
2671
2673
|
}
|
|
2672
2674
|
function hi(e, t, n, r, i, a, o, s, c, l, u, d, f, p, m, h) {
|
|
2673
2675
|
if (m <= 0 || h <= 0) return;
|
|
2674
|
-
let { styles: g, cellMap: _, mergeAnchorMap: v, mergeSkipSet: y, cfContext: b, cs: x, dpr: S } = t,
|
|
2675
|
-
for (let e = 0; e <
|
|
2676
|
+
let { styles: g, cellMap: _, mergeAnchorMap: v, mergeSkipSet: y, cfContext: b, cs: x, dpr: S } = t, C = i.length, T = a.length, E = new Set(s), D = new Set(o), O = (e, n) => t.rtl ? br(e, n, t.canvasW) : e, k = [], A = -c;
|
|
2677
|
+
for (let e = 0; e < C; e++) k.push(A), A += i[e];
|
|
2676
2678
|
let j = [], M = -l;
|
|
2677
2679
|
for (let e = 0; e < T; e++) j.push(M), M += a[e];
|
|
2678
2680
|
e.save(), e.beginPath(), e.rect(O(f, m), p, m, h), e.clip();
|
|
@@ -2684,14 +2686,14 @@ function hi(e, t, n, r, i, a, o, s, c, l, u, d, f, p, m, h) {
|
|
|
2684
2686
|
if (!p) continue;
|
|
2685
2687
|
let m = u - c + t.colAxis.offsetOf(f) - t.colAxis.offsetOf(r), h = d - l + t.rowAxis.offsetOf(a) - t.rowAxis.offsetOf(n), _ = p.totalW, v = p.totalH;
|
|
2686
2688
|
m = O(m, _);
|
|
2687
|
-
let y = `${a}:${f}`,
|
|
2689
|
+
let y = `${a}:${f}`, C = t.cellMap.get(y), { font: T, fill: k, border: A, xf: j } = Vr(g, C?.styleIndex ?? 0), M = Yn(C, a, f, b, g.dxfs ?? []);
|
|
2688
2690
|
if (Ar(e, M.fill ?? k, m, h, _, v), M.dataBar && M.dataBar.ratio > 0) {
|
|
2689
2691
|
let t = Math.max(0, (_ - 4) * M.dataBar.ratio);
|
|
2690
2692
|
Tr(e, M.dataBar.color, m + 2, h + 2, t, v - 4, M.dataBar.gradient);
|
|
2691
2693
|
}
|
|
2692
2694
|
let ee = Gi(Wi(A, a, f, p.right, p.bottom, t.cellMap, g), M.border);
|
|
2693
|
-
if (te.push(() => qi(e, ee, m, h, _, v, S)), !
|
|
2694
|
-
let N = Zt(
|
|
2695
|
+
if (te.push(() => qi(e, ee, m, h, _, v, S)), !C) continue;
|
|
2696
|
+
let N = Zt(C, g, M.numFmt, t.worksheet.date1904), P = N.text;
|
|
2695
2697
|
if (!P || P === "0" && t.worksheet.showZeros === !1) continue;
|
|
2696
2698
|
let F = T.bold || !!M.fontBold, I = T.italic || !!M.fontItalic, L = T.underline || !!M.fontUnderline, R = T.strike || !!M.fontStrike, z = F !== T.bold || I !== T.italic || L !== T.underline || R !== T.strike ? {
|
|
2697
2699
|
...T,
|
|
@@ -2702,15 +2704,15 @@ function hi(e, t, n, r, i, a, o, s, c, l, u, d, f, p, m, h) {
|
|
|
2702
2704
|
} : T;
|
|
2703
2705
|
e.font = Ir(z, x);
|
|
2704
2706
|
let ne = t.hyperlinkMap.get(y) ? "#0563C1" : M.fontColor ?? N.color ?? T.color;
|
|
2705
|
-
e.fillStyle = ne ?
|
|
2706
|
-
let B =
|
|
2707
|
+
e.fillStyle = ne ? w(ne) : "#000000";
|
|
2708
|
+
let B = C.value.type === "number", V = j.alignH ?? (B ? "right" : "left"), H = j.alignV ?? "bottom", re = j.indent ? Math.round(j.indent * 3 * t.mdw) : 0, ie = 3 + (V === "left" || !j.alignH ? re : 0);
|
|
2707
2709
|
e.save(), e.beginPath(), e.rect(m, h, _, v), e.clip();
|
|
2708
2710
|
let U;
|
|
2709
2711
|
V === "right" ? (U = m + _ - 3, e.textAlign = "right") : V === "center" ? (U = m + _ / 2, e.textAlign = "center") : (U = m + ie, e.textAlign = "left");
|
|
2710
|
-
let
|
|
2711
|
-
if (j.wrapText &&
|
|
2712
|
+
let ae = C.value.type === "text" ? C.value.runs : void 0, oe = ae && ae.length > 0;
|
|
2713
|
+
if (j.wrapText && oe) ii(e, ae, z, {
|
|
2712
2714
|
alignH: V,
|
|
2713
|
-
alignV:
|
|
2715
|
+
alignV: H,
|
|
2714
2716
|
cx: m,
|
|
2715
2717
|
cy: h,
|
|
2716
2718
|
cellW: _,
|
|
@@ -2724,7 +2726,7 @@ function hi(e, t, n, r, i, a, o, s, c, l, u, d, f, p, m, h) {
|
|
|
2724
2726
|
});
|
|
2725
2727
|
else if (j.wrapText) ri(e, P, U, z, {
|
|
2726
2728
|
alignH: V,
|
|
2727
|
-
alignV:
|
|
2729
|
+
alignV: H,
|
|
2728
2730
|
cx: m,
|
|
2729
2731
|
cy: h,
|
|
2730
2732
|
cellW: _,
|
|
@@ -2733,9 +2735,9 @@ function hi(e, t, n, r, i, a, o, s, c, l, u, d, f, p, m, h) {
|
|
|
2733
2735
|
paddingX: 3,
|
|
2734
2736
|
paddingY: 2
|
|
2735
2737
|
}, x);
|
|
2736
|
-
else if (
|
|
2738
|
+
else if (oe) ni(e, ae, z, {
|
|
2737
2739
|
alignH: V,
|
|
2738
|
-
alignV:
|
|
2740
|
+
alignV: H,
|
|
2739
2741
|
cx: m,
|
|
2740
2742
|
cy: h,
|
|
2741
2743
|
cellW: _,
|
|
@@ -2750,7 +2752,7 @@ function hi(e, t, n, r, i, a, o, s, c, l, u, d, f, p, m, h) {
|
|
|
2750
2752
|
else {
|
|
2751
2753
|
let { baseline: t, textY: n } = Yr({
|
|
2752
2754
|
alignH: V,
|
|
2753
|
-
alignV:
|
|
2755
|
+
alignV: H,
|
|
2754
2756
|
cx: m,
|
|
2755
2757
|
cy: h,
|
|
2756
2758
|
cellW: _,
|
|
@@ -2776,9 +2778,9 @@ function hi(e, t, n, r, i, a, o, s, c, l, u, d, f, p, m, h) {
|
|
|
2776
2778
|
}
|
|
2777
2779
|
D = -1;
|
|
2778
2780
|
};
|
|
2779
|
-
for (let e = 0; e <=
|
|
2781
|
+
for (let e = 0; e <= C; e++) {
|
|
2780
2782
|
let t = !1, n = !1;
|
|
2781
|
-
if (e <
|
|
2783
|
+
if (e < C) {
|
|
2782
2784
|
let i = `${r}:${o[e]}`;
|
|
2783
2785
|
if (!y.has(i) && !v.has(i)) {
|
|
2784
2786
|
let e = _.get(i);
|
|
@@ -2787,82 +2789,82 @@ function hi(e, t, n, r, i, a, o, s, c, l, u, d, f, p, m, h) {
|
|
|
2787
2789
|
}
|
|
2788
2790
|
t ? n && D >= 0 && e > D ? (A(e), D = e) : D < 0 && (D = e) : A(e);
|
|
2789
2791
|
}
|
|
2790
|
-
for (let a = 0; a <
|
|
2792
|
+
for (let a = 0; a < C; a++) {
|
|
2791
2793
|
let s = o[a], d = u + k[a], D = i[a], A = `${r}:${s}`;
|
|
2792
2794
|
if (y.has(A)) continue;
|
|
2793
2795
|
let j = v.get(A), M = j ? j.totalW : D, P = j ? j.totalH : l, F = d + M <= f || d >= f + m;
|
|
2794
2796
|
if (c + P <= p || c >= p + h || F && !t.overflowTextAnchors.has(A)) continue;
|
|
2795
|
-
let I = O(d, M), L = _.get(A), { font: R, fill: z, border: ne, xf:
|
|
2796
|
-
if (Ar(e, re, I, c, M, P) || (
|
|
2797
|
-
let t = Math.max(0, (M - 4) *
|
|
2798
|
-
Tr(e,
|
|
2797
|
+
let I = O(d, M), L = _.get(A), { font: R, fill: z, border: ne, xf: V } = Vr(g, L?.styleIndex ?? 0), H = Yn(L, r, s, b, g.dxfs ?? []), re = H.fill ?? z, U = t.tableStyleMap.get(A), ae = g.dxfs ?? [], oe = (e) => e == null ? void 0 : ae[e], se = oe(U?.wholeTableDxf), le = oe(U?.headerRowDxf), ue = oe(U?.totalRowDxf), de = oe(U?.firstColumnDxf), fe = oe(U?.lastColumnDxf), pe = oe(U?.stripeDxf), me = U?.isHeader && le?.fill?.fgColor ? le : U?.isTotals && ue?.fill?.fgColor ? ue : U?.isLastCol && fe?.fill?.fgColor ? fe : U?.isFirstCol && de?.fill?.fgColor ? de : pe?.fill?.fgColor ? pe : !U?.isHeader && !U?.isTotals && se?.fill?.fgColor ? se : void 0;
|
|
2798
|
+
if (Ar(e, re, I, c, M, P) || (U && me?.fill?.fgColor ? (e.fillStyle = w(me.fill.fgColor), e.fillRect(I, c, M, P)) : U && !U.isCustom && U.isBanded && (e.fillStyle = mi(U.accent), e.fillRect(I, c, M, P))), t.commentCells.has(A) && Nr(e, I, c, M, P), H.dataBar && H.dataBar.ratio > 0) {
|
|
2799
|
+
let t = Math.max(0, (M - 4) * H.dataBar.ratio);
|
|
2800
|
+
Tr(e, H.dataBar.color, I + 2, c + 2, t, P - 4, H.dataBar.gradient);
|
|
2799
2801
|
}
|
|
2800
|
-
let
|
|
2801
|
-
if (
|
|
2802
|
+
let he = t.sparklineMap.get(A);
|
|
2803
|
+
if (he && nt(e, {
|
|
2802
2804
|
x: I,
|
|
2803
2805
|
y: c,
|
|
2804
2806
|
w: M,
|
|
2805
2807
|
h: P
|
|
2806
|
-
},
|
|
2808
|
+
}, he), t.worksheet.isChartSheet !== !0 && t.worksheet.showGridlines !== !1) {
|
|
2807
2809
|
if (e.strokeStyle = "#d0d0d0", e.lineWidth = .5, e.beginPath(), !T.has(a)) {
|
|
2808
|
-
let t = I + M +
|
|
2810
|
+
let t = I + M + B(I + M, .5, S);
|
|
2809
2811
|
e.moveTo(t, c), e.lineTo(t, c + P);
|
|
2810
2812
|
}
|
|
2811
|
-
let t = c + P +
|
|
2813
|
+
let t = c + P + B(c + P, .5, S);
|
|
2812
2814
|
if (e.moveTo(I, t), e.lineTo(I + M, t), n === 0) {
|
|
2813
|
-
let t = c +
|
|
2815
|
+
let t = c + B(c, .5, S);
|
|
2814
2816
|
e.moveTo(I, t), e.lineTo(I + M, t);
|
|
2815
2817
|
}
|
|
2816
2818
|
if (a === 0) {
|
|
2817
|
-
let t = I +
|
|
2819
|
+
let t = I + B(I, .5, S);
|
|
2818
2820
|
e.moveTo(t, c), e.lineTo(t, c + P);
|
|
2819
2821
|
}
|
|
2820
2822
|
e.stroke();
|
|
2821
2823
|
}
|
|
2822
|
-
let
|
|
2823
|
-
(T.has(a) || E.has(a)) && (
|
|
2824
|
-
...
|
|
2825
|
-
left: E.has(a) ? null :
|
|
2826
|
-
right: T.has(a) ? null :
|
|
2824
|
+
let W = Gi(j ? Wi(ne, r, s, j.right, j.bottom, _, g) : ne, H.border);
|
|
2825
|
+
(T.has(a) || E.has(a)) && (W = {
|
|
2826
|
+
...W,
|
|
2827
|
+
left: E.has(a) ? null : W.left,
|
|
2828
|
+
right: T.has(a) ? null : W.right
|
|
2827
2829
|
});
|
|
2828
|
-
let
|
|
2829
|
-
if (
|
|
2830
|
-
...
|
|
2831
|
-
top: Zi(
|
|
2830
|
+
let G = _.get(`${r - 1}:${s}`), K = G ? Vr(g, G.styleIndex ?? 0).border.bottom : null;
|
|
2831
|
+
if (K?.style && (n === 0 || W.top?.style) && (W = {
|
|
2832
|
+
...W,
|
|
2833
|
+
top: Zi(W.top, K)
|
|
2832
2834
|
}), !E.has(a)) {
|
|
2833
2835
|
let e = _.get(`${r}:${s - 1}`), t = e ? Vr(g, e.styleIndex ?? 0).border.right : null;
|
|
2834
|
-
t?.style && (a === 0 ||
|
|
2835
|
-
...
|
|
2836
|
-
left: Zi(
|
|
2836
|
+
t?.style && (a === 0 || W.left?.style) && (W = {
|
|
2837
|
+
...W,
|
|
2838
|
+
left: Zi(W.left, t)
|
|
2837
2839
|
});
|
|
2838
2840
|
}
|
|
2839
|
-
let
|
|
2840
|
-
if (
|
|
2841
|
-
if (
|
|
2842
|
-
else if (
|
|
2841
|
+
let ge = U ? fi(U, se, le, s) : null, _e = t.autoFilterCells.has(A), ve = () => {
|
|
2842
|
+
if (ge) {
|
|
2843
|
+
if (ge.kind === "dxf") qi(e, ge.border, I, c, M, P, S);
|
|
2844
|
+
else if (ge.kind === "accent") {
|
|
2843
2845
|
let t = .5 / S;
|
|
2844
|
-
if (e.strokeStyle =
|
|
2845
|
-
let t = c +
|
|
2846
|
+
if (e.strokeStyle = ge.color, e.lineWidth = ge.lineWidth, e.beginPath(), e.moveTo(I, c + P - t), e.lineTo(I + M, c + P - t), ge.topEdge) {
|
|
2847
|
+
let t = c + B(c, ge.lineWidth, S);
|
|
2846
2848
|
e.moveTo(I, t), e.lineTo(I + M, t);
|
|
2847
2849
|
}
|
|
2848
2850
|
e.stroke();
|
|
2849
2851
|
}
|
|
2850
2852
|
}
|
|
2851
|
-
|
|
2853
|
+
_e && ui(e, I, c, D, P);
|
|
2852
2854
|
};
|
|
2853
2855
|
if (j) {
|
|
2854
|
-
let t =
|
|
2855
|
-
te.push(() => qi(e, t, I, c, M, P, S)),
|
|
2856
|
+
let t = W;
|
|
2857
|
+
te.push(() => qi(e, t, I, c, M, P, S)), ve();
|
|
2856
2858
|
} else {
|
|
2857
|
-
let t =
|
|
2859
|
+
let t = W;
|
|
2858
2860
|
N.push(() => {
|
|
2859
|
-
qi(e, t, I, c, M, P, S),
|
|
2861
|
+
qi(e, t, I, c, M, P, S), ve();
|
|
2860
2862
|
});
|
|
2861
2863
|
}
|
|
2862
2864
|
if (!L) continue;
|
|
2863
|
-
let
|
|
2864
|
-
!
|
|
2865
|
-
let n =
|
|
2865
|
+
let ye = Zt(L, g, H.numFmt, t.worksheet.date1904), q = ye.text;
|
|
2866
|
+
!q || q === "0" && t.worksheet.showZeros === !1 || ee.push(() => {
|
|
2867
|
+
let n = U?.isHeader ? le : U?.isTotals ? ue : U?.isLastCol && fe ? fe : U?.isFirstCol && de ? de : pe || (U ? se : void 0), l = U ? U.isCustom ? !!n?.font?.bold : U.isHeader || U.isTotals : !1, u = R.bold || !!H.fontBold || l, d = R.italic || !!H.fontItalic, f = R.underline || !!H.fontUnderline, p = R.strike || !!H.fontStrike, m = u !== R.bold || d !== R.italic || f !== R.underline || p !== R.strike ? {
|
|
2866
2868
|
...R,
|
|
2867
2869
|
bold: u,
|
|
2868
2870
|
italic: d,
|
|
@@ -2870,90 +2872,90 @@ function hi(e, t, n, r, i, a, o, s, c, l, u, d, f, p, m, h) {
|
|
|
2870
2872
|
strike: p
|
|
2871
2873
|
} : R;
|
|
2872
2874
|
e.font = Ir(m, x);
|
|
2873
|
-
let h = t.hyperlinkMap.get(A), b = n?.font?.color ?? null, T = h ? "#0563C1" :
|
|
2874
|
-
e.fillStyle = T ?
|
|
2875
|
-
let E = L.value.type === "number", D =
|
|
2876
|
-
if (D === "centerContinuous" && !j) for (let e = a + 1; e <
|
|
2875
|
+
let h = t.hyperlinkMap.get(A), b = n?.font?.color ?? null, T = h ? "#0563C1" : H.fontColor ?? ye.color ?? b ?? R.color;
|
|
2876
|
+
e.fillStyle = T ? w(T) : "#000000";
|
|
2877
|
+
let E = L.value.type === "number", D = V.alignH ?? (E ? "right" : "left"), O = V.alignV ?? "bottom", k = V.indent ? Math.round(V.indent * 3 * t.mdw) : 0, ee = H.iconSet ? Math.max(8, Math.round(Math.min(M, P) * .55)) : 0, te = ee > 0 ? ee + 4 : 0, N = 3 + (D === "left" || !V.alignH ? k : 0) + te, F = M, z = a;
|
|
2878
|
+
if (D === "centerContinuous" && !j) for (let e = a + 1; e < C; e++) {
|
|
2877
2879
|
let t = `${r}:${o[e]}`;
|
|
2878
2880
|
if (y.has(t) || v.has(t)) break;
|
|
2879
2881
|
let n = _.get(t);
|
|
2880
2882
|
if (n && n.value.type !== "empty" || Vr(g, n?.styleIndex ?? 0).xf.alignH !== "centerContinuous") break;
|
|
2881
2883
|
F += i[e], z = e;
|
|
2882
2884
|
}
|
|
2883
|
-
let ne = t.rtl ? I - (F - M) : I, re = D === "centerContinuous" ? ne : I,
|
|
2884
|
-
if (!j && !
|
|
2885
|
-
let n = e.measureText(
|
|
2885
|
+
let ne = t.rtl ? I - (F - M) : I, re = D === "centerContinuous" ? ne : I, ae = D === "centerContinuous" ? F : M, oe = q.includes("\n");
|
|
2886
|
+
if (!j && !V.wrapText && !V.textRotation && !E && !oe) {
|
|
2887
|
+
let n = e.measureText(q).width, s = D === "centerContinuous", c = s ? n + 6 : n + N + 3, l = s ? F : M;
|
|
2886
2888
|
if (c > l) {
|
|
2887
2889
|
let e = c - l, n = 0, u = 0;
|
|
2888
2890
|
D === "right" ? u = e : D === "center" || s ? (u = e / 2, n = e / 2) : n = e;
|
|
2889
2891
|
let d = t.rtl ? -1 : 1, f = t.rtl ? a - 1 : z + 1, p = t.rtl ? 1 : -1, m = t.rtl ? z + 1 : a - 1;
|
|
2890
2892
|
if (n > 0) {
|
|
2891
2893
|
let e = n;
|
|
2892
|
-
for (let t = f; t >= 0 && t <
|
|
2894
|
+
for (let t = f; t >= 0 && t < C && e > 0; t += d) {
|
|
2893
2895
|
let n = `${r}:${o[t]}`;
|
|
2894
2896
|
if (y.has(n) || v.has(n)) break;
|
|
2895
2897
|
let a = _.get(n);
|
|
2896
2898
|
if (a && a.value.type !== "empty") break;
|
|
2897
|
-
|
|
2899
|
+
ae += i[t], e -= i[t];
|
|
2898
2900
|
}
|
|
2899
2901
|
}
|
|
2900
2902
|
if (u > 0) {
|
|
2901
2903
|
let e = u;
|
|
2902
|
-
for (let t = m; t >= 0 && t <
|
|
2904
|
+
for (let t = m; t >= 0 && t < C && e > 0; t += p) {
|
|
2903
2905
|
let n = `${r}:${o[t]}`;
|
|
2904
2906
|
if (y.has(n) || v.has(n)) break;
|
|
2905
2907
|
let a = _.get(n);
|
|
2906
2908
|
if (a && a.value.type !== "empty") break;
|
|
2907
|
-
re -= i[t],
|
|
2909
|
+
re -= i[t], ae += i[t], e -= i[t];
|
|
2908
2910
|
}
|
|
2909
2911
|
}
|
|
2910
2912
|
}
|
|
2911
2913
|
}
|
|
2912
|
-
let
|
|
2913
|
-
if (D === "fill" && !E &&
|
|
2914
|
-
let t = Math.max(1, M - 6), n = e.measureText(
|
|
2914
|
+
let me = q, he = 0;
|
|
2915
|
+
if (D === "fill" && !E && q.length > 0) {
|
|
2916
|
+
let t = Math.max(1, M - 6), n = e.measureText(q).width;
|
|
2915
2917
|
if (n > 0 && n < t) {
|
|
2916
2918
|
let e = Math.max(1, Math.floor(t / n));
|
|
2917
|
-
|
|
2919
|
+
me = q.repeat(e);
|
|
2918
2920
|
}
|
|
2919
2921
|
}
|
|
2920
|
-
if (D === "distributed" || D === "justify" && !
|
|
2921
|
-
let t = Math.max(1, M - 6), n = e.measureText(
|
|
2922
|
-
n < t && (
|
|
2922
|
+
if (D === "distributed" || D === "justify" && !V.wrapText && !oe) {
|
|
2923
|
+
let t = Math.max(1, M - 6), n = e.measureText(me).width, r = Math.max(1, [...me].length - 1);
|
|
2924
|
+
n < t && (he = Math.max(0, (t - n) / r));
|
|
2923
2925
|
}
|
|
2924
|
-
let
|
|
2925
|
-
D === "right" ? (
|
|
2926
|
-
let
|
|
2927
|
-
if (
|
|
2928
|
-
let t = Fr(R.size, x, 1.1), n = [...
|
|
2926
|
+
let W, G;
|
|
2927
|
+
D === "right" ? (W = I + M - 3, G = "right") : D === "center" ? (W = I + M / 2, G = "center") : D === "centerContinuous" ? (W = ne + F / 2, G = "center") : D === "distributed" || D === "justify" && !V.wrapText && !oe ? (W = I + 3, G = "left") : (W = I + N, G = "left");
|
|
2928
|
+
let K = V.textRotation ?? 0, ge = K === 255, _e = K > 0 && K !== 255;
|
|
2929
|
+
if (H.iconSet && ee > 0 && (e.save(), e.beginPath(), e.rect(I, c, M, P), e.clip(), li(e, H.iconSet.name, H.iconSet.index, I + 2, c + (P - ee) / 2, ee), e.restore()), e.save(), e.beginPath(), e.rect(re, c, ae, P), e.clip(), ge) {
|
|
2930
|
+
let t = Fr(R.size, x, 1.1), n = [...q].length * t, r = O === "top" ? c + 2 : O === "center" ? c + (P - n) / 2 : c + P - n - 2;
|
|
2929
2931
|
e.textAlign = "center", e.textBaseline = "top";
|
|
2930
|
-
for (let n of
|
|
2931
|
-
let i = n.codePointAt(0) ?? 0, a =
|
|
2932
|
+
for (let n of q) {
|
|
2933
|
+
let i = n.codePointAt(0) ?? 0, a = ie(i) && ce(e, i);
|
|
2932
2934
|
lr(e, n, I + M / 2, r, t, a), r += t;
|
|
2933
2935
|
}
|
|
2934
2936
|
e.restore();
|
|
2935
2937
|
return;
|
|
2936
2938
|
}
|
|
2937
|
-
if (
|
|
2938
|
-
let t =
|
|
2939
|
-
e.translate(I + M / 2, c + P / 2), e.rotate(t), e.textAlign = "center", e.textBaseline = "middle", e.fillText(
|
|
2939
|
+
if (_e) {
|
|
2940
|
+
let t = K <= 90 ? -(K * Math.PI / 180) : (K - 90) * Math.PI / 180;
|
|
2941
|
+
e.translate(I + M / 2, c + P / 2), e.rotate(t), e.textAlign = "center", e.textBaseline = "middle", e.fillText(q, 0, 0), e.restore();
|
|
2940
2942
|
return;
|
|
2941
2943
|
}
|
|
2942
|
-
if (
|
|
2943
|
-
let t = e.measureText(
|
|
2944
|
+
if (V.shrinkToFit) {
|
|
2945
|
+
let t = e.measureText(q).width, n = M - N - 3;
|
|
2944
2946
|
if (t > n && t > 0) {
|
|
2945
2947
|
let r = n / t, i = D === "right" ? I + M - 3 : D === "center" ? I + M / 2 : I + N;
|
|
2946
2948
|
e.transform(r, 0, 0, 1, i * (1 - r), 0);
|
|
2947
2949
|
}
|
|
2948
2950
|
}
|
|
2949
|
-
if (e.textAlign =
|
|
2950
|
-
e.letterSpacing = `${
|
|
2951
|
+
if (e.textAlign = G, he > 0) try {
|
|
2952
|
+
e.letterSpacing = `${he}px`;
|
|
2951
2953
|
} catch {}
|
|
2952
2954
|
try {
|
|
2953
|
-
e.direction = Xn(
|
|
2955
|
+
e.direction = Xn(V.readingOrder, q) ? "rtl" : "ltr";
|
|
2954
2956
|
} catch {}
|
|
2955
|
-
let
|
|
2956
|
-
if (
|
|
2957
|
+
let ve = L.value.type === "text" ? L.value.runs : void 0, be = ve && ve.length > 0;
|
|
2958
|
+
if (V.wrapText && be) ii(e, ve, m, {
|
|
2957
2959
|
alignH: D,
|
|
2958
2960
|
alignV: O,
|
|
2959
2961
|
cx: I,
|
|
@@ -2964,10 +2966,10 @@ function hi(e, t, n, r, i, a, o, s, c, l, u, d, f, p, m, h) {
|
|
|
2964
2966
|
paddingX: 3,
|
|
2965
2967
|
paddingY: 2
|
|
2966
2968
|
}, x, S, {
|
|
2967
|
-
fontColor:
|
|
2968
|
-
readingOrder:
|
|
2969
|
+
fontColor: H.fontColor,
|
|
2970
|
+
readingOrder: V.readingOrder
|
|
2969
2971
|
});
|
|
2970
|
-
else if (
|
|
2972
|
+
else if (V.wrapText) ri(e, q, W, m, {
|
|
2971
2973
|
alignH: D,
|
|
2972
2974
|
alignV: O,
|
|
2973
2975
|
cx: I,
|
|
@@ -2978,7 +2980,7 @@ function hi(e, t, n, r, i, a, o, s, c, l, u, d, f, p, m, h) {
|
|
|
2978
2980
|
paddingX: 3,
|
|
2979
2981
|
paddingY: 2
|
|
2980
2982
|
}, x);
|
|
2981
|
-
else if (
|
|
2983
|
+
else if (be) ni(e, ve, m, {
|
|
2982
2984
|
alignH: D,
|
|
2983
2985
|
alignV: O,
|
|
2984
2986
|
cx: I,
|
|
@@ -2989,8 +2991,8 @@ function hi(e, t, n, r, i, a, o, s, c, l, u, d, f, p, m, h) {
|
|
|
2989
2991
|
paddingX: 3,
|
|
2990
2992
|
paddingY: 2
|
|
2991
2993
|
}, x, S, {
|
|
2992
|
-
fontColor:
|
|
2993
|
-
readingOrder:
|
|
2994
|
+
fontColor: H.fontColor,
|
|
2995
|
+
readingOrder: V.readingOrder
|
|
2994
2996
|
});
|
|
2995
2997
|
else {
|
|
2996
2998
|
let t = m.vertAlign, n = Fr(R.size, x), r = 0;
|
|
@@ -3000,25 +3002,25 @@ function hi(e, t, n, r, i, a, o, s, c, l, u, d, f, p, m, h) {
|
|
|
3000
3002
|
size: m.size * .65
|
|
3001
3003
|
} : m;
|
|
3002
3004
|
t && (e.font = Ir(i, x));
|
|
3003
|
-
let a = null, o = () => a ??= e.measureText(
|
|
3004
|
-
let e = Math.min(o().width,
|
|
3005
|
+
let a = null, o = () => a ??= e.measureText(q), s = () => {
|
|
3006
|
+
let e = Math.min(o().width, ae - N - 3);
|
|
3005
3007
|
return {
|
|
3006
3008
|
x: D === "right" ? I + M - 3 - e : D === "center" ? I + M / 2 - e / 2 : I + N,
|
|
3007
3009
|
width: e
|
|
3008
3010
|
};
|
|
3009
3011
|
}, l = Fr(i.size, x);
|
|
3010
3012
|
if (m.underline || h) {
|
|
3011
|
-
let { x: t, width: n } = s(), i = (O === "top" ? c + 2 + l + 1 : O === "center" ? c + P / 2 + Math.round(l * .55) : c + P - 2 + 1) + r, a = h ? "#0563C1" : T ?
|
|
3013
|
+
let { x: t, width: n } = s(), i = (O === "top" ? c + 2 + l + 1 : O === "center" ? c + P / 2 + Math.round(l * .55) : c + P - 2 + 1) + r, a = h ? "#0563C1" : T ? w(T) : "#000000", o = m.underlineStyle === "double" || m.underlineStyle === "doubleAccounting";
|
|
3012
3014
|
zr(e, t, t + n, i, a, o, S);
|
|
3013
3015
|
}
|
|
3014
3016
|
if (m.strike) {
|
|
3015
|
-
let { x: t, width: n } = s(), i = (O === "top" ? c + 2 + Math.round(l * .5) : O === "center" ? c + P / 2 : c + P - 2 - Math.round(l * .35)) + r, a = i +
|
|
3016
|
-
e.save(), e.strokeStyle = T ?
|
|
3017
|
+
let { x: t, width: n } = s(), i = (O === "top" ? c + 2 + Math.round(l * .5) : O === "center" ? c + P / 2 : c + P - 2 - Math.round(l * .35)) + r, a = i + B(i, .5, S);
|
|
3018
|
+
e.save(), e.strokeStyle = T ? w(T) : "#000000", e.lineWidth = .5, e.beginPath(), e.moveTo(t, a), e.lineTo(t + n, a), e.stroke(), e.restore();
|
|
3017
3019
|
}
|
|
3018
|
-
if (
|
|
3019
|
-
let t =
|
|
3020
|
+
if (q.includes("\n")) {
|
|
3021
|
+
let t = q.split("\n"), n = Fr(R.size, x, 1.2, R.name ?? void 0), i = t.length * n, a;
|
|
3020
3022
|
O === "top" ? (a = c + 2, e.textBaseline = "top") : O === "center" ? (a = c + (P - i) / 2, e.textBaseline = "top") : (a = c + P - i - 2, e.textBaseline = "top");
|
|
3021
|
-
for (let i = 0; i < t.length; i++) e.fillText(t[i],
|
|
3023
|
+
for (let i = 0; i < t.length; i++) e.fillText(t[i], W, a + i * n + r);
|
|
3022
3024
|
} else {
|
|
3023
3025
|
let { baseline: t, textY: n } = Yr({
|
|
3024
3026
|
alignH: D,
|
|
@@ -3031,20 +3033,20 @@ function hi(e, t, n, r, i, a, o, s, c, l, u, d, f, p, m, h) {
|
|
|
3031
3033
|
paddingX: 3,
|
|
3032
3034
|
paddingY: 2
|
|
3033
3035
|
});
|
|
3034
|
-
e.textBaseline = t, e.fillText(
|
|
3036
|
+
e.textBaseline = t, e.fillText(me, W, n + r);
|
|
3035
3037
|
}
|
|
3036
3038
|
}
|
|
3037
|
-
let
|
|
3038
|
-
if (L.showPhonetic &&
|
|
3039
|
-
let t = Ir(m, x), n = Rr(e,
|
|
3039
|
+
let xe = L.value.type === "text" ? L.value.phoneticRuns : void 0;
|
|
3040
|
+
if (L.showPhonetic && xe && xe.length > 0 && !q.includes("\n")) {
|
|
3041
|
+
let t = Ir(m, x), n = Rr(e, q, t), r;
|
|
3040
3042
|
r = D === "right" ? I + M - 3 - n : D === "center" ? I + M / 2 - n / 2 : I + N;
|
|
3041
|
-
let i = T ?
|
|
3042
|
-
Lr(e,
|
|
3043
|
+
let i = T ? w(T) : "#000000";
|
|
3044
|
+
Lr(e, xe, L.value.type === "text" ? L.value.phoneticPr : void 0, q, t, g, r, c, x, i);
|
|
3043
3045
|
}
|
|
3044
|
-
e.restore(),
|
|
3046
|
+
e.restore(), q && t.onTextRun && t.onTextRun({
|
|
3045
3047
|
sheetName: t.worksheet.name,
|
|
3046
3048
|
cellRef: cr(r, s),
|
|
3047
|
-
text:
|
|
3049
|
+
text: q,
|
|
3048
3050
|
x: I,
|
|
3049
3051
|
y: c,
|
|
3050
3052
|
width: M,
|
|
@@ -3163,75 +3165,76 @@ function Ci(e, t) {
|
|
|
3163
3165
|
gi.set(t, vi(e));
|
|
3164
3166
|
}
|
|
3165
3167
|
function wi(e, t, n, r, i = {}) {
|
|
3166
|
-
let a = i.dpr ?? 1, o = i.cellScale ?? 1, s = $(t),
|
|
3167
|
-
e.clearRect(0, 0,
|
|
3168
|
-
let
|
|
3168
|
+
let a = i.dpr ?? 1, o = i.cellScale ?? 1, s = t.isChartSheet === !0, c = $(t), l = c.maximumDigitWidth, u = e.canvas.width / a, d = e.canvas.height / a;
|
|
3169
|
+
e.clearRect(0, 0, u, d), e.fillStyle = "#ffffff", e.fillRect(0, 0, u, d);
|
|
3170
|
+
let f = (e) => Math.round(e * o), p = s ? 0 : f(50), m = s ? 0 : f(22), { row: h, col: g, rows: _, cols: v } = r, y = (i.scrollOffsetX ?? 0) * o, b = (i.scrollOffsetY ?? 0) * o, { col: x, row: S } = c.axesAtScale(o), C = x.bandsToCover(1, s ? 0 : i.freezeCols ?? 0, Math.max(0, u - p)), w = S.bandsToCover(1, s ? 0 : i.freezeRows ?? 0, Math.max(0, d - m)), T = w.at(-1)?.index ?? 0, E = C.at(-1)?.index ?? 0, D = C.map(({ index: e }) => e), O = w.map(({ index: e }) => e), k = C.map(({ size: e }) => e), A = w.map(({ size: e }) => e), j = k.reduce((e, t) => e + t, 0), M = A.reduce((e, t) => e + t, 0), ee = x.bandsToCover(g, Math.min(16384, g + v - 1)), te = S.bandsToCover(h, Math.min(1048576, h + _ - 1)), N = ee.map(({ index: e }) => e), P = te.map(({ index: e }) => e), F = ee.map(({ size: e }) => e), I = te.map(({ size: e }) => e), { cellMap: L, cfContext: R, mergeSkipSet: z, autoFilterCells: ne, hyperlinkMap: V, commentCells: H, tableStyleMap: re, sparklineMap: ie, nonEmptyColsByRow: U } = vi(t), ae = /* @__PURE__ */ new Map(), oe = _i("worksheet-merge-anchor-index", "index-merge-anchor-coordinates");
|
|
3169
3171
|
for (let e of t.mergeCells ?? []) {
|
|
3170
|
-
let t =
|
|
3171
|
-
Nn(
|
|
3172
|
+
let t = x.offsetOf(e.right + 1) - x.offsetOf(e.left), n = S.offsetOf(e.bottom + 1) - S.offsetOf(e.top);
|
|
3173
|
+
Nn(ae, `${e.top}:${e.left}`, {
|
|
3172
3174
|
totalW: t,
|
|
3173
3175
|
totalH: n,
|
|
3174
3176
|
right: e.right,
|
|
3175
3177
|
bottom: e.bottom
|
|
3176
|
-
},
|
|
3178
|
+
}, oe);
|
|
3177
3179
|
}
|
|
3178
|
-
let
|
|
3180
|
+
let se = N[0] ?? g, ce = N.at(-1) ?? Math.min(16384, g + v - 1), le = Si(e, t, n, L, U, R, re, ae, x, S, [...new Set([...O, ...P])], se, ce, E + 1, o, l, t.rightToLeft === !0), ue = x.bandsToCover(le.startCol, le.endCol), de = ue.map(({ index: e }) => e), fe = ue.map(({ size: e }) => e), pe = y + x.offsetOf(se) - x.offsetOf(le.startCol), me = {
|
|
3179
3181
|
worksheet: t,
|
|
3180
3182
|
styles: n,
|
|
3181
|
-
cellMap:
|
|
3182
|
-
mergeAnchorMap:
|
|
3183
|
-
mergeSkipSet:
|
|
3184
|
-
cfContext:
|
|
3185
|
-
colWidths:
|
|
3186
|
-
rowHeights:
|
|
3187
|
-
colAxis:
|
|
3188
|
-
rowAxis:
|
|
3189
|
-
frozenColWidths:
|
|
3190
|
-
frozenRowHeights:
|
|
3191
|
-
frozenW:
|
|
3192
|
-
frozenH:
|
|
3193
|
-
startRow:
|
|
3194
|
-
startCol:
|
|
3183
|
+
cellMap: L,
|
|
3184
|
+
mergeAnchorMap: ae,
|
|
3185
|
+
mergeSkipSet: z,
|
|
3186
|
+
cfContext: R,
|
|
3187
|
+
colWidths: fe,
|
|
3188
|
+
rowHeights: I,
|
|
3189
|
+
colAxis: x,
|
|
3190
|
+
rowAxis: S,
|
|
3191
|
+
frozenColWidths: k,
|
|
3192
|
+
frozenRowHeights: A,
|
|
3193
|
+
frozenW: j,
|
|
3194
|
+
frozenH: M,
|
|
3195
|
+
startRow: h,
|
|
3196
|
+
startCol: g,
|
|
3195
3197
|
cs: o,
|
|
3196
3198
|
dpr: a,
|
|
3197
|
-
autoFilterCells:
|
|
3198
|
-
hyperlinkMap:
|
|
3199
|
-
commentCells:
|
|
3200
|
-
tableStyleMap:
|
|
3201
|
-
sparklineMap:
|
|
3202
|
-
overflowTextAnchors:
|
|
3203
|
-
mdw:
|
|
3199
|
+
autoFilterCells: ne,
|
|
3200
|
+
hyperlinkMap: V,
|
|
3201
|
+
commentCells: H,
|
|
3202
|
+
tableStyleMap: re,
|
|
3203
|
+
sparklineMap: ie,
|
|
3204
|
+
overflowTextAnchors: le.anchorKeys,
|
|
3205
|
+
mdw: l,
|
|
3204
3206
|
onTextRun: i.onTextRun,
|
|
3205
3207
|
rtl: t.rightToLeft === !0,
|
|
3206
|
-
canvasW:
|
|
3207
|
-
|
|
3208
|
-
|
|
3209
|
-
|
|
3210
|
-
|
|
3208
|
+
canvasW: u,
|
|
3209
|
+
threeD: i.threeD
|
|
3210
|
+
}, he = p, W = m, G = he + j, K = W + M, ge = Math.max(0, u - G), _e = Math.max(0, d - K);
|
|
3211
|
+
T > 0 && E > 0 && hi(e, me, 1, 1, k, A, D, O, 0, 0, he, W, he, W, j, M), T > 0 && hi(e, me, 1, le.startCol, fe, A, de, O, pe, 0, G, W, G, W, ge, M), E > 0 && hi(e, me, h, 1, k, I, D, P, 0, b, he, K, he, K, j, _e), s || hi(e, me, h, le.startCol, fe, I, de, P, pe, b, G, K, G, K, ge, _e), Ei(e, t, x, S, i.loadedImages, o, h, g, y, b, G, K, ge, _e, t.rightToLeft === !0, u, i.threeD, i.regionMap), !s && t.slicers && t.slicers.length > 0 && da(e, t, x, S, o, h, g, y, b, G, K, ge, _e, t.rightToLeft === !0, u), s || Ti(e, u, d, h, g, _, v, F, I, N, P, y, b, k, A, D, O, j, M, p, m, o, a, i.selectedRowRange ?? null, i.selectedColRange ?? null, t.rightToLeft === !0);
|
|
3212
|
+
let ve = t.rightToLeft === !0;
|
|
3213
|
+
if (T > 0) {
|
|
3211
3214
|
e.save(), e.strokeStyle = Sr, e.lineWidth = .5, e.beginPath();
|
|
3212
|
-
let t =
|
|
3213
|
-
e.moveTo(0, t), e.lineTo(
|
|
3215
|
+
let t = K + B(K, .5, a);
|
|
3216
|
+
e.moveTo(0, t), e.lineTo(u, t), e.stroke(), e.restore();
|
|
3214
3217
|
}
|
|
3215
|
-
if (
|
|
3218
|
+
if (E > 0) {
|
|
3216
3219
|
e.save(), e.strokeStyle = Sr, e.lineWidth = .5, e.beginPath();
|
|
3217
|
-
let t =
|
|
3218
|
-
e.moveTo(n,
|
|
3220
|
+
let t = ve ? u - G : G, n = t + B(t, .5, a);
|
|
3221
|
+
e.moveTo(n, m), e.lineTo(n, d), e.stroke(), e.restore();
|
|
3219
3222
|
}
|
|
3220
3223
|
}
|
|
3221
3224
|
function Ti(e, t, n, r, i, a, o, s, c, l, u, d, f, p, m, h, g, _, v, y, b, x, S, C, w, T) {
|
|
3222
3225
|
let E = "#f8f9fa", D = "#e8eaed", O = "#caddf6", k = "#c8ccd0", A = "#5b9bd5", j = "#444", M = (e) => !w || e < w.start || e > w.end ? E : w.strong ? O : D, ee = (e) => !w || e < w.start || e > w.end ? k : w.strong ? A : k, te = (e) => !C || e < C.start || e > C.end ? E : C.strong ? O : D, N = (e) => !C || e < C.start || e > C.end ? k : C.strong ? A : k, P = `${Math.max(1, Math.round(11 * x))}px ${mr}`, F = y + _, I = b + v, L = .5 / S, R = (e, n) => T ? br(e, n, t) : e, z = T ? t - y : 0;
|
|
3223
3226
|
e.fillStyle = E, e.fillRect(z, 0, y, b), e.strokeStyle = k, e.lineWidth = .5, e.beginPath();
|
|
3224
|
-
let ne = T ? z +
|
|
3227
|
+
let ne = T ? z + B(z, .5, S) : z + y - L;
|
|
3225
3228
|
e.moveTo(ne, 0), e.lineTo(ne, b), e.moveTo(z, b - L), e.lineTo(z + y, b - L), e.stroke(), e.font = P, e.fillStyle = j;
|
|
3226
|
-
let
|
|
3229
|
+
let V = (t, n, r) => {
|
|
3227
3230
|
let i = R(n, r);
|
|
3228
3231
|
e.fillStyle = M(t), e.fillRect(i, 0, r, b), e.strokeStyle = ee(t), e.lineWidth = .5, e.beginPath();
|
|
3229
|
-
let a = i +
|
|
3232
|
+
let a = i + B(i, .5, S);
|
|
3230
3233
|
e.moveTo(a, 0), e.lineTo(a, b), e.moveTo(i, b - L), e.lineTo(i + r, b - L), e.stroke(), e.fillStyle = j, e.textAlign = "center", e.textBaseline = "middle", e.fillText(ai(t), i + r / 2, b / 2);
|
|
3231
|
-
},
|
|
3234
|
+
}, H = (t, n, r) => {
|
|
3232
3235
|
let i = z;
|
|
3233
3236
|
e.fillStyle = te(t), e.fillRect(i, n, y, r), e.strokeStyle = N(t), e.lineWidth = .5, e.beginPath();
|
|
3234
|
-
let a = n +
|
|
3237
|
+
let a = n + B(n, .5, S), o = T ? i + B(i, .5, S) : i + y - L;
|
|
3235
3238
|
e.moveTo(o, n), e.lineTo(o, n + r), e.moveTo(i, a), e.lineTo(i + y, a), e.stroke(), e.fillStyle = j, e.textBaseline = "middle";
|
|
3236
3239
|
let s = Math.max(2, Math.round(4 * x));
|
|
3237
3240
|
T ? (e.textAlign = "left", e.fillText(String(t), i + s, n + r / 2)) : (e.textAlign = "right", e.fillText(String(t), i + y - s, n + r / 2));
|
|
@@ -3239,55 +3242,55 @@ function Ti(e, t, n, r, i, a, o, s, c, l, u, d, f, p, m, h, g, _, v, y, b, x, S,
|
|
|
3239
3242
|
if (p.length > 0) {
|
|
3240
3243
|
e.save(), e.beginPath(), e.rect(R(y, _), 0, _, b), e.clip();
|
|
3241
3244
|
let t = y;
|
|
3242
|
-
for (let e = 0; e < p.length; e++)
|
|
3245
|
+
for (let e = 0; e < p.length; e++) V(h[e], t, p[e]), t += p[e];
|
|
3243
3246
|
e.restore();
|
|
3244
3247
|
}
|
|
3245
3248
|
e.save(), e.beginPath(), e.rect(R(F, t - F), 0, t - F, b), e.clip();
|
|
3246
3249
|
let re = F - d;
|
|
3247
3250
|
for (let e = 0; e < s.length; e++) {
|
|
3248
3251
|
let n = s[e];
|
|
3249
|
-
re + n > F && re < t &&
|
|
3252
|
+
re + n > F && re < t && V(l[e], re, n), re += n;
|
|
3250
3253
|
}
|
|
3251
3254
|
if (e.restore(), m.length > 0) {
|
|
3252
3255
|
e.save(), e.beginPath(), e.rect(z, b, y, v), e.clip();
|
|
3253
3256
|
let t = b;
|
|
3254
|
-
for (let e = 0; e < m.length; e++)
|
|
3257
|
+
for (let e = 0; e < m.length; e++) H(g[e], t, m[e]), t += m[e];
|
|
3255
3258
|
e.restore();
|
|
3256
3259
|
}
|
|
3257
3260
|
e.save(), e.beginPath(), e.rect(z, I, y, n - I), e.clip();
|
|
3258
|
-
let
|
|
3261
|
+
let ie = I - f;
|
|
3259
3262
|
for (let e = 0; e < c.length; e++) {
|
|
3260
3263
|
let t = c[e];
|
|
3261
|
-
|
|
3264
|
+
ie + t > I && ie < n && H(u[e], ie, t), ie += t;
|
|
3262
3265
|
}
|
|
3263
3266
|
e.restore();
|
|
3264
3267
|
}
|
|
3265
|
-
function Ei(e, t, n, r, i, a, o, s, c, l, u, d, f, p, m, h) {
|
|
3266
|
-
let
|
|
3267
|
-
if (i) for (let e of t.images ?? [])
|
|
3268
|
+
function Ei(e, t, n, r, i, a, o, s, c, l, u, d, f, p, m, h, g, _) {
|
|
3269
|
+
let v = [], y = 0;
|
|
3270
|
+
if (i) for (let e of t.images ?? []) v.push({
|
|
3268
3271
|
kind: "image",
|
|
3269
3272
|
zOrder: e.zOrder ?? 2 ** 53 - 1,
|
|
3270
|
-
fallbackOrder:
|
|
3273
|
+
fallbackOrder: y++,
|
|
3271
3274
|
anchor: e
|
|
3272
3275
|
});
|
|
3273
|
-
for (let e of t.shapeGroups ?? []) for (let t of e.shapes)
|
|
3276
|
+
for (let e of t.shapeGroups ?? []) for (let t of e.shapes) v.push({
|
|
3274
3277
|
kind: "shape",
|
|
3275
3278
|
zOrder: t.zOrder ?? 2 ** 53 - 1,
|
|
3276
|
-
fallbackOrder:
|
|
3279
|
+
fallbackOrder: y++,
|
|
3277
3280
|
anchor: e,
|
|
3278
3281
|
shape: t
|
|
3279
3282
|
});
|
|
3280
|
-
for (let e of t.charts ?? [])
|
|
3283
|
+
for (let e of t.charts ?? []) v.push({
|
|
3281
3284
|
kind: "chart",
|
|
3282
3285
|
zOrder: e.zOrder ?? 2 ** 53 - 1,
|
|
3283
|
-
fallbackOrder:
|
|
3286
|
+
fallbackOrder: y++,
|
|
3284
3287
|
anchor: e
|
|
3285
3288
|
});
|
|
3286
|
-
|
|
3287
|
-
for (let
|
|
3288
|
-
...
|
|
3289
|
-
shapes: [
|
|
3290
|
-
}]) : Qi(e, t, n, r, a, o, s, c, l, u, d, f, p, m, h, [
|
|
3289
|
+
v.sort((e, t) => e.zOrder - t.zOrder || e.fallbackOrder - t.fallbackOrder);
|
|
3290
|
+
for (let y of v) y.kind === "image" ? ki(e, t, n, r, i, a, o, s, c, l, u, d, f, p, m, h, [y.anchor]) : y.kind === "shape" ? Ai(e, t, n, r, a, o, s, c, l, u, d, f, p, i, m, h, [{
|
|
3291
|
+
...y.anchor,
|
|
3292
|
+
shapes: [y.shape]
|
|
3293
|
+
}]) : Qi(e, t, n, r, a, o, s, c, l, u, d, f, p, m, h, [y.anchor], g, _);
|
|
3291
3294
|
}
|
|
3292
3295
|
function Di(e, t) {
|
|
3293
3296
|
return e.offsetOf(t);
|
|
@@ -3304,10 +3307,10 @@ function ki(e, t, n, r, i, o, s, c, l, u, d, f, p, m, h, g, _ = t.images) {
|
|
|
3304
3307
|
for (let t of _) {
|
|
3305
3308
|
let s = i.get(dr(t.imagePath, t.duotone));
|
|
3306
3309
|
if (!s) continue;
|
|
3307
|
-
let c = t.fromCol + 1, _ = t.fromRow + 1, x = Di(n, c) + t.fromColOff * o /
|
|
3308
|
-
if (ur(t)) C = t.nativeExtCx * o /
|
|
3310
|
+
let c = t.fromCol + 1, _ = t.fromRow + 1, x = Di(n, c) + t.fromColOff * o / J, S = Oi(r, _) + t.fromRowOff * o / J, C, w;
|
|
3311
|
+
if (ur(t)) C = t.nativeExtCx * o / J, w = t.nativeExtCy * o / J;
|
|
3309
3312
|
else {
|
|
3310
|
-
let e = t.toCol + 1, i = t.toRow + 1, a = Di(n, e) + t.toColOff * o /
|
|
3313
|
+
let e = t.toCol + 1, i = t.toRow + 1, a = Di(n, e) + t.toColOff * o / J, s = Oi(r, i) + t.toRowOff * o / J;
|
|
3311
3314
|
C = a - x, w = s - S;
|
|
3312
3315
|
}
|
|
3313
3316
|
if (C <= 0 || w <= 0) continue;
|
|
@@ -3323,10 +3326,10 @@ function Ai(e, t, n, r, i, a, o, s, c, l, u, d, f, p, m, h, g = t.shapeGroups ??
|
|
|
3323
3326
|
let y = xr(l, d, h, m);
|
|
3324
3327
|
e.rect(y, u, d, f), e.clip();
|
|
3325
3328
|
for (let t of g) {
|
|
3326
|
-
let a = t.fromCol + 1, o = t.fromRow + 1, g = Di(n, a) + t.fromColOff * i /
|
|
3327
|
-
if (ur(t)) x = t.nativeExtCx * i /
|
|
3329
|
+
let a = t.fromCol + 1, o = t.fromRow + 1, g = Di(n, a) + t.fromColOff * i / J, b = Oi(r, o) + t.fromRowOff * i / J, x, S;
|
|
3330
|
+
if (ur(t)) x = t.nativeExtCx * i / J, S = t.nativeExtCy * i / J;
|
|
3328
3331
|
else {
|
|
3329
|
-
let e = t.toCol + 1, a = t.toRow + 1, o = Di(n, e) + t.toColOff * i /
|
|
3332
|
+
let e = t.toCol + 1, a = t.toRow + 1, o = Di(n, e) + t.toColOff * i / J, s = Oi(r, a) + t.toRowOff * i / J;
|
|
3330
3333
|
x = o - g, S = s - b;
|
|
3331
3334
|
}
|
|
3332
3335
|
if (x <= 0 || S <= 0) continue;
|
|
@@ -3379,11 +3382,11 @@ function ji(e, t, n, r, i, o, s, c) {
|
|
|
3379
3382
|
Vi(e, t, i, o);
|
|
3380
3383
|
}
|
|
3381
3384
|
else if (t.geom.type === "preset") {
|
|
3382
|
-
let n =
|
|
3385
|
+
let n = C(t.fill ?? (t.fillColor ? {
|
|
3383
3386
|
fillType: "solid",
|
|
3384
3387
|
color: t.fillColor
|
|
3385
3388
|
} : null), e, 0, 0, i, o, t.rot), r = t.strokeColor && t.strokeWidth > 0 ? () => Ui(e, t, i, o) : null;
|
|
3386
|
-
|
|
3389
|
+
x(e, t.geom.name, 0, 0, i, o, t.geom.adj ?? [], n, r, () => {}) || (e.beginPath(), e.rect(0, 0, i, o), Vi(e, t, i, o));
|
|
3387
3390
|
} else if (t.geom.type === "image") {
|
|
3388
3391
|
let n = c?.get(dr(t.geom.imagePath, t.geom.duotone));
|
|
3389
3392
|
if (n) {
|
|
@@ -3430,7 +3433,7 @@ async function zi(e, t) {
|
|
|
3430
3433
|
if (n.length !== 0) {
|
|
3431
3434
|
await t.loadMathJax();
|
|
3432
3435
|
for (let e of n) if (!Mi.has(e.nodes)) try {
|
|
3433
|
-
let n = await t.mathMLToSvg(
|
|
3436
|
+
let n = await t.mathMLToSvg(D(e.nodes, e.display)), r = await Pi(Ii(He(n.svg, "#000000"), n.widthEm, n.ascentEm + n.descentEm));
|
|
3434
3437
|
Mi.set(e.nodes, {
|
|
3435
3438
|
img: r,
|
|
3436
3439
|
widthEm: n.widthEm,
|
|
@@ -3443,10 +3446,10 @@ async function zi(e, t) {
|
|
|
3443
3446
|
}
|
|
3444
3447
|
function Bi(e, t, n, r, i) {
|
|
3445
3448
|
if (n <= 0 || r <= 0 || t.paragraphs.length === 0) return;
|
|
3446
|
-
let a = t.lIns /
|
|
3449
|
+
let a = t.lIns / J * i, o = t.rIns / J * i, s = t.tIns / J * i, c = t.bIns / J * i, l = Math.max(0, n - a - o), u = Math.max(0, r - s - c);
|
|
3447
3450
|
if (l <= 0 || u <= 0) return;
|
|
3448
3451
|
let d = (e) => {
|
|
3449
|
-
let t = (e.size > 0 ? e.size : yr) *
|
|
3452
|
+
let t = (e.size > 0 ? e.size : yr) * Re * i, n = vr(e.fontFace);
|
|
3450
3453
|
return {
|
|
3451
3454
|
font: `${e.italic ? "italic " : ""}${e.bold ? "bold " : ""}${t}px ${n}`,
|
|
3452
3455
|
px: t
|
|
@@ -3458,13 +3461,13 @@ function Bi(e, t, n, r, i) {
|
|
|
3458
3461
|
return e.font = r, i > 0 ? i : n * .85;
|
|
3459
3462
|
}, p = t.wrap !== "none", m = [];
|
|
3460
3463
|
for (let n of t.paragraphs) {
|
|
3461
|
-
let r = n.align || "l", a = (n.marL ?? 0) /
|
|
3464
|
+
let r = n.align || "l", a = (n.marL ?? 0) / J * i, o = (n.marR ?? 0) / J * i, s = (n.indent ?? 0) / J * i, c = Math.max(0, s), u = Math.max(0, l - a - o), h = !1, g = () => h ? a : a + c, _ = () => h ? u : u - c, v = [], y = 0, b = 0, x = 0, S = !1, C = n.spaceLine?.type === "pct", w = (e) => {
|
|
3462
3465
|
let r = e;
|
|
3463
|
-
return n.spaceLine && (n.spaceLine.type === "pct" ? r *= n.spaceLine.val / 1e5 : r = n.spaceLine.val *
|
|
3466
|
+
return n.spaceLine && (n.spaceLine.type === "pct" ? r *= n.spaceLine.val / 1e5 : r = n.spaceLine.val * Re * i), t.autoFit === "norm" && t.lnSpcReduction != null && n.spaceLine?.type !== "pts" && (r *= 1 - t.lnSpcReduction), r;
|
|
3464
3467
|
}, T = () => {
|
|
3465
3468
|
if (b === 0) {
|
|
3466
|
-
let e = (E || yr) *
|
|
3467
|
-
b = C ? n : Math.max(n, t), x = f(`${e}px ${vr(
|
|
3469
|
+
let e = (E || yr) * Re * i, t = Math.max(V(D, e), V(O, e)), n = e * 1.2;
|
|
3470
|
+
b = C ? n : Math.max(n, t), x = f(`${e}px ${vr(D)}`, e);
|
|
3468
3471
|
}
|
|
3469
3472
|
b = w(b), m.push({
|
|
3470
3473
|
segs: v,
|
|
@@ -3475,7 +3478,7 @@ function Bi(e, t, n, r, i) {
|
|
|
3475
3478
|
leftInset: g(),
|
|
3476
3479
|
availW: _()
|
|
3477
3480
|
}), h = !0, v = [], y = 0, b = 0, x = 0, S = !1;
|
|
3478
|
-
}, E = 0,
|
|
3481
|
+
}, E = 0, D, O;
|
|
3479
3482
|
for (let t of n.runs) {
|
|
3480
3483
|
if (t.type === "break") {
|
|
3481
3484
|
T();
|
|
@@ -3484,7 +3487,7 @@ function Bi(e, t, n, r, i) {
|
|
|
3484
3487
|
if (t.type === "math") {
|
|
3485
3488
|
let e = Mi.get(t.nodes);
|
|
3486
3489
|
if (!e) continue;
|
|
3487
|
-
let n = (t.fontSize ?? (E || yr)) *
|
|
3490
|
+
let n = (t.fontSize ?? (E || yr)) * Re * i, o = e.widthEm * n, s = e.ascentEm * n, c = e.descentEm * n, l = t.color ?? "#000000";
|
|
3488
3491
|
if (t.display) {
|
|
3489
3492
|
T(), m.push({
|
|
3490
3493
|
segs: [{
|
|
@@ -3514,13 +3517,13 @@ function Bi(e, t, n, r, i) {
|
|
|
3514
3517
|
}), y += o, b = Math.max(b, s + c), x = Math.max(x, s), S = !0;
|
|
3515
3518
|
continue;
|
|
3516
3519
|
}
|
|
3517
|
-
E = t.size > 0 ? t.size : yr,
|
|
3518
|
-
let { font: n, px: o } = d(t), s = t.color ?? "#000000", c = Math.max(
|
|
3520
|
+
E = t.size > 0 ? t.size : yr, D = t.fontFace, O = t.fontFaceEa;
|
|
3521
|
+
let { font: n, px: o } = d(t), s = t.color ?? "#000000", c = Math.max(V(t.fontFace, o), V(t.fontFaceEa, o)), l = o * 1.2, g = C ? l : Math.max(l, c);
|
|
3519
3522
|
b = Math.max(b, g), x = Math.max(x, f(n, o)), e.font = n;
|
|
3520
|
-
let
|
|
3521
|
-
for (let t = 0; t <
|
|
3523
|
+
let k = t.text.split("\n");
|
|
3524
|
+
for (let t = 0; t < k.length; t++) {
|
|
3522
3525
|
t > 0 && T();
|
|
3523
|
-
let r =
|
|
3526
|
+
let r = k[t];
|
|
3524
3527
|
if (!r) continue;
|
|
3525
3528
|
if (!p) {
|
|
3526
3529
|
let t = e.measureText(r).width;
|
|
@@ -3589,7 +3592,7 @@ function Bi(e, t, n, r, i) {
|
|
|
3589
3592
|
}
|
|
3590
3593
|
}
|
|
3591
3594
|
function Vi(e, t, n, r) {
|
|
3592
|
-
let i =
|
|
3595
|
+
let i = C(t.fill ?? (t.fillColor ? {
|
|
3593
3596
|
fillType: "solid",
|
|
3594
3597
|
color: t.fillColor
|
|
3595
3598
|
} : null), e, 0, 0, n, r, t.rot);
|
|
@@ -3614,8 +3617,8 @@ function Hi(e) {
|
|
|
3614
3617
|
function Ui(e, t, n, r) {
|
|
3615
3618
|
let i = Hi(t);
|
|
3616
3619
|
if (i) {
|
|
3617
|
-
if (
|
|
3618
|
-
let a =
|
|
3620
|
+
if (oe(e, i, 1 / J), i.fill) {
|
|
3621
|
+
let a = C(i.fill, e, 0, 0, n, r, t.rot);
|
|
3619
3622
|
a && (e.strokeStyle = a);
|
|
3620
3623
|
}
|
|
3621
3624
|
e.stroke();
|
|
@@ -3714,7 +3717,7 @@ function qi(e, t, n, r, i, a, o = 1) {
|
|
|
3714
3717
|
];
|
|
3715
3718
|
for (let { edge: c, x1: l, y1: u, x2: d, y2: f, kind: p } of s) {
|
|
3716
3719
|
if (!c || !c.style || c.style === "none") continue;
|
|
3717
|
-
let s = c.color ?
|
|
3720
|
+
let s = c.color ? w(c.color) : "#000000";
|
|
3718
3721
|
if (c.style === "double" && p === "d") {
|
|
3719
3722
|
e.strokeStyle = s, e.lineWidth = 1, e.setLineDash([]);
|
|
3720
3723
|
let t = d - l, n = f - u, r = Math.hypot(t, n), i = -n / r * 1, a = t / r * 1;
|
|
@@ -3737,7 +3740,7 @@ function qi(e, t, n, r, i, a, o = 1) {
|
|
|
3737
3740
|
e.lineWidth = m;
|
|
3738
3741
|
let h = Yi(c.style);
|
|
3739
3742
|
e.setLineDash(h);
|
|
3740
|
-
let g = p === "v" ?
|
|
3743
|
+
let g = p === "v" ? B(l, m, o) : 0, _ = p === "h" ? B(u, m, o) : 0;
|
|
3741
3744
|
e.moveTo(l + g, u + _), e.lineTo(d + g, f + _), e.stroke(), e.setLineDash([]);
|
|
3742
3745
|
}
|
|
3743
3746
|
}
|
|
@@ -3754,7 +3757,7 @@ function Ji(e) {
|
|
|
3754
3757
|
}
|
|
3755
3758
|
}
|
|
3756
3759
|
function Yi(e) {
|
|
3757
|
-
return
|
|
3760
|
+
return ze(e);
|
|
3758
3761
|
}
|
|
3759
3762
|
function Xi(e) {
|
|
3760
3763
|
switch (e) {
|
|
@@ -3778,22 +3781,22 @@ function Zi(e, t) {
|
|
|
3778
3781
|
let n = Xi(e?.style), r = Xi(t?.style);
|
|
3779
3782
|
return n === 0 && r === 0 ? null : n >= r ? e ?? null : t ?? null;
|
|
3780
3783
|
}
|
|
3781
|
-
function Qi(e, t, n, r, i, a, o, s, c, l, u, f, p, m, h, g = t.charts) {
|
|
3784
|
+
function Qi(e, t, n, r, i, a, o, s, c, l, u, f, p, m, h, g = t.charts, _, v) {
|
|
3782
3785
|
if (f <= 0 || p <= 0) return;
|
|
3783
|
-
let
|
|
3786
|
+
let y = Di(n, o), b = Oi(r, a), x = xr(l, f, h, m);
|
|
3784
3787
|
for (let t of g) {
|
|
3785
|
-
let a = t.fromCol + 1, o = t.fromRow + 1, g = t.toCol + 1,
|
|
3786
|
-
if (
|
|
3787
|
-
let
|
|
3788
|
-
if (
|
|
3789
|
-
e.save(), e.beginPath(), e.rect(
|
|
3790
|
-
let
|
|
3788
|
+
let a = t.fromCol + 1, o = t.fromRow + 1, g = t.toCol + 1, S = t.toRow + 1, C = Di(n, a) + t.fromColOff * i / J, w = Oi(r, o) + t.fromRowOff * i / J, T = Di(n, g) + t.toColOff * i / J, E = Oi(r, S) + t.toRowOff * i / J, D = T - C, O = E - w;
|
|
3789
|
+
if (D <= 0 || O <= 0) continue;
|
|
3790
|
+
let k = xr(l + (C - y) - s, D, h, m), A = u + (w - b) - c;
|
|
3791
|
+
if (k + D < x || k > x + f || A + O < u || A > u + p) continue;
|
|
3792
|
+
e.save(), e.beginPath(), e.rect(x, u, f, p), e.clip();
|
|
3793
|
+
let j = Re * i;
|
|
3791
3794
|
d(e, t.chart, {
|
|
3792
|
-
x:
|
|
3793
|
-
y:
|
|
3794
|
-
w:
|
|
3795
|
-
h:
|
|
3796
|
-
},
|
|
3795
|
+
x: k,
|
|
3796
|
+
y: A,
|
|
3797
|
+
w: D,
|
|
3798
|
+
h: O
|
|
3799
|
+
}, j, 0, _, v), e.restore();
|
|
3797
3800
|
}
|
|
3798
3801
|
}
|
|
3799
3802
|
var $i = "600 12px \"Meiryo UI\", \"Segoe UI\", sans-serif", ea = "11px \"Meiryo UI\", \"Segoe UI\", sans-serif", ta = "#FFFFFF", na = "#BFBFBF", ra = "#F2F2F2", ia = "#404040", aa = "#FFFFFF", oa = "#000000", sa = "#A5A5A5", ca = "#E7E6E6", la = "#A6A6A6", ua = "#C6C6C6";
|
|
@@ -3803,10 +3806,10 @@ function da(e, t, n, r, i, a, o, s, c, l, u, d, f, p, m) {
|
|
|
3803
3806
|
if (!h) return;
|
|
3804
3807
|
let g = Di(n, o), _ = Oi(r, a), v = xr(l, d, m, p);
|
|
3805
3808
|
for (let t of h) {
|
|
3806
|
-
let a = t.fromCol + 1, o = t.fromRow + 1, h = t.toCol + 1, y = t.toRow + 1, b = Di(n, a) + t.fromColOff * i /
|
|
3809
|
+
let a = t.fromCol + 1, o = t.fromRow + 1, h = t.toCol + 1, y = t.toRow + 1, b = Di(n, a) + t.fromColOff * i / J, x = Oi(r, o) + t.fromRowOff * i / J, S = Di(n, h) + t.toColOff * i / J, C = Oi(r, y) + t.toRowOff * i / J, w = S - b, T = C - x;
|
|
3807
3810
|
if (w <= 0 || T <= 0) continue;
|
|
3808
|
-
let E = xr(l + (b - g) - s, w, m, p),
|
|
3809
|
-
E + w < v || E > v + d ||
|
|
3811
|
+
let E = xr(l + (b - g) - s, w, m, p), D = u + (x - _) - c;
|
|
3812
|
+
E + w < v || E > v + d || D + T < u || D > u + f || (e.save(), e.beginPath(), e.rect(v, u, d, f), e.clip(), fa(e, t.caption, t.items, E, D, w, T, i, t.style), e.restore());
|
|
3810
3813
|
}
|
|
3811
3814
|
}
|
|
3812
3815
|
function fa(e, t, n, r, i, a, o, s, c) {
|
|
@@ -3861,7 +3864,7 @@ function va(e, t) {
|
|
|
3861
3864
|
}
|
|
3862
3865
|
function ya(e, t, n, r, i) {
|
|
3863
3866
|
if (!n) return !0;
|
|
3864
|
-
let a = r ?? $(t), o = i?.scale ?? 1, { col: s, row: c } = a.axesAtScale(o), l = (e, t, n) => e.offsetOf(t + 1) + n * o /
|
|
3867
|
+
let a = r ?? $(t), o = i?.scale ?? 1, { col: s, row: c } = a.axesAtScale(o), l = (e, t, n) => e.offsetOf(t + 1) + n * o / J, u = l(s, e.fromCol, e.fromColOff), d = l(c, e.fromRow, e.fromRowOff), f = ur(e), p = f ? u + e.nativeExtCx * o / J : l(s, e.toCol, e.toColOff), m = f ? d + e.nativeExtCy * o / J : l(c, e.toRow, e.toRowOff);
|
|
3865
3868
|
if (p <= u || m <= d) return !1;
|
|
3866
3869
|
let h = i ? a.effectiveFrozenBands({
|
|
3867
3870
|
scale: o,
|
|
@@ -3881,7 +3884,7 @@ function ya(e, t, n, r, i) {
|
|
|
3881
3884
|
return g(u, p, s.offsetOf(h.cols + 1), s.offsetOf(n.col), s.offsetOf(n.col + n.cols)) && g(d, m, c.offsetOf(h.rows + 1), c.offsetOf(n.row), c.offsetOf(n.row + n.rows));
|
|
3882
3885
|
}
|
|
3883
3886
|
async function ba(e, t, n, r, i = 0, a = 0, o = null, c = null, l) {
|
|
3884
|
-
let u = t === "image/svg+xml", d =
|
|
3887
|
+
let u = t === "image/svg+xml", d = b(t, o, i, a), f = () => Ve(e, t, c, r, {
|
|
3885
3888
|
widthPt: d.widthPt,
|
|
3886
3889
|
heightPt: d.heightPt,
|
|
3887
3890
|
offscreenFactory: l
|
|
@@ -3889,7 +3892,7 @@ async function ba(e, t, n, r, i = 0, a = 0, o = null, c = null, l) {
|
|
|
3889
3892
|
svgImagePath: n,
|
|
3890
3893
|
srcRect: o
|
|
3891
3894
|
};
|
|
3892
|
-
if (
|
|
3895
|
+
if (fe(p)) try {
|
|
3893
3896
|
return await s(p.svgImagePath, r);
|
|
3894
3897
|
} catch {
|
|
3895
3898
|
return u ? s(e, r) : f();
|
|
@@ -3909,8 +3912,8 @@ async function xa(e, t, n, r) {
|
|
|
3909
3912
|
imagePath: t.imagePath,
|
|
3910
3913
|
mimeType: t.mimeType,
|
|
3911
3914
|
svgImagePath: t.svgImagePath,
|
|
3912
|
-
widthPt: t.nativeExtCx > 0 ? t.nativeExtCx /
|
|
3913
|
-
heightPt: t.nativeExtCy > 0 ? t.nativeExtCy /
|
|
3915
|
+
widthPt: t.nativeExtCx > 0 ? t.nativeExtCx / Be : 0,
|
|
3916
|
+
heightPt: t.nativeExtCy > 0 ? t.nativeExtCy / Be : 0,
|
|
3914
3917
|
srcRect: t.srcRect ?? null,
|
|
3915
3918
|
duotone: t.duotone ?? null
|
|
3916
3919
|
});
|
|
@@ -3919,8 +3922,8 @@ async function xa(e, t, n, r) {
|
|
|
3919
3922
|
imagePath: e.geom.imagePath,
|
|
3920
3923
|
mimeType: e.geom.mimeType,
|
|
3921
3924
|
svgImagePath: e.geom.svgImagePath,
|
|
3922
|
-
widthPt: t.nativeExtCx > 0 ? t.nativeExtCx * e.w /
|
|
3923
|
-
heightPt: t.nativeExtCy > 0 ? t.nativeExtCy * e.h /
|
|
3925
|
+
widthPt: t.nativeExtCx > 0 ? t.nativeExtCx * e.w / Be : 0,
|
|
3926
|
+
heightPt: t.nativeExtCy > 0 ? t.nativeExtCy * e.h / Be : 0,
|
|
3924
3927
|
srcRect: e.geom.srcRect ?? null,
|
|
3925
3928
|
duotone: e.geom.duotone ?? null
|
|
3926
3929
|
});
|
|
@@ -3944,7 +3947,7 @@ async function Sa(e, t, n, r = {}) {
|
|
|
3944
3947
|
}
|
|
3945
3948
|
}
|
|
3946
3949
|
async function Ca(e, t, n, r = {}) {
|
|
3947
|
-
let { ws: i, styles: a } = e, o =
|
|
3950
|
+
let { ws: i, styles: a } = e, o = N(t) ? t.clientWidth || 800 : t.width, s = N(t) ? t.clientHeight || 600 : t.height, c = r.width ?? o, l = r.height ?? s, u = /* @__PURE__ */ new Map();
|
|
3948
3951
|
if (await xa(i, u, r.fetchImage, {
|
|
3949
3952
|
viewport: n,
|
|
3950
3953
|
width: c,
|
|
@@ -3953,8 +3956,8 @@ async function Ca(e, t, n, r = {}) {
|
|
|
3953
3956
|
freezeRows: r.freezeRows,
|
|
3954
3957
|
freezeCols: r.freezeCols
|
|
3955
3958
|
}), e.math && Ri(i) && await zi(i, e.math), r[_a]?.() === !1) return;
|
|
3956
|
-
let d = r.dpr ??
|
|
3957
|
-
if (t.width !== m && (t.width = m), t.height !== h && (t.height = h),
|
|
3959
|
+
let d = r.dpr ?? F(), f = U(c * d, l * d), p = f.clamped ? d * f.scale : d, m = f.width, h = f.height;
|
|
3960
|
+
if (t.width !== m && (t.width = m), t.height !== h && (t.height = h), N(t)) {
|
|
3958
3961
|
let e = `${c}px`, n = `${l}px`;
|
|
3959
3962
|
t.style.width !== e && (t.style.width = e), t.style.height !== n && (t.style.height = n);
|
|
3960
3963
|
}
|
|
@@ -3966,7 +3969,9 @@ async function Ca(e, t, n, r = {}) {
|
|
|
3966
3969
|
wi(g, i, a, n, {
|
|
3967
3970
|
...r,
|
|
3968
3971
|
dpr: p,
|
|
3969
|
-
loadedImages: u
|
|
3972
|
+
loadedImages: u,
|
|
3973
|
+
threeD: e.threeD,
|
|
3974
|
+
regionMap: e.regionMap
|
|
3970
3975
|
});
|
|
3971
3976
|
}
|
|
3972
3977
|
function wa(e, t, n, r, i) {
|
|
@@ -3990,8 +3995,8 @@ function wa(e, t, n, r, i) {
|
|
|
3990
3995
|
//#endregion
|
|
3991
3996
|
//#region packages/xlsx/src/google-fonts.ts
|
|
3992
3997
|
var Ta = {
|
|
3993
|
-
...
|
|
3994
|
-
...
|
|
3998
|
+
...k,
|
|
3999
|
+
...M
|
|
3995
4000
|
};
|
|
3996
4001
|
function* Ea(e) {
|
|
3997
4002
|
for (let t of e?.sharedStrings ?? []) if (t.runs && t.runs.length > 0) for (let e of t.runs) yield e.text;
|
|
@@ -3999,8 +4004,8 @@ function* Ea(e) {
|
|
|
3999
4004
|
}
|
|
4000
4005
|
function Da(e) {
|
|
4001
4006
|
let t = /* @__PURE__ */ new Set(), n = null;
|
|
4002
|
-
for (let r of e?.styles?.fonts ?? []) r.name && (t.add(r.name), n ??=
|
|
4003
|
-
for (let r of
|
|
4007
|
+
for (let r of e?.styles?.fonts ?? []) r.name && (t.add(r.name), n ??= H(r.name));
|
|
4008
|
+
for (let r of I(Ea(e), n)) t.add(r);
|
|
4004
4009
|
return t;
|
|
4005
4010
|
}
|
|
4006
4011
|
function Oa(e) {
|
|
@@ -4124,14 +4129,16 @@ var Ia = Symbol("retain-xlsx-viewer-fonts"), La = Symbol("release-xlsx-viewer-pr
|
|
|
4124
4129
|
parsedWorkbook = null;
|
|
4125
4130
|
sheetCache = /* @__PURE__ */ new Map();
|
|
4126
4131
|
sheetLoads = /* @__PURE__ */ new Map();
|
|
4127
|
-
rawParts = new
|
|
4132
|
+
rawParts = new Pe({
|
|
4128
4133
|
maxEntries: 64,
|
|
4129
|
-
maxBytes:
|
|
4134
|
+
maxBytes: ae
|
|
4130
4135
|
});
|
|
4131
4136
|
queuedImageLoads = /* @__PURE__ */ new Map();
|
|
4132
4137
|
_fetchImage = (e, t) => this.getImageWithinArchiveOperation(e, t);
|
|
4133
4138
|
resourcePolicy = null;
|
|
4134
4139
|
math;
|
|
4140
|
+
threeD;
|
|
4141
|
+
regionMap;
|
|
4135
4142
|
googleFontNames = [];
|
|
4136
4143
|
retainedFontSets = /* @__PURE__ */ new Map();
|
|
4137
4144
|
fontsDestroyed = !1;
|
|
@@ -4148,9 +4155,9 @@ var Ia = Symbol("retain-xlsx-viewer-fonts"), La = Symbol("release-xlsx-viewer-pr
|
|
|
4148
4155
|
};
|
|
4149
4156
|
resourceFailure = null;
|
|
4150
4157
|
constructor(e, t, n) {
|
|
4151
|
-
this.worker = e, this._mode = t, this.bridge = new
|
|
4158
|
+
this.worker = e, this._mode = t, this.bridge = new W(this.worker, {
|
|
4152
4159
|
correlate: (e) => "protocol" in e && e.protocol === "ooxml-pull-v1" ? e.requestId : "id" in e ? e.id : void 0,
|
|
4153
|
-
toError: (e) => "type" in e && e.type === "error" ?
|
|
4160
|
+
toError: (e) => "type" in e && e.type === "error" ? L(e) : void 0
|
|
4154
4161
|
});
|
|
4155
4162
|
let r = new URL(n ?? ut, location.href).href;
|
|
4156
4163
|
this.bridge.post({
|
|
@@ -4162,7 +4169,7 @@ var Ia = Symbol("retain-xlsx-viewer-fonts"), La = Symbol("release-xlsx-viewer-pr
|
|
|
4162
4169
|
return this._mode;
|
|
4163
4170
|
}
|
|
4164
4171
|
static async load(t, n = {}) {
|
|
4165
|
-
let i = r(n), a = n.mode ?? "main", o = new
|
|
4172
|
+
let i = r(n), a = n.mode ?? "main", o = new _({
|
|
4166
4173
|
enabled: !0,
|
|
4167
4174
|
format: "xlsx",
|
|
4168
4175
|
mode: a,
|
|
@@ -4178,27 +4185,27 @@ var Ia = Symbol("retain-xlsx-viewer-fonts"), La = Symbol("release-xlsx-viewer-pr
|
|
|
4178
4185
|
if (!e.ok) throw Error(`Failed to fetch: ${e.status} ${e.statusText}`);
|
|
4179
4186
|
s = await e.arrayBuffer();
|
|
4180
4187
|
} else s = t;
|
|
4181
|
-
s =
|
|
4188
|
+
s = G(await ge(s, n.password));
|
|
4182
4189
|
let c = s === r;
|
|
4183
4190
|
o.setSourceBytes(s.byteLength), o.checkpoint("container ready");
|
|
4184
|
-
let l = a === "worker" ? (await import("./render-worker-host-
|
|
4191
|
+
let l = a === "worker" ? (await import("./render-worker-host-hZ0o4OD7.js")).createRenderWorker() : new lt(), u;
|
|
4185
4192
|
try {
|
|
4186
4193
|
return u = new e(l, a, n.wasmUrl), u.metrics = o, await u._load(s, n, i.policy, (e) => o.observeUsage(e), c), o.checkpoint("workbook index ready"), o.succeed({ sheets: u.sheetCount }), u;
|
|
4187
4194
|
} catch (e) {
|
|
4188
4195
|
let t = u;
|
|
4189
|
-
throw
|
|
4196
|
+
throw K(l, t ? () => t.destroy() : void 0), e;
|
|
4190
4197
|
}
|
|
4191
4198
|
} catch (e) {
|
|
4192
4199
|
throw o.fail(e), e;
|
|
4193
4200
|
}
|
|
4194
4201
|
}
|
|
4195
|
-
async _load(e, t = {}, n =
|
|
4202
|
+
async _load(e, t = {}, n = S(t), r, i = !1) {
|
|
4196
4203
|
this.resourceFailure = null, this.retainedSheetUsage = {
|
|
4197
4204
|
rows: 0,
|
|
4198
4205
|
cells: 0,
|
|
4199
4206
|
ownedUtf8Bytes: 0,
|
|
4200
4207
|
jsonBytes: 0
|
|
4201
|
-
}, this.sheetCache.clear(), await this.worksheetPullClient?.cancelAll("closed"), this.worksheetPullClient = null, this.generation = (this.generation ?? 0) + 1, this.resourcePolicy = n, this.workerTimeoutMs = t.workerTimeoutMs, this.math = t.math, t.math && this._mode === "worker" && console.warn("[ooxml] the math engine is unavailable in mode: 'worker'; equations will be skipped. Use mode: 'main' for workbooks with equations.");
|
|
4208
|
+
}, this.sheetCache.clear(), await this.worksheetPullClient?.cancelAll("closed"), this.worksheetPullClient = null, this.generation = (this.generation ?? 0) + 1, this.resourcePolicy = n, this.workerTimeoutMs = t.workerTimeoutMs, this.math = t.math, this.threeD = this._mode === "worker" ? void 0 : t.threeD, this.regionMap = this._mode === "worker" ? void 0 : t.regionMap, t.math && this._mode === "worker" && console.warn("[ooxml] the math engine is unavailable in mode: 'worker'; equations will be skipped. Use mode: 'main' for workbooks with equations."), t.threeD && this._mode === "worker" && console.warn("[ooxml] the 3-D chart addon is unavailable in mode: 'worker'; charts use their 2-D family fallback. Use mode: 'main' for authored 3-D charts."), t.regionMap && this._mode === "worker" && console.warn("[ooxml] the Region Map addon is unavailable in mode: 'worker'; geospatial charts use the unsupported-chart placeholder. Use mode: 'main' for Region Maps.");
|
|
4202
4209
|
let a = i ? e.slice(0) : e, o = await this.bridge.request((e) => this._mode === "worker" ? {
|
|
4203
4210
|
type: "parse",
|
|
4204
4211
|
id: e,
|
|
@@ -4227,13 +4234,13 @@ var Ia = Symbol("retain-xlsx-viewer-fonts"), La = Symbol("release-xlsx-viewer-pr
|
|
|
4227
4234
|
let t = this.retainedFontSets.get(e);
|
|
4228
4235
|
if (t) t.refs++;
|
|
4229
4236
|
else {
|
|
4230
|
-
let n =
|
|
4237
|
+
let n = Ne(this.googleFontNames, Ta, e);
|
|
4231
4238
|
t = {
|
|
4232
4239
|
refs: 1,
|
|
4233
4240
|
faces: null,
|
|
4234
4241
|
loading: n
|
|
4235
4242
|
}, this.retainedFontSets.set(e, t), n.then((e) => {
|
|
4236
|
-
t.faces = e, this.fontsDestroyed &&
|
|
4243
|
+
t.faces = e, this.fontsDestroyed && Me(e);
|
|
4237
4244
|
});
|
|
4238
4245
|
}
|
|
4239
4246
|
await t.loading;
|
|
@@ -4242,7 +4249,7 @@ var Ia = Symbol("retain-xlsx-viewer-fonts"), La = Symbol("release-xlsx-viewer-pr
|
|
|
4242
4249
|
if (n) return;
|
|
4243
4250
|
n = !0;
|
|
4244
4251
|
let r = this.retainedFontSets.get(e);
|
|
4245
|
-
r === t && (r.refs--, !(r.refs > 0) && (this.retainedFontSets.delete(e), r.faces ?
|
|
4252
|
+
r === t && (r.refs--, !(r.refs > 0) && (this.retainedFontSets.delete(e), r.faces ? Me(r.faces) : r.loading.then(Me)));
|
|
4246
4253
|
};
|
|
4247
4254
|
}
|
|
4248
4255
|
async [Ia](e) {
|
|
@@ -4280,7 +4287,7 @@ var Ia = Symbol("retain-xlsx-viewer-fonts"), La = Symbol("release-xlsx-viewer-pr
|
|
|
4280
4287
|
async getResourceMetrics() {
|
|
4281
4288
|
let e = this.metrics;
|
|
4282
4289
|
if (!e) throw Error("Workbook not loaded");
|
|
4283
|
-
return
|
|
4290
|
+
return he(e, async (e) => (await this.bridge.request((e) => ({
|
|
4284
4291
|
type: "resourceUsage",
|
|
4285
4292
|
id: e
|
|
4286
4293
|
}), void 0, { timeoutMs: e })).usage);
|
|
@@ -4323,7 +4330,7 @@ var Ia = Symbol("retain-xlsx-viewer-fonts"), La = Symbol("release-xlsx-viewer-pr
|
|
|
4323
4330
|
if (!a || !o) throw Error(`XLSX worksheet ${e} did not produce a terminal model`);
|
|
4324
4331
|
return this.retainedSheetUsage = o, this.sheetCache.set(e, a), a;
|
|
4325
4332
|
} catch (e) {
|
|
4326
|
-
throw e instanceof
|
|
4333
|
+
throw e instanceof le && (this.resourceFailure ??= e), e;
|
|
4327
4334
|
}
|
|
4328
4335
|
}
|
|
4329
4336
|
ensureWorksheetPullClient() {
|
|
@@ -4351,7 +4358,7 @@ var Ia = Symbol("retain-xlsx-viewer-fonts"), La = Symbol("release-xlsx-viewer-pr
|
|
|
4351
4358
|
try {
|
|
4352
4359
|
return await e();
|
|
4353
4360
|
} catch (e) {
|
|
4354
|
-
throw e instanceof
|
|
4361
|
+
throw e instanceof le && (this.resourceFailure ??= e), e;
|
|
4355
4362
|
}
|
|
4356
4363
|
}, n = (this.archiveOperationTail ?? Promise.resolve()).then(t, t);
|
|
4357
4364
|
return this.archiveOperationTail = n.then(() => void 0, () => void 0), n;
|
|
@@ -4416,7 +4423,9 @@ var Ia = Symbol("retain-xlsx-viewer-fonts"), La = Symbol("release-xlsx-viewer-pr
|
|
|
4416
4423
|
return r !== t && Ci(t, r), a.layoutMetrics && or.forWorksheet(r, a.layoutMetrics.maximumDigitWidth), Sa({
|
|
4417
4424
|
ws: r,
|
|
4418
4425
|
styles: i,
|
|
4419
|
-
math: this.math
|
|
4426
|
+
math: this.math,
|
|
4427
|
+
threeD: this.threeD,
|
|
4428
|
+
regionMap: this.regionMap
|
|
4420
4429
|
}, e, n, {
|
|
4421
4430
|
...s,
|
|
4422
4431
|
fetchImage: this._fetchImage
|
|
@@ -4427,7 +4436,7 @@ var Ia = Symbol("retain-xlsx-viewer-fonts"), La = Symbol("release-xlsx-viewer-pr
|
|
|
4427
4436
|
this.assertResourceHealthy();
|
|
4428
4437
|
let r = Fa(n), i = {
|
|
4429
4438
|
...r.opts,
|
|
4430
|
-
dpr: n.dpr ??
|
|
4439
|
+
dpr: n.dpr ?? F()
|
|
4431
4440
|
};
|
|
4432
4441
|
if (this._mode === "worker") {
|
|
4433
4442
|
if (!Number.isInteger(e) || e < 0 || e >= this.sheetCount) throw Error(`Sheet index ${e} out of range (count: ${this.sheetCount})`);
|
|
@@ -4474,8 +4483,8 @@ var Ia = Symbol("retain-xlsx-viewer-fonts"), La = Symbol("release-xlsx-viewer-pr
|
|
|
4474
4483
|
}
|
|
4475
4484
|
destroy() {
|
|
4476
4485
|
this.generation = (this.generation ?? 1) + 1, this.worksheetPullClient?.cancelAll("closed").catch(() => void 0), this.worksheetPullClient = null, this.bridge.terminate(), this.parsedWorkbook = null, this.sheetCache.clear(), this.sheetLoads.clear(), this.fontsDestroyed = !0;
|
|
4477
|
-
for (let e of this.retainedFontSets.values()) e.faces &&
|
|
4478
|
-
this.retainedFontSets.clear(), this.googleFontNames = [],
|
|
4486
|
+
for (let e of this.retainedFontSets.values()) e.faces && Me(e.faces);
|
|
4487
|
+
this.retainedFontSets.clear(), this.googleFontNames = [], z(this._fetchImage), c(this._fetchImage), this.rawParts.clear(), this.queuedImageLoads?.clear();
|
|
4479
4488
|
}
|
|
4480
4489
|
assertResourceHealthy() {
|
|
4481
4490
|
if (this.resourceFailure) throw this.resourceFailure;
|
|
@@ -4508,10 +4517,10 @@ function Ba(e, t, n) {
|
|
|
4508
4517
|
//#endregion
|
|
4509
4518
|
//#region packages/xlsx/src/element-context.ts
|
|
4510
4519
|
function Va(e, t) {
|
|
4511
|
-
let n = t.colAxis.offsetOf(e.fromCol + 1) + e.fromColOff * t.scale /
|
|
4512
|
-
if (ur(e)) i = e.nativeExtCx * t.scale /
|
|
4520
|
+
let n = t.colAxis.offsetOf(e.fromCol + 1) + e.fromColOff * t.scale / J, r = t.rowAxis.offsetOf(e.fromRow + 1) + e.fromRowOff * t.scale / J, i, a;
|
|
4521
|
+
if (ur(e)) i = e.nativeExtCx * t.scale / J, a = e.nativeExtCy * t.scale / J;
|
|
4513
4522
|
else {
|
|
4514
|
-
let o = t.colAxis.offsetOf(e.toCol + 1) + e.toColOff * t.scale /
|
|
4523
|
+
let o = t.colAxis.offsetOf(e.toCol + 1) + e.toColOff * t.scale / J, s = t.rowAxis.offsetOf(e.toRow + 1) + e.toRowOff * t.scale / J;
|
|
4515
4524
|
i = o - n, a = s - r;
|
|
4516
4525
|
}
|
|
4517
4526
|
if (i <= 0 || a <= 0) return null;
|
|
@@ -4651,7 +4660,7 @@ function Za(e, t, n, r, i) {
|
|
|
4651
4660
|
for (let a = e.charts.length - 1; a >= 0; a--) {
|
|
4652
4661
|
let o = e.charts[a], s = Va(o, r);
|
|
4653
4662
|
if (!s || !Ua(s, r) || !Ha(n, s)) continue;
|
|
4654
|
-
let c =
|
|
4663
|
+
let c = q(o.chart, i);
|
|
4655
4664
|
return {
|
|
4656
4665
|
...Xa(e, t, "chart", a, o, c.text, c.truncated, c.maxTextCharacters),
|
|
4657
4666
|
seriesCount: o.chart.series.length
|
|
@@ -4704,16 +4713,16 @@ function eo(e, t, n, r, i) {
|
|
|
4704
4713
|
}
|
|
4705
4714
|
return null;
|
|
4706
4715
|
}
|
|
4707
|
-
function to(e, t, n, r, i =
|
|
4716
|
+
function to(e, t, n, r, i = De) {
|
|
4708
4717
|
if (!Number.isFinite(n.x) || !Number.isFinite(n.y)) throw RangeError("XLSX hit-test point must contain finite coordinates.");
|
|
4709
4718
|
if (!Number.isFinite(i) || i < 0) throw RangeError("maxTextCharacters must be a finite non-negative number.");
|
|
4710
|
-
let a = Math.min(
|
|
4719
|
+
let a = Math.min(De, Math.floor(i)), o = Ga(e, r);
|
|
4711
4720
|
return Wa(n, o) ? Za(e, t, n, o, a) ?? $a(e, t, n, o, a) ?? eo(e, t, n, o, a) : null;
|
|
4712
4721
|
}
|
|
4713
4722
|
function no(e, t) {
|
|
4714
4723
|
let n = t ?? e.maxTextCharacters;
|
|
4715
4724
|
if (!Number.isFinite(n) || n < 0) throw RangeError("maxTextCharacters must be a finite non-negative number.");
|
|
4716
|
-
let r = Math.min(
|
|
4725
|
+
let r = Math.min(De, Math.floor(n)), i = e.text === void 0 ? void 0 : Ja(e.text, r), a = e.truncated || e.text !== void 0 && i.length < e.text.length;
|
|
4717
4726
|
return {
|
|
4718
4727
|
...structuredClone(e),
|
|
4719
4728
|
...i === void 0 ? {} : { text: i },
|
|
@@ -4930,7 +4939,7 @@ var go = class {
|
|
|
4930
4939
|
if (n !== this._generation) return [];
|
|
4931
4940
|
let o = this._sheetName(a);
|
|
4932
4941
|
for (let n of r) {
|
|
4933
|
-
let r =
|
|
4942
|
+
let r = xe(we([{ text: n.text }]), e, t);
|
|
4934
4943
|
for (let e of r) {
|
|
4935
4944
|
let t = e.slices[0], r = n.text.slice(t.start, t.end);
|
|
4936
4945
|
i.push({
|
|
@@ -4946,10 +4955,10 @@ var go = class {
|
|
|
4946
4955
|
return n === this._generation ? (this._matches = i, this._active = -1, this.matches()) : [];
|
|
4947
4956
|
}
|
|
4948
4957
|
next() {
|
|
4949
|
-
return this._active =
|
|
4958
|
+
return this._active = be(this._active, this._matches.length), this._activePublic();
|
|
4950
4959
|
}
|
|
4951
4960
|
prev() {
|
|
4952
|
-
return this._active =
|
|
4961
|
+
return this._active = Te(this._active, this._matches.length), this._activePublic();
|
|
4953
4962
|
}
|
|
4954
4963
|
_activePublic() {
|
|
4955
4964
|
let e = this._locationAt(this._active);
|
|
@@ -5132,7 +5141,7 @@ function ko(e, t) {
|
|
|
5132
5141
|
//#endregion
|
|
5133
5142
|
//#region packages/xlsx/src/internal/sheet-viewer-runtime.ts
|
|
5134
5143
|
var Ao = class {
|
|
5135
|
-
owner = new
|
|
5144
|
+
owner = new ve("SheetAcquisition");
|
|
5136
5145
|
get current() {
|
|
5137
5146
|
return this.owner.current;
|
|
5138
5147
|
}
|
|
@@ -5214,7 +5223,7 @@ var Mo = class {
|
|
|
5214
5223
|
this.frameScheduler = typeof r.requestAnimationFrame == "function" && typeof r.cancelAnimationFrame == "function" ? {
|
|
5215
5224
|
requestAnimationFrame: (e) => r.requestAnimationFrame(e),
|
|
5216
5225
|
cancelAnimationFrame: (e) => r.cancelAnimationFrame(e)
|
|
5217
|
-
} : null, this.staticDispatcher = e ? new
|
|
5226
|
+
} : null, this.staticDispatcher = e ? new Se(e, t) : null;
|
|
5218
5227
|
}
|
|
5219
5228
|
begin() {
|
|
5220
5229
|
return this.staticDispatcher ? this.staticDispatcher.begin() : ++this.generation;
|
|
@@ -5528,14 +5537,37 @@ function Ro(e, t, n, r) {
|
|
|
5528
5537
|
};
|
|
5529
5538
|
}
|
|
5530
5539
|
//#endregion
|
|
5540
|
+
//#region packages/xlsx/src/internal/worksheet-content-bounds.ts
|
|
5541
|
+
function zo(e) {
|
|
5542
|
+
let t = Math.max(50, e.freezeRows ?? 0), n = Math.max(26, e.freezeCols ?? 0);
|
|
5543
|
+
for (let r of e.rows) {
|
|
5544
|
+
r.index > t && (t = r.index);
|
|
5545
|
+
for (let e of r.cells) e.col > n && (n = e.col);
|
|
5546
|
+
}
|
|
5547
|
+
let r = [
|
|
5548
|
+
...e.charts,
|
|
5549
|
+
...e.images,
|
|
5550
|
+
...e.shapeGroups ?? [],
|
|
5551
|
+
...e.slicers ?? []
|
|
5552
|
+
];
|
|
5553
|
+
for (let e of r) {
|
|
5554
|
+
let r = Number.isSafeInteger(e.fromRow) ? e.fromRow + 1 : 0, i = Number.isSafeInteger(e.toRow) ? e.toRow + 1 : 0, a = Number.isSafeInteger(e.fromCol) ? e.fromCol + 1 : 0, o = Number.isSafeInteger(e.toCol) ? e.toCol + 1 : 0;
|
|
5555
|
+
t = Math.max(t, r, i), n = Math.max(n, a, o);
|
|
5556
|
+
}
|
|
5557
|
+
return {
|
|
5558
|
+
maxRow: Math.min(ar, t),
|
|
5559
|
+
maxCol: Math.min(Q, n)
|
|
5560
|
+
};
|
|
5561
|
+
}
|
|
5562
|
+
//#endregion
|
|
5531
5563
|
//#region packages/xlsx/src/viewer.ts
|
|
5532
|
-
var
|
|
5533
|
-
function
|
|
5534
|
-
if (!e.head || e.head.querySelector(`style[${
|
|
5564
|
+
var Bo = Symbol("XlsxViewer.borrowedWorkbook"), Vo = 150, Ho = 280, Uo = 200, Wo = 240, Go = 200, Ko = 30, qo = 50, Jo = 1, Yo = 1, Xo = .45, Zo = "data-xlsx-viewer-styles", Qo = ".xlsx-tab-strip::-webkit-scrollbar{display:none}[data-xlsx-viewport-input]:focus{outline:none}.xlsx-tab-nav{background:transparent;transition:background 0.1s;}.xlsx-tab-nav:hover{background:rgba(0,0,0,0.08);}.xlsx-zoom-slider{-webkit-appearance:none;appearance:none;background:transparent;height:15px;margin:0;}.xlsx-zoom-slider::-webkit-slider-runnable-track{height:4px;background:#c4c4c4;border-radius:2px;}.xlsx-zoom-slider::-webkit-slider-thumb{-webkit-appearance:none;appearance:none;width:12px;height:12px;margin-top:-4px;border-radius:50%;background:#808080;cursor:pointer;}.xlsx-zoom-slider:hover::-webkit-slider-thumb{background:#5f5f5f;}.xlsx-zoom-slider::-moz-range-track{height:4px;background:#c4c4c4;border-radius:2px;}.xlsx-zoom-slider::-moz-range-thumb{width:12px;height:12px;border:none;border-radius:50%;background:#808080;cursor:pointer;}";
|
|
5565
|
+
function $o(e) {
|
|
5566
|
+
if (!e.head || e.head.querySelector(`style[${Zo}]`)) return;
|
|
5535
5567
|
let t = e.createElement("style");
|
|
5536
|
-
t.setAttribute(
|
|
5568
|
+
t.setAttribute(Zo, ""), t.textContent = Qo, e.head.appendChild(t);
|
|
5537
5569
|
}
|
|
5538
|
-
function
|
|
5570
|
+
function es(e) {
|
|
5539
5571
|
let t = [...e].sort((e, t) => e.first - t.first || e.last - t.last), n = [];
|
|
5540
5572
|
for (let e of t) {
|
|
5541
5573
|
let t = n.at(-1);
|
|
@@ -5546,7 +5578,7 @@ function $o(e) {
|
|
|
5546
5578
|
}
|
|
5547
5579
|
return n;
|
|
5548
5580
|
}
|
|
5549
|
-
function
|
|
5581
|
+
function ts(e, t) {
|
|
5550
5582
|
let n = 0, r = e.length - 1;
|
|
5551
5583
|
for (; n <= r;) {
|
|
5552
5584
|
let i = n + r >>> 1, a = e[i];
|
|
@@ -5556,7 +5588,7 @@ function es(e, t) {
|
|
|
5556
5588
|
}
|
|
5557
5589
|
return !1;
|
|
5558
5590
|
}
|
|
5559
|
-
function
|
|
5591
|
+
function ns(e, t, n) {
|
|
5560
5592
|
let r = 0, i = e.length;
|
|
5561
5593
|
for (; r < i;) {
|
|
5562
5594
|
let a = r + i >>> 1;
|
|
@@ -5564,12 +5596,12 @@ function ts(e, t, n) {
|
|
|
5564
5596
|
}
|
|
5565
5597
|
return r;
|
|
5566
5598
|
}
|
|
5567
|
-
function
|
|
5599
|
+
function rs(e, t) {
|
|
5568
5600
|
for (let n = 1; n < e.length; n++) if (t(e[n - 1]) > t(e[n])) return [...e].sort((e, n) => t(e) - t(n));
|
|
5569
5601
|
return e;
|
|
5570
5602
|
}
|
|
5571
|
-
var
|
|
5572
|
-
function
|
|
5603
|
+
var is = "#1a73e8", as = 4, os = 5, ss = 25e4, cs = 8 * 1024 * 1024, ls = 1 * 1024 * 1024, us = 65536, ds = 65536, fs = 100;
|
|
5604
|
+
function ps(e, t) {
|
|
5573
5605
|
let n = Math.min(e.length, Math.max(0, t));
|
|
5574
5606
|
if (n > 0 && n < e.length) {
|
|
5575
5607
|
let t = e.charCodeAt(n - 1), r = e.charCodeAt(n);
|
|
@@ -5577,7 +5609,7 @@ function fs(e, t) {
|
|
|
5577
5609
|
}
|
|
5578
5610
|
return e.slice(0, n);
|
|
5579
5611
|
}
|
|
5580
|
-
function
|
|
5612
|
+
function ms(e, t) {
|
|
5581
5613
|
let n = 0, r = !1;
|
|
5582
5614
|
for (let t = 0; t < e.length; t++) {
|
|
5583
5615
|
let i = e.charCodeAt(t);
|
|
@@ -5585,17 +5617,17 @@ function ps(e, t) {
|
|
|
5585
5617
|
}
|
|
5586
5618
|
return e.length + (r ? n + 2 : 0) > t ? null : r ? `"${e.replace(/"/g, "\"\"")}"` : e;
|
|
5587
5619
|
}
|
|
5588
|
-
function
|
|
5620
|
+
function hs(e, t, n, r) {
|
|
5589
5621
|
for (let { index: i, edge: a } of t) if (!(a <= r) && Math.abs(e - a) <= n) return i;
|
|
5590
5622
|
return null;
|
|
5591
5623
|
}
|
|
5592
|
-
function
|
|
5624
|
+
function gs(e) {
|
|
5593
5625
|
return {
|
|
5594
5626
|
border: `2px solid ${e}`,
|
|
5595
5627
|
background: `color-mix(in srgb, ${e} 8%, transparent)`
|
|
5596
5628
|
};
|
|
5597
5629
|
}
|
|
5598
|
-
function
|
|
5630
|
+
function _s(e) {
|
|
5599
5631
|
let t = [];
|
|
5600
5632
|
for (let n of e) {
|
|
5601
5633
|
let e = n.x + n.width, r = n.y + n.height;
|
|
@@ -5641,15 +5673,15 @@ function gs(e) {
|
|
|
5641
5673
|
}
|
|
5642
5674
|
return r.join("");
|
|
5643
5675
|
}
|
|
5644
|
-
var
|
|
5645
|
-
function
|
|
5646
|
-
let n = e ? "#fb8c00" : "#ffb300", r = e ? t.active : t.match, i = r ?? (e ?
|
|
5676
|
+
var vs = 0, ys = "color-mix(in srgb, #ffb300 8%, transparent)", bs = "color-mix(in srgb, #fb8c00 8%, transparent)";
|
|
5677
|
+
function xs(e, t = {}) {
|
|
5678
|
+
let n = e ? "#fb8c00" : "#ffb300", r = e ? t.active : t.match, i = r ?? (e ? bs : ys);
|
|
5647
5679
|
return {
|
|
5648
5680
|
border: `2px solid ${r ?? n}`,
|
|
5649
5681
|
background: i
|
|
5650
5682
|
};
|
|
5651
5683
|
}
|
|
5652
|
-
var
|
|
5684
|
+
var Ss = class {
|
|
5653
5685
|
hostDocument;
|
|
5654
5686
|
hostWindow;
|
|
5655
5687
|
acquisition = new Ao();
|
|
@@ -5672,7 +5704,7 @@ var xs = class {
|
|
|
5672
5704
|
stashedRowHeights = /* @__PURE__ */ new Map();
|
|
5673
5705
|
stashedColWidths = /* @__PURE__ */ new Map();
|
|
5674
5706
|
sizeOverrideStore = /* @__PURE__ */ new Map();
|
|
5675
|
-
projectionId =
|
|
5707
|
+
projectionId = Yo++;
|
|
5676
5708
|
canvasArea;
|
|
5677
5709
|
scrollHost;
|
|
5678
5710
|
spacer;
|
|
@@ -5759,18 +5791,18 @@ var xs = class {
|
|
|
5759
5791
|
let r = this.hostDocument.defaultView;
|
|
5760
5792
|
if (!r) throw Error("XlsxViewer requires a document with an active Window");
|
|
5761
5793
|
this.hostWindow = r, this.opts = t, this._mountKind = n.kind, this._nativeScrollbars = t.showScrollbars ?? !0;
|
|
5762
|
-
let i = t[
|
|
5763
|
-
this._borrowed = i !== void 0, this._mode = n.kind === "sheet" ? n.mode :
|
|
5794
|
+
let i = t[Bo];
|
|
5795
|
+
this._borrowed = i !== void 0, this._mode = n.kind === "sheet" ? n.mode : Ce("XlsxViewer", t.mode, i), this._hiddenSheetMode = t.hiddenSheetMode ?? "show", this.viewport = new Mo(t.cellScale ?? 1), this.wrapper = this.hostDocument.createElement("div"), this.wrapper.style.cssText = `position:relative;width:100%;height:100%;background:${n.kind === "composite" ? "#fff" : "transparent"};box-sizing:border-box;font-family:sans-serif;display:flex;flex-direction:column;`, this.gridRegion = this.hostDocument.createElement("div"), this.gridRegion.style.cssText = "position:relative;flex:1;min-height:0;overflow:hidden;";
|
|
5764
5796
|
let a = "position:absolute;top:0;left:0;z-index:3;display:none;background:#f5f5f5;";
|
|
5765
5797
|
if (this.cornerGutter = this.hostDocument.createElement("canvas"), this.cornerGutter.style.cssText = a, this.cornerGutter.setAttribute("data-xlsx-outline", "corner"), this.colGutter = this.hostDocument.createElement("canvas"), this.colGutter.style.cssText = a, this.colGutter.setAttribute("data-xlsx-outline", "col"), this.rowGutter = this.hostDocument.createElement("canvas"), this.rowGutter.style.cssText = a, this.rowGutter.setAttribute("data-xlsx-outline", "row"), this.canvasArea = this.hostDocument.createElement("div"), this.canvasArea.style.cssText = "position:absolute;inset:0;overflow:hidden;", this.canvas = n.kind === "sheet" ? n.canvas : this.hostDocument.createElement("canvas"), this.canvas.style.cssText = "position:absolute;top:0;left:0;z-index:0;display:block;", this.renderDispatcher = new No(this.canvas, this._mode === "worker", this.hostWindow), this.scrollHost = this.hostDocument.createElement("div"), this.scrollHost.setAttribute("data-xlsx-viewport-input", n.kind), this.scrollHost.tabIndex = 0, this.scrollHost.style.cssText = `position:absolute;inset:0;overflow:${this._nativeScrollbars ? "auto" : "clip"};z-index:2;background:transparent;`, this.spacer = this.hostDocument.createElement("div"), this.spacer.style.cssText = "position:absolute;top:0;left:0;pointer-events:none;", this._nativeScrollbars && this.scrollHost.appendChild(this.spacer), this.surface = new Fo(this.canvas, this.canvasArea, this.scrollHost), this.overlayHost = new Io(this.canvasArea, this.canvas, this.scrollHost, {
|
|
5766
|
-
commentMaxWidth:
|
|
5767
|
-
commentMaxHeight:
|
|
5768
|
-
validationMaxWidth:
|
|
5769
|
-
validationMaxHeight:
|
|
5770
|
-
}), this.selectionOverlay = this.overlayHost.selection, this.findOverlay = this.overlayHost.find, this.commentPopup = this.overlayHost.comment, this.validationPanel = this.overlayHost.validation,
|
|
5771
|
-
this.tabBar = this.hostDocument.createElement("div"), this.tabBar.style.cssText = `display:flex;align-items:flex-end;height:${
|
|
5798
|
+
commentMaxWidth: Ho,
|
|
5799
|
+
commentMaxHeight: Uo,
|
|
5800
|
+
validationMaxWidth: Wo,
|
|
5801
|
+
validationMaxHeight: Go
|
|
5802
|
+
}), this.selectionOverlay = this.overlayHost.selection, this.findOverlay = this.overlayHost.find, this.commentPopup = this.overlayHost.comment, this.validationPanel = this.overlayHost.validation, $o(this.hostDocument), n.kind === "composite") {
|
|
5803
|
+
this.tabBar = this.hostDocument.createElement("div"), this.tabBar.style.cssText = `display:flex;align-items:flex-end;height:${Ko}px;flex-shrink:0;background:#f0f0f0;border-top:1px solid #c8ccd0;`, this.navPrev = this.makeNavButton("◀", "Scroll tabs left", () => this.scrollTabs(-1)), this.navNext = this.makeNavButton("▶", "Scroll tabs right", () => this.scrollTabs(1)), this.navPrev.dataset.xlsxTabNav = "prev", this.navNext.dataset.xlsxTabNav = "next";
|
|
5772
5804
|
let e = this.hostDocument.createElement("div");
|
|
5773
|
-
e.style.cssText = `display:flex;flex-shrink:0;width:${
|
|
5805
|
+
e.style.cssText = `display:flex;flex-shrink:0;width:${qo}px;height:100%;`, e.appendChild(this.navPrev), e.appendChild(this.navNext), this.tabStrip = this.hostDocument.createElement("div"), this.tabStrip.style.cssText = `position:relative;display:block;flex:1;min-width:0;height:100%;margin-left:${Jo}px;overflow-x:auto;overflow-y:hidden;scrollbar-width:none;`, this.tabStrip.classList.add("xlsx-tab-strip"), this.tabStrip.addEventListener("scroll", () => this.updateNavButtons()), this.tabList = this.hostDocument.createElement("div"), this.tabList.style.cssText = `display:flex;align-items:flex-end;height:100%;gap:${Jo}px;box-sizing:border-box;`, this.tabList.style.width = "max-content", this.tabList.style.minWidth = "100%", this.tabStrip.appendChild(this.tabList), this.tabBar.appendChild(e), this.tabBar.appendChild(this.tabStrip), this.opts.showZoomSlider !== !1 && this.tabBar.appendChild(this.buildZoomControl());
|
|
5774
5806
|
}
|
|
5775
5807
|
this.gridRegion.appendChild(this.canvasArea), this.wrapper.appendChild(this.gridRegion), n.kind === "composite" && this.wrapper.appendChild(this.tabBar), e.appendChild(this.wrapper), this.rowGutter.addEventListener("pointerdown", (e) => this.onGutterPointerDown(e, "row")), this.colGutter.addEventListener("pointerdown", (e) => this.onGutterPointerDown(e, "col")), this._nativeScrollbars && this.surface.on("scroll", () => {
|
|
5776
5808
|
if (this.pendingTap = null, this.pendingElementClick = null, this.hideCommentPopup(), this.hideValidationPanel(), this.scrollHost.clientWidth > 0) {
|
|
@@ -5815,6 +5847,8 @@ var xs = class {
|
|
|
5815
5847
|
workerTimeoutMs: this.opts.workerTimeoutMs,
|
|
5816
5848
|
wasmUrl: this.opts.wasmUrl,
|
|
5817
5849
|
math: this.opts.math,
|
|
5850
|
+
threeD: this.opts.threeD,
|
|
5851
|
+
regionMap: this.opts.regionMap,
|
|
5818
5852
|
mode: this._mode
|
|
5819
5853
|
}), () => {
|
|
5820
5854
|
this.sheetRequestGeneration++, this.renderDispatcher.begin(), this._find.invalidate(), this.hideValidationPanel(), this.releaseHostFonts();
|
|
@@ -6082,7 +6116,7 @@ var xs = class {
|
|
|
6082
6116
|
return this.currentWorksheet?.rightToLeft === !0;
|
|
6083
6117
|
}
|
|
6084
6118
|
updateFooterDirection() {
|
|
6085
|
-
this._mountKind === "composite" && (this.tabBar.style.flexDirection = this.isRtl ? "row-reverse" : "row", this.tabStrip.style.marginLeft = this.isRtl ? "0" : `${
|
|
6119
|
+
this._mountKind === "composite" && (this.tabBar.style.flexDirection = this.isRtl ? "row-reverse" : "row", this.tabStrip.style.marginLeft = this.isRtl ? "0" : `${Jo}px`, this.tabStrip.style.marginRight = this.isRtl ? `${Jo}px` : "0", this.tabList.style.flexDirection = this.isRtl ? "row-reverse" : "row");
|
|
6086
6120
|
}
|
|
6087
6121
|
get maxScrollLeft() {
|
|
6088
6122
|
return this.syncNativeViewportExtent(), this.viewport.maxX;
|
|
@@ -6246,22 +6280,22 @@ var xs = class {
|
|
|
6246
6280
|
if (!t || !n) return null;
|
|
6247
6281
|
let r = e.maxCells ?? 1e3;
|
|
6248
6282
|
if (!Number.isFinite(r) || r < 0) throw RangeError("maxCells must be a finite non-negative number.");
|
|
6249
|
-
let i = Math.min(io, Math.floor(r)), a = e.maxTextCharacters ??
|
|
6283
|
+
let i = Math.min(io, Math.floor(r)), a = e.maxTextCharacters ?? ls;
|
|
6250
6284
|
if (!Number.isFinite(a) || a < 0) throw RangeError("maxTextCharacters must be a finite non-negative number.");
|
|
6251
6285
|
let o = Math.min(ao, Math.floor(a)), s = 0, c = !1, l = (e) => {
|
|
6252
6286
|
let t = typeof e == "string" ? [e] : e, n = [], r = 0;
|
|
6253
6287
|
for (let e = 0; e < t.length; e++) {
|
|
6254
|
-
let i = t[e], a = typeof i == "string" ? i : i.text, l = Math.max(0, Math.min(
|
|
6288
|
+
let i = t[e], a = typeof i == "string" ? i : i.text, l = Math.max(0, Math.min(ds - r, o - s)), u = ps(a, l);
|
|
6255
6289
|
if (n.push(u), r += u.length, s += u.length, u.length < a.length || e + 1 < t.length && l === 0) {
|
|
6256
6290
|
c = !0;
|
|
6257
6291
|
break;
|
|
6258
6292
|
}
|
|
6259
6293
|
}
|
|
6260
6294
|
return n.join("");
|
|
6261
|
-
}, u = n.areas.some((e) => e.kind === "sheet"), d =
|
|
6295
|
+
}, u = n.areas.some((e) => e.kind === "sheet"), d = es(n.areas.flatMap((e) => e.kind === "rows" ? [{
|
|
6262
6296
|
first: e.firstRow,
|
|
6263
6297
|
last: e.lastRow
|
|
6264
|
-
}] : [])), f =
|
|
6298
|
+
}] : [])), f = es(n.areas.flatMap((e) => e.kind === "columns" ? [{
|
|
6265
6299
|
first: e.firstColumn,
|
|
6266
6300
|
last: e.lastColumn
|
|
6267
6301
|
}] : [])), p = n.areas.flatMap((e) => e.kind === "cells" ? [e] : []), m = p.flatMap((e, t) => [{
|
|
@@ -6275,13 +6309,13 @@ var xs = class {
|
|
|
6275
6309
|
}]).sort((e, t) => e.row - t.row || Number(e.active) - Number(t.active)), h = /* @__PURE__ */ new Set(), g = 0, _ = [], v = [], y = !1, b = u || f.length > 0 ? [{
|
|
6276
6310
|
first: 1,
|
|
6277
6311
|
last: ar
|
|
6278
|
-
}] :
|
|
6312
|
+
}] : es([...d, ...p.map((e) => ({
|
|
6279
6313
|
first: e.top,
|
|
6280
6314
|
last: e.bottom
|
|
6281
6315
|
}))]), x = this.selectionContextRows.get(t);
|
|
6282
|
-
x || (x =
|
|
6316
|
+
x || (x = rs(t.rows, (e) => e.index), this.selectionContextRows.set(t, x));
|
|
6283
6317
|
cellScan: for (let e of b) {
|
|
6284
|
-
let n =
|
|
6318
|
+
let n = ns(x, e.first, (e) => e.index);
|
|
6285
6319
|
for (; n < x.length;) {
|
|
6286
6320
|
let r = x[n++];
|
|
6287
6321
|
if (r.index > e.last) break;
|
|
@@ -6290,18 +6324,18 @@ var xs = class {
|
|
|
6290
6324
|
let e = m[g++];
|
|
6291
6325
|
e.active ? h.add(e.index) : h.delete(e.index), a = !0;
|
|
6292
6326
|
}
|
|
6293
|
-
a && (_ =
|
|
6327
|
+
a && (_ = es([...h].map((e) => ({
|
|
6294
6328
|
first: p[e].left,
|
|
6295
6329
|
last: p[e].right
|
|
6296
6330
|
}))));
|
|
6297
|
-
let o = u ||
|
|
6331
|
+
let o = u || ts(d, r.index) ? [{
|
|
6298
6332
|
first: 1,
|
|
6299
6333
|
last: Q
|
|
6300
|
-
}] :
|
|
6334
|
+
}] : es([...f, ..._]);
|
|
6301
6335
|
for (let e of o) {
|
|
6302
6336
|
let n = this.selectionContextCells.get(r);
|
|
6303
|
-
n || (n =
|
|
6304
|
-
let a =
|
|
6337
|
+
n || (n = rs(r.cells, (e) => e.col), this.selectionContextCells.set(r, n));
|
|
6338
|
+
let a = ns(n, e.first, (e) => e.col);
|
|
6305
6339
|
for (; a < n.length;) {
|
|
6306
6340
|
let r = n[a++];
|
|
6307
6341
|
if (r.col > e.last) break;
|
|
@@ -6354,7 +6388,7 @@ var xs = class {
|
|
|
6354
6388
|
if (!this.opts.onSelectionContextChange || this._destroyed || this.selectionContextNotificationFrame !== null || this.selectionContextNotificationMicrotask) return;
|
|
6355
6389
|
let e = () => {
|
|
6356
6390
|
if (this.selectionContextNotificationFrame = null, this.selectionContextNotificationMicrotask = !1, this._destroyed) return;
|
|
6357
|
-
let e = this.getSelectionContext({ maxTextCharacters:
|
|
6391
|
+
let e = this.getSelectionContext({ maxTextCharacters: us });
|
|
6358
6392
|
this.opts.onSelectionContextChange?.(e ? structuredClone(e) : null);
|
|
6359
6393
|
};
|
|
6360
6394
|
typeof this.hostWindow.requestAnimationFrame == "function" ? this.selectionContextNotificationFrame = this.hostWindow.requestAnimationFrame(e) : (this.selectionContextNotificationMicrotask = !0, queueMicrotask(e));
|
|
@@ -6369,7 +6403,7 @@ var xs = class {
|
|
|
6369
6403
|
this.finishSelectionNotificationChain();
|
|
6370
6404
|
return;
|
|
6371
6405
|
}
|
|
6372
|
-
if (this.selectionNotificationCount >=
|
|
6406
|
+
if (this.selectionNotificationCount >= fs) {
|
|
6373
6407
|
this.lastNotifiedSelectionState = e ? structuredClone(e) : null, this.finishSelectionNotificationChain();
|
|
6374
6408
|
return;
|
|
6375
6409
|
}
|
|
@@ -6428,7 +6462,7 @@ var xs = class {
|
|
|
6428
6462
|
edge: t.x + t.w
|
|
6429
6463
|
}));
|
|
6430
6464
|
}
|
|
6431
|
-
let o =
|
|
6465
|
+
let o = hs(a, i, as, s);
|
|
6432
6466
|
return o === null ? null : {
|
|
6433
6467
|
kind: "col",
|
|
6434
6468
|
index: o,
|
|
@@ -6448,7 +6482,7 @@ var xs = class {
|
|
|
6448
6482
|
edge: t.y + t.h
|
|
6449
6483
|
}));
|
|
6450
6484
|
}
|
|
6451
|
-
let a =
|
|
6485
|
+
let a = hs(o, i, as, c);
|
|
6452
6486
|
return a === null ? null : {
|
|
6453
6487
|
kind: "row",
|
|
6454
6488
|
index: a,
|
|
@@ -6463,10 +6497,10 @@ var xs = class {
|
|
|
6463
6497
|
if (!n || !r) return;
|
|
6464
6498
|
let i = this.viewport.scale, a = this.canvasArea.getBoundingClientRect();
|
|
6465
6499
|
if (n.kind === "col") {
|
|
6466
|
-
let t = this.screenX(e - a.left, 0), o = Math.max(
|
|
6500
|
+
let t = this.screenX(e - a.left, 0), o = Math.max(os, Math.round((t - n.originScaled) / i));
|
|
6467
6501
|
r.colWidths[n.index] = tr(o, n.mdw), this.recordSizeOverride("col", n.index);
|
|
6468
6502
|
} else {
|
|
6469
|
-
let e = t - a.top, o = Math.max(
|
|
6503
|
+
let e = t - a.top, o = Math.max(os, Math.round((e - n.originScaled) / i));
|
|
6470
6504
|
r.rowHeights[n.index] = rr(o), this.recordSizeOverride("row", n.index);
|
|
6471
6505
|
}
|
|
6472
6506
|
or.invalidate(r), this.updateSpacerSize(r), this.updateSelectionOverlay(), this.scheduleRender();
|
|
@@ -6516,12 +6550,12 @@ var xs = class {
|
|
|
6516
6550
|
c1: n.left,
|
|
6517
6551
|
c2: n.right
|
|
6518
6552
|
}, l = o - a + 1, u = c - s + 1;
|
|
6519
|
-
if (l > Math.floor(
|
|
6553
|
+
if (l > Math.floor(ss / u)) return {
|
|
6520
6554
|
status: "too-large",
|
|
6521
6555
|
limit: "cells"
|
|
6522
6556
|
};
|
|
6523
6557
|
let d = l * u, f = Math.max(0, l - 1) + l * Math.max(0, u - 1);
|
|
6524
|
-
if (f >
|
|
6558
|
+
if (f > cs) return {
|
|
6525
6559
|
status: "too-large",
|
|
6526
6560
|
limit: "text"
|
|
6527
6561
|
};
|
|
@@ -6530,7 +6564,7 @@ var xs = class {
|
|
|
6530
6564
|
if (n.col < s || n.col > c) continue;
|
|
6531
6565
|
let r = n.value, i = this.wb?.cellText(e, n) ?? "";
|
|
6532
6566
|
if (this.wb || (r.type === "text" ? i = r.runs ? r.runs.map((e) => e.text).join("") : r.text : r.type === "number" ? i = String(r.number) : r.type === "bool" ? i = r.bool ? "TRUE" : "FALSE" : r.type === "error" && (i = r.error)), i) {
|
|
6533
|
-
let e =
|
|
6567
|
+
let e = ms(i, cs - f);
|
|
6534
6568
|
if (e === null) return {
|
|
6535
6569
|
status: "too-large",
|
|
6536
6570
|
limit: "text"
|
|
@@ -6608,7 +6642,7 @@ var xs = class {
|
|
|
6608
6642
|
last: ar,
|
|
6609
6643
|
start: a,
|
|
6610
6644
|
end: s
|
|
6611
|
-
}], h = this.opts.selectionColor ??
|
|
6645
|
+
}], h = this.opts.selectionColor ?? is, { background: g } = gs(h), _ = /* @__PURE__ */ new Set(), v = [], y = [];
|
|
6612
6646
|
for (let t of e.areas) {
|
|
6613
6647
|
let e = t.kind === "cells" ? {
|
|
6614
6648
|
top: t.top,
|
|
@@ -6680,7 +6714,7 @@ var xs = class {
|
|
|
6680
6714
|
if (v.length > 0) {
|
|
6681
6715
|
let t = "http://www.w3.org/2000/svg", n = this.hostDocument.createElementNS(t, "svg");
|
|
6682
6716
|
n.setAttribute("data-xlsx-selection-fill", ""), n.style.cssText = "position:absolute;inset:0;width:100%;height:100%;overflow:hidden;pointer-events:none;";
|
|
6683
|
-
let r = e.areas.length > 1, i = this.getCellRect(e.activeCell.row, e.activeCell.col), a = `xlsx-selection-mask-${++
|
|
6717
|
+
let r = e.areas.length > 1, i = this.getCellRect(e.activeCell.row, e.activeCell.col), a = `xlsx-selection-mask-${++vs}`, c = this.hostDocument.createElementNS(t, "defs"), l = this.hostDocument.createElementNS(t, "mask");
|
|
6684
6718
|
l.setAttribute("id", a), l.setAttribute("maskUnits", "userSpaceOnUse"), l.setAttribute("x", "0"), l.setAttribute("y", "0"), l.setAttribute("width", String(o)), l.setAttribute("height", String(s));
|
|
6685
6719
|
let u = this.hostDocument.createElementNS(t, "path");
|
|
6686
6720
|
if (u.setAttribute("d", v.join("")), u.setAttribute("fill", "#fff"), l.appendChild(u), i) for (let e of m) for (let n of p) {
|
|
@@ -6692,7 +6726,7 @@ var xs = class {
|
|
|
6692
6726
|
c.appendChild(l), n.appendChild(c);
|
|
6693
6727
|
let d = this.hostDocument.createElementNS(t, "rect");
|
|
6694
6728
|
d.setAttribute("x", "0"), d.setAttribute("y", "0"), d.setAttribute("width", String(o)), d.setAttribute("height", String(s)), d.setAttribute("fill", g), d.setAttribute("mask", `url(#${a})`), n.appendChild(d);
|
|
6695
|
-
let f = r ? "" :
|
|
6729
|
+
let f = r ? "" : _s(y);
|
|
6696
6730
|
if (f) {
|
|
6697
6731
|
let e = this.hostDocument.createElementNS(t, "path");
|
|
6698
6732
|
e.setAttribute("data-xlsx-selection-border", ""), e.setAttribute("d", f), e.setAttribute("fill", "none"), e.setAttribute("stroke", h), e.setAttribute("stroke-width", "2"), e.setAttribute("stroke-linecap", "square"), e.setAttribute("stroke-linejoin", "miter"), n.appendChild(e);
|
|
@@ -6716,7 +6750,7 @@ var xs = class {
|
|
|
6716
6750
|
i.setAttribute("data-xlsx-element-context-clip", ""), i.style.cssText = `position:absolute;left:${r.clip.x}px;top:${r.clip.y}px;width:${r.clip.width}px;height:${r.clip.height}px;overflow:hidden;pointer-events:none;`;
|
|
6717
6751
|
let a = this.hostDocument.createElement("div");
|
|
6718
6752
|
a.setAttribute("data-xlsx-element-context-outline", e.elementType);
|
|
6719
|
-
let o = this.opts.selectionColor ??
|
|
6753
|
+
let o = this.opts.selectionColor ?? is;
|
|
6720
6754
|
a.style.cssText = `position:absolute;left:${r.rect.x - r.clip.x}px;top:${r.rect.y - r.clip.y}px;width:${r.rect.width}px;height:${r.rect.height}px;box-sizing:border-box;border:2px solid ${o};background:color-mix(in srgb, ${o} 6%, transparent);transform:rotate(${r.rotation}deg);transform-origin:center;pointer-events:none;`, i.appendChild(a), this.overlayHost.appendSelection(i);
|
|
6721
6755
|
}
|
|
6722
6756
|
maybeDrawValidationDropdown() {
|
|
@@ -6741,7 +6775,7 @@ var xs = class {
|
|
|
6741
6775
|
this.overlayHost.clearFind();
|
|
6742
6776
|
let e = this.currentWorksheet;
|
|
6743
6777
|
if (!e) return;
|
|
6744
|
-
let t = this.viewport.scale, n = (e) => Math.round(e * t), r = n(50), i = n(22), a = e.freezeRows ?? 0, o = e.freezeCols ?? 0, s = $(e).roundedFrozenExtent(t), c = r + s.width, l = i + s.height, u =
|
|
6778
|
+
let t = this.viewport.scale, n = (e) => Math.round(e * t), r = n(50), i = n(22), a = e.freezeRows ?? 0, o = e.freezeCols ?? 0, s = $(e).roundedFrozenExtent(t), c = r + s.width, l = i + s.height, u = xs(!1, this.opts.findHighlightColors), d = xs(!0, this.opts.findHighlightColors);
|
|
6745
6779
|
for (let e of this._find.sheetHighlights(this.currentSheet)) {
|
|
6746
6780
|
let t = this.getCellRect(e.row, e.col);
|
|
6747
6781
|
if (!t) continue;
|
|
@@ -6896,7 +6930,7 @@ var xs = class {
|
|
|
6896
6930
|
};
|
|
6897
6931
|
else return !1;
|
|
6898
6932
|
let r = this.opts.onHyperlinkClick;
|
|
6899
|
-
return r ? (r(n), !0) : (n.kind === "external" ?
|
|
6933
|
+
return r ? (r(n), !0) : (n.kind === "external" ? O(n.url, void 0, this.hostWindow) : this.navigateInternalHyperlink(n.ref), !0);
|
|
6900
6934
|
}
|
|
6901
6935
|
navigateInternalHyperlink(e) {
|
|
6902
6936
|
let t = e.lastIndexOf("!");
|
|
@@ -6914,7 +6948,7 @@ var xs = class {
|
|
|
6914
6948
|
}
|
|
6915
6949
|
this.commentPopupKey !== t && (this.hideCommentPopup(), this.commentPopupKey = t, this.commentPopupTimer = setTimeout(() => {
|
|
6916
6950
|
this.commentPopupTimer = null, this.renderCommentPopup(e, n);
|
|
6917
|
-
},
|
|
6951
|
+
}, Vo));
|
|
6918
6952
|
}
|
|
6919
6953
|
renderCommentPopup(e, t) {
|
|
6920
6954
|
let n = this.getCellRect(e.row, e.col);
|
|
@@ -7224,7 +7258,7 @@ var xs = class {
|
|
|
7224
7258
|
this._pendingZoomAnchor = Number.isFinite(t) && Number.isFinite(n) ? {
|
|
7225
7259
|
x: t,
|
|
7226
7260
|
y: n
|
|
7227
|
-
} : null, this.setScale(
|
|
7261
|
+
} : null, this.setScale(Ae(this.viewport.scale, e.deltaY));
|
|
7228
7262
|
}, { passive: !1 }), this.surface.on("pointerleave", () => this.hideCommentPopup()), this.keydownHandler = (e) => {
|
|
7229
7263
|
if ((e.ctrlKey || e.metaKey) && e.key === "c") {
|
|
7230
7264
|
if (e.defaultPrevented || e.isComposing) return;
|
|
@@ -7285,12 +7319,12 @@ var xs = class {
|
|
|
7285
7319
|
this.updateNavButtons();
|
|
7286
7320
|
}
|
|
7287
7321
|
tabStyle(e, t) {
|
|
7288
|
-
let n =
|
|
7322
|
+
let n = Ko - 2, r = Ko - 5, i = t ? `box-shadow:inset 0 -${e ? 2 : 3}px 0 0 ${t};` : "";
|
|
7289
7323
|
return e ? `display:inline-block;flex:none;padding:0 14px;position:relative;border:1px solid #c8ccd0;border-bottom:none;border-radius:3px 3px 0 0;cursor:pointer;white-space:nowrap;max-width:160px;overflow:hidden;text-overflow:ellipsis;outline:none;box-sizing:border-box;height:${n}px;font-size:13px;background:#fff;color:#000;border-bottom:1px solid #fff;font-weight:600;top:1px;` + i : `display:inline-block;flex:none;padding:0 14px;position:relative;border:1px solid #c8ccd0;border-bottom:none;border-radius:3px 3px 0 0;cursor:pointer;white-space:nowrap;max-width:160px;overflow:hidden;text-overflow:ellipsis;outline:none;box-sizing:border-box;height:${r}px;font-size:11px;background:#e0e0e0;color:#555;` + i;
|
|
7290
7324
|
}
|
|
7291
7325
|
tabCss(e, t) {
|
|
7292
7326
|
let n = this.tabStyle(t, this.tabColors[e]);
|
|
7293
|
-
return this._hiddenSheetMode !== "show" && this.wb?.isHidden(e) && (n += this._hiddenSheetMode === "skip" ? "display:none;" : `opacity:${
|
|
7327
|
+
return this._hiddenSheetMode !== "show" && this.wb?.isHidden(e) && (n += this._hiddenSheetMode === "skip" ? "display:none;" : `opacity:${Xo};`), n;
|
|
7294
7328
|
}
|
|
7295
7329
|
buildZoomControl() {
|
|
7296
7330
|
let e = this.opts.zoomMin ?? .1, t = this.opts.zoomMax ?? 4, n = this.viewport.scale, r = this.hostDocument.createElement("div");
|
|
@@ -7316,8 +7350,8 @@ var xs = class {
|
|
|
7316
7350
|
if (this.viewport.setScale(i), this.zoomSlider && (this.zoomSlider.value = String(this.zoomScaleToPos(i, t, n))), this.zoomLabel && (this.zoomLabel.textContent = `${r}%`), this.currentWorksheet) {
|
|
7317
7351
|
let e = this.effectiveScrollLeft, t = this.viewportTop;
|
|
7318
7352
|
if (this.layoutGutters(), this.updateSpacerSize(this.currentWorksheet), o) {
|
|
7319
|
-
this.viewportTop =
|
|
7320
|
-
let n = this.screenX(o.x, 0), r = this.maxScrollLeft, s =
|
|
7353
|
+
this.viewportTop = ye(t, o.y, a, i, { maxScroll: this.maxScrollTop });
|
|
7354
|
+
let n = this.screenX(o.x, 0), r = this.maxScrollLeft, s = ye(e, n, a, i, { maxScroll: r });
|
|
7321
7355
|
this.setViewportLeft(s);
|
|
7322
7356
|
} else this.setViewportLeft(e);
|
|
7323
7357
|
}
|
|
@@ -7328,10 +7362,10 @@ var xs = class {
|
|
|
7328
7362
|
return this.viewport.scale;
|
|
7329
7363
|
}
|
|
7330
7364
|
zoomIn() {
|
|
7331
|
-
this.setScale(
|
|
7365
|
+
this.setScale(Oe(this.getScale()));
|
|
7332
7366
|
}
|
|
7333
7367
|
zoomOut() {
|
|
7334
|
-
this.setScale(
|
|
7368
|
+
this.setScale(je(this.getScale()));
|
|
7335
7369
|
}
|
|
7336
7370
|
fitWidth() {
|
|
7337
7371
|
this._fit("width");
|
|
@@ -7342,7 +7376,7 @@ var xs = class {
|
|
|
7342
7376
|
_fit(e) {
|
|
7343
7377
|
let t = this.currentWorksheet;
|
|
7344
7378
|
if (!t) return;
|
|
7345
|
-
let { width: n, height: r } = this._naturalContentExtent(t), i =
|
|
7379
|
+
let { width: n, height: r } = this._naturalContentExtent(t), i = _e({
|
|
7346
7380
|
contentWidth: n,
|
|
7347
7381
|
contentHeight: r,
|
|
7348
7382
|
containerWidth: this.canvasArea.clientWidth,
|
|
@@ -7351,22 +7385,16 @@ var xs = class {
|
|
|
7351
7385
|
i <= 0 || this.setScale(i);
|
|
7352
7386
|
}
|
|
7353
7387
|
_naturalContentExtent(e) {
|
|
7354
|
-
let
|
|
7355
|
-
for (let r of e.rows) {
|
|
7356
|
-
r.index > t && (t = r.index);
|
|
7357
|
-
for (let e of r.cells) e.col > n && (n = e.col);
|
|
7358
|
-
}
|
|
7388
|
+
let { maxRow: t, maxCol: n } = zo(e);
|
|
7359
7389
|
return $(e).logicalContentExtent(t, n, 50, 22);
|
|
7360
7390
|
}
|
|
7361
7391
|
updateSpacerSize(e) {
|
|
7362
|
-
let t = this.viewport.scale
|
|
7363
|
-
|
|
7364
|
-
|
|
7365
|
-
|
|
7366
|
-
|
|
7367
|
-
|
|
7368
|
-
let o = $(e).roundedContentExtent(i, a, t, 50, 22), s = o.width, c = o.height;
|
|
7369
|
-
this.spacer.style.width = `${s}px`, this.spacer.style.height = `${c}px`, this.viewport.setViewportSize(this.scrollHost.clientWidth, this.scrollHost.clientHeight), this.viewport.setExtent(s, c), this.setViewportLeft(this.viewport.x), this.viewportTop = this.viewport.y;
|
|
7392
|
+
let t = this.viewport.scale;
|
|
7393
|
+
e.freezeRows, e.freezeCols;
|
|
7394
|
+
let { maxRow: n, maxCol: r } = zo(e);
|
|
7395
|
+
n += 30, r += 10;
|
|
7396
|
+
let i = $(e).roundedContentExtent(n, r, t, 50, 22), a = i.width, o = i.height;
|
|
7397
|
+
this.spacer.style.width = `${a}px`, this.spacer.style.height = `${o}px`, this.viewport.setViewportSize(this.scrollHost.clientWidth, this.scrollHost.clientHeight), this.viewport.setExtent(a, o), this.setViewportLeft(this.viewport.x), this.viewportTop = this.viewport.y;
|
|
7370
7398
|
}
|
|
7371
7399
|
scheduleRender() {
|
|
7372
7400
|
this.renderDispatcher.schedule(() => this.renderCurrentSheet().catch((e) => this._reportRenderError(e)));
|
|
@@ -7450,17 +7478,17 @@ var xs = class {
|
|
|
7450
7478
|
destroyedError() {
|
|
7451
7479
|
return /* @__PURE__ */ Error(this._mountKind === "sheet" ? "XlsxSheetViewer is destroyed" : "XlsxViewer is destroyed");
|
|
7452
7480
|
}
|
|
7453
|
-
},
|
|
7481
|
+
}, Cs = class e extends Ss {
|
|
7454
7482
|
static fromWorkbook(t, n, r = {}) {
|
|
7455
7483
|
return new e(t, {
|
|
7456
7484
|
...r,
|
|
7457
|
-
[
|
|
7485
|
+
[Bo]: n
|
|
7458
7486
|
});
|
|
7459
7487
|
}
|
|
7460
7488
|
constructor(e, t = {}) {
|
|
7461
7489
|
super(e, t, { kind: "composite" });
|
|
7462
7490
|
}
|
|
7463
|
-
},
|
|
7491
|
+
}, ws = class e {
|
|
7464
7492
|
engine;
|
|
7465
7493
|
canvasMount;
|
|
7466
7494
|
destroyed = !1;
|
|
@@ -7469,16 +7497,16 @@ var xs = class {
|
|
|
7469
7497
|
static fromWorkbook(t, n, r = {}) {
|
|
7470
7498
|
return new e(t, {
|
|
7471
7499
|
...r,
|
|
7472
|
-
[
|
|
7500
|
+
[Bo]: n
|
|
7473
7501
|
});
|
|
7474
7502
|
}
|
|
7475
7503
|
constructor(e, t = {}) {
|
|
7476
7504
|
this.canvasElement = e;
|
|
7477
|
-
let n = t[
|
|
7478
|
-
this.canvasMount = new
|
|
7505
|
+
let n = t[Bo], r = Ce("XlsxSheetViewer", t.mode, n), i = e.getBoundingClientRect();
|
|
7506
|
+
this.canvasMount = new Ee(e, {
|
|
7479
7507
|
wrapperCssText: `position:relative;display:inline-block;vertical-align:top;overflow:hidden;width:${e.style.width || `${i.width || e.width}px`};height:${e.style.height || `${i.height || e.height}px`};`,
|
|
7480
7508
|
restoreMode: "style-and-bitmap"
|
|
7481
|
-
}), this.engine = new
|
|
7509
|
+
}), this.engine = new Ss(this.canvasMount.wrapper, {
|
|
7482
7510
|
...t,
|
|
7483
7511
|
onResourceMetrics: (e) => {
|
|
7484
7512
|
this.lastMetrics = e, t.onResourceMetrics?.(e);
|
|
@@ -7635,20 +7663,20 @@ var xs = class {
|
|
|
7635
7663
|
destroyedError() {
|
|
7636
7664
|
return /* @__PURE__ */ Error("XlsxSheetViewer is destroyed");
|
|
7637
7665
|
}
|
|
7638
|
-
},
|
|
7666
|
+
}, Ts = /* @__PURE__ */ e({
|
|
7639
7667
|
MAX_SELECTION_AREAS: () => 128,
|
|
7640
7668
|
MAX_SELECTION_CONTEXT_CELLS: () => io,
|
|
7641
7669
|
MAX_SELECTION_CONTEXT_TEXT_CHARACTERS: () => ao,
|
|
7642
7670
|
OoxmlDecodedImageLimitError: () => l,
|
|
7643
|
-
OoxmlError: () =>
|
|
7644
|
-
OoxmlResourceLimitError: () =>
|
|
7645
|
-
XlsxSheetViewer: () =>
|
|
7646
|
-
XlsxViewer: () =>
|
|
7671
|
+
OoxmlError: () => re,
|
|
7672
|
+
OoxmlResourceLimitError: () => le,
|
|
7673
|
+
XlsxSheetViewer: () => ws,
|
|
7674
|
+
XlsxViewer: () => Cs,
|
|
7647
7675
|
XlsxWorkbook: () => Ra,
|
|
7648
|
-
autoResize: () =>
|
|
7676
|
+
autoResize: () => ke,
|
|
7649
7677
|
isOoxmlDecodedImageLimitError: () => f,
|
|
7650
|
-
openExternalHyperlink: () =>
|
|
7678
|
+
openExternalHyperlink: () => O,
|
|
7651
7679
|
resolveSharedStrings: () => Ye
|
|
7652
7680
|
});
|
|
7653
7681
|
//#endregion
|
|
7654
|
-
export { io as a, ro as i,
|
|
7682
|
+
export { io as a, ro as i, ws as n, ao as o, Cs as r, Ra as s, Ts as t };
|