pptx-react-viewer 4.38.0 → 4.40.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 (89) hide show
  1. package/CHANGELOG.md +55 -0
  2. package/dist/{AiChatPanel-5O6PHRSH.mjs → AiChatPanel-IDP326YW.mjs} +1 -1
  3. package/dist/AiChatPanel-IDP326YW.mjs.br +0 -0
  4. package/dist/AiChatPanel-IDP326YW.mjs.gz +0 -0
  5. package/dist/{AiChatPanel-FNHDAKPB.js → AiChatPanel-KEVVVR7C.js} +9 -9
  6. package/dist/AiChatPanel-KEVVVR7C.js.br +0 -0
  7. package/dist/AiChatPanel-KEVVVR7C.js.gz +0 -0
  8. package/dist/{chunk-43TOUP5U.js → chunk-3PKYNJJG.js} +8 -14
  9. package/dist/chunk-3PKYNJJG.js.br +0 -0
  10. package/dist/chunk-3PKYNJJG.js.gz +0 -0
  11. package/dist/{chunk-3SFBCFHJ.mjs → chunk-EQTNWM5Y.mjs} +58 -14
  12. package/dist/chunk-EQTNWM5Y.mjs.br +0 -0
  13. package/dist/chunk-EQTNWM5Y.mjs.gz +0 -0
  14. package/dist/{chunk-UC2VQORY.mjs → chunk-MNT2CXDI.mjs} +9 -15
  15. package/dist/chunk-MNT2CXDI.mjs.br +0 -0
  16. package/dist/chunk-MNT2CXDI.mjs.gz +0 -0
  17. package/dist/{chunk-LLH3I2XY.mjs → chunk-MZKSWYSM.mjs} +808 -440
  18. package/dist/chunk-MZKSWYSM.mjs.br +0 -0
  19. package/dist/chunk-MZKSWYSM.mjs.gz +0 -0
  20. package/dist/{chunk-TCEDOLGE.js → chunk-QJ4X7Y7S.js} +300 -254
  21. package/dist/chunk-QJ4X7Y7S.js.br +0 -0
  22. package/dist/chunk-QJ4X7Y7S.js.gz +0 -0
  23. package/dist/{chunk-Q5WEQ37H.js → chunk-WM7LBTSB.js} +2069 -1701
  24. package/dist/chunk-WM7LBTSB.js.br +0 -0
  25. package/dist/chunk-WM7LBTSB.js.gz +0 -0
  26. package/dist/i18n/de.cjs +819 -44
  27. package/dist/i18n/de.cjs.br +0 -0
  28. package/dist/i18n/de.cjs.gz +0 -0
  29. package/dist/i18n/de.mjs +819 -44
  30. package/dist/i18n/de.mjs.br +0 -0
  31. package/dist/i18n/de.mjs.gz +0 -0
  32. package/dist/i18n/es.cjs +819 -44
  33. package/dist/i18n/es.cjs.br +0 -0
  34. package/dist/i18n/es.cjs.gz +0 -0
  35. package/dist/i18n/es.mjs +819 -44
  36. package/dist/i18n/es.mjs.br +0 -0
  37. package/dist/i18n/es.mjs.gz +0 -0
  38. package/dist/i18n/fr.cjs +823 -45
  39. package/dist/i18n/fr.cjs.br +0 -0
  40. package/dist/i18n/fr.cjs.gz +0 -0
  41. package/dist/i18n/fr.mjs +823 -45
  42. package/dist/i18n/fr.mjs.br +0 -0
  43. package/dist/i18n/fr.mjs.gz +0 -0
  44. package/dist/i18n/zh-CN.cjs +829 -54
  45. package/dist/i18n/zh-CN.cjs.br +0 -0
  46. package/dist/i18n/zh-CN.cjs.gz +0 -0
  47. package/dist/i18n/zh-CN.mjs +829 -54
  48. package/dist/i18n/zh-CN.mjs.br +0 -0
  49. package/dist/i18n/zh-CN.mjs.gz +0 -0
  50. package/dist/index.d.ts +3 -0
  51. package/dist/index.js +24 -24
  52. package/dist/index.js.br +0 -0
  53. package/dist/index.js.gz +0 -0
  54. package/dist/index.mjs +3 -3
  55. package/dist/index.mjs.br +0 -0
  56. package/dist/index.mjs.gz +0 -0
  57. package/dist/internals.d.ts +25 -0
  58. package/dist/internals.js +81 -81
  59. package/dist/internals.js.br +0 -0
  60. package/dist/internals.js.gz +0 -0
  61. package/dist/internals.mjs +2 -2
  62. package/dist/internals.mjs.br +0 -0
  63. package/dist/internals.mjs.gz +0 -0
  64. package/dist/pptx-viewer.css +1 -1
  65. package/dist/pptx-viewer.css.br +0 -0
  66. package/dist/pptx-viewer.css.gz +0 -0
  67. package/dist/viewer/index.js +19 -19
  68. package/dist/viewer/index.js.br +0 -0
  69. package/dist/viewer/index.js.gz +0 -0
  70. package/dist/viewer/index.mjs +3 -3
  71. package/dist/viewer/index.mjs.br +0 -0
  72. package/dist/viewer/index.mjs.gz +0 -0
  73. package/package.json +3 -3
  74. package/dist/AiChatPanel-5O6PHRSH.mjs.br +0 -0
  75. package/dist/AiChatPanel-5O6PHRSH.mjs.gz +0 -0
  76. package/dist/AiChatPanel-FNHDAKPB.js.br +0 -0
  77. package/dist/AiChatPanel-FNHDAKPB.js.gz +0 -0
  78. package/dist/chunk-3SFBCFHJ.mjs.br +0 -0
  79. package/dist/chunk-3SFBCFHJ.mjs.gz +0 -0
  80. package/dist/chunk-43TOUP5U.js.br +0 -0
  81. package/dist/chunk-43TOUP5U.js.gz +0 -0
  82. package/dist/chunk-LLH3I2XY.mjs.br +0 -0
  83. package/dist/chunk-LLH3I2XY.mjs.gz +0 -0
  84. package/dist/chunk-Q5WEQ37H.js.br +0 -0
  85. package/dist/chunk-Q5WEQ37H.js.gz +0 -0
  86. package/dist/chunk-TCEDOLGE.js.br +0 -0
  87. package/dist/chunk-TCEDOLGE.js.gz +0 -0
  88. package/dist/chunk-UC2VQORY.mjs.br +0 -0
  89. package/dist/chunk-UC2VQORY.mjs.gz +0 -0
@@ -1,6 +1,6 @@
1
1
  'use strict';
2
2
 
3
- var chunk43TOUP5U_js = require('./chunk-43TOUP5U.js');
3
+ var chunk3PKYNJJG_js = require('./chunk-3PKYNJJG.js');
4
4
  var pptx = require('ooxml-ui/pptx');
5
5
  var React17 = require('react');
6
6
  var jsxRuntime = require('react/jsx-runtime');
@@ -684,9 +684,9 @@ function serializeHistoryDocument(snapshot) {
684
684
  }
685
685
  function recordExplicitSlideUpdate(past, future, previous, before, label, maxDepth) {
686
686
  if (previous && serializeHistoryDocument(previous) !== serializeHistoryDocument(before)) {
687
- past.push(chunk43TOUP5U_js.cloneHistorySnapshot(previous));
687
+ past.push(chunk3PKYNJJG_js.cloneHistorySnapshot(previous));
688
688
  }
689
- past.push({ ...chunk43TOUP5U_js.cloneHistorySnapshot(before), actionLabel: label });
689
+ past.push({ ...chunk3PKYNJJG_js.cloneHistorySnapshot(before), actionLabel: label });
690
690
  while (past.length > Math.max(1, maxDepth)) {
691
691
  past.shift();
692
692
  }
@@ -752,6 +752,7 @@ function useEditorHistory(input) {
752
752
  const lastHistorySerializedRef = React17.useRef("");
753
753
  const lastCheapHashRef = React17.useRef("");
754
754
  const isApplyingHistoryRef = React17.useRef(false);
755
+ const trackingHeldRef = React17.useRef(false);
755
756
  const unlockHistoryTimerRef = React17.useRef(null);
756
757
  const [canUndo, setCanUndo] = React17.useState(false);
757
758
  const [canRedo, setCanRedo] = React17.useState(false);
@@ -775,8 +776,8 @@ function useEditorHistory(input) {
775
776
  width: canvasSize.width,
776
777
  height: canvasSize.height,
777
778
  activeSlideIndex,
778
- slides: slides.map(chunk43TOUP5U_js.cloneSlide),
779
- templateElementsBySlideId: chunk43TOUP5U_js.cloneTemplateElementsBySlideId(templateElementsBySlideId),
779
+ slides: slides.map(chunk3PKYNJJG_js.cloneSlide),
780
+ templateElementsBySlideId: chunk3PKYNJJG_js.cloneTemplateElementsBySlideId(templateElementsBySlideId),
780
781
  ...actionLabel ? { actionLabel } : {}
781
782
  };
782
783
  },
@@ -789,9 +790,9 @@ function useEditorHistory(input) {
789
790
  width: snapshot.width,
790
791
  height: snapshot.height
791
792
  });
792
- setSlides(snapshot.slides.map(chunk43TOUP5U_js.cloneSlide));
793
+ setSlides(snapshot.slides.map(chunk3PKYNJJG_js.cloneSlide));
793
794
  setTemplateElementsBySlideId(
794
- chunk43TOUP5U_js.cloneTemplateElementsBySlideId(snapshot.templateElementsBySlideId)
795
+ chunk3PKYNJJG_js.cloneTemplateElementsBySlideId(snapshot.templateElementsBySlideId)
795
796
  );
796
797
  setActiveSlideIndex(Math.min(snapshot.activeSlideIndex, maxSlideIndex));
797
798
  setSelectedElementIds([]);
