pptx-react-viewer 2.18.0 → 2.19.1

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 (125) hide show
  1. package/CHANGELOG.md +712 -0
  2. package/dist/{AiChatPanel-SSSBERWJ.mjs → AiChatPanel-GRAIPSG3.mjs} +4 -4
  3. package/dist/AiChatPanel-GRAIPSG3.mjs.br +0 -0
  4. package/dist/AiChatPanel-GRAIPSG3.mjs.gz +0 -0
  5. package/dist/{AiChatPanel-UN5DHPZY.js → AiChatPanel-JSTZ6W7R.js} +24 -24
  6. package/dist/AiChatPanel-JSTZ6W7R.js.br +0 -0
  7. package/dist/AiChatPanel-JSTZ6W7R.js.gz +0 -0
  8. package/dist/{Model3DScene-LYEESYAI.mjs → Model3DScene-FXDA7OII.mjs} +1 -1
  9. package/dist/Model3DScene-FXDA7OII.mjs.br +0 -0
  10. package/dist/Model3DScene-FXDA7OII.mjs.gz +0 -0
  11. package/dist/{Model3DScene-4RPYKC2I.js → Model3DScene-WLRZXJHN.js} +2 -2
  12. package/dist/Model3DScene-WLRZXJHN.js.br +0 -0
  13. package/dist/Model3DScene-WLRZXJHN.js.gz +0 -0
  14. package/dist/{PowerPointViewer-Cf4YHjdF.d.ts → PowerPointViewer-DVFkeluD.d.ts} +2 -2
  15. package/dist/PowerPointViewer-DVFkeluD.d.ts.map +1 -0
  16. package/dist/{audience-content-store-CyS0oP6t.d.ts → audience-content-store-ChVOSdBh.d.ts} +2 -2
  17. package/dist/{audience-content-store-CyS0oP6t.d.ts.map → audience-content-store-ChVOSdBh.d.ts.map} +1 -1
  18. package/dist/{chunk-QUB5OSKY.mjs → chunk-5ZQ3ZQ3M.mjs} +71 -125
  19. package/dist/chunk-5ZQ3ZQ3M.mjs.br +0 -0
  20. package/dist/chunk-5ZQ3ZQ3M.mjs.gz +0 -0
  21. package/dist/{chunk-O7FTUUXP.mjs → chunk-B55E3KXL.mjs} +210 -92
  22. package/dist/chunk-B55E3KXL.mjs.br +0 -0
  23. package/dist/chunk-B55E3KXL.mjs.gz +0 -0
  24. package/dist/{chunk-7XF6S4AM.mjs → chunk-KQGS6A5J.mjs} +1 -1
  25. package/dist/chunk-KQGS6A5J.mjs.br +0 -0
  26. package/dist/chunk-KQGS6A5J.mjs.gz +0 -0
  27. package/dist/{chunk-ASKYZ5ZY.js → chunk-LMTUC7U7.js} +440 -494
  28. package/dist/chunk-LMTUC7U7.js.br +0 -0
  29. package/dist/chunk-LMTUC7U7.js.gz +0 -0
  30. package/dist/{chunk-RTUGI4HQ.js → chunk-MVKRI3CZ.js} +9 -0
  31. package/dist/chunk-MVKRI3CZ.js.br +0 -0
  32. package/dist/chunk-MVKRI3CZ.js.gz +0 -0
  33. package/dist/{chunk-4LWGAVAP.js → chunk-PIJAFM4B.js} +197 -2425
  34. package/dist/chunk-PIJAFM4B.js.br +0 -0
  35. package/dist/chunk-PIJAFM4B.js.gz +0 -0
  36. package/dist/{chunk-GODW6RNR.mjs → chunk-PNR3J26S.mjs} +1173 -1051
  37. package/dist/chunk-PNR3J26S.mjs.br +0 -0
  38. package/dist/chunk-PNR3J26S.mjs.gz +0 -0
  39. package/dist/{chunk-MAVLV56S.js → chunk-SCGIXXN5.js} +3 -3
  40. package/dist/chunk-SCGIXXN5.js.br +0 -0
  41. package/dist/chunk-SCGIXXN5.js.gz +0 -0
  42. package/dist/{chunk-SNL6LBRX.mjs → chunk-SQJBFMEX.mjs} +9 -0
  43. package/dist/chunk-SQJBFMEX.mjs.br +0 -0
  44. package/dist/chunk-SQJBFMEX.mjs.gz +0 -0
  45. package/dist/{chunk-WVDM36ZM.js → chunk-T7BIRNE4.js} +1185 -1067
  46. package/dist/chunk-T7BIRNE4.js.br +0 -0
  47. package/dist/chunk-T7BIRNE4.js.gz +0 -0
  48. package/dist/{chunk-ICZDMFF2.js → chunk-TPC65IB2.js} +1219 -1101
  49. package/dist/chunk-TPC65IB2.js.br +0 -0
  50. package/dist/chunk-TPC65IB2.js.gz +0 -0
  51. package/dist/{chunk-BZOL6FXF.mjs → chunk-WGXQXHCS.mjs} +52 -2280
  52. package/dist/chunk-WGXQXHCS.mjs.br +0 -0
  53. package/dist/chunk-WGXQXHCS.mjs.gz +0 -0
  54. package/dist/i18n.js +4 -4
  55. package/dist/i18n.js.br +0 -0
  56. package/dist/i18n.js.gz +0 -0
  57. package/dist/i18n.mjs +1 -1
  58. package/dist/i18n.mjs.br +0 -0
  59. package/dist/i18n.mjs.gz +0 -0
  60. package/dist/index.d.ts +38 -1
  61. package/dist/index.js +47 -47
  62. package/dist/index.js.br +0 -0
  63. package/dist/index.js.gz +0 -0
  64. package/dist/index.mjs +6 -6
  65. package/dist/index.mjs.br +0 -0
  66. package/dist/index.mjs.gz +0 -0
  67. package/dist/internals.d.ts +102 -15
  68. package/dist/internals.d.ts.map +1 -1
  69. package/dist/internals.js +79 -79
  70. package/dist/internals.js.br +0 -0
  71. package/dist/internals.js.gz +0 -0
  72. package/dist/internals.mjs +4 -4
  73. package/dist/internals.mjs.br +0 -0
  74. package/dist/internals.mjs.gz +0 -0
  75. package/dist/{types-C_CTI-QE.d.ts → types-TCH6icpi.d.ts} +23 -1
  76. package/dist/{types-C_CTI-QE.d.ts.map → types-TCH6icpi.d.ts.map} +1 -1
  77. package/dist/{useViewerBuildingBlocks-DItilDbP.d.ts → useViewerBuildingBlocks-BKb0qs1j.d.ts} +20 -4
  78. package/dist/{useViewerBuildingBlocks-DItilDbP.d.ts.map → useViewerBuildingBlocks-BKb0qs1j.d.ts.map} +1 -1
  79. package/dist/viewer/index.d.ts +38 -1
  80. package/dist/viewer/index.js +27 -27
  81. package/dist/viewer/index.js.br +0 -0
  82. package/dist/viewer/index.js.gz +0 -0
  83. package/dist/viewer/index.mjs +6 -6
  84. package/dist/viewer/index.mjs.br +0 -0
  85. package/dist/viewer/index.mjs.gz +0 -0
  86. package/package.json +1 -1
  87. package/dist/AiChatPanel-SSSBERWJ.mjs.br +0 -0
  88. package/dist/AiChatPanel-SSSBERWJ.mjs.gz +0 -0
  89. package/dist/AiChatPanel-UN5DHPZY.js.br +0 -0
  90. package/dist/AiChatPanel-UN5DHPZY.js.gz +0 -0
  91. package/dist/Model3DScene-4RPYKC2I.js.br +0 -0
  92. package/dist/Model3DScene-4RPYKC2I.js.gz +0 -0
  93. package/dist/Model3DScene-LYEESYAI.mjs.br +0 -0
  94. package/dist/Model3DScene-LYEESYAI.mjs.gz +0 -0
  95. package/dist/PowerPointViewer-Cf4YHjdF.d.ts.map +0 -1
  96. package/dist/SurfaceChart3DScene-ACPKCWLJ.js +0 -78
  97. package/dist/SurfaceChart3DScene-ACPKCWLJ.js.br +0 -0
  98. package/dist/SurfaceChart3DScene-ACPKCWLJ.js.gz +0 -0
  99. package/dist/SurfaceChart3DScene-JR62SOYO.mjs +0 -76
  100. package/dist/SurfaceChart3DScene-JR62SOYO.mjs.br +0 -0
  101. package/dist/SurfaceChart3DScene-JR62SOYO.mjs.gz +0 -0
  102. package/dist/chunk-4LWGAVAP.js.br +0 -0
  103. package/dist/chunk-4LWGAVAP.js.gz +0 -0
  104. package/dist/chunk-7XF6S4AM.mjs.br +0 -0
  105. package/dist/chunk-7XF6S4AM.mjs.gz +0 -0
  106. package/dist/chunk-ASKYZ5ZY.js.br +0 -0
  107. package/dist/chunk-ASKYZ5ZY.js.gz +0 -0
  108. package/dist/chunk-BZOL6FXF.mjs.br +0 -0
  109. package/dist/chunk-BZOL6FXF.mjs.gz +0 -0
  110. package/dist/chunk-GODW6RNR.mjs.br +0 -0
  111. package/dist/chunk-GODW6RNR.mjs.gz +0 -0
  112. package/dist/chunk-ICZDMFF2.js.br +0 -0
  113. package/dist/chunk-ICZDMFF2.js.gz +0 -0
  114. package/dist/chunk-MAVLV56S.js.br +0 -0
  115. package/dist/chunk-MAVLV56S.js.gz +0 -0
  116. package/dist/chunk-O7FTUUXP.mjs.br +0 -0
  117. package/dist/chunk-O7FTUUXP.mjs.gz +0 -0
  118. package/dist/chunk-QUB5OSKY.mjs.br +0 -0
  119. package/dist/chunk-QUB5OSKY.mjs.gz +0 -0
  120. package/dist/chunk-RTUGI4HQ.js.br +0 -0
  121. package/dist/chunk-RTUGI4HQ.js.gz +0 -0
  122. package/dist/chunk-SNL6LBRX.mjs.br +0 -0
  123. package/dist/chunk-SNL6LBRX.mjs.gz +0 -0
  124. package/dist/chunk-WVDM36ZM.js.br +0 -0
  125. package/dist/chunk-WVDM36ZM.js.gz +0 -0
@@ -21494,6 +21494,25 @@ function hasDrawingChild(node, requestedName) {
21494
21494
  }
21495
21495
  return false;
21496
21496
  }
