pptx-react-viewer 2.16.1 → 2.16.2

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-OHB6CVLY.js → AiChatPanel-MCGNCS7Q.js} +22 -22
  3. package/dist/AiChatPanel-MCGNCS7Q.js.br +0 -0
  4. package/dist/AiChatPanel-MCGNCS7Q.js.gz +0 -0
  5. package/dist/{AiChatPanel-UPNVIENY.mjs → AiChatPanel-WJXPCHQK.mjs} +3 -3
  6. package/dist/AiChatPanel-WJXPCHQK.mjs.br +0 -0
  7. package/dist/AiChatPanel-WJXPCHQK.mjs.gz +0 -0
  8. package/dist/{Model3DScene-KEUY3M7X.mjs → Model3DScene-IXW2AKAU.mjs} +1 -1
  9. package/dist/{Model3DScene-KEUY3M7X.mjs.br → Model3DScene-IXW2AKAU.mjs.br} +0 -0
  10. package/dist/Model3DScene-IXW2AKAU.mjs.gz +0 -0
  11. package/dist/{Model3DScene-7FKWPESH.js → Model3DScene-Q2DTGVQ7.js} +2 -2
  12. package/dist/Model3DScene-Q2DTGVQ7.js.br +0 -0
  13. package/dist/Model3DScene-Q2DTGVQ7.js.gz +0 -0
  14. package/dist/{SurfaceChart3DScene-NPJQXIGW.js → SurfaceChart3DScene-AD43LAOO.js} +2 -2
  15. package/dist/SurfaceChart3DScene-AD43LAOO.js.br +0 -0
  16. package/dist/SurfaceChart3DScene-AD43LAOO.js.gz +0 -0
  17. package/dist/{SurfaceChart3DScene-2MLBPJ63.mjs → SurfaceChart3DScene-MODEHQ6G.mjs} +1 -1
  18. package/dist/{SurfaceChart3DScene-2MLBPJ63.mjs.br → SurfaceChart3DScene-MODEHQ6G.mjs.br} +0 -0
  19. package/dist/SurfaceChart3DScene-MODEHQ6G.mjs.gz +0 -0
  20. package/dist/{chunk-3NDRTC7T.js → chunk-4GX347MG.js} +235 -46
  21. package/dist/chunk-4GX347MG.js.br +0 -0
  22. package/dist/{chunk-3NDRTC7T.js.gz → chunk-4GX347MG.js.gz} +0 -0
  23. package/dist/{chunk-7UBDMCI7.js → chunk-CIK6XUOH.js} +3 -3
  24. package/dist/chunk-CIK6XUOH.js.br +0 -0
  25. package/dist/chunk-CIK6XUOH.js.gz +0 -0
  26. package/dist/{chunk-N6IE34HX.js → chunk-JV6DI7AK.js} +1096 -1074
  27. package/dist/chunk-JV6DI7AK.js.br +0 -0
  28. package/dist/chunk-JV6DI7AK.js.gz +0 -0
  29. package/dist/{chunk-6ROCCY4M.mjs → chunk-LDD2UVCV.mjs} +49 -27
  30. package/dist/chunk-LDD2UVCV.mjs.br +0 -0
  31. package/dist/chunk-LDD2UVCV.mjs.gz +0 -0
  32. package/dist/{chunk-ENOHLGJ2.mjs → chunk-MDFCBYEM.mjs} +234 -47
  33. package/dist/chunk-MDFCBYEM.mjs.br +0 -0
  34. package/dist/{chunk-ENOHLGJ2.mjs.gz → chunk-MDFCBYEM.mjs.gz} +0 -0
  35. package/dist/{chunk-DQTTI6D4.js → chunk-NKE64XVV.js} +340 -340
  36. package/dist/chunk-NKE64XVV.js.br +0 -0
  37. package/dist/chunk-NKE64XVV.js.gz +0 -0
  38. package/dist/{chunk-IN7D2T4R.js → chunk-P6KM7RO5.js} +297 -276
  39. package/dist/chunk-P6KM7RO5.js.br +0 -0
  40. package/dist/chunk-P6KM7RO5.js.gz +0 -0
  41. package/dist/{chunk-LJZFG6YP.mjs → chunk-QI2JCXTH.mjs} +1 -1
  42. package/dist/chunk-QI2JCXTH.mjs.br +0 -0
  43. package/dist/chunk-QI2JCXTH.mjs.gz +0 -0
  44. package/dist/{chunk-RUK5XZGO.mjs → chunk-UWYHBCLM.mjs} +2 -2
  45. package/dist/chunk-UWYHBCLM.mjs.br +0 -0
  46. package/dist/chunk-UWYHBCLM.mjs.gz +0 -0
  47. package/dist/{chunk-ZOOGEDYG.mjs → chunk-Z4CS2ZYN.mjs} +48 -27
  48. package/dist/chunk-Z4CS2ZYN.mjs.br +0 -0
  49. package/dist/chunk-Z4CS2ZYN.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 +27 -0
  57. package/dist/internals.js +78 -78
  58. package/dist/internals.js.br +0 -0
  59. package/dist/internals.js.gz +0 -0
  60. package/dist/internals.mjs +3 -3
  61. package/dist/internals.mjs.br +0 -0
  62. package/dist/internals.mjs.gz +0 -0
  63. package/dist/viewer/index.js +26 -26
  64. package/dist/viewer/index.js.br +0 -0
  65. package/dist/viewer/index.js.gz +0 -0
  66. package/dist/viewer/index.mjs +5 -5
  67. package/dist/viewer/index.mjs.br +0 -0
  68. package/dist/viewer/index.mjs.gz +0 -0
  69. package/package.json +1 -1
  70. package/dist/AiChatPanel-OHB6CVLY.js.br +0 -0
  71. package/dist/AiChatPanel-OHB6CVLY.js.gz +0 -0
  72. package/dist/AiChatPanel-UPNVIENY.mjs.br +0 -0
  73. package/dist/AiChatPanel-UPNVIENY.mjs.gz +0 -0
  74. package/dist/Model3DScene-7FKWPESH.js.br +0 -0
  75. package/dist/Model3DScene-7FKWPESH.js.gz +0 -0
  76. package/dist/Model3DScene-KEUY3M7X.mjs.gz +0 -0
  77. package/dist/SurfaceChart3DScene-2MLBPJ63.mjs.gz +0 -0
  78. package/dist/SurfaceChart3DScene-NPJQXIGW.js.br +0 -0
  79. package/dist/SurfaceChart3DScene-NPJQXIGW.js.gz +0 -0
  80. package/dist/chunk-3NDRTC7T.js.br +0 -0
  81. package/dist/chunk-6ROCCY4M.mjs.br +0 -0
  82. package/dist/chunk-6ROCCY4M.mjs.gz +0 -0
  83. package/dist/chunk-7UBDMCI7.js.br +0 -0
  84. package/dist/chunk-7UBDMCI7.js.gz +0 -0
  85. package/dist/chunk-DQTTI6D4.js.br +0 -0
  86. package/dist/chunk-DQTTI6D4.js.gz +0 -0
  87. package/dist/chunk-ENOHLGJ2.mjs.br +0 -0
  88. package/dist/chunk-IN7D2T4R.js.br +0 -0
  89. package/dist/chunk-IN7D2T4R.js.gz +0 -0
  90. package/dist/chunk-LJZFG6YP.mjs.br +0 -0
  91. package/dist/chunk-LJZFG6YP.mjs.gz +0 -0
  92. package/dist/chunk-N6IE34HX.js.br +0 -0
  93. package/dist/chunk-N6IE34HX.js.gz +0 -0
  94. package/dist/chunk-RUK5XZGO.mjs.br +0 -0
  95. package/dist/chunk-RUK5XZGO.mjs.gz +0 -0
  96. package/dist/chunk-ZOOGEDYG.mjs.br +0 -0
  97. package/dist/chunk-ZOOGEDYG.mjs.gz +0 -0
@@ -1,8 +1,8 @@
1
1
  'use strict';
2
2
 
3
- var chunkIN7D2T4R_js = require('./chunk-IN7D2T4R.js');
3
+ var chunkP6KM7RO5_js = require('./chunk-P6KM7RO5.js');
4
4
  var chunk3ISYPBSX_js = require('./chunk-3ISYPBSX.js');
5
- var chunk3NDRTC7T_js = require('./chunk-3NDRTC7T.js');
5
+ var chunk4GX347MG_js = require('./chunk-4GX347MG.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 = chunk3NDRTC7T_js.DEFAULT_VIRTUAL_OVERSCAN
17
+ overscan = chunk4GX347MG_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 = chunk3NDRTC7T_js.computeVirtualRange(totalItems, itemHeight, scrollTop, viewportHeight, overscan);
47
+ const range = chunk4GX347MG_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 ??= chunk3NDRTC7T_js.createPresenceProjector();
88
+ projectorRef.current ??= chunk4GX347MG_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 >= chunk3NDRTC7T_js.BROADCAST_THROTTLE_MS) {
113
+ if (elapsed >= chunk4GX347MG_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
- }, chunk3NDRTC7T_js.BROADCAST_THROTTLE_MS - elapsed);
123
+ }, chunk4GX347MG_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 = chunk3NDRTC7T_js.createSyncGate(() => setSynced(true));
203
+ gateRef.current = chunk4GX347MG_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
- chunk3NDRTC7T_js.clearLocalAwareness(provider.awareness);
223
+ chunk4GX347MG_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 = chunk3NDRTC7T_js.validateRoomId(config.roomId);
248
+ const roomId = chunk4GX347MG_js.validateRoomId(config.roomId);
249
249
  const provider = new WebrtcProvider(roomId, yDoc, opts);
250
- departureRef.current = chunk3NDRTC7T_js.createDepartureChannel(roomId, provider.awareness);
250
+ departureRef.current = chunk4GX347MG_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 = chunk3NDRTC7T_js.validateRoomId(config.roomId);
293
- const transport = config.transport ?? chunk3NDRTC7T_js.resolveTransportForServerUrl(config.serverUrl);
292
+ const roomId = chunk4GX347MG_js.validateRoomId(config.roomId);
293
+ const transport = config.transport ?? chunk4GX347MG_js.resolveTransportForServerUrl(config.serverUrl);
294
294
  if (transport === "webrtc") {
295
295
  await initWebrtc();
296
296
  return;
297
297
  }
