@silurus/ooxml 0.78.1 → 0.79.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 (46) hide show
  1. package/README.md +39 -1
  2. package/THIRD_PARTY_NOTICES.md +13 -0
  3. package/dist/{canvas-viewer-mechanics-B4K_t5X_.js → canvas-viewer-mechanics-DJ9yfiLN.js} +1 -1
  4. package/dist/chart-number-format-tjYUR9eS.js +435 -0
  5. package/dist/dash-CMzZIDz_.js +824 -0
  6. package/dist/{document-pull-client-5AakVD6e.js → document-pull-client-DYoybVCn.js} +2119 -2113
  7. package/dist/{docx-bjhRwb2u.js → docx-CSk_-kj_.js} +65 -56
  8. package/dist/docx.mjs +4 -4
  9. package/dist/docx_parser_bg.wasm +0 -0
  10. package/dist/index.mjs +3 -3
  11. package/dist/{line-distribute-BVFW1-Hs.js → line-distribute-CU7vu7XS.js} +1 -1
  12. package/dist/{line-metrics-DS0NS2Iq.js → line-metrics-A77J_KRx.js} +4229 -3233
  13. package/dist/math.mjs +1 -1
  14. package/dist/node.mjs +322 -322
  15. package/dist/{pptx-D1rCrHGR.js → pptx-CO1Ut97p.js} +192 -183
  16. package/dist/pptx.mjs +5 -5
  17. package/dist/pptx_parser_bg.wasm +0 -0
  18. package/dist/region-map.mjs +12708 -0
  19. package/dist/{render-DhlT5jxZ.js → render-C5m7Ddwx.js} +1 -1
  20. package/dist/render-worker-host-BhMT5U73.js +27 -0
  21. package/dist/render-worker-host-DNMxGh5s.js +27 -0
  22. package/dist/render-worker-host-DWyg7wio.js +27 -0
  23. package/dist/{resource-measurement-BA-4Q-II.js → resource-measurement-COxqtfGk.js} +1 -1
  24. package/dist/{session-C_HGxbRD.js → session-CJwZaquG.js} +10 -10
  25. package/dist/{slide-pull-client-BiC4sVGi.js → slide-pull-client-CFHNk0ek.js} +584 -583
  26. package/dist/three-d.mjs +2426 -0
  27. package/dist/types/docx.d.ts +251 -16
  28. package/dist/types/index.d.ts +266 -20
  29. package/dist/types/math.d.ts +1 -1
  30. package/dist/types/node.d.ts +225 -1
  31. package/dist/types/pptx.d.ts +253 -16
  32. package/dist/types/region-map.d.ts +586 -0
  33. package/dist/types/three-d.d.ts +586 -0
  34. package/dist/types/xlsx.d.ts +256 -16
  35. package/dist/{worksheet-pull-client-BnvgeqfG.js → worksheet-pull-client-CziyJf24.js} +13 -13
  36. package/dist/{xlsx-BG_WYSc0.js → xlsx-DHQmjAfh.js} +1246 -1073
  37. package/dist/xlsx.mjs +5 -5
  38. package/dist/xlsx_parser_bg.wasm +0 -0
  39. package/package.json +13 -1
  40. package/dist/render-worker-host-CtJo7hc9.js +0 -27
  41. package/dist/render-worker-host-D8vv-Asx.js +0 -27
  42. package/dist/render-worker-host-DAjG9nmw.js +0 -27
  43. /package/dist/{highlight-rect-CAkCWJ37.js → highlight-rect-cCvVU-MW.js} +0 -0
  44. /package/dist/{mathjax-CMjda8Ip.js → mathjax-Dqo857oC.js} +0 -0
  45. /package/dist/{transfer-DCu4c2BL.js → transfer-3QEJrsJa.js} +0 -0
  46. /package/dist/{visible-index-CgyJLAS_.js → visible-index-CKvgpUrf.js} +0 -0
@@ -1,12 +1,13 @@
1
- import { A as e, At as t, Bt as n, C as r, D as i, Dt as a, Ft as o, Gt as s, Ht as c, K as l, Kt as u, Lt as d, M as f, N as p, Nt as m, O as h, Ot as g, Qt as _, Rt as v, S as y, St as b, Tt as x, Ut as S, Vt as C, Wt as w, Xt as T, Yt as E, _ as D, _t as O, bt as k, c as A, cn as j, ct as M, d as N, dn as P, en as F, f as I, fn as L, g as R, gt as z, h as B, ht as V, i as H, in as U, j as ee, jt as W, ln as G, m as K, mn as q, mt as J, n as te, p as ne, pt as re, qt as ie, r as ae, s as oe, sn as se, u as ce, un as le, vt as ue, w as de, xt as fe, y as pe } from "./line-metrics-DS0NS2Iq.js";
2
- import { a as me, c as he, d as ge, i as _e, l as ve, n as ye, o as be, r as xe, s as Se, t as Ce, u as we } from "./line-distribute-BVFW1-Hs.js";
3
- import { i as Te } from "./resource-measurement-BA-4Q-II.js";
4
- import { t as Ee } from "./mathjax-CMjda8Ip.js";
1
+ import { $t as e, A as t, At as n, Bt as r, C as i, D as a, Dt as o, Ft as s, Gt as c, Ht as l, K as u, Kt as d, Lt as f, M as p, N as m, Nt as h, O as g, Ot as _, Qt as v, Rt as y, S as b, St as x, Tt as S, Ut as C, Vt as w, Wt as T, Xt as E, Yt as D, Zt as O, _ as k, _t as A, an as j, bt as M, c as N, ct as P, d as F, en as I, f as L, g as R, gt as z, h as B, ht as V, i as H, j as U, jt as W, m as G, mt as K, n as q, nn as J, p as ee, pt as te, qt as ne, r as re, rn as ie, s as ae, tn as oe, u as se, vt as ce, w as le, xt as ue, y as de } from "./line-metrics-A77J_KRx.js";
2
+ import { a as fe, c as pe, d as me, i as he, l as ge, n as _e, o as ve, r as ye, s as be, t as xe, u as Se } from "./line-distribute-CU7vu7XS.js";
3
+ import { b as Y, r as Ce } from "./dash-CMzZIDz_.js";
4
+ import { i as we } from "./resource-measurement-COxqtfGk.js";
5
+ import { t as Te } from "./mathjax-Dqo857oC.js";
5
6
  //#region packages/pptx/src/types.ts
6
- function De(e) {
7
+ function Ee(e) {
7
8
  return e;
8
9
  }
9
- var Oe = {
10
+ var De = {
10
11
  textarchdown: {
11
12
  adj: [["adj", "val 0"]],
12
13
  gd: [
@@ -2388,22 +2389,22 @@ var Oe = {
2388
2389
  ]
2389
2390
  }]
2390
2391
  }
2391
- }, ke = Math.PI * 2 / 216e5, Ae = Oe, je = /* @__PURE__ */ new Map();
2392
- function Me(e) {
2393
- return e.toLowerCase() in Ae;
2392
+ }, Oe = Math.PI * 2 / 216e5, ke = De, Ae = /* @__PURE__ */ new Map();
2393
+ function je(e) {
2394
+ return e.toLowerCase() in ke;
2394
2395
  }
2395
- function Ne(e) {
2396
- let t = je.get(e);
2396
+ function Me(e) {
2397
+ let t = Ae.get(e);
2397
2398
  if (t) return t;
2398
- let n = Ae[e];
2399
+ let n = ke[e];
2399
2400
  return n ? (t = {
2400
- adj: n.adj.map(([e, t]) => [e, w(t)]),
2401
- gd: n.gd.map(([e, t]) => [e, w(t)]),
2401
+ adj: n.adj.map(([e, t]) => [e, T(t)]),
2402
+ gd: n.gd.map(([e, t]) => [e, T(t)]),
2402
2403
  paths: n.paths
2403
- }, je.set(e, t), t) : null;
2404
+ }, Ae.set(e, t), t) : null;
2404
2405
  }
