@office-kit/pptx 0.24.1 → 0.25.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/CHANGELOG.md +16 -0
- package/README.md +4 -3
- package/dist/{api-BSdL1LrI.js → api-DQMkljVK.js} +681 -254
- package/dist/api-DQMkljVK.js.map +1 -0
- package/dist/{index-WCK8v0WT.d.ts → index-DVqlSlMs.d.ts} +86 -22
- package/dist/index.d.ts +2 -2
- package/dist/index.js +2 -2
- package/dist/node.d.ts +2 -2
- package/dist/node.js +2 -2
- package/package.json +1 -1
- package/dist/api-BSdL1LrI.js.map +0 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { Inflate, inflateSync, strFromU8, zipSync } from "fflate";
|
|
2
2
|
//#region src/api/units.ts
|
|
3
3
|
const EMU_PER_INCH = 914400;
|
|
4
4
|
const EMU_PER_CM = 36e4;
|
|
@@ -1308,7 +1308,7 @@ const PRESET_MATERIALS = [
|
|
|
1308
1308
|
//#region src/internal/drawingml/color.ts
|
|
1309
1309
|
const NAME_SRGB_CLR$4 = qname("a", "srgbClr", NS.dml);
|
|
1310
1310
|
const NAME_SCHEME_CLR$2 = qname("a", "schemeClr", NS.dml);
|
|
1311
|
-
const ATTR_VAL$
|
|
1311
|
+
const ATTR_VAL$13 = qname("", "val", "");
|
|
1312
1312
|
const SCHEME_TOKENS = new Set([
|
|
1313
1313
|
"bg1",
|
|
1314
1314
|
"tx1",
|
|
@@ -1378,7 +1378,7 @@ const parseSrgbHex = (value) => normalizeSrgbHex(value);
|
|
|
1378
1378
|
const buildColorElement = (value) => {
|
|
1379
1379
|
const parsed = parseColor(value);
|
|
1380
1380
|
if (parsed === null) throw new Error(`unrecognized color: ${value}`);
|
|
1381
|
-
return parsed.kind === "srgb" ? elem(NAME_SRGB_CLR$4, { attrs: [attr(ATTR_VAL$
|
|
1381
|
+
return parsed.kind === "srgb" ? elem(NAME_SRGB_CLR$4, { attrs: [attr(ATTR_VAL$13, parsed.hex)] }) : elem(NAME_SCHEME_CLR$2, { attrs: [attr(ATTR_VAL$13, parsed.token)] });
|
|
1382
1382
|
};
|
|
1383
1383
|
/**
|
|
1384
1384
|
* Narrows a color read back from a deck to one that can be written again,
|
|
@@ -1406,7 +1406,7 @@ const editSolidColor = (previous, options) => {
|
|
|
1406
1406
|
if (options.color !== void 0 && previous) color.children = previous.children.filter((child) => child.kind === "element" && isAlpha(child));
|
|
1407
1407
|
if (options.opacity !== void 0) {
|
|
1408
1408
|
color.children = color.children.filter((child) => child.kind !== "element" || !isAlpha(child));
|
|
1409
|
-
color.children.push(elem(qname("a", "alpha", NS.dml), { attrs: [attr(ATTR_VAL$
|
|
1409
|
+
color.children.push(elem(qname("a", "alpha", NS.dml), { attrs: [attr(ATTR_VAL$13, String(Math.round(options.opacity * 1e5)))] }));
|
|
1410
1410
|
}
|
|
1411
1411
|
return color;
|
|
1412
1412
|
};
|
|
@@ -1529,7 +1529,7 @@ const ATTR_SX = qname("", "sx", "");
|
|
|
1529
1529
|
const ATTR_SY = qname("", "sy", "");
|
|
1530
1530
|
const ATTR_KX = qname("", "kx", "");
|
|
1531
1531
|
const ATTR_KY = qname("", "ky", "");
|
|
1532
|
-
const ATTR_VAL$
|
|
1532
|
+
const ATTR_VAL$12 = qname("", "val", "");
|
|
1533
1533
|
const PERCENTAGE_UNITS = 1e5;
|
|
1534
1534
|
const ALPHA_TRANSFORMS = new Set([
|
|
1535
1535
|
"alpha",
|
|
@@ -1626,7 +1626,7 @@ const effectColor = (options, caller) => {
|
|
|
1626
1626
|
base.children = buildColorTransforms(transforms);
|
|
1627
1627
|
if (opacity !== void 0 && (colorTransforms === void 0 || opacity !== colorTransformOpacity(transforms))) {
|
|
1628
1628
|
base.children = base.children.filter((c) => !(c.kind === "element" && ALPHA_TRANSFORMS.has(c.name.localName)));
|
|
1629
|
-
if (opacity >= 0 && opacity < 1) base.children.push(elem(NAME_ALPHA, { attrs: [attr(ATTR_VAL$
|
|
1629
|
+
if (opacity >= 0 && opacity < 1) base.children.push(elem(NAME_ALPHA, { attrs: [attr(ATTR_VAL$12, String(Math.round(opacity * PERCENTAGE_UNITS)))] }));
|
|
1630
1630
|
}
|
|
1631
1631
|
return base;
|
|
1632
1632
|
};
|
|
@@ -2097,7 +2097,7 @@ const clearStroke = (spPr) => {
|
|
|
2097
2097
|
spPr.children = spPr.children.filter((c) => !(c.kind === "element" && c.name.namespaceURI === NS.dml && c.name.localName === "ln"));
|
|
2098
2098
|
};
|
|
2099
2099
|
const NAME_PRST_DASH = qname("a", "prstDash", NS.dml);
|
|
2100
|
-
const ATTR_VAL$
|
|
2100
|
+
const ATTR_VAL$11 = qname("", "val", "");
|
|
2101
2101
|
/**
|
|
2102
2102
|
* Sets `<a:prstDash val="..."/>` inside the shape's `<a:ln>`. Creates
|
|
2103
2103
|
* `<a:ln>` if absent. Replacing the dash choice on subsequent calls.
|
|
@@ -2106,7 +2106,7 @@ const setStrokeDash = (spPr, dash) => {
|
|
|
2106
2106
|
oneOf(dash, LINE_DASHES, "setShapeStrokeDash: dash");
|
|
2107
2107
|
const ln = ensureLn(spPr);
|
|
2108
2108
|
ln.children = ln.children.filter((c) => !(c.kind === "element" && c.name.namespaceURI === NS.dml && c.name.localName === "prstDash"));
|
|
2109
|
-
insertLnChild(ln, elem(NAME_PRST_DASH, { attrs: [attr(ATTR_VAL$
|
|
2109
|
+
insertLnChild(ln, elem(NAME_PRST_DASH, { attrs: [attr(ATTR_VAL$11, dash)] }));
|
|
2110
2110
|
};
|
|
2111
2111
|
const ATTR_TYPE$7 = qname("", "type", "");
|
|
2112
2112
|
const ATTR_LEN = qname("", "len", "");
|
|
@@ -2304,7 +2304,7 @@ const ATTR_NORMALIZE_H = qname("", "normalizeH", "");
|
|
|
2304
2304
|
const ATTR_BASELINE = qname("", "baseline", "");
|
|
2305
2305
|
const ATTR_CAP = qname("", "cap", "");
|
|
2306
2306
|
const ATTR_TYPEFACE$3 = qname("", "typeface", "");
|
|
2307
|
-
const ATTR_VAL$
|
|
2307
|
+
const ATTR_VAL$10 = qname("", "val", "");
|
|
2308
2308
|
const NAME_HIGHLIGHT = qname("a", "highlight", NS.dml);
|
|
2309
2309
|
const NAME_NO_FILL$1 = qname("a", "noFill", NS.dml);
|
|
2310
2310
|
const NAME_BLIP_FILL$2 = qname("a", "blipFill", NS.dml);
|
|
@@ -2451,7 +2451,7 @@ const setSolidFill = (rPr, value, transforms) => {
|
|
|
2451
2451
|
const parsed = parseColor(value);
|
|
2452
2452
|
if (parsed === null) throw new Error(`unrecognized color: ${value}`);
|
|
2453
2453
|
removeAnyFill(rPr);
|
|
2454
|
-
const inner = parsed.kind === "srgb" ? elem(NAME_SRGB_CLR$3, { attrs: [attr(ATTR_VAL$
|
|
2454
|
+
const inner = parsed.kind === "srgb" ? elem(NAME_SRGB_CLR$3, { attrs: [attr(ATTR_VAL$10, parsed.hex)] }) : elem(NAME_SCHEME_CLR$1, { attrs: [attr(ATTR_VAL$10, parsed.token)] });
|
|
2455
2455
|
if (transforms !== void 0) inner.children = buildColorTransforms(transforms);
|
|
2456
2456
|
insertChildByRank(rPr, elem(NAME_SOLID_FILL$4, { children: [inner] }), rprChildRank);
|
|
2457
2457
|
};
|
|
@@ -2487,7 +2487,7 @@ const setUnderlineFill = (rPr, value) => {
|
|
|
2487
2487
|
insertChildByRank(rPr, value === null ? elem(NAME_U_FILL_TX) : (() => {
|
|
2488
2488
|
const parsed = parseColor(value);
|
|
2489
2489
|
if (parsed === null) throw new Error(`unrecognized underline color: ${value}`);
|
|
2490
|
-
return elem(NAME_U_FILL, { children: [elem(NAME_SOLID_FILL$4, { children: [parsed.kind === "srgb" ? elem(NAME_SRGB_CLR$3, { attrs: [attr(ATTR_VAL$
|
|
2490
|
+
return elem(NAME_U_FILL, { children: [elem(NAME_SOLID_FILL$4, { children: [parsed.kind === "srgb" ? elem(NAME_SRGB_CLR$3, { attrs: [attr(ATTR_VAL$10, parsed.hex)] }) : elem(NAME_SCHEME_CLR$1, { attrs: [attr(ATTR_VAL$10, parsed.token)] })] })] });
|
|
2491
2491
|
})(), rprChildRank);
|
|
2492
2492
|
};
|
|
2493
2493
|
const setLatin = (rPr, font) => {
|
|
@@ -2510,7 +2510,7 @@ const setHighlight = (rPr, value) => {
|
|
|
2510
2510
|
if (value === null) return;
|
|
2511
2511
|
const parsed = parseColor(value);
|
|
2512
2512
|
if (parsed === null) throw new Error(`unrecognized highlight color: ${value}`);
|
|
2513
|
-
insertChildByRank(rPr, elem(NAME_HIGHLIGHT, { children: [parsed.kind === "srgb" ? elem(NAME_SRGB_CLR$3, { attrs: [attr(ATTR_VAL$
|
|
2513
|
+
insertChildByRank(rPr, elem(NAME_HIGHLIGHT, { children: [parsed.kind === "srgb" ? elem(NAME_SRGB_CLR$3, { attrs: [attr(ATTR_VAL$10, parsed.hex)] }) : elem(NAME_SCHEME_CLR$1, { attrs: [attr(ATTR_VAL$10, parsed.token)] })] }), rprChildRank);
|
|
2514
2514
|
};
|
|
2515
2515
|
const validateFormatEnums = (format, caller, images) => {
|
|
2516
2516
|
if (format.underline != null && typeof format.underline !== "boolean") oneOf(format.underline, UNDERLINES, `${caller}: underline`);
|
|
@@ -25702,7 +25702,7 @@ const NAME_TX_BODY$11 = qname("p", "txBody", NS.pml);
|
|
|
25702
25702
|
const ATTR_ID$19 = qname("", "id", "");
|
|
25703
25703
|
const ATTR_NAME$16 = qname("", "name", "");
|
|
25704
25704
|
const ATTR_TYPE$6 = qname("", "type", "");
|
|
25705
|
-
const ATTR_IDX$
|
|
25705
|
+
const ATTR_IDX$7 = qname("", "idx", "");
|
|
25706
25706
|
const NV_BY_KIND = {
|
|
25707
25707
|
shape: NAME_NV_SP_PR$5,
|
|
25708
25708
|
picture: NAME_NV_PIC_PR$3,
|
|
@@ -25740,7 +25740,7 @@ const extractShape = (element, kind) => {
|
|
|
25740
25740
|
const ph = firstChildElement(nvPr, NAME_PH$3);
|
|
25741
25741
|
if (ph !== null) {
|
|
25742
25742
|
placeholderType = getAttrValue(ph, ATTR_TYPE$6);
|
|
25743
|
-
const idxRaw = getAttrValue(ph, ATTR_IDX$
|
|
25743
|
+
const idxRaw = getAttrValue(ph, ATTR_IDX$7);
|
|
25744
25744
|
if (idxRaw !== null) placeholderIdx = Number.parseInt(idxRaw, 10);
|
|
25745
25745
|
}
|
|
25746
25746
|
}
|
|
@@ -26122,8 +26122,8 @@ const NAME_FILL_REF$1 = qname("a", "fillRef", NS.dml);
|
|
|
26122
26122
|
const NAME_EFFECT_REF$1 = qname("a", "effectRef", NS.dml);
|
|
26123
26123
|
const NAME_FONT_REF$1 = qname("a", "fontRef", NS.dml);
|
|
26124
26124
|
const NAME_SCHEME_CLR = qname("a", "schemeClr", NS.dml);
|
|
26125
|
-
const ATTR_IDX$
|
|
26126
|
-
const ATTR_VAL$
|
|
26125
|
+
const ATTR_IDX$6 = qname("", "idx", "");
|
|
26126
|
+
const ATTR_VAL$9 = qname("", "val", "");
|
|
26127
26127
|
const ATTR_ID$15 = qname("", "id", "");
|
|
26128
26128
|
const ATTR_NAME$11 = qname("", "name", "");
|
|
26129
26129
|
const ATTR_X$6 = qname("", "x", "");
|
|
@@ -26171,8 +26171,8 @@ const buildConnector = (opts) => {
|
|
|
26171
26171
|
const children = [nvCxnSpPr, elem(NAME_SP_PR$3, { children: spPrChildren })];
|
|
26172
26172
|
if (!hasExplicitLine) {
|
|
26173
26173
|
const styleRef = (name, idx, clr) => elem(name, {
|
|
26174
|
-
attrs: [attr(ATTR_IDX$
|
|
26175
|
-
children: [elem(NAME_SCHEME_CLR, { attrs: [attr(ATTR_VAL$
|
|
26174
|
+
attrs: [attr(ATTR_IDX$6, idx)],
|
|
26175
|
+
children: [elem(NAME_SCHEME_CLR, { attrs: [attr(ATTR_VAL$9, clr)] })]
|
|
26176
26176
|
});
|
|
26177
26177
|
children.push(elem(NAME_STYLE$2, { children: [
|
|
26178
26178
|
styleRef(NAME_LN_REF$1, "1", "accent1"),
|
|
@@ -26441,7 +26441,7 @@ const NAME_SRGB_CLR$2 = qname("a", "srgbClr", NS.dml);
|
|
|
26441
26441
|
const NAME_T$2 = qname("a", "t", NS.dml);
|
|
26442
26442
|
const NAME_PPR = qname("a", "pPr", NS.dml);
|
|
26443
26443
|
const NAME_BU_NONE = qname("a", "buNone", NS.dml);
|
|
26444
|
-
const ATTR_VAL$
|
|
26444
|
+
const ATTR_VAL$8 = qname("", "val", "");
|
|
26445
26445
|
const ATTR_MAR_L = qname("", "marL", "");
|
|
26446
26446
|
const ATTR_MAR_R = qname("", "marR", "");
|
|
26447
26447
|
const ATTR_MAR_T = qname("", "marT", "");
|
|
@@ -26463,7 +26463,7 @@ const ATTR_LANG$2 = qname("", "lang", "");
|
|
|
26463
26463
|
const buildCellRunProps = (textColorHex) => {
|
|
26464
26464
|
const langAttr = attr(ATTR_LANG$2, "en-US");
|
|
26465
26465
|
if (textColorHex === void 0) return elem(NAME_RPR$2, { attrs: [langAttr] });
|
|
26466
|
-
const solidFill = elem(NAME_SOLID_FILL$2, { children: [elem(NAME_SRGB_CLR$2, { attrs: [attr(ATTR_VAL$
|
|
26466
|
+
const solidFill = elem(NAME_SOLID_FILL$2, { children: [elem(NAME_SRGB_CLR$2, { attrs: [attr(ATTR_VAL$8, (textColorHex.startsWith("#") ? textColorHex.slice(1) : textColorHex).toUpperCase())] })] });
|
|
26467
26467
|
return elem(NAME_RPR$2, {
|
|
26468
26468
|
attrs: [langAttr],
|
|
26469
26469
|
children: [solidFill]
|
|
@@ -27378,7 +27378,7 @@ const ATTR_NO_GRP = qname("", "noGrp", "");
|
|
|
27378
27378
|
const ATTR_NO_ROT = qname("", "noRot", "");
|
|
27379
27379
|
const ATTR_NO_CHANGE_ASPECT = qname("", "noChangeAspect", "");
|
|
27380
27380
|
const ATTR_TYPE$3 = qname("", "type", "");
|
|
27381
|
-
const ATTR_IDX$
|
|
27381
|
+
const ATTR_IDX$5 = qname("", "idx", "");
|
|
27382
27382
|
const ATTR_LANG$1 = qname("", "lang", "");
|
|
27383
27383
|
const buildRootGroup = () => {
|
|
27384
27384
|
return elem(NAME_NV_GRP_SP_PR, { children: [
|
|
@@ -27408,7 +27408,7 @@ const buildNotesBodyPlaceholder = (id, notes) => {
|
|
|
27408
27408
|
const nvSpPr = elem(NAME_NV_SP_PR$1, { children: [
|
|
27409
27409
|
elem(NAME_C_NV_PR, { attrs: [attr(ATTR_ID$10, String(id)), attr(ATTR_NAME$7, `Notes Placeholder ${id - 1}`)] }),
|
|
27410
27410
|
elem(NAME_C_NV_SP_PR, { children: [elem(NAME_SP_LOCKS, { attrs: [attr(ATTR_NO_GRP, "1")] })] }),
|
|
27411
|
-
elem(NAME_NV_PR$3, { children: [elem(NAME_PH$1, { attrs: [attr(ATTR_TYPE$3, "body"), attr(ATTR_IDX$
|
|
27411
|
+
elem(NAME_NV_PR$3, { children: [elem(NAME_PH$1, { attrs: [attr(ATTR_TYPE$3, "body"), attr(ATTR_IDX$5, "1")] })] })
|
|
27412
27412
|
] });
|
|
27413
27413
|
const txBody = elem(NAME_TX_BODY$6, { children: [
|
|
27414
27414
|
elem(NAME_BODY_PR$2),
|
|
@@ -28569,7 +28569,7 @@ const ATTR_FROM = qname("", "from", "");
|
|
|
28569
28569
|
const ATTR_TO = qname("", "to", "");
|
|
28570
28570
|
const ATTR_X$2 = qname("", "x", "");
|
|
28571
28571
|
const ATTR_Y$2 = qname("", "y", "");
|
|
28572
|
-
const ATTR_VAL$
|
|
28572
|
+
const ATTR_VAL$7 = qname("", "val", "");
|
|
28573
28573
|
const ATTR_PR_LST = qname("", "prLst", "");
|
|
28574
28574
|
const behavioursOf$1 = (effectCTn) => {
|
|
28575
28575
|
const list = firstChildElement(effectCTn, NAME_CHILD_TN_LST$6);
|
|
@@ -28647,7 +28647,7 @@ const readColor = (host) => {
|
|
|
28647
28647
|
const elements = host.children.filter((c) => c.kind === "element");
|
|
28648
28648
|
const el = elements[0];
|
|
28649
28649
|
if (elements.length !== 1 || el === void 0 || el.name.namespaceURI !== NS.dml) return null;
|
|
28650
|
-
const val = getAttrValue(el, ATTR_VAL$
|
|
28650
|
+
const val = getAttrValue(el, ATTR_VAL$7);
|
|
28651
28651
|
if (val === null) return null;
|
|
28652
28652
|
const base = el.name.localName === "srgbClr" ? asColor(`#${val.toUpperCase()}`) : el.name.localName === "schemeClr" ? asColor(`scheme:${val}`) : null;
|
|
28653
28653
|
if (base === null) return null;
|
|
@@ -28703,7 +28703,7 @@ const readAnimationEmphasisOptions = (effect, effectCTn) => {
|
|
|
28703
28703
|
const set = behaviours.find((b) => isPml$5(b, "set") && attrNameOf$1(b) === "style.opacity");
|
|
28704
28704
|
const to = set === void 0 ? null : firstChildElement(set, NAME_TO$1);
|
|
28705
28705
|
const strVal = to === null ? null : firstChildElement(to, NAME_STR_VAL$1);
|
|
28706
|
-
const raw = strVal === null ? null : getAttrValue(strVal, ATTR_VAL$
|
|
28706
|
+
const raw = strVal === null ? null : getAttrValue(strVal, ATTR_VAL$7);
|
|
28707
28707
|
const opacity = raw === null || !/^\d*\.?\d+$/.test(raw.trim()) ? NaN : Number(raw);
|
|
28708
28708
|
if (!(opacity >= 0 && opacity <= 1)) return null;
|
|
28709
28709
|
return withOptions({ transparencyPercent: Number(((1 - opacity) * PERCENT).toFixed(OPACITY_DIGITS - 2)) });
|
|
@@ -29534,7 +29534,7 @@ const ATTR_CONCURRENT = qname("", "concurrent", "");
|
|
|
29534
29534
|
const ATTR_NEXT_AC = qname("", "nextAc", "");
|
|
29535
29535
|
const ATTR_SPID$3 = qname("", "spid", "");
|
|
29536
29536
|
const ATTR_EVT$2 = qname("", "evt", "");
|
|
29537
|
-
const ATTR_VAL$
|
|
29537
|
+
const ATTR_VAL$6 = qname("", "val", "");
|
|
29538
29538
|
const ATTR_GRP_ID$3 = qname("", "grpId", "");
|
|
29539
29539
|
const ATTR_BUILD$1 = qname("", "build", "");
|
|
29540
29540
|
const ATTR_ANIM_BG = qname("", "animBg", "");
|
|
@@ -29915,7 +29915,7 @@ const setAttrValue = (el, name, value) => {
|
|
|
29915
29915
|
const hidesTarget = (behaviour) => {
|
|
29916
29916
|
const to = firstChildElement(behaviour.element, NAME_TO);
|
|
29917
29917
|
const strVal = to === null ? null : firstChildElement(to, NAME_STR_VAL);
|
|
29918
|
-
return strVal !== null && getAttrValue(strVal, ATTR_VAL$
|
|
29918
|
+
return strVal !== null && getAttrValue(strVal, ATTR_VAL$6) === "hidden";
|
|
29919
29919
|
};
|
|
29920
29920
|
/**
|
|
29921
29921
|
* Retimes an effect to run for `durationMs`, in place: every behaviour's length
|
|
@@ -30109,7 +30109,7 @@ const ATTR_LAST_IDX = qname("", "lastIdx", "");
|
|
|
30109
30109
|
const ATTR_CLR_IDX = qname("", "clrIdx", "");
|
|
30110
30110
|
const ATTR_AUTHOR_ID$1 = qname("", "authorId", "");
|
|
30111
30111
|
const ATTR_DT = qname("", "dt", "");
|
|
30112
|
-
const ATTR_IDX$
|
|
30112
|
+
const ATTR_IDX$4 = qname("", "idx", "");
|
|
30113
30113
|
const ATTR_X$1 = qname("", "x", "");
|
|
30114
30114
|
const ATTR_Y$1 = qname("", "y", "");
|
|
30115
30115
|
const readCommentAuthorList = (root) => {
|
|
@@ -30139,7 +30139,7 @@ const readCommentList = (root) => {
|
|
|
30139
30139
|
const comments = [];
|
|
30140
30140
|
for (const el of allChildElements(root, NAME_CM$1)) {
|
|
30141
30141
|
const authorIdRaw = getAttrValue(el, ATTR_AUTHOR_ID$1);
|
|
30142
|
-
const idxRaw = getAttrValue(el, ATTR_IDX$
|
|
30142
|
+
const idxRaw = getAttrValue(el, ATTR_IDX$4);
|
|
30143
30143
|
const dtVal = getAttrValue(el, ATTR_DT);
|
|
30144
30144
|
if (authorIdRaw === null || idxRaw === null) continue;
|
|
30145
30145
|
const authorId = Number.parseInt(authorIdRaw, 10);
|
|
@@ -30172,7 +30172,7 @@ const readCommentList = (root) => {
|
|
|
30172
30172
|
const identifier = threading && firstChildElement(threading, NAME_PARENT);
|
|
30173
30173
|
if (!identifier) continue;
|
|
30174
30174
|
const author = getAttrValue(identifier, ATTR_AUTHOR_ID$1);
|
|
30175
|
-
const index = getAttrValue(identifier, ATTR_IDX$
|
|
30175
|
+
const index = getAttrValue(identifier, ATTR_IDX$4);
|
|
30176
30176
|
if (author !== null && index !== null && /^\d+$/.test(author) && /^\d+$/.test(index) && Number(author) <= 4294967295 && Number(index) <= 4294967295) parent = {
|
|
30177
30177
|
authorId: Number(author),
|
|
30178
30178
|
idx: Number(index)
|
|
@@ -30220,7 +30220,7 @@ const DEFAULT_COMMENT_POSITION = {
|
|
|
30220
30220
|
y: 0
|
|
30221
30221
|
};
|
|
30222
30222
|
const commentElement = (c) => {
|
|
30223
|
-
const attrs = [attr(ATTR_AUTHOR_ID$1, String(c.authorId)), attr(ATTR_IDX$
|
|
30223
|
+
const attrs = [attr(ATTR_AUTHOR_ID$1, String(c.authorId)), attr(ATTR_IDX$4, String(c.idx))];
|
|
30224
30224
|
if (c.dt !== null) attrs.push(attr(ATTR_DT, c.dt));
|
|
30225
30225
|
const position = c.position ?? DEFAULT_COMMENT_POSITION;
|
|
30226
30226
|
const children = [elem(NAME_POS$1, { attrs: [attr(ATTR_X$1, String(position.x)), attr(ATTR_Y$1, String(position.y))] })];
|
|
@@ -30229,7 +30229,7 @@ const commentElement = (c) => {
|
|
|
30229
30229
|
attrs: [attr(ATTR_URI$2, THREADING_URI)],
|
|
30230
30230
|
children: [elem(NAME_THREADING, {
|
|
30231
30231
|
prefixDecls: new Map([["p15", P15]]),
|
|
30232
|
-
children: [elem(NAME_PARENT, { attrs: [attr(ATTR_AUTHOR_ID$1, String(c.parent.authorId)), attr(ATTR_IDX$
|
|
30232
|
+
children: [elem(NAME_PARENT, { attrs: [attr(ATTR_AUTHOR_ID$1, String(c.parent.authorId)), attr(ATTR_IDX$4, String(c.parent.idx))] })]
|
|
30233
30233
|
})]
|
|
30234
30234
|
})] }));
|
|
30235
30235
|
return elem(NAME_CM$1, {
|
|
@@ -30552,20 +30552,173 @@ const extensionOf = (name) => {
|
|
|
30552
30552
|
* negligible savings.
|
|
30553
30553
|
*/
|
|
30554
30554
|
const shouldStore = (name) => STORE_BY_EXTENSION.has(extensionOf(name));
|
|
30555
|
+
const SIG_LOCAL_HEADER = 67324752;
|
|
30556
|
+
const SIG_CENTRAL_HEADER = 33639248;
|
|
30557
|
+
const SIG_EOCD = 101010256;
|
|
30558
|
+
const SIG_ZIP64_EOCD = 101075792;
|
|
30559
|
+
const SIG_ZIP64_LOCATOR = 117853008;
|
|
30560
|
+
const EOCD_SIZE = 22;
|
|
30561
|
+
const MAX_COMMENT_LENGTH = 65535;
|
|
30562
|
+
const ZIP64_LOCATOR_SIZE = 20;
|
|
30563
|
+
const ZIP64_EOCD_MIN_SIZE = 56;
|
|
30564
|
+
const CENTRAL_HEADER_SIZE = 46;
|
|
30565
|
+
const LOCAL_HEADER_SIZE = 30;
|
|
30566
|
+
const ZIP64_EXTRA_ID = 1;
|
|
30567
|
+
const ZIP64_SENTINEL_32 = 4294967295;
|
|
30568
|
+
const FLAG_UTF8 = 2048;
|
|
30569
|
+
const METHOD_STORE = 0;
|
|
30570
|
+
const METHOD_DEFLATE = 8;
|
|
30571
|
+
const INFLATE_CHUNK_SIZE = 16 * 1024;
|
|
30572
|
+
const MAX_DEFLATE_RATIO = 1032;
|
|
30573
|
+
const DEFLATE_RATIO_SLACK = 1024;
|
|
30574
|
+
const invalid = (reason) => /* @__PURE__ */ new Error(`invalid ZIP: ${reason}`);
|
|
30575
|
+
const u16 = (d, at) => d[at] | d[at + 1] << 8;
|
|
30576
|
+
const u32 = (d, at) => (d[at] | d[at + 1] << 8 | d[at + 2] << 16 | d[at + 3] << 24) >>> 0;
|
|
30577
|
+
const u64 = (d, at) => {
|
|
30578
|
+
const value = u32(d, at) + u32(d, at + 4) * 2 ** 32;
|
|
30579
|
+
if (!Number.isSafeInteger(value)) throw invalid("ZIP64 value out of range");
|
|
30580
|
+
return value;
|
|
30581
|
+
};
|
|
30582
|
+
const requireRange = (d, at, length, what) => {
|
|
30583
|
+
if (at < 0 || length < 0 || at + length > d.length) throw invalid(`${what} is out of bounds`);
|
|
30584
|
+
};
|
|
30585
|
+
const findEocd = (d) => {
|
|
30586
|
+
const lowest = Math.max(0, d.length - EOCD_SIZE - MAX_COMMENT_LENGTH);
|
|
30587
|
+
for (let at = d.length - EOCD_SIZE; at >= lowest; at--) if (u32(d, at) === SIG_EOCD) return at;
|
|
30588
|
+
throw invalid("end of central directory not found");
|
|
30589
|
+
};
|
|
30590
|
+
const readCentralDirectoryLocation = (d) => {
|
|
30591
|
+
const eocd = findEocd(d);
|
|
30592
|
+
const locator = eocd - ZIP64_LOCATOR_SIZE;
|
|
30593
|
+
if (locator >= 0 && u32(d, locator) === SIG_ZIP64_LOCATOR) {
|
|
30594
|
+
const zip64Eocd = u32(d, locator + 8) + u32(d, locator + 12) * 2 ** 32;
|
|
30595
|
+
if (zip64Eocd + ZIP64_EOCD_MIN_SIZE <= d.length && u32(d, zip64Eocd) === SIG_ZIP64_EOCD) return {
|
|
30596
|
+
count: u64(d, zip64Eocd + 32),
|
|
30597
|
+
offset: u64(d, zip64Eocd + 48)
|
|
30598
|
+
};
|
|
30599
|
+
}
|
|
30600
|
+
return {
|
|
30601
|
+
count: u16(d, eocd + 10),
|
|
30602
|
+
offset: u32(d, eocd + 16)
|
|
30603
|
+
};
|
|
30604
|
+
};
|
|
30605
|
+
const resolveZip64Sizes = (d, extraStart, extraEnd, sizes) => {
|
|
30606
|
+
const needUncompressed = sizes.uncompressedSize === ZIP64_SENTINEL_32;
|
|
30607
|
+
const needCompressed = sizes.compressedSize === ZIP64_SENTINEL_32;
|
|
30608
|
+
const needOffset = sizes.localHeaderOffset === ZIP64_SENTINEL_32;
|
|
30609
|
+
if (!needUncompressed && !needCompressed && !needOffset) return sizes;
|
|
30610
|
+
for (let at = extraStart; at + 4 <= extraEnd; at += 4 + u16(d, at + 2)) {
|
|
30611
|
+
if (u16(d, at) !== ZIP64_EXTRA_ID) continue;
|
|
30612
|
+
const fieldEnd = at + 4 + u16(d, at + 2);
|
|
30613
|
+
if (fieldEnd > extraEnd) break;
|
|
30614
|
+
let cursor = at + 4;
|
|
30615
|
+
const next = () => {
|
|
30616
|
+
if (cursor + 8 > fieldEnd) throw invalid("ZIP64 extra field is truncated");
|
|
30617
|
+
const value = u64(d, cursor);
|
|
30618
|
+
cursor += 8;
|
|
30619
|
+
return value;
|
|
30620
|
+
};
|
|
30621
|
+
return {
|
|
30622
|
+
uncompressedSize: needUncompressed ? next() : sizes.uncompressedSize,
|
|
30623
|
+
compressedSize: needCompressed ? next() : sizes.compressedSize,
|
|
30624
|
+
localHeaderOffset: needOffset ? next() : sizes.localHeaderOffset
|
|
30625
|
+
};
|
|
30626
|
+
}
|
|
30627
|
+
throw invalid("ZIP64 sizes without a ZIP64 extra field");
|
|
30628
|
+
};
|
|
30629
|
+
const overflowError = (name, declaredSize) => invalid(`entry "${name}" inflates beyond its declared size of ${declaredSize} bytes`);
|
|
30630
|
+
const corruptError = (name, error) => {
|
|
30631
|
+
return invalid(`entry "${name}" is not valid DEFLATE data: ${error instanceof Error ? error.message : String(error)}`);
|
|
30632
|
+
};
|
|
30633
|
+
const inflateSmallEntry = (compressed, declaredSize, name) => {
|
|
30634
|
+
if (compressed.length === 0) return new Uint8Array(0);
|
|
30635
|
+
let out;
|
|
30636
|
+
try {
|
|
30637
|
+
out = inflateSync(compressed, { out: new Uint8Array(declaredSize + 1) });
|
|
30638
|
+
} catch (error) {
|
|
30639
|
+
if (error instanceof RangeError) throw overflowError(name, declaredSize);
|
|
30640
|
+
throw corruptError(name, error);
|
|
30641
|
+
}
|
|
30642
|
+
if (out.length > declaredSize) throw overflowError(name, declaredSize);
|
|
30643
|
+
return out;
|
|
30644
|
+
};
|
|
30645
|
+
const inflateLargeEntry = (compressed, declaredSize, name) => {
|
|
30646
|
+
const out = new Uint8Array(declaredSize);
|
|
30647
|
+
let overflowed = false;
|
|
30648
|
+
let produced = 0;
|
|
30649
|
+
const inflater = new Inflate((chunk) => {
|
|
30650
|
+
if (produced + chunk.length > declaredSize) {
|
|
30651
|
+
overflowed = true;
|
|
30652
|
+
throw overflowError(name, declaredSize);
|
|
30653
|
+
}
|
|
30654
|
+
out.set(chunk, produced);
|
|
30655
|
+
produced += chunk.length;
|
|
30656
|
+
});
|
|
30657
|
+
for (let at = 0; at < compressed.length; at += INFLATE_CHUNK_SIZE) {
|
|
30658
|
+
const end = Math.min(at + INFLATE_CHUNK_SIZE, compressed.length);
|
|
30659
|
+
try {
|
|
30660
|
+
inflater.push(compressed.subarray(at, end), end === compressed.length);
|
|
30661
|
+
} catch (error) {
|
|
30662
|
+
if (overflowed) throw error;
|
|
30663
|
+
throw corruptError(name, error);
|
|
30664
|
+
}
|
|
30665
|
+
}
|
|
30666
|
+
return out.subarray(0, produced);
|
|
30667
|
+
};
|
|
30668
|
+
const inflateEntry = (compressed, declaredSize, name) => {
|
|
30669
|
+
if (declaredSize > compressed.length * MAX_DEFLATE_RATIO + DEFLATE_RATIO_SLACK) throw invalid(`entry "${name}" declares ${declaredSize} bytes, more than ${compressed.length} compressed bytes can hold`);
|
|
30670
|
+
const out = compressed.length <= INFLATE_CHUNK_SIZE ? inflateSmallEntry(compressed, declaredSize, name) : inflateLargeEntry(compressed, declaredSize, name);
|
|
30671
|
+
if (out.length !== declaredSize) throw invalid(`entry "${name}" inflates to ${out.length} bytes, not its declared ${declaredSize}`);
|
|
30672
|
+
return out;
|
|
30673
|
+
};
|
|
30555
30674
|
/**
|
|
30556
30675
|
* Reads a ZIP archive (a `.pptx` file is a ZIP) and returns entries in
|
|
30557
|
-
* central-directory order. Throws if `input` is not a valid ZIP
|
|
30676
|
+
* central-directory order. Throws if `input` is not a valid ZIP, if two
|
|
30677
|
+
* entries share a name, or if an entry's data does not match the size its
|
|
30678
|
+
* central-directory record declares.
|
|
30558
30679
|
*/
|
|
30559
30680
|
const readZip = (input) => {
|
|
30560
|
-
const
|
|
30681
|
+
const { offset, count } = readCentralDirectoryLocation(input);
|
|
30561
30682
|
const entries = [];
|
|
30562
|
-
|
|
30563
|
-
|
|
30564
|
-
|
|
30565
|
-
|
|
30683
|
+
const seen = /* @__PURE__ */ new Set();
|
|
30684
|
+
let cursor = offset;
|
|
30685
|
+
for (let i = 0; i < count; i++) {
|
|
30686
|
+
requireRange(input, cursor, CENTRAL_HEADER_SIZE, "central directory");
|
|
30687
|
+
if (u32(input, cursor) !== SIG_CENTRAL_HEADER) throw invalid("bad central directory signature");
|
|
30688
|
+
const flags = u16(input, cursor + 8);
|
|
30689
|
+
const method = u16(input, cursor + 10);
|
|
30690
|
+
const nameLength = u16(input, cursor + 28);
|
|
30691
|
+
const extraLength = u16(input, cursor + 30);
|
|
30692
|
+
const commentLength = u16(input, cursor + 32);
|
|
30693
|
+
const nameStart = cursor + CENTRAL_HEADER_SIZE;
|
|
30694
|
+
const extraStart = nameStart + nameLength;
|
|
30695
|
+
const recordEnd = extraStart + extraLength + commentLength;
|
|
30696
|
+
requireRange(input, cursor, recordEnd - cursor, "central directory");
|
|
30697
|
+
const name = strFromU8(input.subarray(nameStart, extraStart), (flags & FLAG_UTF8) === 0);
|
|
30698
|
+
const { compressedSize, uncompressedSize, localHeaderOffset } = resolveZip64Sizes(input, extraStart, extraStart + extraLength, {
|
|
30699
|
+
compressedSize: u32(input, cursor + 20),
|
|
30700
|
+
uncompressedSize: u32(input, cursor + 24),
|
|
30701
|
+
localHeaderOffset: u32(input, cursor + 42)
|
|
30702
|
+
});
|
|
30703
|
+
cursor = recordEnd;
|
|
30704
|
+
if (seen.has(name)) throw invalid(`duplicate entry "${name}"`);
|
|
30705
|
+
seen.add(name);
|
|
30706
|
+
requireRange(input, localHeaderOffset, LOCAL_HEADER_SIZE, `local header of "${name}"`);
|
|
30707
|
+
if (u32(input, localHeaderOffset) !== SIG_LOCAL_HEADER) throw invalid(`bad local header signature for "${name}"`);
|
|
30708
|
+
const dataStart = localHeaderOffset + LOCAL_HEADER_SIZE + u16(input, localHeaderOffset + 26) + u16(input, localHeaderOffset + 28);
|
|
30709
|
+
requireRange(input, dataStart, compressedSize, `data of "${name}"`);
|
|
30710
|
+
const compressed = input.subarray(dataStart, dataStart + compressedSize);
|
|
30711
|
+
if (method === METHOD_STORE) {
|
|
30712
|
+
if (compressedSize !== uncompressedSize) throw invalid(`stored entry "${name}" has mismatched sizes`);
|
|
30713
|
+
entries.push({
|
|
30714
|
+
name,
|
|
30715
|
+
data: compressed.slice()
|
|
30716
|
+
});
|
|
30717
|
+
} else if (method === METHOD_DEFLATE) entries.push({
|
|
30566
30718
|
name,
|
|
30567
|
-
data
|
|
30719
|
+
data: inflateEntry(compressed, uncompressedSize, name)
|
|
30568
30720
|
});
|
|
30721
|
+
else throw invalid(`entry "${name}" uses unsupported compression method ${method}`);
|
|
30569
30722
|
}
|
|
30570
30723
|
return { entries };
|
|
30571
30724
|
};
|
|
@@ -30729,8 +30882,13 @@ const serializeContentTypes = (ct) => {
|
|
|
30729
30882
|
epilog: []
|
|
30730
30883
|
});
|
|
30731
30884
|
};
|
|
30885
|
+
const defaultKeyOf = (name) => {
|
|
30886
|
+
const file = basename(name);
|
|
30887
|
+
const dot = file.lastIndexOf(".");
|
|
30888
|
+
return dot < 0 ? null : file.slice(dot + 1).toLowerCase();
|
|
30889
|
+
};
|
|
30732
30890
|
/**
|
|
30733
|
-
*
|
|
30891
|
+
* Builds a resolver for many part names against one `ContentTypes`.
|
|
30734
30892
|
*
|
|
30735
30893
|
* 1. The first Override whose PartName matches case-insensitively wins.
|
|
30736
30894
|
* 2. Otherwise, the first Default whose Extension matches the part's
|
|
@@ -30738,13 +30896,35 @@ const serializeContentTypes = (ct) => {
|
|
|
30738
30896
|
* 3. Returns `null` if neither rule matches — `[Content_Types].xml` is
|
|
30739
30897
|
* required to cover every part, so a null here indicates a malformed
|
|
30740
30898
|
* package.
|
|
30899
|
+
*
|
|
30900
|
+
* The resolver snapshots `ct`; later edits to it are not reflected.
|
|
30901
|
+
*/
|
|
30902
|
+
const contentTypeResolver = (ct) => {
|
|
30903
|
+
const overrides = /* @__PURE__ */ new Map();
|
|
30904
|
+
for (const o of ct.overrides) {
|
|
30905
|
+
const key = o.partName.toLowerCase();
|
|
30906
|
+
if (!overrides.has(key)) overrides.set(key, o.contentType);
|
|
30907
|
+
}
|
|
30908
|
+
const defaults = /* @__PURE__ */ new Map();
|
|
30909
|
+
for (const d of ct.defaults) {
|
|
30910
|
+
const key = d.extension.toLowerCase();
|
|
30911
|
+
if (!defaults.has(key)) defaults.set(key, d.contentType);
|
|
30912
|
+
}
|
|
30913
|
+
return (name) => {
|
|
30914
|
+
const override = overrides.get(name.toLowerCase());
|
|
30915
|
+
if (override !== void 0) return override;
|
|
30916
|
+
const ext = defaultKeyOf(name);
|
|
30917
|
+
return ext === null ? null : defaults.get(ext) ?? null;
|
|
30918
|
+
};
|
|
30919
|
+
};
|
|
30920
|
+
/**
|
|
30921
|
+
* Resolves the content type of one part name by the rules of
|
|
30922
|
+
* `contentTypeResolver`, scanning without building maps.
|
|
30741
30923
|
*/
|
|
30742
30924
|
const lookupContentType = (ct, name) => {
|
|
30743
30925
|
for (const o of ct.overrides) if (partNamesEqual(o.partName, name)) return o.contentType;
|
|
30744
|
-
const
|
|
30745
|
-
|
|
30746
|
-
if (dot < 0) return null;
|
|
30747
|
-
const ext = file.slice(dot + 1).toLowerCase();
|
|
30926
|
+
const ext = defaultKeyOf(name);
|
|
30927
|
+
if (ext === null) return null;
|
|
30748
30928
|
for (const d of ct.defaults) if (d.extension.toLowerCase() === ext) return d.contentType;
|
|
30749
30929
|
return null;
|
|
30750
30930
|
};
|
|
@@ -31117,9 +31297,9 @@ const detectAudioFormat = (bytes) => {
|
|
|
31117
31297
|
};
|
|
31118
31298
|
//#endregion
|
|
31119
31299
|
//#region src/internal/parts/package.ts
|
|
31120
|
-
const TEXT_DECODER$
|
|
31300
|
+
const TEXT_DECODER$2 = new TextDecoder();
|
|
31121
31301
|
const TEXT_ENCODER$3 = new TextEncoder();
|
|
31122
|
-
const decode$2 = (b) => TEXT_DECODER$
|
|
31302
|
+
const decode$2 = (b) => TEXT_DECODER$2.decode(b);
|
|
31123
31303
|
const encode$3 = (s) => TEXT_ENCODER$3.encode(s);
|
|
31124
31304
|
const parsedRels = /* @__PURE__ */ new WeakMap();
|
|
31125
31305
|
const readRels = (bytes) => {
|
|
@@ -31139,16 +31319,29 @@ const CONTENT_TYPES_PART = "[Content_Types].xml";
|
|
|
31139
31319
|
var OpcPackage = class OpcPackage {
|
|
31140
31320
|
/**
|
|
31141
31321
|
* Ordered list of parts. The order is the order parts will be written to
|
|
31142
|
-
* the ZIP central directory on `save()`.
|
|
31143
|
-
*
|
|
31144
|
-
*
|
|
31322
|
+
* the ZIP central directory on `save()`. Read-only so every change goes
|
|
31323
|
+
* through `addPart` / `removePart` / `retainParts`, which keep the name
|
|
31324
|
+
* index in sync.
|
|
31145
31325
|
*/
|
|
31146
|
-
parts
|
|
31326
|
+
get parts() {
|
|
31327
|
+
return this.partList;
|
|
31328
|
+
}
|
|
31329
|
+
partList;
|
|
31147
31330
|
/** Mutable Content_Types map. Direct mutation is allowed. */
|
|
31148
31331
|
contentTypes;
|
|
31332
|
+
/** Lowercased part name → first part with that name, for `getPart`. */
|
|
31333
|
+
partsByName = /* @__PURE__ */ new Map();
|
|
31149
31334
|
constructor(parts, contentTypes) {
|
|
31150
|
-
this.
|
|
31335
|
+
this.partList = parts;
|
|
31151
31336
|
this.contentTypes = contentTypes;
|
|
31337
|
+
this.indexParts();
|
|
31338
|
+
}
|
|
31339
|
+
indexParts() {
|
|
31340
|
+
this.partsByName.clear();
|
|
31341
|
+
for (const part of this.parts) {
|
|
31342
|
+
const key = part.name.toLowerCase();
|
|
31343
|
+
if (!this.partsByName.has(key)) this.partsByName.set(key, part);
|
|
31344
|
+
}
|
|
31152
31345
|
}
|
|
31153
31346
|
/**
|
|
31154
31347
|
* Builds an empty package containing only the two default content-type
|
|
@@ -31184,8 +31377,9 @@ var OpcPackage = class OpcPackage {
|
|
|
31184
31377
|
});
|
|
31185
31378
|
}
|
|
31186
31379
|
if (contentTypes === null) throw new Error("package is missing [Content_Types].xml");
|
|
31380
|
+
const resolveContentType = contentTypeResolver(contentTypes);
|
|
31187
31381
|
for (const part of parts) {
|
|
31188
|
-
const ct =
|
|
31382
|
+
const ct = resolveContentType(part.name);
|
|
31189
31383
|
if (ct === null) throw new Error(`part "${part.name}" has no content type registered in [Content_Types].xml`);
|
|
31190
31384
|
part.contentType = ct;
|
|
31191
31385
|
}
|
|
@@ -31208,8 +31402,7 @@ var OpcPackage = class OpcPackage {
|
|
|
31208
31402
|
* Looks up a part by name (case-insensitive per OPC §9.1.1.7).
|
|
31209
31403
|
*/
|
|
31210
31404
|
getPart(name) {
|
|
31211
|
-
|
|
31212
|
-
return null;
|
|
31405
|
+
return this.partsByName.get(name.toLowerCase()) ?? null;
|
|
31213
31406
|
}
|
|
31214
31407
|
/**
|
|
31215
31408
|
* Adds a new part. Throws if a part with the same name (case-insensitive)
|
|
@@ -31223,7 +31416,8 @@ var OpcPackage = class OpcPackage {
|
|
|
31223
31416
|
contentType,
|
|
31224
31417
|
data
|
|
31225
31418
|
};
|
|
31226
|
-
this.
|
|
31419
|
+
this.partList.push(part);
|
|
31420
|
+
this.partsByName.set(name.toLowerCase(), part);
|
|
31227
31421
|
if (lookupContentType(this.contentTypes, name) !== contentType) this.contentTypes.overrides.push({
|
|
31228
31422
|
partName: name,
|
|
31229
31423
|
contentType
|
|
@@ -31237,14 +31431,35 @@ var OpcPackage = class OpcPackage {
|
|
|
31237
31431
|
*/
|
|
31238
31432
|
removePart(name) {
|
|
31239
31433
|
let removed = false;
|
|
31240
|
-
for (let i = this.
|
|
31241
|
-
const p = this.
|
|
31434
|
+
for (let i = this.partList.length - 1; i >= 0; i--) {
|
|
31435
|
+
const p = this.partList[i];
|
|
31242
31436
|
if (p && partNamesEqual(p.name, name)) {
|
|
31243
|
-
this.
|
|
31437
|
+
this.partList.splice(i, 1);
|
|
31244
31438
|
removed = true;
|
|
31245
31439
|
}
|
|
31246
31440
|
}
|
|
31247
|
-
if (removed)
|
|
31441
|
+
if (removed) {
|
|
31442
|
+
this.partsByName.delete(name.toLowerCase());
|
|
31443
|
+
this.contentTypes.overrides = this.contentTypes.overrides.filter((o) => !partNamesEqual(o.partName, name));
|
|
31444
|
+
}
|
|
31445
|
+
return removed;
|
|
31446
|
+
}
|
|
31447
|
+
/**
|
|
31448
|
+
* Keeps only the parts `keep` accepts and drops the `Override` entries of
|
|
31449
|
+
* the removed ones, in one pass (`removePart` per part would be O(n²)).
|
|
31450
|
+
* Returns the removed part names in package order.
|
|
31451
|
+
*/
|
|
31452
|
+
retainParts(keep) {
|
|
31453
|
+
const removed = [];
|
|
31454
|
+
let kept = 0;
|
|
31455
|
+
for (const part of this.partList) if (keep(part)) this.partList[kept++] = part;
|
|
31456
|
+
else removed.push(part.name);
|
|
31457
|
+
this.partList.length = kept;
|
|
31458
|
+
if (removed.length > 0) {
|
|
31459
|
+
this.indexParts();
|
|
31460
|
+
const gone = new Set(removed.map((name) => name.toLowerCase()));
|
|
31461
|
+
this.contentTypes.overrides = this.contentTypes.overrides.filter((o) => !gone.has(o.partName.toLowerCase()));
|
|
31462
|
+
}
|
|
31248
31463
|
return removed;
|
|
31249
31464
|
}
|
|
31250
31465
|
/**
|
|
@@ -31448,9 +31663,9 @@ const savePresentation = (pres) => {
|
|
|
31448
31663
|
};
|
|
31449
31664
|
//#endregion
|
|
31450
31665
|
//#region src/api/fn/_helpers.ts
|
|
31451
|
-
const TEXT_DECODER = new TextDecoder();
|
|
31666
|
+
const TEXT_DECODER$1 = new TextDecoder();
|
|
31452
31667
|
const TEXT_ENCODER$1 = new TextEncoder();
|
|
31453
|
-
const decode$1 = (b) => TEXT_DECODER.decode(b);
|
|
31668
|
+
const decode$1 = (b) => TEXT_DECODER$1.decode(b);
|
|
31454
31669
|
const encode$1 = (s) => TEXT_ENCODER$1.encode(s);
|
|
31455
31670
|
const SLIDE_LAYOUT_CONTENT_TYPE = "application/vnd.openxmlformats-officedocument.presentationml.slideLayout+xml";
|
|
31456
31671
|
const SLIDE_CONTENT_TYPE = "application/vnd.openxmlformats-officedocument.presentationml.slide+xml";
|
|
@@ -32711,7 +32926,7 @@ const NAME_THEME_ELEMENTS = qname("a", "themeElements", NS.dml);
|
|
|
32711
32926
|
const NAME_CLR_SCHEME = qname("a", "clrScheme", NS.dml);
|
|
32712
32927
|
const NAME_SRGB_CLR$1 = qname("a", "srgbClr", NS.dml);
|
|
32713
32928
|
const NAME_SYS_CLR = qname("a", "sysClr", NS.dml);
|
|
32714
|
-
const ATTR_VAL$
|
|
32929
|
+
const ATTR_VAL$5 = qname("", "val", "");
|
|
32715
32930
|
const ATTR_NAME$4 = qname("", "name", "");
|
|
32716
32931
|
const ATTR_TYPEFACE$1 = qname("", "typeface", "");
|
|
32717
32932
|
const CLR_SCHEME_SLOTS = [
|
|
@@ -32899,7 +33114,7 @@ const setPresentationTheme = (pres, theme) => {
|
|
|
32899
33114
|
const slotName = qname("a", local, NS.dml);
|
|
32900
33115
|
const idx = clrScheme.children.findIndex((c) => c.kind === "element" && c.name.namespaceURI === NS.dml && c.name.localName === local);
|
|
32901
33116
|
if (idx < 0) throw new Error(`setPresentationTheme: clrScheme is missing <a:${local}>`);
|
|
32902
|
-
clrScheme.children[idx] = elem(slotName, { children: [elem(NAME_SRGB_CLR$1, { attrs: [attr(ATTR_VAL$
|
|
33117
|
+
clrScheme.children[idx] = elem(slotName, { children: [elem(NAME_SRGB_CLR$1, { attrs: [attr(ATTR_VAL$5, hex)] })] });
|
|
32903
33118
|
}
|
|
32904
33119
|
themePart.data = encode$1(serializeXml(doc));
|
|
32905
33120
|
};
|
|
@@ -34733,11 +34948,11 @@ const NS_R = NS.officeDocRels;
|
|
|
34733
34948
|
const c = (local) => qname("c", local, NS_C$1);
|
|
34734
34949
|
const a$2 = (local) => qname("a", local, NS_A$1);
|
|
34735
34950
|
const r = (local) => qname("r", local, NS_R);
|
|
34736
|
-
const ATTR_VAL$
|
|
34737
|
-
const ATTR_IDX$
|
|
34738
|
-
const valNode = (name, val) => elem(name, { attrs: [attr(ATTR_VAL$
|
|
34951
|
+
const ATTR_VAL$4 = qname("", "val", "");
|
|
34952
|
+
const ATTR_IDX$3 = qname("", "idx", "");
|
|
34953
|
+
const valNode = (name, val) => elem(name, { attrs: [attr(ATTR_VAL$4, String(val))] });
|
|
34739
34954
|
const ptNode = (idx, value) => elem(c("pt"), {
|
|
34740
|
-
attrs: [attr(ATTR_IDX$
|
|
34955
|
+
attrs: [attr(ATTR_IDX$3, String(idx))],
|
|
34741
34956
|
children: [elem(c("v"), { children: [text(value)] })]
|
|
34742
34957
|
});
|
|
34743
34958
|
const strRef = (formula, points) => {
|
|
@@ -34753,7 +34968,7 @@ const numRef = (formula, points, formatCode = "General") => elem(c("numRef"), {
|
|
|
34753
34968
|
const multiLvlStrRef = (formula, levels, pointCount) => elem(c("multiLvlStrRef"), { children: [elem(c("f"), { children: [text(formula)] }), elem(c("multiLvlStrCache"), { children: [valNode(c("ptCount"), pointCount), ...levels.map((level, depth) => elem(c("lvl"), { children: level.map((label, i) => depth > 0 && label === "" ? null : ptNode(i, label)).filter((n) => n !== null) }))] })] });
|
|
34754
34969
|
const hexOf = (color) => color.replace(/^#/, "").toUpperCase();
|
|
34755
34970
|
const solidFill = (color, opacity) => elem(a$2("solidFill"), { children: [elem(a$2("srgbClr"), {
|
|
34756
|
-
attrs: [attr(ATTR_VAL$
|
|
34971
|
+
attrs: [attr(ATTR_VAL$4, hexOf(color))],
|
|
34757
34972
|
children: opacity !== void 0 ? [valNode(a$2("alpha"), boundedInt(opacity * 1e5, "percent100000", "chart series: fillOpacity"))] : []
|
|
34758
34973
|
})] });
|
|
34759
34974
|
const solidFillSpPr = (color, opacity) => elem(c("spPr"), { children: [solidFill(color, opacity)] });
|
|
@@ -34935,8 +35150,7 @@ const seriesElement = (spec, seriesIdx, layout) => {
|
|
|
34935
35150
|
children.push(markerElement(series.markerSymbol ?? (markersOff ? "none" : void 0), series.markerSizePt, markerColor, markerLineColor));
|
|
34936
35151
|
}
|
|
34937
35152
|
for (const dPt of dPtElements(series.pointColors, series.pointExplosions, series.fillOpacity, spec.bubble3D === true)) children.push(dPt);
|
|
34938
|
-
|
|
34939
|
-
const serDLbls = buildDLblsFromLabels(series.dataLabels, series.pointDataLabels);
|
|
35153
|
+
const serDLbls = buildDLblsFromLabels(series.dataLabels ?? (series.pointDataLabels !== void 0 ? spec.dataLabels ?? HIDDEN_DATA_LABELS : void 0), series.pointDataLabels);
|
|
34940
35154
|
if (serDLbls !== null) children.push(serDLbls);
|
|
34941
35155
|
if (series.trendline && SHAPES_WITH_TRENDLINE.has(shape) && spec.kind !== "stock") children.push(trendlineElement(series.trendline));
|
|
34942
35156
|
if (series.errorBars !== void 0 || series.xErrorBars !== void 0) {
|
|
@@ -35030,8 +35244,7 @@ const catAxis = (spec) => {
|
|
|
35030
35244
|
if (spec.categoryAxisMinorGridlines) children.push(gridlinesElement("minorGridlines", spec.categoryAxisMinorGridlineColor, spec.categoryAxisMinorGridlineWidthEmu, "chart: categoryAxisMinorGridlineWidthEmu"));
|
|
35031
35245
|
if (spec.categoryAxisTitle !== void 0) children.push(titleElement(spec.categoryAxisTitle, spec.categoryAxisTitleStyle, spec.categoryAxisTitleRotationDeg));
|
|
35032
35246
|
if (spec.categoryAxisNumberFormat !== void 0) children.push(elem(c("numFmt"), { attrs: [attr(qname("", "formatCode", ""), spec.categoryAxisNumberFormat), attr(qname("", "sourceLinked", ""), "0")] }));
|
|
35033
|
-
|
|
35034
|
-
if (spec.categoryAxisMinorTickMark !== void 0) children.push(valNode(c("minorTickMark"), spec.categoryAxisMinorTickMark));
|
|
35247
|
+
children.push(valNode(c("majorTickMark"), spec.categoryAxisMajorTickMark ?? (spec.kind === "bar" || spec.kind === "column" ? "none" : "out")), valNode(c("minorTickMark"), spec.categoryAxisMinorTickMark ?? "none"));
|
|
35035
35248
|
if (spec.categoryAxisTickLabelPos !== void 0) children.push(valNode(c("tickLblPos"), spec.categoryAxisTickLabelPos));
|
|
35036
35249
|
const catLine = lineSpPr(spec.categoryAxisLineColor, spec.categoryAxisLineWidthEmu, "chart: categoryAxisLineWidthEmu", spec.categoryAxisLineHidden === true);
|
|
35037
35250
|
if (catLine !== null) children.push(catLine);
|
|
@@ -35071,8 +35284,7 @@ const valueAxisElement = (f, ids) => {
|
|
|
35071
35284
|
if (f.minorGridlines) children.push(gridlinesElement("minorGridlines", f.minorGridlineColor, f.minorGridlineWidthEmu, `chart: ${f.widthFields.minorGridline}`));
|
|
35072
35285
|
if (f.title !== void 0) children.push(titleElement(f.title, f.titleStyle, f.titleRotationDeg));
|
|
35073
35286
|
if (f.scaling?.numberFormat !== void 0) children.push(elem(c("numFmt"), { attrs: [attr(qname("", "formatCode", ""), f.scaling.numberFormat), attr(qname("", "sourceLinked", ""), "0")] }));
|
|
35074
|
-
|
|
35075
|
-
if (f.minorTickMark !== void 0) children.push(valNode(c("minorTickMark"), f.minorTickMark));
|
|
35287
|
+
children.push(valNode(c("majorTickMark"), f.majorTickMark ?? "out"), valNode(c("minorTickMark"), f.minorTickMark ?? "none"));
|
|
35076
35288
|
if (f.tickLabelPos !== void 0) children.push(valNode(c("tickLblPos"), f.tickLabelPos));
|
|
35077
35289
|
const axisLine = lineSpPr(f.lineColor, f.lineWidthEmu, `chart: ${f.widthFields.line}`, f.lineHidden === true);
|
|
35078
35290
|
if (axisLine !== null) children.push(axisLine);
|
|
@@ -35176,6 +35388,7 @@ const serAxis = (spec) => {
|
|
|
35176
35388
|
];
|
|
35177
35389
|
if (s.majorGridlines) children.push(elem(c("majorGridlines")));
|
|
35178
35390
|
if (s.title !== void 0) children.push(titleElement(s.title, s.titleStyle));
|
|
35391
|
+
children.push(valNode(c("majorTickMark"), "out"), valNode(c("minorTickMark"), "none"));
|
|
35179
35392
|
if (s.tickLabelPos !== void 0) children.push(valNode(c("tickLblPos"), s.tickLabelPos));
|
|
35180
35393
|
const line = lineSpPr(s.lineColor, void 0, "chart: seriesAxis");
|
|
35181
35394
|
if (line !== null) children.push(line);
|
|
@@ -35185,13 +35398,19 @@ const serAxis = (spec) => {
|
|
|
35185
35398
|
if (s.tickLabelSkip !== void 0) children.push(valNode(c("tickLblSkip"), s.tickLabelSkip));
|
|
35186
35399
|
return elem(c("serAx"), { children });
|
|
35187
35400
|
};
|
|
35401
|
+
const HIDDEN_DATA_LABELS = {
|
|
35402
|
+
showValue: false,
|
|
35403
|
+
showCategory: false,
|
|
35404
|
+
showSeriesName: false,
|
|
35405
|
+
showPercent: false
|
|
35406
|
+
};
|
|
35188
35407
|
const buildDLblsFromLabels = (dl, pointLabels = void 0) => {
|
|
35189
35408
|
const children = [];
|
|
35190
35409
|
pointLabels?.forEach((pl, i) => {
|
|
35191
35410
|
if (pl === null) return;
|
|
35192
35411
|
children.push(elem(c("dLbl"), { children: [
|
|
35193
35412
|
valNode(c("idx"), i),
|
|
35194
|
-
...pl.text !== void 0 ? [elem(c("tx"), { children: [richText(pl.text)] })] : [],
|
|
35413
|
+
...pl.text !== void 0 ? [elem(c("tx"), { children: [richText(pl.text, pl.textStyle)] })] : [],
|
|
35195
35414
|
...dLblGroupChildren(pl)
|
|
35196
35415
|
] }));
|
|
35197
35416
|
});
|
|
@@ -35503,11 +35722,15 @@ const manualLayoutElement = (position, size, target) => elem(c("layout"), { chil
|
|
|
35503
35722
|
valNode(c("y"), position.y),
|
|
35504
35723
|
...size !== void 0 ? [valNode(c("w"), size.w), valNode(c("h"), size.h)] : []
|
|
35505
35724
|
] })] });
|
|
35506
|
-
const richText = (value) =>
|
|
35507
|
-
elem(a$2("
|
|
35508
|
-
elem(a$2("
|
|
35509
|
-
|
|
35510
|
-
|
|
35725
|
+
const richText = (value, style) => {
|
|
35726
|
+
const run = elem(a$2("r"), { children: [...style !== void 0 ? [elem(a$2("rPr"), rPrAttrsFromStyle(style))] : [], elem(a$2("t"), { children: [text(value)] })] });
|
|
35727
|
+
const pPr = style !== void 0 ? [elem(a$2("pPr"), { children: [elem(a$2("defRPr"), rPrAttrsFromStyle(style))] })] : [];
|
|
35728
|
+
return elem(c("rich"), { children: [
|
|
35729
|
+
elem(a$2("bodyPr")),
|
|
35730
|
+
elem(a$2("lstStyle")),
|
|
35731
|
+
elem(a$2("p"), { children: [...pPr, run] })
|
|
35732
|
+
] });
|
|
35733
|
+
};
|
|
35511
35734
|
const titleElement = (title, style, rotationDeg, placement) => {
|
|
35512
35735
|
const pPr = elem(a$2("pPr"), { children: [elem(a$2("defRPr"))] });
|
|
35513
35736
|
const { attrs: runAttrs, children: runChildren } = rPrAttrsFromStyle(style);
|
|
@@ -35742,8 +35965,8 @@ const NAME_R_DML = qname("a", "r", NS_A);
|
|
|
35742
35965
|
const NAME_SP_PR_C = qname("c", "spPr", NS_C);
|
|
35743
35966
|
const NAME_SOLID_FILL$1 = qname("a", "solidFill", NS_A);
|
|
35744
35967
|
const NAME_SRGB_CLR = qname("a", "srgbClr", NS_A);
|
|
35745
|
-
const ATTR_VAL$
|
|
35746
|
-
const ATTR_IDX$
|
|
35968
|
+
const ATTR_VAL$3 = qname("", "val", "");
|
|
35969
|
+
const ATTR_IDX$2 = qname("", "idx", "");
|
|
35747
35970
|
/** Kinds a combo plot group can carry (mirrors `ChartSeries.chartKind`). */
|
|
35748
35971
|
const isComboSeriesKind = (kind) => kind === "bar" || kind === "column" || kind === "line" || kind === "area";
|
|
35749
35972
|
const KIND_MAP = [
|
|
@@ -35821,11 +36044,11 @@ const findFirst = (parent, names) => {
|
|
|
35821
36044
|
};
|
|
35822
36045
|
const readPtCount = (host) => {
|
|
35823
36046
|
const ptCountEl = firstChildElement(host, NAME_PT_COUNT);
|
|
35824
|
-
const raw = ptCountEl !== null ? getAttrValue(ptCountEl, ATTR_VAL$
|
|
36047
|
+
const raw = ptCountEl !== null ? getAttrValue(ptCountEl, ATTR_VAL$3) : null;
|
|
35825
36048
|
return raw !== null ? Number.parseInt(raw, 10) : NaN;
|
|
35826
36049
|
};
|
|
35827
36050
|
const readXmlBool = (el) => {
|
|
35828
|
-
const v = getAttrValue(el, ATTR_VAL$
|
|
36051
|
+
const v = getAttrValue(el, ATTR_VAL$3);
|
|
35829
36052
|
return v === null || v === "1" || v === "true";
|
|
35830
36053
|
};
|
|
35831
36054
|
const parsePointIndex = (raw, limit) => {
|
|
@@ -35835,14 +36058,14 @@ const parsePointIndex = (raw, limit) => {
|
|
|
35835
36058
|
};
|
|
35836
36059
|
const readPointIndex = (host, pointCount) => {
|
|
35837
36060
|
const idxEl = firstChildElement(host, qname("c", "idx", NS_C));
|
|
35838
|
-
return parsePointIndex(idxEl !== null ? getAttrValue(idxEl, ATTR_VAL$
|
|
36061
|
+
return parsePointIndex(idxEl !== null ? getAttrValue(idxEl, ATTR_VAL$3) : null, pointCount);
|
|
35839
36062
|
};
|
|
35840
36063
|
const readPtArray = (cache, countHost = cache) => {
|
|
35841
36064
|
const out = [];
|
|
35842
36065
|
const ptCount = readPtCount(countHost);
|
|
35843
36066
|
const idxLimit = Number.isFinite(ptCount) ? Math.min(ptCount, MAX_PT_COUNT) : MAX_PT_COUNT;
|
|
35844
36067
|
for (const pt of allChildElements(cache, NAME_PT)) {
|
|
35845
|
-
const idx = parsePointIndex(getAttrValue(pt, ATTR_IDX$
|
|
36068
|
+
const idx = parsePointIndex(getAttrValue(pt, ATTR_IDX$2), idxLimit);
|
|
35846
36069
|
if (idx === null) continue;
|
|
35847
36070
|
const v = firstChildElement(pt, NAME_V);
|
|
35848
36071
|
if (v === null) continue;
|
|
@@ -35911,7 +36134,7 @@ const readDataPointOverrides = (ser, pointCount) => {
|
|
|
35911
36134
|
if (solidFill) {
|
|
35912
36135
|
const srgb = firstChildElement(solidFill, NAME_SRGB_CLR);
|
|
35913
36136
|
if (srgb) {
|
|
35914
|
-
const val = getAttrValue(srgb, ATTR_VAL$
|
|
36137
|
+
const val = getAttrValue(srgb, ATTR_VAL$3);
|
|
35915
36138
|
if (val !== null) {
|
|
35916
36139
|
colors[idx] = `#${val.toUpperCase()}`;
|
|
35917
36140
|
anyColor = true;
|
|
@@ -35921,7 +36144,7 @@ const readDataPointOverrides = (ser, pointCount) => {
|
|
|
35921
36144
|
}
|
|
35922
36145
|
const explEl = firstChildElement(c, qname("c", "explosion", NS_C));
|
|
35923
36146
|
if (explEl) {
|
|
35924
|
-
const v = getAttrValue(explEl, ATTR_VAL$
|
|
36147
|
+
const v = getAttrValue(explEl, ATTR_VAL$3);
|
|
35925
36148
|
if (v !== null) {
|
|
35926
36149
|
const n = Number.parseInt(v, 10);
|
|
35927
36150
|
if (Number.isFinite(n) && n > 0) {
|
|
@@ -35947,7 +36170,7 @@ const readTrendline = (ser) => {
|
|
|
35947
36170
|
if (acc.length > 0) name = acc;
|
|
35948
36171
|
}
|
|
35949
36172
|
const typeEl = firstChildElement(tl, qname("c", "trendlineType", NS_C));
|
|
35950
|
-
const tToken = typeEl ? getAttrValue(typeEl, ATTR_VAL$
|
|
36173
|
+
const tToken = typeEl ? getAttrValue(typeEl, ATTR_VAL$3) : null;
|
|
35951
36174
|
let type;
|
|
35952
36175
|
switch (tToken) {
|
|
35953
36176
|
case "exp":
|
|
@@ -35964,7 +36187,7 @@ const readTrendline = (ser) => {
|
|
|
35964
36187
|
if (type === "movingAvg") {
|
|
35965
36188
|
const pEl = firstChildElement(tl, qname("c", "period", NS_C));
|
|
35966
36189
|
if (pEl) {
|
|
35967
|
-
const v = getAttrValue(pEl, ATTR_VAL$
|
|
36190
|
+
const v = getAttrValue(pEl, ATTR_VAL$3);
|
|
35968
36191
|
if (v !== null) {
|
|
35969
36192
|
const n = Number.parseInt(v, 10);
|
|
35970
36193
|
if (Number.isFinite(n) && n > 0) period = n;
|
|
@@ -35975,7 +36198,7 @@ const readTrendline = (ser) => {
|
|
|
35975
36198
|
if (type === "poly") {
|
|
35976
36199
|
const oEl = firstChildElement(tl, qname("c", "order", NS_C));
|
|
35977
36200
|
if (oEl) {
|
|
35978
|
-
const v = getAttrValue(oEl, ATTR_VAL$
|
|
36201
|
+
const v = getAttrValue(oEl, ATTR_VAL$3);
|
|
35979
36202
|
if (v !== null) {
|
|
35980
36203
|
const n = Number.parseInt(v, 10);
|
|
35981
36204
|
if (Number.isFinite(n) && n >= 2) order = n;
|
|
@@ -35991,7 +36214,7 @@ const readTrendline = (ser) => {
|
|
|
35991
36214
|
if (solid) {
|
|
35992
36215
|
const srgb = firstChildElement(solid, NAME_SRGB_CLR);
|
|
35993
36216
|
if (srgb) {
|
|
35994
|
-
const v = getAttrValue(srgb, ATTR_VAL$
|
|
36217
|
+
const v = getAttrValue(srgb, ATTR_VAL$3);
|
|
35995
36218
|
if (v !== null) color = `#${v.toUpperCase()}`;
|
|
35996
36219
|
}
|
|
35997
36220
|
}
|
|
@@ -36000,7 +36223,7 @@ const readTrendline = (ser) => {
|
|
|
36000
36223
|
const readExtension = (local) => {
|
|
36001
36224
|
const el = firstChildElement(tl, qname("c", local, NS_C));
|
|
36002
36225
|
if (!el) return void 0;
|
|
36003
|
-
const raw = getAttrValue(el, ATTR_VAL$
|
|
36226
|
+
const raw = getAttrValue(el, ATTR_VAL$3);
|
|
36004
36227
|
if (raw === null) return void 0;
|
|
36005
36228
|
const n = Number.parseFloat(raw);
|
|
36006
36229
|
return Number.isFinite(n) && n > 0 ? n : void 0;
|
|
@@ -36010,7 +36233,7 @@ const readTrendline = (ser) => {
|
|
|
36010
36233
|
const readDispBool = (local) => {
|
|
36011
36234
|
const el = firstChildElement(tl, qname("c", local, NS_C));
|
|
36012
36235
|
if (!el) return void 0;
|
|
36013
|
-
const v = getAttrValue(el, ATTR_VAL$
|
|
36236
|
+
const v = getAttrValue(el, ATTR_VAL$3);
|
|
36014
36237
|
return v === null || v === "1" || v === "true" ? true : void 0;
|
|
36015
36238
|
};
|
|
36016
36239
|
const displayEquation = readDispBool("dispEq");
|
|
@@ -36034,13 +36257,13 @@ const readSeriesColor = (ser) => {
|
|
|
36034
36257
|
if (!solidFill) return void 0;
|
|
36035
36258
|
const srgb = firstChildElement(solidFill, NAME_SRGB_CLR);
|
|
36036
36259
|
if (!srgb) return void 0;
|
|
36037
|
-
const v = getAttrValue(srgb, ATTR_VAL$
|
|
36260
|
+
const v = getAttrValue(srgb, ATTR_VAL$3);
|
|
36038
36261
|
return v !== null ? `#${v.toUpperCase()}` : void 0;
|
|
36039
36262
|
};
|
|
36040
36263
|
const readSolidSrgb = (host) => {
|
|
36041
36264
|
const fill = host !== null ? firstChildElement(host, NAME_SOLID_FILL$1) : null;
|
|
36042
36265
|
const srgb = fill !== null ? firstChildElement(fill, NAME_SRGB_CLR) : null;
|
|
36043
|
-
const color = srgb !== null ? getAttrValue(srgb, ATTR_VAL$
|
|
36266
|
+
const color = srgb !== null ? getAttrValue(srgb, ATTR_VAL$3) : null;
|
|
36044
36267
|
return color !== null ? `#${color.toUpperCase()}` : void 0;
|
|
36045
36268
|
};
|
|
36046
36269
|
const readSeriesMarker = (ser) => {
|
|
@@ -36054,12 +36277,12 @@ const readSeriesMarker = (ser) => {
|
|
|
36054
36277
|
if (lineColor !== void 0) out.markerLineColor = lineColor;
|
|
36055
36278
|
const symEl = firstChildElement(m, qname("c", "symbol", NS_C));
|
|
36056
36279
|
if (symEl) {
|
|
36057
|
-
const v = getAttrValue(symEl, ATTR_VAL$
|
|
36280
|
+
const v = getAttrValue(symEl, ATTR_VAL$3);
|
|
36058
36281
|
if (v === "none" || v === "auto" || v === "circle" || v === "square" || v === "diamond" || v === "triangle" || v === "star" || v === "x" || v === "plus" || v === "dash" || v === "dot" || v === "picture") out.markerSymbol = v;
|
|
36059
36282
|
}
|
|
36060
36283
|
const sizeEl = firstChildElement(m, qname("c", "size", NS_C));
|
|
36061
36284
|
if (sizeEl) {
|
|
36062
|
-
const v = getAttrValue(sizeEl, ATTR_VAL$
|
|
36285
|
+
const v = getAttrValue(sizeEl, ATTR_VAL$3);
|
|
36063
36286
|
if (v !== null) {
|
|
36064
36287
|
const n = Number.parseInt(v, 10);
|
|
36065
36288
|
if (Number.isFinite(n) && n > 0) out.markerSizePt = n;
|
|
@@ -36075,7 +36298,7 @@ const readSeriesLineProps = (ser) => {
|
|
|
36075
36298
|
const out = {};
|
|
36076
36299
|
const lnFill = firstChildElement(ln, NAME_SOLID_FILL$1);
|
|
36077
36300
|
const lnSrgb = lnFill !== null ? firstChildElement(lnFill, NAME_SRGB_CLR) : null;
|
|
36078
|
-
const lnColor = lnSrgb !== null ? getAttrValue(lnSrgb, ATTR_VAL$
|
|
36301
|
+
const lnColor = lnSrgb !== null ? getAttrValue(lnSrgb, ATTR_VAL$3) : null;
|
|
36079
36302
|
if (lnColor !== null) out.lineColor = `#${lnColor.toUpperCase()}`;
|
|
36080
36303
|
const w = getAttrValue(ln, qname("", "w", ""));
|
|
36081
36304
|
if (w !== null) {
|
|
@@ -36084,7 +36307,7 @@ const readSeriesLineProps = (ser) => {
|
|
|
36084
36307
|
}
|
|
36085
36308
|
const prstDash = firstChildElement(ln, qname("a", "prstDash", NS_A));
|
|
36086
36309
|
if (prstDash) {
|
|
36087
|
-
const v = getAttrValue(prstDash, ATTR_VAL$
|
|
36310
|
+
const v = getAttrValue(prstDash, ATTR_VAL$3);
|
|
36088
36311
|
if (v !== null) out.lineDash = v;
|
|
36089
36312
|
}
|
|
36090
36313
|
return out;
|
|
@@ -36137,7 +36360,7 @@ const readRunStyle = (rPr) => {
|
|
|
36137
36360
|
if (solidFill) {
|
|
36138
36361
|
const srgb = firstChildElement(solidFill, NAME_A_SRGB);
|
|
36139
36362
|
if (srgb) {
|
|
36140
|
-
const v = getAttrValue(srgb, ATTR_VAL$
|
|
36363
|
+
const v = getAttrValue(srgb, ATTR_VAL$3);
|
|
36141
36364
|
if (v !== null) color = `#${v.toUpperCase()}`;
|
|
36142
36365
|
}
|
|
36143
36366
|
}
|
|
@@ -36206,7 +36429,7 @@ const readTitleRotationDeg = (titleEl) => {
|
|
|
36206
36429
|
const readDataLabelPosition = (dLbls) => {
|
|
36207
36430
|
const el = firstChildElement(dLbls, qname("c", "dLblPos", NS_C));
|
|
36208
36431
|
if (!el) return void 0;
|
|
36209
|
-
const v = getAttrValue(el, ATTR_VAL$
|
|
36432
|
+
const v = getAttrValue(el, ATTR_VAL$3);
|
|
36210
36433
|
switch (v) {
|
|
36211
36434
|
case "ctr":
|
|
36212
36435
|
case "inEnd":
|
|
@@ -36325,7 +36548,7 @@ const readValueAxisScaling = (valAx) => {
|
|
|
36325
36548
|
const readNumOn = (parent, local) => {
|
|
36326
36549
|
const el = firstChildElement(parent, qname("c", local, NS_C));
|
|
36327
36550
|
if (!el) return void 0;
|
|
36328
|
-
const v = getAttrValue(el, ATTR_VAL$
|
|
36551
|
+
const v = getAttrValue(el, ATTR_VAL$3);
|
|
36329
36552
|
if (v === null) return void 0;
|
|
36330
36553
|
const n = Number.parseFloat(v);
|
|
36331
36554
|
return Number.isFinite(n) ? n : void 0;
|
|
@@ -36342,7 +36565,7 @@ const readValueAxisScaling = (valAx) => {
|
|
|
36342
36565
|
if (dispUnits) {
|
|
36343
36566
|
const builtIn = firstChildElement(dispUnits, qname("c", "builtInUnit", NS_C));
|
|
36344
36567
|
if (builtIn) {
|
|
36345
|
-
const v = getAttrValue(builtIn, ATTR_VAL$
|
|
36568
|
+
const v = getAttrValue(builtIn, ATTR_VAL$3);
|
|
36346
36569
|
switch (v) {
|
|
36347
36570
|
case "hundreds":
|
|
36348
36571
|
case "thousands":
|
|
@@ -36378,7 +36601,7 @@ const readValueAxisScaling = (valAx) => {
|
|
|
36378
36601
|
};
|
|
36379
36602
|
const childVal = (parent, local) => {
|
|
36380
36603
|
const el = firstChildElement(parent, qname("c", local, NS_C));
|
|
36381
|
-
return el !== null ? getAttrValue(el, ATTR_VAL$
|
|
36604
|
+
return el !== null ? getAttrValue(el, ATTR_VAL$3) : null;
|
|
36382
36605
|
};
|
|
36383
36606
|
const childNumber = (parent, local) => {
|
|
36384
36607
|
const raw = childVal(parent, local);
|
|
@@ -36400,7 +36623,7 @@ const readSeriesFillOpacity = (ser) => {
|
|
|
36400
36623
|
const fill = spPr !== null ? firstChildElement(spPr, NAME_SOLID_FILL$1) : null;
|
|
36401
36624
|
const srgb = fill !== null ? firstChildElement(fill, NAME_SRGB_CLR) : null;
|
|
36402
36625
|
const alpha = srgb !== null ? firstChildElement(srgb, qname("a", "alpha", NS_A)) : null;
|
|
36403
|
-
const raw = alpha !== null ? getAttrValue(alpha, ATTR_VAL$
|
|
36626
|
+
const raw = alpha !== null ? getAttrValue(alpha, ATTR_VAL$3) : null;
|
|
36404
36627
|
if (raw === null || !/^\d+$/.test(raw)) return void 0;
|
|
36405
36628
|
const n = Number.parseInt(raw, 10);
|
|
36406
36629
|
return n <= ALPHA_OPAQUE ? n / ALPHA_OPAQUE : void 0;
|
|
@@ -36495,7 +36718,7 @@ const readOfPie = (group) => {
|
|
|
36495
36718
|
const custSplit = firstChildElement(group, qname("c", "custSplit", NS_C));
|
|
36496
36719
|
const customSplit = [];
|
|
36497
36720
|
if (custSplit !== null) for (const pt of allChildElements(custSplit, qname("c", "secondPiePt", NS_C))) {
|
|
36498
|
-
const idx = parsePointIndex(getAttrValue(pt, ATTR_VAL$
|
|
36721
|
+
const idx = parsePointIndex(getAttrValue(pt, ATTR_VAL$3), MAX_PT_COUNT);
|
|
36499
36722
|
if (idx !== null) customSplit.push(idx);
|
|
36500
36723
|
}
|
|
36501
36724
|
const seriesLines = firstChildElement(group, qname("c", "serLines", NS_C)) !== null;
|
|
@@ -36672,7 +36895,7 @@ const readChartSpec = (root) => {
|
|
|
36672
36895
|
let groupKind = mapped.kind;
|
|
36673
36896
|
if (mapped.localName === "barChart" || mapped.localName === "bar3DChart") {
|
|
36674
36897
|
const barDir = firstChildElement(child, qname("c", "barDir", NS_C));
|
|
36675
|
-
groupKind = (barDir !== null ? getAttrValue(barDir, ATTR_VAL$
|
|
36898
|
+
groupKind = (barDir !== null ? getAttrValue(barDir, ATTR_VAL$3) : null) === "bar" ? "bar" : "column";
|
|
36676
36899
|
}
|
|
36677
36900
|
plotGroups.push({
|
|
36678
36901
|
element: child,
|
|
@@ -36686,7 +36909,7 @@ const readChartSpec = (root) => {
|
|
|
36686
36909
|
const groupAxisIds = (group) => {
|
|
36687
36910
|
const ids = [];
|
|
36688
36911
|
for (const axIdEl of allChildElements(group, qname("c", "axId", NS_C))) {
|
|
36689
|
-
const id = getAttrValue(axIdEl, ATTR_VAL$
|
|
36912
|
+
const id = getAttrValue(axIdEl, ATTR_VAL$3);
|
|
36690
36913
|
if (id !== null) ids.push(id);
|
|
36691
36914
|
}
|
|
36692
36915
|
return ids;
|
|
@@ -36694,7 +36917,7 @@ const readChartSpec = (root) => {
|
|
|
36694
36917
|
const valAxisIds = /* @__PURE__ */ new Set();
|
|
36695
36918
|
for (const el of allChildElements(plotArea, NAME_VAL_AX)) {
|
|
36696
36919
|
const axIdEl = firstChildElement(el, qname("c", "axId", NS_C));
|
|
36697
|
-
const id = axIdEl !== null ? getAttrValue(axIdEl, ATTR_VAL$
|
|
36920
|
+
const id = axIdEl !== null ? getAttrValue(axIdEl, ATTR_VAL$3) : null;
|
|
36698
36921
|
if (id !== null) valAxisIds.add(id);
|
|
36699
36922
|
}
|
|
36700
36923
|
const primaryAxisIds = new Set(groupAxisIds(plotted));
|
|
@@ -36782,7 +37005,7 @@ const readChartSpec = (root) => {
|
|
|
36782
37005
|
let secValAx = null;
|
|
36783
37006
|
for (const el of allChildElements(plotArea, NAME_VAL_AX)) {
|
|
36784
37007
|
const axIdEl = firstChildElement(el, qname("c", "axId", NS_C));
|
|
36785
|
-
const id = axIdEl !== null ? getAttrValue(axIdEl, ATTR_VAL$
|
|
37008
|
+
const id = axIdEl !== null ? getAttrValue(axIdEl, ATTR_VAL$3) : null;
|
|
36786
37009
|
if (id !== null && secondaryValAxisIds.has(id)) secValAx ??= el;
|
|
36787
37010
|
else valAx ??= el;
|
|
36788
37011
|
}
|
|
@@ -36811,7 +37034,7 @@ const readChartSpec = (root) => {
|
|
|
36811
37034
|
if (kind === "column" || kind === "bar" || kind === "area" || kind === "line") {
|
|
36812
37035
|
const groupingEl = firstChildElement(plotted, qname("c", "grouping", NS_C));
|
|
36813
37036
|
if (groupingEl) {
|
|
36814
|
-
const g = getAttrValue(groupingEl, ATTR_VAL$
|
|
37037
|
+
const g = getAttrValue(groupingEl, ATTR_VAL$3);
|
|
36815
37038
|
if (g === "clustered" || g === "stacked" || g === "percentStacked" || g === "standard") grouping = g;
|
|
36816
37039
|
}
|
|
36817
37040
|
}
|
|
@@ -36824,7 +37047,7 @@ const readChartSpec = (root) => {
|
|
|
36824
37047
|
const markerEl = firstChildElement(plotted, qname("c", "marker", NS_C));
|
|
36825
37048
|
if (markerEl === null) lineMarkers = false;
|
|
36826
37049
|
else {
|
|
36827
|
-
const v = getAttrValue(markerEl, ATTR_VAL$
|
|
37050
|
+
const v = getAttrValue(markerEl, ATTR_VAL$3);
|
|
36828
37051
|
lineMarkers = v === null ? true : v === "1" || v === "true";
|
|
36829
37052
|
}
|
|
36830
37053
|
}
|
|
@@ -36833,7 +37056,7 @@ const readChartSpec = (root) => {
|
|
|
36833
37056
|
if (kind === "column" || kind === "bar") {
|
|
36834
37057
|
const gwEl = firstChildElement(plotted, qname("c", "gapWidth", NS_C));
|
|
36835
37058
|
if (gwEl) {
|
|
36836
|
-
const v = getAttrValue(gwEl, ATTR_VAL$
|
|
37059
|
+
const v = getAttrValue(gwEl, ATTR_VAL$3);
|
|
36837
37060
|
if (v !== null) {
|
|
36838
37061
|
const n = Number.parseInt(v, 10);
|
|
36839
37062
|
if (Number.isFinite(n)) gapWidthPct = n;
|
|
@@ -36841,7 +37064,7 @@ const readChartSpec = (root) => {
|
|
|
36841
37064
|
}
|
|
36842
37065
|
const ovEl = firstChildElement(plotted, qname("c", "overlap", NS_C));
|
|
36843
37066
|
if (ovEl) {
|
|
36844
|
-
const v = getAttrValue(ovEl, ATTR_VAL$
|
|
37067
|
+
const v = getAttrValue(ovEl, ATTR_VAL$3);
|
|
36845
37068
|
if (v !== null) {
|
|
36846
37069
|
const n = Number.parseInt(v, 10);
|
|
36847
37070
|
if (Number.isFinite(n)) overlapPct = n;
|
|
@@ -36861,7 +37084,7 @@ const readChartSpec = (root) => {
|
|
|
36861
37084
|
const readTickMarkLocal = (axis, local) => {
|
|
36862
37085
|
const el = firstChildElement(axis, qname("c", local, NS_C));
|
|
36863
37086
|
if (!el) return void 0;
|
|
36864
|
-
const v = getAttrValue(el, ATTR_VAL$
|
|
37087
|
+
const v = getAttrValue(el, ATTR_VAL$3);
|
|
36865
37088
|
if (v === "in" || v === "out" || v === "cross" || v === "none") return v;
|
|
36866
37089
|
};
|
|
36867
37090
|
const readTickMark = (axis) => readTickMarkLocal(axis, "majorTickMark");
|
|
@@ -36900,7 +37123,7 @@ const readChartSpec = (root) => {
|
|
|
36900
37123
|
if (!solid) return void 0;
|
|
36901
37124
|
const srgb = firstChildElement(solid, NAME_SRGB_CLR);
|
|
36902
37125
|
if (!srgb) return void 0;
|
|
36903
|
-
const v = getAttrValue(srgb, ATTR_VAL$
|
|
37126
|
+
const v = getAttrValue(srgb, ATTR_VAL$3);
|
|
36904
37127
|
return v !== null ? `#${v.toUpperCase()}` : void 0;
|
|
36905
37128
|
};
|
|
36906
37129
|
const readLineWidthEmu = (host) => {
|
|
@@ -36919,14 +37142,14 @@ const readChartSpec = (root) => {
|
|
|
36919
37142
|
if (!solid) return void 0;
|
|
36920
37143
|
const srgb = firstChildElement(solid, NAME_SRGB_CLR);
|
|
36921
37144
|
if (!srgb) return void 0;
|
|
36922
|
-
const v = getAttrValue(srgb, ATTR_VAL$
|
|
37145
|
+
const v = getAttrValue(srgb, ATTR_VAL$3);
|
|
36923
37146
|
return v !== null ? `#${v.toUpperCase()}` : void 0;
|
|
36924
37147
|
};
|
|
36925
37148
|
const catAx = xValAx ?? findFirst(plotArea, ["catAx", "dateAx"]);
|
|
36926
37149
|
const isHidden = (axis) => {
|
|
36927
37150
|
const d = firstChildElement(axis, qname("c", "delete", NS_C));
|
|
36928
37151
|
if (!d) return void 0;
|
|
36929
|
-
const v = getAttrValue(d, ATTR_VAL$
|
|
37152
|
+
const v = getAttrValue(d, ATTR_VAL$3);
|
|
36930
37153
|
return v === null || v === "1" || v === "true";
|
|
36931
37154
|
};
|
|
36932
37155
|
let categoryAxisOrientation;
|
|
@@ -36939,7 +37162,7 @@ const readChartSpec = (root) => {
|
|
|
36939
37162
|
if (!scaling) return void 0;
|
|
36940
37163
|
const orientationEl = firstChildElement(scaling, qname("c", "orientation", NS_C));
|
|
36941
37164
|
if (!orientationEl) return void 0;
|
|
36942
|
-
const v = getAttrValue(orientationEl, ATTR_VAL$
|
|
37165
|
+
const v = getAttrValue(orientationEl, ATTR_VAL$3);
|
|
36943
37166
|
if (v === "minMax" || v === "maxMin") return v;
|
|
36944
37167
|
};
|
|
36945
37168
|
if (catAx) {
|
|
@@ -36982,7 +37205,7 @@ const readChartSpec = (root) => {
|
|
|
36982
37205
|
categoryAxisMinorTickMark = readTickMarkLocal(catAx, "minorTickMark");
|
|
36983
37206
|
const skipEl = firstChildElement(catAx, qname("c", "tickLblSkip", NS_C));
|
|
36984
37207
|
if (skipEl) {
|
|
36985
|
-
const v = getAttrValue(skipEl, ATTR_VAL$
|
|
37208
|
+
const v = getAttrValue(skipEl, ATTR_VAL$3);
|
|
36986
37209
|
if (v !== null) {
|
|
36987
37210
|
const n = Number.parseInt(v, 10);
|
|
36988
37211
|
if (Number.isFinite(n) && n > 1) categoryAxisTickLabelSkip = n;
|
|
@@ -36990,7 +37213,7 @@ const readChartSpec = (root) => {
|
|
|
36990
37213
|
}
|
|
36991
37214
|
const markSkipEl = firstChildElement(catAx, qname("c", "tickMarkSkip", NS_C));
|
|
36992
37215
|
if (markSkipEl) {
|
|
36993
|
-
const v = getAttrValue(markSkipEl, ATTR_VAL$
|
|
37216
|
+
const v = getAttrValue(markSkipEl, ATTR_VAL$3);
|
|
36994
37217
|
if (v !== null) {
|
|
36995
37218
|
const n = Number.parseInt(v, 10);
|
|
36996
37219
|
if (Number.isFinite(n) && n > 1) categoryAxisTickMarkSkip = n;
|
|
@@ -36998,12 +37221,12 @@ const readChartSpec = (root) => {
|
|
|
36998
37221
|
}
|
|
36999
37222
|
const posEl = firstChildElement(catAx, qname("c", "tickLblPos", NS_C));
|
|
37000
37223
|
if (posEl) {
|
|
37001
|
-
const v = getAttrValue(posEl, ATTR_VAL$
|
|
37224
|
+
const v = getAttrValue(posEl, ATTR_VAL$3);
|
|
37002
37225
|
if (v === "none" || v === "low" || v === "high" || v === "nextTo") categoryAxisTickLabelPos = v;
|
|
37003
37226
|
}
|
|
37004
37227
|
const lblOffsetEl = firstChildElement(catAx, qname("c", "lblOffset", NS_C));
|
|
37005
37228
|
if (lblOffsetEl) {
|
|
37006
|
-
const v = getAttrValue(lblOffsetEl, ATTR_VAL$
|
|
37229
|
+
const v = getAttrValue(lblOffsetEl, ATTR_VAL$3);
|
|
37007
37230
|
if (v !== null) {
|
|
37008
37231
|
const n = Number.parseInt(v, 10);
|
|
37009
37232
|
if (Number.isFinite(n) && n !== 100) categoryAxisLabelOffset = n;
|
|
@@ -37011,7 +37234,7 @@ const readChartSpec = (root) => {
|
|
|
37011
37234
|
}
|
|
37012
37235
|
const lblAlgnEl = firstChildElement(catAx, qname("c", "lblAlgn", NS_C));
|
|
37013
37236
|
if (lblAlgnEl) {
|
|
37014
|
-
const v = getAttrValue(lblAlgnEl, ATTR_VAL$
|
|
37237
|
+
const v = getAttrValue(lblAlgnEl, ATTR_VAL$3);
|
|
37015
37238
|
if (v === "ctr" || v === "l" || v === "r") categoryAxisLabelAlign = v;
|
|
37016
37239
|
}
|
|
37017
37240
|
const catNumFmtEl = firstChildElement(catAx, qname("c", "numFmt", NS_C));
|
|
@@ -37021,7 +37244,7 @@ const readChartSpec = (root) => {
|
|
|
37021
37244
|
}
|
|
37022
37245
|
const noMultiLvlEl = firstChildElement(catAx, qname("c", "noMultiLvlLbl", NS_C));
|
|
37023
37246
|
if (noMultiLvlEl) {
|
|
37024
|
-
const v = getAttrValue(noMultiLvlEl, ATTR_VAL$
|
|
37247
|
+
const v = getAttrValue(noMultiLvlEl, ATTR_VAL$3);
|
|
37025
37248
|
if (v === "1" || v === "true") categoryAxisNoMultiLevelLabel = true;
|
|
37026
37249
|
}
|
|
37027
37250
|
}
|
|
@@ -37056,12 +37279,12 @@ const readChartSpec = (root) => {
|
|
|
37056
37279
|
valueAxisMinorTickMark = readTickMarkLocal(valAx, "minorTickMark");
|
|
37057
37280
|
const valPosEl = firstChildElement(valAx, qname("c", "tickLblPos", NS_C));
|
|
37058
37281
|
if (valPosEl) {
|
|
37059
|
-
const v = getAttrValue(valPosEl, ATTR_VAL$
|
|
37282
|
+
const v = getAttrValue(valPosEl, ATTR_VAL$3);
|
|
37060
37283
|
if (v === "none" || v === "low" || v === "high" || v === "nextTo") valueAxisTickLabelPos = v;
|
|
37061
37284
|
}
|
|
37062
37285
|
const crossesAtEl = firstChildElement(valAx, qname("c", "crossesAt", NS_C));
|
|
37063
37286
|
if (crossesAtEl) {
|
|
37064
|
-
const v = getAttrValue(crossesAtEl, ATTR_VAL$
|
|
37287
|
+
const v = getAttrValue(crossesAtEl, ATTR_VAL$3);
|
|
37065
37288
|
if (v !== null) {
|
|
37066
37289
|
const n = Number.parseFloat(v);
|
|
37067
37290
|
if (Number.isFinite(n)) valueAxisCrosses = { at: n };
|
|
@@ -37069,13 +37292,13 @@ const readChartSpec = (root) => {
|
|
|
37069
37292
|
} else {
|
|
37070
37293
|
const crossesEl = firstChildElement(valAx, qname("c", "crosses", NS_C));
|
|
37071
37294
|
if (crossesEl) {
|
|
37072
|
-
const v = getAttrValue(crossesEl, ATTR_VAL$
|
|
37295
|
+
const v = getAttrValue(crossesEl, ATTR_VAL$3);
|
|
37073
37296
|
if (v === "autoZero" || v === "min" || v === "max") valueAxisCrosses = v;
|
|
37074
37297
|
}
|
|
37075
37298
|
}
|
|
37076
37299
|
const crossBetweenEl = firstChildElement(valAx, qname("c", "crossBetween", NS_C));
|
|
37077
37300
|
if (crossBetweenEl) {
|
|
37078
|
-
const v = getAttrValue(crossBetweenEl, ATTR_VAL$
|
|
37301
|
+
const v = getAttrValue(crossBetweenEl, ATTR_VAL$3);
|
|
37079
37302
|
if (v === "between" || v === "midCat") valueAxisCrossBetween = v;
|
|
37080
37303
|
}
|
|
37081
37304
|
const majorGl = firstChildElement(valAx, qname("c", "majorGridlines", NS_C));
|
|
@@ -37107,10 +37330,10 @@ const readChartSpec = (root) => {
|
|
|
37107
37330
|
const majorTickMark = readTickMark(secValAx);
|
|
37108
37331
|
const minorTickMark = readTickMarkLocal(secValAx, "minorTickMark");
|
|
37109
37332
|
const secPosEl = firstChildElement(secValAx, qname("c", "tickLblPos", NS_C));
|
|
37110
|
-
const secPos = secPosEl !== null ? getAttrValue(secPosEl, ATTR_VAL$
|
|
37333
|
+
const secPos = secPosEl !== null ? getAttrValue(secPosEl, ATTR_VAL$3) : null;
|
|
37111
37334
|
const tickLabelPos = secPos === "none" || secPos === "low" || secPos === "high" || secPos === "nextTo" ? secPos : void 0;
|
|
37112
37335
|
const crossBetweenEl = firstChildElement(secValAx, qname("c", "crossBetween", NS_C));
|
|
37113
|
-
const cb = crossBetweenEl !== null ? getAttrValue(crossBetweenEl, ATTR_VAL$
|
|
37336
|
+
const cb = crossBetweenEl !== null ? getAttrValue(crossBetweenEl, ATTR_VAL$3) : null;
|
|
37114
37337
|
const crossBetween = cb === "between" || cb === "midCat" ? cb : void 0;
|
|
37115
37338
|
const fields = {
|
|
37116
37339
|
...scaling !== void 0 ? { scaling } : {},
|
|
@@ -37136,7 +37359,7 @@ const readChartSpec = (root) => {
|
|
|
37136
37359
|
if (!solid) return void 0;
|
|
37137
37360
|
const srgb = firstChildElement(solid, NAME_SRGB_CLR);
|
|
37138
37361
|
if (!srgb) return void 0;
|
|
37139
|
-
const v = getAttrValue(srgb, ATTR_VAL$
|
|
37362
|
+
const v = getAttrValue(srgb, ATTR_VAL$3);
|
|
37140
37363
|
return v !== null ? `#${v.toUpperCase()}` : void 0;
|
|
37141
37364
|
};
|
|
37142
37365
|
const readSpPrStrokeColor = (parent) => {
|
|
@@ -37148,7 +37371,7 @@ const readChartSpec = (root) => {
|
|
|
37148
37371
|
if (!solid) return void 0;
|
|
37149
37372
|
const srgb = firstChildElement(solid, NAME_SRGB_CLR);
|
|
37150
37373
|
if (!srgb) return void 0;
|
|
37151
|
-
const v = getAttrValue(srgb, ATTR_VAL$
|
|
37374
|
+
const v = getAttrValue(srgb, ATTR_VAL$3);
|
|
37152
37375
|
return v !== null ? `#${v.toUpperCase()}` : void 0;
|
|
37153
37376
|
};
|
|
37154
37377
|
const plotAreaFill = readSpPrFill(plotArea);
|
|
@@ -37158,25 +37381,25 @@ const readChartSpec = (root) => {
|
|
|
37158
37381
|
let dispBlanksAs;
|
|
37159
37382
|
const dbaEl = firstChildElement(chart, qname("c", "dispBlanksAs", NS_C));
|
|
37160
37383
|
if (dbaEl) {
|
|
37161
|
-
const v = getAttrValue(dbaEl, ATTR_VAL$
|
|
37384
|
+
const v = getAttrValue(dbaEl, ATTR_VAL$3);
|
|
37162
37385
|
if (v === "gap" || v === "zero" || v === "span") dispBlanksAs = v;
|
|
37163
37386
|
}
|
|
37164
37387
|
let plotVisibleCellsOnly;
|
|
37165
37388
|
const pvoEl = firstChildElement(chart, qname("c", "plotVisOnly", NS_C));
|
|
37166
37389
|
if (pvoEl) {
|
|
37167
|
-
const v = getAttrValue(pvoEl, ATTR_VAL$
|
|
37390
|
+
const v = getAttrValue(pvoEl, ATTR_VAL$3);
|
|
37168
37391
|
if (v === "0" || v === "false") plotVisibleCellsOnly = false;
|
|
37169
37392
|
}
|
|
37170
37393
|
let roundedCorners;
|
|
37171
37394
|
const rcEl = firstChildElement(root, qname("c", "roundedCorners", NS_C));
|
|
37172
37395
|
if (rcEl) {
|
|
37173
|
-
const v = getAttrValue(rcEl, ATTR_VAL$
|
|
37396
|
+
const v = getAttrValue(rcEl, ATTR_VAL$3);
|
|
37174
37397
|
if (v === "1" || v === "true") roundedCorners = true;
|
|
37175
37398
|
}
|
|
37176
37399
|
let chartStyle;
|
|
37177
37400
|
const styleEl = firstChildElement(root, qname("c", "style", NS_C));
|
|
37178
37401
|
if (styleEl) {
|
|
37179
|
-
const v = getAttrValue(styleEl, ATTR_VAL$
|
|
37402
|
+
const v = getAttrValue(styleEl, ATTR_VAL$3);
|
|
37180
37403
|
if (v !== null) {
|
|
37181
37404
|
const n = Number.parseInt(v, 10);
|
|
37182
37405
|
if (Number.isFinite(n) && n >= 1 && n <= 48) chartStyle = n;
|
|
@@ -37185,22 +37408,22 @@ const readChartSpec = (root) => {
|
|
|
37185
37408
|
let language;
|
|
37186
37409
|
const langEl = firstChildElement(root, qname("c", "lang", NS_C));
|
|
37187
37410
|
if (langEl) {
|
|
37188
|
-
const v = getAttrValue(langEl, ATTR_VAL$
|
|
37411
|
+
const v = getAttrValue(langEl, ATTR_VAL$3);
|
|
37189
37412
|
if (v !== null && v.length > 0) language = v;
|
|
37190
37413
|
}
|
|
37191
37414
|
let date1904;
|
|
37192
37415
|
const dateEl = firstChildElement(root, qname("c", "date1904", NS_C));
|
|
37193
37416
|
if (dateEl) {
|
|
37194
|
-
const v = getAttrValue(dateEl, ATTR_VAL$
|
|
37417
|
+
const v = getAttrValue(dateEl, ATTR_VAL$3);
|
|
37195
37418
|
if (v === "1" || v === "true") date1904 = true;
|
|
37196
37419
|
}
|
|
37197
37420
|
let legend;
|
|
37198
37421
|
const legendEl = firstChildElement(chart, qname("c", "legend", NS_C));
|
|
37199
37422
|
if (legendEl) {
|
|
37200
37423
|
const posEl = firstChildElement(legendEl, qname("c", "legendPos", NS_C));
|
|
37201
|
-
const tok = posEl ? getAttrValue(posEl, ATTR_VAL$
|
|
37424
|
+
const tok = posEl ? getAttrValue(posEl, ATTR_VAL$3) : null;
|
|
37202
37425
|
const ovEl = firstChildElement(legendEl, qname("c", "overlay", NS_C));
|
|
37203
|
-
const overlay = ovEl ? getAttrValue(ovEl, ATTR_VAL$
|
|
37426
|
+
const overlay = ovEl ? getAttrValue(ovEl, ATTR_VAL$3) !== "0" : false;
|
|
37204
37427
|
const txPr = firstChildElement(legendEl, qname("c", "txPr", NS_C));
|
|
37205
37428
|
const textStyle = txPr ? readLabelStyle(txPr) : void 0;
|
|
37206
37429
|
const hiddenIndices = [];
|
|
@@ -37209,9 +37432,9 @@ const readChartSpec = (root) => {
|
|
|
37209
37432
|
const idxEl = firstChildElement(c, qname("c", "idx", NS_C));
|
|
37210
37433
|
const delEl = firstChildElement(c, qname("c", "delete", NS_C));
|
|
37211
37434
|
if (!idxEl || !delEl) continue;
|
|
37212
|
-
const delV = getAttrValue(delEl, ATTR_VAL$
|
|
37435
|
+
const delV = getAttrValue(delEl, ATTR_VAL$3);
|
|
37213
37436
|
if (!(delV === null || delV === "1" || delV === "true")) continue;
|
|
37214
|
-
const idxV = getAttrValue(idxEl, ATTR_VAL$
|
|
37437
|
+
const idxV = getAttrValue(idxEl, ATTR_VAL$3);
|
|
37215
37438
|
if (idxV === null) continue;
|
|
37216
37439
|
const n = Number.parseInt(idxV, 10);
|
|
37217
37440
|
if (Number.isFinite(n) && n >= 0) hiddenIndices.push(n);
|
|
@@ -37229,21 +37452,21 @@ const readChartSpec = (root) => {
|
|
|
37229
37452
|
let varyColors;
|
|
37230
37453
|
const vcEl = firstChildElement(plotted, qname("c", "varyColors", NS_C));
|
|
37231
37454
|
if (vcEl) {
|
|
37232
|
-
const v = getAttrValue(vcEl, ATTR_VAL$
|
|
37455
|
+
const v = getAttrValue(vcEl, ATTR_VAL$3);
|
|
37233
37456
|
varyColors = v === null || v === "1" || v === "true";
|
|
37234
37457
|
}
|
|
37235
37458
|
let titleOverlay;
|
|
37236
37459
|
const titleEl = firstChildElement(chart, NAME_TITLE);
|
|
37237
37460
|
if (titleEl) {
|
|
37238
37461
|
const ovEl = firstChildElement(titleEl, qname("c", "overlay", NS_C));
|
|
37239
|
-
if (ovEl) titleOverlay = getAttrValue(ovEl, ATTR_VAL$
|
|
37462
|
+
if (ovEl) titleOverlay = getAttrValue(ovEl, ATTR_VAL$3) !== "0";
|
|
37240
37463
|
}
|
|
37241
37464
|
let firstSliceAngleDeg;
|
|
37242
37465
|
let holeSizePct;
|
|
37243
37466
|
if (kind === "pie" || kind === "doughnut") {
|
|
37244
37467
|
const fsAng = firstChildElement(plotted, qname("c", "firstSliceAng", NS_C));
|
|
37245
37468
|
if (fsAng) {
|
|
37246
|
-
const v = getAttrValue(fsAng, ATTR_VAL$
|
|
37469
|
+
const v = getAttrValue(fsAng, ATTR_VAL$3);
|
|
37247
37470
|
if (v !== null) {
|
|
37248
37471
|
const n = Number.parseInt(v, 10);
|
|
37249
37472
|
if (Number.isFinite(n)) firstSliceAngleDeg = (n % 360 + 360) % 360;
|
|
@@ -37252,7 +37475,7 @@ const readChartSpec = (root) => {
|
|
|
37252
37475
|
if (kind === "doughnut") {
|
|
37253
37476
|
const hs = firstChildElement(plotted, qname("c", "holeSize", NS_C));
|
|
37254
37477
|
if (hs) {
|
|
37255
|
-
const v = getAttrValue(hs, ATTR_VAL$
|
|
37478
|
+
const v = getAttrValue(hs, ATTR_VAL$3);
|
|
37256
37479
|
if (v !== null) {
|
|
37257
37480
|
const n = Number.parseInt(v, 10);
|
|
37258
37481
|
if (Number.isFinite(n)) holeSizePct = Math.max(10, Math.min(90, n));
|
|
@@ -37267,19 +37490,19 @@ const readChartSpec = (root) => {
|
|
|
37267
37490
|
if (kind === "scatter") {
|
|
37268
37491
|
const el = firstChildElement(plotted, qname("c", "scatterStyle", NS_C));
|
|
37269
37492
|
if (el) {
|
|
37270
|
-
const v = getAttrValue(el, ATTR_VAL$
|
|
37493
|
+
const v = getAttrValue(el, ATTR_VAL$3);
|
|
37271
37494
|
if (v === "none" || v === "line" || v === "lineMarker" || v === "marker" || v === "smooth" || v === "smoothMarker") scatterStyle = v;
|
|
37272
37495
|
}
|
|
37273
37496
|
} else if (kind === "radar") {
|
|
37274
37497
|
const el = firstChildElement(plotted, qname("c", "radarStyle", NS_C));
|
|
37275
37498
|
if (el) {
|
|
37276
|
-
const v = getAttrValue(el, ATTR_VAL$
|
|
37499
|
+
const v = getAttrValue(el, ATTR_VAL$3);
|
|
37277
37500
|
if (v === "standard" || v === "marker" || v === "filled") radarStyle = v;
|
|
37278
37501
|
}
|
|
37279
37502
|
} else if (kind === "bubble") {
|
|
37280
37503
|
const bsEl = firstChildElement(plotted, qname("c", "bubbleScale", NS_C));
|
|
37281
37504
|
if (bsEl) {
|
|
37282
|
-
const v = getAttrValue(bsEl, ATTR_VAL$
|
|
37505
|
+
const v = getAttrValue(bsEl, ATTR_VAL$3);
|
|
37283
37506
|
if (v !== null) {
|
|
37284
37507
|
const n = Number.parseInt(v, 10);
|
|
37285
37508
|
if (Number.isFinite(n) && n >= 0) bubbleScale = Math.min(300, n);
|
|
@@ -37287,7 +37510,7 @@ const readChartSpec = (root) => {
|
|
|
37287
37510
|
}
|
|
37288
37511
|
const srEl = firstChildElement(plotted, qname("c", "sizeRepresents", NS_C));
|
|
37289
37512
|
if (srEl) {
|
|
37290
|
-
const v = getAttrValue(srEl, ATTR_VAL$
|
|
37513
|
+
const v = getAttrValue(srEl, ATTR_VAL$3);
|
|
37291
37514
|
if (v === "area") bubbleSizeRepresents = "area";
|
|
37292
37515
|
else if (v === "w") bubbleSizeRepresents = "width";
|
|
37293
37516
|
}
|
|
@@ -37767,7 +37990,7 @@ const NAME_NV_SP_PR = qname("p", "nvSpPr", NS.pml);
|
|
|
37767
37990
|
const NAME_NV_PR$2 = qname("p", "nvPr", NS.pml);
|
|
37768
37991
|
const NAME_PH = qname("p", "ph", NS.pml);
|
|
37769
37992
|
const ATTR_TYPE$1 = qname("", "type", "");
|
|
37770
|
-
const ATTR_IDX = qname("", "idx", "");
|
|
37993
|
+
const ATTR_IDX$1 = qname("", "idx", "");
|
|
37771
37994
|
/** The `<p:ph>` of a top-level `<p:sp>`, or `null` for anything else. */
|
|
37772
37995
|
const phOf = (node) => {
|
|
37773
37996
|
if (node.name.namespaceURI !== NS.pml || node.name.localName !== "sp") return null;
|
|
@@ -37786,7 +38009,7 @@ const placeholderIndices = (spTree) => {
|
|
|
37786
38009
|
for (const child of spTree.children) {
|
|
37787
38010
|
if (child.kind !== "element") continue;
|
|
37788
38011
|
const ph = phOf(child);
|
|
37789
|
-
const idx = ph && getAttrValue(ph, ATTR_IDX);
|
|
38012
|
+
const idx = ph && getAttrValue(ph, ATTR_IDX$1);
|
|
37790
38013
|
if (idx) out.push(Number(idx));
|
|
37791
38014
|
}
|
|
37792
38015
|
return out;
|
|
@@ -39911,15 +40134,227 @@ const setChartSpec = (chart, spec) => {
|
|
|
39911
40134
|
const chartPart = pkg.getPart(resolved.partName);
|
|
39912
40135
|
if (!chartPart) throw new Error(`setChartSpec: chart part ${resolved.partName} not found`);
|
|
39913
40136
|
chartPart.data = chartBytes;
|
|
39914
|
-
const
|
|
39915
|
-
if (
|
|
39916
|
-
|
|
39917
|
-
|
|
39918
|
-
|
|
39919
|
-
|
|
39920
|
-
|
|
40137
|
+
const workbook = embeddedWorkbookPart(pkg, resolved.partName);
|
|
40138
|
+
if (workbook) workbook.data = buildEmbeddedXlsx(layoutChartSheet(spec).grid);
|
|
40139
|
+
};
|
|
40140
|
+
const embeddedWorkbookPart = (pkg, chartPartName) => {
|
|
40141
|
+
const xlsxRel = pkg.getRels(chartPartName)?.items.find((r) => r.type === REL_TYPES.package);
|
|
40142
|
+
if (!xlsxRel || xlsxRel.targetMode === "External") return null;
|
|
40143
|
+
const xlsxName = xlsxRel.target.startsWith("/") ? partName(xlsxRel.target) : resolveTarget(chartPartName, xlsxRel.target);
|
|
40144
|
+
return pkg.getPart(xlsxName) ?? null;
|
|
40145
|
+
};
|
|
40146
|
+
const CHART_DATA_KINDS = new Set([
|
|
40147
|
+
"bar",
|
|
40148
|
+
"column",
|
|
40149
|
+
"line",
|
|
40150
|
+
"area",
|
|
40151
|
+
"pie",
|
|
40152
|
+
"doughnut"
|
|
40153
|
+
]);
|
|
40154
|
+
const isChartDataKind = (kind) => CHART_DATA_KINDS.has(kind);
|
|
40155
|
+
const NAME_C_PLOT_AREA = qname("c", "plotArea", NS.chart);
|
|
40156
|
+
const NAME_C_SER = qname("c", "ser", NS.chart);
|
|
40157
|
+
const NAME_C_TX = qname("c", "tx", NS.chart);
|
|
40158
|
+
const NAME_C_CAT = qname("c", "cat", NS.chart);
|
|
40159
|
+
const NAME_C_VAL = qname("c", "val", NS.chart);
|
|
40160
|
+
const NAME_C_F = qname("c", "f", NS.chart);
|
|
40161
|
+
const NAME_C_STR_REF = qname("c", "strRef", NS.chart);
|
|
40162
|
+
const NAME_C_STR_LIT = qname("c", "strLit", NS.chart);
|
|
40163
|
+
const NAME_C_STR_CACHE = qname("c", "strCache", NS.chart);
|
|
40164
|
+
const NAME_C_NUM_REF = qname("c", "numRef", NS.chart);
|
|
40165
|
+
const NAME_C_NUM_LIT = qname("c", "numLit", NS.chart);
|
|
40166
|
+
const NAME_C_NUM_CACHE = qname("c", "numCache", NS.chart);
|
|
40167
|
+
const NAME_C_MULTI_LVL_STR_REF = qname("c", "multiLvlStrRef", NS.chart);
|
|
40168
|
+
const NAME_C_MULTI_LVL_STR_CACHE = qname("c", "multiLvlStrCache", NS.chart);
|
|
40169
|
+
const NAME_C_LVL = qname("c", "lvl", NS.chart);
|
|
40170
|
+
const NAME_C_FORMAT_CODE = qname("c", "formatCode", NS.chart);
|
|
40171
|
+
const NAME_C_PT_COUNT = qname("c", "ptCount", NS.chart);
|
|
40172
|
+
const NAME_C_EXT_LST = qname("c", "extLst", NS.chart);
|
|
40173
|
+
const ATTR_VAL$2 = qname("", "val", "");
|
|
40174
|
+
const ATTR_IDX = qname("", "idx", "");
|
|
40175
|
+
/** A `c:` element named like `sibling`, so it uses the prefix the part already declares. */
|
|
40176
|
+
const chartElem = (sibling, localName, init = {}) => elem(qname(sibling.name.prefix, localName, NS.chart), init);
|
|
40177
|
+
const setFormula = (ref, formula) => {
|
|
40178
|
+
const f = firstChildElement(ref, NAME_C_F);
|
|
40179
|
+
if (f) f.children = [text(formula)];
|
|
40180
|
+
};
|
|
40181
|
+
const setCachePoints = (cache, points) => {
|
|
40182
|
+
const formatCode = allChildElements(cache, NAME_C_FORMAT_CODE);
|
|
40183
|
+
const extLst = allChildElements(cache, NAME_C_EXT_LST);
|
|
40184
|
+
const ptCount = firstChildElement(cache, NAME_C_PT_COUNT) ?? chartElem(cache, "ptCount");
|
|
40185
|
+
ptCount.attrs = [attr(ATTR_VAL$2, String(points.length))];
|
|
40186
|
+
cache.children = [
|
|
40187
|
+
...formatCode,
|
|
40188
|
+
ptCount,
|
|
40189
|
+
...pointElems(cache, points),
|
|
40190
|
+
...extLst
|
|
40191
|
+
];
|
|
40192
|
+
};
|
|
40193
|
+
const pointElems = (sibling, points) => points.flatMap((point, i) => point === null ? [] : [chartElem(sibling, "pt", {
|
|
40194
|
+
attrs: [attr(ATTR_IDX, String(i))],
|
|
40195
|
+
children: [chartElem(sibling, "v", { children: [text(point)] })]
|
|
40196
|
+
})]);
|
|
40197
|
+
/**
|
|
40198
|
+
* Rewrites a `c:cat` / `c:val` / `c:tx` channel: its formula when `formula`
|
|
40199
|
+
* is given, its cached points when `points` is.
|
|
40200
|
+
*/
|
|
40201
|
+
const setChannel = (channel, formula, points) => {
|
|
40202
|
+
for (const [refName, cacheName] of [[NAME_C_STR_REF, NAME_C_STR_CACHE], [NAME_C_NUM_REF, NAME_C_NUM_CACHE]]) {
|
|
40203
|
+
const ref = firstChildElement(channel, refName);
|
|
40204
|
+
if (!ref) continue;
|
|
40205
|
+
if (formula !== null) setFormula(ref, formula);
|
|
40206
|
+
if (points !== null) {
|
|
40207
|
+
let cache = firstChildElement(ref, cacheName);
|
|
40208
|
+
if (!cache) {
|
|
40209
|
+
cache = chartElem(ref, cacheName.localName);
|
|
40210
|
+
ref.children.push(cache);
|
|
40211
|
+
}
|
|
40212
|
+
setCachePoints(cache, points);
|
|
39921
40213
|
}
|
|
40214
|
+
return;
|
|
40215
|
+
}
|
|
40216
|
+
const literal = firstChildElement(channel, NAME_C_STR_LIT) ?? firstChildElement(channel, NAME_C_NUM_LIT);
|
|
40217
|
+
if (literal && points !== null) setCachePoints(literal, points);
|
|
40218
|
+
const multiLevel = firstChildElement(channel, NAME_C_MULTI_LVL_STR_REF);
|
|
40219
|
+
if (!multiLevel) return;
|
|
40220
|
+
if (formula !== null) setFormula(multiLevel, formula);
|
|
40221
|
+
if (points !== null) setSingleLevelCache(multiLevel, points);
|
|
40222
|
+
};
|
|
40223
|
+
const setSingleLevelCache = (ref, points) => {
|
|
40224
|
+
const cache = firstChildElement(ref, NAME_C_MULTI_LVL_STR_CACHE) ?? chartElem(ref, "multiLvlStrCache");
|
|
40225
|
+
if (!ref.children.includes(cache)) ref.children.push(cache);
|
|
40226
|
+
const lvl = firstChildElement(cache, NAME_C_LVL) ?? chartElem(cache, "lvl");
|
|
40227
|
+
const ptCount = firstChildElement(cache, NAME_C_PT_COUNT) ?? chartElem(cache, "ptCount");
|
|
40228
|
+
ptCount.attrs = [attr(ATTR_VAL$2, String(points.length))];
|
|
40229
|
+
lvl.children = [...pointElems(cache, points), ...allChildElements(lvl, NAME_C_EXT_LST)];
|
|
40230
|
+
cache.children = [
|
|
40231
|
+
ptCount,
|
|
40232
|
+
lvl,
|
|
40233
|
+
...allChildElements(cache, NAME_C_EXT_LST)
|
|
40234
|
+
];
|
|
40235
|
+
};
|
|
40236
|
+
const isNumericChannel = (channel) => firstChildElement(channel, NAME_C_NUM_REF) !== null || firstChildElement(channel, NAME_C_NUM_LIT) !== null;
|
|
40237
|
+
/**
|
|
40238
|
+
* Replaces the data of a bar, column, line, area, pie or doughnut chart.
|
|
40239
|
+
*
|
|
40240
|
+
* When `kind` is the chart's own and `series` names the same series (in any
|
|
40241
|
+
* order), only the values change: everything else in the chart, its
|
|
40242
|
+
* formatting included, is kept. Changing `kind`, or adding, removing or
|
|
40243
|
+
* renaming a series, builds the chart again from its title, axis titles,
|
|
40244
|
+
* legend, series names and colors, and the rest of its formatting returns
|
|
40245
|
+
* to the defaults; to keep it, copy the series names exactly as they are
|
|
40246
|
+
* read. Each series needs one value per category: when changing
|
|
40247
|
+
* `categories`, pass every series with values of the same length. A pie or
|
|
40248
|
+
* doughnut chart takes exactly one series. On a date axis the categories
|
|
40249
|
+
* are read as date serial numbers (days since 1899-12-30, e.g. `"45292"`
|
|
40250
|
+
* for 2024-01-01) and must be passed the same way. The embedded workbook
|
|
40251
|
+
* is rewritten with the new data.
|
|
40252
|
+
*
|
|
40253
|
+
* Throws when the chart is of another kind (scatter, bubble, stock,
|
|
40254
|
+
* surface, radar, or one this library cannot read), when `categories` or
|
|
40255
|
+
* `series` is empty, when a series has more or fewer values than there are
|
|
40256
|
+
* categories, when a date-axis category is not a number, and when
|
|
40257
|
+
* categories change on a chart whose categories have several levels.
|
|
40258
|
+
*/
|
|
40259
|
+
const setChartData = (chart, data) => {
|
|
40260
|
+
const slide = chart.shape[SHAPE_SLIDE];
|
|
40261
|
+
const pkg = slide[INTERNAL_PACKAGE];
|
|
40262
|
+
const resolved = resolveChartPartName(slide, chart.shape);
|
|
40263
|
+
if (!resolved) throw new Error("setChartData: shape is not a chart graphic frame");
|
|
40264
|
+
const part = pkg.getPart(resolved.partName);
|
|
40265
|
+
if (!part) throw new Error(`setChartData: chart part ${resolved.partName} not found`);
|
|
40266
|
+
const doc = parseXml(decode$1(part.data));
|
|
40267
|
+
const current = readChartSpec(doc.root);
|
|
40268
|
+
if (current === null || !isChartDataKind(current.kind)) throw new Error(`setChartData: the data of ${current === null ? "this chart" : `a ${current.kind} chart`} cannot be replaced; build the chart again instead`);
|
|
40269
|
+
if (data.categories?.length === 0 || data.series?.length === 0) throw new Error("setChartData: categories and series must not be empty");
|
|
40270
|
+
const kind = data.kind ?? current.kind;
|
|
40271
|
+
const categories = data.categories ?? current.categories;
|
|
40272
|
+
const series = data.series ?? current.series;
|
|
40273
|
+
for (const s of series) {
|
|
40274
|
+
if (s.values.length !== categories.length) throw new Error(`setChartData: series "${s.name}" has ${s.values.length} values for ${categories.length} categories`);
|
|
40275
|
+
if (s.values.some((v) => v !== null && !Number.isFinite(v))) throw new Error(`setChartData: series "${s.name}" has a value that is not a finite number`);
|
|
40276
|
+
}
|
|
40277
|
+
const byName = new Map(series.map((s) => [s.name, s]));
|
|
40278
|
+
if (data.series !== void 0 && byName.size !== series.length) throw new Error("setChartData: series names must be distinct");
|
|
40279
|
+
const sameSeries = data.series === void 0 || new Set(current.series.map((s) => s.name)).size === series.length && current.series.every((s) => byName.has(s.name));
|
|
40280
|
+
if (kind !== current.kind || !sameSeries) {
|
|
40281
|
+
setChartSpec(chart, rebuiltChartSpec(current, kind, categories, series));
|
|
40282
|
+
return;
|
|
40283
|
+
}
|
|
40284
|
+
if (data.categories !== void 0 && current.categoryGroupLevels !== void 0) throw new Error("setChartData: the categories of a chart with several category levels cannot be replaced");
|
|
40285
|
+
const sers = childElements(firstChildElement(firstChildElement(doc.root, NAME_C_CHART), NAME_C_PLOT_AREA)).flatMap((group) => allChildElements(group, NAME_C_SER));
|
|
40286
|
+
const values = current.series.map((s) => data.series === void 0 ? s.values : byName.get(s.name).values);
|
|
40287
|
+
const numericCategories = sers.some((ser) => {
|
|
40288
|
+
const cat = firstChildElement(ser, NAME_C_CAT);
|
|
40289
|
+
return cat !== null && isNumericChannel(cat);
|
|
40290
|
+
});
|
|
40291
|
+
if (data.categories !== void 0 && numericCategories && categories.some((c) => !Number.isFinite(Number(c)) || c.trim() === "")) throw new Error("setChartData: this chart has numeric (date) categories; pass numbers");
|
|
40292
|
+
const workbook = embeddedWorkbookPart(pkg, resolved.partName);
|
|
40293
|
+
const layout = workbook ? layoutChartSheet({
|
|
40294
|
+
...current,
|
|
40295
|
+
categories,
|
|
40296
|
+
series: current.series.map((s, i) => ({
|
|
40297
|
+
...s,
|
|
40298
|
+
values: values[i]
|
|
40299
|
+
}))
|
|
40300
|
+
}) : null;
|
|
40301
|
+
sers.forEach((ser, i) => {
|
|
40302
|
+
const refs = layout?.series[i];
|
|
40303
|
+
const tx = firstChildElement(ser, NAME_C_TX);
|
|
40304
|
+
if (tx && refs) setChannel(tx, refs.name, null);
|
|
40305
|
+
let cat = firstChildElement(ser, NAME_C_CAT);
|
|
40306
|
+
const val = firstChildElement(ser, NAME_C_VAL);
|
|
40307
|
+
if (!val) throw new Error("setChartData: a series of this chart has no values");
|
|
40308
|
+
if (!cat && data.categories !== void 0) {
|
|
40309
|
+
cat = chartElem(ser, "cat", { children: [layout ? chartElem(ser, "strRef", { children: [chartElem(ser, "f"), chartElem(ser, "strCache")] }) : chartElem(ser, "strLit")] });
|
|
40310
|
+
ser.children.splice(ser.children.indexOf(val), 0, cat);
|
|
40311
|
+
}
|
|
40312
|
+
if (cat) setChannel(cat, layout?.categories ?? null, data.categories === void 0 ? null : isNumericChannel(cat) ? categories.map((c) => String(Number(c))) : categories);
|
|
40313
|
+
setChannel(val, refs?.values ?? null, data.series === void 0 ? null : values[i].map((v) => v === null ? null : String(v)));
|
|
40314
|
+
});
|
|
40315
|
+
part.data = encode$1(serializeXml(doc));
|
|
40316
|
+
if (workbook && layout) workbook.data = buildEmbeddedXlsx(layout.grid);
|
|
40317
|
+
};
|
|
40318
|
+
const rebuiltChartSpec = (current, kind, categories, series) => {
|
|
40319
|
+
const colors = new Map(current.series.map((s) => [s.name, s.color]));
|
|
40320
|
+
const plain = series.map(({ name, values }) => {
|
|
40321
|
+
const color = colors.get(name);
|
|
40322
|
+
return {
|
|
40323
|
+
name,
|
|
40324
|
+
values,
|
|
40325
|
+
...color !== void 0 ? { color } : {}
|
|
40326
|
+
};
|
|
40327
|
+
});
|
|
40328
|
+
const legend = current.legend && {
|
|
40329
|
+
position: current.legend.position,
|
|
40330
|
+
...current.legend.overlay !== void 0 ? { overlay: current.legend.overlay } : {},
|
|
40331
|
+
...current.legend.textStyle !== void 0 ? { textStyle: current.legend.textStyle } : {}
|
|
40332
|
+
};
|
|
40333
|
+
const common = {
|
|
40334
|
+
categories,
|
|
40335
|
+
...current.title !== void 0 ? { title: current.title } : {},
|
|
40336
|
+
...legend !== void 0 ? { legend } : {}
|
|
40337
|
+
};
|
|
40338
|
+
if (kind === "pie" || kind === "doughnut") {
|
|
40339
|
+
const [only, ...rest] = plain;
|
|
40340
|
+
if (only === void 0 || rest.length > 0) throw new Error(`setChartData: a ${kind} chart takes exactly one series`);
|
|
40341
|
+
return kind === "pie" ? {
|
|
40342
|
+
kind,
|
|
40343
|
+
...common,
|
|
40344
|
+
series: [only]
|
|
40345
|
+
} : {
|
|
40346
|
+
kind,
|
|
40347
|
+
...common,
|
|
40348
|
+
series: [only]
|
|
40349
|
+
};
|
|
39922
40350
|
}
|
|
40351
|
+
return {
|
|
40352
|
+
kind,
|
|
40353
|
+
...common,
|
|
40354
|
+
series: plain,
|
|
40355
|
+
...current.categoryAxisTitle !== void 0 ? { categoryAxisTitle: current.categoryAxisTitle } : {},
|
|
40356
|
+
...current.valueAxisTitle !== void 0 ? { valueAxisTitle: current.valueAxisTitle } : {}
|
|
40357
|
+
};
|
|
39923
40358
|
};
|
|
39924
40359
|
/**
|
|
39925
40360
|
* Returns every chart on the slide, with its `ChartSpec` parsed from
|
|
@@ -42948,6 +43383,7 @@ const validatePresentationPackage = (pkg) => {
|
|
|
42948
43383
|
const validatePresentation = (pres) => validatePresentationPackage(pres[INTERNAL_PACKAGE]);
|
|
42949
43384
|
//#endregion
|
|
42950
43385
|
//#region src/api/fn/package-introspection.ts
|
|
43386
|
+
const TEXT_DECODER = new TextDecoder();
|
|
42951
43387
|
/**
|
|
42952
43388
|
* Power-user escape hatch. Returns the underlying `OpcPackage`
|
|
42953
43389
|
* backing `pres`. Use this when you need to manipulate parts /
|
|
@@ -43003,45 +43439,69 @@ const getMediaParts = (pres) => {
|
|
|
43003
43439
|
});
|
|
43004
43440
|
return out;
|
|
43005
43441
|
};
|
|
43442
|
+
const ROOT_RELS = "/_rels/.rels";
|
|
43443
|
+
const RELS_PART = /^(.*)\/_rels\/([^/]+)\.rels$/;
|
|
43444
|
+
const resolveClamped = (source, target) => {
|
|
43445
|
+
if (target.startsWith("/")) return target;
|
|
43446
|
+
const segments = source.split("/").slice(1, -1);
|
|
43447
|
+
for (const seg of target.split("/")) if (seg === "..") segments.pop();
|
|
43448
|
+
else if (seg !== "." && seg.length > 0) segments.push(seg);
|
|
43449
|
+
return `/${segments.join("/")}`;
|
|
43450
|
+
};
|
|
43451
|
+
/** `/ppt/slides/_rels/slide1.xml.rels` → `/ppt/slides/slide1.xml`; `null` for other parts. */
|
|
43452
|
+
const relsSourceOf = (name) => {
|
|
43453
|
+
const m = RELS_PART.exec(name);
|
|
43454
|
+
return m ? `${m[1]}/${m[2]}` : null;
|
|
43455
|
+
};
|
|
43456
|
+
const existingPartName = (byName, target) => {
|
|
43457
|
+
const lower = target.toLowerCase();
|
|
43458
|
+
if (byName.has(lower)) return lower;
|
|
43459
|
+
try {
|
|
43460
|
+
const decoded = decodeURIComponent(target).toLowerCase();
|
|
43461
|
+
return byName.has(decoded) ? decoded : null;
|
|
43462
|
+
} catch {
|
|
43463
|
+
return null;
|
|
43464
|
+
}
|
|
43465
|
+
};
|
|
43006
43466
|
/**
|
|
43007
|
-
*
|
|
43008
|
-
*
|
|
43009
|
-
*
|
|
43467
|
+
* Lowercased names of the parts reachable from `/_rels/.rels` through
|
|
43468
|
+
* internal relationships (OPC part names compare case-insensitively), or
|
|
43469
|
+
* `null` when that does not reach `/ppt/presentation.xml`, since the
|
|
43470
|
+
* library opens the presentation part by name and the graph is then unusable.
|
|
43471
|
+
*/
|
|
43472
|
+
const reachablePartNames = (pkg) => {
|
|
43473
|
+
const byName = new Map(pkg.parts.map((p) => [p.name.toLowerCase(), p]));
|
|
43474
|
+
const reachable = /* @__PURE__ */ new Set();
|
|
43475
|
+
const queue = ["/"];
|
|
43476
|
+
while (queue.length > 0) {
|
|
43477
|
+
const source = queue.pop();
|
|
43478
|
+
const relsName = source === "/" ? ROOT_RELS : relsPartNameFor(source).toLowerCase();
|
|
43479
|
+
const relsPart = byName.get(relsName);
|
|
43480
|
+
if (!relsPart) continue;
|
|
43481
|
+
for (const rel of parseRels(TEXT_DECODER.decode(relsPart.data)).items) {
|
|
43482
|
+
if (rel.targetMode === "External" || rel.target === "") continue;
|
|
43483
|
+
const target = existingPartName(byName, resolveClamped(source, rel.target));
|
|
43484
|
+
if (target === null || reachable.has(target)) continue;
|
|
43485
|
+
reachable.add(target);
|
|
43486
|
+
queue.push(partName(target));
|
|
43487
|
+
}
|
|
43488
|
+
}
|
|
43489
|
+
return reachable.has(PRES_PART_NAME) ? reachable : null;
|
|
43490
|
+
};
|
|
43491
|
+
/**
|
|
43492
|
+
* Returns every media part that cannot be reached from the package root
|
|
43493
|
+
* through internal relationships — the media subset of what
|
|
43494
|
+
* `compactPackage` would remove. Non-destructive; the caller decides
|
|
43495
|
+
* whether to delete.
|
|
43010
43496
|
*
|
|
43011
43497
|
* Useful for audit UIs that want to surface bloat before cleaning,
|
|
43012
43498
|
* and for "is this asset still used?" checks.
|
|
43013
43499
|
*/
|
|
43014
43500
|
const getOrphanMediaPartNames = (pres) => {
|
|
43015
43501
|
const pkg = pres[INTERNAL_PACKAGE];
|
|
43016
|
-
const
|
|
43017
|
-
|
|
43018
|
-
|
|
43019
|
-
const dir = sourcePart.split("/").slice(0, -1);
|
|
43020
|
-
const segments = [];
|
|
43021
|
-
for (const seg of [...dir, ...target.split("/")]) if (seg === "..") segments.pop();
|
|
43022
|
-
else if (seg !== "." && seg.length > 0) segments.push(seg);
|
|
43023
|
-
return `/${segments.join("/")}`;
|
|
43024
|
-
};
|
|
43025
|
-
for (const part of pkg.parts) {
|
|
43026
|
-
if (!part.name.endsWith(".rels")) continue;
|
|
43027
|
-
const m = part.name.match(/^(.*)\/_rels\/(.+)\.rels$/);
|
|
43028
|
-
let sourceName;
|
|
43029
|
-
if (part.name === "/_rels/.rels") sourceName = "/";
|
|
43030
|
-
else if (m) sourceName = `${m[1]}/${m[2]}`;
|
|
43031
|
-
else continue;
|
|
43032
|
-
const sourceRels = sourceName === "/" ? pkg.rootRels() : pkg.getRels(sourceName);
|
|
43033
|
-
if (!sourceRels) continue;
|
|
43034
|
-
for (const rel of sourceRels.items) {
|
|
43035
|
-
if (rel.targetMode === "External") continue;
|
|
43036
|
-
referenced.add(resolve(sourceName, rel.target).toLowerCase());
|
|
43037
|
-
}
|
|
43038
|
-
}
|
|
43039
|
-
const out = [];
|
|
43040
|
-
for (const part of pkg.parts) {
|
|
43041
|
-
if (!part.name.startsWith("/ppt/media/")) continue;
|
|
43042
|
-
if (!referenced.has(part.name.toLowerCase())) out.push(part.name);
|
|
43043
|
-
}
|
|
43044
|
-
return out;
|
|
43502
|
+
const reachable = reachablePartNames(pkg);
|
|
43503
|
+
if (reachable === null) return [];
|
|
43504
|
+
return pkg.parts.filter((p) => p.name.startsWith("/ppt/media/") && !reachable.has(p.name.toLowerCase())).map((p) => p.name);
|
|
43045
43505
|
};
|
|
43046
43506
|
/**
|
|
43047
43507
|
* Returns every media part name the slide's rels reference
|
|
@@ -43052,19 +43512,11 @@ const getOrphanMediaPartNames = (pres) => {
|
|
|
43052
43512
|
const getSlideMediaPartNames = (slide) => {
|
|
43053
43513
|
const rels = slide[INTERNAL_PACKAGE].getRels(slide[SLIDE_PART_NAME]);
|
|
43054
43514
|
if (!rels) return [];
|
|
43055
|
-
const resolve = (sourcePart, target) => {
|
|
43056
|
-
if (target.startsWith("/")) return target;
|
|
43057
|
-
const dir = sourcePart.split("/").slice(0, -1);
|
|
43058
|
-
const segments = [];
|
|
43059
|
-
for (const seg of [...dir, ...target.split("/")]) if (seg === "..") segments.pop();
|
|
43060
|
-
else if (seg !== "." && seg.length > 0) segments.push(seg);
|
|
43061
|
-
return `/${segments.join("/")}`;
|
|
43062
|
-
};
|
|
43063
43515
|
const out = [];
|
|
43064
43516
|
const seen = /* @__PURE__ */ new Set();
|
|
43065
43517
|
for (const rel of rels.items) {
|
|
43066
43518
|
if (rel.targetMode === "External") continue;
|
|
43067
|
-
const resolved =
|
|
43519
|
+
const resolved = resolveClamped(slide[SLIDE_PART_NAME], rel.target);
|
|
43068
43520
|
if (!resolved.startsWith("/ppt/media/")) continue;
|
|
43069
43521
|
if (seen.has(resolved)) continue;
|
|
43070
43522
|
seen.add(resolved);
|
|
@@ -43082,64 +43534,37 @@ const getSlideMediaPartNames = (slide) => {
|
|
|
43082
43534
|
*/
|
|
43083
43535
|
const slidesUsingMediaPart = (pres, mediaPartName) => {
|
|
43084
43536
|
const pkg = pres[INTERNAL_PACKAGE];
|
|
43085
|
-
const resolve = (sourcePart, target) => {
|
|
43086
|
-
if (target.startsWith("/")) return target;
|
|
43087
|
-
const dir = sourcePart.split("/").slice(0, -1);
|
|
43088
|
-
const segments = [];
|
|
43089
|
-
for (const seg of [...dir, ...target.split("/")]) if (seg === "..") segments.pop();
|
|
43090
|
-
else if (seg !== "." && seg.length > 0) segments.push(seg);
|
|
43091
|
-
return `/${segments.join("/")}`;
|
|
43092
|
-
};
|
|
43093
43537
|
const out = [];
|
|
43094
43538
|
for (const slide of getSlides(pres)) {
|
|
43095
43539
|
const rels = pkg.getRels(slide[SLIDE_PART_NAME]);
|
|
43096
43540
|
if (!rels) continue;
|
|
43097
|
-
if (rels.items.some((r) => r.targetMode !== "External" &&
|
|
43541
|
+
if (rels.items.some((r) => r.targetMode !== "External" && resolveClamped(slide[SLIDE_PART_NAME], r.target) === mediaPartName)) out.push(slide);
|
|
43098
43542
|
}
|
|
43099
43543
|
return out;
|
|
43100
43544
|
};
|
|
43101
43545
|
/**
|
|
43102
|
-
* Removes
|
|
43103
|
-
*
|
|
43104
|
-
*
|
|
43546
|
+
* Removes every part that cannot be reached from the package root
|
|
43547
|
+
* (`/_rels/.rels`) through internal relationships, together with its
|
|
43548
|
+
* `.rels` part and its `[Content_Types].xml` override. Returns the
|
|
43549
|
+
* removed part names.
|
|
43105
43550
|
*
|
|
43106
|
-
*
|
|
43107
|
-
*
|
|
43108
|
-
*
|
|
43551
|
+
* `removeSlide` removes only the slide and its `.rels`, so the slide's
|
|
43552
|
+
* charts, embedded workbooks, notes slide, tags and media stay in the
|
|
43553
|
+
* package until this runs. Parts still in use — including layouts no
|
|
43554
|
+
* slide uses, which their master references — are kept. Any other part
|
|
43555
|
+
* nothing points at, such as custom data added without a relationship, is
|
|
43556
|
+
* removed too. When `/_rels/.rels` does not reach `/ppt/presentation.xml`,
|
|
43557
|
+
* nothing is removed.
|
|
43109
43558
|
*/
|
|
43110
43559
|
const compactPackage = (pres) => {
|
|
43111
43560
|
const pkg = pres[INTERNAL_PACKAGE];
|
|
43112
|
-
const
|
|
43113
|
-
|
|
43114
|
-
|
|
43115
|
-
const
|
|
43116
|
-
|
|
43117
|
-
|
|
43118
|
-
|
|
43119
|
-
return `/${segments.join("/")}`;
|
|
43120
|
-
};
|
|
43121
|
-
for (const part of pkg.parts) {
|
|
43122
|
-
if (!part.name.endsWith(".rels")) continue;
|
|
43123
|
-
let sourceName = part.name.replace("/_rels/", "/").replace(/\.rels$/, "");
|
|
43124
|
-
if (sourceName === "/" || sourceName === "") sourceName = "/";
|
|
43125
|
-
const rels = sourceName === "/" ? null : pkg.getRels(partName(sourceName));
|
|
43126
|
-
if (!rels) continue;
|
|
43127
|
-
for (const rel of rels.items) {
|
|
43128
|
-
if (rel.targetMode === "External") continue;
|
|
43129
|
-
referenced.add(resolve(sourceName, rel.target).toLowerCase());
|
|
43130
|
-
}
|
|
43131
|
-
}
|
|
43132
|
-
const removed = [];
|
|
43133
|
-
const orphans = [];
|
|
43134
|
-
for (const part of pkg.parts) {
|
|
43135
|
-
if (!part.name.startsWith("/ppt/media/")) continue;
|
|
43136
|
-
if (!referenced.has(part.name.toLowerCase())) orphans.push(part.name);
|
|
43137
|
-
}
|
|
43138
|
-
for (const name of orphans) {
|
|
43139
|
-
pkg.removePart(partName(name));
|
|
43140
|
-
removed.push(name);
|
|
43141
|
-
}
|
|
43142
|
-
return { removed };
|
|
43561
|
+
const reachable = reachablePartNames(pkg);
|
|
43562
|
+
if (reachable === null) return { removed: [] };
|
|
43563
|
+
return { removed: pkg.retainParts((part) => {
|
|
43564
|
+
const lower = part.name.toLowerCase();
|
|
43565
|
+
if (lower === ROOT_RELS) return true;
|
|
43566
|
+
return reachable.has(relsSourceOf(lower) ?? lower);
|
|
43567
|
+
}) };
|
|
43143
43568
|
};
|
|
43144
43569
|
/**
|
|
43145
43570
|
* Replaces the bytes of a media part in place. Returns `true` if the
|
|
@@ -53894,9 +54319,11 @@ const stripSlideReferences = (element, relIds) => {
|
|
|
53894
54319
|
* Links to this slide from other slides are cleared to prevent accidental
|
|
53895
54320
|
* retargeting when a slide part name is reused.
|
|
53896
54321
|
*
|
|
53897
|
-
*
|
|
53898
|
-
*
|
|
53899
|
-
* `
|
|
54322
|
+
* Parts the slide referenced (media, charts and their workbooks, the notes
|
|
54323
|
+
* slide, tags) are left in place because other slides may share them; call
|
|
54324
|
+
* `compactPackage` afterwards to drop the ones nothing references any more.
|
|
54325
|
+
* The freed `sldId` is NOT reused on subsequent `addSlide` calls (the
|
|
54326
|
+
* reference desktop app's quirk, see plan §Risks).
|
|
53900
54327
|
*/
|
|
53901
54328
|
const removeSlide = (pres, slide) => {
|
|
53902
54329
|
const pkg = pres[INTERNAL_PACKAGE];
|
|
@@ -55460,8 +55887,8 @@ const getShapeImageIntrinsicSize = (shape) => {
|
|
|
55460
55887
|
};
|
|
55461
55888
|
//#endregion
|
|
55462
55889
|
//#region src/api/index.ts
|
|
55463
|
-
const VERSION = "0.
|
|
55890
|
+
const VERSION = "0.25.0";
|
|
55464
55891
|
//#endregion
|
|
55465
|
-
export { getHandoutMasterPlaceholders as $, findSlidesByLayoutPartName as $a, getShapeChartCategories as $c, getShapeStrokeCap as $i, getSlideLayouts as $l, findShapesByEffect as $n, getSlideNotesTextFormats as $o, getShapePlaceholderIdx as $r, getTableCellText3D as $s, replaceTextInNotes as $t, isShapeLocked as A, setParagraphBullet as Aa, getThumbnail as Ac, setShapeGradientFill as Ai, getSlideMasterShapes as Al, getShapeTextAutoFitParams as An, clearAllHyperlinks as Ao, getSlidesWithEmptyPlaceholders as Ar, getPresentationSummary as As, findSlidesByText as At, getSlideComments as Au, addSectionHeaderSlide as B, getSlideTitle as Ba, touchModified as Bc, setShapeStroke as Bi, setSlideLayoutBackground as Bl, setShapeText as Bn, getAllNotes as Bo, getMaxShapeIdInPresentation as Br, getTableBackgroundEffective as Bs, getSlideIndex as Bt, savePresentation as Bu, ungroupShapes as C, getShapeRunClickAction as Ca, setTableCellTextDirection as Cc, getShapePatternFill as Ci, getSlideLayoutBackgroundPatternFill as Cl, removeSlideAnimation as Cn, SLIDE_SIZE_16_10 as Co, findSlidePlaceholders as Cr, getShapeMediaPlayback as Cs, setSlideMasterPreserved as Ct, getCommentStatus as Cu, setShapeTextLanguage as D, getShapeRunText as Da, setTableStyleFlags as Dc, setShapeAdjustValues as Di, getSlideMasterBackgroundGradientFill as Dl, getShapeText3D as Dn, getSlideSize as Do, getShapesBounds as Dr, getMediaParts as Ds, findSlideByText as Dt, getPresentationCommentCountsBySlide as Du, getShapeTextLanguage as E, getShapeRunHyperlinkTooltip as Ea, setTableRowHeight as Ec, getShapeStrokeSketch as Ei, getSlideMasterBackground as El, getShapeBodyPrEffective as En, getPresentationFirstSlideNumber as Eo, getShapeXmlString as Er, compactPackage as Es, findSlideByPartName as Et, getPresentationCommentCountsByAuthor as Eu, resetSlideLayout as F, setParagraphTabs as Fa, getPresentationCreated as Fc, setShapePosition as Fi, setSlideBackgroundImageOpacity as Fl, getShapeTextMargins as Fn, findSlidesWithChartTrendlines as Fo, findShapesAtPoint as Fr, slidesUsingMediaPart as Fs, getPresentationTextLength as Ft, getPresentationTheme as Fu, duplicateSlideAt as G, findShapesWithAnimation as Ga, setShapeRunFormat as Gc, setShapeStrokeJoin as Gi, findSlideLayoutByPartName as Gl, setShapeTextColumns as Gn, getPresentationHyperlinkCountsBySlide as Go, getShapeBoundsResolved as Gr, getTableCellBorders as Gs, getSlideText as Gt, asColor as Gu, addSlideAt as H, setSlidePlaceholders as Ha, getShapeHyperlink as Hc, setShapeStrokeCap as Hi, setSlideLayoutPlaceholderBounds as Hl, setShapeTextAnchor as Hn, getDistinctHyperlinkUrls as Ho, getShapeAdjustValues as Hr, getTableCellAlignment as Hs, getSlideLayoutCount as Ht, BUILTIN_TABLE_STYLES as Hu, resetSlidePlaceholderGeometry as I, setParagraphTypography as Ia, getPresentationModified as Ic, setShapePreset as Ii, setSlideBackgroundPatternFill as Il, getShapeTextWrap as In, getAllCharts as Io, findShapesInRect as Ir, validatePresentation as Is, getPresentationTextLengthsBySlide as It, setPresentationFonts as Iu, moveSlide as J, setShapeAnimation as Ja, findChartsBySeriesName as Jc, getShapeFillColor as Ji, getSlideLayoutPartName$1 as Jl, setShapeTextFlat as Jn, getPresentationNotesText as Jo, getShapeDescription as Jr, getTableCellParagraphs as Js, getSlides as Jt, inches as Ju, importSlide as K, getShapeAnimation as Ka, addSlideChart as Kc, setShapeStrokeSketch as Ki, findSlideLayoutByType as Kl, setShapeTextDirection as Kn, getPresentationNotesLength as Ko, getShapeCenter as Kr, getTableCellFill as Ks, getSlideTextLength as Kt, cm as Ku, resetSlidePlaceholderTextFormatting as L, setShapeRunHyperlink as La, incrementRevision as Lc, setShapeRotation as Li, getShapeGradientFill as Ll, setShapeAlignment as Ln, getAllComments as Lo, getGroupChildren as Lr, clearTableCellFill as Ls, getShapeAt as Lt, setPresentationTheme as Lu, setShapeLocked as M, setParagraphLevel as Ma, setThumbnail as Mc, setShapeNoFill as Mi, setSlideBackgroundGradientFill as Ml, getShapeTextColumns as Mn, clearSlideHyperlinks as Mo, setSlideLayout as Mr, listPackageParts as Ms, getOutlineText as Mt, setCommentStatus as Mu, addMissingSlidePlaceholders as N, setParagraphLineSpacing as Na, getCoreProperties as Nc, setShapeNoStroke as Ni, setSlideBackgroundImage as Nl, getShapeTextDirection as Nn, findSlidesByHyperlink as No, translateShapes as Nr, readPackagePart as Ns, getPresentationShapeCountsBySlide as Nt, setCommentText as Nu, setShapeCustomGeometry as O, isParagraphBulletPicture as Oa, setTableStyleId as Oc, setShapeFill as Oi, getSlideMasterBackgroundImageBytes as Ol, getShapeTextAnchor as On, setSlideSize as Oo, getSlideLayout as Or, getOrphanMediaPartNames as Os, findSlideByTitle as Ot, getPresentationCommenters as Ou, addSlidePlaceholder as P, setParagraphSpacing as Pa, getExtendedProperties as Pc, setShapePatternFill as Pi, setSlideBackgroundImageFillLayout as Pl, getShapeTextFlat as Pn, findSlidesWithChartKind as Po, centerShapeOnSlide as Pr, setMediaPartBytes as Ps, getPresentationText as Pt, getPresentationFonts as Pu, swapSlides as Q, findSlidesByLayoutName as Qa, getPresentationChartKindCounts as Qc, getShapeStroke as Qi, getSlideLayoutUsageCountsByType as Ql, clearShapeEffects as Qn, getSlideNotesParagraphEndFormat as Qo, getShapeName as Qr, getTableCellText as Qs, isSlideLayoutBackgroundGraphicsHidden as Qt, addBlankSlide as R, setShapeRunText as Ra, setCoreProperties as Rc, setShapeSize as Ri, getShapeGradientFillEffective as Rl, setShapeBulletStyle as Rn, getAllHyperlinks as Ro, getGroupTransform as Rr, getPresentationTableCountsBySlide as Rs, getSlideAt as Rt, createPresentation as Ru, groupShapes as S, getShapeParagraphElements as Sa, setTableCellText as Sc, clearShapeStroke as Si, getSlideLayoutBackgroundImageBytes as Sl, moveSlideAnimation as Sn, setShapeImageRecolor as So, findSlidePlaceholderByIdx as Sr, getShapeMedia as Ss, setSlideMasterPlaceholderIncluded as St, getCommentSlide as Su, getParagraphElementLanguages as T, getShapeRunHyperlink as Ta, setTableColumnWidth as Tc, getShapeStrokeDash as Ti, getSlideLayoutShapes as Tl, appendShapeText as Tn, SLIDE_SIZE_4_3 as To, getShapeSlide as Tr, _internalPackageOf as Ts, setSlideSections as Tt, getCommentsSortedByDate as Tu, addTitleSlide as U, setSlideTitle as Ua, getShapeRunFormatEffective as Uc, setShapeStrokeCompound as Ui, findLayoutsWithPlaceholderType as Ul, setShapeTextAutoFit as Un, getEmptySlides as Uo, getShapeAltTitle as Ur, getTableCellAnchor as Us, getSlideOutline as Ut, BUILTIN_PICTURE_STYLES as Uu, addSlide as V, setSlideBody as Va, getParagraphPropertiesEffective as Vc, setShapeStrokeArrow as Vi, setSlideLayoutName as Vl, setShapeText3D as Vn, getAllTables as Vo, getPresetGeometry as Vr, getTableCell as Vs, getSlideInfo as Vt, COMMENT_STATUSES as Vu, duplicateSlide as W, clearSlideAnimations as Wa, setShapeHyperlink as Wc, setShapeStrokeDash as Wi, findSlideLayout as Wl, setShapeTextBodyRotationDeg as Wn, getHiddenSlides as Wo, getShapeBounds as Wr, getTableCellAppearanceEffective as Ws, getSlidePartName as Wt, toWritableTextFormat as Wu, reverseSlides as X, findOverlappingShapePairs as Xa, findChartsWithTrendlines as Xc, getShapeFillEffective as Xi, getSlideLayoutType as Xl, setShapeTextMargins as Xn, getSlideNotesLength as Xo, getShapeId as Xr, getTableCellRunFormatEffective as Xs, isSlideBackgroundGraphicsHidden as Xt, pt as Xu, removeSlide as Y, findFlippedShapes as Ya, findChartsWithDataLabels as Yc, getShapeFillColorResolved as Yi, getSlideLayoutPlaceholders as Yl, setShapeTextFormat as Yn, getSlideNotes as Yo, getShapeFlip as Yr, getTableCellPosition as Ys, getSlidesByLayout as Yt, mm as Yu, sortSlides as Z, findShapesOutsideCanvas as Za, getPresentationChartCountsBySlide as Zc, getShapeFillOpacity as Zi, getSlideLayoutUsageCounts as Zl, setShapeTextWrap as Zn, getSlideNotesLineBreaks as Zo, getShapeKind as Zr, getTableCellSpan as Zs, isSlideHidden as Zt, resetShapeVideoFormatting as _, getParagraphLevel as _a, setTableCellBorders as _c, setShapeBounds as _i, getSlideBackgroundImageOpacity as _l, getShapeZIndex as _n, resetShapeImageColorEffects as _o, findShapesByName as _r, getSlideTransitionSound as _s, removeSlideMaster as _t, getCommentAuthors as _u, getCollapsedOutlineSlides as a, getShapeStrokeJoin as aa, getTableSize as ac, getShapeText as ai, setChartSpec as al, setSlideBackgroundGraphicsHidden as an, getShapeImageBytes as ao, setShapeGlow as ar, getSlidesWithOverlap as as, setNotesMasterPlaceholderIncluded as at, setCustomShows as au, setShapeImageCompressionState as b, getShapeHyperlinkTooltip as ba, setTableCellMargins as bc, shapesOverlap as bi, getSlideLayoutBackground as bl, sendShapeToBack as bn, setShapeImageCrop as bo, findShapesWithHyperlinks as br, addSlideMedia as bs, setSlideLayoutTitleIncluded as bt, getCommentParent as bu, getGridSpacing as c, getShapeRunFormat as ca, insertTableColumn as cc, getSlideMasterPartNames as ci, applySlideBackgroundToAll as cl, addSlideImage as cn, getShapeImageDuotone as co, setShapeShadow as cr, hasSlideNotes as cs, setSlideShowProperties as ct, clearAllSlideComments as cu, setDrawingGuidesVisible as d, getParagraphAlignment as da, isTableShape as dc, isShapeHidden as di, getSlideBackground as dl, addSlideTable as dn, getShapeImageLinkUrl as do, findShapeById as dr, resolveSlideNotesTextColor as ds, addSlideMaster as dt, findCommentsAfter as du, getShapeStrokeColor as ea, getTableCellTextDirection as ec, getShapePlaceholderType as ei, getShapeChartKind as el, replaceTextInPresentation as en, findSlidesByLayoutType as eo, getShape3D as er, getSlidesWithCharts as es, getHandoutSlidesPerPage as et, getUnusedSlideLayouts as eu, setGridSpacing as f, getParagraphBullet as fa, mergeTableCells as fc, isShapePlaceholder as fi, getSlideBackgroundGradientFill as fl, addSlideTextBox as fn, getShapeImageOpacity as fo, findShapeByName as fr, setSlideNotes as fs, getSlideMasterLayouts as ft, findCommentsBefore as fu, setSlideMasterBackgroundStyle as g, getParagraphIndent as ga, setTableCellAnchor as gc, setShapeAltTitle as gi, getSlideBackgroundImageIntrinsicSize as gl, copyShape as gn, isShapeImageGrayscale as go, findShapesByKind as gr, getSlideTransition as gs, removeSlideLayout as gt, getCommentAuthor as gu, getSlideMasterBackgroundStyles as h, getParagraphEndFormat as ha, setTableCellAlignment as hc, renameShape as hi, getSlideBackgroundImageFillLayout as hl, clearSlideShapes as hn, hasShapeText as ho, findShapesByHyperlink as hr, clearSlideTransition as hs, isSlideMasterPreserved as ht, findSlidesWithCommentsByAuthor as hu, setShapeImageFillLayout as i, getShapeStrokeGradient as ia, getTableRowHeights as ic, getShapeSize as ii, getSlideCharts as il, searchSlides as in, getShapeImageBrightness as io, setShape3D as ir, getSlidesWithNotes as is, setHandoutSlidesPerPage as it, getCustomShows as iu, setShapeAspectRatioLocked as j, setParagraphIndent as ja, removeThumbnail as jc, setShapeImageFill as ji, setSlideBackground as jl, getShapeTextBodyRotationDeg as jn, clearAllSlideNotes as jo, replaceTokensInSlide as jr, getSlideMediaPartNames as js, getAllShapes as jt, removeSlideComment as ju, isShapeAspectRatioLocked as k, setParagraphAlignment as ka, splitTableCell as kc, setShapeFlip as ki, getSlideMasterBackgroundPatternFill as kl, getShapeTextAutoFit as kn, appendSlideNotes as ko, getSlideShapes as kr, getPackageSize as ks, findSlidesByNotes as kt, getSlideCommentAuthors as ku, getSnapToGrid as l, resolveDrawingColor as la, insertTableRow as lc, getSlideMasterUsageCounts as li, clearSlideBackground as ll, addSlideLine as ln, getShapeImageFillBytes as lo, setShapeSoftEdge as lr, removeSlideNotes as ls, addSlideLayout as lt, clearSlideComments as lu, setSnapToGrid as m, getParagraphBulletStyle as ma, removeTableRow as mc, pointInShape as mi, getSlideBackgroundImageCrop as ml, bringShapeToFront as mn, hasShapeImage as mo, findShapeInPresentation as mr, transformSlideNotesCase as ms, getSlideMasterPlaceholders as mt, findCommentsByText as mu, getShapeImageFillLayout as n, getShapeStrokeCompound as na, getTableColumnWidths as nc, getShapePreset as ni, getShapeChartSeriesValues as nl, replaceTextInSlideNotes as nn, getShapeImageArtisticEffect as no, getShapeEffects as nr, getSlidesWithHyperlinks as ns, getNotesPageSize as nt, getShapeClickAction as nu, getDrawingGuides as o, getShapeStrokeOpacity as oa, getTableStyleFlags as oc, getSlideMasterCount as oi, getEffectiveColorMap as ol, setSlideHidden as on, getShapeImageContrast as oo, setShapeInnerShadow as or, getSlidesWithTables as os, setNotesPageOrientation as ot, setShapeImage as ou, setSlideOutlineCollapsed as p, getParagraphBulletImageBytes as pa, removeTableColumn as pc, isShapeTextBox as pi, getSlideBackgroundImageBytes as pl, bringShapeForward as pn, getShapeImagePartName as po, findShapeByText as pr, setSlideNotesFormat as ps, getSlideMasterName as pt, findCommentsByAuthor as pu, mergePresentations as q, getSlideAnimations as qa, findChartByKind as qc, getShapeFill as qi, getSlideLayoutName as ql, setShapeTextField as qn, getPresentationNotesLengthsBySlide as qo, getShapeCustomGeometry as qr, getTableCellMargins as qs, getSlideXmlString as qt, emu as qu, getShapeImageIntrinsicSize as r, getShapeStrokeEffective as ra, getTableDimensions as rc, getShapeRotation as ri, getShapeChartSpec as rl, replaceTokensInPresentation as rn, getShapeImageBiLevelThreshold as ro, getShapeEffectsEffective as rr, getSlidesWithImages as rs, setHandoutMasterPlaceholderIncluded as rt, setShapeClickAction as ru, getDrawingGuidesVisible as s, getShapeStrokeWidth as sa, getTableStyleId as sc, getSlideMasterPartName as si, resolveDeckBodyTextColor as sl, slideHasAnimations as sn, getShapeImageCrop as so, setShapeReflection as sr, getVisibleSlides as ss, getSlideShowProperties as st, addSlideComment as su, VERSION as t, getShapeStrokeColorResolved as ta, getTableCells as tc, getShapePosition as ti, getShapeChartSeriesNames as tl, replaceTextInSlide as tn, getPresentationImageCountsBySlide as to, getShapeEffect as tr, getSlidesWithComments as ts, getNotesMasterPlaceholders as tt, isChartSpec as tu, setDrawingGuides as u, resolveDrawingColorOpacity as ua, isChartShape as uc, getUnusedSlideMasters as ui, copySlideBackground as ul, addSlideShape as un, getShapeImageFormat as uo, findEmptyPlaceholders as ur, replaceHyperlink as us, addSlideLayoutPlaceholder as ut, findCommentAuthorByName as uu, getShapeImageCompressionState as v, getParagraphLineSpacing as va, setTableCellClickAction as vc, setShapeDescription as vi, getSlideBackgroundPatternFill as vl, removeShape as vn, setShapeImageBrightness as vo, findShapesByPreset as vr, setSlideTransition as vs, setSlideLayoutBackgroundGraphicsHidden as vt, getCommentDate as vu, setShapeStyle as w, getShapeRunCount as wa, setTableCellTextFormat as wc, getShapeStrokeArrow as wi, getSlideLayoutBackgroundShapes as wl, updateSlideAnimation as wn, SLIDE_SIZE_16_9 as wo, getShapeIndex as wr, setShapeMediaPlayback as ws, getSlideSections as wt, getCommentText as wu, setShapePictureStyle as x, getShapeParagraphCount as xa, setTableCellParagraphs as xc, clearShapeFill as xi, getSlideLayoutBackgroundGradientFill as xl, setShapeZIndex as xn, setShapeImageOpacity as xo, findSlidePlaceholder as xr, findShapesWithMedia as xs, setSlideMasterName as xt, getCommentPosition as xu, getShapePictureStyle as y, getParagraphSpacing as ya, setTableCellFill as yc, setShapeHidden as yi, getSlideColorMapOverride as yl, sendShapeBackward as yn, setShapeImageContrast as yo, findShapesByText as yr, setSlideTransitionSound as ys, setSlideLayoutFootersIncluded as yt, getCommentFormat as yu, addContentSlide as z, getSlideBody as za, setExtendedProperties as zc, setShapeSlideBackgroundFill as zi, clearSlideLayoutBackground as zl, setShapeParagraphs as zn, getAllImages as zo, getMaxShapeId as zr, getSlideTables as zs, getSlideCount as zt, loadPresentation as zu };
|
|
55892
|
+
export { getHandoutMasterPlaceholders as $, findSlidesByLayoutPartName as $a, getShapeChartCategories as $c, getShapeStrokeCap as $i, getSlideLayoutUsageCountsByType as $l, findShapesByEffect as $n, getSlideNotesTextFormats as $o, getShapePlaceholderIdx as $r, getTableCellText3D as $s, replaceTextInNotes as $t, isShapeLocked as A, setParagraphBullet as Aa, getThumbnail as Ac, setShapeGradientFill as Ai, getSlideMasterBackgroundPatternFill as Al, getShapeTextAutoFitParams as An, clearAllHyperlinks as Ao, getSlidesWithEmptyPlaceholders as Ar, getPresentationSummary as As, findSlidesByText as At, getSlideCommentAuthors as Au, addSectionHeaderSlide as B, getSlideTitle as Ba, touchModified as Bc, setShapeStroke as Bi, clearSlideLayoutBackground as Bl, setShapeText as Bn, getAllNotes as Bo, getMaxShapeIdInPresentation as Br, getTableBackgroundEffective as Bs, getSlideIndex as Bt, loadPresentation as Bu, ungroupShapes as C, getShapeRunClickAction as Ca, setTableCellTextDirection as Cc, getShapePatternFill as Ci, getSlideLayoutBackgroundImageBytes as Cl, removeSlideAnimation as Cn, SLIDE_SIZE_16_10 as Co, findSlidePlaceholders as Cr, getShapeMediaPlayback as Cs, setSlideMasterPreserved as Ct, getCommentSlide as Cu, setShapeTextLanguage as D, getShapeRunText as Da, setTableStyleFlags as Dc, setShapeAdjustValues as Di, getSlideMasterBackground as Dl, getShapeText3D as Dn, getSlideSize as Do, getShapesBounds as Dr, getMediaParts as Ds, findSlideByText as Dt, getPresentationCommentCountsByAuthor as Du, getShapeTextLanguage as E, getShapeRunHyperlinkTooltip as Ea, setTableRowHeight as Ec, getShapeStrokeSketch as Ei, getSlideLayoutShapes as El, getShapeBodyPrEffective as En, getPresentationFirstSlideNumber as Eo, getShapeXmlString as Er, compactPackage as Es, findSlideByPartName as Et, getCommentsSortedByDate as Eu, resetSlideLayout as F, setParagraphTabs as Fa, getPresentationCreated as Fc, setShapePosition as Fi, setSlideBackgroundImageFillLayout as Fl, getShapeTextMargins as Fn, findSlidesWithChartTrendlines as Fo, findShapesAtPoint as Fr, slidesUsingMediaPart as Fs, getPresentationTextLength as Ft, getPresentationFonts as Fu, duplicateSlideAt as G, findShapesWithAnimation as Ga, setShapeRunFormat as Gc, setShapeStrokeJoin as Gi, findSlideLayout as Gl, setShapeTextColumns as Gn, getPresentationHyperlinkCountsBySlide as Go, getShapeBoundsResolved as Gr, getTableCellBorders as Gs, getSlideText as Gt, toWritableTextFormat as Gu, addSlideAt as H, setSlidePlaceholders as Ha, getShapeHyperlink as Hc, setShapeStrokeCap as Hi, setSlideLayoutName as Hl, setShapeTextAnchor as Hn, getDistinctHyperlinkUrls as Ho, getShapeAdjustValues as Hr, getTableCellAlignment as Hs, getSlideLayoutCount as Ht, COMMENT_STATUSES as Hu, resetSlidePlaceholderGeometry as I, setParagraphTypography as Ia, getPresentationModified as Ic, setShapePreset as Ii, setSlideBackgroundImageOpacity as Il, getShapeTextWrap as In, getAllCharts as Io, findShapesInRect as Ir, validatePresentation as Is, getPresentationTextLengthsBySlide as It, getPresentationTheme as Iu, moveSlide as J, setShapeAnimation as Ja, findChartsBySeriesName as Jc, getShapeFillColor as Ji, getSlideLayoutName as Jl, setShapeTextFlat as Jn, getPresentationNotesText as Jo, getShapeDescription as Jr, getTableCellParagraphs as Js, getSlides as Jt, emu as Ju, importSlide as K, getShapeAnimation as Ka, addSlideChart as Kc, setShapeStrokeSketch as Ki, findSlideLayoutByPartName as Kl, setShapeTextDirection as Kn, getPresentationNotesLength as Ko, getShapeCenter as Kr, getTableCellFill as Ks, getSlideTextLength as Kt, asColor as Ku, resetSlidePlaceholderTextFormatting as L, setShapeRunHyperlink as La, incrementRevision as Lc, setShapeRotation as Li, setSlideBackgroundPatternFill as Ll, setShapeAlignment as Ln, getAllComments as Lo, getGroupChildren as Lr, clearTableCellFill as Ls, getShapeAt as Lt, setPresentationFonts as Lu, setShapeLocked as M, setParagraphLevel as Ma, setThumbnail as Mc, setShapeNoFill as Mi, setSlideBackground as Ml, getShapeTextColumns as Mn, clearSlideHyperlinks as Mo, setSlideLayout as Mr, listPackageParts as Ms, getOutlineText as Mt, removeSlideComment as Mu, addMissingSlidePlaceholders as N, setParagraphLineSpacing as Na, getCoreProperties as Nc, setShapeNoStroke as Ni, setSlideBackgroundGradientFill as Nl, getShapeTextDirection as Nn, findSlidesByHyperlink as No, translateShapes as Nr, readPackagePart as Ns, getPresentationShapeCountsBySlide as Nt, setCommentStatus as Nu, setShapeCustomGeometry as O, isParagraphBulletPicture as Oa, setTableStyleId as Oc, setShapeFill as Oi, getSlideMasterBackgroundGradientFill as Ol, getShapeTextAnchor as On, setSlideSize as Oo, getSlideLayout as Or, getOrphanMediaPartNames as Os, findSlideByTitle as Ot, getPresentationCommentCountsBySlide as Ou, addSlidePlaceholder as P, setParagraphSpacing as Pa, getExtendedProperties as Pc, setShapePatternFill as Pi, setSlideBackgroundImage as Pl, getShapeTextFlat as Pn, findSlidesWithChartKind as Po, centerShapeOnSlide as Pr, setMediaPartBytes as Ps, getPresentationText as Pt, setCommentText as Pu, swapSlides as Q, findSlidesByLayoutName as Qa, getPresentationChartKindCounts as Qc, getShapeStroke as Qi, getSlideLayoutUsageCounts as Ql, clearShapeEffects as Qn, getSlideNotesParagraphEndFormat as Qo, getShapeName as Qr, getTableCellText as Qs, isSlideLayoutBackgroundGraphicsHidden as Qt, addBlankSlide as R, setShapeRunText as Ra, setCoreProperties as Rc, setShapeSize as Ri, getShapeGradientFill as Rl, setShapeBulletStyle as Rn, getAllHyperlinks as Ro, getGroupTransform as Rr, getPresentationTableCountsBySlide as Rs, getSlideAt as Rt, setPresentationTheme as Ru, groupShapes as S, getShapeParagraphElements as Sa, setTableCellText as Sc, clearShapeStroke as Si, getSlideLayoutBackgroundGradientFill as Sl, moveSlideAnimation as Sn, setShapeImageRecolor as So, findSlidePlaceholderByIdx as Sr, getShapeMedia as Ss, setSlideMasterPlaceholderIncluded as St, getCommentPosition as Su, getParagraphElementLanguages as T, getShapeRunHyperlink as Ta, setTableColumnWidth as Tc, getShapeStrokeDash as Ti, getSlideLayoutBackgroundShapes as Tl, appendShapeText as Tn, SLIDE_SIZE_4_3 as To, getShapeSlide as Tr, _internalPackageOf as Ts, setSlideSections as Tt, getCommentText as Tu, addTitleSlide as U, setSlideTitle as Ua, getShapeRunFormatEffective as Uc, setShapeStrokeCompound as Ui, setSlideLayoutPlaceholderBounds as Ul, setShapeTextAutoFit as Un, getEmptySlides as Uo, getShapeAltTitle as Ur, getTableCellAnchor as Us, getSlideOutline as Ut, BUILTIN_TABLE_STYLES as Uu, addSlide as V, setSlideBody as Va, getParagraphPropertiesEffective as Vc, setShapeStrokeArrow as Vi, setSlideLayoutBackground as Vl, setShapeText3D as Vn, getAllTables as Vo, getPresetGeometry as Vr, getTableCell as Vs, getSlideInfo as Vt, savePresentation as Vu, duplicateSlide as W, clearSlideAnimations as Wa, setShapeHyperlink as Wc, setShapeStrokeDash as Wi, findLayoutsWithPlaceholderType as Wl, setShapeTextBodyRotationDeg as Wn, getHiddenSlides as Wo, getShapeBounds as Wr, getTableCellAppearanceEffective as Ws, getSlidePartName as Wt, BUILTIN_PICTURE_STYLES as Wu, reverseSlides as X, findOverlappingShapePairs as Xa, findChartsWithTrendlines as Xc, getShapeFillEffective as Xi, getSlideLayoutPlaceholders as Xl, setShapeTextMargins as Xn, getSlideNotesLength as Xo, getShapeId as Xr, getTableCellRunFormatEffective as Xs, isSlideBackgroundGraphicsHidden as Xt, mm as Xu, removeSlide as Y, findFlippedShapes as Ya, findChartsWithDataLabels as Yc, getShapeFillColorResolved as Yi, getSlideLayoutPartName$1 as Yl, setShapeTextFormat as Yn, getSlideNotes as Yo, getShapeFlip as Yr, getTableCellPosition as Ys, getSlidesByLayout as Yt, inches as Yu, sortSlides as Z, findShapesOutsideCanvas as Za, getPresentationChartCountsBySlide as Zc, getShapeFillOpacity as Zi, getSlideLayoutType as Zl, setShapeTextWrap as Zn, getSlideNotesLineBreaks as Zo, getShapeKind as Zr, getTableCellSpan as Zs, isSlideHidden as Zt, pt as Zu, resetShapeVideoFormatting as _, getParagraphLevel as _a, setTableCellBorders as _c, setShapeBounds as _i, getSlideBackgroundImageIntrinsicSize as _l, getShapeZIndex as _n, resetShapeImageColorEffects as _o, findShapesByName as _r, getSlideTransitionSound as _s, removeSlideMaster as _t, getCommentAuthor as _u, getCollapsedOutlineSlides as a, getShapeStrokeJoin as aa, getTableSize as ac, getShapeText as ai, setChartData as al, setSlideBackgroundGraphicsHidden as an, getShapeImageBytes as ao, setShapeGlow as ar, getSlidesWithOverlap as as, setNotesMasterPlaceholderIncluded as at, getCustomShows as au, setShapeImageCompressionState as b, getShapeHyperlinkTooltip as ba, setTableCellMargins as bc, shapesOverlap as bi, getSlideColorMapOverride as bl, sendShapeToBack as bn, setShapeImageCrop as bo, findShapesWithHyperlinks as br, addSlideMedia as bs, setSlideLayoutTitleIncluded as bt, getCommentFormat as bu, getGridSpacing as c, getShapeRunFormat as ca, insertTableColumn as cc, getSlideMasterPartNames as ci, resolveDeckBodyTextColor as cl, addSlideImage as cn, getShapeImageDuotone as co, setShapeShadow as cr, hasSlideNotes as cs, setSlideShowProperties as ct, addSlideComment as cu, setDrawingGuidesVisible as d, getParagraphAlignment as da, isTableShape as dc, isShapeHidden as di, copySlideBackground as dl, addSlideTable as dn, getShapeImageLinkUrl as do, findShapeById as dr, resolveSlideNotesTextColor as ds, addSlideMaster as dt, findCommentAuthorByName as du, getShapeStrokeColor as ea, getTableCellTextDirection as ec, getShapePlaceholderType as ei, getShapeChartKind as el, replaceTextInPresentation as en, findSlidesByLayoutType as eo, getShape3D as er, getSlidesWithCharts as es, getHandoutSlidesPerPage as et, getSlideLayouts as eu, setGridSpacing as f, getParagraphBullet as fa, mergeTableCells as fc, isShapePlaceholder as fi, getSlideBackground as fl, addSlideTextBox as fn, getShapeImageOpacity as fo, findShapeByName as fr, setSlideNotes as fs, getSlideMasterLayouts as ft, findCommentsAfter as fu, setSlideMasterBackgroundStyle as g, getParagraphIndent as ga, setTableCellAnchor as gc, setShapeAltTitle as gi, getSlideBackgroundImageFillLayout as gl, copyShape as gn, isShapeImageGrayscale as go, findShapesByKind as gr, getSlideTransition as gs, removeSlideLayout as gt, findSlidesWithCommentsByAuthor as gu, getSlideMasterBackgroundStyles as h, getParagraphEndFormat as ha, setTableCellAlignment as hc, renameShape as hi, getSlideBackgroundImageCrop as hl, clearSlideShapes as hn, hasShapeText as ho, findShapesByHyperlink as hr, clearSlideTransition as hs, isSlideMasterPreserved as ht, findCommentsByText as hu, setShapeImageFillLayout as i, getShapeStrokeGradient as ia, getTableRowHeights as ic, getShapeSize as ii, getSlideCharts as il, searchSlides as in, getShapeImageBrightness as io, setShape3D as ir, getSlidesWithNotes as is, setHandoutSlidesPerPage as it, setShapeClickAction as iu, setShapeAspectRatioLocked as j, setParagraphIndent as ja, removeThumbnail as jc, setShapeImageFill as ji, getSlideMasterShapes as jl, getShapeTextBodyRotationDeg as jn, clearAllSlideNotes as jo, replaceTokensInSlide as jr, getSlideMediaPartNames as js, getAllShapes as jt, getSlideComments as ju, isShapeAspectRatioLocked as k, setParagraphAlignment as ka, splitTableCell as kc, setShapeFlip as ki, getSlideMasterBackgroundImageBytes as kl, getShapeTextAutoFit as kn, appendSlideNotes as ko, getSlideShapes as kr, getPackageSize as ks, findSlidesByNotes as kt, getPresentationCommenters as ku, getSnapToGrid as l, resolveDrawingColor as la, insertTableRow as lc, getSlideMasterUsageCounts as li, applySlideBackgroundToAll as ll, addSlideLine as ln, getShapeImageFillBytes as lo, setShapeSoftEdge as lr, removeSlideNotes as ls, addSlideLayout as lt, clearAllSlideComments as lu, setSnapToGrid as m, getParagraphBulletStyle as ma, removeTableRow as mc, pointInShape as mi, getSlideBackgroundImageBytes as ml, bringShapeToFront as mn, hasShapeImage as mo, findShapeInPresentation as mr, transformSlideNotesCase as ms, getSlideMasterPlaceholders as mt, findCommentsByAuthor as mu, getShapeImageFillLayout as n, getShapeStrokeCompound as na, getTableColumnWidths as nc, getShapePreset as ni, getShapeChartSeriesValues as nl, replaceTextInSlideNotes as nn, getShapeImageArtisticEffect as no, getShapeEffects as nr, getSlidesWithHyperlinks as ns, getNotesPageSize as nt, isChartSpec as nu, getDrawingGuides as o, getShapeStrokeOpacity as oa, getTableStyleFlags as oc, getSlideMasterCount as oi, setChartSpec as ol, setSlideHidden as on, getShapeImageContrast as oo, setShapeInnerShadow as or, getSlidesWithTables as os, setNotesPageOrientation as ot, setCustomShows as ou, setSlideOutlineCollapsed as p, getParagraphBulletImageBytes as pa, removeTableColumn as pc, isShapeTextBox as pi, getSlideBackgroundGradientFill as pl, bringShapeForward as pn, getShapeImagePartName as po, findShapeByText as pr, setSlideNotesFormat as ps, getSlideMasterName as pt, findCommentsBefore as pu, mergePresentations as q, getSlideAnimations as qa, findChartByKind as qc, getShapeFill as qi, findSlideLayoutByType as ql, setShapeTextField as qn, getPresentationNotesLengthsBySlide as qo, getShapeCustomGeometry as qr, getTableCellMargins as qs, getSlideXmlString as qt, cm as qu, getShapeImageIntrinsicSize as r, getShapeStrokeEffective as ra, getTableDimensions as rc, getShapeRotation as ri, getShapeChartSpec as rl, replaceTokensInPresentation as rn, getShapeImageBiLevelThreshold as ro, getShapeEffectsEffective as rr, getSlidesWithImages as rs, setHandoutMasterPlaceholderIncluded as rt, getShapeClickAction as ru, getDrawingGuidesVisible as s, getShapeStrokeWidth as sa, getTableStyleId as sc, getSlideMasterPartName as si, getEffectiveColorMap as sl, slideHasAnimations as sn, getShapeImageCrop as so, setShapeReflection as sr, getVisibleSlides as ss, getSlideShowProperties as st, setShapeImage as su, VERSION as t, getShapeStrokeColorResolved as ta, getTableCells as tc, getShapePosition as ti, getShapeChartSeriesNames as tl, replaceTextInSlide as tn, getPresentationImageCountsBySlide as to, getShapeEffect as tr, getSlidesWithComments as ts, getNotesMasterPlaceholders as tt, getUnusedSlideLayouts as tu, setDrawingGuides as u, resolveDrawingColorOpacity as ua, isChartShape as uc, getUnusedSlideMasters as ui, clearSlideBackground as ul, addSlideShape as un, getShapeImageFormat as uo, findEmptyPlaceholders as ur, replaceHyperlink as us, addSlideLayoutPlaceholder as ut, clearSlideComments as uu, getShapeImageCompressionState as v, getParagraphLineSpacing as va, setTableCellClickAction as vc, setShapeDescription as vi, getSlideBackgroundImageOpacity as vl, removeShape as vn, setShapeImageBrightness as vo, findShapesByPreset as vr, setSlideTransition as vs, setSlideLayoutBackgroundGraphicsHidden as vt, getCommentAuthors as vu, setShapeStyle as w, getShapeRunCount as wa, setTableCellTextFormat as wc, getShapeStrokeArrow as wi, getSlideLayoutBackgroundPatternFill as wl, updateSlideAnimation as wn, SLIDE_SIZE_16_9 as wo, getShapeIndex as wr, setShapeMediaPlayback as ws, getSlideSections as wt, getCommentStatus as wu, setShapePictureStyle as x, getShapeParagraphCount as xa, setTableCellParagraphs as xc, clearShapeFill as xi, getSlideLayoutBackground as xl, setShapeZIndex as xn, setShapeImageOpacity as xo, findSlidePlaceholder as xr, findShapesWithMedia as xs, setSlideMasterName as xt, getCommentParent as xu, getShapePictureStyle as y, getParagraphSpacing as ya, setTableCellFill as yc, setShapeHidden as yi, getSlideBackgroundPatternFill as yl, sendShapeBackward as yn, setShapeImageContrast as yo, findShapesByText as yr, setSlideTransitionSound as ys, setSlideLayoutFootersIncluded as yt, getCommentDate as yu, addContentSlide as z, getSlideBody as za, setExtendedProperties as zc, setShapeSlideBackgroundFill as zi, getShapeGradientFillEffective as zl, setShapeParagraphs as zn, getAllImages as zo, getMaxShapeId as zr, getSlideTables as zs, getSlideCount as zt, createPresentation as zu };
|
|
55466
55893
|
|
|
55467
|
-
//# sourceMappingURL=api-
|
|
55894
|
+
//# sourceMappingURL=api-DQMkljVK.js.map
|