21497
+ function hasEmptyDrawingChild(node, requestedName) {
21498
+ if (!node) {
21499
+ return false;
21500
+ }
21501
+ for (const [key2, value] of Object.entries(node)) {
21502
+ if (key2.startsWith(ATTRIBUTE_PREFIX) || key2 === "#text") {
21503
+ continue;
21504
+ }
21505
+ if (key2.split(":").at(-1) !== requestedName) {
21506
+ continue;
21507
+ }
21508
+ const child222 = Array.isArray(value) ? value[0] : value;
21509
+ if (child222 === "" || child222 === void 0) {
21510
+ return true;
21511
+ }
21512
+ return typeof child222 === "object" && !Array.isArray(child222) && Object.keys(child222).every((childKey3) => childKey3.startsWith(ATTRIBUTE_PREFIX));
21513
+ }
21514
+ return false;
21515
+ }
21497
21516
  function drawingChildren(node, requestedName) {
21498
21517
  if (!node) {
21499
21518
  return [];
@@ -25248,6 +25267,141 @@ function reconcileSmartArtTextParagraphs(paragraphs, desired) {
25248
25267
  insertAt(result, prefix, desired.slice(prefix, desired.length - suffix));
25249
25268
  return result.length > 0 ? result : [{ items: [] }];
25250
25269
  }
25270
+ var ATTR_PREFIX = "@_";
25271
+ var TEXT_KEY = "#text";
25272
+ function isXmlObject2(value) {
25273
+ return typeof value === "object" && value !== null && !Array.isArray(value);
25274
+ }
25275
+ function coerceString(value) {
25276
+ if (typeof value === "string") {
25277
+ return value;
25278
+ }
25279
+ if (typeof value === "number" || typeof value === "boolean") {
25280
+ return String(value);
25281
+ }
25282
+ return void 0;
25283
+ }
25284
+ function xmlChild(node, key2) {
25285
+ if (!isXmlObject2(node)) {
25286
+ return void 0;
25287
+ }
25288
+ const value = node[key2];
25289
+ if (Array.isArray(value)) {
25290
+ const first = value[0];
25291
+ return isXmlObject2(first) ? first : void 0;
25292
+ }
25293
+ return isXmlObject2(value) ? value : void 0;
25294
+ }
25295
+ function xmlChildren(node, key2) {
25296
+ if (!isXmlObject2(node)) {
25297
+ return [];
25298
+ }
25299
+ const value = node[key2];
25300
+ if (value === void 0 || value === null) {
25301
+ return [];
25302
+ }
25303
+ if (Array.isArray(value)) {
25304
+ return value.filter(isXmlObject2);
25305
+ }
25306
+ return isXmlObject2(value) ? [value] : [];
25307
+ }
25308
+ function xmlHasChild(node, key2) {
25309
+ return isXmlObject2(node) && Object.hasOwn(node, key2);
25310
+ }
25311
+ function ensureXmlChild(parent, key2) {
25312
+ if (!isXmlObject2(parent) || !Object.hasOwn(parent, key2)) {
25313
+ return void 0;
25314
+ }
25315
+ const existing = parent[key2];
25316
+ if (isXmlObject2(existing)) {
25317
+ return existing;
25318
+ }
25319
+ if (Array.isArray(existing)) {
25320
+ const first = existing[0];
25321
+ return isXmlObject2(first) ? first : void 0;
25322
+ }
25323
+ if (existing === "" || existing === void 0 || existing === null) {
25324
+ const created = {};
25325
+ parent[key2] = created;
25326
+ return created;
25327
+ }
25328
+ return void 0;
25329
+ }
25330
+ function ensureXmlChildren(parent, key2) {
25331
+ if (!Object.hasOwn(parent, key2)) {
25332
+ return [];
25333
+ }
25334
+ const value = parent[key2];
25335
+ if (!Array.isArray(value)) {
25336
+ const single = ensureXmlChild(parent, key2);
25337
+ return single ? [single] : [];
25338
+ }
25339
+ const healed = [];
25340
+ for (const [index, entry2] of value.entries()) {
25341
+ if (isXmlObject2(entry2)) {
25342
+ healed.push(entry2);
25343
+ continue;
25344
+ }
25345
+ const created = {};
25346
+ value[index] = created;
25347
+ healed.push(created);
25348
+ }
25349
+ return healed;
25350
+ }
25351
+ function ensureXmlChildOrCreate(parent, key2, position2 = "last") {
25352
+ const existing = ensureXmlChild(parent, key2);
25353
+ if (existing) {
25354
+ return existing;
25355
+ }
25356
+ const created = {};
25357
+ if (position2 === "last") {
25358
+ parent[key2] = created;
25359
+ return created;
25360
+ }
25361
+ const carried = { ...parent };
25362
+ for (const existingKey of Object.keys(parent)) {
25363
+ delete parent[existingKey];
25364
+ }
25365
+ parent[key2] = created;
25366
+ Object.assign(parent, carried);
25367
+ return created;
25368
+ }
25369
+ function xmlAttr(node, name) {
25370
+ if (!isXmlObject2(node)) {
25371
+ return void 0;
25372
+ }
25373
+ return coerceString(node[ATTR_PREFIX + name]);
25374
+ }
25375
+ function xmlAttrNumber(node, name) {
25376
+ const raw = xmlAttr(node, name);
25377
+ if (raw === void 0) {
25378
+ return void 0;
25379
+ }
25380
+ const parsed = Number(raw);
25381
+ return Number.isFinite(parsed) ? parsed : void 0;
25382
+ }
25383
+ function xmlText(node) {
25384
+ if (typeof node === "string") {
25385
+ return node;
25386
+ }
25387
+ if (!isXmlObject2(node)) {
25388
+ return void 0;
25389
+ }
25390
+ return coerceString(node[TEXT_KEY]);
25391
+ }
25392
+ function xmlPath(node, ...keys) {
25393
+ let current = isXmlObject2(node) ? node : void 0;
25394
+ for (const key2 of keys) {
25395
+ if (!current) {
25396
+ return void 0;
25397
+ }
25398
+ current = xmlChild(current, key2);
25399
+ }
25400
+ return current;
25401
+ }
25402
+ function isXmlNode(value) {
25403
+ return isXmlObject2(value);
25404
+ }
25251
25405
  var EMU_PER_PX2 = 9525;
25252
25406
  function parseBoolAttr2(value) {
25253
25407
  if (value === void 0 || value === null) {
@@ -25410,7 +25564,7 @@ function parseBulletInfo(pPr, paragraphIndex = 0) {
25410
25564
  if (!pPr) {
25411
25565
  return null;
25412
25566
  }
25413
- if (pPr["a:buNone"]) {
25567
+ if (xmlHasChild(pPr, "a:buNone")) {
25414
25568
  return { none: true };
25415
25569
  }
25416
25570
  const buFont = pPr["a:buFont"];
@@ -34408,83 +34562,6 @@ function resolveLayoutDisplayName(input) {
34408
34562
  }
34409
34563
  return fallbackFromPath(input.path);
34410
34564
  }
34411
- var ATTR_PREFIX = "@_";
34412
- var TEXT_KEY = "#text";
34413
- function isXmlObject2(value) {
34414
- return typeof value === "object" && value !== null && !Array.isArray(value);
34415
- }
34416
- function coerceString(value) {
34417
- if (typeof value === "string") {
34418
- return value;
34419
- }
34420
- if (typeof value === "number" || typeof value === "boolean") {
34421
- return String(value);
34422
- }
34423
- return void 0;
34424
- }
34425
- function xmlChild(node, key2) {
34426
- if (!isXmlObject2(node)) {
34427
- return void 0;
34428
- }
34429
- const value = node[key2];
34430
- if (Array.isArray(value)) {
34431
- const first = value[0];
34432
- return isXmlObject2(first) ? first : void 0;
34433
- }
34434
- return isXmlObject2(value) ? value : void 0;
34435
- }
34436
- function xmlChildren(node, key2) {
34437
- if (!isXmlObject2(node)) {
34438
- return [];
34439
- }
34440
- const value = node[key2];
34441
- if (value === void 0 || value === null) {
34442
- return [];
34443
- }
34444
- if (Array.isArray(value)) {
34445
- return value.filter(isXmlObject2);
34446
- }
34447
- return isXmlObject2(value) ? [value] : [];
34448
- }
34449
- function xmlHasChild(node, key2) {
34450
- return isXmlObject2(node) && Object.hasOwn(node, key2);
34451
- }
34452
- function xmlAttr(node, name) {
34453
- if (!isXmlObject2(node)) {
34454
- return void 0;
34455
- }
34456
- return coerceString(node[ATTR_PREFIX + name]);
34457
- }
34458
- function xmlAttrNumber(node, name) {
34459
- const raw = xmlAttr(node, name);
34460
- if (raw === void 0) {
34461
- return void 0;
34462
- }
34463
- const parsed = Number(raw);
34464
- return Number.isFinite(parsed) ? parsed : void 0;
34465
- }
34466
- function xmlText(node) {
34467
- if (typeof node === "string") {
34468
- return node;
34469
- }
34470
- if (!isXmlObject2(node)) {
34471
- return void 0;
34472
- }
34473
- return coerceString(node[TEXT_KEY]);
34474
- }
34475
- function xmlPath(node, ...keys) {
34476
- let current = isXmlObject2(node) ? node : void 0;
34477
- for (const key2 of keys) {
34478
- if (!current) {
34479
- return void 0;
34480
- }
34481
- current = xmlChild(current, key2);
34482
- }
34483
- return current;
34484
- }
34485
- function isXmlNode(value) {
34486
- return isXmlObject2(value);
34487
- }
34488
34565
  var ORDER2 = [
34489
34566
  "varyColors",
34490
34567
  "ser",
@@ -36318,7 +36395,16 @@ var PptxShapeStyleExtractor = class {
36318
36395
  Object.assign(style, this.context.extractBlurStyle(shapeProps));
36319
36396
  Object.assign(style, this.context.extractEffectDagStyle(shapeProps));
36320
36397
  if (styleNode?.["a:effectRef"]) {
36398
+ const suppressInherited = hasEmptyDrawingChild(shapeProps, "effectLst");
36399
+ const authored = suppressInherited ? new Set(Object.keys(style)) : void 0;
36321
36400
  this.context.resolveThemeEffectRef(styleNode["a:effectRef"], style);
36401
+ if (authored) {
36402
+ for (const key2 of Object.keys(style)) {
36403
+ if (!authored.has(key2) && key2 !== "effectRefIdx" && key2 !== "effectRefColorXml") {
36404
+ delete style[key2];
36405
+ }
36406
+ }
36407
+ }
36322
36408
  }
36323
36409
  const fontRef = styleNode?.["a:fontRef"];
36324
36410
  if (fontRef) {
@@ -37288,6 +37374,150 @@ var PptxMediaDataParser = class {
37288
37374
  return mimeMap[extension];
37289
37375
  }
37290
37376
  };
37377
+ var LOCK_ATTRIBUTE = {
37378
+ noGrouping: "@_noGrp",
37379
+ noRotation: "@_noRot",
37380
+ noMove: "@_noMove",
37381
+ noResize: "@_noResize",
37382
+ noTextEdit: "@_noTextEdit",
37383
+ noSelect: "@_noSelect",
37384
+ noChangeAspect: "@_noChangeAspect",
37385
+ noEditPoints: "@_noEditPoints",
37386
+ noAdjustHandles: "@_noAdjustHandles",
37387
+ noChangeArrowheads: "@_noChangeArrowheads",
37388
+ noChangeShapeType: "@_noChangeShapeType",
37389
+ noDrilldown: "@_noDrilldown"
37390
+ };
37391
+ var AG_LOCKING = [
37392
+ "noGrouping",
37393
+ "noSelect",
37394
+ "noRotation",
37395
+ "noChangeAspect",
37396
+ "noMove",
37397
+ "noResize",
37398
+ "noEditPoints",
37399
+ "noAdjustHandles",
37400
+ "noChangeArrowheads",
37401
+ "noChangeShapeType"
37402
+ ];
37403
+ var SHAPE_LOCK_CONTAINERS = {
37404
+ "p:sp": {
37405
+ nvKey: "p:nvSpPr",
37406
+ cNvKey: "p:cNvSpPr",
37407
+ lockTag: "a:spLocks",
37408
+ permitted: [...AG_LOCKING, "noTextEdit"]
37409
+ },
37410
+ "p:pic": {
37411
+ nvKey: "p:nvPicPr",
37412
+ cNvKey: "p:cNvPicPr",
37413
+ lockTag: "a:picLocks",
37414
+ permitted: AG_LOCKING
37415
+ },
37416
+ "p:cxnSp": {
37417
+ nvKey: "p:nvCxnSpPr",
37418
+ cNvKey: "p:cNvCxnSpPr",
37419
+ lockTag: "a:cxnSpLocks",
37420
+ permitted: AG_LOCKING
37421
+ },
37422
+ "p:grpSp": {
37423
+ nvKey: "p:nvGrpSpPr",
37424
+ cNvKey: "p:cNvGrpSpPr",
37425
+ lockTag: "a:grpSpLocks",
37426
+ // CT_GroupLocking omits the shape-editing half of AG_Locking; `@noUngrp`
37427
+ // is its own addition and has no model property, so it survives as a
37428
+ // carried-over attribute rather than being written from the model.
37429
+ permitted: ["noGrouping", "noSelect", "noRotation", "noChangeAspect", "noMove", "noResize"]
37430
+ },
37431
+ "p:graphicFrame": {
37432
+ nvKey: "p:nvGraphicFramePr",
37433
+ cNvKey: "p:cNvGraphicFramePr",
37434
+ lockTag: "a:graphicFrameLocks",
37435
+ // `CT_GraphicalObjectFrameLocking` is NOT `AG_Locking`: it has no
37436
+ // `@noRot`, no `@noTextEdit` and none of the geometry-editing flags, and
37437
+ // it is the only type that declares `@noDrilldown`. Aliasing it onto the
37438
+ // shape list would emit five attributes the schema rejects.
37439
+ permitted: ["noGrouping", "noDrilldown", "noSelect", "noChangeAspect", "noMove", "noResize"]
37440
+ }
37441
+ };
37442
+ function resolveShapeLockContainer(shape, bucketKey) {
37443
+ if (shape) {
37444
+ for (const spec2 of Object.values(SHAPE_LOCK_CONTAINERS)) {
37445
+ if (asNode(shape[spec2.nvKey])) {
37446
+ return spec2;
37447
+ }
37448
+ }
37449
+ }
37450
+ return SHAPE_LOCK_CONTAINERS[bucketKey];
37451
+ }
37452
+ function asNode(value) {
37453
+ return value && typeof value === "object" && !Array.isArray(value) ? value : void 0;
37454
+ }
37455
+ function parseShapeLocksFromNode(shape, spec2) {
37456
+ const nv = asNode(shape?.[spec2.nvKey]);
37457
+ const container = asNode(nv?.[spec2.cNvKey]);
37458
+ return parseShapeLockNode(asNode(container?.[spec2.lockTag]), spec2);
37459
+ }
37460
+ function resolveLockContainerNode(shape, spec2, create) {
37461
+ const nv = asNode(shape[spec2.nvKey]);
37462
+ if (!nv) {
37463
+ return void 0;
37464
+ }
37465
+ const existing = asNode(nv[spec2.cNvKey]);
37466
+ if (existing || !create) {
37467
+ return existing;
37468
+ }
37469
+ const created = {};
37470
+ const rebuilt = {};
37471
+ if ("p:cNvPr" in nv) {
37472
+ rebuilt["p:cNvPr"] = nv["p:cNvPr"];
37473
+ }
37474
+ rebuilt[spec2.cNvKey] = created;
37475
+ for (const [key2, value] of Object.entries(nv)) {
37476
+ if (key2 !== "p:cNvPr" && key2 !== spec2.cNvKey) {
37477
+ rebuilt[key2] = value;
37478
+ }
37479
+ }
37480
+ for (const key2 of Object.keys(nv)) {
37481
+ delete nv[key2];
37482
+ }
37483
+ Object.assign(nv, rebuilt);
37484
+ return created;
37485
+ }
37486
+ var MODELLED_ATTRIBUTES = new Set(Object.values(LOCK_ATTRIBUTE));
37487
+ function buildShapeLockNode(locks, spec2, existing) {
37488
+ const node = {};
37489
+ for (const [key2, value] of Object.entries(existing ?? {})) {
37490
+ if (!MODELLED_ATTRIBUTES.has(key2)) {
37491
+ node[key2] = value;
37492
+ }
37493
+ }
37494
+ if (locks) {
37495
+ for (const prop of spec2.permitted) {
37496
+ const value = locks[prop];
37497
+ if (value !== void 0) {
37498
+ node[LOCK_ATTRIBUTE[prop]] = value ? "1" : "0";
37499
+ }
37500
+ }
37501
+ }
37502
+ return Object.keys(node).length > 0 ? node : void 0;
37503
+ }
37504
+ function parseShapeLockNode(node, spec2) {
37505
+ if (!node) {
37506
+ return void 0;
37507
+ }
37508
+ const locks = {};
37509
+ let hasAny = false;
37510
+ for (const prop of spec2.permitted) {
37511
+ const raw = node[LOCK_ATTRIBUTE[prop]];
37512
+ if (raw === void 0) {
37513
+ continue;
37514
+ }
37515
+ const value = String(raw).trim().toLowerCase();
37516
+ locks[prop] = value === "1" || value === "true";
37517
+ hasAny = true;
37518
+ }
37519
+ return hasAny ? locks : void 0;
37520
+ }
37291
37521
  var KNOWN_GRAPHIC_FRAME_EXT_URIS = /* @__PURE__ */ new Set([
37292
37522
  // Office 365+ 3D model envelope; handled by parseModel3DElement.
37293
37523
  "{D42C27E5-1956-4C4D-AC15-FE9D03D7D63E}"
@@ -37533,7 +37763,15 @@ var PptxGraphicFrameParser = class {
37533
37763
  skewY: transform?.["@_skewY"] ? parseInt(String(transform["@_skewY"]), 10) / 6e4 : void 0,
37534
37764
  flipHorizontal,
37535
37765
  flipVertical,
37536
- rawXml: frame2
37766
+ rawXml: frame2,
37767
+ // `a:graphicFrameLocks` is the lock element for every family that
37768
+ // round-trips as a graphic frame (table, chart, SmartArt, OLE
37769
+ // object, graphic-frame media, loaded ink). Reading it is what
37770
+ // makes the writer safe: `serializeShapeLocks` rebuilds the node
37771
+ // from `element.locks` and treats an absent bag as "the user
37772
+ // cleared the locks", so a lock that is never parsed would be
37773
+ // erased on the first save.
37774
+ locks: parseShapeLocksFromNode(frame2, SHAPE_LOCK_CONTAINERS["p:graphicFrame"])
37537
37775
  };
37538
37776
  const extensionXml = collectGraphicFrameExtensions(graphicData);
37539
37777
  if (type === "table" && graphicData) {
@@ -43993,6 +44231,7 @@ function annotateOmmlSiblingOrder(xml, parsed) {
43993
44231
  }
43994
44232
  }
43995
44233
  }
44234
+ var MAX_XML_NESTING_DEPTH = 256;
43996
44235
  var PptxRuntimeDependencyFactory = class {
43997
44236
  createParser() {
43998
44237
  const parser = new XMLParser({
@@ -44058,7 +44297,26 @@ var PptxRuntimeDependencyFactory = class {
44058
44297
  // (`p:cNvPr/@name`), alt text (`@descr`) and layout names
44059
44298
  // (`p:cSld/@name`), which are read from the MODEL, so under-decoding is
44060
44299
  // user-visible even without a save.
44061
- attributeValueProcessor: (_attrName, attrValue) => decodeXmlEntities(attrValue)
44300
+ attributeValueProcessor: (_attrName, attrValue) => decodeXmlEntities(attrValue),
44301
+ // See MAX_XML_NESTING_DEPTH. The parser rejects when the open-tag stack
44302
+ // is STRICTLY greater than this, so it tolerates a part one element
44303
+ // deeper than the number given; the builder is compensated below so the
44304
+ // two ceilings land on the same part.
44305
+ maxNestedTags: MAX_XML_NESTING_DEPTH
44306
+ // XML comments stay DROPPED (`commentPropName` left at its `false`
44307
+ // default), deliberately. Scanning every part of all 45 committed decks
44308
+ // found ZERO comments, in slides, rels and `[Content_Types].xml` alike,
44309
+ // so nothing we have is losing anything. Turning it on would not be
44310
+ // free or even faithful: fast-xml-parser stores a comment as a
44311
+ // `#comment` KEY on its parent, which (a) injects a key the ~50 runtime
44312
+ // mixins that enumerate `Object.keys(spTree)` have never seen, and (b)
44313
+ // groups by tag like every other key, so `<!--A--><p:sp/><!--B--><p:sp/>`
44314
+ // rebuilds as `<!--A--><!--B--><p:sp/><p:sp/>` - the same interleaved-
44315
+ // sibling collapse that has already cost this repo four separate order
44316
+ // annotators (custGeom, OMML, SmartArt text, a:fld/a:br). An XML comment
44317
+ // carries no schema meaning, so the choice is between dropping one and
44318
+ // relocating it, and dropping is the honest half. Parts we do not parse
44319
+ // keep their comments regardless: they are copied through byte for byte.
44062
44320
  });
44063
44321
  const parse = parser.parse.bind(parser);
44064
44322
  parser.parse = ((xml, validationOption) => {
@@ -44123,7 +44381,21 @@ var PptxRuntimeDependencyFactory = class {
44123
44381
  // `\r`, and `encodeXmlAttributeValue` applies the attribute rules.
44124
44382
  processEntities: false,
44125
44383
  tagValueProcessor: (_tagName, tagValue) => encodeXmlTextValue(String(tagValue)),
44126
- attributeValueProcessor: (_attrName, attrValue) => encodeXmlAttributeValue(String(attrValue))
44384
+ attributeValueProcessor: (_attrName, attrValue) => encodeXmlAttributeValue(String(attrValue)),
44385
+ // See MAX_XML_NESTING_DEPTH. The doubling makes the PARSER the single
44386
+ // gatekeeper: whatever it let into the model, the builder can write back.
44387
+ // Matching the two numbers exactly does not achieve that, because the
44388
+ // builder measures a different thing. It walks the parsed OBJECT, where
44389
+ // repeated siblings sit under an extra array level and our own
44390
+ // order-annotation keys (`#pptx-order-N`, custGeom / OMML / SmartArt /
44391
+ // paragraph) add levels the source XML never had, so its depth runs 1-2
44392
+ // above the parser's for the same part and drifts with what the
44393
+ // annotators do. Deriving that offset would mean pinning two libraries'
44394
+ // internals plus our annotators; a margin no realistic accounting
44395
+ // difference can cross is both simpler and stabler, and the builder
44396
+ // still keeps a bound of its own for models built programmatically
44397
+ // rather than parsed. The round-trip test asserts the property directly.
44398
+ maxNestedTags: MAX_XML_NESTING_DEPTH * 2
44127
44399
  });
44128
44400
  const build = builder2.build.bind(builder2);
44129
44401
  builder2.build = ((value) => stripXmlOrderMarkers(build(value)));
@@ -54151,95 +54423,6 @@ var PptxHandlerRuntime2 = class _PptxHandlerRuntime extends PptxHandlerRuntime {
54151
54423
  }
54152
54424
  }
54153
54425
  };
54154
- var LOCK_ATTRIBUTE = {
54155
- noGrouping: "@_noGrp",
54156
- noRotation: "@_noRot",
54157
- noMove: "@_noMove",
54158
- noResize: "@_noResize",
54159
- noTextEdit: "@_noTextEdit",
54160
- noSelect: "@_noSelect",
54161
- noChangeAspect: "@_noChangeAspect",
54162
- noEditPoints: "@_noEditPoints",
54163
- noAdjustHandles: "@_noAdjustHandles",
54164
- noChangeArrowheads: "@_noChangeArrowheads",
54165
- noChangeShapeType: "@_noChangeShapeType"
54166
- };
54167
- var AG_LOCKING = [
54168
- "noGrouping",
54169
- "noSelect",
54170
- "noRotation",
54171
- "noChangeAspect",
54172
- "noMove",
54173
- "noResize",
54174
- "noEditPoints",
54175
- "noAdjustHandles",
54176
- "noChangeArrowheads",
54177
- "noChangeShapeType"
54178
- ];
54179
- var SHAPE_LOCK_CONTAINERS = {
54180
- "p:sp": {
54181
- nvKey: "p:nvSpPr",
54182
- cNvKey: "p:cNvSpPr",
54183
- lockTag: "a:spLocks",
54184
- permitted: [...AG_LOCKING, "noTextEdit"]
54185
- },
54186
- "p:pic": {
54187
- nvKey: "p:nvPicPr",
54188
- cNvKey: "p:cNvPicPr",
54189
- lockTag: "a:picLocks",
54190
- permitted: AG_LOCKING
54191
- },
54192
- "p:cxnSp": {
54193
- nvKey: "p:nvCxnSpPr",
54194
- cNvKey: "p:cNvCxnSpPr",
54195
- lockTag: "a:cxnSpLocks",
54196
- permitted: AG_LOCKING
54197
- },
54198
- "p:grpSp": {
54199
- nvKey: "p:nvGrpSpPr",
54200
- cNvKey: "p:cNvGrpSpPr",
54201
- lockTag: "a:grpSpLocks",
54202
- // CT_GroupLocking omits the shape-editing half of AG_Locking; `@noUngrp`
54203
- // is its own addition and has no model property, so it survives as a
54204
- // carried-over attribute rather than being written from the model.
54205
- permitted: ["noGrouping", "noSelect", "noRotation", "noChangeAspect", "noMove", "noResize"]
54206
- }
54207
- };
54208
- var MODELLED_ATTRIBUTES = new Set(Object.values(LOCK_ATTRIBUTE));
54209
- function buildShapeLockNode(locks, spec2, existing) {
54210
- const node = {};
54211
- for (const [key2, value] of Object.entries(existing ?? {})) {
54212
- if (!MODELLED_ATTRIBUTES.has(key2)) {
54213
- node[key2] = value;
54214
- }
54215
- }
54216
- if (locks) {
54217
- for (const prop of spec2.permitted) {
54218
- const value = locks[prop];
54219
- if (value !== void 0) {
54220
- node[LOCK_ATTRIBUTE[prop]] = value ? "1" : "0";
54221
- }
54222
- }
54223
- }
54224
- return Object.keys(node).length > 0 ? node : void 0;
54225
- }
54226
- function parseShapeLockNode(node, spec2) {
54227
- if (!node) {
54228
- return void 0;
54229
- }
54230
- const locks = {};
54231
- let hasAny = false;
54232
- for (const prop of spec2.permitted) {
54233
- const raw = node[LOCK_ATTRIBUTE[prop]];
54234
- if (raw === void 0) {
54235
- continue;
54236
- }
54237
- const value = String(raw).trim().toLowerCase();
54238
- locks[prop] = value === "1" || value === "true";
54239
- hasAny = true;
54240
- }
54241
- return hasAny ? locks : void 0;
54242
- }
54243
54426
  var PptxHandlerRuntime3 = class extends PptxHandlerRuntime2 {
54244
54427
  /**
54245
54428
  * Write or remove a single `a:hlinkClick` / `a:hlinkHover` node on
@@ -54300,20 +54483,26 @@ var PptxHandlerRuntime3 = class extends PptxHandlerRuntime2 {
54300
54483
  }
54301
54484
  return "p:sp";
54302
54485
  }
54486
+ /**
54487
+ * The `p:cNvPr` an element's hyperlinks hang on.
54488
+ *
54489
+ * Resolved from the MARKUP, not from `el.type`, for exactly the reason
54490
+ * {@link resolveShapeLockContainer} documents: the two disagree in real
54491
+ * files. `media` buckets as `p:graphicFrame`, but PowerPoint writes a video
54492
+ * as a `p:pic`, so looking for `p:nvGraphicFramePr` found nothing and the
54493
+ * writer returned early - a hyperlink or an action on a video or an audio
54494
+ * clip was accepted by the editor and then never reached the saved file.
54495
+ * Loaded ink is the mirror image: it buckets as `p:sp` and arrives as a
54496
+ * graphic frame or a `p:contentPart`. This is the unfixed sibling of the
54497
+ * lock-container bug, and it shares the fix rather than restating it.
54498
+ */
54303
54499
  getCnvPrNode(shape, key2) {
54304
- if (key2 === "p:pic") {
54305
- return xmlPath(shape, "p:nvPicPr", "p:cNvPr");
54500
+ const contentPart = xmlPath(shape, "p:nvContentPartPr", "p:cNvPr");
54501
+ if (contentPart) {
54502
+ return contentPart;
54306
54503
  }
54307
- if (key2 === "p:cxnSp") {
54308
- return xmlPath(shape, "p:nvCxnSpPr", "p:cNvPr");
54309
- }
54310
- if (key2 === "p:graphicFrame") {
54311
- return xmlPath(shape, "p:nvGraphicFramePr", "p:cNvPr");
54312
- }
54313
- if (key2 === "p:grpSp") {
54314
- return xmlPath(shape, "p:nvGrpSpPr", "p:cNvPr");
54315
- }
54316
- return xmlPath(shape, "p:nvSpPr", "p:cNvPr");
54504
+ const spec2 = resolveShapeLockContainer(shape, key2);
54505
+ return xmlPath(shape, spec2?.nvKey ?? "p:nvSpPr", "p:cNvPr");
54317
54506
  }
54318
54507
  /**
54319
54508
  * Serialize shape-level actions back onto the `p:cNvPr` node, updating
@@ -54335,27 +54524,35 @@ var PptxHandlerRuntime3 = class extends PptxHandlerRuntime2 {
54335
54524
  * Serialize shape lock attributes from an element back into the XML.
54336
54525
  *
54337
54526
  * Writes `a:spLocks` (shapes), `a:picLocks` (pictures), `a:cxnSpLocks`
54338
- * (connectors) or `a:grpSpLocks` (groups) onto that family's own
54339
- * `p:cNvXxxPr` container, restricted to the attributes that container's
54340
- * type declares. See {@link module:shape-lock-containers} for why the four
54341
- * are not interchangeable, and for the one family
54342
- * (`a:graphicFrameLocks`) deliberately left out.
54527
+ * (connectors), `a:grpSpLocks` (groups) or `a:graphicFrameLocks` (tables,
54528
+ * charts, SmartArt, OLE objects, media) onto that family's own `p:cNvXxxPr`
54529
+ * container, restricted to the attributes that container's type declares.
54530
+ * See {@link module:shape-lock-containers} for why the five are not
54531
+ * interchangeable.
54532
+ *
54533
+ * The container is resolved from the MARKUP, not from `el.type`: PowerPoint
54534
+ * writes media as a `p:pic` even though the type buckets as
54535
+ * `p:graphicFrame`, and loaded ink as a graphic frame even though it buckets
54536
+ * as `p:sp`. Trusting the type there would rebuild the wrong lock element
54537
+ * and delete the authored one.
54343
54538
  */
54344
54539
  serializeShapeLocks(shape, el) {
54345
- const spec2 = SHAPE_LOCK_CONTAINERS[this.getTreeBucketKeyForElementType(el.type)];
54540
+ const spec2 = resolveShapeLockContainer(shape, this.getTreeBucketKeyForElementType(el.type));
54346
54541
  if (!spec2) {
54347
54542
  return;
54348
54543
  }
54349
- const container = xmlPath(shape, spec2.nvKey, spec2.cNvKey);
54350
- if (!container) {
54544
+ const locks = "locks" in el ? el.locks : void 0;
54545
+ const existing = resolveLockContainerNode(shape, spec2, false);
54546
+ const next = buildShapeLockNode(locks, spec2, existing?.[spec2.lockTag]);
54547
+ if (!next) {
54548
+ if (existing) {
54549
+ delete existing[spec2.lockTag];
54550
+ }
54351
54551
  return;
54352
54552
  }
54353
- const locks = "locks" in el ? el.locks : void 0;
54354
- const next = buildShapeLockNode(locks, spec2, container[spec2.lockTag]);
54355
- if (next) {
54553
+ const container = existing ?? resolveLockContainerNode(shape, spec2, true);
54554
+ if (container) {
54356
54555
  container[spec2.lockTag] = next;
54357
- } else {
54358
- delete container[spec2.lockTag];
54359
54556
  }
54360
54557
  }
54361
54558
  };
@@ -57089,6 +57286,7 @@ var PptxHandlerRuntime15 = class _PptxHandlerRuntime4 extends PptxHandlerRuntime
57089
57286
  * `rebuildTableXmlFromData` and fills in `a:tblGrid` / `a:tr` children.
57090
57287
  */
57091
57288
  createTableGraphicFrameXml(el) {
57289
+ el.locks = { noGrouping: true, ...el.locks };
57092
57290
  const EMU = _PptxHandlerRuntime4.EMU_PER_PX;
57093
57291
  const offX = String(Math.round(el.x * EMU));
57094
57292
  const offY = String(Math.round(el.y * EMU));
@@ -57190,6 +57388,7 @@ var PptxHandlerRuntime15 = class _PptxHandlerRuntime4 extends PptxHandlerRuntime
57190
57388
  * specified relationship ID.
57191
57389
  */
57192
57390
  createOleGraphicFrameXml(el, embedRelationshipId) {
57391
+ el.locks = { noChangeAspect: true, ...el.locks };
57193
57392
  const EMU = _PptxHandlerRuntime4.EMU_PER_PX;
57194
57393
  const offX = String(Math.round(el.x * EMU));
57195
57394
  const offY = String(Math.round(el.y * EMU));
@@ -57483,6 +57682,7 @@ var PptxHandlerRuntime15 = class _PptxHandlerRuntime4 extends PptxHandlerRuntime
57483
57682
  if (!xml) {
57484
57683
  return null;
57485
57684
  }
57685
+ this.serializeShapeLocks(xml, child222);
57486
57686
  applyGroupChildTransform(xml, child222, _PptxHandlerRuntime4.EMU_PER_PX);
57487
57687
  return { tag: "p:grpSp", xml };
57488
57688
  }
@@ -59414,7 +59614,7 @@ function buildChartPoints(values) {
59414
59614
  var DEFAULT_ROW_HEIGHT_PX = 40;
59415
59615
  var DEFAULT_ROW_HEIGHT_EMU = DEFAULT_ROW_HEIGHT_PX * EMU_PER_PX;
59416
59616
  function ensureArray16(value) {
59417
- if (!value) {
59617
+ if (value === void 0 || value === null) {
59418
59618
  return [];
59419
59619
  }
59420
59620
  return Array.isArray(value) ? value : [value];
@@ -59614,37 +59814,38 @@ function updateCellTextInRawXml(element, rowIndex, colIndex, text2) {
59614
59814
  if (colIndex < 0 || colIndex >= cells.length) {
59615
59815
  return void 0;
59616
59816
  }
59617
- const cell = cells[colIndex];
59618
- const existingTxBody = cell["a:txBody"];
59817
+ cells[colIndex]["a:txBody"] = rebuildCellTextBody(
59818
+ cells[colIndex]["a:txBody"],
59819
+ text2
59820
+ );
59821
+ return newRawXml;
59822
+ }
59823
+ function rebuildCellTextBody(existingTxBody, text2) {
59619
59824
  const existingParagraphs = ensureArray16(
59620
59825
  existingTxBody?.["a:p"]
59621
59826
  );
59622
59827
  const firstParagraph = existingParagraphs.length > 0 ? existingParagraphs[0] : void 0;
59623
59828
  const existingRuns = firstParagraph ? ensureArray16(firstParagraph["a:r"]) : [];
59624
59829
  const firstRunProps = existingRuns.length > 0 ? existingRuns[0]["a:rPr"] : void 0;
59625
- const newRun = { "a:t": text2 };
59626
- if (firstRunProps) {
59830
+ const newRun = {};
59831
+ if (firstRunProps !== void 0) {
59627
59832
  newRun["a:rPr"] = firstRunProps;
59628
59833
  }
59629
- const newParagraph = {
59630
- "a:r": newRun
59631
- };
59632
- if (firstParagraph?.["a:pPr"]) {
59834
+ newRun["a:t"] = text2;
59835
+ const newParagraph = {};
59836
+ if (firstParagraph?.["a:pPr"] !== void 0) {
59633
59837
  newParagraph["a:pPr"] = firstParagraph["a:pPr"];
59634
59838
  }
59635
- const bodyPr = existingTxBody?.["a:bodyPr"];
59636
- const lstStyle = existingTxBody?.["a:lstStyle"];
59637
- const newTxBody = {
59638
- "a:p": newParagraph
59639
- };
59640
- if (bodyPr !== void 0) {
59641
- newTxBody["a:bodyPr"] = bodyPr;
59839
+ newParagraph["a:r"] = newRun;
59840
+ const newTxBody = {};
59841
+ if (existingTxBody?.["a:bodyPr"] !== void 0) {
59842
+ newTxBody["a:bodyPr"] = existingTxBody["a:bodyPr"];
59642
59843
  }
59643
- if (lstStyle !== void 0) {
59644
- newTxBody["a:lstStyle"] = lstStyle;
59844
+ if (existingTxBody?.["a:lstStyle"] !== void 0) {
59845
+ newTxBody["a:lstStyle"] = existingTxBody["a:lstStyle"];
59645
59846
  }
59646
- cell["a:txBody"] = newTxBody;
59647
- return newRawXml;
59847
+ newTxBody["a:p"] = newParagraph;
59848
+ return newTxBody;
59648
59849
  }
59649
59850
  function updateCellTextStyleInRawXml(element, rowIndex, colIndex, styleUpdates) {
59650
59851
  if (!element.rawXml) {
@@ -59668,11 +59869,15 @@ function updateCellTextStyleInRawXml(element, rowIndex, colIndex, styleUpdates)
59668
59869
  if (!txBody) {
59669
59870
  return void 0;
59670
59871
  }
59671
- const paragraphs = ensureArray16(txBody["a:p"]);
59872
+ const paragraphs = ensureXmlChildren(txBody, "a:p");
59672
59873
  for (const paragraph of paragraphs) {
59874
+ if ("align" in styleUpdates) {
59875
+ const pPr = ensureXmlChildOrCreate(paragraph, "a:pPr", "first");
59876
+ pPr["@_algn"] = styleUpdates.align === "left" ? "l" : styleUpdates.align === "center" ? "ctr" : styleUpdates.align === "right" ? "r" : styleUpdates.align === "justify" ? "just" : String(styleUpdates.align);
59877
+ }
59673
59878
  const runs = ensureArray16(paragraph["a:r"]);
59674
59879
  for (const run of runs) {
59675
- const rPr = run["a:rPr"] ?? {};
59880
+ const rPr = ensureXmlChildOrCreate(run, "a:rPr", "first");
59676
59881
  if ("bold" in styleUpdates) {
59677
59882
  if (styleUpdates.bold) {
59678
59883
  rPr["@_b"] = "1";
@@ -59705,15 +59910,9 @@ function updateCellTextStyleInRawXml(element, rowIndex, colIndex, styleUpdates)
59705
59910
  const hex4 = styleUpdates.color.replace("#", "");
59706
59911
  rPr["a:solidFill"] = { "a:srgbClr": { "@_val": hex4 } };
59707
59912
  }
59708
- if ("align" in styleUpdates) {
59709
- const pPr = paragraph["a:pPr"] ?? {};
59710
- pPr["@_algn"] = styleUpdates.align === "left" ? "l" : styleUpdates.align === "center" ? "ctr" : styleUpdates.align === "right" ? "r" : styleUpdates.align === "justify" ? "just" : String(styleUpdates.align);
59711
- paragraph["a:pPr"] = pPr;
59712
- }
59713
- run["a:rPr"] = rPr;
59714
59913
  }
59715
- if (runs.length === 0 && paragraph["a:endParaRPr"]) {
59716
- const endRPr = paragraph["a:endParaRPr"];
59914
+ const endRPr = runs.length === 0 ? ensureXmlChild(paragraph, "a:endParaRPr") : void 0;
59915
+ if (endRPr) {
59717
59916
  if ("bold" in styleUpdates) {
59718
59917
  if (styleUpdates.bold) {
59719
59918
  endRPr["@_b"] = "1";
@@ -59787,35 +59986,10 @@ function updateMergeAttrsInRawXml(element, tableData) {
59787
59986
  delete xmlCell["@_vMerge"];
59788
59987
  }
59789
59988
  if (cell.text !== void 0) {
59790
- const existingTxBody = xmlCell["a:txBody"];
59791
- const existingParagraphs = existingTxBody ? ensureArray16(existingTxBody["a:p"]) : [];
59792
- const firstParagraph = existingParagraphs.length > 0 ? existingParagraphs[0] : void 0;
59793
- const existingRuns = firstParagraph ? ensureArray16(firstParagraph["a:r"]) : [];
59794
- const firstRunProps = existingRuns.length > 0 ? existingRuns[0]["a:rPr"] : void 0;
59795
- const newRun = {
59796
- "a:t": cell.text
59797
- };
59798
- if (firstRunProps) {
59799
- newRun["a:rPr"] = firstRunProps;
59800
- }
59801
- const newParagraph = {
59802
- "a:r": newRun
59803
- };
59804
- if (firstParagraph?.["a:pPr"]) {
59805
- newParagraph["a:pPr"] = firstParagraph["a:pPr"];
59806
- }
59807
- const bodyPr = existingTxBody?.["a:bodyPr"];
59808
- const lstStyle = existingTxBody?.["a:lstStyle"];
59809
- const newTxBody = {
59810
- "a:p": newParagraph
59811
- };
59812
- if (bodyPr !== void 0) {
59813
- newTxBody["a:bodyPr"] = bodyPr;
59814
- }
59815
- if (lstStyle !== void 0) {
59816
- newTxBody["a:lstStyle"] = lstStyle;
59817
- }
59818
- xmlCell["a:txBody"] = newTxBody;
59989
+ xmlCell["a:txBody"] = rebuildCellTextBody(
59990
+ xmlCell["a:txBody"],
59991
+ cell.text
59992
+ );
59819
59993
  }
59820
59994
  }
59821
59995
  }
@@ -64161,10 +64335,13 @@ var PptxHandlerRuntime31 = class extends PptxHandlerRuntime30 {
64161
64335
  }
64162
64336
  /** Apply geometry preset or custom paths to spPr. */
64163
64337
  applyGeometryUpdate(shape, el) {
64164
- if (!hasShapeProperties(el) || !shape["p:spPr"]) {
64338
+ if (!hasShapeProperties(el)) {
64339
+ return;
64340
+ }
64341
+ const spPr = ensureXmlChild(shape, "p:spPr");
64342
+ if (!spPr) {
64165
64343
  return;
64166
64344
  }
64167
- const spPr = shape["p:spPr"];
64168
64345
  const elWithPaths = el;
64169
64346
  if (elWithPaths.customGeometryPaths && elWithPaths.customGeometryPaths.length > 0) {
64170
64347
  delete spPr["a:prstGeom"];
@@ -64797,7 +64974,7 @@ var PptxHandlerRuntime35 = class _PptxHandlerRuntime12 extends PptxHandlerRuntim
64797
64974
  }
64798
64975
  applyZoomTransform(shapeProperties, el) {
64799
64976
  const emu2 = _PptxHandlerRuntime12.EMU_PER_PX;
64800
- const transform = shapeProperties["a:xfrm"] ??= {};
64977
+ const transform = ensureXmlChildOrCreate(shapeProperties, "a:xfrm");
64801
64978
  transform["a:off"] = {
64802
64979
  "@_x": String(Math.round(el.x * emu2)),
64803
64980
  "@_y": String(Math.round(el.y * emu2))
@@ -64824,8 +65001,8 @@ var PptxHandlerRuntime35 = class _PptxHandlerRuntime12 extends PptxHandlerRuntim
64824
65001
  if (!relationshipId2) {
64825
65002
  return;
64826
65003
  }
64827
- const blipFill = zoomProperties["p166:blipFill"] ??= {};
64828
- const blip = blipFill["a:blip"] ??= {};
65004
+ const blipFill = ensureXmlChildOrCreate(zoomProperties, "p166:blipFill");
65005
+ const blip = ensureXmlChildOrCreate(blipFill, "a:blip");
64829
65006
  blip["@_r:embed"] = relationshipId2;
64830
65007
  }
64831
65008
  updateZoomFallback(shape, el, relationshipId2) {
@@ -64835,11 +65012,11 @@ var PptxHandlerRuntime35 = class _PptxHandlerRuntime12 extends PptxHandlerRuntim
64835
65012
  if (!picture) {
64836
65013
  return;
64837
65014
  }
64838
- const shapeProperties = picture["p:spPr"] ??= {};
65015
+ const shapeProperties = ensureXmlChildOrCreate(picture, "p:spPr");
64839
65016
  this.applyZoomTransform(shapeProperties, el);
64840
65017
  if (relationshipId2) {
64841
- const blipFill = picture["p:blipFill"] ??= {};
64842
- const blip = blipFill["a:blip"] ??= {};
65018
+ const blipFill = ensureXmlChildOrCreate(picture, "p:blipFill");
65019
+ const blip = ensureXmlChildOrCreate(blipFill, "a:blip");
64843
65020
  blip["@_r:embed"] = relationshipId2;
64844
65021
  }
64845
65022
  }
@@ -64934,7 +65111,7 @@ var PptxHandlerRuntime37 = class _PptxHandlerRuntime13 extends PptxHandlerRuntim
64934
65111
  continue;
64935
65112
  }
64936
65113
  const object = target.rawXml ?? existing[index] ?? {};
64937
- const properties = object["psuz:zmPr"] ??= {};
65114
+ const properties = ensureXmlChildOrCreate(object, "psuz:zmPr");
64938
65115
  const tile = this.summaryTileElement(el, target, index);
64939
65116
  const relationshipShape = {
64940
65117
  "psezm:sectionZmObj": { "psezm:zmPr": properties }
@@ -64949,8 +65126,10 @@ var PptxHandlerRuntime37 = class _PptxHandlerRuntime13 extends PptxHandlerRuntim
64949
65126
  this.applyOptionalAttribute(object, "@_scaleFactorY", target.scaleFactorY);
64950
65127
  properties["@_id"] ??= `{${generateFontGuid()}}`;
64951
65128
  properties["@_imageType"] ??= "preview";
64952
- properties["p166:blipFill"] ??= this.buildZoomBlipFill(relationshipId2);
64953
- const shapeProperties = properties["p166:spPr"] ??= this.buildZoomShapeProperties(tile);
65129
+ if (!xmlHasChild(properties, "p166:blipFill")) {
65130
+ properties["p166:blipFill"] = this.buildZoomBlipFill(relationshipId2);
65131
+ }
65132
+ const shapeProperties = xmlHasChild(properties, "p166:spPr") ? ensureXmlChildOrCreate(properties, "p166:spPr") : properties["p166:spPr"] = this.buildZoomShapeProperties(tile);
64954
65133
  this.applyZoomTransform(shapeProperties, tile);
64955
65134
  this.applyZoomBlipRelationship(properties, relationshipId2);
64956
65135
  target.sectionId = sectionId;
@@ -65016,10 +65195,10 @@ var PptxHandlerRuntime37 = class _PptxHandlerRuntime13 extends PptxHandlerRuntim
65016
65195
  group2["p:pic"] = targets.map((target, index) => {
65017
65196
  const tile = this.summaryTileElement(el, target, index);
65018
65197
  const picture = existing[index] ?? this.buildZoomFallbackPicture(tile, relationships[index]);
65019
- this.applyZoomTransform(picture["p:spPr"] ??= {}, tile);
65198
+ this.applyZoomTransform(ensureXmlChildOrCreate(picture, "p:spPr"), tile);
65020
65199
  if (relationships[index]) {
65021
- const fill = picture["p:blipFill"] ??= {};
65022
- const blip = fill["a:blip"] ??= {};
65200
+ const fill = ensureXmlChildOrCreate(picture, "p:blipFill");
65201
+ const blip = ensureXmlChildOrCreate(fill, "a:blip");
65023
65202
  blip["@_r:embed"] = relationships[index];
65024
65203
  }
65025
65204
  return picture;
@@ -65114,12 +65293,11 @@ var PptxHandlerRuntime38 = class _PptxHandlerRuntime14 extends PptxHandlerRuntim
65114
65293
  el.rawXml = shape;
65115
65294
  return shape;
65116
65295
  }
65117
- shape["p16:model3Drel"] ??= {};
65118
- shape["p16:model3Drel"]["@_r:id"] = modelRelationshipId;
65119
- const spPr = shape["p16:spPr"] ??= {};
65296
+ ensureXmlChildOrCreate(shape, "p16:model3Drel")["@_r:id"] = modelRelationshipId;
65297
+ const spPr = ensureXmlChildOrCreate(shape, "p16:spPr");
65120
65298
  this.applyModel3DTransform(spPr, el);
65121
65299
  if (poster.relationshipId) {
65122
- const posterNode = shape["p16:posterImage"] ??= {};
65300
+ const posterNode = ensureXmlChildOrCreate(shape, "p16:posterImage");
65123
65301
  posterNode["@_r:embed"] = poster.relationshipId;
65124
65302
  this.updateModel3DFallback(shape, el, poster.relationshipId);
65125
65303
  }
@@ -65184,7 +65362,7 @@ var PptxHandlerRuntime38 = class _PptxHandlerRuntime14 extends PptxHandlerRuntim
65184
65362
  return result;
65185
65363
  }
65186
65364
  applyModel3DTransform(spPr, el) {
65187
- const transform = spPr["a:xfrm"] ??= {};
65365
+ const transform = ensureXmlChildOrCreate(spPr, "a:xfrm");
65188
65366
  const emu2 = _PptxHandlerRuntime14.EMU_PER_PX;
65189
65367
  transform["a:off"] = {
65190
65368
  "@_x": String(Math.round(el.x * emu2)),
@@ -65240,9 +65418,9 @@ var PptxHandlerRuntime38 = class _PptxHandlerRuntime14 extends PptxHandlerRuntim
65240
65418
  if (!picture) {
65241
65419
  return;
65242
65420
  }
65243
- this.applyModel3DTransform(picture["p:spPr"] ??= {}, el);
65244
- const fill = picture["p:blipFill"] ??= {};
65245
- const blip = fill["a:blip"] ??= {};
65421
+ this.applyModel3DTransform(ensureXmlChildOrCreate(picture, "p:spPr"), el);
65422
+ const fill = ensureXmlChildOrCreate(picture, "p:blipFill");
65423
+ const blip = ensureXmlChildOrCreate(fill, "a:blip");
65246
65424
  blip["@_r:embed"] = posterRelationshipId;
65247
65425
  }
65248
65426
  };
@@ -65362,7 +65540,7 @@ var PptxHandlerRuntime39 = class _PptxHandlerRuntime15 extends PptxHandlerRuntim
65362
65540
  }
65363
65541
  applyContentPartTransform(shape, el) {
65364
65542
  const emu2 = _PptxHandlerRuntime15.EMU_PER_PX;
65365
- const transform = shape["p:xfrm"] ??= {};
65543
+ const transform = ensureXmlChildOrCreate(shape, "p:xfrm");
65366
65544
  transform["a:off"] = {
65367
65545
  "@_x": String(Math.round(el.x * emu2)),
65368
65546
  "@_y": String(Math.round(el.y * emu2))
@@ -65863,12 +66041,14 @@ var PptxHandlerRuntime40 = class _PptxHandlerRuntime16 extends PptxHandlerRuntim
65863
66041
  this.applyImageProperties(shape, el);
65864
66042
  this.finalizePictureBlipFillOrder(shape);
65865
66043
  this.applyGeometryUpdate(shape, el);
65866
- if (hasShapeProperties(el) && el.shapeStyle && shape["p:spPr"]) {
65867
- const spPr = shape["p:spPr"];
65868
- this.applyFillAndStroke(spPr, el.shapeStyle, ctx.inheritedGroupFill);
65869
- this.applyEffectsAndThreeD(spPr, el.shapeStyle);
65870
- this.finalizeSpPrSchemaOrder(shape);
65871
- this.applyShapeStyleRefs(shape, el.shapeStyle);
66044
+ if (hasShapeProperties(el) && el.shapeStyle) {
66045
+ const spPr = ensureXmlChild(shape, "p:spPr");
66046
+ if (spPr) {
66047
+ this.applyFillAndStroke(spPr, el.shapeStyle, ctx.inheritedGroupFill);
66048
+ this.applyEffectsAndThreeD(spPr, el.shapeStyle);
66049
+ this.finalizeSpPrSchemaOrder(shape);
66050
+ this.applyShapeStyleRefs(shape, el.shapeStyle);
66051
+ }
65872
66052
  }
65873
66053
  if (hasTextProperties(el)) {
65874
66054
  this.applyTextBodyContent(
@@ -71624,6 +71804,12 @@ var PptxHandlerRuntime65 = class _PptxHandlerRuntime28 extends PptxHandlerRuntim
71624
71804
  isLinked: mediaReference.isLinked,
71625
71805
  posterFramePath,
71626
71806
  posterFrameData,
71807
+ // Real PowerPoint media is `p:pic`-shaped even though the
71808
+ // `media` type buckets as `p:graphicFrame`, so its locks live
71809
+ // in `a:picLocks`. The writer resolves the same container from
71810
+ // the markup; leaving this unparsed would hand it an empty bag
71811
+ // and delete the authored lock on the first save.
71812
+ locks: parseShapeLocksFromNode(pic, SHAPE_LOCK_CONTAINERS["p:pic"]),
71627
71813
  rawXml: pic
71628
71814
  };
71629
71815
  }
@@ -73761,11 +73947,11 @@ var PptxHandlerRuntime74 = class extends PptxHandlerRuntime73 {
73761
73947
  if (!masterXmlStr) {
73762
73948
  return [];
73763
73949
  }
73764
- const masterXmlObj = this.parser.parse(masterXmlStr);
73950
+ const masterXmlObj = this.masterXmlMap.get(masterPath) ?? this.parser.parse(masterXmlStr);
73765
73951
  this.masterXmlMap.set(masterPath, masterXmlObj);
73766
73952
  const masterRelsPath = partRelsPath(masterPath);
73767
73953
  await this.loadSlideRelationships(masterPath, masterRelsPath);
73768
- const spTree = masterXmlObj["p:sldMaster"]?.["p:cSld"]?.["p:spTree"];
73954
+ const spTree = xmlPath(masterXmlObj, "p:sldMaster", "p:cSld", "p:spTree");
73769
73955
  if (!spTree) {
73770
73956
  this.masterCache.set(masterPath, []);
73771
73957
  return [];
@@ -77743,7 +77929,7 @@ var PptxHandlerRuntime91 = class extends PptxHandlerRuntime90 {
77743
77929
  ).trim();
77744
77930
  const seriesShapeProperties = this.xmlLookupService.getChildByLocalName(seriesNode, "spPr");
77745
77931
  const readsLineColor = seriesChartType === "line" || seriesChartType === "line3D" || seriesChartType === "scatter" || seriesChartType === "radar" || seriesChartType === "stock";
77746
- const seriesColor23 = this.parseColor(
77932
+ const seriesColor22 = this.parseColor(
77747
77933
  this.xmlLookupService.getChildByLocalName(seriesShapeProperties, "solidFill")
77748
77934
  ) ?? (readsLineColor ? this.parseColor(
77749
77935
  this.xmlLookupService.getChildByLocalName(
@@ -77797,7 +77983,7 @@ var PptxHandlerRuntime91 = class extends PptxHandlerRuntime90 {
77797
77983
  ...dataLabelOptions && Object.keys(dataLabelOptions).length > 0 ? { dataLabelOptions } : {},
77798
77984
  ...lineNoFill ? { lineNoFill } : {},
77799
77985
  ...seriesNumberFormat ? { numberFormat: seriesNumberFormat } : {},
77800
- color: seriesColor23,
77986
+ color: seriesColor22,
77801
77987
  ...trendlines.length > 0 ? { trendlines } : {},
77802
77988
  ...errBars.length > 0 ? { errBars } : {},
77803
77989
  ...dataPoints.length > 0 ? { dataPoints } : {},
@@ -92883,357 +93069,10 @@ function strokeOnlyPresetPathData(element) {
92883
93069
  const stroked = paths.filter((path) => path.stroke !== false).map((path) => path.d);
92884
93070
  return stroked.length > 0 ? stroked.join(" ") : void 0;
92885
93071
  }
92886
- function round4(value) {
92887
- return Math.round(value * 1e4) / 1e4;
92888
- }
92889
- function svgGradientId(elementId, suffix = "grad") {
92890
- const seed = String(elementId).replace(/[^a-zA-Z0-9_-]/gu, "_");
92891
- return `pptx-${suffix}-${seed}`;
92892
- }
92893
- function toSvgStops(stops) {
92894
- return sanitizeGradientStops(stops).map((stop) => ({
92895
- offset: round4(stop.position / 100),
92896
- color: stop.color,
92897
- ...typeof stop.opacity === "number" ? { opacity: round4(stop.opacity) } : {}
92898
- }));
92899
- }
92900
- function linearEndpoints(angleDegrees) {
92901
- const radians = angleDegrees * Math.PI / 180;
92902
- const dx = Math.cos(radians);
92903
- const dy = Math.sin(radians);
92904
- const span = (Math.abs(dx) + Math.abs(dy)) / 2;
92905
- return {
92906
- x1: round4(0.5 - dx * span),
92907
- y1: round4(0.5 - dy * span),
92908
- x2: round4(0.5 + dx * span),
92909
- y2: round4(0.5 + dy * span)
92910
- };
92911
- }
92912
- function buildFromSource(source, id) {
92913
- const { stops } = source;
92914
- if (stops.length === 0) {
92915
- return void 0;
92916
- }
92917
- if ((source.type || "linear") === "radial") {
92918
- const { cx, cy } = computeGradientCenter(source.fillToRect, source.focalPoint);
92919
- const fx = cx / 100;
92920
- const fy = cy / 100;
92921
- const r = Math.hypot(Math.max(fx, 1 - fx), Math.max(fy, 1 - fy));
92922
- return { kind: "radial", id, cx: round4(fx), cy: round4(fy), r: round4(r), stops };
92923
- }
92924
- const angle = typeof source.angle === "number" && Number.isFinite(source.angle) ? source.angle : 90;
92925
- return { kind: "linear", id, ...linearEndpoints(angle), stops };
92926
- }
92927
- function buildSvgGradientDef(style, elementId) {
92928
- if (!style || style.fillMode !== "gradient") {
92929
- return void 0;
92930
- }
92931
- return buildFromSource(
92932
- {
92933
- stops: toSvgStops(style.fillGradientStops),
92934
- type: style.fillGradientType,
92935
- angle: style.fillGradientAngle,
92936
- fillToRect: style.fillGradientFillToRect,
92937
- focalPoint: style.fillGradientFocalPoint
92938
- },
92939
- svgGradientId(elementId)
92940
- );
92941
- }
92942
- function buildSvgStrokeGradientDef(style, elementId) {
92943
- if (!style || style.strokeFillMode !== "gradient") {
92944
- return void 0;
92945
- }
92946
- return buildFromSource(
92947
- {
92948
- stops: toSvgStops(style.strokeGradientStops),
92949
- type: style.strokeGradientType,
92950
- angle: style.strokeGradientAngle
92951
- },
92952
- svgGradientId(elementId, "stroke")
92953
- );
92954
- }
92955
- function buildSvgStrokePatternDef(style, elementId) {
92956
- if (!style || style.strokeFillMode !== "pattern" || !style.strokePatternPreset) {
92957
- return void 0;
92958
- }
92959
- const fg = normalizeHexColor(style.strokeColor, "#000000");
92960
- const bg = normalizeHexColor(style.strokePatternBackgroundColor, "#ffffff");
92961
- const tile = getPatternTile(style.strokePatternPreset, fg, bg);
92962
- if (!tile) {
92963
- return void 0;
92964
- }
92965
- const markup = `<svg xmlns="http://www.w3.org/2000/svg" width="${tile.w}" height="${tile.h}">${tile.inner}</svg>`;
92966
- return {
92967
- kind: "pattern",
92968
- id: svgGradientId(elementId, "strokepat"),
92969
- width: tile.w,
92970
- height: tile.h,
92971
- href: `data:image/svg+xml,${encodeURIComponent(markup)}`
92972
- };
92973
- }
92974
- function svgGradientFillRef(def) {
92975
- return `url(#${def.id})`;
92976
- }
92977
- var DEFAULT_OPEN_PRESET_STROKE_WIDTH = 2;
92978
- function outlinePathData(clipPath, width, height) {
92979
- if (!Number.isFinite(width) || !Number.isFinite(height) || width <= 0 || height <= 0) {
92980
- return void 0;
92981
- }
92982
- const rect2 = `M 0 0 L ${width} 0 L ${width} ${height} L 0 ${height} Z`;
92983
- if (!clipPath) {
92984
- return rect2;
92985
- }
92986
- const asPath = /^path\('(.*)'\)$/su.exec(clipPath.trim());
92987
- if (asPath) {
92988
- return asPath[1];
92989
- }
92990
- const asPolygon = /^polygon\((.*)\)$/su.exec(clipPath.trim());
92991
- if (asPolygon) {
92992
- const points3 = asPolygon[1].split(",").map((pair) => pair.trim().split(/\s+/u)).filter((parts) => parts.length === 2).map(([rawX, rawY]) => {
92993
- const toPx2 = (token2, extent) => token2.endsWith("%") ? Number.parseFloat(token2) / 100 * extent : Number.parseFloat(token2);
92994
- return [toPx2(rawX, width), toPx2(rawY, height)];
92995
- }).filter(([x, y]) => Number.isFinite(x) && Number.isFinite(y));
92996
- if (points3.length < 3) {
92997
- return rect2;
92998
- }
92999
- const [first, ...rest] = points3;
93000
- return `M ${first[0]} ${first[1]} ${rest.map(([x, y]) => `L ${x} ${y}`).join(" ")} Z`;
93001
- }
93002
- return rect2;
93003
- }
93004
- function outlineStrands(compoundLine, strokeWidth) {
93005
- const offsets = getCompoundLineOffsets(compoundLine, strokeWidth);
93006
- if (offsets.length <= 1) {
93007
- return [{ strokeWidth, offset: 0 }];
93008
- }
93009
- const widths = getCompoundLineWidths(compoundLine, strokeWidth);
93010
- return offsets.map((offset, idx) => ({ strokeWidth: widths[idx] ?? strokeWidth, offset }));
93011
- }
93012
- function buildStrokeOutline(element) {
93013
- if (!hasShapeProperties(element)) {
93014
- return void 0;
93015
- }
93016
- const style = element.shapeStyle;
93017
- const declaredWidth = Math.max(0, style?.strokeWidth ?? 0);
93018
- const openPresetD = strokeOnlyPresetPathData(element);
93019
- if (!openPresetD && (!style || declaredWidth <= 0)) {
93020
- return void 0;
93021
- }
93022
- const paint = style && declaredWidth > 0 ? buildSvgStrokeGradientDef(style, element.id) ?? buildSvgStrokePatternDef(style, element.id) : void 0;
93023
- if (!paint && !openPresetD) {
93024
- return void 0;
93025
- }
93026
- const d = openPresetD ?? outlinePathData(getResolvedShapeClipPath(element), element.width, element.height);
93027
- if (!d) {
93028
- return void 0;
93029
- }
93030
- const strokeWidth = declaredWidth > 0 ? declaredWidth : DEFAULT_OPEN_PRESET_STROKE_WIDTH;
93031
- return {
93032
- d,
93033
- paint,
93034
- stroke: paint ? svgGradientFillRef(paint) : colorWithOpacity(style?.strokeColor ?? DEFAULT_STROKE_COLOR, style?.strokeOpacity),
93035
- strokeWidth,
93036
- strands: outlineStrands(style?.compoundLine, strokeWidth),
93037
- dashArray: getSvgStrokeDasharray(
93038
- normalizeStrokeDashType(style?.strokeDash),
93039
- Math.max(strokeWidth, 1),
93040
- style?.customDashSegments
93041
- ),
93042
- lineCap: svgLineCap(style?.lineCap),
93043
- lineJoin: style?.lineJoin === "bevel" ? "bevel" : style?.lineJoin === "miter" ? "miter" : "round"
93044
- };
93045
- }
93046
- function strokeOutlineViewBox(element) {
93047
- const width = Math.max(element.width, MIN_ELEMENT_SIZE);
93048
- const height = Math.max(element.height, MIN_ELEMENT_SIZE);
93049
- return `0 0 ${width} ${height}`;
93050
- }
93051
- function suppressesCssBorder(element) {
93052
- return buildStrokeOutline(element) !== void 0;
93053
- }
93054
- var HOLLOW_HIT_MIN_WIDTH = 10;
93055
- function isHollowShapeElement(element) {
93056
- if (element.type !== "shape" || !hasShapeProperties(element)) {
93057
- return false;
93058
- }
93059
- const style = element.shapeStyle;
93060
- const filled = style?.fillColor !== void 0 && style.fillColor !== "transparent" || style?.fillMode === "gradient" || style?.fillMode === "pattern" || style?.fillMode === "image" || style?.fillMode === "group" || Boolean(style?.fillGradient);
93061
- if (filled) {
93062
- return false;
93063
- }
93064
- return getElementTextContent(element).trim() === "";
93065
- }
93066
- function buildHollowHitOutline(element) {
93067
- if (!isHollowShapeElement(element)) {
93068
- return void 0;
93069
- }
93070
- const d = outlinePathData(getResolvedShapeClipPath(element), element.width, element.height);
93071
- if (!d) {
93072
- return void 0;
93073
- }
93074
- const strokeWidth = hasShapeProperties(element) ? element.shapeStyle?.strokeWidth ?? 0 : 0;
93075
- return { d, strokeWidth: Math.max(strokeWidth * 3, HOLLOW_HIT_MIN_WIDTH) };
93076
- }
93077
- function createWheelStepBuffer() {
93078
- return { accumulated: 0 };
93079
- }
93080
- var LINE_PX = 16;
93081
- var PAGE_PX = 400;
93082
- var STEP_THRESHOLD_PX = 120;
93083
- var ZOOM_PER_PX = 15e-4;
93084
- function normalizeWheelDelta({ deltaY, deltaMode = 0 }) {
93085
- if (deltaMode === 1) {
93086
- return deltaY * LINE_PX;
93087
- }
93088
- if (deltaMode === 2) {
93089
- return deltaY * PAGE_PX;
93090
- }
93091
- return deltaY;
93092
- }
93093
- function accumulate(buffer, px3) {
93094
- if (px3 !== 0 && Math.sign(px3) !== Math.sign(buffer.accumulated)) {
93095
- buffer.accumulated = 0;
93096
- }
93097
- buffer.accumulated += px3;
93098
- if (buffer.accumulated >= STEP_THRESHOLD_PX) {
93099
- buffer.accumulated = 0;
93100
- return { intent: "next-slide" };
93101
- }
93102
- if (buffer.accumulated <= -STEP_THRESHOLD_PX) {
93103
- buffer.accumulated = 0;
93104
- return { intent: "previous-slide" };
93105
- }
93106
- return { intent: "none" };
93107
- }
93108
- function mapEditingWheel(input, buffer, canScrollFurther) {
93109
- const px3 = normalizeWheelDelta(input);
93110
- if (input.ctrlKey === true || input.metaKey === true) {
93111
- buffer.accumulated = 0;
93112
- return { intent: "zoom", deltaScale: -px3 * ZOOM_PER_PX };
93113
- }
93114
- if (canScrollFurther) {
93115
- buffer.accumulated = 0;
93116
- return { intent: "scroll" };
93117
- }
93118
- return accumulate(buffer, px3);
93119
- }
93120
- function mapPresentationWheel(input, buffer) {
93121
- return accumulate(buffer, normalizeWheelDelta(input));
93122
- }
93123
- var CYLINDER_RADIUS = "48% / 12%";
93124
- var MIN_ROUND_RECT_RADIUS_PX = 0.01;
93125
- function resolveShapeGeometry(element) {
93126
- const shapeType = getShapeType(element.shapeType);
93127
- if (element.type === "connector" || shapeType === "connector") {
93128
- return { kind: "bare" };
93129
- }
93130
- if (isStrokeOnlyPresetElement(element)) {
93131
- return { kind: "strokeOnly" };
93132
- }
93133
- if (shapeType === "roundRect" && hasShapeProperties(element)) {
93134
- const radiusPx = getRoundRectRadiusPx(element);
93135
- return radiusPx > MIN_ROUND_RECT_RADIUS_PX ? { kind: "borderRadius", radius: `${radiusPx}px` } : { kind: "none" };
93136
- }
93137
- if (shapeType === "ellipse") {
93138
- return { kind: "borderRadius", radius: "50%" };
93139
- }
93140
- const clipPath = isIdentityRectClip(element) ? void 0 : getResolvedShapeClipPath(element);
93141
- if (clipPath) {
93142
- return { kind: "clipPath", clipPath };
93143
- }
93144
- if (shapeType === "line") {
93145
- const authored = element.shapeStyle?.strokeWidth;
93146
- return { kind: "lineEdge", strokeWidth: Math.max(Math.max(0, authored ?? 0), 2) };
93147
- }
93148
- if (shapeType === "cylinder") {
93149
- return { kind: "borderRadius", radius: CYLINDER_RADIUS };
93150
- }
93151
- return { kind: "none" };
93152
- }
93153
- function hasStrokePaint(style) {
93154
- if (!style || Math.max(0, style.strokeWidth ?? 0) <= 0) {
93155
- return false;
93156
- }
93157
- return style.strokeColor !== void 0 || style.strokeFillMode !== void 0;
93158
- }
93159
- function paintedStrokeWidth(style) {
93160
- return hasStrokePaint(style) ? Math.max(0, style?.strokeWidth ?? 0) : 0;
93161
- }
93162
- var NO_STROKE = {
93163
- borderWidth: 0,
93164
- borderStyle: void 0,
93165
- borderColor: void 0,
93166
- border: void 0,
93167
- strokeLinejoin: void 0,
93168
- strokeLinecap: void 0,
93169
- strokeMiterlimit: void 0
93170
- };
93171
- function svgLineJoin(join) {
93172
- switch (join) {
93173
- case "round":
93174
- return "round";
93175
- case "bevel":
93176
- return "bevel";
93177
- case "miter":
93178
- return "miter";
93179
- default:
93180
- return void 0;
93181
- }
93182
- }
93183
- function svgStrokeLineCap(cap) {
93184
- switch (cap) {
93185
- case "rnd":
93186
- return "round";
93187
- case "sq":
93188
- return "square";
93189
- case "flat":
93190
- return "butt";
93191
- default:
93192
- return void 0;
93193
- }
93194
- }
93195
- function strokeMiterLimit(style) {
93196
- if (style?.lineJoin !== "miter" || typeof style.miterLimit !== "number") {
93197
- return void 0;
93198
- }
93199
- if (!Number.isFinite(style.miterLimit)) {
93200
- return void 0;
93201
- }
93202
- return Math.max(style.miterLimit / 1e5, 1);
93203
- }
93204
- function getComputedStrokeStyle(element) {
93205
- if (!hasShapeProperties(element)) {
93206
- return NO_STROKE;
93207
- }
93208
- const style = element.shapeStyle;
93209
- const width = suppressesCssBorder(element) ? 0 : paintedStrokeWidth(style);
93210
- const joins = {
93211
- strokeLinejoin: svgLineJoin(style?.lineJoin),
93212
- strokeLinecap: svgStrokeLineCap(style?.lineCap),
93213
- strokeMiterlimit: strokeMiterLimit(style)
93214
- };
93215
- if (width <= 0 || !style) {
93216
- return { ...NO_STROKE, ...joins };
93217
- }
93218
- const borderWidth = width;
93219
- const borderStyle = getCssBorderDashStyle(
93220
- normalizeStrokeDashType(style.strokeDash),
93221
- style.compoundLine
93222
- );
93223
- const rawColor = style.strokeColor ?? DEFAULT_STROKE_COLOR;
93224
- const borderColor = style.strokeOpacity === void 0 ? rawColor : colorWithOpacity(normalizeHexColor(rawColor, DEFAULT_STROKE_COLOR), style.strokeOpacity);
93225
- return {
93226
- borderWidth,
93227
- borderStyle,
93228
- borderColor,
93229
- border: `${borderWidth}px ${borderStyle ?? "solid"} ${borderColor}`,
93230
- ...joins
93231
- };
93232
- }
93233
93072
  var DEFAULT_SHADOW_COLOR = "#000000";
93234
93073
  var DEFAULT_GLOW_COLOR = "#ffff00";
93235
93074
  function escapeSvgAttr(value) {
93236
- return value.replace(/&/g, "&amp;").replace(/"/g, "&quot;").replace(/</g, "&lt;").replace(/>/g, "&gt;");
93075
+ return String(value).replace(/&/g, "&amp;").replace(/"/g, "&quot;").replace(/</g, "&lt;").replace(/>/g, "&gt;");
93237
93076
  }
93238
93077
  function clampUnitInterval22(value) {
93239
93078
  return Math.min(1, Math.max(0, value));
@@ -93618,6 +93457,353 @@ function getComputedEffectStyle(element, options = {}) {
93618
93457
  }
93619
93458
  return result;
93620
93459
  }
93460
+ function round4(value) {
93461
+ return Math.round(value * 1e4) / 1e4;
93462
+ }
93463
+ function svgGradientId(elementId, suffix = "grad") {
93464
+ const seed = String(elementId).replace(/[^a-zA-Z0-9_-]/gu, "_");
93465
+ return `pptx-${suffix}-${seed}`;
93466
+ }
93467
+ function toSvgStops(stops) {
93468
+ return sanitizeGradientStops(stops).map((stop) => ({
93469
+ offset: round4(stop.position / 100),
93470
+ color: stop.color,
93471
+ ...typeof stop.opacity === "number" ? { opacity: round4(stop.opacity) } : {}
93472
+ }));
93473
+ }
93474
+ function linearEndpoints(angleDegrees) {
93475
+ const radians = angleDegrees * Math.PI / 180;
93476
+ const dx = Math.cos(radians);
93477
+ const dy = Math.sin(radians);
93478
+ const span = (Math.abs(dx) + Math.abs(dy)) / 2;
93479
+ return {
93480
+ x1: round4(0.5 - dx * span),
93481
+ y1: round4(0.5 - dy * span),
93482
+ x2: round4(0.5 + dx * span),
93483
+ y2: round4(0.5 + dy * span)
93484
+ };
93485
+ }
93486
+ function buildFromSource(source, id) {
93487
+ const { stops } = source;
93488
+ if (stops.length === 0) {
93489
+ return void 0;
93490
+ }
93491
+ if ((source.type || "linear") === "radial") {
93492
+ const { cx, cy } = computeGradientCenter(source.fillToRect, source.focalPoint);
93493
+ const fx = cx / 100;
93494
+ const fy = cy / 100;
93495
+ const r = Math.hypot(Math.max(fx, 1 - fx), Math.max(fy, 1 - fy));
93496
+ return { kind: "radial", id, cx: round4(fx), cy: round4(fy), r: round4(r), stops };
93497
+ }
93498
+ const angle = typeof source.angle === "number" && Number.isFinite(source.angle) ? source.angle : 90;
93499
+ return { kind: "linear", id, ...linearEndpoints(angle), stops };
93500
+ }
93501
+ function buildSvgGradientDef(style, elementId) {
93502
+ if (!style || style.fillMode !== "gradient") {
93503
+ return void 0;
93504
+ }
93505
+ return buildFromSource(
93506
+ {
93507
+ stops: toSvgStops(style.fillGradientStops),
93508
+ type: style.fillGradientType,
93509
+ angle: style.fillGradientAngle,
93510
+ fillToRect: style.fillGradientFillToRect,
93511
+ focalPoint: style.fillGradientFocalPoint
93512
+ },
93513
+ svgGradientId(elementId)
93514
+ );
93515
+ }
93516
+ function buildSvgStrokeGradientDef(style, elementId) {
93517
+ if (!style || style.strokeFillMode !== "gradient") {
93518
+ return void 0;
93519
+ }
93520
+ return buildFromSource(
93521
+ {
93522
+ stops: toSvgStops(style.strokeGradientStops),
93523
+ type: style.strokeGradientType,
93524
+ angle: style.strokeGradientAngle
93525
+ },
93526
+ svgGradientId(elementId, "stroke")
93527
+ );
93528
+ }
93529
+ function buildSvgStrokePatternDef(style, elementId) {
93530
+ if (!style || style.strokeFillMode !== "pattern" || !style.strokePatternPreset) {
93531
+ return void 0;
93532
+ }
93533
+ const fg = normalizeHexColor(style.strokeColor, "#000000");
93534
+ const bg = normalizeHexColor(style.strokePatternBackgroundColor, "#ffffff");
93535
+ const tile = getPatternTile(style.strokePatternPreset, fg, bg);
93536
+ if (!tile) {
93537
+ return void 0;
93538
+ }
93539
+ const markup = `<svg xmlns="http://www.w3.org/2000/svg" width="${tile.w}" height="${tile.h}">${tile.inner}</svg>`;
93540
+ return {
93541
+ kind: "pattern",
93542
+ id: svgGradientId(elementId, "strokepat"),
93543
+ width: tile.w,
93544
+ height: tile.h,
93545
+ href: `data:image/svg+xml,${encodeURIComponent(markup)}`
93546
+ };
93547
+ }
93548
+ function svgGradientFillRef(def) {
93549
+ return `url(#${def.id})`;
93550
+ }
93551
+ var DEFAULT_OPEN_PRESET_STROKE_WIDTH = 2;
93552
+ function outlinePathData(clipPath, width, height) {
93553
+ if (!Number.isFinite(width) || !Number.isFinite(height) || width <= 0 || height <= 0) {
93554
+ return void 0;
93555
+ }
93556
+ const rect2 = `M 0 0 L ${width} 0 L ${width} ${height} L 0 ${height} Z`;
93557
+ if (!clipPath) {
93558
+ return rect2;
93559
+ }
93560
+ const asPath = /^path\('(.*)'\)$/su.exec(clipPath.trim());
93561
+ if (asPath) {
93562
+ return asPath[1];
93563
+ }
93564
+ const asPolygon = /^polygon\((.*)\)$/su.exec(clipPath.trim());
93565
+ if (asPolygon) {
93566
+ const points3 = asPolygon[1].split(",").map((pair) => pair.trim().split(/\s+/u)).filter((parts) => parts.length === 2).map(([rawX, rawY]) => {
93567
+ const toPx2 = (token2, extent) => token2.endsWith("%") ? Number.parseFloat(token2) / 100 * extent : Number.parseFloat(token2);
93568
+ return [toPx2(rawX, width), toPx2(rawY, height)];
93569
+ }).filter(([x, y]) => Number.isFinite(x) && Number.isFinite(y));
93570
+ if (points3.length < 3) {
93571
+ return rect2;
93572
+ }
93573
+ const [first, ...rest] = points3;
93574
+ return `M ${first[0]} ${first[1]} ${rest.map(([x, y]) => `L ${x} ${y}`).join(" ")} Z`;
93575
+ }
93576
+ return rect2;
93577
+ }
93578
+ function outlineStrands(compoundLine, strokeWidth) {
93579
+ const offsets = getCompoundLineOffsets(compoundLine, strokeWidth);
93580
+ if (offsets.length <= 1) {
93581
+ return [{ strokeWidth, offset: 0 }];
93582
+ }
93583
+ const widths = getCompoundLineWidths(compoundLine, strokeWidth);
93584
+ return offsets.map((offset, idx) => ({ strokeWidth: widths[idx] ?? strokeWidth, offset }));
93585
+ }
93586
+ function buildStrokeOutline(element) {
93587
+ if (!hasShapeProperties(element)) {
93588
+ return void 0;
93589
+ }
93590
+ const style = element.shapeStyle;
93591
+ const declaredWidth = Math.max(0, style?.strokeWidth ?? 0);
93592
+ const openPresetD = strokeOnlyPresetPathData(element);
93593
+ if (!openPresetD && (!style || declaredWidth <= 0)) {
93594
+ return void 0;
93595
+ }
93596
+ const paint = style && declaredWidth > 0 ? buildSvgStrokeGradientDef(style, element.id) ?? buildSvgStrokePatternDef(style, element.id) : void 0;
93597
+ if (!paint && !openPresetD) {
93598
+ return void 0;
93599
+ }
93600
+ const d = openPresetD ?? outlinePathData(getResolvedShapeClipPath(element), element.width, element.height);
93601
+ if (!d) {
93602
+ return void 0;
93603
+ }
93604
+ const strokeWidth = declaredWidth > 0 ? declaredWidth : DEFAULT_OPEN_PRESET_STROKE_WIDTH;
93605
+ return {
93606
+ d,
93607
+ paint,
93608
+ stroke: paint ? svgGradientFillRef(paint) : colorWithOpacity(style?.strokeColor ?? DEFAULT_STROKE_COLOR, style?.strokeOpacity),
93609
+ strokeWidth,
93610
+ strands: outlineStrands(style?.compoundLine, strokeWidth),
93611
+ dashArray: getSvgStrokeDasharray(
93612
+ normalizeStrokeDashType(style?.strokeDash),
93613
+ Math.max(strokeWidth, 1),
93614
+ style?.customDashSegments
93615
+ ),
93616
+ lineCap: svgLineCap(style?.lineCap),
93617
+ lineJoin: style?.lineJoin === "bevel" ? "bevel" : style?.lineJoin === "miter" ? "miter" : "round"
93618
+ };
93619
+ }
93620
+ function strokeOutlineViewBox(element) {
93621
+ const width = Math.max(element.width, MIN_ELEMENT_SIZE);
93622
+ const height = Math.max(element.height, MIN_ELEMENT_SIZE);
93623
+ return `0 0 ${width} ${height}`;
93624
+ }
93625
+ function suppressesCssBorder(element) {
93626
+ return buildStrokeOutline(element) !== void 0;
93627
+ }
93628
+ var HOLLOW_HIT_MIN_WIDTH = 10;
93629
+ function isHollowShapeElement(element) {
93630
+ if (element.type !== "shape" || !hasShapeProperties(element)) {
93631
+ return false;
93632
+ }
93633
+ const style = element.shapeStyle;
93634
+ const filled = style?.fillColor !== void 0 && style.fillColor !== "transparent" || style?.fillMode === "gradient" || style?.fillMode === "pattern" || style?.fillMode === "image" || style?.fillMode === "group" || Boolean(style?.fillGradient);
93635
+ if (filled) {
93636
+ return false;
93637
+ }
93638
+ return getElementTextContent(element).trim() === "";
93639
+ }
93640
+ function buildHollowHitOutline(element) {
93641
+ if (!isHollowShapeElement(element)) {
93642
+ return void 0;
93643
+ }
93644
+ const d = outlinePathData(getResolvedShapeClipPath(element), element.width, element.height);
93645
+ if (!d) {
93646
+ return void 0;
93647
+ }
93648
+ const strokeWidth = hasShapeProperties(element) ? element.shapeStyle?.strokeWidth ?? 0 : 0;
93649
+ return { d, strokeWidth: Math.max(strokeWidth * 3, HOLLOW_HIT_MIN_WIDTH) };
93650
+ }
93651
+ function createWheelStepBuffer() {
93652
+ return { accumulated: 0 };
93653
+ }
93654
+ var LINE_PX = 16;
93655
+ var PAGE_PX = 400;
93656
+ var STEP_THRESHOLD_PX = 120;
93657
+ var ZOOM_PER_PX = 15e-4;
93658
+ function normalizeWheelDelta({ deltaY, deltaMode = 0 }) {
93659
+ if (deltaMode === 1) {
93660
+ return deltaY * LINE_PX;
93661
+ }
93662
+ if (deltaMode === 2) {
93663
+ return deltaY * PAGE_PX;
93664
+ }
93665
+ return deltaY;
93666
+ }
93667
+ function accumulate(buffer, px3) {
93668
+ if (px3 !== 0 && Math.sign(px3) !== Math.sign(buffer.accumulated)) {
93669
+ buffer.accumulated = 0;
93670
+ }
93671
+ buffer.accumulated += px3;
93672
+ if (buffer.accumulated >= STEP_THRESHOLD_PX) {
93673
+ buffer.accumulated = 0;
93674
+ return { intent: "next-slide" };
93675
+ }
93676
+ if (buffer.accumulated <= -STEP_THRESHOLD_PX) {
93677
+ buffer.accumulated = 0;
93678
+ return { intent: "previous-slide" };
93679
+ }
93680
+ return { intent: "none" };
93681
+ }
93682
+ function mapEditingWheel(input, buffer, canScrollFurther) {
93683
+ const px3 = normalizeWheelDelta(input);
93684
+ if (input.ctrlKey === true || input.metaKey === true) {
93685
+ buffer.accumulated = 0;
93686
+ return { intent: "zoom", deltaScale: -px3 * ZOOM_PER_PX };
93687
+ }
93688
+ if (canScrollFurther) {
93689
+ buffer.accumulated = 0;
93690
+ return { intent: "scroll" };
93691
+ }
93692
+ return accumulate(buffer, px3);
93693
+ }
93694
+ function mapPresentationWheel(input, buffer) {
93695
+ return accumulate(buffer, normalizeWheelDelta(input));
93696
+ }
93697
+ var CYLINDER_RADIUS = "48% / 12%";
93698
+ var MIN_ROUND_RECT_RADIUS_PX = 0.01;
93699
+ function resolveShapeGeometry(element) {
93700
+ const shapeType = getShapeType(element.shapeType);
93701
+ if (element.type === "connector" || shapeType === "connector") {
93702
+ return { kind: "bare" };
93703
+ }
93704
+ if (isStrokeOnlyPresetElement(element)) {
93705
+ return { kind: "strokeOnly" };
93706
+ }
93707
+ if (shapeType === "roundRect" && hasShapeProperties(element)) {
93708
+ const radiusPx = getRoundRectRadiusPx(element);
93709
+ return radiusPx > MIN_ROUND_RECT_RADIUS_PX ? { kind: "borderRadius", radius: `${radiusPx}px` } : { kind: "none" };
93710
+ }
93711
+ if (shapeType === "ellipse") {
93712
+ return { kind: "borderRadius", radius: "50%" };
93713
+ }
93714
+ const clipPath = isIdentityRectClip(element) ? void 0 : getResolvedShapeClipPath(element);
93715
+ if (clipPath) {
93716
+ return { kind: "clipPath", clipPath };
93717
+ }
93718
+ if (shapeType === "line") {
93719
+ const authored = element.shapeStyle?.strokeWidth;
93720
+ return { kind: "lineEdge", strokeWidth: Math.max(Math.max(0, authored ?? 0), 2) };
93721
+ }
93722
+ if (shapeType === "cylinder") {
93723
+ return { kind: "borderRadius", radius: CYLINDER_RADIUS };
93724
+ }
93725
+ return { kind: "none" };
93726
+ }
93727
+ function hasStrokePaint(style) {
93728
+ if (!style || Math.max(0, style.strokeWidth ?? 0) <= 0) {
93729
+ return false;
93730
+ }
93731
+ return style.strokeColor !== void 0 || style.strokeFillMode !== void 0;
93732
+ }
93733
+ function paintedStrokeWidth(style) {
93734
+ return hasStrokePaint(style) ? Math.max(0, style?.strokeWidth ?? 0) : 0;
93735
+ }
93736
+ var NO_STROKE = {
93737
+ borderWidth: 0,
93738
+ borderStyle: void 0,
93739
+ borderColor: void 0,
93740
+ border: void 0,
93741
+ strokeLinejoin: void 0,
93742
+ strokeLinecap: void 0,
93743
+ strokeMiterlimit: void 0
93744
+ };
93745
+ function svgLineJoin(join) {
93746
+ switch (join) {
93747
+ case "round":
93748
+ return "round";
93749
+ case "bevel":
93750
+ return "bevel";
93751
+ case "miter":
93752
+ return "miter";
93753
+ default:
93754
+ return void 0;
93755
+ }
93756
+ }
93757
+ function svgStrokeLineCap(cap) {
93758
+ switch (cap) {
93759
+ case "rnd":
93760
+ return "round";
93761
+ case "sq":
93762
+ return "square";
93763
+ case "flat":
93764
+ return "butt";
93765
+ default:
93766
+ return void 0;
93767
+ }
93768
+ }
93769
+ function strokeMiterLimit(style) {
93770
+ if (style?.lineJoin !== "miter" || typeof style.miterLimit !== "number") {
93771
+ return void 0;
93772
+ }
93773
+ if (!Number.isFinite(style.miterLimit)) {
93774
+ return void 0;
93775
+ }
93776
+ return Math.max(style.miterLimit / 1e5, 1);
93777
+ }
93778
+ function getComputedStrokeStyle(element) {
93779
+ if (!hasShapeProperties(element)) {
93780
+ return NO_STROKE;
93781
+ }
93782
+ const style = element.shapeStyle;
93783
+ const width = suppressesCssBorder(element) ? 0 : paintedStrokeWidth(style);
93784
+ const joins = {
93785
+ strokeLinejoin: svgLineJoin(style?.lineJoin),
93786
+ strokeLinecap: svgStrokeLineCap(style?.lineCap),
93787
+ strokeMiterlimit: strokeMiterLimit(style)
93788
+ };
93789
+ if (width <= 0 || !style) {
93790
+ return { ...NO_STROKE, ...joins };
93791
+ }
93792
+ const borderWidth = width;
93793
+ const borderStyle = getCssBorderDashStyle(
93794
+ normalizeStrokeDashType(style.strokeDash),
93795
+ style.compoundLine
93796
+ );
93797
+ const rawColor = style.strokeColor ?? DEFAULT_STROKE_COLOR;
93798
+ const borderColor = style.strokeOpacity === void 0 ? rawColor : colorWithOpacity(normalizeHexColor(rawColor, DEFAULT_STROKE_COLOR), style.strokeOpacity);
93799
+ return {
93800
+ borderWidth,
93801
+ borderStyle,
93802
+ borderColor,
93803
+ border: `${borderWidth}px ${borderStyle ?? "solid"} ${borderColor}`,
93804
+ ...joins
93805
+ };
93806
+ }
93621
93807
  function isImageTiled(element) {
93622
93808
  if (!isImageLikeElement(element)) {
93623
93809
  return false;
@@ -96641,24 +96827,6 @@ function getChartStylePalette(styleId) {
96641
96827
  }
96642
96828
  return palette;
96643
96829
  }
96644
- function seriesColor2(series, index, styleId, colorPalette) {
96645
- const explicit = series.color ?? series.marker?.spPr?.fillColor;
96646
- if (explicit) {
96647
- return explicit;
96648
- }
96649
- if (colorPalette && colorPalette.length > 0) {
96650
- return colorPalette[index % colorPalette.length];
96651
- }
96652
- const palette = getChartStylePalette(styleId);
96653
- return palette[index % palette.length];
96654
- }
96655
- function paletteColor(index, styleId, colorPalette) {
96656
- if (colorPalette && colorPalette.length > 0) {
96657
- return colorPalette[index % colorPalette.length];
96658
- }
96659
- const palette = getChartStylePalette(styleId);
96660
- return palette[index % palette.length];
96661
- }
96662
96830
  function computeValueRange(series) {
96663
96831
  const allValues = series.flatMap((s) => s.values);
96664
96832
  if (allValues.length === 0) {
@@ -96670,20 +96838,6 @@ function computeValueRange(series) {
96670
96838
  );
96671
96839
  return { min, max, span: Math.max(max - min, Number.EPSILON), majorUnit };
96672
96840
  }
96673
- function valueToY(val2, range, topY, bottomY) {
96674
- const usable = bottomY - topY;
96675
- let ratio;
96676
- if (range.logScale && range.logBase) {
96677
- const base = range.logBase;
96678
- const clampedVal = Math.max(val2, range.min);
96679
- const logVal = Math.log(clampedVal) / Math.log(base);
96680
- const logMin = Math.log(range.min) / Math.log(base);
96681
- ratio = (logVal - logMin) / range.span;
96682
- } else {
96683
- ratio = (val2 - range.min) / range.span;
96684
- }
96685
- return range.reverseOrder ? topY + ratio * usable : bottomY - ratio * usable;
96686
- }
96687
96841
  function formatAxisValue(val2, formatCode) {
96688
96842
  const formatted = formatChartNumber(val2, formatCode);
96689
96843
  if (formatted !== void 0) {
@@ -96700,50 +96854,6 @@ function formatAxisValue(val2, formatCode) {
96700
96854
  }
96701
96855
  return val2.toFixed(1);
96702
96856
  }
96703
- function computeLayout(elementWidth, elementHeight, style, hasAxes, legendPos, options) {
96704
- const svgWidth = Math.max(1, elementWidth);
96705
- const svgHeight = Math.max(1, elementHeight);
96706
- let plotLeft = hasAxes ? 48 : 8;
96707
- let plotTop = 8;
96708
- let plotRight = svgWidth - 8;
96709
- let plotBottom = svgHeight - (hasAxes ? 24 : 8);
96710
- if (style?.hasTitle) {
96711
- plotTop += 20;
96712
- }
96713
- if (style?.hasLegend) {
96714
- if (legendPos === "b") {
96715
- plotBottom -= 20;
96716
- } else if (legendPos === "t") {
96717
- plotTop += 20;
96718
- } else if (legendPos === "r") {
96719
- plotRight -= 80;
96720
- } else if (legendPos === "l") {
96721
- plotLeft += 80;
96722
- }
96723
- }
96724
- if (options?.hasSecondaryValueAxis) {
96725
- plotRight -= 40;
96726
- }
96727
- if (options?.hasSecondaryCategoryAxis) {
96728
- plotTop += 16;
96729
- }
96730
- if (options?.hasDataTable) {
96731
- const rowCount = options.dataTableRowCount ?? 1;
96732
- plotBottom -= 14 + rowCount * 14;
96733
- }
96734
- const pw = Math.max(plotRight - plotLeft, 1);
96735
- const ph = Math.max(plotBottom - plotTop, 1);
96736
- return {
96737
- plotLeft,
96738
- plotTop,
96739
- plotRight: plotLeft + pw,
96740
- plotBottom: plotTop + ph,
96741
- plotWidth: pw,
96742
- plotHeight: ph,
96743
- svgWidth,
96744
- svgHeight
96745
- };
96746
- }
96747
96857
  var DEFAULT_CHART_AREA_FILL = "#0f172a11";
96748
96858
  function resolve(fill, fallback) {
96749
96859
  if (fill === "none") {
@@ -97707,7 +97817,7 @@ function buildBars(chartData, catCount, layout, primaryRange, secondaryRange, se
97707
97817
  const valY = valueToY2(val2, activeRange, layout.plotTop, layout.plotBottom);
97708
97818
  const y = Math.min(zeroY, valY);
97709
97819
  const h = Math.max(Math.abs(zeroY - valY), 1);
97710
- const baseFill = varyColorsSingle ? resolveVaryColorFill(series[si], sourceIndex, paletteColor2(sourceIndex, palette)) : resolveDataPointFill(series[si], sourceIndex, paletteColor2(si, palette)) ?? seriesColor22(series[si], si, palette);
97820
+ const baseFill = varyColorsSingle ? resolveVaryColorFill(series[si], sourceIndex, paletteColor2(sourceIndex, palette)) : resolveDataPointFill(series[si], sourceIndex, paletteColor2(si, palette)) ?? seriesColor2(series[si], si, palette);
97711
97821
  primitives.push({
97712
97822
  kind: "rect",
97713
97823
  x,
@@ -97796,7 +97906,7 @@ function buildBars(chartData, catCount, layout, primaryRange, secondaryRange, se
97796
97906
  const topY = valueToY2(top, primaryRange, layout.plotTop, layout.plotBottom);
97797
97907
  const y = Math.min(baseY, topY);
97798
97908
  const h = Math.max(Math.abs(baseY - topY), 0.5);
97799
- const pctBaseFill = resolveDataPointFill(series[si], sourceIndex, paletteColor2(si, palette)) ?? seriesColor22(series[si], si, palette);
97909
+ const pctBaseFill = resolveDataPointFill(series[si], sourceIndex, paletteColor2(si, palette)) ?? seriesColor2(series[si], si, palette);
97800
97910
  primitives.push({
97801
97911
  kind: "rect",
97802
97912
  x,
@@ -98076,7 +98186,7 @@ function buildLines(chartData, catCount, layout, primaryRange, secondaryRange, s
98076
98186
  x: xPositions?.[index] ?? point.x
98077
98187
  })
98078
98188
  );
98079
- const c = seriesColor22(series, si, chartData.colorPalette);
98189
+ const c = seriesColor2(series, si, chartData.colorPalette);
98080
98190
  const seriesPart = { role: "series", seriesIndex: si };
98081
98191
  const allVisible = visible.every(Boolean);
98082
98192
  if (allVisible) {
@@ -98170,7 +98280,7 @@ function buildAreas(chartData, catCount, layout, range, sourceIndices2, xPositio
98170
98280
  ...point,
98171
98281
  x: xPositions?.[index] ?? point.x
98172
98282
  }));
98173
- const c = seriesColor22(series, si, chartData.colorPalette);
98283
+ const c = seriesColor2(series, si, chartData.colorPalette);
98174
98284
  const lineStr = linePointsToSvgString(pts);
98175
98285
  const firstPt = pts[0];
98176
98286
  const lastPt = pts[pts.length - 1];
@@ -98258,7 +98368,7 @@ function buildScatter(chartData, layout, range) {
98258
98368
  const smoothStyle = chartData.scatterStyle === "smooth" || chartData.scatterStyle === "smoothMarker";
98259
98369
  for (let si = 0; si < chartData.series.length; si++) {
98260
98370
  const series = chartData.series[si];
98261
- const c = seriesColor22(series, si, chartData.colorPalette);
98371
+ const c = seriesColor2(series, si, chartData.colorPalette);
98262
98372
  const dots = computeScatterDots(
98263
98373
  series.values,
98264
98374
  maxXIndex,
@@ -98336,7 +98446,7 @@ function buildBubbles(chartData, layout, range) {
98336
98446
  const medianRadius = Math.min(layout.plotWidth, layout.plotHeight) * 0.04;
98337
98447
  for (let si = 0; si < chartData.series.length; si++) {
98338
98448
  const series = chartData.series[si];
98339
- const c = seriesColor22(series, si, chartData.colorPalette);
98449
+ const c = seriesColor2(series, si, chartData.colorPalette);
98340
98450
  const dots = computeScatterDots(
98341
98451
  series.values,
98342
98452
  maxXIndex,
@@ -98946,7 +99056,7 @@ function barFill(chartData, series, seriesIndex, pointIndex) {
98946
99056
  if (chartData.varyColors === true && chartData.series.length === 1) {
98947
99057
  return resolveVaryColorFill(series, pointIndex, paletteColor2(pointIndex, palette));
98948
99058
  }
98949
- return resolveDataPointFill(series, pointIndex, paletteColor2(seriesIndex, palette)) ?? seriesColor22(series, seriesIndex, palette);
99059
+ return resolveDataPointFill(series, pointIndex, paletteColor2(seriesIndex, palette)) ?? seriesColor2(series, seriesIndex, palette);
98950
99060
  }
98951
99061
  function buildHorizontalBarViewModel(element, chartData, categoryLabels) {
98952
99062
  const layout = computePlotLayout(element.width, element.height, chartData, true);
@@ -99441,7 +99551,7 @@ function computeTrendlinePrimitives(chartData, catCount, layout, range, mode = "
99441
99551
  return;
99442
99552
  }
99443
99553
  const pathD = points3.map((p, i) => `${i === 0 ? "M" : "L"} ${p.x.toFixed(2)} ${p.y.toFixed(2)}`).join(" ");
99444
- const strokeColor = tl.color ?? seriesColor22(series, si, colorPalette);
99554
+ const strokeColor = tl.color ?? seriesColor2(series, si, colorPalette);
99445
99555
  const pathPrimitive = {
99446
99556
  kind: "path",
99447
99557
  d: pathD,
@@ -99633,7 +99743,7 @@ function computeDataTablePrimitives(chartData, layout, colorPalette) {
99633
99743
  if (showK) {
99634
99744
  const swatchX = layout.plotLeft + DATA_TABLE_PADDING;
99635
99745
  const swatchY = ry + DATA_TABLE_ROW_H / 2 - 3;
99636
- const swatchColor = seriesColor22(s, si, colorPalette);
99746
+ const swatchColor = seriesColor2(s, si, colorPalette);
99637
99747
  out.push({
99638
99748
  kind: "rect",
99639
99749
  x: swatchX,
@@ -99956,7 +100066,7 @@ function buildComboViewModel(element, chartData, categoryLabels) {
99956
100066
  return;
99957
100067
  }
99958
100068
  const range = rangeForSeries(seriesIndex, primaryRange, secondaryRange, secondaryIndexes);
99959
- const fill = seriesColor22(series, seriesIndex, chartData.colorPalette);
100069
+ const fill = seriesColor2(series, seriesIndex, chartData.colorPalette);
99960
100070
  const points3 = sourceIndices2.map((sourceIndex, displayIndex) => {
99961
100071
  const value = series.values[sourceIndex] ?? 0;
99962
100072
  return {
@@ -100003,15 +100113,30 @@ function buildComboViewModel(element, chartData, categoryLabels) {
100003
100113
  });
100004
100114
  primitives.push(...horizontalAxis.tickMarks);
100005
100115
  const displayChartData = horizontalAxis.displayChartData;
100006
- primitives.push(
100116
+ const overlays = [
100007
100117
  ...computeErrorBarPrimitives(displayChartData, catCount, layout, primaryRange, "line", {
100008
100118
  xPositions: horizontalAxis.xPositions,
100009
100119
  seriesRanges: chartData.series.map(
100010
100120
  (_series, index) => rangeForSeries(index, primaryRange, secondaryRange, secondaryIndexes)
100011
100121
  ),
100012
100122
  seriesModes: chartData.series.map((_series, index) => index === 0 ? "bar" : "line")
100013
- })
100123
+ }),
100124
+ ...computeTrendlinePrimitives(
100125
+ displayChartData,
100126
+ catCount,
100127
+ layout,
100128
+ primaryRange,
100129
+ "bar",
100130
+ chartData.colorPalette
100131
+ ),
100132
+ ...computeAxisTitlePrimitives(chartData, layout)
100133
+ ];
100134
+ const dataTablePrimitives = computeDataTablePrimitives(
100135
+ displayChartData,
100136
+ layout,
100137
+ chartData.colorPalette
100014
100138
  );
100139
+ primitives.push(...overlays, ...dataTablePrimitives);
100015
100140
  return {
100016
100141
  svgWidth: layout.svgWidth,
100017
100142
  svgHeight: layout.svgHeight,
@@ -100029,7 +100154,9 @@ function buildComboViewModel(element, chartData, categoryLabels) {
100029
100154
  legendY,
100030
100155
  legendAnchor,
100031
100156
  secondaryGridlines: secondaryAxis?.gridlines,
100032
- secondaryAxisLabels: secondaryAxis?.axisLabels
100157
+ secondaryAxisLabels: secondaryAxis?.axisLabels,
100158
+ overlays: overlays.length > 0 ? overlays : void 0,
100159
+ dataTable: dataTablePrimitives.length > 0 ? dataTablePrimitives : void 0
100033
100160
  };
100034
100161
  }
100035
100162
  function appendBarLabels(series, chartData, layout, catCount, range, sourceIndices2, labels, xPositions) {
@@ -100066,7 +100193,7 @@ function buildStockViewModel(element, chartData, categoryLabels) {
100066
100193
  computeLayoutOptions(chartData.axes, chartData.dataTable, chartData.series.length)
100067
100194
  );
100068
100195
  const catCount = Math.max(categoryLabels.length, 1);
100069
- const range = computeValueRange2(chartData.series);
100196
+ const range = computeValueRangeForChart(chartData.series, chartData.axes);
100070
100197
  const valueAxis = chartData.axes?.find((axis) => axis.axisType === "valAx" && axis.axPos !== "r");
100071
100198
  const categoryAxis = chartData.axes?.find(
100072
100199
  (axis) => (axis.axisType === "catAx" || axis.axisType === "dateAx") && axis.axisId === valueAxis?.crossAxisId
@@ -100103,6 +100230,12 @@ function buildStockViewModel(element, chartData, categoryLabels) {
100103
100230
  const closeSeries = chartData.series[hasFour ? 3 : 2];
100104
100231
  const primitives = [];
100105
100232
  const dataLabels = [];
100233
+ primitives.push(
100234
+ ...computeHelperLinePrimitives(chartData, layout, range, catCount, {
100235
+ mode: "bar",
100236
+ xPositions: horizontalAxis.xPositions
100237
+ })
100238
+ );
100106
100239
  if (highSeries && lowSeries && closeSeries) {
100107
100240
  const barGroupWidth = layout.plotWidth / catCount;
100108
100241
  const candleWidth = barGroupWidth * 0.5;
@@ -100157,6 +100290,27 @@ function buildStockViewModel(element, chartData, categoryLabels) {
100157
100290
  }
100158
100291
  }
100159
100292
  primitives.push(...horizontalAxis.tickMarks);
100293
+ const displayChartData = horizontalAxis.displayChartData;
100294
+ const overlays = [
100295
+ ...computeTrendlinePrimitives(
100296
+ displayChartData,
100297
+ catCount,
100298
+ layout,
100299
+ range,
100300
+ "bar",
100301
+ chartData.colorPalette
100302
+ ),
100303
+ ...computeErrorBarPrimitives(displayChartData, catCount, layout, range, "bar", {
100304
+ xPositions: horizontalAxis.xPositions
100305
+ }),
100306
+ ...computeAxisTitlePrimitives(chartData, layout)
100307
+ ];
100308
+ const dataTablePrimitives = computeDataTablePrimitives(
100309
+ displayChartData,
100310
+ layout,
100311
+ chartData.colorPalette
100312
+ );
100313
+ primitives.push(...overlays, ...dataTablePrimitives);
100160
100314
  const title = chartData.style?.hasTitle && chartData.title ? chartData.title : void 0;
100161
100315
  return {
100162
100316
  svgWidth: layout.svgWidth,
@@ -100173,7 +100327,9 @@ function buildStockViewModel(element, chartData, categoryLabels) {
100173
100327
  legend: chartData.style?.hasLegend ? legend : [],
100174
100328
  legendX,
100175
100329
  legendY,
100176
- legendAnchor
100330
+ legendAnchor,
100331
+ overlays: overlays.length > 0 ? overlays : void 0,
100332
+ dataTable: dataTablePrimitives.length > 0 ? dataTablePrimitives : void 0
100177
100333
  };
100178
100334
  }
100179
100335
  function percentile(sorted, p, method) {
@@ -101406,7 +101562,8 @@ function buildIsometricSurfaceViewModel(element, chartData, categoryLabels) {
101406
101562
  fill: `rgb(${r},${g},${b})`,
101407
101563
  stroke: "none",
101408
101564
  strokeWidth: 0,
101409
- opacity: 0.9
101565
+ opacity: 0.9,
101566
+ part: { role: "dataPoint", seriesIndex: row, pointIndex: col }
101410
101567
  });
101411
101568
  primitives.push({
101412
101569
  kind: "polygon",
@@ -101461,7 +101618,8 @@ function buildFlatSurfaceViewModel(element, chartData, categoryLabels) {
101461
101618
  w: cellW + 0.5,
101462
101619
  h: cellH + 0.5,
101463
101620
  fill: `rgb(${r},${g},${b})`,
101464
- opacity: 0.85
101621
+ opacity: 0.85,
101622
+ part: { role: "dataPoint", seriesIndex: si, pointIndex: ci }
101465
101623
  });
101466
101624
  }
101467
101625
  }
@@ -101731,6 +101889,7 @@ var WF_COLOR_POSITIVE = "#22c55e";
101731
101889
  var WF_COLOR_NEGATIVE = "#ef4444";
101732
101890
  var WF_COLOR_TOTAL = "#6366f1";
101733
101891
  var WF_CONNECTOR_COLOR = "#94a3b8";
101892
+ var REGION_LEGEND_BANDS = 32;
101734
101893
  function buildWaterfallViewModel(element, chartData, categoryLabels) {
101735
101894
  const layout = computePlotLayout(element.width, element.height, chartData, true);
101736
101895
  const series = chartData.series[0];
@@ -102164,6 +102323,10 @@ function buildRegionMapViewModel(element, chartData, categoryLabels) {
102164
102323
  fill,
102165
102324
  stroke: "#94a3b8",
102166
102325
  strokeWidth: Math.max(0.5 / mapScale, 0.3),
102326
+ // Hover tooltip. A choropleth prints only the value inside the shape
102327
+ // (and only where the shape is big enough), so without this the reader
102328
+ // has no way to find out WHICH country a patch of colour is.
102329
+ title: entry2 ? `${region.name}: ${formatAxisValue2(entry2.value)}` : region.name,
102167
102330
  ...entry2 ? {
102168
102331
  part: {
102169
102332
  role: "dataPoint",
@@ -102196,27 +102359,16 @@ function buildRegionMapViewModel(element, chartData, categoryLabels) {
102196
102359
  const legendY = mapOffsetY + mapAreaH + 4;
102197
102360
  const barW = Math.min(svgWidth * 0.4, 160);
102198
102361
  const barX = (svgWidth - barW) / 2;
102199
- const gradStops = [
102200
- { offset: 0, color: "#dbeafe" },
102201
- { offset: 0.5, color: "#3b82f6" },
102202
- { offset: 1, color: "#1e3a5f" }
102203
- ];
102204
- const stopCount = gradStops.length - 1;
102205
- for (let si = 0; si < stopCount; si++) {
102206
- const stopA = gradStops[si];
102207
- const stopB = gradStops[si + 1];
102208
- if (stopA === void 0 || stopB === void 0) {
102209
- continue;
102210
- }
102211
- const midColor = lerpColor(stopA.color, stopB.color, 0.5);
102362
+ for (let band = 0; band < REGION_LEGEND_BANDS; band++) {
102212
102363
  primitives.push({
102213
102364
  kind: "rect",
102214
- x: barX + stopA.offset * barW,
102365
+ x: barX + band / REGION_LEGEND_BANDS * barW,
102215
102366
  y: legendY,
102216
- w: (stopB.offset - stopA.offset) * barW,
102367
+ // A hair of overlap: adjacent rects on fractional pixel boundaries
102368
+ // otherwise leave hairline gaps once the slide's zoom transform lands.
102369
+ w: barW / REGION_LEGEND_BANDS + 0.5,
102217
102370
  h: 8,
102218
- fill: midColor,
102219
- rx: si === 0 ? 4 : 0
102371
+ fill: sequentialColorScale((band + 0.5) / REGION_LEGEND_BANDS)
102220
102372
  });
102221
102373
  }
102222
102374
  primitives.push(
@@ -102370,7 +102522,7 @@ function paletteColor2(index, colorPalette) {
102370
102522
  const pal = colorPalette && colorPalette.length > 0 ? colorPalette : DEFAULT_PALETTE;
102371
102523
  return pal[index % pal.length];
102372
102524
  }
102373
- function seriesColor22(series, index, colorPalette) {
102525
+ function seriesColor2(series, index, colorPalette) {
102374
102526
  return series.color ?? series.marker?.spPr?.fillColor ?? paletteColor2(index, colorPalette);
102375
102527
  }
102376
102528
  function computeValueRange2(series) {
@@ -102572,7 +102724,7 @@ function buildCategoryLabels(categoryLabels, layout, catSpacing) {
102572
102724
  }
102573
102725
  function buildLegend(series, colorPalette, svgWidth, legendPos, svgHeight, plotTop) {
102574
102726
  const legend = series.map((s, i) => ({
102575
- color: seriesColor22(s, i, colorPalette),
102727
+ color: seriesColor2(s, i, colorPalette),
102576
102728
  label: s.name
102577
102729
  }));
102578
102730
  let legendX = svgWidth / 2;
@@ -102610,7 +102762,7 @@ function computeBarRects(series, catCount, layout, range, colorPalette) {
102610
102762
  y,
102611
102763
  w: singleBarWidth,
102612
102764
  h,
102613
- fill: seriesColor22(series[si], si, colorPalette)
102765
+ fill: seriesColor2(series[si], si, colorPalette)
102614
102766
  });
102615
102767
  }
102616
102768
  }
@@ -102643,7 +102795,7 @@ function computeStackedBarRects(series, catCount, layout, range, colorPalette) {
102643
102795
  y,
102644
102796
  w: barW,
102645
102797
  h,
102646
- fill: seriesColor22(series[si], si, colorPalette),
102798
+ fill: seriesColor2(series[si], si, colorPalette),
102647
102799
  seriesIndex: si,
102648
102800
  pointIndex: ci
102649
102801
  });
@@ -102655,7 +102807,7 @@ function computeStackedBarRects(series, catCount, layout, range, colorPalette) {
102655
102807
  y,
102656
102808
  w: barW,
102657
102809
  h,
102658
- fill: seriesColor22(series[si], si, colorPalette),
102810
+ fill: seriesColor2(series[si], si, colorPalette),
102659
102811
  seriesIndex: si,
102660
102812
  pointIndex: ci
102661
102813
  });
@@ -102783,6 +102935,9 @@ function radarRingPoints(cx, cy, rr, catCount) {
102783
102935
  return `${(cx + rr * Math.cos(angle)).toFixed(2)},${(cy + rr * Math.sin(angle)).toFixed(2)}`;
102784
102936
  }).join(" ");
102785
102937
  }
102938
+ function chartPreserveAspectRatio(kind) {
102939
+ return kind === "pie" || kind === "doughnut" || kind === "radar" || kind === "regionMap" ? "xMidYMid meet" : "none";
102940
+ }
102786
102941
  function resolveChartKind(chartType) {
102787
102942
  switch (chartType) {
102788
102943
  case "bar":
@@ -103095,7 +103250,7 @@ function buildRadarViewModel(element, chartData, categoryLabels) {
103095
103250
  }
103096
103251
  const dataLabels = [];
103097
103252
  chartData.series.forEach((series, si) => {
103098
- const c = seriesColor22(series, si, chartData.colorPalette);
103253
+ const c = seriesColor2(series, si, chartData.colorPalette);
103099
103254
  const pts = computeRadarPoints(series.values, maxVal, radius, cx, cy, catCount);
103100
103255
  if (pts.length === 0) {
103101
103256
  return;
@@ -103335,6 +103490,31 @@ function withChartTitle(chartData, title) {
103335
103490
  style: { ...chartData.style, hasTitle: trimmed.length > 0 }
103336
103491
  };
103337
103492
  }
103493
+ var STYLE_ELEMENT_ID = "pptx-chart-interaction-styles";
103494
+ var INTERACTION_CSS = `
103495
+ .pptx-chart-interactive svg [data-chart-part] { pointer-events: auto; cursor: pointer; }
103496
+ .pptx-chart-interactive svg [data-chart-part]:hover { filter: brightness(1.12); }
103497
+ .pptx-chart-interactive svg [data-chart-part='title'] { cursor: text; }
103498
+ /* A data label is decoration painted ON TOP of the mark it describes, so it
103499
+ must never intercept that mark's click. The treemap made this unmissable -
103500
+ its label sits dead-centre on the cell, so clicking a cell hit the <text> and
103501
+ selected nothing - but every kind's data labels overlap their marks. Only
103502
+ labels are excluded: the chart title is itself a part and stays clickable.
103503
+ Bindings whose chart <svg> is blanket pointer-events:none (React) never saw
103504
+ this; the other three did, which is exactly why the rule belongs here. */
103505
+ .pptx-chart-interactive svg text:not([data-chart-part]) { pointer-events: none; }
103506
+ .pptx-chart-interactive svg .pptx-chart-part-selected { filter: drop-shadow(0 0 2.5px #3b82f6); }
103507
+ .pptx-chart-interactive svg .pptx-chart-part-selected:hover { filter: drop-shadow(0 0 2.5px #3b82f6) brightness(1.12); }
103508
+ `;
103509
+ function ensureChartInteractionStyles() {
103510
+ if (typeof document === "undefined" || document.getElementById(STYLE_ELEMENT_ID)) {
103511
+ return;
103512
+ }
103513
+ const style = document.createElement("style");
103514
+ style.id = STYLE_ELEMENT_ID;
103515
+ style.textContent = INTERACTION_CSS;
103516
+ document.head.appendChild(style);
103517
+ }
103338
103518
  var HARD_STOP = "#000 50%, transparent 50%";
103339
103519
  var EDGE_CONFIG = {
103340
103520
  left: {
@@ -107841,6 +108021,27 @@ function tableCellCss(tableData, cell, position2, context, base) {
107841
108021
  }
107842
108022
  return css;
107843
108023
  }
108024
+ function withCellText(cell, text2) {
108025
+ const next = { ...cell, text: text2 };
108026
+ delete next.textRuns;
108027
+ return next;
108028
+ }
108029
+ function setCellText(element, rowIndex, colIndex, text2) {
108030
+ const tableData = element.tableData;
108031
+ if (!tableData) {
108032
+ return element;
108033
+ }
108034
+ const rows = tableData.rows.map((row, ri) => {
108035
+ if (ri !== rowIndex) {
108036
+ return row;
108037
+ }
108038
+ return {
108039
+ ...row,
108040
+ cells: row.cells.map((cell, ci) => ci === colIndex ? withCellText(cell, text2) : cell)
108041
+ };
108042
+ });
108043
+ return { ...element, tableData: { ...tableData, rows } };
108044
+ }
107844
108045
  function computeBoundingRect(cells) {
107845
108046
  if (cells.length === 0) {
107846
108047
  return void 0;
@@ -107973,8 +108174,7 @@ function mergeCells(cells, tableData) {
107973
108174
  }
107974
108175
  if (ri === rect2.startRow && ci === rect2.startCol) {
107975
108176
  return {
107976
- ...cell,
107977
- text: combinedText,
108177
+ ...withCellText(cell, combinedText),
107978
108178
  gridSpan: colCount > 1 ? colCount : void 0,
107979
108179
  rowSpan: rowCount > 1 ? rowCount : void 0,
107980
108180
  hMerge: void 0,
@@ -107983,8 +108183,7 @@ function mergeCells(cells, tableData) {
107983
108183
  }
107984
108184
  if (ri === rect2.startRow) {
107985
108185
  return {
107986
- ...cell,
107987
- text: "",
108186
+ ...withCellText(cell, ""),
107988
108187
  hMerge: true,
107989
108188
  vMerge: void 0,
107990
108189
  gridSpan: void 0,
@@ -107993,8 +108192,7 @@ function mergeCells(cells, tableData) {
107993
108192
  }
107994
108193
  if (ci === rect2.startCol) {
107995
108194
  return {
107996
- ...cell,
107997
- text: "",
108195
+ ...withCellText(cell, ""),
107998
108196
  vMerge: true,
107999
108197
  hMerge: void 0,
108000
108198
  gridSpan: void 0,
@@ -108002,8 +108200,7 @@ function mergeCells(cells, tableData) {
108002
108200
  };
108003
108201
  }
108004
108202
  return {
108005
- ...cell,
108006
- text: "",
108203
+ ...withCellText(cell, ""),
108007
108204
  hMerge: true,
108008
108205
  vMerge: true,
108009
108206
  gridSpan: void 0,
@@ -108281,22 +108478,6 @@ function deleteTableColumn(tableData, colIdx) {
108281
108478
  const newWidths = normalizeWidths(tableData.columnWidths.filter((_, i) => i !== colIdx));
108282
108479
  return { ...tableData, rows: newRows, columnWidths: newWidths };
108283
108480
  }
108284
- function setCellText(element, rowIndex, colIndex, text2) {
108285
- const tableData = element.tableData;
108286
- if (!tableData) {
108287
- return element;
108288
- }
108289
- const rows = tableData.rows.map((row, ri) => {
108290
- if (ri !== rowIndex) {
108291
- return row;
108292
- }
108293
- return {
108294
- ...row,
108295
- cells: row.cells.map((cell, ci) => ci === colIndex ? { ...cell, text: text2 } : cell)
108296
- };
108297
- });
108298
- return { ...element, tableData: { ...tableData, rows } };
108299
- }
108300
108481
  function buildTableDataGrid(element) {
108301
108482
  const tableData = element.tableData;
108302
108483
  const sourceRows = tableData?.rows ?? [];
@@ -109715,12 +109896,21 @@ var translationsEn = {
109715
109896
  "pptx.autosave.disabled": "AutoSave unavailable",
109716
109897
  "pptx.autosave.disabledNoFilePath": "AutoSave disabled: no file path provided",
109717
109898
  "pptx.autosave.disabledToggleOff": "AutoSave off",
109899
+ "pptx.autosave.disabledByHost": "AutoSave turned off by this application",
109900
+ "pptx.autosave.disabledReadOnly": "AutoSave disabled: this presentation is read-only",
109718
109901
  "pptx.autosave.justNow": "just now",
109719
109902
  "pptx.autosave.oneMinAgo": "1 min ago",
109720
109903
  "pptx.autosave.minutesAgo": "{{count}} min ago",
109721
109904
  "pptx.autosave.saveFailed": "Save failed",
109722
109905
  "pptx.autosave.savedShort": "Saved",
109723
109906
  "pptx.autosave.allChangesSaved": "All changes saved",
109907
+ // Crash-recovery prompt (offered on load when a newer snapshot exists)
109908
+ "pptx.autosave.recovery.title": "Recover unsaved changes?",
109909
+ "pptx.autosave.recovery.message": 'An autosaved copy of "{{file}}" ({{size}}) has changes that are not in the version you just opened.',
109910
+ "pptx.autosave.recovery.savedLabel": "Autosaved {{when}}",
109911
+ "pptx.autosave.recovery.hoursAgo": "{{count}} h ago",
109912
+ "pptx.autosave.recovery.restore": "Restore",
109913
+ "pptx.autosave.recovery.discard": "Discard",
109724
109914
  // Title bar (PowerPoint-style top chrome row)
109725
109915
  "pptx.titleBar.autoSave": "AutoSave",
109726
109916
  "pptx.titleBar.autoSaveOn": "On",
@@ -115629,6 +115819,22 @@ function hollowTextFillStyle(s, painted = {}) {
115629
115819
  }
115630
115820
  return hollow;
115631
115821
  }
115822
+ function nestedTextDecorationStyle(style) {
115823
+ const nested = {};
115824
+ for (const key2 of [
115825
+ "textDecoration",
115826
+ "textDecorationLine",
115827
+ "textDecorationColor",
115828
+ "textDecorationStyle",
115829
+ "textDecorationThickness"
115830
+ ]) {
115831
+ const value = style[key2];
115832
+ if (value !== void 0) {
115833
+ nested[key2] = value;
115834
+ }
115835
+ }
115836
+ return Object.keys(nested).length > 0 ? nested : void 0;
115837
+ }
115632
115838
  function segmentStyleToCss(seg, fontScale = 1, context = {}) {
115633
115839
  const s = seg.style ?? {};
115634
115840
  const style = {};
@@ -116141,16 +116347,51 @@ function correspondingChildren(a, b) {
116141
116347
  }
116142
116348
  return paired;
116143
116349
  }
116350
+ function expandUnpairedWrappers(children7, counterpart) {
116351
+ let expanded = false;
116352
+ const out = [];
116353
+ for (const child23 of children7) {
116354
+ const nested = groupChildren(child23);
116355
+ if (nested && !correspondingGroup(child23, counterpart)) {
116356
+ expanded = true;
116357
+ for (const leaf of expandUnpairedWrappers(nested, counterpart) ?? nested) {
116358
+ out.push(toAbsolute(leaf, child23.x, child23.y));
116359
+ }
116360
+ continue;
116361
+ }
116362
+ out.push(child23);
116363
+ }
116364
+ return expanded ? out : void 0;
116365
+ }
116366
+ function correspondingCast(children7, twinChildren) {
116367
+ const direct = correspondingChildren(children7, twinChildren);
116368
+ if (direct) {
116369
+ return { from: [...children7], to: [...twinChildren], paired: direct };
116370
+ }
116371
+ const expandedFrom = expandUnpairedWrappers(children7, twinChildren);
116372
+ const expandedTo = expandUnpairedWrappers(twinChildren, children7);
116373
+ if (!expandedFrom && !expandedTo) {
116374
+ return void 0;
116375
+ }
116376
+ const from = expandedFrom ?? [...children7];
116377
+ const to = expandedTo ?? [...twinChildren];
116378
+ const paired = correspondingChildren(from, to);
116379
+ return paired ? { from, to, paired } : void 0;
116380
+ }
116144
116381
  function flattenMorphElements(elements, counterpart, offsetX = 0, offsetY = 0) {
116382
+ return flattenMorphLevel(elements, counterpart, offsetX, offsetY, true);
116383
+ }
116384
+ function flattenMorphLevel(elements, counterpart, offsetX, offsetY, topLevel) {
116145
116385
  const out = [];
116146
116386
  for (const element of elements) {
116147
116387
  const children7 = groupChildren(element);
116148
- if (children7 && containsMorphNamedDescendant(element)) {
116388
+ if (children7 && (!topLevel || containsMorphNamedDescendant(element))) {
116149
116389
  const twin = correspondingGroup(element, counterpart);
116150
116390
  const twinChildren = twin ? groupChildren(twin) ?? [] : void 0;
116151
- if (twinChildren && correspondingChildren(children7, twinChildren)) {
116391
+ const cast = twinChildren ? correspondingCast(children7, twinChildren) : void 0;
116392
+ if (cast) {
116152
116393
  out.push(
116153
- ...flattenMorphElements(children7, twinChildren, offsetX + element.x, offsetY + element.y)
116394
+ ...flattenMorphLevel(cast.from, cast.to, offsetX + element.x, offsetY + element.y, false)
116154
116395
  );
116155
116396
  continue;
116156
116397
  }
@@ -116161,25 +116402,25 @@ function flattenMorphElements(elements, counterpart, offsetX = 0, offsetY = 0) {
116161
116402
  }
116162
116403
  function morphGroupChildPairs(elements, counterpart) {
116163
116404
  const pairs2 = /* @__PURE__ */ new Map();
116164
- collectGroupChildPairs(elements, counterpart, pairs2);
116405
+ collectGroupChildPairs(elements, counterpart, pairs2, true);
116165
116406
  return pairs2;
116166
116407
  }
116167
- function collectGroupChildPairs(elements, counterpart, into) {
116408
+ function collectGroupChildPairs(elements, counterpart, into, topLevel) {
116168
116409
  for (const element of elements) {
116169
116410
  const children7 = groupChildren(element);
116170
- if (!children7 || !containsMorphNamedDescendant(element)) {
116411
+ if (!children7 || topLevel && !containsMorphNamedDescendant(element)) {
116171
116412
  continue;
116172
116413
  }
116173
116414
  const twin = correspondingGroup(element, counterpart);
116174
116415
  const twinChildren = twin ? groupChildren(twin) ?? [] : void 0;
116175
- const corresponded = twinChildren ? correspondingChildren(children7, twinChildren) : void 0;
116176
- if (!corresponded) {
116416
+ const cast = twinChildren ? correspondingCast(children7, twinChildren) : void 0;
116417
+ if (!cast) {
116177
116418
  continue;
116178
116419
  }
116179
- for (const [child23, twinChild] of corresponded) {
116420
+ for (const [child23, twinChild] of cast.paired) {
116180
116421
  into.set(child23.id, twinChild.id);
116181
116422
  }
116182
- collectGroupChildPairs(children7, twinChildren ?? [], into);
116423
+ collectGroupChildPairs(cast.from, cast.to, into, false);
116183
116424
  }
116184
116425
  }
116185
116426
  var OUTLINE_SAMPLE_COUNT = 64;
@@ -124485,268 +124726,6 @@ async function mountModel3D(container, modelUrl, options) {
124485
124726
  }
124486
124727
  };
124487
124728
  }
124488
- var GRID_SPACING = 0.5;
124489
- var MAX_HEIGHT = 1.5;
124490
- function computeGridExtent(cols, rows) {
124491
- return {
124492
- gridWidth: Math.max(cols - 1, 1) * GRID_SPACING,
124493
- gridDepth: Math.max(rows - 1, 1) * GRID_SPACING
124494
- };
124495
- }
124496
- function buildSurfaceGeometry(three, cols, rows, heightMap, colorMap) {
124497
- const widthSegs = Math.max(cols - 1, 0);
124498
- const depthSegs = Math.max(rows - 1, 0);
124499
- const { gridWidth, gridDepth } = computeGridExtent(cols, rows);
124500
- const geo = new three.PlaneGeometry(gridWidth, gridDepth, widthSegs, depthSegs);
124501
- geo.rotateX(-Math.PI / 2);
124502
- const pos2 = geo.attributes.position;
124503
- const vertexCount = pos2.count;
124504
- const colors = new Float32Array(vertexCount * 3);
124505
- for (let i = 0; i < vertexCount; i++) {
124506
- const row = Math.floor(i / cols);
124507
- const col = i % cols;
124508
- const idx = row * cols + col;
124509
- const h = idx < heightMap.length ? heightMap[idx] : 0;
124510
- pos2.setY(i, h * MAX_HEIGHT);
124511
- const ci = idx * 3;
124512
- colors[i * 3] = ci < colorMap.length ? colorMap[ci] : 0.5;
124513
- colors[i * 3 + 1] = ci + 1 < colorMap.length ? colorMap[ci + 1] : 0.5;
124514
- colors[i * 3 + 2] = ci + 2 < colorMap.length ? colorMap[ci + 2] : 0.5;
124515
- }
124516
- geo.setAttribute("color", new three.BufferAttribute(colors, 3));
124517
- geo.computeVertexNormals();
124518
- pos2.needsUpdate = true;
124519
- const wireGeometry = new three.WireframeGeometry(geo);
124520
- return { geometry: geo, wireGeometry };
124521
- }
124522
- function buildSurfaceLabels(cols, rows, categoryLabels, seriesNames, maxCat = 8, maxSer = 6) {
124523
- const { gridWidth, gridDepth } = computeGridExtent(cols, rows);
124524
- const labels = [];
124525
- const catStep = Math.max(1, Math.ceil(categoryLabels.length / maxCat));
124526
- for (let i = 0; i < categoryLabels.length; i += catStep) {
124527
- const x = -gridWidth / 2 + i / Math.max(cols - 1, 1) * gridWidth;
124528
- labels.push({
124529
- key: `cat-${i}`,
124530
- text: categoryLabels[i],
124531
- anchor: [x, -0.15, gridDepth / 2 + 0.25],
124532
- axis: "category"
124533
- });
124534
- }
124535
- const serStep = Math.max(1, Math.ceil(seriesNames.length / maxSer));
124536
- for (let i = 0; i < seriesNames.length; i += serStep) {
124537
- const z = -gridDepth / 2 + i / Math.max(rows - 1, 1) * gridDepth;
124538
- labels.push({
124539
- key: `ser-${i}`,
124540
- text: seriesNames[i],
124541
- anchor: [gridWidth / 2 + 0.3, -0.15, z],
124542
- axis: "series"
124543
- });
124544
- }
124545
- labels.push({
124546
- key: "value-axis",
124547
- text: "Value",
124548
- anchor: [-gridWidth / 2 - 0.35, 0.75, -gridDepth / 2],
124549
- axis: "value"
124550
- });
124551
- return labels;
124552
- }
124553
- function computeCameraPlacement(cols, rows) {
124554
- const { gridWidth, gridDepth } = computeGridExtent(cols, rows);
124555
- const maxExtent = Math.max(gridWidth, gridDepth, MAX_HEIGHT);
124556
- const dist2 = maxExtent * 1.8;
124557
- return {
124558
- position: [dist2 * 0.8, dist2 * 0.7, dist2 * 0.8],
124559
- target: [0, 0.3, 0]
124560
- };
124561
- }
124562
- var SURFACE_THREE_UNAVAILABLE = {
124563
- ok: false,
124564
- resize: () => {
124565
- },
124566
- dispose: () => {
124567
- }
124568
- };
124569
- var FOV2 = 45;
124570
- async function loadThree2() {
124571
- try {
124572
- return await import('./three.module-AC7ESV4W.mjs');
124573
- } catch {
124574
- return null;
124575
- }
124576
- }
124577
- async function loadOrbitControlsCtor2() {
124578
- try {
124579
- const mod = await import('./OrbitControls-ZTGHPI5G.mjs');
124580
- return mod.OrbitControls;
124581
- } catch {
124582
- return null;
124583
- }
124584
- }
124585
- function createLabelOverlay(doc, labels) {
124586
- const layer = doc.createElement("div");
124587
- Object.assign(layer.style, {
124588
- position: "absolute",
124589
- inset: "0",
124590
- pointerEvents: "none",
124591
- overflow: "hidden"
124592
- });
124593
- const nodes = labels.map((label) => {
124594
- const node = doc.createElement("div");
124595
- node.textContent = label.text;
124596
- const color2 = label.axis === "value" ? "#999" : "#666";
124597
- Object.assign(node.style, {
124598
- position: "absolute",
124599
- fontSize: "9px",
124600
- color: color2,
124601
- whiteSpace: "nowrap",
124602
- userSelect: "none",
124603
- transform: "translate(-50%, -50%)",
124604
- willChange: "left, top"
124605
- });
124606
- if (label.axis === "value") {
124607
- node.style.writingMode = "vertical-rl";
124608
- }
124609
- layer.appendChild(node);
124610
- return node;
124611
- });
124612
- return { layer, nodes };
124613
- }
124614
- async function mountSurfaceChart3D(container, options) {
124615
- const three = await loadThree2();
124616
- const OrbitCtrlCtor = three ? await loadOrbitControlsCtor2() : null;
124617
- if (!three || !OrbitCtrlCtor) {
124618
- return SURFACE_THREE_UNAVAILABLE;
124619
- }
124620
- const { cols, rows } = options;
124621
- let width = Math.max(1, options.width);
124622
- let height = Math.max(1, options.height);
124623
- const renderer = new three.WebGLRenderer({ antialias: true, alpha: true });
124624
- renderer.setPixelRatio(
124625
- Math.min(
124626
- typeof window === "undefined" ? 1 : window.devicePixelRatio || 1,
124627
- options.maxPixelRatio ?? 2
124628
- )
124629
- );
124630
- renderer.setSize(width, height, false);
124631
- const canvas = renderer.domElement;
124632
- canvas.style.width = `${width}px`;
124633
- canvas.style.height = `${height}px`;
124634
- canvas.style.display = "block";
124635
- canvas.style.willChange = "transform";
124636
- container.appendChild(canvas);
124637
- const scene = new three.Scene();
124638
- scene.add(new three.AmbientLight(16777215, 0.6));
124639
- const key2 = new three.DirectionalLight(16777215, 0.8);
124640
- key2.position.set(5, 8, 5);
124641
- scene.add(key2);
124642
- const fill = new three.DirectionalLight(16777215, 0.3);
124643
- fill.position.set(-3, 4, -2);
124644
- scene.add(fill);
124645
- const camera = new three.PerspectiveCamera(FOV2, width / height, 0.1, 1e3);
124646
- const placement = computeCameraPlacement(cols, rows);
124647
- camera.position.set(...placement.position);
124648
- const target = new three.Vector3(...placement.target);
124649
- camera.lookAt(target);
124650
- const { gridWidth, gridDepth } = computeGridExtent(cols, rows);
124651
- const floorSize = Math.max(gridWidth, gridDepth) * 1.2;
124652
- const gridFloor = new three.GridHelper(floorSize, Math.max(cols, rows), 13421772, 15263976);
124653
- gridFloor.position.y = -0.02;
124654
- scene.add(gridFloor);
124655
- const { geometry, wireGeometry } = buildSurfaceGeometry(
124656
- three,
124657
- cols,
124658
- rows,
124659
- options.heightMap,
124660
- options.colorMap
124661
- );
124662
- const surfaceMaterial = new three.MeshPhongMaterial({
124663
- vertexColors: true,
124664
- side: three.DoubleSide,
124665
- shininess: 30,
124666
- transparent: true,
124667
- opacity: 0.92
124668
- });
124669
- const surfaceMesh = new three.Mesh(geometry, surfaceMaterial);
124670
- scene.add(surfaceMesh);
124671
- let wireMaterial = null;
124672
- if (options.wireframe) {
124673
- wireMaterial = new three.LineBasicMaterial({
124674
- color: 3355443,
124675
- transparent: true,
124676
- opacity: 0.25
124677
- });
124678
- scene.add(new three.LineSegments(wireGeometry, wireMaterial));
124679
- }
124680
- const controls = new OrbitCtrlCtor(camera, canvas);
124681
- controls.enablePan = true;
124682
- controls.enableZoom = true;
124683
- controls.enableRotate = true;
124684
- controls.minDistance = 1;
124685
- controls.maxDistance = 20;
124686
- controls.maxPolarAngle = Math.PI / 2 + 0.3;
124687
- controls.target.copy(target);
124688
- controls.update();
124689
- const doc = container.ownerDocument ?? document;
124690
- const labels = buildSurfaceLabels(cols, rows, options.categoryLabels, options.seriesNames);
124691
- const { layer, nodes } = createLabelOverlay(doc, labels);
124692
- container.appendChild(layer);
124693
- const anchors = labels.map((l) => new three.Vector3(...l.anchor));
124694
- const projected = new three.Vector3();
124695
- const updateLabels = () => {
124696
- for (let i = 0; i < nodes.length; i++) {
124697
- projected.copy(anchors[i]).project(camera);
124698
- const node = nodes[i];
124699
- if (projected.z > 1) {
124700
- node.style.display = "none";
124701
- continue;
124702
- }
124703
- node.style.display = "";
124704
- node.style.left = `${(projected.x + 1) / 2 * width}px`;
124705
- node.style.top = `${(-projected.y + 1) / 2 * height}px`;
124706
- }
124707
- };
124708
- let frame2 = 0;
124709
- let disposed = false;
124710
- const renderLoop = () => {
124711
- if (disposed) {
124712
- return;
124713
- }
124714
- frame2 = requestAnimationFrame(renderLoop);
124715
- controls.update();
124716
- renderer.render(scene, camera);
124717
- updateLabels();
124718
- };
124719
- frame2 = requestAnimationFrame(renderLoop);
124720
- return {
124721
- ok: true,
124722
- resize(w, h) {
124723
- width = Math.max(1, w);
124724
- height = Math.max(1, h);
124725
- camera.aspect = width / height;
124726
- camera.updateProjectionMatrix();
124727
- renderer.setSize(width, height, false);
124728
- canvas.style.width = `${width}px`;
124729
- canvas.style.height = `${height}px`;
124730
- },
124731
- dispose() {
124732
- if (disposed) {
124733
- return;
124734
- }
124735
- disposed = true;
124736
- cancelAnimationFrame(frame2);
124737
- controls.dispose();
124738
- geometry.dispose();
124739
- wireGeometry.dispose();
124740
- surfaceMaterial.dispose();
124741
- wireMaterial?.dispose();
124742
- gridFloor.dispose();
124743
- scene.clear();
124744
- renderer.dispose();
124745
- canvas.remove();
124746
- layer.remove();
124747
- }
124748
- };
124749
- }
124750
124729
  var AVERAGE_ADVANCE_RATIO = 0.5;
124751
124730
  function wrapTextByEstimatedWidth(text2, maxWidth, fontSize, options = {}) {
124752
124731
  if (!text2 || text2.trim().length === 0) {
@@ -125149,6 +125128,7 @@ function savedPresentationFileName(sourceName, format = "pptx") {
125149
125128
  var AUTOSAVE_DB_NAME = "pptx-viewer-autosave";
125150
125129
  var AUTOSAVE_DB_VERSION = 1;
125151
125130
  var AUTOSAVE_STORE_NAME = "recoveryVersions";
125131
+ var AUTOSAVE_DEFAULT_INTERVAL_SECONDS = 120;
125152
125132
  var AUTOSAVE_MIN_INTERVAL_SECONDS = 10;
125153
125133
  function openAutosaveDb() {
125154
125134
  return new Promise((resolve2, reject) => {
@@ -125312,6 +125292,117 @@ async function saveAutosaveSnapshot(filePath, data) {
125312
125292
  return putAutosaveRecord(filePath, data);
125313
125293
  }
125314
125294
  }
125295
+ var AUTOSAVE_RECOVERY_WINDOW_MS = 24 * 60 * 60 * 1e3;
125296
+ var CONSUMED_KEY = "pptx-viewer-recovery-consumed";
125297
+ function markAutosaveSnapshotConsumed(timestamp) {
125298
+ try {
125299
+ if (typeof sessionStorage === "undefined" || !Number.isFinite(timestamp)) {
125300
+ return;
125301
+ }
125302
+ const previous = consumedAutosaveSnapshotTimestamp();
125303
+ if (timestamp > previous) {
125304
+ sessionStorage.setItem(CONSUMED_KEY, String(timestamp));
125305
+ }
125306
+ } catch {
125307
+ }
125308
+ }
125309
+ function consumedAutosaveSnapshotTimestamp() {
125310
+ try {
125311
+ if (typeof sessionStorage === "undefined") {
125312
+ return 0;
125313
+ }
125314
+ const raw = sessionStorage.getItem(CONSUMED_KEY);
125315
+ const value = raw === null ? Number.NaN : Number(raw);
125316
+ return Number.isFinite(value) ? value : 0;
125317
+ } catch {
125318
+ return 0;
125319
+ }
125320
+ }
125321
+ function shouldProbeAutosaveRecovery(input) {
125322
+ return !input.alreadyChecked && input.autosaveAllowed && Boolean(input.filePath) && !input.loading && !input.error && input.slideCount > 0;
125323
+ }
125324
+ function formatSnapshotSize(bytes) {
125325
+ if (!Number.isFinite(bytes) || bytes <= 0) {
125326
+ return "0 KB";
125327
+ }
125328
+ if (bytes < 1024 * 1024) {
125329
+ return `${Math.max(1, Math.round(bytes / 1024))} KB`;
125330
+ }
125331
+ return `${(bytes / (1024 * 1024)).toFixed(1)} MB`;
125332
+ }
125333
+ function ageKeyFor(ageMinutes) {
125334
+ if (ageMinutes < 1) {
125335
+ return { key: "pptx.autosave.justNow", count: 0 };
125336
+ }
125337
+ if (ageMinutes === 1) {
125338
+ return { key: "pptx.autosave.oneMinAgo", count: 1 };
125339
+ }
125340
+ if (ageMinutes < 60) {
125341
+ return { key: "pptx.autosave.minutesAgo", count: ageMinutes };
125342
+ }
125343
+ return { key: "pptx.autosave.recovery.hoursAgo", count: Math.floor(ageMinutes / 60) };
125344
+ }
125345
+ function autosaveRecoveryPrompt(input) {
125346
+ const record = input.record;
125347
+ if (!record || record.size <= 0 || !record.key) {
125348
+ return null;
125349
+ }
125350
+ const age = input.now - record.timestamp;
125351
+ if (!Number.isFinite(age) || age < 0 || age >= AUTOSAVE_RECOVERY_WINDOW_MS) {
125352
+ return null;
125353
+ }
125354
+ if (record.timestamp <= (input.consumedTimestamp ?? 0)) {
125355
+ return null;
125356
+ }
125357
+ const ageMinutes = Math.floor(age / 6e4);
125358
+ const relative = ageKeyFor(ageMinutes);
125359
+ return {
125360
+ filePath: record.key,
125361
+ timestamp: record.timestamp,
125362
+ size: record.size,
125363
+ ageMinutes,
125364
+ titleKey: "pptx.autosave.recovery.title",
125365
+ messageKey: "pptx.autosave.recovery.message",
125366
+ messageParams: { file: record.key, size: formatSnapshotSize(record.size) },
125367
+ ageKey: relative.key,
125368
+ ageParams: { count: relative.count },
125369
+ restoreKey: "pptx.autosave.recovery.restore",
125370
+ discardKey: "pptx.autosave.recovery.discard"
125371
+ };
125372
+ }
125373
+ function shouldShowAutosaveRecoveryPrompt(input) {
125374
+ return Boolean(input.prompt) && !input.presenting;
125375
+ }
125376
+ async function probeAutosaveRecovery(filePath, now = Date.now()) {
125377
+ if (typeof indexedDB === "undefined") {
125378
+ return null;
125379
+ }
125380
+ try {
125381
+ const record = await getAutosaveSnapshot(filePath);
125382
+ const prompt = autosaveRecoveryPrompt({
125383
+ record: record ? { key: record.key, timestamp: record.timestamp, size: record.size } : void 0,
125384
+ now,
125385
+ consumedTimestamp: consumedAutosaveSnapshotTimestamp()
125386
+ });
125387
+ if (!prompt || !record) {
125388
+ return null;
125389
+ }
125390
+ return { prompt, record };
125391
+ } catch {
125392
+ return null;
125393
+ }
125394
+ }
125395
+ function acceptAutosaveRecovery(record) {
125396
+ markAutosaveSnapshotConsumed(record.timestamp);
125397
+ return record.data instanceof Uint8Array ? record.data : new Uint8Array(record.data);
125398
+ }
125399
+ async function discardAutosaveRecovery(record) {
125400
+ markAutosaveSnapshotConsumed(record.timestamp);
125401
+ try {
125402
+ await deleteAutosaveSnapshot(record.key);
125403
+ } catch {
125404
+ }
125405
+ }
125315
125406
  function secureRandomBytes(length) {
125316
125407
  const bytes = new Uint8Array(length);
125317
125408
  if (typeof crypto !== "undefined" && typeof crypto.getRandomValues === "function") {
@@ -125510,6 +125601,7 @@ async function restoreSessionDeck() {
125510
125601
  const snapshot = await getAutosaveSnapshot(deck.fileName);
125511
125602
  const bytes = snapshot ? toBytes(snapshot.data) : null;
125512
125603
  if (snapshot && bytes && bytes.byteLength > 0 && snapshot.timestamp > deck.timestamp) {
125604
+ markAutosaveSnapshotConsumed(snapshot.timestamp);
125513
125605
  return { fileName: deck.fileName, data: bytes, timestamp: snapshot.timestamp };
125514
125606
  }
125515
125607
  } catch {
@@ -126900,11 +126992,13 @@ var TITLE_PH_TYPES = /* @__PURE__ */ new Set(["title", "ctrtitle"]);
126900
126992
  var CHROME_PH_TYPES = /* @__PURE__ */ new Set(["ftr", "hdr", "dt", "sldnum"]);
126901
126993
  var OUTLINE_TITLE_ELEMENT_NAME = "Title";
126902
126994
  function placeholderType(element) {
126903
- const ph = element.rawXml?.["p:nvSpPr"]?.["p:nvPr"]?.["p:ph"];
126904
- if (!ph) {
126995
+ const nvPr = element.rawXml?.["p:nvSpPr"]?.["p:nvPr"];
126996
+ const ph = nvPr === void 0 || typeof nvPr === "string" ? void 0 : nvPr["p:ph"];
126997
+ if (ph === void 0) {
126905
126998
  return void 0;
126906
126999
  }
126907
- const type = typeof ph["@_type"] === "string" ? ph["@_type"].trim().toLowerCase() : "";
127000
+ const rawType = typeof ph === "object" && ph !== null ? ph["@_type"] : void 0;
127001
+ const type = typeof rawType === "string" ? rawType.trim().toLowerCase() : "";
126908
127002
  return type.length > 0 ? type : "body";
126909
127003
  }
126910
127004
  function isTextBearing(element) {
@@ -130735,6 +130829,34 @@ function shouldWriteAutosaveSnapshot(input) {
130735
130829
  }
130736
130830
  return input.sources.some((source, index) => !Object.is(source, previous.sources[index]));
130737
130831
  }
130832
+ function resolveAutosaveActivation(input) {
130833
+ if (input.hostAutosave === false) {
130834
+ return { active: false, toggleAvailable: false, reason: "autosave_host_off" };
130835
+ }
130836
+ if (!input.userEnabled) {
130837
+ return { active: false, toggleAvailable: true, reason: "autosave_toggle_off" };
130838
+ }
130839
+ if (!input.filePath) {
130840
+ return { active: false, toggleAvailable: true, reason: "no_file_path" };
130841
+ }
130842
+ if (!input.canEdit) {
130843
+ return { active: false, toggleAvailable: true, reason: "read_only" };
130844
+ }
130845
+ return { active: true, toggleAvailable: true };
130846
+ }
130847
+ var AUTOSAVE_DEFAULT_INTERVAL_MS = AUTOSAVE_DEFAULT_INTERVAL_SECONDS * 1e3;
130848
+ var HOST_INTERVAL_FLOOR_MS = 50;
130849
+ function resolveAutosaveIntervalMs(input) {
130850
+ const host = input.hostIntervalMs;
130851
+ if (typeof host === "number" && Number.isFinite(host)) {
130852
+ return Math.max(HOST_INTERVAL_FLOOR_MS, host);
130853
+ }
130854
+ const seconds = input.optionsIntervalSeconds;
130855
+ if (typeof seconds === "number" && Number.isFinite(seconds)) {
130856
+ return Math.max(AUTOSAVE_MIN_INTERVAL_SECONDS, seconds) * 1e3;
130857
+ }
130858
+ return AUTOSAVE_DEFAULT_INTERVAL_MS;
130859
+ }
130738
130860
  var BACKSTAGE_NAV = [
130739
130861
  { id: "home", label: "Home", labelKey: "pptx.backstage.nav.home" },
130740
130862
  { id: "new", label: "New", labelKey: "pptx.backstage.nav.new" },
@@ -133957,4 +134079,4 @@ function segmentFrameCount(durationMs, fps) {
133957
134079
  * `<p:extLst>` (optional)
133958
134080
  */
133959
134081
 
133960
- export { ACTION_BUTTON_PRESETS, ACTION_INDICATOR_CLASS, ACTION_INDICATOR_ICON_PATH, ARTISTIC_EFFECTS, AVATAR_COLOR_SWATCHES, BACKSTAGE_NAV, BACKSTAGE_TEMPLATES, BEVEL_PRESETS, BROADCAST_THROTTLE_MS, CATEGORIES, CHARACTER_SPACING_OPTIONS, COLOR_MAP_ALIAS_KEYS, COMMENT_MENTION_ATTRIBUTE, COMMENT_MENTION_CLASS, COMMON_FONTS, CONNECTION_TIMEOUT_MS, CONNECTOR_SITE_SNAP_PX, CUSTOM_FONT_ACCEPT, DEBOUNCE_MS, DEFAULT_BROADCAST_SERVER_URL, DEFAULT_COLOR_CHANGE_TOLERANCE, DEFAULT_COLOR_MAP, DEFAULT_FONT_FAMILY, DEFAULT_INSERT_CHART_KIND, DEFAULT_MOTION_PATH_PRESET_ID, DEFAULT_PALETTE2, DEFAULT_QUICK_ACCESS_COMMAND_IDS, DEFAULT_ROW_HEIGHT, DEFAULT_VIEWER_OPTIONS, DEFAULT_VIEWER_PROFILE, DEFAULT_VIRTUAL_OVERSCAN, DIRECTIONAL_PRESETS, DUOTONE_PRESETS, ELEMENT_ACTION_TYPE_OPTIONS, EMPHASIS_PRESET_VALUES, ENTRANCE_PRESET_VALUES, EQUATION_TEMPLATES, EXIT_PRESET_VALUES, EXPANDED_MAX_HEIGHT, EXPORT_ASSEMBLING_PERCENT, EXPORT_DONE_PERCENT, EncryptedFileError, FILL_MODE_OPTIONS, FILL_PATTERN_LABEL_KEYS, GRADIENT_TYPE_OPTIONS, HANDOUT_OPTIONS, HIDDEN_SLIDE_LABEL_KEY, HIDDEN_SLIDE_SLASH_GRADIENT, HIGHLIGHTER_COLORS, INDENT_PX, INK_REPLAY_KEYFRAMES, INSERT_CHART_TYPES, LBL, LINK_TOOLTIP_CLASS, LINK_TOOLTIP_HINT_CLASS, LINK_TOOLTIP_HOST_CLASS, LINK_TOOLTIP_LABEL_CLASS, LINK_TOOLTIP_PANEL_CLASS, LOCAL_SYNC_ORIGIN, MATERIAL_PRESETS, MAX_INDENT_LEVEL, MAX_ZOOM_SCALE, MEDIA_CHROME_ATTRIBUTE, MIN_ZOOM_SCALE, MOBILE_BREAKPOINT, MOTION_PATH_FAMILIES, NOTES_FONT_SIZE_DEFAULT, NOTES_FONT_SIZE_MAX, NOTES_FONT_SIZE_MIN, NOTES_FONT_SIZE_STEP, NUM, OUTLINE_LEVEL_ATTR, OUTLINE_ROW_ATTR, OUTLINE_SLIDE_ATTR, OUTLINE_VIEW_ATTR, PATTERN_OPTIONS, PEN_COLORS, PPTX_OPEN_ACCEPT, PRESENTATION_CHANNEL_NAME, PRESENTATION_HASH, PRESENTATION_HIT_TEST_CSS, PRESENTATION_MESSAGE_ORIGIN, PRESENTATION_NONCE_KEY, PRESENTATION_OPEN_EXTENSIONS, PRESENTATION_STAGE_ATTRIBUTE, PRESENTER_CONSOLE_CLASSES, PRESENTER_CONSOLE_CONTROLS, PRESENTER_NAVIGATOR_LABEL_KEYS, PRESENT_TOOLBAR_CLASSES, PRESETS, PRESET_THEMES, PptxHandler, PptxMarkdownConverter, PresentationAnimationController, QUICK_ACCESS_COMMAND_CATALOG, READING_VIEW_ATTR, READING_VIEW_COUNTER_ATTR, READING_VIEW_STAGE_ATTR, RIBBON_SHAPE_SWATCHES, RIBBON_TRANSITION_PRESETS, RULER_FONT_SIZE, RULER_THICKNESS, SECTION_HEADING, SEL, SHAPE_PRESET_DEFS, SHAPE_QUICK_STYLES, SHORTCUT_REFERENCE_ITEMS, SLIDE_SHOW_OPTIONS, SLIDE_SIZE_PRESETS, SLIDE_TEMPLATES, SLIDE_TRANSITION_KEYFRAMES, SLIDE_TRANSITION_OPTIONS, SLIDE_VIRTUALIZATION_THRESHOLD, SMARTART_COLOR_SCHEME_LABEL_KEYS, SMARTART_STYLE_LABEL_KEYS, SORTER_MAX_ZOOM, SORTER_MIN_ZOOM, SORTER_ZOOM_STEP, STATUS_BAR_CLASSES, SWITCHABLE_LAYOUT_TYPES, SvgExporter, TABLET_BREAKPOINT, TABLE_STYLE_PRESETS, TAB_ROW_ACTION_CLASSES, TEXT_BUILD_ID_SEP, TEXT_WARP_PRESETS, THEME_CATALOG, THEME_COLOR_SCHEME_KEYS, THEME_COLOR_SLOT_LABEL_KEYS, THEME_PRESETS, TITLE_BAR_CLASSES, TITLE_BAR_DEFAULT_FILE_KEY, TOOLBAR_TABS, TRANSITION_DIR_ARROWS, TRANSITION_ORIENTATION_TYPES, TRANSITION_VALID_DIRECTIONS, ThemePresets, VIEWER_OPTIONS_TABS, VIEWER_PREFS_STORAGE_KEY, VIEWER_SHORTCUT_REFERENCE, WEBM_MIME_CANDIDATES, acceptsPresentationInput, actionAffordanceLabels, activateModalFocus, addChartCategory, addChartSeries, addQuickAccessCommand, addSection, addSmartArtNode, addSmartArtNodeAsChild, addTagToCollections, alignElements, animationEffectLabel, annotationOverlayZIndex, appendPresentationInkPoint, appendTableElementColumn, appendTableElementRow, apply3dEffects, applyAcceptAllSlides, applyAcceptSlide, applyCaseTransformToSegments, applyChartBuildReveal, applyColorChange, applyDuotone, applyFindReplacements, applyFormatToElement, applyMotionPathPreset, applyOutlineEdit, applyPreferenceToOptions, applyReadingViewCommand, applyRehearsalTimings, applyReroutedConnectors, applyResize, applyStyleToSelectedSegments, applyThemeOverrideToSlide, applyThemeToData, attachPresentationVisibilityPause, authorConnectorBetweenSites, autosaveSnapshotMark, availableQuickAccessCommands, backstageCardsFor, beginShapeAdjustment, bringForward, bringToFront, build3DExtrusionData, buildBroadcastViewerUrl, buildCacheKey, buildCalloutLeaderLineSvgPath, buildChartViewModel, buildCollaborationShareUrl, buildContextMenuEntries, buildCreateCollaborationConfig, buildCssGradientFromShapeStyle, buildDirectionGrid, buildDuotoneCacheKey, buildElementClipboardPayload, buildFieldSubstitutionContext, buildFontCatalog, buildHandoutsHtml, buildHollowHitOutline, buildInitialGuides, buildJoinCollaborationConfig, buildLayoutPreviewGeometry, buildMorphAnimationRules, buildMorphTransitionPlan, buildMotionPathPreview, buildNotesHtml, buildNotesPdfBytes, buildOutline, buildOutlineHtml, buildParagraphs, buildPresentationAudienceUrl, buildPreviewAnimation, buildPreviewElements, buildPrintDocument, buildPrintHtmlDocument, buildSaveSlides, buildSlideTemplateContent, buildSlideTemplateSlide, buildSlidesHtml, buildSlidesPdfBytes, buildSmartArt3DModel, buildSmartArtA11y, buildSmartArtPresetData, buildStrokeOutline, buildSummaryZoomView, buildSvgGradientDef, buildTableDataGrid, buildTextBlockStyle, buildTextBody3DSceneStyle, buildTextBodyLayoutStyle, buildTextBuildSpec, buildThemeColorGrid, buildThemeColorMap, buildUserFontFaceStyles, canCommitActionType, canGoNext, canGoPrevious, canInteractWithElement, canvasToJpegData, cellRunStyle, cellStyleToCss, centeredSvgTextLines, chartAreaFill, chartDataChangeType, chartPartToAttrs, clampCropValue, clampNotesFontSize, clampPercent, clampSorterZoom, clampTransitionNumber, clampUnitInterval2 as clampUnitInterval, clampZoomScale, clearAllLocalViewerData, clearAudienceContent, clearLocalAwareness, clearMotionPath, clearStoredViewerPrefs, cloneElementForPaste, cloneHistorySnapshot, cloneSlide, cloneTemplateElementsBySlideId, collectConnectorSiteCandidates, collectImagePaths, collectMediaElements, collectUsedFonts, colorWithOpacity, commentTextSegments, comparePresentation, compileEquationTemplateMathMl, compileLatexEquation, computeAllNotesPages, computeColumnBoundaries, computeDrawingViewBox, computeEntranceAnimationDelay, computeHandoutLayout, computeInlineEditorRect, computeKeyboardInset, computeLayout, computeLayoutOptions, computeMarqueeHitIds, computeMergeCellDown, computeMergeCellRight, computeResizedColumnWidths, computeResizedRowHeight, computeScrollDelta, computeSelectionRect, computeSmartArtLayout2 as computeSmartArtLayout, computeSnapToShape, computeSplitCell, computeValueRange, computeValueRangeForChart, computeVirtualRange, convertLatexToOmml, convertOmmlToLatex, convertOmmlToMathMl, copyFormatFromElement, createBackstagePresentation, createBlankSlide, createCollaborationLivePatcher, createDefaultChartElement, createDepartureChannel, createInitialPresentationSnapshot, createPlainNotesSegments, createPresenceProjector, createPresentationKeyBuffer, createPresentationSessionId, createPresenterShowGuard, createPresenterTimer, createSyncGate, createTouchGestureRecognizer, createViewerOptionsStore, createViewerZoomStore, createWheelStepBuffer, customGeometryPathsToSvgSubpaths, defaultCssVars, defaultRadius, defaultThemeColors, deleteAutosaveSnapshot, deleteSection, deleteTableColumn, deleteTableRow, deleteTagFromCollections, demoteSmartArtNode, deriveSlideFieldContext, describeFontEmbedding, detectOrientation, detectTouchDevice, distributeElements, downloadBlob, downloadDataUrl, dragAnchorViewY, dragValueForPart, elementActionToPptxAction, elementLockTogglePatch, embeddedFontSaveOptions, encodeGif, endAudienceDisplay, ensureActionAffordanceStyles, erasePresentationInkAt, escapeHtml22 as escapeHtml2, exportDeckJson, extraQuickAccessCommands, extractPathPoints, filterCommands, filterInteractableIds, filterRenderedElements, findChartPartTarget, findConnectorSiteNear, findInSlides, findMediaElementByElementId, findSmartArtNodeText, firstShowSlideIndex, flattenNodes, flattenTagCollections, forgetSessionDeck, formatAxisValue, formatAxisValueWithUnits, formatBackstageDate, formatBackstageSize, formatBytes, formatCommentTimestamp, formatElapsed, formatMobileElapsed, formatRelativeTime, formatSlideCounter, formatTime, formatVersionTimestamp, fpsToFrameIntervalMs, generateBroadcastRoomId, generateElementId, generateLogTicks, generateNoteLineCount, generatePackageReadme, generatePressureCircles, generateTicks, getAnimationInitialStyle, getAriaLabel, getAriaRole, getAriaRoleDescription, getCachedResult, getCalloutLeaderLineGeometry, getCalloutViewBoxBounds, getCellDiagonalBorders, getChartStylePalette, getCommentMarkerPosition, getCompoundLineOffsets, getCompoundLineWidths, getComputedEffectStyle, getComputedFillStyle, getComputedStrokeStyle, getConnectorEndpointHandles, getContentPartReplayStyles, getCurrentParagraphIndex, getDisplayUnitLabel, getDraggedShapeAdjustments, getDuotoneCachedResult, getElementLabel, getElementTransform, getElementTransformWithoutRotation, getGroupChildParentFill, getImageColorWashStyle, getImageEffectsFilter, getImageEffectsOpacity, getImageFitStyle, getImageSvgFilters, getImageTilingStyle, getInkReplayStyles, getInlineEditorSelection, getLocalStorageUsageSummary, getNotesPrintableArea, getOleBadgeLabel, getOleObjectTypeLabel, getOleTypeColor, getOleTypeLabel, getOverflowSegments, getPatternSvg, getPendingSelectionRestore, getPresetShapeClipPath, getPrintableArea, getResolvedShapeClipPath, getRoundRectRadiusPx2, getSecondaryValueAxis, getSessionTabId, getShapeAdjustmentHandleDescriptors, getShapeConnectionSites, getSlideBackgroundStyle, getSlideTransitionAnimations, getSoftEdgeSvgFilter, getSubstituteFontFamily, getSvgStrokeDasharray, getTableCellBandStyle, getTextBodyRotationTransform, getTextCompensationTransform, getWarpPath, groupElements, groupIntoParagraphs, groupSlidesBySection, guidePxToEmu, handleReadingViewKey, hasCopyableFormat, hasDistinctScriptFonts, hasPressureVariation, hasShapeProperties, hasShowSlideAfter, hasTextProperties, hexToRgbChannels2 as hexToRgbChannels, hiddenSlideCue, inlineElementPointerEvents, insertTableColumn, insertTableRow, isActionHidden, isBlackboardActive, isBrowserOpenableMime, isCalloutShape, isCellInRect, isCurrentLayout, isEditableMotionPath, isEditableTextElement, isEditorTextInputTarget, isElementActionable, isElementLocked, isElementRendered, isExportAbortError, isHollowShapeElement, isImageLikeElement, isImageTiled, isInkElement, isKeyboardOpen, isLegacyBinaryPresentation, isLinkedTextBox, isMixedContentBlocked, isMobileViewport, isPpactionUrl, isPresentationAdvanceClick, isPresentationSessionMessage, isStrokeOnlyPresetElement, isSupportedPresentationFile, isTemplateElementId3 as isTemplateElementId, isUrlSafe, lastShowSlideIndex, listAutosaveSnapshots, listBackstageRecentFiles, loadAudienceContent, loadSessionDeck, makeCloneId, makeSlideId, mapEditingWheel, mapEditorKey, mapOutlineKey, mapPresentationKey, mapPresentationWheel, mapSlideSorterKey, masterViewBackgroundColor, masterViewElements, masterViewPseudoSlide, mayLeaveSlideShow, mediaFallbackIcon, mediaFallbackLabelKey, mediaFallbackVisual, mediaPlaybackAttributes, mediaTransportVisible, mergeAdditiveSelection, mergeCells, mergePresentationSnapshot, mergeShapes, mergeSlideTransition, mobileElapsedSince, mobileSlideCounter, morphOptionToMode, motionPathEndPixel, motionPathFamilyLabelKey, motionPathFor, motionPathPresetIdForPath, motionPathPresetLabelKey, motionPathPresetsByFamily, motionPathToSvgD, mountModel3D, mountSurfaceChart3D, movePresenterPointer, moveQuickAccessCommand, moveSectionDown, moveSectionUp, moveSlidesToSection, newTableElement, nextPresentedSlide, nextShowSlideIndex, normalizeColorsForCapture, normalizeHexColor, normalizeSegments, normalizeStrokeDashType, normalizeValue, notesSegmentsToSpans, observeYDocSlides, ooxmlGradientAngleToCssDegrees, openNativeEyeDropper, openPptxFile, openReadingView, openUrlInNewTab, paintedStrokeWidth, paletteColor, paragraphsToSegments, parseDrawingColor, parseDrawingColorOpacity, parsePanoseString, parsePpactionUrl, parseSegmentsFromRichEditor, partitionTemplateElements, pickSupportedMimeType, pieceLetterSpacing, placeAudienceWindow, placeCaretAtEnd, playSlideTransitionPreview, polygonsToSvgPath, pptxActionToElementAction, preprocessCssForCapture, presentationBaseName, presentationInkPath, presenterElapsed, presenterNextDisabled, presenterPaneAdvancesOnClick, presenterPrevDisabled, presenterTimerProgress, pressuresToWidths, previousShowSlideIndex, printPropertiesFrameSlides, printPropertiesSlidesPerPage, projectDrawingShapes, promoteSmartArtNode, publishLiveGeometry, publishLiveInlineText, quickStyleSwatchCss, reResolveSlideColors, readBackstageRecentFile, readRibbonTransitionDraft, readSlideShowOption, readSlidesFromYDoc, readStoredViewerPrefs, readViewportMetrics, readingViewFitScale, rebuildDrawingShapesIfCleared, rebuildTableStructureInRawXml, reconcileSlidesInYDoc, recordProgressPercent, rectToCells, registerCollaborationTeardown, registerCustomFont, registerPersistentAudio, remapTextToSegments, rememberSessionDeck, removeChartCategory, removeChartSeries, removeLastTableElementColumn, removeLastTableElementRow, removeQuickAccessCommand, removeSmartArtNode, removeTableElementColumn, removeTableElementRow, renameSection, reorderSmartArtNode, replaceMasterViewElements, rerouteConnectorsForMovedElements, resetPresenterTimer, resetSlideLayoutPath, resolveActionType, resolveAudienceScreenPlacement, resolveAuthoredCustomShowId, resolveAutoAdvanceDelayMs, resolveAutoFitFontScale, resolveAutosaveIntervalSeconds, resolveConnectorEndpointUpdate, resolveDefaultFontFamily, resolveDrawingShapeNodeId, resolveElementActionAffordance, resolveElementInteractivity, resolveFontForScript, resolveGroupChildFill, resolveInkColor, resolveInkOpacity, resolveInkWidth, resolveMetricTrackingPx, resolveOleType, resolvePalette, resolveProfileInitial, resolveRegionCode, resolveSelectionPaneRename, resolveShapeGeometry, resolveShowSlideIndexes, resolveSlideSizeSelection, resolveThemeCatalogEntry, resolveTitleBarStatusKey, resolveTransitionDurationMs, resolveTransportForServerUrl, resolveViewerAddinRows, restoreSegmentSelection, restoreSessionDeck, revealedSmartArtNodeCount, ribbonTransitionUpdates, rulerDragToGuidePosition, runMediaCommand, runPresentationAction, safeOpenUrl, sanitizeColor, sanitizeDownloadFilename, sanitizeGradientStops, sanitizeMathMl, saveAutosaveSnapshot, saveDeckWithPassword, saveViewerProfile, savedPresentationFileName, scanAvailableFontFamilies, schemaLabel, scopeLayoutOptionsToSlide, segmentByScript, segmentFrameCount, segmentsToEditorHtml, segmentsToParagraphs, segmentsToPlainText, sendBackward, sendToBack, sequentialColorScale, seriesColor2 as seriesColor, setCachedResult, setChartAxisGridlineStyle, setChartAxisLogScale, setChartAxisTitleStyle, setChartCategoryLabel, setChartCellValue, setChartDataPointExplosion, setChartDataPointFill, setChartDataPointLabel, setChartDataPointMarker, setChartSeriesChartType, setChartSeriesMarker, setDuotoneCachedResult, setMasterViewBackgroundColor, setMotionPath, setMotionPathEnd, setPendingSelectionRestore, setSmartArtNodeStyle, setTableElementCellText, shapeFillChange, shapeOutlineChange, shouldAutoFollowBroadcaster, shouldCommitSmartArtNodeText, shouldConfirmExternalHyperlink, shouldLoopContinuously, shouldUseSvgWarp, shouldWriteAutosaveSnapshot, slideProgressPercent, slideShowOptionChange, slideSizeFromPreset, slideSizeToCanvasPx, slideStatusLabel, snapBoxToGrid, splitCell, splitRunForMetrics, splitSeriesByAxis, stepPresenterZoom, stopAllPersistentAudio, storeAudienceContent, strokeOutlineViewBox, styleShadowFilter, substituteFieldText, svgGradientFillRef, svgLineCap, svgPathToPolygons, swapPresentationWindows, switchSmartArtLayout, tableCellCss, tableContainerCss, templateSchemeFromTheme, text3dEmuToPt, text3dPtToEmu, textBuildSpanStyle, themeColorLabel, themeColorSchemesEqual, themeToCssVars, toCssTextOrientation, toCssVerticalDirection, toCssWritingMode, toSlideIndex, toggleBlackboard, togglePresenterTimer, toggleText3dExtrusion, transformTextCase, ungroupElements, updateCellTextInRawXml, updateCellTextStyleInRawXml, updateMasterViewElement, updateMergeAttrsInRawXml, updateSmartArtNodeText, updateTagInCollections, validateRoomId, valueToY, vermilionDarkColors, vermilionDarkTheme, vermilionLightColors, vermilionLightTheme, vermilionRadius, viewerOptionsToPreferences, warpPreviewPath, withChartPointValue, withChartTitle, withConnectorEndpointUpdate, withFrameSlides, withSlideSizeOrientation, withSlidesPerPage, writeStoredViewerPrefs };
134082
+ export { ACTION_BUTTON_PRESETS, ACTION_INDICATOR_CLASS, ACTION_INDICATOR_ICON_PATH, ARTISTIC_EFFECTS, AVATAR_COLOR_SWATCHES, BACKSTAGE_NAV, BACKSTAGE_TEMPLATES, BEVEL_PRESETS, BROADCAST_THROTTLE_MS, CATEGORIES, CHARACTER_SPACING_OPTIONS, COLOR_MAP_ALIAS_KEYS, COMMENT_MENTION_ATTRIBUTE, COMMENT_MENTION_CLASS, COMMON_FONTS, CONNECTION_TIMEOUT_MS, CONNECTOR_SITE_SNAP_PX, CUSTOM_FONT_ACCEPT, DEBOUNCE_MS, DEFAULT_BROADCAST_SERVER_URL, DEFAULT_COLOR_CHANGE_TOLERANCE, DEFAULT_COLOR_MAP, DEFAULT_FONT_FAMILY, DEFAULT_INSERT_CHART_KIND, DEFAULT_MOTION_PATH_PRESET_ID, DEFAULT_PALETTE2, DEFAULT_QUICK_ACCESS_COMMAND_IDS, DEFAULT_ROW_HEIGHT, DEFAULT_VIEWER_OPTIONS, DEFAULT_VIEWER_PROFILE, DEFAULT_VIRTUAL_OVERSCAN, DIRECTIONAL_PRESETS, DUOTONE_PRESETS, ELEMENT_ACTION_TYPE_OPTIONS, EMPHASIS_PRESET_VALUES, ENTRANCE_PRESET_VALUES, EQUATION_TEMPLATES, EXIT_PRESET_VALUES, EXPANDED_MAX_HEIGHT, EXPORT_ASSEMBLING_PERCENT, EXPORT_DONE_PERCENT, EncryptedFileError, FILL_MODE_OPTIONS, FILL_PATTERN_LABEL_KEYS, GRADIENT_TYPE_OPTIONS, HANDOUT_OPTIONS, HIDDEN_SLIDE_LABEL_KEY, HIDDEN_SLIDE_SLASH_GRADIENT, HIGHLIGHTER_COLORS, INDENT_PX, INK_REPLAY_KEYFRAMES, INSERT_CHART_TYPES, LBL, LINK_TOOLTIP_CLASS, LINK_TOOLTIP_HINT_CLASS, LINK_TOOLTIP_HOST_CLASS, LINK_TOOLTIP_LABEL_CLASS, LINK_TOOLTIP_PANEL_CLASS, LOCAL_SYNC_ORIGIN, MATERIAL_PRESETS, MAX_INDENT_LEVEL, MAX_ZOOM_SCALE, MEDIA_CHROME_ATTRIBUTE, MIN_ZOOM_SCALE, MOBILE_BREAKPOINT, MOTION_PATH_FAMILIES, NOTES_FONT_SIZE_DEFAULT, NOTES_FONT_SIZE_MAX, NOTES_FONT_SIZE_MIN, NOTES_FONT_SIZE_STEP, NUM, OUTLINE_LEVEL_ATTR, OUTLINE_ROW_ATTR, OUTLINE_SLIDE_ATTR, OUTLINE_VIEW_ATTR, PATTERN_OPTIONS, PEN_COLORS, PPTX_OPEN_ACCEPT, PRESENTATION_CHANNEL_NAME, PRESENTATION_HASH, PRESENTATION_HIT_TEST_CSS, PRESENTATION_MESSAGE_ORIGIN, PRESENTATION_NONCE_KEY, PRESENTATION_OPEN_EXTENSIONS, PRESENTATION_STAGE_ATTRIBUTE, PRESENTER_CONSOLE_CLASSES, PRESENTER_CONSOLE_CONTROLS, PRESENTER_NAVIGATOR_LABEL_KEYS, PRESENT_TOOLBAR_CLASSES, PRESETS, PRESET_THEMES, PptxHandler, PptxMarkdownConverter, PresentationAnimationController, QUICK_ACCESS_COMMAND_CATALOG, READING_VIEW_ATTR, READING_VIEW_COUNTER_ATTR, READING_VIEW_STAGE_ATTR, RIBBON_SHAPE_SWATCHES, RIBBON_TRANSITION_PRESETS, RULER_FONT_SIZE, RULER_THICKNESS, SECTION_HEADING, SEL, SHAPE_PRESET_DEFS, SHAPE_QUICK_STYLES, SHORTCUT_REFERENCE_ITEMS, SLIDE_SHOW_OPTIONS, SLIDE_SIZE_PRESETS, SLIDE_TEMPLATES, SLIDE_TRANSITION_KEYFRAMES, SLIDE_TRANSITION_OPTIONS, SLIDE_VIRTUALIZATION_THRESHOLD, SMARTART_COLOR_SCHEME_LABEL_KEYS, SMARTART_STYLE_LABEL_KEYS, SORTER_MAX_ZOOM, SORTER_MIN_ZOOM, SORTER_ZOOM_STEP, STATUS_BAR_CLASSES, SWITCHABLE_LAYOUT_TYPES, SvgExporter, TABLET_BREAKPOINT, TABLE_STYLE_PRESETS, TAB_ROW_ACTION_CLASSES, TEXT_BUILD_ID_SEP, TEXT_WARP_PRESETS, THEME_CATALOG, THEME_COLOR_SCHEME_KEYS, THEME_COLOR_SLOT_LABEL_KEYS, THEME_PRESETS, TITLE_BAR_CLASSES, TITLE_BAR_DEFAULT_FILE_KEY, TOOLBAR_TABS, TRANSITION_DIR_ARROWS, TRANSITION_ORIENTATION_TYPES, TRANSITION_VALID_DIRECTIONS, ThemePresets, VIEWER_OPTIONS_TABS, VIEWER_PREFS_STORAGE_KEY, VIEWER_SHORTCUT_REFERENCE, WEBM_MIME_CANDIDATES, acceptAutosaveRecovery, acceptsPresentationInput, actionAffordanceLabels, activateModalFocus, addChartCategory, addChartSeries, addQuickAccessCommand, addSection, addSmartArtNode, addSmartArtNodeAsChild, addTagToCollections, alignElements, animationEffectLabel, annotationOverlayZIndex, appendPresentationInkPoint, appendTableElementColumn, appendTableElementRow, apply3dEffects, applyAcceptAllSlides, applyAcceptSlide, applyCaseTransformToSegments, applyChartBuildReveal, applyColorChange, applyDuotone, applyFindReplacements, applyFormatToElement, applyMotionPathPreset, applyOutlineEdit, applyPreferenceToOptions, applyReadingViewCommand, applyRehearsalTimings, applyReroutedConnectors, applyResize, applyStyleToSelectedSegments, applyThemeOverrideToSlide, applyThemeToData, attachPresentationVisibilityPause, authorConnectorBetweenSites, autosaveSnapshotMark, availableQuickAccessCommands, backstageCardsFor, beginShapeAdjustment, bringForward, bringToFront, build3DExtrusionData, buildBroadcastViewerUrl, buildCacheKey, buildCalloutLeaderLineSvgPath, buildChartViewModel, buildCollaborationShareUrl, buildContextMenuEntries, buildCreateCollaborationConfig, buildCssGradientFromShapeStyle, buildDirectionGrid, buildDuotoneCacheKey, buildElementClipboardPayload, buildFieldSubstitutionContext, buildFontCatalog, buildHandoutsHtml, buildHollowHitOutline, buildInitialGuides, buildJoinCollaborationConfig, buildLayoutPreviewGeometry, buildMorphAnimationRules, buildMorphTransitionPlan, buildMotionPathPreview, buildNotesHtml, buildNotesPdfBytes, buildOutline, buildOutlineHtml, buildParagraphs, buildPresentationAudienceUrl, buildPreviewAnimation, buildPreviewElements, buildPrintDocument, buildPrintHtmlDocument, buildSaveSlides, buildSlideTemplateContent, buildSlideTemplateSlide, buildSlidesHtml, buildSlidesPdfBytes, buildSmartArt3DModel, buildSmartArtA11y, buildSmartArtPresetData, buildStrokeOutline, buildSummaryZoomView, buildSvgGradientDef, buildTableDataGrid, buildTextBlockStyle, buildTextBody3DSceneStyle, buildTextBodyLayoutStyle, buildTextBuildSpec, buildThemeColorGrid, buildThemeColorMap, buildUserFontFaceStyles, canCommitActionType, canGoNext, canGoPrevious, canInteractWithElement, canvasToJpegData, cellRunStyle, cellStyleToCss, centeredSvgTextLines, chartDataChangeType, chartPartToAttrs, chartPreserveAspectRatio, clampCropValue, clampNotesFontSize, clampPercent, clampSorterZoom, clampTransitionNumber, clampUnitInterval2 as clampUnitInterval, clampZoomScale, clearAllLocalViewerData, clearAudienceContent, clearLocalAwareness, clearMotionPath, clearStoredViewerPrefs, cloneElementForPaste, cloneHistorySnapshot, cloneSlide, cloneTemplateElementsBySlideId, collectConnectorSiteCandidates, collectImagePaths, collectMediaElements, collectUsedFonts, colorWithOpacity, commentTextSegments, comparePresentation, compileEquationTemplateMathMl, compileLatexEquation, computeAllNotesPages, computeColumnBoundaries, computeDrawingViewBox, computeEntranceAnimationDelay, computeHandoutLayout, computeInlineEditorRect, computeKeyboardInset, computeMarqueeHitIds, computeMergeCellDown, computeMergeCellRight, computeResizedColumnWidths, computeResizedRowHeight, computeScrollDelta, computeSelectionRect, computeSmartArtLayout2 as computeSmartArtLayout, computeSnapToShape, computeSplitCell, computeVirtualRange, convertLatexToOmml, convertOmmlToLatex, convertOmmlToMathMl, copyFormatFromElement, createBackstagePresentation, createBlankSlide, createCollaborationLivePatcher, createDefaultChartElement, createDepartureChannel, createInitialPresentationSnapshot, createPlainNotesSegments, createPresenceProjector, createPresentationKeyBuffer, createPresentationSessionId, createPresenterShowGuard, createPresenterTimer, createSyncGate, createTouchGestureRecognizer, createViewerOptionsStore, createViewerZoomStore, createWheelStepBuffer, customGeometryPathsToSvgSubpaths, defaultCssVars, defaultRadius, defaultThemeColors, deleteAutosaveSnapshot, deleteSection, deleteTableColumn, deleteTableRow, deleteTagFromCollections, demoteSmartArtNode, deriveSlideFieldContext, describeFontEmbedding, detectOrientation, detectTouchDevice, discardAutosaveRecovery, distributeElements, downloadBlob, downloadDataUrl, dragAnchorViewY, dragValueForPart, elementActionToPptxAction, elementLockTogglePatch, embeddedFontSaveOptions, encodeGif, endAudienceDisplay, ensureActionAffordanceStyles, ensureChartInteractionStyles, erasePresentationInkAt, escapeHtml22 as escapeHtml2, exportDeckJson, extraQuickAccessCommands, extractPathPoints, filterCommands, filterInteractableIds, filterRenderedElements, findChartPartTarget, findConnectorSiteNear, findInSlides, findMediaElementByElementId, findSmartArtNodeText, firstShowSlideIndex, flattenNodes, flattenTagCollections, forgetSessionDeck, formatAxisValue, formatBackstageDate, formatBackstageSize, formatBytes, formatCommentTimestamp, formatElapsed, formatMobileElapsed, formatRelativeTime, formatSlideCounter, formatTime, formatVersionTimestamp, fpsToFrameIntervalMs, generateBroadcastRoomId, generateElementId, generateNoteLineCount, generatePackageReadme, generatePressureCircles, generateTicks, getAnimationInitialStyle, getAriaLabel, getAriaRole, getAriaRoleDescription, getCachedResult, getCalloutLeaderLineGeometry, getCalloutViewBoxBounds, getCellDiagonalBorders, getChartStylePalette, getCommentMarkerPosition, getCompoundLineOffsets, getCompoundLineWidths, getComputedEffectStyle, getComputedFillStyle, getComputedStrokeStyle, getConnectorEndpointHandles, getContentPartReplayStyles, getCurrentParagraphIndex, getDraggedShapeAdjustments, getDuotoneCachedResult, getElementLabel, getElementTransform, getElementTransformWithoutRotation, getGroupChildParentFill, getImageColorWashStyle, getImageEffectsFilter, getImageEffectsOpacity, getImageFitStyle, getImageSvgFilters, getImageTilingStyle, getInkReplayStyles, getInlineEditorSelection, getLocalStorageUsageSummary, getNotesPrintableArea, getOleBadgeLabel, getOleObjectTypeLabel, getOleTypeColor, getOleTypeLabel, getOverflowSegments, getPatternSvg, getPendingSelectionRestore, getPresetShapeClipPath, getPrintableArea, getResolvedShapeClipPath, getRoundRectRadiusPx2, getSessionTabId, getShapeAdjustmentHandleDescriptors, getShapeConnectionSites, getSlideBackgroundStyle, getSlideTransitionAnimations, getSoftEdgeSvgFilter, getSubstituteFontFamily, getSvgStrokeDasharray, getTableCellBandStyle, getTextBodyRotationTransform, getTextCompensationTransform, getWarpPath, groupElements, groupIntoParagraphs, groupSlidesBySection, guidePxToEmu, handleReadingViewKey, hasCopyableFormat, hasDistinctScriptFonts, hasPressureVariation, hasShapeProperties, hasShowSlideAfter, hasTextProperties, hexToRgbChannels2 as hexToRgbChannels, hiddenSlideCue, hollowTextFillStyle, inlineElementPointerEvents, insertTableColumn, insertTableRow, isActionHidden, isBlackboardActive, isBrowserOpenableMime, isCalloutShape, isCellInRect, isCurrentLayout, isEditableMotionPath, isEditableTextElement, isEditorTextInputTarget, isElementActionable, isElementLocked, isElementRendered, isExportAbortError, isHollowShapeElement, isImageLikeElement, isImageTiled, isInkElement, isKeyboardOpen, isLegacyBinaryPresentation, isLinkedTextBox, isMixedContentBlocked, isMobileViewport, isPpactionUrl, isPresentationAdvanceClick, isPresentationSessionMessage, isStrokeOnlyPresetElement, isSupportedPresentationFile, isTemplateElementId3 as isTemplateElementId, isUrlSafe, lastShowSlideIndex, listAutosaveSnapshots, listBackstageRecentFiles, loadAudienceContent, loadSessionDeck, makeCloneId, makeSlideId, mapEditingWheel, mapEditorKey, mapOutlineKey, mapPresentationKey, mapPresentationWheel, mapSlideSorterKey, masterViewBackgroundColor, masterViewElements, masterViewPseudoSlide, mayLeaveSlideShow, mediaFallbackIcon, mediaFallbackLabelKey, mediaFallbackVisual, mediaPlaybackAttributes, mediaTransportVisible, mergeAdditiveSelection, mergeCells, mergePresentationSnapshot, mergeShapes, mergeSlideTransition, mobileElapsedSince, mobileSlideCounter, morphOptionToMode, motionPathEndPixel, motionPathFamilyLabelKey, motionPathFor, motionPathPresetIdForPath, motionPathPresetLabelKey, motionPathPresetsByFamily, motionPathToSvgD, mountModel3D, movePresenterPointer, moveQuickAccessCommand, moveSectionDown, moveSectionUp, moveSlidesToSection, nestedTextDecorationStyle, newTableElement, nextPresentedSlide, nextShowSlideIndex, normalizeColorsForCapture, normalizeHexColor, normalizeSegments, normalizeStrokeDashType, notesSegmentsToSpans, observeYDocSlides, ooxmlGradientAngleToCssDegrees, openNativeEyeDropper, openPptxFile, openReadingView, openUrlInNewTab, paintedStrokeWidth, paragraphsToSegments, parseDrawingColor, parseDrawingColorOpacity, parsePanoseString, parsePpactionUrl, parseSegmentsFromRichEditor, partitionTemplateElements, pickSupportedMimeType, pieceLetterSpacing, placeAudienceWindow, placeCaretAtEnd, playSlideTransitionPreview, polygonsToSvgPath, pptxActionToElementAction, preprocessCssForCapture, presentationBaseName, presentationInkPath, presenterElapsed, presenterNextDisabled, presenterPaneAdvancesOnClick, presenterPrevDisabled, presenterTimerProgress, pressuresToWidths, previousShowSlideIndex, printPropertiesFrameSlides, printPropertiesSlidesPerPage, probeAutosaveRecovery, projectDrawingShapes, promoteSmartArtNode, publishLiveGeometry, publishLiveInlineText, quickStyleSwatchCss, reResolveSlideColors, readBackstageRecentFile, readRibbonTransitionDraft, readSlideShowOption, readSlidesFromYDoc, readStoredViewerPrefs, readViewportMetrics, readingViewFitScale, rebuildDrawingShapesIfCleared, rebuildTableStructureInRawXml, reconcileSlidesInYDoc, recordProgressPercent, rectToCells, registerCollaborationTeardown, registerCustomFont, registerPersistentAudio, remapTextToSegments, rememberSessionDeck, removeChartCategory, removeChartSeries, removeLastTableElementColumn, removeLastTableElementRow, removeQuickAccessCommand, removeSmartArtNode, removeTableElementColumn, removeTableElementRow, renameSection, reorderSmartArtNode, replaceMasterViewElements, rerouteConnectorsForMovedElements, resetPresenterTimer, resetSlideLayoutPath, resolveActionType, resolveAudienceScreenPlacement, resolveAuthoredCustomShowId, resolveAutoAdvanceDelayMs, resolveAutoFitFontScale, resolveAutosaveActivation, resolveAutosaveIntervalMs, resolveAutosaveIntervalSeconds, resolveChartKind, resolveConnectorEndpointUpdate, resolveDefaultFontFamily, resolveDrawingShapeNodeId, resolveElementActionAffordance, resolveElementInteractivity, resolveFontForScript, resolveGroupChildFill, resolveInkColor, resolveInkOpacity, resolveInkWidth, resolveMetricTrackingPx, resolveOleType, resolvePalette, resolveProfileInitial, resolveSelectionPaneRename, resolveShapeGeometry, resolveShowSlideIndexes, resolveSlideSizeSelection, resolveThemeCatalogEntry, resolveTitleBarStatusKey, resolveTransitionDurationMs, resolveTransportForServerUrl, resolveViewerAddinRows, restoreSegmentSelection, restoreSessionDeck, revealedSmartArtNodeCount, ribbonTransitionUpdates, rulerDragToGuidePosition, runMediaCommand, runPresentationAction, safeOpenUrl, sanitizeColor, sanitizeDownloadFilename, sanitizeGradientStops, sanitizeMathMl, saveAutosaveSnapshot, saveDeckWithPassword, saveViewerProfile, savedPresentationFileName, scanAvailableFontFamilies, schemaLabel, scopeLayoutOptionsToSlide, segmentByScript, segmentFrameCount, segmentsToEditorHtml, segmentsToParagraphs, segmentsToPlainText, sendBackward, sendToBack, setCachedResult, setCellText, setChartAxisGridlineStyle, setChartAxisLogScale, setChartAxisTitleStyle, setChartCategoryLabel, setChartCellValue, setChartDataPointExplosion, setChartDataPointFill, setChartDataPointLabel, setChartDataPointMarker, setChartSeriesChartType, setChartSeriesMarker, setDuotoneCachedResult, setMasterViewBackgroundColor, setMotionPath, setMotionPathEnd, setPendingSelectionRestore, setSmartArtNodeStyle, setTableElementCellText, shapeFillChange, shapeOutlineChange, shouldAutoFollowBroadcaster, shouldCommitSmartArtNodeText, shouldConfirmExternalHyperlink, shouldLoopContinuously, shouldProbeAutosaveRecovery, shouldShowAutosaveRecoveryPrompt, shouldUseSvgWarp, shouldWriteAutosaveSnapshot, slideProgressPercent, slideShowOptionChange, slideSizeFromPreset, slideSizeToCanvasPx, slideStatusLabel, snapBoxToGrid, splitCell, splitRunForMetrics, stepPresenterZoom, stopAllPersistentAudio, storeAudienceContent, strokeOutlineViewBox, styleShadowFilter, substituteFieldText, svgGradientFillRef, svgLineCap, svgPathToPolygons, swapPresentationWindows, switchSmartArtLayout, tableCellCss, tableContainerCss, templateSchemeFromTheme, text3dEmuToPt, text3dPtToEmu, textBuildSpanStyle, themeColorLabel, themeColorSchemesEqual, themeToCssVars, toCssTextOrientation, toCssVerticalDirection, toCssWritingMode, toSlideIndex, toggleBlackboard, togglePresenterTimer, toggleText3dExtrusion, transformTextCase, ungroupElements, updateCellTextInRawXml, updateCellTextStyleInRawXml, updateMasterViewElement, updateMergeAttrsInRawXml, updateSmartArtNodeText, updateTagInCollections, validateRoomId, vermilionDarkColors, vermilionDarkTheme, vermilionLightColors, vermilionLightTheme, vermilionRadius, viewerOptionsToPreferences, warpPreviewPath, withChartPointValue, withChartTitle, withConnectorEndpointUpdate, withFrameSlides, withSlideSizeOrientation, withSlidesPerPage, writeStoredViewerPrefs };