@silurus/ooxml 0.89.6 → 0.89.8

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 (73) hide show
  1. package/dist/assets/render-worker-Ck21oePL.js +16 -0
  2. package/dist/assets/render-worker-DJiGqgi0.js +15 -0
  3. package/dist/assets/render-worker-hPLJ82d2.js +35 -0
  4. package/dist/{bounded-raw-part-cache-B8t03tSP.js → bounded-raw-part-cache-B5a6cGKO.js} +1713 -1515
  5. package/dist/{canvas-viewer-mechanics-DI38gHNV.js → canvas-viewer-mechanics-BsqaoYgK.js} +2 -2
  6. package/dist/{cfb-guard-BIaHdonq.js → cfb-guard-DzYlucez.js} +1 -1
  7. package/dist/chart-ex.mjs +367 -367
  8. package/dist/{comment-overlay-controller-Crm5Syhx.js → comment-overlay-controller-B7AoyoDK.js} +18 -18
  9. package/dist/{comment-ui-runtime-hfewTmVJ.js → comment-ui-runtime-C5eWtZSW.js} +3 -3
  10. package/dist/{comment-ui-runtime-BfEPgl5r.js → comment-ui-runtime-CV0I9faV.js} +3 -3
  11. package/dist/{document-model-source-BUTSwkyP.js → document-model-source-90ext13g.js} +37 -37
  12. package/dist/{document-pull-client-C_D779tO.js → document-pull-client-DSYpUET2.js} +17525 -13847
  13. package/dist/{document-pull-worker-Bkewz-So.js → document-pull-worker-hMKJ5RdB.js} +14 -14
  14. package/dist/{docx-BfLZeiwa.js → docx-DCCDnwrG.js} +593 -593
  15. package/dist/{docx-BC2HQtjg.js → docx-G7pt7ajR.js} +33 -33
  16. package/dist/{docx-model-source-IjrOZgnl.js → docx-model-source-Beon3BD5.js} +6 -6
  17. package/dist/docx.mjs +4 -4
  18. package/dist/docx_parser_bg.wasm +0 -0
  19. package/dist/{drawingml-shape-BcXkRayC.js → drawingml-shape-B1_kg4BV.js} +55 -55
  20. package/dist/{duotone-BI7CoghW.js → duotone-GK4Hqn7f.js} +1 -1
  21. package/dist/{emf-DgUBx9BU.js → emf--QWY-UlT.js} +50 -50
  22. package/dist/{font-preload-demand-B6HPFxDp.js → font-preload-demand-NqcVKIpX.js} +2 -2
  23. package/dist/{grid-geometry-CqTDvpDr.js → grid-geometry-DpMAiSZb.js} +1 -1
  24. package/dist/{host-layout-measure-DJvccDI3.js → host-layout-measure-Z2fIsmDw.js} +1 -1
  25. package/dist/index.mjs +3 -3
  26. package/dist/internal-companion.mjs +2 -2
  27. package/dist/{line-distribute-DR9Qwd3u.js → line-distribute-CwtditQo.js} +31 -25
  28. package/dist/{model-source-DcI3vC00.js → model-source-Cch44xsb.js} +2 -2
  29. package/dist/{model-source-session-BlQWNyj2.js → model-source-session-ClNCRDOg.js} +21 -21
  30. package/dist/{model-source-session-D0LF49Ve.js → model-source-session-DRcqFGfM.js} +2 -2
  31. package/dist/{model-source-session-BCteVilS.js → model-source-session-DSABX94B.js} +2 -2
  32. package/dist/node.mjs +5 -5
  33. package/dist/{plot-area-frame-D3JtHvov.js → plot-area-frame-DNYMd9Pf.js} +1914 -1890
  34. package/dist/{pptx-SmjDGyub.js → pptx-C1CiFW1D.js} +35 -33
  35. package/dist/{pptx-CfCiVlNB.js → pptx-Ci1Y9SS_.js} +261 -259
  36. package/dist/{pptx-model-source-B2Irk68a.js → pptx-model-source-C9TuBisH.js} +18 -12
  37. package/dist/pptx-parsed-slides-BMGr4khe.js +8 -0
  38. package/dist/pptx.mjs +5 -5
  39. package/dist/pptx_parser_bg.wasm +0 -0
  40. package/dist/{presentation-model-source-DL6duh5l.js → presentation-model-source-3N7xLtmI.js} +6 -6
  41. package/dist/region-map.mjs +39 -39
  42. package/dist/{render-CMUEAeHp.js → render-Bf_Gywxw.js} +32 -30
  43. package/dist/{render-worker-host-CtlBbau5.js → render-worker-host-BZoh-wqR.js} +1 -1
  44. package/dist/{render-worker-host-D_0g-TQ2.js → render-worker-host-BmVeB_mR.js} +1 -1
  45. package/dist/{render-worker-host-DjBotZNL.js → render-worker-host-CVr53kg0.js} +1 -1
  46. package/dist/{renderer-IFuBkPvF.js → renderer-CCA_bQB8.js} +777 -707
  47. package/dist/renderer-DpTePxGq.js +5887 -0
  48. package/dist/{resource-measurement-D2bu0Qfx.js → resource-measurement-CfJtbwiR.js} +129 -129
  49. package/dist/{session-KIWcCCP2.js → session-DPXK_lpI.js} +64 -64
  50. package/dist/{slide-pull-client-BUuJQQVE.js → slide-pull-client-3g6TxaKa.js} +1421 -1421
  51. package/dist/{three-d-ByHGsYrX.js → three-d-BfMZVR0w.js} +98 -98
  52. package/dist/three-d.mjs +678 -678
  53. package/dist/types/chart-ex.d.ts +5 -2
  54. package/dist/types/docx.d.ts +29 -7
  55. package/dist/types/index.d.ts +34 -11
  56. package/dist/types/node.d.ts +27 -5
  57. package/dist/types/pptx.d.ts +11 -7
  58. package/dist/types/region-map.d.ts +5 -2
  59. package/dist/types/three-d.d.ts +5 -2
  60. package/dist/types/xlsx.d.ts +10 -7
  61. package/dist/{wasm-runtime-generation-BLweKv8r.js → wasm-runtime-generation-D97yoAXz.js} +17 -17
  62. package/dist/{workbook-model-source-DBfVsWj7.js → workbook-model-source-BHR8shXr.js} +6 -6
  63. package/dist/{worksheet-pull-client-Du0MuIro.js → worksheet-pull-client-BudfclVl.js} +84 -84
  64. package/dist/{xlsx-CD1VeDIg.js → xlsx-7aY3Pbvh.js} +44 -44
  65. package/dist/{xlsx-CCMRAxPB.js → xlsx-DTtDjzFq.js} +299 -299
  66. package/dist/{xlsx-model-source-udh7Q4WB.js → xlsx-model-source-DXKvb90T.js} +36 -36
  67. package/dist/xlsx.mjs +5 -5
  68. package/dist/xlsx_parser_bg.wasm +0 -0
  69. package/package.json +1 -1
  70. package/dist/assets/render-worker-B5HWxkbU.js +0 -16
  71. package/dist/assets/render-worker-Ba4LYMJd.js +0 -15
  72. package/dist/assets/render-worker-DkqinUC6.js +0 -35
  73. package/dist/renderer-xdugdcMd.js +0 -5769