298
- if (chunk3NDRTC7T_js.isMixedContentBlocked(config.serverUrl)) {
298
+ if (chunk4GX347MG_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 = chunk3NDRTC7T_js.createDepartureChannel(roomId, provider.awareness);
312
+ departureRef.current = chunk4GX347MG_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
- chunk3NDRTC7T_js.clearLocalAwareness(provider.awareness);
352
+ chunk4GX347MG_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
- }, chunk3NDRTC7T_js.CONNECTION_TIMEOUT_MS);
361
+ }, chunk4GX347MG_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
- chunk3NDRTC7T_js.clearLocalAwareness(provider.awareness);
370
+ chunk4GX347MG_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 = chunk3NDRTC7T_js.registerCollaborationTeardown({
396
+ const disposeTeardown = chunk4GX347MG_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 = chunk3NDRTC7T_js.sanitizeColor(config?.userColor, "#6366f1");
417
+ const userColor = chunk4GX347MG_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(chunk3NDRTC7T_js.cloneSlide),
527
- templateElementsBySlideId: chunk3NDRTC7T_js.cloneTemplateElementsBySlideId(templateElementsBySlideId),
526
+ slides: slides.map(chunk4GX347MG_js.cloneSlide),
527
+ templateElementsBySlideId: chunk4GX347MG_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(chunk3NDRTC7T_js.cloneSlide));
540
+ setSlides(snapshot.slides.map(chunk4GX347MG_js.cloneSlide));
541
541
  setTemplateElementsBySlideId(
542
- chunk3NDRTC7T_js.cloneTemplateElementsBySlideId(snapshot.templateElementsBySlideId)
542
+ chunk4GX347MG_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 = chunkIN7D2T4R_js.cloneHistorySnapshot(previousSnapshot);
577
- lastHistorySnapshotRef.current = chunkIN7D2T4R_js.cloneHistorySnapshot(nextSnapshot);
576
+ const nextSnapshot = chunkP6KM7RO5_js.cloneHistorySnapshot(previousSnapshot);
577
+ lastHistorySnapshotRef.current = chunkP6KM7RO5_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 = chunkIN7D2T4R_js.cloneHistorySnapshot(nextSnapshot);
599
- lastHistorySnapshotRef.current = chunkIN7D2T4R_js.cloneHistorySnapshot(targetSnapshot);
598
+ const targetSnapshot = chunkP6KM7RO5_js.cloneHistorySnapshot(nextSnapshot);
599
+ lastHistorySnapshotRef.current = chunkP6KM7RO5_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 = chunkIN7D2T4R_js.cloneHistorySnapshot(initialSnapshot);
617
+ const clonedInitial = chunkP6KM7RO5_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 = chunkIN7D2T4R_js.cloneHistorySnapshot(snapshot);
658
+ lastHistorySnapshotRef.current = chunkP6KM7RO5_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(chunkIN7D2T4R_js.cloneHistorySnapshot(previousSnapshot));
664
+ historyPastRef.current.push(chunkP6KM7RO5_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 = chunkIN7D2T4R_js.cloneHistorySnapshot(snapshot);
669
+ lastHistorySnapshotRef.current = chunkP6KM7RO5_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(chunk3NDRTC7T_js.createWheelStepBuffer());
729
+ const wheelBufferRef = react.useRef(chunk4GX347MG_js.createWheelStepBuffer());
730
730
  const storeRef = react.useRef(null);
731
- storeRef.current ??= chunk3NDRTC7T_js.createViewerZoomStore();
731
+ storeRef.current ??= chunk4GX347MG_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 = chunk3NDRTC7T_js.clampZoomScale(nextScale);
792
+ const boundedScale = chunk4GX347MG_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, chunkIN7D2T4R_js.MIN_ELEMENT_SIZE));
830
- maxY = Math.max(maxY, element.y + Math.max(element.height, chunkIN7D2T4R_js.MIN_ELEMENT_SIZE));
829
+ maxX = Math.max(maxX, element.x + Math.max(element.width, chunkP6KM7RO5_js.MIN_ELEMENT_SIZE));
830
+ maxY = Math.max(maxY, element.y + Math.max(element.height, chunkP6KM7RO5_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, chunkIN7D2T4R_js.MIN_ELEMENT_SIZE);
837
- const boundsHeight = Math.max(selectionBounds.maxY - selectionBounds.minY, chunkIN7D2T4R_js.MIN_ELEMENT_SIZE);
836
+ const boundsWidth = Math.max(selectionBounds.maxX - selectionBounds.minX, chunkP6KM7RO5_js.MIN_ELEMENT_SIZE);
837
+ const boundsHeight = Math.max(selectionBounds.maxY - selectionBounds.minY, chunkP6KM7RO5_js.MIN_ELEMENT_SIZE);
838
838
  const availableWidth = Math.max(
839
- effectiveEditorDimensions.width - chunkIN7D2T4R_js.ZOOM_TO_SELECTION_PADDING,
840
- chunkIN7D2T4R_js.MIN_ELEMENT_SIZE
839
+ effectiveEditorDimensions.width - chunkP6KM7RO5_js.ZOOM_TO_SELECTION_PADDING,
840
+ chunkP6KM7RO5_js.MIN_ELEMENT_SIZE
841
841
  );
842
842
  const availableHeight = Math.max(
843
- effectiveEditorDimensions.height - chunkIN7D2T4R_js.ZOOM_TO_SELECTION_PADDING,
844
- chunkIN7D2T4R_js.MIN_ELEMENT_SIZE
843
+ effectiveEditorDimensions.height - chunkP6KM7RO5_js.ZOOM_TO_SELECTION_PADDING,
844
+ chunkP6KM7RO5_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 = chunk3NDRTC7T_js.clampZoomScale(targetEditorScale / safeFitScale);
851
+ const nextScale = chunk4GX347MG_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 = chunk3NDRTC7T_js.mapEditingWheel(event, wheelBufferRef.current, true);
868
+ const mapped = chunk4GX347MG_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: chunk3NDRTC7T_js.clampZoomScale(store.getState().zoom + mapped.deltaScale)
875
+ zoom: chunk4GX347MG_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
- chunkIN7D2T4R_js.executeMediaCommand(command);
963
+ chunkP6KM7RO5_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 = chunk3NDRTC7T_js.computeEntranceAnimationDelay(animation.delayMs, animationIndex);
1100
+ const delay = chunk4GX347MG_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
- chunk3NDRTC7T_js.PresentationAnimationController.collectBuildStepIds(group),
1132
+ chunk4GX347MG_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 = chunk3NDRTC7T_js.PresentationAnimationController.fromSlide(slide);
1195
+ const controller = chunk4GX347MG_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 = 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;
1353
+ var PRESENTER_CHANNEL_NAME = chunk4GX347MG_js.PRESENTATION_CHANNEL_NAME;
1354
+ var AUDIENCE_HASH = chunk4GX347MG_js.PRESENTATION_HASH;
1355
+ var PRESENTER_MSG_ORIGIN = chunk4GX347MG_js.PRESENTATION_MESSAGE_ORIGIN;
1356
+ var AUDIENCE_NONCE_KEY = chunk4GX347MG_js.PRESENTATION_NONCE_KEY;
1357
1357
  function generateSessionId() {
1358
- return chunk3NDRTC7T_js.createPresentationSessionId();
1358
+ return chunk4GX347MG_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 ? chunk3NDRTC7T_js.swapPresentationWindows(window, audience) : false;
1394
+ return audience && !audience.closed ? chunk4GX347MG_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 chunk3NDRTC7T_js.clearAudienceContent(closingSessionId);
1458
+ void chunk4GX347MG_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 = chunk3NDRTC7T_js.buildPresentationAudienceUrl(window.location.href, sessionId);
1477
- void chunk3NDRTC7T_js.resolveAudienceScreenPlacement(window).then((placement) => {
1476
+ const audienceUrl = chunk4GX347MG_js.buildPresentationAudienceUrl(window.location.href, sessionId);
1477
+ void chunk4GX347MG_js.resolveAudienceScreenPlacement(window).then((placement) => {
1478
1478
  if (placement && audienceWindowRef.current === blankWin && !blankWin.closed) {
1479
- chunk3NDRTC7T_js.placeAudienceWindow(blankWin, placement);
1479
+ chunk4GX347MG_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 chunk3NDRTC7T_js.storeAudienceContent(content, sessionId).then(() => navigateOrClose(true)).catch(() => navigateOrClose(false));
1509
+ void chunk4GX347MG_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 (chunk3NDRTC7T_js.isPresentationSessionMessage(message) && message.type === "audience-ready" && message.sessionId === sessionIdRef.current) {
1535
+ if (chunk4GX347MG_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 chunk3NDRTC7T_js.clearAudienceContent(sessionIdRef.current);
1564
+ void chunk4GX347MG_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 (!chunk3NDRTC7T_js.isPresentationSessionMessage(data) || data.origin !== PRESENTER_MSG_ORIGIN) {
1626
+ if (!chunk4GX347MG_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 chunk3NDRTC7T_js.clearAudienceContent(expectedSessionId);
1642
+ void chunk4GX347MG_js.clearAudienceContent(expectedSessionId);
1643
1643
  }
1644
- if (chunk3NDRTC7T_js.endAudienceDisplay(window)) {
1644
+ if (chunk4GX347MG_js.endAudienceDisplay(window)) {
1645
1645
  handlers.onPresenterEnded?.();
1646
1646
  }
1647
1647
  }
1648
1648
  };
1649
1649
  if (expectedSessionId) {
1650
1650
  channel.postMessage({
1651
- origin: chunk3NDRTC7T_js.PRESENTATION_MESSAGE_ORIGIN,
1651
+ origin: chunk4GX347MG_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(chunk3NDRTC7T_js.createWheelStepBuffer());
1665
+ const wheelBufferRef = react.useRef(chunk4GX347MG_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(chunk3NDRTC7T_js.createPresentationKeyBuffer());
1685
+ const keyBufferRef = react.useRef(chunk4GX347MG_js.createPresentationKeyBuffer());
1686
1686
  react.useEffect(() => {
1687
- if (mode !== "present" || !chunk3NDRTC7T_js.acceptsPresentationInput()) {
1688
- keyBufferRef.current = chunk3NDRTC7T_js.createPresentationKeyBuffer();
1687
+ if (mode !== "present" || !chunk4GX347MG_js.acceptsPresentationInput()) {
1688
+ keyBufferRef.current = chunk4GX347MG_js.createPresentationKeyBuffer();
1689
1689
  return;
1690
1690
  }
1691
1691
  const handleKeyDown = (event) => {
1692
- const mapped = chunk3NDRTC7T_js.mapPresentationKey(event, keyBufferRef.current);
1692
+ const mapped = chunk4GX347MG_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 = chunk3NDRTC7T_js.firstShowSlideIndex(showSlideIndexes);
1712
+ const first = chunk4GX347MG_js.firstShowSlideIndex(showSlideIndexes);
1713
1713
  navigateToSlide(first ?? 0);
1714
1714
  return;
1715
1715
  }
1716
1716
  case "last": {
1717
- const last = chunk3NDRTC7T_js.lastShowSlideIndex(showSlideIndexes);
1717
+ const last = chunk4GX347MG_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" || !chunk3NDRTC7T_js.acceptsPresentationInput()) {
1752
+ if (mode !== "present" || !chunk4GX347MG_js.acceptsPresentationInput()) {
1753
1753
  return;
1754
1754
  }
1755
- const mapped = chunk3NDRTC7T_js.mapPresentationWheel(event, wheelBufferRef.current);
1755
+ const mapped = chunk4GX347MG_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
- chunk3NDRTC7T_js.runPresentationAction(
1887
+ chunk4GX347MG_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 ? chunk3NDRTC7T_js.resolveTransitionDurationMs(transition) : 0;
1909
+ const durationMs = deps.playTransition ? chunk4GX347MG_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 = chunk3NDRTC7T_js.resolveAutoAdvanceDelayMs(slides[slideIndex], { useTimings });
1968
+ const delayMs = chunk4GX347MG_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 && !chunk3NDRTC7T_js.hasShowSlideAfter(presentationSlideIndex, availableSlideIndexes);
1991
+ const pastLastSlide = direction === 1 && !chunk4GX347MG_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 ? chunk3NDRTC7T_js.nextShowSlideIndex(presentationSlideIndex, availableSlideIndexes, {
2009
+ const nextSlideIndex = direction === 1 ? chunk4GX347MG_js.nextShowSlideIndex(presentationSlideIndex, availableSlideIndexes, {
2010
2010
  loop: Boolean(loopContinuously) && !rehearsing
2011
- }) : chunk3NDRTC7T_js.previousShowSlideIndex(presentationSlideIndex, availableSlideIndexes);
2011
+ }) : chunk4GX347MG_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(chunk3NDRTC7T_js.createPresenterTimer());
2157
- const [snapshot, setSnapshot] = react.useState(() => chunk3NDRTC7T_js.createInitialPresentationSnapshot(slideIndex));
2156
+ const timerRef = react.useRef(chunk4GX347MG_js.createPresenterTimer());
2157
+ const [snapshot, setSnapshot] = react.useState(() => chunk4GX347MG_js.createInitialPresentationSnapshot(slideIndex));
2158
2158
  const patch = react.useCallback((value) => {
2159
- setSnapshot((current) => chunk3NDRTC7T_js.mergePresentationSnapshot(current, value));
2159
+ setSnapshot((current) => chunk4GX347MG_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 = chunk3NDRTC7T_js.resetPresenterTimer();
2166
+ timerRef.current = chunk4GX347MG_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: chunk3NDRTC7T_js.presenterElapsed(timerRef.current)
2171
+ elapsedMs: chunk4GX347MG_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 = chunk3NDRTC7T_js.togglePresenterTimer(timerRef.current);
2181
+ timerRef.current = chunk4GX347MG_js.togglePresenterTimer(timerRef.current);
2182
2182
  patch({
2183
2183
  paused: timerRef.current.paused,
2184
- elapsedMs: chunk3NDRTC7T_js.presenterElapsed(timerRef.current)
2184
+ elapsedMs: chunk4GX347MG_js.presenterElapsed(timerRef.current)
2185
2185
  });
2186
2186
  },
2187
2187
  resetTimer: () => {
2188
- timerRef.current = chunk3NDRTC7T_js.resetPresenterTimer();
2188
+ timerRef.current = chunk4GX347MG_js.resetPresenterTimer();
2189
2189
  patch({ paused: false, elapsedMs: 0 });
2190
2190
  },
2191
2191
  stepZoom: (direction) => setSnapshot(
2192
- (current) => chunk3NDRTC7T_js.mergePresentationSnapshot(current, {
2193
- zoom: chunk3NDRTC7T_js.stepPresenterZoom(
2192
+ (current) => chunk4GX347MG_js.mergePresentationSnapshot(current, {
2193
+ zoom: chunk4GX347MG_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(() => chunk3NDRTC7T_js.createPresenterShowGuard(), []);
2238
+ const showGuard = react.useMemo(() => chunk4GX347MG_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 (!chunk3NDRTC7T_js.acceptsPresentationInput()) {
2317
+ if (!chunk4GX347MG_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 chunk3NDRTC7T_js.attachPresentationVisibilityPause({
2454
+ return chunk4GX347MG_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 chunk3NDRTC7T_js.buildMorphTransitionPlan(
2534
+ return chunk4GX347MG_js.buildMorphTransitionPlan(
2535
2535
  slides[transitionOverlay.outgoingSlideIndex],
2536
2536
  slides[transitionOverlay.incomingSlideIndex],
2537
2537
  transitionOverlay.durationMs,
2538
- chunk3NDRTC7T_js.morphOptionToMode(transitionOverlay.transition.morphOption)
2538
+ chunk4GX347MG_js.morphOptionToMode(transitionOverlay.transition.morphOption)
2539
2539
  );
2540
2540
  }, [transitionOverlay, slides]);
2541
2541
  const morphedElementStates = react.useMemo(() => {
@@ -2556,7 +2556,7 @@ function usePresentationMode(input) {
2556
2556
  if (!morphPlan) {
2557
2557
  return presentationKeyframesCss;
2558
2558
  }
2559
- const imageRules = chunk3NDRTC7T_js.buildMorphAnimationRules(morphPlan, "", "incoming", "image");
2559
+ const imageRules = chunk4GX347MG_js.buildMorphAnimationRules(morphPlan, "", "incoming", "image");
2560
2560
  return `${presentationKeyframesCss ?? ""}
2561
2561
  ${morphPlan.keyframesCss}
2562
2562
  ${imageRules}`;
@@ -2845,7 +2845,7 @@ function findInSlides(slides, findQuery, findMatchCase) {
2845
2845
  const normalised = findMatchCase ? findQuery : findQuery.toLowerCase();
2846
2846
  slides.forEach((slide, slideIndex) => {
2847
2847
  for (const element of slide.elements || []) {
2848
- if (!chunk3NDRTC7T_js.hasTextProperties(element)) {
2848
+ if (!chunk4GX347MG_js.hasTextProperties(element)) {
2849
2849
  continue;
2850
2850
  }
2851
2851
  const segments = element.textSegments ?? [];
@@ -2896,7 +2896,7 @@ function applyFindReplacements(slides, toReplace, replaceQuery) {
2896
2896
  continue;
2897
2897
  }
2898
2898
  const element = slide.elements[elIdx];
2899
- if (!chunk3NDRTC7T_js.hasTextProperties(element)) {
2899
+ if (!chunk4GX347MG_js.hasTextProperties(element)) {
2900
2900
  continue;
2901
2901
  }
2902
2902
  const segments = [...element.textSegments ?? []];
@@ -3494,7 +3494,7 @@ function useViewerCoreState(_input) {
3494
3494
  const shapeAdjustmentDragStateRef = react.useRef(null);
3495
3495
  const marqueeStateRef = react.useRef(null);
3496
3496
  const isDrawingRef = react.useRef(false);
3497
- const livePatcher = react.useMemo(() => chunk3NDRTC7T_js.createCollaborationLivePatcher(), []);
3497
+ const livePatcher = react.useMemo(() => chunk4GX347MG_js.createCollaborationLivePatcher(), []);
3498
3498
  react.useEffect(() => () => livePatcher.dispose(), [livePatcher]);
3499
3499
  const slidesRef = react.useRef([]);
3500
3500
  const [mode, setMode] = react.useState("edit");
@@ -3503,8 +3503,8 @@ function useViewerCoreState(_input) {
3503
3503
  const [slides, setSlides] = react.useState([]);
3504
3504
  const [templateElementsBySlideId, setTemplateElementsBySlideId] = react.useState({});
3505
3505
  const [canvasSize, setCanvasSize] = react.useState({
3506
- width: chunkIN7D2T4R_js.DEFAULT_CANVAS_WIDTH,
3507
- height: chunkIN7D2T4R_js.DEFAULT_CANVAS_HEIGHT
3506
+ width: chunkP6KM7RO5_js.DEFAULT_CANVAS_WIDTH,
3507
+ height: chunkP6KM7RO5_js.DEFAULT_CANVAS_HEIGHT
3508
3508
  });
3509
3509
  const [activeSlideIndex, setActiveSlideIndex] = react.useState(0);
3510
3510
  const [selectedElementId, setSelectedElementId] = react.useState(null);
@@ -3524,7 +3524,7 @@ function useViewerCoreState(_input) {
3524
3524
  const resolved = typeof value === "function" ? value(inlineEditingTextRef.current) : value;
3525
3525
  inlineEditingTextRef.current = resolved;
3526
3526
  setInlineEditingTextBase(value);
3527
- chunk3NDRTC7T_js.publishLiveInlineText(
3527
+ chunk4GX347MG_js.publishLiveInlineText(
3528
3528
  livePatcher,
3529
3529
  slidesRef.current[activeSlideIndexRef.current],
3530
3530
  inlineEditingElementIdRef.current,
@@ -3858,7 +3858,7 @@ function useLoadContent({
3858
3858
  );
3859
3859
  }
3860
3860
  const previousHandler = handlerRef.current;
3861
- const handler = new chunk3NDRTC7T_js.PptxHandler();
3861
+ const handler = new chunk4GX347MG_js.PptxHandler();
3862
3862
  const parsed = await handler.load(buffer);
3863
3863
  if (cancelled || token !== renderTokenRef.current) {
3864
3864
  handler.dispose();
@@ -3870,7 +3870,7 @@ function useLoadContent({
3870
3870
  handlerRef.current = null;
3871
3871
  const mediaElements = [];
3872
3872
  for (const slide of parsed.slides) {
3873
- chunk3NDRTC7T_js.collectMediaElements(slide.elements, mediaElements);
3873
+ chunk4GX347MG_js.collectMediaElements(slide.elements, mediaElements);
3874
3874
  }
3875
3875
  for (const url of mediaDataUrls.values()) {
3876
3876
  if (url.startsWith("blob:")) {
@@ -3911,7 +3911,7 @@ function useLoadContent({
3911
3911
  }
3912
3912
  })
3913
3913
  );
3914
- const { paths: imagePaths, refs: imageRefs } = chunk3NDRTC7T_js.collectImagePaths(parsed.slides);
3914
+ const { paths: imagePaths, refs: imageRefs } = chunk4GX347MG_js.collectImagePaths(parsed.slides);
3915
3915
  let nextSlides = parsed.slides;
3916
3916
  if (imagePaths.size > 0) {
3917
3917
  const resolvedMap = /* @__PURE__ */ new Map();
@@ -3966,12 +3966,12 @@ function useLoadContent({
3966
3966
  }
3967
3967
  }
3968
3968
  handlerRef.current = handler;
3969
- const partition = chunkIN7D2T4R_js.partitionTemplateElements(nextSlides);
3969
+ const partition = chunkP6KM7RO5_js.partitionTemplateElements(nextSlides);
3970
3970
  setSlides(partition.slides);
3971
3971
  setTemplateElementsBySlideId(partition.templateElementsBySlideId);
3972
3972
  setCanvasSize({
3973
- width: parsed.width ?? chunkIN7D2T4R_js.DEFAULT_CANVAS_WIDTH,
3974
- height: parsed.height ?? chunkIN7D2T4R_js.DEFAULT_CANVAS_HEIGHT
3973
+ width: parsed.width ?? chunkP6KM7RO5_js.DEFAULT_CANVAS_WIDTH,
3974
+ height: parsed.height ?? chunkP6KM7RO5_js.DEFAULT_CANVAS_HEIGHT
3975
3975
  });
3976
3976
  setHeaderFooter(parsed.headerFooter ?? {});
3977
3977
  setLayoutOptions(parsed.layoutOptions ?? []);
@@ -4000,7 +4000,7 @@ function useLoadContent({
4000
4000
  setHasMacros(parsed.hasMacros === true);
4001
4001
  setHasDigitalSignatures(parsed.hasDigitalSignatures === true);
4002
4002
  setDigitalSignatureCount(parsed.digitalSignatureCount ?? 0);
4003
- setGuides(chunk3NDRTC7T_js.buildInitialGuides(parsed.presentationGuides, parsed.slides[0]?.guides));
4003
+ setGuides(chunk4GX347MG_js.buildInitialGuides(parsed.presentationGuides, parsed.slides[0]?.guides));
4004
4004
  setActiveSlideIndex(0);
4005
4005
  clearSelection();
4006
4006
  setIsDirty(false);
@@ -4008,7 +4008,7 @@ function useLoadContent({
4008
4008
  onContentApplied?.();
4009
4009
  } catch (err) {
4010
4010
  if (!cancelled && token === renderTokenRef.current) {
4011
- if (err instanceof chunk3NDRTC7T_js.EncryptedFileError) {
4011
+ if (err instanceof chunk4GX347MG_js.EncryptedFileError) {
4012
4012
  setIsEncrypted(true);
4013
4013
  } else {
4014
4014
  setError(err instanceof Error ? err.message : String(err));
@@ -4085,7 +4085,7 @@ function useAutosave(input) {
4085
4085
  isSavingRef.current = false;
4086
4086
  return;
4087
4087
  }
4088
- await chunk3NDRTC7T_js.saveAutosaveSnapshot(filePathRef.current, data);
4088
+ await chunk4GX347MG_js.saveAutosaveSnapshot(filePathRef.current, data);
4089
4089
  setAutosaveStatus({ state: "saved", timestamp: Date.now() });
4090
4090
  } catch (err) {
4091
4091
  setAutosaveStatus({
@@ -4150,7 +4150,7 @@ function useElementOperations(input) {
4150
4150
  }, [applySelection, setInlineEditingElementId, setContextMenuState]);
4151
4151
  const updateElementById = react.useCallback(
4152
4152
  (elementId, updates) => {
4153
- if (chunk3NDRTC7T_js.isTemplateElementId(elementId)) {
4153
+ if (chunk4GX347MG_js.isTemplateElementId(elementId)) {
4154
4154
  const slideId = activeSlide?.id;
4155
4155
  if (slideId) {
4156
4156
  setTemplateElementsBySlideId((prev) => ({
@@ -4190,7 +4190,7 @@ function useElementOperations(input) {
4190
4190
  );
4191
4191
  const updateSelectedShapeStyle = react.useCallback(
4192
4192
  (updates) => {
4193
- if (!selectedElement || !chunk3NDRTC7T_js.hasShapeProperties(selectedElement)) {
4193
+ if (!selectedElement || !chunk4GX347MG_js.hasShapeProperties(selectedElement)) {
4194
4194
  return;
4195
4195
  }
4196
4196
  updateSelectedElement({
@@ -4201,17 +4201,17 @@ function useElementOperations(input) {
4201
4201
  );
4202
4202
  const updateSelectedTextStyle = react.useCallback(
4203
4203
  (updates) => {
4204
- if (!selectedElement || !chunk3NDRTC7T_js.hasTextProperties(selectedElement)) {
4204
+ if (!selectedElement || !chunk4GX347MG_js.hasTextProperties(selectedElement)) {
4205
4205
  return;
4206
4206
  }
4207
- const inlineSel = chunk3NDRTC7T_js.getInlineEditorSelection(selectedElement.textSegments);
4207
+ const inlineSel = chunk4GX347MG_js.getInlineEditorSelection(selectedElement.textSegments);
4208
4208
  if (inlineSel && selectedElement.textSegments) {
4209
- const { newSegments: newSegments2, newSelection } = chunk3NDRTC7T_js.applyStyleToSelectedSegments(
4209
+ const { newSegments: newSegments2, newSelection } = chunk4GX347MG_js.applyStyleToSelectedSegments(
4210
4210
  selectedElement.textSegments,
4211
4211
  inlineSel,
4212
4212
  updates
4213
4213
  );
4214
- chunk3NDRTC7T_js.setPendingSelectionRestore(newSelection);
4214
+ chunk4GX347MG_js.setPendingSelectionRestore(newSelection);
4215
4215
  updateSelectedElement({
4216
4216
  textSegments: newSegments2
4217
4217
  });
@@ -4231,12 +4231,12 @@ function useElementOperations(input) {
4231
4231
  );
4232
4232
  const updateSelectedTextCase = react.useCallback(
4233
4233
  (mode) => {
4234
- if (!selectedElement || !chunk3NDRTC7T_js.hasTextProperties(selectedElement)) {
4234
+ if (!selectedElement || !chunk4GX347MG_js.hasTextProperties(selectedElement)) {
4235
4235
  return;
4236
4236
  }
4237
- const inlineSel = chunk3NDRTC7T_js.getInlineEditorSelection(selectedElement.textSegments);
4237
+ const inlineSel = chunk4GX347MG_js.getInlineEditorSelection(selectedElement.textSegments);
4238
4238
  if (inlineSel && selectedElement.textSegments) {
4239
- const newSegments = chunk3NDRTC7T_js.applyCaseTransformToSegments(
4239
+ const newSegments = chunk4GX347MG_js.applyCaseTransformToSegments(
4240
4240
  selectedElement.textSegments,
4241
4241
  inlineSel,
4242
4242
  mode
@@ -4246,14 +4246,14 @@ function useElementOperations(input) {
4246
4246
  }
4247
4247
  const updates = {};
4248
4248
  if (selectedElement.textSegments && selectedElement.textSegments.length > 0) {
4249
- updates.textSegments = chunk3NDRTC7T_js.applyCaseTransformToSegments(
4249
+ updates.textSegments = chunk4GX347MG_js.applyCaseTransformToSegments(
4250
4250
  selectedElement.textSegments,
4251
4251
  null,
4252
4252
  mode
4253
4253
  );
4254
4254
  }
4255
4255
  if (typeof selectedElement.text === "string") {
4256
- updates.text = chunk3NDRTC7T_js.transformTextCase(selectedElement.text, mode);
4256
+ updates.text = chunk4GX347MG_js.transformTextCase(selectedElement.text, mode);
4257
4257
  }
4258
4258
  updateSelectedElement(updates);
4259
4259
  },
@@ -4308,7 +4308,7 @@ function useSectionOperations(input) {
4308
4308
  const { sections, setSections, slides, setSlides, markDirty } = input;
4309
4309
  const addSection2 = react.useCallback(
4310
4310
  (name, afterSlideIndex) => {
4311
- const result = chunk3NDRTC7T_js.addSection(sections, slides, name, afterSlideIndex);
4311
+ const result = chunk4GX347MG_js.addSection(sections, slides, name, afterSlideIndex);
4312
4312
  setSlides(result.slides);
4313
4313
  setSections(result.sections);
4314
4314
  markDirty();
@@ -4317,7 +4317,7 @@ function useSectionOperations(input) {
4317
4317
  );
4318
4318
  const renameSection2 = react.useCallback(
4319
4319
  (sectionId, newName) => {
4320
- const result = chunk3NDRTC7T_js.renameSection(sections, slides, sectionId, newName);
4320
+ const result = chunk4GX347MG_js.renameSection(sections, slides, sectionId, newName);
4321
4321
  setSections(result.sections);
4322
4322
  setSlides(result.slides);
4323
4323
  markDirty();
@@ -4326,7 +4326,7 @@ function useSectionOperations(input) {
4326
4326
  );
4327
4327
  const deleteSection2 = react.useCallback(
4328
4328
  (sectionId) => {
4329
- const result = chunk3NDRTC7T_js.deleteSection(sections, slides, sectionId);
4329
+ const result = chunk4GX347MG_js.deleteSection(sections, slides, sectionId);
4330
4330
  setSections(result.sections);
4331
4331
  setSlides(result.slides);
4332
4332
  markDirty();
@@ -4335,21 +4335,21 @@ function useSectionOperations(input) {
4335
4335
  );
4336
4336
  const moveSectionUp2 = react.useCallback(
4337
4337
  (sectionId) => {
4338
- setSections(chunk3NDRTC7T_js.moveSectionUp(sections, sectionId));
4338
+ setSections(chunk4GX347MG_js.moveSectionUp(sections, sectionId));
4339
4339
  markDirty();
4340
4340
  },
4341
4341
  [sections, setSections, markDirty]
4342
4342
  );
4343
4343
  const moveSectionDown2 = react.useCallback(
4344
4344
  (sectionId) => {
4345
- setSections(chunk3NDRTC7T_js.moveSectionDown(sections, sectionId));
4345
+ setSections(chunk4GX347MG_js.moveSectionDown(sections, sectionId));
4346
4346
  markDirty();
4347
4347
  },
4348
4348
  [sections, setSections, markDirty]
4349
4349
  );
4350
4350
  const moveSlidesToSection2 = react.useCallback(
4351
4351
  (slideIndexes, targetSectionId) => {
4352
- const result = chunk3NDRTC7T_js.moveSlidesToSection(sections, slides, slideIndexes, targetSectionId);
4352
+ const result = chunk4GX347MG_js.moveSlidesToSection(sections, slides, slideIndexes, targetSectionId);
4353
4353
  setSlides(result.slides);
4354
4354
  setSections(result.sections);
4355
4355
  markDirty();
@@ -4368,19 +4368,19 @@ function useSectionOperations(input) {
4368
4368
 
4369
4369
  // src/viewer/hooks/pointer-move-handlers.ts
4370
4370
  function computeResizeGeometry(handle, startX, startY, startWidth, startHeight, dx, dy, snapToGrid, gridSpacingPx) {
4371
- const resized = chunk3NDRTC7T_js.applyResize(
4371
+ const resized = chunk4GX347MG_js.applyResize(
4372
4372
  { x: startX, y: startY, width: startWidth, height: startHeight },
4373
4373
  handle,
4374
4374
  dx,
4375
4375
  dy,
4376
4376
  1,
4377
- { minSize: chunkIN7D2T4R_js.MIN_ELEMENT_SIZE }
4377
+ { minSize: chunkP6KM7RO5_js.MIN_ELEMENT_SIZE }
4378
4378
  );
4379
4379
  const box = { x: resized.x, y: resized.y, width: resized.width, height: resized.height };
4380
4380
  if (!snapToGrid) {
4381
4381
  return box;
4382
4382
  }
4383
- return chunk3NDRTC7T_js.snapBoxToGrid(box, handle, gridSpacingPx, chunkIN7D2T4R_js.MIN_ELEMENT_SIZE);
4383
+ return chunk4GX347MG_js.snapBoxToGrid(box, handle, gridSpacingPx, chunkP6KM7RO5_js.MIN_ELEMENT_SIZE);
4384
4384
  }
4385
4385
  function computeAdjustmentValue(startAdjustment, dx, startWidth) {
4386
4386
  const range = startWidth || 200;
@@ -4498,7 +4498,7 @@ function processDragMove(e, drag, editorScale, snapToGrid, snapToShape, gridSpac
4498
4498
  width: el.width,
4499
4499
  height: el.height
4500
4500
  }));
4501
- const snapResult = chunk3NDRTC7T_js.computeSnapToShape(
4501
+ const snapResult = chunk4GX347MG_js.computeSnapToShape(
4502
4502
  targetX,
4503
4503
  targetY,
4504
4504
  primaryEl.width,
@@ -4537,7 +4537,7 @@ function processDragMove(e, drag, editorScale, snapToGrid, snapToShape, gridSpac
4537
4537
  if (live) {
4538
4538
  for (const id of Object.keys(drag.startPositionsById)) {
4539
4539
  const start = drag.startPositionsById[id];
4540
- chunk3NDRTC7T_js.publishLiveGeometry(live.patcher, live.slideId, id, {
4540
+ chunk4GX347MG_js.publishLiveGeometry(live.patcher, live.slideId, id, {
4541
4541
  x: start.x + appliedDx,
4542
4542
  y: start.y + appliedDy
4543
4543
  });
@@ -4571,15 +4571,15 @@ function processResizeMove(e, rs, editorScale, snapToGrid, gridSpacingPx, live)
4571
4571
  if (rs.domEl) {
4572
4572
  rs.domEl.style.left = `${geo.x}px`;
4573
4573
  rs.domEl.style.top = `${geo.y}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`;
4574
+ rs.domEl.style.width = `${Math.max(geo.width, chunkP6KM7RO5_js.MIN_ELEMENT_SIZE)}px`;
4575
+ rs.domEl.style.height = `${Math.max(geo.height, chunkP6KM7RO5_js.MIN_ELEMENT_SIZE)}px`;
4576
4576
  }
4577
4577
  if (live) {
4578
- chunk3NDRTC7T_js.publishLiveGeometry(live.patcher, live.slideId, rs.elementId, {
4578
+ chunk4GX347MG_js.publishLiveGeometry(live.patcher, live.slideId, rs.elementId, {
4579
4579
  x: geo.x,
4580
4580
  y: geo.y,
4581
- width: Math.max(geo.width, chunkIN7D2T4R_js.MIN_ELEMENT_SIZE),
4582
- height: Math.max(geo.height, chunkIN7D2T4R_js.MIN_ELEMENT_SIZE)
4581
+ width: Math.max(geo.width, chunkP6KM7RO5_js.MIN_ELEMENT_SIZE),
4582
+ height: Math.max(geo.height, chunkP6KM7RO5_js.MIN_ELEMENT_SIZE)
4583
4583
  });
4584
4584
  }
4585
4585
  }
@@ -4659,13 +4659,13 @@ function processPointerUp(input) {
4659
4659
  if (i !== activeSlideIndex) {
4660
4660
  return s;
4661
4661
  }
4662
- const rerouted = chunk3NDRTC7T_js.rerouteConnectorsForMovedElements(s.elements, movedIds);
4662
+ const rerouted = chunk4GX347MG_js.rerouteConnectorsForMovedElements(s.elements, movedIds);
4663
4663
  if (rerouted.length === 0) {
4664
4664
  return s;
4665
4665
  }
4666
4666
  return {
4667
4667
  ...s,
4668
- elements: chunk3NDRTC7T_js.applyReroutedConnectors(s.elements, rerouted)
4668
+ elements: chunk4GX347MG_js.applyReroutedConnectors(s.elements, rerouted)
4669
4669
  };
4670
4670
  })
4671
4671
  );
@@ -4687,9 +4687,9 @@ function processPointerUp(input) {
4687
4687
  }
4688
4688
  function commitMarquee(marquee, editTemplateMode, templateElements, activeSlide, applySelection, clearSelection) {
4689
4689
  const sourceElements = editTemplateMode ? templateElements : activeSlide?.elements ?? [];
4690
- const hitIds = chunk3NDRTC7T_js.computeMarqueeHitIds(marquee, sourceElements);
4690
+ const hitIds = chunk4GX347MG_js.computeMarqueeHitIds(marquee, sourceElements);
4691
4691
  if (marquee.additive) {
4692
- const merged = chunk3NDRTC7T_js.mergeAdditiveSelection(marquee.baseSelectionIds, hitIds);
4692
+ const merged = chunk4GX347MG_js.mergeAdditiveSelection(marquee.baseSelectionIds, hitIds);
4693
4693
  if (merged.length > 0) {
4694
4694
  applySelection(merged[0], merged);
4695
4695
  } else {
@@ -4712,8 +4712,8 @@ function commitDrag(drag, editTemplateMode, activeSlide, activeSlideIndex, setTe
4712
4712
  }
4713
4713
  return { ...el, x: start.x + dx, y: start.y + dy };
4714
4714
  });
4715
- const rerouted = chunk3NDRTC7T_js.rerouteConnectorsForMovedElements(movedElements, movedIds);
4716
- return chunk3NDRTC7T_js.applyReroutedConnectors(movedElements, rerouted);
4715
+ const rerouted = chunk4GX347MG_js.rerouteConnectorsForMovedElements(movedElements, movedIds);
4716
+ return chunk4GX347MG_js.applyReroutedConnectors(movedElements, rerouted);
4717
4717
  };
4718
4718
  if (editTemplateMode) {
4719
4719
  const slideId = activeSlide?.id;
@@ -4869,9 +4869,9 @@ function useCanvasInteractions(input) {
4869
4869
  return;
4870
4870
  }
4871
4871
  const el = elementLookup.get(editId);
4872
- if (el && chunk3NDRTC7T_js.hasTextProperties(el)) {
4872
+ if (el && chunk4GX347MG_js.hasTextProperties(el)) {
4873
4873
  const committedText = transformCommittedText ? transformCommittedText(inlineEditingText) : inlineEditingText;
4874
- const newSegments = chunk3NDRTC7T_js.remapTextToSegments(committedText, el.textSegments, el.textStyle);
4874
+ const newSegments = chunk4GX347MG_js.remapTextToSegments(committedText, el.textSegments, el.textStyle);
4875
4875
  ops.updateElementById(editId, {
4876
4876
  text: committedText,
4877
4877
  textSegments: newSegments
@@ -4882,7 +4882,7 @@ function useCanvasInteractions(input) {
4882
4882
  setInlineEditingText("");
4883
4883
  };
4884
4884
  const openEquationEditorForElement = (el) => {
4885
- if (!chunk3NDRTC7T_js.hasTextProperties(el)) {
4885
+ if (!chunk4GX347MG_js.hasTextProperties(el)) {
4886
4886
  return false;
4887
4887
  }
4888
4888
  const eqSeg = el.textSegments?.find((seg) => seg.equationXml);
@@ -4911,7 +4911,7 @@ function useCanvasInteractions(input) {
4911
4911
  justSelectedRef.current = false;
4912
4912
  } else {
4913
4913
  const el = elementLookup.get(elementId);
4914
- if (el && chunk3NDRTC7T_js.hasTextProperties(el) && !el.locks?.noTextEdit) {
4914
+ if (el && chunk4GX347MG_js.hasTextProperties(el) && !el.locks?.noTextEdit) {
4915
4915
  if (!openEquationEditorForElement(el)) {
4916
4916
  setInlineEditingElementId(elementId);
4917
4917
  setInlineEditingText(el.text ?? "");
@@ -4930,7 +4930,7 @@ function useCanvasInteractions(input) {
4930
4930
  if (openEquationEditorForElement(el)) {
4931
4931
  return;
4932
4932
  }
4933
- if (chunk3NDRTC7T_js.hasTextProperties(el)) {
4933
+ if (chunk4GX347MG_js.hasTextProperties(el)) {
4934
4934
  setInlineEditingElementId(elementId);
4935
4935
  setInlineEditingText(el.text ?? "");
4936
4936
  }
@@ -5123,7 +5123,7 @@ function createFileHandlers(deps) {
5123
5123
  h = Math.round(h * scale);
5124
5124
  }
5125
5125
  addElement({
5126
- id: chunk3NDRTC7T_js.generateElementId(),
5126
+ id: chunk4GX347MG_js.generateElementId(),
5127
5127
  type: "image",
5128
5128
  x: Math.round((canvasSize.width - w) / 2),
5129
5129
  y: Math.round((canvasSize.height - h) / 2),
@@ -5134,7 +5134,7 @@ function createFileHandlers(deps) {
5134
5134
  };
5135
5135
  img.onerror = () => {
5136
5136
  addElement({
5137
- id: chunk3NDRTC7T_js.generateElementId(),
5137
+ id: chunk4GX347MG_js.generateElementId(),
5138
5138
  type: "image",
5139
5139
  x: 100,
5140
5140
  y: 100,
@@ -5160,7 +5160,7 @@ function createFileHandlers(deps) {
5160
5160
  const elFilePath = file.path;
5161
5161
  const insertMediaElement = (mediaSourceUrl, width, height) => {
5162
5162
  addElement({
5163
- id: chunk3NDRTC7T_js.generateElementId(),
5163
+ id: chunk4GX347MG_js.generateElementId(),
5164
5164
  type: "media",
5165
5165
  mediaType,
5166
5166
  mediaMimeType: file.type || void 0,
@@ -5335,13 +5335,13 @@ function createStructuredElementHandlers(deps) {
5335
5335
  return;
5336
5336
  }
5337
5337
  addElement({
5338
- id: chunk3NDRTC7T_js.generateElementId(),
5338
+ id: chunk4GX347MG_js.generateElementId(),
5339
5339
  type: "smartArt",
5340
5340
  x: 100,
5341
5341
  y: 120,
5342
5342
  width: 600,
5343
5343
  height: 340,
5344
- smartArtData: chunk3NDRTC7T_js.buildSmartArtPresetData(
5344
+ smartArtData: chunk4GX347MG_js.buildSmartArtPresetData(
5345
5345
  layout,
5346
5346
  defaultItems,
5347
5347
  (i) => `node-${Date.now()}-${i}-${Math.random().toString(36).slice(2, 8)}`
@@ -5353,7 +5353,7 @@ function createStructuredElementHandlers(deps) {
5353
5353
  return;
5354
5354
  }
5355
5355
  addElement({
5356
- id: chunk3NDRTC7T_js.generateElementId(),
5356
+ id: chunk4GX347MG_js.generateElementId(),
5357
5357
  type: "shape",
5358
5358
  x: 120,
5359
5359
  y: 200,
@@ -5412,7 +5412,7 @@ function createStructuredElementHandlers(deps) {
5412
5412
  const displayText = value || fieldTexts[fieldType] || fieldType;
5413
5413
  const fieldGuid = `{${crypto.randomUUID().toUpperCase()}}`;
5414
5414
  addElement({
5415
- id: chunk3NDRTC7T_js.generateElementId(),
5415
+ id: chunk4GX347MG_js.generateElementId(),
5416
5416
  type: "shape",
5417
5417
  x: 120,
5418
5418
  y: 200,
@@ -5434,11 +5434,11 @@ function createStructuredElementHandlers(deps) {
5434
5434
  if (!activeSlide) {
5435
5435
  return;
5436
5436
  }
5437
- const preset = chunk3NDRTC7T_js.ACTION_BUTTON_PRESETS.find((p) => p.shapeType === shapeType);
5437
+ const preset = chunk4GX347MG_js.ACTION_BUTTON_PRESETS.find((p) => p.shapeType === shapeType);
5438
5438
  if (!preset) {
5439
5439
  return;
5440
5440
  }
5441
- const defaultPptxAction = chunk3NDRTC7T_js.elementActionToPptxAction({
5441
+ const defaultPptxAction = chunk4GX347MG_js.elementActionToPptxAction({
5442
5442
  trigger: "click",
5443
5443
  type: preset.defaultAction
5444
5444
  });
@@ -5447,7 +5447,7 @@ function createStructuredElementHandlers(deps) {
5447
5447
  defaultPptxAction.highlightClick = true;
5448
5448
  }
5449
5449
  addElement({
5450
- id: chunk3NDRTC7T_js.generateElementId(),
5450
+ id: chunk4GX347MG_js.generateElementId(),
5451
5451
  type: "shape",
5452
5452
  x: 150,
5453
5453
  y: 150,
@@ -5514,14 +5514,14 @@ function useInsertElements(input) {
5514
5514
  return;
5515
5515
  }
5516
5516
  addElement({
5517
- id: chunk3NDRTC7T_js.generateElementId(),
5517
+ id: chunk4GX347MG_js.generateElementId(),
5518
5518
  type: "text",
5519
5519
  x: 100,
5520
5520
  y: 100,
5521
5521
  width: 300,
5522
5522
  height: 60,
5523
5523
  text: "",
5524
- textStyle: { fontSize: chunkIN7D2T4R_js.DEFAULT_TEXT_FONT_SIZE }
5524
+ textStyle: { fontSize: chunkP6KM7RO5_js.DEFAULT_TEXT_FONT_SIZE }
5525
5525
  });
5526
5526
  };
5527
5527
  const handleAddShape = () => {
@@ -5529,7 +5529,7 @@ function useInsertElements(input) {
5529
5529
  return;
5530
5530
  }
5531
5531
  addElement({
5532
- id: chunk3NDRTC7T_js.generateElementId(),
5532
+ id: chunk4GX347MG_js.generateElementId(),
5533
5533
  type: "shape",
5534
5534
  x: 150,
5535
5535
  y: 150,
@@ -5548,15 +5548,15 @@ function useInsertElements(input) {
5548
5548
  return;
5549
5549
  }
5550
5550
  addElement({
5551
- ...chunk3NDRTC7T_js.newTableElement(chunkIN7D2T4R_js.DEFAULT_TABLE_ROWS, chunkIN7D2T4R_js.DEFAULT_TABLE_COLUMNS, 100, 200),
5552
- id: chunk3NDRTC7T_js.generateElementId()
5551
+ ...chunk4GX347MG_js.newTableElement(chunkP6KM7RO5_js.DEFAULT_TABLE_ROWS, chunkP6KM7RO5_js.DEFAULT_TABLE_COLUMNS, 100, 200),
5552
+ id: chunk4GX347MG_js.generateElementId()
5553
5553
  });
5554
5554
  };
5555
5555
  const handleAddChart = (chartKind) => {
5556
5556
  if (!activeSlide) {
5557
5557
  return;
5558
5558
  }
5559
- addElement(chunk3NDRTC7T_js.createDefaultChartElement(chartKind));
5559
+ addElement(chunk4GX347MG_js.createDefaultChartElement(chartKind));
5560
5560
  };
5561
5561
  const structured = createStructuredElementHandlers({
5562
5562
  activeSlide,
@@ -5626,7 +5626,7 @@ function useClipboardHandlers(input) {
5626
5626
  if (!selectedElement) {
5627
5627
  return;
5628
5628
  }
5629
- setClipboardPayload(chunk3NDRTC7T_js.buildElementClipboardPayload(selectedElement, editTemplateMode));
5629
+ setClipboardPayload(chunk4GX347MG_js.buildElementClipboardPayload(selectedElement, editTemplateMode));
5630
5630
  };
5631
5631
  const handleDelete = () => {
5632
5632
  const idsToDelete = effectiveSelectedIds;
@@ -5643,7 +5643,7 @@ function useClipboardHandlers(input) {
5643
5643
  handleDelete();
5644
5644
  };
5645
5645
  const insertClone = (source) => {
5646
- const clone = chunk3NDRTC7T_js.cloneElementForPaste(source, { intoTemplate: editTemplateMode });
5646
+ const clone = chunk4GX347MG_js.cloneElementForPaste(source, { intoTemplate: editTemplateMode });
5647
5647
  ops.updateActiveElements((els) => [...els, clone]);
5648
5648
  ops.applySelection(clone.id);
5649
5649
  history.markDirty();
@@ -5678,7 +5678,7 @@ function resolveShapePath(el) {
5678
5678
  return el.pathData;
5679
5679
  }
5680
5680
  if ("shapeType" in el && typeof el.shapeType === "string") {
5681
- const clipPath = chunk3NDRTC7T_js.getPresetShapeClipPath(el.shapeType);
5681
+ const clipPath = chunk4GX347MG_js.getPresetShapeClipPath(el.shapeType);
5682
5682
  if (clipPath) {
5683
5683
  const svgPath = clipPathToSvgPath(clipPath, el.width, el.height);
5684
5684
  if (svgPath) {
@@ -5729,7 +5729,7 @@ function clipPathToSvgPath(clipPath, width, height) {
5729
5729
  return parts.join(" ");
5730
5730
  }
5731
5731
  function transformPathToGlobal(pathData, el) {
5732
- const polys = chunk3NDRTC7T_js.svgPathToPolygons(pathData);
5732
+ const polys = chunk4GX347MG_js.svgPathToPolygons(pathData);
5733
5733
  if (polys.length === 0) {
5734
5734
  return pathData;
5735
5735
  }
@@ -5749,10 +5749,10 @@ function transformPathToGlobal(pathData, el) {
5749
5749
  y: pt.y * scaleY + el.y
5750
5750
  }))
5751
5751
  );
5752
- return chunk3NDRTC7T_js.polygonsToSvgPath(transformed);
5752
+ return chunk4GX347MG_js.polygonsToSvgPath(transformed);
5753
5753
  }
5754
5754
  function transformPathToLocal(pathData, x, y, _width, _height) {
5755
- const polys = chunk3NDRTC7T_js.svgPathToPolygons(pathData);
5755
+ const polys = chunk4GX347MG_js.svgPathToPolygons(pathData);
5756
5756
  if (polys.length === 0) {
5757
5757
  return pathData;
5758
5758
  }
@@ -5762,10 +5762,10 @@ function transformPathToLocal(pathData, x, y, _width, _height) {
5762
5762
  y: pt.y - y
5763
5763
  }))
5764
5764
  );
5765
- return chunk3NDRTC7T_js.polygonsToSvgPath(transformed);
5765
+ return chunk4GX347MG_js.polygonsToSvgPath(transformed);
5766
5766
  }
5767
5767
  function pathBounds(pathData) {
5768
- const polys = chunk3NDRTC7T_js.svgPathToPolygons(pathData);
5768
+ const polys = chunk4GX347MG_js.svgPathToPolygons(pathData);
5769
5769
  let minX = Infinity;
5770
5770
  let minY = Infinity;
5771
5771
  let maxX = -Infinity;
@@ -5824,7 +5824,7 @@ function useMergeShapesHandler(input) {
5824
5824
  let allFragments = [];
5825
5825
  let remaining = globalPaths[0];
5826
5826
  for (let i = 1; i < globalPaths.length; i++) {
5827
- const frags = chunk3NDRTC7T_js.mergeShapes("fragment", remaining, globalPaths[i]);
5827
+ const frags = chunk4GX347MG_js.mergeShapes("fragment", remaining, globalPaths[i]);
5828
5828
  if (Array.isArray(frags)) {
5829
5829
  allFragments = frags;
5830
5830
  }
@@ -5853,7 +5853,7 @@ function useMergeShapesHandler(input) {
5853
5853
  bounds.height
5854
5854
  );
5855
5855
  const newEl = {
5856
- id: chunk3NDRTC7T_js.generateElementId(),
5856
+ id: chunk4GX347MG_js.generateElementId(),
5857
5857
  type: "shape",
5858
5858
  x: bounds.x,
5859
5859
  y: bounds.y,
@@ -5891,7 +5891,7 @@ function useMergeShapesHandler(input) {
5891
5891
  } else {
5892
5892
  let resultPath = globalPaths[0];
5893
5893
  for (let i = 1; i < globalPaths.length; i++) {
5894
- const result = chunk3NDRTC7T_js.mergeShapes(operation, resultPath, globalPaths[i]);
5894
+ const result = chunk4GX347MG_js.mergeShapes(operation, resultPath, globalPaths[i]);
5895
5895
  if (typeof result === "string") {
5896
5896
  resultPath = result;
5897
5897
  }
@@ -5912,7 +5912,7 @@ function useMergeShapesHandler(input) {
5912
5912
  );
5913
5913
  const primary = targets[0];
5914
5914
  const newEl = {
5915
- id: chunk3NDRTC7T_js.generateElementId(),
5915
+ id: chunk4GX347MG_js.generateElementId(),
5916
5916
  type: "shape",
5917
5917
  x: bounds.x,
5918
5918
  y: bounds.y,
@@ -5975,7 +5975,7 @@ function useGroupAlignLayerHandlers(input) {
5975
5975
  if (ids.length < 2 || !activeSlide) {
5976
5976
  return;
5977
5977
  }
5978
- const { elements, groupId } = chunk3NDRTC7T_js.groupElements(ops.activeElements, ids, chunk3NDRTC7T_js.generateElementId());
5978
+ const { elements, groupId } = chunk4GX347MG_js.groupElements(ops.activeElements, ids, chunk4GX347MG_js.generateElementId());
5979
5979
  if (groupId === null) {
5980
5980
  return;
5981
5981
  }
@@ -5988,12 +5988,12 @@ function useGroupAlignLayerHandlers(input) {
5988
5988
  return;
5989
5989
  }
5990
5990
  const group = selectedElement;
5991
- const intoTemplate = chunk3NDRTC7T_js.isTemplateElementId(group.id);
5991
+ const intoTemplate = chunk4GX347MG_js.isTemplateElementId(group.id);
5992
5992
  const ungrouped = group.children.map((child) => ({
5993
5993
  ...structuredClone(child),
5994
5994
  // Keep child ids in the same store as the group so later edits route
5995
5995
  // correctly: template groups yield template-prefixed child ids.
5996
- id: intoTemplate ? chunk3NDRTC7T_js.makeCloneId(true, child.id || group.id) : child.id || chunk3NDRTC7T_js.generateElementId(),
5996
+ id: intoTemplate ? chunk4GX347MG_js.makeCloneId(true, child.id || group.id) : child.id || chunk4GX347MG_js.generateElementId(),
5997
5997
  x: child.x + group.x,
5998
5998
  y: child.y + group.y
5999
5999
  }));
@@ -6017,7 +6017,7 @@ function useGroupAlignLayerHandlers(input) {
6017
6017
  if (!edge) {
6018
6018
  return;
6019
6019
  }
6020
- const positions = chunk3NDRTC7T_js.alignElements(selectedElements, edge);
6020
+ const positions = chunk4GX347MG_js.alignElements(selectedElements, edge);
6021
6021
  for (const [id, pos] of positions) {
6022
6022
  const el = elementLookup.get(id);
6023
6023
  if (!el) {
@@ -6035,7 +6035,7 @@ function useGroupAlignLayerHandlers(input) {
6035
6035
  if (!distAxis) {
6036
6036
  return;
6037
6037
  }
6038
- const positions = chunk3NDRTC7T_js.distributeElements(selectedElements, distAxis);
6038
+ const positions = chunk4GX347MG_js.distributeElements(selectedElements, distAxis);
6039
6039
  for (const [id, pos] of positions) {
6040
6040
  const el = elementLookup.get(id);
6041
6041
  if (!el) {
@@ -6052,7 +6052,7 @@ function useGroupAlignLayerHandlers(input) {
6052
6052
  }
6053
6053
  const id = selectedElement.id;
6054
6054
  ops.updateActiveElements(
6055
- (els) => direction === "forward" ? chunk3NDRTC7T_js.bringForward(els, id) : direction === "backward" ? chunk3NDRTC7T_js.sendBackward(els, id) : els
6055
+ (els) => direction === "forward" ? chunk4GX347MG_js.bringForward(els, id) : direction === "backward" ? chunk4GX347MG_js.sendBackward(els, id) : els
6056
6056
  );
6057
6057
  history.markDirty();
6058
6058
  };
@@ -6062,7 +6062,7 @@ function useGroupAlignLayerHandlers(input) {
6062
6062
  }
6063
6063
  const id = selectedElement.id;
6064
6064
  ops.updateActiveElements(
6065
- (els) => direction === "front" ? chunk3NDRTC7T_js.bringToFront(els, id) : chunk3NDRTC7T_js.sendToBack(els, id)
6065
+ (els) => direction === "front" ? chunk4GX347MG_js.bringToFront(els, id) : chunk4GX347MG_js.sendToBack(els, id)
6066
6066
  );
6067
6067
  history.markDirty();
6068
6068
  };
@@ -6193,7 +6193,7 @@ function useSlideManagement(input) {
6193
6193
  theme
6194
6194
  } = input;
6195
6195
  const handleAddSlide = () => {
6196
- const newSlide = chunk3NDRTC7T_js.createBlankSlide(slides.length + 1);
6196
+ const newSlide = chunk4GX347MG_js.createBlankSlide(slides.length + 1);
6197
6197
  ops.updateSlides((prev) => {
6198
6198
  const next = [...prev];
6199
6199
  next.splice(activeSlideIndex + 1, 0, newSlide);
@@ -6256,7 +6256,7 @@ function useSlideManagement(input) {
6256
6256
  }
6257
6257
  const clone = {
6258
6258
  ...src,
6259
- id: chunk3NDRTC7T_js.makeSlideId(),
6259
+ id: chunk4GX347MG_js.makeSlideId(),
6260
6260
  elements: src.elements.map((el) => ({
6261
6261
  ...el,
6262
6262
  id: `${el.id}-dup-${Math.random().toString(36).slice(2, 6)}`
@@ -6288,7 +6288,7 @@ function useSlideManagement(input) {
6288
6288
  const handleInsertSlideFromLayout = (layoutPath, layoutName) => {
6289
6289
  const insertAt = activeSlideIndex + 1;
6290
6290
  const draft = {
6291
- ...chunk3NDRTC7T_js.createBlankSlide(slides.length + 1),
6291
+ ...chunk4GX347MG_js.createBlankSlide(slides.length + 1),
6292
6292
  layoutPath,
6293
6293
  ...layoutName ? { layoutName } : {}
6294
6294
  };
@@ -6321,9 +6321,9 @@ function useSlideManagement(input) {
6321
6321
  };
6322
6322
  const handleInsertSlideFromTemplate = (templateId) => {
6323
6323
  const insertAt = activeSlideIndex + 1;
6324
- const draft = chunk3NDRTC7T_js.buildSlideTemplateSlide(templateId, chunk3NDRTC7T_js.makeSlideId(), slides.length + 1, {
6324
+ const draft = chunk4GX347MG_js.buildSlideTemplateSlide(templateId, chunk4GX347MG_js.makeSlideId(), slides.length + 1, {
6325
6325
  ...canvasSize ? { slideWidth: canvasSize.width, slideHeight: canvasSize.height } : {},
6326
- scheme: chunk3NDRTC7T_js.templateSchemeFromTheme(theme?.colorScheme)
6326
+ scheme: chunk4GX347MG_js.templateSchemeFromTheme(theme?.colorScheme)
6327
6327
  });
6328
6328
  ops.updateSlides((prev) => insertSlideFromLayoutUpdater(prev, activeSlideIndex, draft));
6329
6329
  setActiveSlideIndex(insertAt);
@@ -6360,7 +6360,7 @@ function createTableMergeHandlers(input) {
6360
6360
  if (!nextCell || nextCell.hMerge || nextCell.vMerge) {
6361
6361
  return;
6362
6362
  }
6363
- const newTableData = chunk3NDRTC7T_js.mergeCells(
6363
+ const newTableData = chunk4GX347MG_js.mergeCells(
6364
6364
  [
6365
6365
  { row: rowIndex, col: columnIndex },
6366
6366
  { row: rowIndex, col: nextColIdx }
@@ -6368,7 +6368,7 @@ function createTableMergeHandlers(input) {
6368
6368
  td
6369
6369
  );
6370
6370
  const updates = { tableData: newTableData };
6371
- const newRawXml = chunk3NDRTC7T_js.updateMergeAttrsInRawXml(selectedElement, newTableData);
6371
+ const newRawXml = chunk4GX347MG_js.updateMergeAttrsInRawXml(selectedElement, newTableData);
6372
6372
  if (newRawXml) {
6373
6373
  updates.rawXml = newRawXml;
6374
6374
  }
@@ -6394,7 +6394,7 @@ function createTableMergeHandlers(input) {
6394
6394
  if (!targetNextCell || targetNextCell.hMerge || targetNextCell.vMerge) {
6395
6395
  return;
6396
6396
  }
6397
- const newTableData = chunk3NDRTC7T_js.mergeCells(
6397
+ const newTableData = chunk4GX347MG_js.mergeCells(
6398
6398
  [
6399
6399
  { row: rowIndex, col: columnIndex },
6400
6400
  { row: targetNextRowIdx, col: columnIndex }
@@ -6402,7 +6402,7 @@ function createTableMergeHandlers(input) {
6402
6402
  td
6403
6403
  );
6404
6404
  const updates = { tableData: newTableData };
6405
- const newRawXml = chunk3NDRTC7T_js.updateMergeAttrsInRawXml(selectedElement, newTableData);
6405
+ const newRawXml = chunk4GX347MG_js.updateMergeAttrsInRawXml(selectedElement, newTableData);
6406
6406
  if (newRawXml) {
6407
6407
  updates.rawXml = newRawXml;
6408
6408
  }
@@ -6417,9 +6417,9 @@ function createTableMergeHandlers(input) {
6417
6417
  return;
6418
6418
  }
6419
6419
  const td = selectedElement.tableData;
6420
- const newTableData = chunk3NDRTC7T_js.mergeCells(ts.selectedCells, td);
6420
+ const newTableData = chunk4GX347MG_js.mergeCells(ts.selectedCells, td);
6421
6421
  const updates = { tableData: newTableData };
6422
- const newRawXml = chunk3NDRTC7T_js.updateMergeAttrsInRawXml(selectedElement, newTableData);
6422
+ const newRawXml = chunk4GX347MG_js.updateMergeAttrsInRawXml(selectedElement, newTableData);
6423
6423
  if (newRawXml) {
6424
6424
  updates.rawXml = newRawXml;
6425
6425
  }
@@ -6436,9 +6436,9 @@ function createTableMergeHandlers(input) {
6436
6436
  }
6437
6437
  const { rowIndex, columnIndex } = ts;
6438
6438
  const td = selectedElement.tableData;
6439
- const newTableData = chunk3NDRTC7T_js.splitCell(rowIndex, columnIndex, td);
6439
+ const newTableData = chunk4GX347MG_js.splitCell(rowIndex, columnIndex, td);
6440
6440
  const updates = { tableData: newTableData };
6441
- const newRawXml = chunk3NDRTC7T_js.updateMergeAttrsInRawXml(selectedElement, newTableData);
6441
+ const newRawXml = chunk4GX347MG_js.updateMergeAttrsInRawXml(selectedElement, newTableData);
6442
6442
  if (newRawXml) {
6443
6443
  updates.rawXml = newRawXml;
6444
6444
  }
@@ -6482,7 +6482,7 @@ function createTableStructHandlers(input) {
6482
6482
  updates.tableData = { ...el.tableData, rows: newRows };
6483
6483
  }
6484
6484
  if (el.rawXml) {
6485
- const newRawXml = chunk3NDRTC7T_js.updateCellTextInRawXml(el, rowIndex, colIndex, text);
6485
+ const newRawXml = chunk4GX347MG_js.updateCellTextInRawXml(el, rowIndex, colIndex, text);
6486
6486
  if (newRawXml) {
6487
6487
  updates.rawXml = newRawXml;
6488
6488
  }
@@ -6506,7 +6506,7 @@ function createTableStructHandlers(input) {
6506
6506
  const { rowIndex, columnIndex: colIndex } = ts;
6507
6507
  const updates = {};
6508
6508
  if (selectedElement.rawXml) {
6509
- const newRawXml = chunk3NDRTC7T_js.updateCellTextStyleInRawXml(
6509
+ const newRawXml = chunk4GX347MG_js.updateCellTextStyleInRawXml(
6510
6510
  selectedElement,
6511
6511
  rowIndex,
6512
6512
  colIndex,
@@ -6570,9 +6570,9 @@ function createTableStructHandlers(input) {
6570
6570
  return;
6571
6571
  }
6572
6572
  const rowIdx = ts?.rowIndex ?? 0;
6573
- const newTableData = chunk3NDRTC7T_js.insertTableRow(selectedElement.tableData, rowIdx, position);
6573
+ const newTableData = chunk4GX347MG_js.insertTableRow(selectedElement.tableData, rowIdx, position);
6574
6574
  const updates = { tableData: newTableData };
6575
- const newRawXml = chunk3NDRTC7T_js.rebuildTableStructureInRawXml(selectedElement, newTableData);
6575
+ const newRawXml = chunk4GX347MG_js.rebuildTableStructureInRawXml(selectedElement, newTableData);
6576
6576
  if (newRawXml) {
6577
6577
  updates.rawXml = newRawXml;
6578
6578
  }
@@ -6585,12 +6585,12 @@ function createTableStructHandlers(input) {
6585
6585
  }
6586
6586
  const td = selectedElement.tableData;
6587
6587
  const rowIdx = ts?.rowIndex ?? 0;
6588
- const newTableData = chunk3NDRTC7T_js.deleteTableRow(td, rowIdx);
6588
+ const newTableData = chunk4GX347MG_js.deleteTableRow(td, rowIdx);
6589
6589
  if (newTableData === td) {
6590
6590
  return;
6591
6591
  }
6592
6592
  const updates = { tableData: newTableData };
6593
- const newRawXml = chunk3NDRTC7T_js.rebuildTableStructureInRawXml(selectedElement, newTableData);
6593
+ const newRawXml = chunk4GX347MG_js.rebuildTableStructureInRawXml(selectedElement, newTableData);
6594
6594
  if (newRawXml) {
6595
6595
  updates.rawXml = newRawXml;
6596
6596
  }
@@ -6602,9 +6602,9 @@ function createTableStructHandlers(input) {
6602
6602
  return;
6603
6603
  }
6604
6604
  const colIdx = ts?.columnIndex ?? 0;
6605
- const newTableData = chunk3NDRTC7T_js.insertTableColumn(selectedElement.tableData, colIdx, position);
6605
+ const newTableData = chunk4GX347MG_js.insertTableColumn(selectedElement.tableData, colIdx, position);
6606
6606
  const updates = { tableData: newTableData };
6607
- const newRawXml = chunk3NDRTC7T_js.rebuildTableStructureInRawXml(selectedElement, newTableData);
6607
+ const newRawXml = chunk4GX347MG_js.rebuildTableStructureInRawXml(selectedElement, newTableData);
6608
6608
  if (newRawXml) {
6609
6609
  updates.rawXml = newRawXml;
6610
6610
  }
@@ -6617,12 +6617,12 @@ function createTableStructHandlers(input) {
6617
6617
  }
6618
6618
  const td = selectedElement.tableData;
6619
6619
  const colIdx = ts?.columnIndex ?? 0;
6620
- const newTableData = chunk3NDRTC7T_js.deleteTableColumn(td, colIdx);
6620
+ const newTableData = chunk4GX347MG_js.deleteTableColumn(td, colIdx);
6621
6621
  if (newTableData === td) {
6622
6622
  return;
6623
6623
  }
6624
6624
  const updates = { tableData: newTableData };
6625
- const newRawXml = chunk3NDRTC7T_js.rebuildTableStructureInRawXml(selectedElement, newTableData);
6625
+ const newRawXml = chunk4GX347MG_js.rebuildTableStructureInRawXml(selectedElement, newTableData);
6626
6626
  if (newRawXml) {
6627
6627
  updates.rawXml = newRawXml;
6628
6628
  }
@@ -6658,8 +6658,8 @@ async function renderToCanvas(element, options = {}) {
6658
6658
  return html2canvasPro(element, {
6659
6659
  ...options,
6660
6660
  onclone: async (doc, clonedEl) => {
6661
- await chunk3NDRTC7T_js.normalizeColorsForCapture(doc, clonedEl);
6662
- chunk3NDRTC7T_js.preprocessCssForCapture(clonedEl);
6661
+ await chunk4GX347MG_js.normalizeColorsForCapture(doc, clonedEl);
6662
+ chunk4GX347MG_js.preprocessCssForCapture(clonedEl);
6663
6663
  if (typeof userOnClone === "function") {
6664
6664
  userOnClone(doc, clonedEl);
6665
6665
  }
@@ -6715,7 +6715,7 @@ async function exportSlideToPngBlob(slideElement, options = {}) {
6715
6715
  }
6716
6716
  async function exportSlideAsPng(slideElement, slideIndex, options = {}) {
6717
6717
  const blob = await exportSlideToPngBlob(slideElement, options);
6718
- chunk3NDRTC7T_js.downloadBlob(blob, `slide-${slideIndex + 1}.png`);
6718
+ chunk4GX347MG_js.downloadBlob(blob, `slide-${slideIndex + 1}.png`);
6719
6719
  }
6720
6720
  async function copySlideToClipboard(slideElement, options = {}) {
6721
6721
  const blob = await exportSlideToPngBlob(slideElement, options);
@@ -6737,15 +6737,15 @@ async function exportAllSlidesAsPdf(slideStageRef, totalSlides, setActiveSlide,
6737
6737
  continue;
6738
6738
  }
6739
6739
  const canvas = await renderElementToCanvas(stageEl, scale);
6740
- images.push(chunk3NDRTC7T_js.canvasToJpegData(canvas));
6740
+ images.push(chunk4GX347MG_js.canvasToJpegData(canvas));
6741
6741
  }
6742
6742
  onProgress?.(totalSlides, totalSlides);
6743
6743
  setActiveSlide(currentSlideIndex);
6744
6744
  if (images.length === 0) {
6745
6745
  throw new Error(chunk3ISYPBSX_js.translationsEn["pptx.export.errorNoSlidesPdf"]);
6746
6746
  }
6747
- const pdfBlobUrl = chunkIN7D2T4R_js.buildPdfFromImageData(images);
6748
- chunk3NDRTC7T_js.downloadDataUrl(pdfBlobUrl, filename);
6747
+ const pdfBlobUrl = chunkP6KM7RO5_js.buildPdfFromImageData(images);
6748
+ chunk4GX347MG_js.downloadDataUrl(pdfBlobUrl, filename);
6749
6749
  }
6750
6750
  async function captureAllSlidesAsPngDataUrls(slideStageRef, totalSlides, setActiveSlide, currentSlideIndex, options = {}) {
6751
6751
  const { scale = 2, onProgress } = options;
@@ -6793,8 +6793,8 @@ async function exportAllSlidesAsNotesPdf(slideStageRef, totalSlides, setActiveSl
6793
6793
  if (pages.length === 0) {
6794
6794
  throw new Error(chunk3ISYPBSX_js.translationsEn["pptx.export.errorNoSlidesNotesPdf"]);
6795
6795
  }
6796
- const pdfDataUrl = chunkIN7D2T4R_js.buildNotesPdf(pages);
6797
- chunk3NDRTC7T_js.downloadDataUrl(pdfDataUrl, filename);
6796
+ const pdfDataUrl = chunkP6KM7RO5_js.buildNotesPdf(pages);
6797
+ chunk4GX347MG_js.downloadDataUrl(pdfDataUrl, filename);
6798
6798
  }
6799
6799
 
6800
6800
  // src/viewer/utils/export-video.ts
@@ -6838,7 +6838,7 @@ async function exportAllSlidesAsVideo(slideStageRef, totalSlides, setActiveSlide
6838
6838
  const fps = 30;
6839
6839
  const stream = recordingCanvas.captureStream(fps);
6840
6840
  const recorder = new MediaRecorder(stream, {
6841
- mimeType: chunk3NDRTC7T_js.pickSupportedMimeType([...chunk3NDRTC7T_js.WEBM_MIME_CANDIDATES]),
6841
+ mimeType: chunk4GX347MG_js.pickSupportedMimeType([...chunk4GX347MG_js.WEBM_MIME_CANDIDATES]),
6842
6842
  videoBitsPerSecond: 5e6
6843
6843
  });
6844
6844
  const chunks = [];
@@ -6861,8 +6861,8 @@ async function exportAllSlidesAsVideo(slideStageRef, totalSlides, setActiveSlide
6861
6861
  const duration = slideTimingsMs?.[i] ?? slideDurationMs;
6862
6862
  ctx.clearRect(0, 0, recordingCanvas.width, recordingCanvas.height);
6863
6863
  ctx.drawImage(slideCanvases[i], 0, 0);
6864
- const frameInterval = chunk3NDRTC7T_js.fpsToFrameIntervalMs(fps);
6865
- const framesNeeded = chunk3NDRTC7T_js.segmentFrameCount(duration, fps);
6864
+ const frameInterval = chunk4GX347MG_js.fpsToFrameIntervalMs(fps);
6865
+ const framesNeeded = chunk4GX347MG_js.segmentFrameCount(duration, fps);
6866
6866
  for (let f = 0; f < framesNeeded; f++) {
6867
6867
  if (signal?.aborted) {
6868
6868
  recorder.stop();
@@ -6911,7 +6911,7 @@ async function exportAllSlidesAsGif(slideStageRef, totalSlides, setActiveSlide,
6911
6911
  if (frames.length === 0) {
6912
6912
  throw new Error(chunk3ISYPBSX_js.translationsEn["pptx.export.errorNoSlidesGif"]);
6913
6913
  }
6914
- const gifBytes = chunk3NDRTC7T_js.encodeGif(frames, Math.round(slideDurationMs / 10));
6914
+ const gifBytes = chunk4GX347MG_js.encodeGif(frames, Math.round(slideDurationMs / 10));
6915
6915
  onProgress?.(totalSlides, totalSlides);
6916
6916
  const buf = new ArrayBuffer(gifBytes.length);
6917
6917
  new Uint8Array(buf).set(gifBytes);
@@ -6965,7 +6965,7 @@ function exportAllSlidesToSvg(data, options = {}) {
6965
6965
  continue;
6966
6966
  }
6967
6967
  onProgress?.(processedCount, data.slides.length);
6968
- let svg = chunk3NDRTC7T_js.SvgExporter.exportSlide(slide, data.width, data.height, svgOptions);
6968
+ let svg = chunk4GX347MG_js.SvgExporter.exportSlide(slide, data.width, data.height, svgOptions);
6969
6969
  if (embedFonts && fontFaces?.length) {
6970
6970
  svg = injectFontFaces(svg, fontFaces);
6971
6971
  }
@@ -7027,7 +7027,7 @@ function useExportSaveAs(input) {
7027
7027
  }
7028
7028
  setExportProgress(70);
7029
7029
  setExportStatusMessage("Writing README...");
7030
- const readme = chunk3NDRTC7T_js.generatePackageReadme(pptxFilename);
7030
+ const readme = chunk4GX347MG_js.generatePackageReadme(pptxFilename);
7031
7031
  pkgFolder.file("README.txt", readme);
7032
7032
  if (abortCtrl.signal.aborted) {
7033
7033
  throw new DOMException("Export cancelled", "AbortError");
@@ -7038,7 +7038,7 @@ function useExportSaveAs(input) {
7038
7038
  setExportProgress(95);
7039
7039
  setExportStatusMessage("Downloading...");
7040
7040
  const baseName = pptxFilename.replace(/\.[^.]+$/u, "");
7041
- chunk3NDRTC7T_js.downloadBlob(zipBlob, `${baseName}-package.zip`);
7041
+ chunk4GX347MG_js.downloadBlob(zipBlob, `${baseName}-package.zip`);
7042
7042
  setExportProgress(100);
7043
7043
  } catch (err) {
7044
7044
  if (err.name !== "AbortError") {
@@ -7061,7 +7061,7 @@ function useExportSaveAs(input) {
7061
7061
  const blob = new Blob([data], {
7062
7062
  type: "application/vnd.openxmlformats-officedocument.presentationml.presentation"
7063
7063
  });
7064
- chunk3NDRTC7T_js.downloadBlob(blob, `${baseName}.${ext}`);
7064
+ chunk4GX347MG_js.downloadBlob(blob, `${baseName}.${ext}`);
7065
7065
  } catch (err) {
7066
7066
  console.error(`[PowerPointViewer] Save as .${ext} failed:`, err);
7067
7067
  }
@@ -7074,14 +7074,14 @@ function useExportSaveAs(input) {
7074
7074
  const pptxGuides = guides.map((g) => ({
7075
7075
  id: g.id,
7076
7076
  orientation: g.axis === "h" ? "horz" : "vert",
7077
- positionEmu: chunk3NDRTC7T_js.guidePxToEmu(g.position)
7077
+ positionEmu: chunk4GX347MG_js.guidePxToEmu(g.position)
7078
7078
  }));
7079
7079
  return {
7080
7080
  ...slide,
7081
7081
  guides: pptxGuides.length > 0 ? pptxGuides : void 0
7082
7082
  };
7083
7083
  });
7084
- const slidesToSave = chunkIN7D2T4R_js.buildSaveSlides(slidesWithGuides, templateElementsBySlideId);
7084
+ const slidesToSave = chunkP6KM7RO5_js.buildSaveSlides(slidesWithGuides, templateElementsBySlideId);
7085
7085
  const saveOptions = {
7086
7086
  headerFooter,
7087
7087
  presentationProperties,
@@ -7107,11 +7107,11 @@ function useExportSaveAs(input) {
7107
7107
  const handleExportJson = () => {
7108
7108
  const sourceName = filePath ? filePath.replace(/\\/gu, "/").split("/").pop() : void 0;
7109
7109
  const data = {
7110
- slides: chunkIN7D2T4R_js.buildSaveSlides(slides, templateElementsBySlideId),
7110
+ slides: chunkP6KM7RO5_js.buildSaveSlides(slides, templateElementsBySlideId),
7111
7111
  width: canvasSize.width,
7112
7112
  height: canvasSize.height,
7113
- widthEmu: chunk3NDRTC7T_js.guidePxToEmu(canvasSize.width),
7114
- heightEmu: chunk3NDRTC7T_js.guidePxToEmu(canvasSize.height),
7113
+ widthEmu: chunk4GX347MG_js.guidePxToEmu(canvasSize.width),
7114
+ heightEmu: chunk4GX347MG_js.guidePxToEmu(canvasSize.height),
7115
7115
  theme,
7116
7116
  headerFooter,
7117
7117
  presentationProperties,
@@ -7125,7 +7125,7 @@ function useExportSaveAs(input) {
7125
7125
  handoutMaster
7126
7126
  };
7127
7127
  try {
7128
- chunk3NDRTC7T_js.exportDeckJson(data, sourceName);
7128
+ chunk4GX347MG_js.exportDeckJson(data, sourceName);
7129
7129
  } catch (err) {
7130
7130
  console.error("[PowerPointViewer] JSON export failed:", err);
7131
7131
  }
@@ -7165,7 +7165,7 @@ function safeConfirm(message) {
7165
7165
  }
7166
7166
  }
7167
7167
  function downloadBlob2(blob, filename) {
7168
- chunk3NDRTC7T_js.downloadBlob(blob, chunk3NDRTC7T_js.sanitizeDownloadFilename(filename));
7168
+ chunk4GX347MG_js.downloadBlob(blob, chunk4GX347MG_js.sanitizeDownloadFilename(filename));
7169
7169
  }
7170
7170
 
7171
7171
  // src/viewer/hooks/useExportHandlers.ts
@@ -7271,21 +7271,21 @@ function useExportHandlers(input) {
7271
7271
  {
7272
7272
  scale: 2,
7273
7273
  onProgress: (current, total) => {
7274
- setExportProgress(chunk3NDRTC7T_js.slideProgressPercent(current, total));
7275
- setExportStatusMessage(chunk3NDRTC7T_js.slideStatusLabel("Rendering", current, total));
7274
+ setExportProgress(chunk4GX347MG_js.slideProgressPercent(current, total));
7275
+ setExportStatusMessage(chunk4GX347MG_js.slideStatusLabel("Rendering", current, total));
7276
7276
  },
7277
7277
  signal: abortCtrl.signal
7278
7278
  }
7279
7279
  );
7280
- setExportProgress(chunk3NDRTC7T_js.EXPORT_ASSEMBLING_PERCENT);
7280
+ setExportProgress(chunk4GX347MG_js.EXPORT_ASSEMBLING_PERCENT);
7281
7281
  setExportStatusMessage("Building PDF...");
7282
7282
  await new Promise((r) => {
7283
7283
  setTimeout(r, 100);
7284
7284
  });
7285
- setExportProgress(chunk3NDRTC7T_js.EXPORT_DONE_PERCENT);
7285
+ setExportProgress(chunk4GX347MG_js.EXPORT_DONE_PERCENT);
7286
7286
  setExportStatusMessage("Done!");
7287
7287
  } catch (err) {
7288
- if (!chunk3NDRTC7T_js.isExportAbortError(err)) {
7288
+ if (!chunk4GX347MG_js.isExportAbortError(err)) {
7289
7289
  console.error("[PowerPointViewer] PDF export failed:", err);
7290
7290
  }
7291
7291
  } finally {
@@ -7315,21 +7315,21 @@ function useExportHandlers(input) {
7315
7315
  {
7316
7316
  scale: 2,
7317
7317
  onProgress: (current, total) => {
7318
- setExportProgress(chunk3NDRTC7T_js.slideProgressPercent(current, total));
7319
- setExportStatusMessage(chunk3NDRTC7T_js.slideStatusLabel("Rendering", current, total));
7318
+ setExportProgress(chunk4GX347MG_js.slideProgressPercent(current, total));
7319
+ setExportStatusMessage(chunk4GX347MG_js.slideStatusLabel("Rendering", current, total));
7320
7320
  },
7321
7321
  signal: abortCtrl.signal
7322
7322
  }
7323
7323
  );
7324
- setExportProgress(chunk3NDRTC7T_js.EXPORT_ASSEMBLING_PERCENT);
7324
+ setExportProgress(chunk4GX347MG_js.EXPORT_ASSEMBLING_PERCENT);
7325
7325
  setExportStatusMessage("Building PDF...");
7326
7326
  await new Promise((r) => {
7327
7327
  setTimeout(r, 100);
7328
7328
  });
7329
- setExportProgress(chunk3NDRTC7T_js.EXPORT_DONE_PERCENT);
7329
+ setExportProgress(chunk4GX347MG_js.EXPORT_DONE_PERCENT);
7330
7330
  setExportStatusMessage("Done!");
7331
7331
  } catch (err) {
7332
- if (!chunk3NDRTC7T_js.isExportAbortError(err)) {
7332
+ if (!chunk4GX347MG_js.isExportAbortError(err)) {
7333
7333
  console.error("[PowerPointViewer] Notes PDF export failed:", err);
7334
7334
  }
7335
7335
  } finally {
@@ -7370,22 +7370,22 @@ function useExportHandlers(input) {
7370
7370
  scale: 1,
7371
7371
  slideDurationMs: 3e3,
7372
7372
  onProgress: (current, total) => {
7373
- setExportProgress(chunk3NDRTC7T_js.slideProgressPercent(current, total, 45));
7374
- setExportStatusMessage(chunk3NDRTC7T_js.slideStatusLabel("Capturing", current, total));
7373
+ setExportProgress(chunk4GX347MG_js.slideProgressPercent(current, total, 45));
7374
+ setExportStatusMessage(chunk4GX347MG_js.slideStatusLabel("Capturing", current, total));
7375
7375
  },
7376
7376
  onRecordProgress: (current, total) => {
7377
- setExportProgress(chunk3NDRTC7T_js.recordProgressPercent(current, total));
7378
- setExportStatusMessage(chunk3NDRTC7T_js.slideStatusLabel("Recording", current, total));
7377
+ setExportProgress(chunk4GX347MG_js.recordProgressPercent(current, total));
7378
+ setExportStatusMessage(chunk4GX347MG_js.slideStatusLabel("Recording", current, total));
7379
7379
  },
7380
7380
  signal: abortCtrl.signal
7381
7381
  }
7382
7382
  );
7383
- setExportProgress(chunk3NDRTC7T_js.EXPORT_ASSEMBLING_PERCENT);
7383
+ setExportProgress(chunk4GX347MG_js.EXPORT_ASSEMBLING_PERCENT);
7384
7384
  setExportStatusMessage("Saving file...");
7385
7385
  downloadBlob2(blob, "presentation.webm");
7386
- setExportProgress(chunk3NDRTC7T_js.EXPORT_DONE_PERCENT);
7386
+ setExportProgress(chunk4GX347MG_js.EXPORT_DONE_PERCENT);
7387
7387
  } catch (err) {
7388
- if (!chunk3NDRTC7T_js.isExportAbortError(err)) {
7388
+ if (!chunk4GX347MG_js.isExportAbortError(err)) {
7389
7389
  console.error("[PowerPointViewer] Video export failed:", err);
7390
7390
  }
7391
7391
  } finally {
@@ -7413,18 +7413,18 @@ function useExportHandlers(input) {
7413
7413
  scale: 0.5,
7414
7414
  slideDurationMs: 2e3,
7415
7415
  onProgress: (current, total) => {
7416
- setExportProgress(chunk3NDRTC7T_js.slideProgressPercent(current, total));
7417
- setExportStatusMessage(chunk3NDRTC7T_js.slideStatusLabel("Encoding", current, total));
7416
+ setExportProgress(chunk4GX347MG_js.slideProgressPercent(current, total));
7417
+ setExportStatusMessage(chunk4GX347MG_js.slideStatusLabel("Encoding", current, total));
7418
7418
  },
7419
7419
  signal: abortCtrl.signal
7420
7420
  }
7421
7421
  );
7422
- setExportProgress(chunk3NDRTC7T_js.EXPORT_ASSEMBLING_PERCENT);
7422
+ setExportProgress(chunk4GX347MG_js.EXPORT_ASSEMBLING_PERCENT);
7423
7423
  setExportStatusMessage("Saving file...");
7424
7424
  downloadBlob2(blob, "presentation.gif");
7425
- setExportProgress(chunk3NDRTC7T_js.EXPORT_DONE_PERCENT);
7425
+ setExportProgress(chunk4GX347MG_js.EXPORT_DONE_PERCENT);
7426
7426
  } catch (err) {
7427
- if (!chunk3NDRTC7T_js.isExportAbortError(err)) {
7427
+ if (!chunk4GX347MG_js.isExportAbortError(err)) {
7428
7428
  console.error("[PowerPointViewer] GIF export failed:", err);
7429
7429
  }
7430
7430
  } finally {
@@ -7465,7 +7465,7 @@ function openPrintWindow(title, bodyHtml, orientation, colorFilter, frameSlides)
7465
7465
  }
7466
7466
  printWindow.document.open();
7467
7467
  printWindow.document.write(
7468
- chunk3NDRTC7T_js.buildPrintHtmlDocument({ title, bodyHtml, orientation, colorFilter, frameSlides })
7468
+ chunk4GX347MG_js.buildPrintHtmlDocument({ title, bodyHtml, orientation, colorFilter, frameSlides })
7469
7469
  );
7470
7470
  printWindow.document.close();
7471
7471
  printWindow.focus();
@@ -7526,7 +7526,7 @@ function usePrintHandlers(input) {
7526
7526
  if (svgs.length === 0) {
7527
7527
  return;
7528
7528
  }
7529
- const printDoc = chunk3NDRTC7T_js.buildPrintDocument(svgs, pptxData.width, pptxData.height, {
7529
+ const printDoc = chunk4GX347MG_js.buildPrintDocument(svgs, pptxData.width, pptxData.height, {
7530
7530
  title: "Slides (Vector)",
7531
7531
  orientation: settings.orientation,
7532
7532
  colorFilter
@@ -7562,7 +7562,7 @@ function usePrintHandlers(input) {
7562
7562
  if (settings.printWhat === "outline") {
7563
7563
  openPrintWindow(
7564
7564
  "Outline",
7565
- `<div class="outline-page">${chunk3NDRTC7T_js.buildOutlineHtml(slideIndices, slides)}</div>`,
7565
+ `<div class="outline-page">${chunk4GX347MG_js.buildOutlineHtml(slideIndices, slides)}</div>`,
7566
7566
  settings.orientation,
7567
7567
  colorFilter,
7568
7568
  settings.frameSlides
@@ -7587,7 +7587,7 @@ function usePrintHandlers(input) {
7587
7587
  if (settings.printWhat === "slides") {
7588
7588
  openPrintWindow(
7589
7589
  "Slides",
7590
- chunk3NDRTC7T_js.buildSlidesHtml(slideImages, slideIndices),
7590
+ chunk4GX347MG_js.buildSlidesHtml(slideImages, slideIndices),
7591
7591
  settings.orientation,
7592
7592
  colorFilter,
7593
7593
  settings.frameSlides
@@ -7597,7 +7597,7 @@ function usePrintHandlers(input) {
7597
7597
  if (settings.printWhat === "notes") {
7598
7598
  openPrintWindow(
7599
7599
  "Notes Pages",
7600
- chunk3NDRTC7T_js.buildNotesHtml(slideImages, slideIndices, slides),
7600
+ chunk4GX347MG_js.buildNotesHtml(slideImages, slideIndices, slides),
7601
7601
  "portrait",
7602
7602
  colorFilter,
7603
7603
  settings.frameSlides
@@ -7608,7 +7608,7 @@ function usePrintHandlers(input) {
7608
7608
  const spp = settings.slidesPerPage;
7609
7609
  openPrintWindow(
7610
7610
  `Handout ${spp} per page`,
7611
- chunk3NDRTC7T_js.buildHandoutsHtml(slideImages, slideIndices, spp),
7611
+ chunk4GX347MG_js.buildHandoutsHtml(slideImages, slideIndices, spp),
7612
7612
  "portrait",
7613
7613
  colorFilter,
7614
7614
  settings.frameSlides
@@ -7672,8 +7672,8 @@ function useThemeHandlers(input) {
7672
7672
  return;
7673
7673
  }
7674
7674
  await handler.updateThemeColorScheme(colorScheme);
7675
- const previousMap = theme?.colorScheme ? chunk3NDRTC7T_js.buildThemeColorMap(theme.colorScheme) : {};
7676
- setSlides((prev) => chunk3NDRTC7T_js.reResolveSlideColors(prev, previousMap, colorScheme));
7675
+ const previousMap = theme?.colorScheme ? chunk4GX347MG_js.buildThemeColorMap(theme.colorScheme) : {};
7676
+ setSlides((prev) => chunk4GX347MG_js.reResolveSlideColors(prev, previousMap, colorScheme));
7677
7677
  setTheme((prev) => prev ? { ...prev, colorScheme } : { colorScheme });
7678
7678
  bumpHistory();
7679
7679
  history.markDirty();
@@ -7778,7 +7778,7 @@ function useThemeSwitching(input) {
7778
7778
  }
7779
7779
  try {
7780
7780
  await handler.applyTheme(preset.colorScheme, preset.fontScheme, preset.name);
7781
- const newData = chunk3NDRTC7T_js.applyThemeToData(data, preset.colorScheme, preset.fontScheme, preset.name);
7781
+ const newData = chunk4GX347MG_js.applyThemeToData(data, preset.colorScheme, preset.fontScheme, preset.name);
7782
7782
  onDataChange(newData);
7783
7783
  onThemeChanged?.(preset);
7784
7784
  } catch (error) {
@@ -7795,7 +7795,7 @@ function useThemeSwitching(input) {
7795
7795
  }
7796
7796
  try {
7797
7797
  await handler.applyTheme(colorScheme, fontScheme ?? {}, themeName);
7798
- const newData = chunk3NDRTC7T_js.applyThemeToData(data, colorScheme, fontScheme, themeName);
7798
+ const newData = chunk4GX347MG_js.applyThemeToData(data, colorScheme, fontScheme, themeName);
7799
7799
  onDataChange(newData);
7800
7800
  } catch (error) {
7801
7801
  console.error("Failed to switch to custom theme:", error);
@@ -7807,12 +7807,12 @@ function useThemeSwitching(input) {
7807
7807
  if (!data?.theme?.colorScheme) {
7808
7808
  return void 0;
7809
7809
  }
7810
- return chunk3NDRTC7T_js.THEME_PRESETS.find(
7811
- (p) => chunk3NDRTC7T_js.themeColorSchemesEqual(data.theme?.colorScheme, p.colorScheme)
7810
+ return chunk4GX347MG_js.THEME_PRESETS.find(
7811
+ (p) => chunk4GX347MG_js.themeColorSchemesEqual(data.theme?.colorScheme, p.colorScheme)
7812
7812
  );
7813
7813
  }, [data?.theme?.colorScheme]);
7814
7814
  return {
7815
- presets: chunk3NDRTC7T_js.THEME_PRESETS,
7815
+ presets: chunk4GX347MG_js.THEME_PRESETS,
7816
7816
  switchToPreset,
7817
7817
  switchToCustom,
7818
7818
  currentPreset
@@ -7887,7 +7887,7 @@ function usePropertyHandlers(input) {
7887
7887
  }
7888
7888
  try {
7889
7889
  const ab = await file.arrayBuffer();
7890
- const h = new chunk3NDRTC7T_js.PptxHandler();
7890
+ const h = new chunk4GX347MG_js.PptxHandler();
7891
7891
  const other = await h.load(ab);
7892
7892
  if (!other) {
7893
7893
  return;
@@ -7897,7 +7897,7 @@ function usePropertyHandlers(input) {
7897
7897
  width: canvasSize.width,
7898
7898
  height: canvasSize.height
7899
7899
  };
7900
- setCompareResult(chunk3NDRTC7T_js.comparePresentation(cur, other));
7900
+ setCompareResult(chunk4GX347MG_js.comparePresentation(cur, other));
7901
7901
  setIsComparePanelOpen(true);
7902
7902
  } catch (err) {
7903
7903
  console.warn("Compare failed:", err);
@@ -7914,7 +7914,7 @@ function usePropertyHandlers(input) {
7914
7914
  if (!diff || diff.status === "unchanged") {
7915
7915
  return;
7916
7916
  }
7917
- setSlides((prev) => chunk3NDRTC7T_js.applyAcceptSlide(prev, diff));
7917
+ setSlides((prev) => chunk4GX347MG_js.applyAcceptSlide(prev, diff));
7918
7918
  setIsDirty(true);
7919
7919
  },
7920
7920
  [compareResult, setSlides, setIsDirty]
@@ -7925,10 +7925,10 @@ function usePropertyHandlers(input) {
7925
7925
  if (!compareResult) {
7926
7926
  return;
7927
7927
  }
7928
- setSlides((prev) => chunk3NDRTC7T_js.applyAcceptAllSlides(prev, compareResult));
7928
+ setSlides((prev) => chunk4GX347MG_js.applyAcceptAllSlides(prev, compareResult));
7929
7929
  setIsDirty(true);
7930
7930
  }, [compareResult, setSlides, setIsDirty]);
7931
- const usedFontFamilies = react.useMemo(() => chunk3NDRTC7T_js.collectUsedFonts(slides), [slides]);
7931
+ const usedFontFamilies = react.useMemo(() => chunk4GX347MG_js.collectUsedFonts(slides), [slides]);
7932
7932
  return {
7933
7933
  handleUpdateNotes,
7934
7934
  handleUpdateSlide,
@@ -8047,7 +8047,7 @@ function useIsMobile(input) {
8047
8047
  const containerRef = input?.containerRef;
8048
8048
  const isTouchDevice = react.useSyncExternalStore(
8049
8049
  subscribeTouchCapability,
8050
- chunk3NDRTC7T_js.detectTouchDevice,
8050
+ chunk4GX347MG_js.detectTouchDevice,
8051
8051
  () => false
8052
8052
  // server snapshot
8053
8053
  );
@@ -8063,7 +8063,7 @@ function useIsMobile(input) {
8063
8063
  }
8064
8064
  return containerRef?.current?.clientHeight ?? window.innerHeight;
8065
8065
  });
8066
- const [orientation, setOrientation] = react.useState(chunk3NDRTC7T_js.detectOrientation);
8066
+ const [orientation, setOrientation] = react.useState(chunk4GX347MG_js.detectOrientation);
8067
8067
  const [isVirtualKeyboardOpen, setIsVirtualKeyboardOpen] = react.useState(false);
8068
8068
  const [initialViewportHeight] = react.useState(
8069
8069
  () => typeof window !== "undefined" ? window.innerHeight : 800
@@ -8107,7 +8107,7 @@ function useIsMobile(input) {
8107
8107
  return;
8108
8108
  }
8109
8109
  const handleOrientationChange = () => {
8110
- setOrientation(chunk3NDRTC7T_js.detectOrientation());
8110
+ setOrientation(chunk4GX347MG_js.detectOrientation());
8111
8111
  };
8112
8112
  if (screen.orientation) {
8113
8113
  screen.orientation.addEventListener("change", handleOrientationChange);
@@ -8137,9 +8137,9 @@ function useIsMobile(input) {
8137
8137
  window.addEventListener("resize", handleResize);
8138
8138
  return () => window.removeEventListener("resize", handleResize);
8139
8139
  }, [isTouchDevice, initialViewportHeight]);
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;
8140
+ const isMobile = chunk4GX347MG_js.isMobileViewport(containerWidth, containerHeight, isTouchDevice);
8141
+ const isTablet = !isMobile && containerWidth >= chunk4GX347MG_js.MOBILE_BREAKPOINT && containerWidth < chunk4GX347MG_js.TABLET_BREAKPOINT;
8142
+ const isDesktop = !isMobile && containerWidth >= chunk4GX347MG_js.TABLET_BREAKPOINT;
8143
8143
  return {
8144
8144
  isMobile,
8145
8145
  isTablet,
@@ -8200,11 +8200,11 @@ function useViewerDialogs(input) {
8200
8200
  );
8201
8201
  const [embedFontsEnabled, setEmbedFontsEnabled] = react.useState(false);
8202
8202
  const [isNarrowViewport, setIsNarrowViewport] = react.useState(
8203
- () => typeof window !== "undefined" ? chunk3NDRTC7T_js.isMobileViewport(window.innerWidth, window.innerHeight, viewportIsTouch()) : false
8203
+ () => typeof window !== "undefined" ? chunk4GX347MG_js.isMobileViewport(window.innerWidth, window.innerHeight, viewportIsTouch()) : false
8204
8204
  );
8205
8205
  react.useEffect(() => {
8206
8206
  const handleWindow = () => setIsNarrowViewport(
8207
- chunk3NDRTC7T_js.isMobileViewport(window.innerWidth, window.innerHeight, viewportIsTouch())
8207
+ chunk4GX347MG_js.isMobileViewport(window.innerWidth, window.innerHeight, viewportIsTouch())
8208
8208
  );
8209
8209
  let observer = null;
8210
8210
  let raf = 0;
@@ -8218,12 +8218,12 @@ function useViewerDialogs(input) {
8218
8218
  const entry = entries[0];
8219
8219
  if (entry) {
8220
8220
  setIsNarrowViewport(
8221
- chunk3NDRTC7T_js.isMobileViewport(entry.contentRect.width, entry.contentRect.height, viewportIsTouch())
8221
+ chunk4GX347MG_js.isMobileViewport(entry.contentRect.width, entry.contentRect.height, viewportIsTouch())
8222
8222
  );
8223
8223
  }
8224
8224
  });
8225
8225
  observer.observe(el);
8226
- setIsNarrowViewport(chunk3NDRTC7T_js.isMobileViewport(el.clientWidth, el.clientHeight, viewportIsTouch()));
8226
+ setIsNarrowViewport(chunk4GX347MG_js.isMobileViewport(el.clientWidth, el.clientHeight, viewportIsTouch()));
8227
8227
  };
8228
8228
  attach();
8229
8229
  window.addEventListener("resize", handleWindow);
@@ -8381,20 +8381,20 @@ function useViewerDialogs(input) {
8381
8381
  }
8382
8382
  function computeGridSpacingPx(presentationGridSpacing) {
8383
8383
  if (presentationGridSpacing) {
8384
- const px = Math.round(presentationGridSpacing.cx / chunkIN7D2T4R_js.EMU_PER_PX);
8384
+ const px = Math.round(presentationGridSpacing.cx / chunkP6KM7RO5_js.EMU_PER_PX);
8385
8385
  if (px > 0) {
8386
8386
  return px;
8387
8387
  }
8388
8388
  }
8389
- return chunkIN7D2T4R_js.GRID_SIZE;
8389
+ return chunkP6KM7RO5_js.GRID_SIZE;
8390
8390
  }
8391
8391
  function computeVisibleSlideIndexes(slides, activeCustomShowId, customShows) {
8392
8392
  const activeShow = activeCustomShowId ? customShows.find((show) => show.id === activeCustomShowId) : void 0;
8393
- return chunk3NDRTC7T_js.resolveShowSlideIndexes(slides, activeShow);
8393
+ return chunk4GX347MG_js.resolveShowSlideIndexes(slides, activeShow);
8394
8394
  }
8395
8395
  function computeSlideSectionGroups(slides, sections) {
8396
- return chunk3NDRTC7T_js.groupSlidesBySection(sections, slides).map((group) => ({
8397
- id: group.section?.id ?? (sections.length > 0 ? chunkIN7D2T4R_js.UNGROUPED_SECTION_ID : "default"),
8396
+ return chunk4GX347MG_js.groupSlidesBySection(sections, slides).map((group) => ({
8397
+ id: group.section?.id ?? (sections.length > 0 ? chunkP6KM7RO5_js.UNGROUPED_SECTION_ID : "default"),
8398
8398
  label: group.section?.name ?? (sections.length > 0 ? "Ungrouped Slides" : "Slides"),
8399
8399
  slideIndexes: group.slideIndexes,
8400
8400
  ...group.section?.color !== void 0 ? { color: group.section.color } : {},
@@ -8449,7 +8449,7 @@ function useDerivedSlideState(input) {
8449
8449
  );
8450
8450
  const slideSectionGroups = react.useMemo(
8451
8451
  () => computeSlideSectionGroups(slides, sections).map((group) => {
8452
- if (group.id === chunkIN7D2T4R_js.UNGROUPED_SECTION_ID && group.label === "Ungrouped Slides") {
8452
+ if (group.id === chunkP6KM7RO5_js.UNGROUPED_SECTION_ID && group.label === "Ungrouped Slides") {
8453
8453
  return { ...group, label: t("pptx.slides.ungroupedSlides") };
8454
8454
  }
8455
8455
  if (group.id === "default" && group.label === "Slides") {
@@ -8552,13 +8552,13 @@ function useAnnotationHandlers(input) {
8552
8552
  }, [annotations, setMode, setSlides, history]);
8553
8553
  const handleSetMode = react.useCallback(
8554
8554
  (nextMode) => {
8555
- if (mode === "present" && nextMode !== "present" && !chunk3NDRTC7T_js.mayLeaveSlideShow()) {
8555
+ if (mode === "present" && nextMode !== "present" && !chunk4GX347MG_js.mayLeaveSlideShow()) {
8556
8556
  return;
8557
8557
  }
8558
8558
  if (nextMode === "present") {
8559
8559
  presentation.enterPresentMode();
8560
8560
  } else if (mode === "present" && annotations.hasAnyAnnotations) {
8561
- chunk3NDRTC7T_js.stopAllPersistentAudio();
8561
+ chunk4GX347MG_js.stopAllPersistentAudio();
8562
8562
  pendingModeAfterAnnotationsRef.current = nextMode;
8563
8563
  if (promptKeepInkAnnotations) {
8564
8564
  setShowKeepAnnotationsDialog(true);
@@ -8567,7 +8567,7 @@ function useAnnotationHandlers(input) {
8567
8567
  }
8568
8568
  } else {
8569
8569
  if (mode === "present") {
8570
- chunk3NDRTC7T_js.stopAllPersistentAudio();
8570
+ chunk4GX347MG_js.stopAllPersistentAudio();
8571
8571
  }
8572
8572
  setMode(nextMode);
8573
8573
  }
@@ -8633,13 +8633,13 @@ function useSerialize(input) {
8633
8633
  let processedSlide = slide;
8634
8634
  if (pendingEditId) {
8635
8635
  const updatedElements = slide.elements.map((el) => {
8636
- if (el.id !== pendingEditId || !chunk3NDRTC7T_js.hasTextProperties(el)) {
8636
+ if (el.id !== pendingEditId || !chunk4GX347MG_js.hasTextProperties(el)) {
8637
8637
  return el;
8638
8638
  }
8639
8639
  return {
8640
8640
  ...el,
8641
8641
  text: pendingEditText,
8642
- textSegments: chunk3NDRTC7T_js.remapTextToSegments(pendingEditText, el.textSegments, el.textStyle)
8642
+ textSegments: chunk4GX347MG_js.remapTextToSegments(pendingEditText, el.textSegments, el.textStyle)
8643
8643
  };
8644
8644
  });
8645
8645
  if (updatedElements.some((el, i) => el !== slide.elements[i])) {
@@ -8652,14 +8652,14 @@ function useSerialize(input) {
8652
8652
  const pptxGuides = guides.map((g) => ({
8653
8653
  id: g.id,
8654
8654
  orientation: g.axis === "h" ? "horz" : "vert",
8655
- positionEmu: chunk3NDRTC7T_js.guidePxToEmu(g.position)
8655
+ positionEmu: chunk4GX347MG_js.guidePxToEmu(g.position)
8656
8656
  }));
8657
8657
  return {
8658
8658
  ...processedSlide,
8659
8659
  guides: pptxGuides.length > 0 ? pptxGuides : void 0
8660
8660
  };
8661
8661
  });
8662
- const slidesToSave = chunkIN7D2T4R_js.buildSaveSlides(slidesWithGuides, templateElementsBySlideId);
8662
+ const slidesToSave = chunkP6KM7RO5_js.buildSaveSlides(slidesWithGuides, templateElementsBySlideId);
8663
8663
  const saveOptions = {
8664
8664
  headerFooter,
8665
8665
  presentationProperties,
@@ -8828,7 +8828,7 @@ function usePresentationSetup(input) {
8828
8828
  containerRef,
8829
8829
  content,
8830
8830
  onSetMode: (nextMode) => {
8831
- if (mode === "present" && nextMode !== "present" && !chunk3NDRTC7T_js.mayLeaveSlideShow()) {
8831
+ if (mode === "present" && nextMode !== "present" && !chunk4GX347MG_js.mayLeaveSlideShow()) {
8832
8832
  return;
8833
8833
  }
8834
8834
  if (mode === "present" && nextMode !== "present" && annotations.hasAnyAnnotations && promptKeepInkAnnotations) {
@@ -8836,7 +8836,7 @@ function usePresentationSetup(input) {
8836
8836
  setShowKeepAnnotationsDialog(true);
8837
8837
  } else {
8838
8838
  if (mode === "present" && nextMode !== "present") {
8839
- chunk3NDRTC7T_js.stopAllPersistentAudio();
8839
+ chunk4GX347MG_js.stopAllPersistentAudio();
8840
8840
  stopAnimationSound();
8841
8841
  }
8842
8842
  setMode(nextMode);
@@ -8890,10 +8890,10 @@ function usePresentationSetup(input) {
8890
8890
  onToggleInkMarkup: () => annotations.setInkMarkupVisible(!annotations.inkMarkupVisible),
8891
8891
  onToggleToolbar: () => annotations.setToolbarVisible(!annotations.toolbarVisible),
8892
8892
  onSaveRehearsalTimings: (timings) => {
8893
- setSlides((prev) => chunk3NDRTC7T_js.applyRehearsalTimings(prev, timings));
8893
+ setSlides((prev) => chunk4GX347MG_js.applyRehearsalTimings(prev, timings));
8894
8894
  history.markDirty();
8895
8895
  },
8896
- loopContinuously: chunk3NDRTC7T_js.shouldLoopContinuously(presentationProperties),
8896
+ loopContinuously: chunk4GX347MG_js.shouldLoopContinuously(presentationProperties),
8897
8897
  showWithAnimation: presentationProperties.showWithAnimation,
8898
8898
  useTimings: presentationProperties.advanceMode !== "manual",
8899
8899
  endWithBlackSlide
@@ -9057,7 +9057,7 @@ function useEditorOperations(input) {
9057
9057
  const { formatPainterActive, setFormatPainterActive, elementLookup } = state;
9058
9058
  react.useEffect(() => {
9059
9059
  if (formatPainterActive && !prevFormatPainterRef.current && selectedElement) {
9060
- copiedFormatRef.current = chunk3NDRTC7T_js.copyFormatFromElement(selectedElement);
9060
+ copiedFormatRef.current = chunk4GX347MG_js.copyFormatFromElement(selectedElement);
9061
9061
  } else if (!formatPainterActive) {
9062
9062
  copiedFormatRef.current = null;
9063
9063
  }
@@ -9083,12 +9083,12 @@ function useEditorOperations(input) {
9083
9083
  e.stopPropagation();
9084
9084
  const element = elementLookup.get(elementId);
9085
9085
  if (element) {
9086
- const updated = chunk3NDRTC7T_js.applyFormatToElement(element, copiedFormatRef.current);
9086
+ const updated = chunk4GX347MG_js.applyFormatToElement(element, copiedFormatRef.current);
9087
9087
  const updates = {};
9088
- if (chunk3NDRTC7T_js.hasShapeProperties(updated)) {
9088
+ if (chunk4GX347MG_js.hasShapeProperties(updated)) {
9089
9089
  updates.shapeStyle = updated.shapeStyle;
9090
9090
  }
9091
- if (chunk3NDRTC7T_js.hasTextProperties(updated)) {
9091
+ if (chunk4GX347MG_js.hasTextProperties(updated)) {
9092
9092
  updates.textStyle = updated.textStyle;
9093
9093
  }
9094
9094
  ops.updateElementById(elementId, updates);
@@ -9237,7 +9237,7 @@ function collectReferencedFontFamilies(slides) {
9237
9237
  const families = /* @__PURE__ */ new Set();
9238
9238
  for (const slide of slides) {
9239
9239
  for (const el of slide.elements) {
9240
- if (chunk3NDRTC7T_js.hasTextProperties(el) && el.textSegments) {
9240
+ if (chunk4GX347MG_js.hasTextProperties(el) && el.textSegments) {
9241
9241
  for (const seg of el.textSegments) {
9242
9242
  if (seg.style.fontFamily) {
9243
9243
  families.add(seg.style.fontFamily);
@@ -9449,13 +9449,13 @@ function useKeyboardShortcuts(input) {
9449
9449
  inputRef.current = input;
9450
9450
  const handleKeyDown = react.useCallback((e) => {
9451
9451
  const current = inputRef.current;
9452
- const { action, dx, dy } = chunk3NDRTC7T_js.mapEditorKey(e, {
9452
+ const { action, dx, dy } = chunk4GX347MG_js.mapEditorKey(e, {
9453
9453
  canEdit: current.canEdit,
9454
9454
  isPresenting: current.mode !== "edit",
9455
9455
  hasSelection: current.hasSelection,
9456
9456
  isEditingText: Boolean(current.inlineEditingElementId || current.tableEditorState?.isEditing),
9457
9457
  isDrawing: current.activeTool !== "select",
9458
- isTextInputTarget: chunk3NDRTC7T_js.isEditorTextInputTarget(e.target)
9458
+ isTextInputTarget: chunk4GX347MG_js.isEditorTextInputTarget(e.target)
9459
9459
  });
9460
9460
  if (action === null) {
9461
9461
  return;
@@ -9748,7 +9748,7 @@ function useViewerIntegration(input) {
9748
9748
  return zoom.scale;
9749
9749
  },
9750
9750
  setZoom(level) {
9751
- zoom.setScale(chunk3NDRTC7T_js.clampZoomScale(level));
9751
+ zoom.setScale(chunk4GX347MG_js.clampZoomScale(level));
9752
9752
  },
9753
9753
  zoomIn() {
9754
9754
  zoom.handleZoomIn();
@@ -9963,7 +9963,7 @@ function useReducedMotion() {
9963
9963
  }
9964
9964
  function useViewerOptions() {
9965
9965
  const storeRef = react.useRef(null);
9966
- storeRef.current ??= chunk3NDRTC7T_js.createViewerOptionsStore();
9966
+ storeRef.current ??= chunk4GX347MG_js.createViewerOptionsStore();
9967
9967
  const store = storeRef.current;
9968
9968
  const options = react.useSyncExternalStore(
9969
9969
  (onStoreChange) => store.subscribe(onStoreChange),
@@ -9972,9 +9972,9 @@ function useViewerOptions() {
9972
9972
  );
9973
9973
  return { optionsStore: store, options };
9974
9974
  }
9975
- var KNOWN_TAB_IDS = new Set(chunk3NDRTC7T_js.TOOLBAR_TABS.map((tab) => tab.id));
9975
+ var KNOWN_TAB_IDS = new Set(chunk4GX347MG_js.TOOLBAR_TABS.map((tab) => tab.id));
9976
9976
  function computeToolbarVisibility(hiddenActions) {
9977
- const isHidden = (id) => chunk3NDRTC7T_js.isActionHidden(id, hiddenActions);
9977
+ const isHidden = (id) => chunk4GX347MG_js.isActionHidden(id, hiddenActions);
9978
9978
  const isTabVisible = (id) => !KNOWN_TAB_IDS.has(id) || !isHidden(id);
9979
9979
  return { isHidden, isTabVisible };
9980
9980
  }
@@ -10059,12 +10059,12 @@ function useYjsDocumentSync({
10059
10059
  return;
10060
10060
  }
10061
10061
  try {
10062
- const handler = new chunk3NDRTC7T_js.PptxHandler();
10062
+ const handler = new chunk4GX347MG_js.PptxHandler();
10063
10063
  await handler.load(sourceBytes.buffer);
10064
- const currentSlides = chunk3NDRTC7T_js.readSlidesFromYDoc(
10064
+ const currentSlides = chunk4GX347MG_js.readSlidesFromYDoc(
10065
10065
  doc
10066
10066
  );
10067
- const slidesToSave = chunkIN7D2T4R_js.buildSaveSlides(currentSlides, templateElementsBySlideId);
10067
+ const slidesToSave = chunkP6KM7RO5_js.buildSaveSlides(currentSlides, templateElementsBySlideId);
10068
10068
  const bytes = await handler.save(slidesToSave);
10069
10069
  config.onWriteBack(bytes);
10070
10070
  } catch {
@@ -10079,7 +10079,7 @@ function useYjsDocumentSync({
10079
10079
  if (!doc || !isConnected) {
10080
10080
  return;
10081
10081
  }
10082
- const docSlides = chunk3NDRTC7T_js.readSlidesFromYDoc(
10082
+ const docSlides = chunk4GX347MG_js.readSlidesFromYDoc(
10083
10083
  doc
10084
10084
  );
10085
10085
  if (docSlides.length === 0) {
@@ -10101,11 +10101,11 @@ function useYjsDocumentSync({
10101
10101
  lastSyncedRef.current = serialized;
10102
10102
  void (async () => {
10103
10103
  const factories = await getFactories();
10104
- chunk3NDRTC7T_js.reconcileSlidesInYDoc(
10104
+ chunk4GX347MG_js.reconcileSlidesInYDoc(
10105
10105
  slides,
10106
10106
  doc,
10107
10107
  factories,
10108
- chunk3NDRTC7T_js.LOCAL_SYNC_ORIGIN
10108
+ chunk4GX347MG_js.LOCAL_SYNC_ORIGIN
10109
10109
  );
10110
10110
  scheduleWriteBack();
10111
10111
  })();
@@ -10119,10 +10119,10 @@ function useYjsDocumentSync({
10119
10119
  return;
10120
10120
  }
10121
10121
  const handleChange = (_events, transaction) => {
10122
- if (transaction?.origin === chunk3NDRTC7T_js.LOCAL_SYNC_ORIGIN) {
10122
+ if (transaction?.origin === chunk4GX347MG_js.LOCAL_SYNC_ORIGIN) {
10123
10123
  return;
10124
10124
  }
10125
- const remoteSlides = chunk3NDRTC7T_js.readSlidesFromYDoc(
10125
+ const remoteSlides = chunk4GX347MG_js.readSlidesFromYDoc(
10126
10126
  doc
10127
10127
  );
10128
10128
  if (remoteSlides.length === 0) {
@@ -10138,7 +10138,7 @@ function useYjsDocumentSync({
10138
10138
  isApplyingRemoteRef.current = false;
10139
10139
  scheduleWriteBack();
10140
10140
  };
10141
- const unobserve = chunk3NDRTC7T_js.observeYDocSlides(
10141
+ const unobserve = chunk4GX347MG_js.observeYDocSlides(
10142
10142
  doc,
10143
10143
  handleChange
10144
10144
  );
@@ -10176,7 +10176,7 @@ function useBroadcastFollower({
10176
10176
  if (!broadcaster) {
10177
10177
  return;
10178
10178
  }
10179
- if (!chunk3NDRTC7T_js.shouldAutoFollowBroadcaster({
10179
+ if (!chunk4GX347MG_js.shouldAutoFollowBroadcaster({
10180
10180
  localRole: collab.config.role,
10181
10181
  broadcasterRole: broadcaster.role
10182
10182
  })) {
@@ -10336,10 +10336,10 @@ function useTouchGestures(input) {
10336
10336
  if (!el || !enabled) {
10337
10337
  return;
10338
10338
  }
10339
- const recognizer = chunk3NDRTC7T_js.createTouchGestureRecognizer({
10339
+ const recognizer = chunk4GX347MG_js.createTouchGestureRecognizer({
10340
10340
  getScale: () => scaleRef.current,
10341
- minScale: chunk3NDRTC7T_js.MIN_ZOOM_SCALE,
10342
- maxScale: chunk3NDRTC7T_js.MAX_ZOOM_SCALE,
10341
+ minScale: chunk4GX347MG_js.MIN_ZOOM_SCALE,
10342
+ maxScale: chunk4GX347MG_js.MAX_ZOOM_SCALE,
10343
10343
  callbacks: {
10344
10344
  onPinchZoom: (newScale) => callbacksRef.current.onPinchZoom?.(newScale),
10345
10345
  onSwipe: (direction) => callbacksRef.current.onSwipe?.(direction),
@@ -10379,7 +10379,7 @@ function scrollFocusedIntoView(keyboardInset) {
10379
10379
  return;
10380
10380
  }
10381
10381
  const rect = active.getBoundingClientRect();
10382
- const delta = chunk3NDRTC7T_js.computeScrollDelta(
10382
+ const delta = chunk4GX347MG_js.computeScrollDelta(
10383
10383
  { top: rect.top, bottom: rect.bottom },
10384
10384
  window.innerHeight,
10385
10385
  keyboardInset
@@ -10399,8 +10399,8 @@ function useKeyboardInsets(enabled = true) {
10399
10399
  return;
10400
10400
  }
10401
10401
  const update = () => {
10402
- const metrics = chunk3NDRTC7T_js.readViewportMetrics(window);
10403
- const inset = metrics ? chunk3NDRTC7T_js.computeKeyboardInset(metrics) : 0;
10402
+ const metrics = chunk4GX347MG_js.readViewportMetrics(window);
10403
+ const inset = metrics ? chunk4GX347MG_js.computeKeyboardInset(metrics) : 0;
10404
10404
  setKeyboardInset(inset);
10405
10405
  if (inset > 0) {
10406
10406
  window.requestAnimationFrame(() => scrollFocusedIntoView(inset));
@@ -10411,8 +10411,8 @@ function useKeyboardInsets(enabled = true) {
10411
10411
  vv.addEventListener("scroll", update);
10412
10412
  const onFocusIn = () => {
10413
10413
  window.requestAnimationFrame(() => {
10414
- const metrics = chunk3NDRTC7T_js.readViewportMetrics(window);
10415
- const inset = metrics ? chunk3NDRTC7T_js.computeKeyboardInset(metrics) : 0;
10414
+ const metrics = chunk4GX347MG_js.readViewportMetrics(window);
10415
+ const inset = metrics ? chunk4GX347MG_js.computeKeyboardInset(metrics) : 0;
10416
10416
  if (inset > 0) {
10417
10417
  scrollFocusedIntoView(inset);
10418
10418
  }
@@ -10425,7 +10425,7 @@ function useKeyboardInsets(enabled = true) {
10425
10425
  document.removeEventListener("focusin", onFocusIn);
10426
10426
  };
10427
10427
  }, [enabled]);
10428
- return { keyboardInset, isKeyboardOpen: chunk3NDRTC7T_js.isKeyboardOpen(keyboardInset) };
10428
+ return { keyboardInset, isKeyboardOpen: chunk4GX347MG_js.isKeyboardOpen(keyboardInset) };
10429
10429
  }
10430
10430
 
10431
10431
  // src/viewer/hooks/useViewerBuildingBlocks-canvas-props.ts
@@ -10452,7 +10452,7 @@ function buildCanvasProps(input) {
10452
10452
  } = input;
10453
10453
  const effectiveSlide = mode === "master" ? masterPseudoSlide : activeSlide;
10454
10454
  const effectiveTemplateElements = mode === "master" ? s.activeLayout ? s.activeMaster?.elements ?? [] : [] : templateElements;
10455
- const fieldContext = chunk3NDRTC7T_js.buildFieldSubstitutionContext({
10455
+ const fieldContext = chunk4GX347MG_js.buildFieldSubstitutionContext({
10456
10456
  headerFooter: s.headerFooter,
10457
10457
  customProperties: s.customProperties,
10458
10458
  slide: activeSlide
@@ -10462,13 +10462,13 @@ function buildCanvasProps(input) {
10462
10462
  if (mode === "present") {
10463
10463
  presentation.handlePresentationAction(action);
10464
10464
  } else if (action.url) {
10465
- chunk3NDRTC7T_js.safeOpenUrl(action.url);
10465
+ chunk4GX347MG_js.safeOpenUrl(action.url);
10466
10466
  }
10467
10467
  };
10468
10468
  const handleHyperlinkClick = (url) => {
10469
- if (chunk3NDRTC7T_js.isPpactionUrl(url)) {
10469
+ if (chunk4GX347MG_js.isPpactionUrl(url)) {
10470
10470
  if (mode === "present") {
10471
- const parsed = chunk3NDRTC7T_js.parsePpactionUrl(url);
10471
+ const parsed = chunk4GX347MG_js.parsePpactionUrl(url);
10472
10472
  if (parsed) {
10473
10473
  presentation.handlePresentationAction({
10474
10474
  action: parsed.action,
@@ -10478,7 +10478,7 @@ function buildCanvasProps(input) {
10478
10478
  }
10479
10479
  return;
10480
10480
  }
10481
- chunk3NDRTC7T_js.safeOpenUrl(url);
10481
+ chunk4GX347MG_js.safeOpenUrl(url);
10482
10482
  };
10483
10483
  return {
10484
10484
  activeSlide: effectiveSlide,
@@ -10621,7 +10621,7 @@ function buildToolbarAnimationHandlers(input) {
10621
10621
  const current = activeSlide.animations ?? [];
10622
10622
  if (group === "motionPath") {
10623
10623
  propertyHandlers.handleUpdateSlide({
10624
- animations: chunk3NDRTC7T_js.applyMotionPathPreset(current, selectedElement.id, preset)
10624
+ animations: chunk4GX347MG_js.applyMotionPathPreset(current, selectedElement.id, preset)
10625
10625
  });
10626
10626
  return;
10627
10627
  }
@@ -10816,7 +10816,7 @@ function buildToolbarProps(input) {
10816
10816
  onOpenFile,
10817
10817
  onOpenRecentFile,
10818
10818
  onCreatePresentation: (templateId) => {
10819
- s.setSlides(chunk3NDRTC7T_js.createBackstagePresentation(templateId));
10819
+ s.setSlides(chunk4GX347MG_js.createBackstagePresentation(templateId));
10820
10820
  s.setActiveSlideIndex(0);
10821
10821
  s.setSelectedElementId(null);
10822
10822
  s.setSelectedElementIds([]);
@@ -10843,7 +10843,7 @@ function buildToolbarProps(input) {
10843
10843
  layoutOptions: scopedLayoutOptions,
10844
10844
  onInsertSlideFromLayout: slideOps.handleInsertSlideFromLayout,
10845
10845
  onInsertSlideFromTemplate: slideOps.handleInsertSlideFromTemplate,
10846
- templateScheme: chunk3NDRTC7T_js.templateSchemeFromTheme(s.theme?.colorScheme),
10846
+ templateScheme: chunk4GX347MG_js.templateSchemeFromTheme(s.theme?.colorScheme),
10847
10847
  customShows: s.customShows,
10848
10848
  activeCustomShowId: s.activeCustomShowId,
10849
10849
  onSetActiveCustomShowId: s.setActiveCustomShowId,
@@ -10875,7 +10875,7 @@ function buildToolbarProps(input) {
10875
10875
  isCommentsPanelOpen: s.isInspectorPaneOpen,
10876
10876
  slideCommentCount: activeSlide?.comments?.length ?? 0,
10877
10877
  formatPainterActive: s.formatPainterActive,
10878
- canActivateFormatPainter: chunk3NDRTC7T_js.hasCopyableFormat(selectedElement),
10878
+ canActivateFormatPainter: chunk4GX347MG_js.hasCopyableFormat(selectedElement),
10879
10879
  onToggleFormatPainter: () => s.setFormatPainterActive((p) => !p),
10880
10880
  isSelectionPaneOpen: s.isSelectionPaneOpen,
10881
10881
  onToggleSelectionPane: () => s.setIsSelectionPaneOpen((p) => !p),
@@ -11144,7 +11144,7 @@ function useViewerBuildingBlocks(input) {
11144
11144
  }, [incomingContent]);
11145
11145
  const onOpenFile = react.useCallback(() => {
11146
11146
  void (async () => {
11147
- const picked = await chunk3NDRTC7T_js.openPptxFile();
11147
+ const picked = await chunk4GX347MG_js.openPptxFile();
11148
11148
  if (picked) {
11149
11149
  setContent(picked.buffer);
11150
11150
  }
@@ -11152,7 +11152,7 @@ function useViewerBuildingBlocks(input) {
11152
11152
  }, []);
11153
11153
  const onOpenRecentFile = react.useCallback((key) => {
11154
11154
  void (async () => {
11155
- const bytes = await chunk3NDRTC7T_js.readBackstageRecentFile(key);
11155
+ const bytes = await chunk4GX347MG_js.readBackstageRecentFile(key);
11156
11156
  if (bytes) {
11157
11157
  setContent(bytes);
11158
11158
  }