pptx-react-viewer 2.16.0 → 2.16.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (97) hide show
  1. package/CHANGELOG.md +2 -0
  2. package/dist/{AiChatPanel-VKGWK23E.js → AiChatPanel-OHB6CVLY.js} +22 -22
  3. package/dist/AiChatPanel-OHB6CVLY.js.br +0 -0
  4. package/dist/AiChatPanel-OHB6CVLY.js.gz +0 -0
  5. package/dist/{AiChatPanel-TYU52HDW.mjs → AiChatPanel-UPNVIENY.mjs} +3 -3
  6. package/dist/AiChatPanel-UPNVIENY.mjs.br +0 -0
  7. package/dist/AiChatPanel-UPNVIENY.mjs.gz +0 -0
  8. package/dist/{Model3DScene-TG7OSR6V.js → Model3DScene-7FKWPESH.js} +2 -2
  9. package/dist/{Model3DScene-TG7OSR6V.js.br → Model3DScene-7FKWPESH.js.br} +0 -0
  10. package/dist/Model3DScene-7FKWPESH.js.gz +0 -0
  11. package/dist/{Model3DScene-267BHD5T.mjs → Model3DScene-KEUY3M7X.mjs} +1 -1
  12. package/dist/{Model3DScene-267BHD5T.mjs.br → Model3DScene-KEUY3M7X.mjs.br} +0 -0
  13. package/dist/Model3DScene-KEUY3M7X.mjs.gz +0 -0
  14. package/dist/{SurfaceChart3DScene-RPRVXRQZ.mjs → SurfaceChart3DScene-2MLBPJ63.mjs} +1 -1
  15. package/dist/{SurfaceChart3DScene-RPRVXRQZ.mjs.br → SurfaceChart3DScene-2MLBPJ63.mjs.br} +0 -0
  16. package/dist/SurfaceChart3DScene-2MLBPJ63.mjs.gz +0 -0
  17. package/dist/{SurfaceChart3DScene-GK4JHZAC.js → SurfaceChart3DScene-NPJQXIGW.js} +2 -2
  18. package/dist/SurfaceChart3DScene-NPJQXIGW.js.br +0 -0
  19. package/dist/SurfaceChart3DScene-NPJQXIGW.js.gz +0 -0
  20. package/dist/{chunk-P3Y3OMAD.js → chunk-3NDRTC7T.js} +303 -40
  21. package/dist/chunk-3NDRTC7T.js.br +0 -0
  22. package/dist/{chunk-P3Y3OMAD.js.gz → chunk-3NDRTC7T.js.gz} +0 -0
  23. package/dist/{chunk-VNVURLZM.mjs → chunk-6ROCCY4M.mjs} +14 -9
  24. package/dist/chunk-6ROCCY4M.mjs.br +0 -0
  25. package/dist/chunk-6ROCCY4M.mjs.gz +0 -0
  26. package/dist/{chunk-PILJZ5OE.js → chunk-7UBDMCI7.js} +3 -3
  27. package/dist/chunk-7UBDMCI7.js.br +0 -0
  28. package/dist/chunk-7UBDMCI7.js.gz +0 -0
  29. package/dist/{chunk-GOPIG4VW.js → chunk-DQTTI6D4.js} +348 -344
  30. package/dist/chunk-DQTTI6D4.js.br +0 -0
  31. package/dist/chunk-DQTTI6D4.js.gz +0 -0
  32. package/dist/{chunk-OIITLGKQ.mjs → chunk-ENOHLGJ2.mjs} +298 -40
  33. package/dist/chunk-ENOHLGJ2.mjs.br +0 -0
  34. package/dist/{chunk-OIITLGKQ.mjs.gz → chunk-ENOHLGJ2.mjs.gz} +0 -0
  35. package/dist/{chunk-AX75ONFY.js → chunk-IN7D2T4R.js} +373 -375
  36. package/dist/chunk-IN7D2T4R.js.br +0 -0
  37. package/dist/chunk-IN7D2T4R.js.gz +0 -0
  38. package/dist/{chunk-ULB35HMJ.mjs → chunk-LJZFG6YP.mjs} +1 -1
  39. package/dist/chunk-LJZFG6YP.mjs.br +0 -0
  40. package/dist/chunk-LJZFG6YP.mjs.gz +0 -0
  41. package/dist/{chunk-7W5MCYBN.js → chunk-N6IE34HX.js} +1060 -1055
  42. package/dist/chunk-N6IE34HX.js.br +0 -0
  43. package/dist/chunk-N6IE34HX.js.gz +0 -0
  44. package/dist/{chunk-TWPZJXLC.mjs → chunk-RUK5XZGO.mjs} +11 -7
  45. package/dist/chunk-RUK5XZGO.mjs.br +0 -0
  46. package/dist/chunk-RUK5XZGO.mjs.gz +0 -0
  47. package/dist/{chunk-FFBY2TKD.mjs → chunk-ZOOGEDYG.mjs} +131 -133
  48. package/dist/chunk-ZOOGEDYG.mjs.br +0 -0
  49. package/dist/chunk-ZOOGEDYG.mjs.gz +0 -0
  50. package/dist/index.js +39 -39
  51. package/dist/index.js.br +0 -0
  52. package/dist/index.js.gz +0 -0
  53. package/dist/index.mjs +5 -5
  54. package/dist/index.mjs.br +0 -0
  55. package/dist/index.mjs.gz +0 -0
  56. package/dist/internals.d.ts +16 -0
  57. package/dist/internals.d.ts.map +1 -1
  58. package/dist/internals.js +78 -78
  59. package/dist/internals.js.br +0 -0
  60. package/dist/internals.js.gz +0 -0
  61. package/dist/internals.mjs +3 -3
  62. package/dist/internals.mjs.br +0 -0
  63. package/dist/internals.mjs.gz +0 -0
  64. package/dist/viewer/index.js +26 -26
  65. package/dist/viewer/index.js.br +0 -0
  66. package/dist/viewer/index.js.gz +0 -0
  67. package/dist/viewer/index.mjs +5 -5
  68. package/dist/viewer/index.mjs.br +0 -0
  69. package/dist/viewer/index.mjs.gz +0 -0
  70. package/package.json +1 -1
  71. package/dist/AiChatPanel-TYU52HDW.mjs.br +0 -0
  72. package/dist/AiChatPanel-TYU52HDW.mjs.gz +0 -0
  73. package/dist/AiChatPanel-VKGWK23E.js.br +0 -0
  74. package/dist/AiChatPanel-VKGWK23E.js.gz +0 -0
  75. package/dist/Model3DScene-267BHD5T.mjs.gz +0 -0
  76. package/dist/Model3DScene-TG7OSR6V.js.gz +0 -0
  77. package/dist/SurfaceChart3DScene-GK4JHZAC.js.br +0 -0
  78. package/dist/SurfaceChart3DScene-GK4JHZAC.js.gz +0 -0
  79. package/dist/SurfaceChart3DScene-RPRVXRQZ.mjs.gz +0 -0
  80. package/dist/chunk-7W5MCYBN.js.br +0 -0
  81. package/dist/chunk-7W5MCYBN.js.gz +0 -0
  82. package/dist/chunk-AX75ONFY.js.br +0 -0
  83. package/dist/chunk-AX75ONFY.js.gz +0 -0
  84. package/dist/chunk-FFBY2TKD.mjs.br +0 -0
  85. package/dist/chunk-FFBY2TKD.mjs.gz +0 -0
  86. package/dist/chunk-GOPIG4VW.js.br +0 -0
  87. package/dist/chunk-GOPIG4VW.js.gz +0 -0
  88. package/dist/chunk-OIITLGKQ.mjs.br +0 -0
  89. package/dist/chunk-P3Y3OMAD.js.br +0 -0
  90. package/dist/chunk-PILJZ5OE.js.br +0 -0
  91. package/dist/chunk-PILJZ5OE.js.gz +0 -0
  92. package/dist/chunk-TWPZJXLC.mjs.br +0 -0
  93. package/dist/chunk-TWPZJXLC.mjs.gz +0 -0
  94. package/dist/chunk-ULB35HMJ.mjs.br +0 -0
  95. package/dist/chunk-ULB35HMJ.mjs.gz +0 -0
  96. package/dist/chunk-VNVURLZM.mjs.br +0 -0
  97. package/dist/chunk-VNVURLZM.mjs.gz +0 -0
@@ -1,8 +1,8 @@
1
1
  'use strict';
2
2
 
3
- var chunkAX75ONFY_js = require('./chunk-AX75ONFY.js');
3
+ var chunkIN7D2T4R_js = require('./chunk-IN7D2T4R.js');
4
4
  var chunk3ISYPBSX_js = require('./chunk-3ISYPBSX.js');
5
- var chunkP3Y3OMAD_js = require('./chunk-P3Y3OMAD.js');
5
+ var chunk3NDRTC7T_js = require('./chunk-3NDRTC7T.js');
6
6
  var react = require('react');
7
7
  var JSZip = require('jszip');
8
8
  var reactI18next = require('react-i18next');
@@ -14,7 +14,7 @@ var JSZip__default = /*#__PURE__*/_interopDefault(JSZip);
14
14
  function useVirtualizedSlides({
15
15
  totalItems,
16
16
  itemHeight,
17
- overscan = chunkP3Y3OMAD_js.DEFAULT_VIRTUAL_OVERSCAN
17
+ overscan = chunk3NDRTC7T_js.DEFAULT_VIRTUAL_OVERSCAN
18
18
  }) {
19
19
  const scrollContainerRef = react.useRef(null);
20
20
  const [scrollTop, setScrollTop] = react.useState(0);
@@ -44,7 +44,7 @@ function useVirtualizedSlides({
44
44
  resizeObserver?.disconnect();
45
45
  };
46
46
  }, []);
47
- const range = chunkP3Y3OMAD_js.computeVirtualRange(totalItems, itemHeight, scrollTop, viewportHeight, overscan);
47
+ const range = chunk3NDRTC7T_js.computeVirtualRange(totalItems, itemHeight, scrollTop, viewportHeight, overscan);
48
48
  const safeItemHeight = Math.max(itemHeight, 1);
