ooxml-core 1.19.2 → 1.20.0
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/README.md +12 -1
- package/dist/{PptxHandler-2V4PQL6O.mjs → PptxHandler-FYD7IYXT.mjs} +2 -2
- package/dist/PptxHandler-SITN3K3F.mjs +4 -0
- package/dist/{PptxHandler-6TNIQ7S5.cjs → PptxHandler-TEKISCJO.cjs} +3 -3
- package/dist/{PresentationBuilder-HQ6C7L4V.mjs → PresentationBuilder-EYI6Z2JP.mjs} +2 -2
- package/dist/{PresentationBuilder-G7MPEGXJ.mjs → PresentationBuilder-IMB4DVRN.mjs} +2 -2
- package/dist/{PresentationBuilder-RM52LCVN.cjs → PresentationBuilder-NCKASKXU.cjs} +5 -5
- package/dist/automation/index.cjs +257 -30
- package/dist/automation/index.mjs +256 -31
- package/dist/automation/xlsx-read.d.ts +56 -0
- package/dist/automation/xlsx-read.d.ts.map +1 -0
- package/dist/automation/xlsx.d.ts +105 -4
- package/dist/automation/xlsx.d.ts.map +1 -1
- package/dist/{chunk-M6GDBVQ7.mjs → chunk-GQYQQ3GA.mjs} +1 -1
- package/dist/{chunk-SLNQNVQM.mjs → chunk-LEV2SVMK.mjs} +1 -1
- package/dist/{chunk-JUABSM7C.mjs → chunk-LVM3IZJ2.mjs} +1 -1
- package/dist/{chunk-TJPUAUWL.mjs → chunk-MN27HKHM.mjs} +8 -194
- package/dist/{chunk-4FTUAD2B.mjs → chunk-MNXKRXFB.mjs} +715 -200
- package/dist/{chunk-R5FIHHGB.cjs → chunk-NXKATFM5.cjs} +1598 -1204
- package/dist/{chunk-ZJ2OKIJN.mjs → chunk-WXY5EDGT.mjs} +592 -198
- package/dist/index.cjs +25 -0
- package/dist/index.mjs +25 -0
- package/dist/pptx/automation/index.cjs +887 -453
- package/dist/pptx/automation/index.d.ts +2 -2
- package/dist/pptx/automation/index.mjs +5 -5
- package/dist/pptx/chunks/{index-Bqm-jFG-.d.ts → index-CgFX0T7b.d.ts} +7573 -7508
- package/dist/pptx/chunks/index-CgFX0T7b.d.ts.map +1 -0
- package/dist/pptx/chunks/{index-B9x557hr.d.ts → index-qwVYoFn6.d.ts} +2 -2
- package/dist/pptx/chunks/{index-B9x557hr.d.ts.map → index-qwVYoFn6.d.ts.map} +1 -1
- package/dist/pptx/cli/index.cjs +654 -221
- package/dist/pptx/cli/index.mjs +4 -4
- package/dist/pptx/converter/index.d.ts +1 -1
- package/dist/pptx/converter/index.mjs +2 -2
- package/dist/pptx/editor/render/find-replace.cjs +14 -14
- package/dist/pptx/editor/render/find-replace.d.ts +1 -1
- package/dist/pptx/editor/render/find-replace.mjs +1 -1
- package/dist/pptx/editor/render/slide-operations.cjs +8 -8
- package/dist/pptx/editor/render/slide-operations.mjs +2 -2
- package/dist/pptx/index.cjs +991 -619
- package/dist/pptx/index.d.ts +3 -3
- package/dist/pptx/index.mjs +5 -5
- package/dist/visio/index.cjs +61 -7
- package/dist/visio/index.mjs +61 -7
- package/dist/visio/ui/contract.d.ts +2 -1
- package/dist/visio/ui/contract.d.ts.map +1 -1
- package/dist/visio/ui/index.cjs +62 -7
- package/dist/visio/ui/index.mjs +62 -7
- package/dist/xlsx/edit/dimensions.d.ts.map +1 -1
- package/dist/xlsx/edit/history-rows.d.ts +7 -0
- package/dist/xlsx/edit/history-rows.d.ts.map +1 -0
- package/dist/xlsx/edit/history.d.ts +11 -1
- package/dist/xlsx/edit/history.d.ts.map +1 -1
- package/dist/xlsx/edit/outline.d.ts.map +1 -1
- package/dist/xlsx/edit/row-autofit.d.ts.map +1 -1
- package/dist/xlsx/index.cjs +90 -16
- package/dist/xlsx/index.mjs +90 -16
- package/dist/xlsx/load/index.cjs +61 -7
- package/dist/xlsx/load/index.mjs +61 -7
- package/dist/xlsx/numfmt/format.d.ts +8 -0
- package/dist/xlsx/numfmt/format.d.ts.map +1 -1
- package/dist/xlsx/read/sheet-data-source.d.ts.map +1 -1
- package/dist/xlsx/ui/index.cjs +138 -16
- package/dist/xlsx/ui/index.d.ts +1 -0
- package/dist/xlsx/ui/index.d.ts.map +1 -1
- package/dist/xlsx/ui/index.mjs +138 -17
- package/dist/xlsx/ui/selection-format.d.ts +13 -0
- package/dist/xlsx/ui/selection-format.d.ts.map +1 -0
- package/dist/xml/index.cjs +25 -0
- package/dist/xml/index.mjs +25 -0
- package/dist/xml/lite.d.ts.map +1 -1
- package/package.json +1 -1
- package/dist/PptxHandler-HSPKEP5E.mjs +0 -4
- package/dist/pptx/chunks/index-Bqm-jFG-.d.ts.map +0 -1
- /package/dist/{chunk-NYTR4UZ5.cjs → chunk-3IENHIFD.cjs} +0 -0
- /package/dist/{chunk-XTSHZGSM.mjs → chunk-CC5UNZOO.mjs} +0 -0
|
@@ -236,6 +236,12 @@ function parseLiteFragment(xml, container, namespaces) {
|
|
|
236
236
|
}
|
|
237
237
|
if (lt < 0) break;
|
|
238
238
|
const next = source2.charCodeAt(lt + 1);
|
|
239
|
+
if (next === 33) {
|
|
240
|
+
const after = skipCommentOrCdata(source2, lt, top);
|
|
241
|
+
if (after < 0) return void 0;
|
|
242
|
+
pos = after;
|
|
243
|
+
continue;
|
|
244
|
+
}
|
|
239
245
|
if (next === 47) {
|
|
240
246
|
const gt = source2.indexOf(">", lt);
|
|
241
247
|
if (gt < 0 || stack2.length < 2 || source2.slice(lt + 2, gt).trimEnd() !== top.tagName)
|
|
@@ -256,6 +262,25 @@ function parseLiteFragment(xml, container, namespaces) {
|
|
|
256
262
|
}
|
|
257
263
|
return stack2.length === 1 ? root : void 0;
|
|
258
264
|
}
|
|
265
|
+
var DECLARATIONS = /<!DOCTYPE|<!ENTITY/i;
|
|
266
|
+
function skipCommentOrCdata(source2, lt, parent) {
|
|
267
|
+
if (source2.startsWith("<!--", lt)) {
|
|
268
|
+
const end = source2.indexOf("-->", lt + 4);
|
|
269
|
+
if (end < 0) return -1;
|
|
270
|
+
const body = source2.slice(lt + 4, end);
|
|
271
|
+
if (body.includes("--") || body.endsWith("-") || DECLARATIONS.test(body)) return -1;
|
|
272
|
+
return end + 3;
|
|
273
|
+
}
|
|
274
|
+
if (source2.startsWith("<![CDATA[", lt)) {
|
|
275
|
+
const end = source2.indexOf("]]>", lt + 9);
|
|
276
|
+
if (end < 0) return -1;
|
|
277
|
+
const text8 = source2.slice(lt + 9, end);
|
|
278
|
+
if (DECLARATIONS.test(text8)) return -1;
|
|
279
|
+
parent.childNodes.push(text8);
|
|
280
|
+
return end + 3;
|
|
281
|
+
}
|
|
282
|
+
return -1;
|
|
283
|
+
}
|
|
259
284
|
function startTag(source2, from, namespaces) {
|
|
260
285
|
const n = source2.length;
|
|
261
286
|
let i2 = from;
|
|
@@ -23716,6 +23741,37 @@ function formatValue(value3, format5, options2 = {}) {
|
|
|
23716
23741
|
function isDateFormat(format5) {
|
|
23717
23742
|
return compileFormat(format5).isDate;
|
|
23718
23743
|
}
|
|
23744
|
+
var DAY_PARTS = /* @__PURE__ */ new Set([
|
|
23745
|
+
"y",
|
|
23746
|
+
"yyyy",
|
|
23747
|
+
"e",
|
|
23748
|
+
"g",
|
|
23749
|
+
"b",
|
|
23750
|
+
"bbbb",
|
|
23751
|
+
"m",
|
|
23752
|
+
"mm",
|
|
23753
|
+
"mmm",
|
|
23754
|
+
"mmmm",
|
|
23755
|
+
"mmmmm",
|
|
23756
|
+
"d",
|
|
23757
|
+
"dd",
|
|
23758
|
+
"ddd",
|
|
23759
|
+
"dddd"
|
|
23760
|
+
]);
|
|
23761
|
+
function dateTimeParts(format5, value3) {
|
|
23762
|
+
const section3 = chooseSection(compileFormat(format5), value3)?.section;
|
|
23763
|
+
if (section3?.kind !== "date") return void 0;
|
|
23764
|
+
let date2 = false;
|
|
23765
|
+
let time = false;
|
|
23766
|
+
for (const token of section3.tokens) {
|
|
23767
|
+
if (token.t === "elapsed") return void 0;
|
|
23768
|
+
if (token.t === "date") {
|
|
23769
|
+
if (DAY_PARTS.has(token.part)) date2 = true;
|
|
23770
|
+
else time = true;
|
|
23771
|
+
} else if (token.t === "ampm" || token.t === "subsec") time = true;
|
|
23772
|
+
}
|
|
23773
|
+
return date2 || time ? { date: date2, time } : void 0;
|
|
23774
|
+
}
|
|
23719
23775
|
|
|
23720
23776
|
// xlsx/numfmt/input-date.ts
|
|
23721
23777
|
var MONTH_NAMES = [
|
|
@@ -29669,21 +29725,50 @@ function rootNamespaces(xml) {
|
|
|
29669
29725
|
for (const match2 of (root[2] ?? "").matchAll(DECLARATION3)) out[match2[1] ?? ""] = match2[3] ?? "";
|
|
29670
29726
|
return out;
|
|
29671
29727
|
}
|
|
29728
|
+
var SPECIAL = /<[!?]/g;
|
|
29729
|
+
var SECTIONS = [
|
|
29730
|
+
["<!--", "-->"],
|
|
29731
|
+
["<![CDATA[", "]]>"],
|
|
29732
|
+
["<?", "?>"]
|
|
29733
|
+
];
|
|
29734
|
+
function blankComments(xml) {
|
|
29735
|
+
if (!xml.includes("<!--") && !xml.includes("<![CDATA[")) return xml;
|
|
29736
|
+
const pieces = [];
|
|
29737
|
+
let copied = 0;
|
|
29738
|
+
SPECIAL.lastIndex = 0;
|
|
29739
|
+
for (let match2 = SPECIAL.exec(xml); match2; match2 = SPECIAL.exec(xml)) {
|
|
29740
|
+
const at2 = match2.index;
|
|
29741
|
+
const section3 = SECTIONS.find(([open2]) => xml.startsWith(open2, at2));
|
|
29742
|
+
if (!section3) return void 0;
|
|
29743
|
+
const [open, close4] = section3;
|
|
29744
|
+
const end = xml.indexOf(close4, at2 + open.length);
|
|
29745
|
+
if (end < 0) return void 0;
|
|
29746
|
+
const after = end + close4.length;
|
|
29747
|
+
if (open !== "<?") {
|
|
29748
|
+
pieces.push(xml.slice(copied, at2), " ".repeat(after - at2));
|
|
29749
|
+
copied = after;
|
|
29750
|
+
}
|
|
29751
|
+
SPECIAL.lastIndex = after;
|
|
29752
|
+
}
|
|
29753
|
+
pieces.push(xml.slice(copied));
|
|
29754
|
+
return pieces.join("");
|
|
29755
|
+
}
|
|
29672
29756
|
function splitSheetData(xml) {
|
|
29673
|
-
|
|
29674
|
-
|
|
29675
|
-
const
|
|
29757
|
+
const plain5 = blankComments(xml);
|
|
29758
|
+
if (plain5 === void 0) return void 0;
|
|
29759
|
+
const namespaces = rootNamespaces(plain5);
|
|
29760
|
+
const open = OPEN.exec(plain5);
|
|
29676
29761
|
if (!namespaces || !open) return void 0;
|
|
29677
29762
|
const prefix3 = (open[1] ?? "").slice(0, -1);
|
|
29678
29763
|
const ns = namespaces[prefix3];
|
|
29679
29764
|
if (prefix3 && ns === void 0) return void 0;
|
|
29680
29765
|
const tagName2 = `${open[1] ?? ""}sheetData`;
|
|
29681
|
-
const openEnd =
|
|
29766
|
+
const openEnd = plain5.indexOf(">", open.index);
|
|
29682
29767
|
if (openEnd < 0) return void 0;
|
|
29683
|
-
const attributes =
|
|
29768
|
+
const attributes = plain5.slice(open.index + tagName2.length + 1, openEnd);
|
|
29684
29769
|
if (attributes.trimEnd().endsWith("/") || attributes.includes("xmlns")) return void 0;
|
|
29685
|
-
const close4 =
|
|
29686
|
-
if (close4 < 0 || OPEN.test(
|
|
29770
|
+
const close4 = plain5.indexOf(`</${tagName2}`, openEnd);
|
|
29771
|
+
if (close4 < 0 || OPEN.test(plain5.slice(openEnd))) return void 0;
|
|
29687
29772
|
const container = new LiteElement(tagName2, "sheetData", ns || null);
|
|
29688
29773
|
const data = parseLiteFragment(xml.slice(openEnd + 1, close4), container, namespaces);
|
|
29689
29774
|
if (!data) return void 0;
|
|
@@ -49024,7 +49109,7 @@ function setColumnWidth(ctx, s, cols, width, measure2) {
|
|
|
49024
49109
|
ctx.run(
|
|
49025
49110
|
"Column width",
|
|
49026
49111
|
"view",
|
|
49027
|
-
[{ kind: "
|
|
49112
|
+
[{ kind: "parts", sheet: s, parts: ["columns"] }],
|
|
49028
49113
|
() => editColumns(sheet, cols, (info) => {
|
|
49029
49114
|
const next = widths.get(info.min);
|
|
49030
49115
|
if (next === void 0) {
|
|
@@ -49059,7 +49144,7 @@ function setRowHeight(ctx, s, rows, height) {
|
|
|
49059
49144
|
ctx.run(
|
|
49060
49145
|
"Row height",
|
|
49061
49146
|
"view",
|
|
49062
|
-
[{ kind: "
|
|
49147
|
+
[{ kind: "rowInfo", sheet: s, rows }],
|
|
49063
49148
|
() => {
|
|
49064
49149
|
for (const row3 of rows) {
|
|
49065
49150
|
const info = { ...sheet.rowInfo.get(row3) };
|
|
@@ -49089,7 +49174,9 @@ function setHidden(ctx, s, axis, indices, hidden) {
|
|
|
49089
49174
|
ctx.run(
|
|
49090
49175
|
`${hidden ? "Hide" : "Unhide"} ${noun}`,
|
|
49091
49176
|
"view",
|
|
49092
|
-
[
|
|
49177
|
+
[
|
|
49178
|
+
axis === "col" ? { kind: "parts", sheet: s, parts: ["columns"] } : { kind: "rowInfo", sheet: s, rows: indices }
|
|
49179
|
+
],
|
|
49093
49180
|
() => {
|
|
49094
49181
|
if (axis === "col") {
|
|
49095
49182
|
editColumns(sheet, indices, (info) => {
|
|
@@ -49683,6 +49770,19 @@ function shiftEdgeCells(sheet, spec2, phase) {
|
|
|
49683
49770
|
return out;
|
|
49684
49771
|
}
|
|
49685
49772
|
|
|
49773
|
+
// xlsx/edit/history-rows.ts
|
|
49774
|
+
function captureRowInfo(sheet, rows) {
|
|
49775
|
+
return [...new Set(rows)].map((row3) => {
|
|
49776
|
+
const info = sheet.rowInfo.get(row3);
|
|
49777
|
+
return [row3, info && structuredClone(info)];
|
|
49778
|
+
});
|
|
49779
|
+
}
|
|
49780
|
+
function restoreRowInfo(sheet, entries) {
|
|
49781
|
+
for (const [row3, info] of entries)
|
|
49782
|
+
if (info) sheet.rowInfo.set(row3, structuredClone(info));
|
|
49783
|
+
else sheet.rowInfo.delete(row3);
|
|
49784
|
+
}
|
|
49785
|
+
|
|
49686
49786
|
// xlsx/edit/history.ts
|
|
49687
49787
|
var SETTING_KEYS = [
|
|
49688
49788
|
"structureLocked",
|
|
@@ -49767,6 +49867,8 @@ function captureScope(workbook, scope, before) {
|
|
|
49767
49867
|
if (!sheet) throw new RangeError(`No sheet at index ${scope.sheet}`);
|
|
49768
49868
|
if (scope.kind === "sheet")
|
|
49769
49869
|
return { kind: "sheet", sheet: scope.sheet, data: structuredClone(sheet) };
|
|
49870
|
+
if (scope.kind === "rowInfo")
|
|
49871
|
+
return { kind: "rowInfo", sheet: scope.sheet, rows: captureRowInfo(sheet, scope.rows) };
|
|
49770
49872
|
if (scope.kind === "parts") {
|
|
49771
49873
|
const data = {};
|
|
49772
49874
|
for (const part of scope.parts) if (sheet[part] !== void 0) data[part] = sheet[part];
|
|
@@ -49818,6 +49920,7 @@ function restoreSnapshot(workbook, snapshot) {
|
|
|
49818
49920
|
}
|
|
49819
49921
|
const sheet = workbook.sheets[snapshot.sheet];
|
|
49820
49922
|
if (!sheet) return;
|
|
49923
|
+
if (snapshot.kind === "rowInfo") return restoreRowInfo(sheet, snapshot.rows);
|
|
49821
49924
|
if (snapshot.kind === "parts") {
|
|
49822
49925
|
const target2 = sheet;
|
|
49823
49926
|
const data = structuredClone(snapshot.data);
|
|
@@ -52427,12 +52530,13 @@ function span2(from, to) {
|
|
|
52427
52530
|
}
|
|
52428
52531
|
function outlineRows(ctx, s, from, to, delta) {
|
|
52429
52532
|
const sheet = sheetAt(ctx.workbook, s);
|
|
52533
|
+
const rows = span2(from, to);
|
|
52430
52534
|
ctx.run(
|
|
52431
52535
|
delta > 0 ? "Group rows" : "Ungroup rows",
|
|
52432
52536
|
"structure",
|
|
52433
|
-
[{ kind: "
|
|
52537
|
+
[{ kind: "rowInfo", sheet: s, rows }],
|
|
52434
52538
|
() => {
|
|
52435
|
-
for (const row3 of
|
|
52539
|
+
for (const row3 of rows) {
|
|
52436
52540
|
const info = { ...sheet.rowInfo.get(row3) };
|
|
52437
52541
|
const level2 = nextLevel(info.outlineLevel, delta);
|
|
52438
52542
|
if (level2) info.outlineLevel = level2;
|
|
@@ -52452,7 +52556,7 @@ function outlineColumns(ctx, s, from, to, delta) {
|
|
|
52452
52556
|
ctx.run(
|
|
52453
52557
|
delta > 0 ? "Group columns" : "Ungroup columns",
|
|
52454
52558
|
"structure",
|
|
52455
|
-
[{ kind: "
|
|
52559
|
+
[{ kind: "parts", sheet: s, parts: ["columns"] }],
|
|
52456
52560
|
() => editColumns(sheet, span2(from, to), (info) => {
|
|
52457
52561
|
const level2 = nextLevel(info.outlineLevel, delta);
|
|
52458
52562
|
if (level2) info.outlineLevel = level2;
|
|
@@ -52475,7 +52579,7 @@ function setDefaultColumnWidth(ctx, s, width) {
|
|
|
52475
52579
|
ctx.run(
|
|
52476
52580
|
"Standard width",
|
|
52477
52581
|
"format",
|
|
52478
|
-
[{ kind: "
|
|
52582
|
+
[{ kind: "parts", sheet: s, parts: ["defaultColWidth"] }],
|
|
52479
52583
|
() => {
|
|
52480
52584
|
if (width === void 0) Reflect.deleteProperty(sheet, "defaultColWidth");
|
|
52481
52585
|
else sheet.defaultColWidth = width;
|
|
@@ -55049,10 +55153,11 @@ function autoGrowRows(ctx, s, rows, measure2 = approximateMeasure) {
|
|
|
55049
55153
|
updates.push([row3, next]);
|
|
55050
55154
|
}
|
|
55051
55155
|
if (!updates.length) return [];
|
|
55156
|
+
const changed = updates.map(([row3]) => row3);
|
|
55052
55157
|
ctx.run(
|
|
55053
55158
|
"Row height",
|
|
55054
55159
|
"view",
|
|
55055
|
-
[{ kind: "
|
|
55160
|
+
[{ kind: "rowInfo", sheet: s, rows: changed }],
|
|
55056
55161
|
() => {
|
|
55057
55162
|
for (const [row3, height] of updates) {
|
|
55058
55163
|
const info = { ...sheet.rowInfo.get(row3) };
|
|
@@ -55064,7 +55169,7 @@ function autoGrowRows(ctx, s, rows, measure2 = approximateMeasure) {
|
|
|
55064
55169
|
},
|
|
55065
55170
|
{ sheet: s, structural: true }
|
|
55066
55171
|
);
|
|
55067
|
-
return
|
|
55172
|
+
return changed;
|
|
55068
55173
|
}
|
|
55069
55174
|
var MAX_REFIT_ROWS = 1e4;
|
|
55070
55175
|
function rowsToRefit(sheet, ranges) {
|
|
@@ -55820,11 +55925,84 @@ function createEditSession(workbook, options2 = {}) {
|
|
|
55820
55925
|
};
|
|
55821
55926
|
}
|
|
55822
55927
|
|
|
55928
|
+
// automation/xlsx-read.ts
|
|
55929
|
+
var INSPECT_LIST_LIMIT = 500;
|
|
55930
|
+
function sheetSummaries(workbook) {
|
|
55931
|
+
return workbook.sheets.map((sheet, index3) => {
|
|
55932
|
+
const used = usedRange(sheet);
|
|
55933
|
+
const omitted2 = sheet.tables.length - INSPECT_LIST_LIMIT;
|
|
55934
|
+
return {
|
|
55935
|
+
index: index3,
|
|
55936
|
+
name: sheet.name,
|
|
55937
|
+
state: sheet.state,
|
|
55938
|
+
usedRange: used ? formatRange(used) : null,
|
|
55939
|
+
rows: used ? used.end.row - used.start.row + 1 : 0,
|
|
55940
|
+
columns: used ? used.end.col - used.start.col + 1 : 0,
|
|
55941
|
+
tables: sheet.tables.slice(0, INSPECT_LIST_LIMIT).map((table4) => ({
|
|
55942
|
+
name: table4.displayName,
|
|
55943
|
+
range: formatRange(table4.range),
|
|
55944
|
+
headerRow: table4.headerRow,
|
|
55945
|
+
totalsRow: table4.totalsRow
|
|
55946
|
+
})),
|
|
55947
|
+
...omitted2 > 0 ? { tablesOmitted: omitted2 } : {}
|
|
55948
|
+
};
|
|
55949
|
+
});
|
|
55950
|
+
}
|
|
55951
|
+
function definedNameList(workbook) {
|
|
55952
|
+
const visible = workbook.definedNames.filter((name3) => !name3.hidden);
|
|
55953
|
+
const definedNames = visible.slice(0, INSPECT_LIST_LIMIT).map((name3) => ({
|
|
55954
|
+
name: name3.name,
|
|
55955
|
+
refersTo: name3.formula,
|
|
55956
|
+
...name3.localSheet === void 0 ? {} : { sheetIndex: name3.localSheet }
|
|
55957
|
+
}));
|
|
55958
|
+
const omitted2 = visible.length - INSPECT_LIST_LIMIT;
|
|
55959
|
+
return omitted2 > 0 ? { definedNames, definedNamesOmitted: omitted2 } : { definedNames };
|
|
55960
|
+
}
|
|
55961
|
+
function isoOf(serial, date1904, shows2) {
|
|
55962
|
+
if (!(serial >= 0) || serial > MAX_DATE_SERIAL + 1) return void 0;
|
|
55963
|
+
if (!date1904 && serial >= 60 && serial < 61) return void 0;
|
|
55964
|
+
const date2 = serialToDate(serial, date1904);
|
|
55965
|
+
if (date2.getUTCFullYear() > 9999) return void 0;
|
|
55966
|
+
const iso = date2.toISOString();
|
|
55967
|
+
const time = iso.slice(11, iso.endsWith(".000Z") ? 19 : 23);
|
|
55968
|
+
if (serial < 1 && (!date1904 || !shows2.date)) return time;
|
|
55969
|
+
return Number.isInteger(serial) && !shows2.time ? iso.slice(0, 10) : `${iso.slice(0, 10)}T${time}`;
|
|
55970
|
+
}
|
|
55971
|
+
function cellView2(workbook, cell) {
|
|
55972
|
+
const value3 = cell?.value ?? null;
|
|
55973
|
+
const text8 = displayText(workbook, cell);
|
|
55974
|
+
const view = cell?.formula ? { value: value3, formula: cell.formula, text: text8 } : { value: value3, text: text8 };
|
|
55975
|
+
const numFmt = styleAt(workbook, cell?.styleId).numFmt;
|
|
55976
|
+
if (numFmt === "General") return view;
|
|
55977
|
+
view.numberFormat = numFmt;
|
|
55978
|
+
const parts = typeof value3 === "number" ? dateTimeParts(numFmt, value3) : void 0;
|
|
55979
|
+
if (parts && typeof value3 === "number") {
|
|
55980
|
+
const iso = isoOf(value3, workbook.date1904, parts);
|
|
55981
|
+
if (iso) view.iso = iso;
|
|
55982
|
+
}
|
|
55983
|
+
return view;
|
|
55984
|
+
}
|
|
55985
|
+
var READ_LIMIT = 1e4;
|
|
55986
|
+
function rangeCells(workbook, sheet, range2) {
|
|
55987
|
+
const count2 = (range2.end.row - range2.start.row + 1) * (range2.end.col - range2.start.col + 1);
|
|
55988
|
+
if (count2 > READ_LIMIT) throw new Error(`Read at most ${READ_LIMIT} cells per request`);
|
|
55989
|
+
const cells3 = [];
|
|
55990
|
+
for (let row3 = range2.start.row; row3 <= range2.end.row; row3++)
|
|
55991
|
+
for (let col = range2.start.col; col <= range2.end.col; col++)
|
|
55992
|
+
cells3.push({
|
|
55993
|
+
address: formatAddress({ row: row3, col }),
|
|
55994
|
+
...cellView2(workbook, getCell(sheet, row3, col))
|
|
55995
|
+
});
|
|
55996
|
+
return cells3;
|
|
55997
|
+
}
|
|
55998
|
+
|
|
55823
55999
|
// automation/xlsx.ts
|
|
55824
56000
|
async function inspectXlsx(bytes) {
|
|
55825
56001
|
const workbook = await loadXlsx(bytes);
|
|
55826
56002
|
return {
|
|
55827
|
-
sheets: workbook
|
|
56003
|
+
sheets: sheetSummaries(workbook),
|
|
56004
|
+
activeSheet: workbook.activeSheet,
|
|
56005
|
+
...definedNameList(workbook),
|
|
55828
56006
|
properties: workbook.properties,
|
|
55829
56007
|
warnings: workbook.warnings
|
|
55830
56008
|
};
|
|
@@ -55847,19 +56025,7 @@ async function readXlsxRange(bytes, sheetIndex2, reference2) {
|
|
|
55847
56025
|
const range2 = parseRange(reference2);
|
|
55848
56026
|
if (!sheet || !range2 || range2.end.col > MAX_COL || range2.end.row > MAX_ROW)
|
|
55849
56027
|
throw new Error("Invalid sheet or range");
|
|
55850
|
-
|
|
55851
|
-
if (count2 > 1e4) throw new Error("Read at most 10000 cells per request");
|
|
55852
|
-
const cells3 = [];
|
|
55853
|
-
for (let row3 = range2.start.row; row3 <= range2.end.row; row3++)
|
|
55854
|
-
for (let col = range2.start.col; col <= range2.end.col; col++) {
|
|
55855
|
-
const cell = getCell(sheet, row3, col);
|
|
55856
|
-
cells3.push({
|
|
55857
|
-
address: formatAddress({ row: row3, col }),
|
|
55858
|
-
value: cell?.value ?? null,
|
|
55859
|
-
formula: cell?.formula
|
|
55860
|
-
});
|
|
55861
|
-
}
|
|
55862
|
-
return { cells: cells3, warnings: workbook.warnings };
|
|
56028
|
+
return { cells: rangeCells(workbook, sheet, range2), warnings: workbook.warnings };
|
|
55863
56029
|
}
|
|
55864
56030
|
async function setXlsxCells(bytes, sheetIndex2, cells3) {
|
|
55865
56031
|
const workbook = await loadXlsx(bytes);
|
|
@@ -55902,6 +56068,65 @@ async function readXlsxFilledCells(bytes, { maxCells = 5e3 } = {}) {
|
|
|
55902
56068
|
warnings: workbook.warnings
|
|
55903
56069
|
};
|
|
55904
56070
|
}
|
|
56071
|
+
async function findXlsxCells(bytes, text8, options2 = {}) {
|
|
56072
|
+
if (!text8) throw new Error("The search text is empty");
|
|
56073
|
+
const max = options2.maxResults ?? 100;
|
|
56074
|
+
if (!Number.isSafeInteger(max) || max < 1 || max > 1e3)
|
|
56075
|
+
throw new Error("Return between 1 and 1000 matches per request");
|
|
56076
|
+
const workbook = await loadXlsx(bytes);
|
|
56077
|
+
const query = { text: text8, lookIn: options2.lookIn ?? "formulas" };
|
|
56078
|
+
const { sheetIndex: sheetIndex2 } = options2;
|
|
56079
|
+
if (sheetIndex2 !== void 0) {
|
|
56080
|
+
if (!Number.isSafeInteger(sheetIndex2) || !workbook.sheets[sheetIndex2])
|
|
56081
|
+
throw new Error("Invalid sheet");
|
|
56082
|
+
query.sheet = sheetIndex2;
|
|
56083
|
+
}
|
|
56084
|
+
if (options2.range !== void 0) {
|
|
56085
|
+
const range2 = parseRange(options2.range);
|
|
56086
|
+
if (sheetIndex2 === void 0) throw new Error("A range needs a sheetIndex");
|
|
56087
|
+
if (!range2) throw new Error("Invalid range");
|
|
56088
|
+
query.range = range2;
|
|
56089
|
+
}
|
|
56090
|
+
if (options2.matchCase) query.matchCase = true;
|
|
56091
|
+
if (options2.wholeCell) query.wholeCell = true;
|
|
56092
|
+
if (options2.wildcards === false) query.wildcards = false;
|
|
56093
|
+
const found = findAll(workbook, query);
|
|
56094
|
+
const matches2 = found.slice(0, max).map((match2) => {
|
|
56095
|
+
const sheet = workbook.sheets[match2.sheet];
|
|
56096
|
+
return {
|
|
56097
|
+
sheetIndex: match2.sheet,
|
|
56098
|
+
sheet: sheet?.name ?? "",
|
|
56099
|
+
address: formatAddress(match2),
|
|
56100
|
+
...cellView2(workbook, sheet && getCell(sheet, match2.row, match2.col))
|
|
56101
|
+
};
|
|
56102
|
+
});
|
|
56103
|
+
return {
|
|
56104
|
+
matches: matches2,
|
|
56105
|
+
total: found.length,
|
|
56106
|
+
truncated: found.length > max,
|
|
56107
|
+
warnings: workbook.warnings
|
|
56108
|
+
};
|
|
56109
|
+
}
|
|
56110
|
+
async function readXlsxTable(bytes, name3) {
|
|
56111
|
+
const workbook = await loadXlsx(bytes);
|
|
56112
|
+
const wanted = name3.toLowerCase();
|
|
56113
|
+
for (const [sheetIndex2, sheet] of workbook.sheets.entries()) {
|
|
56114
|
+
const table4 = sheet.tables.find((t) => t.displayName.toLowerCase() === wanted);
|
|
56115
|
+
if (!table4) continue;
|
|
56116
|
+
return {
|
|
56117
|
+
sheetIndex: sheetIndex2,
|
|
56118
|
+
sheet: sheet.name,
|
|
56119
|
+
name: table4.displayName,
|
|
56120
|
+
range: formatRange(table4.range),
|
|
56121
|
+
headerRow: table4.headerRow,
|
|
56122
|
+
totalsRow: table4.totalsRow,
|
|
56123
|
+
columns: table4.columns.map((column2) => column2.name),
|
|
56124
|
+
cells: rangeCells(workbook, sheet, table4.range),
|
|
56125
|
+
warnings: workbook.warnings
|
|
56126
|
+
};
|
|
56127
|
+
}
|
|
56128
|
+
throw new Error(`No table named ${name3}`);
|
|
56129
|
+
}
|
|
55905
56130
|
|
|
55906
56131
|
// visio/package-common.ts
|
|
55907
56132
|
var VisioPackageError = class extends Error {
|
|
@@ -82490,4 +82715,4 @@ async function createXlsxFromSheets(sheets) {
|
|
|
82490
82715
|
return saveXlsx(workbook);
|
|
82491
82716
|
}
|
|
82492
82717
|
|
|
82493
|
-
export { createDocx, createDocxFromOutline, createXlsx, createXlsxFromSheets, editVsdx as editVisio, inspectDocx, inspectVisio, inspectXlsx, readXlsxFilledCells, readXlsxRange, setDocxRunText, setXlsxCells, suggestDocxRunText };
|
|
82718
|
+
export { createDocx, createDocxFromOutline, createXlsx, createXlsxFromSheets, editVsdx as editVisio, findXlsxCells, inspectDocx, inspectVisio, inspectXlsx, readXlsxFilledCells, readXlsxRange, readXlsxTable, setDocxRunText, setXlsxCells, suggestDocxRunText };
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
import { type CellRange } from '../xlsx/address.js';
|
|
2
|
+
import type { Cell, CellValue, Workbook, Worksheet } from '../xlsx/model.js';
|
|
3
|
+
/** The most tables per sheet, and defined names, that an inspection lists. */
|
|
4
|
+
export declare const INSPECT_LIST_LIMIT = 500;
|
|
5
|
+
/** Each sheet's used range (the cells it stores: values, formulas or formatting), state and tables. */
|
|
6
|
+
export declare function sheetSummaries(workbook: Workbook): {
|
|
7
|
+
index: number;
|
|
8
|
+
name: string;
|
|
9
|
+
state: import("../xlsx/index.js").SheetState;
|
|
10
|
+
usedRange: string | null;
|
|
11
|
+
rows: number;
|
|
12
|
+
columns: number;
|
|
13
|
+
tables: {
|
|
14
|
+
name: string;
|
|
15
|
+
range: string;
|
|
16
|
+
headerRow: boolean;
|
|
17
|
+
totalsRow: boolean;
|
|
18
|
+
}[];
|
|
19
|
+
tablesOmitted?: number;
|
|
20
|
+
}[];
|
|
21
|
+
/** The defined names Excel's Name Manager lists (hidden ones are left out), with their scope. */
|
|
22
|
+
export declare function definedNameList(workbook: Workbook): {
|
|
23
|
+
definedNames: {
|
|
24
|
+
name: string;
|
|
25
|
+
refersTo: string;
|
|
26
|
+
sheetIndex?: number;
|
|
27
|
+
}[];
|
|
28
|
+
definedNamesOmitted: number;
|
|
29
|
+
} | {
|
|
30
|
+
definedNamesOmitted?: never;
|
|
31
|
+
definedNames: {
|
|
32
|
+
name: string;
|
|
33
|
+
refersTo: string;
|
|
34
|
+
sheetIndex?: number;
|
|
35
|
+
}[];
|
|
36
|
+
};
|
|
37
|
+
export interface CellView {
|
|
38
|
+
value: CellValue;
|
|
39
|
+
formula?: string;
|
|
40
|
+
/** The text as the grid displays it, with the cell's number format applied. */
|
|
41
|
+
text: string;
|
|
42
|
+
/** The number format code, absent for General. */
|
|
43
|
+
numberFormat?: string;
|
|
44
|
+
/**
|
|
45
|
+
* The value of a cell shown as a date or time, in ISO 8601 without a time zone; absent for
|
|
46
|
+
* numbers and durations (`[h]:mm`).
|
|
47
|
+
*/
|
|
48
|
+
iso?: string;
|
|
49
|
+
}
|
|
50
|
+
/** A cell's value and formula with its displayed text, number format and ISO date. */
|
|
51
|
+
export declare function cellView(workbook: Workbook, cell: Cell | undefined): CellView;
|
|
52
|
+
/** The cells of `range`, row by row, each with its address and {@link cellView}. */
|
|
53
|
+
export declare function rangeCells(workbook: Workbook, sheet: Worksheet, range: CellRange): ({
|
|
54
|
+
address: string;
|
|
55
|
+
} & CellView)[];
|
|
56
|
+
//# sourceMappingURL=xlsx-read.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"xlsx-read.d.ts","sourceRoot":"","sources":["../../automation/xlsx-read.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,KAAK,SAAS,EAA8B,MAAM,iBAAiB,CAAC;AAG7E,OAAO,KAAK,EAAE,IAAI,EAAE,SAAS,EAAE,QAAQ,EAAE,SAAS,EAAE,MAAM,eAAe,CAAC;AAK1E,8EAA8E;AAC9E,eAAO,MAAM,kBAAkB,MAAM,CAAC;AAEtC,uGAAuG;AACvG,wBAAgB,cAAc,CAAC,QAAQ,EAAE,QAAQ;;;;;;;;;;;;;;IAoBhD;AAED,iGAAiG;AACjG,wBAAgB,eAAe,CAAC,QAAQ,EAAE,QAAQ;;;;;;;;;;;;;;EASjD;AAyBD,MAAM,WAAW,QAAQ;IACxB,KAAK,EAAE,SAAS,CAAC;IACjB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,+EAA+E;IAC/E,IAAI,EAAE,MAAM,CAAC;IACb,kDAAkD;IAClD,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB;;;OAGG;IACH,GAAG,CAAC,EAAE,MAAM,CAAC;CACb;AAED,sFAAsF;AACtF,wBAAgB,QAAQ,CAAC,QAAQ,EAAE,QAAQ,EAAE,IAAI,EAAE,IAAI,GAAG,SAAS,GAAG,QAAQ,CAa7E;AAKD,oFAAoF;AACpF,wBAAgB,UAAU,CAAC,QAAQ,EAAE,QAAQ,EAAE,KAAK,EAAE,SAAS,EAAE,KAAK,EAAE,SAAS;aAGvD,MAAM;gBAQ/B"}
|
|
@@ -1,18 +1,68 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The sheets (index, name, state, used range with its row and column counts, tables), the
|
|
3
|
+
* active sheet, the defined names, the document properties and the loader warnings. Tables per
|
|
4
|
+
* sheet and names are capped at 500 each; `tablesOmitted` and `definedNamesOmitted` count the rest.
|
|
5
|
+
*/
|
|
1
6
|
export declare function inspectXlsx(bytes: Uint8Array): Promise<{
|
|
7
|
+
definedNames: {
|
|
8
|
+
name: string;
|
|
9
|
+
refersTo: string;
|
|
10
|
+
sheetIndex?: number;
|
|
11
|
+
}[];
|
|
12
|
+
definedNamesOmitted: number;
|
|
2
13
|
sheets: {
|
|
3
14
|
index: number;
|
|
4
15
|
name: string;
|
|
16
|
+
state: import("../xlsx/index.js").SheetState;
|
|
17
|
+
usedRange: string | null;
|
|
18
|
+
rows: number;
|
|
19
|
+
columns: number;
|
|
20
|
+
tables: {
|
|
21
|
+
name: string;
|
|
22
|
+
range: string;
|
|
23
|
+
headerRow: boolean;
|
|
24
|
+
totalsRow: boolean;
|
|
25
|
+
}[];
|
|
26
|
+
tablesOmitted?: number;
|
|
5
27
|
}[];
|
|
28
|
+
activeSheet: number;
|
|
29
|
+
properties: import("../xlsx/index.js").WorkbookProperties;
|
|
30
|
+
warnings: string[];
|
|
31
|
+
} | {
|
|
32
|
+
definedNamesOmitted?: never;
|
|
33
|
+
definedNames: {
|
|
34
|
+
name: string;
|
|
35
|
+
refersTo: string;
|
|
36
|
+
sheetIndex?: number;
|
|
37
|
+
}[];
|
|
38
|
+
sheets: {
|
|
39
|
+
index: number;
|
|
40
|
+
name: string;
|
|
41
|
+
state: import("../xlsx/index.js").SheetState;
|
|
42
|
+
usedRange: string | null;
|
|
43
|
+
rows: number;
|
|
44
|
+
columns: number;
|
|
45
|
+
tables: {
|
|
46
|
+
name: string;
|
|
47
|
+
range: string;
|
|
48
|
+
headerRow: boolean;
|
|
49
|
+
totalsRow: boolean;
|
|
50
|
+
}[];
|
|
51
|
+
tablesOmitted?: number;
|
|
52
|
+
}[];
|
|
53
|
+
activeSheet: number;
|
|
6
54
|
properties: import("../xlsx/index.js").WorkbookProperties;
|
|
7
55
|
warnings: string[];
|
|
8
56
|
}>;
|
|
9
57
|
export declare function createXlsx(names: readonly string[]): Promise<Uint8Array>;
|
|
58
|
+
/**
|
|
59
|
+
* The cells of an A1 range (at most 10,000), row by row: value, formula, the text as displayed,
|
|
60
|
+
* the number format (absent for General) and, for dates and times, the value in ISO 8601.
|
|
61
|
+
*/
|
|
10
62
|
export declare function readXlsxRange(bytes: Uint8Array, sheetIndex: number, reference: string): Promise<{
|
|
11
|
-
cells: {
|
|
63
|
+
cells: ({
|
|
12
64
|
address: string;
|
|
13
|
-
|
|
14
|
-
formula: string | undefined;
|
|
15
|
-
}[];
|
|
65
|
+
} & import("./xlsx-read.js").CellView)[];
|
|
16
66
|
warnings: string[];
|
|
17
67
|
}>;
|
|
18
68
|
export declare function setXlsxCells(bytes: Uint8Array, sheetIndex: number, cells: readonly {
|
|
@@ -43,4 +93,55 @@ export declare function readXlsxFilledCells(bytes: Uint8Array, { maxCells }?: {
|
|
|
43
93
|
truncated: boolean;
|
|
44
94
|
warnings: string[];
|
|
45
95
|
}>;
|
|
96
|
+
export interface XlsxFindOptions {
|
|
97
|
+
/** The sheet to search; every sheet when absent. */
|
|
98
|
+
sheetIndex?: number;
|
|
99
|
+
/** An A1 range to search within (needs `sheetIndex`). */
|
|
100
|
+
range?: string;
|
|
101
|
+
/** `formulas` (Excel's default) searches what was typed; `values` the text as displayed. */
|
|
102
|
+
lookIn?: 'formulas' | 'values';
|
|
103
|
+
matchCase?: boolean;
|
|
104
|
+
/** The whole cell content must match. */
|
|
105
|
+
wholeCell?: boolean;
|
|
106
|
+
/** Excel wildcards: `*` any run, `?` one character, `~` escapes. On by default. */
|
|
107
|
+
wildcards?: boolean;
|
|
108
|
+
/** At most this many matches (1 to 1000, default 100); `total` counts them all. */
|
|
109
|
+
maxResults?: number;
|
|
110
|
+
}
|
|
111
|
+
/**
|
|
112
|
+
* The cells matching `text` the way Excel's Find does, sheet by sheet in row order, each with
|
|
113
|
+
* its sheet, address and the same view as a range read. Bounded by `maxResults`.
|
|
114
|
+
*/
|
|
115
|
+
export declare function findXlsxCells(bytes: Uint8Array, text: string, options?: XlsxFindOptions): Promise<{
|
|
116
|
+
matches: {
|
|
117
|
+
value: import("../xlsx/index.js").CellValue;
|
|
118
|
+
formula?: string;
|
|
119
|
+
text: string;
|
|
120
|
+
numberFormat?: string;
|
|
121
|
+
iso?: string;
|
|
122
|
+
sheetIndex: number;
|
|
123
|
+
sheet: string;
|
|
124
|
+
address: string;
|
|
125
|
+
}[];
|
|
126
|
+
total: number;
|
|
127
|
+
truncated: boolean;
|
|
128
|
+
warnings: string[];
|
|
129
|
+
}>;
|
|
130
|
+
/**
|
|
131
|
+
* A table found by name (ignoring case, as Excel does) on any sheet: its sheet, range, header and
|
|
132
|
+
* totals rows, column names and cells as a range read returns them (at most 10,000 cells).
|
|
133
|
+
*/
|
|
134
|
+
export declare function readXlsxTable(bytes: Uint8Array, name: string): Promise<{
|
|
135
|
+
sheetIndex: number;
|
|
136
|
+
sheet: string;
|
|
137
|
+
name: string;
|
|
138
|
+
range: string;
|
|
139
|
+
headerRow: boolean;
|
|
140
|
+
totalsRow: boolean;
|
|
141
|
+
columns: string[];
|
|
142
|
+
cells: ({
|
|
143
|
+
address: string;
|
|
144
|
+
} & import("./xlsx-read.js").CellView)[];
|
|
145
|
+
warnings: string[];
|
|
146
|
+
}>;
|
|
46
147
|
//# sourceMappingURL=xlsx.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"xlsx.d.ts","sourceRoot":"","sources":["../../automation/xlsx.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"xlsx.d.ts","sourceRoot":"","sources":["../../automation/xlsx.ts"],"names":[],"mappings":"AAiBA;;;;GAIG;AACH,wBAAsB,WAAW,CAAC,KAAK,EAAE,UAAU;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GASlD;AAED,wBAAsB,UAAU,CAAC,KAAK,EAAE,SAAS,MAAM,EAAE,GAAG,OAAO,CAAC,UAAU,CAAC,CAW9E;AAED;;;GAGG;AACH,wBAAsB,aAAa,CAAC,KAAK,EAAE,UAAU,EAAE,UAAU,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM;;;;;GAQ3F;AAED,wBAAsB,YAAY,CACjC,KAAK,EAAE,UAAU,EACjB,UAAU,EAAE,MAAM,EAClB,KAAK,EAAE,SAAS;IAAE,OAAO,EAAE,MAAM,CAAC;IAAC,KAAK,EAAE,MAAM,CAAA;CAAE,EAAE;;;GAgBpD;AAED;;;GAGG;AACH,wBAAsB,mBAAmB,CAAC,KAAK,EAAE,UAAU,EAAE,EAAE,QAAe,EAAE;;CAAK;;;;;qBAI3D,MAAM;mBAAS,OAAO;sBAAY,MAAM;;;;;;;GAoBjE;AAED,MAAM,WAAW,eAAe;IAC/B,oDAAoD;IACpD,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,yDAAyD;IACzD,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,4FAA4F;IAC5F,MAAM,CAAC,EAAE,UAAU,GAAG,QAAQ,CAAC;IAC/B,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,yCAAyC;IACzC,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,mFAAmF;IACnF,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,mFAAmF;IACnF,UAAU,CAAC,EAAE,MAAM,CAAC;CACpB;AAED;;;GAGG;AACH,wBAAsB,aAAa,CAClC,KAAK,EAAE,UAAU,EACjB,IAAI,EAAE,MAAM,EACZ,OAAO,GAAE,eAAoB;;;;;;;;;;;;;;GAuC7B;AAED;;;GAGG;AACH,wBAAsB,aAAa,CAAC,KAAK,EAAE,UAAU,EAAE,IAAI,EAAE,MAAM;;;;;;;;;;;;GAmBlE"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { hasTextProperties, isImageLikeElement, blobUrlToDataUrl, getSubstituteFontFamily, stripXmlOrderSuffix } from './chunk-
|
|
1
|
+
import { hasTextProperties, isImageLikeElement, blobUrlToDataUrl, getSubstituteFontFamily, stripXmlOrderSuffix } from './chunk-LEV2SVMK.mjs';
|
|
2
2
|
|
|
3
3
|
// pptx/converter/media-context.ts
|
|
4
4
|
var MIME_TO_EXT = {
|
|
@@ -21818,7 +21818,7 @@ function findTextBearingElementById(elements3, elementId) {
|
|
|
21818
21818
|
}
|
|
21819
21819
|
async function loadNestedDeck(pptxBytes) {
|
|
21820
21820
|
try {
|
|
21821
|
-
const { PptxHandler } = await import('./PptxHandler-
|
|
21821
|
+
const { PptxHandler } = await import('./PptxHandler-FYD7IYXT.mjs');
|
|
21822
21822
|
const handler = new PptxHandler();
|
|
21823
21823
|
const data = await handler.load(pptxBytes.buffer.slice(0));
|
|
21824
21824
|
return { handler, slides: data.slides };
|