@silurus/ooxml 0.89.5 → 0.89.7

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 (27) hide show
  1. package/dist/assets/render-worker-B3hF7Akg.js +35 -0
  2. package/dist/assets/render-worker-DNGf06QT.js +15 -0
  3. package/dist/{comment-ui-runtime-u7zk49cg.js → comment-ui-runtime-DKlEfBPp.js} +2 -2
  4. package/dist/{document-model-source-qsnWuGuH.js → document-model-source-xnkMoTZ_.js} +3 -3
  5. package/dist/{document-pull-client-Ckq8THk6.js → document-pull-client-CzhPbnY_.js} +6696 -6268
  6. package/dist/{docx-DRojqjH-.js → docx-BWyACb-n.js} +3 -3
  7. package/dist/{docx-ChGrdRyp.js → docx-BgCQiuuN.js} +4 -4
  8. package/dist/{docx-model-source-D0dmXDOs.js → docx-model-source-DCRFgO7-.js} +2 -2
  9. package/dist/docx.mjs +1 -1
  10. package/dist/docx_parser_bg.wasm +0 -0
  11. package/dist/{host-layout-measure-DP918TOq.js → host-layout-measure-CXKOWA5J.js} +1 -1
  12. package/dist/index.mjs +2 -2
  13. package/dist/internal-companion.mjs +2 -2
  14. package/dist/node.mjs +2 -2
  15. package/dist/pptx_parser_bg.wasm +0 -0
  16. package/dist/{render-worker-host-DSrgUCkT.js → render-worker-host-CZHIKTtZ.js} +1 -1
  17. package/dist/{render-worker-host-DYUY1TuP.js → render-worker-host-G1fnymI8.js} +1 -1
  18. package/dist/{renderer-BYt3nsdR.js → renderer-B4KIpz-2.js} +1159 -1014
  19. package/dist/{workbook-model-source-CbEnWvU-.js → workbook-model-source-J9ir5Kov.js} +3 -3
  20. package/dist/{xlsx-Deg8dBy8.js → xlsx-BbQ7RcNc.js} +1 -1
  21. package/dist/{xlsx-CVVWeouT.js → xlsx-ClQiNSrr.js} +174 -169
  22. package/dist/{xlsx-model-source-D2rRp5-N.js → xlsx-model-source-C-Riw89p.js} +2 -2
  23. package/dist/xlsx.mjs +1 -1
  24. package/dist/xlsx_parser_bg.wasm +0 -0
  25. package/package.json +1 -1
  26. package/dist/assets/render-worker-CeSlHUkL.js +0 -15
  27. package/dist/assets/render-worker-ph4iY7VS.js +0 -35
@@ -6,7 +6,7 @@ import { f as R, u as ce } from "./pixel-budget-DI82Hn3R.js";
6
6
  import { L as le, R as ue, V as de, n as fe, t as pe } from "./renderer-xdugdcMd.js";
7
7
  import { i as me, t as he } from "./tiff-contract-DEd8CGuz.js";
8
8
  import { C as ge, D as _e, E as ve, S as ye, T as be, _ as xe, a as Se, b as Ce, d as we, f as Te, g as Ee, h as De, m as Oe, o as ke, p as Ae, t as je, u as Me, w as Ne, x as Pe, y as Fe } from "./canvas-viewer-mechanics-DI38gHNV.js";
9
- import { A as Ie, B as Le, C as Re, D as ze, E as Be, F as Ve, H as He, I as Ue, L as We, M as z, N as Ge, O as Ke, P as qe, R as Je, S as Ye, T as Xe, V as B, _ as Ze, b as V, c as Qe, d as $e, f as et, g as tt, h as nt, i as rt, j as it, k as at, l as ot, m as st, n as ct, o as lt, p as ut, r as dt, s as H, t as ft, u as pt, v as mt, w as ht, x as gt, y as _t, z as vt } from "./renderer-BYt3nsdR.js";
9
+ import { A as Ie, B as Le, C as Re, D as ze, E as Be, F as Ve, H as He, I as Ue, L as We, M as z, N as Ge, O as Ke, P as qe, R as Je, S as Ye, T as Xe, V as B, _ as Ze, b as V, c as Qe, d as $e, f as et, g as tt, h as nt, i as rt, j as it, k as at, l as ot, m as st, n as ct, o as lt, p as ut, r as dt, s as H, t as ft, u as pt, v as mt, w as ht, x as gt, y as _t, z as vt } from "./renderer-B4KIpz-2.js";
10
10
  import { n as yt } from "./renderer-module-contract-BuTx2FWJ.js";
11
11
  import { _ as bt, a as xt, b as U, c as St, d as Ct, f as wt, g as Tt, h as Et, l as Dt, m as Ot, n as kt, o as At, p as jt, s as Mt, t as Nt, u as Pt, v as Ft, y as It } from "./worksheet-pull-client-Du0MuIro.js";
12
12
  import { n as Lt, r as Rt, t as zt } from "./visible-index-vN-4BNn7.js";
@@ -819,7 +819,7 @@ var zn = Symbol("retain-xlsx-viewer-fonts"), Bn = Symbol("prepare-xlsx-viewer-ro
819
819
  i = await Mn(e);
820
820
  } else i = t;
821
821
  An(i.byteLength), c.setSourceBytes(i.byteLength), c.checkpoint("source ready");
