@silurus/ooxml 0.83.2 → 0.84.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.
Files changed (66) hide show
  1. package/README.md +23 -6
  2. package/dist/assets/render-worker-BWPpayBu.js +10 -0
  3. package/dist/assets/render-worker-CiEWCh_T.js +11 -0
  4. package/dist/assets/render-worker-Cpmy3GDF.js +24 -0
  5. package/dist/{canvas-viewer-mechanics-DVGK-fLT.js → canvas-viewer-mechanics-CIfhCgYA.js} +1 -1
  6. package/dist/chart-ex.mjs +4 -4
  7. package/dist/{comment-ui-runtime-DD5a3x3k.js → comment-ui-runtime-C5qimVMD.js} +5 -5
  8. package/dist/{comment-ui-runtime-BelHJt73.js → comment-ui-runtime-CdMMApEN.js} +5 -5
  9. package/dist/comment-ui-runtime-aPzHfV_A.js +2 -0
  10. package/dist/{comments-AAaNnQTi.js → comments-BAlAyIhb.js} +1 -1
  11. package/dist/{document-pull-client-DSx36ZsB.js → document-pull-client-BXw6AAhY.js} +2409 -2390
  12. package/dist/{docx-DojUJSZd.js → docx-BA1vB0V-.js} +16 -14
  13. package/dist/docx.mjs +5 -5
  14. package/dist/docx_parser_bg.wasm +0 -0
  15. package/dist/{dom-interaction-boundary-CepOlXt6.js → dom-interaction-boundary-DS6BVyHA.js} +1 -1
  16. package/dist/index.mjs +3 -3
  17. package/dist/{line-distribute-D7A_wnJg.js → line-distribute-MqInuujx.js} +2 -2
  18. package/dist/{line-metrics-Bpn7OeZD.js → line-metrics-CXyjyYd5.js} +34 -32
  19. package/dist/math.mjs +2 -2
  20. package/dist/node.mjs +9 -9
  21. package/dist/{plot-area-frame-DHV02PJU.js → plot-area-frame-DuXZzovH.js} +623 -663
  22. package/dist/{pptx-Wh22eziy.js → pptx-C17oBD8Z.js} +17 -15
  23. package/dist/pptx.mjs +5 -5
  24. package/dist/pptx_parser_bg.wasm +0 -0
  25. package/dist/region-map.mjs +2 -2
  26. package/dist/{render-DtbFbO5c.js → render-CVeGktZG.js} +1 -1
  27. package/dist/{render-worker-host-CmPBviYJ.js → render-worker-host-BWdhjVH_.js} +1 -1
  28. package/dist/{render-worker-host-DCLyw6UR.js → render-worker-host-BbhwA24Y.js} +1 -1
  29. package/dist/{render-worker-host-D1jcACJV.js → render-worker-host-CbaQivE7.js} +1 -1
  30. package/dist/{renderer-CYr9YTXM.js → renderer-Bmky2yBc.js} +3 -3
  31. package/dist/{renderer-module-contract-DLbb7zY0.js → renderer-module-contract-C6sYZvTV.js} +4 -3
  32. package/dist/{resource-measurement-DuiFWzam.js → resource-measurement-esyGbzAF.js} +2 -2
  33. package/dist/{session-CxT-t0BX.js → session-Cl0RVnMs.js} +3 -3
  34. package/dist/{slide-pull-client-B9rcJdO4.js → slide-pull-client-BS0EeZo2.js} +113 -107
  35. package/dist/{three-d-7MaVzQuZ.js → three-d-B7LsKeOS.js} +128 -127
  36. package/dist/three-d.mjs +4 -4
  37. package/dist/tiff-contract-Xjn3qXqK.js +69 -0
  38. package/dist/tiff.mjs +124 -0
  39. package/dist/types/chart-ex.d.ts +2 -2
  40. package/dist/types/docx.d.ts +17 -10
  41. package/dist/types/index.d.ts +26 -16
  42. package/dist/types/math.d.ts +1 -1
  43. package/dist/types/node.d.ts +5 -5
  44. package/dist/types/pptx.d.ts +18 -10
  45. package/dist/types/region-map.d.ts +2 -2
  46. package/dist/types/three-d.d.ts +2 -2
  47. package/dist/types/tiff.d.ts +9 -0
  48. package/dist/types/xlsx.d.ts +17 -10
  49. package/dist/{worksheet-pull-client-DyFsDF4A.js → worksheet-pull-client-B0zfEVau.js} +3 -3
  50. package/dist/{xlsx-C3beLfwZ.js → xlsx-FyKAiNo-.js} +54 -49
  51. package/dist/xlsx.mjs +5 -5
  52. package/dist/xlsx_parser_bg.wasm +0 -0
  53. package/package.json +7 -1
  54. package/dist/assets/render-worker-4GSYWsM3.js +0 -11
  55. package/dist/assets/render-worker-DwFpY197.js +0 -10
  56. package/dist/assets/render-worker-Dw_wQRIh.js +0 -24
  57. package/dist/comment-ui-runtime-DTGN3Vyy.js +0 -2
  58. /package/dist/{comment-occurrence-X54si2ob.js → comment-occurrence-C34fWs_F.js} +0 -0
  59. /package/dist/{highlight-rect-Hes0z_Mj.js → highlight-rect-MaCt0om0.js} +0 -0
  60. /package/dist/{mathjax-DwIrafQ6.js → mathjax-DPEX346v.js} +0 -0
  61. /package/dist/{read-only-comment-decoration-DcFevX_Q.js → read-only-comment-decoration-BYCXoSdC.js} +0 -0
  62. /package/dist/{read-only-comment-margin-DrUX-YrP.js → read-only-comment-margin-C7b3l0ro.js} +0 -0
  63. /package/dist/{source-key-BklvnEyQ.js → source-key-DORuuFb-.js} +0 -0
  64. /package/dist/{transfer-R6NjgBKD.js → transfer-vNOFQuvv.js} +0 -0
  65. /package/dist/{units-BzZ0gAxs.js → units-EJdC96r6.js} +0 -0
  66. /package/dist/{visible-index-BFE3PWiY.js → visible-index-DwJzuGmJ.js} +0 -0