2405
- var Pe = 48;
2406
- function Fe(e, t, n, r) {
2406
+ var Ne = 48;
2407
+ function Pe(e, t, n, r) {
2407
2408
  let i = e.w == null ? 1 : n / e.w, a = e.h == null ? 1 : r / e.h, o = (e) => e * i, s = (e) => e * a, c = [], l = 0, u = 0;
2408
2409
  for (let n of e.cmds) switch (n[0]) {
2409
2410
  case "m":
@@ -2420,8 +2421,8 @@ function Fe(e, t, n, r) {
2420
2421
  break;
2421
2422
  case "C": {
2422
2423
  let e = o(t.resolve(n[1])), r = s(t.resolve(n[2])), i = o(t.resolve(n[3])), a = s(t.resolve(n[4])), d = o(t.resolve(n[5])), f = s(t.resolve(n[6]));
2423
- for (let t = 1; t <= Pe; t++) {
2424
- let n = t / Pe, o = 1 - n, s = o * o * o * l + 3 * o * o * n * e + 3 * o * n * n * i + n * n * n * d, p = o * o * o * u + 3 * o * o * n * r + 3 * o * n * n * a + n * n * n * f;
2424
+ for (let t = 1; t <= Ne; t++) {
2425
+ let n = t / Ne, o = 1 - n, s = o * o * o * l + 3 * o * o * n * e + 3 * o * n * n * i + n * n * n * d, p = o * o * o * u + 3 * o * o * n * r + 3 * o * n * n * a + n * n * n * f;
2425
2426
  c.push({
2426
2427
  x: s,
2427
2428
  y: p
@@ -2432,8 +2433,8 @@ function Fe(e, t, n, r) {
2432
2433
  }
2433
2434
  case "Q": {
2434
2435
  let e = o(t.resolve(n[1])), r = s(t.resolve(n[2])), i = o(t.resolve(n[3])), a = s(t.resolve(n[4]));
2435
- for (let t = 1; t <= Pe; t++) {
2436
- let n = t / Pe, o = 1 - n, s = o * o * l + 2 * o * n * e + n * n * i, d = o * o * u + 2 * o * n * r + n * n * a;
2436
+ for (let t = 1; t <= Ne; t++) {
2437
+ let n = t / Ne, o = 1 - n, s = o * o * l + 2 * o * n * e + n * n * i, d = o * o * u + 2 * o * n * r + n * n * a;
2437
2438
  c.push({
2438
2439
  x: s,
2439
2440
  y: d
@@ -2443,9 +2444,9 @@ function Fe(e, t, n, r) {
2443
2444
  break;
2444
2445
  }
2445
2446
  case "a": {
2446
- let e = t.resolve(n[1]), r = t.resolve(n[2]), o = e * i, s = r * a, d = t.resolve(n[3]) * ke, f = t.resolve(n[4]) * ke, p = (t) => Math.atan2(e * Math.sin(t), r * Math.cos(t)), m = Math.PI * 2, h = p(d), g = Math.trunc(f / m), _ = f - g * m, v = p(d + _) - h;
2447
+ let e = t.resolve(n[1]), r = t.resolve(n[2]), o = e * i, s = r * a, d = t.resolve(n[3]) * Oe, f = t.resolve(n[4]) * Oe, p = (t) => Math.atan2(e * Math.sin(t), r * Math.cos(t)), m = Math.PI * 2, h = p(d), g = Math.trunc(f / m), _ = f - g * m, v = p(d + _) - h;
2447
2448
  _ > 0 && v < 0 ? v += m : _ < 0 && v > 0 && (v -= m);
2448
- let y = v + g * m, b = l - o * Math.cos(h), x = u - s * Math.sin(h), S = Math.max(Pe, Math.ceil(Math.abs(y) / m * 96));
2449
+ let y = v + g * m, b = l - o * Math.cos(h), x = u - s * Math.sin(h), S = Math.max(Ne, Math.ceil(Math.abs(y) / m * 96));
2449
2450
  for (let e = 1; e <= S; e++) {
2450
2451
  let t = h + y * e / S;
2451
2452
  c.push({
@@ -2460,7 +2461,7 @@ function Fe(e, t, n, r) {
2460
2461
  }
2461
2462
  return c;
2462
2463
  }
2463
- function Ie(e) {
2464
+ function Fe(e) {
2464
2465
  let t = [0];
2465
2466
  for (let n = 1; n < e.length; n++) {
2466
2467
  let r = e[n].x - e[n - 1].x, i = e[n].y - e[n - 1].y;
@@ -2468,23 +2469,23 @@ function Ie(e) {
2468
2469
  }
2469
2470
  return t;
2470
2471
  }
2471
- function Le(e, t, n, r) {
2472
- let i = Ne(e.toLowerCase());
2472
+ function Ie(e, t, n, r) {
2473
+ let i = Me(e.toLowerCase());
2473
2474
  if (!i || i.paths.length === 0) return null;
2474
- let a = s({
2475
+ let a = c({
2475
2476
  w: n,
2476
2477
  h: r,
2477
2478
  adj: t
2478
- }, i.adj, i.gd), o = i.paths.length === 1, c = Fe(i.paths[0], a, n, r), l = o ? c : Fe(i.paths[i.paths.length - 1], a, n, r);
2479
+ }, i.adj, i.gd), o = i.paths.length === 1, s = Pe(i.paths[0], a, n, r), l = o ? s : Pe(i.paths[i.paths.length - 1], a, n, r);
2479
2480
  return {
2480
- top: c,
2481
+ top: s,
2481
2482
  bottom: l,
2482
- topLen: Ie(c),
2483
- bottomLen: Ie(l),
2483
+ topLen: Fe(s),
2484
+ bottomLen: Fe(l),
2484
2485
  singleEdge: o
2485
2486
  };
2486
2487
  }
2487
- function Re(e, t, n) {
2488
+ function Le(e, t, n) {
2488
2489
  let r = t[t.length - 1];
2489
2490
  if (e.length === 1 || r === 0) return {
2490
2491
  x: e[0].x,
@@ -2505,17 +2506,17 @@ function Re(e, t, n) {
2505
2506
  ty: f / p
2506
2507
  };
2507
2508
  }
2508
- function ze(e) {
2509
+ function Re(e) {
2509
2510
  return e.topLen[e.topLen.length - 1] ?? 0;
2510
2511
  }
2511
- function Be(e, t) {
2512
+ function ze(e, t) {
2512
2513
  if (!e.singleEdge) return 1;
2513
- let n = ze(e);
2514
+ let n = Re(e);
2514
2515
  return n <= 0 ? 1 : Math.max(0, Math.min(1, t / n));
2515
2516
  }
2516
- function Ve(e, t, n, r) {
2517
+ function Be(e, t, n, r) {
2517
2518
  if (e.singleEdge) {
2518
- let i = Re(e.top, e.topLen, t), a = Math.atan2(i.ty, i.tx), o = i.ty, s = -i.tx, c = n * (1 - r);
2519
+ let i = Le(e.top, e.topLen, t), a = Math.atan2(i.ty, i.tx), o = i.ty, s = -i.tx, c = n * (1 - r);
2519
2520
  return {
2520
2521
  x: i.x - o * c,
2521
2522
  y: i.y - s * c,
@@ -2524,7 +2525,7 @@ function Ve(e, t, n, r) {
2524
2525
  shear: 0
2525
2526
  };
2526
2527
  }
2527
- let i = Re(e.top, e.topLen, t), a = Re(e.bottom, e.bottomLen, t), o = a.x - i.x, s = a.y - i.y, c = i.x + o * r, l = i.y + s * r, u = i.tx + a.tx, d = i.ty + a.ty, f = Math.atan2(d, u), p = Math.cos(f), m = Math.sin(f), h = (p * o + m * s) / (n > 0 ? n : 1), g = (-m * o + p * s) / (n > 0 ? n : 1);
2528
+ let i = Le(e.top, e.topLen, t), a = Le(e.bottom, e.bottomLen, t), o = a.x - i.x, s = a.y - i.y, c = i.x + o * r, l = i.y + s * r, u = i.tx + a.tx, d = i.ty + a.ty, f = Math.atan2(d, u), p = Math.cos(f), m = Math.sin(f), h = (p * o + m * s) / (n > 0 ? n : 1), g = (-m * o + p * s) / (n > 0 ? n : 1);
2528
2529
  return {
2529
2530
  x: c,
2530
2531
  y: l,
@@ -2535,16 +2536,16 @@ function Ve(e, t, n, r) {
2535
2536
  }
2536
2537
  //#endregion
2537
2538
  //#region packages/core/src/shape/effects.ts
2538
- function He(e, t) {
2539
+ function Ve(e, t) {
2539
2540
  return [t === "tl" || t === "l" || t === "bl" ? e.x : t === "tr" || t === "r" || t === "br" ? e.x + e.w : e.x + e.w / 2, t === "tl" || t === "t" || t === "tr" ? e.y : t === "l" || t === "ctr" || t === "r" ? e.y + e.h / 2 : e.y + e.h];
2540
2541
  }
2541
- function Ue(e, t) {
2542
+ function He(e, t) {
2542
2543
  return e * t;
2543
2544
  }
2544
- function We(e) {
2545
+ function Ue(e) {
2545
2546
  return e.getContext("2d") ?? null;
2546
2547
  }
2547
- function Ge(e, t, n, r) {
2548
+ function We(e, t, n, r) {
2548
2549
  let i = Math.max(0, Math.floor(e.x - t)), a = Math.max(0, Math.floor(e.y - t)), o = Math.min(n, Math.ceil(e.x + e.w + t)), s = Math.min(r, Math.ceil(e.y + e.h + t));
2549
2550
  return {
2550
2551
  x: i,
@@ -2553,7 +2554,7 @@ function Ge(e, t, n, r) {
2553
2554
  h: Math.max(1, s - a)
2554
2555
  };
2555
2556
  }
2556
- function Ke(e, t) {
2557
+ function Ge(e, t) {
2557
2558
  if (t.x === 0 && t.y === 0) return e;
2558
2559
  let n = t.x, r = t.y;
2559
2560
  return new Proxy(e, {
@@ -2569,67 +2570,67 @@ function Ke(e, t) {
2569
2570
  }
2570
2571
  });
2571
2572
  }
2572
- function qe(e, t, n, r, i, a, o, s = 0, c) {
2573
- let l = Math.max(0, Ue(r.blur, i)), u = Ue(r.dist, i), d = r.rotWithShape === !1 ? 0 : s, f = (r.dir + d) * Math.PI / 180, p = Math.cos(f) * u, m = Math.sin(f) * u, h = Ge(n, Math.ceil(l * 3 + Math.max(Math.abs(p), Math.abs(m))) + 2, a, o), g = F(h.w, h.h);
2573
+ function Ke(e, t, n, r, i, a, o, s = 0, c) {
2574
+ let l = Math.max(0, He(r.blur, i)), u = He(r.dist, i), d = r.rotWithShape === !1 ? 0 : s, f = (r.dir + d) * Math.PI / 180, p = Math.cos(f) * u, m = Math.sin(f) * u, h = We(n, Math.ceil(l * 3 + Math.max(Math.abs(p), Math.abs(m))) + 2, a, o), g = O(h.w, h.h);
2574
2575
  if (!g) return !1;
2575
- let _ = We(g);
2576
+ let _ = Ue(g);
2576
2577
  if (!_) return !1;
2577
- t(Ke(_, h)), _.save(), _.setTransform(1, 0, 0, 1, 0, 0), _.globalCompositeOperation = "source-in", _.fillStyle = E(r.color, r.alpha), _.fillRect(0, 0, h.w, h.h), _.restore(), e.save(), l > 0 && (e.filter = `blur(${l}px)`);
2578
- let [v, y] = c ?? He(n, r.algn ?? "b"), b = r.sx ?? 1, x = r.sy ?? 1, S = Math.tan((r.kx ?? 0) * Math.PI / 180), C = Math.tan((r.ky ?? 0) * Math.PI / 180);
2578
+ t(Ge(_, h)), _.save(), _.setTransform(1, 0, 0, 1, 0, 0), _.globalCompositeOperation = "source-in", _.fillStyle = D(r.color, r.alpha), _.fillRect(0, 0, h.w, h.h), _.restore(), e.save(), l > 0 && (e.filter = `blur(${l}px)`);
2579
+ let [v, y] = c ?? Ve(n, r.algn ?? "b"), b = r.sx ?? 1, x = r.sy ?? 1, S = Math.tan((r.kx ?? 0) * Math.PI / 180), C = Math.tan((r.ky ?? 0) * Math.PI / 180);
2579
2580
  return e.translate(p, m), e.translate(v, y), d !== 0 && e.rotate(d * Math.PI / 180), e.transform(b, C, S, x, 0, 0), d !== 0 && e.rotate(-d * Math.PI / 180), e.translate(-v, -y), e.drawImage(g, h.x, h.y), e.restore(), !0;
2580
2581
  }
2581
- function Je(e, t, n, r, i, a, o) {
2582
- let s = Ue(r.blur, i), c = Ue(r.dist, i), l = r.dir * Math.PI / 180, u = Math.cos(l) * c, d = Math.sin(l) * c, f = Ge(n, Math.ceil(3 * s + Math.abs(c)) + 2, a, o), p = F(f.w, f.h);
2582
+ function qe(e, t, n, r, i, a, o) {
2583
+ let s = He(r.blur, i), c = He(r.dist, i), l = r.dir * Math.PI / 180, u = Math.cos(l) * c, d = Math.sin(l) * c, f = We(n, Math.ceil(3 * s + Math.abs(c)) + 2, a, o), p = O(f.w, f.h);
2583
2584
  if (!p) return;
2584
- let m = We(p);
2585
+ let m = Ue(p);
2585
2586
  if (!m) return;
2586
- let h = Ke(m, f);
2587
- h.save(), h.fillStyle = E(r.color, r.alpha), t(h), h.restore(), h.save(), h.globalCompositeOperation = "destination-out", h.filter = s > 0 ? `blur(${s}px)` : "none", h.translate(u, d), h.fillStyle = "#000", t(h), h.restore(), h.save(), h.globalCompositeOperation = "destination-in", h.filter = "none", h.fillStyle = "#000", t(h), h.restore(), e.save(), e.drawImage(p, f.x, f.y), e.restore();
2587
+ let h = Ge(m, f);
2588
+ h.save(), h.fillStyle = D(r.color, r.alpha), t(h), h.restore(), h.save(), h.globalCompositeOperation = "destination-out", h.filter = s > 0 ? `blur(${s}px)` : "none", h.translate(u, d), h.fillStyle = "#000", t(h), h.restore(), h.save(), h.globalCompositeOperation = "destination-in", h.filter = "none", h.fillStyle = "#000", t(h), h.restore(), e.save(), e.drawImage(p, f.x, f.y), e.restore();
2588
2589
  }
2589
- function Ye(e, t, n, r, i, a, o, s) {
2590
- let c = Ue(r.radius, i);
2590
+ function Je(e, t, n, r, i, a, o, s) {
2591
+ let c = He(r.radius, i);
2591
2592
  if (c <= 0) {
2592
2593
  t(e);
2593
2594
  return;
2594
2595
  }
2595
- let l = Ge(n, Math.ceil(c) + 2, a, o), u = n.x - l.x, d = n.y - l.y, f = F(l.w, l.h);
2596
+ let l = We(n, Math.ceil(c) + 2, a, o), u = n.x - l.x, d = n.y - l.y, f = O(l.w, l.h);
2596
2597
  if (!f) {
2597
2598
  t(e);
2598
2599
  return;
2599
2600
  }
2600
- let p = We(f);
2601
+ let p = Ue(f);
2601
2602
  if (!p) {
2602
2603
  t(e);
2603
2604
  return;
2604
2605
  }
2605
- let m = Ke(p, l), h = s ?? t;
2606
+ let m = Ge(p, l), h = s ?? t;
2606
2607
  t(m);
2607
- let g = F(l.w, l.h), _ = F(l.w, l.h), v = g ? We(g) : null, y = _ ? We(_) : null;
2608
+ let g = O(l.w, l.h), _ = O(l.w, l.h), v = g ? Ue(g) : null, y = _ ? Ue(_) : null;
2608
2609
  if (g && v && _ && y) {
2609
- let t = Ke(v, l);
2610
+ let t = Ge(v, l);
2610
2611
  t.fillStyle = "#000", h(t), y.drawImage(f, u, d, n.w, n.h, u - c, d - c, n.w + c * 2, n.h + c * 2), y.drawImage(f, 0, 0), y.globalCompositeOperation = "destination-in", y.filter = `blur(${c / 3}px)`, y.drawImage(g, 0, 0), y.filter = "none", y.globalCompositeOperation = "source-over", e.save(), e.drawImage(_, l.x, l.y), e.restore();
2611
2612
  return;
2612
2613
  }
2613
2614
  e.save(), e.drawImage(f, 0, 0), e.restore();
2614
2615
  }
2615
- function Xe(e, t, n, r, i, a, o) {
2616
- let s = F(a, o);
2616
+ function Ye(e, t, n, r, i, a, o) {
2617
+ let s = O(a, o);
2617
2618
  if (!s) return;
2618
- let c = We(s);
2619
+ let c = Ue(s);
2619
2620
  if (!c) return;
2620
- let l = Ue(r.blur, i);
2621
+ let l = He(r.blur, i);
2621
2622
  c.save(), l > 0 && (c.filter = `blur(${l}px)`), t(c), c.restore(), c.save(), c.globalCompositeOperation = "destination-in";
2622
- let u = n.y, d = n.y + n.h, f = c.createLinearGradient(0, d, 0, u), p = Ze(r.stPos), m = Ze(r.endPos);
2623
+ let u = n.y, d = n.y + n.h, f = c.createLinearGradient(0, d, 0, u), p = Xe(r.stPos), m = Xe(r.endPos);
2623
2624
  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();
2624
- let h = Ue(r.dist, i), g = r.dir * Math.PI / 180, _ = Math.cos(g) * h, v = Math.sin(g) * h;
2625
+ let h = He(r.dist, i), g = r.dir * Math.PI / 180, _ = Math.cos(g) * h, v = Math.sin(g) * h;
2625
2626
  e.save(), e.translate(n.x + _, d + v), e.scale(r.sx, r.sy), e.translate(-n.x, -d), e.drawImage(s, 0, 0), e.restore();
2626
2627
  }
2627
- function Ze(e) {
2628
+ function Xe(e) {
2628
2629
  return e < 0 ? 0 : e > 1 ? 1 : e;
2629
2630
  }
2630
2631
  //#endregion
2631
2632
  //#region packages/core/src/shape/scene3d-camera.ts
2632
- var Qe = 26, $e = {
2633
+ var Ze = 26, Qe = {
2633
2634
  orthographicFront: {
2634
2635
  kind: "orthographic",
2635
2636
  baseLat: 0,
@@ -2642,52 +2643,52 @@ var Qe = 26, $e = {
2642
2643
  baseLat: 0,
2643
2644
  baseLon: 0,
2644
2645
  baseRev: 0,
2645
- fovDeg: Qe
2646
+ fovDeg: Ze
2646
2647
  },
2647
2648
  perspectiveRelaxed: {
2648
2649
  kind: "perspective",
2649
2650
  baseLat: 0,
2650
2651
  baseLon: 0,
2651
2652
  baseRev: 0,
2652
- fovDeg: Qe
2653
+ fovDeg: Ze
2653
2654
  },
2654
2655
  perspectiveRelaxedModerately: {
2655
2656
  kind: "perspective",
2656
2657
  baseLat: 0,
2657
2658
  baseLon: 0,
2658
2659
  baseRev: 0,
2659
- fovDeg: Qe
2660
+ fovDeg: Ze
2660
2661
  },
2661
2662
  perspectiveAbove: {
2662
2663
  kind: "perspective",
2663
2664
  baseLat: -20,
2664
2665
  baseLon: 0,
2665
2666
  baseRev: 0,
2666
- fovDeg: Qe
2667
+ fovDeg: Ze
2667
2668
  },
2668
2669
  perspectiveBelow: {
2669
2670
  kind: "perspective",
2670
2671
  baseLat: 20,
2671
2672
  baseLon: 0,
2672
2673
  baseRev: 0,
2673
- fovDeg: Qe
2674
+ fovDeg: Ze
2674
2675
  },
2675
2676
  perspectiveLeft: {
2676
2677
  kind: "perspective",
2677
2678
  baseLat: 0,
2678
2679
  baseLon: -20,
2679
2680
  baseRev: 0,
2680
- fovDeg: Qe
2681
+ fovDeg: Ze
2681
2682
  },
2682
2683
  perspectiveRight: {
2683
2684
  kind: "perspective",
2684
2685
  baseLat: 0,
2685
2686
  baseLon: 20,
2686
2687
  baseRev: 0,
2687
- fovDeg: Qe
2688
+ fovDeg: Ze
2688
2689
  }
2689
2690
  };
2690
- function et(e, t) {
2691
+ function $e(e, t) {
2691
2692
  let n = Array(9).fill(0);
2692
2693
  for (let r = 0; r < 3; r++) for (let i = 0; i < 3; i++) {
2693
2694
  let a = 0;
@@ -2696,7 +2697,7 @@ function et(e, t) {
2696
2697
  }
2697
2698
  return n;
2698
2699
  }
2699
- function tt(e) {
2700
+ function et(e) {
2700
2701
  let t = e * Math.PI / 180, n = Math.cos(t), r = Math.sin(t);
2701
2702
  return [
2702
2703
  1,
@@ -2710,7 +2711,7 @@ function tt(e) {
2710
2711
  n
2711
2712
  ];
2712
2713
  }
2713
- function nt(e) {
2714
+ function tt(e) {
2714
2715
  let t = e * Math.PI / 180, n = Math.cos(t), r = Math.sin(t);
2715
2716
  return [
2716
2717
  n,
@@ -2724,7 +2725,7 @@ function nt(e) {
2724
2725
  n
2725
2726
  ];
2726
2727
  }
2727
- function rt(e) {
2728
+ function nt(e) {
2728
2729
  let t = e * Math.PI / 180, n = Math.cos(t), r = Math.sin(t);
2729
2730
  return [
2730
2731
  n,
@@ -2738,22 +2739,22 @@ function rt(e) {
2738
2739
  1
2739
2740
  ];
2740
2741
  }
2741
- function it(e, t, n, r) {
2742
+ function rt(e, t, n, r) {
2742
2743
  return [
2743
2744
  e[0] * t + e[1] * n + e[2] * r,
2744
2745
  e[3] * t + e[4] * n + e[5] * r,
2745
2746
  e[6] * t + e[7] * n + e[8] * r
2746
2747
  ];
2747
2748
  }
2748
- function at(e, t) {
2749
+ function it(e, t) {
2749
2750
  let n = t ? t.lat : e.baseLat, r = t ? t.lon : e.baseLon;
2750
- return et(rt(-(t ? t.rev : e.baseRev)), et(tt(-n), nt(-r)));
2751
+ return $e(nt(-(t ? t.rev : e.baseRev)), $e(et(-n), tt(-r)));
2751
2752
  }
2752
- function ot(e) {
2753
- return $e[e] || (e.startsWith("perspective") ? $e.perspectiveFront : $e.orthographicFront);
2753
+ function at(e) {
2754
+ return Qe[e] || (e.startsWith("perspective") ? Qe.perspectiveFront : Qe.orthographicFront);
2754
2755
  }
2755
- function st(e, t, n) {
2756
- let r = ot(e.prst), i = at(r, e.rot);
2756
+ function ot(e, t, n) {
2757
+ let r = at(e.prst), i = it(r, e.rot);
2757
2758
  if (t <= 0 || n <= 0) return {
2758
2759
  corners: [
2759
2760
  {
@@ -2785,11 +2786,11 @@ function st(e, t, n) {
2785
2786
  if (r.kind === "perspective") {
2786
2787
  let t = e.fov ?? r.fovDeg, n = Math.max(1, Math.min(179, t)) * Math.PI / 180, a = l / Math.tan(n / 2);
2787
2788
  u = s.map(([e, t]) => {
2788
- let [n, r, o] = it(i, e, t, 0), s = a - o, c = a / (Math.abs(s) < 1e-6 ? 1e-6 * Math.sign(s || 1) : s);
2789
+ let [n, r, o] = rt(i, e, t, 0), s = a - o, c = a / (Math.abs(s) < 1e-6 ? 1e-6 * Math.sign(s || 1) : s);
2789
2790
  return [n * c, r * c];
2790
2791
  });
2791
2792
  } else u = s.map(([e, t]) => {
2792
- let [n, r] = it(i, e, t, 0);
2793
+ let [n, r] = rt(i, e, t, 0);
2793
2794
  return [n, r];
2794
2795
  });
2795
2796
  u = u.map(([e, t]) => [e * c, t * c]);
@@ -2812,18 +2813,18 @@ function st(e, t, n) {
2812
2813
  isIdentity: _
2813
2814
  };
2814
2815
  }
2815
- function ct(e) {
2816
- let { isIdentity: t } = st(e, 1e3, 1e3);
2816
+ function st(e) {
2817
+ let { isIdentity: t } = ot(e, 1e3, 1e3);
2817
2818
  return !t;
2818
2819
  }
2819
- function lt(e, t, n, r) {
2820
- let i = ot(e.prst), a = at(i, e.rot);
2820
+ function ct(e, t, n, r) {
2821
+ let i = at(e.prst), a = it(i, e.rot);
2821
2822
  if (t <= 0 || n <= 0 || r === 0) return {
2822
2823
  x: 0,
2823
2824
  y: 0
2824
2825
  };
2825
2826
  let o = t / 2, s = n / 2, c = Math.max(o, s), l = e.zoom ?? 1, u = (t) => {
2826
- let [n, r, o] = it(a, 0, 0, t);
2827
+ let [n, r, o] = rt(a, 0, 0, t);
2827
2828
  if (i.kind === "perspective") {
2828
2829
  let t = e.fov ?? i.fovDeg, a = Math.max(1, Math.min(179, t)) * Math.PI / 180, s = c / Math.tan(a / 2), u = s - o, d = s / (Math.abs(u) < 1e-6 ? 1e-6 * Math.sign(u || 1) : u);
2829
2830
  return [n * d * l, r * d * l];
@@ -2837,7 +2838,7 @@ function lt(e, t, n, r) {
2837
2838
  }
2838
2839
  //#endregion
2839
2840
  //#region packages/core/src/shape/scene3d-draw.ts
2840
- function ut(e, t, n, r) {
2841
+ function lt(e, t, n, r) {
2841
2842
  let i = e.x, a = e.y, o = t.x, s = t.y, c = n.x, l = n.y, u = r.x, d = r.y, f = o - c, p = u - c, m = i - o + c - u, h = s - l, g = d - l, _ = a - s + l - d, v, y;
2842
2843
  if (Math.abs(m) < 1e-12 && Math.abs(_) < 1e-12) v = 0, y = 0;
2843
2844
  else {
@@ -2857,15 +2858,15 @@ function ut(e, t, n, r) {
2857
2858
  1
2858
2859
  ];
2859
2860
  }
2860
- function dt(e, t, n) {
2861
+ function ut(e, t, n) {
2861
2862
  let r = e[6] * t + e[7] * n + e[8];
2862
2863
  return {
2863
2864
  x: (e[0] * t + e[1] * n + e[2]) / r,
2864
2865
  y: (e[3] * t + e[4] * n + e[5]) / r
2865
2866
  };
2866
2867
  }
2867
- var ft = 1;
2868
- function pt(e, t) {
2868
+ var dt = 1;
2869
+ function ft(e, t) {
2869
2870
  let [n, r, i, a, o, s] = e, [c, l, u, d, f, p] = t;
2870
2871
  return [
2871
2872
  n * c + i * l,
@@ -2876,13 +2877,13 @@ function pt(e, t) {
2876
2877
  r * f + a * p + s
2877
2878
  ];
2878
2879
  }
2879
- function mt(e, t, n, r, i, a, o, s, c, l, u, d, f) {
2880
+ function pt(e, t, n, r, i, a, o, s, c, l, u, d, f) {
2880
2881
  let p = c - o, m = l - s;
2881
2882
  if (p <= 0 || m <= 0) return;
2882
- let h = (d.x - u.x) / p, g = (d.y - u.y) / p, _ = (f.x - u.x) / m, v = (f.y - u.y) / m, y = (Math.hypot(d.x - u.x, d.y - u.y) || 1) * a, b = (Math.hypot(f.x - u.x, f.y - u.y) || 1) * a, x = ft * p / y, S = ft * m / b, C = Math.max(0, o - x), w = Math.max(0, s - S), T = Math.min(n, c + x), E = Math.min(r, l + S), D = T - C, O = E - w;
2883
+ let h = (d.x - u.x) / p, g = (d.y - u.y) / p, _ = (f.x - u.x) / m, v = (f.y - u.y) / m, y = (Math.hypot(d.x - u.x, d.y - u.y) || 1) * a, b = (Math.hypot(f.x - u.x, f.y - u.y) || 1) * a, x = dt * p / y, S = dt * m / b, C = Math.max(0, o - x), w = Math.max(0, s - S), T = Math.min(n, c + x), E = Math.min(r, l + S), D = T - C, O = E - w;
2883
2884
  if (D <= 0 || O <= 0) return;
2884
2885
  e.save();
2885
- let [k, A, j, M, N, P] = pt(i, [
2886
+ let [k, A, j, M, N, P] = ft(i, [
2886
2887
  h,
2887
2888
  g,
2888
2889
  _,
@@ -2892,22 +2893,22 @@ function mt(e, t, n, r, i, a, o, s, c, l, u, d, f) {
2892
2893
  ]);
2893
2894
  e.setTransform(k, A, j, M, N, P), e.drawImage(t, C, w, D, O, C, w, D, O), e.restore();
2894
2895
  }
2895
- function ht(e, t, n, r, i, a, o, s, c, l, u, d, f) {
2896
- let p = dt(o, s, c), m = dt(o, l, c), h = dt(o, s, u), g = dt(o, l, u), _ = (s + l) / 2, v = (c + u) / 2, y = dt(o, _, v), b = {
2896
+ function mt(e, t, n, r, i, a, o, s, c, l, u, d, f) {
2897
+ let p = ut(o, s, c), m = ut(o, l, c), h = ut(o, s, u), g = ut(o, l, u), _ = (s + l) / 2, v = (c + u) / 2, y = ut(o, _, v), b = {
2897
2898
  x: (p.x + m.x + h.x + g.x) / 4,
2898
2899
  y: (p.y + m.y + h.y + g.y) / 4
2899
- }, x = _t(i), S = Math.hypot(y.x - b.x, y.y - b.y) * x;
2900
+ }, x = gt(i), S = Math.hypot(y.x - b.x, y.y - b.y) * x;
2900
2901
  if (f <= 0 || S <= d) {
2901
- mt(e, t, n, r, i, a, s * n, c * r, l * n, u * r, p, m, h);
2902
+ pt(e, t, n, r, i, a, s * n, c * r, l * n, u * r, p, m, h);
2902
2903
  return;
2903
2904
  }
2904
- l - s >= u - c ? (ht(e, t, n, r, i, a, o, s, c, _, u, d, f - 1), ht(e, t, n, r, i, a, o, _, c, l, u, d, f - 1)) : (ht(e, t, n, r, i, a, o, s, c, l, v, d, f - 1), ht(e, t, n, r, i, a, o, s, v, l, u, d, f - 1));
2905
+ l - s >= u - c ? (mt(e, t, n, r, i, a, o, s, c, _, u, d, f - 1), mt(e, t, n, r, i, a, o, _, c, l, u, d, f - 1)) : (mt(e, t, n, r, i, a, o, s, c, l, v, d, f - 1), mt(e, t, n, r, i, a, o, s, v, l, u, d, f - 1));
2905
2906
  }
2906
- function gt(e, t, n, r, i, a = .5) {
2907
+ function ht(e, t, n, r, i, a = .5) {
2907
2908
  if (n <= 0 || r <= 0) return;
2908
2909
  let [o, s, c, l] = i;
2909
2910
  if (Math.abs(o.x * s.y - s.x * o.y + s.x * c.y - c.x * s.y + c.x * l.y - l.x * c.y + l.x * o.y - o.x * l.y) / 2 < 1e-6) return;
2910
- let u = ut(i[0], i[1], i[2], i[3]);
2911
+ let u = lt(i[0], i[1], i[2], i[3]);
2911
2912
  if (!u) return;
2912
2913
  let d = t.getTransform(), f = [
2913
2914
  d.a,
@@ -2916,14 +2917,14 @@ function gt(e, t, n, r, i, a = .5) {
2916
2917
  d.d,
2917
2918
  d.e,
2918
2919
  d.f
2919
- ], p = _t(f);
2920
- Ct(e, t, n, r, i, f, p, u, a, 14) || (xt(), t.save(), t.beginPath(), t.moveTo(i[0].x, i[0].y), t.lineTo(i[1].x, i[1].y), t.lineTo(i[2].x, i[2].y), t.lineTo(i[3].x, i[3].y), t.closePath(), t.clip(), ht(t, e, n, r, f, p, u, 0, 0, 1, 1, a, 14), t.restore());
2920
+ ], p = gt(f);
2921
+ St(e, t, n, r, i, f, p, u, a, 14) || (bt(), t.save(), t.beginPath(), t.moveTo(i[0].x, i[0].y), t.lineTo(i[1].x, i[1].y), t.lineTo(i[2].x, i[2].y), t.lineTo(i[3].x, i[3].y), t.closePath(), t.clip(), mt(t, e, n, r, f, p, u, 0, 0, 1, 1, a, 14), t.restore());
2921
2922
  }
2922
- function _t(e) {
2923
+ function gt(e) {
2923
2924
  return Math.sqrt(Math.abs(e[0] * e[3] - e[1] * e[2])) || 1;
2924
2925
  }
2925
- function vt(e, t, n) {
2926
- let r = ut(e[0], e[1], e[2], e[3]);
2926
+ function _t(e, t, n) {
2927
+ let r = lt(e[0], e[1], e[2], e[3]);
2927
2928
  if (!r) return null;
2928
2929
  let i = [
2929
2930
  [-t, -n],
@@ -2933,20 +2934,20 @@ function vt(e, t, n) {
2933
2934
  ], a = [];
2934
2935
  for (let [e, t] of i) {
2935
2936
  if (!(r[6] * e + r[7] * t + r[8] > 1e-9)) return null;
2936
- a.push(dt(r, e, t));
2937
+ a.push(ut(r, e, t));
2937
2938
  }
2938
2939
  return a;
2939
2940
  }
2940
- function yt(e, t, n) {
2941
- let r = ut(e[0], e[1], e[2], e[3]);
2942
- return r && r[6] * t + r[7] * n + r[8] > 1e-9 ? dt(r, t, n) : null;
2941
+ function vt(e, t, n) {
2942
+ let r = lt(e[0], e[1], e[2], e[3]);
2943
+ return r && r[6] * t + r[7] * n + r[8] > 1e-9 ? ut(r, t, n) : null;
2943
2944
  }
2944
- var bt = !1;
2945
- function xt() {
2946
- bt || (bt = !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."));
2945
+ var yt = !1;
2946
+ function bt() {
2947
+ yt || (yt = !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."));
2947
2948
  }
2948
- var St = 2;
2949
- function Ct(e, t, n, r, i, a, o, s, c, l) {
2949
+ var xt = 2;
2950
+ function St(e, t, n, r, i, a, o, s, c, l) {
2950
2951
  let u = i.map((e) => ({
2951
2952
  x: a[0] * e.x + a[2] * e.y + a[4],
2952
2953
  y: a[1] * e.x + a[3] * e.y + a[5]
@@ -2955,11 +2956,11 @@ function Ct(e, t, n, r, i, a, o, s, c, l) {
2955
2956
  d = Math.floor(d) - 1, f = Math.floor(f) - 1, p = Math.ceil(p) + 1, m = Math.ceil(m) + 1;
2956
2957
  let h = p - d, g = m - f;
2957
2958
  if (h <= 0 || g <= 0) return !1;
2958
- let _ = Math.max(1, Math.ceil(h * St)), v = Math.max(1, Math.ceil(g * St)), y = F(_, v);
2959
+ let _ = Math.max(1, Math.ceil(h * xt)), v = Math.max(1, Math.ceil(g * xt)), y = O(_, v);
2959
2960
  if (!y || y.width !== _ || y.height !== v) return !1;
2960
2961
  let b = y.getContext("2d") ?? null;
2961
2962
  if (!b) return !1;
2962
- let x = St, S = [
2963
+ let x = xt, S = [
2963
2964
  a[0] * x,
2964
2965
  a[1] * x,
2965
2966
  a[2] * x,
@@ -2967,18 +2968,18 @@ function Ct(e, t, n, r, i, a, o, s, c, l) {
2967
2968
  (a[4] - d) * x,
2968
2969
  (a[5] - f) * x
2969
2970
  ];
2970
- b.save(), b.setTransform(S[0], S[1], S[2], S[3], S[4], S[5]), b.beginPath(), b.moveTo(i[0].x, i[0].y), b.lineTo(i[1].x, i[1].y), b.lineTo(i[2].x, i[2].y), b.lineTo(i[3].x, i[3].y), b.closePath(), b.clip(), ht(b, e, n, r, S, o, s, 0, 0, 1, 1, c * x, l), b.restore(), t.save(), t.setTransform(1, 0, 0, 1, 0, 0);
2971
+ b.save(), b.setTransform(S[0], S[1], S[2], S[3], S[4], S[5]), b.beginPath(), b.moveTo(i[0].x, i[0].y), b.lineTo(i[1].x, i[1].y), b.lineTo(i[2].x, i[2].y), b.lineTo(i[3].x, i[3].y), b.closePath(), b.clip(), mt(b, e, n, r, S, o, s, 0, 0, 1, 1, c * x, l), b.restore(), t.save(), t.setTransform(1, 0, 0, 1, 0, 0);
2971
2972
  let C = t.imageSmoothingEnabled, w = t.imageSmoothingQuality;
2972
2973
  return t.imageSmoothingEnabled = !0, t.imageSmoothingQuality = "high", t.drawImage(y, 0, 0, h * x, g * x, d, f, h, g), t.imageSmoothingEnabled = C, t.imageSmoothingQuality = w, t.restore(), !0;
2973
2974
  }
2974
2975
  //#endregion
2975
2976
  //#region packages/core/src/shape/bevel-shading.ts
2976
- function wt(e, t) {
2977
+ function Ct(e, t) {
2977
2978
  if (t <= 0) return () => 1;
2978
2979
  let n = (e) => Math.max(0, Math.min(1, e / t));
2979
2980
  switch (e) {
2980
2981
  case "hardEdge": {
2981
- let e = Mt;
2982
+ let e = jt;
2982
2983
  return (t) => {
2983
2984
  let r = Math.min(1, n(t) / e);
2984
2985
  return r * r * (3 - 2 * r);
@@ -2998,7 +2999,7 @@ function wt(e, t) {
2998
2999
  };
2999
3000
  }
3000
3001
  }
3001
- function Tt(e) {
3002
+ function wt(e) {
3002
3003
  let t = e.length, n = new Float64Array(t);
3003
3004
  if (t === 0) return n;
3004
3005
  let r = new Int32Array(t), i = new Float64Array(t + 1), a = 0;
@@ -3016,7 +3017,7 @@ function Tt(e) {
3016
3017
  }
3017
3018
  return n;
3018
3019
  }
3019
- function Et(e, t = 3) {
3020
+ function Tt(e, t = 3) {
3020
3021
  if (e <= 0) return Array(t).fill(1);
3021
3022
  let n = Math.sqrt(12 * e * e / t + 1), r = Math.floor(n);
3022
3023
  r % 2 == 0 && r--;
@@ -3024,7 +3025,7 @@ function Et(e, t = 3) {
3024
3025
  for (let e = 0; e < t; e++) s.push(e < o ? r : i);
3025
3026
  return s;
3026
3027
  }
3027
- function Dt(e, t, n, r, i, a) {
3028
+ function Et(e, t, n, r, i, a) {
3028
3029
  let o = 1 / (2 * i + 1);
3029
3030
  if (a) for (let a = 0; a < r; a++) {
3030
3031
  let r = a * n, s = 0;
@@ -3045,29 +3046,29 @@ function Dt(e, t, n, r, i, a) {
3045
3046
  }
3046
3047
  }
3047
3048
  }
3048
- function Ot(e, t, n, r) {
3049
+ function Dt(e, t, n, r) {
3049
3050
  let i = Float64Array.from(e);
3050
3051
  if (r <= 0 || t <= 0 || n <= 0) return i;
3051
3052
  let a = new Float64Array(t * n);
3052
- for (let e of Et(r, 3)) {
3053
+ for (let e of Tt(r, 3)) {
3053
3054
  let r = Math.max(1, (e - 1) / 2);
3054
- Dt(i, a, t, n, r, !0), Dt(a, i, t, n, r, !1);
3055
+ Et(i, a, t, n, r, !0), Et(a, i, t, n, r, !1);
3055
3056
  }
3056
3057
  return i;
3057
3058
  }
3058
- function kt(e, t, n, r = 128) {
3059
+ function Ot(e, t, n, r = 128) {
3059
3060
  let i = new Float64Array(t * n);
3060
3061
  for (let a = 0; a < t * n; a++) i[a] = (e[a] ?? 0) >= r ? 0x56bc75e2d63100000 : 0;
3061
3062
  let a = new Float64Array(n);
3062
3063
  for (let e = 0; e < t; e++) {
3063
3064
  for (let r = 0; r < n; r++) a[r] = i[r * t + e];
3064
- let r = Tt(a);
3065
+ let r = wt(a);
3065
3066
  for (let a = 0; a < n; a++) i[a * t + e] = r[a];
3066
3067
  }
3067
3068
  let o = new Float64Array(t);
3068
3069
  for (let e = 0; e < n; e++) {
3069
3070
  for (let n = 0; n < t; n++) o[n] = i[e * t + n];
3070
- let n = Tt(o);
3071
+ let n = wt(o);
3071
3072
  for (let r = 0; r < t; r++) i[e * t + r] = n[r];
3072
3073
  }
3073
3074
  for (let e = 0; e < n; e++) for (let r = 0; r < t; r++) {
@@ -3079,15 +3080,15 @@ function kt(e, t, n, r = 128) {
3079
3080
  for (let e = 0; e < t * n; e++) i[e] = Math.sqrt(i[e]);
3080
3081
  return i;
3081
3082
  }
3082
- var At = .25, jt = .35, Mt = .5;
3083
- function Nt(e, t, n, r, i, a) {
3083
+ var kt = .25, At = .35, jt = .5;
3084
+ function Mt(e, t, n, r, i, a) {
3084
3085
  let o = new Float32Array(t * n * 3), s = new Uint8Array(t * n), c = new Float32Array(t * n);
3085
3086
  if (t <= 0 || n <= 0) return {
3086
3087
  normals: o,
3087
3088
  bandMask: s,
3088
3089
  bandWeight: c
3089
3090
  };
3090
- let l = kt(e, t, n), u = wt(i, r), d = (n, r) => (e[r * t + n] ?? 0) >= 128, f = (r > 0 ? a / r : 0) * r, p = Ot(l, t, n, Math.max(1, r * At)), m = (e) => {
3091
+ let l = Ot(e, t, n), u = Ct(i, r), d = (n, r) => (e[r * t + n] ?? 0) >= 128, f = (r > 0 ? a / r : 0) * r, p = Dt(l, t, n, Math.max(1, r * kt)), m = (e) => {
3091
3092
  let t = u(Math.max(0, e - .5));
3092
3093
  return u(e + .5) - t;
3093
3094
  };
@@ -3102,9 +3103,9 @@ function Nt(e, t, n, r, i, a) {
3102
3103
  o[a * 3 + 2] = 1;
3103
3104
  continue;
3104
3105
  }
3105
- let g = u / r, _ = 1 - jt, v = 1;
3106
+ let g = u / r, _ = 1 - At, v = 1;
3106
3107
  if (g > _) {
3107
- let e = Math.min(1, (g - _) / jt);
3108
+ let e = Math.min(1, (g - _) / At);
3108
3109
  v = 1 - e * e * (3 - 2 * e);
3109
3110
  }
3110
3111
  c[a] = v;
@@ -3119,7 +3120,7 @@ function Nt(e, t, n, r, i, a) {
3119
3120
  bandWeight: c
3120
3121
  };
3121
3122
  }
3122
- var Pt = 35 * Math.PI / 180, Ft = 12 * Math.PI / 180, It = {
3123
+ var Nt = 35 * Math.PI / 180, Pt = 12 * Math.PI / 180, Ft = {
3123
3124
  t: {
3124
3125
  x: 0,
3125
3126
  y: -1
@@ -3153,22 +3154,22 @@ var Pt = 35 * Math.PI / 180, Ft = 12 * Math.PI / 180, It = {
3153
3154
  y: 1
3154
3155
  }
3155
3156
  };
3156
- function Lt(e, t, n) {
3157
+ function It(e, t, n) {
3157
3158
  let r = n * Math.PI / 180, i = Math.cos(r), a = Math.sin(r);
3158
3159
  return {
3159
3160
  x: e * i - t * a,
3160
3161
  y: e * a + t * i
3161
3162
  };
3162
3163
  }
3163
- function Rt(e, t, n) {
3164
- let r = It[t] ?? It.t;
3165
- return n && n.rev && (r = Lt(r.x, r.y, n.rev)), Bt(r.x, r.y, Pt);
3164
+ function Lt(e, t, n) {
3165
+ let r = Ft[t] ?? Ft.t;
3166
+ return n && n.rev && (r = It(r.x, r.y, n.rev)), zt(r.x, r.y, Nt);
3166
3167
  }
3167
- function zt(e) {
3168
+ function Rt(e) {
3168
3169
  let t = Math.hypot(e.x, e.y) || 1;
3169
- return Bt(-e.x / t, -e.y / t, Ft);
3170
+ return zt(-e.x / t, -e.y / t, Pt);
3170
3171
  }
3171
- function Bt(e, t, n) {
3172
+ function zt(e, t, n) {
3172
3173
  let r = Math.hypot(e, t) || 1, i = Math.cos(n), a = Math.sin(n), o = e / r * i, s = t / r * i, c = a, l = Math.hypot(o, s, c) || 1;
3173
3174
  return {
3174
3175
  x: o / l,
@@ -3176,7 +3177,7 @@ function Bt(e, t, n) {
3176
3177
  z: c / l
3177
3178
  };
3178
3179
  }
3179
- var Vt = 2, Ht = {
3180
+ var Bt = 2, Vt = {
3180
3181
  matte: {
3181
3182
  ambient: .62,
3182
3183
  diffuse: .45,
@@ -3189,8 +3190,8 @@ var Vt = 2, Ht = {
3189
3190
  specular: .35,
3190
3191
  shininess: 22
3191
3192
  }
3192
- }, Ut = .8;
3193
- function Wt(e) {
3193
+ }, Ht = .8;
3194
+ function Ut(e) {
3194
3195
  switch (e) {
3195
3196
  case "plastic":
3196
3197
  case "metal":
@@ -3201,8 +3202,8 @@ function Wt(e) {
3201
3202
  default: return "matte";
3202
3203
  }
3203
3204
  }
3204
- function Gt(e, t, n = !0) {
3205
- let r = Ht[e], i = {
3205
+ function Wt(e, t, n = !0) {
3206
+ let r = Vt[e], i = {
3206
3207
  light: t,
3207
3208
  material: e,
3208
3209
  ambient: r.ambient,
@@ -3210,9 +3211,9 @@ function Gt(e, t, n = !0) {
3210
3211
  specular: r.specular,
3211
3212
  shininess: r.shininess
3212
3213
  };
3213
- return n && (i.fillLight = zt(t), i.fillDiffuse = i.diffuse * Ut), i;
3214
+ return n && (i.fillLight = Rt(t), i.fillDiffuse = i.diffuse * Ht), i;
3214
3215
  }
3215
- function Kt(e, t) {
3216
+ function Gt(e, t) {
3216
3217
  let n = e.x * t.light.x + e.y * t.light.y + e.z * t.light.z, r = t.diffuse * Math.max(0, n), i = 0;
3217
3218
  if (t.fillLight && t.fillDiffuse) {
3218
3219
  let n = e.x * t.fillLight.x + e.y * t.fillLight.y + e.z * t.fillLight.z;
@@ -3225,7 +3226,7 @@ function Kt(e, t) {
3225
3226
  }
3226
3227
  return Math.max(0, t.ambient + r + i + a);
3227
3228
  }
3228
- function qt(e, t, n) {
3229
+ function Kt(e, t, n) {
3229
3230
  if (!e) return {
3230
3231
  x: 0,
3231
3232
  y: 0,
@@ -3240,16 +3241,16 @@ function qt(e, t, n) {
3240
3241
  h: Math.max(0, o - i)
3241
3242
  };
3242
3243
  }
3243
- function Jt(e, t, n) {
3244
+ function qt(e, t, n) {
3244
3245
  let r = e.canvas.width, i = e.canvas.height;
3245
3246
  if (r <= 0 || i <= 0) return;
3246
3247
  let a = t.widthPx;
3247
3248
  if (a < .75) return;
3248
- let { x: o, y: s, w: c, h: l } = qt(n, r, i);
3249
+ let { x: o, y: s, w: c, h: l } = Kt(n, r, i);
3249
3250
  if (c <= 0 || l <= 0) return;
3250
3251
  let u = e.getImageData(o, s, c, l), d = u.data, f = new Uint8ClampedArray(c * l);
3251
3252
  for (let e = 0; e < c * l; e++) f[e] = d[e * 4 + 3];
3252
- let { bandMask: p, bandWeight: m, normals: h } = Nt(f, c, l, a, t.prst, t.heightPx), g = Gt(t.material, t.light), _ = Kt({
3253
+ let { bandMask: p, bandWeight: m, normals: h } = Mt(f, c, l, a, t.prst, t.heightPx), g = Wt(t.material, t.light), _ = Gt({
3253
3254
  x: 0,
3254
3255
  y: 0,
3255
3256
  z: 1
@@ -3260,13 +3261,13 @@ function Jt(e, t, n) {
3260
3261
  if (n <= 0) continue;
3261
3262
  let r = h[e * 3], i = h[e * 3 + 1], a = h[e * 3 + 2];
3262
3263
  t.bottom && (r = -r, i = -i);
3263
- let o = 1 + (Kt({
3264
+ let o = 1 + (Gt({
3264
3265
  x: r,
3265
3266
  y: i,
3266
3267
  z: a
3267
3268
  }, g) / _ - 1) * n, s = e * 4;
3268
3269
  if (o >= 1) {
3269
- let e = Math.min(1, (o - 1) * Vt);
3270
+ let e = Math.min(1, (o - 1) * Bt);
3270
3271
  for (let t = 0; t < 3; t++) {
3271
3272
  let n = Math.min(255, d[s + t] * o);
3272
3273
  d[s + t] = n + (255 - n) * e;
@@ -3275,12 +3276,12 @@ function Jt(e, t, n) {
3275
3276
  }
3276
3277
  e.putImageData(u, o, s);
3277
3278
  }
3278
- function Yt(e, t, n) {
3279
+ function Jt(e, t, n) {
3279
3280
  let r = e.canvas.width, i = e.canvas.height;
3280
3281
  if (r <= 0 || i <= 0) return;
3281
3282
  let a = t.offsetX, o = t.offsetY, s = Math.hypot(a, o);
3282
3283
  if (s < .75) return;
3283
- let { x: c, y: l, w: u, h: d } = qt(n, r, i);
3284
+ let { x: c, y: l, w: u, h: d } = Kt(n, r, i);
3284
3285
  if (u <= 0 || d <= 0) return;
3285
3286
  let f = e.getImageData(c, l, u, d), p = f.data, m = new Uint8ClampedArray(u * d);
3286
3287
  for (let e = 0; e < u * d; e++) m[e] = p[e * 4 + 3];
@@ -3304,8 +3305,8 @@ function Yt(e, t, n) {
3304
3305
  }
3305
3306
  //#endregion
3306
3307
  //#region packages/core/src/text/underline.ts
3307
- function Xt(e, t, n, r, i, a, o, s = 1) {
3308
- let c = Math.max(1, i * .05), l = o === "heavy" || (o?.endsWith("Heavy") ?? !1) ? c * 1.8 : c, u = n + Math.max(2, l), d = J(u, l, s);
3308
+ function Yt(e, t, n, r, i, a, o, s = 1) {
3309
+ let c = Math.max(1, i * .05), l = o === "heavy" || (o?.endsWith("Heavy") ?? !1) ? c * 1.8 : c, u = n + Math.max(2, l), d = K(u, l, s);
3309
3310
  if (e.strokeStyle = a, e.lineWidth = l, e.setLineDash([]), o && o.startsWith("wavy")) {
3310
3311
  let n = l, i = l * 6;
3311
3312
  e.beginPath(), e.moveTo(t, u);
@@ -3326,14 +3327,14 @@ function Xt(e, t, n, r, i, a, o, s = 1) {
3326
3327
  }
3327
3328
  if (o === "dbl") {
3328
3329
  let n = l * 1.4, i = u - n / 2, a = u + n / 2;
3329
- e.beginPath(), e.moveTo(t, i + J(i, l, s)), e.lineTo(t + r, i + J(i, l, s)), e.moveTo(t, a + J(a, l, s)), e.lineTo(t + r, a + J(a, l, s)), e.stroke();
3330
+ e.beginPath(), e.moveTo(t, i + K(i, l, s)), e.lineTo(t + r, i + K(i, l, s)), e.moveTo(t, a + K(a, l, s)), e.lineTo(t + r, a + K(a, l, s)), e.stroke();
3330
3331
  return;
3331
3332
  }
3332
- e.setLineDash(_(o ?? "sng", l)), e.beginPath(), e.moveTo(t, u + d), e.lineTo(t + r, u + d), e.stroke(), e.setLineDash([]);
3333
+ e.setLineDash(Ce(o ?? "sng", l)), e.beginPath(), e.moveTo(t, u + d), e.lineTo(t + r, u + d), e.stroke(), e.setLineDash([]);
3333
3334
  }
3334
3335
  //#endregion
3335
3336
  //#region packages/core/src/text/highlight-box.ts
3336
- function Zt(e, t) {
3337
+ function Xt(e, t) {
3337
3338
  return {
3338
3339
  top: e - t * .85,
3339
3340
  height: t * 1.1
@@ -3341,7 +3342,7 @@ function Zt(e, t) {
3341
3342
  }
3342
3343
  //#endregion
3343
3344
  //#region packages/core/src/text/justify-positions.ts
3344
- function Qt(e, t, n, r, i = 0) {
3345
+ function Zt(e, t, n, r, i = 0) {
3345
3346
  let a = [], o = 0, s = 0;
3346
3347
  for (let c of t) a.push({
3347
3348
  text: e.slice(o, c).join(""),
@@ -3354,14 +3355,14 @@ function Qt(e, t, n, r, i = 0) {
3354
3355
  }
3355
3356
  //#endregion
3356
3357
  //#region packages/pptx/src/reflection-blur.ts
3357
- var $t = .5;
3358
- function en(e, t) {
3358
+ var Qt = .5;
3359
+ function $t(e, t) {
3359
3360
  if (!(t > 0) || !(e.h > 0)) return [{
3360
3361
  y: e.y,
3361
3362
  h: Math.max(0, e.h),
3362
3363
  radius: 0
3363
3364
  }];
3364
- let n = Math.max(4, Math.min(24, Math.ceil(t / $t) + 1)), r = e.y + e.h, i = [];
3365
+ let n = Math.max(4, Math.min(24, Math.ceil(t / Qt) + 1)), r = e.y + e.h, i = [];
3365
3366
  for (let a = 0; a < n; a++) {
3366
3367
  let o = Math.sqrt(a / (n - 1)), s = a === 0 ? 0 : Math.sqrt((a - 1) / (n - 1)), c = a === n - 1 ? 1 : Math.sqrt((a + 1) / (n - 1)), l = a === 0 ? 0 : (s + o) / 2, u = a === n - 1 ? 1 : (o + c) / 2, d = r - u * e.h;
3367
3368
  i.push({
@@ -3372,12 +3373,12 @@ function en(e, t) {
3372
3373
  }
3373
3374
  return i;
3374
3375
  }
3375
- function tn(e, t, n, r, i) {
3376
- for (let a of en(n, r)) e.save(), e.beginPath(), e.rect(0, a.y, i, a.h), e.clip(), e.filter = a.radius > 0 ? `blur(${a.radius}px)` : "none", e.drawImage(t, 0, 0), e.restore();
3376
+ function en(e, t, n, r, i) {
3377
+ for (let a of $t(n, r)) e.save(), e.beginPath(), e.rect(0, a.y, i, a.h), e.clip(), e.filter = a.radius > 0 ? `blur(${a.radius}px)` : "none", e.drawImage(t, 0, 0), e.restore();
3377
3378
  }
3378
3379
  //#endregion
3379
3380
  //#region packages/pptx/src/hyperlink.ts
3380
- function nn(e, t) {
3381
+ function tn(e, t) {
3381
3382
  let n = e !== void 0 && e !== "" ? e : void 0, r = t !== void 0 && t !== "" ? t : void 0;
3382
3383
  if (n === void 0 && r === void 0) return;
3383
3384
  if (r !== void 0) return {
@@ -3385,7 +3386,7 @@ function nn(e, t) {
3385
3386
  ref: n ?? r
3386
3387
  };
3387
3388
  let i = n, a = H(i);
3388
- return a !== null && ae.includes(a) ? {
3389
+ return a !== null && re.includes(a) ? {
3389
3390
  kind: "external",
3390
3391
  url: i
3391
3392
  } : {
@@ -3395,7 +3396,7 @@ function nn(e, t) {
3395
3396
  }
3396
3397
  //#endregion
3397
3398
  //#region packages/pptx/src/media-chrome.ts
3398
- function rn(e, t, n, r, i, a) {
3399
+ function nn(e, t, n, r, i, a) {
3399
3400
  let o = Math.max(18, Math.min(32, Math.min(r, i) * .25));
3400
3401
  if (e.save(), e.shadowColor = "rgba(0, 0, 0, 0.3)", e.shadowBlur = o * .35, e.fillStyle = "rgba(20, 20, 20, 0.7)", e.beginPath(), e.arc(t, n, o, 0, Math.PI * 2), e.fill(), e.shadowColor = "transparent", e.shadowBlur = 0, e.fillStyle = "#fff", a === "paused") {
3401
3402
  e.beginPath();
@@ -3409,34 +3410,34 @@ function rn(e, t, n, r, i, a) {
3409
3410
  }
3410
3411
  //#endregion
3411
3412
  //#region packages/pptx/src/bidi-line.ts
3412
- var an = (e) => {
3413
+ var rn = (e) => {
3413
3414
  let t = e.text;
3414
3415
  return typeof t == "string" ? t : void 0;
3415
- }, on = (e) => "isTab" in e;
3416
- function sn(e) {
3416
+ }, an = (e) => "isTab" in e;
3417
+ function on(e) {
3417
3418
  for (let t of e) {
3418
- let e = an(t);
3419
- if (e !== void 0 && ee(e)) return !0;
3419
+ let e = rn(t);
3420
+ if (e !== void 0 && U(e)) return !0;
3420
3421
  }
3421
3422
  return !1;
3422
3423
  }
3423
- function cn(t, n) {
3424
- let r = t.length;
3424
+ function sn(e, n) {
3425
+ let r = e.length;
3425
3426
  if (r === 0) return {
3426
3427
  order: [],
3427
3428
  rtl: []
3428
3429
  };
3429
3430
  let i = "", a = Array(r), o;
3430
- for (let e = 0; e < r; e++) {
3431
- a[e] = i.length;
3432
- let n = an(t[e]) ?? "";
3433
- if (i += n.length > 0 ? n : "", on(t[e])) {
3431
+ for (let t = 0; t < r; t++) {
3432
+ a[t] = i.length;
3433
+ let n = rn(e[t]) ?? "";
3434
+ if (i += n.length > 0 ? n : "", an(e[t])) {
3434
3435
  for (o ??= []; o.length < i.length;) o.push(null);
3435
- o[a[e]] = "S";
3436
+ o[a[t]] = "S";
3436
3437
  }
3437
3438
  }
3438
3439
  if (o) for (; o.length < i.length;) o.push(null);
3439
- let { levels: s, paragraphLevel: c } = f().computeLevels(i, n ? "rtl" : "ltr", o), { order: l, segLevels: u } = e(s, c, a), d = Array(r);
3440
+ let { levels: s, paragraphLevel: c } = p().computeLevels(i, n ? "rtl" : "ltr", o), { order: l, segLevels: u } = t(s, c, a), d = Array(r);
3440
3441
  for (let e = 0; e < r; e++) d[e] = (u[e] & 1) == 1;
3441
3442
  return {
3442
3443
  order: l,
@@ -3445,11 +3446,11 @@ function cn(t, n) {
3445
3446
  }
3446
3447
  //#endregion
3447
3448
  //#region packages/pptx/src/cjk-wrap.ts
3448
- function ln(e, t, n, r, a = 0, o = !1) {
3449
+ function cn(e, t, n, r, i = 0, o = !1) {
3449
3450
  if (e.length === 0) return 0;
3450
3451
  let s = t === 0, c = 0, l = t;
3451
3452
  for (let t of e) {
3452
- let e = c > 0 || o ? a : 0;
3453
+ let e = c > 0 || o ? i : 0;
3453
3454
  if (l + e + t.w > n) {
3454
3455
  if (c > 0 || !s) break;
3455
3456
  l += e + t.w, c++;
@@ -3457,20 +3458,20 @@ function ln(e, t, n, r, a = 0, o = !1) {
3457
3458
  }
3458
3459
  l += e + t.w, c++;
3459
3460
  }
3460
- return c === 0 ? 0 : c >= e.length ? e.length : i(e.map((e) => e.ch), c, r, +!!s);
3461
+ return c === 0 ? 0 : c >= e.length ? e.length : a(e.map((e) => e.ch), c, r, +!!s);
3461
3462
  }
3462
3463
  //#endregion
3463
3464
  //#region packages/pptx/src/text-justify.ts
3464
- var un = (e) => /\s/.test(String.fromCodePoint(e));
3465
- function dn(e, t, n, r, i) {
3465
+ var ln = (e) => /\s/.test(String.fromCodePoint(e));
3466
+ function un(e, t, n, r, i) {
3466
3467
  if (r === "just" && i) return null;
3467
3468
  let a = t - n;
3468
3469
  if (a <= .5) return null;
3469
- let o = Ce(e, a, {
3470
+ let o = xe(e, a, {
3470
3471
  firstContentSi: 0,
3471
3472
  lastDrawnSi: e.length,
3472
- isGapChar: de,
3473
- isWhitespace: un,
3473
+ isGapChar: le,
3474
+ isWhitespace: ln,
3474
3475
  seaClusterGaps: r === "thaiDist"
3475
3476
  });
3476
3477
  if (!o) return null;
@@ -3491,7 +3492,7 @@ function dn(e, t, n, r, i) {
3491
3492
  }
3492
3493
  //#endregion
3493
3494
  //#region packages/pptx/src/table-border-conflict.ts
3494
- function fn(e) {
3495
+ function dn(e) {
3495
3496
  if (!e) return {
3496
3497
  r: 0,
3497
3498
  g: 0,
@@ -3508,37 +3509,37 @@ function fn(e) {
3508
3509
  b: parseInt(t.slice(4, 6), 16)
3509
3510
  };
3510
3511
  }
3511
- function pn(e) {
3512
- let t = fn(e);
3512
+ function fn(e) {
3513
+ let t = dn(e);
3513
3514
  return .299 * t.r + .587 * t.g + .114 * t.b;
3514
3515
  }
3515
- function mn(e, t) {
3516
+ function pn(e, t) {
3516
3517
  if (!e && !t) return null;
3517
3518
  if (!e) return t;
3518
3519
  if (!t) return e;
3519
3520
  if (e.width !== t.width) return e.width > t.width ? e : t;
3520
- let n = pn(e.color), r = pn(t.color);
3521
+ let n = fn(e.color), r = fn(t.color);
3521
3522
  return n === r || n < r ? e : t;
3522
3523
  }
3523
3524
  //#endregion
3524
3525
  //#region packages/pptx/src/smartart-fallback-contrast.ts
3525
- function hn(e) {
3526
- let t = k(e.length === 8 ? e.slice(0, 6) : e);
3526
+ function mn(e) {
3527
+ let t = M(e.length === 8 ? e.slice(0, 6) : e);
3527
3528
  if (!t) return null;
3528
- let n = fe(t[0], t[1], t[2]);
3529
+ let n = ue(t[0], t[1], t[2]);
3529
3530
  if (e.length !== 8) return n;
3530
3531
  let r = Number.parseInt(e.slice(6, 8), 16);
3531
3532
  if (Number.isNaN(r)) return null;
3532
3533
  let i = r / 255;
3533
3534
  return i * n + (1 - i);
3534
3535
  }
3535
- function gn(e) {
3536
+ function hn(e) {
3536
3537
  if (!e) return null;
3537
- if (e.fillType === "solid") return hn(e.color);
3538
+ if (e.fillType === "solid") return mn(e.color);
3538
3539
  if (e.fillType === "gradient") {
3539
3540
  let t = e.stops.map((e) => ({
3540
3541
  p: Math.min(1, Math.max(0, e.position)),
3541
- l: hn(e.color)
3542
+ l: mn(e.color)
3542
3543
  })).filter((e) => e.l !== null).sort((e, t) => e.p - t.p);
3543
3544
  if (t.length === 0) return null;
3544
3545
  let n = t[0], r = t[t.length - 1], i = n.l * n.p + r.l * (1 - r.p);
@@ -3547,18 +3548,18 @@ function gn(e) {
3547
3548
  }
3548
3549
  return null;
3549
3550
  }
3550
- function _n(e) {
3551
+ function gn(e) {
3551
3552
  return e.name === "SmartArt" && e.id === void 0;
3552
3553
  }
3553
- function vn(e, t) {
3554
- let n = gn(e);
3554
+ function _n(e, t) {
3555
+ let n = hn(e);
3555
3556
  if (n === null || n >= .5) return null;
3556
- let r = hn(t.replace(/^#/, ""));
3557
+ let r = mn(t.replace(/^#/, ""));
3557
3558
  return r !== null && r >= .5 ? null : "#FFFFFF";
3558
3559
  }
3559
3560
  //#endregion
3560
3561
  //#region packages/pptx/src/tab-layout.ts
3561
- function yn(e, t, n, r, i, a = 0) {
3562
+ function vn(e, t, n, r, i, a = 0) {
3562
3563
  let o = e.map((e) => e.width), s = (t) => {
3563
3564
  let n = 0;
3564
3565
  for (let r = t; r < e.length && !e[r].isTab; r++) n += o[r];
@@ -3586,8 +3587,8 @@ function yn(e, t, n, r, i, a = 0) {
3586
3587
  }
3587
3588
  //#endregion
3588
3589
  //#region packages/pptx/src/vertical-text.ts
3589
- var bn = () => !1;
3590
- function xn(e, t, n) {
3590
+ var yn = () => !1;
3591
+ function bn(e, t, n) {
3591
3592
  let r = e.textBaseline;
3592
3593
  e.textBaseline = "alphabetic";
3593
3594
  let i = e.measureText(t);
@@ -3595,7 +3596,7 @@ function xn(e, t, n) {
3595
3596
  let a = i.fontBoundingBoxAscent, o = i.fontBoundingBoxDescent;
3596
3597
  return typeof a == "number" && typeof o == "number" && (a !== 0 || o !== 0) ? (a - o) / 2 : .38 * n;
3597
3598
  }
3598
- function Sn(e, t) {
3599
+ function xn(e, t) {
3599
3600
  let n = e.textAlign, r = e.textBaseline;
3600
3601
  e.textAlign = "center", e.textBaseline = "middle";
3601
3602
  let i = e.measureText(t);
@@ -3603,15 +3604,15 @@ function Sn(e, t) {
3603
3604
  let a = i.actualBoundingBoxAscent, o = i.actualBoundingBoxDescent;
3604
3605
  return typeof a == "number" && typeof o == "number" ? (a - o) / 2 : 0;
3605
3606
  }
3606
- function Cn(e, t, n, r, i, a, o = "fill", s = bn) {
3607
- let c = e.textAlign, l = e.textBaseline, u = o === "stroke" ? e.strokeText.bind(e) : e.fillText.bind(e), d = r - xn(e, t, i), f = 0;
3607
+ function Sn(e, t, n, r, i, a, o = "fill", s = yn) {
3608
+ let c = e.textAlign, l = e.textBaseline, u = o === "stroke" ? e.strokeText.bind(e) : e.fillText.bind(e), d = r - bn(e, t, i), f = 0;
3608
3609
  for (let o of t) {
3609
- let t = o.codePointAt(0) ?? 0, l = I(t), p = e.measureText(o).width + a, m = l === "Tr" ? ce(t) : null, h = l === "Tr" && m === null && K(t), g = l === "U" || l === "Tu" || m !== null || h;
3610
- if (ne(t) && s(t)) {
3610
+ let t = o.codePointAt(0) ?? 0, l = L(t), p = e.measureText(o).width + a, m = l === "Tr" ? se(t) : null, h = l === "Tr" && m === null && G(t), g = l === "U" || l === "Tu" || m !== null || h;
3611
+ if (ee(t) && s(t)) {
3611
3612
  let t = n + f + p / 2;
3612
- e.save(), e.translate(t, d), e.rotate(-Math.PI / 2), e.textAlign = "center", e.textBaseline = "middle", A(e, () => u(o, 0, 0)), e.restore();
3613
+ e.save(), e.translate(t, d), e.rotate(-Math.PI / 2), e.textAlign = "center", e.textBaseline = "middle", N(e, () => u(o, 0, 0)), e.restore();
3613
3614
  } else if (g) {
3614
- let r = m === null && l === "Tu" ? N(t) : null, a = m === null ? r : m, s = a === null ? o : String.fromCodePoint(a), c = n + f + p / 2, h = r === null ? Sn(e, s) / i : 0;
3615
+ let r = m === null && l === "Tu" ? F(t) : null, a = m === null ? r : m, s = a === null ? o : String.fromCodePoint(a), c = n + f + p / 2, h = r === null ? xn(e, s) / i : 0;
3615
3616
  e.save(), e.translate(c, d), e.rotate(-Math.PI / 2), e.textAlign = "center", e.textBaseline = "middle", u(s, 0, h * i), e.restore();
3616
3617
  } else if (l === "Tr") {
3617
3618
  let t = n + f + p / 2;
@@ -3621,24 +3622,24 @@ function Cn(e, t, n, r, i, a, o = "fill", s = bn) {
3621
3622
  }
3622
3623
  e.textAlign = c, e.textBaseline = l;
3623
3624
  }
3624
- function wn(e, t, n, r, i, a, o = "fill") {
3625
- Cn(e, t, n, r, i, a, o, (t) => oe(e, t));
3625
+ function Cn(e, t, n, r, i, a, o = "fill") {
3626
+ Sn(e, t, n, r, i, a, o, (t) => ae(e, t));
3626
3627
  }
3627
3628
  //#endregion
3628
3629
  //#region packages/pptx/src/renderer.ts
3629
- function Y(e, t) {
3630
+ function X(e, t) {
3630
3631
  return e * t;
3631
3632
  }
3632
- var X = E;
3633
- function Tn(e, t, n, r, i, a, o) {
3634
- let { top: s, height: c } = Zt(n, i);
3633
+ var Z = D;
3634
+ function wn(e, t, n, r, i, a, o) {
3635
+ let { top: s, height: c } = Xt(n, i);
3635
3636
  e.fillStyle = a, e.fillRect(t, s, r, c), e.fillStyle = o;
3636
3637
  }
3637
- function En(e, t, n, r, i, a, o = 0) {
3638
- return T(e, t, n, r, i, a, o);
3638
+ function Tn(e, t, n, r, i, a, o = 0) {
3639
+ return E(e, t, n, r, i, a, o);
3639
3640
  }
3640
- var Dn = /* @__PURE__ */ new WeakMap();
3641
- function On(e, t) {
3641
+ var En = /* @__PURE__ */ new WeakMap();
3642
+ function Dn(e, t) {
3642
3643
  let n = e.tinted.get(t);
3643
3644
  if (n) return n;
3644
3645
  let r = e.img.naturalWidth || 1, i = e.img.naturalHeight || 1, a = document.createElement("canvas");
@@ -3646,18 +3647,18 @@ function On(e, t) {
3646
3647
  let o = a.getContext("2d");
3647
3648
  return o ? (o.drawImage(e.img, 0, 0, r, i), o.globalCompositeOperation = "source-in", o.fillStyle = t, o.fillRect(0, 0, r, i), e.tinted.set(t, a), a) : e.img;
3648
3649
  }
3649
- function kn(e) {
3650
+ function On(e) {
3650
3651
  let t = `data:image/svg+xml;charset=utf-8,${encodeURIComponent(e)}`, n = new Image();
3651
3652
  return new Promise((e, r) => {
3652
3653
  n.onload = () => e(n), n.onerror = r, n.src = t;
3653
3654
  });
3654
3655
  }
3655
- var An = 256;
3656
- function jn(e, t, n) {
3657
- let r = Math.max(1, Math.round(t * An)), i = Math.max(1, Math.round(n * An));
3656
+ var kn = 256;
3657
+ function An(e, t, n) {
3658
+ let r = Math.max(1, Math.round(t * kn)), i = Math.max(1, Math.round(n * kn));
3658
3659
  return e.replace(/<svg([^>]*?)>/, (e, t) => `<svg${t.replace(/\s(?:width|height)="[^"]*"/g, "")} width="${r}" height="${i}">`);
3659
3660
  }
3660
- function Mn(e) {
3661
+ function jn(e) {
3661
3662
  let t = [], n = (e) => {
3662
3663
  if (e) for (let n of e.paragraphs) for (let e of n.runs) e.type === "math" && t.push({
3663
3664
  nodes: e.nodes,
@@ -3668,13 +3669,13 @@ function Mn(e) {
3668
3669
  else if (t.type === "table") for (let e of t.rows) for (let t of e.cells) n(t.textBody);
3669
3670
  return t;
3670
3671
  }
3671
- async function Nn(e, t) {
3672
- let n = Mn(e);
3672
+ async function Mn(e, t) {
3673
+ let n = jn(e);
3673
3674
  if (n.length !== 0) {
3674
3675
  await t.loadMathJax();
3675
- for (let e of n) if (!Dn.has(e.nodes)) try {
3676
- let n = await t.mathMLToSvg(O(e.nodes, e.display)), r = await kn(jn(Ee(n.svg, "#000000"), n.widthEm, n.ascentEm + n.descentEm));
3677
- Dn.set(e.nodes, {
3676
+ for (let e of n) if (!En.has(e.nodes)) try {
3677
+ let n = await t.mathMLToSvg(A(e.nodes, e.display)), r = await On(An(Te(n.svg, "#000000"), n.widthEm, n.ascentEm + n.descentEm));
3678
+ En.set(e.nodes, {
3678
3679
  img: r,
3679
3680
  widthEm: n.widthEm,
3680
3681
  ascentEm: n.ascentEm,
@@ -3684,10 +3685,10 @@ async function Nn(e, t) {
3684
3685
  } catch {}
3685
3686
  }
3686
3687
  }
3687
- function Pn(e, t) {
3688
+ function Nn(e, t) {
3688
3689
  return e ? e.startsWith("+") ? e === "+mj-lt" || e === "+mj-ea" || e === "+mj-cs" ? t.themeMajorFont ?? "sans-serif" : t.themeMinorFont ?? "sans-serif" : e.split(",")[0].trim() || (t.themeMinorFont ?? "sans-serif") : t.themeMinorFont ?? "sans-serif";
3689
3690
  }
3690
- var Fn = new Set([
3691
+ var Pn = new Set([
3691
3692
  "serif",
3692
3693
  "sans-serif",
3693
3694
  "monospace",
@@ -3695,11 +3696,11 @@ var Fn = new Set([
3695
3696
  "fantasy",
3696
3697
  "system-ui"
3697
3698
  ]);
3698
- function In(e) {
3699
- let t = L(e);
3699
+ function Fn(e) {
3700
+ let t = ie(e);
3700
3701
  return t === "mono" ? "monospace" : t === "serif" ? "serif" : "sans-serif";
3701
3702
  }
3702
- var Ln = {
3703
+ var In = {
3703
3704
  calibri: "Carlito",
3704
3705
  "calibri light": "Carlito",
3705
3706
  cambria: "Caladea",
@@ -3711,38 +3712,38 @@ var Ln = {
3711
3712
  "simplified arabic": "Noto Naskh Arabic",
3712
3713
  "arabic typesetting": "Noto Naskh Arabic",
3713
3714
  "univers next arabic": "Noto Sans Arabic"
3714
- }, Rn = "\"Noto Naskh Arabic\", \"Noto Sans Arabic\"";
3715
- function zn(e) {
3716
- if (Ln[e.toLowerCase()]?.includes("Arabic")) return !0;
3715
+ }, Ln = "\"Noto Naskh Arabic\", \"Noto Sans Arabic\"";
3716
+ function Rn(e) {
3717
+ if (In[e.toLowerCase()]?.includes("Arabic")) return !0;
3717
3718
  let t = e.toLowerCase();
3718
3719
  return /arabic|naskh|kufi|nastaliq|amiri|scheherazade|lateef|aldhabi|urdu|farsi|العرب|[؀-ۿ]/.test(t);
3719
3720
  }
3720
- function Bn(e) {
3721
+ function zn(e) {
3721
3722
  return e.map((e) => `"${e}"`).join(", ");
3722
3723
  }
3723
- function Vn(e) {
3724
- let t = In(e), n = Ln[e.toLowerCase()], r = n ? `"${n}", ` : "";
3725
- if (zn(e)) return `"${e}", ${r}${Rn}, ${t}`;
3726
- let i = t === "serif" ? "serif" : "sans", a = P(e);
3727
- return `"${e}", ${r}${a ? `${Bn(le(a, i))}, ` : ""}${`${Bn(i === "serif" ? j : se)}, `}${t}`;
3724
+ function Bn(t) {
3725
+ let n = Fn(t), r = In[t.toLowerCase()], i = r ? `"${r}", ` : "";
3726
+ if (Rn(t)) return `"${t}", ${i}${Ln}, ${n}`;
3727
+ let a = n === "serif" ? "serif" : "sans", o = J(t);
3728
+ return `"${t}", ${i}${o ? `${zn(oe(o, a))}, ` : ""}${`${zn(a === "serif" ? e : v)}, `}${n}`;
3728
3729
  }
3729
- function Hn(e) {
3730
+ function Vn(e) {
3730
3731
  return e ? e.kind === "external" ? `e:${e.url}` : `i:${e.ref}` : "";
3731
3732
  }
3732
- function Un(e) {
3733
+ function Hn(e) {
3733
3734
  let t = e.toLowerCase();
3734
3735
  return /\b(thin|hairline)\b/.test(t) ? 100 : /\b(extra[- ]?light|ultra[- ]?light)\b/.test(t) ? 200 : /\blight\b/.test(t) ? 300 : /\b(black|heavy)\b/.test(t) ? 900 : /\b(extra[- ]?bold|ultra[- ]?bold)\b/.test(t) ? 800 : /\b(semi[- ]?bold|demi[- ]?bold)\b/.test(t) ? 600 : /\bbold\b/.test(t) ? 700 : /\bmedium\b/.test(t) ? 600 : null;
3735
3736
  }
3736
- function Wn(e, t, n, r, i, a, o, s) {
3737
- let c = Math.max(0, r.blur * i), l = Math.ceil(c * 3) + 2, u = Math.max(0, Math.floor(n.x - l)), d = Math.max(0, Math.floor(n.y - l)), f = Math.min(o, Math.ceil(n.x + n.w + l)), p = Math.min(s, Math.ceil(n.y + n.h + l)), m = Math.max(1, f - u), h = Math.max(1, p - d), g = F(m, h), _ = g?.getContext("2d");
3737
+ function Un(e, t, n, r, i, a, o, s) {
3738
+ let c = Math.max(0, r.blur * i), l = Math.ceil(c * 3) + 2, u = Math.max(0, Math.floor(n.x - l)), d = Math.max(0, Math.floor(n.y - l)), f = Math.min(o, Math.ceil(n.x + n.w + l)), p = Math.min(s, Math.ceil(n.y + n.h + l)), m = Math.max(1, f - u), h = Math.max(1, p - d), g = O(m, h), _ = g?.getContext("2d");
3738
3739
  if (!g || !_) return;
3739
3740
  _.save(), _.setTransform(a.a, a.b, a.c, a.d, a.e - u, a.f - d), t(_), _.restore();
3740
3741
  let v = n.y - d, y = v + n.h, b = g, x = _;
3741
3742
  if (c > 0) {
3742
- let e = F(m, h), t = e?.getContext("2d");
3743
+ let e = O(m, h), t = e?.getContext("2d");
3743
3744
  e && t && (b = e, x = t);
3744
3745
  }
3745
- b !== g && tn(x, g, {
3746
+ b !== g && en(x, g, {
3746
3747
  x: n.x - u,
3747
3748
  y: v,
3748
3749
  w: n.w,
@@ -3769,32 +3770,32 @@ function Wn(e, t, n, r, i, a, o, s) {
3769
3770
  let T = r.dist * i, E = r.dir * Math.PI / 180, D = n.y + n.h;
3770
3771
  e.save(), e.setTransform(1, 0, 0, 1, 0, 0), e.translate(n.x + Math.cos(E) * T, D + Math.sin(E) * T), e.scale(r.sx, r.sy), e.translate(-n.x, -D), e.drawImage(b, u, d), e.restore();
3771
3772
  }
3772
- function Z(e, t, n, r, i) {
3773
- let a = t ? "italic " : "", o = Pn(r, i), s = Un(o), c = e ? "bold " : s ? `${s} ` : "";
3774
- return Fn.has(o) ? `${a}${c}${n}px ${o}` : `${a}${c}${n}px ${Vn(o)}`;
3773
+ function Wn(e, t, n, r, i) {
3774
+ let a = t ? "italic " : "", o = Nn(r, i), s = Hn(o), c = e ? "bold " : s ? `${s} ` : "";
3775
+ return Pn.has(o) ? `${a}${c}${n}px ${o}` : `${a}${c}${n}px ${Bn(o)}`;
3775
3776
  }
3776
3777
  function Gn(e) {
3777
- return e.bullet.type === "char" || e.bullet.type === "autoNum" || De(e.bullet).type === "blip";
3778
+ return e.bullet.type === "char" || e.bullet.type === "autoNum" || Ee(e.bullet).type === "blip";
3778
3779
  }
3779
3780
  function Kn(e, t) {
3780
3781
  return e ? 0 : Math.max(0, t);
3781
3782
  }
3782
3783
  function qn(e, t, n, r, i, a, o) {
3783
- let s = (t.defaultFontSize ?? 18) * U * a;
3784
+ let s = (t.defaultFontSize ?? 18) * Y * a;
3784
3785
  for (let c of t.paragraphs) {
3785
- let l = Y(c.marL, a), u = Y(c.marR, a), d = Y(c.indent, a), f = Kn(Gn(c), d), p = n - r - i - l - u - f, m = 0;
3786
+ let l = X(c.marL, a), u = X(c.marR, a), d = X(c.indent, a), f = Kn(Gn(c), d), p = n - r - i - l - u - f, m = 0;
3786
3787
  for (let n of c.runs) {
3787
3788
  if (n.type !== "text") continue;
3788
- let r = n.fontSize == null ? c.defFontSize == null ? s : c.defFontSize * U * a : n.fontSize * U * a, i = Pn(n.fontFamily ?? c.defFontFamily ?? null, o);
3789
- e.font = Z(n.bold ?? c.defBold ?? t.defaultBold ?? !1, n.italic ?? c.defItalic ?? t.defaultItalic ?? !1, r, i, o);
3790
- let l = (n.letterSpacing ?? 0) * U * a;
3789
+ let r = n.fontSize == null ? c.defFontSize == null ? s : c.defFontSize * Y * a : n.fontSize * Y * a, i = Nn(n.fontFamily ?? c.defFontFamily ?? null, o);
3790
+ e.font = Wn(n.bold ?? c.defBold ?? t.defaultBold ?? !1, n.italic ?? c.defItalic ?? t.defaultItalic ?? !1, r, i, o);
3791
+ let l = (n.letterSpacing ?? 0) * Y * a;
3791
3792
  if (m += Q(e, n.text, l), m > p) return !0;
3792
3793
  }
3793
3794
  }
3794
3795
  return !1;
3795
3796
  }
3796
3797
  function Jn(e) {
3797
- for (let t of e) if (de(t.codePointAt(0) ?? 0)) return !0;
3798
+ for (let t of e) if (le(t.codePointAt(0) ?? 0)) return !0;
3798
3799
  return !1;
3799
3800
  }
3800
3801
  function Yn(e) {
@@ -3838,35 +3839,35 @@ function Q(e, t, n) {
3838
3839
  let a = Math.max(0, Yn(t) - 1);
3839
3840
  return e.measureText(t).width + n * a;
3840
3841
  }
3841
- function Qn(e, t, n, i, a, o, s, c = !1, l = !1, u = 1, d, f = {
3842
+ function Qn(e, t, n, r, a, o, s, c = !1, l = !1, u = 1, d, f = {
3842
3843
  themeMajorFont: null,
3843
3844
  themeMinorFont: null,
3844
3845
  dpr: 1
3845
3846
  }, p = 0) {
3846
- let m = [], g = /* @__PURE__ */ new Map(), _ = !0;
3847
+ let m = [], h = /* @__PURE__ */ new Map(), _ = !0;
3847
3848
  for (let e = t.runs.length - 1; e >= 0 && _; e--) {
3848
3849
  let n = t.runs[e];
3849
3850
  if (n.type === "break") continue;
3850
3851
  if (n.type === "math") break;
3851
3852
  let r = n.text.replace(/ +$/u, "");
3852
- r !== n.text && g.set(n, r), (r.length > 0 || n.fieldType != null) && (_ = !1);
3853
+ r !== n.text && h.set(n, r), (r.length > 0 || n.fieldType != null) && (_ = !1);
3853
3854
  }
3854
- let v = () => n - (m.length === 0 ? p : 0), b = { segments: [] }, x = 0, S = !1, C = t.rtl === !0, w = Y(t.marR, o), T = (t.tabStops ?? []).map((e) => ({
3855
- pos: Y(e.pos, o),
3855
+ let v = () => n - (m.length === 0 ? p : 0), y = { segments: [] }, x = 0, S = !1, C = t.rtl === !0, w = X(t.marR, o), T = (t.tabStops ?? []).map((e) => ({
3856
+ pos: X(e.pos, o),
3856
3857
  algn: e.algn
3857
- })), E = Y(t.defTabSz ?? 914400, o), O = !1, k = [], A = 0, j = () => C ? w : s + (m.length === 0 ? p : 0), M = (e = 0) => {
3858
- let t = yn(e > 0 ? [...k, {
3858
+ })), E = X(t.defTabSz ?? 914400, o), D = !1, O = [], A = 0, j = () => C ? w : s + (m.length === 0 ? p : 0), M = (e = 0) => {
3859
+ let t = vn(e > 0 ? [...O, {
3859
3860
  isTab: !1,
3860
3861
  width: e
3861
- }] : k, T, j(), Infinity, A, E), n = 0;
3862
+ }] : O, T, j(), Infinity, A, E), n = 0;
3862
3863
  for (let e of t) n += e;
3863
3864
  return n;
3864
3865
  }, N = (e) => {
3865
3866
  let t = v();
3866
- return Number.isFinite(t) ? O ? M(e) <= t : x + e <= t : !0;
3867
+ return Number.isFinite(t) ? D ? M(e) <= t : x + e <= t : !0;
3867
3868
  }, P = () => {
3868
3869
  let e = v();
3869
- if (!O) return e - x;
3870
+ if (!D) return e - x;
3870
3871
  if (!Number.isFinite(e)) return Infinity;
3871
3872
  if (M(0) >= e) return 0;
3872
3873
  let t = 0, n = e;
@@ -3876,22 +3877,22 @@ function Qn(e, t, n, i, a, o, s, c = !1, l = !1, u = 1, d, f = {
3876
3877
  }
3877
3878
  return t;
3878
3879
  }, F = (e = !1) => {
3879
- e && (b.endsWithBreak = !0), m.push(b), b = { segments: [] }, x = 0, O = !1, k = [], S = !1;
3880
+ e && (y.endsWithBreak = !0), m.push(y), y = { segments: [] }, x = 0, D = !1, O = [], S = !1;
3880
3881
  }, I = (t, n, r, i) => {
3881
3882
  e.font = n;
3882
- let a = Q(e, t, r), o = b.segments.at(-1);
3883
+ let a = Q(e, t, r), o = y.segments.at(-1);
3883
3884
  return !o || o.isTab || o.math || o.sourceRunId !== i ? a : o.font === n && (o.letterSpacingPx ?? 0) === r ? Q(e, o.text + t, r) - Q(e, o.text, r) : a + r;
3884
3885
  }, L = (t, n, r, i, a, o, s, c) => {
3885
3886
  if (!t) return;
3886
3887
  e.font = n;
3887
- let l = c?.letterSpacingPx ?? 0, u = c?.sourceRunId, d = c?.strikeDouble, f = c?.underlineStyle, p = c?.underlineColor, m = c?.shadow, h = c?.reflection, g = c?.outline, _ = c?.highlight, v = c?.fontFamily, y = c?.hyperlink, S = (e) => !e.math && !e.isTab && e.font === n && e.color === i && e.underline === a && (e.underlineStyle ?? "") === (f ?? "") && (e.underlineColor ?? "") === (p ?? "") && e.strikethrough === o && (e.strikeDouble ?? !1) === (d ?? !1) && (e.letterSpacingPx ?? 0) === l && e.baseline === s && e.shadow === m && e.reflection === h && e.outline === g && (e.highlight ?? "") === (_ ?? "") && (e.fontFamily ?? "") === (v ?? "") && Hn(e.hyperlink) === Hn(y) && (l === 0 || e.sourceRunId === u), C = b.segments.at(-1), w = Q(e, t, l);
3888
- if (C && S(C) ? w = Q(e, C.text + t, l) - Q(e, C.text, l) : C && !C.isTab && !C.math && u != null && C.sourceRunId === u && (w += l), x += w, k.push({
3888
+ let l = c?.letterSpacingPx ?? 0, u = c?.sourceRunId, d = c?.strikeDouble, f = c?.underlineStyle, p = c?.underlineColor, m = c?.shadow, h = c?.reflection, g = c?.outline, _ = c?.highlight, v = c?.fontFamily, b = c?.hyperlink, S = (e) => !e.math && !e.isTab && e.font === n && e.color === i && e.underline === a && (e.underlineStyle ?? "") === (f ?? "") && (e.underlineColor ?? "") === (p ?? "") && e.strikethrough === o && (e.strikeDouble ?? !1) === (d ?? !1) && (e.letterSpacingPx ?? 0) === l && e.baseline === s && e.shadow === m && e.reflection === h && e.outline === g && (e.highlight ?? "") === (_ ?? "") && (e.fontFamily ?? "") === (v ?? "") && Vn(e.hyperlink) === Vn(b) && (l === 0 || e.sourceRunId === u), C = y.segments.at(-1), w = Q(e, t, l);
3889
+ if (C && S(C) ? w = Q(e, C.text + t, l) - Q(e, C.text, l) : C && !C.isTab && !C.math && u != null && C.sourceRunId === u && (w += l), x += w, O.push({
3889
3890
  isTab: !1,
3890
3891
  width: w
3891
3892
  }), C && S(C)) C.text += t;
3892
3893
  else {
3893
3894
  let e = C && !C.isTab && !C.math && u != null && C.sourceRunId === u ? l : 0;
3894
- b.segments.push({
3895
+ y.segments.push({
3895
3896
  text: t,
3896
3897
  font: n,
3897
3898
  fontFamily: v,
@@ -3910,15 +3911,15 @@ function Qn(e, t, n, i, a, o, s, c = !1, l = !1, u = 1, d, f = {
3910
3911
  reflection: h,
3911
3912
  outline: g,
3912
3913
  highlight: _,
3913
- hyperlink: y
3914
+ hyperlink: b
3914
3915
  });
3915
3916
  }
3916
3917
  }, z = () => {
3917
- let e = b.segments.at(-1);
3918
+ let e = y.segments.at(-1);
3918
3919
  if (!e || e.math) return !1;
3919
3920
  let t = /^(.*\s)(\S+)$/s.exec(e.text), n;
3920
3921
  if (t) e.text = t[1], n = t[2];
3921
- else if (b.segments.length > 1) b.segments.pop(), n = e.text;
3922
+ else if (y.segments.length > 1) y.segments.pop(), n = e.text;
3922
3923
  else return !1;
3923
3924
  return F(), L(n, e.font, e.sizePx, e.color, e.underline, e.strikethrough, e.baseline, {
3924
3925
  strikeDouble: e.strikeDouble,
@@ -3939,51 +3940,51 @@ function Qn(e, t, n, i, a, o, s, c = !1, l = !1, u = 1, d, f = {
3939
3940
  continue;
3940
3941
  }
3941
3942
  if (s.type === "math") {
3942
- let e = Dn.get(s.nodes), t = s.fontSize == null ? i : s.fontSize * U * o * u, n = e ? e.widthEm * t : 0, r = e ? e.ascentEm * t : 0, c = e ? e.descentEm * t : 0;
3943
- (s.display && x > 0 || !N(n) && x > 0) && F(), k.push({
3943
+ let e = En.get(s.nodes), t = s.fontSize == null ? r : s.fontSize * Y * o * u, n = e ? e.widthEm * t : 0, i = e ? e.ascentEm * t : 0, c = e ? e.descentEm * t : 0;
3944
+ (s.display && x > 0 || !N(n) && x > 0) && F(), O.push({
3944
3945
  isTab: !1,
3945
3946
  width: n
3946
- }), b.segments.push({
3947
+ }), y.segments.push({
3947
3948
  text: "",
3948
3949
  font: `${t}px sans-serif`,
3949
3950
  sizePx: t,
3950
- color: s.color ? X(s.color) : a,
3951
+ color: s.color ? Z(s.color) : a,
3951
3952
  underline: !1,
3952
3953
  strikethrough: !1,
3953
3954
  math: {
3954
3955
  nodes: s.nodes,
3955
3956
  display: s.display,
3956
3957
  width: n,
3957
- ascent: r,
3958
+ ascent: i,
3958
3959
  descent: c
3959
3960
  }
3960
3961
  }), x += n, s.display && F();
3961
3962
  continue;
3962
3963
  }
3963
- let p = s.fontSize == null ? i : s.fontSize * U * o * u, m = Pn(s.fontFamily ?? t.defFontFamily ?? null, f), _ = s.fontFamilyEa ? Pn(s.fontFamilyEa, f) : null, C = s.fontFamilySym ? Pn(s.fontFamilySym, f) : null, w;
3964
- w = s.color ? X(s.color) : s.hyperlink && f.themeHlinkColor ? X(f.themeHlinkColor) : a;
3965
- let T = s.bold ?? t.defBold ?? c, E = s.italic ?? t.defItalic ?? l, j = Z(T, E, p, m, f), M = _ ? Z(T, E, p, _, f) : j;
3964
+ let p = s.fontSize == null ? r : s.fontSize * Y * o * u, m = Nn(s.fontFamily ?? t.defFontFamily ?? null, f), _ = s.fontFamilyEa ? Nn(s.fontFamilyEa, f) : null, C = s.fontFamilySym ? Nn(s.fontFamilySym, f) : null, w;
3965
+ w = s.color ? Z(s.color) : s.hyperlink && f.themeHlinkColor ? Z(f.themeHlinkColor) : a;
3966
+ let T = s.bold ?? t.defBold ?? c, E = s.italic ?? t.defItalic ?? l, j = Wn(T, E, p, m, f), M = _ ? Wn(T, E, p, _, f) : j;
3966
3967
  e.font = j;
3967
- let V = s.caps, H = g.get(s) ?? s.text;
3968
+ let V = s.caps, H = h.get(s) ?? s.text;
3968
3969
  (V === "all" || V === "small") && (H = H.toUpperCase());
3969
- let ee = s.fieldType === "slidenum" && d !== void 0 ? String(d) : H, W = s.underline || s.hyperlink !== void 0, G = s.strikeDouble === !0, K = s.letterSpacing == null ? 0 : s.letterSpacing * U * o, q = {
3970
+ let U = s.fieldType === "slidenum" && d !== void 0 ? String(d) : H, W = s.underline || s.hyperlink !== void 0, G = s.strikeDouble === !0, K = s.letterSpacing == null ? 0 : s.letterSpacing * Y * o, q = {
3970
3971
  strikeDouble: G,
3971
3972
  letterSpacingPx: K,
3972
3973
  underlineStyle: s.underlineStyle,
3973
- underlineColor: s.underlineColor ? X(s.underlineColor) : void 0,
3974
+ underlineColor: s.underlineColor ? Z(s.underlineColor) : void 0,
3974
3975
  shadow: s.shadow,
3975
3976
  reflection: s.reflection,
3976
3977
  outline: s.outline,
3977
3978
  fontFamily: m,
3978
- highlight: s.highlight ? X(s.highlight) : void 0,
3979
- hyperlink: nn(s.hyperlink),
3979
+ highlight: s.highlight ? Z(s.highlight) : void 0,
3980
+ hyperlink: tn(s.hyperlink),
3980
3981
  sourceRunId: n
3981
- }, J = ee.split(/(\s+)/);
3982
- for (let i of J) {
3983
- if (!i) continue;
3984
- if (/^\t+$/.test(i)) {
3985
- O || (e.font = j, A = e.measureText(" ").width);
3986
- for (let e of i) b.segments.push({
3982
+ }, J = U.split(/(\s+)/);
3983
+ for (let r of J) {
3984
+ if (!r) continue;
3985
+ if (/^\t+$/.test(r)) {
3986
+ D || (e.font = j, A = e.measureText(" ").width);
3987
+ for (let e of r) y.segments.push({
3987
3988
  text: "",
3988
3989
  isTab: !0,
3989
3990
  font: j,
@@ -3992,50 +3993,50 @@ function Qn(e, t, n, i, a, o, s, c = !1, l = !1, u = 1, d, f = {
3992
3993
  color: w,
3993
3994
  underline: !1,
3994
3995
  strikethrough: !1
3995
- }), k.push({
3996
+ }), O.push({
3996
3997
  isTab: !0,
3997
3998
  width: 0
3998
3999
  });
3999
- O = !0;
4000
+ D = !0;
4000
4001
  continue;
4001
4002
  }
4002
4003
  e.font = j;
4003
- let a = I(i, j, K, n), o = /^\s+$/.test(i), c = /[-]/;
4004
- if (c.test(i) && (C != null || we(m))) {
4004
+ let a = I(r, j, K, n), o = /^\s+$/.test(r), c = /[-]/;
4005
+ if (c.test(r) && (C != null || Se(m))) {
4005
4006
  let t = C ?? m;
4006
- for (let r of i) {
4007
- let i = r, a = j;
4008
- if (c.test(r)) {
4009
- let e = ge(r, t);
4010
- e === r ? a = Z(T, E, p, t, f) : (i = e, a = Z(T, E, p, "sans-serif", f));
4007
+ for (let i of r) {
4008
+ let r = i, a = j;
4009
+ if (c.test(i)) {
4010
+ let e = me(i, t);
4011
+ e === i ? a = Wn(T, E, p, t, f) : (r = e, a = Wn(T, E, p, "sans-serif", f));
4011
4012
  }
4012
- e.font = a, !N(I(i, a, K, n)) && x > 0 && F(), L(i, a, p, w, W, s.strikethrough, s.baseline ?? void 0, q);
4013
+ e.font = a, !N(I(r, a, K, n)) && x > 0 && F(), L(r, a, p, w, W, s.strikethrough, s.baseline ?? void 0, q);
4013
4014
  }
4014
4015
  continue;
4015
4016
  }
4016
- if (Jn(i) && (!B(i) || t.eaLnBrk === !1)) {
4017
- let r = [];
4018
- for (let t of i) {
4019
- let n = de(t.codePointAt(0) ?? 0) && _ != null, i = n ? M : j, a = n ? _ : m;
4020
- e.font = i, r.push({
4017
+ if (Jn(r) && (!B(r) || t.eaLnBrk === !1)) {
4018
+ let i = [];
4019
+ for (let t of r) {
4020
+ let n = le(t.codePointAt(0) ?? 0) && _ != null, r = n ? M : j, a = n ? _ : m;
4021
+ e.font = r, i.push({
4021
4022
  ch: t,
4022
4023
  w: Q(e, t, 0),
4023
- font: i,
4024
+ font: r,
4024
4025
  family: a
4025
4026
  });
4026
4027
  }
4027
4028
  if (t.eaLnBrk === !1) {
4028
- let e = b.segments.at(-1), t = !!e && !e.isTab && !e.math && e.sourceRunId === n, i = r.reduce((e, t) => e + t.w, 0) + Math.max(0, r.length - 1) * K + (t && r.length > 0 ? K : 0);
4029
- x > 0 && !N(i) && F();
4030
- for (let e of r) L(e.ch, e.font, p, w, W, s.strikethrough, s.baseline ?? void 0, {
4029
+ let e = y.segments.at(-1), t = !!e && !e.isTab && !e.math && e.sourceRunId === n, r = i.reduce((e, t) => e + t.w, 0) + Math.max(0, i.length - 1) * K + (t && i.length > 0 ? K : 0);
4030
+ x > 0 && !N(r) && F();
4031
+ for (let e of i) L(e.ch, e.font, p, w, W, s.strikethrough, s.baseline ?? void 0, {
4031
4032
  ...q,
4032
4033
  fontFamily: e.family
4033
4034
  });
4034
4035
  continue;
4035
4036
  }
4036
- let a = r;
4037
+ let a = i;
4037
4038
  for (; a.length > 0;) {
4038
- let e = Number.isFinite(v()) ? v() - P() : x, t = b.segments.at(-1), r = !!t && !t.isTab && !t.math && t.sourceRunId === n, i = ln(a, e, v(), h, K, r);
4039
+ let e = Number.isFinite(v()) ? v() - P() : x, t = y.segments.at(-1), r = !!t && !t.isTab && !t.math && t.sourceRunId === n, i = cn(a, e, v(), g, K, r);
4039
4040
  if (i === 0) {
4040
4041
  if (x > 0) {
4041
4042
  F();
@@ -4054,12 +4055,12 @@ function Qn(e, t, n, i, a, o, s, c = !1, l = !1, u = 1, d, f = {
4054
4055
  }
4055
4056
  continue;
4056
4057
  }
4057
- if (B(i)) {
4058
- let t = y(i, {
4058
+ if (B(r)) {
4059
+ let t = b(r, {
4059
4060
  cjk: !0,
4060
- kinsoku: h
4061
- }), r = _ != null && M !== j, a = (e) => r && de(e.codePointAt(0) ?? 0), o = (t) => {
4062
- let r = 0, i = b.segments.at(-1), o = !!i && !i.isTab && !i.math && i.sourceRunId === n, s = "", c = null, l = () => {
4061
+ kinsoku: g
4062
+ }), i = _ != null && M !== j, a = (e) => i && le(e.codePointAt(0) ?? 0), o = (t) => {
4063
+ let r = 0, i = y.segments.at(-1), o = !!i && !i.isTab && !i.math && i.sourceRunId === n, s = "", c = null, l = () => {
4063
4064
  s !== "" && (e.font = c ? M : j, r += Q(e, s, K), o && (r += K), o = !0, s = "");
4064
4065
  };
4065
4066
  for (let e of t) {
@@ -4081,42 +4082,42 @@ function Qn(e, t, n, i, a, o, s, c = !1, l = !1, u = 1, d, f = {
4081
4082
  n === null || e === n ? (t += i, n = e) : (r(), t = i, n = e);
4082
4083
  }
4083
4084
  r();
4084
- }, l = pe(i), u = i.length, d = 0;
4085
+ }, l = de(r), u = r.length, d = 0;
4085
4086
  for (; d < u;) {
4086
- let e = P(), n = R(i, t, d, e, o, l);
4087
+ let e = P(), n = R(r, t, d, e, o, l);
4087
4088
  if (n <= d) {
4088
4089
  if (x > 0) {
4089
4090
  F();
4090
4091
  continue;
4091
4092
  }
4092
- let r = t.find((e) => e > d) ?? u, a = i.slice(d, r), s = D(a), c = R(a, s, 0, e, o, l);
4093
+ let i = t.find((e) => e > d) ?? u, a = r.slice(d, i), s = k(a), c = R(a, s, 0, e, o, l);
4093
4094
  c <= 0 && (c = s.length > 0 ? s[0] : a.length), n = d + c;
4094
4095
  }
4095
- c(i.slice(d, n)), d = n, d < u && F();
4096
+ c(r.slice(d, n)), d = n, d < u && F();
4096
4097
  }
4097
4098
  continue;
4098
4099
  }
4099
- if (N(a)) L(i, j, p, w, W, s.strikethrough, s.baseline ?? void 0, q), o && (S = !0);
4100
+ if (N(a)) L(r, j, p, w, W, s.strikethrough, s.baseline ?? void 0, q), o && (S = !0);
4100
4101
  else if (o) x > 0 && F();
4101
4102
  else if (a > v()) {
4102
4103
  x > 0 && F();
4103
- for (let t of i) e.font = j, !N(I(t, j, K, n)) && x > 0 && F(), L(t, j, p, w, W, s.strikethrough, s.baseline ?? void 0, q);
4104
- } else if (!S) L(i, j, p, w, W, s.strikethrough, s.baseline ?? void 0, q);
4104
+ for (let t of r) e.font = j, !N(I(t, j, K, n)) && x > 0 && F(), L(t, j, p, w, W, s.strikethrough, s.baseline ?? void 0, q);
4105
+ } else if (!S) L(r, j, p, w, W, s.strikethrough, s.baseline ?? void 0, q);
4105
4106
  else {
4106
- let e = b.segments.at(-1)?.text ?? "", t = i.codePointAt(0), n = [...e].at(-1)?.codePointAt(0), a = /\S$/u.test(e) && /^\S/u.test(i) && n !== 8203 && t !== 8203, o = t !== void 0 && h.lineStartForbidden.has(t) && a, c = n !== void 0 && t !== void 0 && a && !B(e) && !B(i) && r(n, t);
4107
- (o || c) && z() || F(), L(i, j, p, w, W, s.strikethrough, s.baseline ?? void 0, q);
4107
+ let e = y.segments.at(-1)?.text ?? "", t = r.codePointAt(0), n = [...e].at(-1)?.codePointAt(0), a = /\S$/u.test(e) && /^\S/u.test(r) && n !== 8203 && t !== 8203, o = t !== void 0 && g.lineStartForbidden.has(t) && a, c = n !== void 0 && t !== void 0 && a && !B(e) && !B(r) && i(n, t);
4108
+ (o || c) && z() || F(), L(r, j, p, w, W, s.strikethrough, s.baseline ?? void 0, q);
4108
4109
  }
4109
4110
  }
4110
4111
  }
4111
- return m.push(b), m;
4112
+ return m.push(y), m;
4112
4113
  }
4113
4114
  async function $n(e, t, n, r, i, a, o) {
4114
4115
  if (t && t.fillType === "image") {
4115
4116
  if (e.fillStyle = "#FFFFFF", e.fillRect(0, 0, n, r), !t.imagePath || !t.mimeType || !o) return;
4116
4117
  try {
4117
- let s = await Te(t.imagePath, t.mimeType, t.duotone, o, {
4118
- widthPt: n / i / U,
4119
- heightPt: r / i / U
4118
+ let s = await we(t.imagePath, t.mimeType, t.duotone, o, {
4119
+ widthPt: n / i / Y,
4120
+ heightPt: r / i / Y
4120
4121
  });
4121
4122
  if (a() || !s) return;
4122
4123
  if (e.save(), e.beginPath(), e.rect(0, 0, n, r), e.clip(), t.alpha != null && (e.globalAlpha = t.alpha), t.tile) nr(e, s, t.tile, n, r, i);
@@ -4126,11 +4127,11 @@ async function $n(e, t, n, r, i, a, o) {
4126
4127
  }
4127
4128
  e.restore();
4128
4129
  } catch (e) {
4129
- if (d(e)) throw e;
4130
+ if (f(e)) throw e;
4130
4131
  }
4131
4132
  return;
4132
4133
  }
4133
- e.fillStyle = En(t, e, 0, 0, n, r) ?? "#FFFFFF", e.fillRect(0, 0, n, r);
4134
+ e.fillStyle = Tn(t, e, 0, 0, n, r) ?? "#FFFFFF", e.fillRect(0, 0, n, r);
4134
4135
  }
4135
4136
  var er = 9525;
4136
4137
  function tr(e, t, n, r, i) {
@@ -4145,7 +4146,7 @@ function tr(e, t, n, r, i) {
4145
4146
  function nr(e, t, n, r, i, a) {
4146
4147
  let o = t.width * er * n.sx * a, s = t.height * er * n.sy * a;
4147
4148
  if (!(o > 0) || !(s > 0)) return;
4148
- let c = n.flip === "x" || n.flip === "xy", l = n.flip === "y" || n.flip === "xy", u = F(o * (c ? 2 : 1), s * (l ? 2 : 1));
4149
+ let c = n.flip === "x" || n.flip === "xy", l = n.flip === "y" || n.flip === "xy", u = O(o * (c ? 2 : 1), s * (l ? 2 : 1));
4149
4150
  if (!u) return;
4150
4151
  let d = u.getContext("2d");
4151
4152
  if (!d) return;
@@ -4155,16 +4156,16 @@ function nr(e, t, n, r, i, a) {
4155
4156
  f(0, 0, !1, !1), c && f(o, 0, !0, !1), l && f(0, s, !1, !0), c && l && f(o, s, !0, !0);
4156
4157
  let p = e.createPattern(u, "repeat");
4157
4158
  if (!p) return;
4158
- let { ax: m, ay: h } = tr(n.algn ?? "tl", r, i, o, s), g = m + Y(n.tx, a), _ = h + Y(n.ty, a);
4159
+ let { ax: m, ay: h } = tr(n.algn ?? "tl", r, i, o, s), g = m + X(n.tx, a), _ = h + X(n.ty, a);
4159
4160
  typeof p.setTransform == "function" && typeof DOMMatrix < "u" ? (p.setTransform(new DOMMatrix().translateSelf(g, _)), e.fillStyle = p, e.fillRect(0, 0, r, i)) : (e.save(), e.translate(g, _), e.fillStyle = p, e.fillRect(-g, -_, r, i), e.restore());
4160
4161
  }
4161
4162
  function rr(e, t, n) {
4162
4163
  if (!t) return;
4163
- let r = t.dir * Math.PI / 180, i = Y(t.dist, n);
4164
- e.shadowColor = X(t.color, t.alpha), e.shadowBlur = 0, e.shadowOffsetX = Math.cos(r) * i, e.shadowOffsetY = Math.sin(r) * i;
4164
+ let r = t.dir * Math.PI / 180, i = X(t.dist, n);
4165
+ e.shadowColor = Z(t.color, t.alpha), e.shadowBlur = 0, e.shadowOffsetX = Math.cos(r) * i, e.shadowOffsetY = Math.sin(r) * i;
4165
4166
  }
4166
4167
  function ir(e, t, n) {
4167
- t && (e.shadowColor = X(t.color, t.alpha), e.shadowBlur = Y(t.radius, n), e.shadowOffsetX = 0, e.shadowOffsetY = 0);
4168
+ t && (e.shadowColor = Z(t.color, t.alpha), e.shadowBlur = X(t.radius, n), e.shadowOffsetX = 0, e.shadowOffsetY = 0);
4168
4169
  }
4169
4170
  function ar(e) {
4170
4171
  e.shadowColor = "transparent", e.shadowBlur = 0, e.shadowOffsetX = 0, e.shadowOffsetY = 0;
@@ -4181,45 +4182,45 @@ function ur(e, t, n, r, i, a, o, s, c, l, u, d, f, p, m) {
4181
4182
  }
4182
4183
  x = e, C = t, w = n;
4183
4184
  }
4184
- let T = 1e4, E = sr / (l * i), D = C.length - 1, O = (e, t, n) => e === 0 ? -T : t - n - E, k = (e, t, n) => e === D ? T : t - n + E, A = (e, r) => {
4185
+ let T = 1e4, E = sr / (l * i), D = C.length - 1, k = (e, t, n) => e === 0 ? -T : t - n - E, A = (e, t, n) => e === D ? T : t - n + E, j = (e, r) => {
4185
4186
  e.fillStyle = r;
4186
4187
  for (let r = 0; r <= D; r++) {
4187
4188
  let { s0: i, s1: a, g: o } = C[r], s = (i + a) / 2;
4188
4189
  e.save(), e.translate(f + o.x, p + o.y), e.rotate(o.angle), o.shear !== 0 && e.transform(1, 0, o.shear, 1, 0, 0), (l !== 1 || o.vScale !== 1) && e.scale(l, o.vScale), e.beginPath();
4189
- let c = O(r, i, s), u = k(r, a, s);
4190
+ let c = k(r, i, s), u = A(r, a, s);
4190
4191
  e.rect(c, -T, u - c, 2 * T), e.clip(), e.fillText(t, -s + n / 2, 0), e.restore();
4191
4192
  }
4192
- }, j = dr(m), M = typeof e.globalAlpha == "number" ? e.globalAlpha : 1;
4193
- if (j >= 1 && M >= 1) {
4194
- A(e, m);
4193
+ }, M = dr(m), N = typeof e.globalAlpha == "number" ? e.globalAlpha : 1;
4194
+ if (M >= 1 && N >= 1) {
4195
+ j(e, m);
4195
4196
  return;
4196
4197
  }
4197
- if (j <= 0 || M <= 0) return;
4198
- let N = typeof e.getTransform == "function" ? e.getTransform() : null;
4199
- if (!N) {
4200
- A(e, m);
4198
+ if (M <= 0 || N <= 0) return;
4199
+ let P = typeof e.getTransform == "function" ? e.getTransform() : null;
4200
+ if (!P) {
4201
+ j(e, m);
4201
4202
  return;
4202
4203
  }
4203
- let P = Infinity, I = Infinity, L = -Infinity, R = -Infinity;
4204
+ let F = Infinity, I = Infinity, L = -Infinity, R = -Infinity;
4204
4205
  for (let e = 0; e <= D; e++) {
4205
- let { s0: t, s1: r, g: i } = C[e], a = (t + r) / 2, o = -a + n / 2, s = Math.max(O(e, t, a), o - v), c = Math.min(k(e, r, a), o + y);
4206
+ let { s0: t, s1: r, g: i } = C[e], a = (t + r) / 2, o = -a + n / 2, s = Math.max(k(e, t, a), o - v), c = Math.min(A(e, r, a), o + y);
4206
4207
  if (!(c <= s)) for (let [e, t] of [
4207
4208
  [s, -g],
4208
4209
  [c, -g],
4209
4210
  [s, _],
4210
4211
  [c, _]
4211
4212
  ]) {
4212
- let n = mr(i, l, e, t), r = f + n.x, a = p + n.y, o = N.a * r + N.c * a + N.e, s = N.b * r + N.d * a + N.f;
4213
- o < P && (P = o), o > L && (L = o), s < I && (I = s), s > R && (R = s);
4213
+ let n = mr(i, l, e, t), r = f + n.x, a = p + n.y, o = P.a * r + P.c * a + P.e, s = P.b * r + P.d * a + P.f;
4214
+ o < F && (F = o), o > L && (L = o), s < I && (I = s), s > R && (R = s);
4214
4215
  }
4215
4216
  }
4216
- if (!(L > P && R > I)) return;
4217
- let z = Math.floor(P - 2), B = Math.floor(I - 2), V = F(Math.ceil(L + 2) - z, Math.ceil(R + 2) - B), H = V ? V.getContext("2d") : null;
4217
+ if (!(L > F && R > I)) return;
4218
+ let z = Math.floor(F - 2), B = Math.floor(I - 2), V = O(Math.ceil(L + 2) - z, Math.ceil(R + 2) - B), H = V ? V.getContext("2d") : null;
4218
4219
  if (!V || !H) {
4219
- A(e, m);
4220
+ j(e, m);
4220
4221
  return;
4221
4222
  }
4222
- H.font = e.font, H.textAlign = "left", H.textBaseline = "alphabetic", H.setTransform(N.a, N.b, N.c, N.d, N.e - z, N.f - B), A(H, fr(m)), e.save(), e.setTransform(1, 0, 0, 1, 0, 0), e.globalAlpha = M * j, e.drawImage(V, z, B), e.restore();
4223
+ H.font = e.font, H.textAlign = "left", H.textBaseline = "alphabetic", H.setTransform(P.a, P.b, P.c, P.d, P.e - z, P.f - B), j(H, fr(m)), e.save(), e.setTransform(1, 0, 0, 1, 0, 0), e.globalAlpha = N * M, e.drawImage(V, z, B), e.restore();
4223
4224
  }
4224
4225
  function dr(e) {
4225
4226
  let t = /^rgba?\(\s*[\d.]+\s*,\s*[\d.]+\s*,\s*[\d.]+\s*,\s*([\d.]+)\s*\)$/i.exec(e);
@@ -4238,7 +4239,7 @@ function pr(e, t, n, r, i, a, o, s) {
4238
4239
  c[l] = {
4239
4240
  s0: u,
4240
4241
  s1: d,
4241
- g: Ve(t, (r + (u + d) / 2) / i * a, o, s)
4242
+ g: Be(t, (r + (u + d) / 2) / i * a, o, s)
4242
4243
  };
4243
4244
  }
4244
4245
  return c;
@@ -4255,7 +4256,7 @@ function hr(e, t, n, r, i, a, o, s, c, l, u) {
4255
4256
  for (let f of e) {
4256
4257
  let e = (f.s0 + f.s1) / 2;
4257
4258
  for (let p of [f.s0, f.s1]) {
4258
- let m = Ve(t, (n + p) / r * i, a, o);
4259
+ let m = Be(t, (n + p) / r * i, a, o);
4259
4260
  for (let t of [l, u]) {
4260
4261
  let n = mr(m, s, 0, t), r = mr(f.g, s, p - e, t), i = Math.hypot(r.x - n.x, r.y - n.y) * c;
4261
4262
  i > d && (d = i);
@@ -4265,11 +4266,11 @@ function hr(e, t, n, r, i, a, o, s, c, l, u) {
4265
4266
  return d;
4266
4267
  }
4267
4268
  function gr(e, t, n, r, i, a, o, s, c, l, u) {
4268
- let d = i, f = a, p = Math.max(1, o), m = Math.max(1, s), h = Le(n, r, p, m);
4269
+ let d = i, f = a, p = Math.max(1, o), m = Math.max(1, s), h = Ie(n, r, p, m);
4269
4270
  if (!h) return;
4270
- let g = t.defaultBold ?? !1, _ = t.defaultItalic ?? !1, v = (t.defaultFontSize ?? 18) * U * c, y = [];
4271
+ let g = t.defaultBold ?? !1, _ = t.defaultItalic ?? !1, v = (t.defaultFontSize ?? 18) * Y * c, y = [];
4271
4272
  for (let n of t.paragraphs) {
4272
- let t = Qn(e, n, Infinity, n.defFontSize == null ? v : n.defFontSize * U * c, n.defColor ? X(n.defColor) : l, c, 0, g, _, 1, void 0, u, 0);
4273
+ let t = Qn(e, n, Infinity, n.defFontSize == null ? v : n.defFontSize * Y * c, n.defColor ? Z(n.defColor) : l, c, 0, g, _, 1, void 0, u, 0);
4273
4274
  for (let e of t) y.push(e);
4274
4275
  }
4275
4276
  if (y.length === 0) return;
@@ -4291,7 +4292,7 @@ function gr(e, t, n, r, i, a, o, s, c, l, u) {
4291
4292
  a += r.width + n * Yn(t.text), o = Math.max(o, t.sizePx), r.actualBoundingBoxAscent > 0 && (s = Math.max(s, r.actualBoundingBoxAscent)), r.actualBoundingBoxDescent > 0 && (c = Math.max(c, r.actualBoundingBoxDescent));
4292
4293
  }
4293
4294
  if (a <= 0) continue;
4294
- let l = s + c > 0 ? s + c : o, u = h.singleEdge ? .8 : l > 0 ? s / l : .8, g = h.singleEdge ? 1 : p / a, _ = h.singleEdge ? m : l / (i - r), v = Be(h, a), b = 0;
4295
+ let l = s + c > 0 ? s + c : o, u = h.singleEdge ? .8 : l > 0 ? s / l : .8, g = h.singleEdge ? 1 : p / a, _ = h.singleEdge ? m : l / (i - r), v = ze(h, a), b = 0;
4295
4296
  for (let t of n.segments) {
4296
4297
  if (t.math) {
4297
4298
  b += t.math.width;
@@ -4305,7 +4306,7 @@ function gr(e, t, n, r, i, a, o, s, c, l, u) {
4305
4306
  ur(e, s, n, o, x(), h, b, a, v, g, _, c, d, f, t.color), b += o;
4306
4307
  continue;
4307
4308
  }
4308
- let l = Ve(h, (b + o / 2) / a * v, _, c);
4309
+ let l = Be(h, (b + o / 2) / a * v, _, c);
4309
4310
  e.save(), e.translate(d + l.x, f + l.y), e.rotate(l.angle), l.shear !== 0 && e.transform(1, 0, l.shear, 1, 0, 0), (g !== 1 || l.vScale !== 1) && e.scale(g, l.vScale), e.fillText(s, -o / 2 + n / 2, 0), e.restore(), b += o;
4310
4311
  }
4311
4312
  }
@@ -4343,7 +4344,7 @@ function _r(e, t, n, r, i, a, o) {
4343
4344
  }
4344
4345
  }
4345
4346
  function vr(e, t) {
4346
- return e.defaultTextColor ? X(e.defaultTextColor) : t.smartArtFallbackTextColor != null && _n(e) ? t.smartArtFallbackTextColor : null;
4347
+ return e.defaultTextColor ? Z(e.defaultTextColor) : t.smartArtFallbackTextColor != null && gn(e) ? t.smartArtFallbackTextColor : null;
4347
4348
  }
4348
4349
  function yr(e, t, n) {
4349
4350
  return {
@@ -4400,7 +4401,7 @@ function Cr(e, t, n, r, i, a) {
4400
4401
  return Sr(e, t + o * r, n + s * i);
4401
4402
  }
4402
4403
  function wr(e, t, n, r, i, a, o, s) {
4403
- let c = st(e, i, a).corners, l = (o > 0 ? vt(c, o / i, o / a) ?? c : c).map((e) => Sr(t, n + e.x, r + e.y)), u = l.map(([e]) => e), d = l.map(([, e]) => e), f = Math.min(...u), p = Math.min(...d), m = Math.max(...u), h = Math.max(...d), [g, _] = xr[s ?? "b"], v = yt(c, g, _);
4404
+ let c = ot(e, i, a).corners, l = (o > 0 ? _t(c, o / i, o / a) ?? c : c).map((e) => Sr(t, n + e.x, r + e.y)), u = l.map(([e]) => e), d = l.map(([, e]) => e), f = Math.min(...u), p = Math.min(...d), m = Math.max(...u), h = Math.max(...d), [g, _] = xr[s ?? "b"], v = vt(c, g, _);
4404
4405
  return {
4405
4406
  bbox: {
4406
4407
  x: f,
@@ -4413,10 +4414,10 @@ function wr(e, t, n, r, i, a, o, s) {
4413
4414
  }
4414
4415
  function Tr(e, t, n, r) {
4415
4416
  let i = Math.floor(n.x) - 1, a = Math.floor(n.y) - 1, o = Math.max(1, Math.ceil(n.x + n.w) - i + 1), s = Math.max(1, Math.ceil(n.y + n.h) - a + 1);
4416
- if (r && (i + o <= 0 || a + s <= 0 || i >= r.w || a >= r.h) || re(o, s).clamped) return e;
4417
+ if (r && (i + o <= 0 || a + s <= 0 || i >= r.w || a >= r.h) || te(o, s).clamped) return e;
4417
4418
  let c = null;
4418
4419
  try {
4419
- c = F(o, s);
4420
+ c = O(o, s);
4420
4421
  } catch {
4421
4422
  return e;
4422
4423
  }
@@ -4450,32 +4451,32 @@ function Er(e, t, n, r, i, a, o, s, c, l = !0, u = r) {
4450
4451
  }, v = (e) => {
4451
4452
  h(e), u(e);
4452
4453
  }, y = !1;
4453
- t.shadow && p ? (e.save(), e.setTransform(m), y = !qe(e, g, i, t.shadow, s, d, f, Math.atan2(c.b, c.a) * 180 / Math.PI, a), e.restore()) : t.shadow && (y = !0), t.reflection && p && (e.save(), e.setTransform(m), Xe(e, g, i, t.reflection, s, d, f), e.restore()), y ? rr(e, t.shadow ?? null, o) : t.glow && ir(e, t.glow, o), t.softEdge && p ? (e.save(), e.setTransform(m), Ye(e, g, i, t.softEdge, s, d, f, _), e.restore()) : n(e), (y || t.glow) && ar(e), t.innerShadow && l && p && (e.save(), e.setTransform(m), Je(e, v, i, t.innerShadow, s, d, f), e.restore());
4454
+ t.shadow && p ? (e.save(), e.setTransform(m), y = !Ke(e, g, i, t.shadow, s, d, f, Math.atan2(c.b, c.a) * 180 / Math.PI, a), e.restore()) : t.shadow && (y = !0), t.reflection && p && (e.save(), e.setTransform(m), Ye(e, g, i, t.reflection, s, d, f), e.restore()), y ? rr(e, t.shadow ?? null, o) : t.glow && ir(e, t.glow, o), t.softEdge && p ? (e.save(), e.setTransform(m), Je(e, g, i, t.softEdge, s, d, f, _), e.restore()) : n(e), (y || t.glow) && ar(e), t.innerShadow && l && p && (e.save(), e.setTransform(m), qe(e, v, i, t.innerShadow, s, d, f), e.restore());
4454
4455
  }
4455
- function Dr(e, t, r, i = "#000000", a, o = {
4456
+ function Dr(e, t, n, i = "#000000", a, o = {
4456
4457
  themeMajorFont: null,
4457
4458
  themeMinorFont: null,
4458
4459
  dpr: 1
4459
- }, s, l) {
4460
- let u = Y(t.x, r), d = Y(t.y, r), f = Y(t.width, r), p = Y(t.height, r), m = s && t.id !== void 0 ? (e) => s({
4460
+ }, s, c) {
4461
+ let u = X(t.x, n), d = X(t.y, n), f = X(t.width, n), p = X(t.height, n), m = s && t.id !== void 0 ? (e) => s({
4461
4462
  ...e,
4462
4463
  shapeId: t.id
4463
4464
  }) : s;
4464
4465
  if (p === 0 && t.textBody?.verticalAnchor === "b") {
4465
- if (t.stroke && (e.save(), Wr(e, t.stroke, r, {
4466
+ if (t.stroke && (e.save(), Wr(e, t.stroke, n, {
4466
4467
  x: u,
4467
4468
  y: d,
4468
4469
  w: f,
4469
4470
  h: 1
4470
4471
  }, t.rotation), e.beginPath(), e.moveTo(u, d), e.lineTo(u + f, d), e.stroke(), e.restore()), t.textBody) {
4471
- let n = vr(t, o);
4472
- Nr(e, t.textBody, u, d, f, p, r, n, t.rotation, t.flipH, t.flipV, i, a, o, m, !1, l);
4472
+ let r = vr(t, o);
4473
+ Nr(e, t.textBody, u, d, f, p, n, r, t.rotation, t.flipH, t.flipV, i, a, o, m, !1, c);
4473
4474
  }
4474
4475
  return;
4475
4476
  }
4476
- let h = t.scene3d && ct(t.scene3d.camera) ? t.scene3d : null;
4477
+ let h = t.scene3d && st(t.scene3d.camera) ? t.scene3d : null;
4477
4478
  if (h && f > 0 && p > 0) {
4478
- let n = e.getTransform(), s = Math.abs(n.a * n.d - n.b * n.c), c = s > 0 ? Math.sqrt(s) : 1, l = Pr(t.sp3d, t.scene3d?.lightRig, t.sp3d?.prstMaterial, r, c), m = Fr(t.sp3d, h.camera, f, p, r, c), g = yr(t.rotation, t.flipH, t.flipV);
4479
+ let r = e.getTransform(), s = Math.abs(r.a * r.d - r.b * r.c), c = s > 0 ? Math.sqrt(s) : 1, l = Pr(t.sp3d, t.scene3d?.lightRig, t.sp3d?.prstMaterial, n, c), m = Fr(t.sp3d, h.camera, f, p, n, c), g = yr(t.rotation, t.flipH, t.flipV);
4479
4480
  e.save(), g.outerRotation !== 0 && (e.translate(u + f / 2, d + p / 2), e.rotate(g.outerRotation * Math.PI / 180), e.translate(-(u + f / 2), -(d + p / 2)));
4480
4481
  let _ = {
4481
4482
  ...t,
@@ -4498,21 +4499,21 @@ function Dr(e, t, r, i = "#000000", a, o = {
4498
4499
  ..._,
4499
4500
  fill: null,
4500
4501
  stroke: null
4501
- }, b = (t.stroke ? t.stroke.width * r / 2 : 0) + (t.sp3d?.contourW ? t.sp3d.contourW * r : 0) + (m ? Math.hypot(m.offsetX, m.offsetY) / c : 0) + 2, x = (e, t, n) => Ir(e, h.camera, u, d, f, p, (e) => {
4502
- Dr(e, t, r, i, a, o, void 0);
4503
- }, n ? {
4502
+ }, b = (t.stroke ? t.stroke.width * n / 2 : 0) + (t.sp3d?.contourW ? t.sp3d.contourW * n : 0) + (m ? Math.hypot(m.offsetX, m.offsetY) / c : 0) + 2, x = (e, t, r) => Ir(e, h.camera, u, d, f, p, (e) => {
4503
+ Dr(e, t, n, i, a, o, void 0);
4504
+ }, r ? {
4504
4505
  bevels: l,
4505
4506
  extrusion: m ?? void 0,
4506
4507
  edgePadCss: b
4507
4508
  } : {}), S = (e) => x(e, v, !0), C = (e) => !t.textBody || x(e, y, !1);
4508
4509
  if (t.shadow || t.innerShadow || t.glow || t.softEdge || t.reflection) {
4509
- let n = e.getTransform(), i = Math.abs(n.a * n.d - n.b * n.c), a = i > 0 ? Math.sqrt(i) : 1, o = wr(h.camera, n, u, d, f, p, b, t.shadow?.algn), s = !1, c = Tr((e) => {
4510
+ let r = e.getTransform(), i = Math.abs(r.a * r.d - r.b * r.c), a = i > 0 ? Math.sqrt(i) : 1, o = wr(h.camera, r, u, d, f, p, b, t.shadow?.algn), s = !1, c = Tr((e) => {
4510
4511
  s = S(e) || s;
4511
- }, n, o.bbox, {
4512
+ }, r, o.bbox, {
4512
4513
  w: e.canvas.width || 0,
4513
4514
  h: e.canvas.height || 0
4514
4515
  });
4515
- if (Er(e, t, c, c, o.bbox, o.anchor, r, r * a, n, !!t.fill), s) {
4516
+ if (Er(e, t, c, c, o.bbox, o.anchor, n, n * a, r, !!t.fill), s) {
4516
4517
  C(e), e.restore();
4517
4518
  return;
4518
4519
  }
@@ -4523,8 +4524,8 @@ function Dr(e, t, r, i = "#000000", a, o = {
4523
4524
  e.restore();
4524
4525
  }
4525
4526
  e.save(), (t.rotation !== 0 || t.flipH || t.flipV) && (e.translate(u + f / 2, d + p / 2), e.rotate(t.rotation * Math.PI / 180), t.flipH && e.scale(-1, 1), t.flipV && e.scale(1, -1), e.translate(-(u + f / 2), -(d + p / 2)));
4526
- let g = t.geometry.toLowerCase(), _ = En(t.fill, e, u, d, f, p, t.rotation);
4527
- t.shadow || ir(e, t.glow ?? null, r);
4527
+ let g = t.geometry.toLowerCase(), _ = Tn(t.fill, e, u, d, f, p, t.rotation);
4528
+ t.shadow || ir(e, t.glow ?? null, n);
4528
4529
  let v = new Set([
4529
4530
  "line",
4530
4531
  "straightconnector1",
@@ -4549,22 +4550,22 @@ function Dr(e, t, r, i = "#000000", a, o = {
4549
4550
  "accentbordercallout1",
4550
4551
  "accentbordercallout2",
4551
4552
  "accentbordercallout3"
4552
- ]), b = (e) => y.has(e) || e === "line" || e === "straightconnector1" || e.startsWith("bentconnector"), x = !t.custGeom && c(g), w = (n, i, a = {
4553
+ ]), b = (e) => y.has(e) || e === "line" || e === "straightconnector1" || e.startsWith("bentconnector"), x = !t.custGeom && l(g), S = (r, i, a = {
4553
4554
  x: u,
4554
4555
  y: d,
4555
4556
  w: f,
4556
4557
  h: p
4557
4558
  }) => {
4558
- let { x: o, y: s, w: c, h: l } = a, m = i ?? (n === e && o === u && s === d && c === f && l === p ? _ : En(t.fill, n, o, s, c, l, t.rotation)), h = i ? null : t.stroke ? () => {
4559
- Wr(n, t.stroke, r, {
4559
+ let { x: o, y: s, w: c, h: l } = a, m = i ?? (r === e && o === u && s === d && c === f && l === p ? _ : Tn(t.fill, r, o, s, c, l, t.rotation)), h = i ? null : t.stroke ? () => {
4560
+ Wr(r, t.stroke, n, {
4560
4561
  x: o,
4561
4562
  y: s,
4562
4563
  w: c,
4563
4564
  h: l
4564
- }, t.rotation), n.stroke();
4565
- } : null, v = () => ar(n);
4565
+ }, t.rotation), r.stroke();
4566
+ } : null, v = () => ar(r);
4566
4567
  if (x && !i) {
4567
- S(n, g, o, s, c, l, [
4568
+ C(r, g, o, s, c, l, [
4568
4569
  t.adj,
4569
4570
  t.adj2,
4570
4571
  t.adj3,
@@ -4576,8 +4577,8 @@ function Dr(e, t, r, i = "#000000", a, o = {
4576
4577
  ], m, h, v, b(g) ? { skipTrailingStroke: !0 } : void 0);
4577
4578
  return;
4578
4579
  }
4579
- n.beginPath(), t.custGeom && t.custGeom.length > 0 ? Or(n, t.custGeom, o, s, c, l) : be(n, g, o, s, c, l, t.adj, t.adj2, t.adj3, t.adj4), m && g !== "arc" && (n.fillStyle = m, g === "donut" || g === "smileyface" || g === "frame" ? n.fill("evenodd") : n.fill(), i || v()), h && h();
4580
- }, T = e.getTransform(), E = Math.abs(T.a * T.d - T.b * T.c), D = E > 0 ? Math.sqrt(E) : 1, O = (t.shadow || t.reflection || t.softEdge || t.innerShadow ? x ? C(g, u, d, f, p, [
4580
+ r.beginPath(), t.custGeom && t.custGeom.length > 0 ? Or(r, t.custGeom, o, s, c, l) : ve(r, g, o, s, c, l, t.adj, t.adj2, t.adj3, t.adj4), m && g !== "arc" && (r.fillStyle = m, g === "donut" || g === "smileyface" || g === "frame" ? r.fill("evenodd") : r.fill(), i || v()), h && h();
4581
+ }, T = e.getTransform(), E = Math.abs(T.a * T.d - T.b * T.c), D = E > 0 ? Math.sqrt(E) : 1, O = (t.shadow || t.reflection || t.softEdge || t.innerShadow ? x ? w(g, u, d, f, p, [
4581
4582
  t.adj,
4582
4583
  t.adj2,
4583
4584
  t.adj3,
@@ -4586,20 +4587,20 @@ function Dr(e, t, r, i = "#000000", a, o = {
4586
4587
  t.adj6,
4587
4588
  t.adj7,
4588
4589
  t.adj8
4589
- ]) : t.custGeom && t.custGeom.length > 0 ? ve(t.custGeom, u, d, f, p) : null : null) ?? {
4590
+ ]) : t.custGeom && t.custGeom.length > 0 ? ge(t.custGeom, u, d, f, p) : null : null) ?? {
4590
4591
  x: u,
4591
4592
  y: d,
4592
4593
  w: f,
4593
4594
  h: p
4594
- }, k = t.stroke ? t.stroke.width * r / 2 : 0, A = t.stroke ? Math.max(t.stroke.headEnd ? xe(t.stroke.headEnd, t.stroke, r) : 0, t.stroke.tailEnd ? xe(t.stroke.tailEnd, t.stroke, r) : 0) : 0, j = t.sp3d?.contourW ? t.sp3d.contourW * r : 0, M = Math.max(k, A, j), N = M > 0 ? {
4595
+ }, k = t.stroke ? t.stroke.width * n / 2 : 0, A = t.stroke ? Math.max(t.stroke.headEnd ? ye(t.stroke.headEnd, t.stroke, n) : 0, t.stroke.tailEnd ? ye(t.stroke.tailEnd, t.stroke, n) : 0) : 0, j = t.sp3d?.contourW ? t.sp3d.contourW * n : 0, M = Math.max(k, A, j), N = M > 0 ? {
4595
4596
  x: O.x - M,
4596
4597
  y: O.y - M,
4597
4598
  w: O.w + M * 2,
4598
4599
  h: O.h + M * 2
4599
- } : O, P = br(T, N.x, N.y, N.w, N.h), F = r * D, I = h ? [] : Pr(t.sp3d, t.scene3d?.lightRig, t.sp3d?.prstMaterial, r, D), L = (t.stroke ? t.stroke.width * r / 2 : 0) + 2, R = (e) => {
4600
- let i = t.stroke?.fill ? En(t.stroke.fill, e, u, d, f, p, t.rotation) ?? void 0 : void 0;
4600
+ } : O, P = br(T, N.x, N.y, N.w, N.h), F = n * D, I = h ? [] : Pr(t.sp3d, t.scene3d?.lightRig, t.sp3d?.prstMaterial, n, D), L = (t.stroke ? t.stroke.width * n / 2 : 0) + 2, R = (e) => {
4601
+ let i = t.stroke?.fill ? Tn(t.stroke.fill, e, u, d, f, p, t.rotation) ?? void 0 : void 0;
4601
4602
  if (t.stroke && (v.has(g) || y.has(g))) {
4602
- let a = n(g, u, d, f, p, [
4603
+ let a = r(g, u, d, f, p, [
4603
4604
  t.adj,
4604
4605
  t.adj2,
4605
4606
  t.adj3,
@@ -4612,35 +4613,35 @@ function Dr(e, t, r, i = "#000000", a, o = {
4612
4613
  if (!a) return;
4613
4614
  let o = t.stroke.cmpd, s = g === "line" || g === "straightconnector1";
4614
4615
  if (b(g) && a.vertices.length >= 2 && !(o && s)) {
4615
- let n = a.vertices.map((e) => ({
4616
+ let r = a.vertices.map((e) => ({
4616
4617
  x: e.x,
4617
4618
  y: e.y
4618
4619
  }));
4619
4620
  if (t.stroke.tailEnd) {
4620
- let e = _e(t.stroke.tailEnd, t.stroke, r);
4621
- n[n.length - 1] = me(n[n.length - 1], n[n.length - 2], e);
4621
+ let e = he(t.stroke.tailEnd, t.stroke, n);
4622
+ r[r.length - 1] = fe(r[r.length - 1], r[r.length - 2], e);
4622
4623
  }
4623
4624
  if (t.stroke.headEnd) {
4624
- let e = _e(t.stroke.headEnd, t.stroke, r);
4625
- n[0] = me(n[0], n[1], e);
4625
+ let e = he(t.stroke.headEnd, t.stroke, n);
4626
+ r[0] = fe(r[0], r[1], e);
4626
4627
  }
4627
- Wr(e, t.stroke, r, {
4628
+ Wr(e, t.stroke, n, {
4628
4629
  x: u,
4629
4630
  y: d,
4630
4631
  w: f,
4631
4632
  h: p
4632
- }, t.rotation), e.beginPath(), e.moveTo(n[0].x, n[0].y);
4633
- for (let t = 1; t < n.length; t++) e.lineTo(n[t].x, n[t].y);
4633
+ }, t.rotation), e.beginPath(), e.moveTo(r[0].x, r[0].y);
4634
+ for (let t = 1; t < r.length; t++) e.lineTo(r[t].x, r[t].y);
4634
4635
  e.stroke();
4635
4636
  }
4636
- o && s && Ur(e, a.start, a.end, t.stroke, o, r, t.rotation), t.stroke.tailEnd && ye(e, a.end.x, a.end.y, a.end.angle, t.stroke.tailEnd, t.stroke, r, i), t.stroke.headEnd && ye(e, a.start.x, a.start.y, a.start.angle, t.stroke.headEnd, t.stroke, r, i);
4637
+ o && s && Ur(e, a.start, a.end, t.stroke, o, n, t.rotation), t.stroke.tailEnd && _e(e, a.end.x, a.end.y, a.end.angle, t.stroke.tailEnd, t.stroke, n, i), t.stroke.headEnd && _e(e, a.start.x, a.start.y, a.start.angle, t.stroke.headEnd, t.stroke, n, i);
4637
4638
  return;
4638
4639
  }
4639
4640
  if (!t.stroke || !t.custGeom || t.custGeom.length === 0 || (!t.stroke.headEnd || t.stroke.headEnd.type === "none") && (!t.stroke.tailEnd || t.stroke.tailEnd.type === "none")) return;
4640
- let { start: a, end: o } = Se(t.custGeom);
4641
- a && t.stroke.headEnd && t.stroke.headEnd.type !== "none" && ye(e, u + a.x * f, d + a.y * p, Math.atan2(a.dy * p, a.dx * f), t.stroke.headEnd, t.stroke, r, i), o && t.stroke.tailEnd && t.stroke.tailEnd.type !== "none" && ye(e, u + o.x * f, d + o.y * p, Math.atan2(o.dy * p, o.dx * f), t.stroke.tailEnd, t.stroke, r, i);
4641
+ let { start: a, end: o } = be(t.custGeom);
4642
+ a && t.stroke.headEnd && t.stroke.headEnd.type !== "none" && _e(e, u + a.x * f, d + a.y * p, Math.atan2(a.dy * p, a.dx * f), t.stroke.headEnd, t.stroke, n, i), o && t.stroke.tailEnd && t.stroke.tailEnd.type !== "none" && _e(e, u + o.x * f, d + o.y * p, Math.atan2(o.dy * p, o.dx * f), t.stroke.tailEnd, t.stroke, n, i);
4642
4643
  }, z = (e) => {
4643
- if (I.length > 0 && Lr(e, u, d, f, p, I, (e, t, n, r, i) => w(e, void 0, {
4644
+ if (I.length > 0 && Lr(e, u, d, f, p, I, (e, t, n, r, i) => S(e, void 0, {
4644
4645
  x: t,
4645
4646
  y: n,
4646
4647
  w: r,
@@ -4649,28 +4650,28 @@ function Dr(e, t, r, i = "#000000", a, o = {
4649
4650
  R(e), ar(e);
4650
4651
  return;
4651
4652
  }
4652
- w(e), R(e);
4653
+ S(e), R(e);
4653
4654
  };
4654
- if (Er(e, t, z, z, P, Cr(T, u, d, f, p, t.shadow?.algn), r, F, T, !!_, (e) => w(e, "#000")), t.textBody) {
4655
- let n = vr(t, o);
4655
+ if (Er(e, t, z, z, P, Cr(T, u, d, f, p, t.shadow?.algn), n, F, T, !!_, (e) => S(e, "#000")), t.textBody) {
4656
+ let r = vr(t, o);
4656
4657
  if (e.save(), t.flipH || t.flipV) {
4657
4658
  let n = u + f / 2, r = d + p / 2;
4658
4659
  e.translate(n, r), t.flipH && e.scale(-1, 1), t.flipV && e.scale(1, -1), e.translate(-n, -r);
4659
4660
  }
4660
- let s = u, c = d, h = f, _ = p;
4661
- if (t.textRect) s = Y(t.textRect.x, r), c = Y(t.textRect.y, r), h = Y(t.textRect.width, r), _ = Y(t.textRect.height, r);
4661
+ let s = u, l = d, h = f, _ = p;
4662
+ if (t.textRect) s = X(t.textRect.x, n), l = X(t.textRect.y, n), h = X(t.textRect.width, n), _ = X(t.textRect.height, n);
4662
4663
  else if (g === "ellipse") {
4663
4664
  let e = f * (1 - 1 / Math.SQRT2) / 2, t = p * (1 - 1 / Math.SQRT2) / 2;
4664
- s = u + e, c = d + t, h = f / Math.SQRT2, _ = p / Math.SQRT2;
4665
+ s = u + e, l = d + t, h = f / Math.SQRT2, _ = p / Math.SQRT2;
4665
4666
  } else {
4666
4667
  let e = _r(g, u, d, f, p, t.adj, t.adj2);
4667
- e && (s = e.tx, c = e.ty, h = e.tw, _ = e.th);
4668
+ e && (s = e.tx, l = e.ty, h = e.tw, _ = e.th);
4668
4669
  }
4669
- Nr(e, t.textBody, s, c, h, _, r, n, t.rotation, !1, !1, i, a, o, m, !1, l), e.restore();
4670
+ Nr(e, t.textBody, s, l, h, _, n, r, t.rotation, !1, !1, i, a, o, m, !1, c), e.restore();
4670
4671
  }
4671
4672
  e.restore();
4672
4673
  }
4673
- var Or = he;
4674
+ var Or = pe;
4674
4675
  function kr(e, t) {
4675
4676
  let n = `${e}`, r = e >= 1 && e <= 26 ? String.fromCharCode(96 + e) : n, i = e >= 1 && e <= 26 ? String.fromCharCode(64 + e) : n, a = Ar(e).toLowerCase(), o = Ar(e), s = n.replace(/[0-9]/g, (e) => String.fromCharCode(65296 + (e.charCodeAt(0) - 48)));
4676
4677
  switch (t) {
@@ -4738,7 +4739,7 @@ function jr(e) {
4738
4739
  }
4739
4740
  function Mr(e, t) {
4740
4741
  let n = jr(e);
4741
- if (e.bullet.type === "char") return t.clear(), n ? ge(e.bullet.char, e.bullet.fontFamily ?? null) : "";
4742
+ if (e.bullet.type === "char") return t.clear(), n ? me(e.bullet.char, e.bullet.fontFamily ?? null) : "";
4742
4743
  if (e.bullet.type === "autoNum") {
4743
4744
  if (!n) return "";
4744
4745
  let r = e.lvl;
@@ -4750,10 +4751,10 @@ function Nr(e, t, n, r, i, a, o, s = null, c = 0, l = !1, u = !1, d = "#000000",
4750
4751
  themeMajorFont: null,
4751
4752
  themeMinorFont: null,
4752
4753
  dpr: 1
4753
- }, h, g = !1, _, v = !1) {
4754
+ }, m, g = !1, _, v = !1) {
4754
4755
  let y = t.vert === "vert" || t.vert === "eaVert", b = t.vert === "vert270";
4755
4756
  if (y || b) {
4756
- let l = n + i / 2, u = r + a / 2, m = y ? 90 : -90, v = h ? (e) => h({
4757
+ let l = n + i / 2, u = r + a / 2, h = y ? 90 : -90, v = m ? (e) => m({
4757
4758
  ...e,
4758
4759
  inShapeX: e.inShapeX - a / 2 + i / 2,
4759
4760
  inShapeY: e.inShapeY - i / 2 + a / 2,
@@ -4762,7 +4763,7 @@ function Nr(e, t, n, r, i, a, o, s = null, c = 0, l = !1, u = !1, d = "#000000",
4762
4763
  shapeW: i,
4763
4764
  shapeH: a,
4764
4765
  rotation: c,
4765
- textBodyRotation: m
4766
+ textBodyRotation: h
4766
4767
  }) : void 0;
4767
4768
  if (g) return i;
4768
4769
  e.save(), e.translate(l, u), e.rotate(b ? -Math.PI / 2 : Math.PI / 2), Nr(e, {
@@ -4772,46 +4773,46 @@ function Nr(e, t, n, r, i, a, o, s = null, c = 0, l = !1, u = !1, d = "#000000",
4772
4773
  return;
4773
4774
  }
4774
4775
  let x = t.textWarp;
4775
- if (!g && x && Me(x.preset)) {
4776
+ if (!g && x && je(x.preset)) {
4776
4777
  gr(e, t, x.preset, x.adj ?? [], n, r, i, a, o, s ?? d, p);
4777
4778
  return;
4778
4779
  }
4779
- let S = Y(t.lIns, o), C = Y(t.rIns, o), w = Y(t.tIns, o), T = Y(t.bIns, o), E = t.wrap !== "none", D = t.autoFit === "sp" ? E && qn(e, t, i, S, C, o, p) : E, O = Math.max(1, t.numCol ?? 1), k = Y(t.spcCol ?? 0, o), A = t.defaultBold ?? !1, j = t.defaultItalic ?? !1, M = s ?? d, N = (r) => {
4780
- let a = (t.defaultFontSize ?? 18) * U * o * r, s = [], c = 0, l = /* @__PURE__ */ new Map();
4780
+ let S = X(t.lIns, o), C = X(t.rIns, o), w = X(t.tIns, o), T = X(t.bIns, o), E = t.wrap !== "none", D = t.autoFit === "sp" ? E && qn(e, t, i, S, C, o, p) : E, O = Math.max(1, t.numCol ?? 1), k = X(t.spcCol ?? 0, o), A = t.defaultBold ?? !1, j = t.defaultItalic ?? !1, M = s ?? d, N = (r) => {
4781
+ let a = (t.defaultFontSize ?? 18) * Y * o * r, s = [], c = 0, l = /* @__PURE__ */ new Map();
4781
4782
  for (let u = 0; u < t.paragraphs.length; u++) {
4782
- let d = t.paragraphs[u], m = Y(d.marL, o), h = Y(d.marR, o), g = Y(d.indent, o), _ = d.defFontSize == null ? a : d.defFontSize * U * o * r, v = d.defColor ? X(d.defColor) : M, y = Gn(d), b = (() => {
4783
+ let d = t.paragraphs[u], m = X(d.marL, o), h = X(d.marR, o), g = X(d.indent, o), _ = d.defFontSize == null ? a : d.defFontSize * Y * o * r, v = d.defColor ? Z(d.defColor) : M, y = Gn(d), b = (() => {
4783
4784
  for (let e of d.runs) if (e.type === "text" && e.fontSize != null) return e.fontSize;
4784
4785
  return null;
4785
- })(), x = b == null ? _ : b * U * o * r, w = (() => {
4786
+ })(), x = b == null ? _ : b * Y * o * r, w = (() => {
4786
4787
  for (let e of d.runs) if (e.type === "text" && e.color) return e.color;
4787
4788
  return null;
4788
- })(), T = w ? X(w) : v, E = (() => {
4789
+ })(), T = w ? Z(w) : v, E = (() => {
4789
4790
  for (let e of d.runs) if (e.type === "text" && e.fontFamily) return e.fontFamily;
4790
4791
  return d.defFontFamily ?? null;
4791
- })(), N = "", P = Z(!1, !1, x, "sans-serif", p), F = T, I = null;
4792
+ })(), N = "", P = Wn(!1, !1, x, "sans-serif", p), F = T, I = null;
4792
4793
  N = Mr(d, l);
4793
- let L = De(d.bullet);
4794
+ let L = Ee(d.bullet);
4794
4795
  if (L.type === "char") {
4795
4796
  let e = L;
4796
- P = Z(!1, !1, e.sizePts == null ? e.sizePct == null ? x : x * (e.sizePct / 100) : e.sizePts * U * o * r, N === e.char ? Pn(e.fontFamily ?? null, p) : "sans-serif", p), F = e.color ? X(e.color) : T;
4797
+ P = Wn(!1, !1, e.sizePts == null ? e.sizePct == null ? x : x * (e.sizePct / 100) : e.sizePts * Y * o * r, N === e.char ? Nn(e.fontFamily ?? null, p) : "sans-serif", p), F = e.color ? Z(e.color) : T;
4797
4798
  } else if (L.type === "autoNum") {
4798
4799
  let e = L;
4799
- P = Z(!1, !1, e.sizePts == null ? e.sizePct == null ? x : x * (e.sizePct / 100) : e.sizePts * U * o * r, Pn(e.fontFamily ?? E, p), p), F = L.color ? X(L.color) : T;
4800
+ P = Wn(!1, !1, e.sizePts == null ? e.sizePct == null ? x : x * (e.sizePct / 100) : e.sizePts * Y * o * r, Nn(e.fontFamily ?? E, p), p), F = L.color ? Z(L.color) : T;
4800
4801
  } else if (L.type === "blip") {
4801
- let e = L, t = e.sizePts == null ? e.sizePct == null ? x : x * (e.sizePct / 100) : e.sizePts * U * o * r;
4802
+ let e = L, t = e.sizePts == null ? e.sizePct == null ? x : x * (e.sizePct / 100) : e.sizePts * Y * o * r;
4802
4803
  I = {
4803
4804
  imagePath: e.imagePath,
4804
4805
  mimeType: e.mimeType,
4805
4806
  sizePx: t
4806
4807
  };
4807
4808
  }
4808
- let R = O > 1 ? (i - S - C - (O - 1) * k) / O : i - S - C, z = n + S + m, B = n + S + m + g, V = R - m - h, H = Qn(e, d, D ? V : Infinity, _, v, o, m, A, j, r, f, p, Kn(y, g)), ee = d.spaceBefore == null ? 0 : d.spaceBefore / 100 * U * o * r, W = d.spaceAfter == null ? 0 : d.spaceAfter / 100 * U * o * r;
4809
+ let R = O > 1 ? (i - S - C - (O - 1) * k) / O : i - S - C, z = n + S + m, B = n + S + m + g, V = R - m - h, H = Qn(e, d, D ? V : Infinity, _, v, o, m, A, j, r, f, p, Kn(y, g)), U = d.spaceBefore == null ? 0 : d.spaceBefore / 100 * Y * o * r, W = d.spaceAfter == null ? 0 : d.spaceAfter / 100 * Y * o * r;
4809
4810
  for (let n = 0; n < H.length; n++) {
4810
4811
  let r = H[n], i = n === 0, a = n === H.length - 1, l = 0, f = 0;
4811
4812
  for (let e of r.segments) {
4812
4813
  let t = e.math ? Math.max(e.sizePx, (e.math.ascent + e.math.descent) / 1.2) : e.sizePx;
4813
4814
  if (t > l && (l = t), !e.math) {
4814
- let t = te(e.fontFamily, e.sizePx);
4815
+ let t = q(e.fontFamily, e.sizePx);
4815
4816
  t > f && (f = t);
4816
4817
  }
4817
4818
  }
@@ -4822,8 +4823,8 @@ function Nr(e, t, n, r, i, a, o, s = null, c = 0, l = !1, u = !1, d = "#000000",
4822
4823
  }
4823
4824
  i && I && I.sizePx > l && (l = I.sizePx);
4824
4825
  let p = l * 1.2, m = Math.max(p, f), h;
4825
- h = d.spaceLine ? d.spaceLine.type === "pct" ? p * (d.spaceLine.val / 1e5) : d.spaceLine.val * U * o : m, t.autoFit === "norm" && t.lnSpcReduction != null && d.spaceLine?.type !== "pts" && (h *= 1 - t.lnSpcReduction);
4826
- let v = h + (a ? W : 0), b = i && u > 0 ? ee : 0, x = i ? Kn(y, g) : 0, S = r.segments.some((e) => e.text && e.text.length > 0 || e.math != null), C = i && S ? I : null;
4826
+ h = d.spaceLine ? d.spaceLine.type === "pct" ? p * (d.spaceLine.val / 1e5) : d.spaceLine.val * Y * o : m, t.autoFit === "norm" && t.lnSpcReduction != null && d.spaceLine?.type !== "pts" && (h *= 1 - t.lnSpcReduction);
4827
+ let v = h + (a ? W : 0), b = i && u > 0 ? U : 0, x = i ? Kn(y, g) : 0, S = r.segments.some((e) => e.text && e.text.length > 0 || e.math != null), C = i && S ? I : null;
4827
4828
  s.push({
4828
4829
  line: r,
4829
4830
  linePx: v,
@@ -4865,15 +4866,15 @@ function Nr(e, t, n, r, i, a, o, s = null, c = 0, l = !1, u = !1, d = "#000000",
4865
4866
  a === 0 && I === "b" ? (R = w + F + T, L = r - R) : R = t.autoFit === "sp" ? Math.max(a, w + F + T) : a;
4866
4867
  let z, B = Math.max(0, R - w - T);
4867
4868
  z = I === "ctr" ? L + w + (B - F) / 2 : I === "b" ? L + R - T - F : L + w, e.save(), e.textAlign = "left", e.textBaseline = "alphabetic";
4868
- let V = z, H = O > 1 ? (i - S - C - (O - 1) * k) / O + k : 0, ee = Math.max(0, R - w - T), W = P[P.length - 1], G = W ? Math.max(0, W.linePx - W.lineHeight) : 0, K = F - G, q = a === 0 || K <= ee + .5, ne = O > 1 && !q ? Math.ceil(P.length / O) : P.length, re = 0, ie = 0;
4869
+ let V = z, H = O > 1 ? (i - S - C - (O - 1) * k) / O + k : 0, U = Math.max(0, R - w - T), W = P[P.length - 1], G = W ? Math.max(0, W.linePx - W.lineHeight) : 0, J = F - G, ee = a === 0 || J <= U + .5, te = O > 1 && !ee ? Math.ceil(P.length / O) : P.length, ne = 0, re = 0;
4869
4870
  for (let s of P) {
4870
4871
  let { line: l, linePx: u, lineHeight: d, topGapPx: f, textXOffset: g, bulletLabel: y, bulletFont: b, bulletColor: x, bulletImage: S, alignment: C, isLastLine: w } = s;
4871
- O > 1 && re < O - 1 && ie >= ne && (re++, ie = 0, z = V), z += f, ie++;
4872
- let T = (t.rtlCol ? O - 1 - re : re) * H, E = s.textX + T, D = s.bulletX + T, k = s.textMaxW, A = s.para.rtl === !0, j = A || sn(l.segments), M = l.segments.some((e) => e.isTab);
4872
+ O > 1 && ne < O - 1 && re >= te && (ne++, re = 0, z = V), z += f, re++;
4873
+ let T = (t.rtlCol ? O - 1 - ne : ne) * H, E = s.textX + T, D = s.bulletX + T, k = s.textMaxW, A = s.para.rtl === !0, j = A || on(l.segments), M = l.segments.some((e) => e.isTab);
4873
4874
  if (M) {
4874
- let t = Y(s.para.marL, o), n = Y(s.para.marR, o), r = A ? n : t + g, i = k + t + n;
4875
+ let t = X(s.para.marL, o), n = X(s.para.marR, o), r = A ? n : t + g, i = k + t + n;
4875
4876
  e.font = l.segments.find((e) => e.isTab).font;
4876
- let a = e.measureText(" ").width, c = yn(l.segments.map((t) => {
4877
+ let a = e.measureText(" ").width, c = vn(l.segments.map((t) => {
4877
4878
  if (t.isTab) return {
4878
4879
  isTab: !0,
4879
4880
  width: 0
@@ -4889,9 +4890,9 @@ function Nr(e, t, n, r, i, a, o, s = null, c = 0, l = !1, u = !1, d = "#000000",
4889
4890
  width: t.text ? (t.leadingLetterSpacingPx ?? 0) + Q(e, t.text, n) : 0
4890
4891
  };
4891
4892
  }), (s.para.tabStops ?? []).map((e) => ({
4892
- pos: Y(e.pos, o),
4893
+ pos: X(e.pos, o),
4893
4894
  algn: e.algn
4894
- })), r, i, a, Y(s.para.defTabSz ?? 914400, o));
4895
+ })), r, i, a, X(s.para.defTabSz ?? 914400, o));
4895
4896
  for (let e = 0; e < l.segments.length; e++) l.segments[e].isTab && (l.segments[e].tabWidthPx = c[e]);
4896
4897
  }
4897
4898
  let N = 0, P = d * .8;
@@ -4911,7 +4912,7 @@ function Nr(e, t, n, r, i, a, o, s = null, c = 0, l = !1, u = !1, d = "#000000",
4911
4912
  let F = z + P, I = E + k, L = 0, R = null;
4912
4913
  if (j && A) {
4913
4914
  if (y) e.font = b, L = e.measureText(y).width;
4914
- else if (S && _ && (R = m(S.imagePath, _), R)) {
4915
+ else if (S && _ && (R = h(S.imagePath, _), R)) {
4915
4916
  let e = S.sizePx;
4916
4917
  L = R.height > 0 ? e * (R.width / R.height) : e;
4917
4918
  }
@@ -4921,7 +4922,7 @@ function Nr(e, t, n, r, i, a, o, s = null, c = 0, l = !1, u = !1, d = "#000000",
4921
4922
  e.direction = "rtl", e.fillText(y, I - L, F), e.direction = t;
4922
4923
  } else e.fillText(y, D, F);
4923
4924
  if (S && _) {
4924
- let t = m(S.imagePath, _);
4925
+ let t = h(S.imagePath, _);
4925
4926
  if (t) {
4926
4927
  let n = S.sizePx, r = t.height > 0 ? n * (t.width / t.height) : n, i = F - n;
4927
4928
  j && A ? e.drawImage(t, I - r, i, r, n) : e.drawImage(t, D, i, r, n);
@@ -4929,26 +4930,26 @@ function Nr(e, t, n, r, i, a, o, s = null, c = 0, l = !1, u = !1, d = "#000000",
4929
4930
  }
4930
4931
  let B = E + g, U;
4931
4932
  U = M ? A ? E + k - L - N : B : C === "ctr" ? B + (k - g - N) / 2 : C === "r" ? E + k - L - N : B;
4932
- let ee = C === "just" || C === "justLow" ? "just" : C === "thaiDist" ? "thaiDist" : C === "dist" ? "dist" : null, W = w || (l.endsWithBreak ?? !1), G = (ee && !j && !M ? dn(l.segments, k - g, N, ee, W) : null) ?? l.segments, K = j ? cn(l.segments, A) : null, q = (e, t) => {
4933
+ let W = C === "just" || C === "justLow" ? "just" : C === "thaiDist" ? "thaiDist" : C === "dist" ? "dist" : null, G = w || (l.endsWithBreak ?? !1), q = (W && !j && !M ? un(l.segments, k - g, N, W, G) : null) ?? l.segments, J = j ? sn(l.segments, A) : null, ee = (e, t) => {
4933
4934
  if (Math.abs(e - t) !== 1) return 0;
4934
4935
  let n = l.segments[Math.min(e, t)], r = l.segments[Math.max(e, t)];
4935
4936
  return n.isTab || n.math || r.isTab || r.math || n.sourceRunId == null || n.sourceRunId !== r.sourceRunId ? 0 : r.leadingLetterSpacingPx ?? 0;
4936
- }, te = G.length;
4937
- for (let t = 0; t < te; t++) {
4938
- let s = K ? K.order[t] : t, l = G[s], u = K ? K.rtl[s] : !1;
4937
+ }, ie = q.length;
4938
+ for (let t = 0; t < ie; t++) {
4939
+ let s = J ? J.order[t] : t, l = q[s], u = J ? J.rtl[s] : !1;
4939
4940
  if (j && (e.direction = u ? "rtl" : "ltr"), t > 0) {
4940
- let e = K ? K.order[t - 1] : t - 1;
4941
- U += q(e, s);
4941
+ let e = J ? J.order[t - 1] : t - 1;
4942
+ U += ee(e, s);
4942
4943
  }
4943
4944
  if (l.isTab) {
4944
4945
  U += l.tabWidthPx ?? 0;
4945
4946
  continue;
4946
4947
  }
4947
- let f = l.jext ?? 0, m = l.splitBefore, g = l.perGap ?? 0, _ = m && m.length > 0 ? m.length * g : 0;
4948
+ let f = l.jext ?? 0, h = l.splitBefore, g = l.perGap ?? 0, _ = h && h.length > 0 ? h.length * g : 0;
4948
4949
  if (l.math) {
4949
- let t = Dn.get(l.math.nodes), n = l.math.width, r = l.math.ascent + l.math.descent;
4950
+ let t = En.get(l.math.nodes), n = l.math.width, r = l.math.ascent + l.math.descent;
4950
4951
  if (t && n > 0 && r > 0) {
4951
- let i = F - l.math.ascent, a = On(t, l.color);
4952
+ let i = F - l.math.ascent, a = Dn(t, l.color);
4952
4953
  e.drawImage(a, U, i, n, r);
4953
4954
  }
4954
4955
  U += n, U += f;
@@ -4958,7 +4959,7 @@ function Nr(e, t, n, r, i, a, o, s = null, c = 0, l = !1, u = !1, d = "#000000",
4958
4959
  let y = F + (l.baseline ? -(l.baseline / 1e5) * l.sizePx : 0), b = l.letterSpacingPx ?? 0;
4959
4960
  if (l.highlight && l.text) {
4960
4961
  let t = Q(e, l.text, b) + _ + f;
4961
- Tn(e, U, y, t, l.sizePx, l.highlight, l.color);
4962
+ wn(e, U, y, t, l.sizePx, l.highlight, l.color);
4962
4963
  }
4963
4964
  let x = l.shadow, S = (e, t, n, r) => {
4964
4965
  let i = r === "fill" ? e.fillText.bind(e) : e.strokeText.bind(e);
@@ -4977,10 +4978,10 @@ function Nr(e, t, n, r, i, a, o, s = null, c = 0, l = !1, u = !1, d = "#000000",
4977
4978
  }
4978
4979
  }
4979
4980
  } else i(t, n, y);
4980
- }, C = (t) => Q(e, t, b), w = m && m.length > 0 ? Qt([...l.text], m, g, C) : null, T = [...l.text], E = !!m && m.length === T.length - 1 && T.length > 1, D = (e, t) => {
4981
+ }, C = (t) => Q(e, t, b), w = h && h.length > 0 ? Zt([...l.text], h, g, C) : null, T = [...l.text], E = !!h && h.length === T.length - 1 && T.length > 1, D = (e, t) => {
4981
4982
  if (v) {
4982
4983
  let n = E ? b + g : b;
4983
- wn(e, l.text, U, y, l.sizePx, n, t);
4984
+ Cn(e, l.text, U, y, l.sizePx, n, t);
4984
4985
  return;
4985
4986
  }
4986
4987
  if (E) {
@@ -5006,7 +5007,7 @@ function Nr(e, t, n, r, i, a, o, s = null, c = 0, l = !1, u = !1, d = "#000000",
5006
5007
  if (t > 0 && n > 0) {
5007
5008
  e.font = l.font;
5008
5009
  let r = e.measureText(l.text), i = Number.isFinite(r.actualBoundingBoxAscent) ? r.actualBoundingBoxAscent : l.sizePx * .8, a = Number.isFinite(r.actualBoundingBoxDescent) ? r.actualBoundingBoxDescent : l.sizePx * .2, s = Number.isFinite(r.actualBoundingBoxLeft) ? r.actualBoundingBoxLeft : 0, c = Number.isFinite(r.actualBoundingBoxRight) ? r.actualBoundingBoxRight : r.width, u = e.getTransform(), d = Math.abs(u.a * u.d - u.b * u.c), f = d > 0 ? Math.sqrt(d) : 1;
5009
- Wn(e, (e) => {
5010
+ Un(e, (e) => {
5010
5011
  e.font = l.font, e.fillStyle = l.color, D(e, "fill");
5011
5012
  }, {
5012
5013
  x: (U - s) * f,
@@ -5017,14 +5018,14 @@ function Nr(e, t, n, r, i, a, o, s = null, c = 0, l = !1, u = !1, d = "#000000",
5017
5018
  }
5018
5019
  }
5019
5020
  if (x) {
5020
- let t = x.dir * Math.PI / 180, n = Y(x.dist, o);
5021
- e.save(), e.shadowColor = X(x.color, x.alpha), e.shadowBlur = Y(x.blur, o), e.shadowOffsetX = Math.cos(t) * n, e.shadowOffsetY = Math.sin(t) * n;
5021
+ let t = x.dir * Math.PI / 180, n = X(x.dist, o);
5022
+ e.save(), e.shadowColor = Z(x.color, x.alpha), e.shadowBlur = X(x.blur, o), e.shadowOffsetX = Math.cos(t) * n, e.shadowOffsetY = Math.sin(t) * n;
5022
5023
  }
5023
5024
  D(e, "fill"), x && e.restore();
5024
5025
  let k = l.outline;
5025
- k && k.width > 0 && (e.save(), e.lineWidth = Math.max(.5, Y(k.width, o)), e.strokeStyle = k.color ? `#${k.color}` : l.color, e.lineJoin = "round", D(e, "stroke"), e.restore()), e.font = l.font;
5026
+ k && k.width > 0 && (e.save(), e.lineWidth = Math.max(.5, X(k.width, o)), e.strokeStyle = k.color ? `#${k.color}` : l.color, e.lineJoin = "round", D(e, "stroke"), e.restore()), e.font = l.font;
5026
5027
  let A = Q(e, l.text, b) + _;
5027
- if (h && l.text && h({
5028
+ if (m && l.text && m({
5028
5029
  text: l.text,
5029
5030
  inShapeX: U - n,
5030
5031
  inShapeY: z - r,
@@ -5038,15 +5039,15 @@ function Nr(e, t, n, r, i, a, o, s = null, c = 0, l = !1, u = !1, d = "#000000",
5038
5039
  shapeH: a,
5039
5040
  rotation: c,
5040
5041
  hyperlink: l.hyperlink
5041
- }), l.underline && Xt(e, U, y, A + f, l.sizePx, l.underlineColor ?? l.color, l.underlineStyle, p.dpr), l.strikethrough) {
5042
+ }), l.underline && Yt(e, U, y, A + f, l.sizePx, l.underlineColor ?? l.color, l.underlineStyle, p.dpr), l.strikethrough) {
5042
5043
  let t = Math.max(1, l.sizePx * .05);
5043
5044
  e.strokeStyle = l.color, e.lineWidth = t, e.setLineDash([]);
5044
5045
  let n = y - l.sizePx * .32;
5045
5046
  if (l.strikeDouble) {
5046
5047
  let r = t * .9, i = n - r, a = n + r;
5047
- e.beginPath(), e.moveTo(U, i + J(i, t, p.dpr)), e.lineTo(U + A + f, i + J(i, t, p.dpr)), e.moveTo(U, a + J(a, t, p.dpr)), e.lineTo(U + A + f, a + J(a, t, p.dpr)), e.stroke();
5048
+ e.beginPath(), e.moveTo(U, i + K(i, t, p.dpr)), e.lineTo(U + A + f, i + K(i, t, p.dpr)), e.moveTo(U, a + K(a, t, p.dpr)), e.lineTo(U + A + f, a + K(a, t, p.dpr)), e.stroke();
5048
5049
  } else {
5049
- let r = n + J(n, t, p.dpr);
5050
+ let r = n + K(n, t, p.dpr);
5050
5051
  e.beginPath(), e.moveTo(U, r), e.lineTo(U + A + f, r), e.stroke();
5051
5052
  }
5052
5053
  }
@@ -5058,7 +5059,7 @@ function Nr(e, t, n, r, i, a, o, s = null, c = 0, l = !1, u = !1, d = "#000000",
5058
5059
  }
5059
5060
  function Pr(e, t, n, r, i) {
5060
5061
  if (!e) return [];
5061
- let a = Rt(t?.rig ?? "threePt", t?.dir ?? "t", t?.rot), o = Wt(n), s = r * i, c = [];
5062
+ let a = Lt(t?.rig ?? "threePt", t?.dir ?? "t", t?.rot), o = Ut(n), s = r * i, c = [];
5062
5063
  return e.bevelT && e.bevelT.w > 0 && e.bevelT.h > 0 && c.push({
5063
5064
  widthPx: e.bevelT.w * s,
5064
5065
  heightPx: e.bevelT.h * s,
@@ -5076,7 +5077,7 @@ function Pr(e, t, n, r, i) {
5076
5077
  }
5077
5078
  function Fr(e, t, n, r, i, a) {
5078
5079
  if (!e || !e.extrusionH || e.extrusionH <= 0) return null;
5079
- let o = e.extrusionH * i * a, s = lt(t, n * a, r * a, o);
5080
+ let o = e.extrusionH * i * a, s = ct(t, n * a, r * a, o);
5080
5081
  if (Math.hypot(s.x, s.y) < .75) return null;
5081
5082
  let c = [
5082
5083
  64,
@@ -5099,12 +5100,12 @@ function Fr(e, t, n, r, i, a) {
5099
5100
  }
5100
5101
  function Ir(e, t, n, r, i, a, o, s = {}) {
5101
5102
  if (i <= 0 || a <= 0) return !1;
5102
- let c = e.getTransform(), l = Math.abs(c.a * c.d - c.b * c.c), u = l > 0 ? Math.sqrt(l) : 1, d = Math.max(0, Math.ceil((s.edgePadCss ?? 0) * u)), f = st(t, i, a), p = f.corners;
5103
+ let c = e.getTransform(), l = Math.abs(c.a * c.d - c.b * c.c), u = l > 0 ? Math.sqrt(l) : 1, d = Math.max(0, Math.ceil((s.edgePadCss ?? 0) * u)), f = ot(t, i, a), p = f.corners;
5103
5104
  if (d > 0) {
5104
- let e = d / u, t = vt(f.corners, e / i, e / a);
5105
+ let e = d / u, t = _t(f.corners, e / i, e / a);
5105
5106
  t ? p = t : d = 0;
5106
5107
  }
5107
- let m = d / u, h = Math.max(1, Math.ceil(i * u) + 2 * d), g = Math.max(1, Math.ceil(a * u) + 2 * d), _ = F(h, g);
5108
+ let m = d / u, h = Math.max(1, Math.ceil(i * u) + 2 * d), g = Math.max(1, Math.ceil(a * u) + 2 * d), _ = O(h, g);
5108
5109
  if (!_) return !1;
5109
5110
  let v = _.getContext("2d");
5110
5111
  if (!v) return !1;
@@ -5117,17 +5118,17 @@ function Ir(e, t, n, r, i, a, o, s = {}) {
5117
5118
  });
5118
5119
  if (s.extrusion) {
5119
5120
  let e = Math.ceil(Math.hypot(s.extrusion.offsetX, s.extrusion.offsetY)) + 2;
5120
- Yt(v, s.extrusion, x(e));
5121
+ Jt(v, s.extrusion, x(e));
5121
5122
  }
5122
- if (s.bevels && s.bevels.length > 0) for (let e of s.bevels) Jt(v, e, x(Math.ceil(e.widthPx) + 2));
5123
- return s.paintEdges && (v.save(), v.scale(u, u), v.translate(m, m), s.paintEdges(v, 0, 0, i, a), v.restore()), gt(_, e, h, g, p.map((e) => ({
5123
+ if (s.bevels && s.bevels.length > 0) for (let e of s.bevels) qt(v, e, x(Math.ceil(e.widthPx) + 2));
5124
+ return s.paintEdges && (v.save(), v.scale(u, u), v.translate(m, m), s.paintEdges(v, 0, 0, i, a), v.restore()), ht(_, e, h, g, p.map((e) => ({
5124
5125
  x: n + e.x,
5125
5126
  y: r + e.y
5126
5127
  }))), !0;
5127
5128
  }
5128
5129
  function Lr(e, t, n, r, i, a, o, s, c = 0) {
5129
5130
  if (r <= 0 || i <= 0 || a.length === 0) return !1;
5130
- let l = e.getTransform(), u = Math.abs(l.a * l.d - l.b * l.c), d = u > 0 ? Math.sqrt(u) : 1, f = Math.max(0, Math.ceil(c * d)), p = f / d, m = Math.max(1, Math.ceil(r * d) + 2 * f), h = Math.max(1, Math.ceil(i * d) + 2 * f), g = F(m, h);
5131
+ let l = e.getTransform(), u = Math.abs(l.a * l.d - l.b * l.c), d = u > 0 ? Math.sqrt(u) : 1, f = Math.max(0, Math.ceil(c * d)), p = f / d, m = Math.max(1, Math.ceil(r * d) + 2 * f), h = Math.max(1, Math.ceil(i * d) + 2 * f), g = O(m, h);
5131
5132
  if (!g) return !1;
5132
5133
  let _ = g.getContext("2d");
5133
5134
  if (!_) return !1;
@@ -5135,7 +5136,7 @@ function Lr(e, t, n, r, i, a, o, s, c = 0) {
5135
5136
  let v = Math.ceil(r * d), y = Math.ceil(i * d);
5136
5137
  for (let e of a) {
5137
5138
  let t = Math.ceil(e.widthPx) + 2;
5138
- Jt(_, e, {
5139
+ qt(_, e, {
5139
5140
  x: f - t,
5140
5141
  y: f - t,
5141
5142
  w: v + 2 * t,
@@ -5156,7 +5157,7 @@ function Br(e, t, n = zr(t)) {
5156
5157
  return W("base", e.posterPath, n, async () => {
5157
5158
  let n = await t(e.posterPath), r = e.posterMimeType || n.type || "application/octet-stream";
5158
5159
  return {
5159
- bitmap: await o(n.type === r ? n : new Blob([n], { type: r })),
5160
+ bitmap: await s(n.type === r ? n : new Blob([n], { type: r })),
5160
5161
  owned: !0
5161
5162
  };
5162
5163
  }).then((e) => {
@@ -5166,65 +5167,65 @@ function Br(e, t, n = zr(t)) {
5166
5167
  }
5167
5168
  async function Vr(e, t, n, r, i) {
5168
5169
  if (i) try {
5169
- let o = t.mimeType === "image/svg+xml", { widthPt: s, heightPt: l } = x(t.mimeType, t.srcRect, t.width / U, t.height / U), u;
5170
- if (ue(t)) try {
5171
- u = await a(t.svgImagePath, i);
5170
+ let a = t.mimeType === "image/svg+xml", { widthPt: s, heightPt: c } = S(t.mimeType, t.srcRect, t.width / Y, t.height / Y), u;
5171
+ if (ce(t)) try {
5172
+ u = await o(t.svgImagePath, i);
5172
5173
  } catch {
5173
- u = o ? await a(t.imagePath, i) : await Te(t.imagePath, t.mimeType, t.duotone, i, {
5174
+ u = a ? await o(t.imagePath, i) : await we(t.imagePath, t.mimeType, t.duotone, i, {
5174
5175
  widthPt: s,
5175
- heightPt: l
5176
+ heightPt: c
5176
5177
  });
5177
5178
  }
5178
- else u = o ? await a(t.imagePath, i) : await Te(t.imagePath, t.mimeType, t.duotone, i, {
5179
+ else u = a ? await o(t.imagePath, i) : await we(t.imagePath, t.mimeType, t.duotone, i, {
5179
5180
  widthPt: s,
5180
- heightPt: l
5181
+ heightPt: c
5181
5182
  });
5182
5183
  if (!u || r()) return;
5183
5184
  e.save(), t.alpha != null && (e.globalAlpha *= t.alpha);
5184
- let d = Y(t.x, n), f = Y(t.y, n), p = Y(t.width, n), m = Y(t.height, n);
5185
+ let d = X(t.x, n), f = X(t.y, n), p = X(t.width, n), m = X(t.height, n);
5185
5186
  (t.rotation !== 0 || t.flipH || t.flipV) && (e.translate(d + p / 2, f + m / 2), e.rotate(t.rotation * Math.PI / 180), t.flipH && e.scale(-1, 1), t.flipV && e.scale(1, -1), e.translate(-(d + p / 2), -(f + m / 2)));
5186
- let h = b(u, t.srcRect), g = (e, n, r, i, a) => {
5187
- t.custGeom && t.custGeom.length > 0 ? Or(e, t.custGeom, n, r, i, a) : t.prstGeom && v(e, t.prstGeom, n, r, i, a, t.prstAdjust ?? []) || e.rect(n, r, i, a);
5187
+ let h = x(u, t.srcRect), g = (e, n, r, i, a) => {
5188
+ t.custGeom && t.custGeom.length > 0 ? Or(e, t.custGeom, n, r, i, a) : t.prstGeom && y(e, t.prstGeom, n, r, i, a, t.prstAdjust ?? []) || e.rect(n, r, i, a);
5188
5189
  }, _ = (e, t, n, r, i) => {
5189
5190
  e.beginPath(), g(e, t, n, r, i);
5190
- }, y = (e, n, r, i, a) => {
5191
+ }, v = (e, n, r, i, a) => {
5191
5192
  (t.prstGeom || t.custGeom && t.custGeom.length > 0) && (_(e, n, r, i, a), e.clip());
5192
- }, S = (e, r, i, a, o) => {
5193
+ }, b = (e, r, i, a, o) => {
5193
5194
  t.stroke && (e.save(), Wr(e, t.stroke, n, {
5194
5195
  x: r,
5195
5196
  y: i,
5196
5197
  w: a,
5197
5198
  h: o
5198
5199
  }, t.rotation), _(e, r, i, a, o), e.stroke(), e.restore());
5199
- }, w = (e, r, i, a, o) => {
5200
+ }, C = (e, r, i, a, o) => {
5200
5201
  let s = t.sp3d;
5201
5202
  if (s && (s.contourW ?? 0) > 0 && s.contourClr) {
5202
5203
  let t = Math.max(.5, s.contourW * n);
5203
5204
  e.save(), e.beginPath();
5204
5205
  let c = t * 2 + Math.max(a, o);
5205
- e.rect(r - c, i - c, a + 2 * c, o + 2 * c), g(e, r, i, a, o), e.clip("evenodd"), e.beginPath(), _(e, r, i, a, o), e.strokeStyle = X(s.contourClr), e.lineWidth = t * 2, e.setLineDash([]), e.stroke(), e.restore();
5206
+ e.rect(r - c, i - c, a + 2 * c, o + 2 * c), g(e, r, i, a, o), e.clip("evenodd"), e.beginPath(), _(e, r, i, a, o), e.strokeStyle = Z(s.contourClr), e.lineWidth = t * 2, e.setLineDash([]), e.stroke(), e.restore();
5206
5207
  }
5207
- }, T = t.scene3d && ct(t.scene3d.camera) ? t.scene3d : null, E = (e, t, n, r, i) => {
5208
- e.save(), y(e, t, n, r, i), h ? e.drawImage(u, h.sx, h.sy, h.sw, h.sh, t, n, r, i) : e.drawImage(u, t, n, r, i), e.restore();
5208
+ }, T = t.scene3d && st(t.scene3d.camera) ? t.scene3d : null, E = (e, t, n, r, i) => {
5209
+ e.save(), v(e, t, n, r, i), h ? e.drawImage(u, h.sx, h.sy, h.sw, h.sh, t, n, r, i) : e.drawImage(u, t, n, r, i), e.restore();
5209
5210
  }, D = (e, t, n, r, i) => {
5210
- E(e, t, n, r, i), S(e, t, n, r, i), w(e, t, n, r, i);
5211
+ E(e, t, n, r, i), b(e, t, n, r, i), C(e, t, n, r, i);
5211
5212
  }, O = (e, t, n, r, i) => {
5212
- E(e, t, n, r, i), S(e, t, n, r, i);
5213
+ E(e, t, n, r, i), b(e, t, n, r, i);
5213
5214
  }, k = e.getTransform(), A = Math.abs(k.a * k.d - k.b * k.c), j = A > 0 ? Math.sqrt(A) : 1, M = Pr(t.sp3d, t.scene3d?.lightRig, t.sp3d ? t.sp3d.prstMaterial : void 0, n, j), N = T ? Fr(t.sp3d, T.camera, p, m, n, j) : null, P = t.stroke ? t.stroke.width * n / 2 : 0, F = t.sp3d?.contourW ? t.sp3d.contourW * n : 0, I = N ? Math.hypot(N.offsetX, N.offsetY) / j : 0, L = P + F + I + 2, R = (e) => {
5214
5215
  if (T) {
5215
5216
  if (Ir(e, T.camera, d, f, p, m, O, {
5216
5217
  bevels: M,
5217
5218
  extrusion: N ?? void 0,
5218
- paintEdges: w,
5219
+ paintEdges: C,
5219
5220
  edgePadCss: L
5220
5221
  })) return;
5221
- } else if (M.length > 0 && Lr(e, d, f, p, m, M, O, w, L)) return;
5222
+ } else if (M.length > 0 && Lr(e, d, f, p, m, M, O, C, L)) return;
5222
5223
  D(e, d, f, p, m);
5223
5224
  }, z = (e, t, n, r, i, a) => {
5224
- e.save(), y(e, n, r, i, a), e.fillStyle = t, e.fillRect(n, r, i, a), e.restore();
5225
+ e.save(), v(e, n, r, i, a), e.fillStyle = t, e.fillRect(n, r, i, a), e.restore();
5225
5226
  }, B = (e, t) => {
5226
5227
  T && Ir(e, T.camera, d, f, p, m, (e, n, r, i, a) => z(e, t, n, r, i, a)) || z(e, t, d, f, p, m);
5227
- }, V = e.getTransform(), H = Math.abs(V.a * V.d - V.b * V.c), ee = H > 0 ? Math.sqrt(H) : 1, W = P + F, G = (t.custGeom && t.custGeom.length > 0 ? ve(t.custGeom, d, f, p, m) : t.prstGeom && c(t.prstGeom.toLowerCase()) ? C(t.prstGeom.toLowerCase(), d, f, p, m, t.prstAdjust ?? []) : null) ?? {
5228
+ }, V = e.getTransform(), H = Math.abs(V.a * V.d - V.b * V.c), U = H > 0 ? Math.sqrt(H) : 1, W = P + F, G = (t.custGeom && t.custGeom.length > 0 ? ge(t.custGeom, d, f, p, m) : t.prstGeom && l(t.prstGeom.toLowerCase()) ? w(t.prstGeom.toLowerCase(), d, f, p, m, t.prstAdjust ?? []) : null) ?? {
5228
5229
  x: d,
5229
5230
  y: f,
5230
5231
  w: p,
@@ -5232,29 +5233,29 @@ async function Vr(e, t, n, r, i) {
5232
5233
  }, K = T ? wr(T.camera, V, d, f, p, m, L, t.shadow?.algn) : {
5233
5234
  bbox: br(V, G.x - W, G.y - W, G.w + W * 2, G.h + W * 2),
5234
5235
  anchor: Cr(V, d, f, p, m, t.shadow?.algn)
5235
- }, q = n * ee, J = !!(t.shadow || t.innerShadow || t.glow || t.softEdge || t.reflection), te = (e) => B(e, "#000");
5236
+ }, q = n * U, J = !!(t.shadow || t.innerShadow || t.glow || t.softEdge || t.reflection), ee = (e) => B(e, "#000");
5236
5237
  Er(e, t, T && J ? Tr(R, V, K.bbox, {
5237
5238
  w: e.canvas.width || 0,
5238
5239
  h: e.canvas.height || 0
5239
- }) : R, T && J ? Tr(te, V, K.bbox, {
5240
+ }) : R, T && J ? Tr(ee, V, K.bbox, {
5240
5241
  w: e.canvas.width || 0,
5241
5242
  h: e.canvas.height || 0
5242
- }) : te, K.bbox, K.anchor, n, q, V), e.restore();
5243
+ }) : ee, K.bbox, K.anchor, n, q, V), e.restore();
5243
5244
  } catch (e) {
5244
- if (d(e)) throw e;
5245
+ if (f(e)) throw e;
5245
5246
  }
5246
5247
  }
5247
5248
  async function Hr(e, t, n, r, i, a, o) {
5248
- let s = Y(t.x, n), c = Y(t.y, n), l = Y(t.width, n), u = Y(t.height, n), f;
5249
+ let s = X(t.x, n), c = X(t.y, n), l = X(t.width, n), u = X(t.height, n), d;
5249
5250
  if (t.posterPath && i) try {
5250
- f = await Br(t, i, o);
5251
+ d = await Br(t, i, o);
5251
5252
  } catch (e) {
5252
- if (d(e)) throw e;
5253
+ if (f(e)) throw e;
5253
5254
  }
5254
- r() || (e.save(), Gr(e, t, n), f ? e.drawImage(f, s, c, l, u) : (e.fillStyle = t.mediaKind === "video" ? "#111" : "#f0f0f0", e.fillRect(s, c, l, u)), a || rn(e, s + l / 2, c + u / 2, l, u, "paused"), e.restore());
5255
+ r() || (e.save(), Gr(e, t, n), d ? e.drawImage(d, s, c, l, u) : (e.fillStyle = t.mediaKind === "video" ? "#111" : "#f0f0f0", e.fillRect(s, c, l, u)), a || nn(e, s + l / 2, c + u / 2, l, u, "paused"), e.restore());
5255
5256
  }
5256
5257
  function Ur(e, t, n, r, i, a, o) {
5257
- let s = Math.max(.5, Y(r.width, a)), c = n.x - t.x, l = n.y - t.y, u = Math.hypot(c, l);
5258
+ let s = Math.max(.5, X(r.width, a)), c = n.x - t.x, l = n.y - t.y, u = Math.hypot(c, l);
5258
5259
  if (u === 0) return;
5259
5260
  let d = -l / u, f = c / u, p;
5260
5261
  switch (i) {
@@ -5303,7 +5304,7 @@ function Ur(e, t, n, r, i, a, o) {
5303
5304
  break;
5304
5305
  default: return;
5305
5306
  }
5306
- e.save(), e.globalCompositeOperation = "destination-out", e.strokeStyle = "#000", e.lineWidth = s + .5, e.setLineDash([]), e.beginPath(), e.moveTo(t.x, t.y), e.lineTo(n.x, n.y), e.stroke(), e.globalCompositeOperation = "source-over", e.strokeStyle = (r.fill ? En(r.fill, e, Math.min(t.x, n.x), Math.min(t.y, n.y), Math.max(1, Math.abs(n.x - t.x)), Math.max(1, Math.abs(n.y - t.y)), o) : null) ?? X(r.color);
5307
+ e.save(), e.globalCompositeOperation = "destination-out", e.strokeStyle = "#000", e.lineWidth = s + .5, e.setLineDash([]), e.beginPath(), e.moveTo(t.x, t.y), e.lineTo(n.x, n.y), e.stroke(), e.globalCompositeOperation = "source-over", e.strokeStyle = (r.fill ? Tn(r.fill, e, Math.min(t.x, n.x), Math.min(t.y, n.y), Math.max(1, Math.abs(n.x - t.x)), Math.max(1, Math.abs(n.y - t.y)), o) : null) ?? Z(r.color);
5307
5308
  for (let r of p) {
5308
5309
  let i = d * (s * r.offset), a = f * (s * r.offset);
5309
5310
  e.lineWidth = Math.max(.5, s * r.widthFrac), e.beginPath(), e.moveTo(t.x + i, t.y + a), e.lineTo(n.x + i, n.y + a), e.stroke();
@@ -5311,14 +5312,14 @@ function Ur(e, t, n, r, i, a, o) {
5311
5312
  e.restore();
5312
5313
  }
5313
5314
  function Wr(e, t, n, r, i = 0) {
5314
- if (ie(e, t, n), t?.fill && r) {
5315
- let n = En(t.fill, e, r.x, r.y, r.w, r.h, i);
5315
+ if (ne(e, t, n), t?.fill && r) {
5316
+ let n = Tn(t.fill, e, r.x, r.y, r.w, r.h, i);
5316
5317
  n && (e.strokeStyle = n);
5317
5318
  }
5318
5319
  }
5319
5320
  function Gr(e, t, n) {
5320
5321
  if (t.rotation === 0 && !t.flipH && !t.flipV) return;
5321
- let r = Y(t.x, n), i = Y(t.y, n), a = Y(t.width, n), o = Y(t.height, n);
5322
+ let r = X(t.x, n), i = X(t.y, n), a = X(t.width, n), o = X(t.height, n);
5322
5323
  e.translate(r + a / 2, i + o / 2), e.rotate(t.rotation * Math.PI / 180), t.flipH && e.scale(-1, 1), t.flipV && e.scale(1, -1), e.translate(-(r + a / 2), -(i + o / 2));
5323
5324
  }
5324
5325
  function Kr(e, t, n, r, i = {
@@ -5327,11 +5328,11 @@ function Kr(e, t, n, r, i = {
5327
5328
  dpr: 1
5328
5329
  }) {
5329
5330
  e.save(), Gr(e, t, n);
5330
- let a = Y(t.x, n), o = Y(t.y, n), s = t.cols.map((e) => Y(e, n)), c = s.length, l = (e, t) => {
5331
+ let a = X(t.x, n), o = X(t.y, n), s = t.cols.map((e) => X(e, n)), c = s.length, l = (e, t) => {
5331
5332
  let n = 0;
5332
5333
  for (let r = 0; r < t; r++) n += s[e + r] ?? 0;
5333
5334
  return n;
5334
- }, u = t.rows.map((e) => Y(e.height, n));
5335
+ }, u = t.rows.map((e) => X(e.height, n));
5335
5336
  for (let a = 0; a < t.rows.length; a++) {
5336
5337
  let o = t.rows[a];
5337
5338
  for (let t = 0; t < o.cells.length; t++) {
@@ -5393,9 +5394,9 @@ function Kr(e, t, n, r, i = {
5393
5394
  }
5394
5395
  }
5395
5396
  for (let { cell: a, colX: o, rowY: s, cellW: c, cellH: l } of h) {
5396
- let u = En(a.fill, e, o, s, c, l, t.rotation);
5397
+ let u = Tn(a.fill, e, o, s, c, l, t.rotation);
5397
5398
  if (u && (e.fillStyle = u, e.fillRect(o, s, c, l)), a.textBody) {
5398
- let t = a.textColor ? X(a.textColor) : null;
5399
+ let t = a.textColor ? Z(a.textColor) : null;
5399
5400
  Nr(e, a.textBody, o, s, c, l, n, t, 0, !1, !1, "#000000", r, i);
5400
5401
  }
5401
5402
  }
@@ -5410,7 +5411,7 @@ function Kr(e, t, n, r, i = {
5410
5411
  w: Math.max(1, Math.abs(o - i)),
5411
5412
  h: Math.max(1, Math.abs(s - a))
5412
5413
  }, t.rotation);
5413
- let c = i === o ? J(i, e.lineWidth, _) : 0, l = a === s ? J(a, e.lineWidth, _) : 0;
5414
+ let c = i === o ? K(i, e.lineWidth, _) : 0, l = a === s ? K(a, e.lineWidth, _) : 0;
5414
5415
  e.beginPath(), e.moveTo(i + c, a + l), e.lineTo(o + c, s + l), e.stroke();
5415
5416
  };
5416
5417
  for (let r of h) {
@@ -5425,7 +5426,7 @@ function Kr(e, t, n, r, i = {
5425
5426
  for (; a < n;) {
5426
5427
  let r = g[e][a], o = a + 1;
5427
5428
  for (; o < n && g[e][o] === r;) o++;
5428
- let s = v(e, a), c = mn(i.borderB, s ? s.cell.borderT : null);
5429
+ let s = v(e, a), c = pn(i.borderB, s ? s.cell.borderT : null);
5429
5430
  if (c) {
5430
5431
  let e = p(a, o - a);
5431
5432
  y(c, e, t, e + l(a, o - a), t);
@@ -5441,7 +5442,7 @@ function Kr(e, t, n, r, i = {
5441
5442
  for (; t <= r.lastRi;) {
5442
5443
  let n = g[t][x], i = t;
5443
5444
  for (; i + 1 <= r.lastRi && g[i + 1][x] === n;) i++;
5444
- let a = v(t, x), o = mn(h, a ? S(a.cell) : null);
5445
+ let a = v(t, x), o = pn(h, a ? S(a.cell) : null);
5445
5446
  o && y(o, e, m[t], e, m[i] + u[i]), t = i + 1;
5446
5447
  }
5447
5448
  }
@@ -5487,85 +5488,85 @@ function Xr(e, t, n, r, i) {
5487
5488
  e.restore();
5488
5489
  }
5489
5490
  async function Zr(e, t, n, r, i = {}, a) {
5490
- let o = i.fetchImage ?? (i.fetchMedia ? zr(i.fetchMedia) : void 0), s = o ? g(o) : void 0;
5491
+ let o = i.fetchImage ?? (i.fetchMedia ? zr(i.fetchMedia) : void 0), s = o ? _(o) : void 0;
5491
5492
  try {
5492
5493
  return await Qr(e, t, n, r, i, a, o);
5493
5494
  } finally {
5494
5495
  s?.();
5495
5496
  }
5496
5497
  }
5497
- async function Qr(e, n, r, i, o = {}, s, c) {
5498
+ async function Qr(e, t, r, i, a = {}, s, c) {
5498
5499
  let l = (Jr.get(e) ?? 0) + 1;
5499
5500
  Jr.set(e, l);
5500
- let f = () => Jr.get(e) !== l, p = o.width ?? ((z(e) ? e.offsetWidth : 0) || 960), m = p / r, h = Math.round(p), g = Math.round(i * m), _ = o.dpr ?? V(), v = re(h * _, g * _), y = v.clamped ? _ * v.scale : _;
5501
+ let u = () => Jr.get(e) !== l, p = a.width ?? ((z(e) ? e.offsetWidth : 0) || 960), m = p / r, h = Math.round(p), g = Math.round(i * m), _ = a.dpr ?? V(), v = te(h * _, g * _), y = v.clamped ? _ * v.scale : _;
5501
5502
  e.width = v.width, e.height = v.height, z(e) && (e.style.width = `${h}px`, e.style.display || (e.style.display = "block"));
5502
5503
  let b = e.getContext("2d");
5503
5504
  if (!b) throw Error("Could not get 2D context");
5504
- if (b.scale(y, y), n.parseError) return Xr(b, h, g, n.slideNumber, n.parseError), e;
5505
- let S = o.defaultTextColor ? `#${o.defaultTextColor}` : "#000000", C = {
5506
- themeMajorFont: o.majorFont ?? null,
5507
- themeMinorFont: o.minorFont ?? null,
5508
- themeHlinkColor: o.hlinkColor ?? null,
5505
+ if (b.scale(y, y), t.parseError) return Xr(b, h, g, t.slideNumber, t.parseError), e;
5506
+ let x = a.defaultTextColor ? `#${a.defaultTextColor}` : "#000000", C = {
5507
+ themeMajorFont: a.majorFont ?? null,
5508
+ themeMinorFont: a.minorFont ?? null,
5509
+ themeHlinkColor: a.hlinkColor ?? null,
5509
5510
  dpr: y,
5510
- smartArtFallbackTextColor: vn(n.background, S)
5511
+ smartArtFallbackTextColor: _n(t.background, x)
5511
5512
  };
5512
- if (await $n(b, n.background, h, g, m, f, o.fetchImage), f() || (o.math && await Nn(n, o.math), f())) return e;
5513
- let w = n.slideNumber;
5514
- for (let e of n.elements) if (e.type === "picture" && o.fetchImage) {
5513
+ if (await $n(b, t.background, h, g, m, u, a.fetchImage), u() || (a.math && await Mn(t, a.math), u())) return e;
5514
+ let w = t.slideNumber;
5515
+ for (let e of t.elements) if (e.type === "picture" && a.fetchImage) {
5515
5516
  let t = e, n = t.mimeType === "image/svg+xml";
5516
- if (ue(t)) a(t.svgImagePath, o.fetchImage).catch(() => void 0);
5517
- else if (n) a(t.imagePath, o.fetchImage).catch(() => void 0);
5517
+ if (ce(t)) o(t.svgImagePath, a.fetchImage).catch(() => void 0);
5518
+ else if (n) o(t.imagePath, a.fetchImage).catch(() => void 0);
5518
5519
  else {
5519
- let e = x(t.mimeType, t.srcRect, t.width / U, t.height / U);
5520
- Te(t.imagePath, t.mimeType, t.duotone, o.fetchImage, {
5520
+ let e = S(t.mimeType, t.srcRect, t.width / Y, t.height / Y);
5521
+ we(t.imagePath, t.mimeType, t.duotone, a.fetchImage, {
5521
5522
  widthPt: e.widthPt,
5522
5523
  heightPt: e.heightPt
5523
5524
  }).catch(() => void 0);
5524
5525
  }
5525
5526
  } else if (e.type === "media") {
5526
5527
  let t = e;
5527
- t.posterPath && o.fetchMedia && Br(t, o.fetchMedia, c).catch(() => void 0);
5528
+ t.posterPath && a.fetchMedia && Br(t, a.fetchMedia, c).catch(() => void 0);
5528
5529
  }
5529
- if (o.fetchImage) {
5530
- let r = o.fetchImage, i = /* @__PURE__ */ new Set();
5531
- for (let e of n.elements) if (!(e.type !== "shape" || !e.textBody)) for (let t of e.textBody.paragraphs) {
5532
- let e = De(t.bullet);
5530
+ if (a.fetchImage) {
5531
+ let r = a.fetchImage, i = /* @__PURE__ */ new Set();
5532
+ for (let e of t.elements) if (!(e.type !== "shape" || !e.textBody)) for (let t of e.textBody.paragraphs) {
5533
+ let e = Ee(t.bullet);
5533
5534
  e.type === "blip" && i.add(`${e.imagePath} ${e.mimeType}`);
5534
5535
  }
5535
5536
  if (i.size > 0 && (await Promise.all([...i].map((e) => {
5536
- let [n, i] = e.split(" ");
5537
- return t(n, i, r).catch((e) => {
5538
- if (d(e)) throw e;
5537
+ let [t, i] = e.split(" ");
5538
+ return n(t, i, r).catch((e) => {
5539
+ if (f(e)) throw e;
5539
5540
  });
5540
- })), f())) return e;
5541
+ })), u())) return e;
5541
5542
  }
5542
- for (let [t, r] of n.elements.entries()) {
5543
- if (f()) return e;
5544
- if (r.type === "shape") Dr(b, r, m, S, w, C, s ? (e) => s({
5543
+ for (let [n, r] of t.elements.entries()) {
5544
+ if (u()) return e;
5545
+ if (r.type === "shape") Dr(b, r, m, x, w, C, s ? (e) => s({
5545
5546
  ...e,
5546
- elementIndex: t,
5547
- origin: n.elementSources?.[t]?.origin ?? "slide"
5548
- }) : void 0, o.fetchImage);
5549
- else if (r.type === "picture") await Vr(b, r, m, f, o.fetchImage);
5547
+ elementIndex: n,
5548
+ origin: t.elementSources?.[n]?.origin ?? "slide"
5549
+ }) : void 0, a.fetchImage);
5550
+ else if (r.type === "picture") await Vr(b, r, m, u, a.fetchImage);
5550
5551
  else if (r.type === "table") Kr(b, r, m, w, C);
5551
- else if (r.type === "media") await Hr(b, r, m, f, o.fetchMedia, o.skipMediaControls, o.fetchImage);
5552
+ else if (r.type === "media") await Hr(b, r, m, u, a.fetchMedia, a.skipMediaControls, a.fetchImage);
5552
5553
  else if (r.type === "chart") {
5553
- let e = U * m;
5554
- b.save(), Gr(b, r, m), u(b, r.chart, {
5555
- x: Y(r.x, m),
5556
- y: Y(r.y, m),
5557
- w: Y(r.width, m),
5558
- h: Y(r.height, m)
5559
- }, e, r.rotation), b.restore();
5554
+ let e = Y * m;
5555
+ b.save(), Gr(b, r, m), d(b, r.chart, {
5556
+ x: X(r.x, m),
5557
+ y: X(r.y, m),
5558
+ w: X(r.width, m),
5559
+ h: X(r.height, m)
5560
+ }, e, r.rotation, a.threeD, a.regionMap), b.restore();
5560
5561
  }
5561
5562
  }
5562
- return f() || o.dim && qr(b, o.dim, h, g), e;
5563
+ return u() || a.dim && qr(b, a.dim, h, g), e;
5563
5564
  }
5564
5565
  //#endregion
5565
5566
  //#region packages/pptx/src/google-fonts.ts
5566
5567
  var $r = {
5567
- ...q,
5568
- ...G
5568
+ ...j,
5569
+ ...I
5569
5570
  };
5570
5571
  Object.freeze({
5571
5572
  archiveEntryCount: 0,
@@ -5687,9 +5688,9 @@ var oi = 1024 * 1024, si = class {
5687
5688
  sessionId: r,
5688
5689
  operationId: r,
5689
5690
  generation: this.options.generation ?? 1
5690
- }, a = new p(this.options.transport, {
5691
+ }, a = new m(this.options.transport, {
5691
5692
  ...i,
5692
- maxByteCredit: l,
5693
+ maxByteCredit: u,
5693
5694
  timeoutMs: n
5694
5695
  });
5695
5696
  this.active.add(a);
@@ -5731,7 +5732,7 @@ async function li(e) {
5731
5732
  }
5732
5733
  }
5733
5734
  function ui(e) {
5734
- return M(e, oi, l);
5735
+ return P(e, oi, u);
5735
5736
  }
5736
5737
  //#endregion
5737
- export { ii as a, Zr as c, ti as i, rn as l, ci as n, $r as o, ai as r, Yr as s, si as t };
5738
+ export { ii as a, Zr as c, ti as i, nn as l, ci as n, $r as o, ai as r, Yr as s, si as t };