ooxml-ui 1.26.1 → 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.
Files changed (101) hide show
  1. package/dist/building-block-styles.d.ts +1 -0
  2. package/dist/chart/data-sheet-keys.d.ts +0 -1
  3. package/dist/chart/format-pane-3d.d.ts +1 -0
  4. package/dist/chart/format-pane-locales/fr.d.ts +1 -0
  5. package/dist/chart/format-pane-locales/index.d.ts +1 -0
  6. package/dist/chart/format-pane-text.d.ts +0 -1
  7. package/dist/chart/format-pane-translate.d.ts +1 -0
  8. package/dist/chrome/backstage.d.ts +2 -1
  9. package/dist/chrome/find-bar.d.ts +2 -1
  10. package/dist/{chunk-WH3EGA3S.js → chunk-2EFIFIPB.js} +2 -2
  11. package/dist/{chunk-P4FRKIPE.js → chunk-W2JD75LX.js} +1 -0
  12. package/dist/dialog/chart-picker.d.ts +2 -1
  13. package/dist/dialog/options-categories.d.ts +1 -0
  14. package/dist/docx/print-picture.d.ts +1 -0
  15. package/dist/docx.js +3 -2
  16. package/dist/index.js +3 -3
  17. package/dist/menu/command-search.d.ts +2 -1
  18. package/dist/menu/menu-separator.d.ts +2 -1
  19. package/dist/notices/toasts.d.ts +2 -1
  20. package/dist/pptx/{chunk-3ZI57W7O.mjs → chunk-3LOVEO7U.mjs} +5 -0
  21. package/dist/pptx/{chunk-NHRL2D4I.mjs → chunk-6QLGEV3I.mjs} +1432 -456
  22. package/dist/pptx/{chunk-BC23E73O.cjs → chunk-A3JJOLTS.cjs} +43 -43
  23. package/dist/pptx/{chunk-OOQMIQT3.cjs → chunk-GWKTHP6U.cjs} +0 -23
  24. package/dist/pptx/{chunk-BGABXFCV.cjs → chunk-I6ZVSJAR.cjs} +1462 -489
  25. package/dist/pptx/{chunk-CZUEATSN.mjs → chunk-LAF5W2UR.mjs} +1 -1
  26. package/dist/pptx/{chunk-LB3A3GF6.mjs → chunk-MJACF7Y2.mjs} +0 -23
  27. package/dist/pptx/{chunk-X4FNVH7J.cjs → chunk-YMITEJST.cjs} +32 -0
  28. package/dist/pptx/dom/index.cjs +389 -389
  29. package/dist/pptx/dom/index.mjs +8 -8
  30. package/dist/pptx/export/index.d.ts +1 -0
  31. package/dist/pptx/export/index.d.ts.map +1 -1
  32. package/dist/pptx/export/print-document.cjs +17 -17
  33. package/dist/pptx/export/print-document.d.ts +7 -5
  34. package/dist/pptx/export/print-document.d.ts.map +1 -1
  35. package/dist/pptx/export/print-document.mjs +1 -1
  36. package/dist/pptx/export/print-job.d.ts +134 -0
  37. package/dist/pptx/export/print-job.d.ts.map +1 -0
  38. package/dist/pptx/i18n/index.cjs +6 -6
  39. package/dist/pptx/i18n/index.mjs +1 -1
  40. package/dist/pptx/i18n/translations-en.d.ts.map +1 -1
  41. package/dist/pptx/index.cjs +3143 -3031
  42. package/dist/pptx/index.mjs +3 -3
  43. package/dist/pptx/render/controller/history-controller.d.ts +6 -0
  44. package/dist/pptx/render/controller/history-controller.d.ts.map +1 -1
  45. package/dist/pptx/render/deck-save-encryption.d.ts +10 -1
  46. package/dist/pptx/render/deck-save-encryption.d.ts.map +1 -1
  47. package/dist/pptx/render/deck-style.d.ts +12 -1
  48. package/dist/pptx/render/deck-style.d.ts.map +1 -1
  49. package/dist/pptx/render/google-webfonts.d.ts +32 -1
  50. package/dist/pptx/render/google-webfonts.d.ts.map +1 -1
  51. package/dist/pptx/render/index.d.ts +4 -0
  52. package/dist/pptx/render/index.d.ts.map +1 -1
  53. package/dist/pptx/render/inserted-slide-layout.d.ts +28 -0
  54. package/dist/pptx/render/inserted-slide-layout.d.ts.map +1 -0
  55. package/dist/pptx/render/inspector/index.d.ts +2 -0
  56. package/dist/pptx/render/inspector/index.d.ts.map +1 -1
  57. package/dist/pptx/render/inspector/text-effect-fields.d.ts +29 -0
  58. package/dist/pptx/render/inspector/text-effect-fields.d.ts.map +1 -0
  59. package/dist/pptx/render/master-view-crud-history.d.ts +45 -0
  60. package/dist/pptx/render/master-view-crud-history.d.ts.map +1 -0
  61. package/dist/pptx/render/master-view-crud.d.ts +11 -0
  62. package/dist/pptx/render/master-view-crud.d.ts.map +1 -1
  63. package/dist/pptx/render/morph-animation.d.ts +11 -2
  64. package/dist/pptx/render/morph-animation.d.ts.map +1 -1
  65. package/dist/pptx/render/morph-geometry-keyframes.d.ts.map +1 -1
  66. package/dist/pptx/render/morph-matching.d.ts +1 -0
  67. package/dist/pptx/render/morph-matching.d.ts.map +1 -1
  68. package/dist/pptx/render/morph-stacked-copies.d.ts +20 -0
  69. package/dist/pptx/render/morph-stacked-copies.d.ts.map +1 -0
  70. package/dist/pptx/render/morph-text-flow.d.ts +48 -0
  71. package/dist/pptx/render/morph-text-flow.d.ts.map +1 -0
  72. package/dist/pptx/render/shape-geometry-cascade.d.ts.map +1 -1
  73. package/dist/pptx/render/stroke-clip-edge.d.ts +27 -0
  74. package/dist/pptx/render/stroke-clip-edge.d.ts.map +1 -0
  75. package/dist/pptx/render/stroke-clip-outset.d.ts +11 -1
  76. package/dist/pptx/render/stroke-clip-outset.d.ts.map +1 -1
  77. package/dist/pptx/render/stroke-outline.d.ts +13 -0
  78. package/dist/pptx/render/stroke-outline.d.ts.map +1 -1
  79. package/dist/pptx/render/stroke-style.d.ts +10 -1
  80. package/dist/pptx/render/stroke-style.d.ts.map +1 -1
  81. package/dist/pptx/render/theme-by-path.d.ts +61 -0
  82. package/dist/pptx/render/theme-by-path.d.ts.map +1 -0
  83. package/dist/pptx/render/theme-history.d.ts +146 -0
  84. package/dist/pptx/render/theme-history.d.ts.map +1 -0
  85. package/dist/pptx/render/theme-write-queue.d.ts +21 -0
  86. package/dist/pptx/render/theme-write-queue.d.ts.map +1 -0
  87. package/dist/pptx/render/viewer-preferences.d.ts +11 -0
  88. package/dist/pptx/render/viewer-preferences.d.ts.map +1 -1
  89. package/dist/pptx/render/viewer-props-manifest.d.ts.map +1 -1
  90. package/dist/pptx/{smartart-insert-preview-TYCMBIUH.cjs → smartart-insert-preview-AERZURUO.cjs} +5 -5
  91. package/dist/pptx/{smartart-insert-preview-TJEN4WYF.mjs → smartart-insert-preview-CGAZP5JP.mjs} +4 -4
  92. package/dist/ribbon/keytip-run.d.ts +1 -0
  93. package/dist/ribbon/ribbon-stack.d.ts +2 -1
  94. package/dist/smartart.js +1 -1
  95. package/dist/teams.js +1 -1
  96. package/dist/theme-bridge.d.ts +0 -1
  97. package/dist/theme.d.ts +1 -0
  98. package/dist/xlsx/grid/styles.d.ts +1 -1
  99. package/dist/xlsx.js +5 -5
  100. package/package.json +2 -2
  101. /package/dist/{chunk-HGLCXNCT.js → chunk-WBE2Q5DC.js} +0 -0
@@ -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 chunkX4FNVH7J_cjs = require('./chunk-X4FNVH7J.cjs');
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 chunkOOQMIQT3_cjs = require('./chunk-OOQMIQT3.cjs');
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');
@@ -1253,6 +1252,315 @@ function buildCustomPathMarkers(element, stroke) {
1253
1252
  const end = add2("End");
1254
1253
  return { markup: markup.join(""), start, end };
1255
1254
  }
