ooxml-ui 1.26.2 → 1.27.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/chart/data-sheet-keys.d.ts +0 -1
- package/dist/chart/format-pane-common.d.ts +0 -1
- package/dist/chart/format-pane-fill-line.d.ts +0 -1
- package/dist/chart/format-pane-text.d.ts +0 -1
- package/dist/pptx/{chunk-3ZI57W7O.mjs → chunk-3LOVEO7U.mjs} +5 -0
- package/dist/pptx/{chunk-R5GKUSHI.mjs → chunk-6QLGEV3I.mjs} +845 -159
- package/dist/pptx/{chunk-4PYBBOIK.cjs → chunk-A3JJOLTS.cjs} +43 -43
- package/dist/pptx/{chunk-OOQMIQT3.cjs → chunk-GWKTHP6U.cjs} +0 -23
- package/dist/pptx/{chunk-NFP4PCTP.cjs → chunk-I6ZVSJAR.cjs} +875 -194
- package/dist/pptx/{chunk-HF2YJASV.mjs → chunk-LAF5W2UR.mjs} +1 -1
- package/dist/pptx/{chunk-LB3A3GF6.mjs → chunk-MJACF7Y2.mjs} +0 -23
- package/dist/pptx/{chunk-X4FNVH7J.cjs → chunk-YMITEJST.cjs} +32 -0
- package/dist/pptx/dom/index.cjs +388 -388
- package/dist/pptx/dom/index.mjs +7 -7
- package/dist/pptx/export/index.d.ts +1 -0
- package/dist/pptx/export/index.d.ts.map +1 -1
- package/dist/pptx/export/print-document.cjs +17 -17
- package/dist/pptx/export/print-document.d.ts +7 -5
- package/dist/pptx/export/print-document.d.ts.map +1 -1
- package/dist/pptx/export/print-document.mjs +1 -1
- package/dist/pptx/export/print-job.d.ts +134 -0
- package/dist/pptx/export/print-job.d.ts.map +1 -0
- package/dist/pptx/i18n/index.cjs +6 -6
- package/dist/pptx/i18n/index.mjs +1 -1
- package/dist/pptx/i18n/translations-en.d.ts.map +1 -1
- package/dist/pptx/index.cjs +3137 -3033
- package/dist/pptx/index.mjs +3 -3
- package/dist/pptx/render/controller/history-controller.d.ts +6 -0
- package/dist/pptx/render/controller/history-controller.d.ts.map +1 -1
- package/dist/pptx/render/deck-save-encryption.d.ts +10 -1
- package/dist/pptx/render/deck-save-encryption.d.ts.map +1 -1
- package/dist/pptx/render/deck-style.d.ts +12 -1
- package/dist/pptx/render/deck-style.d.ts.map +1 -1
- package/dist/pptx/render/google-webfonts.d.ts +32 -1
- package/dist/pptx/render/google-webfonts.d.ts.map +1 -1
- package/dist/pptx/render/index.d.ts +4 -0
- package/dist/pptx/render/index.d.ts.map +1 -1
- package/dist/pptx/render/inserted-slide-layout.d.ts +28 -0
- package/dist/pptx/render/inserted-slide-layout.d.ts.map +1 -0
- package/dist/pptx/render/inspector/index.d.ts +2 -0
- package/dist/pptx/render/inspector/index.d.ts.map +1 -1
- package/dist/pptx/render/inspector/text-effect-fields.d.ts +29 -0
- package/dist/pptx/render/inspector/text-effect-fields.d.ts.map +1 -0
- package/dist/pptx/render/master-view-crud-history.d.ts +45 -0
- package/dist/pptx/render/master-view-crud-history.d.ts.map +1 -0
- package/dist/pptx/render/master-view-crud.d.ts +11 -0
- package/dist/pptx/render/master-view-crud.d.ts.map +1 -1
- package/dist/pptx/render/theme-by-path.d.ts +61 -0
- package/dist/pptx/render/theme-by-path.d.ts.map +1 -0
- package/dist/pptx/render/theme-history.d.ts +146 -0
- package/dist/pptx/render/theme-history.d.ts.map +1 -0
- package/dist/pptx/render/theme-write-queue.d.ts +21 -0
- package/dist/pptx/render/theme-write-queue.d.ts.map +1 -0
- package/dist/pptx/render/viewer-preferences.d.ts +11 -0
- package/dist/pptx/render/viewer-preferences.d.ts.map +1 -1
- package/dist/pptx/render/viewer-props-manifest.d.ts.map +1 -1
- package/dist/pptx/{smartart-insert-preview-CTBWMXNX.cjs → smartart-insert-preview-AERZURUO.cjs} +5 -5
- package/dist/pptx/{smartart-insert-preview-QJBRDU4C.mjs → smartart-insert-preview-CGAZP5JP.mjs} +4 -4
- package/dist/theme-bridge.d.ts +0 -1
- package/package.json +2 -2
|
@@ -16,13 +16,13 @@ var chunk6KLPQQYP_cjs = require('./chunk-6KLPQQYP.cjs');
|
|
|
16
16
|
var chunkFOE75Z6N_cjs = require('./chunk-FOE75Z6N.cjs');
|
|
17
17
|
var chunkNTXHQHCS_cjs = require('./chunk-NTXHQHCS.cjs');
|
|
18
18
|
var chunkFM4C4MBJ_cjs = require('./chunk-FM4C4MBJ.cjs');
|
|
19
|
-
var
|
|
19
|
+
var chunkYMITEJST_cjs = require('./chunk-YMITEJST.cjs');
|
|
20
20
|
var chunkUPN5FFKP_cjs = require('./chunk-UPN5FFKP.cjs');
|
|
21
21
|
var chunkOJFD3SHS_cjs = require('./chunk-OJFD3SHS.cjs');
|
|
22
22
|
var chunkUSBRSEJK_cjs = require('./chunk-USBRSEJK.cjs');
|
|
23
23
|
var chunk3ESFHUZI_cjs = require('./chunk-3ESFHUZI.cjs');
|
|
24
24
|
var chunkU47LRWDT_cjs = require('./chunk-U47LRWDT.cjs');
|
|
25
|
-
var
|
|
25
|
+
var chunkGWKTHP6U_cjs = require('./chunk-GWKTHP6U.cjs');
|
|
26
26
|
var chunkY6DO6SVT_cjs = require('./chunk-Y6DO6SVT.cjs');
|
|
27
27
|
var chunkPBZWDEXQ_cjs = require('./chunk-PBZWDEXQ.cjs');
|
|
28
28
|
var chunkEW5DW5KR_cjs = require('./chunk-EW5DW5KR.cjs');
|
|
@@ -42,7 +42,6 @@ var tableCellEdit = require('ooxml-core/pptx/editor/render/table-cell-edit');
|
|
|
42
42
|
var tableDataGridOps = require('ooxml-core/pptx/editor/render/table-data-grid-ops');
|
|
43
43
|
var tableCellMerge = require('ooxml-core/pptx/editor/render/table-cell-merge');
|
|
44
44
|
var clone = require('ooxml-core/pptx/editor/render/clone');
|
|
45
|
-
var element = require('ooxml-core/pptx/editor/render/element');
|
|
46
45
|
var geometry = require('ooxml-core/geometry');
|
|
47
46
|
var elementLocks = require('ooxml-core/pptx/editor/render/element-locks');
|
|
48
47
|
var groupOps = require('ooxml-core/pptx/editor/render/group-ops');
|
|
@@ -1321,7 +1320,7 @@ function flattenPath(d) {
|
|
|
1321
1320
|
let start = [0, 0];
|
|
1322
1321
|
let i = 0;
|
|
1323
1322
|
let command2 = "";
|
|
1324
|
-
const
|
|
1323
|
+
const num15 = () => Number.parseFloat(tokens[i++] ?? "NaN");
|
|
1325
1324
|
while (i < tokens.length) {
|
|
1326
1325
|
const token = tokens[i];
|
|
1327
1326
|
if (/^[A-Za-z]$/u.test(token)) {
|
|
@@ -1343,26 +1342,26 @@ function flattenPath(d) {
|
|
|
1343
1342
|
if (current.length > 1) {
|
|
1344
1343
|
subpaths.push(current);
|
|
1345
1344
|
}
|
|
1346
|
-
pos = [
|
|
1345
|
+
pos = [num15(), num15()];
|
|
1347
1346
|
start = pos;
|
|
1348
1347
|
current = [pos];
|
|
1349
1348
|
break;
|
|
1350
1349
|
case "L":
|
|
1351
|
-
pos = [
|
|
1350
|
+
pos = [num15(), num15()];
|
|
1352
1351
|
current.push(pos);
|
|
1353
1352
|
break;
|
|
1354
1353
|
case "H":
|
|
1355
|
-
pos = [
|
|
1354
|
+
pos = [num15(), pos[1]];
|
|
1356
1355
|
current.push(pos);
|
|
1357
1356
|
break;
|
|
1358
1357
|
case "V":
|
|
1359
|
-
pos = [pos[0],
|
|
1358
|
+
pos = [pos[0], num15()];
|
|
1360
1359
|
current.push(pos);
|
|
1361
1360
|
break;
|
|
1362
1361
|
case "C": {
|
|
1363
|
-
const p1 = [
|
|
1364
|
-
const p2 = [
|
|
1365
|
-
const p3 = [
|
|
1362
|
+
const p1 = [num15(), num15()];
|
|
1363
|
+
const p2 = [num15(), num15()];
|
|
1364
|
+
const p3 = [num15(), num15()];
|
|
1366
1365
|
for (let step2 = 1; step2 <= CURVE_STEPS; step2++) {
|
|
1367
1366
|
const t2 = step2 / CURVE_STEPS;
|
|
1368
1367
|
const u = 1 - t2;
|
|
@@ -1375,8 +1374,8 @@ function flattenPath(d) {
|
|
|
1375
1374
|
break;
|
|
1376
1375
|
}
|
|
1377
1376
|
case "Q": {
|
|
1378
|
-
const p1 = [
|
|
1379
|
-
const p2 = [
|
|
1377
|
+
const p1 = [num15(), num15()];
|
|
1378
|
+
const p2 = [num15(), num15()];
|
|
1380
1379
|
for (let step2 = 1; step2 <= CURVE_STEPS; step2++) {
|
|
1381
1380
|
const t2 = step2 / CURVE_STEPS;
|
|
1382
1381
|
const u = 1 - t2;
|
|
@@ -1389,12 +1388,12 @@ function flattenPath(d) {
|
|
|
1389
1388
|
break;
|
|
1390
1389
|
}
|
|
1391
1390
|
case "A": {
|
|
1392
|
-
const rx =
|
|
1393
|
-
const ry =
|
|
1394
|
-
const rotation =
|
|
1395
|
-
const largeArc =
|
|
1396
|
-
const sweep =
|
|
1397
|
-
const to = [
|
|
1391
|
+
const rx = num15();
|
|
1392
|
+
const ry = num15();
|
|
1393
|
+
const rotation = num15();
|
|
1394
|
+
const largeArc = num15() !== 0;
|
|
1395
|
+
const sweep = num15() !== 0;
|
|
1396
|
+
const to = [num15(), num15()];
|
|
1398
1397
|
current.push(...flattenArc(pos, rx, ry, rotation, largeArc, sweep, to));
|
|
1399
1398
|
pos = to;
|
|
1400
1399
|
break;
|
|
@@ -7801,7 +7800,7 @@ var EQUATION_TEMPLATES = [
|
|
|
7801
7800
|
|
|
7802
7801
|
// src/pptx/render/mathml-sanitize.ts
|
|
7803
7802
|
function sanitizeMathMl(markup) {
|
|
7804
|
-
const sanitized =
|
|
7803
|
+
const sanitized = chunkYMITEJST_cjs.sanitizeMarkupOrEmpty(markup, { USE_PROFILES: { mathMl: true, svg: true } });
|
|
7805
7804
|
if (/<math(?:\s|>)/iu.test(markup) && !/<math(?:\s|>)/iu.test(sanitized) && sanitized) {
|
|
7806
7805
|
return `<math xmlns="http://www.w3.org/1998/Math/MathML" display="inline">${sanitized}</math>`;
|
|
7807
7806
|
}
|
|
@@ -10995,8 +10994,8 @@ function withChartUserShapeRowFlipUpdated(userShapes, path, flip) {
|
|
|
10995
10994
|
|
|
10996
10995
|
// src/pptx/render/chart-user-shape-row-frame.ts
|
|
10997
10996
|
var IDENTITY_FRAC = { x: 0, y: 0, w: 1, h: 1 };
|
|
10998
|
-
function safeDiv(
|
|
10999
|
-
return den !== 0 ?
|
|
10997
|
+
function safeDiv(num15, den) {
|
|
10998
|
+
return den !== 0 ? num15 / den : 0;
|
|
11000
10999
|
}
|
|
11001
11000
|
function childFraction(off, ext, chOff, chExt) {
|
|
11002
11001
|
return {
|
|
@@ -25687,6 +25686,10 @@ function createEditorHistoryController(options = {}) {
|
|
|
25687
25686
|
stack.clear();
|
|
25688
25687
|
sync();
|
|
25689
25688
|
},
|
|
25689
|
+
forget(reaches) {
|
|
25690
|
+
stack.forget(reaches);
|
|
25691
|
+
sync();
|
|
25692
|
+
},
|
|
25690
25693
|
setMaxDepth(next) {
|
|
25691
25694
|
maxDepth = clampDepth(next);
|
|
25692
25695
|
stack.setMaxDepth(maxDepth);
|
|
@@ -27447,7 +27450,7 @@ function createTemplateContext(options = {}) {
|
|
|
27447
27450
|
const scheme = { ...pptx.DEFAULT_SCHEME_COLOR_MAP, ...options.scheme ?? {} };
|
|
27448
27451
|
let counter = 0;
|
|
27449
27452
|
const idFor = options.idFor ?? ((index) => `template-el-${Date.now()}-${index}`);
|
|
27450
|
-
const dictionary =
|
|
27453
|
+
const dictionary = chunkGWKTHP6U_cjs.translationsEn;
|
|
27451
27454
|
const translate = options.translate ?? ((key) => dictionary[key] ?? key);
|
|
27452
27455
|
return {
|
|
27453
27456
|
scheme,
|
|
@@ -37434,7 +37437,7 @@ function elementRef(element) {
|
|
|
37434
37437
|
...text4.length > 0 && { text: text4.length > 30 ? `${text4.slice(0, 30)}...` : text4 }
|
|
37435
37438
|
};
|
|
37436
37439
|
}
|
|
37437
|
-
function
|
|
37440
|
+
function getElementLabel(element) {
|
|
37438
37441
|
const typeLabel = element.type.charAt(0).toUpperCase() + element.type.slice(1);
|
|
37439
37442
|
const text4 = getElementText(element);
|
|
37440
37443
|
if (text4.length > 0) {
|
|
@@ -37468,9 +37471,9 @@ function diffSlideElements(baseElements, compareElements) {
|
|
|
37468
37471
|
if (!compareById.has(id)) {
|
|
37469
37472
|
changes.push({
|
|
37470
37473
|
elementId: id,
|
|
37471
|
-
label:
|
|
37474
|
+
label: getElementLabel(el),
|
|
37472
37475
|
kind: "removed",
|
|
37473
|
-
description: `Element removed: ${
|
|
37476
|
+
description: `Element removed: ${getElementLabel(el)}`,
|
|
37474
37477
|
descriptionKey: "pptx.compare.change.removed",
|
|
37475
37478
|
descriptionElement: elementRef(el)
|
|
37476
37479
|
});
|
|
@@ -37480,9 +37483,9 @@ function diffSlideElements(baseElements, compareElements) {
|
|
|
37480
37483
|
if (!baseById.has(id)) {
|
|
37481
37484
|
changes.push({
|
|
37482
37485
|
elementId: id,
|
|
37483
|
-
label:
|
|
37486
|
+
label: getElementLabel(el),
|
|
37484
37487
|
kind: "added",
|
|
37485
|
-
description: `Element added: ${
|
|
37488
|
+
description: `Element added: ${getElementLabel(el)}`,
|
|
37486
37489
|
descriptionKey: "pptx.compare.change.added",
|
|
37487
37490
|
descriptionElement: elementRef(el)
|
|
37488
37491
|
});
|
|
@@ -37496,7 +37499,7 @@ function diffSlideElements(baseElements, compareElements) {
|
|
|
37496
37499
|
if (Math.abs(baseEl.x - compareEl.x) > POSITION_THRESHOLD || Math.abs(baseEl.y - compareEl.y) > POSITION_THRESHOLD) {
|
|
37497
37500
|
changes.push({
|
|
37498
37501
|
elementId: id,
|
|
37499
|
-
label:
|
|
37502
|
+
label: getElementLabel(baseEl),
|
|
37500
37503
|
kind: "moved",
|
|
37501
37504
|
description: `Moved from (${Math.round(baseEl.x)}, ${Math.round(baseEl.y)}) to (${Math.round(compareEl.x)}, ${Math.round(compareEl.y)})`,
|
|
37502
37505
|
descriptionKey: "pptx.compare.change.moved",
|
|
@@ -37511,7 +37514,7 @@ function diffSlideElements(baseElements, compareElements) {
|
|
|
37511
37514
|
if (Math.abs(baseEl.width - compareEl.width) > SIZE_THRESHOLD || Math.abs(baseEl.height - compareEl.height) > SIZE_THRESHOLD) {
|
|
37512
37515
|
changes.push({
|
|
37513
37516
|
elementId: id,
|
|
37514
|
-
label:
|
|
37517
|
+
label: getElementLabel(baseEl),
|
|
37515
37518
|
kind: "resized",
|
|
37516
37519
|
description: `Resized from ${Math.round(baseEl.width)}x${Math.round(baseEl.height)} to ${Math.round(compareEl.width)}x${Math.round(compareEl.height)}`,
|
|
37517
37520
|
descriptionKey: "pptx.compare.change.resized",
|
|
@@ -37528,7 +37531,7 @@ function diffSlideElements(baseElements, compareElements) {
|
|
|
37528
37531
|
if (baseText !== compareText) {
|
|
37529
37532
|
changes.push({
|
|
37530
37533
|
elementId: id,
|
|
37531
|
-
label:
|
|
37534
|
+
label: getElementLabel(baseEl),
|
|
37532
37535
|
kind: "textChanged",
|
|
37533
37536
|
description: "Text content changed",
|
|
37534
37537
|
descriptionKey: "pptx.compare.change.textChanged"
|
|
@@ -41574,7 +41577,7 @@ function parsePathPoints(d) {
|
|
|
41574
41577
|
let i = 0;
|
|
41575
41578
|
let cmd = "";
|
|
41576
41579
|
let cur = { x: 0, y: 0 };
|
|
41577
|
-
const
|
|
41580
|
+
const num15 = () => Number(tokens[i++]);
|
|
41578
41581
|
while (i < tokens.length) {
|
|
41579
41582
|
const t2 = tokens[i];
|
|
41580
41583
|
if (/[a-zA-Z]/u.test(t2)) {
|
|
@@ -41585,40 +41588,40 @@ function parsePathPoints(d) {
|
|
|
41585
41588
|
switch (cmd.toUpperCase()) {
|
|
41586
41589
|
case "M":
|
|
41587
41590
|
case "L": {
|
|
41588
|
-
const x =
|
|
41589
|
-
const y =
|
|
41591
|
+
const x = num15();
|
|
41592
|
+
const y = num15();
|
|
41590
41593
|
cur = rel ? { x: cur.x + x, y: cur.y + y } : { x, y };
|
|
41591
41594
|
out.push(cur);
|
|
41592
41595
|
break;
|
|
41593
41596
|
}
|
|
41594
41597
|
case "H": {
|
|
41595
|
-
const x =
|
|
41598
|
+
const x = num15();
|
|
41596
41599
|
cur = { x: rel ? cur.x + x : x, y: cur.y };
|
|
41597
41600
|
out.push(cur);
|
|
41598
41601
|
break;
|
|
41599
41602
|
}
|
|
41600
41603
|
case "V": {
|
|
41601
|
-
const y =
|
|
41604
|
+
const y = num15();
|
|
41602
41605
|
cur = { x: cur.x, y: rel ? cur.y + y : y };
|
|
41603
41606
|
out.push(cur);
|
|
41604
41607
|
break;
|
|
41605
41608
|
}
|
|
41606
41609
|
case "C": {
|
|
41607
|
-
|
|
41608
|
-
|
|
41609
|
-
|
|
41610
|
-
|
|
41611
|
-
const x =
|
|
41612
|
-
const y =
|
|
41610
|
+
num15();
|
|
41611
|
+
num15();
|
|
41612
|
+
num15();
|
|
41613
|
+
num15();
|
|
41614
|
+
const x = num15();
|
|
41615
|
+
const y = num15();
|
|
41613
41616
|
cur = rel ? { x: cur.x + x, y: cur.y + y } : { x, y };
|
|
41614
41617
|
out.push(cur);
|
|
41615
41618
|
break;
|
|
41616
41619
|
}
|
|
41617
41620
|
case "Q": {
|
|
41618
|
-
|
|
41619
|
-
|
|
41620
|
-
const x =
|
|
41621
|
-
const y =
|
|
41621
|
+
num15();
|
|
41622
|
+
num15();
|
|
41623
|
+
const x = num15();
|
|
41624
|
+
const y = num15();
|
|
41622
41625
|
cur = rel ? { x: cur.x + x, y: cur.y + y } : { x, y };
|
|
41623
41626
|
out.push(cur);
|
|
41624
41627
|
break;
|
|
@@ -44740,6 +44743,144 @@ var TEXT_BOX_SECTION = {
|
|
|
44740
44743
|
]
|
|
44741
44744
|
};
|
|
44742
44745
|
var TEXT_BOX_SECTIONS = [TEXT_BOX_SECTION];
|
|
44746
|
+
|
|
44747
|
+
// src/pptx/render/inspector/text-effect-fields.ts
|
|
44748
|
+
var SHADOW_ON = {
|
|
44749
|
+
textShadowColor: "#000000",
|
|
44750
|
+
textShadowBlur: 4,
|
|
44751
|
+
textShadowOffsetX: 2,
|
|
44752
|
+
textShadowOffsetY: 2,
|
|
44753
|
+
textShadowOpacity: 0.5
|
|
44754
|
+
};
|
|
44755
|
+
var GLOW_ON = {
|
|
44756
|
+
textGlowColor: "#ffff00",
|
|
44757
|
+
textGlowRadius: 6,
|
|
44758
|
+
textGlowOpacity: 0.6
|
|
44759
|
+
};
|
|
44760
|
+
var REFLECTION_ON = {
|
|
44761
|
+
textReflection: true,
|
|
44762
|
+
textReflectionBlur: 1,
|
|
44763
|
+
textReflectionStartOpacity: 0.5,
|
|
44764
|
+
textReflectionEndOpacity: 0,
|
|
44765
|
+
textReflectionOffset: 3
|
|
44766
|
+
};
|
|
44767
|
+
var ON_DEFAULTS = { ...SHADOW_ON, ...GLOW_ON, ...REFLECTION_ON };
|
|
44768
|
+
function cleared(on) {
|
|
44769
|
+
return Object.fromEntries(Object.keys(on).map((key) => [key, void 0]));
|
|
44770
|
+
}
|
|
44771
|
+
var num4 = (v) => Number(v);
|
|
44772
|
+
var fxId = (section2, field) => `text-fx-${section2}-${field}`;
|
|
44773
|
+
function colorField2(section2, key) {
|
|
44774
|
+
return {
|
|
44775
|
+
id: "color",
|
|
44776
|
+
kind: "color",
|
|
44777
|
+
labelKey: "pptx.textEffects.color",
|
|
44778
|
+
testId: fxId(section2, "color"),
|
|
44779
|
+
read: (ts) => chunk6KLPQQYP_cjs.normalizeHexColor(ts?.[key], ON_DEFAULTS[key]),
|
|
44780
|
+
write: (_ts, v) => ({ [key]: String(v) })
|
|
44781
|
+
};
|
|
44782
|
+
}
|
|
44783
|
+
function opacityField2(section2, id, labelKey, key) {
|
|
44784
|
+
return {
|
|
44785
|
+
id,
|
|
44786
|
+
kind: "number",
|
|
44787
|
+
labelKey,
|
|
44788
|
+
min: 0,
|
|
44789
|
+
max: 1,
|
|
44790
|
+
step: 0.05,
|
|
44791
|
+
testId: fxId(section2, id),
|
|
44792
|
+
read: (ts) => ts?.[key] ?? ON_DEFAULTS[key],
|
|
44793
|
+
write: (_ts, v) => ({ [key]: num4(v) })
|
|
44794
|
+
};
|
|
44795
|
+
}
|
|
44796
|
+
function pxField(section2, id, labelKey, key, [min, max]) {
|
|
44797
|
+
return {
|
|
44798
|
+
id,
|
|
44799
|
+
kind: "length",
|
|
44800
|
+
labelKey,
|
|
44801
|
+
min,
|
|
44802
|
+
max,
|
|
44803
|
+
step: 1,
|
|
44804
|
+
decimals: 0,
|
|
44805
|
+
testId: fxId(section2, id),
|
|
44806
|
+
read: (ts) => ts?.[key] ?? ON_DEFAULTS[key],
|
|
44807
|
+
write: (_ts, v) => ({ [key]: num4(v) })
|
|
44808
|
+
};
|
|
44809
|
+
}
|
|
44810
|
+
var TEXT_SHADOW_SECTION = {
|
|
44811
|
+
id: "shadow",
|
|
44812
|
+
labelKey: "pptx.textEffects.shadow",
|
|
44813
|
+
toggle: {
|
|
44814
|
+
testId: "text-fx-shadow-toggle",
|
|
44815
|
+
isOn: (ts) => Boolean(ts?.textShadowColor) || typeof ts?.textShadowBlur === "number" && ts.textShadowBlur > 0,
|
|
44816
|
+
enable: () => ({ ...SHADOW_ON }),
|
|
44817
|
+
disable: () => cleared(SHADOW_ON)
|
|
44818
|
+
},
|
|
44819
|
+
fields: [
|
|
44820
|
+
colorField2("shadow", "textShadowColor"),
|
|
44821
|
+
opacityField2("shadow", "opacity", "pptx.textEffects.opacity", "textShadowOpacity"),
|
|
44822
|
+
pxField("shadow", "blur", "pptx.textEffects.blur", "textShadowBlur", [0, 50]),
|
|
44823
|
+
pxField("shadow", "offsetX", "pptx.textEffects.offsetX", "textShadowOffsetX", [-50, 50]),
|
|
44824
|
+
pxField("shadow", "offsetY", "pptx.textEffects.offsetY", "textShadowOffsetY", [-50, 50])
|
|
44825
|
+
]
|
|
44826
|
+
};
|
|
44827
|
+
var TEXT_GLOW_SECTION = {
|
|
44828
|
+
id: "glow",
|
|
44829
|
+
labelKey: "pptx.textEffects.glow",
|
|
44830
|
+
toggle: {
|
|
44831
|
+
testId: "text-fx-glow-toggle",
|
|
44832
|
+
isOn: (ts) => Boolean(ts?.textGlowColor) || typeof ts?.textGlowRadius === "number" && ts.textGlowRadius > 0,
|
|
44833
|
+
enable: () => ({ ...GLOW_ON }),
|
|
44834
|
+
disable: () => cleared(GLOW_ON)
|
|
44835
|
+
},
|
|
44836
|
+
fields: [
|
|
44837
|
+
colorField2("glow", "textGlowColor"),
|
|
44838
|
+
opacityField2("glow", "opacity", "pptx.textEffects.opacity", "textGlowOpacity"),
|
|
44839
|
+
pxField("glow", "size", "pptx.textEffects.size", "textGlowRadius", [1, 50])
|
|
44840
|
+
]
|
|
44841
|
+
};
|
|
44842
|
+
var TEXT_REFLECTION_SECTION = {
|
|
44843
|
+
id: "reflection",
|
|
44844
|
+
labelKey: "pptx.textEffects.reflection",
|
|
44845
|
+
toggle: {
|
|
44846
|
+
testId: "text-fx-reflection-toggle",
|
|
44847
|
+
isOn: (ts) => Boolean(ts?.textReflection),
|
|
44848
|
+
enable: () => ({ ...REFLECTION_ON }),
|
|
44849
|
+
disable: () => cleared(REFLECTION_ON)
|
|
44850
|
+
},
|
|
44851
|
+
fields: [
|
|
44852
|
+
{
|
|
44853
|
+
id: "blur",
|
|
44854
|
+
kind: "length",
|
|
44855
|
+
labelKey: "pptx.textEffects.blur",
|
|
44856
|
+
min: 0,
|
|
44857
|
+
max: 20,
|
|
44858
|
+
step: 0.5,
|
|
44859
|
+
decimals: 1,
|
|
44860
|
+
testId: fxId("reflection", "blur"),
|
|
44861
|
+
read: (ts) => ts?.textReflectionBlur ?? ON_DEFAULTS.textReflectionBlur,
|
|
44862
|
+
write: (_ts, v) => ({ textReflectionBlur: num4(v) })
|
|
44863
|
+
},
|
|
44864
|
+
pxField("reflection", "offset", "pptx.textEffects.offset", "textReflectionOffset", [0, 20]),
|
|
44865
|
+
opacityField2(
|
|
44866
|
+
"reflection",
|
|
44867
|
+
"startOpacity",
|
|
44868
|
+
"pptx.textEffects.startOpacity",
|
|
44869
|
+
"textReflectionStartOpacity"
|
|
44870
|
+
),
|
|
44871
|
+
opacityField2(
|
|
44872
|
+
"reflection",
|
|
44873
|
+
"endOpacity",
|
|
44874
|
+
"pptx.textEffects.endOpacity",
|
|
44875
|
+
"textReflectionEndOpacity"
|
|
44876
|
+
)
|
|
44877
|
+
]
|
|
44878
|
+
};
|
|
44879
|
+
var TEXT_EFFECT_SECTIONS = [
|
|
44880
|
+
TEXT_SHADOW_SECTION,
|
|
44881
|
+
TEXT_GLOW_SECTION,
|
|
44882
|
+
TEXT_REFLECTION_SECTION
|
|
44883
|
+
];
|
|
44743
44884
|
var FONT_NAME_UNSAFE_CHARS = /["\\\n\r;}<>]/u;
|
|
44744
44885
|
var FONT_FORMAT_ALLOWED = /* @__PURE__ */ new Set(["truetype", "opentype", "woff", "woff2"]);
|
|
44745
44886
|
var FONT_MIME_BY_FORMAT = {
|
|
@@ -44881,6 +45022,44 @@ function collectUsedFonts(slides) {
|
|
|
44881
45022
|
|
|
44882
45023
|
// src/pptx/render/google-webfonts.ts
|
|
44883
45024
|
var GOOGLE_FONTS_CSS2_BASE = "https://fonts.googleapis.com/css2";
|
|
45025
|
+
function normalizeGoogleFontsBaseUrl(baseUrl) {
|
|
45026
|
+
if (typeof baseUrl !== "string" || baseUrl.trim() === "") {
|
|
45027
|
+
return null;
|
|
45028
|
+
}
|
|
45029
|
+
let url;
|
|
45030
|
+
try {
|
|
45031
|
+
url = new URL(baseUrl.trim());
|
|
45032
|
+
} catch {
|
|
45033
|
+
return null;
|
|
45034
|
+
}
|
|
45035
|
+
if (url.protocol !== "http:" && url.protocol !== "https:") {
|
|
45036
|
+
return null;
|
|
45037
|
+
}
|
|
45038
|
+
if (url.username !== "" || url.password !== "" || url.search !== "" || url.hash !== "") {
|
|
45039
|
+
return null;
|
|
45040
|
+
}
|
|
45041
|
+
return url.href;
|
|
45042
|
+
}
|
|
45043
|
+
var warnedInvalidBaseUrls = /* @__PURE__ */ new Set();
|
|
45044
|
+
function resolveGoogleFontsCss2Base(option) {
|
|
45045
|
+
if (option === void 0) {
|
|
45046
|
+
return GOOGLE_FONTS_CSS2_BASE;
|
|
45047
|
+
}
|
|
45048
|
+
if (option === false) {
|
|
45049
|
+
return null;
|
|
45050
|
+
}
|
|
45051
|
+
const normalized = normalizeGoogleFontsBaseUrl(
|
|
45052
|
+
typeof option === "object" && option !== null ? option.baseUrl : void 0
|
|
45053
|
+
);
|
|
45054
|
+
const raw = typeof option === "object" && option !== null ? String(option.baseUrl) : "";
|
|
45055
|
+
if (normalized === null && !warnedInvalidBaseUrls.has(raw)) {
|
|
45056
|
+
warnedInvalidBaseUrls.add(raw);
|
|
45057
|
+
console.warn(
|
|
45058
|
+
"[pptx-viewer] googleFonts.baseUrl must be an absolute http(s) URL without credentials, query or fragment; the Google Fonts fallback is disabled."
|
|
45059
|
+
);
|
|
45060
|
+
}
|
|
45061
|
+
return normalized;
|
|
45062
|
+
}
|
|
44884
45063
|
var GOOGLE_WEBFONT_AXIS = "ital,wght@0,400;0,700;1,400;1,700";
|
|
44885
45064
|
var DISPLAY_PARAM = "display=swap";
|
|
44886
45065
|
function collectReferencedFontFamilies(slides) {
|
|
@@ -44971,6 +45150,9 @@ function matchGoogleWebfontFragments(families) {
|
|
|
44971
45150
|
return [...weightsByFamily].map(([family2, weights]) => buildGoogleFontsFragment(family2, weights));
|
|
44972
45151
|
}
|
|
44973
45152
|
async function resolveGoogleWebfontHref(slides, embeddedFonts, isLocallyInstalled = isFontFamilyInstalledLocally, googleFontsBaseUrl) {
|
|
45153
|
+
if (googleFontsBaseUrl === null) {
|
|
45154
|
+
return null;
|
|
45155
|
+
}
|
|
44974
45156
|
const referenced = collectReferencedFontFamilies(slides);
|
|
44975
45157
|
const candidates = selectGoogleWebfontFamilies(
|
|
44976
45158
|
referenced,
|
|
@@ -49641,14 +49823,14 @@ function parseHexToRgb(hex2) {
|
|
|
49641
49823
|
if (cleaned.length !== 6) {
|
|
49642
49824
|
return null;
|
|
49643
49825
|
}
|
|
49644
|
-
const
|
|
49645
|
-
if (!Number.isFinite(
|
|
49826
|
+
const num15 = parseInt(cleaned, 16);
|
|
49827
|
+
if (!Number.isFinite(num15)) {
|
|
49646
49828
|
return null;
|
|
49647
49829
|
}
|
|
49648
49830
|
return {
|
|
49649
|
-
r:
|
|
49650
|
-
g:
|
|
49651
|
-
b:
|
|
49831
|
+
r: num15 >> 16 & 255,
|
|
49832
|
+
g: num15 >> 8 & 255,
|
|
49833
|
+
b: num15 & 255
|
|
49652
49834
|
};
|
|
49653
49835
|
}
|
|
49654
49836
|
function colorDistance(a, b) {
|
|
@@ -51653,7 +51835,7 @@ function commentMarkerTitle(comment, fallbackAuthor) {
|
|
|
51653
51835
|
}
|
|
51654
51836
|
function buildCommentMarkers(comments, canvasWidth, canvasHeight, fallbackAuthor) {
|
|
51655
51837
|
return comments.map((comment, index) => {
|
|
51656
|
-
const pos =
|
|
51838
|
+
const pos = chunkYMITEJST_cjs.getCommentMarkerPosition(comment, index, canvasWidth, canvasHeight);
|
|
51657
51839
|
return {
|
|
51658
51840
|
commentId: comment.id,
|
|
51659
51841
|
label: String(index + 1),
|
|
@@ -53418,9 +53600,9 @@ function svgArcToCubics(from, rxIn, ryIn, xAxisRotationDeg, largeArc, sweep, to)
|
|
|
53418
53600
|
rx *= s;
|
|
53419
53601
|
ry *= s;
|
|
53420
53602
|
}
|
|
53421
|
-
const
|
|
53603
|
+
const num15 = rx * rx * ry * ry - rx * rx * y1p * y1p - ry * ry * x1p * x1p;
|
|
53422
53604
|
const den = rx * rx * y1p * y1p + ry * ry * x1p * x1p;
|
|
53423
|
-
let coef = den === 0 ? 0 : Math.sqrt(Math.max(0,
|
|
53605
|
+
let coef = den === 0 ? 0 : Math.sqrt(Math.max(0, num15 / den));
|
|
53424
53606
|
if (largeArc === sweep) {
|
|
53425
53607
|
coef = -coef;
|
|
53426
53608
|
}
|
|
@@ -55413,6 +55595,27 @@ async function applyMasterViewCrudAction(handler, data, action, target, options)
|
|
|
55413
55595
|
}
|
|
55414
55596
|
}
|
|
55415
55597
|
|
|
55598
|
+
// src/pptx/render/master-view-crud-history.ts
|
|
55599
|
+
function partPaths(masters) {
|
|
55600
|
+
return (masters ?? []).flatMap((master) => [
|
|
55601
|
+
master.path,
|
|
55602
|
+
...(master.layouts ?? []).map((layout) => layout.path)
|
|
55603
|
+
]);
|
|
55604
|
+
}
|
|
55605
|
+
function removedSlideMasterParts(before, after) {
|
|
55606
|
+
const kept = new Set(partPaths(after.slideMasters));
|
|
55607
|
+
return partPaths(before.slideMasters).filter((path) => !kept.has(path));
|
|
55608
|
+
}
|
|
55609
|
+
function historyStepUsesParts(step2, removed) {
|
|
55610
|
+
return step2.slides.some((slide) => slide.layoutPath !== void 0 && removed.has(slide.layoutPath)) || partPaths(step2.slideMasters).some((path) => removed.has(path));
|
|
55611
|
+
}
|
|
55612
|
+
function forgetStepsUsingRemovedParts(forget, before, after) {
|
|
55613
|
+
const removed = new Set(removedSlideMasterParts(before, after));
|
|
55614
|
+
if (removed.size > 0) {
|
|
55615
|
+
forget((step2) => historyStepUsesParts(step2, removed));
|
|
55616
|
+
}
|
|
55617
|
+
}
|
|
55618
|
+
|
|
55416
55619
|
// src/pptx/render/virtualized-list.ts
|
|
55417
55620
|
var DEFAULT_VIRTUAL_OVERSCAN = 5;
|
|
55418
55621
|
var SLIDE_VIRTUALIZATION_THRESHOLD = 50;
|
|
@@ -55570,6 +55773,192 @@ function validatePasswordPair(password, confirmation) {
|
|
|
55570
55773
|
return null;
|
|
55571
55774
|
}
|
|
55572
55775
|
|
|
55776
|
+
// src/pptx/render/theme-write-queue.ts
|
|
55777
|
+
var pendingWrites = /* @__PURE__ */ new WeakMap();
|
|
55778
|
+
function startWrite(write) {
|
|
55779
|
+
try {
|
|
55780
|
+
return write();
|
|
55781
|
+
} catch (error) {
|
|
55782
|
+
return Promise.reject(error);
|
|
55783
|
+
}
|
|
55784
|
+
}
|
|
55785
|
+
function queueThemeWrite(handler, write) {
|
|
55786
|
+
const previous = pendingWrites.get(handler);
|
|
55787
|
+
const run = previous ? previous.then(write) : startWrite(write);
|
|
55788
|
+
const settled = run.then(
|
|
55789
|
+
() => void 0,
|
|
55790
|
+
() => void 0
|
|
55791
|
+
);
|
|
55792
|
+
const end = settled.then(() => {
|
|
55793
|
+
if (pendingWrites.get(handler) === end) {
|
|
55794
|
+
pendingWrites.delete(handler);
|
|
55795
|
+
}
|
|
55796
|
+
});
|
|
55797
|
+
pendingWrites.set(handler, end);
|
|
55798
|
+
return run;
|
|
55799
|
+
}
|
|
55800
|
+
function settleThemeWrites(handler) {
|
|
55801
|
+
return handler && pendingWrites.get(handler) || Promise.resolve();
|
|
55802
|
+
}
|
|
55803
|
+
|
|
55804
|
+
// src/pptx/render/theme-history.ts
|
|
55805
|
+
var RECORDED_KEYS = ["colorScheme", "fontScheme", "name"];
|
|
55806
|
+
function plain(value) {
|
|
55807
|
+
return JSON.parse(JSON.stringify(value));
|
|
55808
|
+
}
|
|
55809
|
+
function sameJson(a, b) {
|
|
55810
|
+
return JSON.stringify(a) === JSON.stringify(b);
|
|
55811
|
+
}
|
|
55812
|
+
function masterThemePathsOf(slideMasters) {
|
|
55813
|
+
const entries2 = (slideMasters ?? []).flatMap(
|
|
55814
|
+
(master) => master.themePath ? [[master.path, master.themePath]] : []
|
|
55815
|
+
);
|
|
55816
|
+
return entries2.length > 0 ? Object.fromEntries(entries2) : void 0;
|
|
55817
|
+
}
|
|
55818
|
+
function historyTheme(theme, slideMasters) {
|
|
55819
|
+
const masterThemePaths = masterThemePathsOf(slideMasters);
|
|
55820
|
+
if (!theme && !masterThemePaths) {
|
|
55821
|
+
return void 0;
|
|
55822
|
+
}
|
|
55823
|
+
const { colorScheme, fontScheme, formatScheme, name } = theme ?? {};
|
|
55824
|
+
return {
|
|
55825
|
+
...colorScheme ? { colorScheme: plain(colorScheme) } : {},
|
|
55826
|
+
...fontScheme ? { fontScheme: plain(fontScheme) } : {},
|
|
55827
|
+
...formatScheme ? { formatScheme: plain(formatScheme) } : {},
|
|
55828
|
+
...name ? { name } : {},
|
|
55829
|
+
...masterThemePaths ? { masterThemePaths } : {}
|
|
55830
|
+
};
|
|
55831
|
+
}
|
|
55832
|
+
function sameFormatScheme(a, b) {
|
|
55833
|
+
const key = (theme) => theme?.formatScheme ? pptx.formatSchemeKey(theme.formatScheme) : void 0;
|
|
55834
|
+
return key(a) === key(b);
|
|
55835
|
+
}
|
|
55836
|
+
function withoutFormatScheme(theme) {
|
|
55837
|
+
if (!theme) {
|
|
55838
|
+
return null;
|
|
55839
|
+
}
|
|
55840
|
+
const { formatScheme: _format, ...rest } = theme;
|
|
55841
|
+
return rest;
|
|
55842
|
+
}
|
|
55843
|
+
function crossedHistoryTheme(current, target) {
|
|
55844
|
+
if (!target) {
|
|
55845
|
+
return void 0;
|
|
55846
|
+
}
|
|
55847
|
+
const same2 = sameJson(withoutFormatScheme(current), withoutFormatScheme(target)) && sameFormatScheme(current, target);
|
|
55848
|
+
return same2 ? void 0 : target;
|
|
55849
|
+
}
|
|
55850
|
+
function withHistoryTheme(theme, target) {
|
|
55851
|
+
const { masterThemePaths: _masters, formatScheme, ...parts } = target;
|
|
55852
|
+
const next = { ...theme, ...plain(parts) };
|
|
55853
|
+
for (const key of RECORDED_KEYS) {
|
|
55854
|
+
if (target[key] === void 0) {
|
|
55855
|
+
delete next[key];
|
|
55856
|
+
}
|
|
55857
|
+
}
|
|
55858
|
+
if (formatScheme && !sameFormatScheme(theme ?? void 0, target)) {
|
|
55859
|
+
next.formatScheme = plain(formatScheme);
|
|
55860
|
+
}
|
|
55861
|
+
return next;
|
|
55862
|
+
}
|
|
55863
|
+
function withHistoryMasterThemes(slideMasters, target) {
|
|
55864
|
+
const recorded = target?.masterThemePaths;
|
|
55865
|
+
if (!recorded || slideMasters.every((master) => !differs(recorded, master))) {
|
|
55866
|
+
return slideMasters;
|
|
55867
|
+
}
|
|
55868
|
+
return slideMasters.map(
|
|
55869
|
+
(master) => differs(recorded, master) ? { ...master, themePath: recorded[master.path] } : master
|
|
55870
|
+
);
|
|
55871
|
+
}
|
|
55872
|
+
function differs(recorded, master) {
|
|
55873
|
+
const path = recorded[master.path];
|
|
55874
|
+
return path !== void 0 && path !== master.themePath;
|
|
55875
|
+
}
|
|
55876
|
+
function themePartWrites(from, to, loadedName) {
|
|
55877
|
+
const writes = [];
|
|
55878
|
+
if (to.colorScheme && !sameJson(to.colorScheme, from?.colorScheme)) {
|
|
55879
|
+
writes.push({ part: "colorScheme", colorScheme: to.colorScheme });
|
|
55880
|
+
}
|
|
55881
|
+
if (to.fontScheme && !sameJson(to.fontScheme, from?.fontScheme)) {
|
|
55882
|
+
writes.push({ part: "fontScheme", fontScheme: to.fontScheme });
|
|
55883
|
+
}
|
|
55884
|
+
if (to.formatScheme && !sameFormatScheme(from, to)) {
|
|
55885
|
+
writes.push({ part: "formatScheme", formatScheme: to.formatScheme });
|
|
55886
|
+
}
|
|
55887
|
+
const name = to.name ?? loadedName;
|
|
55888
|
+
if (name && name !== (from?.name ?? loadedName)) {
|
|
55889
|
+
writes.push({ part: "name", name });
|
|
55890
|
+
}
|
|
55891
|
+
return writes;
|
|
55892
|
+
}
|
|
55893
|
+
function loadedThemeName(themeOptions, slideMasters) {
|
|
55894
|
+
const options = themeOptions ?? [];
|
|
55895
|
+
const primary = slideMasters?.[0]?.themePath;
|
|
55896
|
+
return (options.find((option) => option.path === primary) ?? options[0])?.name;
|
|
55897
|
+
}
|
|
55898
|
+
async function applyWrites(handler, writes, ...scope) {
|
|
55899
|
+
for (const write of writes) {
|
|
55900
|
+
if (write.part === "colorScheme") {
|
|
55901
|
+
await handler.updateThemeColorScheme(write.colorScheme, ...scope);
|
|
55902
|
+
} else if (write.part === "fontScheme") {
|
|
55903
|
+
await handler.updateThemeFontScheme(write.fontScheme, ...scope);
|
|
55904
|
+
} else if (write.part === "formatScheme") {
|
|
55905
|
+
await handler.restoreThemeFormatScheme(write.formatScheme, ...scope);
|
|
55906
|
+
} else {
|
|
55907
|
+
await handler.updateThemeName(write.name, ...scope);
|
|
55908
|
+
}
|
|
55909
|
+
}
|
|
55910
|
+
}
|
|
55911
|
+
function writableFaces(theme) {
|
|
55912
|
+
const { fontScheme } = theme;
|
|
55913
|
+
if (!fontScheme) {
|
|
55914
|
+
return theme;
|
|
55915
|
+
}
|
|
55916
|
+
const latin = (font) => font?.latin ? { latin: font.latin } : {};
|
|
55917
|
+
return {
|
|
55918
|
+
...theme,
|
|
55919
|
+
fontScheme: { majorFont: latin(fontScheme.majorFont), minorFont: latin(fontScheme.minorFont) }
|
|
55920
|
+
};
|
|
55921
|
+
}
|
|
55922
|
+
function masterThemeMoves(from, to) {
|
|
55923
|
+
return Object.entries(to.masterThemePaths ?? {}).filter(
|
|
55924
|
+
([master, path]) => from?.masterThemePaths?.[master] !== path
|
|
55925
|
+
);
|
|
55926
|
+
}
|
|
55927
|
+
function writeThemeParts(handler, from, to, loadedName) {
|
|
55928
|
+
const moves = masterThemeMoves(from, to);
|
|
55929
|
+
if (moves.length > 0) {
|
|
55930
|
+
return handler ? queueThemeWrite(handler, () => repointAndWrite(handler, moves, to)) : Promise.resolve();
|
|
55931
|
+
}
|
|
55932
|
+
const writes = themePartWrites(from, to, loadedName);
|
|
55933
|
+
if (!handler || writes.length === 0) {
|
|
55934
|
+
return Promise.resolve();
|
|
55935
|
+
}
|
|
55936
|
+
return queueThemeWrite(handler, () => applyWrites(handler, writes));
|
|
55937
|
+
}
|
|
55938
|
+
async function repointAndWrite(handler, moves, to) {
|
|
55939
|
+
for (const [master, path] of moves) {
|
|
55940
|
+
await handler.setSlideMasterTheme(master, path);
|
|
55941
|
+
}
|
|
55942
|
+
const deckPart = Object.values(to.masterThemePaths ?? {})[0];
|
|
55943
|
+
const now = deckPart ? await handler.getThemePartSchemes(deckPart) : void 0;
|
|
55944
|
+
if (deckPart && now) {
|
|
55945
|
+
const writes = themePartWrites(writableFaces(historyTheme(now)), writableFaces(to), now.name);
|
|
55946
|
+
await applyWrites(handler, writes, [deckPart]);
|
|
55947
|
+
}
|
|
55948
|
+
}
|
|
55949
|
+
function restoreCrossedTheme(theme, current, target, handler, loadedName) {
|
|
55950
|
+
const crossed = crossedHistoryTheme(current, target);
|
|
55951
|
+
if (!crossed) {
|
|
55952
|
+
return void 0;
|
|
55953
|
+
}
|
|
55954
|
+
void writeThemeParts(handler, current, crossed, loadedName);
|
|
55955
|
+
return withHistoryTheme(theme, crossed);
|
|
55956
|
+
}
|
|
55957
|
+
async function saveDeckWithPassword(serializer, slides, options, intent) {
|
|
55958
|
+
await settleThemeWrites(serializer);
|
|
55959
|
+
return deckSaveEncryption.saveDeckWithPassword(serializer, slides, options, intent);
|
|
55960
|
+
}
|
|
55961
|
+
|
|
55573
55962
|
// src/pptx/render/deck-save-options.ts
|
|
55574
55963
|
function buildDeckSaveOptions(state) {
|
|
55575
55964
|
return {
|
|
@@ -55608,32 +55997,79 @@ var DEFAULT_VIEWER_PREFERENCES = {
|
|
|
55608
55997
|
};
|
|
55609
55998
|
var DEFAULT_VIEWER_SETTINGS = DEFAULT_VIEWER_PREFERENCES;
|
|
55610
55999
|
var VIEWER_SHORTCUT_REFERENCE = [
|
|
55611
|
-
{ actionKey: "pptx.toolbar.undo", shortcut: "Ctrl/Cmd+Z" },
|
|
55612
|
-
{
|
|
55613
|
-
|
|
55614
|
-
|
|
55615
|
-
|
|
55616
|
-
|
|
55617
|
-
{ actionKey: "pptx.shortcuts.action.
|
|
55618
|
-
{ actionKey: "pptx.shortcuts.action.
|
|
55619
|
-
{ actionKey: "pptx.
|
|
55620
|
-
{
|
|
55621
|
-
|
|
55622
|
-
|
|
55623
|
-
|
|
55624
|
-
|
|
55625
|
-
{
|
|
55626
|
-
|
|
55627
|
-
|
|
56000
|
+
{ actionKey: "pptx.toolbar.undo", shortcut: "Ctrl/Cmd+Z", group: "history" },
|
|
56001
|
+
{
|
|
56002
|
+
actionKey: "pptx.toolbar.redo",
|
|
56003
|
+
shortcut: "Ctrl/Cmd+Shift+Z or Ctrl/Cmd+Y",
|
|
56004
|
+
group: "history"
|
|
56005
|
+
},
|
|
56006
|
+
{ actionKey: "pptx.shortcuts.action.copyElement", shortcut: "Ctrl/Cmd+C", group: "clipboard" },
|
|
56007
|
+
{ actionKey: "pptx.shortcuts.action.cutElement", shortcut: "Ctrl/Cmd+X", group: "clipboard" },
|
|
56008
|
+
{ actionKey: "pptx.shortcuts.action.pasteElement", shortcut: "Ctrl/Cmd+V", group: "clipboard" },
|
|
56009
|
+
{
|
|
56010
|
+
actionKey: "pptx.shortcuts.action.duplicateElement",
|
|
56011
|
+
shortcut: "Ctrl/Cmd+D",
|
|
56012
|
+
group: "editing"
|
|
56013
|
+
},
|
|
56014
|
+
{
|
|
56015
|
+
actionKey: "pptx.shortcuts.action.deleteElement",
|
|
56016
|
+
shortcut: "Delete / Backspace",
|
|
56017
|
+
group: "editing"
|
|
56018
|
+
},
|
|
56019
|
+
{ actionKey: "pptx.shortcuts.action.selectAll", shortcut: "Ctrl/Cmd+A", group: "editing" },
|
|
56020
|
+
{ actionKey: "pptx.ribbon.group", shortcut: "Ctrl/Cmd+G", group: "editing" },
|
|
56021
|
+
{ actionKey: "pptx.ribbon.ungroup", shortcut: "Ctrl/Cmd+Shift+G", group: "editing" },
|
|
56022
|
+
{ actionKey: "pptx.shortcuts.action.nudgeElement", shortcut: "Arrow keys", group: "editing" },
|
|
56023
|
+
{
|
|
56024
|
+
actionKey: "pptx.shortcuts.action.nudgeElementLarge",
|
|
56025
|
+
shortcut: "Shift+Arrow keys",
|
|
56026
|
+
group: "editing"
|
|
56027
|
+
},
|
|
56028
|
+
{
|
|
56029
|
+
actionKey: "pptx.shortcuts.action.prevSlide",
|
|
56030
|
+
shortcut: "Left or Up arrow, Page Up",
|
|
56031
|
+
group: "navigation"
|
|
56032
|
+
},
|
|
56033
|
+
{
|
|
56034
|
+
actionKey: "pptx.shortcuts.action.nextSlide",
|
|
56035
|
+
shortcut: "Right or Down arrow, Page Down",
|
|
56036
|
+
group: "navigation"
|
|
56037
|
+
},
|
|
56038
|
+
{
|
|
56039
|
+
actionKey: "pptx.shortcuts.action.zoomCanvas",
|
|
56040
|
+
shortcut: "Ctrl/Cmd+Mouse wheel",
|
|
56041
|
+
group: "navigation"
|
|
56042
|
+
},
|
|
56043
|
+
{
|
|
56044
|
+
actionKey: "pptx.shortcuts.action.commitTextEdit",
|
|
56045
|
+
shortcut: "Ctrl/Cmd+Enter",
|
|
56046
|
+
group: "editing"
|
|
56047
|
+
},
|
|
56048
|
+
{ actionKey: "pptx.shortcuts.action.cancelTextEdit", shortcut: "Escape", group: "editing" },
|
|
55628
56049
|
// Both of these reached the shared keymap late (Ctrl+F was hand-wired in two
|
|
55629
56050
|
// bindings, Ctrl+/ in one), so the panel that is supposed to teach the keymap
|
|
55630
56051
|
// was advertising neither. The help panel is the keymap's documentation: a
|
|
55631
56052
|
// chord missing here is a chord nobody discovers.
|
|
55632
|
-
{ actionKey: "pptx.findReplace.title", shortcut: "Ctrl/Cmd+F" },
|
|
55633
|
-
{ actionKey: "pptx.slideShow.fromBeginning", shortcut: "F5" },
|
|
55634
|
-
{ actionKey: "pptx.slideShow.fromCurrent", shortcut: "Shift+F5" },
|
|
55635
|
-
{ actionKey: "pptx.shortcuts.title", shortcut: "? or Ctrl/Cmd+/" }
|
|
56053
|
+
{ actionKey: "pptx.findReplace.title", shortcut: "Ctrl/Cmd+F", group: "general" },
|
|
56054
|
+
{ actionKey: "pptx.slideShow.fromBeginning", shortcut: "F5", group: "general" },
|
|
56055
|
+
{ actionKey: "pptx.slideShow.fromCurrent", shortcut: "Shift+F5", group: "general" },
|
|
56056
|
+
{ actionKey: "pptx.shortcuts.title", shortcut: "? or Ctrl/Cmd+/", group: "general" }
|
|
55636
56057
|
];
|
|
56058
|
+
var SHORTCUT_REFERENCE_GROUP_LABEL_KEYS = {
|
|
56059
|
+
history: "pptx.editorToolbar.history",
|
|
56060
|
+
clipboard: "pptx.ribbon.clipboard",
|
|
56061
|
+
editing: "pptx.shortcuts.group.editing",
|
|
56062
|
+
navigation: "pptx.shortcuts.group.navigation",
|
|
56063
|
+
general: "pptx.settings.general"
|
|
56064
|
+
};
|
|
56065
|
+
function groupShortcutReference(items = VIEWER_SHORTCUT_REFERENCE) {
|
|
56066
|
+
const order = Object.keys(SHORTCUT_REFERENCE_GROUP_LABEL_KEYS);
|
|
56067
|
+
return order.map((group) => ({
|
|
56068
|
+
group,
|
|
56069
|
+
labelKey: SHORTCUT_REFERENCE_GROUP_LABEL_KEYS[group],
|
|
56070
|
+
shortcuts: items.filter((item4) => item4.group === group)
|
|
56071
|
+
})).filter((bucket) => bucket.shortcuts.length > 0);
|
|
56072
|
+
}
|
|
55637
56073
|
var SHORTCUT_REFERENCE_ITEMS = VIEWER_SHORTCUT_REFERENCE;
|
|
55638
56074
|
var VIEWER_PREFERENCE_TOGGLES = [
|
|
55639
56075
|
{ key: "autoSave", labelKey: "pptx.settings.autoSave" },
|
|
@@ -56072,8 +56508,8 @@ function capitalizeDayName(word) {
|
|
|
56072
56508
|
return word;
|
|
56073
56509
|
}
|
|
56074
56510
|
function replaceFractions(word) {
|
|
56075
|
-
for (const [
|
|
56076
|
-
if (word ===
|
|
56511
|
+
for (const [plain2, glyph3] of FRACTIONS) {
|
|
56512
|
+
if (word === plain2) {
|
|
56077
56513
|
return glyph3;
|
|
56078
56514
|
}
|
|
56079
56515
|
}
|
|
@@ -59057,7 +59493,7 @@ function safeColor(color, fallback = "none") {
|
|
|
59057
59493
|
function svgTile(width, height, defs, body) {
|
|
59058
59494
|
return `<svg xmlns="http://www.w3.org/2000/svg" width="${width}" height="${height}" viewBox="0 0 ${width} ${height}" aria-hidden="true" focusable="false">${defs ? `<defs>${defs}</defs>` : ""}${body}</svg>`;
|
|
59059
59495
|
}
|
|
59060
|
-
function
|
|
59496
|
+
function num5(value) {
|
|
59061
59497
|
return String(Math.round(value * 100) / 100);
|
|
59062
59498
|
}
|
|
59063
59499
|
function svgId(raw) {
|
|
@@ -59072,9 +59508,9 @@ function paintDefs(paint, id) {
|
|
|
59072
59508
|
const x = Math.cos(rad) / 2;
|
|
59073
59509
|
const y = Math.sin(rad) / 2;
|
|
59074
59510
|
const stops = paint.stops.map(
|
|
59075
|
-
(s) => `<stop offset="${
|
|
59511
|
+
(s) => `<stop offset="${num5(s.position)}%" stop-color="${safeColor(s.color, "#000000")}"${s.opacity !== void 0 && s.opacity < 1 ? ` stop-opacity="${num5(s.opacity)}"` : ""}/>`
|
|
59076
59512
|
).join("");
|
|
59077
|
-
const defs = `<linearGradient id="${id}" x1="${
|
|
59513
|
+
const defs = `<linearGradient id="${id}" x1="${num5(0.5 - x)}" y1="${num5(0.5 - y)}" x2="${num5(0.5 + x)}" y2="${num5(0.5 + y)}">${stops}</linearGradient>`;
|
|
59078
59514
|
return { defs, fill: `url(#${id})` };
|
|
59079
59515
|
}
|
|
59080
59516
|
return { defs: "", fill: safeColor(paint.color) };
|
|
@@ -59087,19 +59523,19 @@ function filterDefs(effects, id) {
|
|
|
59087
59523
|
if (effects.glow) {
|
|
59088
59524
|
const g = effects.glow;
|
|
59089
59525
|
parts.push(
|
|
59090
|
-
`<feMorphology in="SourceAlpha" operator="dilate" radius="${
|
|
59091
|
-
`<feGaussianBlur in="gd" stdDeviation="${
|
|
59092
|
-
`<feFlood flood-color="${safeColor(g.color, "#000000")}" flood-opacity="${
|
|
59526
|
+
`<feMorphology in="SourceAlpha" operator="dilate" radius="${num5(g.radius / 2)}" result="gd"/>`,
|
|
59527
|
+
`<feGaussianBlur in="gd" stdDeviation="${num5(g.radius / 2)}" result="gb"/>`,
|
|
59528
|
+
`<feFlood flood-color="${safeColor(g.color, "#000000")}" flood-opacity="${num5(g.opacity)}"/>`,
|
|
59093
59529
|
'<feComposite in2="gb" operator="in" result="glow"/>'
|
|
59094
59530
|
);
|
|
59095
59531
|
}
|
|
59096
59532
|
if (effects.shadow && !effects.shadow.inner) {
|
|
59097
59533
|
const s = effects.shadow;
|
|
59098
|
-
parts.push(diagram.svgDropShadowElement(s, { number:
|
|
59534
|
+
parts.push(diagram.svgDropShadowElement(s, { number: num5, color: safeColor }));
|
|
59099
59535
|
}
|
|
59100
59536
|
if (effects.softEdge) {
|
|
59101
59537
|
parts.push(
|
|
59102
|
-
`<feGaussianBlur in="SourceGraphic" stdDeviation="${
|
|
59538
|
+
`<feGaussianBlur in="SourceGraphic" stdDeviation="${num5(effects.softEdge / 2)}" result="soft"/>`
|
|
59103
59539
|
);
|
|
59104
59540
|
}
|
|
59105
59541
|
if (parts.length === 0) {
|
|
@@ -59122,8 +59558,8 @@ function shapeTileSvg(spec5) {
|
|
|
59122
59558
|
const h = spec5.height - inset3 * 2 - (spec5.effects?.reflection ? h3(spec5) : 0);
|
|
59123
59559
|
const paint = paintDefs(spec5.fill, `${id}-f`);
|
|
59124
59560
|
const filter = filterDefs(spec5.effects, `${id}-x`);
|
|
59125
|
-
const stroke = spec5.stroke && spec5.stroke.width > 0 ? ` stroke="${safeColor(spec5.stroke.color, "#000000")}" stroke-width="${
|
|
59126
|
-
const fillOpacity = spec5.fill?.opacity !== void 0 && spec5.fill.opacity < 1 ? ` fill-opacity="${
|
|
59561
|
+
const stroke = spec5.stroke && spec5.stroke.width > 0 ? ` stroke="${safeColor(spec5.stroke.color, "#000000")}" stroke-width="${num5(Math.min(spec5.stroke.width, 6))}"${spec5.stroke.opacity !== void 0 && spec5.stroke.opacity < 1 ? ` stroke-opacity="${num5(spec5.stroke.opacity)}"` : ""}${spec5.stroke.dash ? ` stroke-dasharray="${spec5.stroke.dash}"` : ""}` : "";
|
|
59562
|
+
const fillOpacity = spec5.fill?.opacity !== void 0 && spec5.fill.opacity < 1 ? ` fill-opacity="${num5(spec5.fill.opacity)}"` : "";
|
|
59127
59563
|
const shape = geometryMarkup(
|
|
59128
59564
|
spec5.geometry,
|
|
59129
59565
|
inset3,
|
|
@@ -59136,8 +59572,8 @@ function shapeTileSvg(spec5) {
|
|
|
59136
59572
|
if (spec5.effects?.reflection) {
|
|
59137
59573
|
const r = spec5.effects.reflection;
|
|
59138
59574
|
const gy = inset3 + h + r.distance;
|
|
59139
|
-
body += `<g opacity="${
|
|
59140
|
-
paint.defs += `<linearGradient id="${id}-mg" x1="0" y1="0" x2="0" y2="1"><stop offset="0" stop-color="#fff"/><stop offset="${
|
|
59575
|
+
body += `<g opacity="${num5(r.startOpacity)}" transform="translate(0 ${num5(gy * 2)}) scale(1 -1)" mask="url(#${id}-m)">${geometryMarkup(spec5.geometry, inset3, inset3, w, h, `fill="${paint.fill}"${stroke}`)}</g>`;
|
|
59576
|
+
paint.defs += `<linearGradient id="${id}-mg" x1="0" y1="0" x2="0" y2="1"><stop offset="0" stop-color="#fff"/><stop offset="${num5(r.endPosition)}" stop-color="#fff" stop-opacity="0"/></linearGradient><mask id="${id}-m"><rect x="0" y="${num5(gy)}" width="${spec5.width}" height="${num5(h)}" fill="url(#${id}-mg)"/></mask>`;
|
|
59141
59577
|
}
|
|
59142
59578
|
if (spec5.effects?.shadow?.inner) {
|
|
59143
59579
|
const s = spec5.effects.shadow;
|
|
@@ -59147,11 +59583,11 @@ function shapeTileSvg(spec5) {
|
|
|
59147
59583
|
inset3 + s.dy / 2,
|
|
59148
59584
|
w - Math.abs(s.dx),
|
|
59149
59585
|
h - Math.abs(s.dy),
|
|
59150
|
-
`fill="none" stroke="${safeColor(s.color, "#000000")}" stroke-opacity="${
|
|
59586
|
+
`fill="none" stroke="${safeColor(s.color, "#000000")}" stroke-opacity="${num5(s.opacity / 2)}" stroke-width="${num5(Math.max(1, s.blur / 2))}"`
|
|
59151
59587
|
);
|
|
59152
59588
|
}
|
|
59153
59589
|
if (spec5.text) {
|
|
59154
|
-
body += `<text x="${
|
|
59590
|
+
body += `<text x="${num5(inset3 + w / 2)}" y="${num5(inset3 + h / 2)}" text-anchor="middle" dominant-baseline="central" font-family="Calibri, Arial, sans-serif" font-size="${num5(Math.min(h * 0.55, 14))}" fill="${safeColor(spec5.text.color, "#000000")}">${escapeSvgText(spec5.text.value)}</text>`;
|
|
59155
59591
|
}
|
|
59156
59592
|
return svgTile(spec5.width, spec5.height, paint.defs + filter.defs, body);
|
|
59157
59593
|
}
|
|
@@ -59160,10 +59596,10 @@ function h3(spec5) {
|
|
|
59160
59596
|
}
|
|
59161
59597
|
function geometryMarkup(geometry, x, y, w, h, attrs) {
|
|
59162
59598
|
if (geometry === "ellipse") {
|
|
59163
|
-
return `<ellipse cx="${
|
|
59599
|
+
return `<ellipse cx="${num5(x + w / 2)}" cy="${num5(y + h / 2)}" rx="${num5(w / 2)}" ry="${num5(h / 2)}" ${attrs}/>`;
|
|
59164
59600
|
}
|
|
59165
59601
|
const r = geometry === "roundRect" ? Math.min(w, h) * 0.18 : 1.5;
|
|
59166
|
-
return `<rect x="${
|
|
59602
|
+
return `<rect x="${num5(x)}" y="${num5(y)}" width="${num5(w)}" height="${num5(h)}" rx="${num5(r)}" ${attrs}/>`;
|
|
59167
59603
|
}
|
|
59168
59604
|
function tileSpecFromShapeStyle(id, style, size2, textColor) {
|
|
59169
59605
|
const fill3 = style.fillMode === "none" ? void 0 : style.fillMode === "gradient" && style.fillGradientStops?.length ? {
|
|
@@ -59269,17 +59705,17 @@ function apply(itemId, ctx) {
|
|
|
59269
59705
|
var BULLETS_GALLERY = { build, apply };
|
|
59270
59706
|
|
|
59271
59707
|
// src/ribbon/color-preview.ts
|
|
59272
|
-
var
|
|
59708
|
+
var num6 = (value) => String(Math.round(value * 100) / 100);
|
|
59273
59709
|
function swatchStripSvg(colors, size2) {
|
|
59274
59710
|
const w = size2.width / Math.max(colors.length, 1);
|
|
59275
59711
|
const body = colors.map(
|
|
59276
|
-
(color, i) => `<rect x="${
|
|
59712
|
+
(color, i) => `<rect x="${num6(i * w)}" y="0" width="${num6(w)}" height="${size2.height}" fill="${safeColor(color, "#808080")}"/>`
|
|
59277
59713
|
).join("");
|
|
59278
59714
|
return svgTile(size2.width, size2.height, "", body);
|
|
59279
59715
|
}
|
|
59280
59716
|
|
|
59281
59717
|
// src/chart/gallery-tiles.ts
|
|
59282
|
-
function
|
|
59718
|
+
function num7(value) {
|
|
59283
59719
|
return String(Math.round(value * 100) / 100);
|
|
59284
59720
|
}
|
|
59285
59721
|
var HEIGHTS = [0.55, 0.8, 0.4, 0.95, 0.7, 0.5];
|
|
@@ -59296,11 +59732,11 @@ function columnChartTileSvg(colors, size2) {
|
|
|
59296
59732
|
const h = plotH * (HEIGHTS[(g + s * 2) % HEIGHTS.length] ?? 0.5);
|
|
59297
59733
|
const x = pad + g * groupW + groupW * 0.1 + s * barW;
|
|
59298
59734
|
bars.push(
|
|
59299
|
-
`<rect x="${
|
|
59735
|
+
`<rect x="${num7(x)}" y="${num7(pad + plotH - h)}" width="${num7(barW * 0.9)}" height="${num7(h)}" fill="${safeColor(color, "#808080")}"/>`
|
|
59300
59736
|
);
|
|
59301
59737
|
});
|
|
59302
59738
|
}
|
|
59303
|
-
const axis = `<line x1="${pad}" y1="${
|
|
59739
|
+
const axis = `<line x1="${pad}" y1="${num7(pad + plotH)}" x2="${num7(pad + plotW)}" y2="${num7(pad + plotH)}" stroke="#A6A6A6" stroke-width="0.75"/>`;
|
|
59304
59740
|
const bg = `<rect x="0" y="0" width="${size2.width}" height="${size2.height}" fill="#FFFFFF"/>`;
|
|
59305
59741
|
return svgTile(size2.width, size2.height, "", bg + bars.join("") + axis);
|
|
59306
59742
|
}
|
|
@@ -59315,7 +59751,7 @@ function chartLayoutTileSvg(sketch, size2) {
|
|
|
59315
59751
|
let left = 3;
|
|
59316
59752
|
let right = size2.width - 3;
|
|
59317
59753
|
const bar = (x, y, w2, h, color = INK) => parts.push(
|
|
59318
|
-
`<rect x="${
|
|
59754
|
+
`<rect x="${num7(x)}" y="${num7(y)}" width="${num7(w2)}" height="${num7(h)}" fill="${color}"/>`
|
|
59319
59755
|
);
|
|
59320
59756
|
if (sketch.title) {
|
|
59321
59757
|
bar(size2.width * 0.3, top, size2.width * 0.4, 3);
|
|
@@ -59338,7 +59774,7 @@ function chartLayoutTileSvg(sketch, size2) {
|
|
|
59338
59774
|
const rows = 3;
|
|
59339
59775
|
for (let r = 0; r < rows; r++) {
|
|
59340
59776
|
parts.push(
|
|
59341
|
-
`<rect x="${
|
|
59777
|
+
`<rect x="${num7(left + 4)}" y="${num7(bottom - (rows - r) * 3)}" width="${num7(right - left - 4)}" height="3" fill="none" stroke="${INK}" stroke-width="0.5"/>`
|
|
59342
59778
|
);
|
|
59343
59779
|
}
|
|
59344
59780
|
bottom -= rows * 3 + 2;
|
|
@@ -59360,7 +59796,7 @@ function chartLayoutTileSvg(sketch, size2) {
|
|
|
59360
59796
|
for (let i = 0; i < lines; i++) {
|
|
59361
59797
|
const y = top + plotH * i / lines;
|
|
59362
59798
|
parts.push(
|
|
59363
|
-
`<line x1="${
|
|
59799
|
+
`<line x1="${num7(left)}" y1="${num7(y)}" x2="${num7(right)}" y2="${num7(y)}" stroke="#D9D9D9" stroke-width="${sketch.minorGridlines && i % 2 ? "0.4" : "0.7"}"/>`
|
|
59364
59800
|
);
|
|
59365
59801
|
}
|
|
59366
59802
|
}
|
|
@@ -59374,7 +59810,7 @@ function chartLayoutTileSvg(sketch, size2) {
|
|
|
59374
59810
|
}
|
|
59375
59811
|
});
|
|
59376
59812
|
parts.push(
|
|
59377
|
-
`<line x1="${
|
|
59813
|
+
`<line x1="${num7(left)}" y1="${num7(bottom)}" x2="${num7(right)}" y2="${num7(bottom)}" stroke="${INK}" stroke-width="0.6"/>`
|
|
59378
59814
|
);
|
|
59379
59815
|
return svgTile(size2.width, size2.height, "", parts.join(""));
|
|
59380
59816
|
}
|
|
@@ -59511,21 +59947,21 @@ function coloursByPoint(chartData) {
|
|
|
59511
59947
|
}
|
|
59512
59948
|
function applyChartColorPalette(chartData, palette, ctx) {
|
|
59513
59949
|
const scheme = galleryColorScheme(ctx);
|
|
59514
|
-
const
|
|
59950
|
+
const cleared2 = chartData.series.map(clearSeriesColor);
|
|
59515
59951
|
if (coloursByPoint(chartData)) {
|
|
59516
59952
|
const count = Math.max(chartData.categories.length, 1);
|
|
59517
59953
|
return {
|
|
59518
59954
|
...chartData,
|
|
59519
|
-
series:
|
|
59955
|
+
series: cleared2,
|
|
59520
59956
|
colorPalette: chart.chartPaletteColors(palette, count, scheme),
|
|
59521
59957
|
colorMethod: "cycle"
|
|
59522
59958
|
};
|
|
59523
59959
|
}
|
|
59524
|
-
const colors = chart.chartPaletteColors(palette,
|
|
59960
|
+
const colors = chart.chartPaletteColors(palette, cleared2.length, scheme);
|
|
59525
59961
|
const base2 = palette.meth === "withinLinear" ? [chart.chartPaletteColors(palette, 1, scheme)[0]] : palette.meth === "cycle" ? chart.chartPaletteColors(palette, Math.max(palette.base.length, colors.length), scheme) : colors;
|
|
59526
59962
|
return {
|
|
59527
59963
|
...chartData,
|
|
59528
|
-
series:
|
|
59964
|
+
series: cleared2.map((series, i) => ({ ...series, color: colors[i] })),
|
|
59529
59965
|
colorPalette: base2.length ? base2 : colors,
|
|
59530
59966
|
colorMethod: palette.meth === "withinLinear" ? "withinLinear" : "cycle"
|
|
59531
59967
|
};
|
|
@@ -60219,7 +60655,7 @@ var PICTURE_CORRECTIONS_GALLERY = adjustGalleryModule(
|
|
|
60219
60655
|
|
|
60220
60656
|
// src/pptx/render/ribbon-galleries/picture-style-tile-svg.ts
|
|
60221
60657
|
var PICTURE_STYLE_TILE = { width: 64, height: 52 };
|
|
60222
|
-
function
|
|
60658
|
+
function num8(value) {
|
|
60223
60659
|
return String(Math.round(value * 100) / 100);
|
|
60224
60660
|
}
|
|
60225
60661
|
function geometryPath(geom, x, y, w, h) {
|
|
@@ -60228,32 +60664,32 @@ function geometryPath(geom, x, y, w, h) {
|
|
|
60228
60664
|
switch (geom) {
|
|
60229
60665
|
case "ellipse":
|
|
60230
60666
|
return box(
|
|
60231
|
-
`M${
|
|
60232
|
-
A${
|
|
60667
|
+
`M${num8(x)} ${num8(y + h / 2)} A${num8(w / 2)} ${num8(h / 2)} 0 1 0 ${num8(x + w)} ${num8(y + h / 2)}
|
|
60668
|
+
A${num8(w / 2)} ${num8(h / 2)} 0 1 0 ${num8(x)} ${num8(y + h / 2)} Z`
|
|
60233
60669
|
);
|
|
60234
60670
|
case "roundRect": {
|
|
60235
60671
|
const c = r * 0.14;
|
|
60236
60672
|
return box(
|
|
60237
|
-
`M${
|
|
60238
|
-
V${
|
|
60239
|
-
Q${
|
|
60673
|
+
`M${num8(x + c)} ${num8(y)} H${num8(x + w - c)} Q${num8(x + w)} ${num8(y)} ${num8(x + w)} ${num8(y + c)}
|
|
60674
|
+
V${num8(y + h - c)} Q${num8(x + w)} ${num8(y + h)} ${num8(x + w - c)} ${num8(y + h)} H${num8(x + c)}
|
|
60675
|
+
Q${num8(x)} ${num8(y + h)} ${num8(x)} ${num8(y + h - c)} V${num8(y + c)} Q${num8(x)} ${num8(y)} ${num8(x + c)} ${num8(y)} Z`
|
|
60240
60676
|
);
|
|
60241
60677
|
}
|
|
60242
60678
|
case "round2DiagRect": {
|
|
60243
60679
|
const c = r * 0.17;
|
|
60244
60680
|
return box(
|
|
60245
|
-
`M${
|
|
60246
|
-
H${
|
|
60681
|
+
`M${num8(x + c)} ${num8(y)} H${num8(x + w)} V${num8(y + h - c)} Q${num8(x + w)} ${num8(y + h)} ${num8(x + w - c)} ${num8(y + h)}
|
|
60682
|
+
H${num8(x)} V${num8(y + c)} Q${num8(x)} ${num8(y)} ${num8(x + c)} ${num8(y)} Z`
|
|
60247
60683
|
);
|
|
60248
60684
|
}
|
|
60249
60685
|
case "snip2DiagRect": {
|
|
60250
60686
|
const c = r * 0.17;
|
|
60251
60687
|
return box(
|
|
60252
|
-
`M${
|
|
60688
|
+
`M${num8(x)} ${num8(y)} H${num8(x + w - c)} L${num8(x + w)} ${num8(y + c)} V${num8(y + h)} H${num8(x + c)} L${num8(x)} ${num8(y + h - c)} Z`
|
|
60253
60689
|
);
|
|
60254
60690
|
}
|
|
60255
60691
|
default:
|
|
60256
|
-
return `M${
|
|
60692
|
+
return `M${num8(x)} ${num8(y)} H${num8(x + w)} V${num8(y + h)} H${num8(x)} Z`;
|
|
60257
60693
|
}
|
|
60258
60694
|
}
|
|
60259
60695
|
function tiltTransform(spec5, cx, cy) {
|
|
@@ -60263,13 +60699,13 @@ function tiltTransform(spec5, cx, cy) {
|
|
|
60263
60699
|
}
|
|
60264
60700
|
const rev = scene.rot?.[2] ?? 0;
|
|
60265
60701
|
if (scene.camera === "orthographicFront") {
|
|
60266
|
-
return rev ? ` transform="rotate(${
|
|
60702
|
+
return rev ? ` transform="rotate(${num8(rev / 6e4)} ${num8(cx)} ${num8(cy)})"` : "";
|
|
60267
60703
|
}
|
|
60268
60704
|
const lon = scene.rot?.[1] ?? 0;
|
|
60269
60705
|
const skew = lon > 108e5 ? 8 : lon > 0 ? -8 : 0;
|
|
60270
60706
|
const lat = scene.rot?.[0] ?? 0;
|
|
60271
60707
|
const squash = lat > 108e5 ? 0.9 : 1;
|
|
60272
|
-
return ` transform="translate(${
|
|
60708
|
+
return ` transform="translate(${num8(cx)} ${num8(cy)}) skewY(${skew}) scale(1 ${squash}) translate(${num8(-cx)} ${num8(-cy)})"`;
|
|
60273
60709
|
}
|
|
60274
60710
|
function pictureStyleTileSvg(spec5) {
|
|
60275
60711
|
const id = svgId(`gps-${spec5.key}`);
|
|
@@ -60289,21 +60725,21 @@ function pictureStyleTileSvg(spec5) {
|
|
|
60289
60725
|
const opacity = alpha ? Number(alpha[1]) / 1e5 : 1;
|
|
60290
60726
|
const rad = (spec5.outer.dir ?? 0) / 6e4 * Math.PI / 180;
|
|
60291
60727
|
const dist2 = Math.min(3, (spec5.outer.dist ?? 0) / 38100);
|
|
60292
|
-
defs += `<filter id="${id}-f" x="-40%" y="-40%" width="180%" height="180%"><feDropShadow dx="${
|
|
60728
|
+
defs += `<filter id="${id}-f" x="-40%" y="-40%" width="180%" height="180%"><feDropShadow dx="${num8(Math.cos(rad) * dist2)}" dy="${num8(Math.sin(rad) * dist2)}" stdDeviation="${num8(Math.min(3, spec5.outer.blur / 63500))}" flood-color="#000000" flood-opacity="${num8(Math.min(0.8, opacity + 0.2))}"/></filter>`;
|
|
60293
60729
|
filter = ` filter="url(#${id}-f)"`;
|
|
60294
60730
|
} else if (spec5.softEdge !== void 0) {
|
|
60295
60731
|
defs += `<filter id="${id}-f" x="-20%" y="-20%" width="140%" height="140%"><feGaussianBlur stdDeviation="2"/></filter>`;
|
|
60296
60732
|
filter = ` filter="url(#${id}-f)"`;
|
|
60297
60733
|
}
|
|
60298
|
-
const photo = `<g clip-path="url(#${id}-c)"><rect x="${x}" y="${y}" width="${w}" height="${
|
|
60299
|
-
const frame = spec5.line ? `<path d="${outline}" fill="none" stroke="${safeColor(spec5.line.color, "#000000")}" stroke-width="${
|
|
60734
|
+
const photo = `<g clip-path="url(#${id}-c)"><rect x="${x}" y="${y}" width="${w}" height="${num8(h)}" fill="url(#${id}-s)"/><circle cx="${num8(x + w * 0.72)}" cy="${num8(y + h * 0.3)}" r="${num8(h * 0.13)}" fill="#ffd54a"/><path d="M${x} ${num8(y + h)} L${num8(x + w * 0.35)} ${num8(y + h * 0.5)} L${num8(x + w * 0.6)} ${num8(y + h * 0.75)} L${num8(x + w * 0.78)} ${num8(y + h * 0.55)} L${num8(x + w)} ${num8(y + h * 0.8)} V${num8(y + h)} Z" fill="#4c9a4a"/></g>`;
|
|
60735
|
+
const frame = spec5.line ? `<path d="${outline}" fill="none" stroke="${safeColor(spec5.line.color, "#000000")}" stroke-width="${num8(stroke)}"${spec5.line.cmpd ? ` stroke-opacity="0.9"` : ""}/>${spec5.line.cmpd ? `<path d="${geometryPath(spec5.geom, x + stroke, y + stroke, w - stroke * 2, h - stroke * 2)}" fill="none" stroke="${safeColor(spec5.line.color, "#000000")}" stroke-width="0.8"/>` : ""}` : "";
|
|
60300
60736
|
const bevel = spec5.sp3d ? `<path d="${outline}" fill="none" stroke="#ffffff" stroke-opacity="0.45" stroke-width="1" transform="translate(-0.5 -0.5)"/>` : "";
|
|
60301
60737
|
const body = `${photo}${frame}${bevel}`;
|
|
60302
60738
|
let out = `<g${tiltTransform(spec5, width / 2, y + h / 2)}><g${filter}>${body}</g>`;
|
|
60303
60739
|
if (reflect) {
|
|
60304
60740
|
const gy = y + h + 1;
|
|
60305
|
-
defs += `<linearGradient id="${id}-rg" x1="0" y1="0" x2="0" y2="1"><stop offset="0" stop-color="#fff" stop-opacity="${
|
|
60306
|
-
out += `<g mask="url(#${id}-m)"><g transform="translate(0 ${
|
|
60741
|
+
defs += `<linearGradient id="${id}-rg" x1="0" y1="0" x2="0" y2="1"><stop offset="0" stop-color="#fff" stop-opacity="${num8((spec5.reflection?.stA ?? 3e4) / 1e5 + 0.2)}"/><stop offset="0.6" stop-color="#fff" stop-opacity="0"/></linearGradient><mask id="${id}-m"><rect x="0" y="${num8(gy)}" width="${width}" height="${num8(h)}" fill="url(#${id}-rg)"/></mask>`;
|
|
60742
|
+
out += `<g mask="url(#${id}-m)"><g transform="translate(0 ${num8(gy * 2)}) scale(1 -1)">${body}</g></g>`;
|
|
60307
60743
|
}
|
|
60308
60744
|
out += "</g>";
|
|
60309
60745
|
return svgTile(width, height, defs, out);
|
|
@@ -61453,7 +61889,7 @@ function hasReflection(style) {
|
|
|
61453
61889
|
}
|
|
61454
61890
|
|
|
61455
61891
|
// src/pptx/render/ribbon-galleries/effect-tile-svg.ts
|
|
61456
|
-
function
|
|
61892
|
+
function num9(value) {
|
|
61457
61893
|
return String(Math.round(value * 100) / 100);
|
|
61458
61894
|
}
|
|
61459
61895
|
var BEVEL_PROFILES = {
|
|
@@ -61480,8 +61916,8 @@ function bevelTileSvg(id, preset2, color, size2) {
|
|
|
61480
61916
|
const [lit, dark] = profile.inverted ? ["#000000", "#ffffff"] : ["#ffffff", "#000000"];
|
|
61481
61917
|
const fill3 = safeColor(color, "#4472c4");
|
|
61482
61918
|
const defs = `<linearGradient id="${sid}-l" x1="0" y1="0" x2="1" y2="1"><stop offset="0" stop-color="${lit}" stop-opacity="0.65"/><stop offset="0.5" stop-color="${lit}" stop-opacity="0"/><stop offset="0.5" stop-color="${dark}" stop-opacity="0"/><stop offset="1" stop-color="${dark}" stop-opacity="0.45"/></linearGradient>`;
|
|
61483
|
-
const ring = (d) => `<rect x="${
|
|
61484
|
-
let body = `<rect x="${inset3}" y="${inset3}" width="${
|
|
61919
|
+
const ring = (d) => `<rect x="${num9(inset3 + d)}" y="${num9(inset3 + d)}" width="${num9(w - d * 2)}" height="${num9(h - d * 2)}" fill="none" stroke="url(#${sid}-l)" stroke-width="${num9(rim)}"/>`;
|
|
61920
|
+
let body = `<rect x="${inset3}" y="${inset3}" width="${num9(w)}" height="${num9(h)}" fill="${fill3}"/>`;
|
|
61485
61921
|
body += ring(rim / 2);
|
|
61486
61922
|
if (profile.double) {
|
|
61487
61923
|
body += ring(rim * 1.6);
|
|
@@ -61518,7 +61954,7 @@ function rotationTileSvg(preset2, color, size2) {
|
|
|
61518
61954
|
[1, -1],
|
|
61519
61955
|
[1, 1],
|
|
61520
61956
|
[-1, 1]
|
|
61521
|
-
].map(([x, y]) => `${
|
|
61957
|
+
].map(([x, y]) => `${num9(cx + (a * x + c * y) * half)},${num9(cy + (b * x + d * y) * half)}`);
|
|
61522
61958
|
const fill3 = safeColor(color, "#4472c4");
|
|
61523
61959
|
return svgTile(
|
|
61524
61960
|
size2.width,
|
|
@@ -63221,7 +63657,7 @@ function tableStyleTileOptions(tableData) {
|
|
|
63221
63657
|
bandedColumns: Boolean(tableData.bandedColumns)
|
|
63222
63658
|
};
|
|
63223
63659
|
}
|
|
63224
|
-
function
|
|
63660
|
+
function num10(value) {
|
|
63225
63661
|
return String(Math.round(value * 100) / 100);
|
|
63226
63662
|
}
|
|
63227
63663
|
function cellFill(css) {
|
|
@@ -63261,7 +63697,7 @@ function tableStyleTileSvg(styleId, colorScheme, size2, options = DEFAULT_OPTION
|
|
|
63261
63697
|
const stroke = tileBorderStroke(value);
|
|
63262
63698
|
if (stroke) {
|
|
63263
63699
|
lines.push(
|
|
63264
|
-
`<line x1="${
|
|
63700
|
+
`<line x1="${num10(x1)}" y1="${num10(y1)}" x2="${num10(x2)}" y2="${num10(y2)}" stroke="${stroke.color}" stroke-width="${num10(stroke.width)}"/>`
|
|
63265
63701
|
);
|
|
63266
63702
|
}
|
|
63267
63703
|
};
|
|
@@ -63273,13 +63709,13 @@ function tableStyleTileSvg(styleId, colorScheme, size2, options = DEFAULT_OPTION
|
|
|
63273
63709
|
const fill3 = cellFill(css);
|
|
63274
63710
|
if (fill3 !== "none") {
|
|
63275
63711
|
fills.push(
|
|
63276
|
-
`<rect x="${
|
|
63712
|
+
`<rect x="${num10(x)}" y="${num10(y)}" width="${num10(cw)}" height="${num10(rh)}" fill="${fill3}"/>`
|
|
63277
63713
|
);
|
|
63278
63714
|
}
|
|
63279
63715
|
const text4 = safeColor(typeof css.color === "string" ? css.color : void 0, "#000000");
|
|
63280
63716
|
const bold = css.fontWeight === 700;
|
|
63281
63717
|
fills.push(
|
|
63282
|
-
`<rect x="${
|
|
63718
|
+
`<rect x="${num10(x + cw * 0.25)}" y="${num10(y + rh * 0.42)}" width="${num10(cw * 0.5)}" height="${num10(Math.max(rh * 0.16, 0.8))}" fill="${text4}" opacity="${bold ? "0.9" : "0.55"}"/>`
|
|
63283
63719
|
);
|
|
63284
63720
|
edge(x, y, x + cw, y, css.borderTop);
|
|
63285
63721
|
edge(x, y + rh, x + cw, y + rh, css.borderBottom);
|
|
@@ -63693,7 +64129,7 @@ var THEME_COLORS_GALLERY = {
|
|
|
63693
64129
|
};
|
|
63694
64130
|
var TILE8 = { width: 52, height: 36 };
|
|
63695
64131
|
var LABEL_KEY = "pptx.gallery.themeBackgrounds.style";
|
|
63696
|
-
function
|
|
64132
|
+
function num11(value) {
|
|
63697
64133
|
return String(Math.round(value * 100) / 100);
|
|
63698
64134
|
}
|
|
63699
64135
|
function presetSlot(preset2) {
|
|
@@ -63714,7 +64150,7 @@ function backgroundPaint(id, style, fallback) {
|
|
|
63714
64150
|
const stops = style?.fillGradientStops ?? [];
|
|
63715
64151
|
if (style?.fillMode === "gradient" && stops.length > 1) {
|
|
63716
64152
|
const body = stops.map(
|
|
63717
|
-
(stop) => `<stop offset="${
|
|
64153
|
+
(stop) => `<stop offset="${num11(stop.position)}%" stop-color="${safeColor(stop.color, fallback)}"/>`
|
|
63718
64154
|
).join("");
|
|
63719
64155
|
if (style.fillGradientType === "radial") {
|
|
63720
64156
|
return {
|
|
@@ -63726,7 +64162,7 @@ function backgroundPaint(id, style, fallback) {
|
|
|
63726
64162
|
const x = Math.cos(rad) / 2;
|
|
63727
64163
|
const y = Math.sin(rad) / 2;
|
|
63728
64164
|
return {
|
|
63729
|
-
defs: `<linearGradient id="${id}" x1="${
|
|
64165
|
+
defs: `<linearGradient id="${id}" x1="${num11(0.5 - x)}" y1="${num11(0.5 - y)}" x2="${num11(0.5 + x)}" y2="${num11(0.5 + y)}">${body}</linearGradient>`,
|
|
63730
64166
|
fill: `url(#${id})`
|
|
63731
64167
|
};
|
|
63732
64168
|
}
|
|
@@ -63820,7 +64256,7 @@ var THEME_BACKGROUNDS_GALLERY = {
|
|
|
63820
64256
|
var TILE9 = { width: 76, height: 42 };
|
|
63821
64257
|
var SCHEME_LABEL_KEY2 = "pptx.gallery.themeEffects.scheme";
|
|
63822
64258
|
var CELLS = [0, 1, 2];
|
|
63823
|
-
function
|
|
64259
|
+
function num12(value) {
|
|
63824
64260
|
return String(Math.round(value * 100) / 100);
|
|
63825
64261
|
}
|
|
63826
64262
|
function styleXml(idx, accent) {
|
|
@@ -63845,7 +64281,7 @@ function sampleShape(id, style, x, size2) {
|
|
|
63845
64281
|
fillId
|
|
63846
64282
|
);
|
|
63847
64283
|
const strokeWidth = Math.min(Math.max(style.strokeWidth ?? 0, 0), 4);
|
|
63848
|
-
const stroke = strokeWidth > 0 && style.strokeColor && style.strokeColor !== "transparent" ? ` stroke="${safeColor(style.strokeColor, "#000000")}" stroke-width="${
|
|
64284
|
+
const stroke = strokeWidth > 0 && style.strokeColor && style.strokeColor !== "transparent" ? ` stroke="${safeColor(style.strokeColor, "#000000")}" stroke-width="${num12(Math.max(1, strokeWidth))}"` : "";
|
|
63849
64285
|
let defs = paint.defs;
|
|
63850
64286
|
let filter = "";
|
|
63851
64287
|
if (style.shadowColor) {
|
|
@@ -63853,11 +64289,11 @@ function sampleShape(id, style, x, size2) {
|
|
|
63853
64289
|
const dx = Math.max(-3, Math.min(3, style.shadowOffsetX ?? 0));
|
|
63854
64290
|
const dy = Math.max(-3, Math.min(3, style.shadowOffsetY ?? 2));
|
|
63855
64291
|
const blur = Math.min(style.shadowBlur ?? 3, 4) / 2;
|
|
63856
|
-
defs += `<filter id="${shadowId}" x="-30%" y="-30%" width="160%" height="170%"><feDropShadow dx="${
|
|
64292
|
+
defs += `<filter id="${shadowId}" x="-30%" y="-30%" width="160%" height="170%"><feDropShadow dx="${num12(dx)}" dy="${num12(dy)}" stdDeviation="${num12(blur)}" flood-color="${safeColor(style.shadowColor, "#000000")}" flood-opacity="${num12(style.shadowOpacity ?? 0.4)}"/></filter>`;
|
|
63857
64293
|
filter = ` filter="url(#${shadowId})"`;
|
|
63858
64294
|
}
|
|
63859
|
-
const fillOpacity = !gradient && style.fillOpacity !== void 0 && style.fillOpacity < 1 ? ` fill-opacity="${
|
|
63860
|
-
const rect3 = `<rect x="${
|
|
64295
|
+
const fillOpacity = !gradient && style.fillOpacity !== void 0 && style.fillOpacity < 1 ? ` fill-opacity="${num12(style.fillOpacity)}"` : "";
|
|
64296
|
+
const rect3 = `<rect x="${num12(x)}" y="${num12(TILE9.height / 2 - size2 / 2 - 2)}" width="${num12(size2)}" height="${num12(size2)}" rx="3" fill="${paint.fill}"${fillOpacity}${stroke}${filter}/>`;
|
|
63861
64297
|
return `${defs ? `<defs>${defs}</defs>` : ""}${rect3}`;
|
|
63862
64298
|
}
|
|
63863
64299
|
function effectSchemeTileSvg(schemeId, ctx, accent = "accent1") {
|
|
@@ -64279,7 +64715,7 @@ var THEME_FONTS_GALLERY = {
|
|
|
64279
64715
|
};
|
|
64280
64716
|
|
|
64281
64717
|
// src/pptx/render/ribbon-galleries/wordart-preview-svg.ts
|
|
64282
|
-
function
|
|
64718
|
+
function num13(value) {
|
|
64283
64719
|
return String(Math.round(value * 100) / 100);
|
|
64284
64720
|
}
|
|
64285
64721
|
function paintOf(style) {
|
|
@@ -64304,9 +64740,9 @@ function effectFilter(style, id) {
|
|
|
64304
64740
|
if (style.textGlowColor) {
|
|
64305
64741
|
const r = Math.min(3, (style.textGlowRadius ?? 4) / 2);
|
|
64306
64742
|
parts.push(
|
|
64307
|
-
`<feMorphology in="SourceAlpha" operator="dilate" radius="${
|
|
64308
|
-
`<feGaussianBlur in="gd" stdDeviation="${
|
|
64309
|
-
`<feFlood flood-color="${safeColor(style.textGlowColor, "#000000")}" flood-opacity="${
|
|
64743
|
+
`<feMorphology in="SourceAlpha" operator="dilate" radius="${num13(r / 2)}" result="gd"/>`,
|
|
64744
|
+
`<feGaussianBlur in="gd" stdDeviation="${num13(r / 2)}" result="gb"/>`,
|
|
64745
|
+
`<feFlood flood-color="${safeColor(style.textGlowColor, "#000000")}" flood-opacity="${num13(Math.min(0.8, (style.textGlowOpacity ?? 0.4) + 0.2))}"/>`,
|
|
64310
64746
|
'<feComposite in2="gb" operator="in" result="glow"/>'
|
|
64311
64747
|
);
|
|
64312
64748
|
merge.push('<feMergeNode in="glow"/>');
|
|
@@ -64314,7 +64750,7 @@ function effectFilter(style, id) {
|
|
|
64314
64750
|
if (style.textShadowColor) {
|
|
64315
64751
|
const clamp12 = (v) => Math.max(-2, Math.min(2, (v ?? 0) / 2));
|
|
64316
64752
|
parts.push(
|
|
64317
|
-
`<feDropShadow dx="${
|
|
64753
|
+
`<feDropShadow dx="${num13(clamp12(style.textShadowOffsetX))}" dy="${num13(clamp12(style.textShadowOffsetY))}" stdDeviation="${num13(Math.min(1.5, (style.textShadowBlur ?? 2) / 4))}" flood-color="${safeColor(style.textShadowColor, "#000000")}" flood-opacity="${num13(style.textShadowOpacity ?? 1)}" result="shadow"/>`
|
|
64318
64754
|
);
|
|
64319
64755
|
merge.push('<feMergeNode in="shadow"/>');
|
|
64320
64756
|
} else {
|
|
@@ -64332,13 +64768,13 @@ function wordArtTileSvg(rawId, style, size2) {
|
|
|
64332
64768
|
const id = svgId(rawId);
|
|
64333
64769
|
const paint = paintDefs(paintOf(style), `${id}-f`);
|
|
64334
64770
|
const filter = effectFilter(style, `${id}-x`);
|
|
64335
|
-
const stroke = style.textOutlineColor && (style.textOutlineWidth ?? 1) > 0 ? ` stroke="${safeColor(style.textOutlineColor, "#000000")}" stroke-width="${
|
|
64771
|
+
const stroke = style.textOutlineColor && (style.textOutlineWidth ?? 1) > 0 ? ` stroke="${safeColor(style.textOutlineColor, "#000000")}" stroke-width="${num13(Math.min(1.2, Math.max(0.4, (style.textOutlineWidth ?? 1) / 2)))}"` : "";
|
|
64336
64772
|
const fontSize = Math.round(size2.height * 0.46);
|
|
64337
64773
|
const baseline = style.textReflection ? size2.height * 0.56 : size2.height * 0.66;
|
|
64338
|
-
const text4 = (attrs) => `<text x="${
|
|
64774
|
+
const text4 = (attrs) => `<text x="${num13(size2.width / 2)}" y="${num13(baseline)}" text-anchor="middle" font-family="Calibri, Arial, sans-serif" font-size="${fontSize}"${style.bold ? ' font-weight="bold"' : ""} fill="${paint.fill}"${stroke}${attrs}>${style.textCaps === "all" ? "ABC" : "Abc"}</text>`;
|
|
64339
64775
|
let body = text4(filter.attr);
|
|
64340
64776
|
if (style.textReflection) {
|
|
64341
|
-
body += `<g opacity="${
|
|
64777
|
+
body += `<g opacity="${num13(Math.min(0.5, style.textReflectionStartOpacity ?? 0.4))}" transform="translate(0 ${num13(baseline * 2 + 2)}) scale(1 -1)">${text4("")}</g>`;
|
|
64342
64778
|
}
|
|
64343
64779
|
return svgTile(size2.width, size2.height, paint.defs + filter.defs, body);
|
|
64344
64780
|
}
|
|
@@ -65543,23 +65979,47 @@ function previewGalleryResult(result, base2, handler, target) {
|
|
|
65543
65979
|
return void 0;
|
|
65544
65980
|
}
|
|
65545
65981
|
}
|
|
65982
|
+
function commitsThroughDeckStyle(result) {
|
|
65983
|
+
switch (result.kind) {
|
|
65984
|
+
case "theme":
|
|
65985
|
+
case "themeColorScheme":
|
|
65986
|
+
case "themeFontScheme":
|
|
65987
|
+
case "themeEffects":
|
|
65988
|
+
case "backgroundStyle":
|
|
65989
|
+
case "sequence":
|
|
65990
|
+
return true;
|
|
65991
|
+
default:
|
|
65992
|
+
return false;
|
|
65993
|
+
}
|
|
65994
|
+
}
|
|
65546
65995
|
async function commitGalleryResult(result, base2, handler, target) {
|
|
65547
65996
|
if (!handler) {
|
|
65548
65997
|
return void 0;
|
|
65549
65998
|
}
|
|
65550
65999
|
switch (result.kind) {
|
|
65551
66000
|
case "theme": {
|
|
65552
|
-
await
|
|
66001
|
+
await queueThemeWrite(
|
|
66002
|
+
handler,
|
|
66003
|
+
() => handler.applyTheme(result.colorScheme, result.fontScheme, result.name)
|
|
66004
|
+
);
|
|
65553
66005
|
return previewGalleryResult(result, base2, handler, target);
|
|
65554
66006
|
}
|
|
65555
66007
|
case "themeColorScheme":
|
|
65556
|
-
await handler.updateThemeColorScheme(result.colorScheme);
|
|
66008
|
+
await queueThemeWrite(handler, () => handler.updateThemeColorScheme(result.colorScheme));
|
|
65557
66009
|
return previewGalleryResult(result, base2, handler, target);
|
|
65558
66010
|
case "themeFontScheme":
|
|
65559
|
-
await handler.updateThemeFontScheme(result.fontScheme);
|
|
66011
|
+
await queueThemeWrite(handler, () => handler.updateThemeFontScheme(result.fontScheme));
|
|
65560
66012
|
return previewGalleryResult(result, base2, handler, target);
|
|
65561
66013
|
case "themeEffects": {
|
|
65562
|
-
const scheme =
|
|
66014
|
+
const scheme = await queueThemeWrite(handler, async () => {
|
|
66015
|
+
if (result.schemeId) {
|
|
66016
|
+
return handler.applyThemeEffectScheme(result.schemeId);
|
|
66017
|
+
}
|
|
66018
|
+
if (result.fmtSchemeXml) {
|
|
66019
|
+
return handler.applyThemeFormatSchemeXml(result.fmtSchemeXml);
|
|
66020
|
+
}
|
|
66021
|
+
return void 0;
|
|
66022
|
+
});
|
|
65563
66023
|
if (!scheme) {
|
|
65564
66024
|
return void 0;
|
|
65565
66025
|
}
|
|
@@ -65703,6 +66163,111 @@ function createDeckStyleHost(options) {
|
|
|
65703
66163
|
}
|
|
65704
66164
|
};
|
|
65705
66165
|
}
|
|
66166
|
+
function layoutsOf(master) {
|
|
66167
|
+
return master.layoutPaths ?? master.layouts?.map((layout) => layout.path) ?? [];
|
|
66168
|
+
}
|
|
66169
|
+
function withPartTheme(theme, part) {
|
|
66170
|
+
const next = {
|
|
66171
|
+
...theme,
|
|
66172
|
+
colorScheme: part.colorScheme,
|
|
66173
|
+
fontScheme: part.fontScheme
|
|
66174
|
+
};
|
|
66175
|
+
for (const key of ["formatScheme", "name"]) {
|
|
66176
|
+
if (part[key]) {
|
|
66177
|
+
next[key] = part[key];
|
|
66178
|
+
} else {
|
|
66179
|
+
delete next[key];
|
|
66180
|
+
}
|
|
66181
|
+
}
|
|
66182
|
+
return next;
|
|
66183
|
+
}
|
|
66184
|
+
function reResolveElements(elements, from, to) {
|
|
66185
|
+
const colored = pptx.reResolveElementColors(
|
|
66186
|
+
elements,
|
|
66187
|
+
pptx.buildThemeColorMap(from.colorScheme),
|
|
66188
|
+
to.colorScheme
|
|
66189
|
+
);
|
|
66190
|
+
return pptx.reResolveElementFonts(colored, from.fontScheme, to.fontScheme);
|
|
66191
|
+
}
|
|
66192
|
+
function reResolveSlide(slide, from, to) {
|
|
66193
|
+
const [colored] = pptx.reResolveSlideColors(
|
|
66194
|
+
[slide],
|
|
66195
|
+
pptx.buildThemeColorMap(from.colorScheme),
|
|
66196
|
+
to.colorScheme
|
|
66197
|
+
);
|
|
66198
|
+
const [themed] = pptx.reResolveSlideFonts([colored ?? slide], from.fontScheme, to.fontScheme);
|
|
66199
|
+
return themed ?? slide;
|
|
66200
|
+
}
|
|
66201
|
+
function applyThemeByPath(handler, input) {
|
|
66202
|
+
const { themePath, slideMasters } = input;
|
|
66203
|
+
const candidates = input.applyToAllMasters ? slideMasters : slideMasters.slice(0, 1);
|
|
66204
|
+
const targets = candidates.filter((master) => master.themePath !== themePath);
|
|
66205
|
+
if (!handler || targets.length === 0) {
|
|
66206
|
+
return Promise.resolve(void 0);
|
|
66207
|
+
}
|
|
66208
|
+
return queueThemeWrite(handler, async () => {
|
|
66209
|
+
const next = await handler.getThemePartSchemes(themePath);
|
|
66210
|
+
if (!next) {
|
|
66211
|
+
return void 0;
|
|
66212
|
+
}
|
|
66213
|
+
const previous = /* @__PURE__ */ new Map();
|
|
66214
|
+
for (const master of targets) {
|
|
66215
|
+
previous.set(
|
|
66216
|
+
master.path,
|
|
66217
|
+
master.themePath ? await handler.getThemePartSchemes(master.themePath) : void 0
|
|
66218
|
+
);
|
|
66219
|
+
await handler.setSlideMasterTheme(master.path, themePath);
|
|
66220
|
+
}
|
|
66221
|
+
const masterOfLayout = /* @__PURE__ */ new Map();
|
|
66222
|
+
for (const master of slideMasters) {
|
|
66223
|
+
for (const layout of layoutsOf(master)) {
|
|
66224
|
+
masterOfLayout.set(layout, master.path);
|
|
66225
|
+
}
|
|
66226
|
+
}
|
|
66227
|
+
const fromOf = (slide) => {
|
|
66228
|
+
const layoutMaster = slide.layoutPath ? masterOfLayout.get(slide.layoutPath) : void 0;
|
|
66229
|
+
const masterPath = layoutMaster ?? slideMasters[0]?.path;
|
|
66230
|
+
return masterPath ? previous.get(masterPath) : void 0;
|
|
66231
|
+
};
|
|
66232
|
+
const templates = input.templateElementsBySlideId ?? {};
|
|
66233
|
+
const moved = [];
|
|
66234
|
+
const movedTemplates = {};
|
|
66235
|
+
const recoloured = input.slides.map((slide) => {
|
|
66236
|
+
const from = fromOf(slide);
|
|
66237
|
+
if (!from) {
|
|
66238
|
+
return slide;
|
|
66239
|
+
}
|
|
66240
|
+
const layer = templates[slide.id];
|
|
66241
|
+
if (layer) {
|
|
66242
|
+
movedTemplates[slide.id] = reResolveElements(layer, from, next);
|
|
66243
|
+
}
|
|
66244
|
+
const themed = reResolveSlide(slide, from, next);
|
|
66245
|
+
moved.push(themed);
|
|
66246
|
+
return themed;
|
|
66247
|
+
});
|
|
66248
|
+
const styled = handler.reResolveThemeStyleReferences(moved, movedTemplates);
|
|
66249
|
+
const styledById = new Map(styled.slides.map((slide) => [slide.id, slide]));
|
|
66250
|
+
const slides = recoloured.map((slide) => styledById.get(slide.id) ?? slide);
|
|
66251
|
+
const templateElementsBySlideId = {
|
|
66252
|
+
...templates,
|
|
66253
|
+
...styled.templateElementsBySlideId
|
|
66254
|
+
};
|
|
66255
|
+
const first = slideMasters[0];
|
|
66256
|
+
const change = {
|
|
66257
|
+
slides,
|
|
66258
|
+
templateElementsBySlideId,
|
|
66259
|
+
slideMasters: slideMasters.map(
|
|
66260
|
+
(master) => previous.has(master.path) ? { ...master, themePath } : master
|
|
66261
|
+
)
|
|
66262
|
+
};
|
|
66263
|
+
if (!first || !previous.has(first.path)) {
|
|
66264
|
+
return change;
|
|
66265
|
+
}
|
|
66266
|
+
const adopted = await handler.getThemePartSchemes(themePath) ?? next;
|
|
66267
|
+
const theme = withPartTheme(input.theme, adopted);
|
|
66268
|
+
return { ...change, deckTheme: { theme, themeColorMap: pptx.buildThemeColorMap(next.colorScheme) } };
|
|
66269
|
+
});
|
|
66270
|
+
}
|
|
65706
66271
|
var RIBBON_ADD_IN_TAB_ATTR = "data-ribbon-add-in-tab";
|
|
65707
66272
|
var RIBBON_RESERVED_TAB_IDS = [
|
|
65708
66273
|
...TOOLBAR_TABS.map((tab) => tab.id),
|
|
@@ -67508,8 +68073,8 @@ function fractionalAxis(client, offset, rect3, borderStart, borderEnd, cssSize,
|
|
|
67508
68073
|
}
|
|
67509
68074
|
const local = bordersKnown ? localBorderBox(cssSize, boxSizing, borders, paddingStart, paddingEnd) : void 0;
|
|
67510
68075
|
if (local) {
|
|
67511
|
-
const
|
|
67512
|
-
if (
|
|
68076
|
+
const plain2 = !zoomed && Number.isFinite(rect3) && rect3 >= local.low && rect3 <= local.high;
|
|
68077
|
+
if (plain2) {
|
|
67513
68078
|
const size2 = local.exact ? Math.min(rect3, local.floor + LAYOUT_UNIT) : local.floor;
|
|
67514
68079
|
return Math.max(0, size2 - borders);
|
|
67515
68080
|
}
|
|
@@ -68493,7 +69058,7 @@ var EDIT_POINTS_STYLE = {
|
|
|
68493
69058
|
handleSize: 7,
|
|
68494
69059
|
hitStrokeWidth: 10
|
|
68495
69060
|
};
|
|
68496
|
-
function
|
|
69061
|
+
function num14(value) {
|
|
68497
69062
|
return String(Math.round(value * 100) / 100);
|
|
68498
69063
|
}
|
|
68499
69064
|
function segmentD(frame, geometry, s, i) {
|
|
@@ -68502,17 +69067,17 @@ function segmentD(frame, geometry, s, i) {
|
|
|
68502
69067
|
const p0 = editLocalToSlide(frame, sub.nodes[i]);
|
|
68503
69068
|
const p3 = editLocalToSlide(frame, sub.nodes[segmentEndIndex(sub, i)]);
|
|
68504
69069
|
if (seg.kind === "line") {
|
|
68505
|
-
return `M ${
|
|
69070
|
+
return `M ${num14(p0.x)} ${num14(p0.y)} L ${num14(p3.x)} ${num14(p3.y)}`;
|
|
68506
69071
|
}
|
|
68507
69072
|
const c1 = editLocalToSlide(frame, seg.c1);
|
|
68508
69073
|
const c2 = editLocalToSlide(frame, seg.c2);
|
|
68509
|
-
return `M ${
|
|
69074
|
+
return `M ${num14(p0.x)} ${num14(p0.y)} C ${num14(c1.x)} ${num14(c1.y)} ${num14(c2.x)} ${num14(c2.y)} ${num14(p3.x)} ${num14(p3.y)}`;
|
|
68510
69075
|
}
|
|
68511
69076
|
function editGeometryToSlidePath(frame, geometry) {
|
|
68512
69077
|
const parts = [];
|
|
68513
69078
|
const at = (p) => {
|
|
68514
69079
|
const s = editLocalToSlide(frame, p);
|
|
68515
|
-
return `${
|
|
69080
|
+
return `${num14(s.x)} ${num14(s.y)}`;
|
|
68516
69081
|
};
|
|
68517
69082
|
for (const sub of geometry.subpaths) {
|
|
68518
69083
|
if (sub.nodes.length === 0) {
|
|
@@ -72924,6 +73489,14 @@ function sorterPasteInsertAt(indexes, active2, slideCount) {
|
|
|
72924
73489
|
return Math.min(slideCount, Math.max(0, (indexes.at(-1) ?? active2) + 1));
|
|
72925
73490
|
}
|
|
72926
73491
|
|
|
73492
|
+
// src/pptx/render/inserted-slide-layout.ts
|
|
73493
|
+
function insertedLayoutCompletion(current, placed) {
|
|
73494
|
+
if (current === placed) {
|
|
73495
|
+
return "replace";
|
|
73496
|
+
}
|
|
73497
|
+
return current?.id === placed.id ? "artwork" : "none";
|
|
73498
|
+
}
|
|
73499
|
+
|
|
72927
73500
|
// src/pptx/render/viewer-root-options.ts
|
|
72928
73501
|
var VIEWER_ROOT_OPTION_DEFAULTS = Object.freeze({
|
|
72929
73502
|
initialSlide: 0,
|
|
@@ -76416,13 +76989,13 @@ function chartSpaceFormatSource(space, options = {}) {
|
|
|
76416
76989
|
labelOptions: labels
|
|
76417
76990
|
};
|
|
76418
76991
|
}
|
|
76419
|
-
var chartFormatLocale = (value) => i18n.normalizeLocale(value,
|
|
76992
|
+
var chartFormatLocale = (value) => i18n.normalizeLocale(value, chunkGWKTHP6U_cjs.CHART_FORMAT_LOCALES, "en");
|
|
76420
76993
|
function chartFormatTranslator(locale, override) {
|
|
76421
|
-
const strings =
|
|
76994
|
+
const strings = chunkGWKTHP6U_cjs.CHART_FORMAT_STRINGS[chartFormatLocale(locale)];
|
|
76422
76995
|
return (key, params, fallback) => {
|
|
76423
76996
|
const own = override?.(key, params, fallback);
|
|
76424
76997
|
if (own && own !== key) return own;
|
|
76425
|
-
return strings[key] ??
|
|
76998
|
+
return strings[key] ?? chunkGWKTHP6U_cjs.CHART_FORMAT_STRINGS.en[key] ?? key;
|
|
76426
76999
|
};
|
|
76427
77000
|
}
|
|
76428
77001
|
|
|
@@ -81517,7 +82090,7 @@ function definePptxInsertSmartArtDialog(registry2) {
|
|
|
81517
82090
|
if (this.#live || this.#draw) {
|
|
81518
82091
|
return;
|
|
81519
82092
|
}
|
|
81520
|
-
this.#live = import('./smartart-insert-preview-
|
|
82093
|
+
this.#live = import('./smartart-insert-preview-AERZURUO.cjs').then((module) => {
|
|
81521
82094
|
if (this.#draw || !this.#picker) {
|
|
81522
82095
|
return;
|
|
81523
82096
|
}
|
|
@@ -87651,7 +88224,7 @@ function sanitizeSlideSvg(svg2, width, height) {
|
|
|
87651
88224
|
if (!isSafeSvgMarkup(svg2)) {
|
|
87652
88225
|
return "";
|
|
87653
88226
|
}
|
|
87654
|
-
const sanitized =
|
|
88227
|
+
const sanitized = chunkYMITEJST_cjs.sanitizeMarkupOrEmpty(svg2, { USE_PROFILES: { svg: true } }).trim();
|
|
87655
88228
|
if (!sanitized || sanitized.toLowerCase().startsWith("<svg")) {
|
|
87656
88229
|
return sanitized;
|
|
87657
88230
|
}
|
|
@@ -88164,6 +88737,119 @@ function openPrintWindow(htmlDocument) {
|
|
|
88164
88737
|
return true;
|
|
88165
88738
|
}
|
|
88166
88739
|
|
|
88740
|
+
// src/pptx/export/print-job.ts
|
|
88741
|
+
var PRINT_WHAT = ["slides", "handouts", "notes", "outline"];
|
|
88742
|
+
var SLIDE_RANGES = ["all", "current", "custom"];
|
|
88743
|
+
function printJobTitle(settings) {
|
|
88744
|
+
if (settings.printWhat === "notes") {
|
|
88745
|
+
return { key: "pptx.print.notesPages" };
|
|
88746
|
+
}
|
|
88747
|
+
if (settings.printWhat === "outline") {
|
|
88748
|
+
return { key: "pptx.print.outline" };
|
|
88749
|
+
}
|
|
88750
|
+
if (settings.printWhat === "handouts") {
|
|
88751
|
+
return { key: "pptx.print.handoutPerPageTitle", params: { count: settings.slidesPerPage } };
|
|
88752
|
+
}
|
|
88753
|
+
return { key: "pptx.sections.slides" };
|
|
88754
|
+
}
|
|
88755
|
+
function definedSettings(settings) {
|
|
88756
|
+
return Object.fromEntries(
|
|
88757
|
+
Object.entries(settings).filter(([, value]) => value !== void 0)
|
|
88758
|
+
);
|
|
88759
|
+
}
|
|
88760
|
+
function planPrintJob(settings, deck) {
|
|
88761
|
+
const slideCount = deck.slides.length;
|
|
88762
|
+
const validated = chunkYMITEJST_cjs.validatePrintSettings(definedSettings(settings), slideCount);
|
|
88763
|
+
if (!PRINT_WHAT.includes(validated.printWhat) || !SLIDE_RANGES.includes(validated.slideRange)) {
|
|
88764
|
+
return { ok: false, reason: "invalid-settings" };
|
|
88765
|
+
}
|
|
88766
|
+
const inDeck = chunkYMITEJST_cjs.computeSlideIndices(
|
|
88767
|
+
validated.slideRange,
|
|
88768
|
+
deck.activeSlideIndex,
|
|
88769
|
+
slideCount,
|
|
88770
|
+
validated.customRangeFrom,
|
|
88771
|
+
validated.customRangeTo
|
|
88772
|
+
).filter((index) => Number.isInteger(index) && index >= 0 && index < slideCount);
|
|
88773
|
+
const slideIndices = chunkYMITEJST_cjs.filterHiddenSlideIndices(
|
|
88774
|
+
inDeck,
|
|
88775
|
+
deck.slides,
|
|
88776
|
+
deck.includeHiddenSlides ?? false
|
|
88777
|
+
);
|
|
88778
|
+
if (slideIndices.length === 0) {
|
|
88779
|
+
return { ok: false, reason: "empty-selection" };
|
|
88780
|
+
}
|
|
88781
|
+
let output = "raster";
|
|
88782
|
+
if (validated.printWhat === "outline") {
|
|
88783
|
+
output = "outline";
|
|
88784
|
+
} else if (validated.printWhat === "slides") {
|
|
88785
|
+
output = "vector";
|
|
88786
|
+
}
|
|
88787
|
+
return {
|
|
88788
|
+
ok: true,
|
|
88789
|
+
settings: validated,
|
|
88790
|
+
printWhat: validated.printWhat,
|
|
88791
|
+
slideIndices,
|
|
88792
|
+
output,
|
|
88793
|
+
openWindowFirst: output === "raster",
|
|
88794
|
+
orientation: validated.orientation,
|
|
88795
|
+
title: printJobTitle(validated)
|
|
88796
|
+
};
|
|
88797
|
+
}
|
|
88798
|
+
function printJobRasterFallback(plan) {
|
|
88799
|
+
if (plan.output !== "vector") {
|
|
88800
|
+
return plan;
|
|
88801
|
+
}
|
|
88802
|
+
return { ...plan, output: "raster", openWindowFirst: true };
|
|
88803
|
+
}
|
|
88804
|
+
function frameSlideSvg(svg2, width, height) {
|
|
88805
|
+
const end = svg2.lastIndexOf("</svg>");
|
|
88806
|
+
if (end < 0) {
|
|
88807
|
+
return svg2;
|
|
88808
|
+
}
|
|
88809
|
+
const frameWidth = Math.max(0, sanitizePixelDimension(width) - 2);
|
|
88810
|
+
const frameHeight = Math.max(0, sanitizePixelDimension(height) - 2);
|
|
88811
|
+
const frame = `<rect x="1" y="1" width="${frameWidth}" height="${frameHeight}" fill="none" stroke="#000" stroke-width="2" />`;
|
|
88812
|
+
return `${svg2.slice(0, end)}${frame}${svg2.slice(end)}`;
|
|
88813
|
+
}
|
|
88814
|
+
function buildOutlinePrintJobDocument(plan, title, slides) {
|
|
88815
|
+
const outline = chunkYMITEJST_cjs.buildOutlineHtml([...plan.slideIndices], slides);
|
|
88816
|
+
return chunkYMITEJST_cjs.buildPrintHtmlDocument({
|
|
88817
|
+
title,
|
|
88818
|
+
bodyHtml: `<div class="outline-page">${outline}</div>`,
|
|
88819
|
+
orientation: plan.orientation,
|
|
88820
|
+
colorFilter: chunkYMITEJST_cjs.computeColorFilter(plan.settings.colorMode),
|
|
88821
|
+
frameSlides: plan.settings.frameSlides,
|
|
88822
|
+
scaleToFit: plan.settings.scaleToFit ?? true
|
|
88823
|
+
});
|
|
88824
|
+
}
|
|
88825
|
+
function buildVectorPrintJobDocument(plan, title, svgs, size2) {
|
|
88826
|
+
const pages = plan.settings.frameSlides ? svgs.map((svg2) => frameSlideSvg(svg2, size2.width, size2.height)) : [...svgs];
|
|
88827
|
+
return buildPrintDocument(pages, size2.width, size2.height, {
|
|
88828
|
+
title,
|
|
88829
|
+
orientation: plan.orientation,
|
|
88830
|
+
colorFilter: chunkYMITEJST_cjs.computeColorFilter(plan.settings.colorMode),
|
|
88831
|
+
scaleToFit: plan.settings.scaleToFit ?? true
|
|
88832
|
+
});
|
|
88833
|
+
}
|
|
88834
|
+
function buildRasterPrintJobDocument(plan, title, captures, slides, handoutMaster) {
|
|
88835
|
+
const images = captures.map((capture) => capture.dataUrl);
|
|
88836
|
+
const indices = captures.map((capture) => capture.slideIndex);
|
|
88837
|
+
let bodyHtml = chunkYMITEJST_cjs.buildSlidesHtml(images, indices);
|
|
88838
|
+
if (plan.printWhat === "notes") {
|
|
88839
|
+
bodyHtml = chunkYMITEJST_cjs.buildNotesHtml(images, indices, slides);
|
|
88840
|
+
} else if (plan.printWhat === "handouts") {
|
|
88841
|
+
bodyHtml = chunkYMITEJST_cjs.buildHandoutsHtml(images, indices, plan.settings.slidesPerPage, handoutMaster);
|
|
88842
|
+
}
|
|
88843
|
+
return chunkYMITEJST_cjs.buildPrintHtmlDocument({
|
|
88844
|
+
title,
|
|
88845
|
+
bodyHtml,
|
|
88846
|
+
orientation: plan.orientation,
|
|
88847
|
+
colorFilter: chunkYMITEJST_cjs.computeColorFilter(plan.settings.colorMode),
|
|
88848
|
+
frameSlides: plan.settings.frameSlides,
|
|
88849
|
+
scaleToFit: plan.settings.scaleToFit ?? true
|
|
88850
|
+
});
|
|
88851
|
+
}
|
|
88852
|
+
|
|
88167
88853
|
// src/pptx/export/png-crc32.ts
|
|
88168
88854
|
var table;
|
|
88169
88855
|
function getTable() {
|
|
@@ -89305,34 +89991,6 @@ Object.defineProperty(exports, "cloneXmlObject", {
|
|
|
89305
89991
|
enumerable: true,
|
|
89306
89992
|
get: function () { return clone.cloneXmlObject; }
|
|
89307
89993
|
});
|
|
89308
|
-
Object.defineProperty(exports, "formatCommentTimestamp", {
|
|
89309
|
-
enumerable: true,
|
|
89310
|
-
get: function () { return element.formatCommentTimestamp; }
|
|
89311
|
-
});
|
|
89312
|
-
Object.defineProperty(exports, "getCommentMarkerPosition", {
|
|
89313
|
-
enumerable: true,
|
|
89314
|
-
get: function () { return element.getCommentMarkerPosition; }
|
|
89315
|
-
});
|
|
89316
|
-
Object.defineProperty(exports, "getConnectionSitePosition", {
|
|
89317
|
-
enumerable: true,
|
|
89318
|
-
get: function () { return element.getConnectionSitePosition; }
|
|
89319
|
-
});
|
|
89320
|
-
Object.defineProperty(exports, "getElementLabel", {
|
|
89321
|
-
enumerable: true,
|
|
89322
|
-
get: function () { return element.getElementLabel; }
|
|
89323
|
-
});
|
|
89324
|
-
Object.defineProperty(exports, "isEditableTextElement", {
|
|
89325
|
-
enumerable: true,
|
|
89326
|
-
get: function () { return element.isEditableTextElement; }
|
|
89327
|
-
});
|
|
89328
|
-
Object.defineProperty(exports, "isTemplateElement", {
|
|
89329
|
-
enumerable: true,
|
|
89330
|
-
get: function () { return element.isTemplateElement; }
|
|
89331
|
-
});
|
|
89332
|
-
Object.defineProperty(exports, "isTemplateElementId", {
|
|
89333
|
-
enumerable: true,
|
|
89334
|
-
get: function () { return element.isTemplateElementId; }
|
|
89335
|
-
});
|
|
89336
89994
|
Object.defineProperty(exports, "CANVAS_SENTINEL", {
|
|
89337
89995
|
enumerable: true,
|
|
89338
89996
|
get: function () { return geometry.CANVAS_SENTINEL; }
|
|
@@ -90121,10 +90779,6 @@ Object.defineProperty(exports, "recoverySnapshotIntent", {
|
|
|
90121
90779
|
enumerable: true,
|
|
90122
90780
|
get: function () { return deckSaveEncryption.recoverySnapshotIntent; }
|
|
90123
90781
|
});
|
|
90124
|
-
Object.defineProperty(exports, "saveDeckWithPassword", {
|
|
90125
|
-
enumerable: true,
|
|
90126
|
-
get: function () { return deckSaveEncryption.saveDeckWithPassword; }
|
|
90127
|
-
});
|
|
90128
90782
|
Object.defineProperty(exports, "applyTableStyleDelete", {
|
|
90129
90783
|
enumerable: true,
|
|
90130
90784
|
get: function () { return tableStyleMapEdits.applyTableStyleDelete; }
|
|
@@ -90804,6 +91458,7 @@ exports.TEXT_BOX_SECTION = TEXT_BOX_SECTION;
|
|
|
90804
91458
|
exports.TEXT_BOX_SECTIONS = TEXT_BOX_SECTIONS;
|
|
90805
91459
|
exports.TEXT_BUILD_ID_SEP = TEXT_BUILD_ID_SEP;
|
|
90806
91460
|
exports.TEXT_DIRECTION_OPTIONS = TEXT_DIRECTION_OPTIONS;
|
|
91461
|
+
exports.TEXT_EFFECT_SECTIONS = TEXT_EFFECT_SECTIONS;
|
|
90807
91462
|
exports.TEXT_WARP_PRESETS = TEXT_WARP_PRESETS;
|
|
90808
91463
|
exports.TEXT_WRAP_OPTIONS = TEXT_WRAP_OPTIONS;
|
|
90809
91464
|
exports.THREE_VIEW_EVENTS = THREE_VIEW_EVENTS;
|
|
@@ -90949,6 +91604,7 @@ exports.applyStyleToSelectedSegments = applyStyleToSelectedSegments;
|
|
|
90949
91604
|
exports.applyTableCellFontWeight = applyTableCellFontWeight;
|
|
90950
91605
|
exports.applyTableStylePreset = applyTableStylePreset;
|
|
90951
91606
|
exports.applyTextStyleUpdate = applyTextStyleUpdate;
|
|
91607
|
+
exports.applyThemeByPath = applyThemeByPath;
|
|
90952
91608
|
exports.applyTransitionSoundFile = applyTransitionSoundFile;
|
|
90953
91609
|
exports.applyTransitionStockSound = applyTransitionStockSound;
|
|
90954
91610
|
exports.applyUnderlineVariant = applyUnderlineVariant;
|
|
@@ -91093,6 +91749,7 @@ exports.buildOleObjectNamePatch = buildOleObjectNamePatch;
|
|
|
91093
91749
|
exports.buildOpacityTavKeyframe = buildOpacityTavKeyframe;
|
|
91094
91750
|
exports.buildOptionsBaseline = buildOptionsBaseline;
|
|
91095
91751
|
exports.buildOutline = buildOutline;
|
|
91752
|
+
exports.buildOutlinePrintJobDocument = buildOutlinePrintJobDocument;
|
|
91096
91753
|
exports.buildParagraphs = buildParagraphs;
|
|
91097
91754
|
exports.buildPngChunk = buildPngChunk;
|
|
91098
91755
|
exports.buildPptxOptionCategories = buildPptxOptionCategories;
|
|
@@ -91106,6 +91763,7 @@ exports.buildPrintStyleSheet = buildPrintStyleSheet;
|
|
|
91106
91763
|
exports.buildQueryLinkUrl = buildQueryLinkUrl;
|
|
91107
91764
|
exports.buildQuickStylesGallery = buildQuickStylesGallery;
|
|
91108
91765
|
exports.buildRasterPictureElement = buildRasterPictureElement;
|
|
91766
|
+
exports.buildRasterPrintJobDocument = buildRasterPrintJobDocument;
|
|
91109
91767
|
exports.buildRecordRibbon = buildRecordRibbon;
|
|
91110
91768
|
exports.buildReviewRibbon = buildReviewRibbon;
|
|
91111
91769
|
exports.buildRibbonGallery = buildRibbonGallery;
|
|
@@ -91161,6 +91819,7 @@ exports.buildTimeline = buildTimeline;
|
|
|
91161
91819
|
exports.buildTitleBarState = buildTitleBarState;
|
|
91162
91820
|
exports.buildTokenMorphAnimations = buildTokenMorphAnimations;
|
|
91163
91821
|
exports.buildUserFontFaceStyles = buildUserFontFaceStyles;
|
|
91822
|
+
exports.buildVectorPrintJobDocument = buildVectorPrintJobDocument;
|
|
91164
91823
|
exports.buildWarpPath = buildWarpPath;
|
|
91165
91824
|
exports.buildWarpedGlyphOutlinePathD = buildWarpedGlyphOutlinePathD;
|
|
91166
91825
|
exports.buildWrapperStyle = buildWrapperStyle;
|
|
@@ -91296,6 +91955,7 @@ exports.commitElementUpdateBatch = commitElementUpdateBatch;
|
|
|
91296
91955
|
exports.commitGalleryResult = commitGalleryResult;
|
|
91297
91956
|
exports.commitSmartArtNodeFill = commitSmartArtNodeFill;
|
|
91298
91957
|
exports.commitSmartArtNodeText = commitSmartArtNodeText;
|
|
91958
|
+
exports.commitsThroughDeckStyle = commitsThroughDeckStyle;
|
|
91299
91959
|
exports.comparePresentation = comparePresentation;
|
|
91300
91960
|
exports.compareSlide = compareSlide;
|
|
91301
91961
|
exports.compareSlides = compareSlides;
|
|
@@ -91430,6 +92090,7 @@ exports.cropResetState = cropResetState;
|
|
|
91430
92090
|
exports.cropSessionChanged = cropSessionChanged;
|
|
91431
92091
|
exports.cropToAspectRatio = cropToAspectRatio;
|
|
91432
92092
|
exports.cropUpdateFromRects = cropUpdateFromRects;
|
|
92093
|
+
exports.crossedHistoryTheme = crossedHistoryTheme;
|
|
91433
92094
|
exports.cssCdata = cssCdata;
|
|
91434
92095
|
exports.cssEasingForAccelDecel = cssEasingForAccelDecel;
|
|
91435
92096
|
exports.cssEasingForTimingCurve = cssEasingForTimingCurve;
|
|
@@ -91621,6 +92282,7 @@ exports.fontWeightAttribute = fontWeightAttribute;
|
|
|
91621
92282
|
exports.fontWeightShorthand = fontWeightShorthand;
|
|
91622
92283
|
exports.foreignObjectSvgToDataUrl = foreignObjectSvgToDataUrl;
|
|
91623
92284
|
exports.forgetSessionDeck = forgetSessionDeck;
|
|
92285
|
+
exports.forgetStepsUsingRemovedParts = forgetStepsUsingRemovedParts;
|
|
91624
92286
|
exports.formatAdvanceAfterText = formatAdvanceAfterText;
|
|
91625
92287
|
exports.formatBackstageDate = formatBackstageDate;
|
|
91626
92288
|
exports.formatBackstageSize = formatBackstageSize;
|
|
@@ -91637,6 +92299,7 @@ exports.formatSnapshotSize = formatSnapshotSize;
|
|
|
91637
92299
|
exports.formatTime = formatTime;
|
|
91638
92300
|
exports.formatVersionTimestamp = formatVersionTimestamp;
|
|
91639
92301
|
exports.fractionalClientSize = fractionalClientSize;
|
|
92302
|
+
exports.frameSlideSvg = frameSlideSvg;
|
|
91640
92303
|
exports.freeformCloseTolerance = freeformCloseTolerance;
|
|
91641
92304
|
exports.galleryDeckView = galleryDeckView;
|
|
91642
92305
|
exports.galleryHasItems = galleryHasItems;
|
|
@@ -91835,6 +92498,7 @@ exports.groupElementParagraphs = groupElementParagraphs;
|
|
|
91835
92498
|
exports.groupIntoParagraphs = groupIntoParagraphs;
|
|
91836
92499
|
exports.groupIssuesBySeverity = groupIssuesBySeverity;
|
|
91837
92500
|
exports.groupParagraphsByBuildLevel = groupParagraphsByBuildLevel;
|
|
92501
|
+
exports.groupShortcutReference = groupShortcutReference;
|
|
91838
92502
|
exports.groupTilesByRow = groupTilesByRow;
|
|
91839
92503
|
exports.handleEditorAnchorClick = handleEditorAnchorClick;
|
|
91840
92504
|
exports.handlePresentationStageClick = handlePresentationStageClick;
|
|
@@ -91864,6 +92528,8 @@ exports.hexToRgb = hexToRgb;
|
|
|
91864
92528
|
exports.hiddenSlideCue = hiddenSlideCue;
|
|
91865
92529
|
exports.hiddenSlideLabelId = hiddenSlideLabelId;
|
|
91866
92530
|
exports.hideChartSeries = hideChartSeries;
|
|
92531
|
+
exports.historyStepUsesParts = historyStepUsesParts;
|
|
92532
|
+
exports.historyTheme = historyTheme;
|
|
91867
92533
|
exports.hollowTextFillStyle = hollowTextFillStyle;
|
|
91868
92534
|
exports.homeColourState = homeColourState;
|
|
91869
92535
|
exports.homeControlKey = homeControlKey;
|
|
@@ -91902,6 +92568,7 @@ exports.insertControlStatus = insertControlStatus;
|
|
|
91902
92568
|
exports.insertEntryEnabled = insertEntryEnabled;
|
|
91903
92569
|
exports.insertHyperlinkAtSelection = insertHyperlinkAtSelection;
|
|
91904
92570
|
exports.insertLabel = insertLabel;
|
|
92571
|
+
exports.insertedLayoutCompletion = insertedLayoutCompletion;
|
|
91905
92572
|
exports.inspectorFieldPatch = inspectorFieldPatch;
|
|
91906
92573
|
exports.inspectorNumber = inspectorNumber;
|
|
91907
92574
|
exports.inspectorTogglePatch = inspectorTogglePatch;
|
|
@@ -92022,6 +92689,7 @@ exports.listenForOutlineViewDismiss = listenForOutlineViewDismiss;
|
|
|
92022
92689
|
exports.loadAudienceContent = loadAudienceContent;
|
|
92023
92690
|
exports.loadPresentationDeck = loadPresentationDeck;
|
|
92024
92691
|
exports.loadSessionDeck = loadSessionDeck;
|
|
92692
|
+
exports.loadedThemeName = loadedThemeName;
|
|
92025
92693
|
exports.lockResizeAspect = lockResizeAspect;
|
|
92026
92694
|
exports.makeCloneId = makeCloneId;
|
|
92027
92695
|
exports.mapAwarenessCursors = mapAwarenessCursors;
|
|
@@ -92138,6 +92806,7 @@ exports.nextShowSlideIndex = nextShowSlideIndex;
|
|
|
92138
92806
|
exports.normalizeAccelDecel = normalizeAccelDecel;
|
|
92139
92807
|
exports.normalizeArrow = normalizeArrow;
|
|
92140
92808
|
exports.normalizeFontFormat = normalizeFontFormat;
|
|
92809
|
+
exports.normalizeGoogleFontsBaseUrl = normalizeGoogleFontsBaseUrl;
|
|
92141
92810
|
exports.normalizeNotesLinkUrl = normalizeNotesLinkUrl;
|
|
92142
92811
|
exports.normalizeOutlinePair = normalizeOutlinePair;
|
|
92143
92812
|
exports.normalizeRegion = normalizeRegion;
|
|
@@ -92236,6 +92905,7 @@ exports.placeTileOnPage = placeTileOnPage;
|
|
|
92236
92905
|
exports.placeholderPromptDescriptor = placeholderPromptDescriptor;
|
|
92237
92906
|
exports.planGifFrames = planGifFrames;
|
|
92238
92907
|
exports.planMergeShapes = planMergeShapes;
|
|
92908
|
+
exports.planPrintJob = planPrintJob;
|
|
92239
92909
|
exports.playAnimationRibbonPreview = playAnimationRibbonPreview;
|
|
92240
92910
|
exports.playFeedbackSound = playFeedbackSound;
|
|
92241
92911
|
exports.playGroup = playGroup;
|
|
@@ -92275,6 +92945,7 @@ exports.presenterTimerProgress = presenterTimerProgress;
|
|
|
92275
92945
|
exports.previewGalleryResult = previewGalleryResult;
|
|
92276
92946
|
exports.previousShowSlideIndex = previousShowSlideIndex;
|
|
92277
92947
|
exports.primaryMasterViewPart = primaryMasterViewPart;
|
|
92948
|
+
exports.printJobRasterFallback = printJobRasterFallback;
|
|
92278
92949
|
exports.probeAutosaveRecovery = probeAutosaveRecovery;
|
|
92279
92950
|
exports.probeMaxCanvasDimension = probeMaxCanvasDimension;
|
|
92280
92951
|
exports.probeNativeImageSize = probeNativeImageSize;
|
|
@@ -92289,6 +92960,7 @@ exports.pushRecentColor = pushRecentColor;
|
|
|
92289
92960
|
exports.pushRecentShape = pushRecentShape;
|
|
92290
92961
|
exports.px = px2;
|
|
92291
92962
|
exports.quadToCubicControls = quadToCubicControls;
|
|
92963
|
+
exports.queueThemeWrite = queueThemeWrite;
|
|
92292
92964
|
exports.quickStyleShapeStyle = quickStyleShapeStyle;
|
|
92293
92965
|
exports.quickStyleSwatchCss = quickStyleSwatchCss;
|
|
92294
92966
|
exports.quickStyleSwatchStyleAttr = quickStyleSwatchStyleAttr;
|
|
@@ -92360,6 +93032,7 @@ exports.removeEmptyNode = removeEmptyNode;
|
|
|
92360
93032
|
exports.removeGradientStopPatch = removeGradientStopPatch;
|
|
92361
93033
|
exports.removeGuide = removeGuide;
|
|
92362
93034
|
exports.removeQuickAccessCommand = removeQuickAccessCommand;
|
|
93035
|
+
exports.removedSlideMasterParts = removedSlideMasterParts;
|
|
92363
93036
|
exports.renderSparklineSvg = renderSparklineSvg;
|
|
92364
93037
|
exports.renderedImageCorrections = renderedImageCorrections;
|
|
92365
93038
|
exports.reorder = reorder;
|
|
@@ -92439,6 +93112,7 @@ exports.resolveFontRefIdx = resolveFontRefIdx;
|
|
|
92439
93112
|
exports.resolveFontVariant = resolveFontVariant;
|
|
92440
93113
|
exports.resolveFontWeight = resolveFontWeight;
|
|
92441
93114
|
exports.resolveForwardSlideWithZoomReturn = resolveForwardSlideWithZoomReturn;
|
|
93115
|
+
exports.resolveGoogleFontsCss2Base = resolveGoogleFontsCss2Base;
|
|
92442
93116
|
exports.resolveGoogleFontsFace = resolveGoogleFontsFace;
|
|
92443
93117
|
exports.resolveGoogleWebfontHref = resolveGoogleWebfontHref;
|
|
92444
93118
|
exports.resolveGroupChildFill = resolveGroupChildFill;
|
|
@@ -92544,6 +93218,7 @@ exports.resolveVisibleRibbonTabs = resolveVisibleRibbonTabs;
|
|
|
92544
93218
|
exports.resolveWheelSpokeCount = resolveWheelSpokeCount;
|
|
92545
93219
|
exports.resolveZoomExcursionEndIndex = resolveZoomExcursionEndIndex;
|
|
92546
93220
|
exports.resolveZoomNavigationTarget = resolveZoomNavigationTarget;
|
|
93221
|
+
exports.restoreCrossedTheme = restoreCrossedTheme;
|
|
92547
93222
|
exports.restoreEditorKeyboardFocus = restoreEditorKeyboardFocus;
|
|
92548
93223
|
exports.restoreFilteredSeries = restoreFilteredSeries;
|
|
92549
93224
|
exports.restoreInlineListBodySelection = restoreInlineListBodySelection;
|
|
@@ -92603,6 +93278,7 @@ exports.sanitizePresence = sanitizePresence;
|
|
|
92603
93278
|
exports.sanitizeSlideIndex = sanitizeSlideIndex;
|
|
92604
93279
|
exports.sanitizeUserName = sanitizeUserName;
|
|
92605
93280
|
exports.saveAutosaveSnapshot = saveAutosaveSnapshot;
|
|
93281
|
+
exports.saveDeckWithPassword = saveDeckWithPassword;
|
|
92606
93282
|
exports.saveElementAsPicture = saveElementAsPicture;
|
|
92607
93283
|
exports.saveFailureMessage = saveFailureMessage;
|
|
92608
93284
|
exports.saveViewerProfile = saveViewerProfile;
|
|
@@ -92652,6 +93328,7 @@ exports.setPendingCaretPoint = setPendingCaretPoint;
|
|
|
92652
93328
|
exports.setPendingSelectionRestore = setPendingSelectionRestore;
|
|
92653
93329
|
exports.setSelectionBullets = setSelectionBullets;
|
|
92654
93330
|
exports.setTriggerBookmark = setTriggerBookmark;
|
|
93331
|
+
exports.settleThemeWrites = settleThemeWrites;
|
|
92655
93332
|
exports.shapeFillChange = shapeFillChange;
|
|
92656
93333
|
exports.shapeGalleryItem = shapeGalleryItem;
|
|
92657
93334
|
exports.shapeGalleryItemForValue = shapeGalleryItemForValue;
|
|
@@ -92803,6 +93480,7 @@ exports.textWrapOf = textWrapOf;
|
|
|
92803
93480
|
exports.textWrapPatch = textWrapPatch;
|
|
92804
93481
|
exports.themeColorGridCommit = themeColorGridCommit;
|
|
92805
93482
|
exports.themeColorGridView = themeColorGridView;
|
|
93483
|
+
exports.themePartWrites = themePartWrites;
|
|
92806
93484
|
exports.themeShapeStyleXml = themeShapeStyleXml;
|
|
92807
93485
|
exports.threeViewStateOf = threeViewStateOf;
|
|
92808
93486
|
exports.tileRectToSourceRect = tileRectToSourceRect;
|
|
@@ -92874,6 +93552,8 @@ exports.withChartUserShapeRowRotationUpdated = withChartUserShapeRowRotationUpda
|
|
|
92874
93552
|
exports.withChartUserShapeRowTextUpdated = withChartUserShapeRowTextUpdated;
|
|
92875
93553
|
exports.withChartUserShapeRowUpdated = withChartUserShapeRowUpdated;
|
|
92876
93554
|
exports.withConnectorEndpointUpdate = withConnectorEndpointUpdate;
|
|
93555
|
+
exports.withHistoryMasterThemes = withHistoryMasterThemes;
|
|
93556
|
+
exports.withHistoryTheme = withHistoryTheme;
|
|
92877
93557
|
exports.withHomeGalleries = withHomeGalleries;
|
|
92878
93558
|
exports.withInlineListDecorationDefaults = withInlineListDecorationDefaults;
|
|
92879
93559
|
exports.withNodeAtPath = withNodeAtPath;
|
|
@@ -92885,6 +93565,7 @@ exports.wrapNotesText = wrapNotesText;
|
|
|
92885
93565
|
exports.writeBackReport = writeBackReport;
|
|
92886
93566
|
exports.writeElementParagraphs = writeElementParagraphs;
|
|
92887
93567
|
exports.writeStoredViewerPrefs = writeStoredViewerPrefs;
|
|
93568
|
+
exports.writeThemeParts = writeThemeParts;
|
|
92888
93569
|
exports.zeroDelayCssAnimation = zeroDelayCssAnimation;
|
|
92889
93570
|
exports.zoomInPercent = zoomInPercent;
|
|
92890
93571
|
exports.zoomInScale = zoomInScale;
|