ooxml-core 1.44.0 → 1.46.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/dist/PptxHandler-FZ43IJFP.mjs +5 -0
- package/dist/{PptxHandler-3VAVJDFB.mjs → PptxHandler-HWEOIHEA.mjs} +2 -2
- package/dist/PptxHandler-XAUKKK36.cjs +14 -0
- package/dist/{PresentationBuilder-KHL6GONR.cjs → PresentationBuilder-2BCCMZW7.cjs} +6 -6
- package/dist/{PresentationBuilder-7LJMTRJ6.mjs → PresentationBuilder-66RV4F45.mjs} +2 -2
- package/dist/{PresentationBuilder-PY2GB4IG.mjs → PresentationBuilder-AFD72LIG.mjs} +3 -3
- package/dist/automation/index.cjs +22 -8
- package/dist/automation/index.mjs +22 -8
- package/dist/chart/edit/fill.d.ts +6 -2
- package/dist/chart/edit/fill.d.ts.map +1 -1
- package/dist/chart/edit/group-options.d.ts +4 -0
- package/dist/chart/edit/group-options.d.ts.map +1 -1
- package/dist/chart/edit/new-chart-minimal.d.ts +13 -0
- package/dist/chart/edit/new-chart-minimal.d.ts.map +1 -0
- package/dist/chart/edit/new-chart.d.ts +34 -1
- package/dist/chart/edit/new-chart.d.ts.map +1 -1
- package/dist/chart/edit/secondary-axis.d.ts +8 -1
- package/dist/chart/edit/secondary-axis.d.ts.map +1 -1
- package/dist/chart/edit/type.d.ts +2 -0
- package/dist/chart/edit/type.d.ts.map +1 -1
- package/dist/chart/index.cjs +426 -266
- package/dist/chart/index.mjs +424 -267
- package/dist/{chunk-3J6VIKLP.cjs → chunk-5TOVSCVT.cjs} +3 -3
- package/dist/{chunk-4LEVL6ZW.mjs → chunk-E2TTMUKU.mjs} +681 -142
- package/dist/{chunk-7T3SJQA6.cjs → chunk-E5TGYYKO.cjs} +1 -0
- package/dist/{chunk-VKFKEVHK.mjs → chunk-EI6555OK.mjs} +1 -1
- package/dist/{chunk-R7NS42KQ.mjs → chunk-FKU2Z6ZB.mjs} +1 -1
- package/dist/{chunk-243ZYX2B.mjs → chunk-G6LEU3Y5.mjs} +1 -1
- package/dist/{chunk-JHYU7HGG.mjs → chunk-H43QQVJU.mjs} +1 -1
- package/dist/{chunk-HLYOHD2Z.mjs → chunk-HH3AYM63.mjs} +664 -146
- package/dist/{chunk-RNZQ2OU4.cjs → chunk-IBRV3AK3.cjs} +1930 -1412
- package/dist/{chunk-WEAWSXUX.mjs → chunk-L6MJGE3Q.mjs} +4 -4
- package/dist/{chunk-IPV3J3I5.mjs → chunk-LXVE2VKR.mjs} +4 -1
- package/dist/{chunk-QZPOPUI5.cjs → chunk-QUAFASFC.cjs} +4 -0
- package/dist/{chunk-XTUX5RMG.cjs → chunk-T4BVZTII.cjs} +9 -9
- package/dist/{chunk-KCDLTVUI.mjs → chunk-X2DC7XRL.mjs} +17 -16
- package/dist/{chunk-OORQCSVA.mjs → chunk-ZLUHU2SU.mjs} +1 -0
- package/dist/docx/index.cjs +300 -144
- package/dist/docx/index.mjs +300 -144
- package/dist/index.cjs +496 -336
- package/dist/index.mjs +496 -336
- package/dist/pptx/automation/index.cjs +879 -310
- package/dist/pptx/automation/index.d.ts +6 -6
- package/dist/pptx/automation/index.mjs +5 -5
- package/dist/pptx/chunks/{elements-PBugbKtv.d.ts → elements-B4Z6N-Gz.d.ts} +4 -477
- package/dist/pptx/chunks/elements-B4Z6N-Gz.d.ts.map +1 -0
- package/dist/pptx/chunks/{index-CCJiD-Bm.d.ts → index-BPGaFlm5.d.ts} +6 -6
- package/dist/pptx/chunks/{index-CCJiD-Bm.d.ts.map → index-BPGaFlm5.d.ts.map} +1 -1
- package/dist/pptx/chunks/{index-Bj-hur0D.d.ts → index-D4-WJQ1r.d.ts} +4 -4
- package/dist/pptx/chunks/{index-Bj-hur0D.d.ts.map → index-D4-WJQ1r.d.ts.map} +1 -1
- package/dist/pptx/chunks/{index-CGNb1TV9.d.ts → index-DtFoPmk7.d.ts} +108 -10
- package/dist/pptx/chunks/index-DtFoPmk7.d.ts.map +1 -0
- package/dist/pptx/chunks/{table-C7ITXL3Y.d.ts → table-BfgZfw5R.d.ts} +488 -4
- package/dist/pptx/chunks/table-BfgZfw5R.d.ts.map +1 -0
- package/dist/pptx/chunks/{text-operations-BNJr7aGa.d.ts → text-operations-CVHXOSit.d.ts} +19 -4
- package/dist/pptx/chunks/{text-operations-BNJr7aGa.d.ts.map → text-operations-CVHXOSit.d.ts.map} +1 -1
- package/dist/pptx/cli/index.cjs +832 -263
- package/dist/pptx/cli/index.d.ts +1 -1
- package/dist/pptx/cli/index.mjs +4 -4
- package/dist/pptx/converter/index.cjs +1 -0
- package/dist/pptx/converter/index.d.ts +1 -1
- package/dist/pptx/converter/index.mjs +2 -2
- package/dist/pptx/editor/render/collaboration-live-patch-target.cjs +4 -4
- package/dist/pptx/editor/render/collaboration-live-patch-target.mjs +2 -2
- package/dist/pptx/editor/render/collaboration-reconcile.cjs +8 -8
- package/dist/pptx/editor/render/collaboration-reconcile.mjs +2 -2
- package/dist/pptx/editor/render/collaboration-sync.cjs +14 -14
- package/dist/pptx/editor/render/collaboration-sync.d.ts.map +1 -1
- package/dist/pptx/editor/render/collaboration-sync.mjs +1 -1
- package/dist/pptx/editor/render/custom-show-operations.cjs +2 -2
- package/dist/pptx/editor/render/custom-show-operations.mjs +1 -1
- package/dist/pptx/editor/render/find-replace.cjs +15 -15
- package/dist/pptx/editor/render/find-replace.d.ts +2 -2
- package/dist/pptx/editor/render/find-replace.mjs +2 -2
- package/dist/pptx/editor/render/slide-operations.cjs +9 -9
- package/dist/pptx/editor/render/slide-operations.mjs +3 -3
- package/dist/pptx/editor/render/table-layout.d.ts +1 -1
- package/dist/pptx/editor/render/text-runs-style-patch.d.ts +1 -1
- package/dist/pptx/editor/render/text-style-scope.d.ts +1 -1
- package/dist/pptx/index.cjs +909 -315
- package/dist/pptx/index.d.ts +7 -7
- package/dist/pptx/index.mjs +5 -5
- package/dist/pptx/node/index.d.ts +1 -1
- package/dist/xlsx/index.cjs +22 -8
- package/dist/xlsx/index.mjs +22 -8
- package/dist/xlsx/ui/index.cjs +22 -8
- package/dist/xlsx/ui/index.mjs +22 -8
- package/package.json +1 -1
- package/dist/PptxHandler-V23RDNEX.cjs +0 -14
- package/dist/PptxHandler-WB3KL2WH.mjs +0 -5
- package/dist/pptx/chunks/elements-PBugbKtv.d.ts.map +0 -1
- package/dist/pptx/chunks/index-CGNb1TV9.d.ts.map +0 -1
- package/dist/pptx/chunks/table-C7ITXL3Y.d.ts.map +0 -1
package/dist/pptx/index.cjs
CHANGED
|
@@ -793,6 +793,7 @@ var init_collaboration_field_schema = __esm({
|
|
|
793
793
|
backgroundImage: "scalar",
|
|
794
794
|
backgroundImageProperties: "complex",
|
|
795
795
|
backgroundGradient: "scalar",
|
|
796
|
+
backgroundGradientFill: "complex",
|
|
796
797
|
backgroundStyleRef: "complex",
|
|
797
798
|
backgroundPattern: "complex",
|
|
798
799
|
backgroundShadeToTitle: "scalar",
|
|
@@ -1444,6 +1445,150 @@ var init_xml_utils = __esm({
|
|
|
1444
1445
|
}
|
|
1445
1446
|
});
|
|
1446
1447
|
|
|
1448
|
+
// pptx/core/utils/gradient-angle.ts
|
|
1449
|
+
function normalizeDegrees(deg) {
|
|
1450
|
+
if (!Number.isFinite(deg)) {
|
|
1451
|
+
return 0;
|
|
1452
|
+
}
|
|
1453
|
+
return (deg % 360 + 360) % 360;
|
|
1454
|
+
}
|
|
1455
|
+
function ooxmlGradientAngleToCssDegrees(angleDegrees) {
|
|
1456
|
+
return normalizeDegrees(angleDegrees + OOXML_TO_CSS_OFFSET_DEG);
|
|
1457
|
+
}
|
|
1458
|
+
function cssDegreesToOoxmlGradientAngle(cssDegrees) {
|
|
1459
|
+
return normalizeDegrees(cssDegrees - OOXML_TO_CSS_OFFSET_DEG);
|
|
1460
|
+
}
|
|
1461
|
+
var OOXML_TO_CSS_OFFSET_DEG;
|
|
1462
|
+
var init_gradient_angle = __esm({
|
|
1463
|
+
"pptx/core/utils/gradient-angle.ts"() {
|
|
1464
|
+
OOXML_TO_CSS_OFFSET_DEG = 90;
|
|
1465
|
+
}
|
|
1466
|
+
});
|
|
1467
|
+
|
|
1468
|
+
// pptx/core/utils/slide-background-gradient.ts
|
|
1469
|
+
function cssColor(color3, opacity2) {
|
|
1470
|
+
if (opacity2 === void 0 || opacity2 >= 1) {
|
|
1471
|
+
return color3;
|
|
1472
|
+
}
|
|
1473
|
+
const hex3 = color3.replace("#", "");
|
|
1474
|
+
const channel = (index) => Number.parseInt(hex3.slice(index, index + 2), 16);
|
|
1475
|
+
return `rgba(${channel(0)}, ${channel(2)}, ${channel(4)}, ${num(opacity2)})`;
|
|
1476
|
+
}
|
|
1477
|
+
function slideBackgroundGradientCss(gradient) {
|
|
1478
|
+
const stops = (gradient.fillGradientStops ?? []).map((stop) => `${cssColor(stop.color, stop.opacity)} ${num(stop.position)}%`).join(", ");
|
|
1479
|
+
if (gradient.fillGradientType !== "radial") {
|
|
1480
|
+
const angle = ooxmlGradientAngleToCssDegrees(gradient.fillGradientAngle ?? 0);
|
|
1481
|
+
return `linear-gradient(${num(angle)}deg, ${stops})`;
|
|
1482
|
+
}
|
|
1483
|
+
const focus = gradient.fillGradientFillToRect;
|
|
1484
|
+
const cx = focus ? (focus.l + (1 - focus.r)) / 2 * 100 : 50;
|
|
1485
|
+
const cy = focus ? (focus.t + (1 - focus.b)) / 2 * 100 : 50;
|
|
1486
|
+
const at2 = `at ${num(cx)}% ${num(cy)}%`;
|
|
1487
|
+
switch (gradient.fillGradientPathType) {
|
|
1488
|
+
case "rect":
|
|
1489
|
+
return `radial-gradient(${num(Math.max(cx, 100 - cx))}% ${num(Math.max(cy, 100 - cy))}% ${at2}, ${stops})`;
|
|
1490
|
+
case "shape":
|
|
1491
|
+
return `radial-gradient(farthest-side ${at2}, ${stops})`;
|
|
1492
|
+
default:
|
|
1493
|
+
return `radial-gradient(circle ${at2}, ${stops})`;
|
|
1494
|
+
}
|
|
1495
|
+
}
|
|
1496
|
+
function slideBackgroundGradientToWrite(slide) {
|
|
1497
|
+
const gradient = slide.backgroundGradientFill;
|
|
1498
|
+
if (!gradient || !slide.backgroundGradient) {
|
|
1499
|
+
return void 0;
|
|
1500
|
+
}
|
|
1501
|
+
return slide.backgroundGradient === slideBackgroundGradientCss(gradient) ? gradient : void 0;
|
|
1502
|
+
}
|
|
1503
|
+
var num;
|
|
1504
|
+
var init_slide_background_gradient = __esm({
|
|
1505
|
+
"pptx/core/utils/slide-background-gradient.ts"() {
|
|
1506
|
+
init_gradient_angle();
|
|
1507
|
+
num = (value) => String(Number(value.toFixed(3)));
|
|
1508
|
+
}
|
|
1509
|
+
});
|
|
1510
|
+
|
|
1511
|
+
// pptx/core/builders/sdk/background-gradient-input.ts
|
|
1512
|
+
function finite(name, value, min, max) {
|
|
1513
|
+
if (typeof value !== "number" || !Number.isFinite(value)) {
|
|
1514
|
+
throw new RangeError(`${WHERE}.${name} must be a finite number, got ${String(value)}`);
|
|
1515
|
+
}
|
|
1516
|
+
if (min !== void 0 && value < min || max !== void 0 && value > max) {
|
|
1517
|
+
throw new RangeError(`${WHERE}.${name} must be between ${min} and ${max}, got ${value}`);
|
|
1518
|
+
}
|
|
1519
|
+
return value;
|
|
1520
|
+
}
|
|
1521
|
+
function stopsOf(input) {
|
|
1522
|
+
if (!Array.isArray(input.stops) || input.stops.length < 2) {
|
|
1523
|
+
throw new RangeError(`${WHERE}.stops needs at least two stops (a:gsLst)`);
|
|
1524
|
+
}
|
|
1525
|
+
return input.stops.map((stop, index) => {
|
|
1526
|
+
if (typeof stop.color !== "string" || !HEX.test(stop.color)) {
|
|
1527
|
+
throw new RangeError(
|
|
1528
|
+
`${WHERE}.stops[${index}].color must be #RRGGBB, got ${String(stop.color)}`
|
|
1529
|
+
);
|
|
1530
|
+
}
|
|
1531
|
+
const position4 = finite(`stops[${index}].position`, stop.position, 0, 1);
|
|
1532
|
+
const opacity2 = stop.opacity === void 0 ? void 0 : finite(`stops[${index}].opacity`, stop.opacity, 0, 1);
|
|
1533
|
+
return {
|
|
1534
|
+
color: `#${stop.color.replace("#", "").toUpperCase()}`,
|
|
1535
|
+
// The shape gradient model keeps positions in percent.
|
|
1536
|
+
position: position4 * 100,
|
|
1537
|
+
...opacity2 !== void 0 ? { opacity: opacity2 } : {}
|
|
1538
|
+
};
|
|
1539
|
+
});
|
|
1540
|
+
}
|
|
1541
|
+
function mapBackgroundGradientInput(input) {
|
|
1542
|
+
const fillGradientStops = stopsOf(input);
|
|
1543
|
+
let gradient;
|
|
1544
|
+
if (input.path !== void 0) {
|
|
1545
|
+
if (!PATHS.has(input.path)) {
|
|
1546
|
+
throw new RangeError(
|
|
1547
|
+
`${WHERE}.path must be circle, rect or shape, got ${String(input.path)}`
|
|
1548
|
+
);
|
|
1549
|
+
}
|
|
1550
|
+
if (input.angle !== void 0) {
|
|
1551
|
+
throw new RangeError(`${WHERE}.angle applies to a linear gradient, not a path one`);
|
|
1552
|
+
}
|
|
1553
|
+
const focus = input.focus ?? { l: 0.5, t: 0.5, r: 0.5, b: 0.5 };
|
|
1554
|
+
gradient = {
|
|
1555
|
+
fillGradientType: "radial",
|
|
1556
|
+
fillGradientPathType: input.path,
|
|
1557
|
+
fillGradientStops,
|
|
1558
|
+
fillGradientFillToRect: {
|
|
1559
|
+
l: finite("focus.l", focus.l),
|
|
1560
|
+
t: finite("focus.t", focus.t),
|
|
1561
|
+
r: finite("focus.r", focus.r),
|
|
1562
|
+
b: finite("focus.b", focus.b)
|
|
1563
|
+
}
|
|
1564
|
+
};
|
|
1565
|
+
} else {
|
|
1566
|
+
if (input.focus !== void 0) {
|
|
1567
|
+
throw new RangeError(`${WHERE}.focus needs a path gradient`);
|
|
1568
|
+
}
|
|
1569
|
+
const cssAngle = finite("angle", input.angle ?? 180);
|
|
1570
|
+
gradient = {
|
|
1571
|
+
fillGradientType: "linear",
|
|
1572
|
+
fillGradientAngle: cssDegreesToOoxmlGradientAngle(cssAngle),
|
|
1573
|
+
fillGradientStops
|
|
1574
|
+
};
|
|
1575
|
+
}
|
|
1576
|
+
return {
|
|
1577
|
+
backgroundGradient: slideBackgroundGradientCss(gradient),
|
|
1578
|
+
backgroundGradientFill: gradient
|
|
1579
|
+
};
|
|
1580
|
+
}
|
|
1581
|
+
var HEX, PATHS, WHERE;
|
|
1582
|
+
var init_background_gradient_input = __esm({
|
|
1583
|
+
"pptx/core/builders/sdk/background-gradient-input.ts"() {
|
|
1584
|
+
init_gradient_angle();
|
|
1585
|
+
init_slide_background_gradient();
|
|
1586
|
+
HEX = /^#?[0-9a-f]{6}$/iu;
|
|
1587
|
+
PATHS = /* @__PURE__ */ new Set(["circle", "rect", "shape"]);
|
|
1588
|
+
WHERE = "BackgroundInput";
|
|
1589
|
+
}
|
|
1590
|
+
});
|
|
1591
|
+
|
|
1447
1592
|
// pptx/core/core/runtime/table-style-defaults.ts
|
|
1448
1593
|
exports.DEFAULT_POWERPOINT_TABLE_STYLE_ID = void 0;
|
|
1449
1594
|
var init_table_style_defaults = __esm({
|
|
@@ -1653,9 +1798,9 @@ function parseFormula(fmla) {
|
|
|
1653
1798
|
return { op: op2, args };
|
|
1654
1799
|
}
|
|
1655
1800
|
function resolveOperand(token3, variables) {
|
|
1656
|
-
const
|
|
1657
|
-
if (Number.isFinite(
|
|
1658
|
-
return
|
|
1801
|
+
const num5 = Number(token3);
|
|
1802
|
+
if (Number.isFinite(num5)) {
|
|
1803
|
+
return num5;
|
|
1659
1804
|
}
|
|
1660
1805
|
const value = variables.get(token3);
|
|
1661
1806
|
if (value !== void 0) {
|
|
@@ -3644,8 +3789,8 @@ function authoredValue(node) {
|
|
|
3644
3789
|
return void 0;
|
|
3645
3790
|
}
|
|
3646
3791
|
const raw2 = node["@_val"];
|
|
3647
|
-
const
|
|
3648
|
-
return Number.isFinite(
|
|
3792
|
+
const num5 = raw2 === void 0 || raw2 === null || raw2 === "" ? NaN : Number.parseFloat(String(raw2));
|
|
3793
|
+
return Number.isFinite(num5) ? num5 : void 0;
|
|
3649
3794
|
}
|
|
3650
3795
|
function applyChartGroupOptionsToXml(container2, containerLocal, chartData, getLocalName2) {
|
|
3651
3796
|
let changed = false;
|
|
@@ -3837,6 +3982,70 @@ var init_chart_layout_input = __esm({
|
|
|
3837
3982
|
}
|
|
3838
3983
|
});
|
|
3839
3984
|
|
|
3985
|
+
// pptx/core/utils/chart-container-type-map.ts
|
|
3986
|
+
function chartContainerLocalNameToType(localName29) {
|
|
3987
|
+
return CONTAINER_LOCAL_NAME_TO_TYPE[localName29];
|
|
3988
|
+
}
|
|
3989
|
+
function isLineDrawnChartType(type) {
|
|
3990
|
+
return type !== void 0 && LINE_DRAWN_CHART_TYPES.has(type);
|
|
3991
|
+
}
|
|
3992
|
+
var CONTAINER_LOCAL_NAME_TO_TYPE, LINE_DRAWN_CHART_TYPES;
|
|
3993
|
+
var init_chart_container_type_map = __esm({
|
|
3994
|
+
"pptx/core/utils/chart-container-type-map.ts"() {
|
|
3995
|
+
CONTAINER_LOCAL_NAME_TO_TYPE = {
|
|
3996
|
+
barChart: "bar",
|
|
3997
|
+
bar3DChart: "bar3D",
|
|
3998
|
+
lineChart: "line",
|
|
3999
|
+
line3DChart: "line3D",
|
|
4000
|
+
pieChart: "pie",
|
|
4001
|
+
pie3DChart: "pie3D",
|
|
4002
|
+
ofPieChart: "ofPie",
|
|
4003
|
+
doughnutChart: "doughnut",
|
|
4004
|
+
areaChart: "area",
|
|
4005
|
+
area3DChart: "area3D",
|
|
4006
|
+
scatterChart: "scatter",
|
|
4007
|
+
bubbleChart: "bubble",
|
|
4008
|
+
radarChart: "radar",
|
|
4009
|
+
stockChart: "stock",
|
|
4010
|
+
surfaceChart: "surface",
|
|
4011
|
+
surface3DChart: "surface"
|
|
4012
|
+
};
|
|
4013
|
+
LINE_DRAWN_CHART_TYPES = /* @__PURE__ */ new Set([
|
|
4014
|
+
"line",
|
|
4015
|
+
"line3D",
|
|
4016
|
+
"scatter",
|
|
4017
|
+
"radar",
|
|
4018
|
+
"stock"
|
|
4019
|
+
]);
|
|
4020
|
+
}
|
|
4021
|
+
});
|
|
4022
|
+
|
|
4023
|
+
// pptx/core/builders/sdk/chart-series-point-paint.ts
|
|
4024
|
+
function paintsLine(data, series) {
|
|
4025
|
+
const type = series.seriesChartType ?? data.chartType;
|
|
4026
|
+
if (type === "radar") return data.radarStyle !== "filled";
|
|
4027
|
+
return isLineDrawnChartType(type);
|
|
4028
|
+
}
|
|
4029
|
+
function clearChartSeriesPointPaint(data, series) {
|
|
4030
|
+
if (!series.dataPoints) return;
|
|
4031
|
+
const line3 = paintsLine(data, series);
|
|
4032
|
+
for (const point2 of series.dataPoints) {
|
|
4033
|
+
if (!line3) delete point2.gradientFill;
|
|
4034
|
+
if (!point2.spPr) continue;
|
|
4035
|
+
const keys = line3 ? ["strokeColor", "strokeWidth", "strokeDashStyle", "lineNoFill"] : ["fillColor"];
|
|
4036
|
+
for (const key2 of keys) delete point2.spPr[key2];
|
|
4037
|
+
if (Object.keys(point2.spPr).length === 0) delete point2.spPr;
|
|
4038
|
+
}
|
|
4039
|
+
series.dataPoints = series.dataPoints.filter(
|
|
4040
|
+
(point2) => Object.entries(point2).some(([name, value]) => name !== "idx" && value !== void 0)
|
|
4041
|
+
);
|
|
4042
|
+
}
|
|
4043
|
+
var init_chart_series_point_paint = __esm({
|
|
4044
|
+
"pptx/core/builders/sdk/chart-series-point-paint.ts"() {
|
|
4045
|
+
init_chart_container_type_map();
|
|
4046
|
+
}
|
|
4047
|
+
});
|
|
4048
|
+
|
|
3840
4049
|
// pptx/core/builders/sdk/chart-operations.ts
|
|
3841
4050
|
function ensureChartData(element2) {
|
|
3842
4051
|
if (!element2.chartData) {
|
|
@@ -4024,6 +4233,7 @@ function setChartSeriesColor(element2, seriesIndex, color3) {
|
|
|
4024
4233
|
validateSeriesIndex(element2, seriesIndex);
|
|
4025
4234
|
const series = element2.chartData.series[seriesIndex];
|
|
4026
4235
|
Reflect.deleteProperty(series, "gradientFill");
|
|
4236
|
+
clearChartSeriesPointPaint(element2.chartData, series);
|
|
4027
4237
|
if (!color3) {
|
|
4028
4238
|
series.color = void 0;
|
|
4029
4239
|
return;
|
|
@@ -4254,6 +4464,7 @@ function removeEmptyDataPoint(series, pointIndex2) {
|
|
|
4254
4464
|
}
|
|
4255
4465
|
var init_chart_operations = __esm({
|
|
4256
4466
|
"pptx/core/builders/sdk/chart-operations.ts"() {
|
|
4467
|
+
init_chart_series_point_paint();
|
|
4257
4468
|
}
|
|
4258
4469
|
});
|
|
4259
4470
|
|
|
@@ -4467,6 +4678,289 @@ var init_shape_style_input = __esm({
|
|
|
4467
4678
|
}
|
|
4468
4679
|
});
|
|
4469
4680
|
|
|
4681
|
+
// pptx/core/builders/sdk/table-border-input.ts
|
|
4682
|
+
function borderDashSegments(edge, lengths, width) {
|
|
4683
|
+
const name = `TableCellInput.borders.${edge}.dash`;
|
|
4684
|
+
if (lengths.length === 0) {
|
|
4685
|
+
throw new RangeError(`${name} must give at least one length`);
|
|
4686
|
+
}
|
|
4687
|
+
if (lengths.some((n) => !Number.isFinite(n) || n <= 0)) {
|
|
4688
|
+
throw new RangeError(`${name} lengths must be finite and above 0, got [${lengths.join(", ")}]`);
|
|
4689
|
+
}
|
|
4690
|
+
const segments = customDashSegments([...lengths], width !== void 0 && width > 0 ? width : 1);
|
|
4691
|
+
if (segments.some((s) => s.dash <= 0 || s.space <= 0)) {
|
|
4692
|
+
throw new RangeError(`${name} has a length too short to write: [${lengths.join(", ")}]`);
|
|
4693
|
+
}
|
|
4694
|
+
if (segments.some((s) => s.dash > MAX_DASH_UNITS || s.space > MAX_DASH_UNITS)) {
|
|
4695
|
+
throw new RangeError(`${name} has a length too long to write: [${lengths.join(", ")}]`);
|
|
4696
|
+
}
|
|
4697
|
+
return segments;
|
|
4698
|
+
}
|
|
4699
|
+
function edgeStyle(edge, prefix, input) {
|
|
4700
|
+
if (input.width !== void 0 && (!Number.isFinite(input.width) || input.width < 0)) {
|
|
4701
|
+
throw new RangeError(
|
|
4702
|
+
`TableCellInput.borders.${edge}.width must be a finite width of 0 or more, got ${input.width}`
|
|
4703
|
+
);
|
|
4704
|
+
}
|
|
4705
|
+
const out = {};
|
|
4706
|
+
if (input.width !== void 0) out[`${prefix}Width`] = input.width;
|
|
4707
|
+
if (input.color !== void 0) out[`${prefix}Color`] = input.color;
|
|
4708
|
+
if (Array.isArray(input.dash)) {
|
|
4709
|
+
out[`${prefix}Dash`] = "custom";
|
|
4710
|
+
out[`${prefix}DashSegments`] = borderDashSegments(edge, input.dash, input.width);
|
|
4711
|
+
} else if (input.dash !== void 0) {
|
|
4712
|
+
if (input.dash === "custom") {
|
|
4713
|
+
throw new RangeError(`TableCellInput.borders.${edge}.dash: give 'custom' as a length list`);
|
|
4714
|
+
}
|
|
4715
|
+
out[`${prefix}Dash`] = input.dash;
|
|
4716
|
+
}
|
|
4717
|
+
return out;
|
|
4718
|
+
}
|
|
4719
|
+
function tableCellBorderStyle(borders) {
|
|
4720
|
+
if (!borders) {
|
|
4721
|
+
return {};
|
|
4722
|
+
}
|
|
4723
|
+
const out = {};
|
|
4724
|
+
for (const [edge, prefix] of EDGES) {
|
|
4725
|
+
const own = borders[edge];
|
|
4726
|
+
const input = borders.all || own ? { ...borders.all, ...own } : void 0;
|
|
4727
|
+
if (input) {
|
|
4728
|
+
Object.assign(out, edgeStyle(own ? edge : "all", prefix, input));
|
|
4729
|
+
}
|
|
4730
|
+
}
|
|
4731
|
+
return out;
|
|
4732
|
+
}
|
|
4733
|
+
var MAX_DASH_UNITS, EDGES;
|
|
4734
|
+
var init_table_border_input = __esm({
|
|
4735
|
+
"pptx/core/builders/sdk/table-border-input.ts"() {
|
|
4736
|
+
init_shape_style_input();
|
|
4737
|
+
MAX_DASH_UNITS = 2147483647;
|
|
4738
|
+
EDGES = [
|
|
4739
|
+
["top", "borderTop"],
|
|
4740
|
+
["right", "borderRight"],
|
|
4741
|
+
["bottom", "borderBottom"],
|
|
4742
|
+
["left", "borderLeft"]
|
|
4743
|
+
];
|
|
4744
|
+
}
|
|
4745
|
+
});
|
|
4746
|
+
|
|
4747
|
+
// pptx/core/builders/sdk/table-cell-input.ts
|
|
4748
|
+
function refuseGradientExtras(fill3) {
|
|
4749
|
+
const radial = fill3.path !== void 0 || fill3.gradientType === "radial";
|
|
4750
|
+
const unsupported3 = [
|
|
4751
|
+
fill3.tile !== void 0 ? "tile" : void 0,
|
|
4752
|
+
fill3.scaled === false ? "scaled: false" : void 0,
|
|
4753
|
+
fill3.rotWithShape !== void 0 ? "rotWithShape" : void 0,
|
|
4754
|
+
fill3.focus !== void 0 && !radial ? "focus on a linear gradient" : void 0
|
|
4755
|
+
].filter((name) => name !== void 0);
|
|
4756
|
+
if (unsupported3.length > 0) {
|
|
4757
|
+
throw new RangeError(
|
|
4758
|
+
`TableCellInput.fill: ${unsupported3.join(", ")} cannot be written on a table cell`
|
|
4759
|
+
);
|
|
4760
|
+
}
|
|
4761
|
+
if (fill3.stops.length === 0) {
|
|
4762
|
+
throw new RangeError("TableCellInput.fill: a gradient needs at least one stop");
|
|
4763
|
+
}
|
|
4764
|
+
}
|
|
4765
|
+
function tableCellFillStyle(fill3) {
|
|
4766
|
+
switch (fill3?.type) {
|
|
4767
|
+
case void 0:
|
|
4768
|
+
return {};
|
|
4769
|
+
case "solid":
|
|
4770
|
+
if (fill3.opacity !== void 0 && fill3.opacity !== 1) {
|
|
4771
|
+
throw new RangeError(
|
|
4772
|
+
`TableCellInput.fill.opacity cannot be written on a table cell, got ${fill3.opacity}`
|
|
4773
|
+
);
|
|
4774
|
+
}
|
|
4775
|
+
return {
|
|
4776
|
+
fillMode: "solid",
|
|
4777
|
+
backgroundColor: fill3.color,
|
|
4778
|
+
...fill3.themeColorRef ? { backgroundColorRef: fill3.themeColorRef } : {}
|
|
4779
|
+
};
|
|
4780
|
+
case "gradient": {
|
|
4781
|
+
refuseGradientExtras(fill3);
|
|
4782
|
+
const radial = fill3.path !== void 0 || fill3.gradientType === "radial";
|
|
4783
|
+
return {
|
|
4784
|
+
fillMode: "gradient",
|
|
4785
|
+
gradientFillType: radial ? "radial" : "linear",
|
|
4786
|
+
gradientFillAngle: fill3.angle ?? 0,
|
|
4787
|
+
gradientFillStops: fill3.stops.map((stop) => ({
|
|
4788
|
+
color: stop.color,
|
|
4789
|
+
position: stop.position,
|
|
4790
|
+
...stop.opacity !== void 0 ? { opacity: stop.opacity } : {}
|
|
4791
|
+
})),
|
|
4792
|
+
...radial ? { gradientFillPathType: fill3.path ?? "circle" } : {},
|
|
4793
|
+
...fill3.focus ? { gradientFillFillToRect: { ...fill3.focus } } : {}
|
|
4794
|
+
};
|
|
4795
|
+
}
|
|
4796
|
+
case "pattern":
|
|
4797
|
+
if (!fill3.preset) {
|
|
4798
|
+
throw new RangeError("TableCellInput.fill: a pattern fill needs a preset");
|
|
4799
|
+
}
|
|
4800
|
+
return {
|
|
4801
|
+
fillMode: "pattern",
|
|
4802
|
+
patternFillPreset: fill3.preset,
|
|
4803
|
+
...fill3.foreground !== void 0 ? { patternFillForeground: fill3.foreground } : {},
|
|
4804
|
+
...fill3.background !== void 0 ? { patternFillBackground: fill3.background } : {}
|
|
4805
|
+
};
|
|
4806
|
+
case "image":
|
|
4807
|
+
throw new RangeError("TableCellInput.fill: an image fill cannot be written on a table cell");
|
|
4808
|
+
case "none":
|
|
4809
|
+
return { fillMode: "none" };
|
|
4810
|
+
}
|
|
4811
|
+
}
|
|
4812
|
+
function tableCellTextStyle(style2) {
|
|
4813
|
+
const out = {};
|
|
4814
|
+
if (style2?.fontSize !== void 0) out.fontSize = style2.fontSize;
|
|
4815
|
+
if (style2?.bold !== void 0) out.bold = style2.bold;
|
|
4816
|
+
if (style2?.italic !== void 0) out.italic = style2.italic;
|
|
4817
|
+
if (style2?.color !== void 0) out.color = style2.color;
|
|
4818
|
+
if (style2?.alignment !== void 0) out.align = style2.alignment;
|
|
4819
|
+
return out;
|
|
4820
|
+
}
|
|
4821
|
+
function tableCellStyle(cell3) {
|
|
4822
|
+
const style2 = {
|
|
4823
|
+
...tableCellTextStyle(cell3.style),
|
|
4824
|
+
...tableCellFillStyle(cell3.fill),
|
|
4825
|
+
...tableCellBorderStyle(cell3.borders)
|
|
4826
|
+
};
|
|
4827
|
+
return cell3.style || Object.keys(style2).length > 0 ? style2 : void 0;
|
|
4828
|
+
}
|
|
4829
|
+
var init_table_cell_input = __esm({
|
|
4830
|
+
"pptx/core/builders/sdk/table-cell-input.ts"() {
|
|
4831
|
+
init_table_border_input();
|
|
4832
|
+
}
|
|
4833
|
+
});
|
|
4834
|
+
|
|
4835
|
+
// pptx/core/builders/sdk/table-merge-input.ts
|
|
4836
|
+
function span(value, name) {
|
|
4837
|
+
if (value === void 0) {
|
|
4838
|
+
return 1;
|
|
4839
|
+
}
|
|
4840
|
+
if (!Number.isInteger(value) || value < 1) {
|
|
4841
|
+
throw new RangeError(`TableCellInput.${name} must be a whole number from 1, got ${value}`);
|
|
4842
|
+
}
|
|
4843
|
+
return value;
|
|
4844
|
+
}
|
|
4845
|
+
function placeTableCells(input) {
|
|
4846
|
+
const rowCount = input.rows.length;
|
|
4847
|
+
const slots = input.rows.map(() => []);
|
|
4848
|
+
input.rows.forEach((row, ri) => {
|
|
4849
|
+
const rowSlots = slots[ri] ?? [];
|
|
4850
|
+
let ci = 0;
|
|
4851
|
+
for (const cell3 of row.cells) {
|
|
4852
|
+
while (rowSlots[ci]) {
|
|
4853
|
+
ci += 1;
|
|
4854
|
+
}
|
|
4855
|
+
const colSpan = span(cell3.gridSpan, "gridSpan");
|
|
4856
|
+
const rowSpan = span(cell3.rowSpan, "rowSpan");
|
|
4857
|
+
if (ri + rowSpan > rowCount) {
|
|
4858
|
+
throw new RangeError(
|
|
4859
|
+
`A cell in row ${ri} spans ${rowSpan} rows, past the table's ${rowCount} rows`
|
|
4860
|
+
);
|
|
4861
|
+
}
|
|
4862
|
+
for (let dr = 0; dr < rowSpan; dr++) {
|
|
4863
|
+
for (let dc = 0; dc < colSpan; dc++) {
|
|
4864
|
+
const target = slots[ri + dr] ?? [];
|
|
4865
|
+
if (target[ci + dc]) {
|
|
4866
|
+
throw new RangeError(
|
|
4867
|
+
`A cell in row ${ri} overlaps the merge covering row ${ri + dr}, column ${ci + dc}`
|
|
4868
|
+
);
|
|
4869
|
+
}
|
|
4870
|
+
target[ci + dc] = dr === 0 && dc === 0 ? { cell: cell3 } : { hMerge: dc > 0, vMerge: dr > 0 };
|
|
4871
|
+
}
|
|
4872
|
+
}
|
|
4873
|
+
ci += colSpan;
|
|
4874
|
+
}
|
|
4875
|
+
});
|
|
4876
|
+
const widest = Math.max(...slots.map((row) => row.length), 1);
|
|
4877
|
+
const declared = input.columnWidths?.length;
|
|
4878
|
+
if (declared !== void 0 && widest > declared) {
|
|
4879
|
+
throw new RangeError(`A row takes ${widest} columns, but columnWidths gives ${declared}`);
|
|
4880
|
+
}
|
|
4881
|
+
const columnCount = declared ?? widest;
|
|
4882
|
+
return {
|
|
4883
|
+
columnCount,
|
|
4884
|
+
rows: slots.map(
|
|
4885
|
+
(row) => Array.from({ length: columnCount }, (_, ci) => row[ci] ?? { cell: { text: "" } })
|
|
4886
|
+
)
|
|
4887
|
+
};
|
|
4888
|
+
}
|
|
4889
|
+
function columnFractions(columnWidths, columnCount) {
|
|
4890
|
+
if (!columnWidths) {
|
|
4891
|
+
return Array.from({ length: columnCount }, () => 1 / columnCount);
|
|
4892
|
+
}
|
|
4893
|
+
if (columnWidths.length !== columnCount) {
|
|
4894
|
+
throw new RangeError(
|
|
4895
|
+
`columnWidths gives ${columnWidths.length} widths for a table of ${columnCount} columns`
|
|
4896
|
+
);
|
|
4897
|
+
}
|
|
4898
|
+
if (columnWidths.some((w) => !Number.isFinite(w) || w < 0)) {
|
|
4899
|
+
throw new RangeError("columnWidths must be finite widths of 0 or more");
|
|
4900
|
+
}
|
|
4901
|
+
const sum = columnWidths.reduce((a, b) => a + b, 0);
|
|
4902
|
+
if (sum <= 0) {
|
|
4903
|
+
throw new RangeError("columnWidths must not all be 0");
|
|
4904
|
+
}
|
|
4905
|
+
return columnWidths.map((w) => w / sum);
|
|
4906
|
+
}
|
|
4907
|
+
var init_table_merge_input = __esm({
|
|
4908
|
+
"pptx/core/builders/sdk/table-merge-input.ts"() {
|
|
4909
|
+
}
|
|
4910
|
+
});
|
|
4911
|
+
|
|
4912
|
+
// pptx/core/builders/sdk/text-segment-style.ts
|
|
4913
|
+
function elementStyleForSegments(textStyle, segments) {
|
|
4914
|
+
const styled = segments.filter((segment) => !segment.isParagraphBreak);
|
|
4915
|
+
const first2 = styled[0]?.style;
|
|
4916
|
+
if (!first2) {
|
|
4917
|
+
return textStyle;
|
|
4918
|
+
}
|
|
4919
|
+
const next = { ...textStyle };
|
|
4920
|
+
for (const key2 of RUN_KEYS) {
|
|
4921
|
+
const value = first2[key2];
|
|
4922
|
+
if (!styled.every((segment) => sameValue(segment.style?.[key2], value))) {
|
|
4923
|
+
continue;
|
|
4924
|
+
}
|
|
4925
|
+
if (value === void 0) {
|
|
4926
|
+
delete next[key2];
|
|
4927
|
+
} else {
|
|
4928
|
+
next[key2] = value;
|
|
4929
|
+
}
|
|
4930
|
+
}
|
|
4931
|
+
return next;
|
|
4932
|
+
}
|
|
4933
|
+
function sameValue(a, b) {
|
|
4934
|
+
if (a === b) {
|
|
4935
|
+
return true;
|
|
4936
|
+
}
|
|
4937
|
+
if (a && b && typeof a === "object" && typeof b === "object") {
|
|
4938
|
+
return JSON.stringify(a) === JSON.stringify(b);
|
|
4939
|
+
}
|
|
4940
|
+
return false;
|
|
4941
|
+
}
|
|
4942
|
+
var RUN_KEYS;
|
|
4943
|
+
var init_text_segment_style = __esm({
|
|
4944
|
+
"pptx/core/builders/sdk/text-segment-style.ts"() {
|
|
4945
|
+
RUN_KEYS = [
|
|
4946
|
+
"fontFamily",
|
|
4947
|
+
"fontSize",
|
|
4948
|
+
"bold",
|
|
4949
|
+
"italic",
|
|
4950
|
+
"underline",
|
|
4951
|
+
"strikethrough",
|
|
4952
|
+
"color",
|
|
4953
|
+
"colorRef",
|
|
4954
|
+
"characterSpacing",
|
|
4955
|
+
"hyperlink",
|
|
4956
|
+
"hyperlinkAction",
|
|
4957
|
+
"hyperlinkTargetSlideIndex",
|
|
4958
|
+
"hyperlinkTooltip",
|
|
4959
|
+
"align"
|
|
4960
|
+
];
|
|
4961
|
+
}
|
|
4962
|
+
});
|
|
4963
|
+
|
|
4470
4964
|
// pptx/core/builders/sdk/ElementFactory.ts
|
|
4471
4965
|
function generateId(prefix) {
|
|
4472
4966
|
idCounter += 1;
|
|
@@ -4578,6 +5072,7 @@ function createTextElement(text2, options2) {
|
|
|
4578
5072
|
verticalAlignment: options2?.verticalAlignment,
|
|
4579
5073
|
lineSpacing: options2?.lineSpacing
|
|
4580
5074
|
};
|
|
5075
|
+
const textSegments = buildTextSegments(text2, textStyleBase);
|
|
4581
5076
|
return {
|
|
4582
5077
|
type: "text",
|
|
4583
5078
|
id: generateId("txt"),
|
|
@@ -4585,8 +5080,8 @@ function createTextElement(text2, options2) {
|
|
|
4585
5080
|
rotation: options2?.rotation,
|
|
4586
5081
|
opacity: options2?.opacity,
|
|
4587
5082
|
text: plainText,
|
|
4588
|
-
textStyle: mapTextStyleInput(textStyleBase),
|
|
4589
|
-
textSegments
|
|
5083
|
+
textStyle: elementStyleForSegments(mapTextStyleInput(textStyleBase), textSegments),
|
|
5084
|
+
textSegments,
|
|
4590
5085
|
shapeStyle: buildShapeStyle(effectInputs(options2, options2?.fill))
|
|
4591
5086
|
};
|
|
4592
5087
|
}
|
|
@@ -4666,32 +5161,30 @@ function createImageElement(source2, options2) {
|
|
|
4666
5161
|
cropBottom: options2?.cropBottom
|
|
4667
5162
|
};
|
|
4668
5163
|
}
|
|
5164
|
+
function createTableCell(cellInput) {
|
|
5165
|
+
return {
|
|
5166
|
+
text: cellInput.text,
|
|
5167
|
+
gridSpan: cellInput.gridSpan,
|
|
5168
|
+
rowSpan: cellInput.rowSpan,
|
|
5169
|
+
style: tableCellStyle(cellInput)
|
|
5170
|
+
};
|
|
5171
|
+
}
|
|
4669
5172
|
function createTableElement(input, options2) {
|
|
4670
|
-
const
|
|
5173
|
+
const grid = input.fillMergedCells ? placeTableCells(input) : void 0;
|
|
5174
|
+
const numCols = grid?.columnCount ?? Math.max(...input.rows.map((r) => r.cells.length), 1);
|
|
4671
5175
|
const rowHeight = input.rows.length > 0 ? Math.max(30, Math.floor(200 / input.rows.length)) : 30;
|
|
4672
5176
|
const totalHeight = options2?.height ?? Math.max(100, input.rows.length * rowHeight);
|
|
4673
5177
|
const p2 = pos("table", { ...options2, height: totalHeight });
|
|
4674
|
-
|
|
4675
|
-
|
|
4676
|
-
const sum = input.columnWidths.reduce((a, b) => a + b, 0);
|
|
4677
|
-
colWidths = input.columnWidths.map((w) => w / sum);
|
|
4678
|
-
} else {
|
|
4679
|
-
colWidths = Array(numCols).fill(1 / numCols);
|
|
4680
|
-
}
|
|
4681
|
-
const rows = input.rows.map((rowInput) => ({
|
|
5178
|
+
const colWidths = columnFractions(input.columnWidths, numCols);
|
|
5179
|
+
const rows = input.rows.map((rowInput, ri) => ({
|
|
4682
5180
|
height: rowInput.height ?? rowHeight,
|
|
4683
|
-
cells:
|
|
4684
|
-
|
|
4685
|
-
|
|
4686
|
-
|
|
4687
|
-
|
|
4688
|
-
|
|
4689
|
-
|
|
4690
|
-
italic: cellInput.style.italic,
|
|
4691
|
-
color: cellInput.style.color,
|
|
4692
|
-
align: cellInput.style.alignment
|
|
4693
|
-
} : void 0
|
|
4694
|
-
}))
|
|
5181
|
+
cells: grid ? (grid.rows[ri] ?? []).map(
|
|
5182
|
+
(slot2) => slot2.cell ? createTableCell(slot2.cell) : {
|
|
5183
|
+
text: "",
|
|
5184
|
+
...slot2.hMerge ? { hMerge: true } : {},
|
|
5185
|
+
...slot2.vMerge ? { vMerge: true } : {}
|
|
5186
|
+
}
|
|
5187
|
+
) : rowInput.cells.map(createTableCell)
|
|
4695
5188
|
}));
|
|
4696
5189
|
const tableData = {
|
|
4697
5190
|
rows,
|
|
@@ -4706,7 +5199,9 @@ function createTableElement(input, options2) {
|
|
|
4706
5199
|
// Accent 1 unless the caller picked a style. This is decided at
|
|
4707
5200
|
// creation time so the save pipeline never has to invent a style for
|
|
4708
5201
|
// loaded tables that legitimately have none.
|
|
4709
|
-
|
|
5202
|
+
// `style: 'none'` (or '') opts out, so the cells' own formatting is not
|
|
5203
|
+
// painted over by the theme banding.
|
|
5204
|
+
tableStyleId: input.style === "none" ? void 0 : input.style ?? exports.DEFAULT_POWERPOINT_TABLE_STYLE_ID
|
|
4710
5205
|
};
|
|
4711
5206
|
return {
|
|
4712
5207
|
type: "table",
|
|
@@ -4824,6 +5319,9 @@ var init_ElementFactory = __esm({
|
|
|
4824
5319
|
init_custom_geometry();
|
|
4825
5320
|
init_chart_gradient_input();
|
|
4826
5321
|
init_chart_layout_operations();
|
|
5322
|
+
init_table_cell_input();
|
|
5323
|
+
init_table_merge_input();
|
|
5324
|
+
init_text_segment_style();
|
|
4827
5325
|
init_shape_style_input();
|
|
4828
5326
|
idCounter = 0;
|
|
4829
5327
|
DEFAULTS = {
|
|
@@ -4843,6 +5341,7 @@ var init_ElementFactory = __esm({
|
|
|
4843
5341
|
exports.SlideBuilder = void 0;
|
|
4844
5342
|
var init_SlideBuilder = __esm({
|
|
4845
5343
|
"pptx/core/builders/sdk/SlideBuilder.ts"() {
|
|
5344
|
+
init_background_gradient_input();
|
|
4846
5345
|
init_ElementFactory();
|
|
4847
5346
|
exports.SlideBuilder = class {
|
|
4848
5347
|
/**
|
|
@@ -4953,12 +5452,12 @@ var init_SlideBuilder = __esm({
|
|
|
4953
5452
|
switch (bg.type) {
|
|
4954
5453
|
case "solid":
|
|
4955
5454
|
this.slide.backgroundColor = bg.color;
|
|
5455
|
+
delete this.slide.backgroundGradient;
|
|
5456
|
+
delete this.slide.backgroundGradientFill;
|
|
4956
5457
|
break;
|
|
4957
|
-
case "gradient":
|
|
4958
|
-
|
|
4959
|
-
this.slide.backgroundGradient = `linear-gradient(${bg.angle ?? 180}deg, ${stops})`;
|
|
5458
|
+
case "gradient":
|
|
5459
|
+
Object.assign(this.slide, mapBackgroundGradientInput(bg));
|
|
4960
5460
|
break;
|
|
4961
|
-
}
|
|
4962
5461
|
case "image":
|
|
4963
5462
|
this.slide.backgroundImage = bg.source;
|
|
4964
5463
|
break;
|
|
@@ -7392,9 +7891,9 @@ function resolveCoordinate(value, variables) {
|
|
|
7392
7891
|
return value;
|
|
7393
7892
|
}
|
|
7394
7893
|
const trimmed2 = String(value).trim();
|
|
7395
|
-
const
|
|
7396
|
-
if (Number.isFinite(
|
|
7397
|
-
return
|
|
7894
|
+
const num5 = Number(trimmed2);
|
|
7895
|
+
if (Number.isFinite(num5)) {
|
|
7896
|
+
return num5;
|
|
7398
7897
|
}
|
|
7399
7898
|
return resolveOperand(trimmed2, variables);
|
|
7400
7899
|
}
|
|
@@ -18623,9 +19122,9 @@ function resolveToken(token3, vars) {
|
|
|
18623
19122
|
if (trimmed2 === "") {
|
|
18624
19123
|
return 0;
|
|
18625
19124
|
}
|
|
18626
|
-
const
|
|
18627
|
-
if (Number.isFinite(
|
|
18628
|
-
return
|
|
19125
|
+
const num5 = Number(trimmed2);
|
|
19126
|
+
if (Number.isFinite(num5)) {
|
|
19127
|
+
return num5;
|
|
18629
19128
|
}
|
|
18630
19129
|
return resolveOperand(trimmed2, vars);
|
|
18631
19130
|
}
|
|
@@ -23852,26 +24351,6 @@ var init_element_actions = __esm({
|
|
|
23852
24351
|
}
|
|
23853
24352
|
});
|
|
23854
24353
|
|
|
23855
|
-
// pptx/core/utils/gradient-angle.ts
|
|
23856
|
-
function normalizeDegrees(deg) {
|
|
23857
|
-
if (!Number.isFinite(deg)) {
|
|
23858
|
-
return 0;
|
|
23859
|
-
}
|
|
23860
|
-
return (deg % 360 + 360) % 360;
|
|
23861
|
-
}
|
|
23862
|
-
function ooxmlGradientAngleToCssDegrees(angleDegrees) {
|
|
23863
|
-
return normalizeDegrees(angleDegrees + OOXML_TO_CSS_OFFSET_DEG);
|
|
23864
|
-
}
|
|
23865
|
-
function cssDegreesToOoxmlGradientAngle(cssDegrees) {
|
|
23866
|
-
return normalizeDegrees(cssDegrees - OOXML_TO_CSS_OFFSET_DEG);
|
|
23867
|
-
}
|
|
23868
|
-
var OOXML_TO_CSS_OFFSET_DEG;
|
|
23869
|
-
var init_gradient_angle = __esm({
|
|
23870
|
-
"pptx/core/utils/gradient-angle.ts"() {
|
|
23871
|
-
OOXML_TO_CSS_OFFSET_DEG = 90;
|
|
23872
|
-
}
|
|
23873
|
-
});
|
|
23874
|
-
|
|
23875
24354
|
// pptx/core/utils/positive-fixed-angle.ts
|
|
23876
24355
|
function normalizePositiveFixedAngleDegrees(degrees) {
|
|
23877
24356
|
if (!Number.isFinite(degrees)) {
|
|
@@ -35028,7 +35507,7 @@ function boolean(value, fallback) {
|
|
|
35028
35507
|
}
|
|
35029
35508
|
return value === "1" || value === "true";
|
|
35030
35509
|
}
|
|
35031
|
-
function
|
|
35510
|
+
function num2(value, fallback) {
|
|
35032
35511
|
if (value === void 0 || value === "") {
|
|
35033
35512
|
return fallback;
|
|
35034
35513
|
}
|
|
@@ -35080,8 +35559,8 @@ function parseShape(element2) {
|
|
|
35080
35559
|
const type = element2.attrs.type;
|
|
35081
35560
|
return {
|
|
35082
35561
|
type: type && type !== "none" ? type : void 0,
|
|
35083
|
-
rot:
|
|
35084
|
-
zOrderOff:
|
|
35562
|
+
rot: num2(element2.attrs.rot, 0),
|
|
35563
|
+
zOrderOff: num2(element2.attrs.zOrderOff, 0),
|
|
35085
35564
|
hideGeom: boolean(element2.attrs.hideGeom, false),
|
|
35086
35565
|
lkTxEntry: boolean(element2.attrs.lkTxEntry, false),
|
|
35087
35566
|
blipPhldr: boolean(element2.attrs.blipPhldr, false),
|
|
@@ -35100,9 +35579,9 @@ function parseConstraint(attrs4) {
|
|
|
35100
35579
|
refForName: attrs4.refForName || void 0,
|
|
35101
35580
|
refPtType: attrs4.refPtType ?? "all",
|
|
35102
35581
|
op: op2 === "equ" || op2 === "gte" || op2 === "lte" ? op2 : "none",
|
|
35103
|
-
val:
|
|
35582
|
+
val: num2(attrs4.val, 0),
|
|
35104
35583
|
hasVal: attrs4.val !== void 0,
|
|
35105
|
-
fact:
|
|
35584
|
+
fact: num2(attrs4.fact, 1)
|
|
35106
35585
|
};
|
|
35107
35586
|
}
|
|
35108
35587
|
function parseRule(attrs4) {
|
|
@@ -38854,22 +39333,22 @@ var init_smartart_constraint_branch_index = __esm({
|
|
|
38854
39333
|
});
|
|
38855
39334
|
|
|
38856
39335
|
// diagram/layout/smartart-constraint-resolve.ts
|
|
38857
|
-
function
|
|
39336
|
+
function finite2(value) {
|
|
38858
39337
|
return typeof value === "number" && Number.isFinite(value);
|
|
38859
39338
|
}
|
|
38860
39339
|
function literalValue(constraint) {
|
|
38861
|
-
if (
|
|
39340
|
+
if (finite2(constraint.factor)) {
|
|
38862
39341
|
return constraint.factor;
|
|
38863
39342
|
}
|
|
38864
|
-
if (
|
|
39343
|
+
if (finite2(constraint.value)) {
|
|
38865
39344
|
return constraint.value;
|
|
38866
39345
|
}
|
|
38867
39346
|
return void 0;
|
|
38868
39347
|
}
|
|
38869
39348
|
function combine(constraint, referenced) {
|
|
38870
|
-
const factor =
|
|
39349
|
+
const factor = finite2(constraint.factor) ? constraint.factor : 1;
|
|
38871
39350
|
let result = referenced * factor;
|
|
38872
|
-
if (
|
|
39351
|
+
if (finite2(constraint.value)) {
|
|
38873
39352
|
if (constraint.operator === "gte") {
|
|
38874
39353
|
result = Math.max(result, constraint.value);
|
|
38875
39354
|
} else if (constraint.operator === "lte") {
|
|
@@ -38907,7 +39386,7 @@ function resolveEntry(index, entry2, visiting) {
|
|
|
38907
39386
|
);
|
|
38908
39387
|
const referenced = resolveInternal(index, refRole, refType, visiting);
|
|
38909
39388
|
if (referenced === void 0) {
|
|
38910
|
-
return
|
|
39389
|
+
return finite2(constraint.value) ? constraint.value : void 0;
|
|
38911
39390
|
}
|
|
38912
39391
|
return combine(constraint, referenced);
|
|
38913
39392
|
}
|
|
@@ -41095,8 +41574,8 @@ var init_smartart_layout_interpreter_cycle_ring_nested_hub = __esm({
|
|
|
41095
41574
|
|
|
41096
41575
|
// diagram/layout/smartart-layout-interpreter-cycle-ring-offset.ts
|
|
41097
41576
|
function resolveRingAxisOffset(dimension2, boundSize, scale, values) {
|
|
41098
|
-
const
|
|
41099
|
-
const epsilon =
|
|
41577
|
+
const span2 = Math.max(1e-9, Math.max(...values) - Math.min(...values));
|
|
41578
|
+
const epsilon = span2 * TIE_EPSILON_FRACTION;
|
|
41100
41579
|
const minValue = Math.min(...values);
|
|
41101
41580
|
const maxValue = Math.max(...values);
|
|
41102
41581
|
const lowCount = values.filter((v) => v - minValue <= epsilon).length;
|
|
@@ -43392,8 +43871,8 @@ function centeredAxisPitch(dimension2, itemSize, gapRatio, count2) {
|
|
|
43392
43871
|
const n = Math.max(1, count2);
|
|
43393
43872
|
const gap = n > 1 ? itemSize * Math.max(0, gapRatio) : 0;
|
|
43394
43873
|
const pitch = itemSize + gap;
|
|
43395
|
-
const
|
|
43396
|
-
const shift = (dimension2 -
|
|
43874
|
+
const span2 = n * itemSize + Math.max(0, n - 1) * gap;
|
|
43875
|
+
const shift = (dimension2 - span2) / 2;
|
|
43397
43876
|
return { pitch, shift };
|
|
43398
43877
|
}
|
|
43399
43878
|
function compositeFanPitch(dimension2, boxW, compositeWidthFactor, cardOffsetXRatio, sibSpRatio, count2) {
|
|
@@ -46757,18 +47236,18 @@ function collectNamedRules(definition) {
|
|
|
46757
47236
|
walk3(definition.rootNode);
|
|
46758
47237
|
return out;
|
|
46759
47238
|
}
|
|
46760
|
-
function
|
|
47239
|
+
function finite3(value) {
|
|
46761
47240
|
return typeof value === "number" && Number.isFinite(value);
|
|
46762
47241
|
}
|
|
46763
47242
|
function ruleValue(rule) {
|
|
46764
|
-
let value =
|
|
46765
|
-
if (!
|
|
47243
|
+
let value = finite3(rule.value) ? rule.value : rule.max;
|
|
47244
|
+
if (!finite3(value)) {
|
|
46766
47245
|
return void 0;
|
|
46767
47246
|
}
|
|
46768
|
-
if (
|
|
47247
|
+
if (finite3(rule.factor)) {
|
|
46769
47248
|
value *= rule.factor;
|
|
46770
47249
|
}
|
|
46771
|
-
if (
|
|
47250
|
+
if (finite3(rule.max)) {
|
|
46772
47251
|
value = Math.min(value, rule.max);
|
|
46773
47252
|
}
|
|
46774
47253
|
return Number.isFinite(value) ? value : void 0;
|
|
@@ -54307,7 +54786,7 @@ var init_patch = __esm({
|
|
|
54307
54786
|
init_xml2();
|
|
54308
54787
|
XMLNS = "http://www.w3.org/2000/xmlns/";
|
|
54309
54788
|
escapeText = (text2) => text2.replace(/&/g, "&").replace(/</g, "<").replace(/>/g, ">").replace(/\r/g, "
");
|
|
54310
|
-
qualifiedName = (xml2,
|
|
54789
|
+
qualifiedName = (xml2, span2) => /^<([^\s/>]+)/.exec(xml2.slice(span2.start, span2.openEnd))?.[1] ?? "";
|
|
54311
54790
|
PartPatch = class {
|
|
54312
54791
|
constructor(xml2, rootElement) {
|
|
54313
54792
|
this.xml = xml2;
|
|
@@ -54334,9 +54813,9 @@ var init_patch = __esm({
|
|
|
54334
54813
|
this.edits.push({ start, end, text: text2, seq: this.seq++ });
|
|
54335
54814
|
}
|
|
54336
54815
|
span(element2) {
|
|
54337
|
-
const
|
|
54338
|
-
if (!
|
|
54339
|
-
return
|
|
54816
|
+
const span2 = this.spans.get(element2);
|
|
54817
|
+
if (!span2) throw new Error("Element is not a child of the patched root");
|
|
54818
|
+
return span2;
|
|
54340
54819
|
}
|
|
54341
54820
|
/** The prefix bound to `ns` on the root, declaring `preferred` for it when none is. */
|
|
54342
54821
|
prefix(ns, preferred) {
|
|
@@ -54356,20 +54835,20 @@ var init_patch = __esm({
|
|
|
54356
54835
|
}
|
|
54357
54836
|
/** Replaces the element's content, keeping its start tag (and attributes) as written. */
|
|
54358
54837
|
setContent(element2, content2) {
|
|
54359
|
-
const
|
|
54360
|
-
if (
|
|
54361
|
-
this.add(
|
|
54362
|
-
else this.add(
|
|
54838
|
+
const span2 = this.span(element2);
|
|
54839
|
+
if (span2.selfClosing)
|
|
54840
|
+
this.add(span2.openEnd - 2, span2.openEnd, `>${content2}</${qualifiedName(this.xml, span2)}>`);
|
|
54841
|
+
else this.add(span2.openEnd, span2.closeStart, content2);
|
|
54363
54842
|
}
|
|
54364
54843
|
/** Adds ` name="value"` text to the element's start tag. */
|
|
54365
54844
|
addAttribute(element2, attribute7) {
|
|
54366
|
-
const
|
|
54367
|
-
const at2 =
|
|
54845
|
+
const span2 = this.span(element2);
|
|
54846
|
+
const at2 = span2.openEnd - (span2.selfClosing ? 2 : 1);
|
|
54368
54847
|
this.add(at2, at2, attribute7);
|
|
54369
54848
|
}
|
|
54370
54849
|
remove(element2) {
|
|
54371
|
-
const
|
|
54372
|
-
this.add(
|
|
54850
|
+
const span2 = this.span(element2);
|
|
54851
|
+
this.add(span2.start, span2.end, "");
|
|
54373
54852
|
}
|
|
54374
54853
|
/** Inserts `markup` before `before`, or as the root's last child. */
|
|
54375
54854
|
insert(markup, before) {
|
|
@@ -56184,18 +56663,18 @@ function groupTransform(group2, parent) {
|
|
|
56184
56663
|
const ext = first(xfrm, "ext", NS.a);
|
|
56185
56664
|
const chOff = first(xfrm, "chOff", NS.a);
|
|
56186
56665
|
const chExt = first(xfrm, "chExt", NS.a);
|
|
56187
|
-
const
|
|
56188
|
-
const cx =
|
|
56189
|
-
const cy =
|
|
56190
|
-
const chCx =
|
|
56191
|
-
const chCy =
|
|
56666
|
+
const num5 = (element2, name) => Number.parseInt(element2?.getAttribute(name) ?? "", 10);
|
|
56667
|
+
const cx = num5(ext, "cx");
|
|
56668
|
+
const cy = num5(ext, "cy");
|
|
56669
|
+
const chCx = num5(chExt, "cx");
|
|
56670
|
+
const chCy = num5(chExt, "cy");
|
|
56192
56671
|
if (!off || ![cx, cy, chCx, chCy].every(Number.isFinite) || chCx === 0 || chCy === 0)
|
|
56193
56672
|
return parent;
|
|
56194
56673
|
const scaleX = cx / chCx;
|
|
56195
56674
|
const scaleY = cy / chCy;
|
|
56196
56675
|
const local = {
|
|
56197
|
-
offsetX:
|
|
56198
|
-
offsetY:
|
|
56676
|
+
offsetX: num5(off, "x") - (num5(chOff, "x") || 0) * scaleX,
|
|
56677
|
+
offsetY: num5(off, "y") - (num5(chOff, "y") || 0) * scaleY,
|
|
56199
56678
|
scaleX,
|
|
56200
56679
|
scaleY
|
|
56201
56680
|
};
|
|
@@ -63791,9 +64270,9 @@ function parseValueColorPositions(node, xmlLookup) {
|
|
|
63791
64270
|
const entry2 = { kind };
|
|
63792
64271
|
const rawVal = posNode["@_val"];
|
|
63793
64272
|
if (rawVal !== void 0) {
|
|
63794
|
-
const
|
|
63795
|
-
if (Number.isFinite(
|
|
63796
|
-
entry2.value =
|
|
64273
|
+
const num5 = Number.parseFloat(String(rawVal));
|
|
64274
|
+
if (Number.isFinite(num5)) {
|
|
64275
|
+
entry2.value = num5;
|
|
63797
64276
|
}
|
|
63798
64277
|
}
|
|
63799
64278
|
positions2.push(entry2);
|
|
@@ -64155,8 +64634,8 @@ var init_chart_cx_parser = __esm({
|
|
|
64155
64634
|
// pptx/core/utils/chart-user-shapes-parser.ts
|
|
64156
64635
|
function markerFraction(marker2, axis, xml2) {
|
|
64157
64636
|
const raw2 = xml2.getScalarChildByLocalName(marker2, axis);
|
|
64158
|
-
const
|
|
64159
|
-
return Number.isFinite(
|
|
64637
|
+
const num5 = Number.parseFloat(String(raw2 ?? ""));
|
|
64638
|
+
return Number.isFinite(num5) ? num5 : 0;
|
|
64160
64639
|
}
|
|
64161
64640
|
function parseShapeParagraphs(shape3, xml2, colors) {
|
|
64162
64641
|
const txBody = xml2.getChildByLocalName(shape3, "txBody");
|
|
@@ -64279,13 +64758,13 @@ function buildUserShape(shape3, kind, base, xml2, colors) {
|
|
|
64279
64758
|
};
|
|
64280
64759
|
}
|
|
64281
64760
|
function parseOffExt(offNode, extNode) {
|
|
64282
|
-
const
|
|
64761
|
+
const num5 = (node, attr6) => {
|
|
64283
64762
|
const raw2 = Number.parseFloat(String(node?.[attr6] ?? ""));
|
|
64284
64763
|
return Number.isFinite(raw2) ? raw2 : 0;
|
|
64285
64764
|
};
|
|
64286
64765
|
return {
|
|
64287
|
-
off: { x:
|
|
64288
|
-
ext: { cx:
|
|
64766
|
+
off: { x: num5(offNode, "@_x"), y: num5(offNode, "@_y") },
|
|
64767
|
+
ext: { cx: num5(extNode, "@_cx"), cy: num5(extNode, "@_cy") }
|
|
64289
64768
|
};
|
|
64290
64769
|
}
|
|
64291
64770
|
function parseGroupTransform(group2, xml2) {
|
|
@@ -64435,7 +64914,7 @@ function parseChartUserShapesDrawing(drawingRoot, xml2, colors) {
|
|
|
64435
64914
|
return shapes.length > 0 ? shapes : void 0;
|
|
64436
64915
|
}
|
|
64437
64916
|
function childFraction(childOff, childExt, chOff, chExt) {
|
|
64438
|
-
const safeDiv = (
|
|
64917
|
+
const safeDiv = (num5, den) => den !== 0 ? num5 / den : 0;
|
|
64439
64918
|
return {
|
|
64440
64919
|
x: safeDiv(childOff.x - chOff.x, chExt.cx),
|
|
64441
64920
|
y: safeDiv(childOff.y - chOff.y, chExt.cy),
|
|
@@ -64760,8 +65239,8 @@ function resolveCellValue(cell3, sharedStrings) {
|
|
|
64760
65239
|
case "inlineStr":
|
|
64761
65240
|
return cell3.value;
|
|
64762
65241
|
default: {
|
|
64763
|
-
const
|
|
64764
|
-
return Number.isFinite(
|
|
65242
|
+
const num5 = Number.parseFloat(cell3.value);
|
|
65243
|
+
return Number.isFinite(num5) ? num5 : cell3.value;
|
|
64765
65244
|
}
|
|
64766
65245
|
}
|
|
64767
65246
|
}
|
|
@@ -64846,8 +65325,8 @@ async function parseEmbeddedXlsx(xlsxData) {
|
|
|
64846
65325
|
} else if (typeof cellVal === "number") {
|
|
64847
65326
|
values.push(cellVal);
|
|
64848
65327
|
} else {
|
|
64849
|
-
const
|
|
64850
|
-
values.push(Number.isFinite(
|
|
65328
|
+
const num5 = Number.parseFloat(String(cellVal));
|
|
65329
|
+
values.push(Number.isFinite(num5) ? num5 : 0);
|
|
64851
65330
|
}
|
|
64852
65331
|
}
|
|
64853
65332
|
series.push({ name, values });
|
|
@@ -65560,8 +66039,8 @@ function parseVmlOpacity(value) {
|
|
|
65560
66039
|
const pct = parseFloat(trimmed2.slice(0, -1));
|
|
65561
66040
|
return Number.isFinite(pct) ? pct / 100 : void 0;
|
|
65562
66041
|
}
|
|
65563
|
-
const
|
|
65564
|
-
return Number.isFinite(
|
|
66042
|
+
const num5 = parseFloat(trimmed2);
|
|
66043
|
+
return Number.isFinite(num5) ? Math.min(1, Math.max(0, num5)) : void 0;
|
|
65565
66044
|
}
|
|
65566
66045
|
var NAMED_COLORS;
|
|
65567
66046
|
var init_vml_color_parser = __esm({
|
|
@@ -65604,29 +66083,29 @@ function parseCssDimension(value, containerPx) {
|
|
|
65604
66083
|
if (trimmed2.length === 0) {
|
|
65605
66084
|
return 0;
|
|
65606
66085
|
}
|
|
65607
|
-
const
|
|
65608
|
-
if (!Number.isFinite(
|
|
66086
|
+
const num5 = parseFloat(trimmed2);
|
|
66087
|
+
if (!Number.isFinite(num5)) {
|
|
65609
66088
|
return 0;
|
|
65610
66089
|
}
|
|
65611
66090
|
if (trimmed2.endsWith("pt")) {
|
|
65612
|
-
return
|
|
66091
|
+
return num5 / PT_PER_PX2;
|
|
65613
66092
|
}
|
|
65614
66093
|
if (trimmed2.endsWith("in")) {
|
|
65615
|
-
return
|
|
66094
|
+
return num5 * 96;
|
|
65616
66095
|
}
|
|
65617
66096
|
if (trimmed2.endsWith("cm")) {
|
|
65618
|
-
return
|
|
66097
|
+
return num5 * (96 / 2.54);
|
|
65619
66098
|
}
|
|
65620
66099
|
if (trimmed2.endsWith("mm")) {
|
|
65621
|
-
return
|
|
66100
|
+
return num5 * (96 / 25.4);
|
|
65622
66101
|
}
|
|
65623
66102
|
if (trimmed2.endsWith("emu")) {
|
|
65624
|
-
return
|
|
66103
|
+
return num5 / EMU_PER_PX6;
|
|
65625
66104
|
}
|
|
65626
66105
|
if (trimmed2.endsWith("%")) {
|
|
65627
|
-
return containerPx ?
|
|
66106
|
+
return containerPx ? num5 / 100 * containerPx : 0;
|
|
65628
66107
|
}
|
|
65629
|
-
return
|
|
66108
|
+
return num5;
|
|
65630
66109
|
}
|
|
65631
66110
|
function parseVmlStyle(styleAttr) {
|
|
65632
66111
|
const result = {};
|
|
@@ -66545,7 +67024,7 @@ function children3(node, name) {
|
|
|
66545
67024
|
(v) => typeof v === "object" && v !== null ? v : {}
|
|
66546
67025
|
);
|
|
66547
67026
|
}
|
|
66548
|
-
function
|
|
67027
|
+
function num3(node, attr6) {
|
|
66549
67028
|
const raw2 = node?.[`@_${attr6}`];
|
|
66550
67029
|
if (raw2 === void 0 || raw2 === "") {
|
|
66551
67030
|
return void 0;
|
|
@@ -66560,15 +67039,15 @@ function vec(node, keys) {
|
|
|
66560
67039
|
if (!node) {
|
|
66561
67040
|
return void 0;
|
|
66562
67041
|
}
|
|
66563
|
-
const [x, y, z] = keys.map((k) =>
|
|
67042
|
+
const [x, y, z] = keys.map((k) => num3(node, k));
|
|
66564
67043
|
if (x === void 0 && y === void 0 && z === void 0) {
|
|
66565
67044
|
return void 0;
|
|
66566
67045
|
}
|
|
66567
67046
|
return { x: x ?? 0, y: y ?? 0, z: z ?? 0 };
|
|
66568
67047
|
}
|
|
66569
67048
|
function ratio(node) {
|
|
66570
|
-
const n =
|
|
66571
|
-
const d =
|
|
67049
|
+
const n = num3(node, "n");
|
|
67050
|
+
const d = num3(node, "d");
|
|
66572
67051
|
if (n === void 0 || d === void 0 || d === 0) {
|
|
66573
67052
|
return void 0;
|
|
66574
67053
|
}
|
|
@@ -66584,7 +67063,7 @@ function colour2(node) {
|
|
|
66584
67063
|
const scrgb = child10(clr, "a:scrgbClr");
|
|
66585
67064
|
if (scrgb) {
|
|
66586
67065
|
const chan = (a) => {
|
|
66587
|
-
const pct = Math.min(1e5, Math.max(0,
|
|
67066
|
+
const pct = Math.min(1e5, Math.max(0, num3(scrgb, a) ?? 0)) / 1e5;
|
|
66588
67067
|
return Math.round(pct * 255).toString(16).padStart(2, "0");
|
|
66589
67068
|
};
|
|
66590
67069
|
return `#${chan("r")}${chan("g")}${chan("b")}`;
|
|
@@ -66597,14 +67076,14 @@ function parseCamera(node) {
|
|
|
66597
67076
|
}
|
|
66598
67077
|
const ortho = am(node, "orthographic");
|
|
66599
67078
|
const persp = am(node, "perspective");
|
|
66600
|
-
const fov =
|
|
67079
|
+
const fov = num3(persp, "fov");
|
|
66601
67080
|
return {
|
|
66602
67081
|
position: point(am(node, "pos")),
|
|
66603
67082
|
up: delta(am(node, "up")),
|
|
66604
67083
|
lookAt: point(am(node, "lookAt")),
|
|
66605
67084
|
projection: ortho && !persp ? "orthographic" : "perspective",
|
|
66606
67085
|
...fov !== void 0 ? { fovDeg: fov / ANGLE_UNIT } : {},
|
|
66607
|
-
...ortho ? { orthoScale:
|
|
67086
|
+
...ortho ? { orthoScale: num3(ortho, "sx") ?? num3(ortho, "scale") } : {}
|
|
66608
67087
|
};
|
|
66609
67088
|
}
|
|
66610
67089
|
function parseTransform2(node) {
|
|
@@ -66616,7 +67095,7 @@ function parseTransform2(node) {
|
|
|
66616
67095
|
const sx = ratio(am(scaleNode, "sx"));
|
|
66617
67096
|
const sy = ratio(am(scaleNode, "sy"));
|
|
66618
67097
|
const sz = ratio(am(scaleNode, "sz"));
|
|
66619
|
-
const angle = (a) => (
|
|
67098
|
+
const angle = (a) => (num3(rot, a) ?? 0) / ANGLE_UNIT;
|
|
66620
67099
|
return {
|
|
66621
67100
|
meterPerModelUnit: ratio(am(node, "meterPerModelUnit")),
|
|
66622
67101
|
preTranslate: delta(am(node, "preTrans")),
|
|
@@ -66629,7 +67108,7 @@ function parseLights(model3d) {
|
|
|
66629
67108
|
const lights = [];
|
|
66630
67109
|
for (const [tag2, kind] of LIGHT_TAGS) {
|
|
66631
67110
|
for (const node of [...children3(model3d, `am3d:${tag2}`), ...children3(model3d, tag2)]) {
|
|
66632
|
-
const spot =
|
|
67111
|
+
const spot = num3(am(node, "spotAngle"), "angle") ?? num3(node, "angle") ?? num3(node, "spotAngle");
|
|
66633
67112
|
lights.push({
|
|
66634
67113
|
kind,
|
|
66635
67114
|
color: colour2(node),
|
|
@@ -66646,7 +67125,7 @@ function parseModel3DScene(model3d) {
|
|
|
66646
67125
|
const camera = parseCamera(am(model3d, "camera"));
|
|
66647
67126
|
const transform7 = parseTransform2(am(model3d, "trans"));
|
|
66648
67127
|
const lights = parseLights(model3d);
|
|
66649
|
-
const viewportSizeEmu =
|
|
67128
|
+
const viewportSizeEmu = num3(am(model3d, "objViewport"), "viewportSz");
|
|
66650
67129
|
if (!camera && !transform7 && lights.length === 0) {
|
|
66651
67130
|
return void 0;
|
|
66652
67131
|
}
|
|
@@ -79948,8 +80427,8 @@ function rebaseCommentMentions(mentions, oldText, newText, loaded) {
|
|
|
79948
80427
|
}
|
|
79949
80428
|
continue;
|
|
79950
80429
|
}
|
|
79951
|
-
const
|
|
79952
|
-
if (
|
|
80430
|
+
const span2 = oldText.slice(start, end);
|
|
80431
|
+
if (span2.length !== mention.length) {
|
|
79953
80432
|
continue;
|
|
79954
80433
|
}
|
|
79955
80434
|
let next = -1;
|
|
@@ -79958,11 +80437,11 @@ function rebaseCommentMentions(mentions, oldText, newText, loaded) {
|
|
|
79958
80437
|
} else if (start >= changeEnd) {
|
|
79959
80438
|
next = start + delta2;
|
|
79960
80439
|
}
|
|
79961
|
-
if (next >= 0 && newText.slice(next, next + mention.length) ===
|
|
80440
|
+
if (next >= 0 && newText.slice(next, next + mention.length) === span2) {
|
|
79962
80441
|
result.push(next === start ? mention : { ...mention, startIndex: next });
|
|
79963
80442
|
continue;
|
|
79964
80443
|
}
|
|
79965
|
-
const relocated = nearestOccurrence(newText,
|
|
80444
|
+
const relocated = nearestOccurrence(newText, span2, next >= 0 ? next : start);
|
|
79966
80445
|
if (relocated >= 0) {
|
|
79967
80446
|
result.push({ ...mention, startIndex: relocated });
|
|
79968
80447
|
}
|
|
@@ -80022,17 +80501,17 @@ var init_modern_comment_mentions = __esm({
|
|
|
80022
80501
|
}
|
|
80023
80502
|
return index;
|
|
80024
80503
|
};
|
|
80025
|
-
nearestOccurrence = (text2,
|
|
80504
|
+
nearestOccurrence = (text2, span2, hint) => {
|
|
80026
80505
|
let best = -1;
|
|
80027
80506
|
let bestDistance = Number.POSITIVE_INFINITY;
|
|
80028
|
-
let at2 = text2.indexOf(
|
|
80507
|
+
let at2 = text2.indexOf(span2);
|
|
80029
80508
|
while (at2 !== -1) {
|
|
80030
80509
|
const distance = Math.abs(at2 - hint);
|
|
80031
80510
|
if (distance < bestDistance) {
|
|
80032
80511
|
best = at2;
|
|
80033
80512
|
bestDistance = distance;
|
|
80034
80513
|
}
|
|
80035
|
-
at2 = text2.indexOf(
|
|
80514
|
+
at2 = text2.indexOf(span2, at2 + 1);
|
|
80036
80515
|
}
|
|
80037
80516
|
return best;
|
|
80038
80517
|
};
|
|
@@ -84978,7 +85457,15 @@ var init_PptxSlideBackgroundBuilder = __esm({
|
|
|
84978
85457
|
init.reportUnsupportedBackground?.(rawBackgroundImage);
|
|
84979
85458
|
}
|
|
84980
85459
|
}
|
|
84981
|
-
if (backgroundProperties["a:blipFill"] === void 0 &&
|
|
85460
|
+
if (backgroundProperties["a:blipFill"] === void 0 && hasBackgroundGradient) {
|
|
85461
|
+
const gradFill2 = init.buildBackgroundGradientFill?.();
|
|
85462
|
+
if (gradFill2) {
|
|
85463
|
+
backgroundProperties["a:gradFill"] = gradFill2;
|
|
85464
|
+
} else if (!hasBackgroundColor && !hasBackgroundImage) {
|
|
85465
|
+
init.reportUnsupportedGradient?.();
|
|
85466
|
+
}
|
|
85467
|
+
}
|
|
85468
|
+
if (backgroundProperties["a:blipFill"] === void 0 && backgroundProperties["a:gradFill"] === void 0 && hasBackgroundColor && init.slide.backgroundColor) {
|
|
84982
85469
|
backgroundProperties["a:solidFill"] = {
|
|
84983
85470
|
"a:srgbClr": {
|
|
84984
85471
|
"@_val": init.slide.backgroundColor.replace("#", "").toUpperCase()
|
|
@@ -88036,6 +88523,10 @@ function applyCellFillStyle(cellProperties, style2, context, slidePath) {
|
|
|
88036
88523
|
}
|
|
88037
88524
|
return hasStyle;
|
|
88038
88525
|
}
|
|
88526
|
+
function presetDashValue(value) {
|
|
88527
|
+
const text2 = typeof value === "string" || typeof value === "number" ? String(value) : "";
|
|
88528
|
+
return text2 ? text2 : void 0;
|
|
88529
|
+
}
|
|
88039
88530
|
function applyCellBorderStyle(cellProperties, style2, context) {
|
|
88040
88531
|
if (!cellProperties) {
|
|
88041
88532
|
return false;
|
|
@@ -88073,13 +88564,13 @@ function applyCellBorderStyle(cellProperties, style2, context) {
|
|
|
88073
88564
|
style2[`${prefix}Color`] = color3;
|
|
88074
88565
|
hasStyle = true;
|
|
88075
88566
|
}
|
|
88076
|
-
const
|
|
88077
|
-
if (
|
|
88078
|
-
|
|
88079
|
-
if (
|
|
88080
|
-
style2[`${prefix}
|
|
88081
|
-
hasStyle = true;
|
|
88567
|
+
const dash = parseDrawingLineDash(node, presetDashValue);
|
|
88568
|
+
if (dash.strokeDash) {
|
|
88569
|
+
style2[`${prefix}Dash`] = dash.strokeDash;
|
|
88570
|
+
if (dash.strokeDash === "custom") {
|
|
88571
|
+
style2[`${prefix}DashSegments`] = dash.customDashSegments;
|
|
88082
88572
|
}
|
|
88573
|
+
hasStyle = true;
|
|
88083
88574
|
}
|
|
88084
88575
|
}
|
|
88085
88576
|
const firstBorderColor = style2.borderTopColor || style2.borderBottomColor || style2.borderLeftColor || style2.borderRightColor;
|
|
@@ -88171,6 +88662,7 @@ var init_table_cell_fill_border_helpers = __esm({
|
|
|
88171
88662
|
"pptx/core/core/builders/table-cell-fill-border-helpers.ts"() {
|
|
88172
88663
|
init_theme_color_ref();
|
|
88173
88664
|
init_color_xml_preservation();
|
|
88665
|
+
init_drawing_line_dash();
|
|
88174
88666
|
}
|
|
88175
88667
|
});
|
|
88176
88668
|
|
|
@@ -89866,8 +90358,8 @@ function decodeAinkInk(inkRoot) {
|
|
|
89866
90358
|
if (raw2.length === 0) {
|
|
89867
90359
|
return 2;
|
|
89868
90360
|
}
|
|
89869
|
-
const
|
|
89870
|
-
return Number.isFinite(
|
|
90361
|
+
const num5 = Number(raw2);
|
|
90362
|
+
return Number.isFinite(num5) && num5 > 0 ? num5 : 2;
|
|
89871
90363
|
})();
|
|
89872
90364
|
const traces = ensureArrayLike3(inkRoot["aink:trace"]);
|
|
89873
90365
|
for (const trace of traces) {
|
|
@@ -92032,9 +92524,9 @@ async function ensureCustomPropertiesPackagingArtifacts(context) {
|
|
|
92032
92524
|
let maxId = 0;
|
|
92033
92525
|
for (const rel of rels) {
|
|
92034
92526
|
const id = String(rel?.["@_Id"] || "");
|
|
92035
|
-
const
|
|
92036
|
-
if (Number.isFinite(
|
|
92037
|
-
maxId =
|
|
92527
|
+
const num5 = Number.parseInt(id.replace(/^rId/, ""), 10);
|
|
92528
|
+
if (Number.isFinite(num5) && num5 > maxId) {
|
|
92529
|
+
maxId = num5;
|
|
92038
92530
|
}
|
|
92039
92531
|
}
|
|
92040
92532
|
rels.push({
|
|
@@ -92119,11 +92611,11 @@ var init_PptxDocumentPropertiesUpdater = __esm({
|
|
|
92119
92611
|
this.context = context;
|
|
92120
92612
|
}
|
|
92121
92613
|
async updateOnSave(slides, options2) {
|
|
92122
|
-
await this.updateCoreProperties(options2?.coreProperties);
|
|
92614
|
+
await this.updateCoreProperties(options2?.coreProperties, options2?.fixedDate);
|
|
92123
92615
|
await this.updateAppProperties(slides, options2?.appProperties);
|
|
92124
92616
|
await this.updateCustomProperties(options2?.customProperties);
|
|
92125
92617
|
}
|
|
92126
|
-
async updateCoreProperties(overrides28) {
|
|
92618
|
+
async updateCoreProperties(overrides28, fixedDate) {
|
|
92127
92619
|
const coreFile = this.context.zip.file("docProps/core.xml");
|
|
92128
92620
|
if (!coreFile) {
|
|
92129
92621
|
return;
|
|
@@ -92132,7 +92624,12 @@ var init_PptxDocumentPropertiesUpdater = __esm({
|
|
|
92132
92624
|
const coreXml = await coreFile.async("string");
|
|
92133
92625
|
const core = applyCoreOverrides(parseCoreProperties(coreXml), overrides28);
|
|
92134
92626
|
const revision = Number.parseInt(core.revision?.trim() ?? "", 10);
|
|
92135
|
-
const next = {
|
|
92627
|
+
const next = fixedDate ? {
|
|
92628
|
+
...core,
|
|
92629
|
+
revision: overrides28?.revision ?? "1",
|
|
92630
|
+
created: overrides28?.created ?? formatW3cdtf(fixedDate),
|
|
92631
|
+
modified: overrides28?.modified ?? formatW3cdtf(fixedDate)
|
|
92632
|
+
} : {
|
|
92136
92633
|
...core,
|
|
92137
92634
|
revision: String(Number.isFinite(revision) && revision >= 0 ? revision + 1 : 1),
|
|
92138
92635
|
modified: formatW3cdtf(/* @__PURE__ */ new Date())
|
|
@@ -119422,14 +119919,14 @@ function valXml(local, value) {
|
|
|
119422
119919
|
const text2 = typeof value === "boolean" ? value ? "1" : "0" : typeof value === "number" ? chartNumber(value) : escapeAttribute(value);
|
|
119423
119920
|
return `<c:${local} val="${text2}"/>`;
|
|
119424
119921
|
}
|
|
119425
|
-
function
|
|
119922
|
+
function sameValue2(left, right) {
|
|
119426
119923
|
if (left === right) return true;
|
|
119427
119924
|
if (typeof left !== "object" || typeof right !== "object" || !left || !right) return false;
|
|
119428
119925
|
if (Array.isArray(left) !== Array.isArray(right)) return false;
|
|
119429
119926
|
const entries = (value) => Object.entries(value).filter(([, item2]) => item2 !== void 0);
|
|
119430
119927
|
const a = entries(left);
|
|
119431
119928
|
const b = new Map(entries(right));
|
|
119432
|
-
return a.length === b.size && a.every(([key2, item2]) => b.has(key2) &&
|
|
119929
|
+
return a.length === b.size && a.every(([key2, item2]) => b.has(key2) && sameValue2(item2, b.get(key2)));
|
|
119433
119930
|
}
|
|
119434
119931
|
var INVALID_XML, escapeText2, escapeAttribute, elementXml2, raw;
|
|
119435
119932
|
var init_write_util = __esm({
|
|
@@ -120175,13 +120672,13 @@ function chartFillXml(fill3) {
|
|
|
120175
120672
|
}
|
|
120176
120673
|
function patchShape(root, shape3, read) {
|
|
120177
120674
|
const doc = root.ownerDocument;
|
|
120178
|
-
if (!
|
|
120675
|
+
if (!sameValue2(read.fill, shape3.fill)) {
|
|
120179
120676
|
const xml2 = shape3.fill && chartFillXml(shape3.fill);
|
|
120180
120677
|
if (xml2) setDrawingFillXml(root, xml2);
|
|
120181
120678
|
else if (!shape3.fill)
|
|
120182
120679
|
for (let fill3 = fillElementOf(root); fill3; fill3 = fillElementOf(root)) root.removeChild(fill3);
|
|
120183
120680
|
}
|
|
120184
|
-
if (!
|
|
120681
|
+
if (!sameValue2(read.line, shape3.line)) {
|
|
120185
120682
|
let ln = first(root, "ln", NS.a);
|
|
120186
120683
|
if (!shape3.line) {
|
|
120187
120684
|
if (ln) root.removeChild(ln);
|
|
@@ -120213,7 +120710,7 @@ function shapePropertiesInnerXml(context, shape3) {
|
|
|
120213
120710
|
if (sourceXml !== void 0) {
|
|
120214
120711
|
const root = wrap("spPr", sourceXml);
|
|
120215
120712
|
const read = readShapeFields(root);
|
|
120216
|
-
if (
|
|
120713
|
+
if (sameValue2(read, fields)) inner = sourceXml;
|
|
120217
120714
|
else {
|
|
120218
120715
|
patchShape(root, fields, read);
|
|
120219
120716
|
inner = innerXml(root);
|
|
@@ -120228,14 +120725,14 @@ function textBodyInnerXml(context, body) {
|
|
|
120228
120725
|
const { sourceXml, ...fields } = body;
|
|
120229
120726
|
if (sourceXml !== void 0) {
|
|
120230
120727
|
const read = parseDrawingTextBody(wrap("txPr", sourceXml));
|
|
120231
|
-
if (
|
|
120728
|
+
if (sameValue2(read, fields)) return raw(context, sourceXml);
|
|
120232
120729
|
}
|
|
120233
120730
|
return raw(context, writeTextBody(fields));
|
|
120234
120731
|
}
|
|
120235
120732
|
function layoutXml(context, value) {
|
|
120236
120733
|
if (!value) return "";
|
|
120237
120734
|
const { sourceXml, ...layout } = value;
|
|
120238
|
-
if (sourceXml !== void 0 &&
|
|
120735
|
+
if (sourceXml !== void 0 && sameValue2(readLayoutFields(wrap("layout", sourceXml)), layout))
|
|
120239
120736
|
return elementXml2("layout", raw(context, sourceXml));
|
|
120240
120737
|
const manual = LAYOUT_FIELDS.map(([local, key2]) => {
|
|
120241
120738
|
const value2 = layout[key2];
|
|
@@ -123525,7 +124022,16 @@ function repaintSeriesForFamily(series, toLine) {
|
|
|
123525
124022
|
shape3.fill = structuredClone(shape3.line.fill);
|
|
123526
124023
|
}
|
|
123527
124024
|
function clearPointPaint(series, key2) {
|
|
123528
|
-
|
|
124025
|
+
const emptied2 = (part) => Object.keys(part).every((name) => name === "sourceXml");
|
|
124026
|
+
for (const point2 of series.dataPoints) {
|
|
124027
|
+
if (!point2.spPr) continue;
|
|
124028
|
+
delete point2.spPr[key2];
|
|
124029
|
+
if (point2.spPr.line && emptied2(point2.spPr.line)) delete point2.spPr.line;
|
|
124030
|
+
if (emptied2(point2.spPr)) delete point2.spPr;
|
|
124031
|
+
}
|
|
124032
|
+
series.dataPoints = series.dataPoints.filter(
|
|
124033
|
+
(point2) => Object.keys(point2).some((name) => name !== "index")
|
|
124034
|
+
);
|
|
123529
124035
|
}
|
|
123530
124036
|
function setChartSeriesFill(space, index, fill3) {
|
|
123531
124037
|
return editChartSpace(space, (draft) => {
|
|
@@ -123534,27 +124040,27 @@ function setChartSeriesFill(space, index, fill3) {
|
|
|
123534
124040
|
clearPointPaint(series, "fill");
|
|
123535
124041
|
});
|
|
123536
124042
|
}
|
|
123537
|
-
function setChartSeriesColor2(space, index, color3) {
|
|
124043
|
+
function setChartSeriesColor2(space, index, color3, options2 = {}) {
|
|
123538
124044
|
return editChartSpace(space, (draft) => {
|
|
123539
124045
|
const { series } = chartSeriesEntryAt(draft, index);
|
|
123540
124046
|
const shape3 = series.spPr ??= {};
|
|
123541
|
-
const line3 =
|
|
124047
|
+
const line3 = paintsLine2(draft, index);
|
|
123542
124048
|
const current = line3 ? shape3.line?.fill : shape3.fill;
|
|
123543
124049
|
const previous = current?.kind === "solid" ? current.color : void 0;
|
|
123544
124050
|
const fill3 = color3 ? { kind: "solid", color: withAlphaOf(color3, previous) } : void 0;
|
|
123545
124051
|
if (line3) assignOrDelete(shape3.line ??= {}, "fill", fill3);
|
|
123546
124052
|
else assignOrDelete(shape3, "fill", fill3);
|
|
123547
|
-
clearPointPaint(series, line3 ? "line" : "fill");
|
|
124053
|
+
if (!options2.keepPointColors) clearPointPaint(series, line3 ? "line" : "fill");
|
|
123548
124054
|
});
|
|
123549
124055
|
}
|
|
123550
|
-
var
|
|
124056
|
+
var paintsLine2, painted;
|
|
123551
124057
|
var init_fill = __esm({
|
|
123552
124058
|
"chart/edit/fill.ts"() {
|
|
123553
124059
|
init_draft();
|
|
123554
124060
|
init_paint();
|
|
123555
124061
|
init_write_shape();
|
|
123556
124062
|
init_xml_fragment();
|
|
123557
|
-
|
|
124063
|
+
paintsLine2 = (space, index) => chartGroupPaintsLine(chartSeriesEntryAt(space, index).group);
|
|
123558
124064
|
painted = (fill3) => fill3 !== void 0 && fill3.kind !== "none";
|
|
123559
124065
|
}
|
|
123560
124066
|
});
|
|
@@ -124957,7 +125463,7 @@ var init_type_axes = __esm({
|
|
|
124957
125463
|
});
|
|
124958
125464
|
|
|
124959
125465
|
// chart/edit/type.ts
|
|
124960
|
-
function
|
|
125466
|
+
function chartGroupElement(kind, is3D) {
|
|
124961
125467
|
const match = Object.entries(CHART_GROUP_ELEMENTS).find(
|
|
124962
125468
|
([, value]) => value.kind === kind && value.is3D === is3D
|
|
124963
125469
|
);
|
|
@@ -124972,7 +125478,7 @@ function groupingFor(element2, grouping) {
|
|
|
124972
125478
|
}
|
|
124973
125479
|
function newGroup(base, target, series) {
|
|
124974
125480
|
const is3D = target.is3D ?? (base.is3D && SWITCHABLE[target.kind] === true);
|
|
124975
|
-
const element2 =
|
|
125481
|
+
const element2 = chartGroupElement(target.kind, is3D);
|
|
124976
125482
|
const group2 = { kind: target.kind, element: element2, is3D, series, axisIds: [] };
|
|
124977
125483
|
const allowed = GROUP_FIELDS[element2] ?? [];
|
|
124978
125484
|
for (const key2 of allowed)
|
|
@@ -125181,6 +125687,11 @@ var init_target = __esm({
|
|
|
125181
125687
|
});
|
|
125182
125688
|
|
|
125183
125689
|
// chart/edit/group-options.ts
|
|
125690
|
+
function assertChartGroupOption(key2, value) {
|
|
125691
|
+
const [min, max] = RANGES[key2];
|
|
125692
|
+
if (!Number.isInteger(value) || value < min || value > max)
|
|
125693
|
+
throw new RangeError(`Chart ${key2} must be a whole number from ${min} to ${max}`);
|
|
125694
|
+
}
|
|
125184
125695
|
function setChartGroupOptions2(space, seriesIndex, edit) {
|
|
125185
125696
|
return editChartSpace(space, (draft) => {
|
|
125186
125697
|
const { group: group2 } = chartSeriesEntryAt(draft, seriesIndex);
|
|
@@ -125193,9 +125704,7 @@ function setChartGroupOptions2(space, seriesIndex, edit) {
|
|
|
125193
125704
|
delete group2[key2];
|
|
125194
125705
|
continue;
|
|
125195
125706
|
}
|
|
125196
|
-
|
|
125197
|
-
if (!Number.isInteger(value) || value < min || value > max)
|
|
125198
|
-
throw new RangeError(`Chart ${key2} must be a whole number from ${min} to ${max}`);
|
|
125707
|
+
assertChartGroupOption(key2, value);
|
|
125199
125708
|
group2[key2] = value;
|
|
125200
125709
|
}
|
|
125201
125710
|
});
|
|
@@ -126764,44 +127273,6 @@ var init_chart2 = __esm({
|
|
|
126764
127273
|
}
|
|
126765
127274
|
});
|
|
126766
127275
|
|
|
126767
|
-
// pptx/core/utils/chart-container-type-map.ts
|
|
126768
|
-
function chartContainerLocalNameToType(localName29) {
|
|
126769
|
-
return CONTAINER_LOCAL_NAME_TO_TYPE[localName29];
|
|
126770
|
-
}
|
|
126771
|
-
function isLineDrawnChartType(type) {
|
|
126772
|
-
return type !== void 0 && LINE_DRAWN_CHART_TYPES.has(type);
|
|
126773
|
-
}
|
|
126774
|
-
var CONTAINER_LOCAL_NAME_TO_TYPE, LINE_DRAWN_CHART_TYPES;
|
|
126775
|
-
var init_chart_container_type_map = __esm({
|
|
126776
|
-
"pptx/core/utils/chart-container-type-map.ts"() {
|
|
126777
|
-
CONTAINER_LOCAL_NAME_TO_TYPE = {
|
|
126778
|
-
barChart: "bar",
|
|
126779
|
-
bar3DChart: "bar3D",
|
|
126780
|
-
lineChart: "line",
|
|
126781
|
-
line3DChart: "line3D",
|
|
126782
|
-
pieChart: "pie",
|
|
126783
|
-
pie3DChart: "pie3D",
|
|
126784
|
-
ofPieChart: "ofPie",
|
|
126785
|
-
doughnutChart: "doughnut",
|
|
126786
|
-
areaChart: "area",
|
|
126787
|
-
area3DChart: "area3D",
|
|
126788
|
-
scatterChart: "scatter",
|
|
126789
|
-
bubbleChart: "bubble",
|
|
126790
|
-
radarChart: "radar",
|
|
126791
|
-
stockChart: "stock",
|
|
126792
|
-
surfaceChart: "surface",
|
|
126793
|
-
surface3DChart: "surface"
|
|
126794
|
-
};
|
|
126795
|
-
LINE_DRAWN_CHART_TYPES = /* @__PURE__ */ new Set([
|
|
126796
|
-
"line",
|
|
126797
|
-
"line3D",
|
|
126798
|
-
"scatter",
|
|
126799
|
-
"radar",
|
|
126800
|
-
"stock"
|
|
126801
|
-
]);
|
|
126802
|
-
}
|
|
126803
|
-
});
|
|
126804
|
-
|
|
126805
127276
|
// pptx/core/utils/chart-from-neutral-labels.ts
|
|
126806
127277
|
function setOrRemove(target, key2, value) {
|
|
126807
127278
|
if (value === void 0) delete target[key2];
|
|
@@ -126942,8 +127413,8 @@ function titleText(title) {
|
|
|
126942
127413
|
}
|
|
126943
127414
|
function scalingFromNeutral(axis, out) {
|
|
126944
127415
|
const { scaling } = axis;
|
|
126945
|
-
setOrRemove(out, "min",
|
|
126946
|
-
setOrRemove(out, "max",
|
|
127416
|
+
setOrRemove(out, "min", finite4(scaling.min));
|
|
127417
|
+
setOrRemove(out, "max", finite4(scaling.max));
|
|
126947
127418
|
const logBase = scaling.logBase !== void 0 && scaling.logBase > 0 ? scaling.logBase : void 0;
|
|
126948
127419
|
setOrRemove(out, "logBase", logBase);
|
|
126949
127420
|
setOrRemove(out, "logScale", logBase !== void 0 ? true : void 0);
|
|
@@ -126955,7 +127426,7 @@ function labelsFromNeutral(axis, out) {
|
|
|
126955
127426
|
setOrRemove(out, "minorTickMark", oneOf(TICK_MARKS2, axis.minorTickMark));
|
|
126956
127427
|
setOrRemove(out, "tickLblPos", oneOf(["high", "low", "nextTo", "none"], axis.tickLabelPosition));
|
|
126957
127428
|
setOrRemove(out, "crosses", oneOf(["autoZero", "min", "max"], axis.crosses));
|
|
126958
|
-
setOrRemove(out, "crossesAt",
|
|
127429
|
+
setOrRemove(out, "crossesAt", finite4(axis.crossesAt));
|
|
126959
127430
|
const valueAxis = type === "valAx";
|
|
126960
127431
|
const categoryOrDate = type === "catAx" || type === "dateAx";
|
|
126961
127432
|
const skips = type === "catAx" || type === "serAx";
|
|
@@ -127009,8 +127480,8 @@ function axisFromNeutral(axis, out) {
|
|
|
127009
127480
|
setOrRemove(out, "displayUnits", custom ? "custom" : builtIn);
|
|
127010
127481
|
setOrRemove(out, "displayUnitsValue", custom || void 0);
|
|
127011
127482
|
}
|
|
127012
|
-
setOrRemove(out, "majorUnit",
|
|
127013
|
-
setOrRemove(out, "minorUnit",
|
|
127483
|
+
setOrRemove(out, "majorUnit", finite4(axis.majorUnit));
|
|
127484
|
+
setOrRemove(out, "minorUnit", finite4(axis.minorUnit));
|
|
127014
127485
|
setOrRemove(
|
|
127015
127486
|
out,
|
|
127016
127487
|
"baseTimeUnit",
|
|
@@ -127031,12 +127502,12 @@ function axesFromNeutral(axes, styled) {
|
|
|
127031
127502
|
);
|
|
127032
127503
|
});
|
|
127033
127504
|
}
|
|
127034
|
-
var oneOf,
|
|
127505
|
+
var oneOf, finite4, positiveInteger, TICK_MARKS2, TIME_UNITS2, BUILT_IN_UNITS2;
|
|
127035
127506
|
var init_chart_from_neutral_axes = __esm({
|
|
127036
127507
|
"pptx/core/utils/chart-from-neutral-axes.ts"() {
|
|
127037
127508
|
init_chart_from_neutral_labels();
|
|
127038
127509
|
oneOf = (values, value) => value !== void 0 && values.includes(value) ? value : void 0;
|
|
127039
|
-
|
|
127510
|
+
finite4 = (value) => value !== void 0 && Number.isFinite(value) ? value : void 0;
|
|
127040
127511
|
positiveInteger = (value) => value !== void 0 && Number.isInteger(value) && value > 0 ? value : void 0;
|
|
127041
127512
|
TICK_MARKS2 = ["cross", "in", "none", "out"];
|
|
127042
127513
|
TIME_UNITS2 = ["days", "months", "years"];
|
|
@@ -134129,16 +134600,16 @@ function tableToShapeGroup(tableData, bounds) {
|
|
|
134129
134600
|
const y = bounds.y + rowIndex * rowHeightEmu;
|
|
134130
134601
|
let colIndex = 0;
|
|
134131
134602
|
for (const cell3 of row.cells) {
|
|
134132
|
-
const
|
|
134603
|
+
const span2 = Math.max(1, cell3.gridSpan ?? 1);
|
|
134133
134604
|
if (cell3.vMerge) {
|
|
134134
134605
|
vMergeActive[colIndex] = true;
|
|
134135
|
-
colIndex +=
|
|
134606
|
+
colIndex += span2;
|
|
134136
134607
|
continue;
|
|
134137
134608
|
}
|
|
134138
134609
|
vMergeActive[colIndex] = false;
|
|
134139
134610
|
if (!cell3.hMerge) {
|
|
134140
134611
|
const x = colStartX[colIndex] ?? bounds.x;
|
|
134141
|
-
const w = colEmuWidths.slice(colIndex, colIndex +
|
|
134612
|
+
const w = colEmuWidths.slice(colIndex, colIndex + span2).reduce((s, v) => s + v, 0);
|
|
134142
134613
|
children17.push({
|
|
134143
134614
|
kind: "shape",
|
|
134144
134615
|
spt: 1,
|
|
@@ -134152,7 +134623,7 @@ function tableToShapeGroup(tableData, bounds) {
|
|
|
134152
134623
|
text: { textType: 4, paragraphs: cellParagraphs(cell3.text) }
|
|
134153
134624
|
});
|
|
134154
134625
|
}
|
|
134155
|
-
colIndex +=
|
|
134626
|
+
colIndex += span2;
|
|
134156
134627
|
}
|
|
134157
134628
|
});
|
|
134158
134629
|
return { kind: "group", anchor: bounds, children: children17 };
|
|
@@ -137771,7 +138242,7 @@ async function readSlideMasterPaths(zip) {
|
|
|
137771
138242
|
}
|
|
137772
138243
|
return paths;
|
|
137773
138244
|
}
|
|
137774
|
-
function
|
|
138245
|
+
function num4(xml2, pattern) {
|
|
137775
138246
|
const value = pattern.exec(xml2)?.[1];
|
|
137776
138247
|
return value === void 0 ? void 0 : Number(value);
|
|
137777
138248
|
}
|
|
@@ -137783,14 +138254,14 @@ function readPlaceholders(masterXml) {
|
|
|
137783
138254
|
continue;
|
|
137784
138255
|
}
|
|
137785
138256
|
const kind = PLACEHOLDER_KINDS[/\btype="([^"]+)"/u.exec(phType)?.[1] ?? "body"];
|
|
137786
|
-
const x =
|
|
137787
|
-
const y =
|
|
137788
|
-
const w =
|
|
137789
|
-
const h2 =
|
|
138257
|
+
const x = num4(sp, /<a:off\b[^>]*\bx="(-?\d+)"/u);
|
|
138258
|
+
const y = num4(sp, /<a:off\b[^>]*\by="(-?\d+)"/u);
|
|
138259
|
+
const w = num4(sp, /<a:ext\b[^>]*\bcx="(\d+)"/u);
|
|
138260
|
+
const h2 = num4(sp, /<a:ext\b[^>]*\bcy="(\d+)"/u);
|
|
137790
138261
|
if (!kind || x === void 0 || y === void 0 || !w || !h2 || out.some((p2) => p2.kind === kind)) {
|
|
137791
138262
|
continue;
|
|
137792
138263
|
}
|
|
137793
|
-
const size =
|
|
138264
|
+
const size = num4(sp, /<a:lvl1pPr\b[\s\S]*?<a:defRPr\b[^>]*\bsz="(\d+)"/u);
|
|
137794
138265
|
out.push({ kind, rect: { x, y, w, h: h2 }, ...size ? { sizePt: size / 100 } : {} });
|
|
137795
138266
|
}
|
|
137796
138267
|
return out;
|
|
@@ -144551,6 +145022,10 @@ var init_chart_neutral_save_chrome = __esm({
|
|
|
144551
145022
|
});
|
|
144552
145023
|
|
|
144553
145024
|
// pptx/core/utils/chart-neutral-save-points.ts
|
|
145025
|
+
function pointShape(shape3) {
|
|
145026
|
+
if (shape3.line && emptied(shape3.line)) delete shape3.line;
|
|
145027
|
+
return emptied(shape3) ? null : shape3;
|
|
145028
|
+
}
|
|
144554
145029
|
function pointEdit(edits, seriesIndex, old, next) {
|
|
144555
145030
|
for (const key2 of ["picture", "impliedPicture", "uniqueId"])
|
|
144556
145031
|
if (!same6(old?.[key2], next[key2])) return false;
|
|
@@ -144573,6 +145048,7 @@ function pointEdit(edits, seriesIndex, old, next) {
|
|
|
144573
145048
|
) ?? null
|
|
144574
145049
|
});
|
|
144575
145050
|
}
|
|
145051
|
+
if (edit.spPr) edit.spPr = pointShape(edit.spPr);
|
|
144576
145052
|
if (!same6(old?.marker, next.marker)) {
|
|
144577
145053
|
if (!next.marker) edit.marker = null;
|
|
144578
145054
|
else {
|
|
@@ -144615,6 +145091,7 @@ function planNeutralChartPoints(before, probe, edits) {
|
|
|
144615
145091
|
series.dataPoints = previous.dataPoints;
|
|
144616
145092
|
});
|
|
144617
145093
|
}
|
|
145094
|
+
var emptied;
|
|
144618
145095
|
var init_chart_neutral_save_points = __esm({
|
|
144619
145096
|
"pptx/core/utils/chart-neutral-save-points.ts"() {
|
|
144620
145097
|
init_chart2();
|
|
@@ -144622,6 +145099,7 @@ var init_chart_neutral_save_points = __esm({
|
|
|
144622
145099
|
init_chart_neutral_save_common();
|
|
144623
145100
|
init_chart_neutral_save_shape();
|
|
144624
145101
|
init_chart_container_type_map();
|
|
145102
|
+
emptied = (part) => Object.keys(part).every((key2) => key2 === "sourceXml");
|
|
144625
145103
|
}
|
|
144626
145104
|
});
|
|
144627
145105
|
|
|
@@ -144837,7 +145315,9 @@ function planNeutralChartSeriesColors(before, probe, edits) {
|
|
|
144837
145315
|
const value = series.color?.replace(/^#/, "");
|
|
144838
145316
|
if (value !== void 0 && !/^[\da-f]{6}$/i.test(value)) return;
|
|
144839
145317
|
edits.push(
|
|
144840
|
-
(space) => setChartSeriesColor2(space, index, value ? { kind: "srgb", value, transforms: [] } : null
|
|
145318
|
+
(space) => setChartSeriesColor2(space, index, value ? { kind: "srgb", value, transforms: [] } : null, {
|
|
145319
|
+
keepPointColors: true
|
|
145320
|
+
})
|
|
144841
145321
|
);
|
|
144842
145322
|
if (previous.color === void 0) delete series.color;
|
|
144843
145323
|
else series.color = previous.color;
|
|
@@ -146289,26 +146769,26 @@ function buildImgEffects(effects3) {
|
|
|
146289
146769
|
if (effects3.backgroundRemoval) {
|
|
146290
146770
|
out.push({ "a14:backgroundRemoval": buildBackgroundRemovalNode(effects3.backgroundRemoval) });
|
|
146291
146771
|
}
|
|
146292
|
-
if (
|
|
146772
|
+
if (finite5(effects3.sharpenSoften?.amount)) {
|
|
146293
146773
|
out.push({ "a14:sharpenSoften": { "@_amount": round4(effects3.sharpenSoften.amount) } });
|
|
146294
146774
|
}
|
|
146295
146775
|
const bc = effects3.brightnessContrast;
|
|
146296
|
-
if (bc && (
|
|
146776
|
+
if (bc && (finite5(bc.bright) || finite5(bc.contrast))) {
|
|
146297
146777
|
const node = {};
|
|
146298
|
-
if (
|
|
146778
|
+
if (finite5(bc.bright)) {
|
|
146299
146779
|
node["@_bright"] = round4(bc.bright);
|
|
146300
146780
|
}
|
|
146301
|
-
if (
|
|
146781
|
+
if (finite5(bc.contrast)) {
|
|
146302
146782
|
node["@_contrast"] = round4(bc.contrast);
|
|
146303
146783
|
}
|
|
146304
146784
|
out.push({ "a14:brightnessContrast": node });
|
|
146305
146785
|
}
|
|
146306
|
-
if (
|
|
146786
|
+
if (finite5(effects3.colorTemperature?.colorTemp)) {
|
|
146307
146787
|
out.push({
|
|
146308
146788
|
"a14:colorTemperature": { "@_colorTemp": round4(effects3.colorTemperature.colorTemp) }
|
|
146309
146789
|
});
|
|
146310
146790
|
}
|
|
146311
|
-
if (
|
|
146791
|
+
if (finite5(effects3.colorSaturation?.sat)) {
|
|
146312
146792
|
out.push({ "a14:saturation": { "@_sat": round4(effects3.colorSaturation.sat) } });
|
|
146313
146793
|
}
|
|
146314
146794
|
const artistic = a14ArtisticElementName(effects3.artisticEffect);
|
|
@@ -146358,7 +146838,7 @@ function applyA14ImageExtension(blip2, effects3) {
|
|
|
146358
146838
|
extLst[extKey] = entries.length === 1 ? entries[0] : entries;
|
|
146359
146839
|
blip2[extLstKey] = extLst;
|
|
146360
146840
|
}
|
|
146361
|
-
var GALLERY_TO_A14, round4,
|
|
146841
|
+
var GALLERY_TO_A14, round4, finite5;
|
|
146362
146842
|
var init_image_a14_effects_writer = __esm({
|
|
146363
146843
|
"pptx/core/core/runtime/image-a14-effects-writer.ts"() {
|
|
146364
146844
|
init_image_a14_effects();
|
|
@@ -146391,7 +146871,7 @@ var init_image_a14_effects_writer = __esm({
|
|
|
146391
146871
|
watercolorSponge: "artisticWatercolorSponge"
|
|
146392
146872
|
};
|
|
146393
146873
|
round4 = (value) => String(Math.round(value));
|
|
146394
|
-
|
|
146874
|
+
finite5 = (value) => typeof value === "number" && Number.isFinite(value);
|
|
146395
146875
|
}
|
|
146396
146876
|
});
|
|
146397
146877
|
|
|
@@ -147953,8 +148433,8 @@ function renderBars(element2, x, y, w, h2) {
|
|
|
147953
148433
|
const values = chartValues(element2);
|
|
147954
148434
|
const min = Math.min(0, ...values);
|
|
147955
148435
|
const max = Math.max(0, ...values);
|
|
147956
|
-
const
|
|
147957
|
-
const zeroY = y + max /
|
|
148436
|
+
const span2 = max - min || 1;
|
|
148437
|
+
const zeroY = y + max / span2 * h2;
|
|
147958
148438
|
const categoryCount = Math.max(
|
|
147959
148439
|
data.categories.length,
|
|
147960
148440
|
...data.series.map((s) => s.values.length),
|
|
@@ -147965,7 +148445,7 @@ function renderBars(element2, x, y, w, h2) {
|
|
|
147965
148445
|
const parts = [`<line x1="${x}" y1="${zeroY}" x2="${x + w}" y2="${zeroY}" stroke="#666666" />`];
|
|
147966
148446
|
data.series.forEach((series, seriesIndex) => {
|
|
147967
148447
|
series.values.forEach((value, categoryIndex) => {
|
|
147968
|
-
const valueY = y + (max - value) /
|
|
148448
|
+
const valueY = y + (max - value) / span2 * h2;
|
|
147969
148449
|
parts.push(
|
|
147970
148450
|
`<rect data-chart-mark="bar" x="${x + categoryIndex * clusterWidth + clusterWidth * 0.14 + seriesIndex * barWidth}" y="${Math.min(valueY, zeroY)}" width="${Math.max(barWidth - 1, 1)}" height="${Math.max(Math.abs(zeroY - valueY), 0.5)}" fill="${esc3(color2(series, seriesIndex))}" />`
|
|
147971
148451
|
);
|
|
@@ -147978,10 +148458,10 @@ function renderLines(element2, x, y, w, h2) {
|
|
|
147978
148458
|
const values = chartValues(element2);
|
|
147979
148459
|
const min = Math.min(...values);
|
|
147980
148460
|
const max = Math.max(...values);
|
|
147981
|
-
const
|
|
148461
|
+
const span2 = max - min || 1;
|
|
147982
148462
|
return data.series.map((series, seriesIndex) => {
|
|
147983
148463
|
const denominator = Math.max(series.values.length - 1, 1);
|
|
147984
|
-
const points7 = series.values.map((value, index) => `${x + index / denominator * w},${y + (max - value) /
|
|
148464
|
+
const points7 = series.values.map((value, index) => `${x + index / denominator * w},${y + (max - value) / span2 * h2}`).join(" ");
|
|
147985
148465
|
return `<polyline data-chart-mark="line" points="${points7}" fill="none" stroke="${esc3(color2(series, seriesIndex))}" stroke-width="2" />`;
|
|
147986
148466
|
}).join("");
|
|
147987
148467
|
}
|
|
@@ -153017,6 +153497,17 @@ var init_save_group_fill = __esm({
|
|
|
153017
153497
|
});
|
|
153018
153498
|
|
|
153019
153499
|
// pptx/core/core/runtime/save-shape-xml-frames.ts
|
|
153500
|
+
function tableGridXml(el, widthEmu) {
|
|
153501
|
+
const fractions = el.tableData?.columnWidths ?? [];
|
|
153502
|
+
if (fractions.length === 0 || !(widthEmu > 0)) {
|
|
153503
|
+
return {};
|
|
153504
|
+
}
|
|
153505
|
+
const widths = fractions.map((fraction) => Math.max(0, Math.round(fraction * widthEmu)));
|
|
153506
|
+
const last = widths.length - 1;
|
|
153507
|
+
widths[last] = Math.max(0, (widths[last] ?? 0) + widthEmu - widths.reduce((a, b) => a + b, 0));
|
|
153508
|
+
const cols = widths.map((w) => ({ "@_w": String(w) }));
|
|
153509
|
+
return { "a:gridCol": cols.length === 1 ? cols[0] : cols };
|
|
153510
|
+
}
|
|
153020
153511
|
function buildTableGraphicFrameXml(el, emuPerPx) {
|
|
153021
153512
|
el.locks = { noGrouping: true, ...el.locks };
|
|
153022
153513
|
const offX = String(Math.round(el.x * emuPerPx));
|
|
@@ -153047,7 +153538,7 @@ function buildTableGraphicFrameXml(el, emuPerPx) {
|
|
|
153047
153538
|
"@_uri": "http://schemas.openxmlformats.org/drawingml/2006/table",
|
|
153048
153539
|
"a:tbl": {
|
|
153049
153540
|
"a:tblPr": tblPr,
|
|
153050
|
-
"a:tblGrid":
|
|
153541
|
+
"a:tblGrid": tableGridXml(el, Number(extCx))
|
|
153051
153542
|
}
|
|
153052
153543
|
}
|
|
153053
153544
|
}
|
|
@@ -153424,11 +153915,31 @@ var init_PptxHandlerRuntimeSaveShapeXml = __esm({
|
|
|
153424
153915
|
* default) is correct at depth 0. See `group-xfrm-preservation.ts`'s
|
|
153425
153916
|
* module doc for why a nested group must not re-derive this itself.
|
|
153426
153917
|
*/
|
|
153918
|
+
/**
|
|
153919
|
+
* `PptxHandlerSaveOptions.fixedDate` of the save in progress: set, the save
|
|
153920
|
+
* mints reproducible ids and names (new table columns' `a16:colId`, the
|
|
153921
|
+
* fallback name of a new group) instead of random or time-based ones.
|
|
153922
|
+
*/
|
|
153923
|
+
saveFixedDate;
|
|
153924
|
+
/**
|
|
153925
|
+
* The `p:cNvPr/@name` of a group with neither a name nor one from its
|
|
153926
|
+
* file: its element id, or for a reproducible save (`fixedDate`), which
|
|
153927
|
+
* must not depend on the time-based ids of elements made in code,
|
|
153928
|
+
* `Group <shape id>` as PowerPoint names groups.
|
|
153929
|
+
*/
|
|
153930
|
+
groupFallbackName(group2) {
|
|
153931
|
+
return this.saveFixedDate ? `Group ${group2.shapeId ?? ""}`.trim() : group2.id;
|
|
153932
|
+
}
|
|
153427
153933
|
buildGroupShapeXml(group2, ctx, ownEmuOverride) {
|
|
153428
153934
|
if (group2.rawXml && group2.children.length === 0) {
|
|
153429
153935
|
return {
|
|
153430
153936
|
...group2.rawXml,
|
|
153431
|
-
"p:nvGrpSpPr": buildGroupNonVisualXml(
|
|
153937
|
+
"p:nvGrpSpPr": buildGroupNonVisualXml(
|
|
153938
|
+
group2.rawXml,
|
|
153939
|
+
group2.name,
|
|
153940
|
+
this.groupFallbackName(group2),
|
|
153941
|
+
group2.shapeId
|
|
153942
|
+
)
|
|
153432
153943
|
};
|
|
153433
153944
|
}
|
|
153434
153945
|
const EMU = _PptxHandlerRuntime.EMU_PER_PX;
|
|
@@ -153437,7 +153948,12 @@ var init_PptxHandlerRuntimeSaveShapeXml = __esm({
|
|
|
153437
153948
|
const xfrm = buildGroupTransformXml(group2, EMU, ownEmuOverride, rewrap);
|
|
153438
153949
|
const childSpace = group2;
|
|
153439
153950
|
const grpXml2 = {
|
|
153440
|
-
"p:nvGrpSpPr": buildGroupNonVisualXml(
|
|
153951
|
+
"p:nvGrpSpPr": buildGroupNonVisualXml(
|
|
153952
|
+
rawGroupXml,
|
|
153953
|
+
group2.name,
|
|
153954
|
+
this.groupFallbackName(group2),
|
|
153955
|
+
group2.shapeId
|
|
153956
|
+
),
|
|
153441
153957
|
"p:grpSpPr": buildGroupPropertiesXml(rawGroupXml, xfrm)
|
|
153442
153958
|
};
|
|
153443
153959
|
const rawExtLst = rawGroupXml?.["p:extLst"];
|
|
@@ -155270,12 +155786,92 @@ var init_PptxHandlerRuntimeLayoutSwitching = __esm({
|
|
|
155270
155786
|
}
|
|
155271
155787
|
});
|
|
155272
155788
|
|
|
155789
|
+
// pptx/core/core/runtime/table-cell-border-save.ts
|
|
155790
|
+
function cellEdges(style2) {
|
|
155791
|
+
return [
|
|
155792
|
+
{
|
|
155793
|
+
xmlKey: "a:lnT",
|
|
155794
|
+
width: style2.borderTopWidth,
|
|
155795
|
+
color: style2.borderTopColor,
|
|
155796
|
+
dash: style2.borderTopDash,
|
|
155797
|
+
segments: style2.borderTopDashSegments
|
|
155798
|
+
},
|
|
155799
|
+
{
|
|
155800
|
+
xmlKey: "a:lnB",
|
|
155801
|
+
width: style2.borderBottomWidth,
|
|
155802
|
+
color: style2.borderBottomColor,
|
|
155803
|
+
dash: style2.borderBottomDash,
|
|
155804
|
+
segments: style2.borderBottomDashSegments
|
|
155805
|
+
},
|
|
155806
|
+
{
|
|
155807
|
+
xmlKey: "a:lnL",
|
|
155808
|
+
width: style2.borderLeftWidth,
|
|
155809
|
+
color: style2.borderLeftColor,
|
|
155810
|
+
dash: style2.borderLeftDash,
|
|
155811
|
+
segments: style2.borderLeftDashSegments
|
|
155812
|
+
},
|
|
155813
|
+
{
|
|
155814
|
+
xmlKey: "a:lnR",
|
|
155815
|
+
width: style2.borderRightWidth,
|
|
155816
|
+
color: style2.borderRightColor,
|
|
155817
|
+
dash: style2.borderRightDash,
|
|
155818
|
+
segments: style2.borderRightDashSegments
|
|
155819
|
+
}
|
|
155820
|
+
];
|
|
155821
|
+
}
|
|
155822
|
+
function writeEdgeDash(ln, edge) {
|
|
155823
|
+
if (edge.dash === void 0 || edge.dash === "") {
|
|
155824
|
+
return;
|
|
155825
|
+
}
|
|
155826
|
+
if (edge.dash === "solid") {
|
|
155827
|
+
delete ln["a:prstDash"];
|
|
155828
|
+
delete ln["a:custDash"];
|
|
155829
|
+
return;
|
|
155830
|
+
}
|
|
155831
|
+
if (edge.dash === "custom") {
|
|
155832
|
+
if (edge.segments && edge.segments.length > 0) {
|
|
155833
|
+
applyDrawingLineDash(ln, { strokeDash: "custom", customDashSegments: edge.segments });
|
|
155834
|
+
}
|
|
155835
|
+
return;
|
|
155836
|
+
}
|
|
155837
|
+
applyDrawingLineDash(ln, { strokeDash: edge.dash });
|
|
155838
|
+
}
|
|
155839
|
+
function writeCellEdgeBorders(tcPr, style2, emuPerPx) {
|
|
155840
|
+
for (const edge of cellEdges(style2)) {
|
|
155841
|
+
if (edge.width === void 0 && edge.color === void 0 && edge.dash === void 0) {
|
|
155842
|
+
continue;
|
|
155843
|
+
}
|
|
155844
|
+
const existing = tcPr[edge.xmlKey];
|
|
155845
|
+
const ln = existing && typeof existing === "object" ? existing : {};
|
|
155846
|
+
if (edge.width !== void 0) {
|
|
155847
|
+
ln["@_w"] = String(Math.round(edge.width * emuPerPx));
|
|
155848
|
+
}
|
|
155849
|
+
if (edge.color) {
|
|
155850
|
+
delete ln["a:noFill"];
|
|
155851
|
+
delete ln["a:gradFill"];
|
|
155852
|
+
delete ln["a:pattFill"];
|
|
155853
|
+
ln["a:solidFill"] = {
|
|
155854
|
+
"a:srgbClr": { "@_val": edge.color.replace("#", "") }
|
|
155855
|
+
};
|
|
155856
|
+
}
|
|
155857
|
+
writeEdgeDash(ln, edge);
|
|
155858
|
+
tcPr[edge.xmlKey] = reorderObjectKeys(ln, LN_CHILD_ORDER);
|
|
155859
|
+
}
|
|
155860
|
+
}
|
|
155861
|
+
var init_table_cell_border_save = __esm({
|
|
155862
|
+
"pptx/core/core/runtime/table-cell-border-save.ts"() {
|
|
155863
|
+
init_drawing_line_dash();
|
|
155864
|
+
init_xml_reorder();
|
|
155865
|
+
}
|
|
155866
|
+
});
|
|
155867
|
+
|
|
155273
155868
|
// pptx/core/core/runtime/table-cell-save-helpers.ts
|
|
155274
155869
|
function writeCellFill(tcPr, style2, resolveColorXml) {
|
|
155275
155870
|
if (style2.fillMode === "gradient" && style2.gradientFillStops && style2.gradientFillStops.length > 0) {
|
|
155276
155871
|
delete tcPr["a:solidFill"];
|
|
155277
155872
|
delete tcPr["a:pattFill"];
|
|
155278
155873
|
delete tcPr["a:blipFill"];
|
|
155874
|
+
delete tcPr["a:noFill"];
|
|
155279
155875
|
const stops = style2.gradientFillStops.map((stop) => {
|
|
155280
155876
|
const posRaw = typeof stop.position === "number" ? stop.position : 0;
|
|
155281
155877
|
const position4 = Math.round(Math.max(0, Math.min(1, posRaw / 100)) * 1e5);
|
|
@@ -155327,6 +155923,7 @@ function writeCellFill(tcPr, style2, resolveColorXml) {
|
|
|
155327
155923
|
delete tcPr["a:solidFill"];
|
|
155328
155924
|
delete tcPr["a:gradFill"];
|
|
155329
155925
|
delete tcPr["a:blipFill"];
|
|
155926
|
+
delete tcPr["a:noFill"];
|
|
155330
155927
|
const pattXml = {
|
|
155331
155928
|
"@_prst": style2.patternFillPreset
|
|
155332
155929
|
};
|
|
@@ -155350,10 +155947,12 @@ function writeCellFill(tcPr, style2, resolveColorXml) {
|
|
|
155350
155947
|
delete tcPr["a:gradFill"];
|
|
155351
155948
|
delete tcPr["a:pattFill"];
|
|
155352
155949
|
delete tcPr["a:blipFill"];
|
|
155950
|
+
tcPr["a:noFill"] = tcPr["a:noFill"] ?? {};
|
|
155353
155951
|
} else if (style2.fillMode !== "image" && style2.backgroundColor) {
|
|
155354
155952
|
delete tcPr["a:gradFill"];
|
|
155355
155953
|
delete tcPr["a:pattFill"];
|
|
155356
155954
|
delete tcPr["a:blipFill"];
|
|
155955
|
+
delete tcPr["a:noFill"];
|
|
155357
155956
|
const resolvedOriginal = style2.backgroundColorXml && resolveColorXml ? resolveColorXml(style2.backgroundColorXml) : void 0;
|
|
155358
155957
|
tcPr["a:solidFill"] = serializeColorChoiceWithRef(
|
|
155359
155958
|
style2.backgroundColorRef,
|
|
@@ -155611,6 +156210,7 @@ var init_PptxHandlerRuntimeSaveTableStyles = __esm({
|
|
|
155611
156210
|
init_xml_access();
|
|
155612
156211
|
init_xml_reorder();
|
|
155613
156212
|
init_PptxHandlerRuntimeLayoutSwitching();
|
|
156213
|
+
init_table_cell_border_save();
|
|
155614
156214
|
init_table_cell_save_helpers();
|
|
155615
156215
|
init_table_cell_text_xml();
|
|
155616
156216
|
PptxHandlerRuntime22 = class _PptxHandlerRuntime extends PptxHandlerRuntime21 {
|
|
@@ -155688,53 +156288,7 @@ var init_PptxHandlerRuntimeSaveTableStyles = __esm({
|
|
|
155688
156288
|
pPr["@_algn"] = token3;
|
|
155689
156289
|
}
|
|
155690
156290
|
}
|
|
155691
|
-
|
|
155692
|
-
{
|
|
155693
|
-
xmlKey: "a:lnT",
|
|
155694
|
-
width: style2.borderTopWidth,
|
|
155695
|
-
color: style2.borderTopColor,
|
|
155696
|
-
dash: style2.borderTopDash
|
|
155697
|
-
},
|
|
155698
|
-
{
|
|
155699
|
-
xmlKey: "a:lnB",
|
|
155700
|
-
width: style2.borderBottomWidth,
|
|
155701
|
-
color: style2.borderBottomColor,
|
|
155702
|
-
dash: style2.borderBottomDash
|
|
155703
|
-
},
|
|
155704
|
-
{
|
|
155705
|
-
xmlKey: "a:lnL",
|
|
155706
|
-
width: style2.borderLeftWidth,
|
|
155707
|
-
color: style2.borderLeftColor,
|
|
155708
|
-
dash: style2.borderLeftDash
|
|
155709
|
-
},
|
|
155710
|
-
{
|
|
155711
|
-
xmlKey: "a:lnR",
|
|
155712
|
-
width: style2.borderRightWidth,
|
|
155713
|
-
color: style2.borderRightColor,
|
|
155714
|
-
dash: style2.borderRightDash
|
|
155715
|
-
}
|
|
155716
|
-
];
|
|
155717
|
-
for (const edge of borderEdges) {
|
|
155718
|
-
if (edge.width !== void 0 || edge.color !== void 0 || edge.dash !== void 0) {
|
|
155719
|
-
if (!tcPr[edge.xmlKey]) {
|
|
155720
|
-
tcPr[edge.xmlKey] = {};
|
|
155721
|
-
}
|
|
155722
|
-
const ln = tcPr[edge.xmlKey];
|
|
155723
|
-
if (edge.width !== void 0) {
|
|
155724
|
-
ln["@_w"] = String(Math.round(edge.width * _PptxHandlerRuntime.EMU_PER_PX));
|
|
155725
|
-
}
|
|
155726
|
-
if (edge.color) {
|
|
155727
|
-
ln["a:solidFill"] = {
|
|
155728
|
-
"a:srgbClr": { "@_val": edge.color.replace("#", "") }
|
|
155729
|
-
};
|
|
155730
|
-
}
|
|
155731
|
-
if (edge.dash && edge.dash !== "solid") {
|
|
155732
|
-
ln["a:prstDash"] = { "@_val": edge.dash };
|
|
155733
|
-
} else if (edge.dash === "solid") {
|
|
155734
|
-
delete ln["a:prstDash"];
|
|
155735
|
-
}
|
|
155736
|
-
}
|
|
155737
|
-
}
|
|
156291
|
+
writeCellEdgeBorders(tcPr, style2, _PptxHandlerRuntime.EMU_PER_PX);
|
|
155738
156292
|
const emuPerPx = _PptxHandlerRuntime.EMU_PER_PX;
|
|
155739
156293
|
if (style2.marginLeft !== void 0) {
|
|
155740
156294
|
tcPr["@_marL"] = String(Math.round(style2.marginLeft * emuPerPx));
|
|
@@ -156169,10 +156723,13 @@ var init_table_style_change_cell_clear = __esm({
|
|
|
156169
156723
|
"a:grpFill"
|
|
156170
156724
|
];
|
|
156171
156725
|
LINE_KEYS = [
|
|
156172
|
-
["a:lnL", ["borderLeftWidth", "borderLeftColor", "borderLeftDash"]],
|
|
156173
|
-
["a:lnR", ["borderRightWidth", "borderRightColor", "borderRightDash"]],
|
|
156174
|
-
["a:lnT", ["borderTopWidth", "borderTopColor", "borderTopDash"]],
|
|
156175
|
-
[
|
|
156726
|
+
["a:lnL", ["borderLeftWidth", "borderLeftColor", "borderLeftDash", "borderLeftDashSegments"]],
|
|
156727
|
+
["a:lnR", ["borderRightWidth", "borderRightColor", "borderRightDash", "borderRightDashSegments"]],
|
|
156728
|
+
["a:lnT", ["borderTopWidth", "borderTopColor", "borderTopDash", "borderTopDashSegments"]],
|
|
156729
|
+
[
|
|
156730
|
+
"a:lnB",
|
|
156731
|
+
["borderBottomWidth", "borderBottomColor", "borderBottomDash", "borderBottomDashSegments"]
|
|
156732
|
+
],
|
|
156176
156733
|
["a:lnTlToBr", ["borderDiagDownWidth", "borderDiagDownColor"]],
|
|
156177
156734
|
["a:lnBlToTr", ["borderDiagUpWidth", "borderDiagUpColor"]]
|
|
156178
156735
|
];
|
|
@@ -156416,7 +156973,15 @@ function slideContainsA16Element(node) {
|
|
|
156416
156973
|
function randomColumnId() {
|
|
156417
156974
|
return String(Math.floor(Math.random() * 4294967295));
|
|
156418
156975
|
}
|
|
156419
|
-
function
|
|
156976
|
+
function deterministicColumnId(index) {
|
|
156977
|
+
let hash2 = 2166136261;
|
|
156978
|
+
for (const ch of `a16:colId:${index}`) {
|
|
156979
|
+
hash2 ^= ch.charCodeAt(0);
|
|
156980
|
+
hash2 = Math.imul(hash2, 16777619) >>> 0;
|
|
156981
|
+
}
|
|
156982
|
+
return String(hash2);
|
|
156983
|
+
}
|
|
156984
|
+
function rebuildTableXmlFromData(tbl, tableData, emuPerPx, ensureArrayFn, newColumnId = randomColumnId) {
|
|
156420
156985
|
const existingXmlRows = ensureArrayFn(tbl["a:tr"]);
|
|
156421
156986
|
const existingGridCols = ensureArrayFn(
|
|
156422
156987
|
tbl["a:tblGrid"]?.["a:gridCol"]
|
|
@@ -156447,7 +157012,7 @@ function rebuildTableXmlFromData(tbl, tableData, emuPerPx, ensureArrayFn) {
|
|
|
156447
157012
|
// `ensureA16NamespaceOnSlideRoot`; emitting it here too is
|
|
156448
157013
|
// schema-redundant and PowerPoint flags it.
|
|
156449
157014
|
"a16:colId": {
|
|
156450
|
-
"@_val": existingColIds[i2] ||
|
|
157015
|
+
"@_val": existingColIds[i2] || newColumnId(i2)
|
|
156451
157016
|
}
|
|
156452
157017
|
}
|
|
156453
157018
|
}
|
|
@@ -156651,8 +157216,8 @@ function cells(row) {
|
|
|
156651
157216
|
return ensureArray19(row["a:tc"]);
|
|
156652
157217
|
}
|
|
156653
157218
|
function promoteTextBody(source2, next, removed, survivor, axis) {
|
|
156654
|
-
const
|
|
156655
|
-
if (!source2?.text || !next || !removed || !survivor || source2.hMerge || source2.vMerge || (source2[
|
|
157219
|
+
const span2 = axis === "row" ? "rowSpan" : "gridSpan";
|
|
157220
|
+
if (!source2?.text || !next || !removed || !survivor || source2.hMerge || source2.vMerge || (source2[span2] ?? 1) <= 1 || next.hMerge || next.vMerge || (next[span2] ?? 1) !== (source2[span2] ?? 1) - 1) {
|
|
156656
157221
|
return;
|
|
156657
157222
|
}
|
|
156658
157223
|
if (removed["a:txBody"] !== void 0) {
|
|
@@ -157235,6 +157800,7 @@ var init_PptxHandlerRuntimeSaveDataSerialization = __esm({
|
|
|
157235
157800
|
init_table_style_change_cell_clear();
|
|
157236
157801
|
init_table_paragraph_save_order();
|
|
157237
157802
|
init_table_structural_ops();
|
|
157803
|
+
init_table_xml_rebuild();
|
|
157238
157804
|
init_table_tblpr_save();
|
|
157239
157805
|
CHART_DATA_DISPLAY_OPTIONS_EXT_URI = "{56B9EC1D-385E-4148-901F-78D8002777C0}";
|
|
157240
157806
|
PptxHandlerRuntime24 = class _PptxHandlerRuntime extends PptxHandlerRuntime23 {
|
|
@@ -157271,7 +157837,8 @@ var init_PptxHandlerRuntimeSaveDataSerialization = __esm({
|
|
|
157271
157837
|
tbl,
|
|
157272
157838
|
tableData,
|
|
157273
157839
|
_PptxHandlerRuntime.EMU_PER_PX,
|
|
157274
|
-
this.ensureArray.bind(this)
|
|
157840
|
+
this.ensureArray.bind(this),
|
|
157841
|
+
this.saveFixedDate ? deterministicColumnId : void 0
|
|
157275
157842
|
);
|
|
157276
157843
|
const rebuiltRows = this.ensureArray(tbl["a:tr"]);
|
|
157277
157844
|
for (let rIdx = 0; rIdx < tableData.rows.length; rIdx++) {
|
|
@@ -159880,9 +160447,9 @@ var init_PptxHandlerRuntimeSaveDocumentParts = __esm({
|
|
|
159880
160447
|
let maxId = 0;
|
|
159881
160448
|
for (const rel of relationships3) {
|
|
159882
160449
|
const id = String(rel?.["@_Id"] || "");
|
|
159883
|
-
const
|
|
159884
|
-
if (Number.isFinite(
|
|
159885
|
-
maxId =
|
|
160450
|
+
const num5 = parseInt(id.replace(/^rId/u, ""), 10);
|
|
160451
|
+
if (Number.isFinite(num5) && num5 > maxId) {
|
|
160452
|
+
maxId = num5;
|
|
159886
160453
|
}
|
|
159887
160454
|
}
|
|
159888
160455
|
const existingFontTargets = /* @__PURE__ */ new Set();
|
|
@@ -160025,9 +160592,9 @@ var init_PptxHandlerRuntimeSaveDocumentParts = __esm({
|
|
|
160025
160592
|
let maxId = 0;
|
|
160026
160593
|
for (const rel of relationships3) {
|
|
160027
160594
|
const id = String(rel?.["@_Id"] || "");
|
|
160028
|
-
const
|
|
160029
|
-
if (Number.isFinite(
|
|
160030
|
-
maxId =
|
|
160595
|
+
const num5 = parseInt(id.replace(/^rId/u, ""), 10);
|
|
160596
|
+
if (Number.isFinite(num5) && num5 > maxId) {
|
|
160597
|
+
maxId = num5;
|
|
160031
160598
|
}
|
|
160032
160599
|
}
|
|
160033
160600
|
relationships3.push({
|
|
@@ -164382,6 +164949,7 @@ var init_PptxHandlerRuntimeSaveSlideWriter = __esm({
|
|
|
164382
164949
|
init_slide_name();
|
|
164383
164950
|
init_utils();
|
|
164384
164951
|
init_modern_comment_package();
|
|
164952
|
+
init_slide_background_gradient();
|
|
164385
164953
|
init_slide_synchronization();
|
|
164386
164954
|
init_theme_override_utils();
|
|
164387
164955
|
init_builders();
|
|
@@ -164639,6 +165207,16 @@ var init_PptxHandlerRuntimeSaveSlideWriter = __esm({
|
|
|
164639
165207
|
message: `Slide background image could not be embedded and was preserved as-is or omitted: ${imageUrl.slice(0, 120)}`,
|
|
164640
165208
|
scope: "save",
|
|
164641
165209
|
slideId: slide.id
|
|
165210
|
+
}),
|
|
165211
|
+
buildBackgroundGradientFill: () => {
|
|
165212
|
+
const gradient = slideBackgroundGradientToWrite(slide);
|
|
165213
|
+
return gradient ? this.buildGradientFillXml({ fillMode: "gradient", ...gradient }) : void 0;
|
|
165214
|
+
},
|
|
165215
|
+
reportUnsupportedGradient: () => this.compatibilityService.reportWarning({
|
|
165216
|
+
code: "SAVE_BACKGROUND_GRADIENT_UNSUPPORTED",
|
|
165217
|
+
message: "Slide background gradient has no structured form (backgroundGradientFill) matching its CSS gradient and could not be written; the slide was saved without a background of its own.",
|
|
165218
|
+
scope: "save",
|
|
165219
|
+
slideId: slide.id
|
|
164642
165220
|
})
|
|
164643
165221
|
});
|
|
164644
165222
|
this.slideCommentPartWriter.writeComments({
|
|
@@ -166990,6 +167568,15 @@ var init_PptxHandlerRuntimeSaveStructuralIds = __esm({
|
|
|
166990
167568
|
});
|
|
166991
167569
|
|
|
166992
167570
|
// pptx/core/core/runtime/PptxHandlerRuntimeSavePipeline.ts
|
|
167571
|
+
function validFixedDate(date) {
|
|
167572
|
+
if (date === void 0) {
|
|
167573
|
+
return void 0;
|
|
167574
|
+
}
|
|
167575
|
+
if (!(date instanceof Date) || Number.isNaN(date.getTime())) {
|
|
167576
|
+
throw new RangeError("PptxHandlerSaveOptions.fixedDate must be a valid Date");
|
|
167577
|
+
}
|
|
167578
|
+
return date;
|
|
167579
|
+
}
|
|
166993
167580
|
var PptxHandlerRuntime54;
|
|
166994
167581
|
var init_PptxHandlerRuntimeSavePipeline = __esm({
|
|
166995
167582
|
"pptx/core/core/runtime/PptxHandlerRuntimeSavePipeline.ts"() {
|
|
@@ -167035,6 +167622,7 @@ var init_PptxHandlerRuntimeSavePipeline = __esm({
|
|
|
167035
167622
|
/** One save, with the package to itself; callers go through {@link save}. */
|
|
167036
167623
|
async saveNow(slides, options2) {
|
|
167037
167624
|
validateSlideGeometry(slides);
|
|
167625
|
+
this.saveFixedDate = validFixedDate(options2?.fixedDate);
|
|
167038
167626
|
const templates = [
|
|
167039
167627
|
...options2?.slideMasters ?? [],
|
|
167040
167628
|
...options2?.slideLayouts ?? [],
|
|
@@ -167225,7 +167813,8 @@ var init_PptxHandlerRuntimeSavePipeline = __esm({
|
|
|
167225
167813
|
await this.documentPropertiesUpdater.updateOnSave(slides, {
|
|
167226
167814
|
coreProperties: options2?.coreProperties,
|
|
167227
167815
|
appProperties: options2?.appProperties,
|
|
167228
|
-
customProperties: options2?.customProperties
|
|
167816
|
+
customProperties: options2?.customProperties,
|
|
167817
|
+
fixedDate: this.saveFixedDate
|
|
167229
167818
|
});
|
|
167230
167819
|
await this.applyTagCollectionChanges(options2?.tags);
|
|
167231
167820
|
await this.applyNotesMasterChanges(options2?.notesMaster);
|
|
@@ -167269,6 +167858,11 @@ var init_PptxHandlerRuntimeSavePipeline = __esm({
|
|
|
167269
167858
|
delete this.zip.files[name];
|
|
167270
167859
|
}
|
|
167271
167860
|
}
|
|
167861
|
+
if (this.saveFixedDate) {
|
|
167862
|
+
for (const file of Object.values(this.zip.files)) {
|
|
167863
|
+
file.date = this.saveFixedDate;
|
|
167864
|
+
}
|
|
167865
|
+
}
|
|
167272
167866
|
return await this.zip.generateAsync({
|
|
167273
167867
|
type: "uint8array",
|
|
167274
167868
|
compression: "DEFLATE",
|
|
@@ -177233,8 +177827,8 @@ function parseNumberVal(node) {
|
|
|
177233
177827
|
if (raw2 === void 0 || raw2 === null || raw2 === "") {
|
|
177234
177828
|
return void 0;
|
|
177235
177829
|
}
|
|
177236
|
-
const
|
|
177237
|
-
return Number.isFinite(
|
|
177830
|
+
const num5 = Number.parseFloat(String(raw2));
|
|
177831
|
+
return Number.isFinite(num5) ? num5 : void 0;
|
|
177238
177832
|
}
|
|
177239
177833
|
var CHART_DATA_DISPLAY_OPTIONS_EXT_URI2, PptxHandlerRuntime93;
|
|
177240
177834
|
var init_PptxHandlerRuntimeChartParsingHelpers = __esm({
|
|
@@ -179827,12 +180421,12 @@ var init_PptxHandlerRuntimeThemeEffects = __esm({
|
|
|
179827
180421
|
* in-memory format schemes of the masters on those parts and, when the deck's part is among
|
|
179828
180422
|
* them, the deck's.
|
|
179829
180423
|
*/
|
|
179830
|
-
async writeFormatScheme(
|
|
180424
|
+
async writeFormatScheme(elementFor, themePaths) {
|
|
179831
180425
|
const deckBefore = this.getThemeFormatScheme();
|
|
179832
180426
|
const replaced = /* @__PURE__ */ new Map();
|
|
179833
180427
|
const schemes = /* @__PURE__ */ new Map();
|
|
179834
180428
|
const written = await this.rewriteThemeParts(themePaths, (data, path3) => {
|
|
179835
|
-
const element2 =
|
|
180429
|
+
const element2 = elementFor(path3);
|
|
179836
180430
|
const elements3 = data["a:theme"]?.["a:themeElements"];
|
|
179837
180431
|
if (!element2 || !elements3) {
|
|
179838
180432
|
return false;
|
|
@@ -179870,7 +180464,7 @@ var init_PptxHandlerRuntimeThemeEffects = __esm({
|
|
|
179870
180464
|
this.themeFormatScheme = deck;
|
|
179871
180465
|
this.heldFormatSchemes.holdParts(
|
|
179872
180466
|
deck,
|
|
179873
|
-
new Map(written.map((path3) => [path3,
|
|
180467
|
+
new Map(written.map((path3) => [path3, elementFor(path3)]))
|
|
179874
180468
|
);
|
|
179875
180469
|
}
|
|
179876
180470
|
return this.getThemeFormatScheme();
|
|
@@ -201882,12 +202476,12 @@ var OmmlLatexConverter = class {
|
|
|
201882
202476
|
if (!f6) {
|
|
201883
202477
|
return null;
|
|
201884
202478
|
}
|
|
201885
|
-
const
|
|
202479
|
+
const num5 = this.renderNode(f6["m:num"]).trim();
|
|
201886
202480
|
const den = this.renderNode(f6["m:den"]).trim();
|
|
201887
|
-
if (!
|
|
202481
|
+
if (!num5 && !den) {
|
|
201888
202482
|
return null;
|
|
201889
202483
|
}
|
|
201890
|
-
return `\\frac{${
|
|
202484
|
+
return `\\frac{${num5 || " "}}{${den || " "}}`;
|
|
201891
202485
|
}
|
|
201892
202486
|
trySuperscript(node) {
|
|
201893
202487
|
const value = node["m:sSup"];
|