1255
+
1256
+ // src/pptx/render/stroke-clip-outset.ts
1257
+ var SVG_DEFAULT_JOIN = { join: "miter", miterLimit: 4 };
1258
+ var ROUND_JOIN_STEPS = 16;
1259
+ var CURVE_STEPS = 16;
1260
+ function flattenArc(from, rx, ry, rotationDeg, largeArc, sweep, to) {
1261
+ if (rx === 0 || ry === 0 || from[0] === to[0] && from[1] === to[1]) {
1262
+ return [to];
1263
+ }
1264
+ const phi = rotationDeg * Math.PI / 180;
1265
+ const cosPhi = Math.cos(phi);
1266
+ const sinPhi = Math.sin(phi);
1267
+ const dx = (from[0] - to[0]) / 2;
1268
+ const dy = (from[1] - to[1]) / 2;
1269
+ const x1 = cosPhi * dx + sinPhi * dy;
1270
+ const y1 = -sinPhi * dx + cosPhi * dy;
1271
+ let radiusX = Math.abs(rx);
1272
+ let radiusY = Math.abs(ry);
1273
+ const lambda = x1 * x1 / (radiusX * radiusX) + y1 * y1 / (radiusY * radiusY);
1274
+ if (lambda > 1) {
1275
+ const scale2 = Math.sqrt(lambda);
1276
+ radiusX *= scale2;
1277
+ radiusY *= scale2;
1278
+ }
1279
+ const numerator = radiusX * radiusX * radiusY * radiusY - radiusX * radiusX * y1 * y1 - radiusY * radiusY * x1 * x1;
1280
+ const denominator = radiusX * radiusX * y1 * y1 + radiusY * radiusY * x1 * x1;
1281
+ const coefficient = (largeArc === sweep ? -1 : 1) * Math.sqrt(Math.max(0, numerator / denominator));
1282
+ const cxp = coefficient * radiusX * y1 / radiusY;
1283
+ const cyp = -coefficient * radiusY * x1 / radiusX;
1284
+ const cx = cosPhi * cxp - sinPhi * cyp + (from[0] + to[0]) / 2;
1285
+ const cy = sinPhi * cxp + cosPhi * cyp + (from[1] + to[1]) / 2;
1286
+ const angle = (ux, uy, vx, vy) => {
1287
+ const sign = ux * vy - uy * vx < 0 ? -1 : 1;
1288
+ const dot = (ux * vx + uy * vy) / (Math.hypot(ux, uy) * Math.hypot(vx, vy));
1289
+ return sign * Math.acos(Math.max(-1, Math.min(1, dot)));
1290
+ };
1291
+ const theta1 = angle(1, 0, (x1 - cxp) / radiusX, (y1 - cyp) / radiusY);
1292
+ let delta = angle(
1293
+ (x1 - cxp) / radiusX,
1294
+ (y1 - cyp) / radiusY,
1295
+ (-x1 - cxp) / radiusX,
1296
+ (-y1 - cyp) / radiusY
1297
+ );
1298
+ if (!sweep && delta > 0) {
1299
+ delta -= 2 * Math.PI;
1300
+ } else if (sweep && delta < 0) {
1301
+ delta += 2 * Math.PI;
1302
+ }
1303
+ const out = [];
1304
+ for (let step2 = 1; step2 <= CURVE_STEPS; step2++) {
1305
+ const t2 = theta1 + delta * step2 / CURVE_STEPS;
1306
+ const px3 = radiusX * Math.cos(t2);
1307
+ const py = radiusY * Math.sin(t2);
1308
+ out.push([cosPhi * px3 - sinPhi * py + cx, sinPhi * px3 + cosPhi * py + cy]);
1309
+ }
1310
+ return out;
1311
+ }
1312
+ function flattenPath(d) {
1313
+ const tokens = d.match(/[A-Za-z]|-?\d*\.?\d+(?:e[-+]?\d+)?/giu);
1314
+ if (!tokens) {
1315
+ return void 0;
1316
+ }
1317
+ const subpaths = [];
1318
+ let current = [];
1319
+ let pos = [0, 0];
1320
+ let start = [0, 0];
1321
+ let i = 0;
1322
+ let command2 = "";
1323
+ const num15 = () => Number.parseFloat(tokens[i++] ?? "NaN");
1324
+ while (i < tokens.length) {
1325
+ const token = tokens[i];
1326
+ if (/^[A-Za-z]$/u.test(token)) {
1327
+ command2 = token;
1328
+ i++;
1329
+ if (command2 === "Z" || command2 === "z") {
1330
+ if (current.length > 1) {
1331
+ subpaths.push(current);
1332
+ }
1333
+ current = [];
1334
+ pos = start;
1335
+ continue;
1336
+ }
1337
+ } else if (command2 === "M") {
1338
+ command2 = "L";
1339
+ }
1340
+ switch (command2) {
1341
+ case "M":
1342
+ if (current.length > 1) {
1343
+ subpaths.push(current);
1344
+ }
1345
+ pos = [num15(), num15()];
1346
+ start = pos;
1347
+ current = [pos];
1348
+ break;
1349
+ case "L":
1350
+ pos = [num15(), num15()];
1351
+ current.push(pos);
1352
+ break;
1353
+ case "H":
1354
+ pos = [num15(), pos[1]];
1355
+ current.push(pos);
1356
+ break;
1357
+ case "V":
1358
+ pos = [pos[0], num15()];
1359
+ current.push(pos);
1360
+ break;
1361
+ case "C": {
1362
+ const p1 = [num15(), num15()];
1363
+ const p2 = [num15(), num15()];
1364
+ const p3 = [num15(), num15()];
1365
+ for (let step2 = 1; step2 <= CURVE_STEPS; step2++) {
1366
+ const t2 = step2 / CURVE_STEPS;
1367
+ const u = 1 - t2;
1368
+ current.push([
1369
+ u * u * u * pos[0] + 3 * u * u * t2 * p1[0] + 3 * u * t2 * t2 * p2[0] + t2 * t2 * t2 * p3[0],
1370
+ u * u * u * pos[1] + 3 * u * u * t2 * p1[1] + 3 * u * t2 * t2 * p2[1] + t2 * t2 * t2 * p3[1]
1371
+ ]);
1372
+ }
1373
+ pos = p3;
1374
+ break;
1375
+ }
1376
+ case "Q": {
1377
+ const p1 = [num15(), num15()];
1378
+ const p2 = [num15(), num15()];
1379
+ for (let step2 = 1; step2 <= CURVE_STEPS; step2++) {
1380
+ const t2 = step2 / CURVE_STEPS;
1381
+ const u = 1 - t2;
1382
+ current.push([
1383
+ u * u * pos[0] + 2 * u * t2 * p1[0] + t2 * t2 * p2[0],
1384
+ u * u * pos[1] + 2 * u * t2 * p1[1] + t2 * t2 * p2[1]
1385
+ ]);
1386
+ }
1387
+ pos = p2;
1388
+ break;
1389
+ }
1390
+ case "A": {
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()];
1397
+ current.push(...flattenArc(pos, rx, ry, rotation, largeArc, sweep, to));
1398
+ pos = to;
1399
+ break;
1400
+ }
1401
+ default:
1402
+ return void 0;
1403
+ }
1404
+ }
1405
+ if (current.length > 1) {
1406
+ subpaths.push(current);
1407
+ }
1408
+ return subpaths.every((sub) => sub.every(([x, y]) => Number.isFinite(x) && Number.isFinite(y))) ? subpaths : void 0;
1409
+ }
1410
+ var fmt = (n) => String(Math.round(n * 1e3) / 1e3);
1411
+ function outsetClipPathForStroke(clipPath, strokeWidth, width, height, join = SVG_DEFAULT_JOIN) {
1412
+ if (!(strokeWidth > 0)) {
1413
+ return clipPath;
1414
+ }
1415
+ const d = outlinePathData(clipPath, width, height);
1416
+ const subpaths = d ? flattenPath(d) : void 0;
1417
+ if (!d || !subpaths || subpaths.length === 0) {
1418
+ return clipPath;
1419
+ }
1420
+ const half = strokeWidth / 2;
1421
+ const signedArea4 = (pts) => {
1422
+ let area = 0;
1423
+ for (let k = 0; k < pts.length; k++) {
1424
+ const a = pts[k];
1425
+ const b = pts[(k + 1) % pts.length];
1426
+ area += a[0] * b[1] - b[0] * a[1];
1427
+ }
1428
+ return area;
1429
+ };
1430
+ const reference = Math.sign(signedArea4(subpaths[0])) || 1;
1431
+ const quads = [];
1432
+ const push = (poly3) => {
1433
+ const wound = Math.sign(signedArea4(poly3)) === reference ? poly3 : [...poly3].reverse();
1434
+ quads.push(`M ${wound.map(([x, y]) => `${fmt(x)} ${fmt(y)}`).join(" L ")} Z`);
1435
+ };
1436
+ for (const sub of subpaths) {
1437
+ const pts = sub;
1438
+ let last = [0, 0];
1439
+ const normals = pts.map((a, k) => {
1440
+ const b = pts[(k + 1) % pts.length];
1441
+ const len = Math.hypot(b[0] - a[0], b[1] - a[1]);
1442
+ if (len >= 1e-6) {
1443
+ last = [-(b[1] - a[1]) / len, (b[0] - a[0]) / len];
1444
+ }
1445
+ return last;
1446
+ });
1447
+ for (let k = 0; k < pts.length; k++) {
1448
+ const a = pts[k];
1449
+ const b = pts[(k + 1) % pts.length];
1450
+ const [nx, ny] = normals[k];
1451
+ push([
1452
+ [a[0] + nx * half, a[1] + ny * half],
1453
+ [b[0] + nx * half, b[1] + ny * half],
1454
+ [b[0] - nx * half, b[1] - ny * half],
1455
+ [a[0] - nx * half, a[1] - ny * half]
1456
+ ]);
1457
+ push(joinPiece(b, normals[k], normals[(k + 1) % pts.length]));
1458
+ }
1459
+ }
1460
+ function joinPiece(v, n1, n2) {
1461
+ if (join.join === "round") {
1462
+ const r = half / Math.cos(Math.PI / ROUND_JOIN_STEPS);
1463
+ return Array.from({ length: ROUND_JOIN_STEPS }, (_, i) => {
1464
+ const t2 = 2 * Math.PI * i / ROUND_JOIN_STEPS;
1465
+ return [v[0] + r * Math.cos(t2), v[1] + r * Math.sin(t2)];
1466
+ });
1467
+ }
1468
+ const turn = n1[0] * n2[1] - n1[1] * n2[0];
1469
+ if (Math.abs(turn) < 1e-9) {
1470
+ return [v, v, v, v];
1471
+ }
1472
+ const side = turn > 0 ? -1 : 1;
1473
+ const p1 = [v[0] + side * n1[0] * half, v[1] + side * n1[1] * half];
1474
+ const p2 = [v[0] + side * n2[0] * half, v[1] + side * n2[1] * half];
1475
+ const cosHalf = Math.sqrt(Math.max(0, (1 + n1[0] * n2[0] + n1[1] * n2[1]) / 2));
1476
+ if (join.join === "miter" && cosHalf > 0 && 1 / cosHalf <= join.miterLimit) {
1477
+ const bx = n1[0] + n2[0];
1478
+ const by = n1[1] + n2[1];
1479
+ const blen = Math.hypot(bx, by);
1480
+ const reach = half / cosHalf / blen;
1481
+ return [v, p1, [v[0] + side * bx * reach, v[1] + side * by * reach], p2];
1482
+ }
1483
+ return [v, p1, p2, p2];
1484
+ }
1485
+ return `path('${d} ${quads.join(" ")}')`;
1486
+ }
1487
+
1488
+ // src/pptx/render/stroke-clip-edge.ts
1489
+ var ROUND_JOIN_STEPS2 = 8;
1490
+ var fmt2 = (n) => String(Math.round(n * 1e3) / 1e3);
1491
+ function signedArea(pts) {
1492
+ let area = 0;
1493
+ for (let k = 0; k < pts.length; k++) {
1494
+ const a = pts[k];
1495
+ const b = pts[(k + 1) % pts.length];
1496
+ area += a[0] * b[1] - b[0] * a[1];
1497
+ }
1498
+ return area;
1499
+ }
1500
+ function offsetRing(pts, half, join, away) {
1501
+ let last = [0, 0];
1502
+ const normals = pts.map((a, k) => {
1503
+ const b = pts[(k + 1) % pts.length];
1504
+ const len = Math.hypot(b[0] - a[0], b[1] - a[1]);
1505
+ if (len >= 1e-6) {
1506
+ last = [away * -(b[1] - a[1]) / len, away * (b[0] - a[0]) / len];
1507
+ }
1508
+ return last;
1509
+ });
1510
+ const ring = [];
1511
+ for (let k = 0; k < pts.length; k++) {
1512
+ const v = pts[k];
1513
+ const n1 = normals[(k - 1 + pts.length) % pts.length];
1514
+ const n2 = normals[k];
1515
+ const p1 = [v[0] + n1[0] * half, v[1] + n1[1] * half];
1516
+ const p2 = [v[0] + n2[0] * half, v[1] + n2[1] * half];
1517
+ const cosHalf = Math.sqrt(Math.max(0, (1 + n1[0] * n2[0] + n1[1] * n2[1]) / 2));
1518
+ const bx = n1[0] + n2[0];
1519
+ const by = n1[1] + n2[1];
1520
+ const blen = Math.hypot(bx, by);
1521
+ const miter = cosHalf > 1e-6 && blen > 1e-9 ? [v[0] + bx / blen * (half / cosHalf), v[1] + by / blen * (half / cosHalf)] : void 0;
1522
+ const turn = n1[0] * n2[1] - n1[1] * n2[0];
1523
+ const opensOutward = away * turn < 0;
1524
+ if (!opensOutward || Math.abs(turn) < 1e-9) {
1525
+ ring.push(miter ?? p2);
1526
+ } else if (join.join === "miter" && miter && 1 / cosHalf <= join.miterLimit) {
1527
+ ring.push(miter);
1528
+ } else if (join.join === "round") {
1529
+ const a1 = Math.atan2(n1[1], n1[0]);
1530
+ let sweep = Math.atan2(n2[1], n2[0]) - a1;
1531
+ while (sweep > Math.PI) sweep -= 2 * Math.PI;
1532
+ while (sweep < -Math.PI) sweep += 2 * Math.PI;
1533
+ for (let i = 0; i <= ROUND_JOIN_STEPS2; i++) {
1534
+ const t2 = a1 + sweep * i / ROUND_JOIN_STEPS2;
1535
+ ring.push([v[0] + Math.cos(t2) * half, v[1] + Math.sin(t2) * half]);
1536
+ }
1537
+ } else {
1538
+ ring.push(p1, p2);
1539
+ }
1540
+ }
1541
+ return ring;
1542
+ }
1543
+ function outerStrokeEdgePath(d, strokeWidth, join) {
1544
+ if (!(strokeWidth > 0)) {
1545
+ return void 0;
1546
+ }
1547
+ const subpaths = flattenPath(d);
1548
+ if (!subpaths || subpaths.length === 0) {
1549
+ return void 0;
1550
+ }
1551
+ const reference = Math.sign(signedArea(subpaths[0])) || 1;
1552
+ return subpaths.filter((sub) => sub.length > 2).map((sub) => {
1553
+ const sign = Math.sign(signedArea(sub)) || reference;
1554
+ const away = sign > 0 ? -1 : 1;
1555
+ const ring = offsetRing(
1556
+ sub,
1557
+ strokeWidth / 2,
1558
+ join,
1559
+ sign === reference ? away : away === 1 ? -1 : 1
1560
+ );
1561
+ return `M ${ring.map(([x, y]) => `${fmt2(x)} ${fmt2(y)}`).join(" L ")} Z`;
1562
+ }).join(" ");
1563
+ }
1256
1564
  function getStrokeOnlyPresetPaths(element) {
1257
1565
  if (element.type !== "shape" || !pptx.hasShapeProperties(element)) {
1258
1566
  return void 0;
@@ -1287,6 +1595,79 @@ function strokeOnlyPresetPathData(element) {
1287
1595
  const stroked = paths.filter((path) => path.stroke !== false).map((path) => path.d);
1288
1596
  return stroked.length > 0 ? stroked.join(" ") : void 0;
1289
1597
  }
1598
+ var NO_STROKE = {
1599
+ borderWidth: 0,
1600
+ cssBorderWidth: "0px",
1601
+ borderStyle: void 0,
1602
+ borderColor: void 0,
1603
+ border: void 0,
1604
+ strokeLinejoin: void 0,
1605
+ strokeLinecap: void 0,
1606
+ strokeMiterlimit: void 0
1607
+ };
1608
+ function svgLineJoin(join) {
1609
+ switch (join) {
1610
+ case "round":
1611
+ return "round";
1612
+ case "bevel":
1613
+ return "bevel";
1614
+ case "miter":
1615
+ return "miter";
1616
+ default:
1617
+ return void 0;
1618
+ }
1619
+ }
1620
+ function svgStrokeLineCap(cap) {
1621
+ switch (cap) {
1622
+ case "rnd":
1623
+ return "round";
1624
+ case "sq":
1625
+ return "square";
1626
+ case "flat":
1627
+ return "butt";
1628
+ default:
1629
+ return void 0;
1630
+ }
1631
+ }
1632
+ function strokeMiterLimit(style) {
1633
+ if (style?.lineJoin !== "miter" || typeof style.miterLimit !== "number") {
1634
+ return void 0;
1635
+ }
1636
+ if (!Number.isFinite(style.miterLimit)) {
1637
+ return void 0;
1638
+ }
1639
+ return Math.max(style.miterLimit / 1e5, 1);
1640
+ }
1641
+ function getComputedStrokeStyle(element) {
1642
+ if (!pptx.hasShapeProperties(element)) {
1643
+ return NO_STROKE;
1644
+ }
1645
+ const style = element.shapeStyle;
1646
+ const width = suppressesCssBorder(element) ? 0 : paintedStrokeWidth(style);
1647
+ const joins = {
1648
+ strokeLinejoin: svgLineJoin(style?.lineJoin),
1649
+ strokeLinecap: svgStrokeLineCap(style?.lineCap),
1650
+ strokeMiterlimit: strokeMiterLimit(style)
1651
+ };
1652
+ if (width <= 0 || !style) {
1653
+ return { ...NO_STROKE, ...joins };
1654
+ }
1655
+ const borderWidth = width;
1656
+ const borderStyle = chunk6KLPQQYP_cjs.getCssBorderDashStyle(
1657
+ chunk6KLPQQYP_cjs.normalizeStrokeDashType(style.strokeDash),
1658
+ style.compoundLine
1659
+ );
1660
+ const rawColor = style.strokeColor ?? chunk6KLPQQYP_cjs.DEFAULT_STROKE_COLOR;
1661
+ const borderColor = style.strokeOpacity === void 0 ? rawColor : chunk6KLPQQYP_cjs.colorWithOpacity(chunk6KLPQQYP_cjs.normalizeHexColor(rawColor, chunk6KLPQQYP_cjs.DEFAULT_STROKE_COLOR), style.strokeOpacity);
1662
+ return {
1663
+ borderWidth,
1664
+ cssBorderWidth: chunkFM4C4MBJ_cjs.screenStrokeWidth(borderWidth),
1665
+ borderStyle,
1666
+ borderColor,
1667
+ border: chunkFM4C4MBJ_cjs.screenBorder(borderWidth, borderStyle ?? "solid", borderColor),
1668
+ ...joins
1669
+ };
1670
+ }
1290
1671
 
1291
1672
  // src/pptx/render/svg-gradient-rect-path.ts
1292
1673
  function buildRectPathGradientDef(stops, id, focalPoint, fillToRect) {
@@ -1521,6 +1902,33 @@ function needsCenteredStrokeOverlay(element, style, declaredWidth) {
1521
1902
  }
1522
1903
  return style.lineAlignment !== "in";
1523
1904
  }
1905
+ function clipEdgeBleed(element, d, style) {
1906
+ if ((style?.strokeOpacity ?? 1) < 1 || element.type === "picture" || element.type === "image" || isArrowedCustomPath(element)) {
1907
+ return void 0;
1908
+ }
1909
+ const width = straddlingStrokeWidth(element);
1910
+ const shapeType = pptx.getShapeType(element.shapeType);
1911
+ if (width <= 0 || shapeType === "roundRect" || shapeType === "ellipse" || isIdentityRectClip(element) || getResolvedShapeClipPath(element) === void 0) {
1912
+ return void 0;
1913
+ }
1914
+ const edge = outerStrokeEdgePath(d, width, outlineStrokeJoin(element));
1915
+ return edge ? {
1916
+ d: edge,
1917
+ strokeWidth: 1,
1918
+ cssStrokeWidth: `max(1px, calc(2 * var(${chunkFM4C4MBJ_cjs.DEVICE_PX_VAR}, 0px)))`,
1919
+ offset: 0
1920
+ } : void 0;
1921
+ }
1922
+ function insetLineOnClippedShape(element, style, declaredWidth) {
1923
+ if (!style || style.lineAlignment !== "in" || declaredWidth <= 0 || element.type === "connector" || element.type === "picture" || element.type === "image" || !hasStrokePaint(style)) {
1924
+ return false;
1925
+ }
1926
+ const shapeType = pptx.getShapeType(element.shapeType);
1927
+ if (shapeType === "line" || shapeType === "roundRect" || shapeType === "ellipse") {
1928
+ return false;
1929
+ }
1930
+ return !isIdentityRectClip(element) && getResolvedShapeClipPath(element) !== void 0;
1931
+ }
1524
1932
  function straddlingStrokeWidth(element) {
1525
1933
  if (!pptx.hasShapeProperties(element)) {
1526
1934
  return 0;
@@ -1533,6 +1941,11 @@ function straddlingStrokeWidth(element) {
1533
1941
  const dash = chunk6KLPQQYP_cjs.normalizeStrokeDashType(style?.strokeDash);
1534
1942
  return !dash || dash === "solid" ? width : 0;
1535
1943
  }
1944
+ function outlineStrokeJoin(element) {
1945
+ const style = pptx.hasShapeProperties(element) ? element.shapeStyle : void 0;
1946
+ const join = style?.lineJoin === "bevel" ? "bevel" : style?.lineJoin === "miter" ? "miter" : "round";
1947
+ return { join, miterLimit: strokeMiterLimit(style) ?? 4 };
1948
+ }
1536
1949
  function buildStrokeOutline(element) {
1537
1950
  if (!pptx.hasShapeProperties(element)) {
1538
1951
  return void 0;
@@ -1544,30 +1957,34 @@ function buildStrokeOutline(element) {
1544
1957
  return void 0;
1545
1958
  }
1546
1959
  const paint = style && declaredWidth > 0 ? buildSvgStrokeGradientDef(style, element.id) ?? buildSvgStrokePatternDef(style, element.id) : void 0;
1960
+ const insetOnClip = !openPresetD && insetLineOnClippedShape(element, style, declaredWidth);
1547
1961
  const centeredFlatStroke = !paint && !openPresetD && (isArrowedCustomPath(element) || needsCenteredStrokeOverlay(element, style, declaredWidth));
1548
- if (!paint && !openPresetD && !centeredFlatStroke) {
1962
+ if (!paint && !openPresetD && !centeredFlatStroke && !insetOnClip) {
1549
1963
  return void 0;
1550
1964
  }
1551
1965
  const d = openPresetD ?? outlinePathData(getResolvedShapeClipPath(element), element.width, element.height);
1552
1966
  if (!d) {
1553
1967
  return void 0;
1554
1968
  }
1555
- const strokeWidth = declaredWidth > 0 ? declaredWidth : DEFAULT_OPEN_PRESET_STROKE_WIDTH;
1969
+ const lineWidth = declaredWidth > 0 ? declaredWidth : DEFAULT_OPEN_PRESET_STROKE_WIDTH;
1970
+ const strokeWidth = insetOnClip ? lineWidth * 2 : lineWidth;
1556
1971
  const stroke = paint ? svgGradientFillRef(paint) : chunk6KLPQQYP_cjs.colorWithOpacity(style?.strokeColor ?? chunk6KLPQQYP_cjs.DEFAULT_STROKE_COLOR, style?.strokeOpacity);
1972
+ const strands = outlineStrands(style?.compoundLine, strokeWidth);
1973
+ const bleed = !openPresetD ? clipEdgeBleed(element, d, style) : void 0;
1557
1974
  return {
1558
1975
  markers: buildCustomPathMarkers(element, stroke),
1559
1976
  d,
1560
1977
  paint,
1561
1978
  stroke,
1562
1979
  strokeWidth,
1563
- strands: outlineStrands(style?.compoundLine, strokeWidth),
1980
+ strands: bleed ? [...strands, bleed] : strands,
1564
1981
  dashArray: chunk6KLPQQYP_cjs.getSvgStrokeDasharray(
1565
1982
  chunk6KLPQQYP_cjs.normalizeStrokeDashType(style?.strokeDash),
1566
- Math.max(strokeWidth, 1),
1983
+ Math.max(lineWidth, 1),
1567
1984
  style?.customDashSegments
1568
1985
  ),
1569
1986
  lineCap: svgLineCap(style?.lineCap),
1570
- lineJoin: style?.lineJoin === "bevel" ? "bevel" : style?.lineJoin === "miter" ? "miter" : "round"
1987
+ lineJoin: outlineStrokeJoin(element).join
1571
1988
  };
1572
1989
  }
1573
1990
  function strokeOutlineViewBox(element) {
@@ -1654,208 +2071,6 @@ function mapEditingWheel(input, buffer, canScrollFurther) {
1654
2071
  function mapPresentationWheel(input, buffer) {
1655
2072
  return accumulate(buffer, normalizeWheelDelta(input));
1656
2073
  }
1657
-
1658
- // src/pptx/render/stroke-clip-outset.ts
1659
- var CURVE_STEPS = 16;
1660
- function flattenArc(from, rx, ry, rotationDeg, largeArc, sweep, to) {
1661
- if (rx === 0 || ry === 0 || from[0] === to[0] && from[1] === to[1]) {
1662
- return [to];
1663
- }
1664
- const phi = rotationDeg * Math.PI / 180;
1665
- const cosPhi = Math.cos(phi);
1666
- const sinPhi = Math.sin(phi);
1667
- const dx = (from[0] - to[0]) / 2;
1668
- const dy = (from[1] - to[1]) / 2;
1669
- const x1 = cosPhi * dx + sinPhi * dy;
1670
- const y1 = -sinPhi * dx + cosPhi * dy;
1671
- let radiusX = Math.abs(rx);
1672
- let radiusY = Math.abs(ry);
1673
- const lambda = x1 * x1 / (radiusX * radiusX) + y1 * y1 / (radiusY * radiusY);
1674
- if (lambda > 1) {
1675
- const scale2 = Math.sqrt(lambda);
1676
- radiusX *= scale2;
1677
- radiusY *= scale2;
1678
- }
1679
- const numerator = radiusX * radiusX * radiusY * radiusY - radiusX * radiusX * y1 * y1 - radiusY * radiusY * x1 * x1;
1680
- const denominator = radiusX * radiusX * y1 * y1 + radiusY * radiusY * x1 * x1;
1681
- const coefficient = (largeArc === sweep ? -1 : 1) * Math.sqrt(Math.max(0, numerator / denominator));
1682
- const cxp = coefficient * radiusX * y1 / radiusY;
1683
- const cyp = -coefficient * radiusY * x1 / radiusX;
1684
- const cx = cosPhi * cxp - sinPhi * cyp + (from[0] + to[0]) / 2;
1685
- const cy = sinPhi * cxp + cosPhi * cyp + (from[1] + to[1]) / 2;
1686
- const angle = (ux, uy, vx, vy) => {
1687
- const sign = ux * vy - uy * vx < 0 ? -1 : 1;
1688
- const dot = (ux * vx + uy * vy) / (Math.hypot(ux, uy) * Math.hypot(vx, vy));
1689
- return sign * Math.acos(Math.max(-1, Math.min(1, dot)));
1690
- };
1691
- const theta1 = angle(1, 0, (x1 - cxp) / radiusX, (y1 - cyp) / radiusY);
1692
- let delta = angle(
1693
- (x1 - cxp) / radiusX,
1694
- (y1 - cyp) / radiusY,
1695
- (-x1 - cxp) / radiusX,
1696
- (-y1 - cyp) / radiusY
1697
- );
1698
- if (!sweep && delta > 0) {
1699
- delta -= 2 * Math.PI;
1700
- } else if (sweep && delta < 0) {
1701
- delta += 2 * Math.PI;
1702
- }
1703
- const out = [];
1704
- for (let step2 = 1; step2 <= CURVE_STEPS; step2++) {
1705
- const t2 = theta1 + delta * step2 / CURVE_STEPS;
1706
- const px3 = radiusX * Math.cos(t2);
1707
- const py = radiusY * Math.sin(t2);
1708
- out.push([cosPhi * px3 - sinPhi * py + cx, sinPhi * px3 + cosPhi * py + cy]);
1709
- }
1710
- return out;
1711
- }
1712
- function flattenPath(d) {
1713
- const tokens = d.match(/[A-Za-z]|-?\d*\.?\d+(?:e[-+]?\d+)?/giu);
1714
- if (!tokens) {
1715
- return void 0;
1716
- }
1717
- const subpaths = [];
1718
- let current = [];
1719
- let pos = [0, 0];
1720
- let start = [0, 0];
1721
- let i = 0;
1722
- let command2 = "";
1723
- const num14 = () => Number.parseFloat(tokens[i++] ?? "NaN");
1724
- while (i < tokens.length) {
1725
- const token = tokens[i];
1726
- if (/^[A-Za-z]$/u.test(token)) {
1727
- command2 = token;
1728
- i++;
1729
- if (command2 === "Z" || command2 === "z") {
1730
- if (current.length > 1) {
1731
- subpaths.push(current);
1732
- }
1733
- current = [];
1734
- pos = start;
1735
- continue;
1736
- }
1737
- } else if (command2 === "M") {
1738
- command2 = "L";
1739
- }
1740
- switch (command2) {
1741
- case "M":
1742
- if (current.length > 1) {
1743
- subpaths.push(current);
1744
- }
1745
- pos = [num14(), num14()];
1746
- start = pos;
1747
- current = [pos];
1748
- break;
1749
- case "L":
1750
- pos = [num14(), num14()];
1751
- current.push(pos);
1752
- break;
1753
- case "H":
1754
- pos = [num14(), pos[1]];
1755
- current.push(pos);
1756
- break;
1757
- case "V":
1758
- pos = [pos[0], num14()];
1759
- current.push(pos);
1760
- break;
1761
- case "C": {
1762
- const p1 = [num14(), num14()];
1763
- const p2 = [num14(), num14()];
1764
- const p3 = [num14(), num14()];
1765
- for (let step2 = 1; step2 <= CURVE_STEPS; step2++) {
1766
- const t2 = step2 / CURVE_STEPS;
1767
- const u = 1 - t2;
1768
- current.push([
1769
- u * u * u * pos[0] + 3 * u * u * t2 * p1[0] + 3 * u * t2 * t2 * p2[0] + t2 * t2 * t2 * p3[0],
1770
- u * u * u * pos[1] + 3 * u * u * t2 * p1[1] + 3 * u * t2 * t2 * p2[1] + t2 * t2 * t2 * p3[1]
1771
- ]);
1772
- }
1773
- pos = p3;
1774
- break;
1775
- }
1776
- case "Q": {
1777
- const p1 = [num14(), num14()];
1778
- const p2 = [num14(), num14()];
1779
- for (let step2 = 1; step2 <= CURVE_STEPS; step2++) {
1780
- const t2 = step2 / CURVE_STEPS;
1781
- const u = 1 - t2;
1782
- current.push([
1783
- u * u * pos[0] + 2 * u * t2 * p1[0] + t2 * t2 * p2[0],
1784
- u * u * pos[1] + 2 * u * t2 * p1[1] + t2 * t2 * p2[1]
1785
- ]);
1786
- }
1787
- pos = p2;
1788
- break;
1789
- }
1790
- case "A": {
1791
- const rx = num14();
1792
- const ry = num14();
1793
- const rotation = num14();
1794
- const largeArc = num14() !== 0;
1795
- const sweep = num14() !== 0;
1796
- const to = [num14(), num14()];
1797
- current.push(...flattenArc(pos, rx, ry, rotation, largeArc, sweep, to));
1798
- pos = to;
1799
- break;
1800
- }
1801
- default:
1802
- return void 0;
1803
- }
1804
- }
1805
- if (current.length > 1) {
1806
- subpaths.push(current);
1807
- }
1808
- return subpaths.every((sub) => sub.every(([x, y]) => Number.isFinite(x) && Number.isFinite(y))) ? subpaths : void 0;
1809
- }
1810
- var fmt = (n) => String(Math.round(n * 1e3) / 1e3);
1811
- function outsetClipPathForStroke(clipPath, strokeWidth, width, height) {
1812
- if (!(strokeWidth > 0)) {
1813
- return clipPath;
1814
- }
1815
- const d = outlinePathData(clipPath, width, height);
1816
- const subpaths = d ? flattenPath(d) : void 0;
1817
- if (!d || !subpaths || subpaths.length === 0) {
1818
- return clipPath;
1819
- }
1820
- const half = strokeWidth / 2;
1821
- const signedArea3 = (pts) => {
1822
- let area = 0;
1823
- for (let k = 0; k < pts.length; k++) {
1824
- const a = pts[k];
1825
- const b = pts[(k + 1) % pts.length];
1826
- area += a[0] * b[1] - b[0] * a[1];
1827
- }
1828
- return area;
1829
- };
1830
- const reference = Math.sign(signedArea3(subpaths[0])) || 1;
1831
- const quads = [];
1832
- for (const sub of subpaths) {
1833
- const closed = [...sub, sub[0]];
1834
- for (let k = 0; k < closed.length - 1; k++) {
1835
- const a = closed[k];
1836
- const b = closed[k + 1];
1837
- const len = Math.hypot(b[0] - a[0], b[1] - a[1]);
1838
- if (len < 1e-6) {
1839
- continue;
1840
- }
1841
- const nx = -(b[1] - a[1]) / len * half;
1842
- const ny = (b[0] - a[0]) / len * half;
1843
- let quad2 = [
1844
- [a[0] + nx, a[1] + ny],
1845
- [b[0] + nx, b[1] + ny],
1846
- [b[0] - nx, b[1] - ny],
1847
- [a[0] - nx, a[1] - ny]
1848
- ];
1849
- if (Math.sign(signedArea3(quad2)) !== reference) {
1850
- quad2 = quad2.reverse();
1851
- }
1852
- quads.push(`M ${quad2.map(([x, y]) => `${fmt(x)} ${fmt(y)}`).join(" L ")} Z`);
1853
- }
1854
- }
1855
- return `path('${d} ${quads.join(" ")}')`;
1856
- }
1857
-
1858
- // src/pptx/render/shape-geometry-cascade.ts
1859
2074
  var CYLINDER_RADIUS = "48% / 12%";
1860
2075
  var MIN_ROUND_RECT_RADIUS_PX = 0.01;
1861
2076
  function resolveShapeGeometry(element) {
@@ -1878,7 +2093,13 @@ function resolveShapeGeometry(element) {
1878
2093
  const stroke = straddlingStrokeWidth(element);
1879
2094
  return {
1880
2095
  kind: "clipPath",
1881
- clipPath: stroke > 0 ? outsetClipPathForStroke(clipPath, stroke, element.width, element.height) : clipPath
2096
+ clipPath: stroke > 0 ? outsetClipPathForStroke(
2097
+ clipPath,
2098
+ stroke,
2099
+ element.width,
2100
+ element.height,
2101
+ outlineStrokeJoin(element)
2102
+ ) : clipPath
1882
2103
  };
1883
2104
  }
1884
2105
  if (shapeType === "line") {
@@ -2141,79 +2362,6 @@ function buildColorAnimationKeyframes(colorAnim, keyframeName2, steps = 10, them
2141
2362
  ${lines.join("\n")}
2142
2363
  }` : void 0;
2143
2364
  }
2144
- var NO_STROKE = {
2145
- borderWidth: 0,
2146
- cssBorderWidth: "0px",
2147
- borderStyle: void 0,
2148
- borderColor: void 0,
2149
- border: void 0,
2150
- strokeLinejoin: void 0,
2151
- strokeLinecap: void 0,
2152
- strokeMiterlimit: void 0
2153
- };
2154
- function svgLineJoin(join) {
2155
- switch (join) {
2156
- case "round":
2157
- return "round";
2158
- case "bevel":
2159
- return "bevel";
2160
- case "miter":
2161
- return "miter";
2162
- default:
2163
- return void 0;
2164
- }
2165
- }
2166
- function svgStrokeLineCap(cap) {
2167
- switch (cap) {
2168
- case "rnd":
2169
- return "round";
2170
- case "sq":
2171
- return "square";
2172
- case "flat":
2173
- return "butt";
2174
- default:
2175
- return void 0;
2176
- }
2177
- }
2178
- function strokeMiterLimit(style) {
2179
- if (style?.lineJoin !== "miter" || typeof style.miterLimit !== "number") {
2180
- return void 0;
2181
- }
2182
- if (!Number.isFinite(style.miterLimit)) {
2183
- return void 0;
2184
- }
2185
- return Math.max(style.miterLimit / 1e5, 1);
2186
- }
2187
- function getComputedStrokeStyle(element) {
2188
- if (!pptx.hasShapeProperties(element)) {
2189
- return NO_STROKE;
2190
- }
2191
- const style = element.shapeStyle;
2192
- const width = suppressesCssBorder(element) ? 0 : paintedStrokeWidth(style);
2193
- const joins = {
2194
- strokeLinejoin: svgLineJoin(style?.lineJoin),
2195
- strokeLinecap: svgStrokeLineCap(style?.lineCap),
2196
- strokeMiterlimit: strokeMiterLimit(style)
2197
- };
2198
- if (width <= 0 || !style) {
2199
- return { ...NO_STROKE, ...joins };
2200
- }
2201
- const borderWidth = width;
2202
- const borderStyle = chunk6KLPQQYP_cjs.getCssBorderDashStyle(
2203
- chunk6KLPQQYP_cjs.normalizeStrokeDashType(style.strokeDash),
2204
- style.compoundLine
2205
- );
2206
- const rawColor = style.strokeColor ?? chunk6KLPQQYP_cjs.DEFAULT_STROKE_COLOR;
2207
- const borderColor = style.strokeOpacity === void 0 ? rawColor : chunk6KLPQQYP_cjs.colorWithOpacity(chunk6KLPQQYP_cjs.normalizeHexColor(rawColor, chunk6KLPQQYP_cjs.DEFAULT_STROKE_COLOR), style.strokeOpacity);
2208
- return {
2209
- borderWidth,
2210
- cssBorderWidth: chunkFM4C4MBJ_cjs.screenStrokeWidth(borderWidth),
2211
- borderStyle,
2212
- borderColor,
2213
- border: chunkFM4C4MBJ_cjs.screenBorder(borderWidth, borderStyle ?? "solid", borderColor),
2214
- ...joins
2215
- };
2216
- }
2217
2365
 
2218
2366
  // src/pptx/render/animation-color-base-style.ts
2219
2367
  function getAnimationColorBaseStyle(element, options = {}) {
@@ -6979,7 +7127,7 @@ function buildGlyphEnvelope(preset2, segments, width, height, align2, adj, adj2,
6979
7127
  }
6980
7128
 
6981
7129
  // src/pptx/render/text-warp-glyph-trace-contour.ts
6982
- function signedArea(ring) {
7130
+ function signedArea2(ring) {
6983
7131
  let area = 0;
6984
7132
  for (let i = 0; i < ring.length; i++) {
6985
7133
  const a = ring[i];
@@ -7120,7 +7268,7 @@ function contourRaster(values, w, h, level) {
7120
7268
  0
7121
7269
  );
7122
7270
  const wantPositive = depth % 2 === 0;
7123
- return signedArea(ring) > 0 === wantPositive ? ring : ring.slice().reverse();
7271
+ return signedArea2(ring) > 0 === wantPositive ? ring : ring.slice().reverse();
7124
7272
  });
7125
7273
  }
7126
7274
 
@@ -7652,7 +7800,7 @@ var EQUATION_TEMPLATES = [
7652
7800
 
7653
7801
  // src/pptx/render/mathml-sanitize.ts
7654
7802
  function sanitizeMathMl(markup) {
7655
- const sanitized = chunkX4FNVH7J_cjs.sanitizeMarkupOrEmpty(markup, { USE_PROFILES: { mathMl: true, svg: true } });
7803
+ const sanitized = chunkYMITEJST_cjs.sanitizeMarkupOrEmpty(markup, { USE_PROFILES: { mathMl: true, svg: true } });
7656
7804
  if (/<math(?:\s|>)/iu.test(markup) && !/<math(?:\s|>)/iu.test(sanitized) && sanitized) {
7657
7805
  return `<math xmlns="http://www.w3.org/1998/Math/MathML" display="inline">${sanitized}</math>`;
7658
7806
  }
@@ -10846,8 +10994,8 @@ function withChartUserShapeRowFlipUpdated(userShapes, path, flip) {
10846
10994
 
10847
10995
  // src/pptx/render/chart-user-shape-row-frame.ts
10848
10996
  var IDENTITY_FRAC = { x: 0, y: 0, w: 1, h: 1 };
10849
- function safeDiv(num14, den) {
10850
- return den !== 0 ? num14 / den : 0;
10997
+ function safeDiv(num15, den) {
10998
+ return den !== 0 ? num15 / den : 0;
10851
10999
  }
10852
11000
  function childFraction(off, ext, chOff, chExt) {
10853
11001
  return {
@@ -11109,7 +11257,7 @@ function powerPointAccelDecelProgress(t2, accel, decel) {
11109
11257
  function rampStopCount(fraction) {
11110
11258
  return Math.max(3, Math.ceil(12 * Math.sqrt(fraction)));
11111
11259
  }
11112
- function fmt2(value, digits) {
11260
+ function fmt3(value, digits) {
11113
11261
  return String(Number(value.toFixed(digits)));
11114
11262
  }
11115
11263
  function linearEasing(a, d) {
@@ -11127,11 +11275,11 @@ function linearEasing(a, d) {
11127
11275
  addRamp(1 - d, d);
11128
11276
  }
11129
11277
  const stops = [...times].sort((x, y) => x - y).map((t2) => {
11130
- const value = fmt2(powerPointAccelDecelProgress(t2, a, d), 4);
11278
+ const value = fmt3(powerPointAccelDecelProgress(t2, a, d), 4);
11131
11279
  if (t2 === 0 || t2 === 1) {
11132
11280
  return value;
11133
11281
  }
11134
- return `${value} ${fmt2(t2 * 100, 2)}%`;
11282
+ return `${value} ${fmt3(t2 * 100, 2)}%`;
11135
11283
  });
11136
11284
  return `linear(${stops.join(", ")})`;
11137
11285
  }
@@ -18037,25 +18185,25 @@ function createBehaviorPlayer(anim, box) {
18037
18185
  // src/pptx/render/animation-behavior-keyframes.ts
18038
18186
  var DENSE_SAMPLES = 60;
18039
18187
  var HOLD_EPSILON = 1e-5;
18040
- function fmt3(value, digits = 4) {
18188
+ function fmt4(value, digits = 4) {
18041
18189
  const rounded = Number(value.toFixed(digits));
18042
18190
  return String(Object.is(rounded, -0) ? 0 : rounded);
18043
18191
  }
18044
18192
  function declarations(frame, usage) {
18045
18193
  const parts = [
18046
- usage.slidePx ? `translate(${fmt3(frame.dx * usage.slidePx.width, 2)}px, ${fmt3(frame.dy * usage.slidePx.height, 2)}px)` : `translate(calc(var(--pptx-slide-w, 1280px) * ${fmt3(frame.dx)}), calc(var(--pptx-slide-h, 720px) * ${fmt3(frame.dy)}))`
18194
+ usage.slidePx ? `translate(${fmt4(frame.dx * usage.slidePx.width, 2)}px, ${fmt4(frame.dy * usage.slidePx.height, 2)}px)` : `translate(calc(var(--pptx-slide-w, 1280px) * ${fmt4(frame.dx)}), calc(var(--pptx-slide-h, 720px) * ${fmt4(frame.dy)}))`
18047
18195
  ];
18048
18196
  if (usage.rotate) {
18049
- parts.push(`rotate(${fmt3(frame.rotation, 2)}deg)`);
18197
+ parts.push(`rotate(${fmt4(frame.rotation, 2)}deg)`);
18050
18198
  }
18051
18199
  if (usage.shear) {
18052
- parts.push(`skewX(${fmt3(Math.atan(frame.shearX) * 180 / Math.PI, 2)}deg)`);
18200
+ parts.push(`skewX(${fmt4(Math.atan(frame.shearX) * 180 / Math.PI, 2)}deg)`);
18053
18201
  }
18054
18202
  if (usage.scale) {
18055
- parts.push(`scale(${fmt3(frame.scaleX)}, ${fmt3(frame.scaleY)})`);
18203
+ parts.push(`scale(${fmt4(frame.scaleX)}, ${fmt4(frame.scaleY)})`);
18056
18204
  }
18057
18205
  const mask = usage.wipeEdge ? ` ${maskEdgePartialDecl(usage.wipeEdge, frame.wipe?.revealed ?? 1)}` : "";
18058
- return `opacity: ${fmt3(frame.opacity, 3)}; transform: ${parts.join(" ")};${mask}`;
18206
+ return `opacity: ${fmt4(frame.opacity, 3)}; transform: ${parts.join(" ")};${mask}`;
18059
18207
  }
18060
18208
  function buildBehaviorKeyframes(anim, uid2, box, options = {}) {
18061
18209
  const player = createBehaviorPlayer(anim, box);
@@ -18089,7 +18237,7 @@ function buildBehaviorKeyframes(anim, uid2, box, options = {}) {
18089
18237
  };
18090
18238
  const name = `${options.prefix ?? "pptx-tl-bhvr"}-${uid2}`;
18091
18239
  const lines = frames.map(
18092
- ({ offset, frame }) => ` ${fmt3(offset * 100, 3)}% { ${declarations(frame, usage)} }`
18240
+ ({ offset, frame }) => ` ${fmt4(offset * 100, 3)}% { ${declarations(frame, usage)} }`
18093
18241
  );
18094
18242
  if (anim.presetClass === "entr") {
18095
18243
  lines[0] = lines[0].replace(/^\t0% \{ opacity: [\d.]+;/u, " 0% { opacity: 0;");
@@ -25538,6 +25686,10 @@ function createEditorHistoryController(options = {}) {
25538
25686
  stack.clear();
25539
25687
  sync();
25540
25688
  },
25689
+ forget(reaches) {
25690
+ stack.forget(reaches);
25691
+ sync();
25692
+ },
25541
25693
  setMaxDepth(next) {
25542
25694
  maxDepth = clampDepth(next);
25543
25695
  stack.setMaxDepth(maxDepth);
@@ -27298,7 +27450,7 @@ function createTemplateContext(options = {}) {
27298
27450
  const scheme = { ...pptx.DEFAULT_SCHEME_COLOR_MAP, ...options.scheme ?? {} };
27299
27451
  let counter = 0;
27300
27452
  const idFor = options.idFor ?? ((index) => `template-el-${Date.now()}-${index}`);
27301
- const dictionary = chunkOOQMIQT3_cjs.translationsEn;
27453
+ const dictionary = chunkGWKTHP6U_cjs.translationsEn;
27302
27454
  const translate = options.translate ?? ((key) => dictionary[key] ?? key);
27303
27455
  return {
27304
27456
  scheme,
@@ -32626,7 +32778,7 @@ function resamplePolygon(poly3, count) {
32626
32778
  }
32627
32779
  return result;
32628
32780
  }
32629
- function signedArea2(poly3) {
32781
+ function signedArea3(poly3) {
32630
32782
  let area = 0;
32631
32783
  for (let i = 0; i < poly3.length; i++) {
32632
32784
  const a = poly3[i];
@@ -32664,7 +32816,7 @@ function bestRotation(from, to) {
32664
32816
  function normalizeOutlinePair(fromPoly, toPoly, count = OUTLINE_SAMPLE_COUNT) {
32665
32817
  const from = resamplePolygon(fromPoly, count);
32666
32818
  let to = resamplePolygon(toPoly, count);
32667
- if (Math.sign(signedArea2(from)) !== Math.sign(signedArea2(to))) {
32819
+ if (Math.sign(signedArea3(from)) !== Math.sign(signedArea3(to))) {
32668
32820
  to = [...to].reverse();
32669
32821
  }
32670
32822
  const offset = bestRotation(from, to);
@@ -32726,6 +32878,8 @@ function buildClipKeyframeBody(from, to, steps) {
32726
32878
  if (fromRing.length === 0 || toRing.length === 0) {
32727
32879
  return null;
32728
32880
  }
32881
+ const stroke = straddlingStrokeWidth(to);
32882
+ const join = outlineStrokeJoin(to);
32729
32883
  const lines = [];
32730
32884
  for (let s = 0; s <= steps; s++) {
32731
32885
  const t2 = s / steps;
@@ -32733,9 +32887,11 @@ function buildClipKeyframeBody(from, to, steps) {
32733
32887
  if (!d) {
32734
32888
  return null;
32735
32889
  }
32890
+ const clip = `path('${d}')`;
32891
+ const widened = stroke > 0 ? outsetClipPathForStroke(clip, stroke, to.width, to.height, join) : clip;
32736
32892
  const pct4 = Number((s / steps * 100).toFixed(2));
32737
32893
  lines.push(` ${pct4}% {
32738
- clip-path: path('${d}');
32894
+ clip-path: ${widened};
32739
32895
  }`);
32740
32896
  }
32741
32897
  return lines.join("\n");
@@ -33350,6 +33506,74 @@ function matchIdenticalTwins(fromElements, toElements, usedFrom, usedTo) {
33350
33506
  return pairs;
33351
33507
  }
33352
33508
 
33509
+ // src/pptx/render/morph-text-flow.ts
33510
+ function paragraphsOf(element) {
33511
+ const text4 = element.text ?? "";
33512
+ return text4.split(/[\n\r\v]/u).map((paragraph2) => paragraph2.replace(/\s+/gu, " ").trim()).filter((paragraph2) => paragraph2 !== "");
33513
+ }
33514
+ function distinctiveParagraphs(elements) {
33515
+ const owner = /* @__PURE__ */ new Map();
33516
+ for (const element of elements) {
33517
+ for (const paragraph2 of new Set(paragraphsOf(element))) {
33518
+ owner.set(paragraph2, owner.has(paragraph2) ? null : element);
33519
+ }
33520
+ }
33521
+ const distinctive = /* @__PURE__ */ new Map();
33522
+ for (const [paragraph2, element] of owner) {
33523
+ if (element) {
33524
+ distinctive.set(paragraph2, element);
33525
+ }
33526
+ }
33527
+ return distinctive;
33528
+ }
33529
+ function morphTextFlow(fromElements, toElements) {
33530
+ return { from: distinctiveParagraphs(fromElements), to: distinctiveParagraphs(toElements) };
33531
+ }
33532
+ function splitsTextFlow(flow, fromEl, toEl) {
33533
+ const elsewhere = (element, own, other, partner) => paragraphsOf(element).some((paragraph2) => {
33534
+ if (own.get(paragraph2) !== element) {
33535
+ return false;
33536
+ }
33537
+ const holder = other.get(paragraph2);
33538
+ return holder !== void 0 && holder !== partner;
33539
+ });
33540
+ return elsewhere(fromEl, flow.from, flow.to, toEl) || elsewhere(toEl, flow.to, flow.from, fromEl);
33541
+ }
33542
+ var MIN_TWIN_TEXT = 4;
33543
+ function matchTextTwins(fromElements, toElements, usedFrom, usedTo) {
33544
+ const byText = (elements) => {
33545
+ const map = /* @__PURE__ */ new Map();
33546
+ for (const element of elements) {
33547
+ if (element.type !== "text") {
33548
+ continue;
33549
+ }
33550
+ const text4 = paragraphsOf(element).join("\n");
33551
+ if (text4.replace(/\s/gu, "").length < MIN_TWIN_TEXT) {
33552
+ continue;
33553
+ }
33554
+ map.set(text4, [...map.get(text4) ?? [], element]);
33555
+ }
33556
+ return map;
33557
+ };
33558
+ const toByText = byText(toElements);
33559
+ const pairs = [];
33560
+ for (const [text4, froms] of byText(fromElements)) {
33561
+ const tos = toByText.get(text4);
33562
+ const fromEl = froms[0];
33563
+ const toEl = tos?.[0];
33564
+ if (froms.length !== 1 || tos?.length !== 1 || !fromEl || !toEl) {
33565
+ continue;
33566
+ }
33567
+ if (usedFrom.has(fromEl.id) || usedTo.has(toEl.id)) {
33568
+ continue;
33569
+ }
33570
+ pairs.push({ fromElement: fromEl, toElement: toEl });
33571
+ usedFrom.add(fromEl.id);
33572
+ usedTo.add(toEl.id);
33573
+ }
33574
+ return pairs;
33575
+ }
33576
+
33353
33577
  // src/pptx/render/morph-matching.ts
33354
33578
  var NV_PR_KEYS = [
33355
33579
  "p:nvSpPr",
@@ -33392,6 +33616,7 @@ function matchMorphElementsFull(fromSlide, toSlide) {
33392
33616
  const usedTo = /* @__PURE__ */ new Set();
33393
33617
  const fromElements = flattenMorphElements(fromSlide.elements, toSlide.elements);
33394
33618
  const toElements = flattenMorphElements(toSlide.elements, fromSlide.elements);
33619
+ const textFlow = morphTextFlow(fromElements, toElements);
33395
33620
  for (const fromEl of fromElements) {
33396
33621
  const fromName = getElementMorphName(fromEl);
33397
33622
  if (!fromName) {
@@ -33430,6 +33655,9 @@ function matchMorphElementsFull(fromSlide, toSlide) {
33430
33655
  continue;
33431
33656
  }
33432
33657
  if (creationIdOf(toEl) === fromGuid) {
33658
+ if (splitsTextFlow(textFlow, fromEl, toEl)) {
33659
+ break;
33660
+ }
33433
33661
  pairs.push({ fromElement: fromEl, toElement: toEl });
33434
33662
  usedFrom.add(fromEl.id);
33435
33663
  usedTo.add(toEl.id);
@@ -33457,6 +33685,7 @@ function matchMorphElementsFull(fromSlide, toSlide) {
33457
33685
  pairs.push(...matchSameMedia(fromElements, toElements, usedFrom, usedTo));
33458
33686
  pairs.push(...matchIdenticalTwins(fromElements, toElements, usedFrom, usedTo));
33459
33687
  pairs.push(...matchNamedTextTwins(fromElements, toElements, usedFrom, usedTo));
33688
+ pairs.push(...matchTextTwins(fromElements, toElements, usedFrom, usedTo));
33460
33689
  pairs.push(...matchGroupTwins(fromElements, toElements, usedFrom, usedTo));
33461
33690
  for (const fromEl of fromElements) {
33462
33691
  if (usedFrom.has(fromEl.id) || !fromEl.shapeId) {
@@ -33470,7 +33699,7 @@ function matchMorphElementsFull(fromSlide, toSlide) {
33470
33699
  if (creationIdOf(fromEl) && creationIdOf(toEl)) {
33471
33700
  continue;
33472
33701
  }
33473
- if (conflictingMorphNames(fromEl, toEl)) {
33702
+ if (conflictingMorphNames(fromEl, toEl) || splitsTextFlow(textFlow, fromEl, toEl)) {
33474
33703
  continue;
33475
33704
  }
33476
33705
  pairs.push({ fromElement: fromEl, toElement: toEl });
@@ -33770,17 +33999,53 @@ function matchTextTokens(fromTokens, toTokens) {
33770
33999
  return pairs;
33771
34000
  }
33772
34001
 
34002
+ // src/pptx/render/morph-stacked-copies.ts
34003
+ var MAX_COPY_OFFSET = 4;
34004
+ function ownText(element) {
34005
+ return (element.text ?? "").replace(/\s+/gu, " ").trim();
34006
+ }
34007
+ function isStackedCopy(a, b) {
34008
+ if (a.type !== b.type || (a.rotation ?? 0) !== (b.rotation ?? 0)) {
34009
+ return false;
34010
+ }
34011
+ if (Math.abs(a.width - b.width) > 1 || Math.abs(a.height - b.height) > 1) {
34012
+ return false;
34013
+ }
34014
+ if (Math.hypot(a.x - b.x, a.y - b.y) > MAX_COPY_OFFSET) {
34015
+ return false;
34016
+ }
34017
+ const text4 = ownText(a);
34018
+ if (text4 !== "") {
34019
+ return text4 === ownText(b);
34020
+ }
34021
+ const media = mediaIdentity(a);
34022
+ return media !== void 0 && media === mediaIdentity(b);
34023
+ }
34024
+ function coveredStackedCopyIds(elements) {
34025
+ const covered = /* @__PURE__ */ new Set();
34026
+ for (let i = 0; i < elements.length; i++) {
34027
+ const lower = elements[i];
34028
+ for (let j = i + 1; j < elements.length; j++) {
34029
+ if (isStackedCopy(lower, elements[j])) {
34030
+ covered.add(lower.id);
34031
+ break;
34032
+ }
34033
+ }
34034
+ }
34035
+ return covered;
34036
+ }
34037
+
33773
34038
  // src/pptx/render/morph-text-slot.ts
33774
34039
  var SAME_SLOT_OVERLAP = 0.4;
33775
- function ownText(element) {
34040
+ function ownText2(element) {
33776
34041
  return (element.text ?? "").replace(/\s+/gu, " ").trim();
33777
34042
  }
33778
34043
  function morphTextReplacedInSlot(fromElement, toElement) {
33779
34044
  if (fromElement.type !== "text" || toElement.type !== "text") {
33780
34045
  return false;
33781
34046
  }
33782
- const from = ownText(fromElement);
33783
- const to = ownText(toElement);
34047
+ const from = ownText2(fromElement);
34048
+ const to = ownText2(toElement);
33784
34049
  if (from === "" || to === "" || from === to) {
33785
34050
  return false;
33786
34051
  }
@@ -34013,6 +34278,12 @@ function appearanceSignature2(element, depth = 0) {
34013
34278
  parts.push(image.imagePath ?? "", image.svgPath ?? "");
34014
34279
  if (pptx.hasTextProperties(element)) {
34015
34280
  parts.push(element.text ?? "", element.textStyle?.color ?? "");
34281
+ for (const segment of element.textSegments ?? []) {
34282
+ const style = segment.style;
34283
+ parts.push(
34284
+ `${style?.fontSize ?? ""}|${style?.bold ? 1 : 0}|${style?.italic ? 1 : 0}|${style?.underline ? 1 : 0}|${style?.fontFamily ?? ""}|${style?.color ?? ""}`
34285
+ );
34286
+ }
34016
34287
  }
34017
34288
  const children = element.children;
34018
34289
  if (children && depth < SIGNATURE_MAX_DEPTH) {
@@ -34239,10 +34510,21 @@ function flipFactors(el) {
34239
34510
  return ` scaleX(${el.flipHorizontal ? -1 : 1}) scaleY(${el.flipVertical ? -1 : 1})`;
34240
34511
  }
34241
34512
  function generateUnmatchedFadeOutAnimations(elements, durationMs, startIndex) {
34513
+ const covered = coveredStackedCopyIds(elements);
34242
34514
  return elements.map((el, i) => {
34243
34515
  const safeName = `pptx-morph-fadeout-${startIndex + i}-${el.id.replace(/[^a-zA-Z0-9]/gu, "")}`;
34244
34516
  const transform = ` transform: scale(1)${staticTransformSuffix(el)};`;
34245
- const keyframes = `
34517
+ const keyframes = covered.has(el.id) ? `
34518
+ @keyframes ${safeName} {
34519
+ 0%, ${MORPH_FADE_OUT_HOLD_PERCENT}% {
34520
+ opacity: ${el.opacity ?? 1};
34521
+ ${transform}
34522
+ }
34523
+ ${MORPH_FADE_OUT_HOLD_PERCENT + 0.1}%, 100% {
34524
+ opacity: 0;
34525
+ ${transform}
34526
+ }
34527
+ }` : `
34246
34528
  @keyframes ${safeName} {
34247
34529
  0% {
34248
34530
  opacity: ${el.opacity ?? 1};
@@ -34269,10 +34551,21 @@ ${transform}
34269
34551
  });
34270
34552
  }
34271
34553
  function generateUnmatchedFadeInAnimations(elements, durationMs, startIndex) {
34554
+ const covered = coveredStackedCopyIds(elements);
34272
34555
  return elements.map((el, i) => {
34273
34556
  const safeName = `pptx-morph-fadein-${startIndex + i}-${el.id.replace(/[^a-zA-Z0-9]/gu, "")}`;
34274
34557
  const transform = ` transform: scale(1)${staticTransformSuffix(el)};`;
34275
- const keyframes = `
34558
+ const keyframes = covered.has(el.id) ? `
34559
+ @keyframes ${safeName} {
34560
+ 0%, 99.9% {
34561
+ opacity: 0;
34562
+ ${transform}
34563
+ }
34564
+ 100% {
34565
+ opacity: ${el.opacity ?? 1};
34566
+ ${transform}
34567
+ }
34568
+ }` : `
34276
34569
  @keyframes ${safeName} {
34277
34570
  0% {
34278
34571
  opacity: 0;
@@ -37144,7 +37437,7 @@ function elementRef(element) {
37144
37437
  ...text4.length > 0 && { text: text4.length > 30 ? `${text4.slice(0, 30)}...` : text4 }
37145
37438
  };
37146
37439
  }
37147
- function getElementLabel2(element) {
37440
+ function getElementLabel(element) {
37148
37441
  const typeLabel = element.type.charAt(0).toUpperCase() + element.type.slice(1);
37149
37442
  const text4 = getElementText(element);
37150
37443
  if (text4.length > 0) {
@@ -37178,9 +37471,9 @@ function diffSlideElements(baseElements, compareElements) {
37178
37471
  if (!compareById.has(id)) {
37179
37472
  changes.push({
37180
37473
  elementId: id,
37181
- label: getElementLabel2(el),
37474
+ label: getElementLabel(el),
37182
37475
  kind: "removed",
37183
- description: `Element removed: ${getElementLabel2(el)}`,
37476
+ description: `Element removed: ${getElementLabel(el)}`,
37184
37477
  descriptionKey: "pptx.compare.change.removed",
37185
37478
  descriptionElement: elementRef(el)
37186
37479
  });
@@ -37190,9 +37483,9 @@ function diffSlideElements(baseElements, compareElements) {
37190
37483
  if (!baseById.has(id)) {
37191
37484
  changes.push({
37192
37485
  elementId: id,
37193
- label: getElementLabel2(el),
37486
+ label: getElementLabel(el),
37194
37487
  kind: "added",
37195
- description: `Element added: ${getElementLabel2(el)}`,
37488
+ description: `Element added: ${getElementLabel(el)}`,
37196
37489
  descriptionKey: "pptx.compare.change.added",
37197
37490
  descriptionElement: elementRef(el)
37198
37491
  });
@@ -37206,7 +37499,7 @@ function diffSlideElements(baseElements, compareElements) {
37206
37499
  if (Math.abs(baseEl.x - compareEl.x) > POSITION_THRESHOLD || Math.abs(baseEl.y - compareEl.y) > POSITION_THRESHOLD) {
37207
37500
  changes.push({
37208
37501
  elementId: id,
37209
- label: getElementLabel2(baseEl),
37502
+ label: getElementLabel(baseEl),
37210
37503
  kind: "moved",
37211
37504
  description: `Moved from (${Math.round(baseEl.x)}, ${Math.round(baseEl.y)}) to (${Math.round(compareEl.x)}, ${Math.round(compareEl.y)})`,
37212
37505
  descriptionKey: "pptx.compare.change.moved",
@@ -37221,7 +37514,7 @@ function diffSlideElements(baseElements, compareElements) {
37221
37514
  if (Math.abs(baseEl.width - compareEl.width) > SIZE_THRESHOLD || Math.abs(baseEl.height - compareEl.height) > SIZE_THRESHOLD) {
37222
37515
  changes.push({
37223
37516
  elementId: id,
37224
- label: getElementLabel2(baseEl),
37517
+ label: getElementLabel(baseEl),
37225
37518
  kind: "resized",
37226
37519
  description: `Resized from ${Math.round(baseEl.width)}x${Math.round(baseEl.height)} to ${Math.round(compareEl.width)}x${Math.round(compareEl.height)}`,
37227
37520
  descriptionKey: "pptx.compare.change.resized",
@@ -37238,7 +37531,7 @@ function diffSlideElements(baseElements, compareElements) {
37238
37531
  if (baseText !== compareText) {
37239
37532
  changes.push({
37240
37533
  elementId: id,
37241
- label: getElementLabel2(baseEl),
37534
+ label: getElementLabel(baseEl),
37242
37535
  kind: "textChanged",
37243
37536
  description: "Text content changed",
37244
37537
  descriptionKey: "pptx.compare.change.textChanged"
@@ -41284,7 +41577,7 @@ function parsePathPoints(d) {
41284
41577
  let i = 0;
41285
41578
  let cmd = "";
41286
41579
  let cur = { x: 0, y: 0 };
41287
- const num14 = () => Number(tokens[i++]);
41580
+ const num15 = () => Number(tokens[i++]);
41288
41581
  while (i < tokens.length) {
41289
41582
  const t2 = tokens[i];
41290
41583
  if (/[a-zA-Z]/u.test(t2)) {
@@ -41295,40 +41588,40 @@ function parsePathPoints(d) {
41295
41588
  switch (cmd.toUpperCase()) {
41296
41589
  case "M":
41297
41590
  case "L": {
41298
- const x = num14();
41299
- const y = num14();
41591
+ const x = num15();
41592
+ const y = num15();
41300
41593
  cur = rel ? { x: cur.x + x, y: cur.y + y } : { x, y };
41301
41594
  out.push(cur);
41302
41595
  break;
41303
41596
  }
41304
41597
  case "H": {
41305
- const x = num14();
41598
+ const x = num15();
41306
41599
  cur = { x: rel ? cur.x + x : x, y: cur.y };
41307
41600
  out.push(cur);
41308
41601
  break;
41309
41602
  }
41310
41603
  case "V": {
41311
- const y = num14();
41604
+ const y = num15();
41312
41605
  cur = { x: cur.x, y: rel ? cur.y + y : y };
41313
41606
  out.push(cur);
41314
41607
  break;
41315
41608
  }
41316
41609
  case "C": {
41317
- num14();
41318
- num14();
41319
- num14();
41320
- num14();
41321
- const x = num14();
41322
- const y = num14();
41610
+ num15();
41611
+ num15();
41612
+ num15();
41613
+ num15();
41614
+ const x = num15();
41615
+ const y = num15();
41323
41616
  cur = rel ? { x: cur.x + x, y: cur.y + y } : { x, y };
41324
41617
  out.push(cur);
41325
41618
  break;
41326
41619
  }
41327
41620
  case "Q": {
41328
- num14();
41329
- num14();
41330
- const x = num14();
41331
- const y = num14();
41621
+ num15();
41622
+ num15();
41623
+ const x = num15();
41624
+ const y = num15();
41332
41625
  cur = rel ? { x: cur.x + x, y: cur.y + y } : { x, y };
41333
41626
  out.push(cur);
41334
41627
  break;
@@ -44450,6 +44743,144 @@ var TEXT_BOX_SECTION = {
44450
44743
  ]
44451
44744
  };
44452
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
+ ];
44453
44884
  var FONT_NAME_UNSAFE_CHARS = /["\\\n\r;}<>]/u;
44454
44885
  var FONT_FORMAT_ALLOWED = /* @__PURE__ */ new Set(["truetype", "opentype", "woff", "woff2"]);
44455
44886
  var FONT_MIME_BY_FORMAT = {
@@ -44591,6 +45022,44 @@ function collectUsedFonts(slides) {
44591
45022
 
44592
45023
  // src/pptx/render/google-webfonts.ts
44593
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
+ }
44594
45063
  var GOOGLE_WEBFONT_AXIS = "ital,wght@0,400;0,700;1,400;1,700";
44595
45064
  var DISPLAY_PARAM = "display=swap";
44596
45065
  function collectReferencedFontFamilies(slides) {
@@ -44681,6 +45150,9 @@ function matchGoogleWebfontFragments(families) {
44681
45150
  return [...weightsByFamily].map(([family2, weights]) => buildGoogleFontsFragment(family2, weights));
44682
45151
  }
44683
45152
  async function resolveGoogleWebfontHref(slides, embeddedFonts, isLocallyInstalled = isFontFamilyInstalledLocally, googleFontsBaseUrl) {
45153
+ if (googleFontsBaseUrl === null) {
45154
+ return null;
45155
+ }
44684
45156
  const referenced = collectReferencedFontFamilies(slides);
44685
45157
  const candidates = selectGoogleWebfontFamilies(
44686
45158
  referenced,
@@ -49351,14 +49823,14 @@ function parseHexToRgb(hex2) {
49351
49823
  if (cleaned.length !== 6) {
49352
49824
  return null;
49353
49825
  }
49354
- const num14 = parseInt(cleaned, 16);
49355
- if (!Number.isFinite(num14)) {
49826
+ const num15 = parseInt(cleaned, 16);
49827
+ if (!Number.isFinite(num15)) {
49356
49828
  return null;
49357
49829
  }
49358
49830
  return {
49359
- r: num14 >> 16 & 255,
49360
- g: num14 >> 8 & 255,
49361
- b: num14 & 255
49831
+ r: num15 >> 16 & 255,
49832
+ g: num15 >> 8 & 255,
49833
+ b: num15 & 255
49362
49834
  };
49363
49835
  }
49364
49836
  function colorDistance(a, b) {
@@ -51363,7 +51835,7 @@ function commentMarkerTitle(comment, fallbackAuthor) {
51363
51835
  }
51364
51836
  function buildCommentMarkers(comments, canvasWidth, canvasHeight, fallbackAuthor) {
51365
51837
  return comments.map((comment, index) => {
51366
- const pos = element.getCommentMarkerPosition(comment, index, canvasWidth, canvasHeight);
51838
+ const pos = chunkYMITEJST_cjs.getCommentMarkerPosition(comment, index, canvasWidth, canvasHeight);
51367
51839
  return {
51368
51840
  commentId: comment.id,
51369
51841
  label: String(index + 1),
@@ -53128,9 +53600,9 @@ function svgArcToCubics(from, rxIn, ryIn, xAxisRotationDeg, largeArc, sweep, to)
53128
53600
  rx *= s;
53129
53601
  ry *= s;
53130
53602
  }
53131
- const num14 = rx * rx * ry * ry - rx * rx * y1p * y1p - ry * ry * x1p * x1p;
53603
+ const num15 = rx * rx * ry * ry - rx * rx * y1p * y1p - ry * ry * x1p * x1p;
53132
53604
  const den = rx * rx * y1p * y1p + ry * ry * x1p * x1p;
53133
- let coef = den === 0 ? 0 : Math.sqrt(Math.max(0, num14 / den));
53605
+ let coef = den === 0 ? 0 : Math.sqrt(Math.max(0, num15 / den));
53134
53606
  if (largeArc === sweep) {
53135
53607
  coef = -coef;
53136
53608
  }
@@ -53250,7 +53722,7 @@ function editGeometryBounds(geometry) {
53250
53722
  }
53251
53723
  return { minX, minY, maxX, maxY };
53252
53724
  }
53253
- function fmt4(value) {
53725
+ function fmt5(value) {
53254
53726
  return String(Math.round(value * 1e3) / 1e3);
53255
53727
  }
53256
53728
  function editGeometryToPaths(geometry, ox, oy, width, height, scale2 = EDIT_POINTS_PATH_SCALE) {
@@ -53265,7 +53737,7 @@ function editGeometryToPaths(geometry, ox, oy, width, height, scale2 = EDIT_POIN
53265
53737
  const segments = [];
53266
53738
  const start = pt(sub.nodes[0]);
53267
53739
  segments.push({ type: "moveTo", pt: start });
53268
- svg2.push(`M ${fmt4(start.x)} ${fmt4(start.y)}`);
53740
+ svg2.push(`M ${fmt5(start.x)} ${fmt5(start.y)}`);
53269
53741
  sub.segments.forEach((seg, i) => {
53270
53742
  if (sub.closed && seg.kind === "line" && i === sub.segments.length - 1) {
53271
53743
  return;
@@ -53273,13 +53745,13 @@ function editGeometryToPaths(geometry, ox, oy, width, height, scale2 = EDIT_POIN
53273
53745
  const end = pt(sub.nodes[(i + 1) % sub.nodes.length]);
53274
53746
  if (seg.kind === "line") {
53275
53747
  segments.push({ type: "lineTo", pt: end });
53276
- svg2.push(`L ${fmt4(end.x)} ${fmt4(end.y)}`);
53748
+ svg2.push(`L ${fmt5(end.x)} ${fmt5(end.y)}`);
53277
53749
  } else {
53278
53750
  const c1 = pt(seg.c1);
53279
53751
  const c2 = pt(seg.c2);
53280
53752
  segments.push({ type: "cubicBezTo", pts: [c1, c2, end] });
53281
53753
  svg2.push(
53282
- `C ${fmt4(c1.x)} ${fmt4(c1.y)} ${fmt4(c2.x)} ${fmt4(c2.y)} ${fmt4(end.x)} ${fmt4(end.y)}`
53754
+ `C ${fmt5(c1.x)} ${fmt5(c1.y)} ${fmt5(c2.x)} ${fmt5(c2.y)} ${fmt5(end.x)} ${fmt5(end.y)}`
53283
53755
  );
53284
53756
  }
53285
53757
  });
@@ -55123,6 +55595,27 @@ async function applyMasterViewCrudAction(handler, data, action, target, options)
55123
55595
  }
55124
55596
  }
55125
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
+
55126
55619
  // src/pptx/render/virtualized-list.ts
55127
55620
  var DEFAULT_VIRTUAL_OVERSCAN = 5;
55128
55621
  var SLIDE_VIRTUALIZATION_THRESHOLD = 50;
@@ -55280,6 +55773,192 @@ function validatePasswordPair(password, confirmation) {
55280
55773
  return null;
55281
55774
  }
55282
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
+
55283
55962
  // src/pptx/render/deck-save-options.ts
55284
55963
  function buildDeckSaveOptions(state) {
55285
55964
  return {
@@ -55318,32 +55997,79 @@ var DEFAULT_VIEWER_PREFERENCES = {
55318
55997
  };
55319
55998
  var DEFAULT_VIEWER_SETTINGS = DEFAULT_VIEWER_PREFERENCES;
55320
55999
  var VIEWER_SHORTCUT_REFERENCE = [
55321
- { actionKey: "pptx.toolbar.undo", shortcut: "Ctrl/Cmd+Z" },
55322
- { actionKey: "pptx.toolbar.redo", shortcut: "Ctrl/Cmd+Shift+Z or Ctrl/Cmd+Y" },
55323
- { actionKey: "pptx.shortcuts.action.copyElement", shortcut: "Ctrl/Cmd+C" },
55324
- { actionKey: "pptx.shortcuts.action.cutElement", shortcut: "Ctrl/Cmd+X" },
55325
- { actionKey: "pptx.shortcuts.action.pasteElement", shortcut: "Ctrl/Cmd+V" },
55326
- { actionKey: "pptx.shortcuts.action.duplicateElement", shortcut: "Ctrl/Cmd+D" },
55327
- { actionKey: "pptx.shortcuts.action.deleteElement", shortcut: "Delete / Backspace" },
55328
- { actionKey: "pptx.shortcuts.action.selectAll", shortcut: "Ctrl/Cmd+A" },
55329
- { actionKey: "pptx.ribbon.group", shortcut: "Ctrl/Cmd+G" },
55330
- { actionKey: "pptx.ribbon.ungroup", shortcut: "Ctrl/Cmd+Shift+G" },
55331
- { actionKey: "pptx.shortcuts.action.nudgeElement", shortcut: "Arrow keys" },
55332
- { actionKey: "pptx.shortcuts.action.nudgeElementLarge", shortcut: "Shift+Arrow keys" },
55333
- { actionKey: "pptx.shortcuts.action.prevSlide", shortcut: "Left or Up arrow, Page Up" },
55334
- { actionKey: "pptx.shortcuts.action.nextSlide", shortcut: "Right or Down arrow, Page Down" },
55335
- { actionKey: "pptx.shortcuts.action.zoomCanvas", shortcut: "Ctrl/Cmd+Mouse wheel" },
55336
- { actionKey: "pptx.shortcuts.action.commitTextEdit", shortcut: "Ctrl/Cmd+Enter" },
55337
- { actionKey: "pptx.shortcuts.action.cancelTextEdit", shortcut: "Escape" },
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" },
55338
56049
  // Both of these reached the shared keymap late (Ctrl+F was hand-wired in two
55339
56050
  // bindings, Ctrl+/ in one), so the panel that is supposed to teach the keymap
55340
56051
  // was advertising neither. The help panel is the keymap's documentation: a
55341
56052
  // chord missing here is a chord nobody discovers.
55342
- { actionKey: "pptx.findReplace.title", shortcut: "Ctrl/Cmd+F" },
55343
- { actionKey: "pptx.slideShow.fromBeginning", shortcut: "F5" },
55344
- { actionKey: "pptx.slideShow.fromCurrent", shortcut: "Shift+F5" },
55345
- { 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" }
55346
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
+ }
55347
56073
  var SHORTCUT_REFERENCE_ITEMS = VIEWER_SHORTCUT_REFERENCE;
55348
56074
  var VIEWER_PREFERENCE_TOGGLES = [
55349
56075
  { key: "autoSave", labelKey: "pptx.settings.autoSave" },
@@ -55782,8 +56508,8 @@ function capitalizeDayName(word) {
55782
56508
  return word;
55783
56509
  }
55784
56510
  function replaceFractions(word) {
55785
- for (const [plain, glyph3] of FRACTIONS) {
55786
- if (word === plain) {
56511
+ for (const [plain2, glyph3] of FRACTIONS) {
56512
+ if (word === plain2) {
55787
56513
  return glyph3;
55788
56514
  }
55789
56515
  }
@@ -58767,7 +59493,7 @@ function safeColor(color, fallback = "none") {
58767
59493
  function svgTile(width, height, defs, body) {
58768
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>`;
58769
59495
  }
58770
- function num4(value) {
59496
+ function num5(value) {
58771
59497
  return String(Math.round(value * 100) / 100);
58772
59498
  }
58773
59499
  function svgId(raw) {
@@ -58782,9 +59508,9 @@ function paintDefs(paint, id) {
58782
59508
  const x = Math.cos(rad) / 2;
58783
59509
  const y = Math.sin(rad) / 2;
58784
59510
  const stops = paint.stops.map(
58785
- (s) => `<stop offset="${num4(s.position)}%" stop-color="${safeColor(s.color, "#000000")}"${s.opacity !== void 0 && s.opacity < 1 ? ` stop-opacity="${num4(s.opacity)}"` : ""}/>`
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)}"` : ""}/>`
58786
59512
  ).join("");
58787
- const defs = `<linearGradient id="${id}" x1="${num4(0.5 - x)}" y1="${num4(0.5 - y)}" x2="${num4(0.5 + x)}" y2="${num4(0.5 + y)}">${stops}</linearGradient>`;
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>`;
58788
59514
  return { defs, fill: `url(#${id})` };
58789
59515
  }
58790
59516
  return { defs: "", fill: safeColor(paint.color) };
@@ -58797,19 +59523,19 @@ function filterDefs(effects, id) {
58797
59523
  if (effects.glow) {
58798
59524
  const g = effects.glow;
58799
59525
  parts.push(
58800
- `<feMorphology in="SourceAlpha" operator="dilate" radius="${num4(g.radius / 2)}" result="gd"/>`,
58801
- `<feGaussianBlur in="gd" stdDeviation="${num4(g.radius / 2)}" result="gb"/>`,
58802
- `<feFlood flood-color="${safeColor(g.color, "#000000")}" flood-opacity="${num4(g.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)}"/>`,
58803
59529
  '<feComposite in2="gb" operator="in" result="glow"/>'
58804
59530
  );
58805
59531
  }
58806
59532
  if (effects.shadow && !effects.shadow.inner) {
58807
59533
  const s = effects.shadow;
58808
- parts.push(diagram.svgDropShadowElement(s, { number: num4, color: safeColor }));
59534
+ parts.push(diagram.svgDropShadowElement(s, { number: num5, color: safeColor }));
58809
59535
  }
58810
59536
  if (effects.softEdge) {
58811
59537
  parts.push(
58812
- `<feGaussianBlur in="SourceGraphic" stdDeviation="${num4(effects.softEdge / 2)}" result="soft"/>`
59538
+ `<feGaussianBlur in="SourceGraphic" stdDeviation="${num5(effects.softEdge / 2)}" result="soft"/>`
58813
59539
  );
58814
59540
  }
58815
59541
  if (parts.length === 0) {
@@ -58832,8 +59558,8 @@ function shapeTileSvg(spec5) {
58832
59558
  const h = spec5.height - inset3 * 2 - (spec5.effects?.reflection ? h3(spec5) : 0);
58833
59559
  const paint = paintDefs(spec5.fill, `${id}-f`);
58834
59560
  const filter = filterDefs(spec5.effects, `${id}-x`);
58835
- const stroke = spec5.stroke && spec5.stroke.width > 0 ? ` stroke="${safeColor(spec5.stroke.color, "#000000")}" stroke-width="${num4(Math.min(spec5.stroke.width, 6))}"${spec5.stroke.opacity !== void 0 && spec5.stroke.opacity < 1 ? ` stroke-opacity="${num4(spec5.stroke.opacity)}"` : ""}${spec5.stroke.dash ? ` stroke-dasharray="${spec5.stroke.dash}"` : ""}` : "";
58836
- const fillOpacity = spec5.fill?.opacity !== void 0 && spec5.fill.opacity < 1 ? ` fill-opacity="${num4(spec5.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)}"` : "";
58837
59563
  const shape = geometryMarkup(
58838
59564
  spec5.geometry,
58839
59565
  inset3,
@@ -58846,8 +59572,8 @@ function shapeTileSvg(spec5) {
58846
59572
  if (spec5.effects?.reflection) {
58847
59573
  const r = spec5.effects.reflection;
58848
59574
  const gy = inset3 + h + r.distance;
58849
- body += `<g opacity="${num4(r.startOpacity)}" transform="translate(0 ${num4(gy * 2)}) scale(1 -1)" mask="url(#${id}-m)">${geometryMarkup(spec5.geometry, inset3, inset3, w, h, `fill="${paint.fill}"${stroke}`)}</g>`;
58850
- paint.defs += `<linearGradient id="${id}-mg" x1="0" y1="0" x2="0" y2="1"><stop offset="0" stop-color="#fff"/><stop offset="${num4(r.endPosition)}" stop-color="#fff" stop-opacity="0"/></linearGradient><mask id="${id}-m"><rect x="0" y="${num4(gy)}" width="${spec5.width}" height="${num4(h)}" fill="url(#${id}-mg)"/></mask>`;
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>`;
58851
59577
  }
58852
59578
  if (spec5.effects?.shadow?.inner) {
58853
59579
  const s = spec5.effects.shadow;
@@ -58857,11 +59583,11 @@ function shapeTileSvg(spec5) {
58857
59583
  inset3 + s.dy / 2,
58858
59584
  w - Math.abs(s.dx),
58859
59585
  h - Math.abs(s.dy),
58860
- `fill="none" stroke="${safeColor(s.color, "#000000")}" stroke-opacity="${num4(s.opacity / 2)}" stroke-width="${num4(Math.max(1, s.blur / 2))}"`
59586
+ `fill="none" stroke="${safeColor(s.color, "#000000")}" stroke-opacity="${num5(s.opacity / 2)}" stroke-width="${num5(Math.max(1, s.blur / 2))}"`
58861
59587
  );
58862
59588
  }
58863
59589
  if (spec5.text) {
58864
- body += `<text x="${num4(inset3 + w / 2)}" y="${num4(inset3 + h / 2)}" text-anchor="middle" dominant-baseline="central" font-family="Calibri, Arial, sans-serif" font-size="${num4(Math.min(h * 0.55, 14))}" fill="${safeColor(spec5.text.color, "#000000")}">${escapeSvgText(spec5.text.value)}</text>`;
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>`;
58865
59591
  }
58866
59592
  return svgTile(spec5.width, spec5.height, paint.defs + filter.defs, body);
58867
59593
  }
@@ -58870,10 +59596,10 @@ function h3(spec5) {
58870
59596
  }
58871
59597
  function geometryMarkup(geometry, x, y, w, h, attrs) {
58872
59598
  if (geometry === "ellipse") {
58873
- return `<ellipse cx="${num4(x + w / 2)}" cy="${num4(y + h / 2)}" rx="${num4(w / 2)}" ry="${num4(h / 2)}" ${attrs}/>`;
59599
+ return `<ellipse cx="${num5(x + w / 2)}" cy="${num5(y + h / 2)}" rx="${num5(w / 2)}" ry="${num5(h / 2)}" ${attrs}/>`;
58874
59600
  }
58875
59601
  const r = geometry === "roundRect" ? Math.min(w, h) * 0.18 : 1.5;
58876
- return `<rect x="${num4(x)}" y="${num4(y)}" width="${num4(w)}" height="${num4(h)}" rx="${num4(r)}" ${attrs}/>`;
59602
+ return `<rect x="${num5(x)}" y="${num5(y)}" width="${num5(w)}" height="${num5(h)}" rx="${num5(r)}" ${attrs}/>`;
58877
59603
  }
58878
59604
  function tileSpecFromShapeStyle(id, style, size2, textColor) {
58879
59605
  const fill3 = style.fillMode === "none" ? void 0 : style.fillMode === "gradient" && style.fillGradientStops?.length ? {
@@ -58979,17 +59705,17 @@ function apply(itemId, ctx) {
58979
59705
  var BULLETS_GALLERY = { build, apply };
58980
59706
 
58981
59707
  // src/ribbon/color-preview.ts
58982
- var num5 = (value) => String(Math.round(value * 100) / 100);
59708
+ var num6 = (value) => String(Math.round(value * 100) / 100);
58983
59709
  function swatchStripSvg(colors, size2) {
58984
59710
  const w = size2.width / Math.max(colors.length, 1);
58985
59711
  const body = colors.map(
58986
- (color, i) => `<rect x="${num5(i * w)}" y="0" width="${num5(w)}" height="${size2.height}" fill="${safeColor(color, "#808080")}"/>`
59712
+ (color, i) => `<rect x="${num6(i * w)}" y="0" width="${num6(w)}" height="${size2.height}" fill="${safeColor(color, "#808080")}"/>`
58987
59713
  ).join("");
58988
59714
  return svgTile(size2.width, size2.height, "", body);
58989
59715
  }
58990
59716
 
58991
59717
  // src/chart/gallery-tiles.ts
58992
- function num6(value) {
59718
+ function num7(value) {
58993
59719
  return String(Math.round(value * 100) / 100);
58994
59720
  }
58995
59721
  var HEIGHTS = [0.55, 0.8, 0.4, 0.95, 0.7, 0.5];
@@ -59006,11 +59732,11 @@ function columnChartTileSvg(colors, size2) {
59006
59732
  const h = plotH * (HEIGHTS[(g + s * 2) % HEIGHTS.length] ?? 0.5);
59007
59733
  const x = pad + g * groupW + groupW * 0.1 + s * barW;
59008
59734
  bars.push(
59009
- `<rect x="${num6(x)}" y="${num6(pad + plotH - h)}" width="${num6(barW * 0.9)}" height="${num6(h)}" fill="${safeColor(color, "#808080")}"/>`
59735
+ `<rect x="${num7(x)}" y="${num7(pad + plotH - h)}" width="${num7(barW * 0.9)}" height="${num7(h)}" fill="${safeColor(color, "#808080")}"/>`
59010
59736
  );
59011
59737
  });
59012
59738
  }
59013
- const axis = `<line x1="${pad}" y1="${num6(pad + plotH)}" x2="${num6(pad + plotW)}" y2="${num6(pad + plotH)}" stroke="#A6A6A6" stroke-width="0.75"/>`;
59739
+ const axis = `<line x1="${pad}" y1="${num7(pad + plotH)}" x2="${num7(pad + plotW)}" y2="${num7(pad + plotH)}" stroke="#A6A6A6" stroke-width="0.75"/>`;
59014
59740
  const bg = `<rect x="0" y="0" width="${size2.width}" height="${size2.height}" fill="#FFFFFF"/>`;
59015
59741
  return svgTile(size2.width, size2.height, "", bg + bars.join("") + axis);
59016
59742
  }
@@ -59025,7 +59751,7 @@ function chartLayoutTileSvg(sketch, size2) {
59025
59751
  let left = 3;
59026
59752
  let right = size2.width - 3;
59027
59753
  const bar = (x, y, w2, h, color = INK) => parts.push(
59028
- `<rect x="${num6(x)}" y="${num6(y)}" width="${num6(w2)}" height="${num6(h)}" fill="${color}"/>`
59754
+ `<rect x="${num7(x)}" y="${num7(y)}" width="${num7(w2)}" height="${num7(h)}" fill="${color}"/>`
59029
59755
  );
59030
59756
  if (sketch.title) {
59031
59757
  bar(size2.width * 0.3, top, size2.width * 0.4, 3);
@@ -59048,7 +59774,7 @@ function chartLayoutTileSvg(sketch, size2) {
59048
59774
  const rows = 3;
59049
59775
  for (let r = 0; r < rows; r++) {
59050
59776
  parts.push(
59051
- `<rect x="${num6(left + 4)}" y="${num6(bottom - (rows - r) * 3)}" width="${num6(right - left - 4)}" height="3" fill="none" stroke="${INK}" stroke-width="0.5"/>`
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"/>`
59052
59778
  );
59053
59779
  }
59054
59780
  bottom -= rows * 3 + 2;
@@ -59070,7 +59796,7 @@ function chartLayoutTileSvg(sketch, size2) {
59070
59796
  for (let i = 0; i < lines; i++) {
59071
59797
  const y = top + plotH * i / lines;
59072
59798
  parts.push(
59073
- `<line x1="${num6(left)}" y1="${num6(y)}" x2="${num6(right)}" y2="${num6(y)}" stroke="#D9D9D9" stroke-width="${sketch.minorGridlines && i % 2 ? "0.4" : "0.7"}"/>`
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"}"/>`
59074
59800
  );
59075
59801
  }
59076
59802
  }
@@ -59084,7 +59810,7 @@ function chartLayoutTileSvg(sketch, size2) {
59084
59810
  }
59085
59811
  });
59086
59812
  parts.push(
59087
- `<line x1="${num6(left)}" y1="${num6(bottom)}" x2="${num6(right)}" y2="${num6(bottom)}" stroke="${INK}" stroke-width="0.6"/>`
59813
+ `<line x1="${num7(left)}" y1="${num7(bottom)}" x2="${num7(right)}" y2="${num7(bottom)}" stroke="${INK}" stroke-width="0.6"/>`
59088
59814
  );
59089
59815
  return svgTile(size2.width, size2.height, "", parts.join(""));
59090
59816
  }
@@ -59221,21 +59947,21 @@ function coloursByPoint(chartData) {
59221
59947
  }
59222
59948
  function applyChartColorPalette(chartData, palette, ctx) {
59223
59949
  const scheme = galleryColorScheme(ctx);
59224
- const cleared = chartData.series.map(clearSeriesColor);
59950
+ const cleared2 = chartData.series.map(clearSeriesColor);
59225
59951
  if (coloursByPoint(chartData)) {
59226
59952
  const count = Math.max(chartData.categories.length, 1);
59227
59953
  return {
59228
59954
  ...chartData,
59229
- series: cleared,
59955
+ series: cleared2,
59230
59956
  colorPalette: chart.chartPaletteColors(palette, count, scheme),
59231
59957
  colorMethod: "cycle"
59232
59958
  };
59233
59959
  }
59234
- const colors = chart.chartPaletteColors(palette, cleared.length, scheme);
59960
+ const colors = chart.chartPaletteColors(palette, cleared2.length, scheme);
59235
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;
59236
59962
  return {
59237
59963
  ...chartData,
59238
- series: cleared.map((series, i) => ({ ...series, color: colors[i] })),
59964
+ series: cleared2.map((series, i) => ({ ...series, color: colors[i] })),
59239
59965
  colorPalette: base2.length ? base2 : colors,
59240
59966
  colorMethod: palette.meth === "withinLinear" ? "withinLinear" : "cycle"
59241
59967
  };
@@ -59929,7 +60655,7 @@ var PICTURE_CORRECTIONS_GALLERY = adjustGalleryModule(
59929
60655
 
59930
60656
  // src/pptx/render/ribbon-galleries/picture-style-tile-svg.ts
59931
60657
  var PICTURE_STYLE_TILE = { width: 64, height: 52 };
59932
- function num7(value) {
60658
+ function num8(value) {
59933
60659
  return String(Math.round(value * 100) / 100);
59934
60660
  }
59935
60661
  function geometryPath(geom, x, y, w, h) {
@@ -59938,32 +60664,32 @@ function geometryPath(geom, x, y, w, h) {
59938
60664
  switch (geom) {
59939
60665
  case "ellipse":
59940
60666
  return box(
59941
- `M${num7(x)} ${num7(y + h / 2)} A${num7(w / 2)} ${num7(h / 2)} 0 1 0 ${num7(x + w)} ${num7(y + h / 2)}
59942
- A${num7(w / 2)} ${num7(h / 2)} 0 1 0 ${num7(x)} ${num7(y + h / 2)} Z`
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`
59943
60669
  );
59944
60670
  case "roundRect": {
59945
60671
  const c = r * 0.14;
59946
60672
  return box(
59947
- `M${num7(x + c)} ${num7(y)} H${num7(x + w - c)} Q${num7(x + w)} ${num7(y)} ${num7(x + w)} ${num7(y + c)}
59948
- V${num7(y + h - c)} Q${num7(x + w)} ${num7(y + h)} ${num7(x + w - c)} ${num7(y + h)} H${num7(x + c)}
59949
- Q${num7(x)} ${num7(y + h)} ${num7(x)} ${num7(y + h - c)} V${num7(y + c)} Q${num7(x)} ${num7(y)} ${num7(x + c)} ${num7(y)} Z`
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`
59950
60676
  );
59951
60677
  }
59952
60678
  case "round2DiagRect": {
59953
60679
  const c = r * 0.17;
59954
60680
  return box(
59955
- `M${num7(x + c)} ${num7(y)} H${num7(x + w)} V${num7(y + h - c)} Q${num7(x + w)} ${num7(y + h)} ${num7(x + w - c)} ${num7(y + h)}
59956
- H${num7(x)} V${num7(y + c)} Q${num7(x)} ${num7(y)} ${num7(x + c)} ${num7(y)} Z`
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`
59957
60683
  );
59958
60684
  }
59959
60685
  case "snip2DiagRect": {
59960
60686
  const c = r * 0.17;
59961
60687
  return box(
59962
- `M${num7(x)} ${num7(y)} H${num7(x + w - c)} L${num7(x + w)} ${num7(y + c)} V${num7(y + h)} H${num7(x + c)} L${num7(x)} ${num7(y + h - c)} Z`
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`
59963
60689
  );
59964
60690
  }
59965
60691
  default:
59966
- return `M${num7(x)} ${num7(y)} H${num7(x + w)} V${num7(y + h)} H${num7(x)} Z`;
60692
+ return `M${num8(x)} ${num8(y)} H${num8(x + w)} V${num8(y + h)} H${num8(x)} Z`;
59967
60693
  }
59968
60694
  }
59969
60695
  function tiltTransform(spec5, cx, cy) {
@@ -59973,13 +60699,13 @@ function tiltTransform(spec5, cx, cy) {
59973
60699
  }
59974
60700
  const rev = scene.rot?.[2] ?? 0;
59975
60701
  if (scene.camera === "orthographicFront") {
59976
- return rev ? ` transform="rotate(${num7(rev / 6e4)} ${num7(cx)} ${num7(cy)})"` : "";
60702
+ return rev ? ` transform="rotate(${num8(rev / 6e4)} ${num8(cx)} ${num8(cy)})"` : "";
59977
60703
  }
59978
60704
  const lon = scene.rot?.[1] ?? 0;
59979
60705
  const skew = lon > 108e5 ? 8 : lon > 0 ? -8 : 0;
59980
60706
  const lat = scene.rot?.[0] ?? 0;
59981
60707
  const squash = lat > 108e5 ? 0.9 : 1;
59982
- return ` transform="translate(${num7(cx)} ${num7(cy)}) skewY(${skew}) scale(1 ${squash}) translate(${num7(-cx)} ${num7(-cy)})"`;
60708
+ return ` transform="translate(${num8(cx)} ${num8(cy)}) skewY(${skew}) scale(1 ${squash}) translate(${num8(-cx)} ${num8(-cy)})"`;
59983
60709
  }
59984
60710
  function pictureStyleTileSvg(spec5) {
59985
60711
  const id = svgId(`gps-${spec5.key}`);
@@ -59999,21 +60725,21 @@ function pictureStyleTileSvg(spec5) {
59999
60725
  const opacity = alpha ? Number(alpha[1]) / 1e5 : 1;
60000
60726
  const rad = (spec5.outer.dir ?? 0) / 6e4 * Math.PI / 180;
60001
60727
  const dist2 = Math.min(3, (spec5.outer.dist ?? 0) / 38100);
60002
- defs += `<filter id="${id}-f" x="-40%" y="-40%" width="180%" height="180%"><feDropShadow dx="${num7(Math.cos(rad) * dist2)}" dy="${num7(Math.sin(rad) * dist2)}" stdDeviation="${num7(Math.min(3, spec5.outer.blur / 63500))}" flood-color="#000000" flood-opacity="${num7(Math.min(0.8, opacity + 0.2))}"/></filter>`;
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>`;
60003
60729
  filter = ` filter="url(#${id}-f)"`;
60004
60730
  } else if (spec5.softEdge !== void 0) {
60005
60731
  defs += `<filter id="${id}-f" x="-20%" y="-20%" width="140%" height="140%"><feGaussianBlur stdDeviation="2"/></filter>`;
60006
60732
  filter = ` filter="url(#${id}-f)"`;
60007
60733
  }
60008
- const photo = `<g clip-path="url(#${id}-c)"><rect x="${x}" y="${y}" width="${w}" height="${num7(h)}" fill="url(#${id}-s)"/><circle cx="${num7(x + w * 0.72)}" cy="${num7(y + h * 0.3)}" r="${num7(h * 0.13)}" fill="#ffd54a"/><path d="M${x} ${num7(y + h)} L${num7(x + w * 0.35)} ${num7(y + h * 0.5)} L${num7(x + w * 0.6)} ${num7(y + h * 0.75)} L${num7(x + w * 0.78)} ${num7(y + h * 0.55)} L${num7(x + w)} ${num7(y + h * 0.8)} V${num7(y + h)} Z" fill="#4c9a4a"/></g>`;
60009
- const frame = spec5.line ? `<path d="${outline}" fill="none" stroke="${safeColor(spec5.line.color, "#000000")}" stroke-width="${num7(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"/>` : ""}` : "";
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"/>` : ""}` : "";
60010
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)"/>` : "";
60011
60737
  const body = `${photo}${frame}${bevel}`;
60012
60738
  let out = `<g${tiltTransform(spec5, width / 2, y + h / 2)}><g${filter}>${body}</g>`;
60013
60739
  if (reflect) {
60014
60740
  const gy = y + h + 1;
60015
- defs += `<linearGradient id="${id}-rg" x1="0" y1="0" x2="0" y2="1"><stop offset="0" stop-color="#fff" stop-opacity="${num7((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="${num7(gy)}" width="${width}" height="${num7(h)}" fill="url(#${id}-rg)"/></mask>`;
60016
- out += `<g mask="url(#${id}-m)"><g transform="translate(0 ${num7(gy * 2)}) scale(1 -1)">${body}</g></g>`;
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>`;
60017
60743
  }
60018
60744
  out += "</g>";
60019
60745
  return svgTile(width, height, defs, out);
@@ -61163,7 +61889,7 @@ function hasReflection(style) {
61163
61889
  }
61164
61890
 
61165
61891
  // src/pptx/render/ribbon-galleries/effect-tile-svg.ts
61166
- function num8(value) {
61892
+ function num9(value) {
61167
61893
  return String(Math.round(value * 100) / 100);
61168
61894
  }
61169
61895
  var BEVEL_PROFILES = {
@@ -61190,8 +61916,8 @@ function bevelTileSvg(id, preset2, color, size2) {
61190
61916
  const [lit, dark] = profile.inverted ? ["#000000", "#ffffff"] : ["#ffffff", "#000000"];
61191
61917
  const fill3 = safeColor(color, "#4472c4");
61192
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>`;
61193
- const ring = (d) => `<rect x="${num8(inset3 + d)}" y="${num8(inset3 + d)}" width="${num8(w - d * 2)}" height="${num8(h - d * 2)}" fill="none" stroke="url(#${sid}-l)" stroke-width="${num8(rim)}"/>`;
61194
- let body = `<rect x="${inset3}" y="${inset3}" width="${num8(w)}" height="${num8(h)}" fill="${fill3}"/>`;
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}"/>`;
61195
61921
  body += ring(rim / 2);
61196
61922
  if (profile.double) {
61197
61923
  body += ring(rim * 1.6);
@@ -61228,7 +61954,7 @@ function rotationTileSvg(preset2, color, size2) {
61228
61954
  [1, -1],
61229
61955
  [1, 1],
61230
61956
  [-1, 1]
61231
- ].map(([x, y]) => `${num8(cx + (a * x + c * y) * half)},${num8(cy + (b * x + d * y) * half)}`);
61957
+ ].map(([x, y]) => `${num9(cx + (a * x + c * y) * half)},${num9(cy + (b * x + d * y) * half)}`);
61232
61958
  const fill3 = safeColor(color, "#4472c4");
61233
61959
  return svgTile(
61234
61960
  size2.width,
@@ -62931,7 +63657,7 @@ function tableStyleTileOptions(tableData) {
62931
63657
  bandedColumns: Boolean(tableData.bandedColumns)
62932
63658
  };
62933
63659
  }
62934
- function num9(value) {
63660
+ function num10(value) {
62935
63661
  return String(Math.round(value * 100) / 100);
62936
63662
  }
62937
63663
  function cellFill(css) {
@@ -62971,7 +63697,7 @@ function tableStyleTileSvg(styleId, colorScheme, size2, options = DEFAULT_OPTION
62971
63697
  const stroke = tileBorderStroke(value);
62972
63698
  if (stroke) {
62973
63699
  lines.push(
62974
- `<line x1="${num9(x1)}" y1="${num9(y1)}" x2="${num9(x2)}" y2="${num9(y2)}" stroke="${stroke.color}" stroke-width="${num9(stroke.width)}"/>`
63700
+ `<line x1="${num10(x1)}" y1="${num10(y1)}" x2="${num10(x2)}" y2="${num10(y2)}" stroke="${stroke.color}" stroke-width="${num10(stroke.width)}"/>`
62975
63701
  );
62976
63702
  }
62977
63703
  };
@@ -62983,13 +63709,13 @@ function tableStyleTileSvg(styleId, colorScheme, size2, options = DEFAULT_OPTION
62983
63709
  const fill3 = cellFill(css);
62984
63710
  if (fill3 !== "none") {
62985
63711
  fills.push(
62986
- `<rect x="${num9(x)}" y="${num9(y)}" width="${num9(cw)}" height="${num9(rh)}" fill="${fill3}"/>`
63712
+ `<rect x="${num10(x)}" y="${num10(y)}" width="${num10(cw)}" height="${num10(rh)}" fill="${fill3}"/>`
62987
63713
  );
62988
63714
  }
62989
63715
  const text4 = safeColor(typeof css.color === "string" ? css.color : void 0, "#000000");
62990
63716
  const bold = css.fontWeight === 700;
62991
63717
  fills.push(
62992
- `<rect x="${num9(x + cw * 0.25)}" y="${num9(y + rh * 0.42)}" width="${num9(cw * 0.5)}" height="${num9(Math.max(rh * 0.16, 0.8))}" fill="${text4}" opacity="${bold ? "0.9" : "0.55"}"/>`
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"}"/>`
62993
63719
  );
62994
63720
  edge(x, y, x + cw, y, css.borderTop);
62995
63721
  edge(x, y + rh, x + cw, y + rh, css.borderBottom);
@@ -63403,7 +64129,7 @@ var THEME_COLORS_GALLERY = {
63403
64129
  };
63404
64130
  var TILE8 = { width: 52, height: 36 };
63405
64131
  var LABEL_KEY = "pptx.gallery.themeBackgrounds.style";
63406
- function num10(value) {
64132
+ function num11(value) {
63407
64133
  return String(Math.round(value * 100) / 100);
63408
64134
  }
63409
64135
  function presetSlot(preset2) {
@@ -63424,7 +64150,7 @@ function backgroundPaint(id, style, fallback) {
63424
64150
  const stops = style?.fillGradientStops ?? [];
63425
64151
  if (style?.fillMode === "gradient" && stops.length > 1) {
63426
64152
  const body = stops.map(
63427
- (stop) => `<stop offset="${num10(stop.position)}%" stop-color="${safeColor(stop.color, fallback)}"/>`
64153
+ (stop) => `<stop offset="${num11(stop.position)}%" stop-color="${safeColor(stop.color, fallback)}"/>`
63428
64154
  ).join("");
63429
64155
  if (style.fillGradientType === "radial") {
63430
64156
  return {
@@ -63436,7 +64162,7 @@ function backgroundPaint(id, style, fallback) {
63436
64162
  const x = Math.cos(rad) / 2;
63437
64163
  const y = Math.sin(rad) / 2;
63438
64164
  return {
63439
- defs: `<linearGradient id="${id}" x1="${num10(0.5 - x)}" y1="${num10(0.5 - y)}" x2="${num10(0.5 + x)}" y2="${num10(0.5 + y)}">${body}</linearGradient>`,
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>`,
63440
64166
  fill: `url(#${id})`
63441
64167
  };
63442
64168
  }
@@ -63530,7 +64256,7 @@ var THEME_BACKGROUNDS_GALLERY = {
63530
64256
  var TILE9 = { width: 76, height: 42 };
63531
64257
  var SCHEME_LABEL_KEY2 = "pptx.gallery.themeEffects.scheme";
63532
64258
  var CELLS = [0, 1, 2];
63533
- function num11(value) {
64259
+ function num12(value) {
63534
64260
  return String(Math.round(value * 100) / 100);
63535
64261
  }
63536
64262
  function styleXml(idx, accent) {
@@ -63555,7 +64281,7 @@ function sampleShape(id, style, x, size2) {
63555
64281
  fillId
63556
64282
  );
63557
64283
  const strokeWidth = Math.min(Math.max(style.strokeWidth ?? 0, 0), 4);
63558
- const stroke = strokeWidth > 0 && style.strokeColor && style.strokeColor !== "transparent" ? ` stroke="${safeColor(style.strokeColor, "#000000")}" stroke-width="${num11(Math.max(1, strokeWidth))}"` : "";
64284
+ const stroke = strokeWidth > 0 && style.strokeColor && style.strokeColor !== "transparent" ? ` stroke="${safeColor(style.strokeColor, "#000000")}" stroke-width="${num12(Math.max(1, strokeWidth))}"` : "";
63559
64285
  let defs = paint.defs;
63560
64286
  let filter = "";
63561
64287
  if (style.shadowColor) {
@@ -63563,11 +64289,11 @@ function sampleShape(id, style, x, size2) {
63563
64289
  const dx = Math.max(-3, Math.min(3, style.shadowOffsetX ?? 0));
63564
64290
  const dy = Math.max(-3, Math.min(3, style.shadowOffsetY ?? 2));
63565
64291
  const blur = Math.min(style.shadowBlur ?? 3, 4) / 2;
63566
- defs += `<filter id="${shadowId}" x="-30%" y="-30%" width="160%" height="170%"><feDropShadow dx="${num11(dx)}" dy="${num11(dy)}" stdDeviation="${num11(blur)}" flood-color="${safeColor(style.shadowColor, "#000000")}" flood-opacity="${num11(style.shadowOpacity ?? 0.4)}"/></filter>`;
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>`;
63567
64293
  filter = ` filter="url(#${shadowId})"`;
63568
64294
  }
63569
- const fillOpacity = !gradient && style.fillOpacity !== void 0 && style.fillOpacity < 1 ? ` fill-opacity="${num11(style.fillOpacity)}"` : "";
63570
- const rect3 = `<rect x="${num11(x)}" y="${num11(TILE9.height / 2 - size2 / 2 - 2)}" width="${num11(size2)}" height="${num11(size2)}" rx="3" fill="${paint.fill}"${fillOpacity}${stroke}${filter}/>`;
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}/>`;
63571
64297
  return `${defs ? `<defs>${defs}</defs>` : ""}${rect3}`;
63572
64298
  }
63573
64299
  function effectSchemeTileSvg(schemeId, ctx, accent = "accent1") {
@@ -63989,7 +64715,7 @@ var THEME_FONTS_GALLERY = {
63989
64715
  };
63990
64716
 
63991
64717
  // src/pptx/render/ribbon-galleries/wordart-preview-svg.ts
63992
- function num12(value) {
64718
+ function num13(value) {
63993
64719
  return String(Math.round(value * 100) / 100);
63994
64720
  }
63995
64721
  function paintOf(style) {
@@ -64014,9 +64740,9 @@ function effectFilter(style, id) {
64014
64740
  if (style.textGlowColor) {
64015
64741
  const r = Math.min(3, (style.textGlowRadius ?? 4) / 2);
64016
64742
  parts.push(
64017
- `<feMorphology in="SourceAlpha" operator="dilate" radius="${num12(r / 2)}" result="gd"/>`,
64018
- `<feGaussianBlur in="gd" stdDeviation="${num12(r / 2)}" result="gb"/>`,
64019
- `<feFlood flood-color="${safeColor(style.textGlowColor, "#000000")}" flood-opacity="${num12(Math.min(0.8, (style.textGlowOpacity ?? 0.4) + 0.2))}"/>`,
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))}"/>`,
64020
64746
  '<feComposite in2="gb" operator="in" result="glow"/>'
64021
64747
  );
64022
64748
  merge.push('<feMergeNode in="glow"/>');
@@ -64024,7 +64750,7 @@ function effectFilter(style, id) {
64024
64750
  if (style.textShadowColor) {
64025
64751
  const clamp12 = (v) => Math.max(-2, Math.min(2, (v ?? 0) / 2));
64026
64752
  parts.push(
64027
- `<feDropShadow dx="${num12(clamp12(style.textShadowOffsetX))}" dy="${num12(clamp12(style.textShadowOffsetY))}" stdDeviation="${num12(Math.min(1.5, (style.textShadowBlur ?? 2) / 4))}" flood-color="${safeColor(style.textShadowColor, "#000000")}" flood-opacity="${num12(style.textShadowOpacity ?? 1)}" result="shadow"/>`
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"/>`
64028
64754
  );
64029
64755
  merge.push('<feMergeNode in="shadow"/>');
64030
64756
  } else {
@@ -64042,13 +64768,13 @@ function wordArtTileSvg(rawId, style, size2) {
64042
64768
  const id = svgId(rawId);
64043
64769
  const paint = paintDefs(paintOf(style), `${id}-f`);
64044
64770
  const filter = effectFilter(style, `${id}-x`);
64045
- const stroke = style.textOutlineColor && (style.textOutlineWidth ?? 1) > 0 ? ` stroke="${safeColor(style.textOutlineColor, "#000000")}" stroke-width="${num12(Math.min(1.2, Math.max(0.4, (style.textOutlineWidth ?? 1) / 2)))}"` : "";
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)))}"` : "";
64046
64772
  const fontSize = Math.round(size2.height * 0.46);
64047
64773
  const baseline = style.textReflection ? size2.height * 0.56 : size2.height * 0.66;
64048
- const text4 = (attrs) => `<text x="${num12(size2.width / 2)}" y="${num12(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>`;
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>`;
64049
64775
  let body = text4(filter.attr);
64050
64776
  if (style.textReflection) {
64051
- body += `<g opacity="${num12(Math.min(0.5, style.textReflectionStartOpacity ?? 0.4))}" transform="translate(0 ${num12(baseline * 2 + 2)}) scale(1 -1)">${text4("")}</g>`;
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>`;
64052
64778
  }
64053
64779
  return svgTile(size2.width, size2.height, paint.defs + filter.defs, body);
64054
64780
  }
@@ -65253,23 +65979,47 @@ function previewGalleryResult(result, base2, handler, target) {
65253
65979
  return void 0;
65254
65980
  }
65255
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
+ }
65256
65995
  async function commitGalleryResult(result, base2, handler, target) {
65257
65996
  if (!handler) {
65258
65997
  return void 0;
65259
65998
  }
65260
65999
  switch (result.kind) {
65261
66000
  case "theme": {
65262
- await handler.applyTheme(result.colorScheme, result.fontScheme, result.name);
66001
+ await queueThemeWrite(
66002
+ handler,
66003
+ () => handler.applyTheme(result.colorScheme, result.fontScheme, result.name)
66004
+ );
65263
66005
  return previewGalleryResult(result, base2, handler, target);
65264
66006
  }
65265
66007
  case "themeColorScheme":
65266
- await handler.updateThemeColorScheme(result.colorScheme);
66008
+ await queueThemeWrite(handler, () => handler.updateThemeColorScheme(result.colorScheme));
65267
66009
  return previewGalleryResult(result, base2, handler, target);
65268
66010
  case "themeFontScheme":
65269
- await handler.updateThemeFontScheme(result.fontScheme);
66011
+ await queueThemeWrite(handler, () => handler.updateThemeFontScheme(result.fontScheme));
65270
66012
  return previewGalleryResult(result, base2, handler, target);
65271
66013
  case "themeEffects": {
65272
- const scheme = result.schemeId ? await handler.applyThemeEffectScheme(result.schemeId) : result.fmtSchemeXml ? await handler.applyThemeFormatSchemeXml(result.fmtSchemeXml) : void 0;
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
+ });
65273
66023
  if (!scheme) {
65274
66024
  return void 0;
65275
66025
  }
@@ -65413,6 +66163,111 @@ function createDeckStyleHost(options) {
65413
66163
  }
65414
66164
  };
65415
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
+ }
65416
66271
  var RIBBON_ADD_IN_TAB_ATTR = "data-ribbon-add-in-tab";
65417
66272
  var RIBBON_RESERVED_TAB_IDS = [
65418
66273
  ...TOOLBAR_TABS.map((tab) => tab.id),
@@ -67218,8 +68073,8 @@ function fractionalAxis(client, offset, rect3, borderStart, borderEnd, cssSize,
67218
68073
  }
67219
68074
  const local = bordersKnown ? localBorderBox(cssSize, boxSizing, borders, paddingStart, paddingEnd) : void 0;
67220
68075
  if (local) {
67221
- const plain = !zoomed && Number.isFinite(rect3) && rect3 >= local.low && rect3 <= local.high;
67222
- if (plain) {
68076
+ const plain2 = !zoomed && Number.isFinite(rect3) && rect3 >= local.low && rect3 <= local.high;
68077
+ if (plain2) {
67223
68078
  const size2 = local.exact ? Math.min(rect3, local.floor + LAYOUT_UNIT) : local.floor;
67224
68079
  return Math.max(0, size2 - borders);
67225
68080
  }
@@ -68203,7 +69058,7 @@ var EDIT_POINTS_STYLE = {
68203
69058
  handleSize: 7,
68204
69059
  hitStrokeWidth: 10
68205
69060
  };
68206
- function num13(value) {
69061
+ function num14(value) {
68207
69062
  return String(Math.round(value * 100) / 100);
68208
69063
  }
68209
69064
  function segmentD(frame, geometry, s, i) {
@@ -68212,17 +69067,17 @@ function segmentD(frame, geometry, s, i) {
68212
69067
  const p0 = editLocalToSlide(frame, sub.nodes[i]);
68213
69068
  const p3 = editLocalToSlide(frame, sub.nodes[segmentEndIndex(sub, i)]);
68214
69069
  if (seg.kind === "line") {
68215
- return `M ${num13(p0.x)} ${num13(p0.y)} L ${num13(p3.x)} ${num13(p3.y)}`;
69070
+ return `M ${num14(p0.x)} ${num14(p0.y)} L ${num14(p3.x)} ${num14(p3.y)}`;
68216
69071
  }
68217
69072
  const c1 = editLocalToSlide(frame, seg.c1);
68218
69073
  const c2 = editLocalToSlide(frame, seg.c2);
68219
- return `M ${num13(p0.x)} ${num13(p0.y)} C ${num13(c1.x)} ${num13(c1.y)} ${num13(c2.x)} ${num13(c2.y)} ${num13(p3.x)} ${num13(p3.y)}`;
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)}`;
68220
69075
  }
68221
69076
  function editGeometryToSlidePath(frame, geometry) {
68222
69077
  const parts = [];
68223
69078
  const at = (p) => {
68224
69079
  const s = editLocalToSlide(frame, p);
68225
- return `${num13(s.x)} ${num13(s.y)}`;
69080
+ return `${num14(s.x)} ${num14(s.y)}`;
68226
69081
  };
68227
69082
  for (const sub of geometry.subpaths) {
68228
69083
  if (sub.nodes.length === 0) {
@@ -68983,7 +69838,7 @@ var HANDLE_ANCHORS = [
68983
69838
  ["sw", 0, 1],
68984
69839
  ["w", 0, 0.5]
68985
69840
  ];
68986
- function fmt5(n) {
69841
+ function fmt6(n) {
68987
69842
  return String(Math.round(n * 1e3) / 1e3);
68988
69843
  }
68989
69844
  function handleFor(id, fx2, fy, frameW, frameH, len, thick) {
@@ -68992,7 +69847,7 @@ function handleFor(id, fx2, fy, frameW, frameH, len, thick) {
68992
69847
  const height = fy === 0.5 ? len : isCorner ? len : thick;
68993
69848
  const left = fx2 === 0 ? 0 : fx2 === 1 ? frameW - width : frameW / 2 - width / 2;
68994
69849
  const top = fy === 0 ? 0 : fy === 1 ? frameH - height : frameH / 2 - height / 2;
68995
- let path = `M0 0 H${fmt5(width)} V${fmt5(height)} H0 Z`;
69850
+ let path = `M0 0 H${fmt6(width)} V${fmt6(height)} H0 Z`;
68996
69851
  if (isCorner) {
68997
69852
  const x0 = fx2 === 0 ? 0 : len;
68998
69853
  const y0 = fy === 0 ? 0 : len;
@@ -69006,7 +69861,7 @@ function handleFor(id, fx2, fy, frameW, frameH, len, thick) {
69006
69861
  [x0 + sx * thick, y0 + sy * len],
69007
69862
  [x0, y0 + sy * len]
69008
69863
  ];
69009
- path = `M${pts.map(([x, y]) => `${fmt5(x)} ${fmt5(y)}`).join(" L")} Z`;
69864
+ path = `M${pts.map(([x, y]) => `${fmt6(x)} ${fmt6(y)}`).join(" L")} Z`;
69010
69865
  }
69011
69866
  return { id, left, top, width, height, path, cursor: CURSORS[id] };
69012
69867
  }
@@ -69024,8 +69879,8 @@ function buildCropOverlay(el, zoom = 1) {
69024
69879
  };
69025
69880
  const hx = frame.x - image.x;
69026
69881
  const hy = frame.y - image.y;
69027
- const outer3 = `M0 0 H${fmt5(image.width)} V${fmt5(image.height)} H0 Z`;
69028
- const hole = `M${fmt5(hx)} ${fmt5(hy)} H${fmt5(hx + frame.width)} V${fmt5(hy + frame.height)} H${fmt5(hx)} Z`;
69882
+ const outer3 = `M0 0 H${fmt6(image.width)} V${fmt6(image.height)} H0 Z`;
69883
+ const hole = `M${fmt6(hx)} ${fmt6(hy)} H${fmt6(hx + frame.width)} V${fmt6(hy + frame.height)} H${fmt6(hx)} Z`;
69029
69884
  const flips = [
69030
69885
  start.flipHorizontal ? "scaleX(-1)" : "",
69031
69886
  start.flipVertical ? "scaleY(-1)" : ""
@@ -72634,6 +73489,14 @@ function sorterPasteInsertAt(indexes, active2, slideCount) {
72634
73489
  return Math.min(slideCount, Math.max(0, (indexes.at(-1) ?? active2) + 1));
72635
73490
  }
72636
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
+
72637
73500
  // src/pptx/render/viewer-root-options.ts
72638
73501
  var VIEWER_ROOT_OPTION_DEFAULTS = Object.freeze({
72639
73502
  initialSlide: 0,
@@ -76126,13 +76989,13 @@ function chartSpaceFormatSource(space, options = {}) {
76126
76989
  labelOptions: labels
76127
76990
  };
76128
76991
  }
76129
- var chartFormatLocale = (value) => i18n.normalizeLocale(value, chunkOOQMIQT3_cjs.CHART_FORMAT_LOCALES, "en");
76992
+ var chartFormatLocale = (value) => i18n.normalizeLocale(value, chunkGWKTHP6U_cjs.CHART_FORMAT_LOCALES, "en");
76130
76993
  function chartFormatTranslator(locale, override) {
76131
- const strings = chunkOOQMIQT3_cjs.CHART_FORMAT_STRINGS[chartFormatLocale(locale)];
76994
+ const strings = chunkGWKTHP6U_cjs.CHART_FORMAT_STRINGS[chartFormatLocale(locale)];
76132
76995
  return (key, params, fallback) => {
76133
76996
  const own = override?.(key, params, fallback);
76134
76997
  if (own && own !== key) return own;
76135
- return strings[key] ?? chunkOOQMIQT3_cjs.CHART_FORMAT_STRINGS.en[key] ?? key;
76998
+ return strings[key] ?? chunkGWKTHP6U_cjs.CHART_FORMAT_STRINGS.en[key] ?? key;
76136
76999
  };
76137
77000
  }
76138
77001
 
@@ -81227,7 +82090,7 @@ function definePptxInsertSmartArtDialog(registry2) {
81227
82090
  if (this.#live || this.#draw) {
81228
82091
  return;
81229
82092
  }
81230
- this.#live = import('./smartart-insert-preview-TYCMBIUH.cjs').then((module) => {
82093
+ this.#live = import('./smartart-insert-preview-AERZURUO.cjs').then((module) => {
81231
82094
  if (this.#draw || !this.#picker) {
81232
82095
  return;
81233
82096
  }
@@ -87361,7 +88224,7 @@ function sanitizeSlideSvg(svg2, width, height) {
87361
88224
  if (!isSafeSvgMarkup(svg2)) {
87362
88225
  return "";
87363
88226
  }
87364
- const sanitized = chunkX4FNVH7J_cjs.sanitizeMarkupOrEmpty(svg2, { USE_PROFILES: { svg: true } }).trim();
88227
+ const sanitized = chunkYMITEJST_cjs.sanitizeMarkupOrEmpty(svg2, { USE_PROFILES: { svg: true } }).trim();
87365
88228
  if (!sanitized || sanitized.toLowerCase().startsWith("<svg")) {
87366
88229
  return sanitized;
87367
88230
  }
@@ -87874,6 +88737,119 @@ function openPrintWindow(htmlDocument) {
87874
88737
  return true;
87875
88738
  }
87876
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
+
87877
88853
  // src/pptx/export/png-crc32.ts
87878
88854
  var table;
87879
88855
  function getTable() {
@@ -89015,34 +89991,6 @@ Object.defineProperty(exports, "cloneXmlObject", {
89015
89991
  enumerable: true,
89016
89992
  get: function () { return clone.cloneXmlObject; }
89017
89993
  });
89018
- Object.defineProperty(exports, "formatCommentTimestamp", {
89019
- enumerable: true,
89020
- get: function () { return element.formatCommentTimestamp; }
89021
- });
89022
- Object.defineProperty(exports, "getCommentMarkerPosition", {
89023
- enumerable: true,
89024
- get: function () { return element.getCommentMarkerPosition; }
89025
- });
89026
- Object.defineProperty(exports, "getConnectionSitePosition", {
89027
- enumerable: true,
89028
- get: function () { return element.getConnectionSitePosition; }
89029
- });
89030
- Object.defineProperty(exports, "getElementLabel", {
89031
- enumerable: true,
89032
- get: function () { return element.getElementLabel; }
89033
- });
89034
- Object.defineProperty(exports, "isEditableTextElement", {
89035
- enumerable: true,
89036
- get: function () { return element.isEditableTextElement; }
89037
- });
89038
- Object.defineProperty(exports, "isTemplateElement", {
89039
- enumerable: true,
89040
- get: function () { return element.isTemplateElement; }
89041
- });
89042
- Object.defineProperty(exports, "isTemplateElementId", {
89043
- enumerable: true,
89044
- get: function () { return element.isTemplateElementId; }
89045
- });
89046
89994
  Object.defineProperty(exports, "CANVAS_SENTINEL", {
89047
89995
  enumerable: true,
89048
89996
  get: function () { return geometry.CANVAS_SENTINEL; }
@@ -89831,10 +90779,6 @@ Object.defineProperty(exports, "recoverySnapshotIntent", {
89831
90779
  enumerable: true,
89832
90780
  get: function () { return deckSaveEncryption.recoverySnapshotIntent; }
89833
90781
  });
89834
- Object.defineProperty(exports, "saveDeckWithPassword", {
89835
- enumerable: true,
89836
- get: function () { return deckSaveEncryption.saveDeckWithPassword; }
89837
- });
89838
90782
  Object.defineProperty(exports, "applyTableStyleDelete", {
89839
90783
  enumerable: true,
89840
90784
  get: function () { return tableStyleMapEdits.applyTableStyleDelete; }
@@ -90514,6 +91458,7 @@ exports.TEXT_BOX_SECTION = TEXT_BOX_SECTION;
90514
91458
  exports.TEXT_BOX_SECTIONS = TEXT_BOX_SECTIONS;
90515
91459
  exports.TEXT_BUILD_ID_SEP = TEXT_BUILD_ID_SEP;
90516
91460
  exports.TEXT_DIRECTION_OPTIONS = TEXT_DIRECTION_OPTIONS;
91461
+ exports.TEXT_EFFECT_SECTIONS = TEXT_EFFECT_SECTIONS;
90517
91462
  exports.TEXT_WARP_PRESETS = TEXT_WARP_PRESETS;
90518
91463
  exports.TEXT_WRAP_OPTIONS = TEXT_WRAP_OPTIONS;
90519
91464
  exports.THREE_VIEW_EVENTS = THREE_VIEW_EVENTS;
@@ -90659,6 +91604,7 @@ exports.applyStyleToSelectedSegments = applyStyleToSelectedSegments;
90659
91604
  exports.applyTableCellFontWeight = applyTableCellFontWeight;
90660
91605
  exports.applyTableStylePreset = applyTableStylePreset;
90661
91606
  exports.applyTextStyleUpdate = applyTextStyleUpdate;
91607
+ exports.applyThemeByPath = applyThemeByPath;
90662
91608
  exports.applyTransitionSoundFile = applyTransitionSoundFile;
90663
91609
  exports.applyTransitionStockSound = applyTransitionStockSound;
90664
91610
  exports.applyUnderlineVariant = applyUnderlineVariant;
@@ -90803,6 +91749,7 @@ exports.buildOleObjectNamePatch = buildOleObjectNamePatch;
90803
91749
  exports.buildOpacityTavKeyframe = buildOpacityTavKeyframe;
90804
91750
  exports.buildOptionsBaseline = buildOptionsBaseline;
90805
91751
  exports.buildOutline = buildOutline;
91752
+ exports.buildOutlinePrintJobDocument = buildOutlinePrintJobDocument;
90806
91753
  exports.buildParagraphs = buildParagraphs;
90807
91754
  exports.buildPngChunk = buildPngChunk;
90808
91755
  exports.buildPptxOptionCategories = buildPptxOptionCategories;
@@ -90816,6 +91763,7 @@ exports.buildPrintStyleSheet = buildPrintStyleSheet;
90816
91763
  exports.buildQueryLinkUrl = buildQueryLinkUrl;
90817
91764
  exports.buildQuickStylesGallery = buildQuickStylesGallery;
90818
91765
  exports.buildRasterPictureElement = buildRasterPictureElement;
91766
+ exports.buildRasterPrintJobDocument = buildRasterPrintJobDocument;
90819
91767
  exports.buildRecordRibbon = buildRecordRibbon;
90820
91768
  exports.buildReviewRibbon = buildReviewRibbon;
90821
91769
  exports.buildRibbonGallery = buildRibbonGallery;
@@ -90871,6 +91819,7 @@ exports.buildTimeline = buildTimeline;
90871
91819
  exports.buildTitleBarState = buildTitleBarState;
90872
91820
  exports.buildTokenMorphAnimations = buildTokenMorphAnimations;
90873
91821
  exports.buildUserFontFaceStyles = buildUserFontFaceStyles;
91822
+ exports.buildVectorPrintJobDocument = buildVectorPrintJobDocument;
90874
91823
  exports.buildWarpPath = buildWarpPath;
90875
91824
  exports.buildWarpedGlyphOutlinePathD = buildWarpedGlyphOutlinePathD;
90876
91825
  exports.buildWrapperStyle = buildWrapperStyle;
@@ -91006,6 +91955,7 @@ exports.commitElementUpdateBatch = commitElementUpdateBatch;
91006
91955
  exports.commitGalleryResult = commitGalleryResult;
91007
91956
  exports.commitSmartArtNodeFill = commitSmartArtNodeFill;
91008
91957
  exports.commitSmartArtNodeText = commitSmartArtNodeText;
91958
+ exports.commitsThroughDeckStyle = commitsThroughDeckStyle;
91009
91959
  exports.comparePresentation = comparePresentation;
91010
91960
  exports.compareSlide = compareSlide;
91011
91961
  exports.compareSlides = compareSlides;
@@ -91140,6 +92090,7 @@ exports.cropResetState = cropResetState;
91140
92090
  exports.cropSessionChanged = cropSessionChanged;
91141
92091
  exports.cropToAspectRatio = cropToAspectRatio;
91142
92092
  exports.cropUpdateFromRects = cropUpdateFromRects;
92093
+ exports.crossedHistoryTheme = crossedHistoryTheme;
91143
92094
  exports.cssCdata = cssCdata;
91144
92095
  exports.cssEasingForAccelDecel = cssEasingForAccelDecel;
91145
92096
  exports.cssEasingForTimingCurve = cssEasingForTimingCurve;
@@ -91331,6 +92282,7 @@ exports.fontWeightAttribute = fontWeightAttribute;
91331
92282
  exports.fontWeightShorthand = fontWeightShorthand;
91332
92283
  exports.foreignObjectSvgToDataUrl = foreignObjectSvgToDataUrl;
91333
92284
  exports.forgetSessionDeck = forgetSessionDeck;
92285
+ exports.forgetStepsUsingRemovedParts = forgetStepsUsingRemovedParts;
91334
92286
  exports.formatAdvanceAfterText = formatAdvanceAfterText;
91335
92287
  exports.formatBackstageDate = formatBackstageDate;
91336
92288
  exports.formatBackstageSize = formatBackstageSize;
@@ -91347,6 +92299,7 @@ exports.formatSnapshotSize = formatSnapshotSize;
91347
92299
  exports.formatTime = formatTime;
91348
92300
  exports.formatVersionTimestamp = formatVersionTimestamp;
91349
92301
  exports.fractionalClientSize = fractionalClientSize;
92302
+ exports.frameSlideSvg = frameSlideSvg;
91350
92303
  exports.freeformCloseTolerance = freeformCloseTolerance;
91351
92304
  exports.galleryDeckView = galleryDeckView;
91352
92305
  exports.galleryHasItems = galleryHasItems;
@@ -91545,6 +92498,7 @@ exports.groupElementParagraphs = groupElementParagraphs;
91545
92498
  exports.groupIntoParagraphs = groupIntoParagraphs;
91546
92499
  exports.groupIssuesBySeverity = groupIssuesBySeverity;
91547
92500
  exports.groupParagraphsByBuildLevel = groupParagraphsByBuildLevel;
92501
+ exports.groupShortcutReference = groupShortcutReference;
91548
92502
  exports.groupTilesByRow = groupTilesByRow;
91549
92503
  exports.handleEditorAnchorClick = handleEditorAnchorClick;
91550
92504
  exports.handlePresentationStageClick = handlePresentationStageClick;
@@ -91574,6 +92528,8 @@ exports.hexToRgb = hexToRgb;
91574
92528
  exports.hiddenSlideCue = hiddenSlideCue;
91575
92529
  exports.hiddenSlideLabelId = hiddenSlideLabelId;
91576
92530
  exports.hideChartSeries = hideChartSeries;
92531
+ exports.historyStepUsesParts = historyStepUsesParts;
92532
+ exports.historyTheme = historyTheme;
91577
92533
  exports.hollowTextFillStyle = hollowTextFillStyle;
91578
92534
  exports.homeColourState = homeColourState;
91579
92535
  exports.homeControlKey = homeControlKey;
@@ -91612,6 +92568,7 @@ exports.insertControlStatus = insertControlStatus;
91612
92568
  exports.insertEntryEnabled = insertEntryEnabled;
91613
92569
  exports.insertHyperlinkAtSelection = insertHyperlinkAtSelection;
91614
92570
  exports.insertLabel = insertLabel;
92571
+ exports.insertedLayoutCompletion = insertedLayoutCompletion;
91615
92572
  exports.inspectorFieldPatch = inspectorFieldPatch;
91616
92573
  exports.inspectorNumber = inspectorNumber;
91617
92574
  exports.inspectorTogglePatch = inspectorTogglePatch;
@@ -91732,6 +92689,7 @@ exports.listenForOutlineViewDismiss = listenForOutlineViewDismiss;
91732
92689
  exports.loadAudienceContent = loadAudienceContent;
91733
92690
  exports.loadPresentationDeck = loadPresentationDeck;
91734
92691
  exports.loadSessionDeck = loadSessionDeck;
92692
+ exports.loadedThemeName = loadedThemeName;
91735
92693
  exports.lockResizeAspect = lockResizeAspect;
91736
92694
  exports.makeCloneId = makeCloneId;
91737
92695
  exports.mapAwarenessCursors = mapAwarenessCursors;
@@ -91848,6 +92806,7 @@ exports.nextShowSlideIndex = nextShowSlideIndex;
91848
92806
  exports.normalizeAccelDecel = normalizeAccelDecel;
91849
92807
  exports.normalizeArrow = normalizeArrow;
91850
92808
  exports.normalizeFontFormat = normalizeFontFormat;
92809
+ exports.normalizeGoogleFontsBaseUrl = normalizeGoogleFontsBaseUrl;
91851
92810
  exports.normalizeNotesLinkUrl = normalizeNotesLinkUrl;
91852
92811
  exports.normalizeOutlinePair = normalizeOutlinePair;
91853
92812
  exports.normalizeRegion = normalizeRegion;
@@ -91886,6 +92845,7 @@ exports.outgoingSegmentIndex = outgoingSegmentIndex;
91886
92845
  exports.outlineBounds = outlineBounds;
91887
92846
  exports.outlinePathData = outlinePathData;
91888
92847
  exports.outlineRowKey = outlineRowKey;
92848
+ exports.outlineStrokeJoin = outlineStrokeJoin;
91889
92849
  exports.overlayInlineTextSnapshot = overlayInlineTextSnapshot;
91890
92850
  exports.overlayMasterViewInlineSnapshot = overlayMasterViewInlineSnapshot;
91891
92851
  exports.overlayPointerInput = overlayPointerInput;
@@ -91945,6 +92905,7 @@ exports.placeTileOnPage = placeTileOnPage;
91945
92905
  exports.placeholderPromptDescriptor = placeholderPromptDescriptor;
91946
92906
  exports.planGifFrames = planGifFrames;
91947
92907
  exports.planMergeShapes = planMergeShapes;
92908
+ exports.planPrintJob = planPrintJob;
91948
92909
  exports.playAnimationRibbonPreview = playAnimationRibbonPreview;
91949
92910
  exports.playFeedbackSound = playFeedbackSound;
91950
92911
  exports.playGroup = playGroup;
@@ -91984,6 +92945,7 @@ exports.presenterTimerProgress = presenterTimerProgress;
91984
92945
  exports.previewGalleryResult = previewGalleryResult;
91985
92946
  exports.previousShowSlideIndex = previousShowSlideIndex;
91986
92947
  exports.primaryMasterViewPart = primaryMasterViewPart;
92948
+ exports.printJobRasterFallback = printJobRasterFallback;
91987
92949
  exports.probeAutosaveRecovery = probeAutosaveRecovery;
91988
92950
  exports.probeMaxCanvasDimension = probeMaxCanvasDimension;
91989
92951
  exports.probeNativeImageSize = probeNativeImageSize;
@@ -91998,6 +92960,7 @@ exports.pushRecentColor = pushRecentColor;
91998
92960
  exports.pushRecentShape = pushRecentShape;
91999
92961
  exports.px = px2;
92000
92962
  exports.quadToCubicControls = quadToCubicControls;
92963
+ exports.queueThemeWrite = queueThemeWrite;
92001
92964
  exports.quickStyleShapeStyle = quickStyleShapeStyle;
92002
92965
  exports.quickStyleSwatchCss = quickStyleSwatchCss;
92003
92966
  exports.quickStyleSwatchStyleAttr = quickStyleSwatchStyleAttr;
@@ -92069,6 +93032,7 @@ exports.removeEmptyNode = removeEmptyNode;
92069
93032
  exports.removeGradientStopPatch = removeGradientStopPatch;
92070
93033
  exports.removeGuide = removeGuide;
92071
93034
  exports.removeQuickAccessCommand = removeQuickAccessCommand;
93035
+ exports.removedSlideMasterParts = removedSlideMasterParts;
92072
93036
  exports.renderSparklineSvg = renderSparklineSvg;
92073
93037
  exports.renderedImageCorrections = renderedImageCorrections;
92074
93038
  exports.reorder = reorder;
@@ -92148,6 +93112,7 @@ exports.resolveFontRefIdx = resolveFontRefIdx;
92148
93112
  exports.resolveFontVariant = resolveFontVariant;
92149
93113
  exports.resolveFontWeight = resolveFontWeight;
92150
93114
  exports.resolveForwardSlideWithZoomReturn = resolveForwardSlideWithZoomReturn;
93115
+ exports.resolveGoogleFontsCss2Base = resolveGoogleFontsCss2Base;
92151
93116
  exports.resolveGoogleFontsFace = resolveGoogleFontsFace;
92152
93117
  exports.resolveGoogleWebfontHref = resolveGoogleWebfontHref;
92153
93118
  exports.resolveGroupChildFill = resolveGroupChildFill;
@@ -92253,6 +93218,7 @@ exports.resolveVisibleRibbonTabs = resolveVisibleRibbonTabs;
92253
93218
  exports.resolveWheelSpokeCount = resolveWheelSpokeCount;
92254
93219
  exports.resolveZoomExcursionEndIndex = resolveZoomExcursionEndIndex;
92255
93220
  exports.resolveZoomNavigationTarget = resolveZoomNavigationTarget;
93221
+ exports.restoreCrossedTheme = restoreCrossedTheme;
92256
93222
  exports.restoreEditorKeyboardFocus = restoreEditorKeyboardFocus;
92257
93223
  exports.restoreFilteredSeries = restoreFilteredSeries;
92258
93224
  exports.restoreInlineListBodySelection = restoreInlineListBodySelection;
@@ -92312,6 +93278,7 @@ exports.sanitizePresence = sanitizePresence;
92312
93278
  exports.sanitizeSlideIndex = sanitizeSlideIndex;
92313
93279
  exports.sanitizeUserName = sanitizeUserName;
92314
93280
  exports.saveAutosaveSnapshot = saveAutosaveSnapshot;
93281
+ exports.saveDeckWithPassword = saveDeckWithPassword;
92315
93282
  exports.saveElementAsPicture = saveElementAsPicture;
92316
93283
  exports.saveFailureMessage = saveFailureMessage;
92317
93284
  exports.saveViewerProfile = saveViewerProfile;
@@ -92361,6 +93328,7 @@ exports.setPendingCaretPoint = setPendingCaretPoint;
92361
93328
  exports.setPendingSelectionRestore = setPendingSelectionRestore;
92362
93329
  exports.setSelectionBullets = setSelectionBullets;
92363
93330
  exports.setTriggerBookmark = setTriggerBookmark;
93331
+ exports.settleThemeWrites = settleThemeWrites;
92364
93332
  exports.shapeFillChange = shapeFillChange;
92365
93333
  exports.shapeGalleryItem = shapeGalleryItem;
92366
93334
  exports.shapeGalleryItemForValue = shapeGalleryItemForValue;
@@ -92457,6 +93425,7 @@ exports.storePresentationDeck = storePresentationDeck;
92457
93425
  exports.straddlingStrokeWidth = straddlingStrokeWidth;
92458
93426
  exports.stripEditLayerMarkers = stripEditLayerMarkers;
92459
93427
  exports.stripUnderlineDecoration = stripUnderlineDecoration;
93428
+ exports.strokeMiterLimit = strokeMiterLimit;
92460
93429
  exports.strokeOnlyPresetPathData = strokeOnlyPresetPathData;
92461
93430
  exports.strokeOutlineViewBox = strokeOutlineViewBox;
92462
93431
  exports.strokeToInkElement = strokeToInkElement;
@@ -92511,6 +93480,7 @@ exports.textWrapOf = textWrapOf;
92511
93480
  exports.textWrapPatch = textWrapPatch;
92512
93481
  exports.themeColorGridCommit = themeColorGridCommit;
92513
93482
  exports.themeColorGridView = themeColorGridView;
93483
+ exports.themePartWrites = themePartWrites;
92514
93484
  exports.themeShapeStyleXml = themeShapeStyleXml;
92515
93485
  exports.threeViewStateOf = threeViewStateOf;
92516
93486
  exports.tileRectToSourceRect = tileRectToSourceRect;
@@ -92582,6 +93552,8 @@ exports.withChartUserShapeRowRotationUpdated = withChartUserShapeRowRotationUpda
92582
93552
  exports.withChartUserShapeRowTextUpdated = withChartUserShapeRowTextUpdated;
92583
93553
  exports.withChartUserShapeRowUpdated = withChartUserShapeRowUpdated;
92584
93554
  exports.withConnectorEndpointUpdate = withConnectorEndpointUpdate;
93555
+ exports.withHistoryMasterThemes = withHistoryMasterThemes;
93556
+ exports.withHistoryTheme = withHistoryTheme;
92585
93557
  exports.withHomeGalleries = withHomeGalleries;
92586
93558
  exports.withInlineListDecorationDefaults = withInlineListDecorationDefaults;
92587
93559
  exports.withNodeAtPath = withNodeAtPath;
@@ -92593,6 +93565,7 @@ exports.wrapNotesText = wrapNotesText;
92593
93565
  exports.writeBackReport = writeBackReport;
92594
93566
  exports.writeElementParagraphs = writeElementParagraphs;
92595
93567
  exports.writeStoredViewerPrefs = writeStoredViewerPrefs;
93568
+ exports.writeThemeParts = writeThemeParts;
92596
93569
  exports.zeroDelayCssAnimation = zeroDelayCssAnimation;
92597
93570
  exports.zoomInPercent = zoomInPercent;
92598
93571
  exports.zoomInScale = zoomInScale;