@silurus/ooxml 0.84.1 → 0.85.1
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 +44 -18
- package/dist/assets/render-worker-BRKOyWVH.js +24 -0
- package/dist/assets/render-worker-CtLMFj9r.js +10 -0
- package/dist/assets/render-worker-NZPOUOTU.js +11 -0
- package/dist/{canvas-viewer-mechanics-CIfhCgYA.js → canvas-viewer-mechanics-CfRzOhz5.js} +308 -234
- package/dist/chart-ex.mjs +270 -270
- package/dist/{comment-ui-runtime-CdMMApEN.js → comment-ui-runtime-CAbpuWi_.js} +4 -4
- package/dist/{comment-ui-runtime-C5qimVMD.js → comment-ui-runtime-DAKBCpsM.js} +5 -5
- package/dist/comment-ui-runtime-DTaaZdXC.js +2 -0
- package/dist/{comments-BAlAyIhb.js → comments-Brfxa3hQ.js} +1 -1
- package/dist/{document-pull-client-BXw6AAhY.js → document-pull-client-BkHHIdR4.js} +4661 -4357
- package/dist/{docx-BA1vB0V-.js → docx-_uelcAui.js} +338 -304
- package/dist/docx.mjs +7 -6
- package/dist/docx_parser_bg.wasm +0 -0
- package/dist/{dom-interaction-boundary-DS6BVyHA.js → dom-interaction-boundary-CMDDgICk.js} +1 -1
- package/dist/index.mjs +3 -3
- package/dist/line-distribute-CiKeWjBF.js +1023 -0
- package/dist/{line-metrics-CXyjyYd5.js → line-metrics-u87yCAfV.js} +2182 -705
- package/dist/math.mjs +2 -2
- package/dist/node.mjs +404 -394
- package/dist/pixel-budget-Dgjw269h.js +37 -0
- package/dist/{plot-area-frame-DuXZzovH.js → plot-area-frame-D5hEOgkJ.js} +691 -1418
- package/dist/{pptx-C17oBD8Z.js → pptx-WpBbS0mq.js} +255 -222
- package/dist/pptx.mjs +7 -6
- package/dist/pptx_parser_bg.wasm +0 -0
- package/dist/raster-target-whZhvVMt.js +87 -0
- package/dist/region-map.mjs +5 -5
- package/dist/{render-CVeGktZG.js → render-DrAAZWwH.js} +9 -6
- package/dist/{render-worker-host-BbhwA24Y.js → render-worker-host-CBVe8aeD.js} +1 -1
- package/dist/{render-worker-host-BWdhjVH_.js → render-worker-host-CHlwYJdK.js} +1 -1
- package/dist/{render-worker-host-CbaQivE7.js → render-worker-host-XDMsyVsv.js} +1 -1
- package/dist/{renderer-Bmky2yBc.js → renderer-XFSCOT6m.js} +1937 -1936
- package/dist/resource-measurement-6uR3Huao.js +150 -0
- package/dist/{session-Cl0RVnMs.js → session-DoPwA4gv.js} +79 -79
- package/dist/{slide-pull-client-BS0EeZo2.js → slide-pull-client-8i8C4VyD.js} +1054 -824
- package/dist/{three-d-B7LsKeOS.js → three-d-YYghQndN.js} +109 -110
- package/dist/three-d.mjs +726 -726
- package/dist/tiff.mjs +664 -78
- package/dist/types/chart-ex.d.ts +2 -2
- package/dist/types/docx.d.ts +31 -13
- package/dist/types/index.d.ts +46 -21
- package/dist/types/math.d.ts +1 -1
- package/dist/types/node.d.ts +11 -7
- package/dist/types/pptx.d.ts +35 -15
- package/dist/types/region-map.d.ts +2 -2
- package/dist/types/three-d.d.ts +2 -2
- package/dist/types/tiff.d.ts +13 -3
- package/dist/types/xlsx.d.ts +30 -13
- package/dist/{worksheet-pull-client-B0zfEVau.js → worksheet-pull-client-Btydoxto.js} +47 -47
- package/dist/{xlsx-FyKAiNo-.js → xlsx-Bd16V4Xx.js} +1395 -1196
- package/dist/xlsx.mjs +7 -6
- package/package.json +2 -2
- package/dist/assets/render-worker-BWPpayBu.js +0 -10
- package/dist/assets/render-worker-CiEWCh_T.js +0 -11
- package/dist/assets/render-worker-Cpmy3GDF.js +0 -24
- package/dist/comment-ui-runtime-aPzHfV_A.js +0 -2
- package/dist/line-distribute-MqInuujx.js +0 -1003
- package/dist/resource-measurement-esyGbzAF.js +0 -120
- package/dist/tiff-contract-Xjn3qXqK.js +0 -69
- /package/dist/{comment-occurrence-C34fWs_F.js → comment-occurrence-tj54AXXB.js} +0 -0
- /package/dist/{highlight-rect-MaCt0om0.js → highlight-rect-DBcYVJDv.js} +0 -0
- /package/dist/{mathjax-DPEX346v.js → mathjax-DS69BmJd.js} +0 -0
- /package/dist/{read-only-comment-decoration-BYCXoSdC.js → read-only-comment-decoration-Mv_SAiHy.js} +0 -0
- /package/dist/{read-only-comment-margin-C7b3l0ro.js → read-only-comment-margin-Cqu-Ir0C.js} +0 -0
- /package/dist/{renderer-module-contract-C6sYZvTV.js → renderer-module-contract-Cu-GKuPd.js} +0 -0
- /package/dist/{source-key-DORuuFb-.js → source-key-BkBB3X82.js} +0 -0
- /package/dist/{transfer-vNOFQuvv.js → transfer-mIj7E7NB.js} +0 -0
- /package/dist/{visible-index-DwJzuGmJ.js → visible-index-DPoQYSDt.js} +0 -0
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { Bt as n, D as r, F as i, I as a, M as o, N as s, O as c, P as l, _ as u, a as d, b as f, nn as p, rn as m, tn as h, v as g } from "./plot-area-frame-DuXZzovH.js";
|
|
1
|
+
import { F as e, Ht as t, I as n, L as r, O as i, P as a, R as o, _ as s, a as c, an as l, b as u, gn as d, hn as f, in as p, k as m, rn as h, v as g } from "./plot-area-frame-D5hEOgkJ.js";
|
|
3
2
|
import { r as _ } from "./units-EJdC96r6.js";
|
|
4
3
|
//#region packages/core/src/canvas/clamp.ts
|
|
5
4
|
var v = 32767, y = 1 << 24;
|
|
@@ -53,60 +52,60 @@ function T(e, t) {
|
|
|
53
52
|
}
|
|
54
53
|
});
|
|
55
54
|
}
|
|
56
|
-
function E(t, n, r, i, a, o,
|
|
57
|
-
let
|
|
55
|
+
function E(e, t, n, r, i, a, o, c = 0, l) {
|
|
56
|
+
let u = Math.max(0, S(r.blur, i)), d = S(r.dist, i), p = r.rotWithShape === !1 ? 0 : c, m = (r.dir + p) * Math.PI / 180, h = Math.cos(m) * d, g = Math.sin(m) * d, _ = w(n, Math.ceil(u * 3 + Math.max(Math.abs(h), Math.abs(g))) + 2, a, o), v = f(_.w, _.h);
|
|
58
57
|
if (!v) return !1;
|
|
59
58
|
let y = C(v);
|
|
60
59
|
if (!y) return !1;
|
|
61
|
-
|
|
62
|
-
let [b, E] = l ?? x(
|
|
63
|
-
return
|
|
60
|
+
t(T(y, _)), y.save(), y.setTransform(1, 0, 0, 1, 0, 0), y.globalCompositeOperation = "source-in", y.fillStyle = s(r.color, r.alpha), y.fillRect(0, 0, _.w, _.h), y.restore(), e.save(), u > 0 && (e.filter = `blur(${u}px)`);
|
|
61
|
+
let [b, E] = l ?? x(n, r.algn ?? "b"), D = r.sx ?? 1, O = r.sy ?? 1, k = Math.tan((r.kx ?? 0) * Math.PI / 180), A = Math.tan((r.ky ?? 0) * Math.PI / 180);
|
|
62
|
+
return e.translate(h, g), e.translate(b, E), p !== 0 && e.rotate(p * Math.PI / 180), e.transform(D, A, k, O, 0, 0), p !== 0 && e.rotate(-p * Math.PI / 180), e.translate(-b, -E), e.drawImage(v, _.x, _.y), e.restore(), !0;
|
|
64
63
|
}
|
|
65
|
-
function D(t, n, r, i, a, o
|
|
66
|
-
let c = S(
|
|
64
|
+
function D(e, t, n, r, i, a, o) {
|
|
65
|
+
let c = S(r.blur, i), l = S(r.dist, i), u = r.dir * Math.PI / 180, d = Math.cos(u) * l, p = Math.sin(u) * l, m = w(n, Math.ceil(3 * c + Math.abs(l)) + 2, a, o), h = f(m.w, m.h);
|
|
67
66
|
if (!h) return;
|
|
68
67
|
let g = C(h);
|
|
69
68
|
if (!g) return;
|
|
70
69
|
let _ = T(g, m);
|
|
71
|
-
_.save(), _.fillStyle =
|
|
70
|
+
_.save(), _.fillStyle = s(r.color, r.alpha), t(_), _.restore(), _.save(), _.globalCompositeOperation = "destination-out", _.filter = c > 0 ? `blur(${c}px)` : "none", _.translate(d, p), _.fillStyle = "#000", t(_), _.restore(), _.save(), _.globalCompositeOperation = "destination-in", _.filter = "none", _.fillStyle = "#000", t(_), _.restore(), e.save(), e.drawImage(h, m.x, m.y), e.restore();
|
|
72
71
|
}
|
|
73
|
-
function O(t, n, r, i, a, o, s
|
|
74
|
-
let
|
|
75
|
-
if (
|
|
76
|
-
|
|
72
|
+
function O(e, t, n, r, i, a, o, s) {
|
|
73
|
+
let c = S(r.radius, i);
|
|
74
|
+
if (c <= 0) {
|
|
75
|
+
t(e);
|
|
77
76
|
return;
|
|
78
77
|
}
|
|
79
|
-
let
|
|
78
|
+
let l = w(n, Math.ceil(c) + 2, a, o), u = n.x - l.x, d = n.y - l.y, p = f(l.w, l.h);
|
|
80
79
|
if (!p) {
|
|
81
|
-
|
|
80
|
+
t(e);
|
|
82
81
|
return;
|
|
83
82
|
}
|
|
84
83
|
let m = C(p);
|
|
85
84
|
if (!m) {
|
|
86
|
-
|
|
85
|
+
t(e);
|
|
87
86
|
return;
|
|
88
87
|
}
|
|
89
|
-
let h = T(m,
|
|
90
|
-
|
|
91
|
-
let _ =
|
|
88
|
+
let h = T(m, l), g = s ?? t;
|
|
89
|
+
t(h);
|
|
90
|
+
let _ = f(l.w, l.h), v = f(l.w, l.h), y = _ ? C(_) : null, b = v ? C(v) : null;
|
|
92
91
|
if (_ && y && v && b) {
|
|
93
|
-
let
|
|
94
|
-
|
|
92
|
+
let t = T(y, l);
|
|
93
|
+
t.fillStyle = "#000", g(t), b.drawImage(p, u, d, n.w, n.h, u - c, d - c, n.w + c * 2, n.h + c * 2), b.drawImage(p, 0, 0), b.globalCompositeOperation = "destination-in", b.filter = `blur(${c / 3}px)`, b.drawImage(_, 0, 0), b.filter = "none", b.globalCompositeOperation = "source-over", e.save(), e.drawImage(v, l.x, l.y), e.restore();
|
|
95
94
|
return;
|
|
96
95
|
}
|
|
97
|
-
|
|
96
|
+
e.save(), e.drawImage(p, 0, 0), e.restore();
|
|
98
97
|
}
|
|
99
|
-
function k(t, n, r, i, a, o
|
|
100
|
-
let
|
|
98
|
+
function k(e, t, n, r, i, a, o) {
|
|
99
|
+
let s = f(a, o);
|
|
100
|
+
if (!s) return;
|
|
101
|
+
let c = C(s);
|
|
101
102
|
if (!c) return;
|
|
102
|
-
let l =
|
|
103
|
-
|
|
104
|
-
let u =
|
|
105
|
-
|
|
106
|
-
let
|
|
107
|
-
|
|
108
|
-
let g = S(i.dist, a), _ = i.dir * Math.PI / 180, v = Math.cos(_) * g, y = Math.sin(_) * g;
|
|
109
|
-
t.save(), t.translate(r.x + v, f + y), t.scale(i.sx, i.sy), t.translate(-r.x, -f), t.drawImage(c, 0, 0), t.restore();
|
|
103
|
+
let l = S(r.blur, i);
|
|
104
|
+
c.save(), l > 0 && (c.filter = `blur(${l}px)`), t(c), c.restore(), c.save(), c.globalCompositeOperation = "destination-in";
|
|
105
|
+
let u = n.y, d = n.y + n.h, p = c.createLinearGradient(0, d, 0, u), m = A(r.stPos), h = A(r.endPos);
|
|
106
|
+
p.addColorStop(0, `rgba(0,0,0,${r.stA})`), m > 0 && p.addColorStop(m, `rgba(0,0,0,${r.stA})`), h < 1 && h > m && p.addColorStop(h, `rgba(0,0,0,${r.endA})`), p.addColorStop(1, `rgba(0,0,0,${r.endA})`), c.fillStyle = p, c.fillRect(0, 0, a, o), c.restore();
|
|
107
|
+
let g = S(r.dist, i), _ = r.dir * Math.PI / 180, v = Math.cos(_) * g, y = Math.sin(_) * g;
|
|
108
|
+
e.save(), e.translate(n.x + v, d + y), e.scale(r.sx, r.sy), e.translate(-n.x, -d), e.drawImage(s, 0, 0), e.restore();
|
|
110
109
|
}
|
|
111
110
|
function A(e) {
|
|
112
111
|
return e < 0 ? 0 : e > 1 ? 1 : e;
|
|
@@ -235,30 +234,30 @@ function H() {
|
|
|
235
234
|
V || (V = !0, typeof console < "u" && typeof console.warn == "function" && console.warn("[ooxml] scene3d: no offscreen canvas available — using the direct warp fallback (per-cell bleed only, no supersample). Textured-source seams may be faintly visible; the silhouette and geometry are unaffected."));
|
|
236
235
|
}
|
|
237
236
|
var U = 2;
|
|
238
|
-
function W(t, n, r, i, a, o, s, c, l, u
|
|
239
|
-
let
|
|
240
|
-
x:
|
|
241
|
-
y:
|
|
237
|
+
function W(e, t, n, r, i, a, o, s, c, l, u) {
|
|
238
|
+
let d = i.map((e) => ({
|
|
239
|
+
x: a[0] * e.x + a[2] * e.y + a[4],
|
|
240
|
+
y: a[1] * e.x + a[3] * e.y + a[5]
|
|
242
241
|
})), p = Infinity, m = Infinity, h = -Infinity, g = -Infinity;
|
|
243
|
-
for (let e of
|
|
242
|
+
for (let e of d) e.x < p && (p = e.x), e.y < m && (m = e.y), e.x > h && (h = e.x), e.y > g && (g = e.y);
|
|
244
243
|
p = Math.floor(p) - 1, m = Math.floor(m) - 1, h = Math.ceil(h) + 1, g = Math.ceil(g) + 1;
|
|
245
244
|
let _ = h - p, v = g - m;
|
|
246
245
|
if (_ <= 0 || v <= 0) return !1;
|
|
247
|
-
let y = Math.max(1, Math.ceil(_ * U)), b = Math.max(1, Math.ceil(v * U)), x =
|
|
246
|
+
let y = Math.max(1, Math.ceil(_ * U)), b = Math.max(1, Math.ceil(v * U)), x = f(y, b);
|
|
248
247
|
if (!x || x.width !== y || x.height !== b) return !1;
|
|
249
248
|
let S = x.getContext("2d") ?? null;
|
|
250
249
|
if (!S) return !1;
|
|
251
250
|
let C = U, w = [
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
(
|
|
257
|
-
(
|
|
251
|
+
a[0] * C,
|
|
252
|
+
a[1] * C,
|
|
253
|
+
a[2] * C,
|
|
254
|
+
a[3] * C,
|
|
255
|
+
(a[4] - p) * C,
|
|
256
|
+
(a[5] - m) * C
|
|
258
257
|
];
|
|
259
|
-
S.save(), S.setTransform(w[0], w[1], w[2], w[3], w[4], w[5]), S.beginPath(), S.moveTo(
|
|
260
|
-
let T =
|
|
261
|
-
return
|
|
258
|
+
S.save(), S.setTransform(w[0], w[1], w[2], w[3], w[4], w[5]), S.beginPath(), S.moveTo(i[0].x, i[0].y), S.lineTo(i[1].x, i[1].y), S.lineTo(i[2].x, i[2].y), S.lineTo(i[3].x, i[3].y), S.closePath(), S.clip(), I(S, e, n, r, w, o, s, c, 0, 0, 1, 1, l * C, u), S.restore(), t.save(), t.setTransform(1, 0, 0, 1, 0, 0);
|
|
259
|
+
let T = t.imageSmoothingEnabled, E = t.imageSmoothingQuality;
|
|
260
|
+
return t.imageSmoothingEnabled = !0, t.imageSmoothingQuality = "high", t.drawImage(x, 0, 0, _ * C, v * C, p, m, _, v), t.imageSmoothingEnabled = T, t.imageSmoothingQuality = E, t.restore(), !0;
|
|
262
261
|
}
|
|
263
262
|
//#endregion
|
|
264
263
|
//#region packages/core/src/chart/three-d-surface-picture.ts
|
|
@@ -314,12 +313,12 @@ function ne(e, t, n) {
|
|
|
314
313
|
function re(e, t, n) {
|
|
315
314
|
return Math.hypot(e.x - t.x, e.y - t.y, (e.depth - t.depth) * n);
|
|
316
315
|
}
|
|
317
|
-
function ie(
|
|
318
|
-
let b =
|
|
316
|
+
function ie(t, s, c, u, f, g, _, v, y) {
|
|
317
|
+
let b = a(s, u, f, y);
|
|
319
318
|
if (!b || g.inner.length !== 4) return !1;
|
|
320
|
-
let x =
|
|
319
|
+
let x = l(c);
|
|
321
320
|
if (!(x.w > 0) || !(x.h > 0)) return !1;
|
|
322
|
-
let S = h(
|
|
321
|
+
let S = h(c, s.srcRect), C = S ? {
|
|
323
322
|
x0: S.sx,
|
|
324
323
|
y0: S.sy,
|
|
325
324
|
x1: S.sx + S.sw,
|
|
@@ -338,42 +337,42 @@ function ie(e, n, u, d, f, g, _, v, y) {
|
|
|
338
337
|
v(T(e[2], e[1], n)),
|
|
339
338
|
v(T(e[2], e[1], t)),
|
|
340
339
|
v(T(e[3], e[0], t))
|
|
341
|
-
], D = b.mode === "stack" ? ne(g.pictureStackAspect, x.w, x.h) : null, O = b.mode === "tile" ?
|
|
340
|
+
], D = b.mode === "stack" ? ne(g.pictureStackAspect, x.w, x.h) : null, O = b.mode === "tile" ? i(s, c) : null, k = [];
|
|
342
341
|
if (b.mode === "stack") {
|
|
343
342
|
if (D == null) return !1;
|
|
344
|
-
let
|
|
345
|
-
for (let
|
|
346
|
-
if (!
|
|
347
|
-
let
|
|
348
|
-
if (!Number.isSafeInteger(
|
|
349
|
-
|
|
343
|
+
let t = 0, n = !1;
|
|
344
|
+
for (let i of _) {
|
|
345
|
+
if (!e(b, i) || !G(g, f, i, v)) continue;
|
|
346
|
+
let a = r(b, i) ? Math.ceil(1 / D) : 1;
|
|
347
|
+
if (!Number.isSafeInteger(a) || a < 1 || (t += a, t > 4096)) return !1;
|
|
348
|
+
n = !0;
|
|
350
349
|
}
|
|
351
|
-
if (!
|
|
350
|
+
if (!n) return !1;
|
|
352
351
|
}
|
|
353
352
|
if (b.mode === "tile") {
|
|
354
353
|
if (!O) return !1;
|
|
355
354
|
let n = 0, r = 0, i = !1;
|
|
356
355
|
for (let a of _) {
|
|
357
|
-
if (!
|
|
356
|
+
if (!e(b, a)) continue;
|
|
358
357
|
let o = G(g, f, a, v);
|
|
359
358
|
if (!o) continue;
|
|
360
|
-
let
|
|
361
|
-
if (!(
|
|
362
|
-
let
|
|
359
|
+
let s = re(o[0], o[1], g.modelDepth), c = re(o[0], o[3], g.modelDepth);
|
|
360
|
+
if (!(s > 0) || !(c > 0)) continue;
|
|
361
|
+
let l = m(O, s, c), u = Math.floor(-l.x / O.tileW), p = Math.floor(-l.y / O.tileH), h = Math.ceil((s - l.x) / O.tileW), _ = Math.ceil((c - l.y) / O.tileH), y = Math.max(0, h - u) * Math.max(0, _ - p);
|
|
363
362
|
if (!Number.isSafeInteger(y) || (n += y, n > 4096)) return !1;
|
|
364
363
|
if (y === 0) continue;
|
|
365
|
-
let x = Math.ceil(
|
|
364
|
+
let x = Math.ceil(s), S = Math.ceil(c);
|
|
366
365
|
if (!(x > 0 && x <= 32767) || !(S > 0 && S <= 32767) || x > Math.floor((16777216 - r) / S)) return !1;
|
|
367
366
|
r += x * S;
|
|
368
|
-
let C = t
|
|
367
|
+
let C = d(t, x, S), w = C?.getContext("2d");
|
|
369
368
|
if (!C || !w) return !1;
|
|
370
369
|
k.push({
|
|
371
370
|
faceIndex: a,
|
|
372
|
-
width:
|
|
373
|
-
height:
|
|
374
|
-
origin:
|
|
375
|
-
firstColumn:
|
|
376
|
-
firstRow:
|
|
371
|
+
width: s,
|
|
372
|
+
height: c,
|
|
373
|
+
origin: l,
|
|
374
|
+
firstColumn: u,
|
|
375
|
+
firstRow: p,
|
|
377
376
|
lastColumn: h,
|
|
378
377
|
lastRow: _,
|
|
379
378
|
canvas: C,
|
|
@@ -382,11 +381,11 @@ function ie(e, n, u, d, f, g, _, v, y) {
|
|
|
382
381
|
}
|
|
383
382
|
if (!i) return !1;
|
|
384
383
|
}
|
|
385
|
-
if (
|
|
386
|
-
if (!
|
|
387
|
-
let r = G(g, f,
|
|
384
|
+
if (t.save(), s.alpha != null && (t.globalAlpha *= s.alpha), b.mode === "stretch") for (let n of _) {
|
|
385
|
+
if (!e(b, n)) continue;
|
|
386
|
+
let r = G(g, f, n, v), i = g.thickness === 0 && n === 0 ? w : r?.map(v);
|
|
388
387
|
if (!i) continue;
|
|
389
|
-
let a = ee(i,
|
|
388
|
+
let a = ee(i, s.fillRect);
|
|
390
389
|
if (!a) continue;
|
|
391
390
|
let o = S ? ee(a, {
|
|
392
391
|
l: S.dxFraction,
|
|
@@ -395,43 +394,43 @@ function ie(e, n, u, d, f, g, _, v, y) {
|
|
|
395
394
|
b: 1 - S.dyFraction - S.dhFraction
|
|
396
395
|
}) : a;
|
|
397
396
|
if (o) {
|
|
398
|
-
|
|
399
|
-
for (let
|
|
400
|
-
|
|
397
|
+
t.save(), t.beginPath(), t.moveTo(i[0].x, i[0].y);
|
|
398
|
+
for (let e = 1; e < i.length; e++) t.lineTo(i[e].x, i[e].y);
|
|
399
|
+
t.closePath(), t.clip(), L(c, t, x.w, x.h, o, .5, C), t.restore();
|
|
401
400
|
}
|
|
402
401
|
}
|
|
403
|
-
else for (let
|
|
404
|
-
if (!
|
|
405
|
-
let
|
|
406
|
-
if (!
|
|
407
|
-
let
|
|
408
|
-
|
|
409
|
-
for (let
|
|
410
|
-
|
|
411
|
-
let
|
|
402
|
+
else for (let i of _) {
|
|
403
|
+
if (!e(b, i)) continue;
|
|
404
|
+
let a = G(g, f, i, v);
|
|
405
|
+
if (!a) continue;
|
|
406
|
+
let l = a.map(v);
|
|
407
|
+
t.save(), t.beginPath(), t.moveTo(l[0].x, l[0].y);
|
|
408
|
+
for (let e = 1; e < l.length; e++) t.lineTo(l[e].x, l[e].y);
|
|
409
|
+
t.closePath(), t.clip();
|
|
410
|
+
let u = n(b, i);
|
|
412
411
|
if (b.mode === "tile") {
|
|
413
412
|
if (!O) continue;
|
|
414
|
-
let
|
|
415
|
-
if (!
|
|
416
|
-
let
|
|
417
|
-
|
|
418
|
-
for (let
|
|
419
|
-
let
|
|
420
|
-
|
|
413
|
+
let e = k.find((e) => e.faceIndex === i);
|
|
414
|
+
if (!e) continue;
|
|
415
|
+
let n = e.canvas.width / e.width, r = e.canvas.height / e.height;
|
|
416
|
+
e.context.save(), e.context.scale(n, r);
|
|
417
|
+
for (let t = e.firstRow; t < e.lastRow; t++) for (let n = e.firstColumn; n < e.lastColumn; n++) {
|
|
418
|
+
let r = e.origin.x + n * O.tileW, i = e.origin.y + t * O.tileH, a = O.flipX && Math.abs(n) % 2 == 1, o = O.flipY && Math.abs(t) % 2 == 1;
|
|
419
|
+
e.context.save(), e.context.translate(r + (a ? O.tileW : 0), i + (o ? O.tileH : 0)), e.context.scale(a ? -1 : 1, o ? -1 : 1), p(e.context, c, s.srcRect, 0, 0, O.tileW, O.tileH), e.context.restore();
|
|
421
420
|
}
|
|
422
|
-
|
|
421
|
+
e.context.restore(), L(e.canvas, t, e.canvas.width, e.canvas.height, l, .5);
|
|
423
422
|
} else if (b.mode === "stack") {
|
|
424
423
|
if (D == null) continue;
|
|
425
|
-
if (
|
|
426
|
-
else L(
|
|
427
|
-
} else if (b.stackUnit != null &&
|
|
428
|
-
let n =
|
|
429
|
-
L(
|
|
424
|
+
if (r(b, i)) for (let e = 0; e < Math.ceil(1 / D); e++) L(c, t, x.w, x.h, E(a, e * D, (e + 1) * D), .5, C);
|
|
425
|
+
else L(c, t, x.w, x.h, l, .5, C);
|
|
426
|
+
} else if (b.stackUnit != null && o(b, i)) for (let e = 0; e < u; e++) {
|
|
427
|
+
let n = e * b.stackUnit / y, r = (e + 1) * b.stackUnit / y;
|
|
428
|
+
L(c, t, x.w, x.h, E(a, n, r), .5, C);
|
|
430
429
|
}
|
|
431
|
-
else b.stackUnit != null && L(
|
|
432
|
-
|
|
430
|
+
else b.stackUnit != null && L(c, t, x.w, x.h, l, .5, C);
|
|
431
|
+
t.restore();
|
|
433
432
|
}
|
|
434
|
-
return
|
|
433
|
+
return t.restore(), !0;
|
|
435
434
|
}
|
|
436
435
|
//#endregion
|
|
437
436
|
//#region packages/core/src/chart/label-box.ts
|
|
@@ -467,7 +466,7 @@ function ae(e, t, n, r, i = 0) {
|
|
|
467
466
|
}
|
|
468
467
|
if (t.borderHidden === !0) return;
|
|
469
468
|
let a = t.borderFill ? g(t.borderFill, e, n.x, n.y, n.w, n.h, i) : t.borderColor ? `#${t.borderColor}` : null;
|
|
470
|
-
a && (e.save(), e.strokeStyle = a, e.lineWidth = t.borderWidthEmu == null ? Math.max(.25, .75 * r) : Math.max(.25, t.borderWidthEmu / _ * r), e.setLineDash(
|
|
469
|
+
a && (e.save(), e.strokeStyle = a, e.lineWidth = t.borderWidthEmu == null ? Math.max(.25, .75 * r) : Math.max(.25, t.borderWidthEmu / _ * r), e.setLineDash(u(t.borderCustomDash, t.borderDash, e.lineWidth)), t.borderCap === "rnd" ? e.lineCap = "round" : t.borderCap === "sq" ? e.lineCap = "square" : t.borderCap === "flat" && (e.lineCap = "butt"), t.borderJoin === "round" ? e.lineJoin = "round" : t.borderJoin === "bevel" ? e.lineJoin = "bevel" : t.borderJoin === "miter" && (e.lineJoin = "miter"), e.strokeRect(n.x, n.y, n.w, n.h), e.restore());
|
|
471
470
|
}
|
|
472
471
|
//#endregion
|
|
473
472
|
//#region packages/core/src/chart/axis-scale.ts
|
|
@@ -824,16 +823,16 @@ function ye(e, t, n) {
|
|
|
824
823
|
//#endregion
|
|
825
824
|
//#region packages/core/src/chart/rich-data-label.ts
|
|
826
825
|
var be = 4096, xe = 4, Se = be;
|
|
827
|
-
function Ce(e,
|
|
826
|
+
function Ce(e, n, r, i) {
|
|
828
827
|
let a = [[]], o = [null], s = 0, c = (e) => {
|
|
829
828
|
if (!e) return null;
|
|
830
829
|
let t = e.startsWith("#") ? e.slice(1) : e;
|
|
831
830
|
return /^[0-9A-Fa-f]{6}([0-9A-Fa-f]{2})?$/.test(t) ? `#${t}` : null;
|
|
832
831
|
};
|
|
833
|
-
outer: for (let l = 0; l <
|
|
834
|
-
let u =
|
|
832
|
+
outer: for (let l = 0; l < n.runs.length && l < Se; l++) {
|
|
833
|
+
let u = n.runs[l];
|
|
835
834
|
u.text !== "\n" && o[a.length - 1] == null && (o[a.length - 1] = u.paragraphAlign ?? null);
|
|
836
|
-
let d =
|
|
835
|
+
let d = t(u.fontSizeHpt, n.ptToPx) ?? r, f = u.fontFace?.trim().replaceAll("\"", ""), p = f && !f.startsWith("+") ? f : null, m = f && n.fontFamilyForFace ? n.fontFamilyForFace(f) : p ? `"${p}", Calibri, Arial, sans-serif` : n.fontFamily, h = `${u.italic ?? n.fallbackItalic ?? !1 ? "italic " : ""}${u.bold ?? n.fallbackBold ? "bold " : ""}${d}px ${m}`, g = (u.baseline ?? n.fallbackBaseline ?? 0) * d, _ = u.colorPaintAuthored === !0 || u.color != null || u.colorHidden === !0 ? u.colorHidden === !0 ? null : c(u.color) : n.fallbackColorHidden === !0 ? null : i, v = "", y = () => {
|
|
837
836
|
v &&= (e.font = h, a[a.length - 1].push({
|
|
838
837
|
text: v,
|
|
839
838
|
font: h,
|
|
@@ -893,9 +892,9 @@ function Te(e) {
|
|
|
893
892
|
let t = [];
|
|
894
893
|
if (e.showCategory && e.category && t.push(e.category), e.showSeries && e.seriesName && t.push(e.seriesName), e.showValue && e.sourceValue != null) {
|
|
895
894
|
let n = e.valueDivisor != null && Number.isFinite(e.valueDivisor) && e.valueDivisor > 0 ? e.valueDivisor : 1;
|
|
896
|
-
t.push(
|
|
895
|
+
t.push(c(e.sourceValue / n, e.formatCode ?? null, e.date1904));
|
|
897
896
|
}
|
|
898
|
-
return e.showPercent && e.percentRatio != null && t.push(
|
|
897
|
+
return e.showPercent && e.percentRatio != null && t.push(c(e.percentRatio, e.percentFormatCode ?? e.formatCode ?? "0%", e.date1904)), e.showBubbleSize && e.bubbleSize != null && t.push(c(e.bubbleSize, e.formatCode ?? null, e.date1904)), t.filter((e) => e !== "").join(e.separator ?? e.defaultSeparator ?? " ");
|
|
899
898
|
}
|
|
900
899
|
//#endregion
|
|
901
900
|
//#region packages/core/src/chart/material-color.ts
|