@@ -1,23 +1,23 @@
1
- import { I as e, K as t, L as n, R as r, z as i } from "./bounded-raw-part-cache-B8t03tSP.js";
2
- function a(t) {
3
- return r(t) ? new e(`WASM parser trapped and was recycled: ${t instanceof Error ? t.message : String(t)}`) : null;
1
+ import { B as e, H as t, V as n, Y as r, z as i } from "./bounded-raw-part-cache-B5a6cGKO.js";
2
+ function a(e) {
3
+ return n(e) ? new i(`WASM parser trapped and was recycled: ${e instanceof Error ? e.message : String(e)}`) : null;
4
4
  }
5
5
  var o = class {
6
6
  realm;
7
7
  live = /* @__PURE__ */ new Set();
8
- constructor(e, t) {
9
- this.realm = new i(() => e.initSync({ module: t }), () => e.reinit({ module_or_path: t }), a), this.realm.onPoison((e) => {
8
+ constructor(e, n) {
9
+ this.realm = new t(() => e.initSync({ module: n }), () => e.reinit({ module_or_path: n }), a), this.realm.onPoison((e) => {
10
10
  for (let t of this.live) t.poison(e);
11
11
  this.live.clear();
12
12
  });
13
13
  }
14
- async open(e, n) {
14
+ async open(e, t) {
15
15
  for (;;) {
16
- this.throwIfOpenAborted(n), await this.awaitReadyOrAbort(n), this.throwIfOpenAborted(n);
17
- let r = this.realm.tryRunReady(() => t(e));
18
- if (!r.current) continue;
19
- let i = new c(this, r.value, r.generation);
20
- if (this.live.add(i), n?.signal?.aborted) throw i.close(n.disposeOnAbort), n.abortError?.() ?? new DOMException("The operation was aborted", "AbortError");
16
+ this.throwIfOpenAborted(t), await this.awaitReadyOrAbort(t), this.throwIfOpenAborted(t);
17
+ let n = this.realm.tryRunReady(() => r(e));
18
+ if (!n.current) continue;
19
+ let i = new c(this, n.value, n.generation);
20
+ if (this.live.add(i), t?.signal?.aborted) throw i.close(t.disposeOnAbort), t.abortError?.() ?? new DOMException("The operation was aborted", "AbortError");
21
21
  return i;
22
22
  }
23
23
  }
@@ -40,9 +40,9 @@ var o = class {
40
40
  async ensureReady() {
41
41
  await this.realm.ensureReady();
42
42
  }
43
- run(e, n) {
44
- let r = e.requireLive(this.realm);
45
- return t(() => this.realm.run(() => n(r)));
43
+ run(e, t) {
44
+ let n = e.requireLive(this.realm);
45
+ return r(() => this.realm.run(() => t(n)));
46
46
  }
47
47
  close(e, t) {
48
48
  let n = e.detachForClose();
@@ -87,9 +87,9 @@ var c = class {
87
87
  let e = this.archive;
88
88
  return this.archive = void 0, this.failure ? void 0 : e;
89
89
  }
90
- poison(e) {
91
- let t = this.archive;
92
- this.failure = e, this.archive = void 0, n(t);
90
+ poison(t) {
91
+ let n = this.archive;
92
+ this.failure = t, this.archive = void 0, e(n);
93
93
  }
94
94
  };
95
95
  export { s as t };
@@ -1,8 +1,8 @@
1
- import { N as e, j as t, qt as n } from "./bounded-raw-part-cache-B8t03tSP.js";
2
- import { T as r } from "./canvas-viewer-mechanics-DI38gHNV.js";
3
- import { a as i, g as a } from "./renderer-IFuBkPvF.js";
4
- import { b as o } from "./worksheet-pull-client-Du0MuIro.js";
5
- import { c as s, l as c } from "./xlsx-CCMRAxPB.js";
1
+ import { I as e, P as t, Xt as n } from "./bounded-raw-part-cache-B5a6cGKO.js";
2
+ import { T as r } from "./canvas-viewer-mechanics-BsqaoYgK.js";
3
+ import { a as i, g as a } from "./renderer-CCA_bQB8.js";
4
+ import { b as o } from "./worksheet-pull-client-BudfclVl.js";
5
+ import { c as s, l as c } from "./xlsx-DTtDjzFq.js";
6
6
  import { n as l, o as u, r as d } from "./model-source-COXegBNA.js";
7
7
  import { t as f } from "./bundled-asset-url-BMJ8vNHP.js";
8
8
  import { n as p } from "./host-layout-Cz_lCuTZ.js";
@@ -52,7 +52,7 @@ async function m(i, d, f) {
52
52
  let p = l(t, "xlsx");
53
53
  try {
54
54
  _.setSourceBytes(e.byteLength), _.checkpoint("container ready");
55
- let t = g === "worker" ? (await import("./render-worker-host-D_0g-TQ2.js")).createRenderWorker() : new (await (import("./worker-source-C29EQNUj.js"))).default(), n, i = h(t, p, d, (e) => {
55
+ let t = g === "worker" ? (await import("./render-worker-host-BZoh-wqR.js")).createRenderWorker() : new (await (import("./worker-source-C29EQNUj.js"))).default(), n, i = h(t, p, d, (e) => {
56
56
  n && (n.sourceMdw = e);
57
57
  });
58
58
  try {
@@ -1,7 +1,7 @@
1
- import { yo as e } from "./plot-area-frame-D3JtHvov.js";
2
- import { B as t, Cn as n, D as r, E as i, G as a, O as o, Sn as s, W as c, _n as l, bn as u, gn as d, k as f, vn as p, wn as m, xn as h, yn as g } from "./bounded-raw-part-cache-B8t03tSP.js";
1
+ import { wo as e } from "./plot-area-frame-DNYMd9Pf.js";
2
+ import { A as t, Cn as n, Dn as r, En as i, J as a, M as o, Sn as s, Tn as c, U as l, bn as u, j as d, k as f, q as p, wn as m, xn as h, yn as g } from "./bounded-raw-part-cache-B5a6cGKO.js";
3
3
  import { n as _ } from "./abort-JztSoyw2.js";
4
- import { n as v, r as y, t as b } from "./resource-measurement-D2bu0Qfx.js";
4
+ import { n as v, r as y, t as b } from "./resource-measurement-CfJtbwiR.js";
5
5
  function x(e) {
6
6
  return e.byteOffset === 0 && e.byteLength === e.buffer.byteLength && e.buffer instanceof ArrayBuffer ? e.buffer : e.slice().buffer;
7
7
  }
@@ -16,18 +16,18 @@ function C(e) {
16
16
  }
17
17
  var w = Object.freeze({
18
18
  worksheet: C({
19
- maxRows: m,
20
- maxCells: h,
21
- maxOwnedUtf8Bytes: s,
22
- maxJsonBytes: n
19
+ maxRows: r,
20
+ maxCells: m,
21
+ maxOwnedUtf8Bytes: c,
22
+ maxJsonBytes: i
23
23
  }),
24
24
  cache: C({
25
- maxRows: u,
26
- maxCells: l,
27
- maxOwnedUtf8Bytes: p,
28
- maxJsonBytes: g
25
+ maxRows: n,
26
+ maxCells: u,
27
+ maxOwnedUtf8Bytes: h,
28
+ maxJsonBytes: s
29
29
  }),
30
- maxCoordinateIndexEntries: d
30
+ maxCoordinateIndexEntries: g
31
31
  });
32
32
  function T(e, t) {
33
33
  let n = e[t];
@@ -79,7 +79,7 @@ function j(e, t) {
79
79
  let n = O.get(e);
80
80
  n === void 0 ? O.delete(t) : O.set(t, n);
81
81
  }
82
- var M = n, N = Object.freeze({
82
+ var M = i, N = Object.freeze({
83
83
  archiveEntryCount: 0,
84
84
  declaredInflatedBytes: 0,
85
85
  distinctInflatedBytes: 0,
@@ -124,10 +124,10 @@ function R(e, t, n = {}, r = w) {
124
124
  jsonBytes: b(c, t.jsonBytes, i.maxJsonBytes)
125
125
  };
126
126
  }
127
- function z(t, n, r, i, a, o, s, l = r !== "delimited-text-source") {
128
- let u = r === "worksheet-json" ? "serialization" : "parsing";
129
- return new e(c({
130
- stage: u,
127
+ function z(t, n, r, i, a, o, s, c = r !== "delimited-text-source") {
128
+ let l = r === "worksheet-json" ? "serialization" : "parsing";
129
+ return new e(p({
130
+ stage: l,
131
131
  violation: {
132
132
  part: n,
133
133
  resource: r,
@@ -136,7 +136,7 @@ function z(t, n, r, i, a, o, s, l = r !== "delimited-text-source") {
136
136
  limit: a
137
137
  }
138
138
  }), {
139
- stage: u,
139
+ stage: l,
140
140
  violation: {
141
141
  format: "xlsx",
142
142
  operation: t,
@@ -145,7 +145,7 @@ function z(t, n, r, i, a, o, s, l = r !== "delimited-text-source") {
145
145
  ...n === void 0 ? {} : { part: n },
146
146
  limit: a,
147
147
  observed: Math.min(o, a + 1),
148
- configurable: l,
148
+ configurable: c,
149
149
  usage: s ?? N
150
150
  }
151
151
  });
@@ -243,7 +243,7 @@ var q = 64 * 1024 * 1024, J = class {
243
243
  prepareRows;
244
244
  provisional;
245
245
  worksheetPolicy;
246
- coordinator = new f();
246
+ coordinator = new o();
247
247
  sessions = /* @__PURE__ */ new Map();
248
248
  operationTail = Promise.resolve();
249
249
  pendingOpens = /* @__PURE__ */ new Map();
@@ -277,16 +277,16 @@ var q = 64 * 1024 * 1024, J = class {
277
277
  if (this.resourceFailure) throw this.resourceFailure;
278
278
  let i = this.pendingOpens.get(r.sessionId);
279
279
  if (!i || i.identity.operationId !== r.operationId || i.identity.generation !== r.generation) throw Error("worksheet pull session open reservation is stale or missing");
280
- let a = this.worksheetPolicy(), s, c = new Promise((e) => {
281
- s = e;
282
- }), l = this.operationTail.then(() => this.coordinator.enqueue(async () => {
280
+ let a = this.worksheetPolicy(), o, s = new Promise((e) => {
281
+ o = e;
282
+ }), c = this.operationTail.then(() => this.coordinator.enqueue(async () => {
283
283
  if (i.canceled) throw Error("worksheet pull session open was canceled");
284
284
  this.executeArchive((e) => e.open_sheet_cursor(t, n));
285
- let c = [], l = {
285
+ let s = [], c = {
286
286
  rows: 0,
287
287
  cells: 0,
288
288
  ownedUtf8Bytes: 0
289
- }, u, d = !1, f = new o({
289
+ }, l, u = !1, f = new d({
290
290
  ...r,
291
291
  maxByteCredit: q,
292
292
  coordinator: this.coordinator,
@@ -296,16 +296,16 @@ var q = 64 * 1024 * 1024, J = class {
296
296
  if (this.acceptWorksheet) {
297
297
  let i = K(n, r, void 0, this.prepareRows);
298
298
  try {
299
- if (i.kind === "preview") i.worksheet && (i.worksheet.rows = c, k(i.worksheet, a), this.provisional?.preview(t, i.worksheet));
299
+ if (i.kind === "preview") i.worksheet && (i.worksheet.rows = s, k(i.worksheet, a), this.provisional?.preview(t, i.worksheet));
300
300
  else if (i.kind === "rows") {
301
- let e = L(l, P(i.rows, a), a);
302
- B(e, "get-worksheet-worker", void 0, this.readResourceUsage(), a), c.push(...i.rows), l = e;
303
- } else i.kind === "finished" && (u = i.worksheet);
301
+ let e = L(c, P(i.rows, a), a);
302
+ B(e, "get-worksheet-worker", void 0, this.readResourceUsage(), a), s.push(...i.rows), c = e;
303
+ } else i.kind === "finished" && (l = i.worksheet);
304
304
  } catch (t) {
305
305
  throw t instanceof e && (this.resourceFailure ??= t), t;
306
306
  }
307
307
  }
308
- d = r;
308
+ u = r;
309
309
  let i = x(n);
310
310
  return {
311
311
  payload: i,
@@ -316,39 +316,39 @@ var q = 64 * 1024 * 1024, J = class {
316
316
  },
317
317
  measureChunk: ({ payload: e }) => e.byteLength,
318
318
  acknowledge: () => {
319
- if (!d) return;
319
+ if (!u) return;
320
320
  let n, i;
321
321
  try {
322
322
  if (this.acceptWorksheet) {
323
- if (!u) throw Error("worksheet terminal payload is missing");
324
- u.rows = u.parseError ? [] : c;
325
- let e = u.parseError ? {
323
+ if (!l) throw Error("worksheet terminal payload is missing");
324
+ l.rows = l.parseError ? [] : s;
325
+ let e = l.parseError ? {
326
326
  rows: 0,
327
327
  cells: 0,
328
328
  ownedUtf8Bytes: 0
329
- } : l, r = I(u, e, a), o = this.readResourceUsage();
330
- B(r, "get-worksheet-worker", void 0, o, a), V(r.jsonBytes, "get-worksheet-worker", void 0, o, a), k(u, a);
331
- let s = this.acceptWorksheet(t, u, r, o);
332
- typeof s == "function" ? n = s : s && ({rollback: n, commit: i} = s);
329
+ } : c, r = I(l, e, a), o = this.readResourceUsage();
330
+ B(r, "get-worksheet-worker", void 0, o, a), V(r.jsonBytes, "get-worksheet-worker", void 0, o, a), k(l, a);
331
+ let u = this.acceptWorksheet(t, l, r, o);
332
+ typeof u == "function" ? n = u : u && ({rollback: n, commit: i} = u);
333
333
  }
334
334
  this.executeArchive((e) => e.acknowledge_sheet_cursor_terminal()), i?.();
335
335
  } catch (t) {
336
336
  throw n?.(), t instanceof e && (this.resourceFailure ??= t), t;
337
337
  }
338
- d = !1, this.sessions.delete(r.sessionId), this.provisional?.stop(t), s();
338
+ u = !1, this.sessions.delete(r.sessionId), this.provisional?.stop(t), o();
339
339
  },
340
340
  cancel: () => {
341
341
  try {
342
342
  this.archive() && this.executeArchive((e) => e.cancel_sheet_cursor());
343
343
  } finally {
344
- this.sessions.delete(r.sessionId), this.provisional?.stop(t), s();
344
+ this.sessions.delete(r.sessionId), this.provisional?.stop(t), o();
345
345
  }
346
346
  },
347
347
  close: () => {
348
348
  try {
349
349
  this.archive() && this.executeArchive((e) => e.close_sheet_cursor());
350
350
  } finally {
351
- this.sessions.delete(r.sessionId), this.provisional?.stop(t), s();
351
+ this.sessions.delete(r.sessionId), this.provisional?.stop(t), o();
352
352
  }
353
353
  },
354
354
  resourceUsage: () => this.readResourceUsage()
@@ -359,11 +359,11 @@ var q = 64 * 1024 * 1024, J = class {
359
359
  identity: r
360
360
  }), this.pendingOpens.delete(r.sessionId);
361
361
  }));
362
- this.operationTail = l.then(() => c, () => void 0);
362
+ this.operationTail = c.then(() => s, () => void 0);
363
363
  try {
364
- await l;
364
+ await c;
365
365
  } catch (e) {
366
- throw this.pendingOpens.delete(r.sessionId), s(), e;
366
+ throw this.pendingOpens.delete(r.sessionId), o(), e;
367
367
  }
368
368
  }
369
369
  async postOpenedSafely(e, t, n) {
@@ -376,14 +376,14 @@ var q = 64 * 1024 * 1024, J = class {
376
376
  } catch {}
377
377
  }
378
378
  }
379
- dispatch(e, t) {
380
- let n = this.sessions.get(e.sessionId);
381
- if (n) return n.host.dispatch(e, t);
379
+ dispatch(e, n) {
380
+ let r = this.sessions.get(e.sessionId);
381
+ if (r) return r.host.dispatch(e, n);
382
382
  let i = this.pendingOpens.get(e.sessionId);
383
383
  if (i && (e.kind === "cancel" || e.kind === "close")) {
384
- let n = i.identity.operationId === e.operationId && i.identity.generation === e.generation;
385
- return n && (i.canceled = !0), t(n ? {
386
- protocol: r,
384
+ let r = i.identity.operationId === e.operationId && i.identity.generation === e.generation;
385
+ return r && (i.canceled = !0), n(r ? {
386
+ protocol: t,
387
387
  kind: "accepted",
388
388
  sessionId: e.sessionId,
389
389
  operationId: e.operationId,
@@ -391,7 +391,7 @@ var q = 64 * 1024 * 1024, J = class {
391
391
  requestId: e.requestId,
392
392
  command: e.kind
393
393
  } : {
394
- protocol: r,
394
+ protocol: t,
395
395
  kind: "error",
396
396
  sessionId: e.sessionId,
397
397
  operationId: e.operationId,
@@ -404,16 +404,16 @@ var q = 64 * 1024 * 1024, J = class {
404
404
  }
405
405
  }), Promise.resolve();
406
406
  }
407
- return e.kind === "cancel" || e.kind === "close" ? (t({
408
- protocol: r,
407
+ return e.kind === "cancel" || e.kind === "close" ? (n({
408
+ protocol: t,
409
409
  kind: "accepted",
410
410
  sessionId: e.sessionId,
411
411
  operationId: e.operationId,
412
412
  generation: e.generation,
413
413
  requestId: e.requestId,
414
414
  command: e.kind
415
- }), Promise.resolve()) : (t({
416
- protocol: r,
415
+ }), Promise.resolve()) : (n({
416
+ protocol: t,
417
417
  kind: "error",
418
418
  sessionId: e.sessionId,
419
419
  operationId: e.operationId,
@@ -422,19 +422,19 @@ var q = 64 * 1024 * 1024, J = class {
422
422
  error: a(/* @__PURE__ */ Error("worksheet pull session is not open"))
423
423
  }), Promise.resolve());
424
424
  }
425
- async dispatchSafely(e, t) {
425
+ async dispatchSafely(e, n) {
426
426
  try {
427
- await this.dispatch(e, t);
428
- } catch (n) {
427
+ await this.dispatch(e, n);
428
+ } catch (r) {
429
429
  try {
430
- t({
431
- protocol: r,
430
+ n({
431
+ protocol: t,
432
432
  kind: "error",
433
433
  sessionId: e.sessionId,
434
434
  operationId: e.operationId,
435
435
  generation: e.generation,
436
436
  requestId: e.requestId,
437
- error: a(n)
437
+ error: a(r)
438
438
  });
439
439
  } catch {}
440
440
  }
@@ -451,10 +451,10 @@ var q = 64 * 1024 * 1024, J = class {
451
451
  async reset() {
452
452
  for (let e of this.pendingOpens.values()) e.canceled = !0;
453
453
  let e = 1;
454
- for (let { host: t, identity: n } of [...this.sessions.values()]) await t.dispatch({
455
- protocol: r,
454
+ for (let { host: n, identity: r } of [...this.sessions.values()]) await n.dispatch({
455
+ protocol: t,
456
456
  kind: "close",
457
- ...n,
457
+ ...r,
458
458
  requestId: e++
459
459
  }, () => void 0);
460
460
  this.sessions.clear(), await this.operationTail, this.pendingOpens.clear(), this.resourceFailure = void 0;
@@ -465,21 +465,21 @@ var q = 64 * 1024 * 1024, J = class {
465
465
  return e;
466
466
  }
467
467
  async closeIdentity(e) {
468
- let t = this.sessions.get(e.sessionId);
469
- if (t) {
470
- await t.host.dispatch({
471
- protocol: r,
468
+ let n = this.sessions.get(e.sessionId);
469
+ if (n) {
470
+ await n.host.dispatch({
471
+ protocol: t,
472
472
  kind: "close",
473
473
  ...e,
474
474
  requestId: 1
475
475
  }, () => void 0);
476
476
  return;
477
477
  }
478
- let n = this.pendingOpens.get(e.sessionId);
479
- n && n.identity.operationId === e.operationId && n.identity.generation === e.generation && (n.canceled = !0);
478
+ let r = this.pendingOpens.get(e.sessionId);
479
+ r && r.identity.operationId === e.operationId && r.identity.generation === e.generation && (r.canceled = !0);
480
480
  }
481
481
  readResourceUsage() {
482
- return t(this.executeArchive((e) => e.sheet_cursor_resource_usage()));
482
+ return l(this.executeArchive((e) => e.sheet_cursor_resource_usage()));
483
483
  }
484
484
  }, Y = "XLSX workbook session was aborted", X = class {
485
485
  options;
@@ -492,24 +492,24 @@ var q = 64 * 1024 * 1024, J = class {
492
492
  if (!Number.isSafeInteger(e) || e < 0) throw RangeError("sheetIndex must be a non-negative safe integer");
493
493
  if (!t) throw TypeError("sheetName must be non-empty");
494
494
  _(n, Y);
495
- let r = this.nextSessionId++, a = {
495
+ let r = this.nextSessionId++, i = {
496
496
  sessionId: r,
497
497
  operationId: r,
498
498
  generation: this.options.generation ?? 1
499
- }, o = new i(this.options.transport, {
500
- ...a,
499
+ }, a = new f(this.options.transport, {
500
+ ...i,
501
501
  maxByteCredit: q,
502
502
  timeoutMs: this.options.timeoutMs,
503
503
  disposeTransferred: this.options.disposeTransferred
504
504
  });
505
- this.active.add(o);
506
- let s = !1, c;
505
+ this.active.add(a);
506
+ let o = !1, s;
507
507
  try {
508
- for (await this.options.open(e, t, a, this.options.timeoutMs);;) {
508
+ for (await this.options.open(e, t, i, this.options.timeoutMs);;) {
509
509
  _(n, Y);
510
- let e = await o.pull(q, { signal: n });
510
+ let e = await a.pull(q, { signal: n });
511
511
  try {
512
- let t = e.usage ?? o.usageCheckpoint;
512
+ let t = e.usage ?? a.usageCheckpoint;
513
513
  t && this.options.onUsage?.(t);
514
514
  let r = K(e.payload, e.done, this.options.sharedStrings);
515
515
  if (yield r.kind === "preview" ? {
@@ -530,7 +530,7 @@ var q = 64 * 1024 * 1024, J = class {
530
530
  wireBytes: e.byteLength,
531
531
  usage: t
532
532
  }, await e.ack({ signal: n }), r.kind === "finished") {
533
- s = !0;
533
+ o = !0;
534
534
  return;
535
535
  }
536
536
  } finally {
@@ -538,17 +538,17 @@ var q = 64 * 1024 * 1024, J = class {
538
538
  }
539
539
  }
540
540
  } catch (e) {
541
- throw c = e, e;
541
+ throw s = e, e;
542
542
  } finally {
543
543
  let e;
544
544
  try {
545
- s || await o.cancel(Q(c));
545
+ o || await a.cancel(Q(s));
546
546
  } catch (t) {
547
547
  e = t;
548
548
  } finally {
549
- this.active.delete(o);
549
+ this.active.delete(a);
550
550
  }
551
- if (c === void 0 && e !== void 0) throw e;
551
+ if (s === void 0 && e !== void 0) throw e;
552
552
  }
553
553
  }
554
554
  async cancelAll(e = "closed") {
@@ -1,14 +1,14 @@
1
1
  import { t as e } from "./chunk-D5OxutzX.js";
2
- import { B as t, F as n, H as r, N as i, U as a, j as o } from "./bounded-raw-part-cache-B8t03tSP.js";
2
+ import { G as t, I as n, K as r, P as i, R as a, U as o } from "./bounded-raw-part-cache-B5a6cGKO.js";
3
3
  import { n as s, t as c } from "./abort-JztSoyw2.js";
4
- import { b as l, c as u, d, f, g as p, l as m, p as h, r as g, s as _, t as v, u as y, x as ee, y as b } from "./worksheet-pull-client-Du0MuIro.js";
4
+ import { b as l, c as u, d, f, g as p, l as m, p as h, r as g, s as _, t as v, u as y, x as ee, y as b } from "./worksheet-pull-client-BudfclVl.js";
5
5
  import { n as x, r as S, t as te } from "./wasm-loader-KAOyLXzf.js";
6
- import { t as ne } from "./wasm-runtime-generation-BLweKv8r.js";
6
+ import { t as ne } from "./wasm-runtime-generation-D97yoAXz.js";
7
7
  import { t as re } from "./in-process-pull-transport-BPJ7M0uC.js";
8
- function ie(e, n) {
8
+ function ie(e, t) {
9
9
  return {
10
10
  workbook: e(),
11
- usage: t(n())
11
+ usage: o(t())
12
12
  };
13
13
  }
14
14
  var C = /* @__PURE__ */ e({
@@ -272,8 +272,8 @@ async function de(e) {
272
272
  return V = void 0, O = null, j = null, W(e);
273
273
  }
274
274
  var G = "XLSX workbook session was aborted", fe = ne(C, "XLSX");
275
- async function K(e, t, r = {}) {
276
- let u = l(r), d = i(r), f = new o({
275
+ async function K(e, t, o = {}) {
276
+ let u = l(o), d = n(o), f = new i({
277
277
  enabled: d.debug || d.onResourceMetrics !== void 0,
278
278
  format: "xlsx",
279
279
  mode: "node",
@@ -286,13 +286,13 @@ async function K(e, t, r = {}) {
286
286
  f.setSourceBytes(e.byteLength);
287
287
  let p;
288
288
  try {
289
- s(r.signal, G);
290
- let [i, a, o] = n(d.policy), l = w;
291
- p = await fe(t).open(() => new l(e, i, a, o), {
292
- signal: r.signal,
289
+ s(o.signal, G);
290
+ let [n, r, i] = a(d.policy), l = w;
291
+ p = await fe(t).open(() => new l(e, n, r, i), {
292
+ signal: o.signal,
293
293
  abortError: () => c(G),
294
294
  disposeOnAbort: (e) => e.free()
295
- }), s(r.signal, G);
295
+ }), s(o.signal, G);
296
296
  let m = p.proxy, [h, g, _, v] = ee(u);
297
297
  m.set_worksheet_limits(h, g, _, v);
298
298
  let { workbook: y, usage: b } = ie(() => JSON.parse(new TextDecoder().decode(m.parse())), () => m.resource_usage());
@@ -308,7 +308,7 @@ async function K(e, t, r = {}) {
308
308
  try {
309
309
  p?.close((e) => e.free());
310
310
  } catch {}
311
- let t = a(e) ?? e;
311
+ let t = r(e) ?? e;
312
312
  throw f.fail(t), t;
313
313
  }
314
314
  }
@@ -319,7 +319,7 @@ async function J(e, t = {}) {
319
319
  ...t,
320
320
  xlsxWorksheetLimits: n.worksheet
321
321
  }, t.legacyXls !== void 0) {
322
- let { openXlsxSource: n } = await import("./xlsx-model-source-udh7Q4WB.js");
322
+ let { openXlsxSource: n } = await import("./xlsx-model-source-DXKvb90T.js");
323
323
  return n(e, t, q);
324
324
  }
325
325
  let r = await K(_e(e), q(), t);
@@ -370,42 +370,42 @@ var Z = class {
370
370
  if (this.closed) throw Error("XLSX workbook session is closed");
371
371
  if (this.active) throw Error("another XLSX worksheet row stream is already active");
372
372
  if (!Number.isSafeInteger(e) || e < 0) throw RangeError("sheetIndex must be a non-negative safe integer");
373
- let t = this.requireSheetName(e), n = {};
374
- this.active = n;
373
+ let n = this.requireSheetName(e), r = {};
374
+ this.active = r;
375
375
  let i;
376
376
  try {
377
- for await (let n of this.worksheetPullClient.stream(e, t, this.signal)) {
377
+ for await (let t of this.worksheetPullClient.stream(e, n, this.signal)) {
378
378
  if (this.closed) throw Error("XLSX workbook session is closed");
379
- if (n.kind !== "preview") {
380
- if (n.kind === "rows") {
381
- this.rowBatches += 1, this.emittedRows += n.rows.length, yield {
379
+ if (t.kind !== "preview") {
380
+ if (t.kind === "rows") {
381
+ this.rowBatches += 1, this.emittedRows += t.rows.length, yield {
382
382
  kind: "rows",
383
- rows: n.rows,
384
- sequence: n.sequence,
385
- wireBytes: n.wireBytes,
386
- usage: n.usage
383
+ rows: t.rows,
384
+ sequence: t.sequence,
385
+ wireBytes: t.wireBytes,
386
+ usage: t.usage
387
387
  };
388
388
  continue;
389
389
  }
390
- p(n.worksheet, X(this)), yield {
390
+ p(t.worksheet, X(this)), yield {
391
391
  kind: "finished",
392
- worksheet: n.worksheet,
393
- sequence: n.sequence,
394
- wireBytes: n.wireBytes,
395
- usage: n.usage
392
+ worksheet: t.worksheet,
393
+ sequence: t.sequence,
394
+ wireBytes: t.wireBytes,
395
+ usage: t.usage
396
396
  };
397
397
  }
398
398
  }
399
399
  this.completedWorksheets += 1, this.metrics.checkpoint("worksheet stream complete", this.lastUsage);
400
400
  } catch (e) {
401
- throw i = r(e) ?? e, this.metrics.fail(i), await this.close().catch(() => void 0), i;
401
+ throw i = t(e) ?? e, this.metrics.fail(i), await this.close().catch(() => void 0), i;
402
402
  } finally {
403
403
  try {
404
- await this.cleanupOperation(n, i === void 0 ? "closed" : "request-error");
404
+ await this.cleanupOperation(r, i === void 0 ? "closed" : "request-error");
405
405
  } catch (e) {
406
406
  if (i === void 0) {
407
- let t = r(e) ?? e;
408
- throw this.metrics.fail(t), await this.close().catch(() => void 0), t;
407
+ let n = t(e) ?? e;
408
+ throw this.metrics.fail(n), await this.close().catch(() => void 0), n;
409
409
  }
410
410
  }
411
411
  }
@@ -413,34 +413,34 @@ var Z = class {
413
413
  close() {
414
414
  return this.closePromise ? this.closePromise : (this.closed = !0, this.closePromise = this.release(), this.closePromise);
415
415
  }
416
- cleanupOperation(e, t) {
416
+ cleanupOperation(e, n) {
417
417
  return e.cleanupPromise ||= (async () => {
418
- let n;
418
+ let r;
419
419
  try {
420
- await this.worksheetPullClient.cancelAll(t);
420
+ await this.worksheetPullClient.cancelAll(n);
421
421
  } catch (e) {
422
- n = r(e) ?? e;
422
+ r = t(e) ?? e;
423
423
  }
424
424
  try {
425
425
  await this.pull.reset();
426
426
  } catch (e) {
427
- n ??= r(e) ?? e;
427
+ r ??= t(e) ?? e;
428
428
  }
429
- if (this.active === e && (this.active = void 0), n !== void 0) throw n;
429
+ if (this.active === e && (this.active = void 0), r !== void 0) throw r;
430
430
  })(), e.cleanupPromise;
431
431
  }
432
432
  async release() {
433
433
  let e;
434
434
  if (this.active) try {
435
435
  await this.cleanupOperation(this.active, "closed");
436
- } catch (t) {
437
- e = r(t) ?? t;
436
+ } catch (n) {
437
+ e = t(n) ?? n;
438
438
  }
439
439
  this.transport.terminate();
440
440
  try {
441
441
  this.closeArchive();
442
- } catch (t) {
443
- e ??= r(t) ?? t;
442
+ } catch (n) {
443
+ e ??= t(n) ?? n;
444
444
  }
445
445
  if (e !== void 0) throw this.metrics.fail(e), e;
446
446
  this.metrics.checkpoint("workbook session closed", this.lastUsage), this.metrics.succeed({
@@ -514,7 +514,7 @@ function $(e, t = /* @__PURE__ */ new WeakSet()) {
514
514
  }
515
515
  function ge(e) {
516
516
  try {
517
- return t(e);
517
+ return o(e);
518
518
  } catch (e) {
519
519
  if (String(e).includes("worksheet cursor usage is unavailable")) return;
520
520
  throw e;