822
- let o = s === "worker" ? (await import("./render-worker-host-DSrgUCkT.js")).createRenderWorker() : (await import("./delimited-text-worker-host-RwvuSsP2.js")).createDelimitedTextWorker(), l;
822
+ let o = s === "worker" ? (await import("./render-worker-host-CZHIKTtZ.js")).createRenderWorker() : (await import("./delimited-text-worker-host-RwvuSsP2.js")).createDelimitedTextWorker(), l;
823
823
  try {
824
824
  let t = new e(o, s, void 0, !1);
825
825
  return l = t, t.metrics = c, await t._loadDelimitedText(r === i ? i.slice(0) : i, n, a), s === "main" && (t.bridge?.terminate(), t.bridge = null), c.checkpoint("worksheet ready"), c.succeed({ sheets: 1 }), t;
@@ -836,7 +836,7 @@ var zn = Symbol("retain-xlsx-viewer-fonts"), Bn = Symbol("prepare-xlsx-viewer-ro
836
836
  if (n = {
837
837
  ...n,
838
838
  xlsxWorksheetLimits: r.worksheet
839
- }, n.legacyXls !== void 0) return (await import("./workbook-model-source-CbEnWvU-.js")).loadXlsxModelSource(t, n, e);
839
+ }, n.legacyXls !== void 0) return (await import("./workbook-model-source-J9ir5Kov.js")).loadXlsxModelSource(t, n, e);
840
840
  n = {
841
841
  ...n,
842
842
  cjkFallback: F(n.cjkFallback)
@@ -861,7 +861,7 @@ var zn = Symbol("retain-xlsx-viewer-fonts"), Bn = Symbol("prepare-xlsx-viewer-ro
861
861
  s = v(await y(s, n.password));
862
862
  let c = s === r;
863
863
  o.setSourceBytes(s.byteLength), o.checkpoint("container ready");
864
- let l = a === "worker" ? (await import("./render-worker-host-DSrgUCkT.js")).createRenderWorker() : new Yt(), u;
864
+ let l = a === "worker" ? (await import("./render-worker-host-CZHIKTtZ.js")).createRenderWorker() : new Yt(), u;
865
865
  try {
866
866
  return u = new e(l, a, n.wasmUrl), u.metrics = o, await u._load(s, n, i.policy, (e) => o.observeUsage(e), c), o.checkpoint("workbook index ready"), o.succeed({ sheets: u.sheetCount }), u;
867
867
  } catch (e) {
@@ -2313,7 +2313,7 @@ var Z = class {
2313
2313
  destroy() {
2314
2314
  this.listeners.dispose(), this.rowOutlineBands = [], this.colOutlineBands = [], this.rowOutline = null, this.colOutline = null;
2315
2315
  }
2316
- }, Rr = 30, zr = 50, Br = 1, Vr = .45, Q = 8, Hr = 320, Ur = " (right-click for sheet list)", Wr = class {
2316
+ }, Rr = 30, zr = 50, Br = 1, Vr = .45, Q = 8, Hr = 320, Ur = " (right-click for sheet list)", Wr = /^#[0-9A-Fa-f]{6}$/, Gr = class {
2317
2317
  host;
2318
2318
  tabBar;
2319
2319
  tabStrip;
@@ -2345,9 +2345,12 @@ var Z = class {
2345
2345
  this.tabBar.appendChild(e);
2346
2346
  }
2347
2347
  build(e, t) {
2348
- this.cancelPendingOpen(), this.closeSheetList(), this.sheetNames = e, this.tabListeners.dispose(), this.tabListeners = new Z(), this.tabList.innerHTML = "", this.tabs = [], this.tabColors = t, e.forEach((e, t) => {
2348
+ this.cancelPendingOpen(), this.closeSheetList(), this.sheetNames = e, this.tabListeners.dispose(), this.tabListeners = new Z(), this.tabList.innerHTML = "", this.tabs = [], this.tabColors = e.map((e, n) => {
2349
+ let r = t[n];
2350
+ return r && Wr.test(r) ? r : null;
2351
+ }), e.forEach((e, t) => {
2349
2352
  let n = this.ownerDocument.createElement("button");
2350
- n.textContent = e, n.title = e, n.style.cssText = this.tabCss(t, !1), this.tabListeners.on(n, "click", () => this.host.selectSheet(t)), this.tabList.appendChild(n), this.tabs.push(n);
2353
+ n.textContent = e, n.title = e, this.styleTab(n, t, !1), this.tabListeners.on(n, "click", () => this.host.selectSheet(t)), this.tabList.appendChild(n), this.tabs.push(n);
2351
2354
  }), this.updateNavButtons();
2352
2355
  }
2353
2356
  makeNavButton(e, t, n) {
@@ -2382,9 +2385,7 @@ var Z = class {
2382
2385
  }
2383
2386
  setActive(e) {
2384
2387
  let t = this.activeIndex;
2385
- this.activeIndex = e, this.styleListItem(t), this.styleListItem(e), this.tabs.forEach((t, n) => {
2386
- t.style.cssText = this.tabCss(n, n === e);
2387
- });
2388
+ this.activeIndex = e, this.styleListItem(t), this.styleListItem(e), this.tabs.forEach((t, n) => this.styleTab(t, n, n === e));
2388
2389
  let n = this.tabs[e];
2389
2390
  if (n && n.offsetParent !== null) {
2390
2391
  let e = this.tabStrip, t = n.getBoundingClientRect(), r = e.getBoundingClientRect();
@@ -2395,12 +2396,16 @@ var Z = class {
2395
2396
  setDirection(e) {
2396
2397
  this.rtl = e, this.tabBar.style.flexDirection = e ? "row-reverse" : "row", this.tabStrip.style.marginLeft = e ? "0" : `${Br}px`, this.tabStrip.style.marginRight = e ? `${Br}px` : "0", this.tabList.style.flexDirection = e ? "row-reverse" : "row";
2397
2398
  }
2398
- tabStyle(e, t) {
2399
- let n = Rr - 2, r = Rr - 5, i = t ? `box-shadow:inset 0 -${e ? 2 : 3}px 0 0 ${t};` : "";
2400
- return e ? `display:inline-block;flex:none;padding:0 14px;position:relative;border:1px solid var(--ooxml-xlsx-chrome-border,#c8ccd0);border-bottom:none;border-radius:3px 3px 0 0;cursor:pointer;white-space:nowrap;max-width:160px;overflow:hidden;text-overflow:ellipsis;outline:none;box-sizing:border-box;height:${n}px;font-size:13px;background:var(--ooxml-xlsx-chrome-surface,#fff);color:var(--ooxml-xlsx-chrome-text,#000);border-bottom:1px solid var(--ooxml-xlsx-chrome-surface,#fff);font-weight:600;top:1px;` + i : `display:inline-block;flex:none;padding:0 14px;position:relative;border:1px solid var(--ooxml-xlsx-chrome-border,#c8ccd0);border-bottom:none;border-radius:3px 3px 0 0;cursor:pointer;white-space:nowrap;max-width:160px;overflow:hidden;text-overflow:ellipsis;outline:none;box-sizing:border-box;height:${r}px;font-size:11px;background:var(--ooxml-xlsx-chrome-surface-muted,#e0e0e0);color:var(--ooxml-xlsx-chrome-text-muted,#555);` + i;
2399
+ tabStyle(e) {
2400
+ return e ? `display:inline-block;flex:none;padding:0 14px;position:relative;border:1px solid var(--ooxml-xlsx-chrome-border,#c8ccd0);border-bottom:none;border-radius:3px 3px 0 0;cursor:pointer;white-space:nowrap;max-width:160px;overflow:hidden;text-overflow:ellipsis;outline:none;box-sizing:border-box;height:${Rr - 2}px;font-size:13px;background:var(--ooxml-xlsx-chrome-surface,#fff);color:var(--ooxml-xlsx-chrome-text,#000);border-bottom:1px solid var(--ooxml-xlsx-chrome-surface,#fff);font-weight:600;top:1px;` : `display:inline-block;flex:none;padding:0 14px;position:relative;border:1px solid var(--ooxml-xlsx-chrome-border,#c8ccd0);border-bottom:none;border-radius:3px 3px 0 0;cursor:pointer;white-space:nowrap;max-width:160px;overflow:hidden;text-overflow:ellipsis;outline:none;box-sizing:border-box;height:${Rr - 5}px;font-size:11px;background:var(--ooxml-xlsx-chrome-surface-muted,#e0e0e0);color:var(--ooxml-xlsx-chrome-text-muted,#555);`;
2401
+ }
2402
+ styleTab(e, t, n) {
2403
+ e.style.cssText = this.tabCss(t, n);
2404
+ let r = this.tabColors[t];
2405
+ r && (e.style.boxShadow = `inset 0 -${n ? 2 : 3}px 0 0 ${r}`);
2401
2406
  }
2402
2407
  tabCss(e, t) {
2403
- let n = this.tabStyle(t, this.tabColors[e]), r = this.host.hiddenSheetMode();
2408
+ let n = this.tabStyle(t), r = this.host.hiddenSheetMode();
2404
2409
  return r !== "show" && this.host.isHidden(e) && (n += r === "skip" ? "display:none;" : `opacity:${Vr};`), n;
2405
2410
  }
2406
2411
  initSheetList() {
@@ -2509,15 +2514,15 @@ var Z = class {
2509
2514
  destroy() {
2510
2515
  this.cancelPendingOpen(), this.closeSheetList(), this.listItems = [], this.tabListeners.dispose(), this.listeners.dispose();
2511
2516
  }
2512
- }, Gr = 2;
2513
- function Kr(e, t, n) {
2517
+ }, Kr = 2;
2518
+ function qr(e, t, n) {
2514
2519
  return e <= 50 ? t + e / 50 * (1 - t) : 1 + (e - 50) / 50 * (n - 1);
2515
2520
  }
2516
- function qr(e, t, n) {
2521
+ function Jr(e, t, n) {
2517
2522
  let r = Math.min(n, Math.max(t, e));
2518
2523
  return r <= 1 ? (r - t) / (1 - t) * 50 : 50 + (r - 1) / (n - 1) * 50;
2519
2524
  }
2520
- var Jr = class {
2525
+ var Yr = class {
2521
2526
  host;
2522
2527
  element;
2523
2528
  slider;
@@ -2531,21 +2536,21 @@ var Jr = class {
2531
2536
  let i = e.createElement("button");
2532
2537
  return i.type = "button", i.textContent = t, i.setAttribute("aria-label", n), i.title = n, i.style.cssText = "width:18px;height:18px;padding:0;border:none;background:transparent;color:var(--ooxml-xlsx-chrome-text-muted,#555);font-size:14px;line-height:1;cursor:pointer;border-radius:3px;", this.listeners.on(i, "click", r), i;
2533
2538
  }, s = e.createElement("input");
2534
- s.type = "range", s.min = "0", s.max = "100", s.step = "any", s.value = String(qr(n, r, i)), s.setAttribute("aria-label", "Zoom"), s.title = "Zoom", s.classList.add("xlsx-zoom-slider"), s.style.cssText = "width:90px;cursor:pointer;", this.listeners.on(s, "input", () => {
2535
- let e = Number(s.value), t = Math.abs(e - 50) <= Gr ? 50 : e;
2536
- t === 50 && (s.value = "50"), this.host.setScale(Kr(t, r, i));
2539
+ s.type = "range", s.min = "0", s.max = "100", s.step = "any", s.value = String(Jr(n, r, i)), s.setAttribute("aria-label", "Zoom"), s.title = "Zoom", s.classList.add("xlsx-zoom-slider"), s.style.cssText = "width:90px;cursor:pointer;", this.listeners.on(s, "input", () => {
2540
+ let e = Number(s.value), t = Math.abs(e - 50) <= Kr ? 50 : e;
2541
+ t === 50 && (s.value = "50"), this.host.setScale(qr(t, r, i));
2537
2542
  });
2538
2543
  let c = e.createElement("span");
2539
2544
  c.textContent = `${Math.round(n * 100)}%`, c.style.cssText = "min-width:42px;margin-left:6px;text-align:right;font-variant-numeric:tabular-nums;", a.appendChild(o("−", "Zoom out", () => this.host.zoomOut())), a.appendChild(s), a.appendChild(o("+", "Zoom in", () => this.host.zoomIn())), a.appendChild(c), this.element = a, this.slider = s, this.label = c;
2540
2545
  }
2541
2546
  sync(e, t, n, r) {
2542
- this.slider.value = String(qr(e, n, r)), this.label.textContent = `${t}%`;
2547
+ this.slider.value = String(Jr(e, n, r)), this.label.textContent = `${t}%`;
2543
2548
  }
2544
2549
  destroy() {
2545
2550
  this.listeners.dispose();
2546
2551
  }
2547
2552
  };
2548
- function Yr(e, t, n) {
2553
+ function Xr(e, t, n) {
2549
2554
  if (!e) return !1;
2550
2555
  for (let r of e.split(/\s+/)) {
2551
2556
  if (!r) continue;
@@ -2562,12 +2567,12 @@ function Yr(e, t, n) {
2562
2567
  }
2563
2568
  return !1;
2564
2569
  }
2565
- function Xr(e, t, n) {
2570
+ function Zr(e, t, n) {
2566
2571
  if (!e) return null;
2567
- for (let r of e) if (r.validationType === "list" && Yr(r.sqref, t, n)) return r;
2572
+ for (let r of e) if (r.validationType === "list" && Xr(r.sqref, t, n)) return r;
2568
2573
  return null;
2569
2574
  }
2570
- var Zr = class {
2575
+ var Qr = class {
2571
2576
  host;
2572
2577
  panel;
2573
2578
  panelKey = null;
@@ -2590,7 +2595,7 @@ var Zr = class {
2590
2595
  drawDropdown() {
2591
2596
  if (this.arrowRect = null, this.host.selectionMode() !== "cells") return;
2592
2597
  let e = this.host.worksheet(), t = this.host.activeCell();
2593
- if (!e || !t || !Xr(e.dataValidations, t.row, t.col)) return;
2598
+ if (!e || !t || !Zr(e.dataValidations, t.row, t.col)) return;
2594
2599
  let n = this.host.cellRect(t.row, t.col);
2595
2600
  if (!n) return;
2596
2601
  let r = this.host.scale(), i = Math.round(50 * r), a = Math.round(22 * r), o = Math.max(14, Math.min(n.h, 22 * r)), s = n.x + n.w, c = n.y;
@@ -2613,7 +2618,7 @@ var Zr = class {
2613
2618
  this.hide();
2614
2619
  return;
2615
2620
  }
2616
- let r = Xr(e.dataValidations, t.row, t.col);
2621
+ let r = Zr(e.dataValidations, t.row, t.col);
2617
2622
  r && (this.hide(), this.panelKey = n, this.open(t, r.formula1));
2618
2623
  }
2619
2624
  async open(e, t) {
@@ -2690,21 +2695,21 @@ var Zr = class {
2690
2695
  this.hide(), this.itemListeners.dispose();
2691
2696
  }
2692
2697
  };
2693
- function Qr(e) {
2698
+ function $r(e) {
2694
2699
  let t = e.trim();
2695
2700
  return t.startsWith("#") && (t = t.slice(1).trim()), t.startsWith("=") && (t = t.slice(1).trim()), t;
2696
2701
  }
2697
- function $r(e) {
2702
+ function ei(e) {
2698
2703
  let t = !1, n = -1;
2699
2704
  for (let r = 0; r < e.length; r++) e[r] === "'" ? t && e[r + 1] === "'" ? r++ : t = !t : e[r] === "!" && !t && (n = r);
2700
2705
  return t ? -1 : n;
2701
2706
  }
2702
- function ei(e) {
2707
+ function ti(e) {
2703
2708
  let t = e.trim();
2704
2709
  return t.length >= 2 && t.startsWith("'") && t.endsWith("'") ? t.slice(1, -1).replace(/''/g, "'") : t;
2705
2710
  }
2706
- function ti(e, t, n) {
2707
- let r = $r(e), i = r >= 0 ? ei(e.slice(0, r)) : void 0, a = (r >= 0 ? e.slice(r + 1) : e).split(":", 1)[0]?.trim() ?? "";
2711
+ function ni(e, t, n) {
2712
+ let r = ei(e), i = r >= 0 ? ti(e.slice(0, r)) : void 0, a = (r >= 0 ? e.slice(r + 1) : e).split(":", 1)[0]?.trim() ?? "";
2708
2713
  if (!z(a)) return null;
2709
2714
  let o = t;
2710
2715
  if (i !== void 0) {
@@ -2716,22 +2721,22 @@ function ti(e, t, n) {
2716
2721
  cellRef: a
2717
2722
  };
2718
2723
  }
2719
- function ni(e, t, n, r) {
2724
+ function ri(e, t, n, r) {
2720
2725
  let i = /* @__PURE__ */ new Map();
2721
2726
  for (let e of r) i.set(e.name.toLocaleLowerCase("en-US"), e);
2722
- let a = Qr(e), o = /* @__PURE__ */ new Set();
2727
+ let a = $r(e), o = /* @__PURE__ */ new Set();
2723
2728
  for (;;) {
2724
- let e = ti(a, t, n);
2729
+ let e = ni(a, t, n);
2725
2730
  if (e) return e;
2726
2731
  let r = a.toLocaleLowerCase("en-US");
2727
2732
  if (!r || o.has(r)) return null;
2728
2733
  o.add(r);
2729
2734
  let s = i.get(r);
2730
2735
  if (!s) return null;
2731
- a = Qr(s.formula);
2736
+ a = $r(s.formula);
2732
2737
  }
2733
2738
  }
2734
- var ri = class {
2739
+ var ii = class {
2735
2740
  host;
2736
2741
  hyperlinkMap = /* @__PURE__ */ new Map();
2737
2742
  constructor(e) {
@@ -2761,13 +2766,13 @@ var ri = class {
2761
2766
  return r ? (r(n), !0) : (n.kind === "external" ? L(n.url, void 0, this.host.hostWindow) : this.navigateInternal(n.ref).catch((e) => this.host.reportError(e)), !0);
2762
2767
  }
2763
2768
  async navigateInternal(e) {
2764
- let t = ni(e, this.host.currentSheet(), this.host.sheetNames(), this.host.definedNames());
2769
+ let t = ri(e, this.host.currentSheet(), this.host.sheetNames(), this.host.definedNames());
2765
2770
  t && (t.sheetIndex !== this.host.currentSheet() && await this.host.goToSheet(t.sheetIndex), await this.host.scrollToCell(t.cellRef));
2766
2771
  }
2767
2772
  destroy() {
2768
2773
  this.hyperlinkMap.clear();
2769
2774
  }
2770
- }, ii = class {
2775
+ }, ai = class {
2771
2776
  _sheetCount;
2772
2777
  _sheetName;
2773
2778
  _collectSheetCells;
@@ -2859,19 +2864,19 @@ var ri = class {
2859
2864
  location: e
2860
2865
  } : null;
2861
2866
  }
2862
- }, ai = "color-mix(in srgb, #ffb300 8%, transparent)", oi = "color-mix(in srgb, #fb8c00 8%, transparent)";
2863
- function si(e, t = {}) {
2864
- let n = e ? "#fb8c00" : "#ffb300", r = e ? t.active : t.match, i = r ?? (e ? oi : ai);
2867
+ }, oi = "color-mix(in srgb, #ffb300 8%, transparent)", si = "color-mix(in srgb, #fb8c00 8%, transparent)";
2868
+ function ci(e, t = {}) {
2869
+ let n = e ? "#fb8c00" : "#ffb300", r = e ? t.active : t.match, i = r ?? (e ? si : oi);
2865
2870
  return {
2866
2871
  border: `2px solid ${r ?? n}`,
2867
2872
  background: i
2868
2873
  };
2869
2874
  }
2870
- var ci = class {
2875
+ var li = class {
2871
2876
  host;
2872
2877
  controller;
2873
2878
  constructor(e) {
2874
- this.host = e, this.controller = new ii(() => e.sheetCount(), (t) => e.workbook()?.sheetNames[t] ?? "", (e) => this.collectSheetCells(e));
2879
+ this.host = e, this.controller = new ai(() => e.sheetCount(), (t) => e.workbook()?.sheetNames[t] ?? "", (e) => this.collectSheetCells(e));
2875
2880
  }
2876
2881
  async collectSheetCells(e) {
2877
2882
  let t = this.host.workbook();
@@ -2900,7 +2905,7 @@ var ci = class {
2900
2905
  e.clearFind();
2901
2906
  let t = this.host.worksheet();
2902
2907
  if (!t) return;
2903
- let n = this.host.scale(), r = (e) => Math.round(e * n), i = r(50), a = r(22), o = t.freezeRows ?? 0, s = t.freezeCols ?? 0, c = H(t).roundedFrozenExtent(n), l = i + c.width, u = a + c.height, d = this.host.highlightColors(), f = si(!1, d), p = si(!0, d);
2908
+ let n = this.host.scale(), r = (e) => Math.round(e * n), i = r(50), a = r(22), o = t.freezeRows ?? 0, s = t.freezeCols ?? 0, c = H(t).roundedFrozenExtent(n), l = i + c.width, u = a + c.height, d = this.host.highlightColors(), f = ci(!1, d), p = ci(!0, d);
2904
2909
  for (let t of this.controller.sheetHighlights(this.host.currentSheet())) {
2905
2910
  let n = this.host.cellRect(t.row, t.col);
2906
2911
  if (!n) continue;
@@ -2932,8 +2937,8 @@ var ci = class {
2932
2937
  destroy() {
2933
2938
  this.controller.invalidate();
2934
2939
  }
2935
- }, li = 25e4, ui = 8 * 1024 * 1024;
2936
- function di(e, t) {
2940
+ }, ui = 25e4, di = 8 * 1024 * 1024;
2941
+ function fi(e, t) {
2937
2942
  let n = 0, r = !1;
2938
2943
  for (let t = 0; t < e.length; t++) {
2939
2944
  let i = e.charCodeAt(t);
@@ -2941,7 +2946,7 @@ function di(e, t) {
2941
2946
  }
2942
2947
  return e.length + (r ? n + 2 : 0) > t ? null : r ? `"${e.replace(/"/g, "\"\"")}"` : e;
2943
2948
  }
2944
- var fi = class {
2949
+ var pi = class {
2945
2950
  host;
2946
2951
  constructor(e) {
2947
2952
  this.host = e;
@@ -2976,12 +2981,12 @@ var fi = class {
2976
2981
  c1: n.left,
2977
2982
  c2: n.right
2978
2983
  }, u = s - o + 1, d = l - c + 1;
2979
- if (u > Math.floor(li / d)) return {
2984
+ if (u > Math.floor(ui / d)) return {
2980
2985
  status: "too-large",
2981
2986
  limit: "cells"
2982
2987
  };
2983
2988
  let f = u * d, p = Math.max(0, u - 1) + u * Math.max(0, d - 1);
2984
- if (p > ui) return {
2989
+ if (p > di) return {
2985
2990
  status: "too-large",
2986
2991
  limit: "text"
2987
2992
  };
@@ -2990,7 +2995,7 @@ var fi = class {
2990
2995
  if (n.col < c || n.col > l) continue;
2991
2996
  let i = n.value, a = r?.cellText(e, n) ?? "";
2992
2997
  if (r || (i.type === "text" ? a = i.runs ? i.runs.map((e) => e.text).join("") : i.text : i.type === "number" ? a = String(i.number) : i.type === "bool" ? a = i.bool ? "TRUE" : "FALSE" : i.type === "error" && (a = i.error)), a) {
2993
- let e = di(a, ui - p);
2998
+ let e = fi(a, di - p);
2994
2999
  if (e === null) return {
2995
3000
  status: "too-large",
2996
3001
  limit: "text"
@@ -3021,29 +3026,29 @@ var fi = class {
3021
3026
  return { status: "clipboard-denied" };
3022
3027
  }
3023
3028
  }
3024
- }, pi = 40, mi = 900;
3025
- function hi(e, t) {
3029
+ }, mi = 40, hi = 900;
3030
+ function gi(e, t) {
3026
3031
  if (t <= 0) return 0;
3027
- let n = Math.min(pi, t / 2);
3028
- return e < n ? -900 * Math.min(1, Math.max(0, (n - e) / n)) : e > t - n ? mi * Math.min(1, Math.max(0, (e - (t - n)) / n)) : 0;
3032
+ let n = Math.min(mi, t / 2);
3033
+ return e < n ? -900 * Math.min(1, Math.max(0, (n - e) / n)) : e > t - n ? hi * Math.min(1, Math.max(0, (e - (t - n)) / n)) : 0;
3029
3034
  }
3030
- function gi(e, t, n, r) {
3035
+ function _i(e, t, n, r) {
3031
3036
  if (r === "all") return {
3032
3037
  x: 0,
3033
3038
  y: 0
3034
3039
  };
3035
- let i = r === "rows" ? 0 : hi(e.x, t.width), a = r === "cols" ? 0 : hi(e.y, t.height);
3040
+ let i = r === "rows" ? 0 : gi(e.x, t.width), a = r === "cols" ? 0 : gi(e.y, t.height);
3036
3041
  return {
3037
3042
  x: n ? -i : i,
3038
3043
  y: a
3039
3044
  };
3040
3045
  }
3041
- var _i = 4, vi = 5, yi = 16384;
3042
- function bi(e, t, n, r) {
3046
+ var vi = 4, yi = 5, bi = 16384;
3047
+ function xi(e, t, n, r) {
3043
3048
  for (let { index: i, edge: a } of t) if (!(a <= r) && Math.abs(e - a) <= n) return i;
3044
3049
  return null;
3045
3050
  }
3046
- var xi = class {
3051
+ var Si = class {
3047
3052
  host;
3048
3053
  cleanups = [];
3049
3054
  pendingTap = null;
@@ -3132,7 +3137,7 @@ var xi = class {
3132
3137
  edge: t.x + t.w
3133
3138
  }));
3134
3139
  }
3135
- let c = bi(a, i, _i, s);
3140
+ let c = xi(a, i, vi, s);
3136
3141
  return c === null ? null : {
3137
3142
  kind: "col",
3138
3143
  index: c,
@@ -3152,7 +3157,7 @@ var xi = class {
3152
3157
  edge: t.y + t.h
3153
3158
  }));
3154
3159
  }
3155
- let s = bi(o, i, _i, c);
3160
+ let s = xi(o, i, vi, c);
3156
3161
  return s === null ? null : {
3157
3162
  kind: "row",
3158
3163
  index: s,
@@ -3171,7 +3176,7 @@ var xi = class {
3171
3176
  let t = i.at(-1);
3172
3177
  t && e[0] <= t[1] + 1 ? t[1] = Math.max(t[1], e[1]) : i.push([...e]);
3173
3178
  }
3174
- if (i.reduce((e, [t, n]) => e + n - t + 1, 0) > yi) throw RangeError(`A resize gesture may affect at most ${yi} selected bands.`);
3179
+ if (i.reduce((e, [t, n]) => e + n - t + 1, 0) > bi) throw RangeError(`A resize gesture may affect at most ${bi} selected bands.`);
3175
3180
  let a = H(n), o = e === "col" ? a.col : a.row, s = [];
3176
3181
  for (let [e, t] of i) for (let n = e; n <= t; n++) o.sizeOf(n) > 0 && s.push(n);
3177
3182
  return s;
@@ -3192,7 +3197,7 @@ var xi = class {
3192
3197
  let t = i.at(-1);
3193
3198
  t && e.first <= t.last + 1 ? t.last = Math.max(t.last, e.last) : i.push({ ...e });
3194
3199
  }
3195
- if (!t && !Vt(n).length && i.reduce((e, t) => e + t.last - t.first + 1, 0) <= yi) return;
3200
+ if (!t && !Vt(n).length && i.reduce((e, t) => e + t.last - t.first + 1, 0) <= bi) return;
3196
3201
  let a = [], o = 0;
3197
3202
  for (let e of H(n).row.positiveRanges()) {
3198
3203
  for (; o < i.length && i[o].last < e.first;) o++;
@@ -3238,10 +3243,10 @@ var xi = class {
3238
3243
  }
3239
3244
  let i = this.host.scale(), a = this.host.canvasArea.getBoundingClientRect();
3240
3245
  if (n.kind === "col") {
3241
- let t = this.host.screenX(e - a.left, 0), o = Math.max(vi, Math.round((t - n.originScaled) / i)), s = Ut(o, n.mdw);
3246
+ let t = this.host.screenX(e - a.left, 0), o = Math.max(yi, Math.round((t - n.originScaled) / i)), s = Ut(o, n.mdw);
3242
3247
  for (let e of n.indices) r.colWidths[e] = s, this.host.recordSizeOverride("col", e, o);
3243
3248
  } else if (n.rowPreview) {
3244
- let e = t - a.top, o = Math.max(vi, Math.round((e - n.originScaled) / i));
3249
+ let e = t - a.top, o = Math.max(yi, Math.round((e - n.originScaled) / i));
3245
3250
  try {
3246
3251
  n.rowPreview.apply(Gt(o)), this.host.updateSpacerSize(r), this.host.updateSelectionOverlay(), this.host.scheduleRender();
3247
3252
  } catch (e) {
@@ -3249,7 +3254,7 @@ var xi = class {
3249
3254
  }
3250
3255
  return;
3251
3256
  } else {
3252
- let e = t - a.top, o = Gt(Math.max(vi, Math.round((e - n.originScaled) / i)));
3257
+ let e = t - a.top, o = Gt(Math.max(yi, Math.round((e - n.originScaled) / i)));
3253
3258
  for (let e of n.indices) r.rowHeights[e] = o, this.host.recordSizeOverride("row", e);
3254
3259
  }
3255
3260
  q.invalidate(r), this.host.updateSpacerSize(r), this.host.updateSelectionOverlay(), this.host.scheduleRender();
@@ -3336,7 +3341,7 @@ var xi = class {
3336
3341
  y: 0
3337
3342
  };
3338
3343
  let t = this.viewportInputBounds();
3339
- return gi({
3344
+ return _i({
3340
3345
  x: e.clientX - t.left,
3341
3346
  y: e.clientY - t.top
3342
3347
  }, {
@@ -3416,7 +3421,7 @@ var xi = class {
3416
3421
  try {
3417
3422
  let n = this.host.worksheet(), r = t.kind === "row" ? this.compactRowTargets(t.index) : void 0, i = r ? [] : this.resizeIndices(t.kind, t.index);
3418
3423
  if (!r) try {
3419
- this.host.assertResizeBudget(t.kind, i, yi);
3424
+ this.host.assertResizeBudget(t.kind, i, bi);
3420
3425
  } catch (e) {
3421
3426
  if (t.kind !== "row" || !(e instanceof RangeError)) throw e;
3422
3427
  r = this.compactRowTargets(t.index, !0), i = [];
@@ -3581,14 +3586,14 @@ var xi = class {
3581
3586
  this.resizeDrag && this.finishResize(this.resizeDrag.pointerId, !1, !0), this.stopSelectionAutoScroll(), this.pendingTap = null, this.pendingClick = null, this.pendingElementClick = null, this.resizeDrag = null;
3582
3587
  for (let e of this.cleanups.splice(0)) e();
3583
3588
  }
3584
- }, Si = "#1a73e8";
3585
- function Ci(e) {
3589
+ }, Ci = "#1a73e8";
3590
+ function wi(e) {
3586
3591
  return {
3587
3592
  border: `2px solid ${e}`,
3588
3593
  background: `color-mix(in srgb, ${e} 8%, transparent)`
3589
3594
  };
3590
3595
  }
3591
- function wi(e) {
3596
+ function Ti(e) {
3592
3597
  let t = [];
3593
3598
  for (let n of e) {
3594
3599
  let e = n.x + n.width, r = n.y + n.height;
@@ -3634,7 +3639,7 @@ function wi(e) {
3634
3639
  }
3635
3640
  return r.join("");
3636
3641
  }
3637
- var Ti = 0, Ei = class {
3642
+ var Ei = 0, Di = class {
3638
3643
  host;
3639
3644
  constructor(e) {
3640
3645
  this.host = e;
@@ -3686,7 +3691,7 @@ var Ti = 0, Ei = class {
3686
3691
  last: K,
3687
3692
  start: a,
3688
3693
  end: s
3689
- }], h = p.filter((e) => e.end > e.start), g = m.filter((e) => e.end > e.start), _ = this.host.selectionColor() ?? Si, { background: v } = Ci(_), y = /* @__PURE__ */ new Set(), b = [], x = [];
3694
+ }], h = p.filter((e) => e.end > e.start), g = m.filter((e) => e.end > e.start), _ = this.host.selectionColor() ?? Ci, { background: v } = wi(_), y = /* @__PURE__ */ new Set(), b = [], x = [];
3690
3695
  for (let t of e.areas) {
3691
3696
  let e = t.kind === "cells" ? {
3692
3697
  top: t.top,
@@ -3760,7 +3765,7 @@ var Ti = 0, Ei = class {
3760
3765
  if (b.length > 0) {
3761
3766
  let t = "http://www.w3.org/2000/svg", n = this.host.ownerDocument.createElementNS(t, "svg");
3762
3767
  n.setAttribute("data-xlsx-selection-fill", ""), n.style.cssText = "position:absolute;inset:0;width:100%;height:100%;overflow:hidden;pointer-events:none;";
3763
- let r = e.areas.length > 1, i = this.host.cellRect(e.activeCell.row, e.activeCell.col), a = `xlsx-selection-mask-${++Ti}`, c = this.host.ownerDocument.createElementNS(t, "defs"), l = this.host.ownerDocument.createElementNS(t, "mask");
3768
+ let r = e.areas.length > 1, i = this.host.cellRect(e.activeCell.row, e.activeCell.col), a = `xlsx-selection-mask-${++Ei}`, c = this.host.ownerDocument.createElementNS(t, "defs"), l = this.host.ownerDocument.createElementNS(t, "mask");
3764
3769
  l.setAttribute("id", a), l.setAttribute("maskUnits", "userSpaceOnUse"), l.setAttribute("x", "0"), l.setAttribute("y", "0"), l.setAttribute("width", String(o)), l.setAttribute("height", String(s));
3765
3770
  let u = this.host.ownerDocument.createElementNS(t, "path");
3766
3771
  if (u.setAttribute("d", b.join("")), u.setAttribute("fill", "#fff"), l.appendChild(u), i) for (let e of m) for (let n of p) {
@@ -3772,7 +3777,7 @@ var Ti = 0, Ei = class {
3772
3777
  c.appendChild(l), n.appendChild(c);
3773
3778
  let d = this.host.ownerDocument.createElementNS(t, "rect");
3774
3779
  d.setAttribute("x", "0"), d.setAttribute("y", "0"), d.setAttribute("width", String(o)), d.setAttribute("height", String(s)), d.setAttribute("fill", v), d.setAttribute("mask", `url(#${a})`), n.appendChild(d);
3775
- let f = r ? "" : wi(x);
3780
+ let f = r ? "" : Ti(x);
3776
3781
  if (f) {
3777
3782
  let e = this.host.ownerDocument.createElementNS(t, "path");
3778
3783
  e.setAttribute("data-xlsx-selection-border", ""), e.setAttribute("d", f), e.setAttribute("fill", "none"), e.setAttribute("stroke", _), e.setAttribute("stroke-width", "2"), e.setAttribute("stroke-linecap", "square"), e.setAttribute("stroke-linejoin", "miter"), n.appendChild(e);
@@ -3796,10 +3801,10 @@ var Ti = 0, Ei = class {
3796
3801
  i.setAttribute("data-xlsx-element-context-clip", ""), i.style.cssText = `position:absolute;left:${r.clip.x}px;top:${r.clip.y}px;width:${r.clip.width}px;height:${r.clip.height}px;overflow:hidden;pointer-events:none;`;
3797
3802
  let a = this.host.ownerDocument.createElement("div");
3798
3803
  a.setAttribute("data-xlsx-element-context-outline", e.elementType);
3799
- let o = this.host.selectionColor() ?? Si;
3804
+ let o = this.host.selectionColor() ?? Ci;
3800
3805
  a.style.cssText = `position:absolute;left:${r.rect.x - r.clip.x}px;top:${r.rect.y - r.clip.y}px;width:${r.rect.width}px;height:${r.rect.height}px;box-sizing:border-box;border:2px solid ${o};background:color-mix(in srgb, ${o} 6%, transparent);transform:rotate(${r.rotation}deg);transform-origin:center;pointer-events:none;`, i.appendChild(a), this.host.overlayHost.appendSelection(i);
3801
3806
  }
3802
- }, Di = 65536, Oi = 100, ki = class {
3807
+ }, Oi = 65536, ki = 100, Ai = class {
3803
3808
  host;
3804
3809
  lastNotified = null;
3805
3810
  emitting = !1;
@@ -3815,7 +3820,7 @@ var Ti = 0, Ei = class {
3815
3820
  if (!this.host.onSelectionContextChange() || this.host.isDestroyed() || this.contextFrame !== null || this.contextMicrotask) return;
3816
3821
  let e = () => {
3817
3822
  if (this.contextFrame = null, this.contextMicrotask = !1, this.host.isDestroyed()) return;
3818
- let e = this.host.readContext(Di);
3823
+ let e = this.host.readContext(Oi);
3819
3824
  this.host.onSelectionContextChange()?.(e ? structuredClone(e) : null);
3820
3825
  };
3821
3826
  typeof this.host.hostWindow.requestAnimationFrame == "function" ? this.contextFrame = this.host.hostWindow.requestAnimationFrame(e) : (this.contextMicrotask = !0, queueMicrotask(e));
@@ -3830,7 +3835,7 @@ var Ti = 0, Ei = class {
3830
3835
  this.finishChain();
3831
3836
  return;
3832
3837
  }
3833
- if (this.chainLength >= Oi) {
3838
+ if (this.chainLength >= ki) {
3834
3839
  this.lastNotified = e ? structuredClone(e) : null, this.finishChain();
3835
3840
  return;
3836
3841
  }
@@ -3864,7 +3869,7 @@ function $(e) {
3864
3869
  }
3865
3870
  return n;
3866
3871
  }
3867
- function Ai(e, t) {
3872
+ function ji(e, t) {
3868
3873
  let n = 0, r = e.length - 1;
3869
3874
  for (; n <= r;) {
3870
3875
  let i = n + r >>> 1, a = e[i];
@@ -3874,7 +3879,7 @@ function Ai(e, t) {
3874
3879
  }
3875
3880
  return !1;
3876
3881
  }
3877
- function ji(e, t, n) {
3882
+ function Mi(e, t, n) {
3878
3883
  let r = 0, i = e.length;
3879
3884
  for (; r < i;) {
3880
3885
  let a = r + i >>> 1;
@@ -3882,26 +3887,26 @@ function ji(e, t, n) {
3882
3887
  }
3883
3888
  return r;
3884
3889
  }
3885
- function Mi(e, t) {
3890
+ function Ni(e, t) {
3886
3891
  for (let n = 1; n < e.length; n++) if (t(e[n - 1]) > t(e[n])) return [...e].sort((e, n) => t(e) - t(n));
3887
3892
  return e;
3888
3893
  }
3889
- var Ni = 1 * 1024 * 1024, Pi = 65536;
3890
- function Fi(e, t) {
3894
+ var Pi = 1 * 1024 * 1024, Fi = 65536;
3895
+ function Ii(e, t) {
3891
3896
  return Ae(e, Math.max(0, t));
3892
3897
  }
3893
- var Ii = class {
3898
+ var Li = class {
3894
3899
  rows = /* @__PURE__ */ new WeakMap();
3895
3900
  cells = /* @__PURE__ */ new WeakMap();
3896
3901
  read(e, t, n, r, i, a) {
3897
3902
  let o = a.maxCells ?? 1e3;
3898
3903
  if (!Number.isFinite(o) || o < 0) throw RangeError("maxCells must be a finite non-negative number.");
3899
- let s = Math.min(mr, Math.floor(o)), c = a.maxTextCharacters ?? Ni;
3904
+ let s = Math.min(mr, Math.floor(o)), c = a.maxTextCharacters ?? Pi;
3900
3905
  if (!Number.isFinite(c) || c < 0) throw RangeError("maxTextCharacters must be a finite non-negative number.");
3901
3906
  let l = Math.min(hr, Math.floor(c)), u = 0, d = !1, f = (e) => {
3902
3907
  let t = typeof e == "string" ? [e] : e, n = [], r = 0;
3903
3908
  for (let e = 0; e < t.length; e++) {
3904
- let i = t[e], a = typeof i == "string" ? i : i.text, o = Math.max(0, Math.min(Pi - r, l - u)), s = Fi(a, o);
3909
+ let i = t[e], a = typeof i == "string" ? i : i.text, o = Math.max(0, Math.min(Fi - r, l - u)), s = Ii(a, o);
3905
3910
  if (n.push(s), r += s.length, u += s.length, s.length < a.length || e + 1 < t.length && o === 0) {
3906
3911
  d = !0;
3907
3912
  break;
@@ -3929,9 +3934,9 @@ var Ii = class {
3929
3934
  first: e.top,
3930
3935
  last: e.bottom
3931
3936
  }))]), w = this.rows.get(e);
3932
- w || (w = Mi(e.rows, (e) => e.index), this.rows.set(e, w));
3937
+ w || (w = Ni(e.rows, (e) => e.index), this.rows.set(e, w));
3933
3938
  cellScan: for (let t of C) {
3934
- let n = ji(w, t.first, (e) => e.index);
3939
+ let n = Mi(w, t.first, (e) => e.index);
3935
3940
  for (; n < w.length;) {
3936
3941
  let a = w[n++];
3937
3942
  if (a.index > t.last) break;
@@ -3944,14 +3949,14 @@ var Ii = class {
3944
3949
  first: g[e].left,
3945
3950
  last: g[e].right
3946
3951
  }))));
3947
- let c = p || Ai(m, a.index) ? [{
3952
+ let c = p || ji(m, a.index) ? [{
3948
3953
  first: 1,
3949
3954
  last: G
3950
3955
  }] : $([...h, ...b]);
3951
3956
  for (let t of c) {
3952
3957
  let n = this.cells.get(a);
3953
- n || (n = Mi(a.cells, (e) => e.col), this.cells.set(a, n));
3954
- let o = ji(n, t.first, (e) => e.col);
3958
+ n || (n = Ni(a.cells, (e) => e.col), this.cells.set(a, n));
3959
+ let o = Mi(n, t.first, (e) => e.col);
3955
3960
  for (; o < n.length;) {
3956
3961
  let a = n[o++];
3957
3962
  if (a.col > t.last) break;
@@ -4008,7 +4013,7 @@ var Ii = class {
4008
4013
  maxTextCharacters: l
4009
4014
  };
4010
4015
  }
4011
- }, Li = {
4016
+ }, Ri = {
4012
4017
  background: "--ooxml-xlsx-chrome-background",
4013
4018
  surface: "--ooxml-xlsx-chrome-surface",
4014
4019
  mutedSurface: "--ooxml-xlsx-chrome-surface-muted",
@@ -4018,10 +4023,10 @@ var Ii = class {
4018
4023
  selectedSurface: "--ooxml-xlsx-chrome-selection-background",
4019
4024
  accent: "--ooxml-xlsx-chrome-accent"
4020
4025
  };
4021
- function Ri(e, t) {
4022
- return Object.keys(Li).every((n) => e[n] === t[n]);
4026
+ function zi(e, t) {
4027
+ return Object.keys(Ri).every((n) => e[n] === t[n]);
4023
4028
  }
4024
- var zi = class {
4029
+ var Bi = class {
4025
4030
  host;
4026
4031
  colors = {};
4027
4032
  styleObserver = null;
@@ -4035,12 +4040,12 @@ var zi = class {
4035
4040
  let e = this.host.hostWindow, t = e.getComputedStyle?.bind(e);
4036
4041
  if (!t) return;
4037
4042
  let n = t(this.host.wrapper), r = {};
4038
- for (let [e, t] of Object.entries(Li)) {
4043
+ for (let [e, t] of Object.entries(Ri)) {
4039
4044
  let i = n.getPropertyValue(t).trim();
4040
4045
  i && (r[e] = i);
4041
4046
  }
4042
4047
  let i = r;
4043
- Ri(this.colors, i) || (this.colors = i, this.host.onChange());
4048
+ zi(this.colors, i) || (this.colors = i, this.host.onChange());
4044
4049
  }
4045
4050
  install() {
4046
4051
  this.refresh();
@@ -4065,9 +4070,9 @@ var zi = class {
4065
4070
  destroy() {
4066
4071
  this.styleObserver?.disconnect(), this.styleObserver = null, this.schemeMedia && this.schemeListener && this.schemeMedia.removeEventListener?.("change", this.schemeListener), this.schemeMedia = null, this.schemeListener = null;
4067
4072
  }
4068
- }, Bi = 8;
4069
- function Vi(e) {
4070
- let { cell: t, popup: n, viewport: r, rtl: i } = e, a = Bi, o = t.x + t.w + a, s = t.x - a - n.w, c = o + n.w <= r.w, l = s >= 0, u;
4073
+ }, Vi = 8;
4074
+ function Hi(e) {
4075
+ let { cell: t, popup: n, viewport: r, rtl: i } = e, a = Vi, o = t.x + t.w + a, s = t.x - a - n.w, c = o + n.w <= r.w, l = s >= 0, u;
4071
4076
  u = i ? l ? s : c ? o : s : c ? o : l ? s : o, u = Math.max(0, Math.min(u, r.w - n.w));
4072
4077
  let d = t.y;
4073
4078
  return d = Math.max(0, Math.min(d, r.h - n.h)), {
@@ -4075,12 +4080,12 @@ function Vi(e) {
4075
4080
  top: d
4076
4081
  };
4077
4082
  }
4078
- var Hi;
4079
- function Ui() {
4080
- return Hi ??= import("./comment-ui-runtime-BtP_TpvT.js");
4083
+ var Ui;
4084
+ function Wi() {
4085
+ return Ui ??= import("./comment-ui-runtime-BtP_TpvT.js");
4081
4086
  }
4082
- var Wi = 150;
4083
- function Gi(e) {
4087
+ var Gi = 150;
4088
+ function Ki(e) {
4084
4089
  let t = /* @__PURE__ */ new Map();
4085
4090
  for (let n of e) {
4086
4091
  let e = z(n.cellRef);
@@ -4088,7 +4093,7 @@ function Gi(e) {
4088
4093
  }
4089
4094
  return t;
4090
4095
  }
4091
- var Ki = class {
4096
+ var qi = class {
4092
4097
  host;
4093
4098
  popup;
4094
4099
  commentMap = /* @__PURE__ */ new Map();
@@ -4107,7 +4112,7 @@ var Ki = class {
4107
4112
  }), this.resizeObserver.observe(this.popup));
4108
4113
  }
4109
4114
  setComments(e) {
4110
- this.commentMap = Gi(e);
4115
+ this.commentMap = Ki(e);
4111
4116
  }
4112
4117
  commentAt(e) {
4113
4118
  return this.commentMap.get(`${e.row}:${e.col}`);
@@ -4126,10 +4131,10 @@ var Ki = class {
4126
4131
  }
4127
4132
  this.popupKey !== t && (this.hide(), this.popupKey = t, this.timer = setTimeout(() => {
4128
4133
  this.timer = null, this.show(e, n).catch((e) => this.host.reportError(e));
4129
- }, Wi));
4134
+ }, Gi));
4130
4135
  }
4131
4136
  async loadUi() {
4132
- let e = this.ui ?? await Ui();
4137
+ let e = this.ui ?? await Wi();
4133
4138
  return this.host.isDestroyed() || (this.ui = e), e;
4134
4139
  }
4135
4140
  async show(e, t) {
@@ -4176,7 +4181,7 @@ var Ki = class {
4176
4181
  if (!e || this.popup.style.display === "none") return;
4177
4182
  let t = this.host.cellRect(e.row, e.col);
4178
4183
  if (!t) return;
4179
- let n = Vi({
4184
+ let n = Hi({
4180
4185
  cell: {
4181
4186
  x: this.host.screenX(t.x, t.w),
4182
4187
  y: t.y,
@@ -4201,7 +4206,7 @@ var Ki = class {
4201
4206
  destroy() {
4202
4207
  this.resizeObserver?.disconnect(), this.resizeObserver = null, this.hide(), this.commentMap.clear();
4203
4208
  }
4204
- }, qi = class {
4209
+ }, Ji = class {
4205
4210
  owner = new ke("SheetAcquisition");
4206
4211
  get current() {
4207
4212
  return this.owner.current;
@@ -4216,7 +4221,7 @@ var Ki = class {
4216
4221
  this.owner.close();
4217
4222
  }
4218
4223
  };
4219
- function Ji(e) {
4224
+ function Yi(e) {
4220
4225
  let t = {
4221
4226
  ...e,
4222
4227
  rows: e.rows.map((e) => ({ ...e })),
@@ -4225,7 +4230,7 @@ function Ji(e) {
4225
4230
  };
4226
4231
  return e.colCollapsed && (t.colCollapsed = { ...e.colCollapsed }), B(e, t), Ln(e, t), Ft(e, t), Wt(e, t), t;
4227
4232
  }
4228
- var Yi = class {
4233
+ var Xi = class {
4229
4234
  scaleValue;
4230
4235
  offsetX = 0;
4231
4236
  offsetY = 0;
@@ -4272,7 +4277,7 @@ var Yi = class {
4272
4277
  reset() {
4273
4278
  this.offsetX = 0, this.offsetY = 0;
4274
4279
  }
4275
- }, Xi = class {
4280
+ }, Zi = class {
4276
4281
  animationFrame = null;
4277
4282
  activeRender = !1;
4278
4283
  pendingRender = null;
@@ -4337,7 +4342,7 @@ var Yi = class {
4337
4342
  destroy() {
4338
4343
  this.destroyed || (this.destroyed = !0, this.pendingRender = null, this.animationFrame !== null && this.frameScheduler && (this.frameScheduler.cancelAnimationFrame(this.animationFrame), this.animationFrame = null), this.staticDispatcher?.destroy(), this.generation++);
4339
4344
  }
4340
- }, Zi = class {
4345
+ }, Qi = class {
4341
4346
  state = null;
4342
4347
  dragPointerId = null;
4343
4348
  get anchor() {
@@ -4514,7 +4519,7 @@ var Yi = class {
4514
4519
  };
4515
4520
  }
4516
4521
  }
4517
- }, Qi = class {
4522
+ }, $i = class {
4518
4523
  canvas;
4519
4524
  area;
4520
4525
  input;
@@ -4552,7 +4557,7 @@ var Yi = class {
4552
4557
  destroy() {
4553
4558
  for (let e of this.cleanups.splice(0)) e();
4554
4559
  }
4555
- }, $i = class {
4560
+ }, ea = class {
4556
4561
  stopValidationWheel = (e) => e.stopPropagation();
4557
4562
  selection;
4558
4563
  find;
@@ -4593,13 +4598,13 @@ var Yi = class {
4593
4598
  destroy() {
4594
4599
  this.validation.removeEventListener("wheel", this.stopValidationWheel);
4595
4600
  }
4596
- }, ea = Symbol("XlsxViewer.borrowedWorkbook"), ta = Symbol("XlsxViewer.loadSource"), na = 240, ra = 200, ia = 1, aa = "data-xlsx-viewer-styles", oa = ".xlsx-tab-strip::-webkit-scrollbar{display:none}[data-xlsx-viewport-input]:focus{outline:none}[data-xlsx-viewport-input]:focus-visible{outline:2px solid var(--ooxml-xlsx-focus-ring,transparent);outline-offset:-2px}.xlsx-tab-nav{background:transparent;transition:background 0.1s;}.xlsx-tab-nav:hover{background:color-mix(in srgb,var(--ooxml-xlsx-chrome-text,#444) 8%,transparent);}.xlsx-zoom-slider{-webkit-appearance:none;appearance:none;background:transparent;height:15px;margin:0;}.xlsx-zoom-slider::-webkit-slider-runnable-track{height:4px;background:var(--ooxml-xlsx-chrome-border,#c4c4c4);border-radius:2px;}.xlsx-zoom-slider::-webkit-slider-thumb{-webkit-appearance:none;appearance:none;width:12px;height:12px;margin-top:-4px;border-radius:50%;background:var(--ooxml-xlsx-chrome-text-muted,#808080);cursor:pointer;}.xlsx-zoom-slider:hover::-webkit-slider-thumb{background:var(--ooxml-xlsx-chrome-text,#5f5f5f);}.xlsx-zoom-slider::-moz-range-track{height:4px;background:var(--ooxml-xlsx-chrome-border,#c4c4c4);border-radius:2px;}.xlsx-zoom-slider::-moz-range-thumb{width:12px;height:12px;border:none;border-radius:50%;background:var(--ooxml-xlsx-chrome-text-muted,#808080);cursor:pointer;}";
4597
- function sa(e) {
4598
- if (!e.head || e.head.querySelector(`style[${aa}]`)) return;
4601
+ }, ta = Symbol("XlsxViewer.borrowedWorkbook"), na = Symbol("XlsxViewer.loadSource"), ra = 240, ia = 200, aa = 1, oa = "data-xlsx-viewer-styles", sa = ".xlsx-tab-strip::-webkit-scrollbar{display:none}[data-xlsx-viewport-input]:focus{outline:none}[data-xlsx-viewport-input]:focus-visible{outline:2px solid var(--ooxml-xlsx-focus-ring,transparent);outline-offset:-2px}.xlsx-tab-nav{background:transparent;transition:background 0.1s;}.xlsx-tab-nav:hover{background:color-mix(in srgb,var(--ooxml-xlsx-chrome-text,#444) 8%,transparent);}.xlsx-zoom-slider{-webkit-appearance:none;appearance:none;background:transparent;height:15px;margin:0;}.xlsx-zoom-slider::-webkit-slider-runnable-track{height:4px;background:var(--ooxml-xlsx-chrome-border,#c4c4c4);border-radius:2px;}.xlsx-zoom-slider::-webkit-slider-thumb{-webkit-appearance:none;appearance:none;width:12px;height:12px;margin-top:-4px;border-radius:50%;background:var(--ooxml-xlsx-chrome-text-muted,#808080);cursor:pointer;}.xlsx-zoom-slider:hover::-webkit-slider-thumb{background:var(--ooxml-xlsx-chrome-text,#5f5f5f);}.xlsx-zoom-slider::-moz-range-track{height:4px;background:var(--ooxml-xlsx-chrome-border,#c4c4c4);border-radius:2px;}.xlsx-zoom-slider::-moz-range-thumb{width:12px;height:12px;border:none;border-radius:50%;background:var(--ooxml-xlsx-chrome-text-muted,#808080);cursor:pointer;}";
4602
+ function ca(e) {
4603
+ if (!e.head || e.head.querySelector(`style[${oa}]`)) return;
4599
4604
  let t = e.createElement("style");
4600
- t.setAttribute(aa, ""), t.textContent = oa, e.head.appendChild(t);
4605
+ t.setAttribute(oa, ""), t.textContent = sa, e.head.appendChild(t);
4601
4606
  }
4602
- function ca(e, t) {
4607
+ function la(e, t) {
4603
4608
  let n = {
4604
4609
  password: e.password,
4605
4610
  useGoogleFonts: e.useGoogleFonts,
@@ -4623,24 +4628,24 @@ function ca(e, t) {
4623
4628
  legacyXls: e.legacyXls
4624
4629
  };
4625
4630
  }
4626
- function la(e, t, n) {
4631
+ function ua(e, t, n) {
4627
4632
  let r = e ?? t;
4628
4633
  if (!Number.isSafeInteger(r) || r < 0) throw TypeError(`${n} must be a non-negative safe integer`);
4629
4634
  return r;
4630
4635
  }
4631
- function ua(e) {
4636
+ function da(e) {
4632
4637
  return {
4633
- minRows: la(e.minRows, Fn.minRows, "minRows"),
4634
- minCols: la(e.minCols, Fn.minCols, "minCols"),
4635
- marginRows: la(e.marginRows, 30, "marginRows"),
4636
- marginCols: la(e.marginCols, 10, "marginCols")
4638
+ minRows: ua(e.minRows, Fn.minRows, "minRows"),
4639
+ minCols: ua(e.minCols, Fn.minCols, "minCols"),
4640
+ marginRows: ua(e.marginRows, 30, "marginRows"),
4641
+ marginCols: ua(e.marginCols, 10, "marginCols")
4637
4642
  };
4638
4643
  }
4639
- var da = class {
4644
+ var fa = class {
4640
4645
  container;
4641
4646
  hostDocument;
4642
4647
  hostWindow;
4643
- acquisition = new qi();
4648
+ acquisition = new Ji();
4644
4649
  viewport;
4645
4650
  renderDispatcher;
4646
4651
  wrapper;
@@ -4648,7 +4653,7 @@ var da = class {
4648
4653
  gridRegion;
4649
4654
  outlineGutter;
4650
4655
  viewEdits = new wr();
4651
- projectionId = ia++;
4656
+ projectionId = aa++;
4652
4657
  canvasArea;
4653
4658
  scrollHost;
4654
4659
  spacer;
@@ -4696,14 +4701,14 @@ var da = class {
4696
4701
  }
4697
4702
  _pendingZoomAnchor = null;
4698
4703
  displayedViewport = null;
4699
- selectionController = new Zi();
4704
+ selectionController = new Qi();
4700
4705
  notifier;
4701
- contextReader = new Ii();
4706
+ contextReader = new Li();
4702
4707
  gridExtent;
4703
4708
  elementContext = null;
4704
4709
  selectionPaint;
4705
4710
  finder;
4706
- copier = new fi({
4711
+ copier = new pi({
4707
4712
  worksheet: () => this.currentWorksheet,
4708
4713
  selection: () => this.selectionState,
4709
4714
  workbook: () => this.wb,
@@ -4717,14 +4722,14 @@ var da = class {
4717
4722
  this.container = e, this.hostDocument = (n.kind === "sheet" ? n.canvas.ownerDocument : e.ownerDocument) ?? document;
4718
4723
  let r = this.hostDocument.defaultView;
4719
4724
  if (!r) throw Error("XlsxViewer requires a document with an active Window");
4720
- this.hostWindow = r, this.opts = t, this.gridExtent = ua(t), this._mountKind = n.kind, this._nativeScrollbars = t.showScrollbars ?? !0;
4721
- let i = t[ea];
4722
- this._borrowed = i !== void 0, this._mode = n.kind === "sheet" ? n.mode : Me("XlsxViewer", t.mode, i), this._hiddenSheetMode = t.hiddenSheetMode ?? "show", this.viewport = new Yi(t.cellScale ?? 1), this.wrapper = this.hostDocument.createElement("div"), this.wrapper.style.cssText = `position:relative;width:100%;height:100%;background:${n.kind === "composite" ? "var(--ooxml-xlsx-chrome-surface,#fff)" : "transparent"};box-sizing:border-box;font-family:sans-serif;display:flex;flex-direction:column;`, this.gridRegion = this.hostDocument.createElement("div"), this.gridRegion.style.cssText = "position:relative;flex:1;min-height:0;overflow:hidden;", this.canvasArea = this.hostDocument.createElement("div"), this.canvasArea.style.cssText = "position:absolute;inset:0;overflow:hidden;", this.canvas = n.kind === "sheet" ? n.canvas : this.hostDocument.createElement("canvas"), this.canvas.style.cssText = "position:absolute;top:0;left:0;z-index:0;display:block;", this.renderDispatcher = new Xi(this.canvas, this._mode === "worker", this.hostWindow), this.scrollHost = this.hostDocument.createElement("div"), this.scrollHost.setAttribute("data-xlsx-viewport-input", n.kind), this.scrollHost.setAttribute("role", "region"), this.scrollHost.setAttribute("aria-label", "Spreadsheet viewport. Use Arrow keys to move the selected cell. Press Enter to show its comment."), this.scrollHost.tabIndex = 0, this.scrollHost.style.cssText = `position:absolute;inset:0;overflow:${this._nativeScrollbars ? "auto" : "clip"};z-index:2;background:transparent;scrollbar-color:var(--ooxml-xlsx-chrome-scrollbar-color,auto);`, this.spacer = this.hostDocument.createElement("div"), this.spacer.style.cssText = "position:absolute;top:0;left:0;pointer-events:none;", this._nativeScrollbars && this.scrollHost.appendChild(this.spacer), this.surface = new Qi(this.canvas, this.canvasArea, this.scrollHost), this.overlayHost = new $i(this.canvasArea, this.canvas, this.scrollHost, {
4725
+ this.hostWindow = r, this.opts = t, this.gridExtent = da(t), this._mountKind = n.kind, this._nativeScrollbars = t.showScrollbars ?? !0;
4726
+ let i = t[ta];
4727
+ this._borrowed = i !== void 0, this._mode = n.kind === "sheet" ? n.mode : Me("XlsxViewer", t.mode, i), this._hiddenSheetMode = t.hiddenSheetMode ?? "show", this.viewport = new Xi(t.cellScale ?? 1), this.wrapper = this.hostDocument.createElement("div"), this.wrapper.style.cssText = `position:relative;width:100%;height:100%;background:${n.kind === "composite" ? "var(--ooxml-xlsx-chrome-surface,#fff)" : "transparent"};box-sizing:border-box;font-family:sans-serif;display:flex;flex-direction:column;`, this.gridRegion = this.hostDocument.createElement("div"), this.gridRegion.style.cssText = "position:relative;flex:1;min-height:0;overflow:hidden;", this.canvasArea = this.hostDocument.createElement("div"), this.canvasArea.style.cssText = "position:absolute;inset:0;overflow:hidden;", this.canvas = n.kind === "sheet" ? n.canvas : this.hostDocument.createElement("canvas"), this.canvas.style.cssText = "position:absolute;top:0;left:0;z-index:0;display:block;", this.renderDispatcher = new Zi(this.canvas, this._mode === "worker", this.hostWindow), this.scrollHost = this.hostDocument.createElement("div"), this.scrollHost.setAttribute("data-xlsx-viewport-input", n.kind), this.scrollHost.setAttribute("role", "region"), this.scrollHost.setAttribute("aria-label", "Spreadsheet viewport. Use Arrow keys to move the selected cell. Press Enter to show its comment."), this.scrollHost.tabIndex = 0, this.scrollHost.style.cssText = `position:absolute;inset:0;overflow:${this._nativeScrollbars ? "auto" : "clip"};z-index:2;background:transparent;scrollbar-color:var(--ooxml-xlsx-chrome-scrollbar-color,auto);`, this.spacer = this.hostDocument.createElement("div"), this.spacer.style.cssText = "position:absolute;top:0;left:0;pointer-events:none;", this._nativeScrollbars && this.scrollHost.appendChild(this.spacer), this.surface = new $i(this.canvas, this.canvasArea, this.scrollHost), this.overlayHost = new ea(this.canvasArea, this.canvas, this.scrollHost, {
4723
4728
  commentMaxWidth: 280,
4724
4729
  commentMaxHeight: 200,
4725
- validationMaxWidth: na,
4726
- validationMaxHeight: ra
4727
- }), this.notifier = new ki({
4730
+ validationMaxWidth: ra,
4731
+ validationMaxHeight: ia
4732
+ }), this.notifier = new Ai({
4728
4733
  hostWindow: this.hostWindow,
4729
4734
  isDestroyed: () => this._destroyed,
4730
4735
  selectionState: () => this.selectionState,
@@ -4733,7 +4738,7 @@ var da = class {
4733
4738
  readContext: (e) => this.getSelectionContext({ maxTextCharacters: e }),
4734
4739
  emitSelectionChange: () => this.emitSelectionChange(),
4735
4740
  scheduleSelectionContextNotification: () => this.scheduleSelectionContextNotification()
4736
- }), this.selectionPaint = new Ei({
4741
+ }), this.selectionPaint = new Di({
4737
4742
  ownerDocument: this.hostDocument,
4738
4743
  canvasArea: this.canvasArea,
4739
4744
  overlayHost: this.overlayHost,
@@ -4748,7 +4753,7 @@ var da = class {
4748
4753
  cellRect: (e, t) => this._cellRect(e, t),
4749
4754
  screenX: (e, t) => this.screenX(e, t),
4750
4755
  drawValidationDropdown: () => this.validation.drawDropdown()
4751
- }), this.comments = new Ki({
4756
+ }), this.comments = new qi({
4752
4757
  ownerDocument: this.hostDocument,
4753
4758
  canvasArea: this.canvasArea,
4754
4759
  overlayHost: this.overlayHost,
@@ -4758,7 +4763,7 @@ var da = class {
4758
4763
  cellRect: (e, t) => this._cellRect(e, t),
4759
4764
  screenX: (e, t) => this.screenX(e, t),
4760
4765
  reportError: (e) => this._reportRenderError(e)
4761
- }), this.hyperlinks = new ri({
4766
+ }), this.hyperlinks = new ii({
4762
4767
  hostWindow: this.hostWindow,
4763
4768
  enabled: () => this.opts.enableHyperlinks !== !1,
4764
4769
  onHyperlinkClick: () => this.opts.onHyperlinkClick,
@@ -4768,7 +4773,7 @@ var da = class {
4768
4773
  goToSheet: (e) => this.goToSheet(e),
4769
4774
  scrollToCell: (e) => this.scrollToCell(e),
4770
4775
  reportError: (e) => this._reportRenderError(e)
4771
- }), this.validation = new Zr({
4776
+ }), this.validation = new Qr({
4772
4777
  ownerDocument: this.hostDocument,
4773
4778
  canvasArea: this.canvasArea,
4774
4779
  surface: this.surface,
@@ -4795,17 +4800,17 @@ var da = class {
4795
4800
  setBandHidden: (e, t, n) => this.setBandHidden(e, t, n),
4796
4801
  setBandCollapsed: (e, t, n) => this.setBandCollapsed(e, t, n),
4797
4802
  afterOutlineMutation: (e, t) => this.afterOutlineMutation(e, t)
4798
- }), sa(this.hostDocument), n.kind === "composite" && (this.sheetTabs = new Wr(this.hostDocument, {
4803
+ }), ca(this.hostDocument), n.kind === "composite" && (this.sheetTabs = new Gr(this.hostDocument, {
4799
4804
  hiddenSheetMode: () => this._hiddenSheetMode,
4800
4805
  isHidden: (e) => !!this.wb?.isHidden(e),
4801
4806
  selectSheet: (e) => {
4802
4807
  this.goToSheet(e).catch((e) => this._reportRenderError(e));
4803
4808
  }
4804
- }), this.opts.showZoomSlider !== !1 && (this.zoomControl = new Jr(this.hostDocument, {
4809
+ }), this.opts.showZoomSlider !== !1 && (this.zoomControl = new Yr(this.hostDocument, {
4805
4810
  setScale: (e) => this.setScale(e),
4806
4811
  zoomIn: () => this.zoomIn(),
4807
4812
  zoomOut: () => this.zoomOut()
4808
- }, this.viewport.scale, this.opts.zoomMin ?? .1, this.opts.zoomMax ?? 4), this.sheetTabs.append(this.zoomControl.element))), this.gridRegion.appendChild(this.canvasArea), this.wrapper.appendChild(this.gridRegion), this.sheetTabs && this.wrapper.appendChild(this.sheetTabs.tabBar), e.appendChild(this.wrapper), this.chromeTheme = new zi({
4813
+ }, this.viewport.scale, this.opts.zoomMin ?? .1, this.opts.zoomMax ?? 4), this.sheetTabs.append(this.zoomControl.element))), this.gridRegion.appendChild(this.canvasArea), this.wrapper.appendChild(this.gridRegion), this.sheetTabs && this.wrapper.appendChild(this.sheetTabs.tabBar), e.appendChild(this.wrapper), this.chromeTheme = new Bi({
4809
4814
  hostWindow: this.hostWindow,
4810
4815
  container: this.container,
4811
4816
  wrapper: this.wrapper,
@@ -4827,7 +4832,7 @@ var da = class {
4827
4832
  };
4828
4833
  this.viewport.setViewportSize(this.scrollHost.clientWidth, this.scrollHost.clientHeight), this.setViewportLeft(e.x), this.viewportTop = e.y, this.reanchorHorizontalScroll(), this.layoutGutters(), this.scheduleRender(), this.updateSelectionOverlay(), this.updateFindOverlay(), this.sheetTabs?.updateNavButtons();
4829
4834
  });
4830
- a.observe(this.gridRegion), this.resizeObserver = a, this.selectionInput = new xi({
4835
+ a.observe(this.gridRegion), this.resizeObserver = a, this.selectionInput = new Si({
4831
4836
  surface: this.surface,
4832
4837
  scrollHost: this.scrollHost,
4833
4838
  canvasArea: this.canvasArea,
@@ -4881,7 +4886,7 @@ var da = class {
4881
4886
  updateSpacerSize: (e) => this.updateSpacerSize(e),
4882
4887
  refitAutoRowsAfterColumnResize: () => this.refitAutoRowsAfterColumnResize(),
4883
4888
  reportError: (e) => this._reportRenderError(e)
4884
- }), this.selectionInput.install(), this.finder = new ci({
4889
+ }), this.selectionInput.install(), this.finder = new li({
4885
4890
  ownerDocument: this.hostDocument,
4886
4891
  overlayHost: this.overlayHost,
4887
4892
  workbook: () => this.wb,
@@ -4896,10 +4901,10 @@ var da = class {
4896
4901
  scrollCellIntoView: (e, t) => this._scrollCellIntoView(e, t)
4897
4902
  }), i && (this.acquisition.install(i, !1), this._mountKind === "composite" && this.activateWorkbook(i).catch((e) => this._reportRenderError(e)));
4898
4903
  }
4899
- async [ta](e, t = {}) {
4904
+ async [na](e, t = {}) {
4900
4905
  if (this.assertOpen(), this._borrowed) throw Error(`${this._mountKind === "sheet" ? "XlsxSheetViewer" : "XlsxViewer"}.load() is unsupported on a Viewer created by fromWorkbook(); the borrowed workbook is already loaded.`);
4901
4906
  try {
4902
- let n = await this.acquisition.replace(() => Un[Hn](e, ca(this.opts, this._mode), t), () => {
4907
+ let n = await this.acquisition.replace(() => Un[Hn](e, la(this.opts, this._mode), t), () => {
4903
4908
  this.sheetRequestGeneration++, this.renderDispatcher.begin(), this.finder.invalidate(), this.hideValidationPanel(), this.releaseHostFonts();
4904
4909
  });
4905
4910
  if (!n) return;
@@ -5027,7 +5032,7 @@ var da = class {
5027
5032
  }
5028
5033
  nt(r), st(r);
5029
5034
  let c = this.hostDocument.createElement("canvas").getContext("2d");
5030
- c && (n[Bn](o, c), this.currentAutoRowHeightsPrepared = !0), this.viewEdits.syncAutomaticRowOverrides(e, o), this.currentSourceComments = i.comments ?? [], this.sourceCommentMap = Gi(this.currentSourceComments), this.buildCommentMap(o), this.buildHyperlinkMap(o), this.buildOutline(o), this.layoutGutters(), this.updateSpacerSize(o), this.scheduleRender(), this.scheduleSelectionContextNotification();
5035
+ c && (n[Bn](o, c), this.currentAutoRowHeightsPrepared = !0), this.viewEdits.syncAutomaticRowOverrides(e, o), this.currentSourceComments = i.comments ?? [], this.sourceCommentMap = Ki(this.currentSourceComments), this.buildCommentMap(o), this.buildHyperlinkMap(o), this.buildOutline(o), this.layoutGutters(), this.updateSpacerSize(o), this.scheduleRender(), this.scheduleSelectionContextNotification();
5031
5036
  }).catch((e) => {
5032
5037
  if (!(!this.isCurrentSheetRequest(t, n) || this.currentWorksheet !== r)) {
5033
5038
  if (this.previewCompletion = null, this.firstPreviewRender = !1, this.previewPreparedViewport = null, this.selectionInput.clearSheetGestures(), this.displayedViewport = null, this.currentWorksheet = null, this.releaseCurrentWorksheet?.(), this.releaseCurrentWorksheet = null, this.renderDispatcher.begin(), this._mode === "worker") {
@@ -5038,7 +5043,7 @@ var da = class {
5038
5043
  } else this.canvas.getContext("2d")?.clearRect?.(0, 0, this.canvas.width, this.canvas.height);
5039
5044
  this._reportRenderError(e);
5040
5045
  }
5041
- }), this.currentSourceComments = i.comments ?? [], this.opts.comments !== !1 && this.currentSourceComments.length > 0 && this.comments.loadUi().catch((e) => this._reportRenderError(e)), this.sourceCommentMap = Gi(this.currentSourceComments), this.setElementContext(null), this.selectionInput.clearSheetGestures(), this.updateFooterDirection(), this.viewportTop = 0, this.selectionController.reset(), this.emitSelectionChange(), this.hideCommentPopup(), this.hideValidationPanel(), this.updateSelectionOverlay(), this.updateTabActive(e), this.buildCommentMap(this.currentWorksheet), this.buildHyperlinkMap(this.currentWorksheet), this.buildOutline(this.currentWorksheet), this.layoutGutters(), this.updateSpacerSize(this.currentWorksheet), this.resetHorizontalScroll();
5046
+ }), this.currentSourceComments = i.comments ?? [], this.opts.comments !== !1 && this.currentSourceComments.length > 0 && this.comments.loadUi().catch((e) => this._reportRenderError(e)), this.sourceCommentMap = Ki(this.currentSourceComments), this.setElementContext(null), this.selectionInput.clearSheetGestures(), this.updateFooterDirection(), this.viewportTop = 0, this.selectionController.reset(), this.emitSelectionChange(), this.hideCommentPopup(), this.hideValidationPanel(), this.updateSelectionOverlay(), this.updateTabActive(e), this.buildCommentMap(this.currentWorksheet), this.buildHyperlinkMap(this.currentWorksheet), this.buildOutline(this.currentWorksheet), this.layoutGutters(), this.updateSpacerSize(this.currentWorksheet), this.resetHorizontalScroll();
5042
5047
  let u = this.committedFrameCount;
5043
5048
  await this.renderCurrentSheet();
5044
5049
  let d = this.committedFrameCount > u;
@@ -5407,7 +5412,7 @@ var da = class {
5407
5412
  this.comments.setComments(e.comments ?? []);
5408
5413
  }
5409
5414
  createVisibleSheetView(e) {
5410
- let t = Ji(e);
5415
+ let t = Yi(e);
5411
5416
  if (this.opts.comments === !1) {
5412
5417
  let e = {
5413
5418
  ...t,
@@ -5589,20 +5594,20 @@ var da = class {
5589
5594
  destroyedError() {
5590
5595
  return /* @__PURE__ */ Error(this._mountKind === "sheet" ? "XlsxSheetViewer is destroyed" : "XlsxViewer is destroyed");
5591
5596
  }
5592
- }, fa = class e extends da {
5597
+ }, pa = class e extends fa {
5593
5598
  static fromWorkbook(t, n, r = {}) {
5594
5599
  return new e(t, {
5595
5600
  ...r,
5596
- [ea]: n
5601
+ [ta]: n
5597
5602
  });
5598
5603
  }
5599
5604
  constructor(e, t = {}) {
5600
5605
  super(e, t, { kind: "composite" });
5601
5606
  }
5602
5607
  async load(e) {
5603
- await this[ta](e);
5608
+ await this[na](e);
5604
5609
  }
5605
- }, pa = class e {
5610
+ }, ma = class e {
5606
5611
  canvasElement;
5607
5612
  engine;
5608
5613
  canvasMount;
@@ -5612,16 +5617,16 @@ var da = class {
5612
5617
  static fromWorkbook(t, n, r = {}) {
5613
5618
  return new e(t, {
5614
5619
  ...r,
5615
- [ea]: n
5620
+ [ta]: n
5616
5621
  });
5617
5622
  }
5618
5623
  constructor(e, t = {}) {
5619
5624
  this.canvasElement = e;
5620
- let n = t[ea], r = Me("XlsxSheetViewer", t.mode, n), i = e.getBoundingClientRect();
5625
+ let n = t[ta], r = Me("XlsxSheetViewer", t.mode, n), i = e.getBoundingClientRect();
5621
5626
  this.canvasMount = new je(e, {
5622
5627
  wrapperCssText: `position:relative;display:inline-block;vertical-align:top;overflow:hidden;width:${e.style.width || `${i.width || e.width}px`};height:${e.style.height || `${i.height || e.height}px`};`,
5623
5628
  restoreMode: "style-and-bitmap"
5624
- }), this.engine = new da(this.canvasMount.wrapper, {
5629
+ }), this.engine = new fa(this.canvasMount.wrapper, {
5625
5630
  ...t,
5626
5631
  onResourceMetrics: (e) => {
5627
5632
  this.lastMetrics = e, t.onResourceMetrics?.(e);
@@ -5647,7 +5652,7 @@ var da = class {
5647
5652
  async load(e, t = {}) {
5648
5653
  this.assertOpen();
5649
5654
  try {
5650
- await this.engine[ta](e, t);
5655
+ await this.engine[na](e, t);
5651
5656
  } finally {
5652
5657
  this.destroyed || this.captureSnapshot();
5653
5658
  }
@@ -5789,7 +5794,7 @@ var da = class {
5789
5794
  destroyedError() {
5790
5795
  return /* @__PURE__ */ Error("XlsxSheetViewer is destroyed");
5791
5796
  }
5792
- }, ma = /* @__PURE__ */ e({
5797
+ }, ha = /* @__PURE__ */ e({
5793
5798
  MAX_SELECTION_AREAS: () => 128,
5794
5799
  MAX_SELECTION_CONTEXT_CELLS: () => mr,
5795
5800
  MAX_SELECTION_CONTEXT_TEXT_CHARACTERS: () => hr,
@@ -5797,8 +5802,8 @@ var da = class {
5797
5802
  OoxmlError: () => h,
5798
5803
  OoxmlResourceLimitError: () => _,
5799
5804
  TiffDecodeError: () => he,
5800
- XlsxSheetViewer: () => pa,
5801
- XlsxViewer: () => fa,
5805
+ XlsxSheetViewer: () => ma,
5806
+ XlsxViewer: () => pa,
5802
5807
  XlsxWorkbook: () => Un,
5803
5808
  autoResize: () => _e,
5804
5809
  isOoxmlDecodedImageLimitError: () => R,
@@ -5806,4 +5811,4 @@ var da = class {
5806
5811
  openExternalHyperlink: () => L,
5807
5812
  resolveSharedStrings: () => xt
5808
5813
  });
5809
- export { mr as a, On as c, pr as i, Dn as l, pa as n, hr as o, fa as r, Un as s, ma as t };
5814
+ export { mr as a, On as c, pr as i, Dn as l, ma as n, hr as o, pa as r, Un as s, ha as t };