pptx-react-viewer 4.76.0 → 4.77.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (96) hide show
  1. package/CHANGELOG.md +16 -0
  2. package/dist/{AiChatPanel-6ML3VLIX.mjs → AiChatPanel-7BPX44IR.mjs} +1 -1
  3. package/dist/AiChatPanel-7BPX44IR.mjs.br +0 -0
  4. package/dist/AiChatPanel-7BPX44IR.mjs.gz +0 -0
  5. package/dist/{AiChatPanel-4V7QB5Z3.js → AiChatPanel-YJ5R7PPW.js} +19 -19
  6. package/dist/AiChatPanel-YJ5R7PPW.js.br +0 -0
  7. package/dist/AiChatPanel-YJ5R7PPW.js.gz +0 -0
  8. package/dist/ai.js +2 -2
  9. package/dist/ai.js.br +2 -3
  10. package/dist/ai.js.gz +0 -0
  11. package/dist/ai.mjs +1 -1
  12. package/dist/ai.mjs.br +0 -0
  13. package/dist/ai.mjs.gz +0 -0
  14. package/dist/{chunk-P2IEKYVG.js → chunk-3T5NEBOR.js} +2 -2
  15. package/dist/chunk-3T5NEBOR.js.br +0 -0
  16. package/dist/chunk-3T5NEBOR.js.gz +0 -0
  17. package/dist/{chunk-SEIVQGH5.js → chunk-5CJHRYFK.js} +252 -227
  18. package/dist/chunk-5CJHRYFK.js.br +0 -0
  19. package/dist/chunk-5CJHRYFK.js.gz +0 -0
  20. package/dist/{chunk-6GFSF2ML.js → chunk-AIA7CY5U.js} +4 -29
  21. package/dist/chunk-AIA7CY5U.js.br +0 -0
  22. package/dist/chunk-AIA7CY5U.js.gz +0 -0
  23. package/dist/{chunk-PPOGAZ53.mjs → chunk-I5WQFYAK.mjs} +50 -26
  24. package/dist/chunk-I5WQFYAK.mjs.br +0 -0
  25. package/dist/chunk-I5WQFYAK.mjs.gz +0 -0
  26. package/dist/{chunk-RMEWSJZU.mjs → chunk-J4NOGC3R.mjs} +1 -1
  27. package/dist/chunk-J4NOGC3R.mjs.br +0 -0
  28. package/dist/chunk-J4NOGC3R.mjs.gz +0 -0
  29. package/dist/{chunk-Y53EC3JU.mjs → chunk-JB37G6GW.mjs} +1 -1
  30. package/dist/chunk-JB37G6GW.mjs.br +0 -0
  31. package/dist/chunk-JB37G6GW.mjs.gz +0 -0
  32. package/dist/{chunk-OC4RP2CB.mjs → chunk-MMBLGDHD.mjs} +15 -36
  33. package/dist/chunk-MMBLGDHD.mjs.br +0 -0
  34. package/dist/chunk-MMBLGDHD.mjs.gz +0 -0
  35. package/dist/{chunk-N3YK2BCA.mjs → chunk-N6BJW23K.mjs} +5 -30
  36. package/dist/chunk-N6BJW23K.mjs.br +0 -0
  37. package/dist/chunk-N6BJW23K.mjs.gz +0 -0
  38. package/dist/{chunk-XTYBIJ2S.js → chunk-USEEERPE.js} +584 -605
  39. package/dist/chunk-USEEERPE.js.br +0 -0
  40. package/dist/chunk-USEEERPE.js.gz +0 -0
  41. package/dist/{chunk-MU3BIZ2U.js → chunk-VCNDY7HS.js} +1 -1
  42. package/dist/chunk-VCNDY7HS.js.br +0 -0
  43. package/dist/chunk-VCNDY7HS.js.gz +0 -0
  44. package/dist/index.d.ts +21 -14
  45. package/dist/index.js +29 -29
  46. package/dist/index.js.br +0 -0
  47. package/dist/index.js.gz +0 -0
  48. package/dist/index.mjs +5 -5
  49. package/dist/index.mjs.br +0 -0
  50. package/dist/index.mjs.gz +0 -0
  51. package/dist/internals.d.ts +14 -15
  52. package/dist/internals.js +82 -82
  53. package/dist/internals.js.br +0 -0
  54. package/dist/internals.js.gz +0 -0
  55. package/dist/internals.mjs +3 -3
  56. package/dist/internals.mjs.br +0 -0
  57. package/dist/internals.mjs.gz +0 -0
  58. package/dist/no-i18next.d.ts +21 -14
  59. package/dist/no-i18next.js +28 -28
  60. package/dist/no-i18next.js.br +0 -0
  61. package/dist/no-i18next.js.gz +0 -0
  62. package/dist/no-i18next.mjs +4 -4
  63. package/dist/no-i18next.mjs.br +0 -0
  64. package/dist/no-i18next.mjs.gz +0 -0
  65. package/dist/viewer/index.d.ts +7 -1
  66. package/dist/viewer/index.js +22 -22
  67. package/dist/viewer/index.js.br +0 -0
  68. package/dist/viewer/index.js.gz +0 -0
  69. package/dist/viewer/index.mjs +5 -5
  70. package/dist/viewer/index.mjs.br +0 -0
  71. package/dist/viewer/index.mjs.gz +0 -0
  72. package/package.json +2 -2
  73. package/dist/AiChatPanel-4V7QB5Z3.js.br +0 -0
  74. package/dist/AiChatPanel-4V7QB5Z3.js.gz +0 -0
  75. package/dist/AiChatPanel-6ML3VLIX.mjs.br +0 -0
  76. package/dist/AiChatPanel-6ML3VLIX.mjs.gz +0 -0
  77. package/dist/chunk-6GFSF2ML.js.br +0 -0
  78. package/dist/chunk-6GFSF2ML.js.gz +0 -0
  79. package/dist/chunk-MU3BIZ2U.js.br +0 -0
  80. package/dist/chunk-MU3BIZ2U.js.gz +0 -0
  81. package/dist/chunk-N3YK2BCA.mjs.br +0 -0
  82. package/dist/chunk-N3YK2BCA.mjs.gz +0 -0
  83. package/dist/chunk-OC4RP2CB.mjs.br +0 -0
  84. package/dist/chunk-OC4RP2CB.mjs.gz +0 -0
  85. package/dist/chunk-P2IEKYVG.js.br +0 -0
  86. package/dist/chunk-P2IEKYVG.js.gz +0 -0
  87. package/dist/chunk-PPOGAZ53.mjs.br +0 -0
  88. package/dist/chunk-PPOGAZ53.mjs.gz +0 -0
  89. package/dist/chunk-RMEWSJZU.mjs.br +0 -0
  90. package/dist/chunk-RMEWSJZU.mjs.gz +0 -0
  91. package/dist/chunk-SEIVQGH5.js.br +0 -0
  92. package/dist/chunk-SEIVQGH5.js.gz +0 -0
  93. package/dist/chunk-XTYBIJ2S.js.br +0 -0
  94. package/dist/chunk-XTYBIJ2S.js.gz +0 -0
  95. package/dist/chunk-Y53EC3JU.mjs.br +0 -0
  96. package/dist/chunk-Y53EC3JU.mjs.gz +0 -0
@@ -1,6 +1,6 @@
1
1
  'use strict';
2
2
 
3
- var chunk6GFSF2ML_js = require('./chunk-6GFSF2ML.js');
3
+ var chunkAIA7CY5U_js = require('./chunk-AIA7CY5U.js');
4
4
  var pptx = require('ooxml-ui/pptx');
5
5
  var React18 = require('react');
6
6
  var jsxRuntime = require('react/jsx-runtime');
@@ -604,9 +604,9 @@ function differsOnlyInMasterSet(previous, next) {
604
604
  }
605
605
  function recordExplicitSlideUpdate(history, previous, before, label) {
606
606
  if (previous && serializeHistoryDocument(previous) !== serializeHistoryDocument(before)) {
607
- history.record(chunk6GFSF2ML_js.cloneHistorySnapshot(previous), previous.actionLabel);
607
+ history.record(chunkAIA7CY5U_js.cloneHistorySnapshot(previous), previous.actionLabel);
608
608
  }
609
- history.record({ ...chunk6GFSF2ML_js.cloneHistorySnapshot(before), actionLabel: label }, label);
609
+ history.record({ ...chunkAIA7CY5U_js.cloneHistorySnapshot(before), actionLabel: label }, label);
610
610
  }
611
611
  var POLL_INTERVAL_MS = 16;
612
612
  function usePointerReleaseWakeup(hasActivePointerInteraction) {
@@ -688,8 +688,8 @@ function useEditorHistory(input) {
688
688
  width: canvasSize.width,
689
689
  height: canvasSize.height,
690
690
  activeSlideIndex,
691
- slides: slides.map(chunk6GFSF2ML_js.cloneSlide),
692
- templateElementsBySlideId: chunk6GFSF2ML_js.cloneTemplateElementsBySlideId(templateElementsBySlideId),
691
+ slides: slides.map(chunkAIA7CY5U_js.cloneSlide),
692
+ templateElementsBySlideId: chunkAIA7CY5U_js.cloneTemplateElementsBySlideId(templateElementsBySlideId),
693
693
  ...recordedTheme ? { theme: recordedTheme } : {},
694
694
  ...actionLabel ? { actionLabel } : {}
695
695
  };
@@ -703,9 +703,9 @@ function useEditorHistory(input) {
703
703
  width: snapshot.width,
704
704
  height: snapshot.height
705
705
  });
706
- setSlides(snapshot.slides.map(chunk6GFSF2ML_js.cloneSlide));
706
+ setSlides(snapshot.slides.map(chunkAIA7CY5U_js.cloneSlide));
707
707
  setTemplateElementsBySlideId(
708
- chunk6GFSF2ML_js.cloneTemplateElementsBySlideId(snapshot.templateElementsBySlideId)
708
+ chunkAIA7CY5U_js.cloneTemplateElementsBySlideId(snapshot.templateElementsBySlideId)
709
709
  );
710
710
  setActiveSlideIndex(Math.min(snapshot.activeSlideIndex, maxSlideIndex));
711
711
  setSelectedElementIds([]);
@@ -771,8 +771,8 @@ function useEditorHistory(input) {
771
771
  return;
772
772
  }
773
773
  isApplyingHistoryRef.current = true;
774
- const nextSnapshot = chunk6GFSF2ML_js.cloneHistorySnapshot(result.snapshot);
775
- lastHistorySnapshotRef.current = chunk6GFSF2ML_js.cloneHistorySnapshot(nextSnapshot);
774
+ const nextSnapshot = chunkAIA7CY5U_js.cloneHistorySnapshot(result.snapshot);
775
+ lastHistorySnapshotRef.current = chunkAIA7CY5U_js.cloneHistorySnapshot(nextSnapshot);
776
776
  lastHistorySerializedRef.current = serializeHistoryDocument(nextSnapshot);
777
777
  applyHistorySnapshot(nextSnapshot);
778
778
  restoreTheme(currentSnapshot, nextSnapshot);
@@ -796,8 +796,8 @@ function useEditorHistory(input) {
796
796
  return;
797
797
  }
798
798
  isApplyingHistoryRef.current = true;
799
- const targetSnapshot = chunk6GFSF2ML_js.cloneHistorySnapshot(result.snapshot);
800
- lastHistorySnapshotRef.current = chunk6GFSF2ML_js.cloneHistorySnapshot(targetSnapshot);
799
+ const targetSnapshot = chunkAIA7CY5U_js.cloneHistorySnapshot(result.snapshot);
800
+ lastHistorySnapshotRef.current = chunkAIA7CY5U_js.cloneHistorySnapshot(targetSnapshot);
801
801
  lastHistorySerializedRef.current = serializeHistoryDocument(targetSnapshot);
802
802
  applyHistorySnapshot(targetSnapshot);
803
803
  restoreTheme(currentSnapshot, targetSnapshot);
