@sheetxl/io-xlsx 0.8.0-beta.5 → 0.8.0-beta.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/browser/cjs/{DtBN3UOzNJjYBwJ6.cjs → 17tMBnuyu4YIxixh.cjs} +1 -1
- package/browser/cjs/BxU-OlZIQViQl7gX.cjs +1 -0
- package/browser/cjs/DHKWtqZ0vQfXrbq1.cjs +2 -0
- package/browser/cjs/DpZr07y7ifaZGvJ9.cjs +5 -0
- package/browser/cjs/{DULsYP_GcPGLVYSE.cjs → MqKQ_B5qRARrRbO4.cjs} +16 -3
- package/browser/cjs/index.cjs +1 -1
- package/browser/cjs/{DOTve1YXP86VW8ln.cjs → qb-YQ8mGwpogSP08.cjs} +1 -1
- package/browser/esm/{B9qJ5NSreEcSeTPX.mjs → 96C1ntelYWh7kQtW.mjs} +1 -1
- package/browser/esm/{B1yJJD4hEJtoWKFg.mjs → B0E-_6m23g4BDnX6.mjs} +2 -2
- package/browser/esm/{BcWQ-WWSh4k_BbiQ.mjs → B3cYXnqV2Zjaw6Jp.mjs} +4 -4
- package/browser/esm/{BIfJ7hj1nXfdThAg.mjs → BLEHoDT0SLbo8OO2.mjs} +1236 -1150
- package/browser/esm/{DZcQYS8AC3Q4KMNZ.mjs → BYENv_UE3Hv5ghGD.mjs} +599 -597
- package/browser/esm/{EvN99eSJ3aoJPumL.mjs → CGgjL7wM5WHZA6Dt.mjs} +2 -2
- package/browser/esm/{Cka8nUQmzdu2avsT.mjs → D01fs7vrCLlmdHoW.mjs} +899 -795
- package/browser/esm/{DJsvdO0gLkETZXLX.mjs → DdTgGiFy8nAZTQ0d.mjs} +2 -2
- package/browser/esm/{VMf5ikEX-Pl2qTh8.mjs → FwrsLfi1iEAQGIjj.mjs} +246 -154
- package/browser/esm/{CEbxib7xV2WuS-D3.mjs → gicSNvWtBLkvLsIw.mjs} +3 -3
- package/browser/esm/index.mjs +2 -2
- package/browser/esm/{CCD-nLdFzaQd6BuH.mjs → k-aEFzUZ8aU9FPf4.mjs} +1 -1
- package/node/esm/{CT9_4oNvQhBAW0fh.mjs → B-g20MoPHbZFapp8.mjs} +1652 -1545
- package/node/esm/{BJHtwV9ss8ol7zme.mjs → Bu9QkKpBW4G2ULAg.mjs} +177 -83
- package/node/esm/{CwK9xIdlW4XaFkip.mjs → CHl-WFsto0oTmBtB.mjs} +380 -288
- package/node/esm/{DqkQZkjIOnAGH7ah.mjs → Co5_sjvEk9d-x9gx.mjs} +576 -574
- package/node/esm/{DmlGXhQHqcwqLA05.mjs → D-l0hqYTXUIEFoTg.mjs} +2 -2
- package/node/esm/{CRjza0eYeRMSvbQf.mjs → DWF_5NYPdrlTVvHi.mjs} +1 -1
- package/node/esm/{CsrSCSuGVvpk7uBv.mjs → ZWSOYqmTKEmEOz2u.mjs} +2 -2
- package/node/esm/{C0lFi5Rstdk8y5VR.mjs → am47EU_k1uSVm7yW.mjs} +2 -2
- package/node/esm/index.mjs +4 -4
- package/package.json +3 -3
- package/types/src/reader/domVisitors/CommentVisitor.d.ts +7 -2
- package/types/src/reader/domVisitors/DrawingElementVisitor.d.ts +4 -0
- package/types/src/reader/domVisitors/ThreadedCommentVisitor.d.ts +9 -0
- package/types/src/utils/VmlNoteShapes.d.ts +82 -22
- package/types/src/writer/emitters/CommentsEmitter.d.ts +9 -3
- package/types/src/writer/emitters/ThreadedCommentsEmitter.d.ts +7 -1
- package/browser/cjs/C8oC1tPbhgR0Dqtx.cjs +0 -2
- package/browser/cjs/CUhvQ38mNlw3YIEp.cjs +0 -5
- package/browser/cjs/sNZR19Wk-XQ2xZ9E.cjs +0 -1
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @license @sheetxl/io-xlsx - SheetXL - Import/Export from/to Excel - v0.8.0-beta.
|
|
2
|
+
* @license @sheetxl/io-xlsx - SheetXL - Import/Export from/to Excel - v0.8.0-beta.6
|
|
3
3
|
*
|
|
4
4
|
* (C) 2026-present SheetXL Inc. & Michael T. Ford
|
|
5
5
|
* License: The license can be found at https://www.sheetxl.com/license.
|
|
6
6
|
*/
|
|
7
|
-
import { t } from "./
|
|
7
|
+
import { t } from "./CHl-WFsto0oTmBtB.mjs";
|
|
8
8
|
import { CommonUtils as e } from "@sheetxl/utils";
|
|
9
9
|
import { AddressUtils as n, IColor as s, IStyle as r } from "@sheetxl/sdk";
|
|
10
10
|
var o = Object.defineProperty, a = (t, e) => {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @license @sheetxl/io-xlsx - SheetXL - Import/Export from/to Excel - v0.8.0-beta.
|
|
2
|
+
* @license @sheetxl/io-xlsx - SheetXL - Import/Export from/to Excel - v0.8.0-beta.6
|
|
3
3
|
*
|
|
4
4
|
* (C) 2026-present SheetXL Inc. & Michael T. Ford
|
|
5
5
|
* License: The license can be found at https://www.sheetxl.com/license.
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @license @sheetxl/io-xlsx - SheetXL - Import/Export from/to Excel - v0.8.0-beta.
|
|
2
|
+
* @license @sheetxl/io-xlsx - SheetXL - Import/Export from/to Excel - v0.8.0-beta.6
|
|
3
3
|
*
|
|
4
4
|
* (C) 2026-present SheetXL Inc. & Michael T. Ford
|
|
5
5
|
* License: The license can be found at https://www.sheetxl.com/license.
|
|
6
6
|
*/
|
|
7
|
-
import { t } from "./
|
|
7
|
+
import { t } from "./DWF_5NYPdrlTVvHi.mjs";
|
|
8
8
|
var e, r;
|
|
9
9
|
function n(t, e) {
|
|
10
10
|
if (e < 0 || e + 1 >= t.length) throw new RangeError(`toUInt16LE: Offset ${e} is out of bounds for buffer length ${t.length}. Needed 2 bytes.`);
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @license @sheetxl/io-xlsx - SheetXL - Import/Export from/to Excel - v0.8.0-beta.
|
|
2
|
+
* @license @sheetxl/io-xlsx - SheetXL - Import/Export from/to Excel - v0.8.0-beta.6
|
|
3
3
|
*
|
|
4
4
|
* (C) 2026-present SheetXL Inc. & Michael T. Ford
|
|
5
5
|
* License: The license can be found at https://www.sheetxl.com/license.
|
|
6
6
|
*/
|
|
7
|
-
import { t as e } from "./
|
|
7
|
+
import { t as e } from "./DWF_5NYPdrlTVvHi.mjs";
|
|
8
8
|
import { InvalidPasswordError as t } from "@sheetxl/utils";
|
|
9
9
|
var r, n, a = class e {
|
|
10
10
|
static {
|
package/node/esm/index.mjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @license @sheetxl/io-xlsx - SheetXL - Import/Export from/to Excel - v0.8.0-beta.
|
|
2
|
+
* @license @sheetxl/io-xlsx - SheetXL - Import/Export from/to Excel - v0.8.0-beta.6
|
|
3
3
|
*
|
|
4
4
|
* (C) 2026-present SheetXL Inc. & Michael T. Ford
|
|
5
5
|
* License: The license can be found at https://www.sheetxl.com/license.
|
|
@@ -14,7 +14,7 @@ var t = [
|
|
|
14
14
|
177,
|
|
15
15
|
26,
|
|
16
16
|
225
|
|
17
|
-
], a = async () => (await import("./
|
|
17
|
+
], a = async () => (await import("./am47EU_k1uSVm7yW.mjs")).OffCryptoEncryption, r = {
|
|
18
18
|
key: "offcrypto",
|
|
19
19
|
description: "Office Document Encryption",
|
|
20
20
|
detect: async (e) => !!((e) => {
|
|
@@ -25,7 +25,7 @@ var t = [
|
|
|
25
25
|
})(e) && (await a()).detect(e),
|
|
26
26
|
decode: async (e, t) => (await a()).decode(e, t),
|
|
27
27
|
encode: async (e, t) => (await a()).encode(e, t)
|
|
28
|
-
}, o = e("io-xlsx:reader", () => import("./
|
|
28
|
+
}, o = e("io-xlsx:reader", () => import("./Co5_sjvEk9d-x9gx.mjs"), { tier: "common" }), i = e("io-xlsx:writer", () => import("./B-g20MoPHbZFapp8.mjs"), { tier: "common" }), n = "Excel", s = "ExcelMacro", c = {
|
|
29
29
|
key: n,
|
|
30
30
|
description: "Excel Workbook",
|
|
31
31
|
mimeType: "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet",
|
|
@@ -57,7 +57,7 @@ var t = [
|
|
|
57
57
|
})
|
|
58
58
|
}, p = {
|
|
59
59
|
name: "@sheetxl/io-xlsx",
|
|
60
|
-
version: "0.8.0-beta.
|
|
60
|
+
version: "0.8.0-beta.6",
|
|
61
61
|
description: "XLSX I/O formats for SheetXL",
|
|
62
62
|
author: "SheetXL",
|
|
63
63
|
async register(e) {
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@sheetxl/io-xlsx",
|
|
3
3
|
"description": "SheetXL - Import/Export from/to Excel",
|
|
4
|
-
"version": "0.8.0-beta.
|
|
4
|
+
"version": "0.8.0-beta.6",
|
|
5
5
|
"license": "SEE LICENSE IN <LICENSE>",
|
|
6
6
|
"type": "module",
|
|
7
7
|
"exports": {
|
|
@@ -45,8 +45,8 @@
|
|
|
45
45
|
"utilities"
|
|
46
46
|
],
|
|
47
47
|
"dependencies": {
|
|
48
|
-
"@sheetxl/sdk": "^0.8.0-beta.
|
|
49
|
-
"@sheetxl/utils": "^0.8.0-beta.
|
|
48
|
+
"@sheetxl/sdk": "^0.8.0-beta.6",
|
|
49
|
+
"@sheetxl/utils": "^0.8.0-beta.6",
|
|
50
50
|
"@xmldom/xmldom": "^0.9.10",
|
|
51
51
|
"@zip.js/zip.js": "^2.8.34",
|
|
52
52
|
"web-streams-polyfill": "^4.3.0",
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { IRange, IComment } from '@sheetxl/sdk';
|
|
1
|
+
import { IRange, IComment, IStyledFont } from '@sheetxl/sdk';
|
|
2
2
|
import { Visitor, ExecutionContext } from '../dom';
|
|
3
3
|
/**
|
|
4
4
|
* One `<comment>` of a legacy comments part, as read: its author as an index into the part's
|
|
@@ -10,7 +10,7 @@ export interface LegacyNoteEntry {
|
|
|
10
10
|
}
|
|
11
11
|
/**
|
|
12
12
|
* `<comment ref authorId>` with its `<text>`: the runs are SpreadsheetML rich text — `<r>` with
|
|
13
|
-
* an `<rPr>` of child elements (`<b/>`, `<sz val>`, `<rFont val>`, `<color
|
|
13
|
+
* an `<rPr>` of child elements (`<b/>`, `<sz val>`, `<rFont val>`, `<color>`, ...) — read here
|
|
14
14
|
* rather than by the DrawingML text visitor, whose properties are attributes.
|
|
15
15
|
*/
|
|
16
16
|
export declare class CommentVisitor implements Visitor {
|
|
@@ -20,4 +20,9 @@ export declare class CommentVisitor implements Visitor {
|
|
|
20
20
|
* The runs of a `<text>`, as a string when none carries formatting.
|
|
21
21
|
*/
|
|
22
22
|
export declare function readRichText(textElement: Element | null): IComment.Content;
|
|
23
|
+
/**
|
|
24
|
+
* A run's `<rPr>` as the font properties it sets, or `null` when it sets none. Unlike a cell font
|
|
25
|
+
* record, a run is differential: what it leaves out is inherited, so nothing is defaulted.
|
|
26
|
+
*/
|
|
27
|
+
export declare function readRunProperties(rPr: Element): IStyledFont.JSON | null;
|
|
23
28
|
//# sourceMappingURL=CommentVisitor.d.ts.map
|
|
@@ -2,5 +2,9 @@ import { IMovable } from '@sheetxl/sdk';
|
|
|
2
2
|
import { Visitor, ExecutionContext } from '../dom';
|
|
3
3
|
export declare class DrawingElementVisitor implements Visitor {
|
|
4
4
|
visit(context: ExecutionContext, elem: Element, json: IMovable.JSON): IMovable.JSON | undefined;
|
|
5
|
+
/**
|
|
6
|
+
* Sets the content of a movable, and gives it the name and description read from its `cNvPr`.
|
|
7
|
+
*/
|
|
8
|
+
protected setContent(json: IMovable.JSON, content: IMovable.ContentJSON<any>): void;
|
|
5
9
|
}
|
|
6
10
|
//# sourceMappingURL=DrawingElementVisitor.d.ts.map
|
|
@@ -14,4 +14,13 @@ export interface ThreadedEntry extends IComment.EntryJSON {
|
|
|
14
14
|
export declare class ThreadedCommentVisitor implements Visitor {
|
|
15
15
|
visit(context: ExecutionContext, elem: Element, jsonParent: IRange.JSONReferenceEntry<ThreadedEntry>[]): ThreadedEntry | undefined;
|
|
16
16
|
}
|
|
17
|
+
/**
|
|
18
|
+
* A `dT` as an ISO string that says it is UTC, with milliseconds.
|
|
19
|
+
*
|
|
20
|
+
* @remarks
|
|
21
|
+
* Excel writes the time in UTC with no zone designator and hundredths of a second
|
|
22
|
+
* (`2026-09-28T19:25:03.54`). A `Date` would take that as local time, and the fraction is not the
|
|
23
|
+
* three digits every engine parses.
|
|
24
|
+
*/
|
|
25
|
+
export declare function asUTC(dT: string): string;
|
|
17
26
|
//# sourceMappingURL=ThreadedCommentVisitor.d.ts.map
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* The note boxes in a sheet's VML drawing: finding them, keeping them apart from the control
|
|
3
|
-
* shapes that share the part,
|
|
3
|
+
* shapes that share the part, reading each into what a note stores, and writing one for every
|
|
4
|
+
* comment.
|
|
4
5
|
*
|
|
5
6
|
* @remarks
|
|
6
7
|
* A note's box is a `<v:shape>` whose `<x:ClientData ObjectType="Note">` names its cell in
|
|
@@ -8,9 +9,19 @@
|
|
|
8
9
|
* (left cell, left offset, top cell, top offset, right cell, right offset, bottom cell, bottom
|
|
9
10
|
* offset). Nothing else in the VML names a note, so the cell is the join to the comment.
|
|
10
11
|
*
|
|
11
|
-
*
|
|
12
|
-
*
|
|
13
|
-
*
|
|
12
|
+
* The anchor alone places a box (the `style` margins are an echo Excel regenerates), and
|
|
13
|
+
* `<x:Visible/>` alone shows it. So a shape is read into those two and the rest of its markup,
|
|
14
|
+
* and what is left is the same for every note Excel made and never formatted. That markup is kept
|
|
15
|
+
* only when it is not Excel's default, and the id, the anchor, the cell and the `style` echo are
|
|
16
|
+
* written from the model.
|
|
17
|
+
*
|
|
18
|
+
* A form control's shape is in the same part and is placed the same way, by its `<x:Anchor>`
|
|
19
|
+
* with `style` as the echo. It is still replayed whole from the sheet's drawing, with only its
|
|
20
|
+
* anchor cells rewritten (`withControlAnchors`). The split here is the one it would take to move
|
|
21
|
+
* onto its control: the opening tag, the `style` and the anchor are read and written by the same
|
|
22
|
+
* code, and only the cell (`<x:Row>`/`<x:Column>`), `<x:Visible/>` and the default shape are a
|
|
23
|
+
* note's. The difference to keep is the id: nothing refers to a note's, so it is minted on
|
|
24
|
+
* write, while a `<control shapeId>` names its shape's and has to keep it.
|
|
14
25
|
*/
|
|
15
26
|
/** A note shape as read: its markup and the cell it was on. */
|
|
16
27
|
export interface NoteShape {
|
|
@@ -18,6 +29,47 @@ export interface NoteShape {
|
|
|
18
29
|
row: number;
|
|
19
30
|
col: number;
|
|
20
31
|
}
|
|
32
|
+
/**
|
|
33
|
+
* What a note shape says, apart from the cell it is on.
|
|
34
|
+
*/
|
|
35
|
+
export interface NoteShapeBox {
|
|
36
|
+
/**
|
|
37
|
+
* The eight numbers of `<x:Anchor>`, or `null` when the shape has none that can be read.
|
|
38
|
+
*/
|
|
39
|
+
anchor: number[] | null;
|
|
40
|
+
/** Whether the shape has `<x:Visible/>`: the box stays on the sheet. */
|
|
41
|
+
visible: boolean;
|
|
42
|
+
/** The shape's alternative text. */
|
|
43
|
+
alt: string | null;
|
|
44
|
+
/**
|
|
45
|
+
* The shape without its id, position, cell or alternative text, or `null` when that is
|
|
46
|
+
* Excel's default shape.
|
|
47
|
+
*/
|
|
48
|
+
xml: string | null;
|
|
49
|
+
}
|
|
50
|
+
/**
|
|
51
|
+
* Where a note shape is written.
|
|
52
|
+
*/
|
|
53
|
+
export interface NoteShapePlacement {
|
|
54
|
+
/** The number in `_x0000_s{n}`. */
|
|
55
|
+
shapeId: number;
|
|
56
|
+
zIndex: number;
|
|
57
|
+
/** 0-based. */
|
|
58
|
+
row: number;
|
|
59
|
+
/** 0-based. */
|
|
60
|
+
col: number;
|
|
61
|
+
/** The eight numbers of `<x:Anchor>`. */
|
|
62
|
+
anchor: readonly number[];
|
|
63
|
+
/** The box in pixels, for the `style` echo. */
|
|
64
|
+
bounds: {
|
|
65
|
+
x: number;
|
|
66
|
+
y: number;
|
|
67
|
+
width: number;
|
|
68
|
+
height: number;
|
|
69
|
+
};
|
|
70
|
+
visible: boolean;
|
|
71
|
+
alt?: string | null;
|
|
72
|
+
}
|
|
21
73
|
/**
|
|
22
74
|
* Splits the note shapes out of a VML part.
|
|
23
75
|
*
|
|
@@ -35,29 +87,37 @@ export declare function splitNoteShapes(xml: string): {
|
|
|
35
87
|
*/
|
|
36
88
|
export declare function hasShapes(xml: string): boolean;
|
|
37
89
|
/**
|
|
38
|
-
* A note shape
|
|
90
|
+
* A note shape without what the model writes: its id, its anchor and the `style` that echoes
|
|
91
|
+
* it, its cell, whether it is shown and its alternative text. Whitespace between elements is
|
|
92
|
+
* dropped, so two shapes that say the same thing are the same string.
|
|
39
93
|
*
|
|
40
|
-
* @
|
|
41
|
-
* `<x:Row>`/`<x:Column>` are the cell restated, and are written from it. The anchor's cell
|
|
42
|
-
* halves move by the delta from the cell the shape was read on, offsets untouched; a shape that
|
|
43
|
-
* declares neither `<x:MoveWithCells/>` nor `<x:SizeWithCells/>` is pinned and its anchor is
|
|
44
|
-
* left alone. The markup is returned as it was when nothing changed.
|
|
94
|
+
* @returns The markup, or `null` when it is not a shape.
|
|
45
95
|
*/
|
|
46
|
-
export declare function
|
|
96
|
+
export declare function normalizeNoteShape(xml: string): string | null;
|
|
47
97
|
/**
|
|
48
|
-
* The
|
|
98
|
+
* The shape Excel gives a note that has not been formatted, normalized.
|
|
49
99
|
*/
|
|
50
|
-
export declare
|
|
100
|
+
export declare const DEFAULT_NOTE_SHAPE: string;
|
|
51
101
|
/**
|
|
52
|
-
*
|
|
53
|
-
|
|
102
|
+
* Reads a note shape into what a note stores.
|
|
103
|
+
*/
|
|
104
|
+
export declare function readNoteShape(xml: string): NoteShapeBox;
|
|
105
|
+
/**
|
|
106
|
+
* A note shape for a comment: the markup it carries, or Excel's default, with its id, its
|
|
107
|
+
* position and its cell written in.
|
|
108
|
+
*
|
|
109
|
+
* @param markup A shape as {@link normalizeNoteShape} leaves it, or `null` for the default. One
|
|
110
|
+
* that was not normalized is normalized first.
|
|
111
|
+
*/
|
|
112
|
+
export declare function writeNoteShape(markup: string | null | undefined, placement: NoteShapePlacement): string;
|
|
113
|
+
/**
|
|
114
|
+
* The largest shape number the part uses, so a written shape can take the next.
|
|
54
115
|
*
|
|
55
116
|
* @remarks
|
|
56
|
-
*
|
|
57
|
-
*
|
|
58
|
-
* and a nominal size, which Excel recomputes from the anchor.
|
|
117
|
+
* A part with no shapes starts from the block its `<o:idmap>` claims: ids come in blocks of
|
|
118
|
+
* 1024, and Excel gives each sheet's drawing a block of its own.
|
|
59
119
|
*/
|
|
60
|
-
export declare function
|
|
120
|
+
export declare function maxShapeId(xml: string): number;
|
|
61
121
|
/** The shapetype every note box refers to, declared once per part. */
|
|
62
122
|
export declare const NOTE_SHAPETYPE = "<v:shapetype id=\"_x0000_t202\" coordsize=\"21600,21600\" o:spt=\"202\"\n path=\"m,l,21600r21600,l21600,xe\">\n <v:stroke joinstyle=\"miter\"/>\n <v:path gradientshapeok=\"t\" o:connecttype=\"rect\"/>\n </v:shapetype>";
|
|
63
123
|
/** An empty VML part, for a sheet whose notes have no drawing to be added to. */
|
|
@@ -65,11 +125,11 @@ export declare const EMPTY_LEGACY_DRAWING = "<xml xmlns:v=\"urn:schemas-microsof
|
|
|
65
125
|
/**
|
|
66
126
|
* The part with the note shapes put back before the closing root.
|
|
67
127
|
*
|
|
128
|
+
* @param lastShapeId The largest shape number among `notes`, so the part can claim its block.
|
|
129
|
+
*
|
|
68
130
|
* @remarks
|
|
69
131
|
* The note shapetype is declared once if any shape needs it and the part does not already
|
|
70
132
|
* declare it. A part that ends up with no shapes at all returns `null`: nothing to write.
|
|
71
133
|
*/
|
|
72
|
-
export declare function assembleLegacyDrawing(rest: string | null, notes: string[]): string | null;
|
|
73
|
-
/** The shape's own number, if it declares one. */
|
|
74
|
-
export declare function shapeIdOf(xml: string): number | null;
|
|
134
|
+
export declare function assembleLegacyDrawing(rest: string | null, notes: string[], lastShapeId?: number): string | null;
|
|
75
135
|
//# sourceMappingURL=VmlNoteShapes.d.ts.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { IComment, ISheet } from '@sheetxl/sdk';
|
|
1
|
+
import { IComment, ISheet, IStyledFont, ITheme } from '@sheetxl/sdk';
|
|
2
2
|
import { Emitter, EmitContext, IXmlWriter } from '../builder';
|
|
3
3
|
export declare const REL_TYPE_COMMENTS = "http://schemas.openxmlformats.org/officeDocument/2006/relationships/comments";
|
|
4
4
|
export declare const REL_TYPE_THREADED_COMMENTS = "http://schemas.microsoft.com/office/2017/10/relationships/threadedComment";
|
|
@@ -34,13 +34,19 @@ export declare class CommentsEmitter extends Emitter<CommentsPartHandle> {
|
|
|
34
34
|
emit(handle: CommentsPartHandle, ctx: EmitContext): Promise<void>;
|
|
35
35
|
}
|
|
36
36
|
/**
|
|
37
|
-
* The text a pre-2018 Excel shows for a thread it cannot read, as Excel itself writes it
|
|
37
|
+
* The text a pre-2018 Excel shows for a thread it cannot read, as Excel itself writes it: the
|
|
38
|
+
* root, then each reply.
|
|
38
39
|
*/
|
|
39
40
|
export declare function shadowText(comment: IComment): string;
|
|
40
41
|
/**
|
|
41
42
|
* `<r><rPr/><t>` per run, or a single `<t>` for plain text.
|
|
42
43
|
*/
|
|
43
|
-
export declare function writeRichText(xml: IXmlWriter, content: IComment.Content): void;
|
|
44
|
+
export declare function writeRichText(xml: IXmlWriter, content: IComment.Content, theme: ITheme): void;
|
|
45
|
+
/**
|
|
46
|
+
* A run's `<rPr>`, in the order Excel writes it. Only what the run sets is written, and a property
|
|
47
|
+
* set off (`weight: 400`) is written off, since it overrides whatever the run would inherit.
|
|
48
|
+
*/
|
|
49
|
+
export declare function writeRunProperties(xml: IXmlWriter, font: IStyledFont.JSON, theme: ITheme): void;
|
|
44
50
|
/**
|
|
45
51
|
* The cell address of a comment, or `null` when its cell is gone.
|
|
46
52
|
*/
|
|
@@ -6,13 +6,19 @@ import { CommentsPartHandle } from './CommentsEmitter';
|
|
|
6
6
|
*
|
|
7
7
|
* @remarks
|
|
8
8
|
* Only threads: a note has no place here. `done` is the root's; a reply's resolved state is
|
|
9
|
-
* its thread's. The text is plain, as the schema has it.
|
|
9
|
+
* its thread's. The text is plain, as the schema has it, with its mentions after it.
|
|
10
10
|
*/
|
|
11
11
|
export declare class ThreadedCommentsEmitter extends Emitter<CommentsPartHandle> {
|
|
12
12
|
constructor();
|
|
13
13
|
/** @inheritdoc IEmitter.emit */
|
|
14
14
|
emit(handle: CommentsPartHandle, ctx: EmitContext): Promise<void>;
|
|
15
15
|
}
|
|
16
|
+
/**
|
|
17
|
+
* A `dT` as Excel writes one: UTC, hundredths of a second, no zone designator
|
|
18
|
+
* (`2026-09-28T19:25:03.54`). Excel reads a time with milliseconds and a `Z` as no time at all and
|
|
19
|
+
* shows the moment the file was opened instead.
|
|
20
|
+
*/
|
|
21
|
+
export declare function excelDateTime(date: Date): string;
|
|
16
22
|
/**
|
|
17
23
|
* An id in the braces-and-uppercase form Excel writes; one that is not a GUID is written as it
|
|
18
24
|
* is, braced, since the schema asks for `ST_Guid` and a mismatch is a refused file either way.
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
const e=require("./B7_pDFYCVzt-3hUs.cjs"),t=require("./DULsYP_GcPGLVYSE.cjs"),n=require("./DtBN3UOzNJjYBwJ6.cjs");let r=require("@sheetxl/utils"),i=require("@sheetxl/sdk");var a=new Uint8Array,o=class e{constructor(e,t,n){this.buffers=new Map,this.zip=e,this.entries=t,this.rawBuffer=n}static normalize(e){return e.startsWith(`/`)?e.slice(1):e}static async create(n){let r=n instanceof Blob?a:n instanceof Uint8Array?n:new Uint8Array(n),i=new t.K(n instanceof Blob?new t.q(n):new t.X(r)),o=new Map;for(let e of await i.getEntries())e.directory||o.set(e.filename,e);return new e(i,o,r)}getNames(){return[...this.entries.keys()]}has(t){return this.entries.has(e.normalize(t))}uncompressedSize(t){return this.entries.get(e.normalize(t))?.uncompressedSize??0}async getBuffer(n){let r=e.normalize(n),i=this.buffers.get(r);if(i)return i;let a=this.entries.get(r);if(!a)return null;let o=await a.getData(new t.Z);return this.buffers.set(r,o),o}async prefetch(e){let n=[];for(let[r,i]of this.entries)!this.buffers.has(r)&&e(r,i)&&n.push(i.getData(new t.Z).then(e=>{this.buffers.set(r,e)}));await Promise.all(n)}getEntry(t){return this.buffers.get(e.normalize(t))??null}async getTextStream(t,n){let r=this.entries.get(e.normalize(t));if(!r)return null;let i=new TransformStream;r.getData(i.writable).catch(()=>{});let a=i.readable.getReader(),o=new TextDecoder(`utf-8`);return new ReadableStream({async pull(e){let{value:t,done:r}=await a.read();if(r){let t=o.decode();t&&e.enqueue(t),e.close();return}n?.(t.byteLength);let i=o.decode(t,{stream:!0});i&&e.enqueue(i)}}).getReader()}getRawEntry(t){let n=this.entries.get(e.normalize(t));if(!n||n.encrypted)return null;let r=n.offset;if(r+30>this.rawBuffer.byteLength)return null;let i=new DataView(this.rawBuffer.buffer,this.rawBuffer.byteOffset+r,30);if(i.getUint32(0,!0)!==67324752)return null;let a=r+30+i.getUint16(26,!0)+i.getUint16(28,!0),o=a+n.compressedSize;return o>this.rawBuffer.byteLength?null:{data:this.rawBuffer.subarray(a,o),compressionMethod:n.compressionMethod,signature:n.signature}}async close(){await this.zip.close()}},s=class{constructor(e){this._sink=e,this._samples=[],this._t0=c(),this._tPrev=this._t0,this._heapPrev=l()}mark(e){let t=c(),n=l(),r={label:e,tMs:t-this._t0,dtMs:t-this._tPrev,heapBytes:n,dHeapBytes:n!==void 0&&this._heapPrev!==void 0?n-this._heapPrev:void 0,rssBytes:u()};this._tPrev=t,this._heapPrev=n,this._samples.push(r),this._sink?.(r)}samples(){return this._samples}toTable(){return this._samples.map(e=>({phase:e.label,tMs:Math.round(e.tMs),dtMs:Math.round(e.dtMs),heapMB:e.heapBytes===void 0?`—`:d(e.heapBytes/1048576),dHeapMB:e.dHeapBytes===void 0?`—`:d(e.dHeapBytes/1048576),rssMB:e.rssBytes===void 0?`—`:d(e.rssBytes/1048576)}))}},c=typeof performance==`object`&&typeof performance.now==`function`?()=>performance.now():()=>Date.now();function l(){let e=typeof performance==`object`?performance.memory:void 0;if(e&&typeof e.usedJSHeapSize==`number`)return e.usedJSHeapSize;let t=globalThis.process;return typeof t==`object`&&typeof t.memoryUsage==`function`?t.memoryUsage().heapUsed:void 0}function u(){let e=globalThis.process;if(typeof e==`object`&&typeof e.memoryUsage==`function`)return e.memoryUsage().rss}function d(e){return Math.round(10*e)/10}var f=`:A-Z_a-zÀ-ÖØ-öø-˿Ͱ-ͽͿ-⁰-Ⰰ-、-豈-﷏ﷰ-�𐀀-`,p=`-${f}.0-9·̀-ͯ‿-⁀`,m=(RegExp(`^[${f}]$`,`u`),RegExp(`^[${p}]$`,`u`),RegExp(`^[${f}][${p}]*$`,`u`)),h=(RegExp(`^[${p}]+$`,`u`),[32,10,13,9]);function g(e){return e>=65&&e<=90||e>=97&&e<=122||e===58||e===95||e===8204||e===8205||e>=192&&e<=214||e>=216&&e<=246||e>=248&&e<=767||e>=880&&e<=893||e>=895&&e<=8191||e>=8304&&e<=8591||e>=11264&&e<=12271||e>=12289&&e<=55295||e>=63744&&e<=64975||e>=65008&&e<=65533||e>=65536&&e<=983039}var _=`:A-Z_a-zÀ-ÖØ-öø-˿Ͱ-ͽͿ-⁰-Ⰰ-、-豈-﷏ﷰ-�𐀀-`,v=`-${_}.0-9·̀-ͯ‿-⁀`;RegExp(`^[${_}]$`,`u`),RegExp(`^[${v}]$`,`u`),RegExp(`^[${_}][${v}]*$`,`u`),RegExp(`^[${v}]+$`,`u`);var y=`A-Z_a-zÀ-ÖØ-öø-˿Ͱ-ͽͿ--⁰-Ⰰ-、-豈-﷏ﷰ-�𐀀-`,b=`-${y}.0-9·̀-ͯ‿-⁀`,x=(RegExp(`^[${y}]$`,`u`),RegExp(`^[${b}]$`,`u`),RegExp(`^[${y}][${b}]*$`,`u`));function S(e){return e>=65&&e<=90||e===95||e>=97&&e<=122||e>=192&&e<=214||e>=216&&e<=246||e>=248&&e<=767||e>=880&&e<=893||e>=895&&e<=8191||e>=8204&&e<=8205||e>=8304&&e<=8591||e>=11264&&e<=12271||e>=12289&&e<=55295||e>=63744&&e<=64975||e>=65008&&e<=65533||e>=65536&&e<=983039}var C=function(e){return e===32||e===10||e===13||e===9},w=function(e){return e>=32&&e<=55295||e===10||e===13||e===9||e>=57344&&e<=65533||e>=65536&&e<=1114111},T=g,E=function(e){return g(e)||e>=48&&e<=57||e===45||e===46||e===183||e>=768&&e<=879||e>=8255&&e<=8256},ee=h,te=m,D=function(e){return e>=1&&e<=55295||e>=57344&&e<=65533||e>=65536&&e<=1114111},O=S,k=function(e){return S(e)||e===45||e===46||e>=48&&e<=57||e===183||e>=768&&e<=879||e>=8255&&e<=8256},A=x,j=`http://www.w3.org/XML/1998/namespace`,M=`http://www.w3.org/2000/xmlns/`,ne={__proto__:null,xml:j,xmlns:M},re={__proto__:null,amp:`&`,gt:`>`,lt:`<`,quot:`"`,apos:`'`},N=-1,P=-2,F=13,I=33,L=10,R=60,z=61,B=62,V=63,H=93,ie=e=>e===34||e===39,U=[34,39],ae=[...U,91,B],oe=[...U,R,H],se=[z,V,...ee],ce=[...ee,B,38,R];function W(e,t,n){switch(t){case`xml`:n!==j&&e.fail(`xml prefix must be bound to ${j}.`);break;case`xmlns`:n!==M&&e.fail(`xmlns prefix must be bound to ${M}.`)}switch(n){case M:e.fail(t===``?`the default namespace may not be set to ${n}.`:`may not assign a prefix (even "xmlns") to the URI ${M}.`);break;case j:switch(t){case`xml`:break;case``:e.fail(`the default namespace may not be set to ${n}.`);break;default:e.fail(`may not assign the xml namespace to another prefix.`)}}}var G,le=e=>A.test(e),ue=e=>te.test(e),de={xmldecl:`xmlDeclHandler`,text:`textHandler`,processinginstruction:`piHandler`,doctype:`doctypeHandler`,comment:`commentHandler`,opentagstart:`openTagStartHandler`,attribute:`attributeHandler`,opentag:`openTagHandler`,closetag:`closeTagHandler`,cdata:`cdataHandler`,error:`errorHandler`,end:`endHandler`,ready:`readyHandler`},fe=class{get closed(){return this._closed}constructor(e){this.i=0,this.prevI=0,this.opt=e??{},this.fragmentOpt=!!this.opt.fragment;let t=this.xmlnsOpt=!!this.opt.xmlns;if(this.trackPosition=!1!==this.opt.position,this.fileName=this.opt.fileName,t){this.nameStartCheck=O,this.nameCheck=k,this.isName=le,this.processAttribs=this.processAttribsNS,this.pushAttrib=this.pushAttribNS,this.ns={__proto__:null,...ne};let e=this.opt.additionalNamespaces;e!=null&&(function(e,t){for(let n of Object.keys(t))W(e,n,t[n])}(this,e),Object.assign(this.ns,e))}else this.nameStartCheck=T,this.nameCheck=E,this.isName=ue,this.processAttribs=this.processAttribsPlain,this.pushAttrib=this.pushAttribPlain;this.stateTable=[this.sBegin,this.sBeginWhitespace,this.sDoctype,this.sDoctypeQuote,this.sDTD,this.sDTDQuoted,this.sDTDOpenWaka,this.sDTDOpenWakaBang,this.sDTDComment,this.sDTDCommentEnding,this.sDTDCommentEnded,this.sDTDPI,this.sDTDPIEnding,this.sText,this.sEntity,this.sOpenWaka,this.sOpenWakaBang,this.sComment,this.sCommentEnding,this.sCommentEnded,this.sCData,this.sCDataEnding,this.sCDataEnding2,this.sPIFirstChar,this.sPIRest,this.sPIBody,this.sPIEnding,this.sXMLDeclNameStart,this.sXMLDeclName,this.sXMLDeclEq,this.sXMLDeclValueStart,this.sXMLDeclValue,this.sXMLDeclSeparator,this.sXMLDeclEnding,this.sOpenTag,this.sOpenTagSlash,this.sAttrib,this.sAttribName,this.sAttribNameSawWhite,this.sAttribValue,this.sAttribValueQuoted,this.sAttribValueClosed,this.sAttribValueUnquoted,this.sCloseTag,this.sCloseTagSawWhite],this._init()}_init(){this.openWakaBang=``,this.text=``,this.name=``,this.piTarget=``,this.entity=``,this.q=null,this.tags=[],this.tag=null,this.topNS=null,this.chunk=``,this.chunkPosition=0,this.i=0,this.prevI=0,this.carriedFromPrevious=void 0,this.forbiddenState=0,this.attribList=[];let{fragmentOpt:e}=this;this.state=e?F:0,this.reportedTextBeforeRoot=this.reportedTextAfterRoot=this.closedRoot=this.sawRoot=e,this.xmlDeclPossible=!e,this.xmlDeclExpects=[`version`],this.entityReturnState=void 0;let{defaultXMLVersion:t}=this.opt;if(t===void 0){if(!0===this.opt.forceXMLVersion)throw Error(`forceXMLVersion set but defaultXMLVersion is not set`);t=`1.0`}this.setXMLVersion(t),this.positionAtNewLine=0,this.doctype=!1,this._closed=!1,this.xmlDecl={version:void 0,encoding:void 0,standalone:void 0},this.line=1,this.column=0,this.ENTITIES=Object.create(re),this.readyHandler?.()}get position(){return this.chunkPosition+this.i}get columnIndex(){return this.position-this.positionAtNewLine}on(e,t){this[de[e]]=t}off(e){this[de[e]]=void 0}makeError(e){let t=this.fileName??``;return this.trackPosition&&(t.length>0&&(t+=`:`),t+=`${this.line}:${this.column}`),t.length>0&&(t+=`: `),Error(t+e)}fail(e){let t=this.makeError(e),n=this.errorHandler;if(n===void 0)throw t;return n(t),this}write(e){if(this.closed)return this.fail(`cannot write after close.`);let t=!1;e===null?(t=!0,e=``):typeof e==`object`&&(e=e.toString()),this.carriedFromPrevious!==void 0&&(e=`${this.carriedFromPrevious}${e}`,this.carriedFromPrevious=void 0);let n=e.length,r=e.charCodeAt(n-1);!t&&(r===13||r>=55296&&r<=56319)&&(this.carriedFromPrevious=e[n-1],n--,e=e.slice(0,n));let{stateTable:i}=this;for(this.chunk=e,this.i=0;this.i<n;)i[this.state].call(this);return this.chunkPosition+=n,t?this.end():this}close(){return this.write(null)}getCode10(){let e=this.chunk,t=this.i;if(this.prevI=t,this.i++,t>=e.length)return N;let n=e.charCodeAt(t);if(this.column++,n<55296){if(n>=32||n===9)return n;switch(n){case L:return this.line++,this.column=0,this.positionAtNewLine=this.position,L;case 13:return e.charCodeAt(t+1)===L&&(this.i=t+2),this.line++,this.column=0,this.positionAtNewLine=this.position,P;default:return this.fail(`disallowed character.`),n}}if(n>56319)return n>=57344&&n<=65533||this.fail(`disallowed character.`),n;let r=65536+1024*(n-55296)+(e.charCodeAt(t+1)-56320);return this.i=t+2,r>1114111&&this.fail(`disallowed character.`),r}getCode11(){let{chunk:e,i:t}=this;if(this.prevI=t,this.i=t+1,t>=e.length)return N;let n=e.charCodeAt(t);if(this.column++,n<55296){if(n>31&&n<127||n>159&&n!==8232||n===9)return n;switch(n){case L:return this.line++,this.column=0,this.positionAtNewLine=this.position,L;case 13:{let n=e.charCodeAt(t+1);n!==L&&n!==133||(this.i=t+2)}case 133:case 8232:return this.line++,this.column=0,this.positionAtNewLine=this.position,P;default:return this.fail(`disallowed character.`),n}}if(n>56319)return n>=57344&&n<=65533||this.fail(`disallowed character.`),n;let r=65536+1024*(n-55296)+(e.charCodeAt(t+1)-56320);return this.i=t+2,r>1114111&&this.fail(`disallowed character.`),r}getCodeNorm(){let e=this.getCode();return e===P?L:e}unGet(){this.i=this.prevI,this.column--}captureTo(e){let{i:t}=this,{chunk:n}=this;for(;;){let r=this.getCode(),i=r===P,a=i?L:r;if(a===N||e.includes(a))return this.text+=n.slice(t,this.prevI),a;i&&(this.text+=`${n.slice(t,this.prevI)}\n`,t=this.i)}}captureToChar(e){let{i:t}=this,{chunk:n}=this;for(;;){let r=this.getCode();switch(r){case P:this.text+=`${n.slice(t,this.prevI)}\n`,t=this.i,r=L;break;case N:return this.text+=n.slice(t),!1}if(r===e)return this.text+=n.slice(t,this.prevI),!0}}captureNameChars(){let{chunk:e,i:t}=this;for(;;){let n=this.getCode();if(n===N)return this.name+=e.slice(t),N;if(!E(n))return this.name+=e.slice(t,this.prevI),n===P?L:n}}skipSpaces(){for(;;){let e=this.getCodeNorm();if(e===N||!C(e))return e}}setXMLVersion(e){this.currentXMLVersion=e,e===`1.0`?(this.isChar=w,this.getCode=this.getCode10):(this.isChar=D,this.getCode=this.getCode11)}sBegin(){this.chunk.charCodeAt(0)===65279&&(this.i++,this.column++),this.state=1}sBeginWhitespace(){let e=this.i,t=this.skipSpaces();switch(this.prevI!==e&&(this.xmlDeclPossible=!1),t){case R:if(this.state=15,this.text.length!==0)throw Error(`no-empty text at start`);break;case N:break;default:this.unGet(),this.state=F,this.xmlDeclPossible=!1}}sDoctype(){let e=this.captureTo(ae);switch(e){case B:this.doctypeHandler?.(this.text),this.text=``,this.state=F,this.doctype=!0;break;case N:break;default:this.text+=String.fromCodePoint(e),e===91?this.state=4:ie(e)&&(this.state=3,this.q=e)}}sDoctypeQuote(){let e=this.q;this.captureToChar(e)&&(this.text+=String.fromCodePoint(e),this.q=null,this.state=2)}sDTD(){let e=this.captureTo(oe);e!==N&&(this.text+=String.fromCodePoint(e),e===H?this.state=2:e===R?this.state=6:ie(e)&&(this.state=5,this.q=e))}sDTDQuoted(){let e=this.q;this.captureToChar(e)&&(this.text+=String.fromCodePoint(e),this.state=4,this.q=null)}sDTDOpenWaka(){let e=this.getCodeNorm();switch(this.text+=String.fromCodePoint(e),e){case 33:this.state=7,this.openWakaBang=``;break;case V:this.state=11;break;default:this.state=4}}sDTDOpenWakaBang(){let e=String.fromCodePoint(this.getCodeNorm()),t=this.openWakaBang+=e;this.text+=e,t!==`-`&&(this.state=t===`--`?8:4,this.openWakaBang=``)}sDTDComment(){this.captureToChar(45)&&(this.text+=`-`,this.state=9)}sDTDCommentEnding(){let e=this.getCodeNorm();this.text+=String.fromCodePoint(e),this.state=e===45?10:8}sDTDCommentEnded(){let e=this.getCodeNorm();this.text+=String.fromCodePoint(e),e===B?this.state=4:(this.fail(`malformed comment.`),this.state=8)}sDTDPI(){this.captureToChar(V)&&(this.text+=`?`,this.state=12)}sDTDPIEnding(){let e=this.getCodeNorm();this.text+=String.fromCodePoint(e),e===B&&(this.state=4)}sText(){this.tags.length===0?this.handleTextOutsideRoot():this.handleTextInRoot()}sEntity(){let{i:e}=this,{chunk:t}=this;t:for(;;)switch(this.getCode()){case P:this.entity+=`${t.slice(e,this.prevI)}\n`,e=this.i;break;case 59:{let{entityReturnState:n}=this,r=this.entity+t.slice(e,this.prevI),i;this.state=n,r===``?(this.fail(`empty entity name.`),i=`&;`):(i=this.parseEntity(r),this.entity=``),n===F&&this.textHandler===void 0||(this.text+=i);break t}case N:this.entity+=t.slice(e);break t}}sOpenWaka(){let e=this.getCode();if(T(e))this.state=34,this.unGet(),this.xmlDeclPossible=!1;else switch(e){case 47:this.state=43,this.xmlDeclPossible=!1;break;case 33:this.state=16,this.openWakaBang=``,this.xmlDeclPossible=!1;break;case V:this.state=23;break;default:this.fail(`disallowed character in tag name`),this.state=F,this.xmlDeclPossible=!1}}sOpenWakaBang(){switch(this.openWakaBang+=String.fromCodePoint(this.getCodeNorm()),this.openWakaBang){case`[CDATA[`:this.sawRoot||this.reportedTextBeforeRoot||(this.fail(`text data outside of root node.`),this.reportedTextBeforeRoot=!0),this.closedRoot&&!this.reportedTextAfterRoot&&(this.fail(`text data outside of root node.`),this.reportedTextAfterRoot=!0),this.state=20,this.openWakaBang=``;break;case`--`:this.state=17,this.openWakaBang=``;break;case`DOCTYPE`:this.state=2,(this.doctype||this.sawRoot)&&this.fail(`inappropriately located doctype declaration.`),this.openWakaBang=``;break;default:this.openWakaBang.length>=7&&this.fail(`incorrect syntax.`)}}sComment(){this.captureToChar(45)&&(this.state=18)}sCommentEnding(){let e=this.getCodeNorm();e===45?(this.state=19,this.commentHandler?.(this.text),this.text=``):(this.text+=`-${String.fromCodePoint(e)}`,this.state=17)}sCommentEnded(){let e=this.getCodeNorm();e===B?this.state=F:(this.fail(`malformed comment.`),this.text+=`--${String.fromCodePoint(e)}`,this.state=17)}sCData(){this.captureToChar(H)&&(this.state=21)}sCDataEnding(){let e=this.getCodeNorm();e===H?this.state=22:(this.text+=`]${String.fromCodePoint(e)}`,this.state=20)}sCDataEnding2(){let e=this.getCodeNorm();switch(e){case B:this.cdataHandler?.(this.text),this.text=``,this.state=F;break;case H:this.text+=`]`;break;default:this.text+=`]]${String.fromCodePoint(e)}`,this.state=20}}sPIFirstChar(){let e=this.getCodeNorm();this.nameStartCheck(e)?(this.piTarget+=String.fromCodePoint(e),this.state=24):e===V||C(e)?(this.fail(`processing instruction without a target.`),this.state=e===V?26:25):(this.fail(`disallowed character in processing instruction name.`),this.piTarget+=String.fromCodePoint(e),this.state=24)}sPIRest(){let{chunk:e,i:t}=this;for(;;){let n=this.getCodeNorm();if(n===N)return void(this.piTarget+=e.slice(t));if(!this.nameCheck(n)){this.piTarget+=e.slice(t,this.prevI);let r=n===V;r||C(n)?this.piTarget===`xml`?(this.xmlDeclPossible||this.fail(`an XML declaration must be at the start of the document.`),this.state=r?I:27):this.state=r?26:25:(this.fail(`disallowed character in processing instruction name.`),this.piTarget+=String.fromCodePoint(n));break}}}sPIBody(){if(this.text.length===0){let e=this.getCodeNorm();e===V?this.state=26:C(e)||(this.text=String.fromCodePoint(e))}else this.captureToChar(V)&&(this.state=26)}sPIEnding(){let e=this.getCodeNorm();if(e===B){let{piTarget:e}=this;e.toLowerCase()===`xml`&&this.fail(`the XML declaration must appear at the start of the document.`),this.piHandler?.({target:e,body:this.text}),this.piTarget=this.text=``,this.state=F}else e===V?this.text+=`?`:(this.text+=`?${String.fromCodePoint(e)}`,this.state=25);this.xmlDeclPossible=!1}sXMLDeclNameStart(){let e=this.skipSpaces();e===V?this.state=I:e!==N&&(this.state=28,this.name=String.fromCodePoint(e))}sXMLDeclName(){let e=this.captureTo(se);if(e===V)return this.state=I,this.name+=this.text,this.text=``,void this.fail(`XML declaration is incomplete.`);if(C(e)||e===z){if(this.name+=this.text,this.text=``,!this.xmlDeclExpects.includes(this.name))switch(this.name.length){case 0:this.fail(`did not expect any more name/value pairs.`);break;case 1:this.fail(`expected the name ${this.xmlDeclExpects[0]}.`);break;default:this.fail(`expected one of ${this.xmlDeclExpects.join(`, `)}`)}this.state=e===z?30:29}}sXMLDeclEq(){let e=this.getCodeNorm();if(e===V)return this.state=I,void this.fail(`XML declaration is incomplete.`);C(e)||(e!==z&&this.fail(`value required.`),this.state=30)}sXMLDeclValueStart(){let e=this.getCodeNorm();if(e===V)return this.state=I,void this.fail(`XML declaration is incomplete.`);C(e)||(ie(e)?this.q=e:(this.fail(`value must be quoted.`),this.q=32),this.state=31)}sXMLDeclValue(){let e=this.captureTo([this.q,V]);if(e===V)return this.state=I,this.text=``,void this.fail(`XML declaration is incomplete.`);if(e===N)return;let t=this.text;switch(this.text=``,this.name){case`version`:{this.xmlDeclExpects=[`encoding`,`standalone`];let e=t;this.xmlDecl.version=e,/^1\.[0-9]+$/.test(e)?this.opt.forceXMLVersion||this.setXMLVersion(e):this.fail(`version number must match /^1\\.[0-9]+$/.`);break}case`encoding`:/^[A-Za-z][A-Za-z0-9._-]*$/.test(t)||this.fail(`encoding value must match /^[A-Za-z0-9][A-Za-z0-9._-]*$/.`),this.xmlDeclExpects=[`standalone`],this.xmlDecl.encoding=t;break;case`standalone`:t!==`yes`&&t!==`no`&&this.fail(`standalone value must match "yes" or "no".`),this.xmlDeclExpects=[],this.xmlDecl.standalone=t}this.name=``,this.state=32}sXMLDeclSeparator(){let e=this.getCodeNorm();e===V?this.state=I:(C(e)||(this.fail(`whitespace required.`),this.unGet()),this.state=27)}sXMLDeclEnding(){this.getCodeNorm()===B?(this.piTarget===`xml`?this.name!==`version`&&this.xmlDeclExpects.includes(`version`)&&this.fail(`XML declaration must contain a version.`):this.fail(`processing instructions are not allowed before root.`),this.xmlDeclHandler?.(this.xmlDecl),this.name=``,this.piTarget=this.text=``,this.state=F):this.fail(`The character ? is disallowed anywhere in XML declarations.`),this.xmlDeclPossible=!1}sOpenTag(){let e=this.captureNameChars();if(e===N)return;let t=this.tag={name:this.name,attributes:Object.create(null)};switch(this.name=``,this.xmlnsOpt&&(this.topNS=t.ns=Object.create(null)),this.openTagStartHandler?.(t),this.sawRoot=!0,!this.fragmentOpt&&this.closedRoot&&this.fail(`documents may contain only one root.`),e){case B:this.openTag();break;case 47:this.state=35;break;default:C(e)||this.fail(`disallowed character in tag name.`),this.state=36}}sOpenTagSlash(){this.getCode()===B?this.openSelfClosingTag():(this.fail(`forward-slash in opening tag not followed by >.`),this.state=36)}sAttrib(){let e=this.skipSpaces();e!==N&&(T(e)?(this.unGet(),this.state=37):e===B?this.openTag():e===47?this.state=35:this.fail(`disallowed character in attribute name.`))}sAttribName(){let e=this.captureNameChars();e===z?this.state=39:C(e)?this.state=38:e===B?(this.fail(`attribute without value.`),this.pushAttrib(this.name,this.name),this.name=this.text=``,this.openTag()):e!==N&&this.fail(`disallowed character in attribute name.`)}sAttribNameSawWhite(){let e=this.skipSpaces();switch(e){case N:return;case z:this.state=39;break;default:this.fail(`attribute without value.`),this.text=``,this.name=``,e===B?this.openTag():T(e)?(this.unGet(),this.state=37):(this.fail(`disallowed character in attribute name.`),this.state=36)}}sAttribValue(){let e=this.getCodeNorm();ie(e)?(this.q=e,this.state=40):C(e)||(this.fail(`unquoted attribute value.`),this.state=42,this.unGet())}sAttribValueQuoted(){let{q:e,chunk:t}=this,{i:n}=this;for(;;)switch(this.getCode()){case e:this.pushAttrib(this.name,this.text+t.slice(n,this.prevI)),this.name=this.text=``,this.q=null,this.state=41;return;case 38:this.text+=t.slice(n,this.prevI),this.state=14,this.entityReturnState=40;return;case L:case P:case 9:this.text+=`${t.slice(n,this.prevI)} `,n=this.i;break;case R:this.text+=t.slice(n,this.prevI),this.fail(`disallowed character.`);return;case N:this.text+=t.slice(n);return}}sAttribValueClosed(){let e=this.getCodeNorm();C(e)?this.state=36:e===B?this.openTag():e===47?this.state=35:T(e)?(this.fail(`no whitespace between attributes.`),this.unGet(),this.state=37):this.fail(`disallowed character in attribute name.`)}sAttribValueUnquoted(){let e=this.captureTo(ce);switch(e){case 38:this.state=14,this.entityReturnState=42;break;case R:this.fail(`disallowed character.`);break;case N:break;default:this.text.includes(`]]>`)&&this.fail(`the string "]]>" is disallowed in char data.`),this.pushAttrib(this.name,this.text),this.name=this.text=``,e===B?this.openTag():this.state=36}}sCloseTag(){let e=this.captureNameChars();e===B?this.closeTag():C(e)?this.state=44:e!==N&&this.fail(`disallowed character in closing tag.`)}sCloseTagSawWhite(){switch(this.skipSpaces()){case B:this.closeTag();break;case N:break;default:this.fail(`disallowed character in closing tag.`)}}handleTextInRoot(){let{i:e,forbiddenState:t}=this,{chunk:n,textHandler:r}=this;t:for(;;)switch(this.getCode()){case R:if(this.state=15,r!==void 0){let{text:t}=this,i=n.slice(e,this.prevI);t.length===0?i.length!==0&&r(i):(r(t+i),this.text=``)}t=0;break t;case 38:this.state=14,this.entityReturnState=F,r!==void 0&&(this.text+=n.slice(e,this.prevI)),t=0;break t;case H:switch(t){case 0:t=1;break;case 1:t=2;break;case 2:break;default:throw Error(`impossible state`)}break;case B:t===2&&this.fail(`the string "]]>" is disallowed in char data.`),t=0;break;case P:r!==void 0&&(this.text+=`${n.slice(e,this.prevI)}\n`),e=this.i,t=0;break;case N:r!==void 0&&(this.text+=n.slice(e));break t;default:t=0}this.forbiddenState=t}handleTextOutsideRoot(){let{i:e}=this,{chunk:t,textHandler:n}=this,r=!1;t:for(;;){let i=this.getCode();switch(i){case R:if(this.state=15,n!==void 0){let{text:r}=this,i=t.slice(e,this.prevI);r.length===0?i.length!==0&&n(i):(n(r+i),this.text=``)}break t;case 38:this.state=14,this.entityReturnState=F,n!==void 0&&(this.text+=t.slice(e,this.prevI)),r=!0;break t;case P:n!==void 0&&(this.text+=`${t.slice(e,this.prevI)}\n`),e=this.i;break;case N:n!==void 0&&(this.text+=t.slice(e));break t;default:C(i)||(r=!0)}}r&&(this.sawRoot||this.reportedTextBeforeRoot||(this.fail(`text data outside of root node.`),this.reportedTextBeforeRoot=!0),this.closedRoot&&!this.reportedTextAfterRoot&&(this.fail(`text data outside of root node.`),this.reportedTextAfterRoot=!0))}pushAttribNS(e,t){let{prefix:n,local:r}=this.qName(e),i={name:e,prefix:n,local:r,value:t};if(this.attribList.push(i),this.attributeHandler?.(i),n===`xmlns`){let e=t.trim();this.currentXMLVersion===`1.0`&&e===``&&this.fail(`invalid attempt to undefine prefix in XML 1.0`),this.topNS[r]=e,W(this,r,e)}else if(e===`xmlns`){let e=t.trim();this.topNS[``]=e,W(this,``,e)}}pushAttribPlain(e,t){let n={name:e,value:t};this.attribList.push(n),this.attributeHandler?.(n)}end(){this.sawRoot||this.fail(`document must contain a root element.`);let{tags:e}=this;for(;e.length>0;){let t=e.pop();this.fail(`unclosed tag: ${t.name}`)}this.state!==0&&this.state!==F&&this.fail(`unexpected end.`);let{text:t}=this;return t.length!==0&&(this.textHandler?.(t),this.text=``),this._closed=!0,this.endHandler?.(),this._init(),this}resolve(e){let t=this.topNS[e];if(t!==void 0)return t;let{tags:n}=this;for(let r=n.length-1;r>=0;r--)if(t=n[r].ns[e],t!==void 0)return t;return t=this.ns[e],t===void 0?this.opt.resolvePrefix?.(e):t}qName(e){let t=e.indexOf(`:`);if(t===-1)return{prefix:``,local:e};let n=e.slice(t+1),r=e.slice(0,t);return(r===``||n===``||n.includes(`:`))&&this.fail(`malformed name: ${e}.`),{prefix:r,local:n}}processAttribsNS(){let{attribList:e}=this,t=this.tag;{let{prefix:e,local:n}=this.qName(t.name);t.prefix=e,t.local=n;let r=t.uri=this.resolve(e)??``;e!==``&&(e===`xmlns`&&this.fail(`tags may not have "xmlns" as prefix.`),r===``&&(this.fail(`unbound namespace prefix: ${JSON.stringify(e)}.`),t.uri=e))}if(e.length===0)return;let{attributes:n}=t,r=new Set;for(let t of e){let{name:e,prefix:i,local:a}=t,o,s;i===``?(o=e===`xmlns`?M:``,s=e):(o=this.resolve(i),o===void 0&&(this.fail(`unbound namespace prefix: ${JSON.stringify(i)}.`),o=i),s=`{${o}}${a}`),r.has(s)&&this.fail(`duplicate attribute: ${s}.`),r.add(s),t.uri=o,n[e]=t}this.attribList=[]}processAttribsPlain(){let{attribList:e}=this,t=this.tag.attributes;for(let{name:n,value:r}of e)t[n]!==void 0&&this.fail(`duplicate attribute: ${n}.`),t[n]=r;this.attribList=[]}openTag(){this.processAttribs();let{tags:e}=this,t=this.tag;t.isSelfClosing=!1,this.openTagHandler?.(t),e.push(t),this.state=F,this.name=``}openSelfClosingTag(){this.processAttribs();let{tags:e}=this,t=this.tag;t.isSelfClosing=!0,this.openTagHandler?.(t),this.closeTagHandler?.(t),(this.tag=e[e.length-1]??null)===null&&(this.closedRoot=!0),this.state=F,this.name=``}closeTag(){let{tags:e,name:t}=this;if(this.state=F,this.name=``,t===``)return this.fail(`weird empty close tag.`),void(this.text+=`</>`);let n=this.closeTagHandler,r=e.length;for(;r-->0;){let r=this.tag=e.pop();if(this.topNS=r.ns,n?.(r),r.name===t)break;this.fail(`unexpected close tag: ${t}.`)}r===0?this.closedRoot=!0:r<0&&(this.fail(`unmatched closing tag: ${t}.`),this.text+=`</${t}>`)}parseEntity(e){if(e[0]!==`#`){let t=this.ENTITIES[e];return t===void 0?(this.fail(this.isName(e)?`undefined entity.`:`disallowed character in entity name.`),`&${e};`):t}let t=NaN;return e[1]===`x`&&/^#x[0-9a-f]+$/i.test(e)?t=parseInt(e.slice(2),16):/^#[0-9]+$/.test(e)&&(t=parseInt(e.slice(1),10)),this.isChar(t)?String.fromCodePoint(t):(this.fail(`malformed character entity.`),`&${e};`)}},pe=/&(#x[0-9a-fA-F]+|#[0-9]+|amp|lt|gt|quot|apos);/g,me={amp:`&`,lt:`<`,gt:`>`,quot:`"`,apos:`'`},he=(e,t)=>{let n=me[t];if(n!==void 0)return n;let r=t.charCodeAt(1)===120?parseInt(t.slice(2),16):parseInt(t.slice(1),10);return r>0&&r<=1114111?String.fromCodePoint(r):e},ge=e=>{let t=e;return t.indexOf(`\r`)!==-1&&(t=t.replace(/\r\n?/g,`
|
|
2
|
-
`)),t.indexOf(`&`)!==-1&&(t=t.replace(pe,he)),t},K=e=>{let t=e,n=t.length;for(let e=0;e<n;e++){let n=t.charCodeAt(e);if(n===9||n===10||n===13){t=t.replace(/\r\n|[\t\n\r]/g,` `);break}}return t.indexOf(`&`)!==-1&&(t=t.replace(pe,he)),t},_e=e=>e===32||e===9||e===10||e===13,q=class e{constructor(){this._openTagHandler=void 0,this._closeTagHandler=void 0,this._textHandler=void 0,this._cdataHandler=void 0,this._errorHandler=void 0,this._endHandler=void 0,this._scanners=null,this._carry=``,this._text=``,this._tags=[],this._sawRoot=!1,this._closed=!1}static{this.NEED_MORE=-1}static{this.NOT_HANDLED=-2}static decodeText(e){return ge(e)}on(e,t){switch(e){case`opentag`:this._openTagHandler=t;break;case`closetag`:this._closeTagHandler=t;break;case`text`:this._textHandler=t;break;case`cdata`:this._cdataHandler=t;break;case`error`:this._errorHandler=t;break;case`end`:this._endHandler=t}}setElementScanners(e){if(!e||e.length===0)return void(this._scanners=null);let t=Array(128);for(let n of e){let e=n.name.charCodeAt(0);if(!(e<128)||t[e]!==void 0)throw Error(`Element scanner '${n.name}' needs an ASCII first character no other scanner uses.`);t[e]=n}this._scanners=t}fail(e){let t=Error(e),n=this._errorHandler;if(n===void 0)throw t;n(t)}write(e){if(this._closed)return this.fail(`cannot write after close.`),this;let t=e;this._carry.length!==0&&(t=this._carry+e,this._carry=``);let n=t.length,r=0;for(;r<n;){let e=t.indexOf(`<`,r);if(e===-1)return this._text+=t.slice(r),this;e>r&&(this._text+=t.slice(r,e));let i=this._markup(t,e,n);if(i===-1)return this._carry=t.slice(e),this;r=i}return this}close(){this._carry.length!==0&&(this.fail(`unexpected end.`),this._carry=``),this._sawRoot||this.fail(`document must contain a root element.`);let e=this._tags;for(;e.length>0;){let t=e.pop();this.fail(`unclosed tag: ${t.name}`)}return this._flushText(),this._closed=!0,this._endHandler?.(),this}_flushText(){let e=this._text;if(e.length===0)return;this._text=``;let t=this._textHandler;t!==void 0&&this._tags.length!==0&&t(ge(e))}_markup(t,n,r){if(n+1>=r)return-1;let i=t.charCodeAt(n+1);if(i===47){let e=t.indexOf(`>`,n+2);return e===-1?-1:(this._flushText(),this._closeTag(t.slice(n+2,e).trimEnd()),e+1)}if(i===63){let e=t.indexOf(`?>`,n+2);return e===-1?-1:e+2}if(i===33){if(n+4>r)return-1;if(t.charCodeAt(n+2)===45&&t.charCodeAt(n+3)===45){let e=t.indexOf(`-->`,n+4);return e===-1?-1:e+3}if(n+9>r)return-1;if(t.startsWith(`[CDATA[`,n+2)){let e=t.indexOf(`]]>`,n+9);return e===-1?-1:(this._flushText(),this._cdataHandler?.(t.slice(n+9,e)),e+3)}let e=t.indexOf(`[`,n+2),i=t.indexOf(`>`,n+2);if(i===-1)return-1;if(e!==-1&&e<i){let n=t.indexOf(`]>`,e);return n===-1?-1:n+2}return i+1}let a=this._scanners;if(a!==null){let o=i<128?a[i]:void 0;if(o!==void 0&&t.startsWith(o.name,n+1)){let i=n+1+o.name.length;if(i>=r)return-1;let a=t.charCodeAt(i);if(a===62||a===47||_e(a)){this._flushText();let i=o.scan(t,n,r);if(i!==e.NOT_HANDLED){if(i!==e.NEED_MORE){this._sawRoot=!0;let e=o.openTag;e!==void 0&&this._tags.push(e)}return i}}}}return this._openTag(t,n,r)}_openTag(e,t,n){let r=t+1,i=0;for(;r<n&&(i=e.charCodeAt(r),i!==62&&i!==47&&!_e(i));)r++;if(r>=n)return-1;let a=e.slice(t+1,r),o={},s=!1;for(;;){for(;r<n&&_e(i=e.charCodeAt(r));)r++;if(r>=n)return-1;if(i===62){r++;break}if(i===47){if(r+1>=n)return-1;if(e.charCodeAt(r+1)!==62){this.fail(`forward-slash in opening tag not followed by >.`),r++;continue}s=!0,r+=2;break}let t=r;for(;r<n&&(i=e.charCodeAt(r),i!==61&&i!==62&&i!==47&&!_e(i));)r++;if(r>=n)return-1;let a=e.slice(t,r);for(;r<n&&_e(i=e.charCodeAt(r));)r++;if(r>=n)return-1;if(i!==61){this.fail(`attribute without value.`);continue}for(r++;r<n&&_e(i=e.charCodeAt(r));)r++;if(r>=n)return-1;if(i!==34&&i!==39){this.fail(`unquoted attribute value.`);continue}let c=e.indexOf(i===34?`"`:`'`,r+1);if(c===-1)return-1;a!==`__proto__`&&(o[a]=K(e.slice(r+1,c))),r=c+1}this._flushText(),this._sawRoot=!0;let c={name:a,attributes:o,isSelfClosing:s};return this._openTagHandler?.(c),s?this._closeTagHandler?.(c):this._tags.push(c),r}_closeTag(e){if(e===``)return void this.fail(`weird empty close tag.`);let t=this._tags,n=this._closeTagHandler,r=t.length;for(;r-->0;){let r=t.pop();if(n?.(r),r.name===e)return;this.fail(`unexpected close tag: ${e}.`)}this.fail(`unmatched closing tag: ${e}.`)}};(function(e){e.Events={XmlDecl:`xmldecl`,Text:`text`,ProcessingInstruction:`processinginstruction`,Doctype:`doctype`,Comment:`comment`,OpenTagStart:`opentagstart`,Attribute:`attribute`,OpenTag:`opentag`,CloseTag:`closetag`,CDdata:`cdata`,Error:`error`,End:`end`,Ready:`ready`},e.parseStream=async(e,t,n)=>{if(n?.lean)return(async(e,t)=>{let n=new q,r;t.elementScanners&&n.setElementScanners(t.elementScanners),t.onOpenTag&&n.on(`opentag`,t.onOpenTag),t.onCloseTag&&n.on(`closetag`,t.onCloseTag),t.onText&&n.on(`text`,t.onText),t.onError&&n.on(`error`,t.onError);let i=t.onEnd;for(i&&n.on(`end`,()=>{r=i()});;){let{value:t,done:r}=await e.read();if(r)break;n.write(t)}return n.close(),r})(e,t);let r=new fe({position:!1,...n}),i;t.onOpenTagStart&&r.on(G.Events.OpenTagStart,t.onOpenTagStart),t.onOpenTag&&r.on(G.Events.OpenTag,t.onOpenTag),t.onCloseTag&&r.on(G.Events.CloseTag,t.onCloseTag),t.onAttribute&&r.on(G.Events.Attribute,t.onAttribute),t.onText&&r.on(G.Events.Text,t.onText),t.onError&&r.on(G.Events.Error,t.onError);let a=t.onEnd;for(a&&r.on(G.Events.End,()=>{i=a()});;){let{value:t,done:n}=await e.read();if(n)break;r.write(t)}return r.close(),i}})(G||={});var J=e=>!0===e||e===`1`||e===`on`||e===`true`||!1!==e&&e!==`0`&&e!==`off`&&e!==`false`&&null,Y=e=>{let t=parseInt(e);return isNaN(t)?null:t},X=e=>{let t=parseFloat(e);return isNaN(t)?null:t},Z=null,ve=e=>e.replace(/&/g,`&`).replace(/</g,`<`).replace(/>/g,`>`),Q=e=>ve(e).replace(/"/g,`"`),$=class{constructor(){this._registeredVisitors=new Map}registerVisitor(e){this._registeredVisitors.set(e.from,e)}createEventHandler(e,t,n){let r=this._registeredVisitors,i=[],a=[],o=null,s=null,c=null,l=null,u=[],d={key:null,source:e,parent:null},f=null,p=!1,m=null,h=null,g=null,_=(e,t)=>{let n=c.attributes[e];if(t){if(Array.isArray(t)){let e=t.length;for(let r=0;r<e;r++)if(n==null||(n=t[r](n),n==null))return}else if(n==null||(n=t(n),n==null))return}return n},v={getSource:()=>f?.source??null,setSource:e=>{f.source=e},setKey:e=>{f.key=e},getFrom:()=>c,getAttribute:(e,t)=>_(e,t)??null,hasAttribute:e=>v.getAttribute(e)!==null,getParent:()=>{let e=u[u.length-2];return e.parent??e.source},getPath:()=>{let e=[],t=a.length;for(let n=0;n<t;n++)e.push(a[n].local);return e.join(`\\`)},parseAttribute:_,getRawXml:()=>g,copyToObject:(e,t,n,r)=>{let i=_(r??t,n);i!==void 0&&(e[t]=i)},copyTo:(e,t,n)=>{let r=_(n??e,t);r!==void 0&&(f.source[e]=r)},warn:(e,t)=>{n?n(e,void 0,t?.onceKey):console.warn(e)}};return{onOpenTag:e=>{let t=e.name,n=t.indexOf(`:`);if(n!==-1&&(t=t.slice(n+1)),m)return m.push((e=>{let t=e.attributes??{},n=`<${e.name}`;for(let e in t){let r=t[e];n+=` ${e}="${Q(typeof r==`string`?r:r?.value??``)}"`}return n+`>`})(e)),o={local:t,tag:e,destination:null},a.push(o),s=t,void(c=e);let g=(i.length>0?i[i.length-1]:r).get(t);if(o={local:t,visitor:g,tag:e,destination:null},p)return a.push(o),s=t,void(c=e);l=o?.visitor??null,s=t,c=e;let _=!!g&&g.to===null;if(g&&!_&&g.scope){let e=g.scope(v);e===null?_=!0:e&&(i.push(e),o.pushedScope=!0)}g&&(a.length===0?(f=d,o.destination=f,o.pushedDestination=!0,u.push(f)):_?(f=null,o.destination=null):g.transparent?o.destination=f:(f={key:null,source:{},parent:null},o.destination=f,o.pushedDestination=!0,u.push(f))),a.push(o),p=_;let y=l?.openTag?.(v);y!==void 0&&(f.parent=y),g?.raw&&!_&&(m=[],h=o)},onCloseTag:e=>{let t=e.name,r=t.indexOf(`:`);if(r!==-1&&(t=t.slice(r+1)),t!==s)throw Error(`mismatch open/close tag: '${t}'/'${s}'`);let _=!1;if(m){if(a[a.length-1]!==h)return m.push(`</${e.name}>`),a.pop(),o=a[a.length-1]??null,s=o?.local??null,void(c=o?.tag??null);g=m.join(``),m=null,h=null,_=!0}p||l?.closeTag?.(v),_&&(g=null);let y=a.pop()??null;o=a[a.length-1]??null,y?.pushedScope&&i.pop();let b=y?.destination;if(b&&y.pushedDestination){u.pop(),f=u[u.length-1]??d;let e=y.visitor;e&&e.to&&b.source!==void 0&&(Array.isArray(e.to)?f.source.push?f.source.push(b.source):n?.(`Unable to parse array for ${e.from} at ${v.getPath()}`):b.key?f.source[b.key]=b.source:typeof e.to==`string`&&(f.source[e.to]=b.source))}else b||(f=u[u.length-1]??d);s=o?.local??null,c=o?.tag??null,l=o?.visitor??null,p=!o?.destination},onText:e=>{m?m.push(ve(e)):l?.text?.(e,v)},onEnd:t}}},ye=`IFERROR(${t.O}(`,be=ye.toUpperCase(),xe=t.D.toUpperCase(),Se={kind:`none`},Ce={kind:`spilled`},we=(e,t)=>{if(e.charCodeAt(t)!==34)return null;let n=``,r=t+1;for(;r<e.length;)if(e.charCodeAt(r)===34){if(e.charCodeAt(r+1)!==34)return{value:n,end:r+1};n+=`"`,r+=2}else n+=e[r],r++;return null},Te=e=>{let t=[],n=0;for(;n<e.length;){let r=e.charCodeAt(n);if(r===34){let t=we(e,n);if(t===null)break;n=t.end;continue}if(!(r>=65&&r<=90||r>=97&&r<=122||r===95)){n++;continue}let i=n+1;for(;i<e.length;){let t=e.charCodeAt(i);if(!(t>=65&&t<=90||t>=97&&t<=122||t>=48&&t<=57||t===95||t===46))break;i++}e.charCodeAt(i)===40&&t.push(e.slice(n,i).toUpperCase().replace(/^_XLFN\./,``).replace(/^_XLWS\./,``)),n=i}return t},Ee=e=>{let t=t=>{if(e)return RegExp(`<(?:[\\w.-]+:)?${t}\\b[^>]*>([^<]*)<`).exec(e)?.[1]},r=e=>{let t=parseInt(e??``,10);return isNaN(t)?0:t};return{c:r(t(`col`)),r:r(t(`row`)),x:n.s(t(`colOff`)??`0`)??0,y:n.s(t(`rowOff`)??`0`)??0}},De=`formulaDialect`,Oe=(e,r,a,o,s,c,l,u)=>{let d=new $,f=u?.get(`parseInlineDxf`),p=u?.get(De),m=e=>p&&e?p.readDetached(e):e,h=new i.Tuple.TransposedBuilder,g=null;d.registerVisitor({from:`autoFilter`,to:`autoTable`,openTag:e=>{let t=e.getAttribute(`ref`),n=i.AddressUtils.fastStringToRange(t);e.getSource().r=n,e.getSource().v={}},closeTag:e=>{let t=e.getSource(),n=t.v,r=n.hiddenButtons;if(Array.isArray(r)){let e=r.length,i=t.r,a=i.colEnd-i.colStart+1;e===0?n.hiddenButtons=!1:e===a&&(n.hiddenButtons=!0)}}}),d.registerVisitor({from:`conditionalFormatting`,to:{},openTag:e=>{let t=e.getParent();t.conditionals||=[];let n=e.getAttribute(`sqref`);n&&=n.trim().split(/\s+/).join(`,`);let r={r:n,conditionals:t.conditionals},i=e.getAttribute(`pivot`,J);i!==null&&(r.pivot=i),e.setSource(r)}}),d.registerVisitor({from:`cfRule`,to:{},openTag:e=>{let t=e.getParent();if(!t?.r)return;let n=e.getSource()??{};t.pivot!==void 0&&(n.pivot=t.pivot),t.conditionals.push({r:t.r,v:null,rule:n}),e.copyToObject(n,`type`,Z),e.copyToObject(n,`priority`,Y),e.copyToObject(n,`stopIfTrue`,J);let r=e.getAttribute(`dxfId`,Y);if(r!==null){let t=o?.get(r);t||=(c?.(`Unable to load conditional color. Invalid dxfI: '${r}' at '${e.getPath()}'.`),{}),n.style=t}e.copyToObject(n,`aboveAverage`,J),e.copyToObject(n,`equalAverage`,J),e.copyToObject(n,`stdDev`,Y),e.copyToObject(n,`bottom`,J),e.copyToObject(n,`percent`,J),e.copyToObject(n,`rank`,Y),e.copyToObject(n,`operator`,Z),e.copyToObject(n,`text`,Z),e.copyToObject(n,`timePeriod`,Z)},closeTag:e=>{let n=e.getParent();if(!n?.r)return;let r=n.conditionals[n.conditionals.length-1],i=r?.rule;if(!i)return;let a={},o=t.v(i,c);o&&(a.condition=o),i.style&&(a.style=i.style),i.scale&&(a.scale=i.scale),i.stopIfTrue&&(a.stopIfTrue=!0),i.pivot&&(a.pivot=!0),r.v=a,r.priority=i.priority,i.x14Id&&(r.x14Id=i.x14Id),delete r.rule}});let _=e=>{let t=e.conditions??[],n=[];for(let e=0;e<t.length;e++){let r=t[e],i={};r.type&&(i.type=r.type),r.value!==void 0&&(i.value=r.value),r.exclusive&&(i.exclusive=!0),n.push(i)}return n};d.registerVisitor({from:`colorScale`,to:{},openTag:e=>{},closeTag:e=>{let t=e.getSource(),n=t.colors??[],r=_(t);for(let e=0;e<r.length;e++)r[e].color=n[e];e.getParent().scale={type:i.IConditionalFormat.ScaleType.ColorScale,stops:r}}}),d.registerVisitor({from:`dataBar`,to:{},openTag:e=>{e.copyTo(`maxLength`,Y),e.copyTo(`minLength`,Y),e.copyTo(`showValue`,J)},closeTag:e=>{let t=e.getSource(),n={type:i.IConditionalFormat.ScaleType.DataBar,stops:_(t)},r=t.colors?.[0];r&&(n.color=r),t.minLength!==void 0&&(n.minLength=t.minLength),t.maxLength!==void 0&&(n.maxLength=t.maxLength),t.showValue!==void 0&&(n.showValue=t.showValue),e.getParent().scale=n}}),d.registerVisitor({from:`iconSet`,to:{},openTag:e=>{e.copyTo(`iconSet`,Z),e.copyTo(`reverse`,J),e.copyTo(`showValue`,J)},closeTag:e=>{let t=e.getSource(),n={type:i.IConditionalFormat.ScaleType.IconSet,stops:_(t)};t.iconSet!==void 0&&(n.iconSet=t.iconSet),t.reverse!==void 0&&(n.reverse=t.reverse),t.showValue!==void 0&&(n.showValue=t.showValue),e.getParent().scale=n}}),d.registerVisitor({from:`formula`,to:{},text:(e,t)=>{let n=t.getParent(),r=n.formulas;r||(r=[],n.formulas=r),r.push(m(e))}}),d.registerVisitor({from:`cfvo`,to:{},openTag:e=>{let t=e.getParent();t.conditions||=[];let n=e.getSource();if(t.conditions.push(n),e.copyTo(`type`,Z),n.type===i.IConditionalFormat.ColorStopType.Formula){let t=e.getAttribute(`val`);t!=null&&(n.value=m(String(t)))}else e.copyTo(`value`,X,`val`);!1===e.getAttribute(`gte`,J)&&(n.exclusive=!0)}}),d.registerVisitor({from:`color`,to:{},openTag:e=>{let t=e.getParent();t.colors||=[];let r=n.p(t=>e.getAttribute(t));t.colors.push(r)}}),d.registerVisitor({from:`filterColumn`,to:{},openTag:e=>{let t=e.getParent().v,n=parseInt(e.getAttribute(`colId`)),r=e.getSource();r.index=n;let i=t.filter;i||(i={conditions:[]},t.filter=i);let a=i.conditions;if(a||(a=[],i.conditions=a),a.push(r),e.getAttribute(`hiddenButton`,J)&&t){let e=t.hiddenButtons;e||(e=[],t.hiddenButtons=e),e.push(n)}if(e.getAttribute(`showButton`,J)&&t){let e=t.showButtons;e||(e=[],t.showButtons=e),e.push(n)}return r}}),d.registerVisitor({from:`colorFilter`,openTag:e=>{let t=e.getParent(),n={};t.operator=i.ICondition.BuiltInOperatorNames.Color,t.param=n,e.copyToObject(n,`cellColor`),e.copyToObject(n,`styleId`,Y,`dxfId`)}}),d.registerVisitor({from:`iconFilter`,openTag:e=>{let t=e.getParent(),n={};t.operator=i.ICondition.BuiltInOperatorNames.Icon,t.param=n,e.copyToObject(n,`iconId`,Y),e.copyToObject(n,`iconSet`,Z)}}),d.registerVisitor({from:`top10`,openTag:e=>{let t=e.getParent(),n={};t.operator=i.ICondition.BuiltInOperatorNames.TopN,t.param=n,e.copyToObject(n,`filterVal`,X),e.copyToObject(n,`percent`,J),e.copyToObject(n,`top`,J),e.copyToObject(n,`limit`,X,`val`)}}),d.registerVisitor({from:`dynamicFilter`,openTag:e=>{let t=e.getParent(),n={};t.operator=i.ICondition.BuiltInOperatorNames.TimePeriod,t.param=n;let r=e.getAttribute(`type`);Object.values(i.ICondition.AverageType).includes(r)?(t.operator=i.ICondition.BuiltInOperatorNames.Average,e.copyToObject(n,`stdDevs`,Y,`val`)):e.copyToObject(n,`anchorDate`,Y,`val`),e.copyToObject(n,`operator`,Z,`type`),e.copyToObject(n,`maxVal`,X,`maxVal`)}}),d.registerVisitor({from:`filters`,to:{},openTag:e=>{let t=e.getParent(),n={};return t.operator=i.ICondition.BuiltInOperatorNames.InSet,t.param=n,e.copyToObject(n,`blank`,J),e.copyToObject(n,`calendarType`,Z),n}}),d.registerVisitor({from:`filter`,openTag:e=>{let t=e.getParent(),n=t.items;n||(n=[],t.items=n),n.push(e.getAttribute(`val`,Z))}}),d.registerVisitor({from:`dateGroupItem`,to:{},openTag:e=>{let t=e.getParent(),n=t.dateGroups;n||(n=[],t.dateGroups=n),n.push(e.getSource()),e.copyTo(`group`,Z,`dateTimeGrouping`),e.copyTo(`day`,Y),e.copyTo(`hour`,Y),e.copyTo(`minute`,Y),e.copyTo(`month`,Y),e.copyTo(`second`,Y),e.copyTo(`year`,Y)}}),d.registerVisitor({from:`customFilters`,openTag:e=>{let t=e.getParent(),n=e.getAttribute(`and`),r=n===`and`||n===`1`,a=[];return t.operator=r?i.ICondition.BuiltInOperatorNames.And:i.ICondition.BuiltInOperatorNames.Or,t.param=a,e.setSource(t),a},closeTag:e=>{let t=e.getSource(),n=t?.param;if(n?.length!==1)return;let r=n[0];t.operator=r.operator,t.param=r.param}}),d.registerVisitor({from:`customFilter`,openTag:e=>{let n=e.getParent(),r;Array.isArray(n)?(r={},n.push(r)):r=n;let i=t.g({operator:e.getAttribute(`operator`),val:e.getAttribute(`val`)});i&&(r.operator=i.operator,r.param=i.param)}}),d.registerVisitor({from:`sortState`,to:{},openTag:e=>{let t=e.getParent(),n=t.v;n&&(n.sort={},e.setSource(t))}}),d.registerVisitor({from:`sortCondition`,to:{},openTag:e=>{let t=e.getParent(),n=t.v;if(!n)return;let r=n.sort;if(!r)return;let a=r.sorts;a||(a=[],r.sorts=a);let o=e.getAttribute(`ref`),s=0;if(o){let e=i.AddressUtils.fastStringToRange(o,je).colStart,n=t.r,r=n.colStart;s=n?e-r:e}let c={};e.copyToObject(c,`sortOn`,Z,`sortBy`),e.copyToObject(c,`dxfId`,Z,`sortBy`),e.copyToObject(c,`iconSet`,Z),e.copyToObject(c,`customList`,Z),c.reverse=e.getAttribute(`descending`,J)??!1;let l={index:s,criteria:c};a.push(l)}});let v=e=>{g=e.getSource(),e.copyTo(`topLeft`,Z,`topLeftCell`);let t=n.a(e.getAttribute(`defaultGridColor`)),r=e.getAttribute(`colorId`);r===null||t||(e.getSource().gridLineColor=`index`+parseFloat(r)),e.copyTo(`showZeros`,J),e.copyTo(`showFormulas`,J),e.copyTo(`zoomScale`,Y),e.copyTo(`showRowHeaders`,J,`showRowColHeaders`),e.copyTo(`showColumnHeaders`,J,`showRowColHeaders`),e.copyTo(`showRowGridlines`,J,`showGridLines`),e.copyTo(`showColumnGridlines`,J,`showGridLines`),e.copyTo(`rightToLeft`,J)};d.registerVisitor({from:`sheetView`,to:`view`,openTag:e=>{v(e)},closeTag:()=>{g=null}}),d.registerVisitor({from:`customSheetViews`,to:`customSheetViews`,openTag:e=>{e.setSource([])}}),d.registerVisitor({from:`customSheetView`,to:[],openTag:e=>{v(e)},closeTag:()=>{g=null}}),d.registerVisitor({from:`selection`,to:`selection`,openTag:e=>{if(!g)return;e.copyTo(`cell`,Z,`activeCell`),e.copyTo(`rangeIndex`,Y,`activeCellId`);let t=e.getAttribute(`activeCell`),n=e.getAttribute(`sqref`);n&&n!==t&&(e.getSource().ranges=n.trim().split(/\s+/))}}),d.registerVisitor({from:`pane`,to:null,openTag:e=>{if(g&&e.getAttribute(`state`)===`frozen`){let t={};g.freezePanes=t,e.copyToObject(t,`topLeft`,Z,`topLeftCell`);let n=(g.topLeft?i.AddressUtils.fastStringToCell(g.topLeft):void 0)??{colIndex:0,rowIndex:0},r={colIndex:0,rowIndex:0};e.copyToObject(r,`colIndex`,Y,`xSplit`),e.copyToObject(r,`rowIndex`,Y,`ySplit`);let a={colIndex:n.colIndex+r.colIndex,rowIndex:n.rowIndex+r.rowIndex};t.coords=i.AddressUtils.cellToString(a)}}}),d.registerVisitor({from:`sheetPr`,transparent:!0,openTag:t=>{let n=t.getAttribute(`codeName`);n&&(e.codeName=n),!1===t.getAttribute(`enableFormatConditionsCalculation`,J)&&(e.conditionalFormatCalculation=!1)}}),d.registerVisitor({from:`tabColor`,to:null,openTag:t=>{let r=n.p(e=>t.getAttribute(e));r&&(e.tabColor=r)}}),d.registerVisitor({from:`pageSetUpPr`,to:`pageSetUpPr`,openTag:e=>{}}),d.registerVisitor({from:`outlinePr`,to:null,openTag:t=>{let n={};t.copyToObject(n,`summaryBelow`,J),t.copyToObject(n,`summaryRight`,J),t.copyToObject(n,`showOutlineSymbols`,J),t.copyToObject(n,`applyStyles`,J),Object.keys(n).length>0&&(e.outline=n)}}),d.registerVisitor({from:`pageMargins`,to:`pageMargins`,openTag:e=>{e.copyTo(`bottom`,X),e.copyTo(`footer`,X),e.copyTo(`header`,X),e.copyTo(`left`,X),e.copyTo(`right`,X),e.copyTo(`top`,X),e.copyTo(`bottom`,X)}}),d.registerVisitor({from:`pageSetup`,to:`pageSetup`,openTag:e=>{e.copyTo(`blackAndWhite`,J),e.copyTo(`cellComments`),e.copyTo(`copies`,Y),e.copyTo(`draft`,J),e.copyTo(`errors`),e.copyTo(`firstPageNumber`,Y),e.copyTo(`fitToHeight`,Y),e.copyTo(`fitToWidth`,Y),e.copyTo(`horizontalDpi`,Y),e.copyTo(`orientation`),e.copyTo(`pageOrder`),e.copyTo(`paperSize`,Y),e.copyTo(`scale`,Y),e.copyTo(`useFirstPageNumber`,J),e.copyTo(`usePrinterDefaults`,J),e.copyTo(`verticalDpi`,Y)}}),d.registerVisitor({from:`printOptions`,to:`printOptions`,openTag:e=>{e.copyTo(`gridLines`,J),e.copyTo(`gridLinesSet`,J),e.copyTo(`headings`,J),e.copyTo(`horizontalCentered`,J),e.copyTo(`verticalCentered`,J)}}),d.registerVisitor({from:`headerFoot`,to:`headerFoot`,openTag:e=>{}}),d.registerVisitor({from:`mergeCells`,to:`merges`,openTag:e=>{e.setSource([])}}),d.registerVisitor({from:`dataValidations`,to:`validations`,openTag:e=>{e.setSource([])}});let y={from:`dataValidation`,to:[],openTag:e=>{let t=e.getAttribute(`sqref`);t&&=t.trim().split(/\s+/).join(`,`);let n={},r={r:t,v:n,rule:{type:e.getAttribute(`type`)??void 0,operator:e.getAttribute(`operator`)??void 0}};!0===e.getAttribute(`showDropDown`,J)&&(n.hideDropdown=!0),e.copyToObject(n,`alert`,Z,`error`),e.copyToObject(n,`alertTitle`,Z,`errorTitle`),e.copyToObject(n,`showAlertMessage`,J,`showErrorMessage`),n.alertStyle=e.getAttribute(`errorStyle`)??`stop`,e.copyToObject(n,`imeMode`),e.copyToObject(n,`prompt`),e.copyToObject(n,`promptTitle`),e.copyToObject(n,`showPromptMessage`,J,`showInputMessage`),e.setSource(r)},closeTag:e=>{let n=e.getSource();if(!n?.rule)return;let r=t.p(n.rule,c);r&&(e.getAttribute(`allowBlank`,J)&&(r.includeBlanks=!0),n.v.condition=r),delete n.rule}};d.registerVisitor(y),d.registerVisitor({from:`formula1`,to:{},text:(e,n)=>{let r=n.getParent().rule;r?.type&&(r.formula1=t.d(m(e),r.type))}}),d.registerVisitor({from:`formula2`,to:{},text:(e,n)=>{let r=n.getParent().rule;r?.type&&(r.formula2=t.d(m(e),r.type))}}),d.registerVisitor({from:`picture`,to:`picture`,openTag:e=>{let t=e.getAttribute(`r:id`);if(!t)return void e.warn(`A picture names no image; it was not imported.`,{onceKey:`xlsx.sheet.picture.noRel`});let n=r(t,`resource`);e.getSource().resId=n}});let b={from:`slicer`,to:{},openTag:e=>{let t=e.getAttribute(`r:id`);if(!t)return void e.warn(`A slicer names no cache; it was not imported.`,{onceKey:`xlsx.sheet.slicer.noRel`});let n=r(t)?.slicers,i=e.getParent();i.slicers||={};let a=Object.keys(n);for(let e of a)i.slicers[e]=n[e]}};d.registerVisitor(b);let x=(e,t)=>({from:e,to:{},openTag:e=>{e.setSource(``)},text:(e,t)=>{t.setSource((t.getSource()??``)+e)},closeTag:e=>{t(String(e.getSource()??``),e)}}),S=new Map;S.set(`dataValidations`,{from:`dataValidations`,to:`validations`,openTag:e=>{let t=e.getParent();e.setSource(t.validations??[])},closeTag:e=>{(e.getSource()?.length??0)===0&&e.setSource(void 0)}}),S.set(`dataValidation`,{...y,closeTag:e=>{y.closeTag(e);let t=e.getSource();t&&!t.r&&(e.warn(`x14 dataValidation with no xm:sqref was dropped.`),e.setSource(void 0))}});let C=e=>({from:e,to:{},openTag:t=>{t.setSource({rule:t.getParent()?.rule,key:e})}});S.set(`formula1`,C(`formula1`)),S.set(`formula2`,C(`formula2`)),S.set(`f`,x(`f`,(e,n)=>{let r=n.getParent(),i=r?.rule;i&&(i[r.key]=t.d(m(e),i.type))})),S.set(`sqref`,x(`sqref`,(e,t)=>{let n=t.getParent(),r=e.trim();n&&r&&(n.r=r.split(/\s+/).join(`,`))}));let w=new Map,T=[],E=new Map;E.set(`conditionalFormattings`,{from:`conditionalFormattings`,transparent:!0}),E.set(`conditionalFormatting`,{from:`conditionalFormatting`,to:{},openTag:e=>{e.setSource({rules:[]})},closeTag:e=>{let t=e.getSource(),n=t?.rules??[];for(let e=0;e<n.length;e++){let r=n[e];r.sqref=t.sqref,r.id?w.set(r.id,r):T.push(r)}}}),E.set(`cfRule`,{from:`cfRule`,to:{},openTag:e=>{e.copyTo(`id`,Z),e.copyTo(`type`,Z),e.copyTo(`priority`,Y),e.copyTo(`stopIfTrue`,J),e.copyTo(`operator`,Z),e.copyTo(`text`,Z),e.copyTo(`timePeriod`,Z),e.copyTo(`aboveAverage`,J),e.copyTo(`equalAverage`,J),e.copyTo(`stdDev`,Y),e.copyTo(`bottom`,J),e.copyTo(`percent`,J),e.copyTo(`rank`,Y)},closeTag:e=>{let t=e.getSource();t&&e.getParent()?.rules?.push(t)}}),E.set(`sqref`,x(`sqref`,(e,t)=>{let n=t.getParent(),r=e.trim();n&&r&&(n.sqref=r)})),E.set(`dataBar`,{from:`dataBar`,to:{},openTag:e=>{e.copyTo(`minLength`,Y),e.copyTo(`maxLength`,Y),e.copyTo(`gradient`,J),e.copyTo(`border`,J),e.copyTo(`direction`,Z),e.copyTo(`axisPosition`,Z),e.copyTo(`negativeBarColorSameAsPositive`,J),e.copyTo(`negativeBarBorderColorSameAsPositive`,J)},closeTag:e=>{e.getParent().dataBar=e.getSource()}}),E.set(`iconSet`,{from:`iconSet`,to:{},openTag:e=>{e.copyTo(`iconSet`,Z),e.copyTo(`custom`,J),e.copyTo(`reverse`,J),e.copyTo(`showValue`,J)},closeTag:e=>{e.getParent().iconSet=e.getSource()}});let ee=new Map;ee.set(`f`,x(`f`,(e,t)=>{let n=t.getParent();if(!n)return;let r=e.trim(),i=Number(r);n.value=r.length>0&&Number.isFinite(i)?i:m(e)})),E.set(`cfvo`,{from:`cfvo`,to:{},scope:()=>ee,openTag:e=>{let t=e.getParent();t.conditions||=[];let n=e.getSource();t.conditions.push(n),e.copyTo(`type`,Z),!1===e.getAttribute(`gte`,J)&&(n.exclusive=!0)}}),E.set(`f`,x(`f`,(e,t)=>{let n=t.getParent();n&&(n.formulas??=[]).push(m(e))})),E.set(`dxf`,{from:`dxf`,to:{},raw:!0,closeTag:e=>{if(!f)return;let t=e.getParent();if(!t)return;let n=f(e.getRawXml()??``);n&&(t.style=n)}});let te=e=>({from:e,to:{},openTag:t=>{let r=n.p(e=>t.getAttribute(e));r&&(t.getParent()[e]=r)}});E.set(`borderColor`,te(`borderColor`)),E.set(`negativeFillColor`,te(`negativeFillColor`)),E.set(`negativeBorderColor`,te(`negativeBorderColor`)),E.set(`axisColor`,te(`axisColor`)),E.set(`cfIcon`,{from:`cfIcon`,to:{},openTag:e=>{let t=e.getAttribute(`iconSet`),n=e.getAttribute(`iconId`,Y);if(t===null||n===null)return;let r=e.getParent();r.icons||=[],r.icons.push({set:t,id:n})}});let D=new Map;D.set(`id`,x(`id`,(e,t)=>{let n=t.getParent(),r=e.trim();n&&r&&(n.x14Id=r)}));let O=new Map;O.set(`slicerList`,{from:`slicerList`,transparent:!0}),O.set(`slicer`,b);let k=new Map([[t.lt(t.tt),S],[t.lt(t.$),E],[t.lt(t.et),E],[t.lt(t.Q),D],[t.lt(t.nt),O],[t.lt(t.rt),O]]),A=new Set;d.registerVisitor({from:`extLst`,transparent:!0}),d.registerVisitor({from:`ext`,transparent:!0,scope:e=>{let n=e.getAttribute(`uri`),r=t.lt(n),i=k.get(r);if(i)return i;if(!t.ot.has(r)&&!A.has(r)){A.add(r);let i=t.st[r];e.warn(i?`Extension content '${i}' (${n}) is not read; it will be lost on resave.`:`Unknown extension content (uri ${n}) is not read; it will be lost on resave.`)}return null}}),d.registerVisitor({from:`mergeCell`,to:[],openTag:e=>{let t=e.getAttribute(`ref`);e.setSource(t)}}),d.registerVisitor({from:`hyperlinks`,to:`hyperlinks`,openTag:e=>{e.setSource([])}}),d.registerVisitor({from:`hyperlink`,to:[],openTag:e=>{let t=e.getAttribute(`r:id`),n=e.getAttribute(`ref`);if(!n)return void e.warn(`A hyperlink has no ref; it was dropped.`,{onceKey:`xlsx.sheet.hyperlink.noRef`});e.setKey(n);let i=t?r(t):``;if(typeof i!=`string`)return void e.warn(`A hyperlink has an invalid address; it was dropped.`,{onceKey:`xlsx.sheet.hyperlink.address`});i.endsWith(`\\`)&&(i=i.substring(0,i.length-1));let a=e.getAttribute(`location`);if(a&&(i+=`#`+a),!i)return void e.warn(`A hyperlink has no address; it was dropped.`,{onceKey:`xlsx.sheet.hyperlink.address`});let o,s=e.getAttribute(`tooltip`);o=s?{address:i,screenTip:s}:i,e.setSource({r:n,v:o})}}),d.registerVisitor({from:`drawing`,to:`movables`,openTag:e=>{let t=e.getAttribute(`r:id`);if(!t)return;let n=r(t);n?e.setSource(n.movables):e.warn(`A drawing part is missing; its shapes were not imported.`,{onceKey:`xlsx.sheet.drawing.missing`})}}),d.registerVisitor({from:`legacyDrawing`,to:`legacyDrawing`,openTag:e=>{e.setSource(r(e.getAttribute(`r:id`),`legacyDrawing`)??void 0)}}),d.registerVisitor({from:`legacyDrawingHF`,to:`legacyDrawingHF`,openTag:e=>{e.setSource(r(e.getAttribute(`r:id`),`legacyDrawing`)??void 0)}});let j=null,M=!1,ne=new Map,re={from:`Fallback`,to:null},N={from:`Choice`,transparent:!0};ne.set(`Fallback`,re),ne.set(`Choice`,N),ne.set(`control`,{from:`control`,transparent:!0,openTag:e=>{let t={},n=parseInt(e.getAttribute(`shapeId`)??``,10);isNaN(n)||(t.shapeId=n);let i=e.getAttribute(`r:id`),a=i?r(i,`part`):null;a&&(t.part=a);let o=e.getAttribute(`name`),s={anchor:{tl:{c:0,r:0,x:0,y:0},br:{c:0,r:0,x:0,y:0}},content:{type:`control`,json:t}};o&&(s.name=o),j={movable:s,control:t}},closeTag:()=>{j&&=(e.movables||=[],e.movables.push(j.movable),null)}}),ne.set(`controlPr`,{from:`controlPr`,transparent:!0,raw:!0,openTag:e=>{if(!j)return;let t=e.getFrom().attributes??{},n={};for(let e in t){let r=t[e];n[e]=typeof r==`string`?r:r?.value??``}Object.keys(n).length>0&&(j.control.props=n)},closeTag:e=>{if(!j)return;let t=(e=>{let t=/<(?:[\w.-]+:)?anchor\b([^>]*)>([\s\S]*?)<\/(?:[\w.-]+:)?anchor>/.exec(e);if(!t)return null;let n=t[2],r=e=>RegExp(`<(?:[\\w.-]+:)?${e}\\b[^>]*>([\\s\\S]*?)<\\/(?:[\\w.-]+:)?${e}>`).exec(n)?.[1],i=t[1],a=/\bmoveWithCells="(?:1|true)"/.test(i),o=/\bsizeWithCells="(?:1|true)"/.test(i);return{anchor:{tl:Ee(r(`from`)),br:Ee(r(`to`))},anchorType:a?o?`twoCell`:`oneCell`:`absolute`,rest:(e.slice(0,t.index)+e.slice(t.index+t[0].length)).trim()}})(e.getRawXml()??``);t?(j.movable.anchor=t.anchor,t.anchorType!==`twoCell`&&(j.movable.anchorType=t.anchorType),t.rest&&(j.control.xml=t.rest)):M||(M=!0,e.warn(`A form control has no anchor; it is placed at the top left of the sheet.`))}});let P={from:`controls`,transparent:!0,scope:()=>ne};d.registerVisitor(P);let F=new Map([[`Choice`,N],[`Fallback`,re],[`controls`,P]]);d.registerVisitor({from:`AlternateContent`,transparent:!0,scope:()=>F}),d.registerVisitor({from:`tableParts`,to:`tables`,openTag:e=>{e.setSource([])}}),d.registerVisitor({from:`tablePart`,to:[],openTag:e=>{let t=e.getAttribute(`r:id`);if(!t)return;let n=r(t);n?e.setSource(n):e.warn(`A table part is missing; the table was not imported.`,{onceKey:`xlsx.sheet.table.missing`})}});let I=(e,t)=>{t.conditions?.length&&(e.stops=_(t)),t.minLength!==void 0&&(e.minLength=t.minLength),t.maxLength!==void 0&&(e.maxLength=t.maxLength),(t.gradient??1)&&(e.gradient=!0),t.border&&t.borderColor&&(e.borderColor=t.borderColor),!t.negativeBarColorSameAsPositive&&t.negativeFillColor&&(e.negativeFillColor=t.negativeFillColor),!(t.negativeBarBorderColorSameAsPositive??1)&&t.negativeBorderColor&&(e.negativeBorderColor=t.negativeBorderColor),t.axisColor&&(e.axisColor=t.axisColor),t.axisPosition!==`middle`&&t.axisPosition!==`none`||(e.axisPosition=t.axisPosition),t.direction!==`leftToRight`&&t.direction!==`rightToLeft`||(e.direction=t.direction)},L=(e,t)=>{t.conditions?.length&&(e.stops=_(t)),t.iconSet&&t.iconSet!==e.iconSet&&(e.iconSet=t.iconSet),t.icons?.length&&(e.icon=t.icons),t.reverse!==void 0&&(e.reverse=t.reverse),t.showValue!==void 0&&(e.showValue=t.showValue)},R=e=>{if(!e.sqref)return null;let n=e.sqref.split(/\s+/).join(`,`);if(e.type===`iconSet`){if(!e.iconSet)return null;let t={type:i.IConditionalFormat.ScaleType.IconSet,stops:[]};return L(t,e.iconSet),{r:n,v:{scale:t},priority:e.priority}}let r=t.v(e,c);if(!r)return null;let a={condition:r};return e.style&&(a.style=e.style),e.stopIfTrue&&(a.stopIfTrue=!0),{r:n,v:a,priority:e.priority}};d.registerVisitor({from:`worksheet`,to:{},openTag:e=>{},closeTag:e=>{let t=e.getSource(),n=t?.conditionals;if(n)for(let e=0;e<n.length;e++){let t=n[e],r=t.x14Id;if(!r)continue;delete t.x14Id;let a=w.get(r);if(!a)continue;w.delete(r);let o=t.v?.scale;a.dataBar&&o?.type===i.IConditionalFormat.ScaleType.DataBar?I(o,a.dataBar):a.iconSet&&o?.type===i.IConditionalFormat.ScaleType.IconSet&&L(o,a.iconSet)}let r=[...w.values(),...T],a=new Set,o=0;for(let e=0;e<r.length;e++){let i=R(r[e]);i?(n||(n=[],t.conditionals=n),n.push(i)):(a.add(r[e].type??`unknown`),o++)}if(o>0){let e=[...a].map(e=>`'${e}'`).join(`, `);c?.(o===1?`An x14-only conditional formatting rule (type ${e}) is not read and will be lost on resave.`:`${o} x14-only conditional formatting rules (types ${e}) are not read and will be lost on resave.`)}if(n){n.length>1&&n.sort((e,t)=>(e.priority??1/0)-(t.priority??1/0));for(let e=0;e<n.length;e++)delete n[e].priority}}}),d.registerVisitor({from:`customProperties`,to:`customProperties`,openTag:e=>{e.setSource([])},closeTag:e=>{let t=e.getSource();t.length>0&&(e.getParent().customProperties=t)}}),d.registerVisitor({from:`customPr`,to:{},openTag:e=>{let t=e.getParent();e.copyTo(`name`);let n=e.getAttribute(`r:id`);if(!n)return void e.warn(`A custom property names no part; it was not imported.`,{onceKey:`xlsx.sheet.customProperty.noRel`});let i=r(n,`resource`),a=e.getSource();a.resId=i,t.push(a)}}),d.registerVisitor({from:`sheetProtection`,to:`protection`,openTag:e=>{let n=e.getSource();for(let r of t.y){let i=e.hasAttribute(r.attribute)?e.getAttribute(r.attribute):null;n[r.key]=t.x(r,i)}if(n.sheet)return;let r={};e.copyToObject(r,`hash`,Z,`hashValue`),e.copyToObject(r,`algorithm`,Z,`algorithmName`),e.copyToObject(r,`salt`,Z,`saltValue`),e.copyToObject(r,`spinCount`,Y),Object.keys(r).length>0&&(e.getSource().password=r)}}),d.registerVisitor({from:`protectedRanges`,to:`protectedRanges`,openTag:e=>{e.setSource([])}}),d.registerVisitor({from:`protectedRange`,to:[],openTag:e=>{let t=e.getAttribute(`sqref`);t&&=t.trim().split(/\s+/).join(`,`);let n={},r={r:t,v:n};e.copyToObject(n,`name`),e.copyToObject(n,`securityDescriptor`);let i={};e.copyToObject(i,`hash`,Z,`hashValue`),e.copyToObject(i,`algorithm`,Z,`algorithmName`),e.copyToObject(i,`salt`,Z,`saltValue`),e.copyToObject(i,`spinCount`,Y),Object.keys(i).length>0&&(n.password=i),e.setSource(r)},closeTag:e=>{let t=e.getSource();t?.r&&t.v.name||e.setSource(void 0)}}),d.registerVisitor({from:`sheetFormatPr`,to:`sheetFormatPr`,openTag:t=>{t.copyToObject(e,`defaultColSize`,X,`defaultColWidth`),t.copyToObject(e,`outlineLevelCol`,Y,`outlineLevelCol`);let n=t.getAttribute(`customHeight`);n!==`1`&&n!==`true`||t.copyToObject(e,`defaultRowSize`,X,`defaultRowHeight`),t.copyToObject(e,`outlineLevelRow`,Y,`outlineLevelRow`)}}),d.registerVisitor({from:`cols`,to:`cols`,openTag:e=>{e.setSource([])}}),d.registerVisitor({from:`col`,to:[],openTag:e=>{let t=e.getSource(),n=e.getAttribute(`min`),r=e.getAttribute(`max`),a=n===void 0?0:parseInt(n)-1,o=r===void 0?a:parseInt(r)-1;t.r=i.AddressUtils.runToString(a,o,!0);let s={};t.v=s,e.copyToObject(s,`sz`,X,`width`),e.copyToObject(s,`csz`,J,`customWidth`),e.copyToObject(s,`h`,J,`hidden`),e.copyToObject(s,`l`,Y,`outlineLevel`),e.copyToObject(s,`s`,Y,`style`)}}),d.registerVisitor({from:`oleObjects`,to:null,openTag:e=>{e.warn(`'OLE Objects' are not supported.`)}});let z=!1,B=!1,V=0,H=``,ie=e=>{let t=e.indexOf(`:`);return t===-1?e:e.slice(t+1)};return Me(h,e,d.createEventHandler(e,s,c),c,l,{onOpenTag:e=>{z=!0;let t=ie(e.name);t===`t`||t===`v`?V===0&&(B=!0):t!==`rPh`&&t!==`phoneticPr`||V++},onText:e=>{B&&(H+=e)},onCloseTag:e=>{let t=ie(e.name);t===`t`||t===`v`?B=!1:t!==`rPh`&&t!==`phoneticPr`||V>0&&V--},onEnd:()=>{if(!z)return;let e=a(t.T(H));return z=!1,B=!1,V=0,H=``,e},onError:e=>{}},u)},ke=class{static{this.Collapsed=1}static{this.CustomFormat=2}static{this.CustomHeight=4}static{this.Hidden=8}static{this.Ht=16}static{this.OutlineLevel=32}static{this.Ph=64}static{this.R=128}static{this.S=256}static{this.Spans=512}static{this.ThickBot=1024}static{this.ThickTop=2048}},Ae=(e,t,n)=>{if(e[0].value[0]===e[1].value[0])return t},je={colStart:0,colEnd:0,rowStart:0,rowEnd:0},Me=(e,t,n,r,a,o,s)=>{let c=!1,l=!1,u=[],d=!1,f=null,p=null,m=null,h=null,g=null,_=null,v=s?.get(`richData`)??i.CommonUtils.EmptyArray,y=s?.get(`dummyWrapped`)??null,b=i.AddressUtils.normalizeA1ToR1C1,x=i.CoordUtils.createConflatingRanges(),S=new Map,C=[],w=!1,T=!1,E=null,ee=!1,te=i.CoordUtils.createConflatingRanges(),D=!1,O=-1,k=-1,A=null,j=null,M=null,ne=[],re=null,N=-2,P=0,F=``,I=``,L=``,R=``,z=``,B=``,V=``,H=``,ie=``,U=``,ae=``,oe=``,se=``,ce=``,W=!0,G=null,le=!1,ue=!1,de=!1,fe=null,pe=0,me=e=>{let r=e.name,m=r.indexOf(`:`);if(m!==-1&&(r=r.slice(m+1)),pe++,pe%196608==0&&a?.(pe),j){let t=e.attributes;switch(r){case`v`:l=!0;break;case`f`:switch(d=!0,t.t??null){case null:case`normal`:break;case`shared`:let e=t.si;p=t.ref,f=e;break;case`array`:p=t.ref,E=p;break;case`datatable`:p=t.ref,d=!0}let e=t.ca;e!==void 0&&(ee=e===`1`);break;case`is`:D=!0;return}D&&!d&&o?.onOpenTag?.(e);return}if(c){if(r===`c`){j=e;let t=e.attributes,n=t.r;k=i.AddressUtils.fastStringToCol(n);let r=t.t;r===void 0?M=null:(M=r,M===`str`&&(D=!0));let a=t.s;a===void 0&&(fe!==null||de)&&(a=`0`),a!==void 0&&(a=parseInt(a),G&&G.value===a&&G.colEnd+1===k?G.colEnd=k:(G={colStart:k,rowStart:O,colEnd:k,rowEnd:O,value:a},u.push(G))),E=null,T=!1;let o=t.cm;w=o!==void 0&&(e=>{let t=s?.get(`metadata`)?.cells;if(!t)return!1;let n=parseInt(e,10);return!(!Number.isFinite(n)||n<1)&&!0===t[n-1]?.get(`XLDAPR`)?.fDynamic})(o);let c=t.vm;if(c!==void 0){let e=v[parseInt(c)-1];if(i.FormulaError.isError(e)){let t=e.getCode();A={t:`e`,v:t},w&&t===i.FormulaError.Code.Spill&&(T=!0)}}}}else{if(ue&&r===`row`){c=!0;let t=e.attributes.r;if(O=parseInt(t)-1,P=0,I=e.attributes.customHeight,I!==void 0&&(P|=ke.CustomHeight),I!==ie&&(W=!0,ie=I),F=e.attributes.ht,F!==void 0&&(P|=ke.Ht),F!==H&&(W=!0,H=F),L=e.attributes.hidden,L!==void 0&&(P|=ke.Hidden),L!==U&&(W=!0,U=L),z=e.attributes.s,z!==void 0&&(P|=ke.S),z!==oe&&(W=!0,oe=z),R=e.attributes.customFormat,R!==void 0&&(P|=ke.CustomFormat),R!==ae&&(W=!0,ae=R),B=e.attributes.outlineLevel,B!==void 0&&(P|=ke.OutlineLevel),B!==se&&(W=!0,se=B),V=e.attributes.collapsed,V!==void 0&&(P|=ke.Collapsed),V!==ce&&(W=!0,ce=V),P!==0)if(N+1!==O||W){let e=I!==void 0&&(I===`1`||I===`true`),t=R!==void 0&&(R===`1`||R===`true`);fe=t&&z!==void 0?z:null,t&&fe===null&&(fe=`0`),re={min:O,max:O,value:{sz:F===void 0?-1:parseFloat(F),csz:e,h:L!==void 0&&(L===`1`||L===`true`),s:fe===null?void 0:fe===`0`?0:parseInt(fe),l:B===void 0||B===`0`?0:parseInt(B),cl:V!==void 0&&(V===`1`||V===`true`)}},ne.push(re)}else re.max=O;N=O,W=!1;return}if(r===`sheetData`&&(ue=!0),!le&&r===`sheetData`){le=!0;let e=t.cols,n=e?e.length:0;for(let t=0;!de&&t<n;t++)e[t].v.s&&(de=!0)}n?.onOpenTag?.(e)}},he=t=>{let r=t.name;if(r===`sheetData`&&(ue=!1),!d||r!==`c`&&r!==`f`||(f&&(h=S.get(f)??null),h&&(x.append(O,k,h),ee&&te.append(O,k)),E!==null&&C.push([E,w?T?`error`:`dynamic`:`fixed`]),d=!1,h=null,f=null,p=null,l=!1,ee=!1,E=null,w=!1,T=!1),j){let n=r.indexOf(`:`);if(n!==-1&&(r=r.slice(n+1)),D)if(r===`is`||r===`v`){let t=o?.onEnd?.();t!=null&&e.pushAt(O,k,``+t)}else r!==`f`&&o?.onCloseTag?.(t);l&&=!1,r===`c`&&(j=null,D=!1);return}if(c)return c=!1,void(G=null);n?.onCloseTag?.(t)},ge=a=>{let s=a.trim();if(l){switch(A=null,M){case null:case`n`:A=parseFloat(s);break;case`b`:A=s===`1`||s===`true`;break;case`s`:A=s;break;case`e`:if(s===`#VALUE!`){let e=j.attributes.vm;if(e!==void 0){let t=v[parseInt(e)-1];if(i.FormulaError.isError(t)){A={t:`e`,v:t.getCode()};break}}}let e=i.FormulaError.getBuiltInByLabel(s);e?A={t:`e`,v:e.getCode()}:(A=s,r?.(`Unknown formula error '${s}' in cell ${i.AddressUtils.cellToString({colIndex:k,rowIndex:O})}`));break;case`str`:case`inlineStr`:D=!0}A!==null&&e.pushAt(O,k,A)}if(f){if(g===f)h=_;else{if(h=S.get(f)??null,!h){let e=[];m=b(s,O,k,e),h=[m,e,s],S.set(f,h)}g=f,_=h}f=null}if(d){if(y!==null){let e=(e=>{if(e.length<ye.length||e.slice(0,ye.length).toUpperCase()!==be)return Se;let t=we(e,ye.length);if(t===null||e.charCodeAt(t.end)!==41||e.charCodeAt(t.end+1)!==44||e.charCodeAt(e.length-1)!==41)return Se;let n=t.value;return n.toUpperCase()===xe?Ce:n.length===0?Se:{kind:`formula`,formula:n}})(s);e.kind!==`none`&&y.push({sheet:t,rowIndex:O,colIndex:k,formula:e.kind===`formula`?e.formula:null})}let e=[];m=b(s,O,k,e),h=[m,e,s]}D?o?.onText?.(a):c||n?.onText?.(s)},K={r:void 0,t:void 0,s:void 0,cm:void 0,vm:void 0},_e={name:`c`,attributes:K,isSelfClosing:!1},J={t:void 0,si:void 0,ref:void 0,ca:void 0},Y={name:`f`,attributes:J,isSelfClosing:!1},X={name:`v`,attributes:{},isSelfClosing:!1},Z={r:void 0,s:void 0,ht:void 0,hidden:void 0,collapsed:void 0,customHeight:void 0,customFormat:void 0,outlineLevel:void 0},ve={name:`row`,attributes:Z,isSelfClosing:!1},Q=q.NEED_MORE,$=q.NOT_HANDLED,Te=q.decodeText,Ee=!1,De=(e,t,n,r)=>{for(;;){let i=0;for(;t<n&&((i=e.charCodeAt(t))===32||i===9||i===10||i===13);)t++;if(t>=n)return Q;if(i===62)return Ee=!1,t+1;if(i===47)return t+1>=n?Q:e.charCodeAt(t+1)===62?(Ee=!0,t+2):$;let a=t;for(;t<n&&(i=e.charCodeAt(t))!==61;){if(i===62||i===47||i===32||i===9||i===10||i===13)return $;t++}if(t+1>=n)return Q;let o=t-a,s=e.charCodeAt(t+1);if(s!==34&&s!==39)return $;let c=t+2,l=c;for(;l<n&&(i=e.charCodeAt(l))!==s;){if(i===38||i<32)return $;l++}if(l>=n)return Q;t=l+1;let u=e.charCodeAt(a);if(r===2)switch(o){case 1:u===114?Z.r=e.slice(c,l):u===115&&(Z.s=e.slice(c,l));break;case 2:e.startsWith(`ht`,a)&&(Z.ht=e.slice(c,l));break;case 6:e.startsWith(`hidden`,a)&&(Z.hidden=e.slice(c,l));break;case 9:e.startsWith(`collapsed`,a)&&(Z.collapsed=e.slice(c,l));break;case 12:e.startsWith(`customHeight`,a)?Z.customHeight=e.slice(c,l):e.startsWith(`customFormat`,a)?Z.customFormat=e.slice(c,l):e.startsWith(`outlineLevel`,a)&&(Z.outlineLevel=e.slice(c,l))}else if(r===0)o===1?u===114?K.r=e.slice(c,l):u===116?K.t=e.slice(c,l):u===115&&(K.s=e.slice(c,l)):o===2&&e.charCodeAt(a+1)===109&&(u===99?K.cm=e.slice(c,l):u===118&&(K.vm=e.slice(c,l)));else if(o===1)u===116&&(J.t=e.slice(c,l));else if(o===2){let t=e.charCodeAt(a+1);u===115&&t===105?J.si=e.slice(c,l):u===99&&t===97&&(J.ca=e.slice(c,l))}else o===3&&e.startsWith(`ref`,a)&&(J.ref=e.slice(c,l))}},Oe=(e,t,n)=>e.charCodeAt(t+1)===47&&e.charCodeAt(t+2)===n&&e.charCodeAt(t+3)===62;return{...n,onEnd:()=>{ne.length>0&&(t.rows=i.AddressUtils.runsToRefs(ne,!1));let r=x.done(Ae),a=r.length;if(a>0){let e=Array(a);for(let t=0;t<a;t++){let n=r[t],a=i.AddressUtils.rangeToString(n),o=n.value[1];e[t]=[a,i.AddressUtils.resolveRelativeToA1(o,n.rowStart,n.colStart)]}t.formulas=e}let o=te.done(!0),s=o.length;if(s>0){let e=Array(s);for(let t=0;t<s;t++){let n=o[t];e[t]=i.AddressUtils.rangeToString(n)}t.volatile=e}C.length>0&&(t.formulaArray=[...C]);let c=u.length;if(c>0){u.sort(i.CoordUtils.createRangeComparator(i.IRange.Axis.Column));let e=u[0],n=e.colStart,r=e.colEnd,a=e.rowEnd,o=e.value,s=[];s.push(e);let l=null;for(let t=1;t<c;t++)l=u[t],o!==l.value||n!==l.colStart||r!==l.colEnd||a+1!==l.rowEnd?(s.push(l),e=l,n=e.colStart,r=e.colEnd,a=e.rowEnd,o=e.value):(a=l.rowEnd,e.rowEnd=a);let d=s.length,f=Array(d);for(let e=0;e<d;e++){let t=s[e];f[e]=[i.AddressUtils.rangeToString(t),t.value]}t.directStyles=f}let l=e.build();l&&(t.data=l.tuples),n?.onEnd?.()},onOpenTag:me,onCloseTag:he,onText:ge,elementScanners:[{name:`c`,scan:(e,t,n)=>{if(!c||j!==null)return $;K.r=K.t=K.s=K.cm=K.vm=void 0;let r=De(e,t+2,n,0);if(r<0)return r;let i=K.t;if(K.r===void 0||i===`str`||i===`inlineStr`)return $;let a=!1,o=-1,s=-1,l=-1,u=-1,d=r;if(!Ee)for(J.t=J.si=J.ref=J.ca=void 0;;){let t=e.indexOf(`<`,r);if(t===-1||t+3>=n)return Q;for(let n=r;n<t;n++){let t=e.charCodeAt(n);if(t!==32&&t!==9&&t!==10&&t!==13)return $}let i=e.charCodeAt(t+1),c=e.charCodeAt(t+2);if(i===47){if(!Oe(e,t,99))return $;d=t+4;break}if(i===102&&!a&&l===-1&&(c===32||c===62||c===47)){if(a=!0,r=De(e,t+2,n,1),r<0)return r;if(Ee)continue;let i=e.indexOf(`<`,r);if(i===-1||i+3>=n)return Q;if(!Oe(e,i,102))return $;o=r,s=i,r=i+4;continue}if(i===118&&c===62&&l===-1){let i=e.indexOf(`<`,t+3);if(i===-1||i+3>=n)return Q;if(!Oe(e,i,118))return $;l=t+3,u=i,r=i+4;continue}return $}return me(_e),a&&(me(Y),s>o&&ge(Te(e.slice(o,s))),he(Y)),l!==-1&&(me(X),u>l&&ge(Te(e.slice(l,u))),he(X)),he(_e),d}},{name:`row`,openTag:ve,scan:(e,t,n)=>{if(!ue||c||j!==null)return $;Z.r=Z.s=Z.ht=Z.hidden=Z.collapsed=Z.customHeight=Z.customFormat=Z.outlineLevel=void 0;let r=De(e,t+4,n,2);return r<0?r:Ee||Z.r===void 0?$:(me(ve),r)}}]}},Ne=e=>{let t=e.indexOf(`:`);return t===-1?e:e.slice(t+1)},Pe={"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet.main+xml":`workbooks`,"application/vnd.ms-excel.sheet.macroEnabled.main+xml":`workbooks`,"application/vnd.ms-excel.sheet.binary.macroEnabled.main":`workbooks`,"application/vnd.ms-excel.addin.macroEnabled.main+xml":`workbooks`,"application/vnd.openxmlformats-officedocument.spreadsheetml.template.main+xml":`workbooks`,"application/vnd.openxmlformats-officedocument.spreadsheetml.worksheet+xml":`sheets`,"application/vnd.ms-excel.worksheet":`sheets`,"application/vnd.openxmlformats-officedocument.spreadsheetml.chartsheet+xml":`charts`,"application/vnd.ms-excel.chartsheet":`charts`,"application/vnd.ms-excel.macrosheet+xml":`macros`,"application/vnd.ms-excel.macrosheet":`macros`,"application/vnd.openxmlformats-officedocument.spreadsheetml.dialogsheet+xml":`dialogs`,"application/vnd.ms-excel.dialogsheet":`dialogs`,"application/vnd.openxmlformats-officedocument.spreadsheetml.sharedStrings+xml":`strs`,"application/vnd.ms-excel.sharedStrings":`strs`,"application/vnd.openxmlformats-officedocument.spreadsheetml.styles+xml":`styles`,"application/vnd.ms-excel.styles":`styles`,"application/vnd.openxmlformats-package.core-properties+xml":`coreprops`,"application/vnd.openxmlformats-officedocument.custom-properties+xml":`custprops`,"application/vnd.openxmlformats-officedocument.extended-properties+xml":`extprops`,"application/vnd.openxmlformats-officedocument.spreadsheetml.comments+xml":`comments`,"application/vnd.ms-excel.comments":`comments`,"application/vnd.ms-excel.threadedcomments+xml":`threadedcomments`,"application/vnd.ms-excel.person+xml":`people`,"application/vnd.openxmlformats-officedocument.spreadsheetml.sheetMetadata+xml":`metadata`,"application/vnd.ms-excel.sheetMetadata":`metadata`,"application/vnd.ms-excel.externalLink":`links`,"application/vnd.openxmlformats-officedocument.spreadsheetml.externalLink+xml":`links`,"application/vnd.openxmlformats-officedocument.theme+xml":`themes`},Fe=e=>e.startsWith(`/`)?e.slice(1):e,Ie=/^xl\/(worksheets|chartsheets)\/[^/]+\.xml$/i,Le=e=>typeof e==`string`?e:(e?.runs??[]).map(e=>e.text??``).join(``);exports.readXLSX=async(a,c)=>{let{password:l,onVBA:u,profile:d,calcOnLoad:f=`auto`,createWorkbookOptions:p={},...m}=c??{},h=!!p.origin&&typeof p.origin!=`string`,g=d?new s(typeof d==`function`?d:void 0):null,_=[],v=(e,t,n)=>{_.push([e,t??``,n])},y={onWarning:v},b=c?.progress,x=b?.onProgress?b.onProgress.bind(b):void 0,S=a.byteLength,C=0,w=0,T=x?e=>{if(C<=0)return;w+=e;let t=Math.min(S,Math.round(w/C*S));x(t,S)}:void 0,E=Promise.resolve().then(()=>require("./sNZR19Wk-XQ2xZ9E.cjs")),ee=null;try{ee=new DOMParser}catch{}let te=null;try{te=new XMLSerializer}catch{}let D,O,k,A=null;ee||(A=Promise.resolve().then(()=>e.r(require("./CIpMN7SDVREKQUQE.cjs").default,1)));try{let[e,t]=await Promise.all([A,E]);D=new t.DOMTransformer,O=ee??new e.DOMParser,k=te??new e.XMLSerializer}catch(e){throw Error(`Unable to load XLSX parser.`,{cause:e})}let j=e=>k.serializeToString(e),M;try{M=await o.create(a)}catch(e){throw new r.ExpectedError(`Unable to parse as an Excel document. Try to save as '.xlsx' and try again.`,{cause:e})}g?.mark(`zip-open`);try{if(!M.has(`[Content_Types].xml`))throw new r.ExpectedError(`Unable to parse as an Excel document. Try to save as '.xlsx' and try again.`);let e=e=>{let t=M.getEntry(e);return t?{content:t}:void 0},a={workbooks:[],sheets:[],charts:[],dialogs:[],macros:[],strs:[],comments:[],threadedcomments:[],links:[],coreprops:[],extprops:[],custprops:[],themes:[],styles:[],metadata:[],people:[],overrides:{},sst:``,style:``,defaults:{}};{let e=((e,t)=>({onOpenTag:t=>{let n=(e=>{let t=e.indexOf(`:`);return t===-1?e:e.slice(t+1)})(t.name),r=t.attributes;if(n===`Override`){let t=r.ContentType,n=r.PartName;if(!t||!n)return;e.overrides[n.startsWith(`/`)?n.slice(1):n]=t;let i=Pe[t],a=i?e[i]:void 0;Array.isArray(a)&&a.push(n)}else if(n===`Default`){let t=r.Extension,n=r.ContentType;t&&(e.defaults[t.toLowerCase()]=n)}},onEnd:()=>{e.sst=e.strs.length>0?e.strs[0]:``,e.style=e.styles.length>0?e.styles[0]:``},onError:e=>{t?.(`Error parsing content types: ${e?.message??e}`)}}))(a,e=>{_.push([e,`[Content_Types].xml`])}),t=await M.getTextStream(`[Content_Types].xml`);if(!t)throw Error(`Error parsing content types: '[Content_Types].xml'`);try{await G.parseStream(t,e,{xmlns:!1})}catch(e){throw Error(`Error parsing content types: '[Content_Types].xml'`,{cause:e})}h&&await M.getBuffer(`[Content_Types].xml`)}g?.mark(`content-types`);let o=a.sst,s=new Set;for(let e of a.sheets)s.add(Fe(e));o&&s.add(Fe(o));for(let e of s)C+=M.uncompressedSize(e);if(await M.prefetch(e=>!s.has(e)&&!Ie.test(e)),g?.mark(`prefetch-side-parts`),a.workbooks.length===0){let t=n.l(`_rels/.rels`,e,O,D,y);if(t){for(let e of t.values())if(e.type===`http://schemas.openxmlformats.org/officeDocument/2006/relationships/officeDocument`&&e.target){a.workbooks.push(e.target);break}}}if(a.workbooks.length===0)throw new r.ExpectedError(`Unable to parse as an Excel document. Try to save as '.xlsx' and try again.`);a.richstructure=[`/xl/richData/rdrichvaluestructure.xml`],a.richdata=[`/xl/richData/rdrichvalue.xml`];let c=p?.resources??new i.ResourceCollection,l=c.beginPersist(),m={},w=new Set,E=new Map;E.set(`richTypes`,[]),E.set(`parseInlineDxf`,e=>{if(!e)return;let n=O.parseFromString(`<dxf xmlns:x14="${t.it}" xmlns:xm="${t.at}">${e}</dxf>`,`text/xml`)?.documentElement;if(!n)return;let r=D.parseDxf(n,``,y);return Object.keys(r).length>0?r:void 0});let ee=[];E.set(`dummyWrapped`,ee);let te=n.f(`metadata`,a,e,O,D,y).entries().next()?.value?.[1]?.metadata;te&&E.set(`metadata`,te),E.set(De,t.R());let k=new Map,A=[],ne=new Set,re=e=>{ne.add(Fe(e))},N=(t,r=k)=>{let i=t.lastIndexOf(`/`),a=t.substring(0,i+1)+`_rels/`+t.substring(i+1,t.length)+`.rels`,o=r.get(a);return o||(o=n.l(a,e,O,D,U),r.set(a,o)),o},P=(r,i,a,o=k)=>{let s=N(i,o).get(r),u=s?.target;if(!u)return null;if(s.targetMode===`External`){if(!a)return s.target;let e=c.add({source:{external:s.target}});return e.addReference(m),w.add(e),l.toResourceId(e)}let d=i.lastIndexOf(`/`),f=i.substring(0,d+1);u.startsWith(`/`)||(u=f+u),u=n.h(u);let p=D?.getVisitorParamsState().get(`dxfs`),h=o.get(u);if(!h)if(s.type===`http://schemas.openxmlformats.org/officeDocument/2006/relationships/worksheet`){let e={};h=e,A.push((async()=>{let n=Oe(e,(e,t)=>t===`legacyDrawing`?L(e,u):t===`part`?R(e,u):P(e,u,t===`resource`)??null,W,p,()=>{},(e,t,n)=>{v(e,t?`${t} (${u})`:u,n)},void 0,E),r=await M.getTextStream(u,T);if(r)try{await G.parseStream(r,n,{xmlns:!1,lean:!0})}catch(e){throw Error(`Error parsing sheet: '${u}'`,{cause:e})}let i=N(u,o);if(i){I(e,u,i,o);let n=[];i.forEach((e,r)=>{if(e.type!==`http://schemas.openxmlformats.org/officeDocument/2006/relationships/pivotTable`)return;let i=R(r,u,e.type,e=>e!==`http://schemas.openxmlformats.org/officeDocument/2006/relationships/pivotCacheDefinition`);if(!i?.xml)return;let a=/<pivotTableDefinition\b[^>]*>/.exec(i.xml)?.[0]??``,o=parseInt(/\scacheId="(\d+)"/.exec(a)?.[1]??``,10);if(isNaN(o))return void _.push([`Pivot table '${i.name}' names no cache and was dropped.`,u]);let s=/\sname="([^"]*)"/.exec(a)?.[1];n.push({...s?{name:t.H(s)}:{},cacheId:o,part:i})}),n.length>0&&(e.pivotTables=n)}})())}else if(s.type===`http://schemas.openxmlformats.org/officeDocument/2006/relationships/externalLink`){let t=n.d(u,e,O,D,U);if(t&&Object.keys(t).length!==0){let e=t,n=e.__bookRelId,r=e.__absoluteUrlRelId;delete e.__bookRelId,delete e.__absoluteUrlRelId;let i=[];N(u,o)?.forEach((e,t)=>{if(e.targetMode===`External`&&e.type&&e.target){let a={type:e.type,target:e.target};t===n?a.role=`book`:t===r&&(a.role=`absoluteUrl`),i.push(a)}}),i.sort((e,t)=>(e.role===`book`?0:1)-(t.role===`book`?0:1)),e.sources=i,re(u),h=e}else h=null}else h=a?n.u(u,e,(e,t)=>{let n=c.add({source:{buffer:e}});return n.addReference(m),w.add(n),l.toResourceId(n)},U):n.d(u,e,O,D,U);return h},F=(e,t)=>{if(!e)return null;let r=N(t,k)?.get(e);if(!r?.target||r.targetMode===`External`)return null;let i=r.target;return i.startsWith(`/`)||(i=t.substring(0,t.lastIndexOf(`/`)+1)+i),n.h(i)},I=(e,a,o,s)=>{let c=[],l=new Map,u=[];o.forEach((e,t)=>{if(e.type!==`http://schemas.microsoft.com/office/2017/10/relationships/threadedComment`)return;let n=P(t,a,!1,s)?.comments;if(!n)return;for(let e=0;e<n.length;e++){let t=n[e];if(!t?.v?.id)continue;let{parentId:r,done:i,content:a,...o}=t.v,s={...o,content:Le(a)};r?u.push({parentId:r,json:s}):(i&&(s.done=!0),l.set(s.id,s),c.push({r:t.r,v:s}))}let r=F(t,a);r&&re(r)});for(let e=0;e<u.length;e++){let{parentId:t,json:n}=u[e],r=l.get(t);r&&(r.replies??=[]).push(n)}let d=[];if(o.forEach((e,t)=>{if(e.type!==`http://schemas.openxmlformats.org/officeDocument/2006/relationships/comments`)return;let i=P(t,a,!1,s),o=i?.comments;if(!o)return;let c=i?.authors;for(let e=0;e<o.length;e++){let t=o[e];if(!t?.r)continue;let i=c&&t.v.authorId!==void 0?c[t.v.authorId]:void 0;if(i&&i.startsWith(`tc=`)){if(l.has(n.m(i.substring(3))))continue;i=void 0}let a={id:r.CommonUtils.uuidV4().toUpperCase(),asNote:!0,content:t.v.content??``},s=i?ie({displayName:i}):void 0;s&&(a.personId=s.id),d.push({r:t.r,v:a})}let u=F(t,a);u&&re(u)}),c.length===0&&d.length===0)return;let f=[...c,...d],p=e.legacyDrawing;if(p?.xml){let{rest:n,notes:r}=t.s(p.xml);if(r.length>0){let a=new Map;for(let e=0;e<r.length;e++){let t=r[e];a.set(i.AddressUtils.cellToString({rowIndex:t.row,colIndex:t.col}),t)}for(let e=0;e<f.length;e++){let t=f[e],n=a.get(String(t.r).toUpperCase());n&&(t.v.box={xml:n.xml},a.delete(String(t.r).toUpperCase()))}let o=[];a.forEach(e=>{o.push(e.xml)});let s=t.i(n,o);s?p.xml=s:delete e.legacyDrawing}}e.comments=f},L=(t,n)=>{let r=F(t,n);if(!r)return null;let i=e(Fe(r));if(!i)return null;let a={xml:new TextDecoder(`utf-8`).decode(i.content)},o=[];return N(r,k)?.forEach((e,t)=>{if(e.type!==`http://schemas.openxmlformats.org/officeDocument/2006/relationships/image`)return;let n=P(t,r,!0);typeof n==`number`&&o.push({id:t,resId:n})}),o.length>0&&(a.images=o),re(r),a},R=(t,n,r,i,o=new Set)=>{let s=F(t,n);if(!s||o.has(s))return null;let c=r??N(n,k)?.get(t)?.type;if(!c)return null;let l=e(Fe(s));if(!l)return null;o.add(s);let u=s.substring(s.lastIndexOf(`/`)+1),d=a.overrides[Fe(s)]??a.defaults[u.substring(u.lastIndexOf(`.`)+1).toLowerCase()],f={id:t,type:c,name:u};if(d&&(f.contentType=d),((e,t)=>e?e.endsWith(`+xml`)||e===`application/xml`:/\.(xml|rels|vml)$/i.test(t))(d,u))f.xml=new TextDecoder(`utf-8`).decode(l.content);else{let e=P(t,n,!0);if(typeof e!=`number`)return null;f.resId=e}let p=[];return N(s,k)?.forEach((e,t)=>{if(!e?.type||i&&!i(e.type))return;if(e.targetMode===`External`){let n=P(t,s,!0);typeof n==`number`&&p.push({id:t,type:e.type,resId:n});return}let n=R(t,s,e.type,i,o);n&&p.push(n)}),p.length>0&&(f.parts=p),re(s),f};n.f(`coreprops`,a,e,O,D,y),n.f(`extprops`,a,e,O,D,y);let z=new Map,B=new Map,V=n.f(`people`,a,e,O,D,y),H=null;if(V.size>0){let[e,t]=V.entries().next().value;if(H=t?.persons,re(e),H){let e=H.length;for(let t=0;t<e;t++){let e=H[t];z.set(e.id,e),e.displayName!==void 0&&B.set(e.displayName,e)}}}let ie=e=>{if(!e)return;if(e.id&&z.has(e.id))return z.get(e.id);let t=e.displayName;if(!e.id){if(t){let e=B.get(t);if(e)return e}e.id=r.CommonUtils.uuidV4()}let n=z.get(e.id);if(n)return n;let i=e;return z.set(e.id,i),t&&B.set(t,i),H||=[],H.push(i),i},U={paramMap:E,getRefs:N,getRef:P,parsedRefs:k,readEmbeddedPart:(e,t)=>R(e,t),addPerson:ie,serializeElement:j,onWarning:v},ae=[];if(o){let e=await M.getTextStream(o,T);if(e){let n=((e,n)=>{let r=!1,i=!1,a=0,o=``;return{onOpenTag:e=>{let t=Ne(e.name);t===`t`?r&&a===0&&(i=!0):t===`si`?(r=!0,o=``,a=0):t!==`rPh`&&t!==`phoneticPr`||a++},onText:e=>{i&&(o+=e)},onCloseTag:n=>{let s=Ne(n.name);s===`t`?i=!1:s===`si`?(e(t.T(o)),r=!1,o=``):s!==`rPh`&&s!==`phoneticPr`||a>0&&a--},onError:e=>{n?.(`Error parsing shared strings: ${e?.message??e}`)}}})(e=>{ae.push(e)},e=>{v(e,o)});try{await G.parseStream(e,n,{xmlns:!1})}catch(e){throw Error(`Error parsing shared strings: '${o}'`,{cause:e})}}}g?.mark(`shared-strings`);let oe=ae.length,se=new Map,ce=oe,W=e=>{let t=se.get(e);if(t!==void 0)return t;let n=ce;return se.set(e,ce++),ae.push(e),n},le=[];a.slicersCache=le;let ue=M.getNames(),de=ue.length;for(let e=0;e<de;e++){let t=ue[e];t&&t.startsWith(`xl/slicerCache`)&&le.push(`/${t}`)}let fe=n.f(`slicersCache`,a,e,O,D,U),pe=new Map;fe.forEach(e=>{let t=e.name;delete e.name,pe.set(t,e)}),E.set(`slicerCaches`,pe),n.f(`richstructure`,a,e,O,D,U),n.f(`richdata`,a,e,O,D,U);let me=n.f(`themes`,a,e,O,D,U),he=null;if(me&&me.entries){let e=me.entries().next();e?.value?.[1]&&(he=e.value[1])}let ge=new i.Theme(he),K=n.f(`styles`,a,e,O,D,U).entries().next()?.value?.[1];K&&=JSON.parse(r.BufferUtils.JSONStableStringify(K));let _e=n.f(`workbooks`,a,e,O,D,U);g?.mark(`side-parts-json`),await Promise.all(A);{let e=_e.entries().next().value?.[1],n=t.R(e?.names),r=e?.sheets??[];for(let e=0;e<r.length;e++){let i=r[e]?.sheet;i&&t.z(i,n)}let i=e?.names;if(i)for(let e=0;e<i.length;e++){let t=i[e]?.ref;typeof t==`string`&&(i[e].ref=n.readDetached(t))}}x&&C>0&&(x(S,S),await new Promise(e=>setTimeout(e,0))),g?.mark(`sheets`);let q={..._e.entries().next().value?.[1],styles:K,theme:ge.toJSON()};n.n(q,E.get(n.t)),q.calc={...q.calc??{},legacyIntersect:!0},ae.length>0&&(q.strings=ae),H&&H.length>0&&(q.people=H);let J=M.getEntry(`xl/vbaProject.bin`);if(J)try{let{VBAProject:e}=await Promise.resolve().then(()=>require("./D3EWCPfCu-qMOIGd.cjs")),t=e.extract(J);if(t){let n=new Map;for(let e of q.sheets??[]){let t=e?.sheet?.codeName;t&&n.set(t,e.sheet)}for(let r of t.modules){let t={language:`vba`},{header:i,body:a}=e.splitAttributes(r.code);a&&(t.source=a),i&&(t.sourceHeader=i);let o=r.type===`document`?n.get(r.name):void 0;o||r.type!==`document`||(t.scope=`workbook`);let s=o?o.modules??={}:q.modules??={};s[r.name]||(s[r.name]=t)}u?.(t)}else _.push([`Unable to parse VBA project.`,`xl/vbaProject.bin`])}catch(e){_.push([`Error extracting VBA: ${e?.message??e}`,`xl/vbaProject.bin`])}let Y=E.get(`calcId`),X=Y===void 0||!(Number(Y)>=191029),Z=p.calcOnLoad??(f===`auto`&&X?`full`:f),ve={...p,calcOnLoad:Z,resources:c,json:q};ve.disableLoadAutoFit===void 0&&(ve.disableLoadAutoFit=!1),g?.mark(`json-assembled`);let Q=new i.Workbook(ve);if(g?.mark(`workbook-constructed`),ee.length>0&&Z!==`none`){await Q.whenCalculationReady();let e=new Map,t=q.sheets??[],n=Q.getSheets().getItems();for(let r=0;r<t.length;r++){let i=t[r]?.sheet,a=n[r];i&&a&&e.set(i,a)}((e,t,n)=>{if(t.length===0)return;let r=e.getCalculation().getFunctions(),i=new Map,a=e=>{let t=i.get(e);return t===void 0&&(t=r.getByName(e)!==null,i.set(e,t)),t},o=new Map;for(let e of t){let t=o.get(e.sheet);t||(t=[],o.set(e.sheet,t)),t.push(e)}for(let[e,t]of o){let r=n.get(e);if(!r)continue;let i=(e,t)=>`${e},${t}`,o=new Set;for(let e of t)e.formula===null&&o.add(i(e.rowIndex,e.colIndex));for(let e of t){if(e.formula===null)continue;let t=Te(e.formula),n=!0;for(let e of t)if(!a(e)){n=!1;break}if(!n)continue;let s=[],c=[[e.rowIndex,e.colIndex]],l=new Set([i(e.rowIndex,e.colIndex)]);for(;c.length>0;){let[e,t]=c.pop(),n=[[e+1,t],[e-1,t],[e,t+1],[e,t-1]];for(let[e,t]of n){let n=i(e,t);!l.has(n)&&o.has(n)&&(l.add(n),s.push([e,t]),c.push([e,t]))}}for(let[e,t]of s)o.delete(i(e,t)),r.getRange({rowStart:e,colStart:t,rowEnd:e,colEnd:t}).clear();r.getRange({rowStart:e.rowIndex,colStart:e.colIndex,rowEnd:e.rowIndex,colEnd:e.colIndex}).setValue(`=`+e.formula)}}})(Q,ee,e)}if(w.forEach(e=>{e.deleteReference(m)}),l.endPersist(),h){t.F(Q);let e=new Map,n=0;for(let t of M.getNames()){let r=M.getEntry(t);if(!r)continue;let i=M.getRawEntry(t),a=i?{data:r,uncompressedSize:M.uncompressedSize(t),raw:{compressedData:i.data,compressionMethod:i.compressionMethod,signature:i.signature}}:{data:r,uncompressedSize:M.uncompressedSize(t)};e.set(t,a),n+=r.byteLength}if(n>67108864)_.push([`Source package too large to retain (${n} bytes, limit ${t.M}); unmodeled parts will be dropped on save.`,`SourcePackage`]);else if(e.size>0){let n=new t.N(e,ne);t.I(Q,n);let r=Q.getSheets().getItems(),i=Q.getTransactions().addListener({onCommitEnd:e=>{let t=e.getOperation()?.name;t!==`insertCells`&&t!==`deleteCells`||n.markStructuralChange()}}),a=Q.addListeners({onSheetsChange:()=>{let e=Q.getSheets().getItems();(e.length!==r.length||e.some((e,t)=>e!==r[t]))&&n.markStructuralChange(),r=e}});Q.addListeners({onClose:()=>{i(),a(),t.F(Q)}})}}if(_.length&&b?.onWarning){let e=new Set;for(let t of _){let[n,r,i]=t,a=i??n;e.has(a)||(e.add(a),b.onWarning(n,r))}}return g&&!0===d&&console.table(g.toTable()),Q}catch(e){let t=`Unable to parse XLSX.`;throw e instanceof i.OutOfBoundsError&&(t=`Unable to open XLSX. There are too many rows or columns.`),Error(t,{cause:e})}finally{await M.close().catch(()=>{})}};
|