@@ -830,8 +831,8 @@ function useEditorHistory(input) {
830
831
  const currentSnapshot = buildHistorySnapshot(previousSnapshot.actionLabel);
831
832
  historyFutureRef.current.push(currentSnapshot);
832
833
  isApplyingHistoryRef.current = true;
833
- const nextSnapshot = chunk43TOUP5U_js.cloneHistorySnapshot(previousSnapshot);
834
- lastHistorySnapshotRef.current = chunk43TOUP5U_js.cloneHistorySnapshot(nextSnapshot);
834
+ const nextSnapshot = chunk3PKYNJJG_js.cloneHistorySnapshot(previousSnapshot);
835
+ lastHistorySnapshotRef.current = chunk3PKYNJJG_js.cloneHistorySnapshot(nextSnapshot);
835
836
  lastHistorySerializedRef.current = serializeHistoryDocument(nextSnapshot);
836
837
  applyHistorySnapshot(nextSnapshot);
837
838
  updateHistoryAvailability();
@@ -852,8 +853,8 @@ function useEditorHistory(input) {
852
853
  const currentSnapshot = buildHistorySnapshot(nextSnapshot.actionLabel);
853
854
  historyPastRef.current.push(currentSnapshot);
854
855
  isApplyingHistoryRef.current = true;
855
- const targetSnapshot = chunk43TOUP5U_js.cloneHistorySnapshot(nextSnapshot);
856
- lastHistorySnapshotRef.current = chunk43TOUP5U_js.cloneHistorySnapshot(targetSnapshot);
856
+ const targetSnapshot = chunk3PKYNJJG_js.cloneHistorySnapshot(nextSnapshot);
857
+ lastHistorySnapshotRef.current = chunk3PKYNJJG_js.cloneHistorySnapshot(targetSnapshot);
857
858
  lastHistorySerializedRef.current = serializeHistoryDocument(targetSnapshot);
858
859
  applyHistorySnapshot(targetSnapshot);
859
860
  updateHistoryAvailability();
@@ -871,7 +872,7 @@ function useEditorHistory(input) {
871
872
  historyPastRef.current = [];
872
873
  historyFutureRef.current = [];
873
874
  if (initialSnapshot) {
874
- const clonedInitial = chunk43TOUP5U_js.cloneHistorySnapshot(initialSnapshot);
875
+ const clonedInitial = chunk3PKYNJJG_js.cloneHistorySnapshot(initialSnapshot);
875
876
  lastHistorySnapshotRef.current = clonedInitial;
876
877
  lastHistorySerializedRef.current = serializeHistoryDocument(clonedInitial);
877
878
  } else {
@@ -894,7 +895,7 @@ function useEditorHistory(input) {
894
895
  if (loading || error) {
895
896
  return;
896
897
  }
897
- if (isApplyingHistoryRef.current) {
898
+ if (isApplyingHistoryRef.current || trackingHeldRef.current) {
898
899
  return;
899
900
  }
900
901
  if (hasActivePointerInteraction()) {
@@ -953,8 +954,8 @@ function useEditorHistory(input) {
953
954
  updateHistoryAvailability
954
955
  ]);
955
956
  const commitSlides = (nextSlides, label, beforeSlides = slides) => {
956
- const before = { ...buildHistorySnapshot(), slides: beforeSlides.map(chunk43TOUP5U_js.cloneSlide) };
957
- const after = { ...before, slides: nextSlides.map(chunk43TOUP5U_js.cloneSlide) };
957
+ const before = { ...buildHistorySnapshot(), slides: beforeSlides.map(chunk3PKYNJJG_js.cloneSlide) };
958
+ const after = { ...before, slides: nextSlides.map(chunk3PKYNJJG_js.cloneSlide) };
958
959
  recordExplicitSlideUpdate(
959
960
  historyPastRef.current,
960
961
  historyFutureRef.current,
@@ -963,15 +964,19 @@ function useEditorHistory(input) {
963
964
  label,
964
965
  maxHistoryEntries
965
966
  );
966
- lastHistorySnapshotRef.current = chunk43TOUP5U_js.cloneHistorySnapshot(after);
967
+ lastHistorySnapshotRef.current = chunk3PKYNJJG_js.cloneHistorySnapshot(after);
967
968
  lastHistorySerializedRef.current = serializeHistoryDocument(after);
968
969
  isApplyingHistoryRef.current = false;
969
970
  setSlides(nextSlides);
970
971
  onDirtyRef.current?.();
971
972
  updateHistoryAvailability();
972
973
  };
974
+ const holdTracking = React17.useCallback((held) => {
975
+ trackingHeldRef.current = held;
976
+ }, []);
973
977
  return {
974
978
  commitSlides,
979
+ holdTracking,
975
980
  canUndo,
976
981
  canRedo,
977
982
  undoLabel,
@@ -1002,11 +1007,10 @@ function useViewerStore(store, selector, isEqual = Object.is) {
1002
1007
  );
1003
1008
  return React17.useSyncExternalStore(subscribe2, getSnapshot2, getSnapshot2);
1004
1009
  }
1005
- var DEFAULT_FIT = pptx.EDITOR_VIEWPORT_FIT;
1006
1010
  function useViewportFit(canvasSize, viewportRef, options, viewportNode) {
1007
1011
  const [editorDimensions, setEditorDimensions] = React17.useState(null);
1008
- const { fitPadding, maxFitScale } = pptx.resolveViewportFitOptions(options, DEFAULT_FIT);
1009
- const { horizontal, vertical } = fitPadding;
1012
+ const { maxFitScale } = pptx.resolveViewportFitOptions(options, pptx.editorViewportFitFor(Infinity));
1013
+ const hostPadding = options.fitPadding;
1010
1014
  const effectiveEditorDimensions = editorDimensions ?? canvasSize;
1011
1015
  const { scale: fitScale } = pptx.calculateViewportFit({
1012
1016
  viewportWidth: effectiveEditorDimensions.width,
@@ -1027,7 +1031,11 @@ function useViewportFit(canvasSize, viewportRef, options, viewportNode) {
1027
1031
  viewportHeight: element.clientHeight,
1028
1032
  canvasWidth: canvasSize.width,
1029
1033
  canvasHeight: canvasSize.height,
1030
- fitPadding: { horizontal, vertical }
1034
+ // The host's padding when it gave one, else the width-aware editor default.
1035
+ ...pptx.resolveViewportFitOptions(
1036
+ { fitPadding: hostPadding },
1037
+ pptx.editorViewportFitFor(element.clientWidth)
1038
+ )
1031
1039
  });
1032
1040
  if (width > 0 && height > 0) {
1033
1041
  setEditorDimensions({ width, height });
@@ -1048,7 +1056,7 @@ function useViewportFit(canvasSize, viewportRef, options, viewportNode) {
1048
1056
  cancelAnimationFrame(raf);
1049
1057
  observer?.disconnect();
1050
1058
  };
1051
- }, [viewportRef, viewportNode, canvasSize.width, canvasSize.height, horizontal, vertical]);
1059
+ }, [viewportRef, viewportNode, canvasSize.width, canvasSize.height, hostPadding]);
1052
1060
  return { editorDimensions, setEditorDimensions, effectiveEditorDimensions, fitScale };
1053
1061
  }
1054
1062
  function useViewportNode() {
@@ -1143,22 +1151,22 @@ function useZoomViewport({
1143
1151
  selectedElements.forEach((element) => {
1144
1152
  minX = Math.min(minX, element.x);
1145
1153
  minY = Math.min(minY, element.y);
1146
- maxX = Math.max(maxX, element.x + Math.max(element.width, chunk43TOUP5U_js.MIN_ELEMENT_SIZE));
1147
- maxY = Math.max(maxY, element.y + Math.max(element.height, chunk43TOUP5U_js.MIN_ELEMENT_SIZE));
1154
+ maxX = Math.max(maxX, element.x + Math.max(element.width, chunk3PKYNJJG_js.MIN_ELEMENT_SIZE));
1155
+ maxY = Math.max(maxY, element.y + Math.max(element.height, chunk3PKYNJJG_js.MIN_ELEMENT_SIZE));
1148
1156
  });
1149
1157
  if (!Number.isFinite(minX) || !Number.isFinite(minY) || !Number.isFinite(maxX) || !Number.isFinite(maxY)) {
1150
1158
  return;
1151
1159
  }
1152
1160
  const selectionBounds = { minX, minY, maxX, maxY };
1153
- const boundsWidth = Math.max(selectionBounds.maxX - selectionBounds.minX, chunk43TOUP5U_js.MIN_ELEMENT_SIZE);
1154
- const boundsHeight = Math.max(selectionBounds.maxY - selectionBounds.minY, chunk43TOUP5U_js.MIN_ELEMENT_SIZE);
1161
+ const boundsWidth = Math.max(selectionBounds.maxX - selectionBounds.minX, chunk3PKYNJJG_js.MIN_ELEMENT_SIZE);
1162
+ const boundsHeight = Math.max(selectionBounds.maxY - selectionBounds.minY, chunk3PKYNJJG_js.MIN_ELEMENT_SIZE);
1155
1163
  const availableWidth = Math.max(
1156
- effectiveEditorDimensions.width - chunk43TOUP5U_js.ZOOM_TO_SELECTION_PADDING,
1157
- chunk43TOUP5U_js.MIN_ELEMENT_SIZE
1164
+ effectiveEditorDimensions.width - chunk3PKYNJJG_js.ZOOM_TO_SELECTION_PADDING,
1165
+ chunk3PKYNJJG_js.MIN_ELEMENT_SIZE
1158
1166
  );
1159
1167
  const availableHeight = Math.max(
1160
- effectiveEditorDimensions.height - chunk43TOUP5U_js.ZOOM_TO_SELECTION_PADDING,
1161
- chunk43TOUP5U_js.MIN_ELEMENT_SIZE
1168
+ effectiveEditorDimensions.height - chunk3PKYNJJG_js.ZOOM_TO_SELECTION_PADDING,
1169
+ chunk3PKYNJJG_js.MIN_ELEMENT_SIZE
1162
1170
  );
1163
1171
  const targetEditorScale = Math.min(
1164
1172
  availableWidth / boundsWidth,
@@ -4125,8 +4133,8 @@ function useViewerCoreState(_input) {
4125
4133
  const { slides, setSlides, slidesRef } = useSlideState();
4126
4134
  const [templateElementsBySlideId, setTemplateElementsBySlideId] = React17.useState({});
4127
4135
  const [canvasSize, setCanvasSize] = React17.useState({
4128
- width: chunk43TOUP5U_js.DEFAULT_CANVAS_WIDTH,
4129
- height: chunk43TOUP5U_js.DEFAULT_CANVAS_HEIGHT
4136
+ width: chunk3PKYNJJG_js.DEFAULT_CANVAS_WIDTH,
4137
+ height: chunk3PKYNJJG_js.DEFAULT_CANVAS_HEIGHT
4130
4138
  });
4131
4139
  const [slideSizeEmu, setSlideSizeEmu] = React17.useState();
4132
4140
  const [activeSlideIndex, setActiveSlideIndex] = React17.useState(0);
@@ -4157,6 +4165,7 @@ function useViewerCoreState(_input) {
4157
4165
  const [modernCommentAuthors, setModernCommentAuthors] = React17.useState([]);
4158
4166
  const [recentColors, setRecentColors] = React17.useState([]);
4159
4167
  const [theme, setTheme] = React17.useState();
4168
+ const deckStyleHeldRef = React17.useRef(void 0);
4160
4169
  const [tableStyleMap, setTableStyleMap] = React17.useState();
4161
4170
  const [tableStylesDefaultId, setTableStylesDefaultId] = React17.useState();
4162
4171
  const [tableStylesToDelete, setTableStylesToDelete] = React17.useState([]);
@@ -4254,6 +4263,7 @@ function useViewerCoreState(_input) {
4254
4263
  recentColors,
4255
4264
  setRecentColors,
4256
4265
  theme,
4266
+ deckStyleHeldRef,
4257
4267
  setTheme,
4258
4268
  tableStyleMap,
4259
4269
  setTableStyleMap,
@@ -4320,6 +4330,7 @@ function useViewerUIState(inspectorInitiallyOpen) {
4320
4330
  typeof window === "undefined" || window.innerWidth >= 768
4321
4331
  )
4322
4332
  );
4333
+ const [isMobileInsertOpen, setIsMobileInsertOpen] = React17.useState(false);
4323
4334
  const [isSlideNotesCollapsed, setIsSlideNotesCollapsed] = React17.useState(true);
4324
4335
  const [isOverflowMenuOpen, setIsOverflowMenuOpen] = React17.useState(false);
4325
4336
  const [isSidebarCollapsed, setIsSidebarCollapsed] = React17.useState(false);
@@ -4362,6 +4373,8 @@ function useViewerUIState(inspectorInitiallyOpen) {
4362
4373
  setToolbarSection,
4363
4374
  isSlidesPaneOpen,
4364
4375
  setIsSlidesPaneOpen,
4376
+ isMobileInsertOpen,
4377
+ setIsMobileInsertOpen,
4365
4378
  isInspectorPaneOpen,
4366
4379
  setIsInspectorPaneOpen,
4367
4380
  isSlideNotesCollapsed,
@@ -4509,7 +4522,7 @@ function useLoadContent({
4509
4522
  }
4510
4523
  let cancelled = false;
4511
4524
  const token = ++renderTokenRef.current;
4512
- const handler = new chunk43TOUP5U_js.dist_exports.PptxHandler();
4525
+ const handler = new chunk3PKYNJJG_js.dist_exports.PptxHandler();
4513
4526
  const resources = pptx.createPresentationLoadResources(handler);
4514
4527
  const loadBlobUrls = resources.blobUrls;
4515
4528
  (async () => {
@@ -4594,12 +4607,12 @@ function useLoadContent({
4594
4607
  }
4595
4608
  resources.commit();
4596
4609
  handlerRef.current = handler;
4597
- const partition = chunk43TOUP5U_js.partitionTemplateElements(nextSlides);
4610
+ const partition = chunk3PKYNJJG_js.partitionTemplateElements(nextSlides);
4598
4611
  setSlides(partition.slides);
4599
4612
  setTemplateElementsBySlideId(partition.templateElementsBySlideId);
4600
4613
  setCanvasSize({
4601
- width: parsed.width ?? chunk43TOUP5U_js.DEFAULT_CANVAS_WIDTH,
4602
- height: parsed.height ?? chunk43TOUP5U_js.DEFAULT_CANVAS_HEIGHT
4614
+ width: parsed.width ?? chunk3PKYNJJG_js.DEFAULT_CANVAS_WIDTH,
4615
+ height: parsed.height ?? chunk3PKYNJJG_js.DEFAULT_CANVAS_HEIGHT
4603
4616
  });
4604
4617
  setSlideSizeEmu(
4605
4618
  typeof parsed.widthEmu === "number" && typeof parsed.heightEmu === "number" && parsed.widthEmu > 0 && parsed.heightEmu > 0 ? {
@@ -4663,7 +4676,7 @@ function useLoadContent({
4663
4676
  onContentApplied?.();
4664
4677
  } catch (err) {
4665
4678
  if (!cancelled && token === renderTokenRef.current) {
4666
- if (err instanceof chunk43TOUP5U_js.dist_exports.EncryptedFileError) {
4679
+ if (err instanceof chunk3PKYNJJG_js.dist_exports.EncryptedFileError) {
4667
4680
  setIsEncrypted(true);
4668
4681
  } else {
4669
4682
  console.error("[pptx] Failed to load presentation content:", err);
@@ -4788,7 +4801,7 @@ function useTextElementOperations(input) {
4788
4801
  updateSelectedElement
4789
4802
  } = input;
4790
4803
  const liveTextSegments = React17.useCallback(() => {
4791
- if (!selectedElement || !(0, chunk43TOUP5U_js.dist_exports.hasTextProperties)(selectedElement)) {
4804
+ if (!selectedElement || !(0, chunk3PKYNJJG_js.dist_exports.hasTextProperties)(selectedElement)) {
4792
4805
  return void 0;
4793
4806
  }
4794
4807
  if (selectedElement.id !== inlineEditingElementId) {
@@ -4806,7 +4819,7 @@ function useTextElementOperations(input) {
4806
4819
  }, [selectedElement, inlineEditingElementId, inlineEditingText, inlineEditingSnapshotRef]);
4807
4820
  const updateSelectedTextStyle = React17.useCallback(
4808
4821
  (updates) => {
4809
- if (!selectedElement || !(0, chunk43TOUP5U_js.dist_exports.hasTextProperties)(selectedElement)) {
4822
+ if (!selectedElement || !(0, chunk3PKYNJJG_js.dist_exports.hasTextProperties)(selectedElement)) {
4810
4823
  return;
4811
4824
  }
4812
4825
  const isLiveEditing = selectedElement.id === inlineEditingElementId;
@@ -4884,7 +4897,7 @@ function useTextElementOperations(input) {
4884
4897
  );
4885
4898
  const toggleSelectedBullets = React17.useCallback(
4886
4899
  (kind) => {
4887
- if (!selectedElement || !(0, chunk43TOUP5U_js.dist_exports.hasTextProperties)(selectedElement)) {
4900
+ if (!selectedElement || !(0, chunk3PKYNJJG_js.dist_exports.hasTextProperties)(selectedElement)) {
4888
4901
  return;
4889
4902
  }
4890
4903
  const currentSegments = liveTextSegments();
@@ -4935,7 +4948,7 @@ function useTextElementOperations(input) {
4935
4948
  );
4936
4949
  const updateSelectedTextCase = React17.useCallback(
4937
4950
  (mode) => {
4938
- if (!selectedElement || !(0, chunk43TOUP5U_js.dist_exports.hasTextProperties)(selectedElement)) {
4951
+ if (!selectedElement || !(0, chunk3PKYNJJG_js.dist_exports.hasTextProperties)(selectedElement)) {
4939
4952
  return;
4940
4953
  }
4941
4954
  const isLiveEditing = selectedElement.id === inlineEditingElementId;
@@ -5051,7 +5064,7 @@ function useElementOperations(input) {
5051
5064
  );
5052
5065
  return;
5053
5066
  }
5054
- if (chunk43TOUP5U_js.isTemplateElementId(elementId)) {
5067
+ if (chunk3PKYNJJG_js.isTemplateElementId(elementId)) {
5055
5068
  const slideId = activeSlide?.id;
5056
5069
  if (slideId) {
5057
5070
  setTemplateElementsBySlideId((prev) => ({
@@ -5087,7 +5100,7 @@ function useElementOperations(input) {
5087
5100
  );
5088
5101
  const updateSelectedShapeStyle = React17.useCallback(
5089
5102
  (updates) => {
5090
- if (!selectedElement || !(0, chunk43TOUP5U_js.dist_exports.hasShapeProperties)(selectedElement)) {
5103
+ if (!selectedElement || !(0, chunk3PKYNJJG_js.dist_exports.hasShapeProperties)(selectedElement)) {
5091
5104
  return;
5092
5105
  }
5093
5106
  updateSelectedElement({
@@ -5291,15 +5304,15 @@ function syncSelectionHandleOverlay(elementNode, elementId, geometry) {
5291
5304
  // src/viewer/hooks/pointer-move-handlers.ts
5292
5305
  function computeResizeGeometry(handle, startX, startY, startWidth, startHeight, dx, dy, snapToGrid, gridSpacingPx, lockAspect = false) {
5293
5306
  const startBox = { x: startX, y: startY, width: startWidth, height: startHeight };
5294
- let resized = pptx.applyResize(startBox, handle, dx, dy, 1, { minSize: chunk43TOUP5U_js.MIN_ELEMENT_SIZE });
5307
+ let resized = pptx.applyResize(startBox, handle, dx, dy, 1, { minSize: chunk3PKYNJJG_js.MIN_ELEMENT_SIZE });
5295
5308
  if (lockAspect) {
5296
- resized = pptx.lockResizeAspect(resized, startBox, handle, chunk43TOUP5U_js.MIN_ELEMENT_SIZE);
5309
+ resized = pptx.lockResizeAspect(resized, startBox, handle, chunk3PKYNJJG_js.MIN_ELEMENT_SIZE);
5297
5310
  }
5298
5311
  const box = { x: resized.x, y: resized.y, width: resized.width, height: resized.height };
5299
5312
  if (!snapToGrid) {
5300
5313
  return box;
5301
5314
  }
5302
- return pptx.snapBoxToGrid(box, handle, gridSpacingPx, chunk43TOUP5U_js.MIN_ELEMENT_SIZE);
5315
+ return pptx.snapBoxToGrid(box, handle, gridSpacingPx, chunk3PKYNJJG_js.MIN_ELEMENT_SIZE);
5303
5316
  }
5304
5317
  function resolveLiveTarget(input) {
5305
5318
  const { livePatcher, editTemplateMode, activeSlide } = input;
@@ -5412,7 +5425,7 @@ function processDragMove(e, drag, editorScale, snapToGrid, snapToShape, gridSpac
5412
5425
  width: el.width,
5413
5426
  height: el.height
5414
5427
  }));
5415
- const snapResult = chunk43TOUP5U_js.computeSnapToShape(
5428
+ const snapResult = chunk3PKYNJJG_js.computeSnapToShape(
5416
5429
  targetX,
5417
5430
  targetY,
5418
5431
  primaryEl.width,
@@ -5486,8 +5499,8 @@ function processResizeMove(e, rs, editorScale, snapToGrid, gridSpacingPx, live)
5486
5499
  rs.lastY = geo.y;
5487
5500
  rs.lastWidth = geo.width;
5488
5501
  rs.lastHeight = geo.height;
5489
- const width = Math.max(geo.width, chunk43TOUP5U_js.MIN_ELEMENT_SIZE);
5490
- const height = Math.max(geo.height, chunk43TOUP5U_js.MIN_ELEMENT_SIZE);
5502
+ const width = Math.max(geo.width, chunk3PKYNJJG_js.MIN_ELEMENT_SIZE);
5503
+ const height = Math.max(geo.height, chunk3PKYNJJG_js.MIN_ELEMENT_SIZE);
5491
5504
  if (rs.domEl) {
5492
5505
  rs.domEl.style.left = `${geo.x}px`;
5493
5506
  rs.domEl.style.top = `${geo.y}px`;
@@ -5580,13 +5593,13 @@ function processPointerUp(input) {
5580
5593
  if (i !== activeSlideIndex) {
5581
5594
  return s;
5582
5595
  }
5583
- const rerouted = chunk43TOUP5U_js.rerouteConnectorsForMovedElements(s.elements, movedIds);
5596
+ const rerouted = chunk3PKYNJJG_js.rerouteConnectorsForMovedElements(s.elements, movedIds);
5584
5597
  if (rerouted.length === 0) {
5585
5598
  return s;
5586
5599
  }
5587
5600
  return {
5588
5601
  ...s,
5589
- elements: chunk43TOUP5U_js.applyReroutedConnectors(s.elements, rerouted)
5602
+ elements: chunk3PKYNJJG_js.applyReroutedConnectors(s.elements, rerouted)
5590
5603
  };
5591
5604
  })
5592
5605
  );
@@ -5638,8 +5651,8 @@ function commitDrag(drag, editTemplateMode, activeSlide, activeSlideIndex, setTe
5638
5651
  }
5639
5652
  return { ...el, x: start.x + dx, y: start.y + dy };
5640
5653
  });
5641
- const rerouted = chunk43TOUP5U_js.rerouteConnectorsForMovedElements(movedElements, movedIds);
5642
- return chunk43TOUP5U_js.applyReroutedConnectors(movedElements, rerouted);
5654
+ const rerouted = chunk3PKYNJJG_js.rerouteConnectorsForMovedElements(movedElements, movedIds);
5655
+ return chunk3PKYNJJG_js.applyReroutedConnectors(movedElements, rerouted);
5643
5656
  };
5644
5657
  if (editTemplateMode) {
5645
5658
  const slideId = activeSlide?.id;
@@ -5827,7 +5840,7 @@ function useCanvasInteractions(input) {
5827
5840
  return;
5828
5841
  }
5829
5842
  const el = elementLookup.get(editId);
5830
- if (el && (0, chunk43TOUP5U_js.dist_exports.hasTextProperties)(el)) {
5843
+ if (el && (0, chunk3PKYNJJG_js.dist_exports.hasTextProperties)(el)) {
5831
5844
  const reader = inlineEditingReaderRef?.current;
5832
5845
  const read = reader?.elementId === editId ? reader.read() : void 0;
5833
5846
  if (read?.kind === "unsupported") {
@@ -5874,7 +5887,7 @@ function useCanvasInteractions(input) {
5874
5887
  wasEditable.current = canEdit;
5875
5888
  }, [canEdit]);
5876
5889
  const openEquationEditorForElement = (el) => {
5877
- if (!(0, chunk43TOUP5U_js.dist_exports.hasTextProperties)(el)) {
5890
+ if (!(0, chunk3PKYNJJG_js.dist_exports.hasTextProperties)(el)) {
5878
5891
  return false;
5879
5892
  }
5880
5893
  const eqSeg = el.textSegments?.find((seg) => seg.equationXml);
@@ -5907,7 +5920,7 @@ function useCanvasInteractions(input) {
5907
5920
  justInteractedRef.current = false;
5908
5921
  } else {
5909
5922
  const el = elementLookup.get(elementId);
5910
- if (el && (0, chunk43TOUP5U_js.dist_exports.hasTextProperties)(el) && pptx.canInteractWithElement(el, "textEdit")) {
5923
+ if (el && (0, chunk3PKYNJJG_js.dist_exports.hasTextProperties)(el) && pptx.canInteractWithElement(el, "textEdit")) {
5911
5924
  if (!openEquationEditorForElement(el)) {
5912
5925
  pptx.setPendingCaretPoint(e);
5913
5926
  setInlineEditingElementId(elementId);
@@ -5933,7 +5946,7 @@ function useCanvasInteractions(input) {
5933
5946
  if (openEquationEditorForElement(el)) {
5934
5947
  return;
5935
5948
  }
5936
- if ((0, chunk43TOUP5U_js.dist_exports.hasTextProperties)(el) && pptx.canInteractWithElement(el, "textEdit")) {
5949
+ if ((0, chunk3PKYNJJG_js.dist_exports.hasTextProperties)(el) && pptx.canInteractWithElement(el, "textEdit")) {
5937
5950
  setInlineEditingElementId(elementId);
5938
5951
  setInlineEditingText(el.text ?? "");
5939
5952
  }
@@ -6398,7 +6411,7 @@ function createStructuredElementHandlers(deps) {
6398
6411
  return;
6399
6412
  }
6400
6413
  const resolved = resolveHyperlinkEditResult(data);
6401
- if (resolved.url && !chunk43TOUP5U_js.isUrlSafe(resolved.url)) {
6414
+ if (resolved.url && !chunk3PKYNJJG_js.isUrlSafe(resolved.url)) {
6402
6415
  return;
6403
6416
  }
6404
6417
  const actionClick = {
@@ -6444,11 +6457,11 @@ function createStructuredElementHandlers(deps) {
6444
6457
  if (!activeSlide) {
6445
6458
  return;
6446
6459
  }
6447
- const preset = chunk43TOUP5U_js.ACTION_BUTTON_PRESETS.find((p) => p.shapeType === shapeType);
6460
+ const preset = chunk3PKYNJJG_js.ACTION_BUTTON_PRESETS.find((p) => p.shapeType === shapeType);
6448
6461
  if (!preset) {
6449
6462
  return;
6450
6463
  }
6451
- const defaultPptxAction = (0, chunk43TOUP5U_js.dist_exports.elementActionToPptxAction)({
6464
+ const defaultPptxAction = (0, chunk3PKYNJJG_js.dist_exports.elementActionToPptxAction)({
6452
6465
  trigger: "click",
6453
6466
  type: preset.defaultAction
6454
6467
  });
@@ -6531,7 +6544,7 @@ function useInsertElements(input) {
6531
6544
  width: 300,
6532
6545
  height: 60,
6533
6546
  text: "",
6534
- textStyle: { fontSize: chunk43TOUP5U_js.DEFAULT_TEXT_FONT_SIZE }
6547
+ textStyle: { fontSize: chunk3PKYNJJG_js.DEFAULT_TEXT_FONT_SIZE }
6535
6548
  });
6536
6549
  };
6537
6550
  const handleAddShape = () => {
@@ -6553,7 +6566,7 @@ function useInsertElements(input) {
6553
6566
  }
6554
6567
  });
6555
6568
  };
6556
- const handleAddTable = (rows = chunk43TOUP5U_js.DEFAULT_TABLE_ROWS, columns = chunk43TOUP5U_js.DEFAULT_TABLE_COLUMNS) => {
6569
+ const handleAddTable = (rows = chunk3PKYNJJG_js.DEFAULT_TABLE_ROWS, columns = chunk3PKYNJJG_js.DEFAULT_TABLE_COLUMNS) => {
6557
6570
  if (!activeSlide) {
6558
6571
  return;
6559
6572
  }
@@ -6727,7 +6740,7 @@ function useGroupAlignLayerHandlers(input) {
6727
6740
  history
6728
6741
  } = input;
6729
6742
  const updateElementsOwning = (elementId, updater) => {
6730
- if (editTemplateMode && !chunk43TOUP5U_js.isTemplateElementId(elementId)) {
6743
+ if (editTemplateMode && !chunk3PKYNJJG_js.isTemplateElementId(elementId)) {
6731
6744
  ops.updateSlides(
6732
6745
  (prev) => prev.map(
6733
6746
  (slide, index) => index === activeSlideIndex ? { ...slide, elements: updater(slide.elements) } : slide
@@ -6761,9 +6774,9 @@ function useGroupAlignLayerHandlers(input) {
6761
6774
  return;
6762
6775
  }
6763
6776
  const group = selectedElement;
6764
- const intoTemplate = chunk43TOUP5U_js.isTemplateElementId(group.id);
6777
+ const intoTemplate = chunk3PKYNJJG_js.isTemplateElementId(group.id);
6765
6778
  const childIds = group.children.map(
6766
- (child) => intoTemplate ? chunk43TOUP5U_js.makeCloneId(true, child.id || group.id) : child.id || pptx.generateElementId()
6779
+ (child) => intoTemplate ? chunk3PKYNJJG_js.makeCloneId(true, child.id || group.id) : child.id || pptx.generateElementId()
6767
6780
  );
6768
6781
  const { elements, childIds: usedIds } = pptx.ungroupElements(
6769
6782
  ops.activeElements,
@@ -7095,7 +7108,7 @@ function useSlideManagement(input) {
7095
7108
  if (!src) {
7096
7109
  continue;
7097
7110
  }
7098
- const clone = { ...(0, chunk43TOUP5U_js.dist_exports.duplicateSlide)(src, next.length + 1), id: pptx.makeSlideId() };
7111
+ const clone = { ...(0, chunk3PKYNJJG_js.dist_exports.duplicateSlide)(src, next.length + 1), id: pptx.makeSlideId() };
7099
7112
  next.splice(i + offset + 1, 0, clone);
7100
7113
  offset++;
7101
7114
  }
@@ -7199,7 +7212,7 @@ function createTableMergeHandlers(input) {
7199
7212
  if (!nextCell || nextCell.hMerge || nextCell.vMerge) {
7200
7213
  return;
7201
7214
  }
7202
- const newTableData = chunk43TOUP5U_js.mergeCells(
7215
+ const newTableData = chunk3PKYNJJG_js.mergeCells(
7203
7216
  [
7204
7217
  { row: rowIndex, col: columnIndex },
7205
7218
  { row: rowIndex, col: nextColIdx }
@@ -7207,7 +7220,7 @@ function createTableMergeHandlers(input) {
7207
7220
  td
7208
7221
  );
7209
7222
  const updates = { tableData: newTableData };
7210
- const newRawXml = (0, chunk43TOUP5U_js.dist_exports.updateMergeAttrsInRawXml)(selectedElement, newTableData);
7223
+ const newRawXml = (0, chunk3PKYNJJG_js.dist_exports.updateMergeAttrsInRawXml)(selectedElement, newTableData);
7211
7224
  if (newRawXml) {
7212
7225
  updates.rawXml = newRawXml;
7213
7226
  }
@@ -7233,7 +7246,7 @@ function createTableMergeHandlers(input) {
7233
7246
  if (!targetNextCell || targetNextCell.hMerge || targetNextCell.vMerge) {
7234
7247
  return;
7235
7248
  }
7236
- const newTableData = chunk43TOUP5U_js.mergeCells(
7249
+ const newTableData = chunk3PKYNJJG_js.mergeCells(
7237
7250
  [
7238
7251
  { row: rowIndex, col: columnIndex },
7239
7252
  { row: targetNextRowIdx, col: columnIndex }
@@ -7241,7 +7254,7 @@ function createTableMergeHandlers(input) {
7241
7254
  td
7242
7255
  );
7243
7256
  const updates = { tableData: newTableData };
7244
- const newRawXml = (0, chunk43TOUP5U_js.dist_exports.updateMergeAttrsInRawXml)(selectedElement, newTableData);
7257
+ const newRawXml = (0, chunk3PKYNJJG_js.dist_exports.updateMergeAttrsInRawXml)(selectedElement, newTableData);
7245
7258
  if (newRawXml) {
7246
7259
  updates.rawXml = newRawXml;
7247
7260
  }
@@ -7256,9 +7269,9 @@ function createTableMergeHandlers(input) {
7256
7269
  return;
7257
7270
  }
7258
7271
  const td = selectedElement.tableData;
7259
- const newTableData = chunk43TOUP5U_js.mergeCells(ts.selectedCells, td);
7272
+ const newTableData = chunk3PKYNJJG_js.mergeCells(ts.selectedCells, td);
7260
7273
  const updates = { tableData: newTableData };
7261
- const newRawXml = (0, chunk43TOUP5U_js.dist_exports.updateMergeAttrsInRawXml)(selectedElement, newTableData);
7274
+ const newRawXml = (0, chunk3PKYNJJG_js.dist_exports.updateMergeAttrsInRawXml)(selectedElement, newTableData);
7262
7275
  if (newRawXml) {
7263
7276
  updates.rawXml = newRawXml;
7264
7277
  }
@@ -7275,9 +7288,9 @@ function createTableMergeHandlers(input) {
7275
7288
  }
7276
7289
  const { rowIndex, columnIndex } = ts;
7277
7290
  const td = selectedElement.tableData;
7278
- const newTableData = chunk43TOUP5U_js.splitCell(rowIndex, columnIndex, td);
7291
+ const newTableData = chunk3PKYNJJG_js.splitCell(rowIndex, columnIndex, td);
7279
7292
  const updates = { tableData: newTableData };
7280
- const newRawXml = (0, chunk43TOUP5U_js.dist_exports.updateMergeAttrsInRawXml)(selectedElement, newTableData);
7293
+ const newRawXml = (0, chunk3PKYNJJG_js.dist_exports.updateMergeAttrsInRawXml)(selectedElement, newTableData);
7281
7294
  if (newRawXml) {
7282
7295
  updates.rawXml = newRawXml;
7283
7296
  }
@@ -7312,7 +7325,7 @@ function createTableStructHandlers(input) {
7312
7325
  updates.tableData = pptx.setCellText(el, rowIndex, colIndex, text).tableData;
7313
7326
  }
7314
7327
  if (el.rawXml) {
7315
- const newRawXml = (0, chunk43TOUP5U_js.dist_exports.updateCellTextInRawXml)(el, rowIndex, colIndex, text);
7328
+ const newRawXml = (0, chunk3PKYNJJG_js.dist_exports.updateCellTextInRawXml)(el, rowIndex, colIndex, text);
7316
7329
  if (newRawXml) {
7317
7330
  updates.rawXml = newRawXml;
7318
7331
  }
@@ -7336,7 +7349,7 @@ function createTableStructHandlers(input) {
7336
7349
  const { rowIndex, columnIndex: colIndex } = ts;
7337
7350
  const updates = {};
7338
7351
  if (selectedElement.rawXml) {
7339
- const newRawXml = (0, chunk43TOUP5U_js.dist_exports.updateCellTextStyleInRawXml)(
7352
+ const newRawXml = (0, chunk3PKYNJJG_js.dist_exports.updateCellTextStyleInRawXml)(
7340
7353
  selectedElement,
7341
7354
  rowIndex,
7342
7355
  colIndex,
@@ -7503,7 +7516,7 @@ function useExportSaveAs(input) {
7503
7516
  const sourceName = filePath ? filePath.replace(/\\/gu, "/").split("/").pop() : void 0;
7504
7517
  const slideSize = pptx.resolveSlideSizeSelection({ current: slideSizeEmu, canvas: canvasSize }).size;
7505
7518
  const data = {
7506
- slides: chunk43TOUP5U_js.buildSaveSlides(slides, templateElementsBySlideId),
7519
+ slides: chunk3PKYNJJG_js.buildSaveSlides(slides, templateElementsBySlideId),
7507
7520
  width: canvasSize.width,
7508
7521
  height: canvasSize.height,
7509
7522
  widthEmu: slideSize.widthEmu,
@@ -7661,7 +7674,7 @@ async function captureAllSlidesAsPngDataUrls(slideStageRef, totalSlides, setActi
7661
7674
  }
7662
7675
  function tilesToPdfPage(tilesResult) {
7663
7676
  return tilesResult.tiles.map((tile) => ({
7664
- image: chunk43TOUP5U_js.canvasToJpegData(tile.canvas),
7677
+ image: chunk3PKYNJJG_js.canvasToJpegData(tile.canvas),
7665
7678
  placement: pptx.placeTileOnPage(
7666
7679
  tile,
7667
7680
  tilesResult.fullWidth,
@@ -7694,7 +7707,7 @@ async function exportAllSlidesAsPdf(slideStageRef, totalSlides, setActiveSlide,
7694
7707
  if (pages.length === 0) {
7695
7708
  throw new Error(i18n.translationsEn["pptx.export.errorNoSlidesPdf"]);
7696
7709
  }
7697
- const pdfBlobUrl = chunk43TOUP5U_js.buildPdfFromTiledImageData(pages);
7710
+ const pdfBlobUrl = chunk3PKYNJJG_js.buildPdfFromTiledImageData(pages);
7698
7711
  pptx.downloadDataUrl(pdfBlobUrl, filename);
7699
7712
  }
7700
7713
  async function exportAllSlidesAsNotesPdf(slideStageRef, totalSlides, setActiveSlide, currentSlideIndex, slideNotes, filename = "presentation-notes.pdf", options = {}) {
@@ -7724,7 +7737,7 @@ async function exportAllSlidesAsNotesPdf(slideStageRef, totalSlides, setActiveSl
7724
7737
  if (pages.length === 0) {
7725
7738
  throw new Error(i18n.translationsEn["pptx.export.errorNoSlidesNotesPdf"]);
7726
7739
  }
7727
- const pdfDataUrl = chunk43TOUP5U_js.buildNotesPdf(pages);
7740
+ const pdfDataUrl = chunk3PKYNJJG_js.buildNotesPdf(pages);
7728
7741
  pptx.downloadDataUrl(pdfDataUrl, filename);
7729
7742
  }
7730
7743
  async function exportAllSlidesAsVideo(slideStageRef, totalSlides, setActiveSlide, currentSlideIndex, options = {}) {
@@ -7919,7 +7932,7 @@ function exportAllSlidesToSvg(data, options = {}) {
7919
7932
  continue;
7920
7933
  }
7921
7934
  onProgress?.(processedCount, data.slides.length);
7922
- let svg = chunk43TOUP5U_js.dist_exports.SvgExporter.exportSlide(slide, data.width, data.height, svgOptions);
7935
+ let svg = chunk3PKYNJJG_js.dist_exports.SvgExporter.exportSlide(slide, data.width, data.height, svgOptions);
7923
7936
  if (embedFonts && fontFaces?.length) {
7924
7937
  svg = injectFontFaces(svg, fontFaces);
7925
7938
  }
@@ -8508,10 +8521,10 @@ async function applyThemeEditorEdit(input, { colorScheme, fontScheme, name }) {
8508
8521
  return;
8509
8522
  }
8510
8523
  await handler.applyTheme(colorScheme, fontScheme, name);
8511
- const previousMap = theme?.colorScheme ? (0, chunk43TOUP5U_js.dist_exports.buildThemeColorMap)(theme.colorScheme) : {};
8524
+ const previousMap = theme?.colorScheme ? (0, chunk3PKYNJJG_js.dist_exports.buildThemeColorMap)(theme.colorScheme) : {};
8512
8525
  bumpHistory();
8513
8526
  setSlides(
8514
- (slides) => (0, chunk43TOUP5U_js.dist_exports.applyThemeToData)(
8527
+ (slides) => (0, chunk3PKYNJJG_js.dist_exports.applyThemeToData)(
8515
8528
  { slides, theme, themeColorMap: previousMap },
8516
8529
  colorScheme,
8517
8530
  fontScheme,
@@ -8522,8 +8535,8 @@ async function applyThemeEditorEdit(input, { colorScheme, fontScheme, name }) {
8522
8535
  (prev) => Object.fromEntries(
8523
8536
  Object.entries(prev).map(([id, elements]) => [
8524
8537
  id,
8525
- (0, chunk43TOUP5U_js.dist_exports.reResolveElementFonts)(
8526
- (0, chunk43TOUP5U_js.dist_exports.reResolveElementColors)(elements, previousMap, colorScheme),
8538
+ (0, chunk3PKYNJJG_js.dist_exports.reResolveElementFonts)(
8539
+ (0, chunk3PKYNJJG_js.dist_exports.reResolveElementColors)(elements, previousMap, colorScheme),
8527
8540
  theme?.fontScheme,
8528
8541
  fontScheme
8529
8542
  )
@@ -8581,13 +8594,13 @@ function useThemeHandlers(input) {
8581
8594
  return;
8582
8595
  }
8583
8596
  await handler.updateThemeColorScheme(colorScheme);
8584
- const previousMap = theme?.colorScheme ? (0, chunk43TOUP5U_js.dist_exports.buildThemeColorMap)(theme.colorScheme) : {};
8585
- setSlides((prev) => (0, chunk43TOUP5U_js.dist_exports.reResolveSlideColors)(prev, previousMap, colorScheme));
8597
+ const previousMap = theme?.colorScheme ? (0, chunk3PKYNJJG_js.dist_exports.buildThemeColorMap)(theme.colorScheme) : {};
8598
+ setSlides((prev) => (0, chunk3PKYNJJG_js.dist_exports.reResolveSlideColors)(prev, previousMap, colorScheme));
8586
8599
  if (Object.keys(templateElementsBySlideId).length > 0) {
8587
8600
  setTemplateElementsBySlideId((prev) => {
8588
8601
  const next = {};
8589
8602
  for (const [slideId, elements] of Object.entries(prev)) {
8590
- next[slideId] = (0, chunk43TOUP5U_js.dist_exports.reResolveElementColors)(elements, previousMap, colorScheme);
8603
+ next[slideId] = (0, chunk3PKYNJJG_js.dist_exports.reResolveElementColors)(elements, previousMap, colorScheme);
8591
8604
  }
8592
8605
  return next;
8593
8606
  });
@@ -8698,7 +8711,7 @@ function useThemeSwitching(input) {
8698
8711
  }
8699
8712
  try {
8700
8713
  await handler.applyTheme(preset.colorScheme, preset.fontScheme, preset.name);
8701
- const newData = (0, chunk43TOUP5U_js.dist_exports.applyThemeToData)(data, preset.colorScheme, preset.fontScheme, preset.name);
8714
+ const newData = (0, chunk3PKYNJJG_js.dist_exports.applyThemeToData)(data, preset.colorScheme, preset.fontScheme, preset.name);
8702
8715
  onDataChange(newData);
8703
8716
  onThemeChanged?.(preset);
8704
8717
  } catch (error) {
@@ -8715,7 +8728,7 @@ function useThemeSwitching(input) {
8715
8728
  }
8716
8729
  try {
8717
8730
  await handler.applyTheme(colorScheme, fontScheme ?? {}, themeName);
8718
- const newData = (0, chunk43TOUP5U_js.dist_exports.applyThemeToData)(data, colorScheme, fontScheme, themeName);
8731
+ const newData = (0, chunk3PKYNJJG_js.dist_exports.applyThemeToData)(data, colorScheme, fontScheme, themeName);
8719
8732
  onDataChange(newData);
8720
8733
  } catch (error) {
8721
8734
  console.error("Failed to switch to custom theme:", error);
@@ -8727,12 +8740,12 @@ function useThemeSwitching(input) {
8727
8740
  if (!data?.theme?.colorScheme) {
8728
8741
  return void 0;
8729
8742
  }
8730
- return chunk43TOUP5U_js.dist_exports.THEME_PRESETS.find(
8731
- (p) => (0, chunk43TOUP5U_js.dist_exports.themeColorSchemesEqual)(data.theme?.colorScheme, p.colorScheme)
8743
+ return chunk3PKYNJJG_js.dist_exports.THEME_PRESETS.find(
8744
+ (p) => (0, chunk3PKYNJJG_js.dist_exports.themeColorSchemesEqual)(data.theme?.colorScheme, p.colorScheme)
8732
8745
  );
8733
8746
  }, [data?.theme?.colorScheme]);
8734
8747
  return {
8735
- presets: chunk43TOUP5U_js.dist_exports.THEME_PRESETS,
8748
+ presets: chunk3PKYNJJG_js.dist_exports.THEME_PRESETS,
8736
8749
  switchToPreset,
8737
8750
  switchToCustom,
8738
8751
  currentPreset
@@ -8809,7 +8822,7 @@ function usePropertyHandlers(input) {
8809
8822
  }
8810
8823
  try {
8811
8824
  const ab = await file.arrayBuffer();
8812
- const h = new chunk43TOUP5U_js.dist_exports.PptxHandler();
8825
+ const h = new chunk3PKYNJJG_js.dist_exports.PptxHandler();
8813
8826
  const other = await h.load(ab);
8814
8827
  if (!other) {
8815
8828
  return;
@@ -8819,7 +8832,7 @@ function usePropertyHandlers(input) {
8819
8832
  width: canvasSize.width,
8820
8833
  height: canvasSize.height
8821
8834
  };
8822
- setCompareResult(chunk43TOUP5U_js.comparePresentation(cur, other));
8835
+ setCompareResult(chunk3PKYNJJG_js.comparePresentation(cur, other));
8823
8836
  setIsComparePanelOpen(true);
8824
8837
  } catch (err) {
8825
8838
  console.warn("Compare failed:", err);
@@ -9172,7 +9185,7 @@ function useViewerDialogs(input) {
9172
9185
  };
9173
9186
  }
9174
9187
  function computeGridSpacingPx(documentGridSpacing) {
9175
- return pptx.computeGridSpacingPx(documentGridSpacing, chunk43TOUP5U_js.GRID_SIZE);
9188
+ return pptx.computeGridSpacingPx(documentGridSpacing, chunk3PKYNJJG_js.GRID_SIZE);
9176
9189
  }
9177
9190
  function computeVisibleSlideIndexes(slides, activeCustomShowId, customShows, presentationProperties) {
9178
9191
  const activeShow = activeCustomShowId ? customShows.find((show) => show.id === activeCustomShowId) : void 0;
@@ -9181,7 +9194,7 @@ function computeVisibleSlideIndexes(slides, activeCustomShowId, customShows, pre
9181
9194
  }
9182
9195
  function computeSlideSectionGroups(slides, sections) {
9183
9196
  return pptx.groupSlidesBySection(sections, slides).map((group) => ({
9184
- id: group.section?.id ?? (sections.length > 0 ? chunk43TOUP5U_js.UNGROUPED_SECTION_ID : chunk43TOUP5U_js.DEFAULT_SECTION_GROUP_ID),
9197
+ id: group.section?.id ?? (sections.length > 0 ? chunk3PKYNJJG_js.UNGROUPED_SECTION_ID : chunk3PKYNJJG_js.DEFAULT_SECTION_GROUP_ID),
9185
9198
  label: group.section?.name ?? (sections.length > 0 ? "Ungrouped Slides" : "Slides"),
9186
9199
  slideIndexes: group.slideIndexes,
9187
9200
  ...group.section?.color !== void 0 ? { color: group.section.color } : {},
@@ -9226,10 +9239,10 @@ function useDerivedSlideState(input) {
9226
9239
  );
9227
9240
  const slideSectionGroups = React17.useMemo(
9228
9241
  () => computeSlideSectionGroups(slides, sections).map((group) => {
9229
- if (group.id === chunk43TOUP5U_js.UNGROUPED_SECTION_ID && group.label === "Ungrouped Slides") {
9242
+ if (group.id === chunk3PKYNJJG_js.UNGROUPED_SECTION_ID && group.label === "Ungrouped Slides") {
9230
9243
  return { ...group, label: t("pptx.slides.ungroupedSlides") };
9231
9244
  }
9232
- if (group.id === chunk43TOUP5U_js.DEFAULT_SECTION_GROUP_ID && group.label === "Slides") {
9245
+ if (group.id === chunk3PKYNJJG_js.DEFAULT_SECTION_GROUP_ID && group.label === "Slides") {
9233
9246
  return { ...group, label: t("pptx.sections.slides") };
9234
9247
  }
9235
9248
  return group;
@@ -9336,7 +9349,7 @@ function useAnnotationHandlers(input) {
9336
9349
  if (nextMode === "present") {
9337
9350
  presentation.enterPresentMode();
9338
9351
  } else if (mode === "present" && annotations.hasAnyAnnotations) {
9339
- chunk43TOUP5U_js.stopAllPersistentAudio();
9352
+ chunk3PKYNJJG_js.stopAllPersistentAudio();
9340
9353
  if (promptKeepInkAnnotations) {
9341
9354
  pendingModeAfterAnnotationsRef.current = nextMode;
9342
9355
  setShowKeepAnnotationsDialog(true);
@@ -9346,7 +9359,7 @@ function useAnnotationHandlers(input) {
9346
9359
  }
9347
9360
  } else {
9348
9361
  if (mode === "present") {
9349
- chunk43TOUP5U_js.stopAllPersistentAudio();
9362
+ chunk3PKYNJJG_js.stopAllPersistentAudio();
9350
9363
  }
9351
9364
  setMode(nextMode);
9352
9365
  }
@@ -9417,7 +9430,7 @@ function overlayPendingInlineEdit(document2, elementId, text, snapshot, transfor
9417
9430
  (slide) => !elementId ? slide : {
9418
9431
  ...slide,
9419
9432
  elements: slide.elements.map(
9420
- (element) => element.id === elementId && (0, chunk43TOUP5U_js.dist_exports.hasTextProperties)(element) ? {
9433
+ (element) => element.id === elementId && (0, chunk3PKYNJJG_js.dist_exports.hasTextProperties)(element) ? {
9421
9434
  ...element,
9422
9435
  text,
9423
9436
  textSegments: pptx.remapTextToSegments(
@@ -9459,6 +9472,7 @@ function useSerialize(input) {
9459
9472
  notesMaster,
9460
9473
  handoutMaster,
9461
9474
  handlerRef,
9475
+ heldDeckRef,
9462
9476
  inlineEditingElementIdRef,
9463
9477
  inlineEditingTextRef,
9464
9478
  inlineEditingSnapshotRef,
@@ -9484,8 +9498,8 @@ function useSerialize(input) {
9484
9498
  const pendingSnapshot = read?.snapshot ?? inlineEditingSnapshotRef?.current;
9485
9499
  const pending = overlayPendingInlineEdit(
9486
9500
  {
9487
- slides,
9488
- templateElementsBySlideId,
9501
+ slides: heldDeckRef?.current?.slides ?? slides,
9502
+ templateElementsBySlideId: heldDeckRef?.current?.templateElementsBySlideId ?? templateElementsBySlideId,
9489
9503
  activeSlideIndex,
9490
9504
  editTemplateMode,
9491
9505
  masterViewTarget,
@@ -9505,14 +9519,14 @@ function useSerialize(input) {
9505
9519
  const pptxGuides = guides.map((g) => ({
9506
9520
  id: g.id,
9507
9521
  orientation: g.axis === "h" ? "horz" : "vert",
9508
- positionEmu: (0, chunk43TOUP5U_js.dist_exports.guidePxToEmu)(g.position)
9522
+ positionEmu: (0, chunk3PKYNJJG_js.dist_exports.guidePxToEmu)(g.position)
9509
9523
  }));
9510
9524
  return {
9511
9525
  ...slide,
9512
9526
  guides: pptxGuides.length > 0 ? pptxGuides : void 0
9513
9527
  };
9514
9528
  });
9515
- const slidesToSave = chunk43TOUP5U_js.buildSaveSlides(slidesWithGuides, pending.templateElementsBySlideId);
9529
+ const slidesToSave = chunk3PKYNJJG_js.buildSaveSlides(slidesWithGuides, pending.templateElementsBySlideId);
9516
9530
  const saveOptions = pptx.buildDeckSaveOptions({
9517
9531
  // Without this the Slide Size card edited a viewer-only pixel value and
9518
9532
  // the saved `p:sldSz` never moved: passing `slideSize` is the only way a
@@ -9693,7 +9707,7 @@ function usePresentationSetup(input) {
9693
9707
  return;
9694
9708
  }
9695
9709
  if (mode === "present" && nextMode !== "present") {
9696
- chunk43TOUP5U_js.stopAllPersistentAudio();
9710
+ chunk3PKYNJJG_js.stopAllPersistentAudio();
9697
9711
  stopAnimationSound();
9698
9712
  const exitHandler = exitModeHandlerRef.current;
9699
9713
  if (exitHandler) {
@@ -9814,12 +9828,12 @@ function useCanvasImagePaste(input) {
9814
9828
  );
9815
9829
  }
9816
9830
  function formatPatchFor(element, format) {
9817
- const updated = chunk43TOUP5U_js.applyFormatToElement(element, format);
9831
+ const updated = chunk3PKYNJJG_js.applyFormatToElement(element, format);
9818
9832
  const updates = {};
9819
- if ((0, chunk43TOUP5U_js.dist_exports.hasShapeProperties)(updated)) {
9833
+ if ((0, chunk3PKYNJJG_js.dist_exports.hasShapeProperties)(updated)) {
9820
9834
  updates.shapeStyle = updated.shapeStyle;
9821
9835
  }
9822
- if ((0, chunk43TOUP5U_js.dist_exports.hasTextProperties)(updated)) {
9836
+ if ((0, chunk3PKYNJJG_js.dist_exports.hasTextProperties)(updated)) {
9823
9837
  updates.textStyle = updated.textStyle;
9824
9838
  }
9825
9839
  return updates;
@@ -9837,7 +9851,7 @@ function useFormatPainterEditing(input) {
9837
9851
  const prevFormatPainterRef = React17.useRef(false);
9838
9852
  React17.useEffect(() => {
9839
9853
  if (formatPainterActive && !prevFormatPainterRef.current && selectedElement) {
9840
- copiedFormatRef.current = chunk43TOUP5U_js.copyFormatFromElement(selectedElement);
9854
+ copiedFormatRef.current = chunk3PKYNJJG_js.copyFormatFromElement(selectedElement);
9841
9855
  } else if (!formatPainterActive) {
9842
9856
  copiedFormatRef.current = null;
9843
9857
  }
@@ -10615,6 +10629,7 @@ function useContentLifecycle(input) {
10615
10629
  notesMaster: state.notesMaster,
10616
10630
  handoutMaster: state.handoutMaster,
10617
10631
  handlerRef,
10632
+ heldDeckRef: state.deckStyleHeldRef,
10618
10633
  inlineEditingElementIdRef: state.inlineEditingElementIdRef,
10619
10634
  inlineEditingTextRef: state.inlineEditingTextRef,
10620
10635
  inlineEditingSnapshotRef: state.inlineEditingSnapshotRef,
@@ -10927,7 +10942,7 @@ function useKeyboardShortcutWiring(input) {
10927
10942
  }
10928
10943
  function stepSelectedFontSize(state, ops, direction) {
10929
10944
  const selected = state.selectedElement;
10930
- const currentPx = (selected && (0, chunk43TOUP5U_js.dist_exports.hasTextProperties)(selected) ? selected.textStyle?.fontSize : void 0) ?? pptx.textFontSizePtToPx(18);
10945
+ const currentPx = (selected && (0, chunk3PKYNJJG_js.dist_exports.hasTextProperties)(selected) ? selected.textStyle?.fontSize : void 0) ?? pptx.textFontSizePtToPx(18);
10931
10946
  const nextPt = pptx.stepFontSizePt(pptx.textFontSizePxToPt(currentPx), direction);
10932
10947
  ops.updateSelectedTextStyle({ fontSize: pptx.textFontSizePtToPx(nextPt) });
10933
10948
  }
@@ -11484,7 +11499,7 @@ function useCollaborationWriteBack(input) {
11484
11499
  getSourceBytes: () => latest.current.getSourceBytes?.() ?? null,
11485
11500
  getSaveOptions: () => latest.current.getSaveOptions?.(),
11486
11501
  getTemplateElements: () => latest.current.templateElementsBySlideId,
11487
- mergeTemplateElements: chunk43TOUP5U_js.buildSaveSlides
11502
+ mergeTemplateElements: chunk3PKYNJJG_js.buildSaveSlides
11488
11503
  }),
11489
11504
  [latest]
11490
11505
  );
@@ -12037,8 +12052,8 @@ function useTouchGestures(input) {
12037
12052
  }
12038
12053
  const recognizer = pptx.createTouchGestureRecognizer({
12039
12054
  getScale: () => scaleRef.current,
12040
- minScale: chunk43TOUP5U_js.MIN_ZOOM_SCALE,
12041
- maxScale: chunk43TOUP5U_js.MAX_ZOOM_SCALE,
12055
+ minScale: chunk3PKYNJJG_js.MIN_ZOOM_SCALE,
12056
+ maxScale: chunk3PKYNJJG_js.MAX_ZOOM_SCALE,
12042
12057
  callbacks: {
12043
12058
  onPinchZoom: (newScale) => callbacksRef.current.onPinchZoom?.(newScale),
12044
12059
  onSwipe: (direction) => callbacksRef.current.onSwipe?.(direction),
@@ -12162,7 +12177,7 @@ function buildCanvasProps(input) {
12162
12177
  if (pptx.shouldConfirmExternalHyperlink(viewerOptions, url) && !window.confirm(buildHyperlinkConfirmMessage(url))) {
12163
12178
  return;
12164
12179
  }
12165
- chunk43TOUP5U_js.safeOpenUrl(url, target);
12180
+ chunk3PKYNJJG_js.safeOpenUrl(url, target);
12166
12181
  };
12167
12182
  const handleActionClick = (elementId, action) => {
12168
12183
  if (mode === "present") {
@@ -12177,9 +12192,9 @@ function buildCanvasProps(input) {
12177
12192
  }
12178
12193
  };
12179
12194
  const handleHyperlinkClick = (url, target) => {
12180
- if (chunk43TOUP5U_js.isPpactionUrl(url)) {
12195
+ if (chunk3PKYNJJG_js.isPpactionUrl(url)) {
12181
12196
  if (mode === "present") {
12182
- const parsed = chunk43TOUP5U_js.parsePpactionUrl(url);
12197
+ const parsed = chunk3PKYNJJG_js.parsePpactionUrl(url);
12183
12198
  if (parsed) {
12184
12199
  presentation.handlePresentationAction({
12185
12200
  action: parsed.action,
@@ -12595,6 +12610,8 @@ function buildToolbarProps(input) {
12595
12610
  }
12596
12611
  },
12597
12612
  isCommentsPanelOpen: s.isInspectorPaneOpen,
12613
+ isMobileInsertOpen: s.isMobileInsertOpen,
12614
+ onCloseMobileInsert: () => s.setIsMobileInsertOpen(false),
12598
12615
  slideCommentCount: activeSlide?.comments?.length ?? 0,
12599
12616
  reviewComments: createReviewCommentsHost({
12600
12617
  state: s,
@@ -12603,7 +12620,7 @@ function buildToolbarProps(input) {
12603
12620
  markDirty: history.markDirty
12604
12621
  }),
12605
12622
  formatPainterActive: s.formatPainterActive,
12606
- canActivateFormatPainter: chunk43TOUP5U_js.hasCopyableFormat(selectedElement),
12623
+ canActivateFormatPainter: chunk3PKYNJJG_js.hasCopyableFormat(selectedElement),
12607
12624
  onToggleFormatPainter: () => s.setFormatPainterActive((p) => !p),
12608
12625
  isSelectionPaneOpen: s.isSelectionPaneOpen,
12609
12626
  onToggleSelectionPane: () => s.setIsSelectionPaneOpen((p) => !p),
@@ -12926,7 +12943,7 @@ function useViewerBuildingBlocksCore(input) {
12926
12943
  documentGridSpacing: state.viewProperties?.gridSpacing
12927
12944
  });
12928
12945
  const themeColorMap = React17.useMemo(
12929
- () => state.theme?.colorScheme ? (0, chunk43TOUP5U_js.dist_exports.buildThemeColorMap)(state.theme.colorScheme) : void 0,
12946
+ () => state.theme?.colorScheme ? (0, chunk3PKYNJJG_js.dist_exports.buildThemeColorMap)(state.theme.colorScheme) : void 0,
12930
12947
  [state.theme?.colorScheme]
12931
12948
  );
12932
12949
  const { presentation, annotations, actionSoundHandlerRef, setExitModeHandler } = usePresentationSetup({
@@ -13501,23 +13518,23 @@ function ColorChangedImage({
13501
13518
  className,
13502
13519
  alt
13503
13520
  }) {
13504
- const tolerance = tolerancePct ?? chunk43TOUP5U_js.DEFAULT_COLOR_CHANGE_TOLERANCE;
13505
- const cacheKey = chunk43TOUP5U_js.buildCacheKey(
13521
+ const tolerance = tolerancePct ?? chunk3PKYNJJG_js.DEFAULT_COLOR_CHANGE_TOLERANCE;
13522
+ const cacheKey = chunk3PKYNJJG_js.buildCacheKey(
13506
13523
  src,
13507
13524
  clrChange.clrFrom,
13508
13525
  clrChange.clrTo,
13509
13526
  tolerance,
13510
13527
  Boolean(clrChange.clrToTransparent)
13511
13528
  );
13512
- const cached = chunk43TOUP5U_js.getCachedResult(cacheKey);
13529
+ const cached = chunk3PKYNJJG_js.getCachedResult(cacheKey);
13513
13530
  const [processedSrc, setProcessedSrc] = React17.useState(cached ?? null);
13514
13531
  React17.useEffect(() => {
13515
- if (chunk43TOUP5U_js.getCachedResult(cacheKey)) {
13516
- setProcessedSrc(chunk43TOUP5U_js.getCachedResult(cacheKey) ?? null);
13532
+ if (chunk3PKYNJJG_js.getCachedResult(cacheKey)) {
13533
+ setProcessedSrc(chunk3PKYNJJG_js.getCachedResult(cacheKey) ?? null);
13517
13534
  return;
13518
13535
  }
13519
13536
  let cancelled = false;
13520
- chunk43TOUP5U_js.applyColorChange(
13537
+ chunk3PKYNJJG_js.applyColorChange(
13521
13538
  src,
13522
13539
  clrChange.clrFrom,
13523
13540
  clrChange.clrTo,
@@ -13525,7 +13542,7 @@ function ColorChangedImage({
13525
13542
  Boolean(clrChange.clrToTransparent)
13526
13543
  ).then((result) => {
13527
13544
  if (!cancelled) {
13528
- chunk43TOUP5U_js.setCachedResult(cacheKey, result.dataUrl);
13545
+ chunk3PKYNJJG_js.setCachedResult(cacheKey, result.dataUrl);
13529
13546
  setProcessedSrc(result.dataUrl);
13530
13547
  }
13531
13548
  return void 0;
@@ -13617,7 +13634,7 @@ function TiledImageLayer({
13617
13634
  cancelled = true;
13618
13635
  };
13619
13636
  }, [src]);
13620
- return /* @__PURE__ */ jsxRuntime.jsx("div", { className, style: { ...chunk43TOUP5U_js.getImageTilingStyle(element, nativeSize), ...style } });
13637
+ return /* @__PURE__ */ jsxRuntime.jsx("div", { className, style: { ...chunk3PKYNJJG_js.getImageTilingStyle(element, nativeSize), ...style } });
13621
13638
  }
13622
13639
  function renderImageEffectDefinitions(element, excludeDuotone = false) {
13623
13640
  return pptx.getImageSvgFilters(element).filter((definition) => !excludeDuotone || definition.id !== `duotone-${element.id}`).map((definition) => /* @__PURE__ */ jsxRuntime.jsx(
@@ -13686,7 +13703,7 @@ function renderImg(el, style, filter, alt, opacity) {
13686
13703
  ...filter ? { filter } : {},
13687
13704
  ...opacity !== void 0 ? { opacity } : {}
13688
13705
  };
13689
- if (chunk43TOUP5U_js.isImageTiled(el)) {
13706
+ if (chunk3PKYNJJG_js.isImageTiled(el)) {
13690
13707
  const tileSrc = imgSrc(el);
13691
13708
  if (!tileSrc) {
13692
13709
  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" });
@@ -13705,12 +13722,12 @@ function renderImg(el, style, filter, alt, opacity) {
13705
13722
  ] });
13706
13723
  }
13707
13724
  const colorWash = pptx.getImageColorWashStyle(
13708
- (0, chunk43TOUP5U_js.dist_exports.isImageLikeElement)(el) ? el.imageEffects?.colorWash : void 0
13725
+ (0, chunk3PKYNJJG_js.dist_exports.isImageLikeElement)(el) ? el.imageEffects?.colorWash : void 0
13709
13726
  );
13710
13727
  const clrChange = "imageEffects" in el ? el.imageEffects?.clrChange : void 0;
13711
- const duotoneColors = chunk43TOUP5U_js.getDuotoneColors(el);
13728
+ const duotoneColors = chunk3PKYNJJG_js.getDuotoneColors(el);
13712
13729
  const useDuotoneCanvas = Boolean(duotoneColors && !clrChange);
13713
- const filterForImg = useDuotoneCanvas ? chunk43TOUP5U_js.getImageEffectsFilter(el, { excludeDuotone: true }) : filter;
13730
+ const filterForImg = useDuotoneCanvas ? chunk3PKYNJJG_js.getImageEffectsFilter(el, { excludeDuotone: true }) : filter;
13714
13731
  const canvasEffectStyles = {
13715
13732
  ...filterForImg ? { filter: filterForImg } : {},
13716
13733
  ...opacity !== void 0 ? { opacity } : {}
@@ -13786,14 +13803,18 @@ function SlideBackgroundImageLayer({
13786
13803
  style: { zIndex: 0 },
13787
13804
  children: renderImg(
13788
13805
  backgroundElement,
13789
- chunk43TOUP5U_js.getImageRenderStyle(backgroundElement),
13790
- chunk43TOUP5U_js.getImageEffectsFilter(backgroundElement),
13806
+ chunk3PKYNJJG_js.getImageRenderStyle(backgroundElement),
13807
+ chunk3PKYNJJG_js.getImageEffectsFilter(backgroundElement),
13791
13808
  "",
13792
- chunk43TOUP5U_js.getImageEffectsOpacity(backgroundElement)
13809
+ chunk3PKYNJJG_js.getImageEffectsOpacity(backgroundElement)
13793
13810
  )
13794
13811
  }
13795
13812
  );
13796
13813
  }
13814
+ var ChartFormatContext = React17.createContext(null);
13815
+ function useChartFormatContext() {
13816
+ return React17.useContext(ChartFormatContext);
13817
+ }
13797
13818
  var ChartPartSelectionContext = React17.createContext({
13798
13819
  selection: null,
13799
13820
  setSelection: () => {
@@ -14048,11 +14069,14 @@ function ChartElementView({
14048
14069
  onUpdateElement,
14049
14070
  animationState
14050
14071
  }) {
14072
+ const { t } = reactI18next.useTranslation();
14051
14073
  const wrapperRef = React17.useRef(null);
14052
14074
  const { selection, setSelection } = useChartPartSelection();
14053
14075
  const [titleDraft, setTitleDraft] = React17.useState(null);
14054
14076
  const selectedPart = selection?.elementId === element.id ? selection.part : null;
14055
14077
  const canEdit = editable && Boolean(onUpdateElement);
14078
+ const chartFormat = useChartFormatContext();
14079
+ const formatsThisChart = canEdit && chartFormat?.chart?.id === element.id;
14056
14080
  const rendering3DFlags = React17.useContext(Rendering3DFlagsContext);
14057
14081
  const barFacePictureSampleVersion = React17.useSyncExternalStore(
14058
14082
  pptx.subscribeBarFacePicturePixelSamples,
@@ -14060,7 +14084,7 @@ function ChartElementView({
14060
14084
  pptx.getBarFacePicturePixelSampleVersion
14061
14085
  );
14062
14086
  const viewModel = React17.useMemo(() => {
14063
- return canEdit ? chunk43TOUP5U_js.buildReactChartViewModel(element) : null;
14087
+ return canEdit ? chunk3PKYNJJG_js.buildReactChartViewModel(element) : null;
14064
14088
  }, [canEdit, element, barFacePictureSampleVersion]);
14065
14089
  React17.useEffect(pptx.ensureChartInteractionStyles, []);
14066
14090
  React17.useEffect(() => {
@@ -14102,6 +14126,11 @@ function ChartElementView({
14102
14126
  setTitleDraft(element.chartData?.title ?? "");
14103
14127
  return;
14104
14128
  }
14129
+ if (formatsThisChart) {
14130
+ e.stopPropagation();
14131
+ chartFormat?.openPane(pptx.chartFormatTargetFromEvent(e.nativeEvent, wrapperRef.current, element));
14132
+ return;
14133
+ }
14105
14134
  if (pptx.findChartPartTarget(e.target)) {
14106
14135
  e.stopPropagation();
14107
14136
  }
@@ -14131,10 +14160,25 @@ function ChartElementView({
14131
14160
  {
14132
14161
  ref: wrapperRef,
14133
14162
  className: `relative w-full h-full ${canEdit ? "pptx-chart-interactive" : ""}`,
14134
- onPointerDown: handlePointerDown,
14163
+ onPointerDown: (e) => {
14164
+ if (formatsThisChart) {
14165
+ chartFormat?.setTarget(
14166
+ pptx.chartFormatTargetFromEvent(e.nativeEvent, wrapperRef.current, element)
14167
+ );
14168
+ }
14169
+ handlePointerDown(e);
14170
+ },
14135
14171
  onPointerMove: handlePointerMove,
14136
14172
  onPointerUp: handlePointerUp,
14137
14173
  onDoubleClick: handleDoubleClick,
14174
+ onContextMenu: (e) => {
14175
+ if (onUpdateElement && chartFormat) {
14176
+ chartFormat.setTarget(
14177
+ pptx.chartFormatTargetFromEvent(e.nativeEvent, wrapperRef.current, element),
14178
+ element.id
14179
+ );
14180
+ }
14181
+ },
14138
14182
  children: [
14139
14183
  chart3D.spec ? /* @__PURE__ */ jsxRuntime.jsx(
14140
14184
  ThreeView,
@@ -14145,9 +14189,9 @@ function ChartElementView({
14145
14189
  textStyle: animationState?.textStyle,
14146
14190
  onSelect: chart3D.onSelect,
14147
14191
  onDrag: chart3D.onDrag,
14148
- children: chunk43TOUP5U_js.renderChartElement(renderedElement)
14192
+ children: chunk3PKYNJJG_js.renderChartElement(renderedElement, (key) => t(key))
14149
14193
  }
14150
- ) : chunk43TOUP5U_js.renderChartElement(renderedElement),
14194
+ ) : chunk3PKYNJJG_js.renderChartElement(renderedElement, (key) => t(key)),
14151
14195
  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) }),
14152
14196
  titleDraft !== null && /* @__PURE__ */ jsxRuntime.jsx(
14153
14197
  "input",
@@ -14477,7 +14521,7 @@ function ResizeHandles({
14477
14521
  "aria-label": t("pptx.selectionOverlay.resize", { handle }),
14478
14522
  "data-pptx-handle-kind": "resize",
14479
14523
  "data-pptx-compact": true,
14480
- className: chunk43TOUP5U_js.cn(
14524
+ className: chunk3PKYNJJG_js.cn(
14481
14525
  "absolute z-10 group border-0 bg-transparent p-0",
14482
14526
  RESIZE_DEFAULT_CLASSES,
14483
14527
  posClass,
@@ -14503,7 +14547,7 @@ function ResizeHandles({
14503
14547
  "div",
14504
14548
  {
14505
14549
  "data-pptx-handle-hit": true,
14506
- className: chunk43TOUP5U_js.cn(
14550
+ className: chunk3PKYNJJG_js.cn(
14507
14551
  "absolute -inset-px pointer-events-auto [--pptx-handle-hit-inset:-1px]",
14508
14552
  corner ? "max-md:-inset-1.5 max-md:[--pptx-handle-hit-inset:-6px]" : "max-md:-inset-2 max-md:[--pptx-handle-hit-inset:-8px]"
14509
14553
  ),
@@ -14524,7 +14568,7 @@ function ResizeHandles({
14524
14568
  "aria-label": t("pptx.selectionOverlay.rotate"),
14525
14569
  "data-pptx-handle-kind": "rotate",
14526
14570
  "data-pptx-compact": true,
14527
- className: chunk43TOUP5U_js.cn(
14571
+ className: chunk3PKYNJJG_js.cn(
14528
14572
  "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",
14529
14573
  ROTATE_DEFAULT_CLASSES
14530
14574
  ),
@@ -14594,17 +14638,17 @@ var ConnectorElementRenderer = React17__default.default.memo(
14594
14638
  animationState,
14595
14639
  textStyleOverrideCss
14596
14640
  }) {
14597
- const shapeEl = (0, chunk43TOUP5U_js.dist_exports.hasShapeProperties)(el) ? el : void 0;
14641
+ const shapeEl = (0, chunk3PKYNJJG_js.dist_exports.hasShapeProperties)(el) ? el : void 0;
14598
14642
  const viewWidth = Math.max(el.width, 0);
14599
14643
  const viewHeight = Math.max(el.height, 0);
14600
14644
  const svgWidth = Math.max(el.width, 1);
14601
14645
  const svgHeight = Math.max(el.height, 1);
14602
14646
  const ss = shapeEl?.shapeStyle;
14603
14647
  const strokeWidth = Math.max(0, ss?.strokeWidth ?? 2);
14604
- const strokeColor = chunk43TOUP5U_js.normalizeHexColor(ss?.strokeColor, chunk43TOUP5U_js.DEFAULT_STROKE_COLOR);
14605
- const strokePaint = chunk43TOUP5U_js.colorWithOpacity(strokeColor, ss?.strokeOpacity);
14606
- const dashType = chunk43TOUP5U_js.normalizeStrokeDashType(ss?.strokeDash);
14607
- const dashArray = chunk43TOUP5U_js.getSvgStrokeDasharray(
14648
+ const strokeColor = chunk3PKYNJJG_js.normalizeHexColor(ss?.strokeColor, chunk3PKYNJJG_js.DEFAULT_STROKE_COLOR);
14649
+ const strokePaint = chunk3PKYNJJG_js.colorWithOpacity(strokeColor, ss?.strokeOpacity);
14650
+ const dashType = chunk3PKYNJJG_js.normalizeStrokeDashType(ss?.strokeDash);
14651
+ const dashArray = chunk3PKYNJJG_js.getSvgStrokeDasharray(
14608
14652
  dashType,
14609
14653
  Math.max(strokeWidth, 1),
14610
14654
  ss?.customDashSegments
@@ -14615,14 +14659,14 @@ var ConnectorElementRenderer = React17__default.default.memo(
14615
14659
  const markerSeed = el.id.replace(/[^a-zA-Z0-9_-]/gu, "_");
14616
14660
  const startMarkerId = `${markerSeed}-sel-start`;
14617
14661
  const endMarkerId = `${markerSeed}-sel-end`;
14618
- const compoundOffsets = chunk43TOUP5U_js.getCompoundLineOffsets(compoundLine, strokeWidth);
14619
- const compoundWidths = chunk43TOUP5U_js.getCompoundLineWidths(compoundLine, strokeWidth);
14662
+ const compoundOffsets = chunk3PKYNJJG_js.getCompoundLineOffsets(compoundLine, strokeWidth);
14663
+ const compoundWidths = chunk3PKYNJJG_js.getCompoundLineWidths(compoundLine, strokeWidth);
14620
14664
  const strokeCap = pptx.svgLineCap(ss?.lineCap);
14621
- const textEl = (0, chunk43TOUP5U_js.dist_exports.hasTextProperties)(el) ? el : void 0;
14665
+ const textEl = (0, chunk3PKYNJJG_js.dist_exports.hasTextProperties)(el) ? el : void 0;
14622
14666
  const connectorText = textEl?.text?.trim() ?? "";
14623
14667
  const connectorTextSegments = textEl?.textSegments;
14624
14668
  const connectorTextStyle = textEl?.textStyle;
14625
- const pathGeometry = shapeEl ? chunk43TOUP5U_js.getConnectorPathGeometry(shapeEl) : {
14669
+ const pathGeometry = shapeEl ? chunk3PKYNJJG_js.getConnectorPathGeometry(shapeEl) : {
14626
14670
  pathData: `M 0 0 L ${viewWidth} ${viewHeight}`,
14627
14671
  startX: 0,
14628
14672
  startY: 0,
@@ -14631,16 +14675,16 @@ var ConnectorElementRenderer = React17__default.default.memo(
14631
14675
  };
14632
14676
  const hitTargetWidth = Math.max(strokeWidth * 3, 14);
14633
14677
  const selColor = selClr === "blue-400" ? "#60a5fa" : "#3b82f6";
14634
- const lineShadow = chunk43TOUP5U_js.buildLineShadowCss(el);
14635
- const lineGlow = chunk43TOUP5U_js.buildLineGlowFilter(el);
14678
+ const lineShadow = chunk3PKYNJJG_js.buildLineShadowCss(el);
14679
+ const lineGlow = chunk3PKYNJJG_js.buildLineGlowFilter(el);
14636
14680
  return /* @__PURE__ */ jsxRuntime.jsxs(
14637
14681
  "div",
14638
14682
  {
14639
14683
  "data-pptx-element": "true",
14640
14684
  "data-element-id": el.id,
14641
- role: chunk43TOUP5U_js.getAriaRole(el, { actionable: false }),
14642
- "aria-label": chunk43TOUP5U_js.getAriaLabel(el),
14643
- "aria-roledescription": chunk43TOUP5U_js.getAriaRoleDescription(el),
14685
+ role: chunk3PKYNJJG_js.getAriaRole(el, { actionable: false }),
14686
+ "aria-label": chunk3PKYNJJG_js.getAriaLabel(el),
14687
+ "aria-roledescription": chunk3PKYNJJG_js.getAriaRoleDescription(el),
14644
14688
  "aria-selected": isSelected ? true : void 0,
14645
14689
  className: "absolute",
14646
14690
  style: {
@@ -14673,14 +14717,14 @@ var ConnectorElementRenderer = React17__default.default.memo(
14673
14717
  style: { overflow: "visible", pointerEvents: "none" },
14674
14718
  children: [
14675
14719
  /* @__PURE__ */ jsxRuntime.jsxs("defs", { children: [
14676
- chunk43TOUP5U_js.renderConnectorMarker(
14720
+ chunk3PKYNJJG_js.renderConnectorMarker(
14677
14721
  startMarkerId,
14678
14722
  startArrow,
14679
14723
  strokePaint,
14680
14724
  ss?.connectorStartArrowWidth,
14681
14725
  ss?.connectorStartArrowLength
14682
14726
  ),
14683
- chunk43TOUP5U_js.renderConnectorMarker(
14727
+ chunk3PKYNJJG_js.renderConnectorMarker(
14684
14728
  endMarkerId,
14685
14729
  endArrow,
14686
14730
  strokePaint,
@@ -14886,14 +14930,14 @@ function getElementInteractionProps({
14886
14930
  };
14887
14931
  }
14888
14932
  function renderDagDuotoneFilterForElement(el) {
14889
- if (!chunk43TOUP5U_js.hasDagDuotoneEffect(el)) {
14933
+ if (!chunk3PKYNJJG_js.hasDagDuotoneEffect(el)) {
14890
14934
  return null;
14891
14935
  }
14892
14936
  const duotone = el.shapeStyle?.dagDuotone;
14893
14937
  if (!duotone) {
14894
14938
  return null;
14895
14939
  }
14896
- return chunk43TOUP5U_js.renderDagDuotoneSvgFilter(el.id, duotone.color1, duotone.color2);
14940
+ return chunk3PKYNJJG_js.renderDagDuotoneSvgFilter(el.id, duotone.color1, duotone.color2);
14897
14941
  }
14898
14942
  function getContainerStyle({
14899
14943
  el,
@@ -14906,7 +14950,7 @@ function getContainerStyle({
14906
14950
  has3DExtrusion,
14907
14951
  templateEditing
14908
14952
  }) {
14909
- const ss = (0, chunk43TOUP5U_js.dist_exports.hasShapeProperties)(el) ? el.shapeStyle : void 0;
14953
+ const ss = (0, chunk3PKYNJJG_js.dist_exports.hasShapeProperties)(el) ? el.shapeStyle : void 0;
14910
14954
  const isPicture = el.type === "picture" || el.type === "image";
14911
14955
  const blurGrowVisible = Boolean(
14912
14956
  ss?.blurGrow && typeof ss.blurRadius === "number" && ss.blurRadius > 0
@@ -14920,10 +14964,10 @@ function getContainerStyle({
14920
14964
  top: isFullscreenMedia ? fs.top : el.y,
14921
14965
  width: isFullscreenMedia ? fs.width : painted.width,
14922
14966
  ...heightStyle,
14923
- transform: isFullscreenMedia ? fs.transform : chunk43TOUP5U_js.getElementTransform(el),
14967
+ transform: isFullscreenMedia ? fs.transform : chunk3PKYNJJG_js.getElementTransform(el),
14924
14968
  transformOrigin: "center",
14925
14969
  overflow: overflowValue,
14926
- clipPath: isPicture ? void 0 : isImg && !has3DExtrusion ? chunk43TOUP5U_js.getCropShapeClipPath(el) : void 0,
14970
+ clipPath: isPicture ? void 0 : isImg && !has3DExtrusion ? chunk3PKYNJJG_js.getCropShapeClipPath(el) : void 0,
14927
14971
  zIndex: isFullscreenMedia ? fs.zIndex : zIndex,
14928
14972
  visibility: animationState?.visible === false ? "hidden" : "visible",
14929
14973
  animation: animationState?.cssAnimation,
@@ -14958,11 +15002,11 @@ function getContainerStyle({
14958
15002
  };
14959
15003
  }
14960
15004
  function shapeParams(element) {
14961
- const style = (0, chunk43TOUP5U_js.dist_exports.hasShapeProperties)(element) ? element.shapeStyle : void 0;
15005
+ const style = (0, chunk3PKYNJJG_js.dist_exports.hasShapeProperties)(element) ? element.shapeStyle : void 0;
14962
15006
  const strokeWidth = pptx.paintedStrokeWidth(style);
14963
- const strokeColor = chunk43TOUP5U_js.normalizeHexColor(style?.strokeColor, chunk43TOUP5U_js.DEFAULT_STROKE_COLOR);
14964
- const fillColor = chunk43TOUP5U_js.normalizeHexColor(style?.fillColor, chunk43TOUP5U_js.DEFAULT_FILL_COLOR);
14965
- const hasFill = style?.fillColor !== void 0 && style.fillColor !== "transparent" || Boolean(chunk43TOUP5U_js.buildCssGradientFromShapeStyle(style) || style?.fillGradient) || style?.fillMode === "pattern" && Boolean(style.fillPatternPreset);
15007
+ const strokeColor = chunk3PKYNJJG_js.normalizeHexColor(style?.strokeColor, chunk3PKYNJJG_js.DEFAULT_STROKE_COLOR);
15008
+ const fillColor = chunk3PKYNJJG_js.normalizeHexColor(style?.fillColor, chunk3PKYNJJG_js.DEFAULT_FILL_COLOR);
15009
+ const hasFill = style?.fillColor !== void 0 && style.fillColor !== "transparent" || Boolean(chunk3PKYNJJG_js.buildCssGradientFromShapeStyle(style) || style?.fillGradient) || style?.fillMode === "pattern" && Boolean(style.fillPatternPreset);
14966
15010
  return { hf: hasFill, fc: fillColor, sw: strokeWidth, sc: strokeColor };
14967
15011
  }
14968
15012
  var Extrusion3DOverlay = React17__default.default.memo(
@@ -15067,7 +15111,7 @@ function ShapeEffectOverlay({
15067
15111
  const fillOverlayStyle = overlay ? {
15068
15112
  position: "absolute",
15069
15113
  inset: 0,
15070
- ...(0, chunk43TOUP5U_js.dist_exports.isImageLikeElement)(element) ? chunk43TOUP5U_js.getImageSurfaceMaskStyle(element) : {},
15114
+ ...(0, chunk3PKYNJJG_js.dist_exports.isImageLikeElement)(element) ? chunk3PKYNJJG_js.getImageSurfaceMaskStyle(element) : {},
15071
15115
  background: overlay.color,
15072
15116
  mixBlendMode: overlay.blendMode,
15073
15117
  pointerEvents: "none"
@@ -15271,10 +15315,10 @@ var ElementRenderer = React17__default.default.memo(
15271
15315
  const backgroundAnimationState = pptx.getBackgroundAnimationState(el, presentationElementStates);
15272
15316
  const effectPlacement = pptx.getShapeEffectLayerPlacement(el);
15273
15317
  const visualAnimationState = backgroundAnimationState ?? animationState;
15274
- const isTxt = chunk43TOUP5U_js.isEditableTextElement(el) && allow.textEditable;
15275
- const txtSE = (0, chunk43TOUP5U_js.dist_exports.hasTextProperties)(el) ? el.textStyle : void 0;
15318
+ const isTxt = chunk3PKYNJJG_js.isEditableTextElement(el) && allow.textEditable;
15319
+ const txtSE = (0, chunk3PKYNJJG_js.dist_exports.hasTextProperties)(el) ? el.textStyle : void 0;
15276
15320
  const textStyleOverrideCss = pptx.buildTextStyleOverrideCss(el.id, visualAnimationState?.textStyle);
15277
- const ss = chunk43TOUP5U_js.getShapeVisualStyle(
15321
+ const ss = chunk3PKYNJJG_js.getShapeVisualStyle(
15278
15322
  el,
15279
15323
  hf,
15280
15324
  fc,
@@ -15283,9 +15327,9 @@ var ElementRenderer = React17__default.default.memo(
15283
15327
  visualAnimationState?.animatesFill,
15284
15328
  visualAnimationState?.animatesStroke
15285
15329
  );
15286
- const ts = chunk43TOUP5U_js.getTextStyleForElement(el, chunk43TOUP5U_js.DEFAULT_TEXT_COLOR);
15330
+ const ts = chunk3PKYNJJG_js.getTextStyleForElement(el, chunk3PKYNJJG_js.DEFAULT_TEXT_COLOR);
15287
15331
  const isImg = el.type === "picture" || el.type === "image";
15288
- const vs = chunk43TOUP5U_js.renderVectorShape(
15332
+ const vs = chunk3PKYNJJG_js.renderVectorShape(
15289
15333
  el,
15290
15334
  isImg ? false : hf,
15291
15335
  fc,
@@ -15295,10 +15339,10 @@ var ElementRenderer = React17__default.default.memo(
15295
15339
  visualAnimationState?.animatesStroke
15296
15340
  );
15297
15341
  const isModel3D = el.type === "model3d";
15298
- const isConn = chunk43TOUP5U_js.isConnectorOrLineElement(el);
15299
- const shapeStyle3d = (0, chunk43TOUP5U_js.dist_exports.hasShapeProperties)(el) ? el.shapeStyle : void 0;
15342
+ const isConn = chunk3PKYNJJG_js.isConnectorOrLineElement(el);
15343
+ const shapeStyle3d = (0, chunk3PKYNJJG_js.dist_exports.hasShapeProperties)(el) ? el.shapeStyle : void 0;
15300
15344
  const extrusionData = React17.useMemo(
15301
- () => chunk43TOUP5U_js.build3DExtrusionData(shapeStyle3d?.shape3d, shapeStyle3d?.scene3d, fc, el.width, el.height),
15345
+ () => chunk3PKYNJJG_js.build3DExtrusionData(shapeStyle3d?.shape3d, shapeStyle3d?.scene3d, fc, el.width, el.height),
15302
15346
  [shapeStyle3d?.shape3d, shapeStyle3d?.scene3d, fc, el.width, el.height]
15303
15347
  );
15304
15348
  const actionAffordance = useActionAffordance(el, canInteract);
@@ -15388,7 +15432,7 @@ var ElementRenderer = React17__default.default.memo(
15388
15432
  "aria-hidden": aria.hidden ? true : void 0,
15389
15433
  "aria-selected": isSelected ? true : void 0,
15390
15434
  tabIndex: isFocusable ? 0 : -1,
15391
- className: chunk43TOUP5U_js.cn(
15435
+ className: chunk3PKYNJJG_js.cn(
15392
15436
  "absolute",
15393
15437
  "focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-blue-500",
15394
15438
  cur,
@@ -15461,9 +15505,9 @@ var ElementRenderer = React17__default.default.memo(
15461
15505
  txtSE,
15462
15506
  txtS: ts,
15463
15507
  vecShape: backgroundAnimationState && !isImg ? null : vs,
15464
- imgStyle: chunk43TOUP5U_js.getImageRenderStyle(el),
15465
- imgFilter: chunk43TOUP5U_js.getImageEffectsFilter(el),
15466
- imgOpacity: chunk43TOUP5U_js.getImageEffectsOpacity(el),
15508
+ imgStyle: chunk3PKYNJJG_js.getImageRenderStyle(el),
15509
+ imgFilter: chunk3PKYNJJG_js.getImageEffectsFilter(el),
15510
+ imgOpacity: chunk3PKYNJJG_js.getImageEffectsOpacity(el),
15467
15511
  imgAlt: imageAltText,
15468
15512
  isTxtEl: isTxt,
15469
15513
  media: mediaDataUrls,
@@ -15600,10 +15644,10 @@ function renderStrokeView(view, pressureSensitive, replayStyle, key) {
15600
15644
  }
15601
15645
  function renderInk(el, options) {
15602
15646
  const replay = options?.replay ?? false;
15603
- const strokes = chunk43TOUP5U_js.buildInkGroupStrokes(el, { color: "#000", width: 3 });
15647
+ const strokes = chunk3PKYNJJG_js.buildInkGroupStrokes(el, { color: "#000", width: 3 });
15604
15648
  strokes.some((s) => s.circles || s.nibMarks);
15605
15649
  const pressureSensitive = options?.pressureSensitive;
15606
- const replayStyles = replay ? chunk43TOUP5U_js.getInkReplayStyles(el, options?.replayConfig) : null;
15650
+ const replayStyles = replay ? chunk3PKYNJJG_js.getInkReplayStyles(el, options?.replayConfig) : null;
15607
15651
  return /* @__PURE__ */ jsxRuntime.jsxs(
15608
15652
  "svg",
15609
15653
  {
@@ -15611,7 +15655,7 @@ function renderInk(el, options) {
15611
15655
  viewBox: `0 0 ${Math.max(el.width, 1)} ${Math.max(el.height, 1)}`,
15612
15656
  preserveAspectRatio: "none",
15613
15657
  children: [
15614
- replay && /* @__PURE__ */ jsxRuntime.jsx("style", { children: chunk43TOUP5U_js.INK_REPLAY_KEYFRAMES }),
15658
+ replay && /* @__PURE__ */ jsxRuntime.jsx("style", { children: chunk3PKYNJJG_js.INK_REPLAY_KEYFRAMES }),
15615
15659
  strokes.map(
15616
15660
  (s, i) => renderStrokeView(s, pressureSensitive, replayStyles?.[i], `${el.id}-ink-${i}`)
15617
15661
  )
@@ -15622,7 +15666,7 @@ function renderInk(el, options) {
15622
15666
  function renderGroup(children, parentGroupFill) {
15623
15667
  return /* @__PURE__ */ jsxRuntime.jsx("div", { className: "relative w-full h-full pointer-events-none", children: pptx.filterRenderedElements(children).map((c, childIndex) => {
15624
15668
  const { hf, fc, sw, sc } = shapeParams(c);
15625
- const baseSs = chunk43TOUP5U_js.getShapeVisualStyle(c, hf, fc, sw, sc);
15669
+ const baseSs = chunk3PKYNJJG_js.getShapeVisualStyle(c, hf, fc, sw, sc);
15626
15670
  const inheritedFill = pptx.resolveGroupChildFill(c, parentGroupFill);
15627
15671
  const ss = inheritedFill ? {
15628
15672
  ...baseSs,
@@ -15633,9 +15677,9 @@ function renderGroup(children, parentGroupFill) {
15633
15677
  backgroundPosition: inheritedFill.backgroundPosition
15634
15678
  } : baseSs;
15635
15679
  const isI = c.type === "picture" || c.type === "image";
15636
- const vs = chunk43TOUP5U_js.renderVectorShape(c, isI ? false : hf, fc, sw, sc);
15637
- const ts = chunk43TOUP5U_js.getTextStyleForElement(c, chunk43TOUP5U_js.DEFAULT_TEXT_COLOR);
15638
- const isTxt = chunk43TOUP5U_js.isEditableTextElement(c);
15680
+ const vs = chunk3PKYNJJG_js.renderVectorShape(c, isI ? false : hf, fc, sw, sc);
15681
+ const ts = chunk3PKYNJJG_js.getTextStyleForElement(c, chunk3PKYNJJG_js.DEFAULT_TEXT_COLOR);
15682
+ const isTxt = chunk3PKYNJJG_js.isEditableTextElement(c);
15639
15683
  return /* @__PURE__ */ jsxRuntime.jsxs(
15640
15684
  "div",
15641
15685
  {
@@ -15644,9 +15688,9 @@ function renderGroup(children, parentGroupFill) {
15644
15688
  style: {
15645
15689
  left: c.x,
15646
15690
  top: c.y,
15647
- width: Math.max(c.width, chunk43TOUP5U_js.MIN_ELEMENT_SIZE),
15648
- height: Math.max(c.height, chunk43TOUP5U_js.MIN_ELEMENT_SIZE),
15649
- transform: chunk43TOUP5U_js.getElementTransform(c),
15691
+ width: Math.max(c.width, chunk3PKYNJJG_js.MIN_ELEMENT_SIZE),
15692
+ height: Math.max(c.height, chunk3PKYNJJG_js.MIN_ELEMENT_SIZE),
15693
+ transform: chunk3PKYNJJG_js.getElementTransform(c),
15650
15694
  transformOrigin: "center",
15651
15695
  ...ss,
15652
15696
  ...isI ? {
@@ -15671,8 +15715,8 @@ function renderGroup(children, parentGroupFill) {
15671
15715
  // A nested group: recurse, chaining the inherited fill so a
15672
15716
  // `grpFill` shape under a fill-less sub-group still paints.
15673
15717
  renderGroup(c.children, pptx.getGroupChildParentFill(c, parentGroupFill))
15674
- ) : isI && ("svgData" in c && c.svgData || "imageData" in c && c.imageData) ? /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "absolute inset-0 pointer-events-none", style: chunk43TOUP5U_js.getImageSurfaceStyle(c), children: [
15675
- chunk43TOUP5U_js.isImageTiled(c) ? /* @__PURE__ */ jsxRuntime.jsx(
15718
+ ) : isI && ("svgData" in c && c.svgData || "imageData" in c && c.imageData) ? /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "absolute inset-0 pointer-events-none", style: chunk3PKYNJJG_js.getImageSurfaceStyle(c), children: [
15719
+ chunk3PKYNJJG_js.isImageTiled(c) ? /* @__PURE__ */ jsxRuntime.jsx(
15676
15720
  TiledImageLayer,
15677
15721
  {
15678
15722
  element: c,
@@ -15685,7 +15729,7 @@ function renderGroup(children, parentGroupFill) {
15685
15729
  src: "svgData" in c && c.svgData ? c.svgData : c.imageData,
15686
15730
  alt: i18n.translationsEn["pptx.ink.groupChildAlt"],
15687
15731
  className: "pointer-events-none select-none",
15688
- style: chunk43TOUP5U_js.getImageRenderStyle(c),
15732
+ style: chunk3PKYNJJG_js.getImageRenderStyle(c),
15689
15733
  draggable: false
15690
15734
  }
15691
15735
  ),
@@ -15697,7 +15741,7 @@ function renderGroup(children, parentGroupFill) {
15697
15741
  {
15698
15742
  className: "relative z-10 w-full h-full pointer-events-none whitespace-pre-wrap break-words leading-[1.3]",
15699
15743
  style: ts,
15700
- children: chunk43TOUP5U_js.renderTextSegments(c, chunk43TOUP5U_js.DEFAULT_TEXT_COLOR)
15744
+ children: chunk3PKYNJJG_js.renderTextSegments(c, chunk3PKYNJJG_js.DEFAULT_TEXT_COLOR)
15701
15745
  }
15702
15746
  ) : null
15703
15747
  ] })
@@ -15711,8 +15755,8 @@ function renderContentPart(el, options) {
15711
15755
  if (el.inkStrokes && el.inkStrokes.length > 0) {
15712
15756
  const replay = options?.replay ?? false;
15713
15757
  const pressureSensitive = options?.pressureSensitive ?? true;
15714
- const strokes = chunk43TOUP5U_js.buildContentPartStrokes(el);
15715
- const replayStyles = replay ? chunk43TOUP5U_js.getContentPartReplayStyles(el.inkStrokes, options?.replayConfig) : null;
15758
+ const strokes = chunk3PKYNJJG_js.buildContentPartStrokes(el);
15759
+ const replayStyles = replay ? chunk3PKYNJJG_js.getContentPartReplayStyles(el.inkStrokes, options?.replayConfig) : null;
15716
15760
  return /* @__PURE__ */ jsxRuntime.jsxs(
15717
15761
  "svg",
15718
15762
  {
@@ -15720,7 +15764,7 @@ function renderContentPart(el, options) {
15720
15764
  viewBox: `0 0 ${Math.max(el.width, 1)} ${Math.max(el.height, 1)}`,
15721
15765
  preserveAspectRatio: "none",
15722
15766
  children: [
15723
- replay && /* @__PURE__ */ jsxRuntime.jsx("style", { children: chunk43TOUP5U_js.INK_REPLAY_KEYFRAMES }),
15767
+ replay && /* @__PURE__ */ jsxRuntime.jsx("style", { children: chunk3PKYNJJG_js.INK_REPLAY_KEYFRAMES }),
15724
15768
  strokes.map(
15725
15769
  (s, i) => renderStrokeView(s, pressureSensitive, replayStyles?.[i], `${el.id}-cp-ink-${i}`)
15726
15770
  )
@@ -15947,9 +15991,9 @@ function useInlineListEditor(element, rootRef, onChange, onModelReplacement) {
15947
15991
  collaboration: connected,
15948
15992
  model: pptx.createInlineListModelObserver(element),
15949
15993
  activationSelection,
15950
- children: seed && !connected ? chunk43TOUP5U_js.renderTextSegments(
15994
+ children: seed && !connected ? chunk3PKYNJJG_js.renderTextSegments(
15951
15995
  element,
15952
- chunk43TOUP5U_js.DEFAULT_TEXT_COLOR,
15996
+ chunk3PKYNJJG_js.DEFAULT_TEXT_COLOR,
15953
15997
  void 0,
15954
15998
  void 0,
15955
15999
  void 0,
@@ -16119,7 +16163,7 @@ function InlineTextEditor({
16119
16163
  seedRef.current = {
16120
16164
  initialText,
16121
16165
  hasRichSegments: Boolean(
16122
- (0, chunk43TOUP5U_js.dist_exports.hasTextProperties)(element) && element.textSegments && element.textSegments.length > 0
16166
+ (0, chunk3PKYNJJG_js.dist_exports.hasTextProperties)(element) && element.textSegments && element.textSegments.length > 0
16123
16167
  )
16124
16168
  };
16125
16169
  }
@@ -16185,8 +16229,8 @@ function InlineTextEditor({
16185
16229
  pending.endOffset
16186
16230
  );
16187
16231
  });
16188
- const warpStyle = chunk43TOUP5U_js.getTextWarpStyle(textStyleRaw);
16189
- const compensationTransform = chunk43TOUP5U_js.getTextCompensationTransform(element);
16232
+ const warpStyle = chunk3PKYNJJG_js.getTextWarpStyle(textStyleRaw);
16233
+ const compensationTransform = chunk3PKYNJJG_js.getTextCompensationTransform(element);
16190
16234
  const warpTransform = warpStyle?.transform;
16191
16235
  const mergedTransform = [compensationTransform, warpTransform].filter(Boolean).join(" ") || void 0;
16192
16236
  const wrapperStyle = {
@@ -16197,7 +16241,7 @@ function InlineTextEditor({
16197
16241
  transformOrigin: warpStyle?.transformOrigin || "center"
16198
16242
  };
16199
16243
  const nextInlineStyleValue = (property) => {
16200
- if (!(0, chunk43TOUP5U_js.dist_exports.hasTextProperties)(element)) {
16244
+ if (!(0, chunk3PKYNJJG_js.dist_exports.hasTextProperties)(element)) {
16201
16245
  return true;
16202
16246
  }
16203
16247
  const result = pptx.getInlineEditorSelectionResult(element.textSegments);
@@ -16274,7 +16318,7 @@ function InlineTextEditor({
16274
16318
  const text = e.clipboardData.getData("text/plain");
16275
16319
  document.execCommand("insertText", false, text);
16276
16320
  },
16277
- children: list.seed ? list.children : seed.hasRichSegments ? chunk43TOUP5U_js.renderTextSegments(element, chunk43TOUP5U_js.DEFAULT_TEXT_COLOR) : seed.initialText
16321
+ children: list.seed ? list.children : seed.hasRichSegments ? chunk3PKYNJJG_js.renderTextSegments(element, chunk3PKYNJJG_js.DEFAULT_TEXT_COLOR) : seed.initialText
16278
16322
  },
16279
16323
  list.seed?.paragraphs[0].token ?? "plain"
16280
16324
  );
@@ -17211,7 +17255,7 @@ function SmartArtRendererImpl({
17211
17255
  if (!onUpdateElement || !pptx.shouldCommitSmartArtNodeText(smartArtData, nodeId, text)) {
17212
17256
  return;
17213
17257
  }
17214
- const updated = (0, chunk43TOUP5U_js.dist_exports.updateSmartArtNodeText)(smartArtData, nodeId, text);
17258
+ const updated = (0, chunk3PKYNJJG_js.dist_exports.updateSmartArtNodeText)(smartArtData, nodeId, text);
17215
17259
  const box = { width: element.width, height: element.height };
17216
17260
  const reflowed = pptx.rebuildDrawingShapesIfCleared(
17217
17261
  updated,
@@ -17227,7 +17271,7 @@ function SmartArtRendererImpl({
17227
17271
  if (!onUpdateElement) {
17228
17272
  return;
17229
17273
  }
17230
- const next = (0, chunk43TOUP5U_js.dist_exports.setSmartArtNodeStyle)(smartArtData, nodeId, { fillColor: fill });
17274
+ const next = (0, chunk3PKYNJJG_js.dist_exports.setSmartArtNodeStyle)(smartArtData, nodeId, { fillColor: fill });
17231
17275
  if (next !== smartArtData) {
17232
17276
  const box = { width: element.width, height: element.height };
17233
17277
  const reflowed = pptx.rebuildDrawingShapesIfCleared(
@@ -17421,7 +17465,7 @@ function groupIntoParagraphs(element, fieldContext) {
17421
17465
  element,
17422
17466
  fieldContext ? (seg) => {
17423
17467
  if (seg.fieldType) {
17424
- const substituted = chunk43TOUP5U_js.substituteFieldText(
17468
+ const substituted = chunk3PKYNJJG_js.substituteFieldText(
17425
17469
  seg.text,
17426
17470
  seg.fieldType,
17427
17471
  fieldContext,
@@ -17456,13 +17500,13 @@ function getSegmentTspanProps(segment, element, fallbackColor) {
17456
17500
  if (s.strikethrough) {
17457
17501
  decos.push("line-through");
17458
17502
  }
17459
- const fill = s.hyperlink ? chunk43TOUP5U_js.normalizeHexColor(s.color || element.textStyle?.color, chunk43TOUP5U_js.HYPERLINK_COLOR) : chunk43TOUP5U_js.normalizeHexColor(s.color || element.textStyle?.color, fallbackColor);
17503
+ const fill = s.hyperlink ? chunk3PKYNJJG_js.normalizeHexColor(s.color || element.textStyle?.color, chunk3PKYNJJG_js.HYPERLINK_COLOR) : chunk3PKYNJJG_js.normalizeHexColor(s.color || element.textStyle?.color, fallbackColor);
17460
17504
  return {
17461
17505
  fill,
17462
- fontSize: s.fontSize ?? element.textStyle?.fontSize ?? chunk43TOUP5U_js.DEFAULT_TEXT_FONT_SIZE,
17506
+ fontSize: s.fontSize ?? element.textStyle?.fontSize ?? chunk3PKYNJJG_js.DEFAULT_TEXT_FONT_SIZE,
17463
17507
  fontWeight: s.bold ? 700 : 400,
17464
17508
  fontStyle: s.italic ? "italic" : void 0,
17465
- fontFamily: s.fontFamily || element.textStyle?.fontFamily ? (0, chunk43TOUP5U_js.dist_exports.getSubstituteFontFamily)(s.fontFamily || element.textStyle?.fontFamily || "") : chunk43TOUP5U_js.DEFAULT_FONT_FAMILY,
17509
+ fontFamily: s.fontFamily || element.textStyle?.fontFamily ? (0, chunk3PKYNJJG_js.dist_exports.getSubstituteFontFamily)(s.fontFamily || element.textStyle?.fontFamily || "") : chunk3PKYNJJG_js.DEFAULT_FONT_FAMILY,
17466
17510
  textDecoration: decos.length > 0 ? decos.join(" ") : void 0
17467
17511
  };
17468
17512
  }
@@ -17470,8 +17514,8 @@ function resolveSegmentFont(segment, element) {
17470
17514
  const s = segment.style || {};
17471
17515
  const family = s.fontFamily || element.textStyle?.fontFamily;
17472
17516
  return {
17473
- fontFamily: family ? (0, chunk43TOUP5U_js.dist_exports.getSubstituteFontFamily)(family) : chunk43TOUP5U_js.DEFAULT_FONT_FAMILY,
17474
- fontSizePx: s.fontSize ?? element.textStyle?.fontSize ?? chunk43TOUP5U_js.DEFAULT_TEXT_FONT_SIZE,
17517
+ fontFamily: family ? (0, chunk3PKYNJJG_js.dist_exports.getSubstituteFontFamily)(family) : chunk3PKYNJJG_js.DEFAULT_FONT_FAMILY,
17518
+ fontSizePx: s.fontSize ?? element.textStyle?.fontSize ?? chunk3PKYNJJG_js.DEFAULT_TEXT_FONT_SIZE,
17475
17519
  bold: s.bold ?? element.textStyle?.bold,
17476
17520
  italic: s.italic ?? element.textStyle?.italic
17477
17521
  };
@@ -17537,7 +17581,7 @@ function WarpedText({
17537
17581
  fallbackColor,
17538
17582
  fieldContext
17539
17583
  }) {
17540
- if (!(0, chunk43TOUP5U_js.dist_exports.hasTextProperties)(element)) {
17584
+ if (!(0, chunk3PKYNJJG_js.dist_exports.hasTextProperties)(element)) {
17541
17585
  return null;
17542
17586
  }
17543
17587
  const textEl = element;
@@ -17555,9 +17599,9 @@ function WarpedText({
17555
17599
  const warpAdj2 = textEl.textStyle?.textWarpAdj2;
17556
17600
  const align = textEl.textStyle?.align ?? "center";
17557
17601
  const { startOffset, textAnchor } = getAlignmentProps(align);
17558
- const baseFontSize = textEl.textStyle?.fontSize ?? chunk43TOUP5U_js.DEFAULT_TEXT_FONT_SIZE;
17559
- const baseFontFamily = textEl.textStyle?.fontFamily ? (0, chunk43TOUP5U_js.dist_exports.getSubstituteFontFamily)(textEl.textStyle.fontFamily) : chunk43TOUP5U_js.DEFAULT_FONT_FAMILY;
17560
- const baseFill = chunk43TOUP5U_js.normalizeHexColor(textEl.textStyle?.color, fallbackColor);
17602
+ const baseFontSize = textEl.textStyle?.fontSize ?? chunk3PKYNJJG_js.DEFAULT_TEXT_FONT_SIZE;
17603
+ const baseFontFamily = textEl.textStyle?.fontFamily ? (0, chunk3PKYNJJG_js.dist_exports.getSubstituteFontFamily)(textEl.textStyle.fontFamily) : chunk3PKYNJJG_js.DEFAULT_FONT_FAMILY;
17604
+ const baseFill = chunk3PKYNJJG_js.normalizeHexColor(textEl.textStyle?.color, fallbackColor);
17561
17605
  if (pptx.hasGlyphEnvelope(preset)) {
17562
17606
  const perLine = pptx.buildGlyphEnvelopeBlock(
17563
17607
  preset,
@@ -17657,7 +17701,7 @@ function WarpedText({
17657
17701
  );
17658
17702
  }
17659
17703
  var GLYPH_BY_SHAPE = Object.fromEntries(
17660
- chunk43TOUP5U_js.ACTION_BUTTON_PRESETS.map((p) => [p.shapeType, p.iconPath])
17704
+ chunk3PKYNJJG_js.ACTION_BUTTON_PRESETS.map((p) => [p.shapeType, p.iconPath])
17661
17705
  );
17662
17706
  GLYPH_BY_SHAPE["actionButtonForwardOrNext"] = GLYPH_BY_SHAPE["actionButtonForwardNext"];
17663
17707
  GLYPH_BY_SHAPE["actionButtonBackOrPrevious"] = GLYPH_BY_SHAPE["actionButtonBackPrevious"];
@@ -17727,11 +17771,11 @@ function renderTextElementBody(options) {
17727
17771
  const isLinkedTextBox = pptx.isLinkedTextBox(el);
17728
17772
  const linkedSegments = pptx.getOverflowSegments(el, slideElements);
17729
17773
  const useSvgWarp = pptx.shouldUseSvgWarp(
17730
- (0, chunk43TOUP5U_js.dist_exports.hasTextProperties)(el) ? el.textStyle?.textWarpPreset : void 0
17774
+ (0, chunk3PKYNJJG_js.dist_exports.hasTextProperties)(el) ? el.textStyle?.textWarpPreset : void 0
17731
17775
  );
17732
- const scene3dStyle = (0, chunk43TOUP5U_js.dist_exports.hasTextProperties)(el) ? chunk43TOUP5U_js.buildTextBody3DSceneStyle(el.textStyle, { width: el.width, height: el.height }) : void 0;
17776
+ const scene3dStyle = (0, chunk3PKYNJJG_js.dist_exports.hasTextProperties)(el) ? chunk3PKYNJJG_js.buildTextBody3DSceneStyle(el.textStyle, { width: el.width, height: el.height }) : void 0;
17733
17777
  const rotationTransform = pptx.getTextBodyRotationTransform(el);
17734
- const composedTransform = [rotationTransform, chunk43TOUP5U_js.getTextCompensationTransform(el), scene3dStyle?.transform].filter(Boolean).join(" ") || void 0;
17778
+ const composedTransform = [rotationTransform, chunk3PKYNJJG_js.getTextCompensationTransform(el), scene3dStyle?.transform].filter(Boolean).join(" ") || void 0;
17735
17779
  const transformStyle = {
17736
17780
  transform: composedTransform,
17737
17781
  // A COM-measured homography (`scene3dStyle.transformOrigin === '0 0'`)
@@ -17761,18 +17805,18 @@ function renderTextElementBody(options) {
17761
17805
  shouldRenderText && (useSvgWarp ? /* @__PURE__ */ jsxRuntime.jsx(
17762
17806
  "div",
17763
17807
  {
17764
- className: chunk43TOUP5U_js.cn(
17808
+ className: chunk3PKYNJJG_js.cn(
17765
17809
  "relative z-10 w-full h-full",
17766
17810
  onHyperlinkClick ? "" : "pointer-events-none"
17767
17811
  ),
17768
- style: { ...chunk43TOUP5U_js.getTextLayoutStyle(el), ...transformStyle },
17812
+ style: { ...chunk3PKYNJJG_js.getTextLayoutStyle(el), ...transformStyle },
17769
17813
  children: /* @__PURE__ */ jsxRuntime.jsx(
17770
17814
  WarpedText,
17771
17815
  {
17772
17816
  element: el,
17773
17817
  width: el.width,
17774
17818
  height: el.height,
17775
- fallbackColor: chunk43TOUP5U_js.DEFAULT_TEXT_COLOR,
17819
+ fallbackColor: chunk3PKYNJJG_js.DEFAULT_TEXT_COLOR,
17776
17820
  findHighlights: findHl,
17777
17821
  fieldContext
17778
17822
  }
@@ -17781,19 +17825,19 @@ function renderTextElementBody(options) {
17781
17825
  ) : /* @__PURE__ */ jsxRuntime.jsx(
17782
17826
  "div",
17783
17827
  {
17784
- className: chunk43TOUP5U_js.cn(
17828
+ className: chunk3PKYNJJG_js.cn(
17785
17829
  "relative z-10 w-full h-full whitespace-pre-wrap break-words leading-[1.3]",
17786
17830
  onHyperlinkClick ? "" : "pointer-events-none"
17787
17831
  ),
17788
17832
  style: {
17789
- ...chunk43TOUP5U_js.getTextLayoutStyle(el),
17833
+ ...chunk3PKYNJJG_js.getTextLayoutStyle(el),
17790
17834
  ...txtS,
17791
- ...chunk43TOUP5U_js.getTextWarpStyle(txtSE),
17835
+ ...chunk3PKYNJJG_js.getTextWarpStyle(txtSE),
17792
17836
  ...transformStyle
17793
17837
  },
17794
- children: chunk43TOUP5U_js.renderTextSegments(
17838
+ children: chunk3PKYNJJG_js.renderTextSegments(
17795
17839
  el,
17796
- chunk43TOUP5U_js.DEFAULT_TEXT_COLOR,
17840
+ chunk3PKYNJJG_js.DEFAULT_TEXT_COLOR,
17797
17841
  void 0,
17798
17842
  findHl,
17799
17843
  onHyperlinkClick,
@@ -18112,7 +18156,7 @@ function renderBody(options) {
18112
18156
  );
18113
18157
  }
18114
18158
  if (isImg) {
18115
- return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "absolute inset-0 pointer-events-none", style: chunk43TOUP5U_js.getImageSurfaceStyle(el), children: [
18159
+ return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "absolute inset-0 pointer-events-none", style: chunk3PKYNJJG_js.getImageSurfaceStyle(el), children: [
18116
18160
  renderImg(el, imgStyle, imgFilter, imgAlt, imgOpacity),
18117
18161
  vecShape ? /* @__PURE__ */ jsxRuntime.jsx("div", { className: "pointer-events-none absolute inset-0", children: vecShape }) : null
18118
18162
  ] });
@@ -18129,7 +18173,7 @@ function renderBody(options) {
18129
18173
  textDirection: txtSE?.textDirection,
18130
18174
  textStyle: txtS,
18131
18175
  textStyleRaw: txtSE,
18132
- layoutStyle: chunk43TOUP5U_js.getTextLayoutStyle(el),
18176
+ layoutStyle: chunk3PKYNJJG_js.getTextLayoutStyle(el),
18133
18177
  element: el,
18134
18178
  onCommit,
18135
18179
  onCancel,
@@ -18140,7 +18184,7 @@ function renderBody(options) {
18140
18184
  ] });
18141
18185
  }
18142
18186
  if (el.type === "table") {
18143
- return chunk43TOUP5U_js.renderTableElement(el, txtS, {
18187
+ return chunk3PKYNJJG_js.renderTableElement(el, txtS, {
18144
18188
  editable: isSel,
18145
18189
  selectedCell: isSel ? tableSt : null,
18146
18190
  onSelectCell: onCellSel,
@@ -18173,7 +18217,7 @@ function renderBody(options) {
18173
18217
  );
18174
18218
  }
18175
18219
  if (el.type === "media") {
18176
- return chunk43TOUP5U_js.renderMediaElement(el, media, {
18220
+ return chunk3PKYNJJG_js.renderMediaElement(el, media, {
18177
18221
  // Present mode autoplays every media element on the active slide,
18178
18222
  // not only ones persisted with their own `autoPlay` flag (matching
18179
18223
  // the other four bindings' unconditional `presenting`-gated
@@ -18196,7 +18240,7 @@ function renderBody(options) {
18196
18240
  onPlayStateChange: handleMediaPlayStateChange
18197
18241
  });
18198
18242
  }
18199
- if (doInk && (0, chunk43TOUP5U_js.dist_exports.isInkElement)(el)) {
18243
+ if (doInk && (0, chunk3PKYNJJG_js.dist_exports.isInkElement)(el)) {
18200
18244
  return renderInk(el, {
18201
18245
  replay: isPresentationPassive,
18202
18246
  pressureSensitive: true
@@ -18225,27 +18269,27 @@ function renderBody(options) {
18225
18269
  }
18226
18270
  return renderGroup(el.children, pptx.getGroupChildParentFill(el));
18227
18271
  }
18228
- if (chunk43TOUP5U_js.shouldRenderFallbackLabel(el, isTxtEl)) {
18229
- return /* @__PURE__ */ jsxRuntime.jsx("div", { className: "w-full h-full flex items-center justify-center text-[11px] text-white/80 pointer-events-none", children: chunk43TOUP5U_js.getElementLabel(el) });
18272
+ if (chunk3PKYNJJG_js.shouldRenderFallbackLabel(el, isTxtEl)) {
18273
+ return /* @__PURE__ */ jsxRuntime.jsx("div", { className: "w-full h-full flex items-center justify-center text-[11px] text-white/80 pointer-events-none", children: chunk3PKYNJJG_js.getElementLabel(el) });
18230
18274
  }
18231
18275
  return renderTextElementBody(options);
18232
18276
  }
18233
18277
  function defaultTextColorForFill(fillColor) {
18234
18278
  const hex = String(fillColor ?? "").replace(/^#/u, "");
18235
18279
  if (!/^[0-9a-f]{6}$/iu.test(hex)) {
18236
- return chunk43TOUP5U_js.DEFAULT_TEXT_COLOR;
18280
+ return chunk3PKYNJJG_js.DEFAULT_TEXT_COLOR;
18237
18281
  }
18238
18282
  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);
18239
18283
  const luminance = channels[0] * 0.2126 + channels[1] * 0.7152 + channels[2] * 0.0722;
18240
- return luminance > 0.179 ? chunk43TOUP5U_js.DEFAULT_TEXT_COLOR : "#ffffff";
18284
+ return luminance > 0.179 ? chunk3PKYNJJG_js.DEFAULT_TEXT_COLOR : "#ffffff";
18241
18285
  }
18242
18286
  function getStaticElementVisualState(element, parentGroupFill) {
18243
- const style = (0, chunk43TOUP5U_js.dist_exports.hasShapeProperties)(element) ? element.shapeStyle : void 0;
18244
- const hasFill = style?.fillColor !== void 0 && style.fillColor !== "transparent" || Boolean(chunk43TOUP5U_js.buildCssGradientFromShapeStyle(style) || style?.fillGradient) || style?.fillMode === "pattern" && Boolean(style.fillPatternPreset);
18245
- const fill = chunk43TOUP5U_js.normalizeHexColor(style?.fillColor, chunk43TOUP5U_js.DEFAULT_FILL_COLOR);
18287
+ const style = (0, chunk3PKYNJJG_js.dist_exports.hasShapeProperties)(element) ? element.shapeStyle : void 0;
18288
+ const hasFill = style?.fillColor !== void 0 && style.fillColor !== "transparent" || Boolean(chunk3PKYNJJG_js.buildCssGradientFromShapeStyle(style) || style?.fillGradient) || style?.fillMode === "pattern" && Boolean(style.fillPatternPreset);
18289
+ const fill = chunk3PKYNJJG_js.normalizeHexColor(style?.fillColor, chunk3PKYNJJG_js.DEFAULT_FILL_COLOR);
18246
18290
  const strokeWidth = pptx.paintedStrokeWidth(style);
18247
- const stroke = chunk43TOUP5U_js.normalizeHexColor(style?.strokeColor, chunk43TOUP5U_js.DEFAULT_STROKE_COLOR);
18248
- const baseVisualStyle = chunk43TOUP5U_js.getShapeVisualStyle(element, hasFill, fill, strokeWidth, stroke);
18291
+ const stroke = chunk3PKYNJJG_js.normalizeHexColor(style?.strokeColor, chunk3PKYNJJG_js.DEFAULT_STROKE_COLOR);
18292
+ const baseVisualStyle = chunk3PKYNJJG_js.getShapeVisualStyle(element, hasFill, fill, strokeWidth, stroke);
18249
18293
  const inheritedFill = pptx.resolveGroupChildFill(element, parentGroupFill);
18250
18294
  const visualStyle = inheritedFill ? {
18251
18295
  ...baseVisualStyle,
@@ -18255,13 +18299,13 @@ function getStaticElementVisualState(element, parentGroupFill) {
18255
18299
  backgroundSize: inheritedFill.backgroundSize,
18256
18300
  backgroundPosition: inheritedFill.backgroundPosition
18257
18301
  } : baseVisualStyle;
18258
- const textStyle = chunk43TOUP5U_js.getTextStyleForElement(
18302
+ const textStyle = chunk3PKYNJJG_js.getTextStyleForElement(
18259
18303
  element,
18260
- element.type === "shape" && hasFill ? defaultTextColorForFill(fill) : chunk43TOUP5U_js.DEFAULT_TEXT_COLOR
18304
+ element.type === "shape" && hasFill ? defaultTextColorForFill(fill) : chunk3PKYNJJG_js.DEFAULT_TEXT_COLOR
18261
18305
  );
18262
18306
  const isImage = element.type === "picture" || element.type === "image";
18263
- const letsTextOverflow = (0, chunk43TOUP5U_js.dist_exports.hasTextProperties)(element) && element.textStyle?.autoFitMode === "shrink" && (element.type === "text" || element.locks?.txBox === true);
18264
- const shapeType = (0, chunk43TOUP5U_js.dist_exports.hasShapeProperties)(element) ? element.shapeType : void 0;
18307
+ const letsTextOverflow = (0, chunk3PKYNJJG_js.dist_exports.hasTextProperties)(element) && element.textStyle?.autoFitMode === "shrink" && (element.type === "text" || element.locks?.txBox === true);
18308
+ const shapeType = (0, chunk3PKYNJJG_js.dist_exports.hasShapeProperties)(element) ? element.shapeType : void 0;
18265
18309
  const isCallout = pptx.isWedgeCalloutPresetShape(shapeType) || String(shapeType ?? "").toLowerCase().includes("callout");
18266
18310
  return {
18267
18311
  hasFill,
@@ -18282,7 +18326,7 @@ function getStaticElementInteractionState(element, hasActionHandler, exposeEleme
18282
18326
  return { action, isActionable, contractRole };
18283
18327
  }
18284
18328
  function getStaticElementWrapperClassName(element, visual, positioned, isActionable) {
18285
- const overflowClass = visual.isImage || element.type === "group" || chunk43TOUP5U_js.isConnectorOrLineElement(element) || visual.isCallout || visual.letsTextOverflow ? "" : "overflow-hidden";
18329
+ const overflowClass = visual.isImage || element.type === "group" || chunk3PKYNJJG_js.isConnectorOrLineElement(element) || visual.isCallout || visual.letsTextOverflow ? "" : "overflow-hidden";
18286
18330
  const pointerClass = isActionable ? "pointer-events-auto cursor-pointer" : "pointer-events-none";
18287
18331
  return `${positioned ? "absolute" : "relative"} ${overflowClass} ${pointerClass}`;
18288
18332
  }
@@ -18365,7 +18409,7 @@ function StaticElementRendererImpl({
18365
18409
  top: positioned ? element.y : void 0,
18366
18410
  width: positioned ? Math.max(element.width, 1) : "100%",
18367
18411
  height: positioned ? Math.max(element.height, 1) : "100%",
18368
- transform: positioned ? chunk43TOUP5U_js.getElementTransform(element) : void 0,
18412
+ transform: positioned ? chunk3PKYNJJG_js.getElementTransform(element) : void 0,
18369
18413
  transformOrigin: "center",
18370
18414
  zIndex,
18371
18415
  ...visualStyle,
@@ -18406,20 +18450,20 @@ function StaticElementRendererImpl({
18406
18450
  isEditing: false,
18407
18451
  editText: "",
18408
18452
  spellCheck: false,
18409
- txtSE: (0, chunk43TOUP5U_js.dist_exports.hasTextProperties)(element) ? element.textStyle : void 0,
18453
+ txtSE: (0, chunk3PKYNJJG_js.dist_exports.hasTextProperties)(element) ? element.textStyle : void 0,
18410
18454
  txtS: textStyle,
18411
- vecShape: chunk43TOUP5U_js.renderVectorShape(
18455
+ vecShape: chunk3PKYNJJG_js.renderVectorShape(
18412
18456
  element,
18413
18457
  isImage ? false : hasFill,
18414
18458
  fill,
18415
18459
  strokeWidth,
18416
18460
  stroke
18417
18461
  ),
18418
- imgStyle: imageAnimation ? { ...chunk43TOUP5U_js.getImageRenderStyle(element), animation: imageAnimation } : chunk43TOUP5U_js.getImageRenderStyle(element),
18419
- imgFilter: chunk43TOUP5U_js.getImageEffectsFilter(element),
18420
- imgOpacity: chunk43TOUP5U_js.getImageEffectsOpacity(element),
18462
+ imgStyle: imageAnimation ? { ...chunk3PKYNJJG_js.getImageRenderStyle(element), animation: imageAnimation } : chunk3PKYNJJG_js.getImageRenderStyle(element),
18463
+ imgFilter: chunk3PKYNJJG_js.getImageEffectsFilter(element),
18464
+ imgOpacity: chunk3PKYNJJG_js.getImageEffectsOpacity(element),
18421
18465
  imgAlt: "",
18422
- isTxtEl: chunk43TOUP5U_js.isEditableTextElement(element),
18466
+ isTxtEl: chunk3PKYNJJG_js.isEditableTextElement(element),
18423
18467
  media: mediaDataUrls,
18424
18468
  tableSt: null,
18425
18469
  isSel: false,
@@ -18465,7 +18509,7 @@ function SlideLayer({
18465
18509
  style: {
18466
18510
  width: safeWidth,
18467
18511
  height: safeHeight,
18468
- backgroundColor: slide.backgroundColor ? chunk43TOUP5U_js.normalizeHexColor(slide.backgroundColor, "#ffffff") : "#ffffff",
18512
+ backgroundColor: slide.backgroundColor ? chunk3PKYNJJG_js.normalizeHexColor(slide.backgroundColor, "#ffffff") : "#ffffff",
18469
18513
  backgroundImage: slide.backgroundImage ? `url(${slide.backgroundImage})` : slide.backgroundGradient ? slide.backgroundGradient : void 0,
18470
18514
  backgroundSize: slide.backgroundImage ? "cover" : void 0,
18471
18515
  backgroundPosition: slide.backgroundImage ? "center" : void 0
@@ -18966,6 +19010,7 @@ Object.defineProperty(exports, "storeAudienceContent", {
18966
19010
  get: function () { return pptx.storeAudienceContent; }
18967
19011
  });
18968
19012
  exports.ACTION_VERB_MAP = ACTION_VERB_MAP;
19013
+ exports.ChartFormatContext = ChartFormatContext;
18969
19014
  exports.ChartPartSelectionProvider = ChartPartSelectionProvider;
18970
19015
  exports.CollaborationCursorOverlay = CollaborationCursorOverlay;
18971
19016
  exports.CollaborationProvider = CollaborationProvider;
@@ -19005,6 +19050,7 @@ exports.useAudienceMode = useAudienceMode;
19005
19050
  exports.useAutosave = useAutosave;
19006
19051
  exports.useBroadcastFollower = useBroadcastFollower;
19007
19052
  exports.useCanvasInteractions = useCanvasInteractions;
19053
+ exports.useChartFormatContext = useChartFormatContext;
19008
19054
  exports.useChartPartSelection = useChartPartSelection;
19009
19055
  exports.useClipboardHandlers = useClipboardHandlers;
19010
19056
  exports.useCollaboration = useCollaboration;