@@ -815,7 +815,7 @@ function useEditorHistory(input) {
815
815
  (initialSnapshot) => {
816
816
  history.clear();
817
817
  if (initialSnapshot) {
818
- const clonedInitial = chunk6GFSF2ML_js.cloneHistorySnapshot(initialSnapshot);
818
+ const clonedInitial = chunkAIA7CY5U_js.cloneHistorySnapshot(initialSnapshot);
819
819
  lastHistorySnapshotRef.current = clonedInitial;
820
820
  lastHistorySerializedRef.current = serializeHistoryDocument(clonedInitial);
821
821
  } else {
@@ -889,16 +889,16 @@ function useEditorHistory(input) {
889
889
  slides
890
890
  ]);
891
891
  const commitSlides = (nextSlides, label, beforeSlides = slides, nextSlideMasters) => {
892
- const before = { ...buildHistorySnapshot(), slides: beforeSlides.map(chunk6GFSF2ML_js.cloneSlide) };
892
+ const before = { ...buildHistorySnapshot(), slides: beforeSlides.map(chunkAIA7CY5U_js.cloneSlide) };
893
893
  const { theme: beforeTheme, ...unthemed } = before;
894
894
  const afterTheme = nextSlideMasters ? pptx.historyTheme(theme, nextSlideMasters) : beforeTheme;
895
895
  const after = {
896
896
  ...unthemed,
897
- slides: nextSlides.map(chunk6GFSF2ML_js.cloneSlide),
897
+ slides: nextSlides.map(chunkAIA7CY5U_js.cloneSlide),
898
898
  ...afterTheme ? { theme: afterTheme } : {}
899
899
  };
900
900
  recordExplicitSlideUpdate(history, lastHistorySnapshotRef.current, before, label);
901
- lastHistorySnapshotRef.current = chunk6GFSF2ML_js.cloneHistorySnapshot(after);
901
+ lastHistorySnapshotRef.current = chunkAIA7CY5U_js.cloneHistorySnapshot(after);
902
902
  lastHistorySerializedRef.current = serializeHistoryDocument(after);
903
903
  isApplyingHistoryRef.current = false;
904
904
  setSlides(nextSlides);
@@ -1093,22 +1093,22 @@ function useZoomViewport({
1093
1093
  selectedElements.forEach((element) => {
1094
1094
  minX = Math.min(minX, element.x);
1095
1095
  minY = Math.min(minY, element.y);
1096
- maxX = Math.max(maxX, element.x + Math.max(element.width, chunk6GFSF2ML_js.MIN_ELEMENT_SIZE));
1097
- maxY = Math.max(maxY, element.y + Math.max(element.height, chunk6GFSF2ML_js.MIN_ELEMENT_SIZE));
1096
+ maxX = Math.max(maxX, element.x + Math.max(element.width, chunkAIA7CY5U_js.MIN_ELEMENT_SIZE));
1097
+ maxY = Math.max(maxY, element.y + Math.max(element.height, chunkAIA7CY5U_js.MIN_ELEMENT_SIZE));
1098
1098
  });
1099
1099
  if (!Number.isFinite(minX) || !Number.isFinite(minY) || !Number.isFinite(maxX) || !Number.isFinite(maxY)) {
1100
1100
  return;
1101
1101
  }
1102
1102
  const selectionBounds = { minX, minY, maxX, maxY };
1103
- const boundsWidth = Math.max(selectionBounds.maxX - selectionBounds.minX, chunk6GFSF2ML_js.MIN_ELEMENT_SIZE);
1104
- const boundsHeight = Math.max(selectionBounds.maxY - selectionBounds.minY, chunk6GFSF2ML_js.MIN_ELEMENT_SIZE);
1103
+ const boundsWidth = Math.max(selectionBounds.maxX - selectionBounds.minX, chunkAIA7CY5U_js.MIN_ELEMENT_SIZE);
1104
+ const boundsHeight = Math.max(selectionBounds.maxY - selectionBounds.minY, chunkAIA7CY5U_js.MIN_ELEMENT_SIZE);
1105
1105
  const availableWidth = Math.max(
1106
- effectiveEditorDimensions.width - chunk6GFSF2ML_js.ZOOM_TO_SELECTION_PADDING,
1107
- chunk6GFSF2ML_js.MIN_ELEMENT_SIZE
1106
+ effectiveEditorDimensions.width - chunkAIA7CY5U_js.ZOOM_TO_SELECTION_PADDING,
1107
+ chunkAIA7CY5U_js.MIN_ELEMENT_SIZE
1108
1108
  );
1109
1109
  const availableHeight = Math.max(
1110
- effectiveEditorDimensions.height - chunk6GFSF2ML_js.ZOOM_TO_SELECTION_PADDING,
1111
- chunk6GFSF2ML_js.MIN_ELEMENT_SIZE
1110
+ effectiveEditorDimensions.height - chunkAIA7CY5U_js.ZOOM_TO_SELECTION_PADDING,
1111
+ chunkAIA7CY5U_js.MIN_ELEMENT_SIZE
1112
1112
  );
1113
1113
  const targetEditorScale = Math.min(
1114
1114
  availableWidth / boundsWidth,
@@ -4026,8 +4026,8 @@ function useViewerCoreState(_input) {
4026
4026
  const { slides, setSlides, slidesRef } = useSlideState();
4027
4027
  const [templateElementsBySlideId, setTemplateElementsBySlideId] = React18.useState({});
4028
4028
  const [canvasSize, setCanvasSize] = React18.useState({
4029
- width: chunk6GFSF2ML_js.DEFAULT_CANVAS_WIDTH,
4030
- height: chunk6GFSF2ML_js.DEFAULT_CANVAS_HEIGHT
4029
+ width: chunkAIA7CY5U_js.DEFAULT_CANVAS_WIDTH,
4030
+ height: chunkAIA7CY5U_js.DEFAULT_CANVAS_HEIGHT
4031
4031
  });
4032
4032
  const [slideSizeEmu, setSlideSizeEmu] = React18.useState();
4033
4033
  const [activeSlideIndex, setActiveSlideIndex] = React18.useState(0);
@@ -4517,7 +4517,7 @@ function useLoadContent({
4517
4517
  limitsRef.current = limits;
4518
4518
  const googleFontsRef = React18.useRef(googleFonts);
4519
4519
  googleFontsRef.current = googleFonts;
4520
- const { t } = chunk6GFSF2ML_js.useTranslation();
4520
+ const { t } = chunkAIA7CY5U_js.useTranslation();
4521
4521
  const translateRef = React18.useRef(t);
4522
4522
  translateRef.current = t;
4523
4523
  const originalBufferRef = React18.useRef(null);
@@ -4554,7 +4554,7 @@ function useLoadContent({
4554
4554
  webfonts = pptx.prepareDeckWebfonts({
4555
4555
  document,
4556
4556
  linkId: GOOGLE_FONTS_LINK_ID,
4557
- slides: chunk6GFSF2ML_js.partitionTemplateElements(deckSlides).slides,
4557
+ slides: chunkAIA7CY5U_js.partitionTemplateElements(deckSlides).slides,
4558
4558
  embeddedFonts: deckEmbeddedFonts,
4559
4559
  googleFontsBase: pptx.resolveGoogleFontsCss2Base(googleFontsRef.current),
4560
4560
  onProgress: (progress) => {
@@ -4633,7 +4633,7 @@ function useLoadContent({
4633
4633
  nextSlides,
4634
4634
  (path) => handler.getImageData(path)
4635
4635
  );
4636
- const partition = chunk6GFSF2ML_js.partitionTemplateElements(nextSlides);
4636
+ const partition = chunkAIA7CY5U_js.partitionTemplateElements(nextSlides);
4637
4637
  await webfonts;
4638
4638
  if (cancelled || token !== renderTokenRef.current) {
4639
4639
  return;
@@ -4653,8 +4653,8 @@ function useLoadContent({
4653
4653
  setSlides(partition.slides);
4654
4654
  setTemplateElementsBySlideId(partition.templateElementsBySlideId);
4655
4655
  setCanvasSize({
4656
- width: parsed.width ?? chunk6GFSF2ML_js.DEFAULT_CANVAS_WIDTH,
4657
- height: parsed.height ?? chunk6GFSF2ML_js.DEFAULT_CANVAS_HEIGHT
4656
+ width: parsed.width ?? chunkAIA7CY5U_js.DEFAULT_CANVAS_WIDTH,
4657
+ height: parsed.height ?? chunkAIA7CY5U_js.DEFAULT_CANVAS_HEIGHT
4658
4658
  });
4659
4659
  setSlideSizeEmu(
4660
4660
  typeof parsed.widthEmu === "number" && typeof parsed.heightEmu === "number" && parsed.widthEmu > 0 && parsed.heightEmu > 0 ? {
@@ -5071,7 +5071,7 @@ function useElementOperations(input) {
5071
5071
  );
5072
5072
  return;
5073
5073
  }
5074
- if (chunk6GFSF2ML_js.isTemplateElementId(elementId)) {
5074
+ if (chunkAIA7CY5U_js.isTemplateElementId(elementId)) {
5075
5075
  const slideId = activeSlide?.id;
5076
5076
  if (slideId) {
5077
5077
  setTemplateElementsBySlideId((prev) => ({
@@ -5358,8 +5358,8 @@ function createCanvasGestures(getInput, frames = animationFrames) {
5358
5358
  }
5359
5359
  function paintResize(resize, transform) {
5360
5360
  const { x, y } = transform;
5361
- const width = Math.max(transform.width, chunk6GFSF2ML_js.MIN_ELEMENT_SIZE);
5362
- const height = Math.max(transform.height, chunk6GFSF2ML_js.MIN_ELEMENT_SIZE);
5361
+ const width = Math.max(transform.width, chunkAIA7CY5U_js.MIN_ELEMENT_SIZE);
5362
+ const height = Math.max(transform.height, chunkAIA7CY5U_js.MIN_ELEMENT_SIZE);
5363
5363
  resize.lastX = x;
5364
5364
  resize.lastY = y;
5365
5365
  resize.lastWidth = transform.width;
@@ -5416,7 +5416,7 @@ function createCanvasGestures(getInput, frames = animationFrames) {
5416
5416
  getGridSize: () => getInput().gridSpacingPx,
5417
5417
  getSnapToShape: () => getInput().snapToShape,
5418
5418
  getGuides: () => getInput().guides.map(({ axis, position }) => ({ axis, position })),
5419
- getMinSize: () => chunk6GFSF2ML_js.MIN_ELEMENT_SIZE,
5419
+ getMinSize: () => chunkAIA7CY5U_js.MIN_ELEMENT_SIZE,
5420
5420
  getSnapExcludeIds: () => armed?.kind === "move" ? Object.keys(armed.drag.startPositionsById) : [],
5421
5421
  getStageOrigin: () => {
5422
5422
  const rect = getInput().canvasStageRef.current?.getBoundingClientRect();
@@ -5497,7 +5497,7 @@ function commitMove(input, drag) {
5497
5497
  const start = drag.startPositionsById[el.id];
5498
5498
  return start ? { ...el, x: start.x + dx, y: start.y + dy } : el;
5499
5499
  });
5500
- return chunk6GFSF2ML_js.applyReroutedConnectors(moved, chunk6GFSF2ML_js.rerouteConnectorsForMovedElements(moved, movedIds));
5500
+ return chunkAIA7CY5U_js.applyReroutedConnectors(moved, chunkAIA7CY5U_js.rerouteConnectorsForMovedElements(moved, movedIds));
5501
5501
  };
5502
5502
  if (input.editTemplateMode) {
5503
5503
  const slideId = input.activeSlide?.id;
@@ -5528,8 +5528,8 @@ function commitResize(input, resize) {
5528
5528
  if (i !== input.activeSlideIndex) {
5529
5529
  return s;
5530
5530
  }
5531
- const rerouted = chunk6GFSF2ML_js.rerouteConnectorsForMovedElements(s.elements, movedIds);
5532
- return rerouted.length === 0 ? s : { ...s, elements: chunk6GFSF2ML_js.applyReroutedConnectors(s.elements, rerouted) };
5531
+ const rerouted = chunkAIA7CY5U_js.rerouteConnectorsForMovedElements(s.elements, movedIds);
5532
+ return rerouted.length === 0 ? s : { ...s, elements: chunkAIA7CY5U_js.applyReroutedConnectors(s.elements, rerouted) };
5533
5533
  })
5534
5534
  );
5535
5535
  }
@@ -6275,7 +6275,7 @@ function createStructuredElementHandlers(deps) {
6275
6275
  return pptx.buildingBlockFailure("no-selection");
6276
6276
  }
6277
6277
  const resolved = pptx.resolveHyperlinkEditResult(data);
6278
- if (resolved.url && !chunk6GFSF2ML_js.isUrlSafe(resolved.url)) {
6278
+ if (resolved.url && !chunkAIA7CY5U_js.isUrlSafe(resolved.url)) {
6279
6279
  return pptx.buildingBlockFailure("unsafe-url");
6280
6280
  }
6281
6281
  const actionClick = {
@@ -6337,7 +6337,7 @@ function createStructuredElementHandlers(deps) {
6337
6337
  if (!activeSlide) {
6338
6338
  return;
6339
6339
  }
6340
- const preset = chunk6GFSF2ML_js.ACTION_BUTTON_PRESETS.find((p) => p.shapeType === shapeType);
6340
+ const preset = chunkAIA7CY5U_js.ACTION_BUTTON_PRESETS.find((p) => p.shapeType === shapeType);
6341
6341
  if (!preset) {
6342
6342
  return;
6343
6343
  }
@@ -6426,7 +6426,7 @@ function useInsertElements(input) {
6426
6426
  width: 300,
6427
6427
  height: 60,
6428
6428
  text: "",
6429
- textStyle: { fontSize: chunk6GFSF2ML_js.DEFAULT_TEXT_FONT_SIZE }
6429
+ textStyle: { fontSize: chunkAIA7CY5U_js.DEFAULT_TEXT_FONT_SIZE }
6430
6430
  });
6431
6431
  };
6432
6432
  const handleAddShape = () => {
@@ -6448,7 +6448,7 @@ function useInsertElements(input) {
6448
6448
  }
6449
6449
  });
6450
6450
  };
6451
- const handleAddTable = (rows = chunk6GFSF2ML_js.DEFAULT_TABLE_ROWS, columns = chunk6GFSF2ML_js.DEFAULT_TABLE_COLUMNS) => {
6451
+ const handleAddTable = (rows = chunkAIA7CY5U_js.DEFAULT_TABLE_ROWS, columns = chunkAIA7CY5U_js.DEFAULT_TABLE_COLUMNS) => {
6452
6452
  if (!activeSlide) {
6453
6453
  return;
6454
6454
  }
@@ -6622,7 +6622,7 @@ function useGroupAlignLayerHandlers(input) {
6622
6622
  history
6623
6623
  } = input;
6624
6624
  const updateElementsOwning = (elementId, updater) => {
6625
- if (editTemplateMode && !chunk6GFSF2ML_js.isTemplateElementId(elementId)) {
6625
+ if (editTemplateMode && !chunkAIA7CY5U_js.isTemplateElementId(elementId)) {
6626
6626
  ops.updateSlides(
6627
6627
  (prev) => prev.map(
6628
6628
  (slide, index) => index === activeSlideIndex ? { ...slide, elements: updater(slide.elements) } : slide
@@ -6656,9 +6656,9 @@ function useGroupAlignLayerHandlers(input) {
6656
6656
  return;
6657
6657
  }
6658
6658
  const group = selectedElement;
6659
- const intoTemplate = chunk6GFSF2ML_js.isTemplateElementId(group.id);
6659
+ const intoTemplate = chunkAIA7CY5U_js.isTemplateElementId(group.id);
6660
6660
  const childIds = group.children.map(
6661
- (child) => intoTemplate ? chunk6GFSF2ML_js.makeCloneId(true, child.id || group.id) : child.id || pptx.generateElementId()
6661
+ (child) => intoTemplate ? chunkAIA7CY5U_js.makeCloneId(true, child.id || group.id) : child.id || pptx.generateElementId()
6662
6662
  );
6663
6663
  const { elements, childIds: usedIds } = pptx.ungroupElements(
6664
6664
  ops.activeElements,
@@ -7094,7 +7094,7 @@ function createTableMergeHandlers(input) {
7094
7094
  if (!nextCell || nextCell.hMerge || nextCell.vMerge) {
7095
7095
  return;
7096
7096
  }
7097
- const newTableData = chunk6GFSF2ML_js.mergeCells(
7097
+ const newTableData = chunkAIA7CY5U_js.mergeCells(
7098
7098
  [
7099
7099
  { row: rowIndex, col: columnIndex },
7100
7100
  { row: rowIndex, col: nextColIdx }
@@ -7102,7 +7102,7 @@ function createTableMergeHandlers(input) {
7102
7102
  td
7103
7103
  );
7104
7104
  const updates = { tableData: newTableData };
7105
- const newRawXml = chunk6GFSF2ML_js.updateMergeAttrsInRawXml(selectedElement, newTableData);
7105
+ const newRawXml = chunkAIA7CY5U_js.updateMergeAttrsInRawXml(selectedElement, newTableData);
7106
7106
  if (newRawXml) {
7107
7107
  updates.rawXml = newRawXml;
7108
7108
  }
@@ -7128,7 +7128,7 @@ function createTableMergeHandlers(input) {
7128
7128
  if (!targetNextCell || targetNextCell.hMerge || targetNextCell.vMerge) {
7129
7129
  return;
7130
7130
  }
7131
- const newTableData = chunk6GFSF2ML_js.mergeCells(
7131
+ const newTableData = chunkAIA7CY5U_js.mergeCells(
7132
7132
  [
7133
7133
  { row: rowIndex, col: columnIndex },
7134
7134
  { row: targetNextRowIdx, col: columnIndex }
@@ -7136,7 +7136,7 @@ function createTableMergeHandlers(input) {
7136
7136
  td
7137
7137
  );
7138
7138
  const updates = { tableData: newTableData };
7139
- const newRawXml = chunk6GFSF2ML_js.updateMergeAttrsInRawXml(selectedElement, newTableData);
7139
+ const newRawXml = chunkAIA7CY5U_js.updateMergeAttrsInRawXml(selectedElement, newTableData);
7140
7140
  if (newRawXml) {
7141
7141
  updates.rawXml = newRawXml;
7142
7142
  }
@@ -7151,9 +7151,9 @@ function createTableMergeHandlers(input) {
7151
7151
  return;
7152
7152
  }
7153
7153
  const td = selectedElement.tableData;
7154
- const newTableData = chunk6GFSF2ML_js.mergeCells(ts.selectedCells, td);
7154
+ const newTableData = chunkAIA7CY5U_js.mergeCells(ts.selectedCells, td);
7155
7155
  const updates = { tableData: newTableData };
7156
- const newRawXml = chunk6GFSF2ML_js.updateMergeAttrsInRawXml(selectedElement, newTableData);
7156
+ const newRawXml = chunkAIA7CY5U_js.updateMergeAttrsInRawXml(selectedElement, newTableData);
7157
7157
  if (newRawXml) {
7158
7158
  updates.rawXml = newRawXml;
7159
7159
  }
@@ -7170,9 +7170,9 @@ function createTableMergeHandlers(input) {
7170
7170
  }
7171
7171
  const { rowIndex, columnIndex } = ts;
7172
7172
  const td = selectedElement.tableData;
7173
- const newTableData = chunk6GFSF2ML_js.splitCell(rowIndex, columnIndex, td);
7173
+ const newTableData = chunkAIA7CY5U_js.splitCell(rowIndex, columnIndex, td);
7174
7174
  const updates = { tableData: newTableData };
7175
- const newRawXml = chunk6GFSF2ML_js.updateMergeAttrsInRawXml(selectedElement, newTableData);
7175
+ const newRawXml = chunkAIA7CY5U_js.updateMergeAttrsInRawXml(selectedElement, newTableData);
7176
7176
  if (newRawXml) {
7177
7177
  updates.rawXml = newRawXml;
7178
7178
  }
@@ -7207,7 +7207,7 @@ function createTableStructHandlers(input) {
7207
7207
  updates.tableData = pptx.setCellText(el, rowIndex, colIndex, text).tableData;
7208
7208
  }
7209
7209
  if (el.rawXml) {
7210
- const newRawXml = chunk6GFSF2ML_js.updateCellTextInRawXml(el, rowIndex, colIndex, text);
7210
+ const newRawXml = chunkAIA7CY5U_js.updateCellTextInRawXml(el, rowIndex, colIndex, text);
7211
7211
  if (newRawXml) {
7212
7212
  updates.rawXml = newRawXml;
7213
7213
  }
@@ -7231,7 +7231,7 @@ function createTableStructHandlers(input) {
7231
7231
  const { rowIndex, columnIndex: colIndex } = ts;
7232
7232
  const updates = {};
7233
7233
  if (selectedElement.rawXml) {
7234
- const newRawXml = chunk6GFSF2ML_js.updateCellTextStyleInRawXml(
7234
+ const newRawXml = chunkAIA7CY5U_js.updateCellTextStyleInRawXml(
7235
7235
  selectedElement,
7236
7236
  rowIndex,
7237
7237
  colIndex,
@@ -7409,7 +7409,7 @@ function useExportSaveAs(input) {
7409
7409
  const sourceName = filePath ? filePath.replace(/\\/gu, "/").split("/").pop() : void 0;
7410
7410
  const slideSize = pptx.resolveSlideSizeSelection({ current: slideSizeEmu, canvas: canvasSize }).size;
7411
7411
  const data = {
7412
- slides: chunk6GFSF2ML_js.buildSaveSlides(slides, templateElementsBySlideId),
7412
+ slides: chunkAIA7CY5U_js.buildSaveSlides(slides, templateElementsBySlideId),
7413
7413
  width: canvasSize.width,
7414
7414
  height: canvasSize.height,
7415
7415
  widthEmu: slideSize.widthEmu,
@@ -7572,7 +7572,7 @@ async function captureSlidesAsPngDataUrls(slideStageRef, slideIndices, setActive
7572
7572
  }
7573
7573
  function tilesToPdfPage(tilesResult) {
7574
7574
  return tilesResult.tiles.map((tile) => ({
7575
- image: chunk6GFSF2ML_js.canvasToJpegData(tile.canvas),
7575
+ image: chunkAIA7CY5U_js.canvasToJpegData(tile.canvas),
7576
7576
  placement: pptx.placeTileOnPage(
7577
7577
  tile,
7578
7578
  tilesResult.fullWidth,
@@ -7605,7 +7605,7 @@ async function exportAllSlidesAsPdf(slideStageRef, totalSlides, setActiveSlide,
7605
7605
  if (pages.length === 0) {
7606
7606
  throw new Error(i18n.translationsEn["pptx.export.errorNoSlidesPdf"]);
7607
7607
  }
7608
- const pdfBlobUrl = chunk6GFSF2ML_js.buildPdfFromTiledImageData(pages);
7608
+ const pdfBlobUrl = chunkAIA7CY5U_js.buildPdfFromTiledImageData(pages);
7609
7609
  pptx.downloadDataUrl(pdfBlobUrl, filename);
7610
7610
  }
7611
7611
  async function exportAllSlidesAsNotesPdf(slideStageRef, totalSlides, setActiveSlide, currentSlideIndex, slideNotes, filename = "presentation-notes.pdf", options = {}) {
@@ -7635,7 +7635,7 @@ async function exportAllSlidesAsNotesPdf(slideStageRef, totalSlides, setActiveSl
7635
7635
  if (pages.length === 0) {
7636
7636
  throw new Error(i18n.translationsEn["pptx.export.errorNoSlidesNotesPdf"]);
7637
7637
  }
7638
- const pdfDataUrl = chunk6GFSF2ML_js.buildNotesPdf(pages);
7638
+ const pdfDataUrl = chunkAIA7CY5U_js.buildNotesPdf(pages);
7639
7639
  pptx.downloadDataUrl(pdfDataUrl, filename);
7640
7640
  }
7641
7641
  async function exportAllSlidesAsVideo(slideStageRef, totalSlides, setActiveSlide, currentSlideIndex, options = {}) {
@@ -8213,13 +8213,13 @@ function usePrintHandlers(input) {
8213
8213
  const { slides, activeSlideIndex, canvasStageRef, setActiveSlideIndex, canvasSize } = input;
8214
8214
  const handoutMaster = input.handoutMaster ?? input.pptxData?.handoutMaster;
8215
8215
  const [isPrintDialogOpen, setIsPrintDialogOpen] = React18.useState(false);
8216
- const { t } = chunk6GFSF2ML_js.useTranslation();
8216
+ const { t } = chunkAIA7CY5U_js.useTranslation();
8217
8217
  const viewerOptions = useViewerOptionsContext();
8218
8218
  const printRasterScale = (viewerOptions.advanced.printHighQuality ? 4 : 3) * pptx.resolveImageResolutionScale(viewerOptions);
8219
8219
  const handlePrint = () => {
8220
8220
  setIsPrintDialogOpen(true);
8221
8221
  };
8222
- const deckSlides = () => input.templateElementsBySlideId ? chunk6GFSF2ML_js.buildSaveSlides(slides, input.templateElementsBySlideId) : slides;
8222
+ const deckSlides = () => input.templateElementsBySlideId ? chunkAIA7CY5U_js.buildSaveSlides(slides, input.templateElementsBySlideId) : slides;
8223
8223
  const plan = (settings, deck) => pptx.planPrintJob(settings, {
8224
8224
  slides: deck,
8225
8225
  activeSlideIndex,
@@ -8634,7 +8634,7 @@ function usePropertyHandlers(input) {
8634
8634
  width: canvasSize.width,
8635
8635
  height: canvasSize.height
8636
8636
  };
8637
- setCompareResult(chunk6GFSF2ML_js.comparePresentation(cur, other));
8637
+ setCompareResult(chunkAIA7CY5U_js.comparePresentation(cur, other));
8638
8638
  setIsComparePanelOpen(true);
8639
8639
  } catch (err) {
8640
8640
  console.warn("Compare failed:", err);
@@ -8687,7 +8687,7 @@ function usePropertyHandlers(input) {
8687
8687
  };
8688
8688
  }
8689
8689
  function useDialogCustomShows(input) {
8690
- const { t } = chunk6GFSF2ML_js.useTranslation();
8690
+ const { t } = chunkAIA7CY5U_js.useTranslation();
8691
8691
  const {
8692
8692
  activeSlide,
8693
8693
  customShows,
@@ -9012,7 +9012,7 @@ function useViewerDialogs(input) {
9012
9012
  };
9013
9013
  }
9014
9014
  function computeGridSpacingPx(documentGridSpacing) {
9015
- return pptx.computeGridSpacingPx(documentGridSpacing, chunk6GFSF2ML_js.GRID_SIZE);
9015
+ return pptx.computeGridSpacingPx(documentGridSpacing, chunkAIA7CY5U_js.GRID_SIZE);
9016
9016
  }
9017
9017
  function computeVisibleSlideIndexes(slides, activeCustomShowId, customShows, presentationProperties) {
9018
9018
  const activeShow = activeCustomShowId ? customShows.find((show) => show.id === activeCustomShowId) : void 0;
@@ -9021,7 +9021,7 @@ function computeVisibleSlideIndexes(slides, activeCustomShowId, customShows, pre
9021
9021
  }
9022
9022
  function computeSlideSectionGroups(slides, sections) {
9023
9023
  return pptx.groupSlidesBySection(sections, slides).map((group) => ({
9024
- id: group.section?.id ?? (sections.length > 0 ? chunk6GFSF2ML_js.UNGROUPED_SECTION_ID : chunk6GFSF2ML_js.DEFAULT_SECTION_GROUP_ID),
9024
+ id: group.section?.id ?? (sections.length > 0 ? chunkAIA7CY5U_js.UNGROUPED_SECTION_ID : chunkAIA7CY5U_js.DEFAULT_SECTION_GROUP_ID),
9025
9025
  label: group.section?.name ?? (sections.length > 0 ? "Ungrouped Slides" : "Slides"),
9026
9026
  slideIndexes: group.slideIndexes,
9027
9027
  ...group.section?.color !== void 0 ? { color: group.section.color } : {},
@@ -9040,7 +9040,7 @@ function computeMasterPseudoSlide(mode, activeLayout, activeMaster) {
9040
9040
  });
9041
9041
  }
9042
9042
  function useDerivedSlideState(input) {
9043
- const { t } = chunk6GFSF2ML_js.useTranslation();
9043
+ const { t } = chunkAIA7CY5U_js.useTranslation();
9044
9044
  const {
9045
9045
  slides,
9046
9046
  sections,
@@ -9066,10 +9066,10 @@ function useDerivedSlideState(input) {
9066
9066
  );
9067
9067
  const slideSectionGroups = React18.useMemo(
9068
9068
  () => computeSlideSectionGroups(slides, sections).map((group) => {
9069
- if (group.id === chunk6GFSF2ML_js.UNGROUPED_SECTION_ID && group.label === "Ungrouped Slides") {
9069
+ if (group.id === chunkAIA7CY5U_js.UNGROUPED_SECTION_ID && group.label === "Ungrouped Slides") {
9070
9070
  return { ...group, label: t("pptx.slides.ungroupedSlides") };
9071
9071
  }
9072
- if (group.id === chunk6GFSF2ML_js.DEFAULT_SECTION_GROUP_ID && group.label === "Slides") {
9072
+ if (group.id === chunkAIA7CY5U_js.DEFAULT_SECTION_GROUP_ID && group.label === "Slides") {
9073
9073
  return { ...group, label: t("pptx.sections.slides") };
9074
9074
  }
9075
9075
  return group;
@@ -9176,7 +9176,7 @@ function useAnnotationHandlers(input) {
9176
9176
  if (nextMode === "present") {
9177
9177
  presentation.enterPresentMode();
9178
9178
  } else if (mode === "present" && annotations.hasAnyAnnotations) {
9179
- chunk6GFSF2ML_js.stopAllPersistentAudio();
9179
+ chunkAIA7CY5U_js.stopAllPersistentAudio();
9180
9180
  if (promptKeepInkAnnotations) {
9181
9181
  pendingModeAfterAnnotationsRef.current = nextMode;
9182
9182
  setShowKeepAnnotationsDialog(true);
@@ -9186,7 +9186,7 @@ function useAnnotationHandlers(input) {
9186
9186
  }
9187
9187
  } else {
9188
9188
  if (mode === "present") {
9189
- chunk6GFSF2ML_js.stopAllPersistentAudio();
9189
+ chunkAIA7CY5U_js.stopAllPersistentAudio();
9190
9190
  }
9191
9191
  setMode(nextMode);
9192
9192
  }
@@ -9354,7 +9354,7 @@ function useSerialize(input) {
9354
9354
  guides: pptxGuides.length > 0 ? pptxGuides : void 0
9355
9355
  };
9356
9356
  });
9357
- const slidesToSave = chunk6GFSF2ML_js.buildSaveSlides(slidesWithGuides, pending.templateElementsBySlideId);
9357
+ const slidesToSave = chunkAIA7CY5U_js.buildSaveSlides(slidesWithGuides, pending.templateElementsBySlideId);
9358
9358
  const saveOptions = pptx.buildDeckSaveOptions({
9359
9359
  // Without this the Slide Size card edited a viewer-only pixel value and
9360
9360
  // the saved `p:sldSz` never moved: passing `slideSize` is the only way a
@@ -9499,7 +9499,7 @@ function usePresentationSetup(input) {
9499
9499
  return;
9500
9500
  }
9501
9501
  if (mode === "present" && nextMode !== "present") {
9502
- chunk6GFSF2ML_js.stopAllPersistentAudio();
9502
+ chunkAIA7CY5U_js.stopAllPersistentAudio();
9503
9503
  stopAnimationSound();
9504
9504
  const exitHandler = exitModeHandlerRef.current;
9505
9505
  if (exitHandler) {
@@ -9620,7 +9620,7 @@ function useCanvasImagePaste(input) {
9620
9620
  );
9621
9621
  }
9622
9622
  function formatPatchFor(element, format) {
9623
- const updated = chunk6GFSF2ML_js.applyFormatToElement(element, format);
9623
+ const updated = chunkAIA7CY5U_js.applyFormatToElement(element, format);
9624
9624
  const updates = {};
9625
9625
  if (pptx$1.hasShapeProperties(updated)) {
9626
9626
  updates.shapeStyle = updated.shapeStyle;
@@ -9643,7 +9643,7 @@ function useFormatPainterEditing(input) {
9643
9643
  const prevFormatPainterRef = React18.useRef(false);
9644
9644
  React18.useEffect(() => {
9645
9645
  if (formatPainterActive && !prevFormatPainterRef.current && selectedElement) {
9646
- copiedFormatRef.current = chunk6GFSF2ML_js.copyFormatFromElement(selectedElement);
9646
+ copiedFormatRef.current = chunkAIA7CY5U_js.copyFormatFromElement(selectedElement);
9647
9647
  } else if (!formatPainterActive) {
9648
9648
  copiedFormatRef.current = null;
9649
9649
  }
@@ -11140,7 +11140,7 @@ function useCollaborationWriteBack(input) {
11140
11140
  getSourceBytes: () => latest.current.getSourceBytes?.() ?? null,
11141
11141
  getSaveOptions: () => latest.current.getSaveOptions?.(),
11142
11142
  getTemplateElements: () => latest.current.templateElementsBySlideId,
11143
- mergeTemplateElements: chunk6GFSF2ML_js.buildSaveSlides,
11143
+ mergeTemplateElements: chunkAIA7CY5U_js.buildSaveSlides,
11144
11144
  onWriteBackStatus: () => latest.current.onWriteBackStatus?.(
11145
11145
  pptx.writeBackReport(latest.current.config, created.getState())
11146
11146
  )
@@ -11697,8 +11697,8 @@ function useTouchGestures(input) {
11697
11697
  }
11698
11698
  const recognizer = pptx.createTouchGestureRecognizer({
11699
11699
  getScale: () => scaleRef.current,
11700
- minScale: chunk6GFSF2ML_js.MIN_ZOOM_SCALE,
11701
- maxScale: chunk6GFSF2ML_js.MAX_ZOOM_SCALE,
11700
+ minScale: chunkAIA7CY5U_js.MIN_ZOOM_SCALE,
11701
+ maxScale: chunkAIA7CY5U_js.MAX_ZOOM_SCALE,
11702
11702
  callbacks: {
11703
11703
  onPinchZoom: (newScale) => callbacksRef.current.onPinchZoom?.(newScale),
11704
11704
  onSwipe: (direction) => callbacksRef.current.onSwipe?.(direction),
@@ -11834,9 +11834,9 @@ function buildCanvasProps(input) {
11834
11834
  }
11835
11835
  };
11836
11836
  const handleHyperlinkClick = (url, target) => {
11837
- if (chunk6GFSF2ML_js.isPpactionUrl(url)) {
11837
+ if (chunkAIA7CY5U_js.isPpactionUrl(url)) {
11838
11838
  if (mode === "present") {
11839
- const parsed = chunk6GFSF2ML_js.parsePpactionUrl(url);
11839
+ const parsed = chunkAIA7CY5U_js.parsePpactionUrl(url);
11840
11840
  if (parsed) {
11841
11841
  presentation.handlePresentationAction({
11842
11842
  action: parsed.action,
@@ -12328,7 +12328,7 @@ function buildToolbarProps(input) {
12328
12328
  markDirty: history.markDirty
12329
12329
  }),
12330
12330
  formatPainterActive: s.formatPainterActive,
12331
- canActivateFormatPainter: chunk6GFSF2ML_js.hasCopyableFormat(selectedElement),
12331
+ canActivateFormatPainter: chunkAIA7CY5U_js.hasCopyableFormat(selectedElement),
12332
12332
  onToggleFormatPainter: () => s.setFormatPainterActive((p) => !p),
12333
12333
  isSelectionPaneOpen: s.isSelectionPaneOpen,
12334
12334
  onToggleSelectionPane: () => s.setIsSelectionPaneOpen((p) => !p),
@@ -12487,7 +12487,7 @@ function findReplacePort(findReplace) {
12487
12487
  }
12488
12488
  function useShowDialogPorts(input) {
12489
12489
  const { state, dialogs, presentation, session } = input;
12490
- const { t } = chunk6GFSF2ML_js.useTranslation();
12490
+ const { t } = chunkAIA7CY5U_js.useTranslation();
12491
12491
  const latest = React18.useRef({ ...input, t });
12492
12492
  latest.current = { ...input, t };
12493
12493
  const showsRef = React18.useRef(state.customShows);
@@ -13373,7 +13373,7 @@ function useViewerBuildingBlocks(input) {
13373
13373
  } = input;
13374
13374
  const collaborationConfig = pptx.resolveCollaborationConfig(input.collaboration);
13375
13375
  const [collaborationReadOnly, setCollaborationReadOnly] = React18.useState(Boolean(collaborationConfig));
13376
- const { t } = chunk6GFSF2ML_js.useTranslation();
13376
+ const { t } = chunkAIA7CY5U_js.useTranslation();
13377
13377
  const [content, setContent] = React18.useState(incomingContent ?? null);
13378
13378
  const [loadOrigin, setLoadOrigin] = React18.useState("bootstrap");
13379
13379
  React18.useEffect(() => {
@@ -13565,15 +13565,28 @@ function useViewerBuildingBlocks(input) {
13565
13565
  onOpenLayoutGallery
13566
13566
  });
13567
13567
  slidesPaneProps.onElementRenderError = input.onElementRenderError;
13568
- const shellState = React18.useMemo(
13569
- () => pptx.resolveCollaborationShellState({
13570
- authorizedCanEdit: requestedCanEdit,
13571
- configured: Boolean(collaborationConfig),
13572
- readOnly: collaborationReadOnly,
13573
- sourcePending: Boolean(content) && loading,
13574
- sourceError: Boolean(error),
13575
- status: collaboration?.status ?? "disconnected",
13576
- remoteUsers: collaboration?.remoteUsers ?? []
13568
+ const { shellState, collaborationState } = React18.useMemo(
13569
+ () => pptx.describeBuildingBlockShell({
13570
+ shell: {
13571
+ authorizedCanEdit: requestedCanEdit,
13572
+ configured: Boolean(collaborationConfig),
13573
+ readOnly: collaborationReadOnly,
13574
+ sourcePending: Boolean(content) && loading,
13575
+ sourceError: Boolean(error),
13576
+ status: collaboration?.status ?? "disconnected",
13577
+ remoteUsers: collaboration?.remoteUsers ?? []
13578
+ },
13579
+ collaboration: {
13580
+ active: Boolean(collaboration?.config),
13581
+ roomId: collaboration?.config.roomId,
13582
+ status: collaboration?.status ?? "disconnected",
13583
+ synced: collaboration?.synced ?? false,
13584
+ clientId: collaboration?.clientId,
13585
+ userName: collaboration?.config.userName,
13586
+ userColor: collaboration?.config.userColor,
13587
+ remoteUsers: collaboration?.remoteUsers ?? [],
13588
+ writeBack: pptx.writeBackReport(collaboration?.config, collaboration?.writeBack)
13589
+ }
13577
13590
  }),
13578
13591
  [
13579
13592
  requestedCanEdit,
@@ -13583,7 +13596,11 @@ function useViewerBuildingBlocks(input) {
13583
13596
  loading,
13584
13597
  error,
13585
13598
  collaboration?.status,
13586
- collaboration?.remoteUsers
13599
+ collaboration?.remoteUsers,
13600
+ collaboration?.config,
13601
+ collaboration?.synced,
13602
+ collaboration?.clientId,
13603
+ collaboration?.writeBack
13587
13604
  ]
13588
13605
  );
13589
13606
  return {
@@ -13597,6 +13614,7 @@ function useViewerBuildingBlocks(input) {
13597
13614
  autosaveStatus,
13598
13615
  collaboration,
13599
13616
  shellState,
13617
+ collaborationState,
13600
13618
  // Read last, so action groups registered by the hooks above are included.
13601
13619
  actions: blockActions.session.actions()
13602
13620
  };
@@ -13609,23 +13627,23 @@ function ColorChangedImage({
13609
13627
  className,
13610
13628
  alt
13611
13629
  }) {
13612
- const tolerance = tolerancePct ?? chunk6GFSF2ML_js.DEFAULT_COLOR_CHANGE_TOLERANCE;
13613
- const cacheKey = chunk6GFSF2ML_js.buildCacheKey(
13630
+ const tolerance = tolerancePct ?? chunkAIA7CY5U_js.DEFAULT_COLOR_CHANGE_TOLERANCE;
13631
+ const cacheKey = chunkAIA7CY5U_js.buildCacheKey(
13614
13632
  src,
13615
13633
  clrChange.clrFrom,
13616
13634
  clrChange.clrTo,
13617
13635
  tolerance,
13618
13636
  Boolean(clrChange.clrToTransparent)
13619
13637
  );
13620
- const cached = chunk6GFSF2ML_js.getCachedResult(cacheKey);
13638
+ const cached = chunkAIA7CY5U_js.getCachedResult(cacheKey);
13621
13639
  const [processedSrc, setProcessedSrc] = React18.useState(cached ?? null);
13622
13640
  React18.useEffect(() => {
13623
- if (chunk6GFSF2ML_js.getCachedResult(cacheKey)) {
13624
- setProcessedSrc(chunk6GFSF2ML_js.getCachedResult(cacheKey) ?? null);
13641
+ if (chunkAIA7CY5U_js.getCachedResult(cacheKey)) {
13642
+ setProcessedSrc(chunkAIA7CY5U_js.getCachedResult(cacheKey) ?? null);
13625
13643
  return;
13626
13644
  }
13627
13645
  let cancelled = false;
13628
- chunk6GFSF2ML_js.applyColorChange(
13646
+ chunkAIA7CY5U_js.applyColorChange(
13629
13647
  src,
13630
13648
  clrChange.clrFrom,
13631
13649
  clrChange.clrTo,
@@ -13633,7 +13651,7 @@ function ColorChangedImage({
13633
13651
  Boolean(clrChange.clrToTransparent)
13634
13652
  ).then((result) => {
13635
13653
  if (!cancelled) {
13636
- chunk6GFSF2ML_js.setCachedResult(cacheKey, result.dataUrl);
13654
+ chunkAIA7CY5U_js.setCachedResult(cacheKey, result.dataUrl);
13637
13655
  setProcessedSrc(result.dataUrl);
13638
13656
  }
13639
13657
  return void 0;
@@ -13725,7 +13743,7 @@ function TiledImageLayer({
13725
13743
  cancelled = true;
13726
13744
  };
13727
13745
  }, [src]);
13728
- return /* @__PURE__ */ jsxRuntime.jsx("div", { className, style: { ...chunk6GFSF2ML_js.getImageTilingStyle(element, nativeSize), ...style } });
13746
+ return /* @__PURE__ */ jsxRuntime.jsx("div", { className, style: { ...chunkAIA7CY5U_js.getImageTilingStyle(element, nativeSize), ...style } });
13729
13747
  }
13730
13748
  function renderImageEffectDefinitions(element, excludeDuotone = false) {
13731
13749
  return pptx.getImageSvgFilters(element).filter((definition) => !excludeDuotone || definition.id !== `duotone-${element.id}`).map((definition) => /* @__PURE__ */ jsxRuntime.jsx(
@@ -13794,7 +13812,7 @@ function renderImg(el, style, filter, alt, opacity) {
13794
13812
  ...filter ? { filter } : {},
13795
13813
  ...opacity !== void 0 ? { opacity } : {}
13796
13814
  };
13797
- if (chunk6GFSF2ML_js.isImageTiled(el)) {
13815
+ if (chunkAIA7CY5U_js.isImageTiled(el)) {
13798
13816
  const tileSrc = imgSrc(el);
13799
13817
  if (!tileSrc) {
13800
13818
  return /* @__PURE__ */ jsxRuntime.jsx("div", { className: "w-full h-full flex items-center justify-center text-[11px] text-gray-500 bg-gray-100", children: "Image" });
@@ -13816,9 +13834,9 @@ function renderImg(el, style, filter, alt, opacity) {
13816
13834
  pptx$1.isImageLikeElement(el) ? el.imageEffects?.colorWash : void 0
13817
13835
  );
13818
13836
  const clrChange = "imageEffects" in el ? el.imageEffects?.clrChange : void 0;
13819
- const duotoneColors = chunk6GFSF2ML_js.getDuotoneColors(el);
13837
+ const duotoneColors = chunkAIA7CY5U_js.getDuotoneColors(el);
13820
13838
  const useDuotoneCanvas = Boolean(duotoneColors && !clrChange);
13821
- const filterForImg = useDuotoneCanvas ? chunk6GFSF2ML_js.getImageEffectsFilter(el, { excludeDuotone: true }) : filter;
13839
+ const filterForImg = useDuotoneCanvas ? chunkAIA7CY5U_js.getImageEffectsFilter(el, { excludeDuotone: true }) : filter;
13822
13840
  const canvasEffectStyles = {
13823
13841
  ...filterForImg ? { filter: filterForImg } : {},
13824
13842
  ...opacity !== void 0 ? { opacity } : {}
@@ -13894,10 +13912,10 @@ function SlideBackgroundImageLayer({
13894
13912
  style: { zIndex: 0 },
13895
13913
  children: renderImg(
13896
13914
  backgroundElement,
13897
- chunk6GFSF2ML_js.getImageRenderStyle(backgroundElement),
13898
- chunk6GFSF2ML_js.getImageEffectsFilter(backgroundElement),
13915
+ chunkAIA7CY5U_js.getImageRenderStyle(backgroundElement),
13916
+ chunkAIA7CY5U_js.getImageEffectsFilter(backgroundElement),
13899
13917
  "",
13900
- chunk6GFSF2ML_js.getImageEffectsOpacity(backgroundElement)
13918
+ chunkAIA7CY5U_js.getImageEffectsOpacity(backgroundElement)
13901
13919
  )
13902
13920
  }
13903
13921
  );
@@ -13921,24 +13939,28 @@ var ElementErrorBoundaryState = class extends React18__default.default.Component
13921
13939
  }
13922
13940
  componentDidCatch(error) {
13923
13941
  const { element, slideId, onElementRenderError } = this.props;
13924
- const context = {
13925
- elementId: element.id,
13926
- elementType: element.type,
13927
- ...slideId === void 0 ? {} : { slideId }
13928
- };
13929
- if (onElementRenderError) {
13930
- try {
13931
- onElementRenderError(error, context);
13932
- return;
13933
- } catch {
13934
- }
13935
- }
13936
- console.error(error, context);
13942
+ pptx.reportElementRenderError(
13943
+ onElementRenderError,
13944
+ error,
13945
+ pptx.elementRenderErrorContext(element, slideId)
13946
+ );
13937
13947
  }
13938
13948
  render() {
13939
13949
  return this.state.failed ? null : this.props.children;
13940
13950
  }
13941
13951
  };
13952
+ function ElementRenderErrorScope({
13953
+ onElementRenderError,
13954
+ children
13955
+ }) {
13956
+ const inherited = React18.useContext(ElementRenderErrorReportingContext);
13957
+ const reporter = onElementRenderError ?? inherited?.onElementRenderError;
13958
+ const scope = React18.useMemo(
13959
+ () => ({ slideId: inherited?.slideId, onElementRenderError: reporter }),
13960
+ [inherited?.slideId, reporter]
13961
+ );
13962
+ return /* @__PURE__ */ jsxRuntime.jsx(ElementRenderErrorReportingContext.Provider, { value: scope, children });
13963
+ }
13942
13964
  function ElementErrorBoundary({
13943
13965
  element,
13944
13966
  slideId,
@@ -14223,7 +14245,7 @@ function ChartElementView({
14223
14245
  onUpdateElement,
14224
14246
  animationState
14225
14247
  }) {
14226
- const { t } = chunk6GFSF2ML_js.useTranslation();
14248
+ const { t } = chunkAIA7CY5U_js.useTranslation();
14227
14249
  const wrapperRef = React18.useRef(null);
14228
14250
  const { selection, setSelection } = useChartPartSelection();
14229
14251
  const [titleDraft, setTitleDraft] = React18.useState(null);
@@ -14238,7 +14260,7 @@ function ChartElementView({
14238
14260
  pptx.getBarFacePicturePixelSampleVersion
14239
14261
  );
14240
14262
  const viewModel = React18.useMemo(() => {
14241
- return canEdit ? chunk6GFSF2ML_js.buildReactChartViewModel(element) : null;
14263
+ return canEdit ? chunkAIA7CY5U_js.buildReactChartViewModel(element) : null;
14242
14264
  }, [canEdit, element, barFacePictureSampleVersion]);
14243
14265
  React18.useEffect(pptx.ensureChartInteractionStyles, []);
14244
14266
  React18.useEffect(() => {
@@ -14343,9 +14365,9 @@ function ChartElementView({
14343
14365
  textStyle: animationState?.textStyle,
14344
14366
  onSelect: chart3D.onSelect,
14345
14367
  onDrag: chart3D.onDrag,
14346
- children: chunk6GFSF2ML_js.renderChartElement(renderedElement, (key) => t(key))
14368
+ children: chunkAIA7CY5U_js.renderChartElement(renderedElement, (key) => t(key))
14347
14369
  }
14348
- ) : chunk6GFSF2ML_js.renderChartElement(renderedElement, (key) => t(key)),
14370
+ ) : chunkAIA7CY5U_js.renderChartElement(renderedElement, (key) => t(key)),
14349
14371
  dragValue !== null && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "absolute top-1 right-1 z-10 rounded bg-primary/90 px-1.5 py-0.5 text-[10px] font-medium text-white pointer-events-none", children: pptx.formatAxisValue(dragValue) }),
14350
14372
  titleDraft !== null && /* @__PURE__ */ jsxRuntime.jsx(
14351
14373
  "input",
@@ -14373,7 +14395,7 @@ function ChartElementView({
14373
14395
  );
14374
14396
  }
14375
14397
  function useActionAffordance(element, canInteract) {
14376
- const { t } = chunk6GFSF2ML_js.useTranslation();
14398
+ const { t } = chunkAIA7CY5U_js.useTranslation();
14377
14399
  pptx.ensureActionAffordanceStyles();
14378
14400
  return React18.useMemo(
14379
14401
  () => pptx.resolveElementActionAffordance(element, {
@@ -14651,7 +14673,7 @@ function ResizeHandles({
14651
14673
  nonRotationTransform,
14652
14674
  onRotate
14653
14675
  }) {
14654
- const { t } = chunk6GFSF2ML_js.useTranslation();
14676
+ const { t } = chunkAIA7CY5U_js.useTranslation();
14655
14677
  const rotateRef = useRotateHandlePlacement(elementId, Boolean(onRotate));
14656
14678
  const peStyle = forcePointerEvents ? { ...HANDLE_TOUCH_ACTION, pointerEvents: "auto" } : HANDLE_TOUCH_ACTION;
14657
14679
  const resizeStyle = { ...HANDLE_TOUCH_ACTION, pointerEvents: "none" };
@@ -14684,7 +14706,7 @@ function ResizeHandles({
14684
14706
  "aria-label": t("pptx.selectionOverlay.resize", { handle }),
14685
14707
  "data-pptx-handle-kind": "resize",
14686
14708
  "data-pptx-compact": true,
14687
- className: chunk6GFSF2ML_js.cn(
14709
+ className: chunkAIA7CY5U_js.cn(
14688
14710
  "absolute z-10 group border-0 bg-transparent p-0",
14689
14711
  RESIZE_DEFAULT_CLASSES,
14690
14712
  posClass,
@@ -14710,7 +14732,7 @@ function ResizeHandles({
14710
14732
  "div",
14711
14733
  {
14712
14734
  "data-pptx-handle-hit": true,
14713
- className: chunk6GFSF2ML_js.cn(
14735
+ className: chunkAIA7CY5U_js.cn(
14714
14736
  "absolute -inset-px pointer-events-auto [--pptx-handle-hit-inset:-1px]",
14715
14737
  corner ? "max-md:-inset-1.5 max-md:[--pptx-handle-hit-inset:-6px]" : "max-md:-inset-2 max-md:[--pptx-handle-hit-inset:-8px]"
14716
14738
  ),
@@ -14731,7 +14753,7 @@ function ResizeHandles({
14731
14753
  "aria-label": t("pptx.selectionOverlay.rotate"),
14732
14754
  "data-pptx-handle-kind": "rotate",
14733
14755
  "data-pptx-compact": true,
14734
- className: chunk6GFSF2ML_js.cn(
14756
+ className: chunkAIA7CY5U_js.cn(
14735
14757
  "absolute left-1/2 top-0 -translate-x-1/2 -translate-y-1/2 z-20 border-0 bg-transparent p-0 cursor-grab active:cursor-grabbing",
14736
14758
  ROTATE_DEFAULT_CLASSES
14737
14759
  ),
@@ -14808,10 +14830,10 @@ var ConnectorElementRendererMemo = /* @__PURE__ */ React18__default.default.memo
14808
14830
  const svgHeight = Math.max(el.height, 1);
14809
14831
  const ss = shapeEl?.shapeStyle;
14810
14832
  const strokeWidth = Math.max(0, ss?.strokeWidth ?? 2);
14811
- const strokeColor = chunk6GFSF2ML_js.normalizeHexColor(ss?.strokeColor, chunk6GFSF2ML_js.DEFAULT_STROKE_COLOR);
14812
- const strokePaint = chunk6GFSF2ML_js.colorWithOpacity(strokeColor, ss?.strokeOpacity);
14813
- const dashType = chunk6GFSF2ML_js.normalizeStrokeDashType(ss?.strokeDash);
14814
- const dashArray = chunk6GFSF2ML_js.getSvgStrokeDasharray(
14833
+ const strokeColor = chunkAIA7CY5U_js.normalizeHexColor(ss?.strokeColor, chunkAIA7CY5U_js.DEFAULT_STROKE_COLOR);
14834
+ const strokePaint = chunkAIA7CY5U_js.colorWithOpacity(strokeColor, ss?.strokeOpacity);
14835
+ const dashType = chunkAIA7CY5U_js.normalizeStrokeDashType(ss?.strokeDash);
14836
+ const dashArray = chunkAIA7CY5U_js.getSvgStrokeDasharray(
14815
14837
  dashType,
14816
14838
  Math.max(strokeWidth, 1),
14817
14839
  ss?.customDashSegments,
@@ -14823,14 +14845,14 @@ var ConnectorElementRendererMemo = /* @__PURE__ */ React18__default.default.memo
14823
14845
  const markerSeed = el.id.replace(/[^a-zA-Z0-9_-]/gu, "_");
14824
14846
  const startMarkerId = `${markerSeed}-sel-start`;
14825
14847
  const endMarkerId = `${markerSeed}-sel-end`;
14826
- const compoundOffsets = chunk6GFSF2ML_js.getCompoundLineOffsets(compoundLine, strokeWidth);
14827
- const compoundWidths = chunk6GFSF2ML_js.getCompoundLineWidths(compoundLine, strokeWidth);
14848
+ const compoundOffsets = chunkAIA7CY5U_js.getCompoundLineOffsets(compoundLine, strokeWidth);
14849
+ const compoundWidths = chunkAIA7CY5U_js.getCompoundLineWidths(compoundLine, strokeWidth);
14828
14850
  const strokeCap = pptx.svgLineCap(ss?.lineCap, dashArray !== void 0);
14829
14851
  const textEl = pptx$1.hasTextProperties(el) ? el : void 0;
14830
14852
  const connectorText = textEl?.text?.trim() ?? "";
14831
14853
  const connectorTextSegments = textEl?.textSegments;
14832
14854
  const connectorTextStyle = textEl?.textStyle;
14833
- const pathGeometry = shapeEl ? chunk6GFSF2ML_js.getConnectorPathGeometry(shapeEl) : {
14855
+ const pathGeometry = shapeEl ? chunkAIA7CY5U_js.getConnectorPathGeometry(shapeEl) : {
14834
14856
  pathData: `M 0 0 L ${viewWidth} ${viewHeight}`,
14835
14857
  startX: 0,
14836
14858
  startY: 0,
@@ -14851,16 +14873,16 @@ var ConnectorElementRendererMemo = /* @__PURE__ */ React18__default.default.memo
14851
14873
  strokeWidth
14852
14874
  );
14853
14875
  const selColor = selClr === "blue-400" ? "#60a5fa" : "#3b82f6";
14854
- const lineShadow = chunk6GFSF2ML_js.buildLineShadowCss(el);
14855
- const lineGlow = chunk6GFSF2ML_js.buildLineGlowFilter(el);
14876
+ const lineShadow = chunkAIA7CY5U_js.buildLineShadowCss(el);
14877
+ const lineGlow = chunkAIA7CY5U_js.buildLineGlowFilter(el);
14856
14878
  return /* @__PURE__ */ jsxRuntime.jsxs(
14857
14879
  "div",
14858
14880
  {
14859
14881
  "data-pptx-element": "true",
14860
14882
  "data-element-id": el.id,
14861
- role: chunk6GFSF2ML_js.getAriaRole(el, { actionable: false }),
14862
- "aria-label": chunk6GFSF2ML_js.getAriaLabel(el),
14863
- "aria-roledescription": chunk6GFSF2ML_js.getAriaRoleDescription(el),
14883
+ role: chunkAIA7CY5U_js.getAriaRole(el, { actionable: false }),
14884
+ "aria-label": chunkAIA7CY5U_js.getAriaLabel(el),
14885
+ "aria-roledescription": chunkAIA7CY5U_js.getAriaRoleDescription(el),
14864
14886
  "aria-selected": isSelected ? true : void 0,
14865
14887
  className: "absolute",
14866
14888
  style: {
@@ -14893,14 +14915,14 @@ var ConnectorElementRendererMemo = /* @__PURE__ */ React18__default.default.memo
14893
14915
  style: { overflow: "visible", pointerEvents: "none" },
14894
14916
  children: [
14895
14917
  /* @__PURE__ */ jsxRuntime.jsxs("defs", { children: [
14896
- chunk6GFSF2ML_js.renderConnectorMarker(
14918
+ chunkAIA7CY5U_js.renderConnectorMarker(
14897
14919
  startMarkerId,
14898
14920
  startArrow,
14899
14921
  strokePaint,
14900
14922
  ss?.connectorStartArrowWidth,
14901
14923
  ss?.connectorStartArrowLength
14902
14924
  ),
14903
- chunk6GFSF2ML_js.renderConnectorMarker(
14925
+ chunkAIA7CY5U_js.renderConnectorMarker(
14904
14926
  endMarkerId,
14905
14927
  endArrow,
14906
14928
  strokePaint,
@@ -15110,14 +15132,14 @@ function getElementInteractionProps({
15110
15132
  };
15111
15133
  }
15112
15134
  function renderDagDuotoneFilterForElement(el) {
15113
- if (!chunk6GFSF2ML_js.hasDagDuotoneEffect(el)) {
15135
+ if (!chunkAIA7CY5U_js.hasDagDuotoneEffect(el)) {
15114
15136
  return null;
15115
15137
  }
15116
15138
  const duotone = el.shapeStyle?.dagDuotone;
15117
15139
  if (!duotone) {
15118
15140
  return null;
15119
15141
  }
15120
- return chunk6GFSF2ML_js.renderDagDuotoneSvgFilter(el.id, duotone.color1, duotone.color2);
15142
+ return chunkAIA7CY5U_js.renderDagDuotoneSvgFilter(el.id, duotone.color1, duotone.color2);
15121
15143
  }
15122
15144
  function getContainerStyle({
15123
15145
  el,
@@ -15145,10 +15167,10 @@ function getContainerStyle({
15145
15167
  top: isFullscreenMedia ? fs.top : el.y,
15146
15168
  width: isFullscreenMedia ? fs.width : painted.width,
15147
15169
  ...heightStyle,
15148
- transform: isFullscreenMedia ? fs.transform : chunk6GFSF2ML_js.getElementTransform(el),
15170
+ transform: isFullscreenMedia ? fs.transform : chunkAIA7CY5U_js.getElementTransform(el),
15149
15171
  transformOrigin: "center",
15150
15172
  overflow: overflowValue,
15151
- clipPath: isPicture ? void 0 : isImg && !has3DExtrusion ? chunk6GFSF2ML_js.getCropShapeClipPath(el) : void 0,
15173
+ clipPath: isPicture ? void 0 : isImg && !has3DExtrusion ? chunkAIA7CY5U_js.getCropShapeClipPath(el) : void 0,
15152
15174
  zIndex: isFullscreenMedia ? fs.zIndex : zIndex,
15153
15175
  visibility: animationState?.visible === false ? "hidden" : "visible",
15154
15176
  animation: animationState?.cssAnimation,
@@ -15193,9 +15215,9 @@ function getContainerStyle({
15193
15215
  function shapeParams(element) {
15194
15216
  const style = pptx$1.hasShapeProperties(element) ? element.shapeStyle : void 0;
15195
15217
  const strokeWidth = pptx.paintedStrokeWidth(style);
15196
- const strokeColor = chunk6GFSF2ML_js.normalizeHexColor(style?.strokeColor, chunk6GFSF2ML_js.DEFAULT_STROKE_COLOR);
15197
- const fillColor = chunk6GFSF2ML_js.normalizeHexColor(style?.fillColor, chunk6GFSF2ML_js.DEFAULT_FILL_COLOR);
15198
- const hasFill = style?.fillColor !== void 0 && style.fillColor !== "transparent" || Boolean(chunk6GFSF2ML_js.buildCssGradientFromShapeStyle(style) || style?.fillGradient) || style?.fillMode === "pattern" && Boolean(style.fillPatternPreset);
15218
+ const strokeColor = chunkAIA7CY5U_js.normalizeHexColor(style?.strokeColor, chunkAIA7CY5U_js.DEFAULT_STROKE_COLOR);
15219
+ const fillColor = chunkAIA7CY5U_js.normalizeHexColor(style?.fillColor, chunkAIA7CY5U_js.DEFAULT_FILL_COLOR);
15220
+ const hasFill = style?.fillColor !== void 0 && style.fillColor !== "transparent" || Boolean(chunkAIA7CY5U_js.buildCssGradientFromShapeStyle(style) || style?.fillGradient) || style?.fillMode === "pattern" && Boolean(style.fillPatternPreset);
15199
15221
  return { hf: hasFill, fc: fillColor, sw: strokeWidth, sc: strokeColor };
15200
15222
  }
15201
15223
  var Extrusion3DOverlayMemo = /* @__PURE__ */ React18__default.default.memo(
@@ -15308,14 +15330,14 @@ function ShapeEffectOverlay({
15308
15330
  const hollowHit = pptx.buildHollowHitOutline(element);
15309
15331
  const fillLayer = pptx.getSilhouetteFillLayer(element);
15310
15332
  const overlayFill = pptx.buildSubpathFillOverlay(element);
15311
- const subpathFill = overlayFill?.silhouette && (chunk6GFSF2ML_js.rendersCustomVectorPath(element) || chunk6GFSF2ML_js.rendersWedgeCalloutVector(element)) ? void 0 : overlayFill;
15333
+ const subpathFill = overlayFill?.silhouette && (chunkAIA7CY5U_js.rendersCustomVectorPath(element) || chunkAIA7CY5U_js.rendersWedgeCalloutVector(element)) ? void 0 : overlayFill;
15312
15334
  if (!overlay && !softEdge && !bevelLightingFilter && !strokeOutline && !hollowHit && !subpathFill && !fillLayer && !reflection) {
15313
15335
  return null;
15314
15336
  }
15315
15337
  const fillOverlayStyle = overlay ? {
15316
15338
  position: "absolute",
15317
15339
  inset: 0,
15318
- ...pptx$1.isImageLikeElement(element) ? chunk6GFSF2ML_js.getImageSurfaceMaskStyle(element) : {},
15340
+ ...pptx$1.isImageLikeElement(element) ? chunkAIA7CY5U_js.getImageSurfaceMaskStyle(element) : {},
15319
15341
  background: overlay.color,
15320
15342
  mixBlendMode: overlay.blendMode,
15321
15343
  pointerEvents: "none"
@@ -15530,6 +15552,7 @@ var ElementRendererImpl = /* @__PURE__ */ React18__default.default.memo(
15530
15552
  fieldContext,
15531
15553
  tableStyleContext
15532
15554
  }) {
15555
+ pptx.probeElementRenderFault(el);
15533
15556
  const {
15534
15557
  cellSelectHandler,
15535
15558
  cellCommitHandler,
@@ -15549,10 +15572,10 @@ var ElementRendererImpl = /* @__PURE__ */ React18__default.default.memo(
15549
15572
  const backgroundAnimationState = pptx.getBackgroundAnimationState(el, presentationElementStates);
15550
15573
  const effectPlacement = pptx.getShapeEffectLayerPlacement(el);
15551
15574
  const visualAnimationState = backgroundAnimationState ?? animationState;
15552
- const isTxt = chunk6GFSF2ML_js.isEditableTextElement(el) && allow.textEditable;
15575
+ const isTxt = chunkAIA7CY5U_js.isEditableTextElement(el) && allow.textEditable;
15553
15576
  const txtSE = pptx$1.hasTextProperties(el) ? el.textStyle : void 0;
15554
15577
  const textStyleOverrideCss = pptx.buildTextStyleOverrideCss(el.id, visualAnimationState?.textStyle);
15555
- const ss = chunk6GFSF2ML_js.getShapeVisualStyle(
15578
+ const ss = chunkAIA7CY5U_js.getShapeVisualStyle(
15556
15579
  el,
15557
15580
  hf,
15558
15581
  fc,
@@ -15561,9 +15584,9 @@ var ElementRendererImpl = /* @__PURE__ */ React18__default.default.memo(
15561
15584
  visualAnimationState?.animatesFill,
15562
15585
  visualAnimationState?.animatesStroke
15563
15586
  );
15564
- const ts = chunk6GFSF2ML_js.getTextStyleForElement(el, chunk6GFSF2ML_js.DEFAULT_TEXT_COLOR);
15587
+ const ts = chunkAIA7CY5U_js.getTextStyleForElement(el, chunkAIA7CY5U_js.DEFAULT_TEXT_COLOR);
15565
15588
  const isImg = el.type === "picture" || el.type === "image";
15566
- const vs = chunk6GFSF2ML_js.renderVectorShape(
15589
+ const vs = chunkAIA7CY5U_js.renderVectorShape(
15567
15590
  el,
15568
15591
  isImg ? false : hf,
15569
15592
  fc,
@@ -15573,10 +15596,10 @@ var ElementRendererImpl = /* @__PURE__ */ React18__default.default.memo(
15573
15596
  visualAnimationState?.animatesStroke
15574
15597
  );
15575
15598
  const isModel3D = el.type === "model3d";
15576
- const isConn = chunk6GFSF2ML_js.isConnectorOrLineElement(el);
15599
+ const isConn = chunkAIA7CY5U_js.isConnectorOrLineElement(el);
15577
15600
  const shapeStyle3d = pptx$1.hasShapeProperties(el) ? el.shapeStyle : void 0;
15578
15601
  const extrusionData = React18.useMemo(
15579
- () => chunk6GFSF2ML_js.build3DExtrusionData(shapeStyle3d?.shape3d, shapeStyle3d?.scene3d, fc, el.width, el.height),
15602
+ () => chunkAIA7CY5U_js.build3DExtrusionData(shapeStyle3d?.shape3d, shapeStyle3d?.scene3d, fc, el.width, el.height),
15580
15603
  [shapeStyle3d?.shape3d, shapeStyle3d?.scene3d, fc, el.width, el.height]
15581
15604
  );
15582
15605
  const actionAffordance = useActionAffordance(el, canInteract);
@@ -15667,7 +15690,7 @@ var ElementRendererImpl = /* @__PURE__ */ React18__default.default.memo(
15667
15690
  "aria-hidden": aria.hidden ? true : void 0,
15668
15691
  "aria-selected": isSelected ? true : void 0,
15669
15692
  tabIndex: isFocusable ? 0 : -1,
15670
- className: chunk6GFSF2ML_js.cn(
15693
+ className: chunkAIA7CY5U_js.cn(
15671
15694
  "absolute",
15672
15695
  "focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-blue-500",
15673
15696
  cur,
@@ -15747,9 +15770,9 @@ var ElementRendererImpl = /* @__PURE__ */ React18__default.default.memo(
15747
15770
  txtSE,
15748
15771
  txtS: ts,
15749
15772
  vecShape: backgroundAnimationState && !isImg ? null : vs,
15750
- imgStyle: chunk6GFSF2ML_js.getImageRenderStyle(el),
15751
- imgFilter: chunk6GFSF2ML_js.getImageEffectsFilter(el),
15752
- imgOpacity: chunk6GFSF2ML_js.getImageEffectsOpacity(el),
15773
+ imgStyle: chunkAIA7CY5U_js.getImageRenderStyle(el),
15774
+ imgFilter: chunkAIA7CY5U_js.getImageEffectsFilter(el),
15775
+ imgOpacity: chunkAIA7CY5U_js.getImageEffectsOpacity(el),
15753
15776
  imgAlt: imageAltText,
15754
15777
  isTxtEl: isTxt,
15755
15778
  media: mediaDataUrls,
@@ -15886,10 +15909,10 @@ function renderStrokeView(view, pressureSensitive, replayStyle, key) {
15886
15909
  }
15887
15910
  function renderInk(el, options) {
15888
15911
  const replay = options?.replay ?? false;
15889
- const strokes = chunk6GFSF2ML_js.buildInkGroupStrokes(el, { color: "#000", width: 3 });
15912
+ const strokes = chunkAIA7CY5U_js.buildInkGroupStrokes(el, { color: "#000", width: 3 });
15890
15913
  strokes.some((s) => s.circles || s.nibMarks);
15891
15914
  const pressureSensitive = options?.pressureSensitive;
15892
- const replayStyles = replay ? chunk6GFSF2ML_js.getInkReplayStyles(el, options?.replayConfig) : null;
15915
+ const replayStyles = replay ? chunkAIA7CY5U_js.getInkReplayStyles(el, options?.replayConfig) : null;
15893
15916
  return /* @__PURE__ */ jsxRuntime.jsxs(
15894
15917
  "svg",
15895
15918
  {
@@ -15897,7 +15920,7 @@ function renderInk(el, options) {
15897
15920
  viewBox: `0 0 ${Math.max(el.width, 1)} ${Math.max(el.height, 1)}`,
15898
15921
  preserveAspectRatio: "none",
15899
15922
  children: [
15900
- replay && /* @__PURE__ */ jsxRuntime.jsx("style", { children: chunk6GFSF2ML_js.INK_REPLAY_KEYFRAMES }),
15923
+ replay && /* @__PURE__ */ jsxRuntime.jsx("style", { children: chunkAIA7CY5U_js.INK_REPLAY_KEYFRAMES }),
15901
15924
  strokes.map(
15902
15925
  (s, i) => renderStrokeView(s, pressureSensitive, replayStyles?.[i], `${el.id}-ink-${i}`)
15903
15926
  )
@@ -15908,7 +15931,7 @@ function renderInk(el, options) {
15908
15931
  function renderGroup(children, parentGroupFill) {
15909
15932
  return /* @__PURE__ */ jsxRuntime.jsx("div", { className: "relative w-full h-full pointer-events-none", children: pptx.filterRenderedElements(children).map((c, childIndex) => {
15910
15933
  const { hf, fc, sw, sc } = shapeParams(c);
15911
- const baseSs = chunk6GFSF2ML_js.getShapeVisualStyle(c, hf, fc, sw, sc);
15934
+ const baseSs = chunkAIA7CY5U_js.getShapeVisualStyle(c, hf, fc, sw, sc);
15912
15935
  const inheritedFill = pptx.resolveGroupChildFill(c, parentGroupFill);
15913
15936
  const ss = inheritedFill ? {
15914
15937
  ...baseSs,
@@ -15919,9 +15942,9 @@ function renderGroup(children, parentGroupFill) {
15919
15942
  backgroundPosition: inheritedFill.backgroundPosition
15920
15943
  } : baseSs;
15921
15944
  const isI = c.type === "picture" || c.type === "image";
15922
- const vs = chunk6GFSF2ML_js.renderVectorShape(c, isI ? false : hf, fc, sw, sc);
15923
- const ts = chunk6GFSF2ML_js.getTextStyleForElement(c, chunk6GFSF2ML_js.DEFAULT_TEXT_COLOR);
15924
- const isTxt = chunk6GFSF2ML_js.isEditableTextElement(c);
15945
+ const vs = chunkAIA7CY5U_js.renderVectorShape(c, isI ? false : hf, fc, sw, sc);
15946
+ const ts = chunkAIA7CY5U_js.getTextStyleForElement(c, chunkAIA7CY5U_js.DEFAULT_TEXT_COLOR);
15947
+ const isTxt = chunkAIA7CY5U_js.isEditableTextElement(c);
15925
15948
  return /* @__PURE__ */ jsxRuntime.jsxs(
15926
15949
  "div",
15927
15950
  {
@@ -15930,9 +15953,9 @@ function renderGroup(children, parentGroupFill) {
15930
15953
  style: {
15931
15954
  left: c.x,
15932
15955
  top: c.y,
15933
- width: Math.max(c.width, chunk6GFSF2ML_js.MIN_ELEMENT_SIZE),
15934
- height: Math.max(c.height, chunk6GFSF2ML_js.MIN_ELEMENT_SIZE),
15935
- transform: chunk6GFSF2ML_js.getElementTransform(c),
15956
+ width: Math.max(c.width, chunkAIA7CY5U_js.MIN_ELEMENT_SIZE),
15957
+ height: Math.max(c.height, chunkAIA7CY5U_js.MIN_ELEMENT_SIZE),
15958
+ transform: chunkAIA7CY5U_js.getElementTransform(c),
15936
15959
  transformOrigin: "center",
15937
15960
  ...ss,
15938
15961
  ...isI ? {
@@ -15957,8 +15980,8 @@ function renderGroup(children, parentGroupFill) {
15957
15980
  // A nested group: recurse, chaining the inherited fill so a
15958
15981
  // `grpFill` shape under a fill-less sub-group still paints.
15959
15982
  renderGroup(c.children, pptx.getGroupChildParentFill(c, parentGroupFill))
15960
- ) : isI && ("svgData" in c && c.svgData || "imageData" in c && c.imageData) ? /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "absolute inset-0 pointer-events-none", style: chunk6GFSF2ML_js.getImageSurfaceStyle(c), children: [
15961
- chunk6GFSF2ML_js.isImageTiled(c) ? /* @__PURE__ */ jsxRuntime.jsx(
15983
+ ) : isI && ("svgData" in c && c.svgData || "imageData" in c && c.imageData) ? /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "absolute inset-0 pointer-events-none", style: chunkAIA7CY5U_js.getImageSurfaceStyle(c), children: [
15984
+ chunkAIA7CY5U_js.isImageTiled(c) ? /* @__PURE__ */ jsxRuntime.jsx(
15962
15985
  TiledImageLayer,
15963
15986
  {
15964
15987
  element: c,
@@ -15971,7 +15994,7 @@ function renderGroup(children, parentGroupFill) {
15971
15994
  src: "svgData" in c && c.svgData ? c.svgData : c.imageData,
15972
15995
  alt: i18n.translationsEn["pptx.ink.groupChildAlt"],
15973
15996
  className: "pointer-events-none select-none",
15974
- style: chunk6GFSF2ML_js.getImageRenderStyle(c),
15997
+ style: chunkAIA7CY5U_js.getImageRenderStyle(c),
15975
15998
  draggable: false
15976
15999
  }
15977
16000
  ),
@@ -15983,7 +16006,7 @@ function renderGroup(children, parentGroupFill) {
15983
16006
  {
15984
16007
  className: "relative z-10 w-full h-full pointer-events-none whitespace-pre-wrap break-words leading-[1.3]",
15985
16008
  style: ts,
15986
- children: chunk6GFSF2ML_js.renderTextSegments(c, chunk6GFSF2ML_js.DEFAULT_TEXT_COLOR)
16009
+ children: chunkAIA7CY5U_js.renderTextSegments(c, chunkAIA7CY5U_js.DEFAULT_TEXT_COLOR)
15987
16010
  }
15988
16011
  ) : null
15989
16012
  ] })
@@ -15997,8 +16020,8 @@ function renderContentPart(el, options) {
15997
16020
  if (el.inkStrokes && el.inkStrokes.length > 0) {
15998
16021
  const replay = options?.replay ?? false;
15999
16022
  const pressureSensitive = options?.pressureSensitive ?? true;
16000
- const strokes = chunk6GFSF2ML_js.buildContentPartStrokes(el);
16001
- const replayStyles = replay ? chunk6GFSF2ML_js.getContentPartReplayStyles(el.inkStrokes, options?.replayConfig) : null;
16023
+ const strokes = chunkAIA7CY5U_js.buildContentPartStrokes(el);
16024
+ const replayStyles = replay ? chunkAIA7CY5U_js.getContentPartReplayStyles(el.inkStrokes, options?.replayConfig) : null;
16002
16025
  return /* @__PURE__ */ jsxRuntime.jsxs(
16003
16026
  "svg",
16004
16027
  {
@@ -16006,7 +16029,7 @@ function renderContentPart(el, options) {
16006
16029
  viewBox: `0 0 ${Math.max(el.width, 1)} ${Math.max(el.height, 1)}`,
16007
16030
  preserveAspectRatio: "none",
16008
16031
  children: [
16009
- replay && /* @__PURE__ */ jsxRuntime.jsx("style", { children: chunk6GFSF2ML_js.INK_REPLAY_KEYFRAMES }),
16032
+ replay && /* @__PURE__ */ jsxRuntime.jsx("style", { children: chunkAIA7CY5U_js.INK_REPLAY_KEYFRAMES }),
16010
16033
  strokes.map(
16011
16034
  (s, i) => renderStrokeView(s, pressureSensitive, replayStyles?.[i], `${el.id}-cp-ink-${i}`)
16012
16035
  )
@@ -16233,9 +16256,9 @@ function useInlineListEditor(element, rootRef, onChange, onModelReplacement) {
16233
16256
  collaboration: connected,
16234
16257
  model: pptx.createInlineListModelObserver(element),
16235
16258
  activationSelection,
16236
- children: seed && !connected ? chunk6GFSF2ML_js.renderTextSegments(
16259
+ children: seed && !connected ? chunkAIA7CY5U_js.renderTextSegments(
16237
16260
  element,
16238
- chunk6GFSF2ML_js.DEFAULT_TEXT_COLOR,
16261
+ chunkAIA7CY5U_js.DEFAULT_TEXT_COLOR,
16239
16262
  void 0,
16240
16263
  void 0,
16241
16264
  void 0,
@@ -16459,8 +16482,8 @@ function InlineTextEditor({
16459
16482
  pending.endOffset
16460
16483
  );
16461
16484
  });
16462
- const warpStyle = chunk6GFSF2ML_js.getTextWarpStyle(textStyleRaw);
16463
- const compensationTransform = chunk6GFSF2ML_js.getTextCompensationTransform(element);
16485
+ const warpStyle = chunkAIA7CY5U_js.getTextWarpStyle(textStyleRaw);
16486
+ const compensationTransform = chunkAIA7CY5U_js.getTextCompensationTransform(element);
16464
16487
  const warpTransform = warpStyle?.transform;
16465
16488
  const mergedTransform = [compensationTransform, warpTransform].filter(Boolean).join(" ") || void 0;
16466
16489
  const wrapperStyle = {
@@ -16468,7 +16491,7 @@ function InlineTextEditor({
16468
16491
  ...textStyle,
16469
16492
  ...warpStyle,
16470
16493
  transform: mergedTransform,
16471
- transformOrigin: warpStyle?.transformOrigin || (compensationTransform ? chunk6GFSF2ML_js.getTextCompensationOrigin(element) : "center")
16494
+ transformOrigin: warpStyle?.transformOrigin || (compensationTransform ? chunkAIA7CY5U_js.getTextCompensationOrigin(element) : "center")
16472
16495
  };
16473
16496
  const nextInlineStyleValue = (property) => {
16474
16497
  if (!pptx$1.hasTextProperties(element)) {
@@ -16543,7 +16566,7 @@ function InlineTextEditor({
16543
16566
  const text = e.clipboardData.getData("text/plain");
16544
16567
  document.execCommand("insertText", false, text);
16545
16568
  },
16546
- children: list.seed ? list.children : seed.hasRichSegments ? chunk6GFSF2ML_js.renderTextSegments(element, chunk6GFSF2ML_js.DEFAULT_TEXT_COLOR) : seed.initialText
16569
+ children: list.seed ? list.children : seed.hasRichSegments ? chunkAIA7CY5U_js.renderTextSegments(element, chunkAIA7CY5U_js.DEFAULT_TEXT_COLOR) : seed.initialText
16547
16570
  },
16548
16571
  list.seed?.paragraphs[0].token ?? "plain"
16549
16572
  );
@@ -16682,7 +16705,7 @@ function OleActionFooter({
16682
16705
  info,
16683
16706
  showActions
16684
16707
  }) {
16685
- const { t } = chunk6GFSF2ML_js.useTranslation();
16708
+ const { t } = chunkAIA7CY5U_js.useTranslation();
16686
16709
  if (!showActions || !info.canDownload || !el.oleEmbeddedData) {
16687
16710
  return null;
16688
16711
  }
@@ -16791,7 +16814,7 @@ function SmartArtInlineNodeEditor({
16791
16814
  onCommit,
16792
16815
  onCancel
16793
16816
  }) {
16794
- const { t } = chunk6GFSF2ML_js.useTranslation();
16817
+ const { t } = chunkAIA7CY5U_js.useTranslation();
16795
16818
  const ref = React18__default.default.useRef(null);
16796
16819
  const [value, setValue] = React18__default.default.useState(initialText);
16797
16820
  const settled = React18__default.default.useRef(false);
@@ -17419,7 +17442,7 @@ function SmartArtRendererImpl({
17419
17442
  onUpdateElement,
17420
17443
  animationState
17421
17444
  }) {
17422
- const { t } = chunk6GFSF2ML_js.useTranslation();
17445
+ const { t } = chunkAIA7CY5U_js.useTranslation();
17423
17446
  if (element.type !== "smartArt" || !element.smartArtData) {
17424
17447
  return /* @__PURE__ */ jsxRuntime.jsx(
17425
17448
  "div",
@@ -17665,7 +17688,7 @@ function groupIntoParagraphs(element, fieldContext) {
17665
17688
  element,
17666
17689
  fieldContext ? (seg) => {
17667
17690
  if (seg.fieldType) {
17668
- const substituted = chunk6GFSF2ML_js.substituteFieldText(
17691
+ const substituted = chunkAIA7CY5U_js.substituteFieldText(
17669
17692
  seg.text,
17670
17693
  seg.fieldType,
17671
17694
  fieldContext,
@@ -17696,7 +17719,7 @@ function getSegmentTspanProps(segment, element, fallbackColor, fitScale = 1) {
17696
17719
  segment,
17697
17720
  element.textStyle,
17698
17721
  fallbackColor,
17699
- chunk6GFSF2ML_js.DEFAULT_TEXT_FONT_SIZE
17722
+ chunkAIA7CY5U_js.DEFAULT_TEXT_FONT_SIZE
17700
17723
  );
17701
17724
  return {
17702
17725
  fill: paint.fill,
@@ -17711,8 +17734,8 @@ function resolveSegmentFont(segment, element) {
17711
17734
  const s = segment.style || {};
17712
17735
  const family = s.fontFamily || element.textStyle?.fontFamily;
17713
17736
  return {
17714
- fontFamily: family ? pptx$1.getSubstituteFontFamily(family) : chunk6GFSF2ML_js.DEFAULT_FONT_FAMILY,
17715
- fontSizePx: s.fontSize ?? element.textStyle?.fontSize ?? chunk6GFSF2ML_js.DEFAULT_TEXT_FONT_SIZE,
17737
+ fontFamily: family ? pptx$1.getSubstituteFontFamily(family) : chunkAIA7CY5U_js.DEFAULT_FONT_FAMILY,
17738
+ fontSizePx: s.fontSize ?? element.textStyle?.fontSize ?? chunkAIA7CY5U_js.DEFAULT_TEXT_FONT_SIZE,
17716
17739
  bold: s.bold ?? element.textStyle?.bold,
17717
17740
  italic: s.italic ?? element.textStyle?.italic
17718
17741
  };
@@ -17800,9 +17823,9 @@ function WarpedText({
17800
17823
  const warpAdj2 = textEl.textStyle?.textWarpAdj2;
17801
17824
  const align = textEl.textStyle?.align ?? "center";
17802
17825
  const { startOffset, textAnchor } = getAlignmentProps(align);
17803
- const baseFontSize = textEl.textStyle?.fontSize ?? chunk6GFSF2ML_js.DEFAULT_TEXT_FONT_SIZE;
17804
- const baseFontFamily = textEl.textStyle?.fontFamily ? pptx$1.getSubstituteFontFamily(textEl.textStyle.fontFamily) : chunk6GFSF2ML_js.DEFAULT_FONT_FAMILY;
17805
- const baseFill = chunk6GFSF2ML_js.normalizeHexColor(textEl.textStyle?.color, fallbackColor);
17826
+ const baseFontSize = textEl.textStyle?.fontSize ?? chunkAIA7CY5U_js.DEFAULT_TEXT_FONT_SIZE;
17827
+ const baseFontFamily = textEl.textStyle?.fontFamily ? pptx$1.getSubstituteFontFamily(textEl.textStyle.fontFamily) : chunkAIA7CY5U_js.DEFAULT_FONT_FAMILY;
17828
+ const baseFill = chunkAIA7CY5U_js.normalizeHexColor(textEl.textStyle?.color, fallbackColor);
17806
17829
  if (pptx.hasGlyphEnvelope(preset)) {
17807
17830
  const perLine = pptx.buildGlyphEnvelopeBlock(
17808
17831
  preset,
@@ -17965,7 +17988,7 @@ function renderEquationBox(el, interactive) {
17965
17988
  }
17966
17989
  const style = pptx.buildEquationBlockStyle(
17967
17990
  pptx.buildTextBlockStyle(el, {
17968
- fallbackColor: chunk6GFSF2ML_js.DEFAULT_TEXT_COLOR,
17991
+ fallbackColor: chunkAIA7CY5U_js.DEFAULT_TEXT_COLOR,
17969
17992
  bodyLayout: true,
17970
17993
  pxLengths: true
17971
17994
  })
@@ -17973,7 +17996,7 @@ function renderEquationBox(el, interactive) {
17973
17996
  return /* @__PURE__ */ jsxRuntime.jsx(
17974
17997
  "div",
17975
17998
  {
17976
- className: chunk6GFSF2ML_js.cn("relative z-10 w-full h-full", interactive ? "" : "pointer-events-none"),
17999
+ className: chunkAIA7CY5U_js.cn("relative z-10 w-full h-full", interactive ? "" : "pointer-events-none"),
17977
18000
  style,
17978
18001
  children: equations
17979
18002
  }
@@ -17999,7 +18022,7 @@ function renderTextElementBody(options) {
17999
18022
  const useSvgWarp = pptx.shouldUseSvgWarp(
18000
18023
  pptx$1.hasTextProperties(el) ? el.textStyle?.textWarpPreset : void 0
18001
18024
  );
18002
- const scene3dStyle = pptx$1.hasTextProperties(el) ? chunk6GFSF2ML_js.buildTextBody3DSceneStyle(el.textStyle, { width: el.width, height: el.height }) : void 0;
18025
+ const scene3dStyle = pptx$1.hasTextProperties(el) ? chunkAIA7CY5U_js.buildTextBody3DSceneStyle(el.textStyle, { width: el.width, height: el.height }) : void 0;
18003
18026
  const rotationTransform = pptx.getTextBodyRotationTransform(el);
18004
18027
  const compensation = pptx.getTextCompensationStyle(el);
18005
18028
  const composedTransform = [rotationTransform, compensation?.transform, scene3dStyle?.transform].filter(Boolean).join(" ") || void 0;
@@ -18032,18 +18055,18 @@ function renderTextElementBody(options) {
18032
18055
  shouldRenderText && !equationBox && (useSvgWarp ? /* @__PURE__ */ jsxRuntime.jsx(
18033
18056
  "div",
18034
18057
  {
18035
- className: chunk6GFSF2ML_js.cn(
18058
+ className: chunkAIA7CY5U_js.cn(
18036
18059
  "relative z-10 w-full h-full",
18037
18060
  onHyperlinkClick ? "" : "pointer-events-none"
18038
18061
  ),
18039
- style: { ...chunk6GFSF2ML_js.getTextLayoutStyle(el), ...transformStyle },
18062
+ style: { ...chunkAIA7CY5U_js.getTextLayoutStyle(el), ...transformStyle },
18040
18063
  children: /* @__PURE__ */ jsxRuntime.jsx(
18041
18064
  WarpedText,
18042
18065
  {
18043
18066
  element: el,
18044
18067
  width: el.width,
18045
18068
  height: el.height,
18046
- fallbackColor: chunk6GFSF2ML_js.DEFAULT_TEXT_COLOR,
18069
+ fallbackColor: chunkAIA7CY5U_js.DEFAULT_TEXT_COLOR,
18047
18070
  findHighlights: findHl,
18048
18071
  fieldContext
18049
18072
  }
@@ -18052,19 +18075,19 @@ function renderTextElementBody(options) {
18052
18075
  ) : /* @__PURE__ */ jsxRuntime.jsx(
18053
18076
  "div",
18054
18077
  {
18055
- className: chunk6GFSF2ML_js.cn(
18078
+ className: chunkAIA7CY5U_js.cn(
18056
18079
  "relative z-10 w-full h-full whitespace-pre-wrap break-words leading-[1.3]",
18057
18080
  onHyperlinkClick ? "" : "pointer-events-none"
18058
18081
  ),
18059
18082
  style: {
18060
- ...chunk6GFSF2ML_js.getTextLayoutStyle(el),
18083
+ ...chunkAIA7CY5U_js.getTextLayoutStyle(el),
18061
18084
  ...txtS,
18062
- ...chunk6GFSF2ML_js.getTextWarpStyle(txtSE),
18085
+ ...chunkAIA7CY5U_js.getTextWarpStyle(txtSE),
18063
18086
  ...transformStyle
18064
18087
  },
18065
- children: chunk6GFSF2ML_js.renderTextSegments(
18088
+ children: chunkAIA7CY5U_js.renderTextSegments(
18066
18089
  el,
18067
- chunk6GFSF2ML_js.DEFAULT_TEXT_COLOR,
18090
+ chunkAIA7CY5U_js.DEFAULT_TEXT_COLOR,
18068
18091
  void 0,
18069
18092
  findHl,
18070
18093
  onHyperlinkClick,
@@ -18085,7 +18108,7 @@ function ZoomElementRenderer({
18085
18108
  onZoomClick,
18086
18109
  sourceSlideIndex
18087
18110
  }) {
18088
- const { t } = chunk6GFSF2ML_js.useTranslation();
18111
+ const { t } = chunkAIA7CY5U_js.useTranslation();
18089
18112
  const summaryView = pptx.buildSummaryZoomView(
18090
18113
  element,
18091
18114
  (index) => {
@@ -18383,7 +18406,7 @@ function renderBody(options) {
18383
18406
  );
18384
18407
  }
18385
18408
  if (isImg) {
18386
- return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "absolute inset-0 pointer-events-none", style: chunk6GFSF2ML_js.getImageSurfaceStyle(el), children: [
18409
+ return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "absolute inset-0 pointer-events-none", style: chunkAIA7CY5U_js.getImageSurfaceStyle(el), children: [
18387
18410
  renderImg(el, imgStyle, imgFilter, imgAlt, imgOpacity),
18388
18411
  vecShape ? /* @__PURE__ */ jsxRuntime.jsx("div", { className: "pointer-events-none absolute inset-0", children: vecShape }) : null
18389
18412
  ] });
@@ -18400,7 +18423,7 @@ function renderBody(options) {
18400
18423
  textDirection: txtSE?.textDirection,
18401
18424
  textStyle: txtS,
18402
18425
  textStyleRaw: txtSE,
18403
- layoutStyle: chunk6GFSF2ML_js.getTextLayoutStyle(el),
18426
+ layoutStyle: chunkAIA7CY5U_js.getTextLayoutStyle(el),
18404
18427
  element: el,
18405
18428
  onCommit,
18406
18429
  onCancel,
@@ -18411,7 +18434,7 @@ function renderBody(options) {
18411
18434
  ] });
18412
18435
  }
18413
18436
  if (el.type === "table") {
18414
- return chunk6GFSF2ML_js.renderTableElement(el, txtS, {
18437
+ return chunkAIA7CY5U_js.renderTableElement(el, txtS, {
18415
18438
  editable: isSel,
18416
18439
  selectedCell: isSel ? tableSt : null,
18417
18440
  onSelectCell: onCellSel,
@@ -18444,7 +18467,7 @@ function renderBody(options) {
18444
18467
  );
18445
18468
  }
18446
18469
  if (el.type === "media") {
18447
- return chunk6GFSF2ML_js.renderMediaElement(el, media, {
18470
+ return chunkAIA7CY5U_js.renderMediaElement(el, media, {
18448
18471
  // Present mode autoplays every media element on the active slide,
18449
18472
  // not only ones persisted with their own `autoPlay` flag (matching
18450
18473
  // the other four bindings' unconditional `presenting`-gated
@@ -18500,27 +18523,27 @@ function renderBody(options) {
18500
18523
  }
18501
18524
  return renderGroup(el.children, pptx.getGroupChildParentFill(el));
18502
18525
  }
18503
- if (chunk6GFSF2ML_js.shouldRenderFallbackLabel(el, isTxtEl)) {
18504
- return /* @__PURE__ */ jsxRuntime.jsx("div", { className: "w-full h-full flex items-center justify-center text-[11px] text-white/80 pointer-events-none", children: chunk6GFSF2ML_js.getElementLabel(el) });
18526
+ if (chunkAIA7CY5U_js.shouldRenderFallbackLabel(el, isTxtEl)) {
18527
+ return /* @__PURE__ */ jsxRuntime.jsx("div", { className: "w-full h-full flex items-center justify-center text-[11px] text-white/80 pointer-events-none", children: chunkAIA7CY5U_js.getElementLabel(el) });
18505
18528
  }
18506
18529
  return renderTextElementBody(options);
18507
18530
  }
18508
18531
  function defaultTextColorForFill(fillColor) {
18509
18532
  const hex = String(fillColor ?? "").replace(/^#/u, "");
18510
18533
  if (!/^[0-9a-f]{6}$/iu.test(hex)) {
18511
- return chunk6GFSF2ML_js.DEFAULT_TEXT_COLOR;
18534
+ return chunkAIA7CY5U_js.DEFAULT_TEXT_COLOR;
18512
18535
  }
18513
18536
  const channels = [0, 2, 4].map((offset) => Number.parseInt(hex.slice(offset, offset + 2), 16) / 255).map((channel) => channel <= 0.04045 ? channel / 12.92 : ((channel + 0.055) / 1.055) ** 2.4);
18514
18537
  const luminance = channels[0] * 0.2126 + channels[1] * 0.7152 + channels[2] * 0.0722;
18515
- return luminance > 0.179 ? chunk6GFSF2ML_js.DEFAULT_TEXT_COLOR : "#ffffff";
18538
+ return luminance > 0.179 ? chunkAIA7CY5U_js.DEFAULT_TEXT_COLOR : "#ffffff";
18516
18539
  }
18517
18540
  function getStaticElementVisualState(element, parentGroupFill) {
18518
18541
  const style = pptx$1.hasShapeProperties(element) ? element.shapeStyle : void 0;
18519
- const hasFill = style?.fillColor !== void 0 && style.fillColor !== "transparent" || Boolean(chunk6GFSF2ML_js.buildCssGradientFromShapeStyle(style) || style?.fillGradient) || style?.fillMode === "pattern" && Boolean(style.fillPatternPreset);
18520
- const fill = chunk6GFSF2ML_js.normalizeHexColor(style?.fillColor, chunk6GFSF2ML_js.DEFAULT_FILL_COLOR);
18542
+ const hasFill = style?.fillColor !== void 0 && style.fillColor !== "transparent" || Boolean(chunkAIA7CY5U_js.buildCssGradientFromShapeStyle(style) || style?.fillGradient) || style?.fillMode === "pattern" && Boolean(style.fillPatternPreset);
18543
+ const fill = chunkAIA7CY5U_js.normalizeHexColor(style?.fillColor, chunkAIA7CY5U_js.DEFAULT_FILL_COLOR);
18521
18544
  const strokeWidth = pptx.paintedStrokeWidth(style);
18522
- const stroke = chunk6GFSF2ML_js.normalizeHexColor(style?.strokeColor, chunk6GFSF2ML_js.DEFAULT_STROKE_COLOR);
18523
- const baseVisualStyle = chunk6GFSF2ML_js.getShapeVisualStyle(element, hasFill, fill, strokeWidth, stroke);
18545
+ const stroke = chunkAIA7CY5U_js.normalizeHexColor(style?.strokeColor, chunkAIA7CY5U_js.DEFAULT_STROKE_COLOR);
18546
+ const baseVisualStyle = chunkAIA7CY5U_js.getShapeVisualStyle(element, hasFill, fill, strokeWidth, stroke);
18524
18547
  const inheritedFill = pptx.resolveGroupChildFill(element, parentGroupFill);
18525
18548
  const visualStyle = inheritedFill ? {
18526
18549
  ...baseVisualStyle,
@@ -18530,9 +18553,9 @@ function getStaticElementVisualState(element, parentGroupFill) {
18530
18553
  backgroundSize: inheritedFill.backgroundSize,
18531
18554
  backgroundPosition: inheritedFill.backgroundPosition
18532
18555
  } : baseVisualStyle;
18533
- const textStyle = chunk6GFSF2ML_js.getTextStyleForElement(
18556
+ const textStyle = chunkAIA7CY5U_js.getTextStyleForElement(
18534
18557
  element,
18535
- element.type === "shape" && hasFill ? defaultTextColorForFill(fill) : chunk6GFSF2ML_js.DEFAULT_TEXT_COLOR
18558
+ element.type === "shape" && hasFill ? defaultTextColorForFill(fill) : chunkAIA7CY5U_js.DEFAULT_TEXT_COLOR
18536
18559
  );
18537
18560
  const isImage = element.type === "picture" || element.type === "image";
18538
18561
  const letsTextOverflow = pptx$1.hasTextProperties(element) && Boolean(element.text?.trim());
@@ -18557,7 +18580,7 @@ function getStaticElementInteractionState(element, hasActionHandler, exposeEleme
18557
18580
  return { action, isActionable, contractRole };
18558
18581
  }
18559
18582
  function getStaticElementWrapperClassName(element, visual, positioned, isActionable) {
18560
- const overflowClass = visual.isImage || visual.strokeWidth > 0 || element.type === "group" || chunk6GFSF2ML_js.isConnectorOrLineElement(element) || visual.isCallout || visual.letsTextOverflow ? "" : "overflow-hidden";
18583
+ const overflowClass = visual.isImage || visual.strokeWidth > 0 || element.type === "group" || chunkAIA7CY5U_js.isConnectorOrLineElement(element) || visual.isCallout || visual.letsTextOverflow ? "" : "overflow-hidden";
18561
18584
  const pointerClass = isActionable ? "pointer-events-auto cursor-pointer" : "pointer-events-none";
18562
18585
  return `${positioned ? "absolute" : "relative"} ${overflowClass} ${pointerClass}`;
18563
18586
  }
@@ -18582,6 +18605,7 @@ function StaticElementRendererImpl({
18582
18605
  exposeElementId = false,
18583
18606
  suppressReflection = false
18584
18607
  }) {
18608
+ pptx.probeElementRenderFault(element);
18585
18609
  if (!pptx.isElementRendered(element)) {
18586
18610
  return null;
18587
18611
  }
@@ -18640,7 +18664,7 @@ function StaticElementRendererImpl({
18640
18664
  top: positioned ? element.y : void 0,
18641
18665
  width: positioned ? Math.max(element.width, 1) : "100%",
18642
18666
  height: positioned ? Math.max(element.height, 1) : "100%",
18643
- transform: positioned ? chunk6GFSF2ML_js.getElementTransform(element) : void 0,
18667
+ transform: positioned ? chunkAIA7CY5U_js.getElementTransform(element) : void 0,
18644
18668
  transformOrigin: "center",
18645
18669
  zIndex,
18646
18670
  ...visualStyle,
@@ -18683,18 +18707,18 @@ function StaticElementRendererImpl({
18683
18707
  spellCheck: false,
18684
18708
  txtSE: pptx$1.hasTextProperties(element) ? element.textStyle : void 0,
18685
18709
  txtS: textStyle,
18686
- vecShape: chunk6GFSF2ML_js.renderVectorShape(
18710
+ vecShape: chunkAIA7CY5U_js.renderVectorShape(
18687
18711
  element,
18688
18712
  isImage ? false : hasFill,
18689
18713
  fill,
18690
18714
  strokeWidth,
18691
18715
  stroke
18692
18716
  ),
18693
- imgStyle: imageAnimation ? { ...chunk6GFSF2ML_js.getImageRenderStyle(element), animation: imageAnimation } : chunk6GFSF2ML_js.getImageRenderStyle(element),
18694
- imgFilter: chunk6GFSF2ML_js.getImageEffectsFilter(element),
18695
- imgOpacity: chunk6GFSF2ML_js.getImageEffectsOpacity(element),
18717
+ imgStyle: imageAnimation ? { ...chunkAIA7CY5U_js.getImageRenderStyle(element), animation: imageAnimation } : chunkAIA7CY5U_js.getImageRenderStyle(element),
18718
+ imgFilter: chunkAIA7CY5U_js.getImageEffectsFilter(element),
18719
+ imgOpacity: chunkAIA7CY5U_js.getImageEffectsOpacity(element),
18696
18720
  imgAlt: "",
18697
- isTxtEl: chunk6GFSF2ML_js.isEditableTextElement(element),
18721
+ isTxtEl: chunkAIA7CY5U_js.isEditableTextElement(element),
18698
18722
  media: mediaDataUrls,
18699
18723
  tableSt: null,
18700
18724
  isSel: false,
@@ -18757,7 +18781,7 @@ function SlideLayer({
18757
18781
  style: {
18758
18782
  width: safeWidth,
18759
18783
  height: safeHeight,
18760
- backgroundColor: slide.backgroundColor ? chunk6GFSF2ML_js.normalizeHexColor(slide.backgroundColor, "#ffffff") : "#ffffff",
18784
+ backgroundColor: slide.backgroundColor ? chunkAIA7CY5U_js.normalizeHexColor(slide.backgroundColor, "#ffffff") : "#ffffff",
18761
18785
  backgroundImage: slide.backgroundImage ? `url(${slide.backgroundImage})` : slide.backgroundGradient ? slide.backgroundGradient : void 0,
18762
18786
  backgroundSize: slide.backgroundImage ? "cover" : void 0,
18763
18787
  backgroundPosition: slide.backgroundImage ? "center" : void 0
@@ -19306,6 +19330,7 @@ exports.ChartPartSelectionProvider = ChartPartSelectionProvider;
19306
19330
  exports.CollaborationCursorOverlay = CollaborationCursorOverlay;
19307
19331
  exports.CollaborationProvider = CollaborationProvider;
19308
19332
  exports.ElementRenderErrorReportingContext = ElementRenderErrorReportingContext;
19333
+ exports.ElementRenderErrorScope = ElementRenderErrorScope;
19309
19334
  exports.ElementRenderer = ElementRenderer;
19310
19335
  exports.FragmentedTransitionLayer = FragmentedTransitionLayer;
19311
19336
  exports.InlineCollaborationContext = InlineCollaborationContext;