@@ -1,5 +1,6 @@
1
- import { Bt as e, D as t, F as n, I as r, M as i, N as a, O as o, P as s, _ as c, a as l, b as u, dn as d, nn as f, rn as p, tn as m, un as h, v as g } from "./plot-area-frame-DHV02PJU.js";
2
- import { r as _ } from "./units-BzZ0gAxs.js";
1
+ import { c as e, l as t } from "./tiff-contract-Xjn3qXqK.js";
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";
3
+ import { r as _ } from "./units-EJdC96r6.js";
3
4
  //#region packages/core/src/canvas/clamp.ts
4
5
  var v = 32767, y = 1 << 24;
5
6
  function b(e, t) {
@@ -52,60 +53,60 @@ function T(e, t) {
52
53
  }
53
54
  });
54
55
  }
55
- function E(e, t, n, r, i, a, o, s = 0, l) {
56
- let u = Math.max(0, S(r.blur, i)), d = S(r.dist, i), f = r.rotWithShape === !1 ? 0 : s, p = (r.dir + f) * Math.PI / 180, m = Math.cos(p) * d, g = Math.sin(p) * d, _ = w(n, Math.ceil(u * 3 + Math.max(Math.abs(m), Math.abs(g))) + 2, a, o), v = h(_.w, _.h);
56
+ function E(t, n, r, i, a, o, s, c = 0, l) {
57
+ let d = Math.max(0, S(i.blur, a)), f = S(i.dist, a), p = i.rotWithShape === !1 ? 0 : c, m = (i.dir + p) * Math.PI / 180, h = Math.cos(m) * f, g = Math.sin(m) * f, _ = w(r, Math.ceil(d * 3 + Math.max(Math.abs(h), Math.abs(g))) + 2, o, s), v = e(_.w, _.h);
57
58
  if (!v) return !1;
58
59
  let y = C(v);
59
60
  if (!y) return !1;
60
- t(T(y, _)), y.save(), y.setTransform(1, 0, 0, 1, 0, 0), y.globalCompositeOperation = "source-in", y.fillStyle = c(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(m, g), e.translate(b, E), f !== 0 && e.rotate(f * Math.PI / 180), e.transform(D, A, k, O, 0, 0), f !== 0 && e.rotate(-f * Math.PI / 180), e.translate(-b, -E), e.drawImage(v, _.x, _.y), e.restore(), !0;
63
- }
64
- function D(e, t, n, r, i, a, o) {
65
- let s = S(r.blur, i), l = S(r.dist, i), u = r.dir * Math.PI / 180, d = Math.cos(u) * l, f = Math.sin(u) * l, p = w(n, Math.ceil(3 * s + Math.abs(l)) + 2, a, o), m = h(p.w, p.h);
66
- if (!m) return;
67
- let g = C(m);
61
+ n(T(y, _)), y.save(), y.setTransform(1, 0, 0, 1, 0, 0), y.globalCompositeOperation = "source-in", y.fillStyle = u(i.color, i.alpha), y.fillRect(0, 0, _.w, _.h), y.restore(), t.save(), d > 0 && (t.filter = `blur(${d}px)`);
62
+ let [b, E] = l ?? x(r, i.algn ?? "b"), D = i.sx ?? 1, O = i.sy ?? 1, k = Math.tan((i.kx ?? 0) * Math.PI / 180), A = Math.tan((i.ky ?? 0) * Math.PI / 180);
63
+ return t.translate(h, g), t.translate(b, E), p !== 0 && t.rotate(p * Math.PI / 180), t.transform(D, A, k, O, 0, 0), p !== 0 && t.rotate(-p * Math.PI / 180), t.translate(-b, -E), t.drawImage(v, _.x, _.y), t.restore(), !0;
64
+ }
65
+ function D(t, n, r, i, a, o, s) {
66
+ let c = S(i.blur, a), l = S(i.dist, a), d = i.dir * Math.PI / 180, f = Math.cos(d) * l, p = Math.sin(d) * l, m = w(r, Math.ceil(3 * c + Math.abs(l)) + 2, o, s), h = e(m.w, m.h);
67
+ if (!h) return;
68
+ let g = C(h);
68
69
  if (!g) return;
69
- let _ = T(g, p);
70
- _.save(), _.fillStyle = c(r.color, r.alpha), t(_), _.restore(), _.save(), _.globalCompositeOperation = "destination-out", _.filter = s > 0 ? `blur(${s}px)` : "none", _.translate(d, f), _.fillStyle = "#000", t(_), _.restore(), _.save(), _.globalCompositeOperation = "destination-in", _.filter = "none", _.fillStyle = "#000", t(_), _.restore(), e.save(), e.drawImage(m, p.x, p.y), e.restore();
70
+ let _ = T(g, m);
71
+ _.save(), _.fillStyle = u(i.color, i.alpha), n(_), _.restore(), _.save(), _.globalCompositeOperation = "destination-out", _.filter = c > 0 ? `blur(${c}px)` : "none", _.translate(f, p), _.fillStyle = "#000", n(_), _.restore(), _.save(), _.globalCompositeOperation = "destination-in", _.filter = "none", _.fillStyle = "#000", n(_), _.restore(), t.save(), t.drawImage(h, m.x, m.y), t.restore();
71
72
  }
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);
73
+ function O(t, n, r, i, a, o, s, c) {
74
+ let l = S(i.radius, a);
75
+ if (l <= 0) {
76
+ n(t);
76
77
  return;
77
78
  }
78
- let l = w(n, Math.ceil(c) + 2, a, o), u = n.x - l.x, d = n.y - l.y, f = h(l.w, l.h);
79
- if (!f) {
80
- t(e);
79
+ let u = w(r, Math.ceil(l) + 2, o, s), d = r.x - u.x, f = r.y - u.y, p = e(u.w, u.h);
80
+ if (!p) {
81
+ n(t);
81
82
  return;
82
83
  }
83
- let p = C(f);
84
- if (!p) {
85
- t(e);
84
+ let m = C(p);
85
+ if (!m) {
86
+ n(t);
86
87
  return;
87
88
  }
88
- let m = T(p, l), g = s ?? t;
89
- t(m);
90
- let _ = h(l.w, l.h), v = h(l.w, l.h), y = _ ? C(_) : null, b = v ? C(v) : null;
89
+ let h = T(m, u), g = c ?? n;
90
+ n(h);
91
+ let _ = e(u.w, u.h), v = e(u.w, u.h), y = _ ? C(_) : null, b = v ? C(v) : null;
91
92
  if (_ && y && v && b) {
92
- let t = T(y, l);
93
- t.fillStyle = "#000", g(t), b.drawImage(f, u, d, n.w, n.h, u - c, d - c, n.w + c * 2, n.h + c * 2), b.drawImage(f, 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();
93
+ let e = T(y, u);
94
+ e.fillStyle = "#000", g(e), b.drawImage(p, d, f, r.w, r.h, d - l, f - l, r.w + l * 2, r.h + l * 2), b.drawImage(p, 0, 0), b.globalCompositeOperation = "destination-in", b.filter = `blur(${l / 3}px)`, b.drawImage(_, 0, 0), b.filter = "none", b.globalCompositeOperation = "source-over", t.save(), t.drawImage(v, u.x, u.y), t.restore();
94
95
  return;
95
96
  }
96
- e.save(), e.drawImage(f, 0, 0), e.restore();
97
+ t.save(), t.drawImage(p, 0, 0), t.restore();
97
98
  }
98
- function k(e, t, n, r, i, a, o) {
99
- let s = h(a, o);
100
- if (!s) return;
101
- let c = C(s);
99
+ function k(t, n, r, i, a, o, s) {
100
+ let c = e(o, s);
102
101
  if (!c) return;
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, f = c.createLinearGradient(0, d, 0, u), p = A(r.stPos), m = A(r.endPos);
106
- f.addColorStop(0, `rgba(0,0,0,${r.stA})`), p > 0 && f.addColorStop(p, `rgba(0,0,0,${r.stA})`), m < 1 && m > p && f.addColorStop(m, `rgba(0,0,0,${r.endA})`), f.addColorStop(1, `rgba(0,0,0,${r.endA})`), c.fillStyle = f, 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();
102
+ let l = C(c);
103
+ if (!l) return;
104
+ let u = S(i.blur, a);
105
+ l.save(), u > 0 && (l.filter = `blur(${u}px)`), n(l), l.restore(), l.save(), l.globalCompositeOperation = "destination-in";
106
+ let d = r.y, f = r.y + r.h, p = l.createLinearGradient(0, f, 0, d), m = A(i.stPos), h = A(i.endPos);
107
+ p.addColorStop(0, `rgba(0,0,0,${i.stA})`), m > 0 && p.addColorStop(m, `rgba(0,0,0,${i.stA})`), h < 1 && h > m && p.addColorStop(h, `rgba(0,0,0,${i.endA})`), p.addColorStop(1, `rgba(0,0,0,${i.endA})`), l.fillStyle = p, l.fillRect(0, 0, o, s), l.restore();
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();
109
110
  }
110
111
  function A(e) {
111
112
  return e < 0 ? 0 : e > 1 ? 1 : e;
@@ -234,30 +235,30 @@ function H() {
234
235
  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."));
235
236
  }
236
237
  var U = 2;
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]
241
- })), f = Infinity, p = Infinity, m = -Infinity, g = -Infinity;
242
- for (let e of d) e.x < f && (f = e.x), e.y < p && (p = e.y), e.x > m && (m = e.x), e.y > g && (g = e.y);
243
- f = Math.floor(f) - 1, p = Math.floor(p) - 1, m = Math.ceil(m) + 1, g = Math.ceil(g) + 1;
244
- let _ = m - f, v = g - p;
238
+ function W(t, n, r, i, a, o, s, c, l, u, d) {
239
+ let f = a.map((e) => ({
240
+ x: o[0] * e.x + o[2] * e.y + o[4],
241
+ y: o[1] * e.x + o[3] * e.y + o[5]
242
+ })), p = Infinity, m = Infinity, h = -Infinity, g = -Infinity;
243
+ for (let e of f) 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
+ p = Math.floor(p) - 1, m = Math.floor(m) - 1, h = Math.ceil(h) + 1, g = Math.ceil(g) + 1;
245
+ let _ = h - p, v = g - m;
245
246
  if (_ <= 0 || v <= 0) return !1;
246
- let y = Math.max(1, Math.ceil(_ * U)), b = Math.max(1, Math.ceil(v * U)), x = h(y, b);
247
+ let y = Math.max(1, Math.ceil(_ * U)), b = Math.max(1, Math.ceil(v * U)), x = e(y, b);
247
248
  if (!x || x.width !== y || x.height !== b) return !1;
248
249
  let S = x.getContext("2d") ?? null;
249
250
  if (!S) return !1;
250
251
  let C = U, w = [
251
- a[0] * C,
252
- a[1] * C,
253
- a[2] * C,
254
- a[3] * C,
255
- (a[4] - f) * C,
256
- (a[5] - p) * C
252
+ o[0] * C,
253
+ o[1] * C,
254
+ o[2] * C,
255
+ o[3] * C,
256
+ (o[4] - p) * C,
257
+ (o[5] - m) * C
257
258
  ];
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, f, p, _, v), t.imageSmoothingEnabled = T, t.imageSmoothingQuality = E, t.restore(), !0;
259
+ S.save(), S.setTransform(w[0], w[1], w[2], w[3], w[4], w[5]), S.beginPath(), S.moveTo(a[0].x, a[0].y), S.lineTo(a[1].x, a[1].y), S.lineTo(a[2].x, a[2].y), S.lineTo(a[3].x, a[3].y), S.closePath(), S.clip(), I(S, t, r, i, w, s, c, l, 0, 0, 1, 1, u * C, d), S.restore(), n.save(), n.setTransform(1, 0, 0, 1, 0, 0);
260
+ let T = n.imageSmoothingEnabled, E = n.imageSmoothingQuality;
261
+ return n.imageSmoothingEnabled = !0, n.imageSmoothingQuality = "high", n.drawImage(x, 0, 0, _ * C, v * C, p, m, _, v), n.imageSmoothingEnabled = T, n.imageSmoothingQuality = E, n.restore(), !0;
261
262
  }
262
263
  //#endregion
263
264
  //#region packages/core/src/chart/three-d-surface-picture.ts
@@ -313,12 +314,12 @@ function ne(e, t, n) {
313
314
  function re(e, t, n) {
314
315
  return Math.hypot(e.x - t.x, e.y - t.y, (e.depth - t.depth) * n);
315
316
  }
316
- function ie(e, c, l, u, h, g, _, v, y) {
317
- let b = i(c, u, h, y);
317
+ function ie(e, n, u, d, f, g, _, v, y) {
318
+ let b = o(n, d, f, y);
318
319
  if (!b || g.inner.length !== 4) return !1;
319
- let x = p(l);
320
+ let x = m(u);
320
321
  if (!(x.w > 0) || !(x.h > 0)) return !1;
321
- let S = m(l, c.srcRect), C = S ? {
322
+ let S = h(u, n.srcRect), C = S ? {
322
323
  x0: S.sx,
323
324
  y0: S.sy,
324
325
  x1: S.sx + S.sw,
@@ -337,97 +338,97 @@ function ie(e, c, l, u, h, g, _, v, y) {
337
338
  v(T(e[2], e[1], n)),
338
339
  v(T(e[2], e[1], t)),
339
340
  v(T(e[3], e[0], t))
340
- ], D = b.mode === "stack" ? ne(g.pictureStackAspect, x.w, x.h) : null, O = b.mode === "tile" ? t(c, l) : null, k = [];
341
+ ], D = b.mode === "stack" ? ne(g.pictureStackAspect, x.w, x.h) : null, O = b.mode === "tile" ? r(n, u) : null, k = [];
341
342
  if (b.mode === "stack") {
342
343
  if (D == null) return !1;
343
344
  let e = 0, t = !1;
344
- for (let r of _) {
345
- if (!a(b, r) || !G(g, h, r, v)) continue;
346
- let i = n(b, r) ? Math.ceil(1 / D) : 1;
347
- if (!Number.isSafeInteger(i) || i < 1 || (e += i, e > 4096)) return !1;
345
+ for (let n of _) {
346
+ if (!s(b, n) || !G(g, f, n, v)) continue;
347
+ let r = i(b, n) ? Math.ceil(1 / D) : 1;
348
+ if (!Number.isSafeInteger(r) || r < 1 || (e += r, e > 4096)) return !1;
348
349
  t = !0;
349
350
  }
350
351
  if (!t) return !1;
351
352
  }
352
353
  if (b.mode === "tile") {
353
354
  if (!O) return !1;
354
- let t = 0, n = 0, r = !1;
355
- for (let i of _) {
356
- if (!a(b, i)) continue;
357
- let s = G(g, h, i, v);
358
- if (!s) continue;
359
- let c = re(s[0], s[1], g.modelDepth), l = re(s[0], s[3], g.modelDepth);
360
- if (!(c > 0) || !(l > 0)) continue;
361
- let u = o(O, c, l), f = Math.floor(-u.x / O.tileW), p = Math.floor(-u.y / O.tileH), m = Math.ceil((c - u.x) / O.tileW), _ = Math.ceil((l - u.y) / O.tileH), y = Math.max(0, m - f) * Math.max(0, _ - p);
362
- if (!Number.isSafeInteger(y) || (t += y, t > 4096)) return !1;
355
+ let n = 0, r = 0, i = !1;
356
+ for (let a of _) {
357
+ if (!s(b, a)) continue;
358
+ let o = G(g, f, a, v);
359
+ if (!o) continue;
360
+ let l = re(o[0], o[1], g.modelDepth), u = re(o[0], o[3], g.modelDepth);
361
+ if (!(l > 0) || !(u > 0)) continue;
362
+ let d = c(O, l, u), p = Math.floor(-d.x / O.tileW), m = Math.floor(-d.y / O.tileH), h = Math.ceil((l - d.x) / O.tileW), _ = Math.ceil((u - d.y) / O.tileH), y = Math.max(0, h - p) * Math.max(0, _ - m);
363
+ if (!Number.isSafeInteger(y) || (n += y, n > 4096)) return !1;
363
364
  if (y === 0) continue;
364
- let x = Math.ceil(c), S = Math.ceil(l);
365
- if (!(x > 0 && x <= 32767) || !(S > 0 && S <= 32767) || x > Math.floor((16777216 - n) / S)) return !1;
366
- n += x * S;
367
- let C = d(e, x, S), w = C?.getContext("2d");
365
+ let x = Math.ceil(l), S = Math.ceil(u);
366
+ if (!(x > 0 && x <= 32767) || !(S > 0 && S <= 32767) || x > Math.floor((16777216 - r) / S)) return !1;
367
+ r += x * S;
368
+ let C = t(e, x, S), w = C?.getContext("2d");
368
369
  if (!C || !w) return !1;
369
370
  k.push({
370
- faceIndex: i,
371
- width: c,
372
- height: l,
373
- origin: u,
374
- firstColumn: f,
375
- firstRow: p,
376
- lastColumn: m,
371
+ faceIndex: a,
372
+ width: l,
373
+ height: u,
374
+ origin: d,
375
+ firstColumn: p,
376
+ firstRow: m,
377
+ lastColumn: h,
377
378
  lastRow: _,
378
379
  canvas: C,
379
380
  context: w
380
- }), r = !0;
381
+ }), i = !0;
381
382
  }
382
- if (!r) return !1;
383
+ if (!i) return !1;
383
384
  }
384
- if (e.save(), c.alpha != null && (e.globalAlpha *= c.alpha), b.mode === "stretch") for (let t of _) {
385
- if (!a(b, t)) continue;
386
- let n = G(g, h, t, v), r = g.thickness === 0 && t === 0 ? w : n?.map(v);
387
- if (!r) continue;
388
- let i = ee(r, c.fillRect);
385
+ if (e.save(), n.alpha != null && (e.globalAlpha *= n.alpha), b.mode === "stretch") for (let t of _) {
386
+ if (!s(b, t)) continue;
387
+ let r = G(g, f, t, v), i = g.thickness === 0 && t === 0 ? w : r?.map(v);
389
388
  if (!i) continue;
390
- let o = S ? ee(i, {
389
+ let a = ee(i, n.fillRect);
390
+ if (!a) continue;
391
+ let o = S ? ee(a, {
391
392
  l: S.dxFraction,
392
393
  t: S.dyFraction,
393
394
  r: 1 - S.dxFraction - S.dwFraction,
394
395
  b: 1 - S.dyFraction - S.dhFraction
395
- }) : i;
396
+ }) : a;
396
397
  if (o) {
397
- e.save(), e.beginPath(), e.moveTo(r[0].x, r[0].y);
398
- for (let t = 1; t < r.length; t++) e.lineTo(r[t].x, r[t].y);
399
- e.closePath(), e.clip(), L(l, e, x.w, x.h, o, .5, C), e.restore();
398
+ e.save(), e.beginPath(), e.moveTo(i[0].x, i[0].y);
399
+ for (let t = 1; t < i.length; t++) e.lineTo(i[t].x, i[t].y);
400
+ e.closePath(), e.clip(), L(u, e, x.w, x.h, o, .5, C), e.restore();
400
401
  }
401
402
  }
402
403
  else for (let t of _) {
403
- if (!a(b, t)) continue;
404
- let i = G(g, h, t, v);
405
- if (!i) continue;
406
- let o = i.map(v);
404
+ if (!s(b, t)) continue;
405
+ let r = G(g, f, t, v);
406
+ if (!r) continue;
407
+ let o = r.map(v);
407
408
  e.save(), e.beginPath(), e.moveTo(o[0].x, o[0].y);
408
409
  for (let t = 1; t < o.length; t++) e.lineTo(o[t].x, o[t].y);
409
410
  e.closePath(), e.clip();
410
- let u = s(b, t);
411
+ let c = l(b, t);
411
412
  if (b.mode === "tile") {
412
413
  if (!O) continue;
413
- let n = k.find((e) => e.faceIndex === t);
414
- if (!n) continue;
415
- let r = n.canvas.width / n.width, i = n.canvas.height / n.height;
416
- n.context.save(), n.context.scale(r, i);
417
- for (let e = n.firstRow; e < n.lastRow; e++) for (let t = n.firstColumn; t < n.lastColumn; t++) {
418
- let r = n.origin.x + t * O.tileW, i = n.origin.y + e * O.tileH, a = O.flipX && Math.abs(t) % 2 == 1, o = O.flipY && Math.abs(e) % 2 == 1;
419
- n.context.save(), n.context.translate(r + (a ? O.tileW : 0), i + (o ? O.tileH : 0)), n.context.scale(a ? -1 : 1, o ? -1 : 1), f(n.context, l, c.srcRect, 0, 0, O.tileW, O.tileH), n.context.restore();
414
+ let r = k.find((e) => e.faceIndex === t);
415
+ if (!r) continue;
416
+ let i = r.canvas.width / r.width, a = r.canvas.height / r.height;
417
+ r.context.save(), r.context.scale(i, a);
418
+ for (let e = r.firstRow; e < r.lastRow; e++) for (let t = r.firstColumn; t < r.lastColumn; t++) {
419
+ let i = r.origin.x + t * O.tileW, a = r.origin.y + e * O.tileH, o = O.flipX && Math.abs(t) % 2 == 1, s = O.flipY && Math.abs(e) % 2 == 1;
420
+ r.context.save(), r.context.translate(i + (o ? O.tileW : 0), a + (s ? O.tileH : 0)), r.context.scale(o ? -1 : 1, s ? -1 : 1), p(r.context, u, n.srcRect, 0, 0, O.tileW, O.tileH), r.context.restore();
420
421
  }
421
- n.context.restore(), L(n.canvas, e, n.canvas.width, n.canvas.height, o, .5);
422
+ r.context.restore(), L(r.canvas, e, r.canvas.width, r.canvas.height, o, .5);
422
423
  } else if (b.mode === "stack") {
423
424
  if (D == null) continue;
424
- if (n(b, t)) for (let t = 0; t < Math.ceil(1 / D); t++) L(l, e, x.w, x.h, E(i, t * D, (t + 1) * D), .5, C);
425
- else L(l, e, x.w, x.h, o, .5, C);
426
- } else if (b.stackUnit != null && r(b, t)) for (let t = 0; t < u; t++) {
427
- let n = t * b.stackUnit / y, r = (t + 1) * b.stackUnit / y;
428
- L(l, e, x.w, x.h, E(i, n, r), .5, C);
425
+ if (i(b, t)) for (let t = 0; t < Math.ceil(1 / D); t++) L(u, e, x.w, x.h, E(r, t * D, (t + 1) * D), .5, C);
426
+ else L(u, e, x.w, x.h, o, .5, C);
427
+ } else if (b.stackUnit != null && a(b, t)) for (let t = 0; t < c; t++) {
428
+ let n = t * b.stackUnit / y, i = (t + 1) * b.stackUnit / y;
429
+ L(u, e, x.w, x.h, E(r, n, i), .5, C);
429
430
  }
430
- else b.stackUnit != null && L(l, e, x.w, x.h, o, .5, C);
431
+ else b.stackUnit != null && L(u, e, x.w, x.h, o, .5, C);
431
432
  e.restore();
432
433
  }
433
434
  return e.restore(), !0;
@@ -466,7 +467,7 @@ function ae(e, t, n, r, i = 0) {
466
467
  }
467
468
  if (t.borderHidden === !0) return;
468
469
  let a = t.borderFill ? g(t.borderFill, e, n.x, n.y, n.w, n.h, i) : t.borderColor ? `#${t.borderColor}` : null;
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());
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(f(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());
470
471
  }
471
472
  //#endregion
472
473
  //#region packages/core/src/chart/axis-scale.ts
@@ -823,21 +824,21 @@ function ye(e, t, n) {
823
824
  //#endregion
824
825
  //#region packages/core/src/chart/rich-data-label.ts
825
826
  var be = 4096, xe = 4, Se = be;
826
- function Ce(t, n, r, i) {
827
+ function Ce(e, t, r, i) {
827
828
  let a = [[]], o = [null], s = 0, c = (e) => {
828
829
  if (!e) return null;
829
830
  let t = e.startsWith("#") ? e.slice(1) : e;
830
831
  return /^[0-9A-Fa-f]{6}([0-9A-Fa-f]{2})?$/.test(t) ? `#${t}` : null;
831
832
  };
832
- outer: for (let l = 0; l < n.runs.length && l < Se; l++) {
833
- let u = n.runs[l];
833
+ outer: for (let l = 0; l < t.runs.length && l < Se; l++) {
834
+ let u = t.runs[l];
834
835
  u.text !== "\n" && o[a.length - 1] == null && (o[a.length - 1] = u.paragraphAlign ?? null);
835
- let d = e(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 = () => {
836
- v &&= (t.font = h, a[a.length - 1].push({
836
+ let d = n(u.fontSizeHpt, t.ptToPx) ?? r, f = u.fontFace?.trim().replaceAll("\"", ""), p = f && !f.startsWith("+") ? f : null, m = f && t.fontFamilyForFace ? t.fontFamilyForFace(f) : p ? `"${p}", Calibri, Arial, sans-serif` : t.fontFamily, h = `${u.italic ?? t.fallbackItalic ?? !1 ? "italic " : ""}${u.bold ?? t.fallbackBold ? "bold " : ""}${d}px ${m}`, g = (u.baseline ?? t.fallbackBaseline ?? 0) * d, _ = u.colorPaintAuthored === !0 || u.color != null || u.colorHidden === !0 ? u.colorHidden === !0 ? null : c(u.color) : t.fallbackColorHidden === !0 ? null : i, v = "", y = () => {
837
+ v &&= (e.font = h, a[a.length - 1].push({
837
838
  text: v,
838
839
  font: h,
839
840
  fillStyle: _,
840
- width: t.measureText(v).width,
841
+ width: e.measureText(v).width,
841
842
  fontSizePx: d,
842
843
  baselineShiftPx: g
843
844
  }), "");
@@ -892,9 +893,9 @@ function Te(e) {
892
893
  let t = [];
893
894
  if (e.showCategory && e.category && t.push(e.category), e.showSeries && e.seriesName && t.push(e.seriesName), e.showValue && e.sourceValue != null) {
894
895
  let n = e.valueDivisor != null && Number.isFinite(e.valueDivisor) && e.valueDivisor > 0 ? e.valueDivisor : 1;
895
- t.push(l(e.sourceValue / n, e.formatCode ?? null, e.date1904));
896
+ t.push(d(e.sourceValue / n, e.formatCode ?? null, e.date1904));
896
897
  }
897
- return e.showPercent && e.percentRatio != null && t.push(l(e.percentRatio, e.percentFormatCode ?? e.formatCode ?? "0%", e.date1904)), e.showBubbleSize && e.bubbleSize != null && t.push(l(e.bubbleSize, e.formatCode ?? null, e.date1904)), t.filter((e) => e !== "").join(e.separator ?? e.defaultSeparator ?? " ");
898
+ return e.showPercent && e.percentRatio != null && t.push(d(e.percentRatio, e.percentFormatCode ?? e.formatCode ?? "0%", e.date1904)), e.showBubbleSize && e.bubbleSize != null && t.push(d(e.bubbleSize, e.formatCode ?? null, e.date1904)), t.filter((e) => e !== "").join(e.separator ?? e.defaultSeparator ?? " ");
898
899
  }
899
900
  //#endregion
900
901
  //#region packages/core/src/chart/material-color.ts
package/dist/three-d.mjs CHANGED
@@ -1,7 +1,7 @@
1
- import { A as e, At as t, B as n, Bt as r, Ct as i, Dt as a, E as o, Et as s, H as c, Ht as l, It as u, J as d, Jt as f, Kt as p, Lt as m, Mt as h, Nt as g, R as _, Rt as v, St as y, Ut as b, Wt as x, Xt as S, Y as C, Yt as w, _t as T, a as E, at as D, b as O, bt as k, ct as A, ft as j, ht as M, it as N, jt as P, kt as F, mt as I, n as L, ot as R, r as z, st as ee, t as B, v as V, vt as te, wt as ne, x as H, xt as re, yt as ie } from "./plot-area-frame-DHV02PJU.js";
2
- import { a as U, r as W } from "./units-BzZ0gAxs.js";
3
- import { D as G, E as K, O as ae, _ as q, a as J, c as oe, d as Y, g as se, h as ce, i as le, k as ue, m as de, n as fe, o as pe, r as me, s as he, t as ge, x as _e } from "./three-d-7MaVzQuZ.js";
4
- import { t as ve } from "./renderer-module-contract-DLbb7zY0.js";
1
+ import { A as e, At as t, B as n, Bt as r, Ct as i, Dt as a, E as o, Et as s, H as c, Ht as l, It as u, J as d, Jt as f, Kt as p, Lt as m, Mt as h, Nt as g, R as _, Rt as v, St as y, Ut as b, Wt as x, Xt as S, Y as C, Yt as w, _t as T, a as E, at as D, b as O, bt as k, ct as A, ft as j, ht as M, it as N, jt as P, kt as F, mt as I, n as L, ot as R, r as z, st as ee, t as B, v as V, vt as te, wt as ne, x as H, xt as re, yt as ie } from "./plot-area-frame-DuXZzovH.js";
2
+ import { a as U, r as W } from "./units-EJdC96r6.js";
3
+ import { D as G, E as K, O as ae, _ as q, a as J, c as oe, d as Y, g as se, h as ce, i as le, k as ue, m as de, n as fe, o as pe, r as me, s as he, t as ge, x as _e } from "./three-d-B7LsKeOS.js";
4
+ import { t as ve } from "./renderer-module-contract-C6sYZvTV.js";
5
5
  function ye(e) {
6
6
  switch (e) {
7
7
  case "cylinder":
@@ -0,0 +1,69 @@
1
+ //#region packages/core/src/canvas/aux-canvas.ts
2
+ function e(e, t) {
3
+ return [Math.max(1, Math.ceil(e)), Math.max(1, Math.ceil(t))];
4
+ }
5
+ function t(t, n) {
6
+ let [r, i] = e(t, n);
7
+ if (typeof OffscreenCanvas < "u") return new OffscreenCanvas(r, i);
8
+ if (typeof document < "u") {
9
+ let e = document.createElement("canvas");
10
+ return e.width = r, e.height = i, e;
11
+ }
12
+ return null;
13
+ }
14
+ function n(t, n, r) {
15
+ let [i, a] = e(n, r);
16
+ if (typeof OffscreenCanvas < "u") try {
17
+ return new OffscreenCanvas(i, a);
18
+ } catch {}
19
+ if (typeof document < "u") try {
20
+ let e = document.createElement("canvas");
21
+ return e.width = i, e.height = a, e;
22
+ } catch {}
23
+ try {
24
+ let e = t.canvas?.constructor;
25
+ return typeof e == "function" ? new e(i, a) : null;
26
+ } catch {
27
+ return null;
28
+ }
29
+ }
30
+ //#endregion
31
+ //#region packages/core/src/image/pixel-budget.ts
32
+ var r = 32767, i = 1 << 25, a = i * 4, o = class e extends RangeError {
33
+ code = "ooxml-decoded-image-limit";
34
+ constructor(t, n, r) {
35
+ super(`OOXML decoded image limit exceeded: ${t} ${r} > ${n}`), this.metric = t, this.limit = n, this.observed = r, this.name = "OoxmlDecodedImageLimitError", Object.setPrototypeOf(this, e.prototype);
36
+ }
37
+ };
38
+ function s(e) {
39
+ return e instanceof o || !!e && typeof e == "object" && e.code === "ooxml-decoded-image-limit";
40
+ }
41
+ //#endregion
42
+ //#region packages/core/src/image/tiff-contract.ts
43
+ function c(e) {
44
+ if (e.length < 4) return !1;
45
+ let t = e[0] === 73 && e[1] === 73, n = e[0] === 77 && e[1] === 77;
46
+ return !t && !n ? !1 : new DataView(e.buffer, e.byteOffset, e.byteLength).getUint16(2, t) === 42;
47
+ }
48
+ function l(e) {
49
+ if (!c(e) || e.length < 8) return null;
50
+ let t = e[0] === 73, n = new DataView(e.buffer, e.byteOffset, e.byteLength), r = (e, t) => Number.isSafeInteger(e) && e >= 0 && t >= 0 && e <= n.byteLength - t, i = n.getUint32(4, t);
51
+ if (!r(i, 2)) return null;
52
+ let a = n.getUint16(i, t);
53
+ if (!r(i + 2, a * 12 + 4)) return null;
54
+ let o, s;
55
+ for (let e = 0; e < a; e++) {
56
+ let r = i + 2 + e * 12, a = n.getUint16(r, t);
57
+ if (a !== 256 && a !== 257) continue;
58
+ let c = n.getUint16(r + 2, t);
59
+ if (n.getUint32(r + 4, t) !== 1 || c !== 1 && c !== 3 && c !== 4) return null;
60
+ let l = c === 1 ? n.getUint8(r + 8) : c === 3 ? n.getUint16(r + 8, t) : n.getUint32(r + 8, t);
61
+ a === 256 ? o = l : s = l;
62
+ }
63
+ return o === void 0 || s === void 0 ? null : {
64
+ width: o,
65
+ height: s
66
+ };
67
+ }
68
+ //#endregion
69
+ export { i as a, t as c, r as i, n as l, l as n, o, a as r, s, c as t };
package/dist/tiff.mjs ADDED
@@ -0,0 +1,124 @@
1
+ import { a as e, c as t, o as n, t as r } from "./tiff-contract-Xjn3qXqK.js";
2
+ import { t as i } from "./renderer-module-contract-C6sYZvTV.js";
3
+ //#region packages/core/src/image/tiff.ts
4
+ var a = 1, o = 3, s = 4, c = {
5
+ width: 256,
6
+ height: 257,
7
+ bitsPerSample: 258,
8
+ compression: 259,
9
+ photometric: 262,
10
+ stripOffsets: 273,
11
+ orientation: 274,
12
+ samplesPerPixel: 277,
13
+ rowsPerStrip: 278,
14
+ stripByteCounts: 279,
15
+ planarConfiguration: 284,
16
+ inkSet: 332,
17
+ extraSamples: 338
18
+ }, l = class {
19
+ view;
20
+ constructor(e, t) {
21
+ this.bytes = e, this.littleEndian = t, this.view = new DataView(e.buffer, e.byteOffset, e.byteLength);
22
+ }
23
+ contains(e, t) {
24
+ return Number.isSafeInteger(e) && Number.isSafeInteger(t) && e >= 0 && t >= 0 && e <= this.view.byteLength - t;
25
+ }
26
+ u16(e) {
27
+ return this.contains(e, 2) ? this.view.getUint16(e, this.littleEndian) : null;
28
+ }
29
+ u32(e) {
30
+ return this.contains(e, 4) ? this.view.getUint32(e, this.littleEndian) : null;
31
+ }
32
+ };
33
+ function u(e) {
34
+ if (!r(e)) return null;
35
+ let t = new l(e, e[0] === 73), n = t.u32(4);
36
+ if (n == null) return null;
37
+ let i = t.u16(n);
38
+ if (i == null || !t.contains(n + 2, i * 12 + 4)) return null;
39
+ let a = /* @__PURE__ */ new Map();
40
+ for (let e = 0; e < i; e++) {
41
+ let r = n + 2 + e * 12, i = t.u16(r), o = t.u16(r + 2), s = t.u32(r + 4);
42
+ if (i == null || o == null || s == null || a.has(i)) return null;
43
+ a.set(i, {
44
+ type: o,
45
+ count: s,
46
+ entryOffset: r
47
+ });
48
+ }
49
+ return {
50
+ reader: t,
51
+ fields: a
52
+ };
53
+ }
54
+ function d(e, t, n) {
55
+ let r = e.fields.get(t);
56
+ if (!r || r.count < 1 || r.count > n) return null;
57
+ let i = r.type === a ? 1 : r.type === o ? 2 : r.type === s ? 4 : 0;
58
+ if (i === 0) return null;
59
+ let c = r.count * i, l = c <= 4 ? r.entryOffset + 8 : e.reader.u32(r.entryOffset + 8);
60
+ if (l == null || !e.reader.contains(l, c)) return null;
61
+ let u = Array(r.count);
62
+ for (let t = 0; t < r.count; t++) {
63
+ let n = l + t * i, s = r.type === a ? e.reader.bytes[n] : r.type === o ? e.reader.u16(n) : e.reader.u32(n);
64
+ if (s == null) return null;
65
+ u[t] = s;
66
+ }
67
+ return u;
68
+ }
69
+ function f(e, t, n) {
70
+ return e.fields.has(t) ? e.fields.get(t).count === 1 ? d(e, t, 1)?.[0] ?? null : null : n ?? null;
71
+ }
72
+ function p(e, t) {
73
+ return Math.round((255 - e) * (255 - t) / 255);
74
+ }
75
+ function m(t) {
76
+ let r = u(t);
77
+ if (!r) return null;
78
+ let i = f(r, c.width), a = f(r, c.height);
79
+ if (i == null || a == null) return null;
80
+ let o = i * a;
81
+ if (i <= 0 || a <= 0 || i > 32767 || a > 32767 || o > 33554432) throw new n("image-pixels", e, o);
82
+ let s = f(r, c.compression, 1), l = f(r, c.photometric), m = f(r, c.samplesPerPixel, 1), h = f(r, c.rowsPerStrip, 4294967295);
83
+ if (s !== 1 || l == null || m == null || h == null || h < 1 || f(r, c.planarConfiguration, 1) !== 1 || f(r, c.orientation, 1) !== 1 || r.fields.has(c.extraSamples) || l !== 5 || m !== 4 || f(r, c.inkSet, 1) !== 1) return null;
84
+ let g = r.fields.has(c.bitsPerSample) ? d(r, c.bitsPerSample, m) : [1];
85
+ if (!g || g.length !== m || g.some((e) => e !== 8)) return null;
86
+ let _ = Math.ceil(a / h), v = d(r, c.stripOffsets, _), y = d(r, c.stripByteCounts, _);
87
+ if (!v || !y || v.length !== _ || y.length !== _) return null;
88
+ let b = i * m;
89
+ for (let e = 0; e < _; e++) {
90
+ let t = e * h, n = Math.min(h, a - t) * b;
91
+ if (y[e] < n || !r.reader.contains(v[e], n)) return null;
92
+ }
93
+ let x = new Uint8ClampedArray(o * 4);
94
+ for (let e = 0; e < _; e++) {
95
+ let n = e * h, r = Math.min(h, a - n);
96
+ for (let a = 0; a < r; a++) {
97
+ let r = v[e] + a * b, o = (n + a) * i * 4;
98
+ for (let e = 0; e < i; e++, o += 4) {
99
+ let e = t[r++], n = t[r++], i = t[r++], a = t[r++];
100
+ x[o] = p(e, a), x[o + 1] = p(n, a), x[o + 2] = p(i, a), x[o + 3] = 255;
101
+ }
102
+ }
103
+ }
104
+ return {
105
+ width: i,
106
+ height: a,
107
+ data: x
108
+ };
109
+ }
110
+ async function h(e) {
111
+ let n = m(e);
112
+ if (!n) return null;
113
+ let r = t(n.width, n.height);
114
+ if (!r) return null;
115
+ let i = r.getContext("2d");
116
+ if (!i) return null;
117
+ let a = i.createImageData(n.width, n.height);
118
+ return a.data.set(n.data), i.putImageData(a, 0, 0), createImageBitmap(r);
119
+ }
120
+ //#endregion
121
+ //#region src/tiff.ts
122
+ var g = i({ render: h }, "tiff");
123
+ //#endregion
124
+ export { g as tiff };
@@ -1,4 +1,4 @@
1
- //#region dist/.types-work/chart-qJPl2r8m.d.ts
1
+ //#region dist/.types-work/chart-BuqsupYd.d.ts
2
2
  interface Duotone {
3
3
  clr1: string;
4
4
  clr2: string;
@@ -938,7 +938,7 @@ interface ChartRect {
938
938
  h: number;
939
939
  }
940
940
  //#endregion
941
- //#region dist/.types-work/chart-ex-contract-Ba0xG5gE.d.ts
941
+ //#region dist/.types-work/chart-ex-contract-D_w4cW99.d.ts
942
942
  interface ChartExRenderer {
943
943
  render(ctx: CanvasRenderingContext2D, chart: ChartModel, rect: ChartRect, ptToPx: number, shapeRotationDeg?: number): boolean;
944
944
  }