49
49
  const scrollToIndex = react.useCallback(
50
50
  (index, behavior = "smooth") => {
@@ -85,7 +85,7 @@ function usePresenceTracking({
85
85
  }) {
86
86
  const [remoteUsers, setRemoteUsers] = react.useState([]);
87
87
  const projectorRef = react.useRef(null);
88
- projectorRef.current ??= chunkP3Y3OMAD_js.createPresenceProjector();
88
+ projectorRef.current ??= chunk3NDRTC7T_js.createPresenceProjector();
89
89
  const projector = projectorRef.current;
90
90
  const lastBroadcastRef = react.useRef(0);
91
91
  const pendingBroadcastRef = react.useRef(null);
@@ -110,7 +110,7 @@ function usePresenceTracking({
110
110
  awareness.setLocalStateField("presence", state);
111
111
  lastBroadcastRef.current = Date.now();
112
112
  };
113
- if (elapsed >= chunkP3Y3OMAD_js.BROADCAST_THROTTLE_MS) {
113
+ if (elapsed >= chunk3NDRTC7T_js.BROADCAST_THROTTLE_MS) {
114
114
  if (pendingBroadcastRef.current) {
115
115
  clearTimeout(pendingBroadcastRef.current);
116
116
  pendingBroadcastRef.current = null;
@@ -120,7 +120,7 @@ function usePresenceTracking({
120
120
  pendingBroadcastRef.current = setTimeout(() => {
121
121
  pendingBroadcastRef.current = null;
122
122
  flush();
123
- }, chunkP3Y3OMAD_js.BROADCAST_THROTTLE_MS - elapsed);
123
+ }, chunk3NDRTC7T_js.BROADCAST_THROTTLE_MS - elapsed);
124
124
  }
125
125
  },
126
126
  [awareness, userName, userColor, userAvatar, role]
@@ -200,7 +200,7 @@ function useYjsProvider({ config }) {
200
200
  const departureRef = react.useRef(null);
201
201
  const gateRef = react.useRef(null);
202
202
  if (!gateRef.current) {
203
- gateRef.current = chunkP3Y3OMAD_js.createSyncGate(() => setSynced(true));
203
+ gateRef.current = chunk3NDRTC7T_js.createSyncGate(() => setSynced(true));
204
204
  }
205
205
  const teardown = react.useCallback(() => {
206
206
  if (timeoutRef.current) {
@@ -220,7 +220,7 @@ function useYjsProvider({ config }) {
220
220
  const buildCleanup = react.useCallback(
221
221
  (provider, yDoc) => () => {
222
222
  announceDeparture();
223
- chunkP3Y3OMAD_js.clearLocalAwareness(provider.awareness);
223
+ chunk3NDRTC7T_js.clearLocalAwareness(provider.awareness);
224
224
  provider.destroy();
225
225
  yDoc.destroy();
226
226
  setDoc(null);
@@ -245,9 +245,9 @@ function useYjsProvider({ config }) {
245
245
  if (config.authToken) {
246
246
  opts.password = config.authToken;
247
247
  }
248
- const roomId = chunkP3Y3OMAD_js.validateRoomId(config.roomId);
248
+ const roomId = chunk3NDRTC7T_js.validateRoomId(config.roomId);
249
249
  const provider = new WebrtcProvider(roomId, yDoc, opts);
250
- departureRef.current = chunkP3Y3OMAD_js.createDepartureChannel(roomId, provider.awareness);
250
+ departureRef.current = chunk3NDRTC7T_js.createDepartureChannel(roomId, provider.awareness);
251
251
  setDoc(yDoc);
252
252
  setAwareness(provider.awareness);
253
253
  setClientId(provider.awareness.clientID);
@@ -289,13 +289,13 @@ function useYjsProvider({ config }) {
289
289
  if (!config) {
290
290
  return;
291
291
  }
292
- const roomId = chunkP3Y3OMAD_js.validateRoomId(config.roomId);
293
- const transport = config.transport ?? chunkP3Y3OMAD_js.resolveTransportForServerUrl(config.serverUrl);
292
+ const roomId = chunk3NDRTC7T_js.validateRoomId(config.roomId);
293
+ const transport = config.transport ?? chunk3NDRTC7T_js.resolveTransportForServerUrl(config.serverUrl);
294
294
  if (transport === "webrtc") {
295
295
  await initWebrtc();
296
296
  return;
297
297
  }
298
- if (chunkP3Y3OMAD_js.isMixedContentBlocked(config.serverUrl)) {
298
+ if (chunk3NDRTC7T_js.isMixedContentBlocked(config.serverUrl)) {
299
299
  console.warn(
300
300
  `[pptx-viewer] Refusing to connect: insecure ws:// server "${config.serverUrl}" is blocked from a secure (https) page. Use a wss:// URL.`
301
301
  );
@@ -309,7 +309,7 @@ function useYjsProvider({ config }) {
309
309
  const provider = new WebsocketProvider(config.serverUrl, roomId, yDoc, {
310
310
  params: config.authToken ? { token: config.authToken } : void 0
311
311
  });
312
- departureRef.current = chunkP3Y3OMAD_js.createDepartureChannel(roomId, provider.awareness);
312
+ departureRef.current = chunk3NDRTC7T_js.createDepartureChannel(roomId, provider.awareness);
313
313
  let connected = false;
314
314
  const handleStatus = (event) => {
315
315
  if (event.status === "connected") {
@@ -349,7 +349,7 @@ function useYjsProvider({ config }) {
349
349
  provider.off("status", handleStatus);
350
350
  provider.off("sync", handleSynced);
351
351
  announceDeparture();
352
- chunkP3Y3OMAD_js.clearLocalAwareness(provider.awareness);
352
+ chunk3NDRTC7T_js.clearLocalAwareness(provider.awareness);
353
353
  provider.destroy();
354
354
  yDoc.destroy();
355
355
  setDoc(null);
@@ -358,7 +358,7 @@ function useYjsProvider({ config }) {
358
358
  cleanupRef.current = null;
359
359
  setStatus("error");
360
360
  }
361
- }, chunkP3Y3OMAD_js.CONNECTION_TIMEOUT_MS);
361
+ }, chunk3NDRTC7T_js.CONNECTION_TIMEOUT_MS);
362
362
  }
363
363
  setDoc(yDoc);
364
364
  setAwareness(provider.awareness);
@@ -367,7 +367,7 @@ function useYjsProvider({ config }) {
367
367
  provider.off("status", handleStatus);
368
368
  provider.off("sync", handleSynced);
369
369
  announceDeparture();
370
- chunkP3Y3OMAD_js.clearLocalAwareness(provider.awareness);
370
+ chunk3NDRTC7T_js.clearLocalAwareness(provider.awareness);
371
371
  provider.destroy();
372
372
  yDoc.destroy();
373
373
  setDoc(null);
@@ -393,7 +393,7 @@ function useYjsProvider({ config }) {
393
393
  ]);
394
394
  react.useEffect(() => {
395
395
  init();
396
- const disposeTeardown = chunkP3Y3OMAD_js.registerCollaborationTeardown({
396
+ const disposeTeardown = chunk3NDRTC7T_js.registerCollaborationTeardown({
397
397
  leave: teardown,
398
398
  rejoin: init
399
399
  });
@@ -414,7 +414,7 @@ function useCollaborativeState({
414
414
  canvasWidth,
415
415
  canvasHeight
416
416
  }) {
417
- const userColor = chunkP3Y3OMAD_js.sanitizeColor(config?.userColor, "#6366f1");
417
+ const userColor = chunk3NDRTC7T_js.sanitizeColor(config?.userColor, "#6366f1");
418
418
  const { status, awareness, doc, clientId, synced, retry } = useYjsProvider({ config });
419
419
  const { remoteUsers, broadcastPresence } = usePresenceTracking({
420
420
  awareness,
@@ -523,8 +523,8 @@ function useEditorHistory(input) {
523
523
  width: canvasSize.width,
524
524
  height: canvasSize.height,
525
525
  activeSlideIndex,
526
- slides: slides.map(chunkP3Y3OMAD_js.cloneSlide),
527
- templateElementsBySlideId: chunkP3Y3OMAD_js.cloneTemplateElementsBySlideId(templateElementsBySlideId),
526
+ slides: slides.map(chunk3NDRTC7T_js.cloneSlide),
527
+ templateElementsBySlideId: chunk3NDRTC7T_js.cloneTemplateElementsBySlideId(templateElementsBySlideId),
528
528
  ...actionLabel ? { actionLabel } : {}
529
529
  };
530
530
  },
@@ -537,9 +537,9 @@ function useEditorHistory(input) {
537
537
  width: snapshot.width,
538
538
  height: snapshot.height
539
539
  });
540
- setSlides(snapshot.slides.map(chunkP3Y3OMAD_js.cloneSlide));
540
+ setSlides(snapshot.slides.map(chunk3NDRTC7T_js.cloneSlide));
541
541
  setTemplateElementsBySlideId(
542
- chunkP3Y3OMAD_js.cloneTemplateElementsBySlideId(snapshot.templateElementsBySlideId)
542
+ chunk3NDRTC7T_js.cloneTemplateElementsBySlideId(snapshot.templateElementsBySlideId)
543
543
  );
544
544
  setActiveSlideIndex(Math.min(snapshot.activeSlideIndex, maxSlideIndex));
545
545
  setSelectedElementIds([]);
@@ -573,8 +573,8 @@ function useEditorHistory(input) {
573
573
  const currentSnapshot = buildHistorySnapshot();
574
574
  historyFutureRef.current.push(currentSnapshot);
575
575
  isApplyingHistoryRef.current = true;
576
- const nextSnapshot = chunkAX75ONFY_js.cloneHistorySnapshot(previousSnapshot);
577
- lastHistorySnapshotRef.current = chunkAX75ONFY_js.cloneHistorySnapshot(nextSnapshot);
576
+ const nextSnapshot = chunkIN7D2T4R_js.cloneHistorySnapshot(previousSnapshot);
577
+ lastHistorySnapshotRef.current = chunkIN7D2T4R_js.cloneHistorySnapshot(nextSnapshot);
578
578
  lastHistorySerializedRef.current = JSON.stringify(nextSnapshot);
579
579
  applyHistorySnapshot(nextSnapshot);
580
580
  updateHistoryAvailability();
@@ -595,8 +595,8 @@ function useEditorHistory(input) {
595
595
  const currentSnapshot = buildHistorySnapshot();
596
596
  historyPastRef.current.push(currentSnapshot);
597
597
  isApplyingHistoryRef.current = true;
598
- const targetSnapshot = chunkAX75ONFY_js.cloneHistorySnapshot(nextSnapshot);
599
- lastHistorySnapshotRef.current = chunkAX75ONFY_js.cloneHistorySnapshot(targetSnapshot);
598
+ const targetSnapshot = chunkIN7D2T4R_js.cloneHistorySnapshot(nextSnapshot);
599
+ lastHistorySnapshotRef.current = chunkIN7D2T4R_js.cloneHistorySnapshot(targetSnapshot);
600
600
  lastHistorySerializedRef.current = JSON.stringify(targetSnapshot);
601
601
  applyHistorySnapshot(targetSnapshot);
602
602
  updateHistoryAvailability();
@@ -614,7 +614,7 @@ function useEditorHistory(input) {
614
614
  historyPastRef.current = [];
615
615
  historyFutureRef.current = [];
616
616
  if (initialSnapshot) {
617
- const clonedInitial = chunkAX75ONFY_js.cloneHistorySnapshot(initialSnapshot);
617
+ const clonedInitial = chunkIN7D2T4R_js.cloneHistorySnapshot(initialSnapshot);
618
618
  lastHistorySnapshotRef.current = clonedInitial;
619
619
  lastHistorySerializedRef.current = JSON.stringify(clonedInitial);
620
620
  } else {
@@ -655,18 +655,18 @@ function useEditorHistory(input) {
655
655
  }
656
656
  const previousSnapshot = lastHistorySnapshotRef.current;
657
657
  if (!previousSnapshot) {
658
- lastHistorySnapshotRef.current = chunkAX75ONFY_js.cloneHistorySnapshot(snapshot);
658
+ lastHistorySnapshotRef.current = chunkIN7D2T4R_js.cloneHistorySnapshot(snapshot);
659
659
  lastHistorySerializedRef.current = serialized;
660
660
  lastCheapHashRef.current = cheapHash;
661
661
  updateHistoryAvailability();
662
662
  return;
663
663
  }
664
- historyPastRef.current.push(chunkAX75ONFY_js.cloneHistorySnapshot(previousSnapshot));
664
+ historyPastRef.current.push(chunkIN7D2T4R_js.cloneHistorySnapshot(previousSnapshot));
665
665
  while (historyPastRef.current.length > Math.max(1, maxHistoryEntries)) {
666
666
  historyPastRef.current.shift();
667
667
  }
668
668
  historyFutureRef.current = [];
669
- lastHistorySnapshotRef.current = chunkAX75ONFY_js.cloneHistorySnapshot(snapshot);
669
+ lastHistorySnapshotRef.current = chunkIN7D2T4R_js.cloneHistorySnapshot(snapshot);
670
670
  lastHistorySerializedRef.current = serialized;
671
671
  lastCheapHashRef.current = cheapHash;
672
672
  updateHistoryAvailability();
@@ -726,9 +726,9 @@ function useZoomViewport({
726
726
  const canvasStageRef = react.useRef(null);
727
727
  const canvasViewportRef = react.useRef(null);
728
728
  const renderScaleRef = react.useRef(1);
729
- const wheelBufferRef = react.useRef(chunkP3Y3OMAD_js.createWheelStepBuffer());
729
+ const wheelBufferRef = react.useRef(chunk3NDRTC7T_js.createWheelStepBuffer());
730
730
  const storeRef = react.useRef(null);
731
- storeRef.current ??= chunkP3Y3OMAD_js.createViewerZoomStore();
731
+ storeRef.current ??= chunk3NDRTC7T_js.createViewerZoomStore();
732
732
  const store = storeRef.current;
733
733
  const scale = useViewerStore(store, selectZoom);
734
734
  const setScale = react.useCallback(
@@ -789,7 +789,7 @@ function useZoomViewport({
789
789
  if (!wrapper || !canvasViewport) {
790
790
  return;
791
791
  }
792
- const boundedScale = chunkP3Y3OMAD_js.clampZoomScale(nextScale);
792
+ const boundedScale = chunk3NDRTC7T_js.clampZoomScale(nextScale);
793
793
  const nextEditorScale = fitScale * boundedScale;
794
794
  const centerX = (bounds.minX + bounds.maxX) / 2;
795
795
  const centerY = (bounds.minY + bounds.maxY) / 2;
@@ -826,29 +826,29 @@ function useZoomViewport({
826
826
  selectedElements.forEach((element) => {
827
827
  minX = Math.min(minX, element.x);
828
828
  minY = Math.min(minY, element.y);
829
- maxX = Math.max(maxX, element.x + Math.max(element.width, chunkAX75ONFY_js.MIN_ELEMENT_SIZE));
830
- maxY = Math.max(maxY, element.y + Math.max(element.height, chunkAX75ONFY_js.MIN_ELEMENT_SIZE));
829
+ maxX = Math.max(maxX, element.x + Math.max(element.width, chunkIN7D2T4R_js.MIN_ELEMENT_SIZE));
830
+ maxY = Math.max(maxY, element.y + Math.max(element.height, chunkIN7D2T4R_js.MIN_ELEMENT_SIZE));
831
831
  });
832
832
  if (!Number.isFinite(minX) || !Number.isFinite(minY) || !Number.isFinite(maxX) || !Number.isFinite(maxY)) {
833
833
  return;
834
834
  }
835
835
  const selectionBounds = { minX, minY, maxX, maxY };
836
- const boundsWidth = Math.max(selectionBounds.maxX - selectionBounds.minX, chunkAX75ONFY_js.MIN_ELEMENT_SIZE);
837
- const boundsHeight = Math.max(selectionBounds.maxY - selectionBounds.minY, chunkAX75ONFY_js.MIN_ELEMENT_SIZE);
836
+ const boundsWidth = Math.max(selectionBounds.maxX - selectionBounds.minX, chunkIN7D2T4R_js.MIN_ELEMENT_SIZE);
837
+ const boundsHeight = Math.max(selectionBounds.maxY - selectionBounds.minY, chunkIN7D2T4R_js.MIN_ELEMENT_SIZE);
838
838
  const availableWidth = Math.max(
839
- effectiveEditorDimensions.width - chunkAX75ONFY_js.ZOOM_TO_SELECTION_PADDING,
840
- chunkAX75ONFY_js.MIN_ELEMENT_SIZE
839
+ effectiveEditorDimensions.width - chunkIN7D2T4R_js.ZOOM_TO_SELECTION_PADDING,
840
+ chunkIN7D2T4R_js.MIN_ELEMENT_SIZE
841
841
  );
842
842
  const availableHeight = Math.max(
843
- effectiveEditorDimensions.height - chunkAX75ONFY_js.ZOOM_TO_SELECTION_PADDING,
844
- chunkAX75ONFY_js.MIN_ELEMENT_SIZE
843
+ effectiveEditorDimensions.height - chunkIN7D2T4R_js.ZOOM_TO_SELECTION_PADDING,
844
+ chunkIN7D2T4R_js.MIN_ELEMENT_SIZE
845
845
  );
846
846
  const targetEditorScale = Math.min(
847
847
  availableWidth / boundsWidth,
848
848
  availableHeight / boundsHeight
849
849
  );
850
850
  const safeFitScale = fitScale > Number.EPSILON ? fitScale : Number.EPSILON;
851
- const nextScale = chunkP3Y3OMAD_js.clampZoomScale(targetEditorScale / safeFitScale);
851
+ const nextScale = chunk3NDRTC7T_js.clampZoomScale(targetEditorScale / safeFitScale);
852
852
  setScale(nextScale);
853
853
  window.requestAnimationFrame(() => {
854
854
  window.requestAnimationFrame(() => {
@@ -865,14 +865,14 @@ function useZoomViewport({
865
865
  ]);
866
866
  const handleWheel = react.useCallback(
867
867
  (event) => {
868
- const mapped = chunkP3Y3OMAD_js.mapEditingWheel(event, wheelBufferRef.current, true);
868
+ const mapped = chunk3NDRTC7T_js.mapEditingWheel(event, wheelBufferRef.current, true);
869
869
  if (mapped.intent !== "zoom") {
870
870
  return;
871
871
  }
872
872
  event.preventDefault();
873
873
  store.dispatch({
874
874
  type: "set-zoom",
875
- zoom: chunkP3Y3OMAD_js.clampZoomScale(store.getState().zoom + mapped.deltaScale)
875
+ zoom: chunk3NDRTC7T_js.clampZoomScale(store.getState().zoom + mapped.deltaScale)
876
876
  });
877
877
  },
878
878
  [store]
@@ -960,7 +960,7 @@ function applyAnimationGroupSteps(group, onPlayActionSound, setPresentationEleme
960
960
  const command = step.command;
961
961
  const timer = window.setTimeout(
962
962
  () => {
963
- chunkAX75ONFY_js.executeMediaCommand(command);
963
+ chunkIN7D2T4R_js.executeMediaCommand(command);
964
964
  },
965
965
  Math.max(0, step.delayMs)
966
966
  );
@@ -1097,7 +1097,7 @@ function scheduleEntranceAnimationTimers(slide, setPresentationAnimations, prese
1097
1097
  }))
1098
1098
  );
1099
1099
  entranceAnimations.forEach((animation, animationIndex) => {
1100
- const delay = chunkP3Y3OMAD_js.computeEntranceAnimationDelay(animation.delayMs, animationIndex);
1100
+ const delay = chunk3NDRTC7T_js.computeEntranceAnimationDelay(animation.delayMs, animationIndex);
1101
1101
  const timer = window.setTimeout(() => {
1102
1102
  setPresentationAnimations(
1103
1103
  (previousAnimations) => previousAnimations.map(
@@ -1129,7 +1129,7 @@ function useAnimationPlayback(input) {
1129
1129
  (controller, group) => {
1130
1130
  driveBuildReveal(
1131
1131
  controller,
1132
- chunkP3Y3OMAD_js.PresentationAnimationController.collectBuildStepIds(group),
1132
+ chunk3NDRTC7T_js.PresentationAnimationController.collectBuildStepIds(group),
1133
1133
  setPresentationElementStates,
1134
1134
  buildRafRef
1135
1135
  );
@@ -1192,7 +1192,7 @@ function useAnimationPlayback(input) {
1192
1192
  setHoverTriggerShapeIds(/* @__PURE__ */ new Set());
1193
1193
  return;
1194
1194
  }
1195
- const controller = chunkP3Y3OMAD_js.PresentationAnimationController.fromSlide(slide);
1195
+ const controller = chunk3NDRTC7T_js.PresentationAnimationController.fromSlide(slide);
1196
1196
  controllerRef.current = controller;
1197
1197
  setPresentationKeyframesCss(controller.keyframesCss);
1198
1198
  setInteractiveTriggerShapeIds(controller.interactiveTriggerShapeIds);
@@ -1350,12 +1350,12 @@ function useAnimationPlayback(input) {
1350
1350
  presentationTimersRef
1351
1351
  };
1352
1352
  }
1353
- var PRESENTER_CHANNEL_NAME = chunkP3Y3OMAD_js.PRESENTATION_CHANNEL_NAME;
1354
- var AUDIENCE_HASH = chunkP3Y3OMAD_js.PRESENTATION_HASH;
1355
- var PRESENTER_MSG_ORIGIN = chunkP3Y3OMAD_js.PRESENTATION_MESSAGE_ORIGIN;
1356
- var AUDIENCE_NONCE_KEY = chunkP3Y3OMAD_js.PRESENTATION_NONCE_KEY;
1353
+ var PRESENTER_CHANNEL_NAME = chunk3NDRTC7T_js.PRESENTATION_CHANNEL_NAME;
1354
+ var AUDIENCE_HASH = chunk3NDRTC7T_js.PRESENTATION_HASH;
1355
+ var PRESENTER_MSG_ORIGIN = chunk3NDRTC7T_js.PRESENTATION_MESSAGE_ORIGIN;
1356
+ var AUDIENCE_NONCE_KEY = chunk3NDRTC7T_js.PRESENTATION_NONCE_KEY;
1357
1357
  function generateSessionId() {
1358
- return chunkP3Y3OMAD_js.createPresentationSessionId();
1358
+ return chunk3NDRTC7T_js.createPresentationSessionId();
1359
1359
  }
1360
1360
  function parseAudienceNonce() {
1361
1361
  const hash = window.location.hash;
@@ -1391,7 +1391,7 @@ function usePresenterWindow(input) {
1391
1391
  }, []);
1392
1392
  const swapDisplays = react.useCallback(async () => {
1393
1393
  const audience = audienceWindowRef.current;
1394
- return audience && !audience.closed ? chunkP3Y3OMAD_js.swapPresentationWindows(window, audience) : false;
1394
+ return audience && !audience.closed ? chunk3NDRTC7T_js.swapPresentationWindows(window, audience) : false;
1395
1395
  }, []);
1396
1396
  const syncSlideToAudience = react.useCallback(
1397
1397
  (slideIndex) => {
@@ -1455,7 +1455,7 @@ function usePresenterWindow(input) {
1455
1455
  pollTimerRef.current = null;
1456
1456
  }
1457
1457
  if (closingSessionId) {
1458
- void chunkP3Y3OMAD_js.clearAudienceContent(closingSessionId);
1458
+ void chunk3NDRTC7T_js.clearAudienceContent(closingSessionId);
1459
1459
  }
1460
1460
  }, [getChannel]);
1461
1461
  const openAudienceWindow = react.useCallback(() => {
@@ -1473,10 +1473,10 @@ function usePresenterWindow(input) {
1473
1473
  audienceWindowRef.current = blankWin;
1474
1474
  const sessionId = generateSessionId();
1475
1475
  sessionIdRef.current = sessionId;
1476
- const audienceUrl = chunkP3Y3OMAD_js.buildPresentationAudienceUrl(window.location.href, sessionId);
1477
- void chunkP3Y3OMAD_js.resolveAudienceScreenPlacement(window).then((placement) => {
1476
+ const audienceUrl = chunk3NDRTC7T_js.buildPresentationAudienceUrl(window.location.href, sessionId);
1477
+ void chunk3NDRTC7T_js.resolveAudienceScreenPlacement(window).then((placement) => {
1478
1478
  if (placement && audienceWindowRef.current === blankWin && !blankWin.closed) {
1479
- chunkP3Y3OMAD_js.placeAudienceWindow(blankWin, placement);
1479
+ chunk3NDRTC7T_js.placeAudienceWindow(blankWin, placement);
1480
1480
  }
1481
1481
  return void 0;
1482
1482
  });
@@ -1506,7 +1506,7 @@ function usePresenterWindow(input) {
1506
1506
  }
1507
1507
  };
1508
1508
  if (content) {
1509
- void chunkP3Y3OMAD_js.storeAudienceContent(content, sessionId).then(() => navigateOrClose(true)).catch(() => navigateOrClose(false));
1509
+ void chunk3NDRTC7T_js.storeAudienceContent(content, sessionId).then(() => navigateOrClose(true)).catch(() => navigateOrClose(false));
1510
1510
  } else {
1511
1511
  navigateOrClose(true);
1512
1512
  }
@@ -1532,7 +1532,7 @@ function usePresenterWindow(input) {
1532
1532
  }
1533
1533
  const handleMessage = (event) => {
1534
1534
  const message = event.data;
1535
- if (chunkP3Y3OMAD_js.isPresentationSessionMessage(message) && message.type === "audience-ready" && message.sessionId === sessionIdRef.current) {
1535
+ if (chunk3NDRTC7T_js.isPresentationSessionMessage(message) && message.type === "audience-ready" && message.sessionId === sessionIdRef.current) {
1536
1536
  syncStateToAudience(snapshotRef.current);
1537
1537
  }
1538
1538
  };
@@ -1561,7 +1561,7 @@ function usePresenterWindow(input) {
1561
1561
  react.useEffect(() => {
1562
1562
  const handleBeforeUnload = () => {
1563
1563
  if (sessionIdRef.current) {
1564
- void chunkP3Y3OMAD_js.clearAudienceContent(sessionIdRef.current);
1564
+ void chunk3NDRTC7T_js.clearAudienceContent(sessionIdRef.current);
1565
1565
  }
1566
1566
  };
1567
1567
  window.addEventListener("beforeunload", handleBeforeUnload);
@@ -1623,7 +1623,7 @@ function useAudienceMode(input) {
1623
1623
  }
1624
1624
  channel.onmessage = (event) => {
1625
1625
  const data = event.data;
1626
- if (!chunkP3Y3OMAD_js.isPresentationSessionMessage(data) || data.origin !== PRESENTER_MSG_ORIGIN) {
1626
+ if (!chunk3NDRTC7T_js.isPresentationSessionMessage(data) || data.origin !== PRESENTER_MSG_ORIGIN) {
1627
1627
  return;
1628
1628
  }
1629
1629
  if (expectedSessionId && data.sessionId !== expectedSessionId) {
@@ -1639,16 +1639,16 @@ function useAudienceMode(input) {
1639
1639
  }
1640
1640
  if (data.type === "presenter-exit") {
1641
1641
  if (expectedSessionId) {
1642
- void chunkP3Y3OMAD_js.clearAudienceContent(expectedSessionId);
1642
+ void chunk3NDRTC7T_js.clearAudienceContent(expectedSessionId);
1643
1643
  }
1644
- if (chunkP3Y3OMAD_js.endAudienceDisplay(window)) {
1644
+ if (chunk3NDRTC7T_js.endAudienceDisplay(window)) {
1645
1645
  handlers.onPresenterEnded?.();
1646
1646
  }
1647
1647
  }
1648
1648
  };
1649
1649
  if (expectedSessionId) {
1650
1650
  channel.postMessage({
1651
- origin: chunkP3Y3OMAD_js.PRESENTATION_MESSAGE_ORIGIN,
1651
+ origin: chunk3NDRTC7T_js.PRESENTATION_MESSAGE_ORIGIN,
1652
1652
  type: "audience-ready",
1653
1653
  sessionId: expectedSessionId
1654
1654
  });
@@ -1662,7 +1662,7 @@ function useAudienceMode(input) {
1662
1662
  }, []);
1663
1663
  }
1664
1664
  function usePresentationKeyboard(input) {
1665
- const wheelBufferRef = react.useRef(chunkP3Y3OMAD_js.createWheelStepBuffer());
1665
+ const wheelBufferRef = react.useRef(chunk3NDRTC7T_js.createWheelStepBuffer());
1666
1666
  const {
1667
1667
  mode,
1668
1668
  movePresentationSlide,
@@ -1682,14 +1682,14 @@ function usePresentationKeyboard(input) {
1682
1682
  presentationSlideIndex,
1683
1683
  setShowRehearsalSummary
1684
1684
  } = input;
1685
- const keyBufferRef = react.useRef(chunkP3Y3OMAD_js.createPresentationKeyBuffer());
1685
+ const keyBufferRef = react.useRef(chunk3NDRTC7T_js.createPresentationKeyBuffer());
1686
1686
  react.useEffect(() => {
1687
- if (mode !== "present" || !chunkP3Y3OMAD_js.acceptsPresentationInput()) {
1688
- keyBufferRef.current = chunkP3Y3OMAD_js.createPresentationKeyBuffer();
1687
+ if (mode !== "present" || !chunk3NDRTC7T_js.acceptsPresentationInput()) {
1688
+ keyBufferRef.current = chunk3NDRTC7T_js.createPresentationKeyBuffer();
1689
1689
  return;
1690
1690
  }
1691
1691
  const handleKeyDown = (event) => {
1692
- const mapped = chunkP3Y3OMAD_js.mapPresentationKey(event, keyBufferRef.current);
1692
+ const mapped = chunk3NDRTC7T_js.mapPresentationKey(event, keyBufferRef.current);
1693
1693
  if (mapped.action === "none") {
1694
1694
  return;
1695
1695
  }
@@ -1709,12 +1709,12 @@ function usePresentationKeyboard(input) {
1709
1709
  movePresentationSlide(-1);
1710
1710
  return;
1711
1711
  case "first": {
1712
- const first = chunkP3Y3OMAD_js.firstShowSlideIndex(showSlideIndexes);
1712
+ const first = chunk3NDRTC7T_js.firstShowSlideIndex(showSlideIndexes);
1713
1713
  navigateToSlide(first ?? 0);
1714
1714
  return;
1715
1715
  }
1716
1716
  case "last": {
1717
- const last = chunkP3Y3OMAD_js.lastShowSlideIndex(showSlideIndexes);
1717
+ const last = chunk3NDRTC7T_js.lastShowSlideIndex(showSlideIndexes);
1718
1718
  navigateToSlide(last ?? Math.max(0, slideCount - 1));
1719
1719
  return;
1720
1720
  }
@@ -1749,10 +1749,10 @@ function usePresentationKeyboard(input) {
1749
1749
  }
1750
1750
  };
1751
1751
  const handleWheel = (event) => {
1752
- if (mode !== "present" || !chunkP3Y3OMAD_js.acceptsPresentationInput()) {
1752
+ if (mode !== "present" || !chunk3NDRTC7T_js.acceptsPresentationInput()) {
1753
1753
  return;
1754
1754
  }
1755
- const mapped = chunkP3Y3OMAD_js.mapPresentationWheel(event, wheelBufferRef.current);
1755
+ const mapped = chunk3NDRTC7T_js.mapPresentationWheel(event, wheelBufferRef.current);
1756
1756
  if (mapped.intent === "next-slide") {
1757
1757
  event.preventDefault();
1758
1758
  movePresentationSlide(1);
@@ -1884,7 +1884,7 @@ function useRehearsalTimings(input) {
1884
1884
 
1885
1885
  // src/viewer/hooks/presentation-mode/presentation-actions.ts
1886
1886
  function handlePresentationActionImpl(action, deps) {
1887
- chunkP3Y3OMAD_js.runPresentationAction(
1887
+ chunk3NDRTC7T_js.runPresentationAction(
1888
1888
  action,
1889
1889
  { slideCount: deps.slidesLength },
1890
1890
  {
@@ -1906,7 +1906,7 @@ function handlePresentationActionImpl(action, deps) {
1906
1906
  function executeSlideTransition(nextSlideIndex, deps) {
1907
1907
  const incomingSlide = deps.slides[nextSlideIndex];
1908
1908
  const transition = incomingSlide?.transition;
1909
- const durationMs = deps.playTransition ? chunkP3Y3OMAD_js.resolveTransitionDurationMs(transition) : 0;
1909
+ const durationMs = deps.playTransition ? chunk3NDRTC7T_js.resolveTransitionDurationMs(transition) : 0;
1910
1910
  deps.clearPresentationTimers();
1911
1911
  deps.setPresentationSlideIndex(nextSlideIndex);
1912
1912
  deps.onSetActiveSlideIndex(nextSlideIndex);
@@ -1965,7 +1965,7 @@ function useSlideNavigation(input) {
1965
1965
  });
1966
1966
  const scheduleAutoAdvanceForSlide = react.useCallback(
1967
1967
  (slideIndex) => {
1968
- const delayMs = chunkP3Y3OMAD_js.resolveAutoAdvanceDelayMs(slides[slideIndex], { useTimings });
1968
+ const delayMs = chunk3NDRTC7T_js.resolveAutoAdvanceDelayMs(slides[slideIndex], { useTimings });
1969
1969
  if (delayMs === void 0) {
1970
1970
  return;
1971
1971
  }
@@ -1988,7 +1988,7 @@ function useSlideNavigation(input) {
1988
1988
  if (availableSlideIndexes.length === 0) {
1989
1989
  return;
1990
1990
  }
1991
- const pastLastSlide = direction === 1 && !chunkP3Y3OMAD_js.hasShowSlideAfter(presentationSlideIndex, availableSlideIndexes);
1991
+ const pastLastSlide = direction === 1 && !chunk3NDRTC7T_js.hasShowSlideAfter(presentationSlideIndex, availableSlideIndexes);
1992
1992
  if (rehearsing && pastLastSlide) {
1993
1993
  recordCurrentSlideTime(presentationSlideIndex);
1994
1994
  try {
@@ -2006,9 +2006,9 @@ function useSlideNavigation(input) {
2006
2006
  onAdvancePastLastSlide();
2007
2007
  return;
2008
2008
  }
2009
- const nextSlideIndex = direction === 1 ? chunkP3Y3OMAD_js.nextShowSlideIndex(presentationSlideIndex, availableSlideIndexes, {
2009
+ const nextSlideIndex = direction === 1 ? chunk3NDRTC7T_js.nextShowSlideIndex(presentationSlideIndex, availableSlideIndexes, {
2010
2010
  loop: Boolean(loopContinuously) && !rehearsing
2011
- }) : chunkP3Y3OMAD_js.previousShowSlideIndex(presentationSlideIndex, availableSlideIndexes);
2011
+ }) : chunk3NDRTC7T_js.previousShowSlideIndex(presentationSlideIndex, availableSlideIndexes);
2012
2012
  if (nextSlideIndex === void 0 || nextSlideIndex === presentationSlideIndex) {
2013
2013
  return;
2014
2014
  }
@@ -2153,22 +2153,22 @@ function useZoomNavigation(input) {
2153
2153
  };
2154
2154
  }
2155
2155
  function usePresenterConsole(slideIndex, active) {
2156
- const timerRef = react.useRef(chunkP3Y3OMAD_js.createPresenterTimer());
2157
- const [snapshot, setSnapshot] = react.useState(() => chunkP3Y3OMAD_js.createInitialPresentationSnapshot(slideIndex));
2156
+ const timerRef = react.useRef(chunk3NDRTC7T_js.createPresenterTimer());
2157
+ const [snapshot, setSnapshot] = react.useState(() => chunk3NDRTC7T_js.createInitialPresentationSnapshot(slideIndex));
2158
2158
  const patch = react.useCallback((value) => {
2159
- setSnapshot((current) => chunkP3Y3OMAD_js.mergePresentationSnapshot(current, value));
2159
+ setSnapshot((current) => chunk3NDRTC7T_js.mergePresentationSnapshot(current, value));
2160
2160
  }, []);
2161
2161
  react.useEffect(() => patch({ slideIndex }), [patch, slideIndex]);
2162
2162
  react.useEffect(() => {
2163
2163
  if (!active) {
2164
2164
  return;
2165
2165
  }
2166
- timerRef.current = chunkP3Y3OMAD_js.resetPresenterTimer();
2166
+ timerRef.current = chunk3NDRTC7T_js.resetPresenterTimer();
2167
2167
  patch({ paused: false, elapsedMs: 0 });
2168
2168
  const timer = window.setInterval(() => {
2169
2169
  patch({
2170
2170
  paused: timerRef.current.paused,
2171
- elapsedMs: chunkP3Y3OMAD_js.presenterElapsed(timerRef.current)
2171
+ elapsedMs: chunk3NDRTC7T_js.presenterElapsed(timerRef.current)
2172
2172
  });
2173
2173
  }, 1e3);
2174
2174
  return () => window.clearInterval(timer);
@@ -2178,19 +2178,19 @@ function usePresenterConsole(slideIndex, active) {
2178
2178
  applyAudienceSnapshot: setSnapshot,
2179
2179
  setBlackout: (blackout) => patch({ blackout }),
2180
2180
  toggleTimer: () => {
2181
- timerRef.current = chunkP3Y3OMAD_js.togglePresenterTimer(timerRef.current);
2181
+ timerRef.current = chunk3NDRTC7T_js.togglePresenterTimer(timerRef.current);
2182
2182
  patch({
2183
2183
  paused: timerRef.current.paused,
2184
- elapsedMs: chunkP3Y3OMAD_js.presenterElapsed(timerRef.current)
2184
+ elapsedMs: chunk3NDRTC7T_js.presenterElapsed(timerRef.current)
2185
2185
  });
2186
2186
  },
2187
2187
  resetTimer: () => {
2188
- timerRef.current = chunkP3Y3OMAD_js.resetPresenterTimer();
2188
+ timerRef.current = chunk3NDRTC7T_js.resetPresenterTimer();
2189
2189
  patch({ paused: false, elapsedMs: 0 });
2190
2190
  },
2191
2191
  stepZoom: (direction) => setSnapshot(
2192
- (current) => chunkP3Y3OMAD_js.mergePresentationSnapshot(current, {
2193
- zoom: chunkP3Y3OMAD_js.stepPresenterZoom(
2192
+ (current) => chunk3NDRTC7T_js.mergePresentationSnapshot(current, {
2193
+ zoom: chunk3NDRTC7T_js.stepPresenterZoom(
2194
2194
  current.zoom ?? { scale: 1, originX: 0.5, originY: 0.5 },
2195
2195
  direction
2196
2196
  )
@@ -2235,7 +2235,7 @@ function usePresentationMode(input) {
2235
2235
  const [allSlidesOpen, setAllSlidesOpen] = react.useState(false);
2236
2236
  const [endOfShowVisible, setEndOfShowVisible] = react.useState(false);
2237
2237
  const [presentationStartTime, setPresentationStartTime] = react.useState(null);
2238
- const showGuard = react.useMemo(() => chunkP3Y3OMAD_js.createPresenterShowGuard(), []);
2238
+ const showGuard = react.useMemo(() => chunk3NDRTC7T_js.createPresenterShowGuard(), []);
2239
2239
  const {
2240
2240
  presentationAnimations,
2241
2241
  presentationElementStates,
@@ -2314,7 +2314,7 @@ function usePresentationMode(input) {
2314
2314
  });
2315
2315
  const movePresentationSlide = react.useCallback(
2316
2316
  (direction, trigger = "explicit") => {
2317
- if (!chunkP3Y3OMAD_js.acceptsPresentationInput()) {
2317
+ if (!chunk3NDRTC7T_js.acceptsPresentationInput()) {
2318
2318
  return;
2319
2319
  }
2320
2320
  if (endOfShowVisible) {
@@ -2451,7 +2451,7 @@ function usePresentationMode(input) {
2451
2451
  if (mode !== "present") {
2452
2452
  return;
2453
2453
  }
2454
- return chunkP3Y3OMAD_js.attachPresentationVisibilityPause({
2454
+ return chunk3NDRTC7T_js.attachPresentationVisibilityPause({
2455
2455
  root: containerRef.current ?? void 0,
2456
2456
  onHidden: () => clearPresentationTimersRef.current(),
2457
2457
  onVisible: () => scheduleAutoAdvanceRef.current(presentationSlideIndexRef.current)
@@ -2531,11 +2531,11 @@ function usePresentationMode(input) {
2531
2531
  if (!transitionOverlay || transitionOverlay.transition.type !== "morph") {
2532
2532
  return void 0;
2533
2533
  }
2534
- return chunkP3Y3OMAD_js.buildMorphTransitionPlan(
2534
+ return chunk3NDRTC7T_js.buildMorphTransitionPlan(
2535
2535
  slides[transitionOverlay.outgoingSlideIndex],
2536
2536
  slides[transitionOverlay.incomingSlideIndex],
2537
2537
  transitionOverlay.durationMs,
2538
- chunkP3Y3OMAD_js.morphOptionToMode(transitionOverlay.transition.morphOption)
2538
+ chunk3NDRTC7T_js.morphOptionToMode(transitionOverlay.transition.morphOption)
2539
2539
  );
2540
2540
  }, [transitionOverlay, slides]);
2541
2541
  const morphedElementStates = react.useMemo(() => {
@@ -2552,11 +2552,15 @@ function usePresentationMode(input) {
2552
2552
  }
2553
2553
  return merged;
2554
2554
  }, [morphPlan, presentationElementStates]);
2555
- const morphedKeyframesCss = react.useMemo(
2556
- () => morphPlan ? `${presentationKeyframesCss ?? ""}
2557
- ${morphPlan.keyframesCss}` : presentationKeyframesCss,
2558
- [morphPlan, presentationKeyframesCss]
2559
- );
2555
+ const morphedKeyframesCss = react.useMemo(() => {
2556
+ if (!morphPlan) {
2557
+ return presentationKeyframesCss;
2558
+ }
2559
+ const imageRules = chunk3NDRTC7T_js.buildMorphAnimationRules(morphPlan, "", "incoming", "image");
2560
+ return `${presentationKeyframesCss ?? ""}
2561
+ ${morphPlan.keyframesCss}
2562
+ ${imageRules}`;
2563
+ }, [morphPlan, presentationKeyframesCss]);
2560
2564
  return {
2561
2565
  presentationSlideIndex,
2562
2566
  setPresentationSlideIndex,
@@ -2841,7 +2845,7 @@ function findInSlides(slides, findQuery, findMatchCase) {
2841
2845
  const normalised = findMatchCase ? findQuery : findQuery.toLowerCase();
2842
2846
  slides.forEach((slide, slideIndex) => {
2843
2847
  for (const element of slide.elements || []) {
2844
- if (!chunkP3Y3OMAD_js.hasTextProperties(element)) {
2848
+ if (!chunk3NDRTC7T_js.hasTextProperties(element)) {
2845
2849
  continue;
2846
2850
  }
2847
2851
  const segments = element.textSegments ?? [];
@@ -2892,7 +2896,7 @@ function applyFindReplacements(slides, toReplace, replaceQuery) {
2892
2896
  continue;
2893
2897
  }
2894
2898
  const element = slide.elements[elIdx];
2895
- if (!chunkP3Y3OMAD_js.hasTextProperties(element)) {
2899
+ if (!chunk3NDRTC7T_js.hasTextProperties(element)) {
2896
2900
  continue;
2897
2901
  }
2898
2902
  const segments = [...element.textSegments ?? []];
@@ -3490,7 +3494,7 @@ function useViewerCoreState(_input) {
3490
3494
  const shapeAdjustmentDragStateRef = react.useRef(null);
3491
3495
  const marqueeStateRef = react.useRef(null);
3492
3496
  const isDrawingRef = react.useRef(false);
3493
- const livePatcher = react.useMemo(() => chunkP3Y3OMAD_js.createCollaborationLivePatcher(), []);
3497
+ const livePatcher = react.useMemo(() => chunk3NDRTC7T_js.createCollaborationLivePatcher(), []);
3494
3498
  react.useEffect(() => () => livePatcher.dispose(), [livePatcher]);
3495
3499
  const slidesRef = react.useRef([]);
3496
3500
  const [mode, setMode] = react.useState("edit");
@@ -3499,8 +3503,8 @@ function useViewerCoreState(_input) {
3499
3503
  const [slides, setSlides] = react.useState([]);
3500
3504
  const [templateElementsBySlideId, setTemplateElementsBySlideId] = react.useState({});
3501
3505
  const [canvasSize, setCanvasSize] = react.useState({
3502
- width: chunkAX75ONFY_js.DEFAULT_CANVAS_WIDTH,
3503
- height: chunkAX75ONFY_js.DEFAULT_CANVAS_HEIGHT
3506
+ width: chunkIN7D2T4R_js.DEFAULT_CANVAS_WIDTH,
3507
+ height: chunkIN7D2T4R_js.DEFAULT_CANVAS_HEIGHT
3504
3508
  });
3505
3509
  const [activeSlideIndex, setActiveSlideIndex] = react.useState(0);
3506
3510
  const [selectedElementId, setSelectedElementId] = react.useState(null);
@@ -3520,7 +3524,7 @@ function useViewerCoreState(_input) {
3520
3524
  const resolved = typeof value === "function" ? value(inlineEditingTextRef.current) : value;
3521
3525
  inlineEditingTextRef.current = resolved;
3522
3526
  setInlineEditingTextBase(value);
3523
- chunkP3Y3OMAD_js.publishLiveInlineText(
3527
+ chunk3NDRTC7T_js.publishLiveInlineText(
3524
3528
  livePatcher,
3525
3529
  slidesRef.current[activeSlideIndexRef.current],
3526
3530
  inlineEditingElementIdRef.current,
@@ -3854,7 +3858,7 @@ function useLoadContent({
3854
3858
  );
3855
3859
  }
3856
3860
  const previousHandler = handlerRef.current;
3857
- const handler = new chunkP3Y3OMAD_js.PptxHandler();
3861
+ const handler = new chunk3NDRTC7T_js.PptxHandler();
3858
3862
  const parsed = await handler.load(buffer);
3859
3863
  if (cancelled || token !== renderTokenRef.current) {
3860
3864
  handler.dispose();
@@ -3866,7 +3870,7 @@ function useLoadContent({
3866
3870
  handlerRef.current = null;
3867
3871
  const mediaElements = [];
3868
3872
  for (const slide of parsed.slides) {
3869
- chunkP3Y3OMAD_js.collectMediaElements(slide.elements, mediaElements);
3873
+ chunk3NDRTC7T_js.collectMediaElements(slide.elements, mediaElements);
3870
3874
  }
3871
3875
  for (const url of mediaDataUrls.values()) {
3872
3876
  if (url.startsWith("blob:")) {
@@ -3907,7 +3911,7 @@ function useLoadContent({
3907
3911
  }
3908
3912
  })
3909
3913
  );
3910
- const { paths: imagePaths, refs: imageRefs } = chunkP3Y3OMAD_js.collectImagePaths(parsed.slides);
3914
+ const { paths: imagePaths, refs: imageRefs } = chunk3NDRTC7T_js.collectImagePaths(parsed.slides);
3911
3915
  let nextSlides = parsed.slides;
3912
3916
  if (imagePaths.size > 0) {
3913
3917
  const resolvedMap = /* @__PURE__ */ new Map();
@@ -3962,12 +3966,12 @@ function useLoadContent({
3962
3966
  }
3963
3967
  }
3964
3968
  handlerRef.current = handler;
3965
- const partition = chunkAX75ONFY_js.partitionTemplateElements(nextSlides);
3969
+ const partition = chunkIN7D2T4R_js.partitionTemplateElements(nextSlides);
3966
3970
  setSlides(partition.slides);
3967
3971
  setTemplateElementsBySlideId(partition.templateElementsBySlideId);
3968
3972
  setCanvasSize({
3969
- width: parsed.width ?? chunkAX75ONFY_js.DEFAULT_CANVAS_WIDTH,
3970
- height: parsed.height ?? chunkAX75ONFY_js.DEFAULT_CANVAS_HEIGHT
3973
+ width: parsed.width ?? chunkIN7D2T4R_js.DEFAULT_CANVAS_WIDTH,
3974
+ height: parsed.height ?? chunkIN7D2T4R_js.DEFAULT_CANVAS_HEIGHT
3971
3975
  });
3972
3976
  setHeaderFooter(parsed.headerFooter ?? {});
3973
3977
  setLayoutOptions(parsed.layoutOptions ?? []);
@@ -3996,7 +4000,7 @@ function useLoadContent({
3996
4000
  setHasMacros(parsed.hasMacros === true);
3997
4001
  setHasDigitalSignatures(parsed.hasDigitalSignatures === true);
3998
4002
  setDigitalSignatureCount(parsed.digitalSignatureCount ?? 0);
3999
- setGuides(chunkP3Y3OMAD_js.buildInitialGuides(parsed.presentationGuides, parsed.slides[0]?.guides));
4003
+ setGuides(chunk3NDRTC7T_js.buildInitialGuides(parsed.presentationGuides, parsed.slides[0]?.guides));
4000
4004
  setActiveSlideIndex(0);
4001
4005
  clearSelection();
4002
4006
  setIsDirty(false);
@@ -4004,7 +4008,7 @@ function useLoadContent({
4004
4008
  onContentApplied?.();
4005
4009
  } catch (err) {
4006
4010
  if (!cancelled && token === renderTokenRef.current) {
4007
- if (err instanceof chunkP3Y3OMAD_js.EncryptedFileError) {
4011
+ if (err instanceof chunk3NDRTC7T_js.EncryptedFileError) {
4008
4012
  setIsEncrypted(true);
4009
4013
  } else {
4010
4014
  setError(err instanceof Error ? err.message : String(err));
@@ -4081,7 +4085,7 @@ function useAutosave(input) {
4081
4085
  isSavingRef.current = false;
4082
4086
  return;
4083
4087
  }
4084
- await chunkP3Y3OMAD_js.saveAutosaveSnapshot(filePathRef.current, data);
4088
+ await chunk3NDRTC7T_js.saveAutosaveSnapshot(filePathRef.current, data);
4085
4089
  setAutosaveStatus({ state: "saved", timestamp: Date.now() });
4086
4090
  } catch (err) {
4087
4091
  setAutosaveStatus({
@@ -4146,7 +4150,7 @@ function useElementOperations(input) {
4146
4150
  }, [applySelection, setInlineEditingElementId, setContextMenuState]);
4147
4151
  const updateElementById = react.useCallback(
4148
4152
  (elementId, updates) => {
4149
- if (chunkP3Y3OMAD_js.isTemplateElementId(elementId)) {
4153
+ if (chunk3NDRTC7T_js.isTemplateElementId(elementId)) {
4150
4154
  const slideId = activeSlide?.id;
4151
4155
  if (slideId) {
4152
4156
  setTemplateElementsBySlideId((prev) => ({
@@ -4186,7 +4190,7 @@ function useElementOperations(input) {
4186
4190
  );
4187
4191
  const updateSelectedShapeStyle = react.useCallback(
4188
4192
  (updates) => {
4189
- if (!selectedElement || !chunkP3Y3OMAD_js.hasShapeProperties(selectedElement)) {
4193
+ if (!selectedElement || !chunk3NDRTC7T_js.hasShapeProperties(selectedElement)) {
4190
4194
  return;
4191
4195
  }
4192
4196
  updateSelectedElement({
@@ -4197,17 +4201,17 @@ function useElementOperations(input) {
4197
4201
  );
4198
4202
  const updateSelectedTextStyle = react.useCallback(
4199
4203
  (updates) => {
4200
- if (!selectedElement || !chunkP3Y3OMAD_js.hasTextProperties(selectedElement)) {
4204
+ if (!selectedElement || !chunk3NDRTC7T_js.hasTextProperties(selectedElement)) {
4201
4205
  return;
4202
4206
  }
4203
- const inlineSel = chunkP3Y3OMAD_js.getInlineEditorSelection(selectedElement.textSegments);
4207
+ const inlineSel = chunk3NDRTC7T_js.getInlineEditorSelection(selectedElement.textSegments);
4204
4208
  if (inlineSel && selectedElement.textSegments) {
4205
- const { newSegments: newSegments2, newSelection } = chunkP3Y3OMAD_js.applyStyleToSelectedSegments(
4209
+ const { newSegments: newSegments2, newSelection } = chunk3NDRTC7T_js.applyStyleToSelectedSegments(
4206
4210
  selectedElement.textSegments,
4207
4211
  inlineSel,
4208
4212
  updates
4209
4213
  );
4210
- chunkP3Y3OMAD_js.setPendingSelectionRestore(newSelection);
4214
+ chunk3NDRTC7T_js.setPendingSelectionRestore(newSelection);
4211
4215
  updateSelectedElement({
4212
4216
  textSegments: newSegments2
4213
4217
  });
@@ -4227,12 +4231,12 @@ function useElementOperations(input) {
4227
4231
  );
4228
4232
  const updateSelectedTextCase = react.useCallback(
4229
4233
  (mode) => {
4230
- if (!selectedElement || !chunkP3Y3OMAD_js.hasTextProperties(selectedElement)) {
4234
+ if (!selectedElement || !chunk3NDRTC7T_js.hasTextProperties(selectedElement)) {
4231
4235
  return;
4232
4236
  }
4233
- const inlineSel = chunkP3Y3OMAD_js.getInlineEditorSelection(selectedElement.textSegments);
4237
+ const inlineSel = chunk3NDRTC7T_js.getInlineEditorSelection(selectedElement.textSegments);
4234
4238
  if (inlineSel && selectedElement.textSegments) {
4235
- const newSegments = chunkP3Y3OMAD_js.applyCaseTransformToSegments(
4239
+ const newSegments = chunk3NDRTC7T_js.applyCaseTransformToSegments(
4236
4240
  selectedElement.textSegments,
4237
4241
  inlineSel,
4238
4242
  mode
@@ -4242,14 +4246,14 @@ function useElementOperations(input) {
4242
4246
  }
4243
4247
  const updates = {};
4244
4248
  if (selectedElement.textSegments && selectedElement.textSegments.length > 0) {
4245
- updates.textSegments = chunkP3Y3OMAD_js.applyCaseTransformToSegments(
4249
+ updates.textSegments = chunk3NDRTC7T_js.applyCaseTransformToSegments(
4246
4250
  selectedElement.textSegments,
4247
4251
  null,
4248
4252
  mode
4249
4253
  );
4250
4254
  }
4251
4255
  if (typeof selectedElement.text === "string") {
4252
- updates.text = chunkP3Y3OMAD_js.transformTextCase(selectedElement.text, mode);
4256
+ updates.text = chunk3NDRTC7T_js.transformTextCase(selectedElement.text, mode);
4253
4257
  }
4254
4258
  updateSelectedElement(updates);
4255
4259
  },
@@ -4304,7 +4308,7 @@ function useSectionOperations(input) {
4304
4308
  const { sections, setSections, slides, setSlides, markDirty } = input;
4305
4309
  const addSection2 = react.useCallback(
4306
4310
  (name, afterSlideIndex) => {
4307
- const result = chunkP3Y3OMAD_js.addSection(sections, slides, name, afterSlideIndex);
4311
+ const result = chunk3NDRTC7T_js.addSection(sections, slides, name, afterSlideIndex);
4308
4312
  setSlides(result.slides);
4309
4313
  setSections(result.sections);
4310
4314
  markDirty();
@@ -4313,7 +4317,7 @@ function useSectionOperations(input) {
4313
4317
  );
4314
4318
  const renameSection2 = react.useCallback(
4315
4319
  (sectionId, newName) => {
4316
- const result = chunkP3Y3OMAD_js.renameSection(sections, slides, sectionId, newName);
4320
+ const result = chunk3NDRTC7T_js.renameSection(sections, slides, sectionId, newName);
4317
4321
  setSections(result.sections);
4318
4322
  setSlides(result.slides);
4319
4323
  markDirty();
@@ -4322,7 +4326,7 @@ function useSectionOperations(input) {
4322
4326
  );
4323
4327
  const deleteSection2 = react.useCallback(
4324
4328
  (sectionId) => {
4325
- const result = chunkP3Y3OMAD_js.deleteSection(sections, slides, sectionId);
4329
+ const result = chunk3NDRTC7T_js.deleteSection(sections, slides, sectionId);
4326
4330
  setSections(result.sections);
4327
4331
  setSlides(result.slides);
4328
4332
  markDirty();
@@ -4331,21 +4335,21 @@ function useSectionOperations(input) {
4331
4335
  );
4332
4336
  const moveSectionUp2 = react.useCallback(
4333
4337
  (sectionId) => {
4334
- setSections(chunkP3Y3OMAD_js.moveSectionUp(sections, sectionId));
4338
+ setSections(chunk3NDRTC7T_js.moveSectionUp(sections, sectionId));
4335
4339
  markDirty();
4336
4340
  },
4337
4341
  [sections, setSections, markDirty]
4338
4342
  );
4339
4343
  const moveSectionDown2 = react.useCallback(
4340
4344
  (sectionId) => {
4341
- setSections(chunkP3Y3OMAD_js.moveSectionDown(sections, sectionId));
4345
+ setSections(chunk3NDRTC7T_js.moveSectionDown(sections, sectionId));
4342
4346
  markDirty();
4343
4347
  },
4344
4348
  [sections, setSections, markDirty]
4345
4349
  );
4346
4350
  const moveSlidesToSection2 = react.useCallback(
4347
4351
  (slideIndexes, targetSectionId) => {
4348
- const result = chunkP3Y3OMAD_js.moveSlidesToSection(sections, slides, slideIndexes, targetSectionId);
4352
+ const result = chunk3NDRTC7T_js.moveSlidesToSection(sections, slides, slideIndexes, targetSectionId);
4349
4353
  setSlides(result.slides);
4350
4354
  setSections(result.sections);
4351
4355
  markDirty();
@@ -4364,19 +4368,19 @@ function useSectionOperations(input) {
4364
4368
 
4365
4369
  // src/viewer/hooks/pointer-move-handlers.ts
4366
4370
  function computeResizeGeometry(handle, startX, startY, startWidth, startHeight, dx, dy, snapToGrid, gridSpacingPx) {
4367
- const resized = chunkP3Y3OMAD_js.applyResize(
4371
+ const resized = chunk3NDRTC7T_js.applyResize(
4368
4372
  { x: startX, y: startY, width: startWidth, height: startHeight },
4369
4373
  handle,
4370
4374
  dx,
4371
4375
  dy,
4372
4376
  1,
4373
- { minSize: chunkAX75ONFY_js.MIN_ELEMENT_SIZE }
4377
+ { minSize: chunkIN7D2T4R_js.MIN_ELEMENT_SIZE }
4374
4378
  );
4375
4379
  const box = { x: resized.x, y: resized.y, width: resized.width, height: resized.height };
4376
4380
  if (!snapToGrid) {
4377
4381
  return box;
4378
4382
  }
4379
- return chunkP3Y3OMAD_js.snapBoxToGrid(box, handle, gridSpacingPx, chunkAX75ONFY_js.MIN_ELEMENT_SIZE);
4383
+ return chunk3NDRTC7T_js.snapBoxToGrid(box, handle, gridSpacingPx, chunkIN7D2T4R_js.MIN_ELEMENT_SIZE);
4380
4384
  }
4381
4385
  function computeAdjustmentValue(startAdjustment, dx, startWidth) {
4382
4386
  const range = startWidth || 200;
@@ -4494,7 +4498,7 @@ function processDragMove(e, drag, editorScale, snapToGrid, snapToShape, gridSpac
4494
4498
  width: el.width,
4495
4499
  height: el.height
4496
4500
  }));
4497
- const snapResult = chunkP3Y3OMAD_js.computeSnapToShape(
4501
+ const snapResult = chunk3NDRTC7T_js.computeSnapToShape(
4498
4502
  targetX,
4499
4503
  targetY,
4500
4504
  primaryEl.width,
@@ -4533,7 +4537,7 @@ function processDragMove(e, drag, editorScale, snapToGrid, snapToShape, gridSpac
4533
4537
  if (live) {
4534
4538
  for (const id of Object.keys(drag.startPositionsById)) {
4535
4539
  const start = drag.startPositionsById[id];
4536
- chunkP3Y3OMAD_js.publishLiveGeometry(live.patcher, live.slideId, id, {
4540
+ chunk3NDRTC7T_js.publishLiveGeometry(live.patcher, live.slideId, id, {
4537
4541
  x: start.x + appliedDx,
4538
4542
  y: start.y + appliedDy
4539
4543
  });
@@ -4567,15 +4571,15 @@ function processResizeMove(e, rs, editorScale, snapToGrid, gridSpacingPx, live)
4567
4571
  if (rs.domEl) {
4568
4572
  rs.domEl.style.left = `${geo.x}px`;
4569
4573
  rs.domEl.style.top = `${geo.y}px`;
4570
- rs.domEl.style.width = `${Math.max(geo.width, chunkAX75ONFY_js.MIN_ELEMENT_SIZE)}px`;
4571
- rs.domEl.style.height = `${Math.max(geo.height, chunkAX75ONFY_js.MIN_ELEMENT_SIZE)}px`;
4574
+ rs.domEl.style.width = `${Math.max(geo.width, chunkIN7D2T4R_js.MIN_ELEMENT_SIZE)}px`;
4575
+ rs.domEl.style.height = `${Math.max(geo.height, chunkIN7D2T4R_js.MIN_ELEMENT_SIZE)}px`;
4572
4576
  }
4573
4577
  if (live) {
4574
- chunkP3Y3OMAD_js.publishLiveGeometry(live.patcher, live.slideId, rs.elementId, {
4578
+ chunk3NDRTC7T_js.publishLiveGeometry(live.patcher, live.slideId, rs.elementId, {
4575
4579
  x: geo.x,
4576
4580
  y: geo.y,
4577
- width: Math.max(geo.width, chunkAX75ONFY_js.MIN_ELEMENT_SIZE),
4578
- height: Math.max(geo.height, chunkAX75ONFY_js.MIN_ELEMENT_SIZE)
4581
+ width: Math.max(geo.width, chunkIN7D2T4R_js.MIN_ELEMENT_SIZE),
4582
+ height: Math.max(geo.height, chunkIN7D2T4R_js.MIN_ELEMENT_SIZE)
4579
4583
  });
4580
4584
  }
4581
4585
  }
@@ -4655,13 +4659,13 @@ function processPointerUp(input) {
4655
4659
  if (i !== activeSlideIndex) {
4656
4660
  return s;
4657
4661
  }
4658
- const rerouted = chunkP3Y3OMAD_js.rerouteConnectorsForMovedElements(s.elements, movedIds);
4662
+ const rerouted = chunk3NDRTC7T_js.rerouteConnectorsForMovedElements(s.elements, movedIds);
4659
4663
  if (rerouted.length === 0) {
4660
4664
  return s;
4661
4665
  }
4662
4666
  return {
4663
4667
  ...s,
4664
- elements: chunkP3Y3OMAD_js.applyReroutedConnectors(s.elements, rerouted)
4668
+ elements: chunk3NDRTC7T_js.applyReroutedConnectors(s.elements, rerouted)
4665
4669
  };
4666
4670
  })
4667
4671
  );
@@ -4683,9 +4687,9 @@ function processPointerUp(input) {
4683
4687
  }
4684
4688
  function commitMarquee(marquee, editTemplateMode, templateElements, activeSlide, applySelection, clearSelection) {
4685
4689
  const sourceElements = editTemplateMode ? templateElements : activeSlide?.elements ?? [];
4686
- const hitIds = chunkP3Y3OMAD_js.computeMarqueeHitIds(marquee, sourceElements);
4690
+ const hitIds = chunk3NDRTC7T_js.computeMarqueeHitIds(marquee, sourceElements);
4687
4691
  if (marquee.additive) {
4688
- const merged = chunkP3Y3OMAD_js.mergeAdditiveSelection(marquee.baseSelectionIds, hitIds);
4692
+ const merged = chunk3NDRTC7T_js.mergeAdditiveSelection(marquee.baseSelectionIds, hitIds);
4689
4693
  if (merged.length > 0) {
4690
4694
  applySelection(merged[0], merged);
4691
4695
  } else {
@@ -4708,8 +4712,8 @@ function commitDrag(drag, editTemplateMode, activeSlide, activeSlideIndex, setTe
4708
4712
  }
4709
4713
  return { ...el, x: start.x + dx, y: start.y + dy };
4710
4714
  });
4711
- const rerouted = chunkP3Y3OMAD_js.rerouteConnectorsForMovedElements(movedElements, movedIds);
4712
- return chunkP3Y3OMAD_js.applyReroutedConnectors(movedElements, rerouted);
4715
+ const rerouted = chunk3NDRTC7T_js.rerouteConnectorsForMovedElements(movedElements, movedIds);
4716
+ return chunk3NDRTC7T_js.applyReroutedConnectors(movedElements, rerouted);
4713
4717
  };
4714
4718
  if (editTemplateMode) {
4715
4719
  const slideId = activeSlide?.id;
@@ -4865,9 +4869,9 @@ function useCanvasInteractions(input) {
4865
4869
  return;
4866
4870
  }
4867
4871
  const el = elementLookup.get(editId);
4868
- if (el && chunkP3Y3OMAD_js.hasTextProperties(el)) {
4872
+ if (el && chunk3NDRTC7T_js.hasTextProperties(el)) {
4869
4873
  const committedText = transformCommittedText ? transformCommittedText(inlineEditingText) : inlineEditingText;
4870
- const newSegments = chunkP3Y3OMAD_js.remapTextToSegments(committedText, el.textSegments, el.textStyle);
4874
+ const newSegments = chunk3NDRTC7T_js.remapTextToSegments(committedText, el.textSegments, el.textStyle);
4871
4875
  ops.updateElementById(editId, {
4872
4876
  text: committedText,
4873
4877
  textSegments: newSegments
@@ -4878,7 +4882,7 @@ function useCanvasInteractions(input) {
4878
4882
  setInlineEditingText("");
4879
4883
  };
4880
4884
  const openEquationEditorForElement = (el) => {
4881
- if (!chunkP3Y3OMAD_js.hasTextProperties(el)) {
4885
+ if (!chunk3NDRTC7T_js.hasTextProperties(el)) {
4882
4886
  return false;
4883
4887
  }
4884
4888
  const eqSeg = el.textSegments?.find((seg) => seg.equationXml);
@@ -4907,7 +4911,7 @@ function useCanvasInteractions(input) {
4907
4911
  justSelectedRef.current = false;
4908
4912
  } else {
4909
4913
  const el = elementLookup.get(elementId);
4910
- if (el && chunkP3Y3OMAD_js.hasTextProperties(el) && !el.locks?.noTextEdit) {
4914
+ if (el && chunk3NDRTC7T_js.hasTextProperties(el) && !el.locks?.noTextEdit) {
4911
4915
  if (!openEquationEditorForElement(el)) {
4912
4916
  setInlineEditingElementId(elementId);
4913
4917
  setInlineEditingText(el.text ?? "");
@@ -4926,7 +4930,7 @@ function useCanvasInteractions(input) {
4926
4930
  if (openEquationEditorForElement(el)) {
4927
4931
  return;
4928
4932
  }
4929
- if (chunkP3Y3OMAD_js.hasTextProperties(el)) {
4933
+ if (chunk3NDRTC7T_js.hasTextProperties(el)) {
4930
4934
  setInlineEditingElementId(elementId);
4931
4935
  setInlineEditingText(el.text ?? "");
4932
4936
  }
@@ -5119,7 +5123,7 @@ function createFileHandlers(deps) {
5119
5123
  h = Math.round(h * scale);
5120
5124
  }
5121
5125
  addElement({
5122
- id: chunkP3Y3OMAD_js.generateElementId(),
5126
+ id: chunk3NDRTC7T_js.generateElementId(),
5123
5127
  type: "image",
5124
5128
  x: Math.round((canvasSize.width - w) / 2),
5125
5129
  y: Math.round((canvasSize.height - h) / 2),
@@ -5130,7 +5134,7 @@ function createFileHandlers(deps) {
5130
5134
  };
5131
5135
  img.onerror = () => {
5132
5136
  addElement({
5133
- id: chunkP3Y3OMAD_js.generateElementId(),
5137
+ id: chunk3NDRTC7T_js.generateElementId(),
5134
5138
  type: "image",
5135
5139
  x: 100,
5136
5140
  y: 100,
@@ -5156,7 +5160,7 @@ function createFileHandlers(deps) {
5156
5160
  const elFilePath = file.path;
5157
5161
  const insertMediaElement = (mediaSourceUrl, width, height) => {
5158
5162
  addElement({
5159
- id: chunkP3Y3OMAD_js.generateElementId(),
5163
+ id: chunk3NDRTC7T_js.generateElementId(),
5160
5164
  type: "media",
5161
5165
  mediaType,
5162
5166
  mediaMimeType: file.type || void 0,
@@ -5331,13 +5335,13 @@ function createStructuredElementHandlers(deps) {
5331
5335
  return;
5332
5336
  }
5333
5337
  addElement({
5334
- id: chunkP3Y3OMAD_js.generateElementId(),
5338
+ id: chunk3NDRTC7T_js.generateElementId(),
5335
5339
  type: "smartArt",
5336
5340
  x: 100,
5337
5341
  y: 120,
5338
5342
  width: 600,
5339
5343
  height: 340,
5340
- smartArtData: chunkP3Y3OMAD_js.buildSmartArtPresetData(
5344
+ smartArtData: chunk3NDRTC7T_js.buildSmartArtPresetData(
5341
5345
  layout,
5342
5346
  defaultItems,
5343
5347
  (i) => `node-${Date.now()}-${i}-${Math.random().toString(36).slice(2, 8)}`
@@ -5349,7 +5353,7 @@ function createStructuredElementHandlers(deps) {
5349
5353
  return;
5350
5354
  }
5351
5355
  addElement({
5352
- id: chunkP3Y3OMAD_js.generateElementId(),
5356
+ id: chunk3NDRTC7T_js.generateElementId(),
5353
5357
  type: "shape",
5354
5358
  x: 120,
5355
5359
  y: 200,
@@ -5408,7 +5412,7 @@ function createStructuredElementHandlers(deps) {
5408
5412
  const displayText = value || fieldTexts[fieldType] || fieldType;
5409
5413
  const fieldGuid = `{${crypto.randomUUID().toUpperCase()}}`;
5410
5414
  addElement({
5411
- id: chunkP3Y3OMAD_js.generateElementId(),
5415
+ id: chunk3NDRTC7T_js.generateElementId(),
5412
5416
  type: "shape",
5413
5417
  x: 120,
5414
5418
  y: 200,
@@ -5430,11 +5434,11 @@ function createStructuredElementHandlers(deps) {
5430
5434
  if (!activeSlide) {
5431
5435
  return;
5432
5436
  }
5433
- const preset = chunkP3Y3OMAD_js.ACTION_BUTTON_PRESETS.find((p) => p.shapeType === shapeType);
5437
+ const preset = chunk3NDRTC7T_js.ACTION_BUTTON_PRESETS.find((p) => p.shapeType === shapeType);
5434
5438
  if (!preset) {
5435
5439
  return;
5436
5440
  }
5437
- const defaultPptxAction = chunkP3Y3OMAD_js.elementActionToPptxAction({
5441
+ const defaultPptxAction = chunk3NDRTC7T_js.elementActionToPptxAction({
5438
5442
  trigger: "click",
5439
5443
  type: preset.defaultAction
5440
5444
  });
@@ -5443,7 +5447,7 @@ function createStructuredElementHandlers(deps) {
5443
5447
  defaultPptxAction.highlightClick = true;
5444
5448
  }
5445
5449
  addElement({
5446
- id: chunkP3Y3OMAD_js.generateElementId(),
5450
+ id: chunk3NDRTC7T_js.generateElementId(),
5447
5451
  type: "shape",
5448
5452
  x: 150,
5449
5453
  y: 150,
@@ -5510,14 +5514,14 @@ function useInsertElements(input) {
5510
5514
  return;
5511
5515
  }
5512
5516
  addElement({
5513
- id: chunkP3Y3OMAD_js.generateElementId(),
5517
+ id: chunk3NDRTC7T_js.generateElementId(),
5514
5518
  type: "text",
5515
5519
  x: 100,
5516
5520
  y: 100,
5517
5521
  width: 300,
5518
5522
  height: 60,
5519
5523
  text: "",
5520
- textStyle: { fontSize: chunkAX75ONFY_js.DEFAULT_TEXT_FONT_SIZE }
5524
+ textStyle: { fontSize: chunkIN7D2T4R_js.DEFAULT_TEXT_FONT_SIZE }
5521
5525
  });
5522
5526
  };
5523
5527
  const handleAddShape = () => {
@@ -5525,7 +5529,7 @@ function useInsertElements(input) {
5525
5529
  return;
5526
5530
  }
5527
5531
  addElement({
5528
- id: chunkP3Y3OMAD_js.generateElementId(),
5532
+ id: chunk3NDRTC7T_js.generateElementId(),
5529
5533
  type: "shape",
5530
5534
  x: 150,
5531
5535
  y: 150,
@@ -5544,15 +5548,15 @@ function useInsertElements(input) {
5544
5548
  return;
5545
5549
  }
5546
5550
  addElement({
5547
- ...chunkP3Y3OMAD_js.newTableElement(chunkAX75ONFY_js.DEFAULT_TABLE_ROWS, chunkAX75ONFY_js.DEFAULT_TABLE_COLUMNS, 100, 200),
5548
- id: chunkP3Y3OMAD_js.generateElementId()
5551
+ ...chunk3NDRTC7T_js.newTableElement(chunkIN7D2T4R_js.DEFAULT_TABLE_ROWS, chunkIN7D2T4R_js.DEFAULT_TABLE_COLUMNS, 100, 200),
5552
+ id: chunk3NDRTC7T_js.generateElementId()
5549
5553
  });
5550
5554
  };
5551
5555
  const handleAddChart = (chartKind) => {
5552
5556
  if (!activeSlide) {
5553
5557
  return;
5554
5558
  }
5555
- addElement(chunkP3Y3OMAD_js.createDefaultChartElement(chartKind));
5559
+ addElement(chunk3NDRTC7T_js.createDefaultChartElement(chartKind));
5556
5560
  };
5557
5561
  const structured = createStructuredElementHandlers({
5558
5562
  activeSlide,
@@ -5622,7 +5626,7 @@ function useClipboardHandlers(input) {
5622
5626
  if (!selectedElement) {
5623
5627
  return;
5624
5628
  }
5625
- setClipboardPayload(chunkP3Y3OMAD_js.buildElementClipboardPayload(selectedElement, editTemplateMode));
5629
+ setClipboardPayload(chunk3NDRTC7T_js.buildElementClipboardPayload(selectedElement, editTemplateMode));
5626
5630
  };
5627
5631
  const handleDelete = () => {
5628
5632
  const idsToDelete = effectiveSelectedIds;
@@ -5639,7 +5643,7 @@ function useClipboardHandlers(input) {
5639
5643
  handleDelete();
5640
5644
  };
5641
5645
  const insertClone = (source) => {
5642
- const clone = chunkP3Y3OMAD_js.cloneElementForPaste(source, { intoTemplate: editTemplateMode });
5646
+ const clone = chunk3NDRTC7T_js.cloneElementForPaste(source, { intoTemplate: editTemplateMode });
5643
5647
  ops.updateActiveElements((els) => [...els, clone]);
5644
5648
  ops.applySelection(clone.id);
5645
5649
  history.markDirty();
@@ -5674,7 +5678,7 @@ function resolveShapePath(el) {
5674
5678
  return el.pathData;
5675
5679
  }
5676
5680
  if ("shapeType" in el && typeof el.shapeType === "string") {
5677
- const clipPath = chunkP3Y3OMAD_js.getPresetShapeClipPath(el.shapeType);
5681
+ const clipPath = chunk3NDRTC7T_js.getPresetShapeClipPath(el.shapeType);
5678
5682
  if (clipPath) {
5679
5683
  const svgPath = clipPathToSvgPath(clipPath, el.width, el.height);
5680
5684
  if (svgPath) {
@@ -5725,7 +5729,7 @@ function clipPathToSvgPath(clipPath, width, height) {
5725
5729
  return parts.join(" ");
5726
5730
  }
5727
5731
  function transformPathToGlobal(pathData, el) {
5728
- const polys = chunkP3Y3OMAD_js.svgPathToPolygons(pathData);
5732
+ const polys = chunk3NDRTC7T_js.svgPathToPolygons(pathData);
5729
5733
  if (polys.length === 0) {
5730
5734
  return pathData;
5731
5735
  }
@@ -5745,10 +5749,10 @@ function transformPathToGlobal(pathData, el) {
5745
5749
  y: pt.y * scaleY + el.y
5746
5750
  }))
5747
5751
  );
5748
- return chunkP3Y3OMAD_js.polygonsToSvgPath(transformed);
5752
+ return chunk3NDRTC7T_js.polygonsToSvgPath(transformed);
5749
5753
  }
5750
5754
  function transformPathToLocal(pathData, x, y, _width, _height) {
5751
- const polys = chunkP3Y3OMAD_js.svgPathToPolygons(pathData);
5755
+ const polys = chunk3NDRTC7T_js.svgPathToPolygons(pathData);
5752
5756
  if (polys.length === 0) {
5753
5757
  return pathData;
5754
5758
  }
@@ -5758,10 +5762,10 @@ function transformPathToLocal(pathData, x, y, _width, _height) {
5758
5762
  y: pt.y - y
5759
5763
  }))
5760
5764
  );
5761
- return chunkP3Y3OMAD_js.polygonsToSvgPath(transformed);
5765
+ return chunk3NDRTC7T_js.polygonsToSvgPath(transformed);
5762
5766
  }
5763
5767
  function pathBounds(pathData) {
5764
- const polys = chunkP3Y3OMAD_js.svgPathToPolygons(pathData);
5768
+ const polys = chunk3NDRTC7T_js.svgPathToPolygons(pathData);
5765
5769
  let minX = Infinity;
5766
5770
  let minY = Infinity;
5767
5771
  let maxX = -Infinity;
@@ -5820,7 +5824,7 @@ function useMergeShapesHandler(input) {
5820
5824
  let allFragments = [];
5821
5825
  let remaining = globalPaths[0];
5822
5826
  for (let i = 1; i < globalPaths.length; i++) {
5823
- const frags = chunkP3Y3OMAD_js.mergeShapes("fragment", remaining, globalPaths[i]);
5827
+ const frags = chunk3NDRTC7T_js.mergeShapes("fragment", remaining, globalPaths[i]);
5824
5828
  if (Array.isArray(frags)) {
5825
5829
  allFragments = frags;
5826
5830
  }
@@ -5849,7 +5853,7 @@ function useMergeShapesHandler(input) {
5849
5853
  bounds.height
5850
5854
  );
5851
5855
  const newEl = {
5852
- id: chunkP3Y3OMAD_js.generateElementId(),
5856
+ id: chunk3NDRTC7T_js.generateElementId(),
5853
5857
  type: "shape",
5854
5858
  x: bounds.x,
5855
5859
  y: bounds.y,
@@ -5887,7 +5891,7 @@ function useMergeShapesHandler(input) {
5887
5891
  } else {
5888
5892
  let resultPath = globalPaths[0];
5889
5893
  for (let i = 1; i < globalPaths.length; i++) {
5890
- const result = chunkP3Y3OMAD_js.mergeShapes(operation, resultPath, globalPaths[i]);
5894
+ const result = chunk3NDRTC7T_js.mergeShapes(operation, resultPath, globalPaths[i]);
5891
5895
  if (typeof result === "string") {
5892
5896
  resultPath = result;
5893
5897
  }
@@ -5908,7 +5912,7 @@ function useMergeShapesHandler(input) {
5908
5912
  );
5909
5913
  const primary = targets[0];
5910
5914
  const newEl = {
5911
- id: chunkP3Y3OMAD_js.generateElementId(),
5915
+ id: chunk3NDRTC7T_js.generateElementId(),
5912
5916
  type: "shape",
5913
5917
  x: bounds.x,
5914
5918
  y: bounds.y,
@@ -5971,7 +5975,7 @@ function useGroupAlignLayerHandlers(input) {
5971
5975
  if (ids.length < 2 || !activeSlide) {
5972
5976
  return;
5973
5977
  }
5974
- const { elements, groupId } = chunkP3Y3OMAD_js.groupElements(ops.activeElements, ids, chunkP3Y3OMAD_js.generateElementId());
5978
+ const { elements, groupId } = chunk3NDRTC7T_js.groupElements(ops.activeElements, ids, chunk3NDRTC7T_js.generateElementId());
5975
5979
  if (groupId === null) {
5976
5980
  return;
5977
5981
  }
@@ -5984,12 +5988,12 @@ function useGroupAlignLayerHandlers(input) {
5984
5988
  return;
5985
5989
  }
5986
5990
  const group = selectedElement;
5987
- const intoTemplate = chunkP3Y3OMAD_js.isTemplateElementId(group.id);
5991
+ const intoTemplate = chunk3NDRTC7T_js.isTemplateElementId(group.id);
5988
5992
  const ungrouped = group.children.map((child) => ({
5989
5993
  ...structuredClone(child),
5990
5994
  // Keep child ids in the same store as the group so later edits route
5991
5995
  // correctly: template groups yield template-prefixed child ids.
5992
- id: intoTemplate ? chunkP3Y3OMAD_js.makeCloneId(true, child.id || group.id) : child.id || chunkP3Y3OMAD_js.generateElementId(),
5996
+ id: intoTemplate ? chunk3NDRTC7T_js.makeCloneId(true, child.id || group.id) : child.id || chunk3NDRTC7T_js.generateElementId(),
5993
5997
  x: child.x + group.x,
5994
5998
  y: child.y + group.y
5995
5999
  }));
@@ -6013,7 +6017,7 @@ function useGroupAlignLayerHandlers(input) {
6013
6017
  if (!edge) {
6014
6018
  return;
6015
6019
  }
6016
- const positions = chunkP3Y3OMAD_js.alignElements(selectedElements, edge);
6020
+ const positions = chunk3NDRTC7T_js.alignElements(selectedElements, edge);
6017
6021
  for (const [id, pos] of positions) {
6018
6022
  const el = elementLookup.get(id);
6019
6023
  if (!el) {
@@ -6031,7 +6035,7 @@ function useGroupAlignLayerHandlers(input) {
6031
6035
  if (!distAxis) {
6032
6036
  return;
6033
6037
  }
6034
- const positions = chunkP3Y3OMAD_js.distributeElements(selectedElements, distAxis);
6038
+ const positions = chunk3NDRTC7T_js.distributeElements(selectedElements, distAxis);
6035
6039
  for (const [id, pos] of positions) {
6036
6040
  const el = elementLookup.get(id);
6037
6041
  if (!el) {
@@ -6048,7 +6052,7 @@ function useGroupAlignLayerHandlers(input) {
6048
6052
  }
6049
6053
  const id = selectedElement.id;
6050
6054
  ops.updateActiveElements(
6051
- (els) => direction === "forward" ? chunkP3Y3OMAD_js.bringForward(els, id) : direction === "backward" ? chunkP3Y3OMAD_js.sendBackward(els, id) : els
6055
+ (els) => direction === "forward" ? chunk3NDRTC7T_js.bringForward(els, id) : direction === "backward" ? chunk3NDRTC7T_js.sendBackward(els, id) : els
6052
6056
  );
6053
6057
  history.markDirty();
6054
6058
  };
@@ -6058,7 +6062,7 @@ function useGroupAlignLayerHandlers(input) {
6058
6062
  }
6059
6063
  const id = selectedElement.id;
6060
6064
  ops.updateActiveElements(
6061
- (els) => direction === "front" ? chunkP3Y3OMAD_js.bringToFront(els, id) : chunkP3Y3OMAD_js.sendToBack(els, id)
6065
+ (els) => direction === "front" ? chunk3NDRTC7T_js.bringToFront(els, id) : chunk3NDRTC7T_js.sendToBack(els, id)
6062
6066
  );
6063
6067
  history.markDirty();
6064
6068
  };
@@ -6189,7 +6193,7 @@ function useSlideManagement(input) {
6189
6193
  theme
6190
6194
  } = input;
6191
6195
  const handleAddSlide = () => {
6192
- const newSlide = chunkP3Y3OMAD_js.createBlankSlide(slides.length + 1);
6196
+ const newSlide = chunk3NDRTC7T_js.createBlankSlide(slides.length + 1);
6193
6197
  ops.updateSlides((prev) => {
6194
6198
  const next = [...prev];
6195
6199
  next.splice(activeSlideIndex + 1, 0, newSlide);
@@ -6252,7 +6256,7 @@ function useSlideManagement(input) {
6252
6256
  }
6253
6257
  const clone = {
6254
6258
  ...src,
6255
- id: chunkP3Y3OMAD_js.makeSlideId(),
6259
+ id: chunk3NDRTC7T_js.makeSlideId(),
6256
6260
  elements: src.elements.map((el) => ({
6257
6261
  ...el,
6258
6262
  id: `${el.id}-dup-${Math.random().toString(36).slice(2, 6)}`
@@ -6284,7 +6288,7 @@ function useSlideManagement(input) {
6284
6288
  const handleInsertSlideFromLayout = (layoutPath, layoutName) => {
6285
6289
  const insertAt = activeSlideIndex + 1;
6286
6290
  const draft = {
6287
- ...chunkP3Y3OMAD_js.createBlankSlide(slides.length + 1),
6291
+ ...chunk3NDRTC7T_js.createBlankSlide(slides.length + 1),
6288
6292
  layoutPath,
6289
6293
  ...layoutName ? { layoutName } : {}
6290
6294
  };
@@ -6317,9 +6321,9 @@ function useSlideManagement(input) {
6317
6321
  };
6318
6322
  const handleInsertSlideFromTemplate = (templateId) => {
6319
6323
  const insertAt = activeSlideIndex + 1;
6320
- const draft = chunkP3Y3OMAD_js.buildSlideTemplateSlide(templateId, chunkP3Y3OMAD_js.makeSlideId(), slides.length + 1, {
6324
+ const draft = chunk3NDRTC7T_js.buildSlideTemplateSlide(templateId, chunk3NDRTC7T_js.makeSlideId(), slides.length + 1, {
6321
6325
  ...canvasSize ? { slideWidth: canvasSize.width, slideHeight: canvasSize.height } : {},
6322
- scheme: chunkP3Y3OMAD_js.templateSchemeFromTheme(theme?.colorScheme)
6326
+ scheme: chunk3NDRTC7T_js.templateSchemeFromTheme(theme?.colorScheme)
6323
6327
  });
6324
6328
  ops.updateSlides((prev) => insertSlideFromLayoutUpdater(prev, activeSlideIndex, draft));
6325
6329
  setActiveSlideIndex(insertAt);
@@ -6356,7 +6360,7 @@ function createTableMergeHandlers(input) {
6356
6360
  if (!nextCell || nextCell.hMerge || nextCell.vMerge) {
6357
6361
  return;
6358
6362
  }
6359
- const newTableData = chunkP3Y3OMAD_js.mergeCells(
6363
+ const newTableData = chunk3NDRTC7T_js.mergeCells(
6360
6364
  [
6361
6365
  { row: rowIndex, col: columnIndex },
6362
6366
  { row: rowIndex, col: nextColIdx }
@@ -6364,7 +6368,7 @@ function createTableMergeHandlers(input) {
6364
6368
  td
6365
6369
  );
6366
6370
  const updates = { tableData: newTableData };
6367
- const newRawXml = chunkP3Y3OMAD_js.updateMergeAttrsInRawXml(selectedElement, newTableData);
6371
+ const newRawXml = chunk3NDRTC7T_js.updateMergeAttrsInRawXml(selectedElement, newTableData);
6368
6372
  if (newRawXml) {
6369
6373
  updates.rawXml = newRawXml;
6370
6374
  }
@@ -6390,7 +6394,7 @@ function createTableMergeHandlers(input) {
6390
6394
  if (!targetNextCell || targetNextCell.hMerge || targetNextCell.vMerge) {
6391
6395
  return;
6392
6396
  }
6393
- const newTableData = chunkP3Y3OMAD_js.mergeCells(
6397
+ const newTableData = chunk3NDRTC7T_js.mergeCells(
6394
6398
  [
6395
6399
  { row: rowIndex, col: columnIndex },
6396
6400
  { row: targetNextRowIdx, col: columnIndex }
@@ -6398,7 +6402,7 @@ function createTableMergeHandlers(input) {
6398
6402
  td
6399
6403
  );
6400
6404
  const updates = { tableData: newTableData };
6401
- const newRawXml = chunkP3Y3OMAD_js.updateMergeAttrsInRawXml(selectedElement, newTableData);
6405
+ const newRawXml = chunk3NDRTC7T_js.updateMergeAttrsInRawXml(selectedElement, newTableData);
6402
6406
  if (newRawXml) {
6403
6407
  updates.rawXml = newRawXml;
6404
6408
  }
@@ -6413,9 +6417,9 @@ function createTableMergeHandlers(input) {
6413
6417
  return;
6414
6418
  }
6415
6419
  const td = selectedElement.tableData;
6416
- const newTableData = chunkP3Y3OMAD_js.mergeCells(ts.selectedCells, td);
6420
+ const newTableData = chunk3NDRTC7T_js.mergeCells(ts.selectedCells, td);
6417
6421
  const updates = { tableData: newTableData };
6418
- const newRawXml = chunkP3Y3OMAD_js.updateMergeAttrsInRawXml(selectedElement, newTableData);
6422
+ const newRawXml = chunk3NDRTC7T_js.updateMergeAttrsInRawXml(selectedElement, newTableData);
6419
6423
  if (newRawXml) {
6420
6424
  updates.rawXml = newRawXml;
6421
6425
  }
@@ -6432,9 +6436,9 @@ function createTableMergeHandlers(input) {
6432
6436
  }
6433
6437
  const { rowIndex, columnIndex } = ts;
6434
6438
  const td = selectedElement.tableData;
6435
- const newTableData = chunkP3Y3OMAD_js.splitCell(rowIndex, columnIndex, td);
6439
+ const newTableData = chunk3NDRTC7T_js.splitCell(rowIndex, columnIndex, td);
6436
6440
  const updates = { tableData: newTableData };
6437
- const newRawXml = chunkP3Y3OMAD_js.updateMergeAttrsInRawXml(selectedElement, newTableData);
6441
+ const newRawXml = chunk3NDRTC7T_js.updateMergeAttrsInRawXml(selectedElement, newTableData);
6438
6442
  if (newRawXml) {
6439
6443
  updates.rawXml = newRawXml;
6440
6444
  }
@@ -6478,7 +6482,7 @@ function createTableStructHandlers(input) {
6478
6482
  updates.tableData = { ...el.tableData, rows: newRows };
6479
6483
  }
6480
6484
  if (el.rawXml) {
6481
- const newRawXml = chunkP3Y3OMAD_js.updateCellTextInRawXml(el, rowIndex, colIndex, text);
6485
+ const newRawXml = chunk3NDRTC7T_js.updateCellTextInRawXml(el, rowIndex, colIndex, text);
6482
6486
  if (newRawXml) {
6483
6487
  updates.rawXml = newRawXml;
6484
6488
  }
@@ -6502,7 +6506,7 @@ function createTableStructHandlers(input) {
6502
6506
  const { rowIndex, columnIndex: colIndex } = ts;
6503
6507
  const updates = {};
6504
6508
  if (selectedElement.rawXml) {
6505
- const newRawXml = chunkP3Y3OMAD_js.updateCellTextStyleInRawXml(
6509
+ const newRawXml = chunk3NDRTC7T_js.updateCellTextStyleInRawXml(
6506
6510
  selectedElement,
6507
6511
  rowIndex,
6508
6512
  colIndex,
@@ -6566,9 +6570,9 @@ function createTableStructHandlers(input) {
6566
6570
  return;
6567
6571
  }
6568
6572
  const rowIdx = ts?.rowIndex ?? 0;
6569
- const newTableData = chunkP3Y3OMAD_js.insertTableRow(selectedElement.tableData, rowIdx, position);
6573
+ const newTableData = chunk3NDRTC7T_js.insertTableRow(selectedElement.tableData, rowIdx, position);
6570
6574
  const updates = { tableData: newTableData };
6571
- const newRawXml = chunkP3Y3OMAD_js.rebuildTableStructureInRawXml(selectedElement, newTableData);
6575
+ const newRawXml = chunk3NDRTC7T_js.rebuildTableStructureInRawXml(selectedElement, newTableData);
6572
6576
  if (newRawXml) {
6573
6577
  updates.rawXml = newRawXml;
6574
6578
  }
@@ -6581,12 +6585,12 @@ function createTableStructHandlers(input) {
6581
6585
  }
6582
6586
  const td = selectedElement.tableData;
6583
6587
  const rowIdx = ts?.rowIndex ?? 0;
6584
- const newTableData = chunkP3Y3OMAD_js.deleteTableRow(td, rowIdx);
6588
+ const newTableData = chunk3NDRTC7T_js.deleteTableRow(td, rowIdx);
6585
6589
  if (newTableData === td) {
6586
6590
  return;
6587
6591
  }
6588
6592
  const updates = { tableData: newTableData };
6589
- const newRawXml = chunkP3Y3OMAD_js.rebuildTableStructureInRawXml(selectedElement, newTableData);
6593
+ const newRawXml = chunk3NDRTC7T_js.rebuildTableStructureInRawXml(selectedElement, newTableData);
6590
6594
  if (newRawXml) {
6591
6595
  updates.rawXml = newRawXml;
6592
6596
  }
@@ -6598,9 +6602,9 @@ function createTableStructHandlers(input) {
6598
6602
  return;
6599
6603
  }
6600
6604
  const colIdx = ts?.columnIndex ?? 0;
6601
- const newTableData = chunkP3Y3OMAD_js.insertTableColumn(selectedElement.tableData, colIdx, position);
6605
+ const newTableData = chunk3NDRTC7T_js.insertTableColumn(selectedElement.tableData, colIdx, position);
6602
6606
  const updates = { tableData: newTableData };
6603
- const newRawXml = chunkP3Y3OMAD_js.rebuildTableStructureInRawXml(selectedElement, newTableData);
6607
+ const newRawXml = chunk3NDRTC7T_js.rebuildTableStructureInRawXml(selectedElement, newTableData);
6604
6608
  if (newRawXml) {
6605
6609
  updates.rawXml = newRawXml;
6606
6610
  }
@@ -6613,12 +6617,12 @@ function createTableStructHandlers(input) {
6613
6617
  }
6614
6618
  const td = selectedElement.tableData;
6615
6619
  const colIdx = ts?.columnIndex ?? 0;
6616
- const newTableData = chunkP3Y3OMAD_js.deleteTableColumn(td, colIdx);
6620
+ const newTableData = chunk3NDRTC7T_js.deleteTableColumn(td, colIdx);
6617
6621
  if (newTableData === td) {
6618
6622
  return;
6619
6623
  }
6620
6624
  const updates = { tableData: newTableData };
6621
- const newRawXml = chunkP3Y3OMAD_js.rebuildTableStructureInRawXml(selectedElement, newTableData);
6625
+ const newRawXml = chunk3NDRTC7T_js.rebuildTableStructureInRawXml(selectedElement, newTableData);
6622
6626
  if (newRawXml) {
6623
6627
  updates.rawXml = newRawXml;
6624
6628
  }
@@ -6654,8 +6658,8 @@ async function renderToCanvas(element, options = {}) {
6654
6658
  return html2canvasPro(element, {
6655
6659
  ...options,
6656
6660
  onclone: async (doc, clonedEl) => {
6657
- await chunkP3Y3OMAD_js.normalizeColorsForCapture(doc, clonedEl);
6658
- chunkP3Y3OMAD_js.preprocessCssForCapture(clonedEl);
6661
+ await chunk3NDRTC7T_js.normalizeColorsForCapture(doc, clonedEl);
6662
+ chunk3NDRTC7T_js.preprocessCssForCapture(clonedEl);
6659
6663
  if (typeof userOnClone === "function") {
6660
6664
  userOnClone(doc, clonedEl);
6661
6665
  }
@@ -6711,7 +6715,7 @@ async function exportSlideToPngBlob(slideElement, options = {}) {
6711
6715
  }
6712
6716
  async function exportSlideAsPng(slideElement, slideIndex, options = {}) {
6713
6717
  const blob = await exportSlideToPngBlob(slideElement, options);
6714
- chunkP3Y3OMAD_js.downloadBlob(blob, `slide-${slideIndex + 1}.png`);
6718
+ chunk3NDRTC7T_js.downloadBlob(blob, `slide-${slideIndex + 1}.png`);
6715
6719
  }
6716
6720
  async function copySlideToClipboard(slideElement, options = {}) {
6717
6721
  const blob = await exportSlideToPngBlob(slideElement, options);
@@ -6733,15 +6737,15 @@ async function exportAllSlidesAsPdf(slideStageRef, totalSlides, setActiveSlide,
6733
6737
  continue;
6734
6738
  }
6735
6739
  const canvas = await renderElementToCanvas(stageEl, scale);
6736
- images.push(chunkP3Y3OMAD_js.canvasToJpegData(canvas));
6740
+ images.push(chunk3NDRTC7T_js.canvasToJpegData(canvas));
6737
6741
  }
6738
6742
  onProgress?.(totalSlides, totalSlides);
6739
6743
  setActiveSlide(currentSlideIndex);
6740
6744
  if (images.length === 0) {
6741
6745
  throw new Error(chunk3ISYPBSX_js.translationsEn["pptx.export.errorNoSlidesPdf"]);
6742
6746
  }
6743
- const pdfBlobUrl = chunkAX75ONFY_js.buildPdfFromImageData(images);
6744
- chunkP3Y3OMAD_js.downloadDataUrl(pdfBlobUrl, filename);
6747
+ const pdfBlobUrl = chunkIN7D2T4R_js.buildPdfFromImageData(images);
6748
+ chunk3NDRTC7T_js.downloadDataUrl(pdfBlobUrl, filename);
6745
6749
  }
6746
6750
  async function captureAllSlidesAsPngDataUrls(slideStageRef, totalSlides, setActiveSlide, currentSlideIndex, options = {}) {
6747
6751
  const { scale = 2, onProgress } = options;
@@ -6789,8 +6793,8 @@ async function exportAllSlidesAsNotesPdf(slideStageRef, totalSlides, setActiveSl
6789
6793
  if (pages.length === 0) {
6790
6794
  throw new Error(chunk3ISYPBSX_js.translationsEn["pptx.export.errorNoSlidesNotesPdf"]);
6791
6795
  }
6792
- const pdfDataUrl = chunkAX75ONFY_js.buildNotesPdf(pages);
6793
- chunkP3Y3OMAD_js.downloadDataUrl(pdfDataUrl, filename);
6796
+ const pdfDataUrl = chunkIN7D2T4R_js.buildNotesPdf(pages);
6797
+ chunk3NDRTC7T_js.downloadDataUrl(pdfDataUrl, filename);
6794
6798
  }
6795
6799
 
6796
6800
  // src/viewer/utils/export-video.ts
@@ -6834,7 +6838,7 @@ async function exportAllSlidesAsVideo(slideStageRef, totalSlides, setActiveSlide
6834
6838
  const fps = 30;
6835
6839
  const stream = recordingCanvas.captureStream(fps);
6836
6840
  const recorder = new MediaRecorder(stream, {
6837
- mimeType: chunkP3Y3OMAD_js.pickSupportedMimeType([...chunkP3Y3OMAD_js.WEBM_MIME_CANDIDATES]),
6841
+ mimeType: chunk3NDRTC7T_js.pickSupportedMimeType([...chunk3NDRTC7T_js.WEBM_MIME_CANDIDATES]),
6838
6842
  videoBitsPerSecond: 5e6
6839
6843
  });
6840
6844
  const chunks = [];
@@ -6857,8 +6861,8 @@ async function exportAllSlidesAsVideo(slideStageRef, totalSlides, setActiveSlide
6857
6861
  const duration = slideTimingsMs?.[i] ?? slideDurationMs;
6858
6862
  ctx.clearRect(0, 0, recordingCanvas.width, recordingCanvas.height);
6859
6863
  ctx.drawImage(slideCanvases[i], 0, 0);
6860
- const frameInterval = chunkP3Y3OMAD_js.fpsToFrameIntervalMs(fps);
6861
- const framesNeeded = chunkP3Y3OMAD_js.segmentFrameCount(duration, fps);
6864
+ const frameInterval = chunk3NDRTC7T_js.fpsToFrameIntervalMs(fps);
6865
+ const framesNeeded = chunk3NDRTC7T_js.segmentFrameCount(duration, fps);
6862
6866
  for (let f = 0; f < framesNeeded; f++) {
6863
6867
  if (signal?.aborted) {
6864
6868
  recorder.stop();
@@ -6907,7 +6911,7 @@ async function exportAllSlidesAsGif(slideStageRef, totalSlides, setActiveSlide,
6907
6911
  if (frames.length === 0) {
6908
6912
  throw new Error(chunk3ISYPBSX_js.translationsEn["pptx.export.errorNoSlidesGif"]);
6909
6913
  }
6910
- const gifBytes = chunkP3Y3OMAD_js.encodeGif(frames, Math.round(slideDurationMs / 10));
6914
+ const gifBytes = chunk3NDRTC7T_js.encodeGif(frames, Math.round(slideDurationMs / 10));
6911
6915
  onProgress?.(totalSlides, totalSlides);
6912
6916
  const buf = new ArrayBuffer(gifBytes.length);
6913
6917
  new Uint8Array(buf).set(gifBytes);
@@ -6961,7 +6965,7 @@ function exportAllSlidesToSvg(data, options = {}) {
6961
6965
  continue;
6962
6966
  }
6963
6967
  onProgress?.(processedCount, data.slides.length);
6964
- let svg = chunkP3Y3OMAD_js.SvgExporter.exportSlide(slide, data.width, data.height, svgOptions);
6968
+ let svg = chunk3NDRTC7T_js.SvgExporter.exportSlide(slide, data.width, data.height, svgOptions);
6965
6969
  if (embedFonts && fontFaces?.length) {
6966
6970
  svg = injectFontFaces(svg, fontFaces);
6967
6971
  }
@@ -7023,7 +7027,7 @@ function useExportSaveAs(input) {
7023
7027
  }
7024
7028
  setExportProgress(70);
7025
7029
  setExportStatusMessage("Writing README...");
7026
- const readme = chunkP3Y3OMAD_js.generatePackageReadme(pptxFilename);
7030
+ const readme = chunk3NDRTC7T_js.generatePackageReadme(pptxFilename);
7027
7031
  pkgFolder.file("README.txt", readme);
7028
7032
  if (abortCtrl.signal.aborted) {
7029
7033
  throw new DOMException("Export cancelled", "AbortError");
@@ -7034,7 +7038,7 @@ function useExportSaveAs(input) {
7034
7038
  setExportProgress(95);
7035
7039
  setExportStatusMessage("Downloading...");
7036
7040
  const baseName = pptxFilename.replace(/\.[^.]+$/u, "");
7037
- chunkP3Y3OMAD_js.downloadBlob(zipBlob, `${baseName}-package.zip`);
7041
+ chunk3NDRTC7T_js.downloadBlob(zipBlob, `${baseName}-package.zip`);
7038
7042
  setExportProgress(100);
7039
7043
  } catch (err) {
7040
7044
  if (err.name !== "AbortError") {
@@ -7057,7 +7061,7 @@ function useExportSaveAs(input) {
7057
7061
  const blob = new Blob([data], {
7058
7062
  type: "application/vnd.openxmlformats-officedocument.presentationml.presentation"
7059
7063
  });
7060
- chunkP3Y3OMAD_js.downloadBlob(blob, `${baseName}.${ext}`);
7064
+ chunk3NDRTC7T_js.downloadBlob(blob, `${baseName}.${ext}`);
7061
7065
  } catch (err) {
7062
7066
  console.error(`[PowerPointViewer] Save as .${ext} failed:`, err);
7063
7067
  }
@@ -7070,14 +7074,14 @@ function useExportSaveAs(input) {
7070
7074
  const pptxGuides = guides.map((g) => ({
7071
7075
  id: g.id,
7072
7076
  orientation: g.axis === "h" ? "horz" : "vert",
7073
- positionEmu: chunkP3Y3OMAD_js.guidePxToEmu(g.position)
7077
+ positionEmu: chunk3NDRTC7T_js.guidePxToEmu(g.position)
7074
7078
  }));
7075
7079
  return {
7076
7080
  ...slide,
7077
7081
  guides: pptxGuides.length > 0 ? pptxGuides : void 0
7078
7082
  };
7079
7083
  });
7080
- const slidesToSave = chunkAX75ONFY_js.buildSaveSlides(slidesWithGuides, templateElementsBySlideId);
7084
+ const slidesToSave = chunkIN7D2T4R_js.buildSaveSlides(slidesWithGuides, templateElementsBySlideId);
7081
7085
  const saveOptions = {
7082
7086
  headerFooter,
7083
7087
  presentationProperties,
@@ -7103,11 +7107,11 @@ function useExportSaveAs(input) {
7103
7107
  const handleExportJson = () => {
7104
7108
  const sourceName = filePath ? filePath.replace(/\\/gu, "/").split("/").pop() : void 0;
7105
7109
  const data = {
7106
- slides: chunkAX75ONFY_js.buildSaveSlides(slides, templateElementsBySlideId),
7110
+ slides: chunkIN7D2T4R_js.buildSaveSlides(slides, templateElementsBySlideId),
7107
7111
  width: canvasSize.width,
7108
7112
  height: canvasSize.height,
7109
- widthEmu: chunkP3Y3OMAD_js.guidePxToEmu(canvasSize.width),
7110
- heightEmu: chunkP3Y3OMAD_js.guidePxToEmu(canvasSize.height),
7113
+ widthEmu: chunk3NDRTC7T_js.guidePxToEmu(canvasSize.width),
7114
+ heightEmu: chunk3NDRTC7T_js.guidePxToEmu(canvasSize.height),
7111
7115
  theme,
7112
7116
  headerFooter,
7113
7117
  presentationProperties,
@@ -7121,7 +7125,7 @@ function useExportSaveAs(input) {
7121
7125
  handoutMaster
7122
7126
  };
7123
7127
  try {
7124
- chunkP3Y3OMAD_js.exportDeckJson(data, sourceName);
7128
+ chunk3NDRTC7T_js.exportDeckJson(data, sourceName);
7125
7129
  } catch (err) {
7126
7130
  console.error("[PowerPointViewer] JSON export failed:", err);
7127
7131
  }
@@ -7161,7 +7165,7 @@ function safeConfirm(message) {
7161
7165
  }
7162
7166
  }
7163
7167
  function downloadBlob2(blob, filename) {
7164
- chunkP3Y3OMAD_js.downloadBlob(blob, chunkP3Y3OMAD_js.sanitizeDownloadFilename(filename));
7168
+ chunk3NDRTC7T_js.downloadBlob(blob, chunk3NDRTC7T_js.sanitizeDownloadFilename(filename));
7165
7169
  }
7166
7170
 
7167
7171
  // src/viewer/hooks/useExportHandlers.ts
@@ -7267,21 +7271,21 @@ function useExportHandlers(input) {
7267
7271
  {
7268
7272
  scale: 2,
7269
7273
  onProgress: (current, total) => {
7270
- setExportProgress(chunkP3Y3OMAD_js.slideProgressPercent(current, total));
7271
- setExportStatusMessage(chunkP3Y3OMAD_js.slideStatusLabel("Rendering", current, total));
7274
+ setExportProgress(chunk3NDRTC7T_js.slideProgressPercent(current, total));
7275
+ setExportStatusMessage(chunk3NDRTC7T_js.slideStatusLabel("Rendering", current, total));
7272
7276
  },
7273
7277
  signal: abortCtrl.signal
7274
7278
  }
7275
7279
  );
7276
- setExportProgress(chunkP3Y3OMAD_js.EXPORT_ASSEMBLING_PERCENT);
7280
+ setExportProgress(chunk3NDRTC7T_js.EXPORT_ASSEMBLING_PERCENT);
7277
7281
  setExportStatusMessage("Building PDF...");
7278
7282
  await new Promise((r) => {
7279
7283
  setTimeout(r, 100);
7280
7284
  });
7281
- setExportProgress(chunkP3Y3OMAD_js.EXPORT_DONE_PERCENT);
7285
+ setExportProgress(chunk3NDRTC7T_js.EXPORT_DONE_PERCENT);
7282
7286
  setExportStatusMessage("Done!");
7283
7287
  } catch (err) {
7284
- if (!chunkP3Y3OMAD_js.isExportAbortError(err)) {
7288
+ if (!chunk3NDRTC7T_js.isExportAbortError(err)) {
7285
7289
  console.error("[PowerPointViewer] PDF export failed:", err);
7286
7290
  }
7287
7291
  } finally {
@@ -7311,21 +7315,21 @@ function useExportHandlers(input) {
7311
7315
  {
7312
7316
  scale: 2,
7313
7317
  onProgress: (current, total) => {
7314
- setExportProgress(chunkP3Y3OMAD_js.slideProgressPercent(current, total));
7315
- setExportStatusMessage(chunkP3Y3OMAD_js.slideStatusLabel("Rendering", current, total));
7318
+ setExportProgress(chunk3NDRTC7T_js.slideProgressPercent(current, total));
7319
+ setExportStatusMessage(chunk3NDRTC7T_js.slideStatusLabel("Rendering", current, total));
7316
7320
  },
7317
7321
  signal: abortCtrl.signal
7318
7322
  }
7319
7323
  );
7320
- setExportProgress(chunkP3Y3OMAD_js.EXPORT_ASSEMBLING_PERCENT);
7324
+ setExportProgress(chunk3NDRTC7T_js.EXPORT_ASSEMBLING_PERCENT);
7321
7325
  setExportStatusMessage("Building PDF...");
7322
7326
  await new Promise((r) => {
7323
7327
  setTimeout(r, 100);
7324
7328
  });
7325
- setExportProgress(chunkP3Y3OMAD_js.EXPORT_DONE_PERCENT);
7329
+ setExportProgress(chunk3NDRTC7T_js.EXPORT_DONE_PERCENT);
7326
7330
  setExportStatusMessage("Done!");
7327
7331
  } catch (err) {
7328
- if (!chunkP3Y3OMAD_js.isExportAbortError(err)) {
7332
+ if (!chunk3NDRTC7T_js.isExportAbortError(err)) {
7329
7333
  console.error("[PowerPointViewer] Notes PDF export failed:", err);
7330
7334
  }
7331
7335
  } finally {
@@ -7366,22 +7370,22 @@ function useExportHandlers(input) {
7366
7370
  scale: 1,
7367
7371
  slideDurationMs: 3e3,
7368
7372
  onProgress: (current, total) => {
7369
- setExportProgress(chunkP3Y3OMAD_js.slideProgressPercent(current, total, 45));
7370
- setExportStatusMessage(chunkP3Y3OMAD_js.slideStatusLabel("Capturing", current, total));
7373
+ setExportProgress(chunk3NDRTC7T_js.slideProgressPercent(current, total, 45));
7374
+ setExportStatusMessage(chunk3NDRTC7T_js.slideStatusLabel("Capturing", current, total));
7371
7375
  },
7372
7376
  onRecordProgress: (current, total) => {
7373
- setExportProgress(chunkP3Y3OMAD_js.recordProgressPercent(current, total));
7374
- setExportStatusMessage(chunkP3Y3OMAD_js.slideStatusLabel("Recording", current, total));
7377
+ setExportProgress(chunk3NDRTC7T_js.recordProgressPercent(current, total));
7378
+ setExportStatusMessage(chunk3NDRTC7T_js.slideStatusLabel("Recording", current, total));
7375
7379
  },
7376
7380
  signal: abortCtrl.signal
7377
7381
  }
7378
7382
  );
7379
- setExportProgress(chunkP3Y3OMAD_js.EXPORT_ASSEMBLING_PERCENT);
7383
+ setExportProgress(chunk3NDRTC7T_js.EXPORT_ASSEMBLING_PERCENT);
7380
7384
  setExportStatusMessage("Saving file...");
7381
7385
  downloadBlob2(blob, "presentation.webm");
7382
- setExportProgress(chunkP3Y3OMAD_js.EXPORT_DONE_PERCENT);
7386
+ setExportProgress(chunk3NDRTC7T_js.EXPORT_DONE_PERCENT);
7383
7387
  } catch (err) {
7384
- if (!chunkP3Y3OMAD_js.isExportAbortError(err)) {
7388
+ if (!chunk3NDRTC7T_js.isExportAbortError(err)) {
7385
7389
  console.error("[PowerPointViewer] Video export failed:", err);
7386
7390
  }
7387
7391
  } finally {
@@ -7409,18 +7413,18 @@ function useExportHandlers(input) {
7409
7413
  scale: 0.5,
7410
7414
  slideDurationMs: 2e3,
7411
7415
  onProgress: (current, total) => {
7412
- setExportProgress(chunkP3Y3OMAD_js.slideProgressPercent(current, total));
7413
- setExportStatusMessage(chunkP3Y3OMAD_js.slideStatusLabel("Encoding", current, total));
7416
+ setExportProgress(chunk3NDRTC7T_js.slideProgressPercent(current, total));
7417
+ setExportStatusMessage(chunk3NDRTC7T_js.slideStatusLabel("Encoding", current, total));
7414
7418
  },
7415
7419
  signal: abortCtrl.signal
7416
7420
  }
7417
7421
  );
7418
- setExportProgress(chunkP3Y3OMAD_js.EXPORT_ASSEMBLING_PERCENT);
7422
+ setExportProgress(chunk3NDRTC7T_js.EXPORT_ASSEMBLING_PERCENT);
7419
7423
  setExportStatusMessage("Saving file...");
7420
7424
  downloadBlob2(blob, "presentation.gif");
7421
- setExportProgress(chunkP3Y3OMAD_js.EXPORT_DONE_PERCENT);
7425
+ setExportProgress(chunk3NDRTC7T_js.EXPORT_DONE_PERCENT);
7422
7426
  } catch (err) {
7423
- if (!chunkP3Y3OMAD_js.isExportAbortError(err)) {
7427
+ if (!chunk3NDRTC7T_js.isExportAbortError(err)) {
7424
7428
  console.error("[PowerPointViewer] GIF export failed:", err);
7425
7429
  }
7426
7430
  } finally {
@@ -7461,7 +7465,7 @@ function openPrintWindow(title, bodyHtml, orientation, colorFilter, frameSlides)
7461
7465
  }
7462
7466
  printWindow.document.open();
7463
7467
  printWindow.document.write(
7464
- chunkP3Y3OMAD_js.buildPrintHtmlDocument({ title, bodyHtml, orientation, colorFilter, frameSlides })
7468
+ chunk3NDRTC7T_js.buildPrintHtmlDocument({ title, bodyHtml, orientation, colorFilter, frameSlides })
7465
7469
  );
7466
7470
  printWindow.document.close();
7467
7471
  printWindow.focus();
@@ -7522,7 +7526,7 @@ function usePrintHandlers(input) {
7522
7526
  if (svgs.length === 0) {
7523
7527
  return;
7524
7528
  }
7525
- const printDoc = chunkP3Y3OMAD_js.buildPrintDocument(svgs, pptxData.width, pptxData.height, {
7529
+ const printDoc = chunk3NDRTC7T_js.buildPrintDocument(svgs, pptxData.width, pptxData.height, {
7526
7530
  title: "Slides (Vector)",
7527
7531
  orientation: settings.orientation,
7528
7532
  colorFilter
@@ -7558,7 +7562,7 @@ function usePrintHandlers(input) {
7558
7562
  if (settings.printWhat === "outline") {
7559
7563
  openPrintWindow(
7560
7564
  "Outline",
7561
- `<div class="outline-page">${chunkP3Y3OMAD_js.buildOutlineHtml(slideIndices, slides)}</div>`,
7565
+ `<div class="outline-page">${chunk3NDRTC7T_js.buildOutlineHtml(slideIndices, slides)}</div>`,
7562
7566
  settings.orientation,
7563
7567
  colorFilter,
7564
7568
  settings.frameSlides
@@ -7583,7 +7587,7 @@ function usePrintHandlers(input) {
7583
7587
  if (settings.printWhat === "slides") {
7584
7588
  openPrintWindow(
7585
7589
  "Slides",
7586
- chunkP3Y3OMAD_js.buildSlidesHtml(slideImages, slideIndices),
7590
+ chunk3NDRTC7T_js.buildSlidesHtml(slideImages, slideIndices),
7587
7591
  settings.orientation,
7588
7592
  colorFilter,
7589
7593
  settings.frameSlides
@@ -7593,7 +7597,7 @@ function usePrintHandlers(input) {
7593
7597
  if (settings.printWhat === "notes") {
7594
7598
  openPrintWindow(
7595
7599
  "Notes Pages",
7596
- chunkP3Y3OMAD_js.buildNotesHtml(slideImages, slideIndices, slides),
7600
+ chunk3NDRTC7T_js.buildNotesHtml(slideImages, slideIndices, slides),
7597
7601
  "portrait",
7598
7602
  colorFilter,
7599
7603
  settings.frameSlides
@@ -7604,7 +7608,7 @@ function usePrintHandlers(input) {
7604
7608
  const spp = settings.slidesPerPage;
7605
7609
  openPrintWindow(
7606
7610
  `Handout ${spp} per page`,
7607
- chunkP3Y3OMAD_js.buildHandoutsHtml(slideImages, slideIndices, spp),
7611
+ chunk3NDRTC7T_js.buildHandoutsHtml(slideImages, slideIndices, spp),
7608
7612
  "portrait",
7609
7613
  colorFilter,
7610
7614
  settings.frameSlides
@@ -7668,8 +7672,8 @@ function useThemeHandlers(input) {
7668
7672
  return;
7669
7673
  }
7670
7674
  await handler.updateThemeColorScheme(colorScheme);
7671
- const previousMap = theme?.colorScheme ? chunkP3Y3OMAD_js.buildThemeColorMap(theme.colorScheme) : {};
7672
- setSlides((prev) => chunkP3Y3OMAD_js.reResolveSlideColors(prev, previousMap, colorScheme));
7675
+ const previousMap = theme?.colorScheme ? chunk3NDRTC7T_js.buildThemeColorMap(theme.colorScheme) : {};
7676
+ setSlides((prev) => chunk3NDRTC7T_js.reResolveSlideColors(prev, previousMap, colorScheme));
7673
7677
  setTheme((prev) => prev ? { ...prev, colorScheme } : { colorScheme });
7674
7678
  bumpHistory();
7675
7679
  history.markDirty();
@@ -7774,7 +7778,7 @@ function useThemeSwitching(input) {
7774
7778
  }
7775
7779
  try {
7776
7780
  await handler.applyTheme(preset.colorScheme, preset.fontScheme, preset.name);
7777
- const newData = chunkP3Y3OMAD_js.applyThemeToData(data, preset.colorScheme, preset.fontScheme, preset.name);
7781
+ const newData = chunk3NDRTC7T_js.applyThemeToData(data, preset.colorScheme, preset.fontScheme, preset.name);
7778
7782
  onDataChange(newData);
7779
7783
  onThemeChanged?.(preset);
7780
7784
  } catch (error) {
@@ -7791,7 +7795,7 @@ function useThemeSwitching(input) {
7791
7795
  }
7792
7796
  try {
7793
7797
  await handler.applyTheme(colorScheme, fontScheme ?? {}, themeName);
7794
- const newData = chunkP3Y3OMAD_js.applyThemeToData(data, colorScheme, fontScheme, themeName);
7798
+ const newData = chunk3NDRTC7T_js.applyThemeToData(data, colorScheme, fontScheme, themeName);
7795
7799
  onDataChange(newData);
7796
7800
  } catch (error) {
7797
7801
  console.error("Failed to switch to custom theme:", error);
@@ -7803,12 +7807,12 @@ function useThemeSwitching(input) {
7803
7807
  if (!data?.theme?.colorScheme) {
7804
7808
  return void 0;
7805
7809
  }
7806
- return chunkP3Y3OMAD_js.THEME_PRESETS.find(
7807
- (p) => chunkP3Y3OMAD_js.themeColorSchemesEqual(data.theme?.colorScheme, p.colorScheme)
7810
+ return chunk3NDRTC7T_js.THEME_PRESETS.find(
7811
+ (p) => chunk3NDRTC7T_js.themeColorSchemesEqual(data.theme?.colorScheme, p.colorScheme)
7808
7812
  );
7809
7813
  }, [data?.theme?.colorScheme]);
7810
7814
  return {
7811
- presets: chunkP3Y3OMAD_js.THEME_PRESETS,
7815
+ presets: chunk3NDRTC7T_js.THEME_PRESETS,
7812
7816
  switchToPreset,
7813
7817
  switchToCustom,
7814
7818
  currentPreset
@@ -7883,7 +7887,7 @@ function usePropertyHandlers(input) {
7883
7887
  }
7884
7888
  try {
7885
7889
  const ab = await file.arrayBuffer();
7886
- const h = new chunkP3Y3OMAD_js.PptxHandler();
7890
+ const h = new chunk3NDRTC7T_js.PptxHandler();
7887
7891
  const other = await h.load(ab);
7888
7892
  if (!other) {
7889
7893
  return;
@@ -7893,7 +7897,7 @@ function usePropertyHandlers(input) {
7893
7897
  width: canvasSize.width,
7894
7898
  height: canvasSize.height
7895
7899
  };
7896
- setCompareResult(chunkP3Y3OMAD_js.comparePresentation(cur, other));
7900
+ setCompareResult(chunk3NDRTC7T_js.comparePresentation(cur, other));
7897
7901
  setIsComparePanelOpen(true);
7898
7902
  } catch (err) {
7899
7903
  console.warn("Compare failed:", err);
@@ -7910,7 +7914,7 @@ function usePropertyHandlers(input) {
7910
7914
  if (!diff || diff.status === "unchanged") {
7911
7915
  return;
7912
7916
  }
7913
- setSlides((prev) => chunkP3Y3OMAD_js.applyAcceptSlide(prev, diff));
7917
+ setSlides((prev) => chunk3NDRTC7T_js.applyAcceptSlide(prev, diff));
7914
7918
  setIsDirty(true);
7915
7919
  },
7916
7920
  [compareResult, setSlides, setIsDirty]
@@ -7921,10 +7925,10 @@ function usePropertyHandlers(input) {
7921
7925
  if (!compareResult) {
7922
7926
  return;
7923
7927
  }
7924
- setSlides((prev) => chunkP3Y3OMAD_js.applyAcceptAllSlides(prev, compareResult));
7928
+ setSlides((prev) => chunk3NDRTC7T_js.applyAcceptAllSlides(prev, compareResult));
7925
7929
  setIsDirty(true);
7926
7930
  }, [compareResult, setSlides, setIsDirty]);
7927
- const usedFontFamilies = react.useMemo(() => chunkP3Y3OMAD_js.collectUsedFonts(slides), [slides]);
7931
+ const usedFontFamilies = react.useMemo(() => chunk3NDRTC7T_js.collectUsedFonts(slides), [slides]);
7928
7932
  return {
7929
7933
  handleUpdateNotes,
7930
7934
  handleUpdateSlide,
@@ -8043,7 +8047,7 @@ function useIsMobile(input) {
8043
8047
  const containerRef = input?.containerRef;
8044
8048
  const isTouchDevice = react.useSyncExternalStore(
8045
8049
  subscribeTouchCapability,
8046
- chunkP3Y3OMAD_js.detectTouchDevice,
8050
+ chunk3NDRTC7T_js.detectTouchDevice,
8047
8051
  () => false
8048
8052
  // server snapshot
8049
8053
  );
@@ -8059,7 +8063,7 @@ function useIsMobile(input) {
8059
8063
  }
8060
8064
  return containerRef?.current?.clientHeight ?? window.innerHeight;
8061
8065
  });
8062
- const [orientation, setOrientation] = react.useState(chunkP3Y3OMAD_js.detectOrientation);
8066
+ const [orientation, setOrientation] = react.useState(chunk3NDRTC7T_js.detectOrientation);
8063
8067
  const [isVirtualKeyboardOpen, setIsVirtualKeyboardOpen] = react.useState(false);
8064
8068
  const [initialViewportHeight] = react.useState(
8065
8069
  () => typeof window !== "undefined" ? window.innerHeight : 800
@@ -8103,7 +8107,7 @@ function useIsMobile(input) {
8103
8107
  return;
8104
8108
  }
8105
8109
  const handleOrientationChange = () => {
8106
- setOrientation(chunkP3Y3OMAD_js.detectOrientation());
8110
+ setOrientation(chunk3NDRTC7T_js.detectOrientation());
8107
8111
  };
8108
8112
  if (screen.orientation) {
8109
8113
  screen.orientation.addEventListener("change", handleOrientationChange);
@@ -8133,9 +8137,9 @@ function useIsMobile(input) {
8133
8137
  window.addEventListener("resize", handleResize);
8134
8138
  return () => window.removeEventListener("resize", handleResize);
8135
8139
  }, [isTouchDevice, initialViewportHeight]);
8136
- const isMobile = chunkP3Y3OMAD_js.isMobileViewport(containerWidth, containerHeight, isTouchDevice);
8137
- const isTablet = !isMobile && containerWidth >= chunkP3Y3OMAD_js.MOBILE_BREAKPOINT && containerWidth < chunkP3Y3OMAD_js.TABLET_BREAKPOINT;
8138
- const isDesktop = !isMobile && containerWidth >= chunkP3Y3OMAD_js.TABLET_BREAKPOINT;
8140
+ const isMobile = chunk3NDRTC7T_js.isMobileViewport(containerWidth, containerHeight, isTouchDevice);
8141
+ const isTablet = !isMobile && containerWidth >= chunk3NDRTC7T_js.MOBILE_BREAKPOINT && containerWidth < chunk3NDRTC7T_js.TABLET_BREAKPOINT;
8142
+ const isDesktop = !isMobile && containerWidth >= chunk3NDRTC7T_js.TABLET_BREAKPOINT;
8139
8143
  return {
8140
8144
  isMobile,
8141
8145
  isTablet,
@@ -8196,11 +8200,11 @@ function useViewerDialogs(input) {
8196
8200
  );
8197
8201
  const [embedFontsEnabled, setEmbedFontsEnabled] = react.useState(false);
8198
8202
  const [isNarrowViewport, setIsNarrowViewport] = react.useState(
8199
- () => typeof window !== "undefined" ? chunkP3Y3OMAD_js.isMobileViewport(window.innerWidth, window.innerHeight, viewportIsTouch()) : false
8203
+ () => typeof window !== "undefined" ? chunk3NDRTC7T_js.isMobileViewport(window.innerWidth, window.innerHeight, viewportIsTouch()) : false
8200
8204
  );
8201
8205
  react.useEffect(() => {
8202
8206
  const handleWindow = () => setIsNarrowViewport(
8203
- chunkP3Y3OMAD_js.isMobileViewport(window.innerWidth, window.innerHeight, viewportIsTouch())
8207
+ chunk3NDRTC7T_js.isMobileViewport(window.innerWidth, window.innerHeight, viewportIsTouch())
8204
8208
  );
8205
8209
  let observer = null;
8206
8210
  let raf = 0;
@@ -8214,12 +8218,12 @@ function useViewerDialogs(input) {
8214
8218
  const entry = entries[0];
8215
8219
  if (entry) {
8216
8220
  setIsNarrowViewport(
8217
- chunkP3Y3OMAD_js.isMobileViewport(entry.contentRect.width, entry.contentRect.height, viewportIsTouch())
8221
+ chunk3NDRTC7T_js.isMobileViewport(entry.contentRect.width, entry.contentRect.height, viewportIsTouch())
8218
8222
  );
8219
8223
  }
8220
8224
  });
8221
8225
  observer.observe(el);
8222
- setIsNarrowViewport(chunkP3Y3OMAD_js.isMobileViewport(el.clientWidth, el.clientHeight, viewportIsTouch()));
8226
+ setIsNarrowViewport(chunk3NDRTC7T_js.isMobileViewport(el.clientWidth, el.clientHeight, viewportIsTouch()));
8223
8227
  };
8224
8228
  attach();
8225
8229
  window.addEventListener("resize", handleWindow);
@@ -8377,20 +8381,20 @@ function useViewerDialogs(input) {
8377
8381
  }
8378
8382
  function computeGridSpacingPx(presentationGridSpacing) {
8379
8383
  if (presentationGridSpacing) {
8380
- const px = Math.round(presentationGridSpacing.cx / chunkAX75ONFY_js.EMU_PER_PX);
8384
+ const px = Math.round(presentationGridSpacing.cx / chunkIN7D2T4R_js.EMU_PER_PX);
8381
8385
  if (px > 0) {
8382
8386
  return px;
8383
8387
  }
8384
8388
  }
8385
- return chunkAX75ONFY_js.GRID_SIZE;
8389
+ return chunkIN7D2T4R_js.GRID_SIZE;
8386
8390
  }
8387
8391
  function computeVisibleSlideIndexes(slides, activeCustomShowId, customShows) {
8388
8392
  const activeShow = activeCustomShowId ? customShows.find((show) => show.id === activeCustomShowId) : void 0;
8389
- return chunkP3Y3OMAD_js.resolveShowSlideIndexes(slides, activeShow);
8393
+ return chunk3NDRTC7T_js.resolveShowSlideIndexes(slides, activeShow);
8390
8394
  }
8391
8395
  function computeSlideSectionGroups(slides, sections) {
8392
- return chunkP3Y3OMAD_js.groupSlidesBySection(sections, slides).map((group) => ({
8393
- id: group.section?.id ?? (sections.length > 0 ? chunkAX75ONFY_js.UNGROUPED_SECTION_ID : "default"),
8396
+ return chunk3NDRTC7T_js.groupSlidesBySection(sections, slides).map((group) => ({
8397
+ id: group.section?.id ?? (sections.length > 0 ? chunkIN7D2T4R_js.UNGROUPED_SECTION_ID : "default"),
8394
8398
  label: group.section?.name ?? (sections.length > 0 ? "Ungrouped Slides" : "Slides"),
8395
8399
  slideIndexes: group.slideIndexes,
8396
8400
  ...group.section?.color !== void 0 ? { color: group.section.color } : {},
@@ -8445,7 +8449,7 @@ function useDerivedSlideState(input) {
8445
8449
  );
8446
8450
  const slideSectionGroups = react.useMemo(
8447
8451
  () => computeSlideSectionGroups(slides, sections).map((group) => {
8448
- if (group.id === chunkAX75ONFY_js.UNGROUPED_SECTION_ID && group.label === "Ungrouped Slides") {
8452
+ if (group.id === chunkIN7D2T4R_js.UNGROUPED_SECTION_ID && group.label === "Ungrouped Slides") {
8449
8453
  return { ...group, label: t("pptx.slides.ungroupedSlides") };
8450
8454
  }
8451
8455
  if (group.id === "default" && group.label === "Slides") {
@@ -8548,13 +8552,13 @@ function useAnnotationHandlers(input) {
8548
8552
  }, [annotations, setMode, setSlides, history]);
8549
8553
  const handleSetMode = react.useCallback(
8550
8554
  (nextMode) => {
8551
- if (mode === "present" && nextMode !== "present" && !chunkP3Y3OMAD_js.mayLeaveSlideShow()) {
8555
+ if (mode === "present" && nextMode !== "present" && !chunk3NDRTC7T_js.mayLeaveSlideShow()) {
8552
8556
  return;
8553
8557
  }
8554
8558
  if (nextMode === "present") {
8555
8559
  presentation.enterPresentMode();
8556
8560
  } else if (mode === "present" && annotations.hasAnyAnnotations) {
8557
- chunkP3Y3OMAD_js.stopAllPersistentAudio();
8561
+ chunk3NDRTC7T_js.stopAllPersistentAudio();
8558
8562
  pendingModeAfterAnnotationsRef.current = nextMode;
8559
8563
  if (promptKeepInkAnnotations) {
8560
8564
  setShowKeepAnnotationsDialog(true);
@@ -8563,7 +8567,7 @@ function useAnnotationHandlers(input) {
8563
8567
  }
8564
8568
  } else {
8565
8569
  if (mode === "present") {
8566
- chunkP3Y3OMAD_js.stopAllPersistentAudio();
8570
+ chunk3NDRTC7T_js.stopAllPersistentAudio();
8567
8571
  }
8568
8572
  setMode(nextMode);
8569
8573
  }
@@ -8629,13 +8633,13 @@ function useSerialize(input) {
8629
8633
  let processedSlide = slide;
8630
8634
  if (pendingEditId) {
8631
8635
  const updatedElements = slide.elements.map((el) => {
8632
- if (el.id !== pendingEditId || !chunkP3Y3OMAD_js.hasTextProperties(el)) {
8636
+ if (el.id !== pendingEditId || !chunk3NDRTC7T_js.hasTextProperties(el)) {
8633
8637
  return el;
8634
8638
  }
8635
8639
  return {
8636
8640
  ...el,
8637
8641
  text: pendingEditText,
8638
- textSegments: chunkP3Y3OMAD_js.remapTextToSegments(pendingEditText, el.textSegments, el.textStyle)
8642
+ textSegments: chunk3NDRTC7T_js.remapTextToSegments(pendingEditText, el.textSegments, el.textStyle)
8639
8643
  };
8640
8644
  });
8641
8645
  if (updatedElements.some((el, i) => el !== slide.elements[i])) {
@@ -8648,14 +8652,14 @@ function useSerialize(input) {
8648
8652
  const pptxGuides = guides.map((g) => ({
8649
8653
  id: g.id,
8650
8654
  orientation: g.axis === "h" ? "horz" : "vert",
8651
- positionEmu: chunkP3Y3OMAD_js.guidePxToEmu(g.position)
8655
+ positionEmu: chunk3NDRTC7T_js.guidePxToEmu(g.position)
8652
8656
  }));
8653
8657
  return {
8654
8658
  ...processedSlide,
8655
8659
  guides: pptxGuides.length > 0 ? pptxGuides : void 0
8656
8660
  };
8657
8661
  });
8658
- const slidesToSave = chunkAX75ONFY_js.buildSaveSlides(slidesWithGuides, templateElementsBySlideId);
8662
+ const slidesToSave = chunkIN7D2T4R_js.buildSaveSlides(slidesWithGuides, templateElementsBySlideId);
8659
8663
  const saveOptions = {
8660
8664
  headerFooter,
8661
8665
  presentationProperties,
@@ -8824,7 +8828,7 @@ function usePresentationSetup(input) {
8824
8828
  containerRef,
8825
8829
  content,
8826
8830
  onSetMode: (nextMode) => {
8827
- if (mode === "present" && nextMode !== "present" && !chunkP3Y3OMAD_js.mayLeaveSlideShow()) {
8831
+ if (mode === "present" && nextMode !== "present" && !chunk3NDRTC7T_js.mayLeaveSlideShow()) {
8828
8832
  return;
8829
8833
  }
8830
8834
  if (mode === "present" && nextMode !== "present" && annotations.hasAnyAnnotations && promptKeepInkAnnotations) {
@@ -8832,7 +8836,7 @@ function usePresentationSetup(input) {
8832
8836
  setShowKeepAnnotationsDialog(true);
8833
8837
  } else {
8834
8838
  if (mode === "present" && nextMode !== "present") {
8835
- chunkP3Y3OMAD_js.stopAllPersistentAudio();
8839
+ chunk3NDRTC7T_js.stopAllPersistentAudio();
8836
8840
  stopAnimationSound();
8837
8841
  }
8838
8842
  setMode(nextMode);
@@ -8886,10 +8890,10 @@ function usePresentationSetup(input) {
8886
8890
  onToggleInkMarkup: () => annotations.setInkMarkupVisible(!annotations.inkMarkupVisible),
8887
8891
  onToggleToolbar: () => annotations.setToolbarVisible(!annotations.toolbarVisible),
8888
8892
  onSaveRehearsalTimings: (timings) => {
8889
- setSlides((prev) => chunkP3Y3OMAD_js.applyRehearsalTimings(prev, timings));
8893
+ setSlides((prev) => chunk3NDRTC7T_js.applyRehearsalTimings(prev, timings));
8890
8894
  history.markDirty();
8891
8895
  },
8892
- loopContinuously: chunkP3Y3OMAD_js.shouldLoopContinuously(presentationProperties),
8896
+ loopContinuously: chunk3NDRTC7T_js.shouldLoopContinuously(presentationProperties),
8893
8897
  showWithAnimation: presentationProperties.showWithAnimation,
8894
8898
  useTimings: presentationProperties.advanceMode !== "manual",
8895
8899
  endWithBlackSlide
@@ -9053,7 +9057,7 @@ function useEditorOperations(input) {
9053
9057
  const { formatPainterActive, setFormatPainterActive, elementLookup } = state;
9054
9058
  react.useEffect(() => {
9055
9059
  if (formatPainterActive && !prevFormatPainterRef.current && selectedElement) {
9056
- copiedFormatRef.current = chunkP3Y3OMAD_js.copyFormatFromElement(selectedElement);
9060
+ copiedFormatRef.current = chunk3NDRTC7T_js.copyFormatFromElement(selectedElement);
9057
9061
  } else if (!formatPainterActive) {
9058
9062
  copiedFormatRef.current = null;
9059
9063
  }
@@ -9079,12 +9083,12 @@ function useEditorOperations(input) {
9079
9083
  e.stopPropagation();
9080
9084
  const element = elementLookup.get(elementId);
9081
9085
  if (element) {
9082
- const updated = chunkP3Y3OMAD_js.applyFormatToElement(element, copiedFormatRef.current);
9086
+ const updated = chunk3NDRTC7T_js.applyFormatToElement(element, copiedFormatRef.current);
9083
9087
  const updates = {};
9084
- if (chunkP3Y3OMAD_js.hasShapeProperties(updated)) {
9088
+ if (chunk3NDRTC7T_js.hasShapeProperties(updated)) {
9085
9089
  updates.shapeStyle = updated.shapeStyle;
9086
9090
  }
9087
- if (chunkP3Y3OMAD_js.hasTextProperties(updated)) {
9091
+ if (chunk3NDRTC7T_js.hasTextProperties(updated)) {
9088
9092
  updates.textStyle = updated.textStyle;
9089
9093
  }
9090
9094
  ops.updateElementById(elementId, updates);
@@ -9233,7 +9237,7 @@ function collectReferencedFontFamilies(slides) {
9233
9237
  const families = /* @__PURE__ */ new Set();
9234
9238
  for (const slide of slides) {
9235
9239
  for (const el of slide.elements) {
9236
- if (chunkP3Y3OMAD_js.hasTextProperties(el) && el.textSegments) {
9240
+ if (chunk3NDRTC7T_js.hasTextProperties(el) && el.textSegments) {
9237
9241
  for (const seg of el.textSegments) {
9238
9242
  if (seg.style.fontFamily) {
9239
9243
  families.add(seg.style.fontFamily);
@@ -9445,13 +9449,13 @@ function useKeyboardShortcuts(input) {
9445
9449
  inputRef.current = input;
9446
9450
  const handleKeyDown = react.useCallback((e) => {
9447
9451
  const current = inputRef.current;
9448
- const { action, dx, dy } = chunkP3Y3OMAD_js.mapEditorKey(e, {
9452
+ const { action, dx, dy } = chunk3NDRTC7T_js.mapEditorKey(e, {
9449
9453
  canEdit: current.canEdit,
9450
9454
  isPresenting: current.mode !== "edit",
9451
9455
  hasSelection: current.hasSelection,
9452
9456
  isEditingText: Boolean(current.inlineEditingElementId || current.tableEditorState?.isEditing),
9453
9457
  isDrawing: current.activeTool !== "select",
9454
- isTextInputTarget: chunkP3Y3OMAD_js.isEditorTextInputTarget(e.target)
9458
+ isTextInputTarget: chunk3NDRTC7T_js.isEditorTextInputTarget(e.target)
9455
9459
  });
9456
9460
  if (action === null) {
9457
9461
  return;
@@ -9744,7 +9748,7 @@ function useViewerIntegration(input) {
9744
9748
  return zoom.scale;
9745
9749
  },
9746
9750
  setZoom(level) {
9747
- zoom.setScale(chunkP3Y3OMAD_js.clampZoomScale(level));
9751
+ zoom.setScale(chunk3NDRTC7T_js.clampZoomScale(level));
9748
9752
  },
9749
9753
  zoomIn() {
9750
9754
  zoom.handleZoomIn();
@@ -9959,7 +9963,7 @@ function useReducedMotion() {
9959
9963
  }
9960
9964
  function useViewerOptions() {
9961
9965
  const storeRef = react.useRef(null);
9962
- storeRef.current ??= chunkP3Y3OMAD_js.createViewerOptionsStore();
9966
+ storeRef.current ??= chunk3NDRTC7T_js.createViewerOptionsStore();
9963
9967
  const store = storeRef.current;
9964
9968
  const options = react.useSyncExternalStore(
9965
9969
  (onStoreChange) => store.subscribe(onStoreChange),
@@ -9968,9 +9972,9 @@ function useViewerOptions() {
9968
9972
  );
9969
9973
  return { optionsStore: store, options };
9970
9974
  }
9971
- var KNOWN_TAB_IDS = new Set(chunkP3Y3OMAD_js.TOOLBAR_TABS.map((tab) => tab.id));
9975
+ var KNOWN_TAB_IDS = new Set(chunk3NDRTC7T_js.TOOLBAR_TABS.map((tab) => tab.id));
9972
9976
  function computeToolbarVisibility(hiddenActions) {
9973
- const isHidden = (id) => chunkP3Y3OMAD_js.isActionHidden(id, hiddenActions);
9977
+ const isHidden = (id) => chunk3NDRTC7T_js.isActionHidden(id, hiddenActions);
9974
9978
  const isTabVisible = (id) => !KNOWN_TAB_IDS.has(id) || !isHidden(id);
9975
9979
  return { isHidden, isTabVisible };
9976
9980
  }
@@ -10055,12 +10059,12 @@ function useYjsDocumentSync({
10055
10059
  return;
10056
10060
  }
10057
10061
  try {
10058
- const handler = new chunkP3Y3OMAD_js.PptxHandler();
10062
+ const handler = new chunk3NDRTC7T_js.PptxHandler();
10059
10063
  await handler.load(sourceBytes.buffer);
10060
- const currentSlides = chunkP3Y3OMAD_js.readSlidesFromYDoc(
10064
+ const currentSlides = chunk3NDRTC7T_js.readSlidesFromYDoc(
10061
10065
  doc
10062
10066
  );
10063
- const slidesToSave = chunkAX75ONFY_js.buildSaveSlides(currentSlides, templateElementsBySlideId);
10067
+ const slidesToSave = chunkIN7D2T4R_js.buildSaveSlides(currentSlides, templateElementsBySlideId);
10064
10068
  const bytes = await handler.save(slidesToSave);
10065
10069
  config.onWriteBack(bytes);
10066
10070
  } catch {
@@ -10075,7 +10079,7 @@ function useYjsDocumentSync({
10075
10079
  if (!doc || !isConnected) {
10076
10080
  return;
10077
10081
  }
10078
- const docSlides = chunkP3Y3OMAD_js.readSlidesFromYDoc(
10082
+ const docSlides = chunk3NDRTC7T_js.readSlidesFromYDoc(
10079
10083
  doc
10080
10084
  );
10081
10085
  if (docSlides.length === 0) {
@@ -10097,11 +10101,11 @@ function useYjsDocumentSync({
10097
10101
  lastSyncedRef.current = serialized;
10098
10102
  void (async () => {
10099
10103
  const factories = await getFactories();
10100
- chunkP3Y3OMAD_js.reconcileSlidesInYDoc(
10104
+ chunk3NDRTC7T_js.reconcileSlidesInYDoc(
10101
10105
  slides,
10102
10106
  doc,
10103
10107
  factories,
10104
- chunkP3Y3OMAD_js.LOCAL_SYNC_ORIGIN
10108
+ chunk3NDRTC7T_js.LOCAL_SYNC_ORIGIN
10105
10109
  );
10106
10110
  scheduleWriteBack();
10107
10111
  })();
@@ -10115,10 +10119,10 @@ function useYjsDocumentSync({
10115
10119
  return;
10116
10120
  }
10117
10121
  const handleChange = (_events, transaction) => {
10118
- if (transaction?.origin === chunkP3Y3OMAD_js.LOCAL_SYNC_ORIGIN) {
10122
+ if (transaction?.origin === chunk3NDRTC7T_js.LOCAL_SYNC_ORIGIN) {
10119
10123
  return;
10120
10124
  }
10121
- const remoteSlides = chunkP3Y3OMAD_js.readSlidesFromYDoc(
10125
+ const remoteSlides = chunk3NDRTC7T_js.readSlidesFromYDoc(
10122
10126
  doc
10123
10127
  );
10124
10128
  if (remoteSlides.length === 0) {
@@ -10134,7 +10138,7 @@ function useYjsDocumentSync({
10134
10138
  isApplyingRemoteRef.current = false;
10135
10139
  scheduleWriteBack();
10136
10140
  };
10137
- const unobserve = chunkP3Y3OMAD_js.observeYDocSlides(
10141
+ const unobserve = chunk3NDRTC7T_js.observeYDocSlides(
10138
10142
  doc,
10139
10143
  handleChange
10140
10144
  );
@@ -10172,7 +10176,7 @@ function useBroadcastFollower({
10172
10176
  if (!broadcaster) {
10173
10177
  return;
10174
10178
  }
10175
- if (!chunkP3Y3OMAD_js.shouldAutoFollowBroadcaster({
10179
+ if (!chunk3NDRTC7T_js.shouldAutoFollowBroadcaster({
10176
10180
  localRole: collab.config.role,
10177
10181
  broadcasterRole: broadcaster.role
10178
10182
  })) {
@@ -10332,10 +10336,10 @@ function useTouchGestures(input) {
10332
10336
  if (!el || !enabled) {
10333
10337
  return;
10334
10338
  }
10335
- const recognizer = chunkP3Y3OMAD_js.createTouchGestureRecognizer({
10339
+ const recognizer = chunk3NDRTC7T_js.createTouchGestureRecognizer({
10336
10340
  getScale: () => scaleRef.current,
10337
- minScale: chunkP3Y3OMAD_js.MIN_ZOOM_SCALE,
10338
- maxScale: chunkP3Y3OMAD_js.MAX_ZOOM_SCALE,
10341
+ minScale: chunk3NDRTC7T_js.MIN_ZOOM_SCALE,
10342
+ maxScale: chunk3NDRTC7T_js.MAX_ZOOM_SCALE,
10339
10343
  callbacks: {
10340
10344
  onPinchZoom: (newScale) => callbacksRef.current.onPinchZoom?.(newScale),
10341
10345
  onSwipe: (direction) => callbacksRef.current.onSwipe?.(direction),
@@ -10375,7 +10379,7 @@ function scrollFocusedIntoView(keyboardInset) {
10375
10379
  return;
10376
10380
  }
10377
10381
  const rect = active.getBoundingClientRect();
10378
- const delta = chunkP3Y3OMAD_js.computeScrollDelta(
10382
+ const delta = chunk3NDRTC7T_js.computeScrollDelta(
10379
10383
  { top: rect.top, bottom: rect.bottom },
10380
10384
  window.innerHeight,
10381
10385
  keyboardInset
@@ -10395,8 +10399,8 @@ function useKeyboardInsets(enabled = true) {
10395
10399
  return;
10396
10400
  }
10397
10401
  const update = () => {
10398
- const metrics = chunkP3Y3OMAD_js.readViewportMetrics(window);
10399
- const inset = metrics ? chunkP3Y3OMAD_js.computeKeyboardInset(metrics) : 0;
10402
+ const metrics = chunk3NDRTC7T_js.readViewportMetrics(window);
10403
+ const inset = metrics ? chunk3NDRTC7T_js.computeKeyboardInset(metrics) : 0;
10400
10404
  setKeyboardInset(inset);
10401
10405
  if (inset > 0) {
10402
10406
  window.requestAnimationFrame(() => scrollFocusedIntoView(inset));
@@ -10407,8 +10411,8 @@ function useKeyboardInsets(enabled = true) {
10407
10411
  vv.addEventListener("scroll", update);
10408
10412
  const onFocusIn = () => {
10409
10413
  window.requestAnimationFrame(() => {
10410
- const metrics = chunkP3Y3OMAD_js.readViewportMetrics(window);
10411
- const inset = metrics ? chunkP3Y3OMAD_js.computeKeyboardInset(metrics) : 0;
10414
+ const metrics = chunk3NDRTC7T_js.readViewportMetrics(window);
10415
+ const inset = metrics ? chunk3NDRTC7T_js.computeKeyboardInset(metrics) : 0;
10412
10416
  if (inset > 0) {
10413
10417
  scrollFocusedIntoView(inset);
10414
10418
  }
@@ -10421,7 +10425,7 @@ function useKeyboardInsets(enabled = true) {
10421
10425
  document.removeEventListener("focusin", onFocusIn);
10422
10426
  };
10423
10427
  }, [enabled]);
10424
- return { keyboardInset, isKeyboardOpen: chunkP3Y3OMAD_js.isKeyboardOpen(keyboardInset) };
10428
+ return { keyboardInset, isKeyboardOpen: chunk3NDRTC7T_js.isKeyboardOpen(keyboardInset) };
10425
10429
  }
10426
10430
 
10427
10431
  // src/viewer/hooks/useViewerBuildingBlocks-canvas-props.ts
@@ -10448,7 +10452,7 @@ function buildCanvasProps(input) {
10448
10452
  } = input;
10449
10453
  const effectiveSlide = mode === "master" ? masterPseudoSlide : activeSlide;
10450
10454
  const effectiveTemplateElements = mode === "master" ? s.activeLayout ? s.activeMaster?.elements ?? [] : [] : templateElements;
10451
- const fieldContext = chunkP3Y3OMAD_js.buildFieldSubstitutionContext({
10455
+ const fieldContext = chunk3NDRTC7T_js.buildFieldSubstitutionContext({
10452
10456
  headerFooter: s.headerFooter,
10453
10457
  customProperties: s.customProperties,
10454
10458
  slide: activeSlide
@@ -10458,13 +10462,13 @@ function buildCanvasProps(input) {
10458
10462
  if (mode === "present") {
10459
10463
  presentation.handlePresentationAction(action);
10460
10464
  } else if (action.url) {
10461
- chunkP3Y3OMAD_js.safeOpenUrl(action.url);
10465
+ chunk3NDRTC7T_js.safeOpenUrl(action.url);
10462
10466
  }
10463
10467
  };
10464
10468
  const handleHyperlinkClick = (url) => {
10465
- if (chunkP3Y3OMAD_js.isPpactionUrl(url)) {
10469
+ if (chunk3NDRTC7T_js.isPpactionUrl(url)) {
10466
10470
  if (mode === "present") {
10467
- const parsed = chunkP3Y3OMAD_js.parsePpactionUrl(url);
10471
+ const parsed = chunk3NDRTC7T_js.parsePpactionUrl(url);
10468
10472
  if (parsed) {
10469
10473
  presentation.handlePresentationAction({
10470
10474
  action: parsed.action,
@@ -10474,7 +10478,7 @@ function buildCanvasProps(input) {
10474
10478
  }
10475
10479
  return;
10476
10480
  }
10477
- chunkP3Y3OMAD_js.safeOpenUrl(url);
10481
+ chunk3NDRTC7T_js.safeOpenUrl(url);
10478
10482
  };
10479
10483
  return {
10480
10484
  activeSlide: effectiveSlide,
@@ -10617,7 +10621,7 @@ function buildToolbarAnimationHandlers(input) {
10617
10621
  const current = activeSlide.animations ?? [];
10618
10622
  if (group === "motionPath") {
10619
10623
  propertyHandlers.handleUpdateSlide({
10620
- animations: chunkP3Y3OMAD_js.applyMotionPathPreset(current, selectedElement.id, preset)
10624
+ animations: chunk3NDRTC7T_js.applyMotionPathPreset(current, selectedElement.id, preset)
10621
10625
  });
10622
10626
  return;
10623
10627
  }
@@ -10812,7 +10816,7 @@ function buildToolbarProps(input) {
10812
10816
  onOpenFile,
10813
10817
  onOpenRecentFile,
10814
10818
  onCreatePresentation: (templateId) => {
10815
- s.setSlides(chunkP3Y3OMAD_js.createBackstagePresentation(templateId));
10819
+ s.setSlides(chunk3NDRTC7T_js.createBackstagePresentation(templateId));
10816
10820
  s.setActiveSlideIndex(0);
10817
10821
  s.setSelectedElementId(null);
10818
10822
  s.setSelectedElementIds([]);
@@ -10839,7 +10843,7 @@ function buildToolbarProps(input) {
10839
10843
  layoutOptions: scopedLayoutOptions,
10840
10844
  onInsertSlideFromLayout: slideOps.handleInsertSlideFromLayout,
10841
10845
  onInsertSlideFromTemplate: slideOps.handleInsertSlideFromTemplate,
10842
- templateScheme: chunkP3Y3OMAD_js.templateSchemeFromTheme(s.theme?.colorScheme),
10846
+ templateScheme: chunk3NDRTC7T_js.templateSchemeFromTheme(s.theme?.colorScheme),
10843
10847
  customShows: s.customShows,
10844
10848
  activeCustomShowId: s.activeCustomShowId,
10845
10849
  onSetActiveCustomShowId: s.setActiveCustomShowId,
@@ -10871,7 +10875,7 @@ function buildToolbarProps(input) {
10871
10875
  isCommentsPanelOpen: s.isInspectorPaneOpen,
10872
10876
  slideCommentCount: activeSlide?.comments?.length ?? 0,
10873
10877
  formatPainterActive: s.formatPainterActive,
10874
- canActivateFormatPainter: chunkP3Y3OMAD_js.hasCopyableFormat(selectedElement),
10878
+ canActivateFormatPainter: chunk3NDRTC7T_js.hasCopyableFormat(selectedElement),
10875
10879
  onToggleFormatPainter: () => s.setFormatPainterActive((p) => !p),
10876
10880
  isSelectionPaneOpen: s.isSelectionPaneOpen,
10877
10881
  onToggleSelectionPane: () => s.setIsSelectionPaneOpen((p) => !p),
@@ -11140,7 +11144,7 @@ function useViewerBuildingBlocks(input) {
11140
11144
  }, [incomingContent]);
11141
11145
  const onOpenFile = react.useCallback(() => {
11142
11146
  void (async () => {
11143
- const picked = await chunkP3Y3OMAD_js.openPptxFile();
11147
+ const picked = await chunk3NDRTC7T_js.openPptxFile();
11144
11148
  if (picked) {
11145
11149
  setContent(picked.buffer);
11146
11150
  }
@@ -11148,7 +11152,7 @@ function useViewerBuildingBlocks(input) {
11148
11152
  }, []);
11149
11153
  const onOpenRecentFile = react.useCallback((key) => {
11150
11154
  void (async () => {
11151
- const bytes = await chunkP3Y3OMAD_js.readBackstageRecentFile(key);
11155
+ const bytes = await chunk3NDRTC7T_js.readBackstageRecentFile(key);
11152
11156
  if (bytes) {
11153
11157
  setContent(bytes);
11154
11158
  }