pptx-react-viewer 2.13.0 → 2.13.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 (103) hide show
  1. package/CHANGELOG.md +8 -0
  2. package/dist/{AiChatPanel-DEI3EQFM.js → AiChatPanel-F4E3A2DE.js} +35 -27
  3. package/dist/AiChatPanel-F4E3A2DE.js.br +0 -0
  4. package/dist/AiChatPanel-F4E3A2DE.js.gz +0 -0
  5. package/dist/{AiChatPanel-4YS6DEIT.mjs → AiChatPanel-VEULATXX.mjs} +15 -7
  6. package/dist/AiChatPanel-VEULATXX.mjs.br +0 -0
  7. package/dist/AiChatPanel-VEULATXX.mjs.gz +0 -0
  8. package/dist/{Model3DScene-JSNQCKCJ.mjs → Model3DScene-KIPEODEJ.mjs} +1 -1
  9. package/dist/Model3DScene-KIPEODEJ.mjs.br +0 -0
  10. package/dist/Model3DScene-KIPEODEJ.mjs.gz +0 -0
  11. package/dist/{Model3DScene-X4W7GZVY.js → Model3DScene-TD2LIHYP.js} +2 -2
  12. package/dist/Model3DScene-TD2LIHYP.js.br +0 -0
  13. package/dist/Model3DScene-TD2LIHYP.js.gz +0 -0
  14. package/dist/{SurfaceChart3DScene-3MSU74YH.mjs → SurfaceChart3DScene-GRBWZ52S.mjs} +1 -1
  15. package/dist/{SurfaceChart3DScene-3MSU74YH.mjs.br → SurfaceChart3DScene-GRBWZ52S.mjs.br} +0 -0
  16. package/dist/SurfaceChart3DScene-GRBWZ52S.mjs.gz +0 -0
  17. package/dist/{SurfaceChart3DScene-IZLUWT27.js → SurfaceChart3DScene-OTKXQH5O.js} +2 -2
  18. package/dist/SurfaceChart3DScene-OTKXQH5O.js.br +0 -0
  19. package/dist/SurfaceChart3DScene-OTKXQH5O.js.gz +0 -0
  20. package/dist/{chunk-YA7VFYTW.mjs → chunk-3HWE6QZG.mjs} +16 -7
  21. package/dist/chunk-3HWE6QZG.mjs.br +0 -0
  22. package/dist/chunk-3HWE6QZG.mjs.gz +0 -0
  23. package/dist/{chunk-RWIQHVZQ.js → chunk-BNSCH4WT.js} +340 -326
  24. package/dist/chunk-BNSCH4WT.js.br +0 -0
  25. package/dist/chunk-BNSCH4WT.js.gz +0 -0
  26. package/dist/{chunk-IDW5UPXW.js → chunk-DOS7NY7C.js} +259 -295
  27. package/dist/chunk-DOS7NY7C.js.br +0 -0
  28. package/dist/chunk-DOS7NY7C.js.gz +0 -0
  29. package/dist/{chunk-SHZ3GWOD.js → chunk-EUQ2IER3.js} +1046 -1037
  30. package/dist/chunk-EUQ2IER3.js.br +0 -0
  31. package/dist/chunk-EUQ2IER3.js.gz +0 -0
  32. package/dist/{chunk-EFSQW6S5.js → chunk-FDR5W67L.js} +713 -349
  33. package/dist/chunk-FDR5W67L.js.br +0 -0
  34. package/dist/chunk-FDR5W67L.js.gz +0 -0
  35. package/dist/{chunk-4TD7EINA.mjs → chunk-GKOKCOXR.mjs} +709 -350
  36. package/dist/chunk-GKOKCOXR.mjs.br +0 -0
  37. package/dist/chunk-GKOKCOXR.mjs.gz +0 -0
  38. package/dist/{chunk-HRLF4REI.mjs → chunk-GZ6TXBEO.mjs} +21 -56
  39. package/dist/chunk-GZ6TXBEO.mjs.br +0 -0
  40. package/dist/chunk-GZ6TXBEO.mjs.gz +0 -0
  41. package/dist/{chunk-WEU5EMKK.mjs → chunk-L5YGPCQW.mjs} +1 -1
  42. package/dist/chunk-L5YGPCQW.mjs.br +0 -0
  43. package/dist/chunk-L5YGPCQW.mjs.gz +0 -0
  44. package/dist/{chunk-G2LZT5SV.js → chunk-VY3KLDJF.js} +3 -3
  45. package/dist/chunk-VY3KLDJF.js.br +0 -0
  46. package/dist/chunk-VY3KLDJF.js.gz +0 -0
  47. package/dist/{chunk-6KRNQ2KF.mjs → chunk-ZFRPPY2N.mjs} +16 -2
  48. package/dist/chunk-ZFRPPY2N.mjs.br +0 -0
  49. package/dist/chunk-ZFRPPY2N.mjs.gz +0 -0
  50. package/dist/index.d.ts +14 -0
  51. package/dist/index.js +34 -34
  52. package/dist/index.js.br +0 -0
  53. package/dist/index.js.gz +0 -0
  54. package/dist/index.mjs +5 -5
  55. package/dist/index.mjs.br +0 -0
  56. package/dist/index.mjs.gz +0 -0
  57. package/dist/internals.d.ts +14 -0
  58. package/dist/internals.d.ts.map +1 -1
  59. package/dist/internals.js +78 -78
  60. package/dist/internals.js.br +0 -0
  61. package/dist/internals.js.gz +0 -0
  62. package/dist/internals.mjs +3 -3
  63. package/dist/internals.mjs.br +0 -0
  64. package/dist/internals.mjs.gz +0 -0
  65. package/dist/viewer/index.d.ts +14 -0
  66. package/dist/viewer/index.js +21 -21
  67. package/dist/viewer/index.js.br +0 -0
  68. package/dist/viewer/index.js.gz +0 -0
  69. package/dist/viewer/index.mjs +5 -5
  70. package/dist/viewer/index.mjs.br +0 -0
  71. package/dist/viewer/index.mjs.gz +0 -0
  72. package/package.json +1 -1
  73. package/dist/AiChatPanel-4YS6DEIT.mjs.br +0 -0
  74. package/dist/AiChatPanel-4YS6DEIT.mjs.gz +0 -0
  75. package/dist/AiChatPanel-DEI3EQFM.js.br +0 -0
  76. package/dist/AiChatPanel-DEI3EQFM.js.gz +0 -0
  77. package/dist/Model3DScene-JSNQCKCJ.mjs.br +0 -0
  78. package/dist/Model3DScene-JSNQCKCJ.mjs.gz +0 -0
  79. package/dist/Model3DScene-X4W7GZVY.js.br +0 -0
  80. package/dist/Model3DScene-X4W7GZVY.js.gz +0 -0
  81. package/dist/SurfaceChart3DScene-3MSU74YH.mjs.gz +0 -0
  82. package/dist/SurfaceChart3DScene-IZLUWT27.js.br +0 -0
  83. package/dist/SurfaceChart3DScene-IZLUWT27.js.gz +0 -0
  84. package/dist/chunk-4TD7EINA.mjs.br +0 -0
  85. package/dist/chunk-4TD7EINA.mjs.gz +0 -0
  86. package/dist/chunk-6KRNQ2KF.mjs.br +0 -0
  87. package/dist/chunk-6KRNQ2KF.mjs.gz +0 -0
  88. package/dist/chunk-EFSQW6S5.js.br +0 -0
  89. package/dist/chunk-EFSQW6S5.js.gz +0 -0
  90. package/dist/chunk-G2LZT5SV.js.br +0 -0
  91. package/dist/chunk-G2LZT5SV.js.gz +0 -0
  92. package/dist/chunk-HRLF4REI.mjs.br +0 -0
  93. package/dist/chunk-HRLF4REI.mjs.gz +0 -0
  94. package/dist/chunk-IDW5UPXW.js.br +0 -0
  95. package/dist/chunk-IDW5UPXW.js.gz +0 -0
  96. package/dist/chunk-RWIQHVZQ.js.br +0 -0
  97. package/dist/chunk-RWIQHVZQ.js.gz +0 -0
  98. package/dist/chunk-SHZ3GWOD.js.br +0 -0
  99. package/dist/chunk-SHZ3GWOD.js.gz +0 -0
  100. package/dist/chunk-WEU5EMKK.mjs.br +0 -0
  101. package/dist/chunk-WEU5EMKK.mjs.gz +0 -0
  102. package/dist/chunk-YA7VFYTW.mjs.br +0 -0
  103. package/dist/chunk-YA7VFYTW.mjs.gz +0 -0
@@ -1,8 +1,8 @@
1
1
  'use strict';
2
2
 
3
- var chunkIDW5UPXW_js = require('./chunk-IDW5UPXW.js');
3
+ var chunkDOS7NY7C_js = require('./chunk-DOS7NY7C.js');
4
4
  var chunkBXAK3JFM_js = require('./chunk-BXAK3JFM.js');
5
- var chunkEFSQW6S5_js = require('./chunk-EFSQW6S5.js');
5
+ var chunkFDR5W67L_js = require('./chunk-FDR5W67L.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 = chunkEFSQW6S5_js.DEFAULT_VIRTUAL_OVERSCAN
17
+ overscan = chunkFDR5W67L_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 = chunkEFSQW6S5_js.computeVirtualRange(totalItems, itemHeight, scrollTop, viewportHeight, overscan);
47
+ const range = chunkFDR5W67L_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") => {
@@ -107,7 +107,7 @@ function usePresenceTracking({
107
107
  awareness.setLocalStateField("presence", state);
108
108
  lastBroadcastRef.current = Date.now();
109
109
  };
110
- if (elapsed >= chunkEFSQW6S5_js.BROADCAST_THROTTLE_MS) {
110
+ if (elapsed >= chunkFDR5W67L_js.BROADCAST_THROTTLE_MS) {
111
111
  if (pendingBroadcastRef.current) {
112
112
  clearTimeout(pendingBroadcastRef.current);
113
113
  pendingBroadcastRef.current = null;
@@ -117,7 +117,7 @@ function usePresenceTracking({
117
117
  pendingBroadcastRef.current = setTimeout(() => {
118
118
  pendingBroadcastRef.current = null;
119
119
  flush();
120
- }, chunkEFSQW6S5_js.BROADCAST_THROTTLE_MS - elapsed);
120
+ }, chunkFDR5W67L_js.BROADCAST_THROTTLE_MS - elapsed);
121
121
  }
122
122
  },
123
123
  [awareness, userName, userColor, userAvatar, role]
@@ -142,7 +142,7 @@ function usePresenceTracking({
142
142
  return;
143
143
  }
144
144
  const handleChange = () => {
145
- const users = chunkEFSQW6S5_js.derivePresenceList(
145
+ const users = chunkFDR5W67L_js.derivePresenceList(
146
146
  awareness.getStates(),
147
147
  localClientId,
148
148
  canvasWidth,
@@ -194,7 +194,7 @@ function useYjsProvider({ config }) {
194
194
  const departureRef = react.useRef(null);
195
195
  const gateRef = react.useRef(null);
196
196
  if (!gateRef.current) {
197
- gateRef.current = chunkEFSQW6S5_js.createSyncGate(() => setSynced(true));
197
+ gateRef.current = chunkFDR5W67L_js.createSyncGate(() => setSynced(true));
198
198
  }
199
199
  const teardown = react.useCallback(() => {
200
200
  if (timeoutRef.current) {
@@ -214,7 +214,7 @@ function useYjsProvider({ config }) {
214
214
  const buildCleanup = react.useCallback(
215
215
  (provider, yDoc) => () => {
216
216
  announceDeparture();
217
- chunkEFSQW6S5_js.clearLocalAwareness(provider.awareness);
217
+ chunkFDR5W67L_js.clearLocalAwareness(provider.awareness);
218
218
  provider.destroy();
219
219
  yDoc.destroy();
220
220
  setDoc(null);
@@ -239,9 +239,9 @@ function useYjsProvider({ config }) {
239
239
  if (config.authToken) {
240
240
  opts.password = config.authToken;
241
241
  }
242
- const roomId = chunkEFSQW6S5_js.validateRoomId(config.roomId);
242
+ const roomId = chunkFDR5W67L_js.validateRoomId(config.roomId);
243
243
  const provider = new WebrtcProvider(roomId, yDoc, opts);
244
- departureRef.current = chunkEFSQW6S5_js.createDepartureChannel(roomId, provider.awareness);
244
+ departureRef.current = chunkFDR5W67L_js.createDepartureChannel(roomId, provider.awareness);
245
245
  setDoc(yDoc);
246
246
  setAwareness(provider.awareness);
247
247
  setClientId(provider.awareness.clientID);
@@ -283,13 +283,13 @@ function useYjsProvider({ config }) {
283
283
  if (!config) {
284
284
  return;
285
285
  }
286
- const roomId = chunkEFSQW6S5_js.validateRoomId(config.roomId);
287
- const transport = config.transport ?? chunkEFSQW6S5_js.resolveTransportForServerUrl(config.serverUrl);
286
+ const roomId = chunkFDR5W67L_js.validateRoomId(config.roomId);
287
+ const transport = config.transport ?? chunkFDR5W67L_js.resolveTransportForServerUrl(config.serverUrl);
288
288
  if (transport === "webrtc") {
289
289
  await initWebrtc();
290
290
  return;
291
291
  }
292
- if (chunkEFSQW6S5_js.isMixedContentBlocked(config.serverUrl)) {
292
+ if (chunkFDR5W67L_js.isMixedContentBlocked(config.serverUrl)) {
293
293
  console.warn(
294
294
  `[pptx-viewer] Refusing to connect: insecure ws:// server "${config.serverUrl}" is blocked from a secure (https) page. Use a wss:// URL.`
295
295
  );
@@ -303,7 +303,7 @@ function useYjsProvider({ config }) {
303
303
  const provider = new WebsocketProvider(config.serverUrl, roomId, yDoc, {
304
304
  params: config.authToken ? { token: config.authToken } : void 0
305
305
  });
306
- departureRef.current = chunkEFSQW6S5_js.createDepartureChannel(roomId, provider.awareness);
306
+ departureRef.current = chunkFDR5W67L_js.createDepartureChannel(roomId, provider.awareness);
307
307
  let connected = false;
308
308
  const handleStatus = (event) => {
309
309
  if (event.status === "connected") {
@@ -343,7 +343,7 @@ function useYjsProvider({ config }) {
343
343
  provider.off("status", handleStatus);
344
344
  provider.off("sync", handleSynced);
345
345
  announceDeparture();
346
- chunkEFSQW6S5_js.clearLocalAwareness(provider.awareness);
346
+ chunkFDR5W67L_js.clearLocalAwareness(provider.awareness);
347
347
  provider.destroy();
348
348
  yDoc.destroy();
349
349
  setDoc(null);
@@ -352,7 +352,7 @@ function useYjsProvider({ config }) {
352
352
  cleanupRef.current = null;
353
353
  setStatus("error");
354
354
  }
355
- }, chunkEFSQW6S5_js.CONNECTION_TIMEOUT_MS);
355
+ }, chunkFDR5W67L_js.CONNECTION_TIMEOUT_MS);
356
356
  }
357
357
  setDoc(yDoc);
358
358
  setAwareness(provider.awareness);
@@ -361,7 +361,7 @@ function useYjsProvider({ config }) {
361
361
  provider.off("status", handleStatus);
362
362
  provider.off("sync", handleSynced);
363
363
  announceDeparture();
364
- chunkEFSQW6S5_js.clearLocalAwareness(provider.awareness);
364
+ chunkFDR5W67L_js.clearLocalAwareness(provider.awareness);
365
365
  provider.destroy();
366
366
  yDoc.destroy();
367
367
  setDoc(null);
@@ -387,7 +387,7 @@ function useYjsProvider({ config }) {
387
387
  ]);
388
388
  react.useEffect(() => {
389
389
  init();
390
- const disposeTeardown = chunkEFSQW6S5_js.registerCollaborationTeardown({
390
+ const disposeTeardown = chunkFDR5W67L_js.registerCollaborationTeardown({
391
391
  leave: teardown,
392
392
  rejoin: init
393
393
  });
@@ -408,7 +408,7 @@ function useCollaborativeState({
408
408
  canvasWidth,
409
409
  canvasHeight
410
410
  }) {
411
- const userColor = chunkEFSQW6S5_js.sanitizeColor(config?.userColor, "#6366f1");
411
+ const userColor = chunkFDR5W67L_js.sanitizeColor(config?.userColor, "#6366f1");
412
412
  const { status, awareness, doc, clientId, synced, retry } = useYjsProvider({ config });
413
413
  const { remoteUsers, broadcastPresence } = usePresenceTracking({
414
414
  awareness,
@@ -517,8 +517,8 @@ function useEditorHistory(input) {
517
517
  width: canvasSize.width,
518
518
  height: canvasSize.height,
519
519
  activeSlideIndex,
520
- slides: slides.map(chunkEFSQW6S5_js.cloneSlide),
521
- templateElementsBySlideId: chunkEFSQW6S5_js.cloneTemplateElementsBySlideId(templateElementsBySlideId),
520
+ slides: slides.map(chunkFDR5W67L_js.cloneSlide),
521
+ templateElementsBySlideId: chunkFDR5W67L_js.cloneTemplateElementsBySlideId(templateElementsBySlideId),
522
522
  ...actionLabel ? { actionLabel } : {}
523
523
  };
524
524
  },
@@ -531,9 +531,9 @@ function useEditorHistory(input) {
531
531
  width: snapshot.width,
532
532
  height: snapshot.height
533
533
  });
534
- setSlides(snapshot.slides.map(chunkEFSQW6S5_js.cloneSlide));
534
+ setSlides(snapshot.slides.map(chunkFDR5W67L_js.cloneSlide));
535
535
  setTemplateElementsBySlideId(
536
- chunkEFSQW6S5_js.cloneTemplateElementsBySlideId(snapshot.templateElementsBySlideId)
536
+ chunkFDR5W67L_js.cloneTemplateElementsBySlideId(snapshot.templateElementsBySlideId)
537
537
  );
538
538
  setActiveSlideIndex(Math.min(snapshot.activeSlideIndex, maxSlideIndex));
539
539
  setSelectedElementIds([]);
@@ -567,8 +567,8 @@ function useEditorHistory(input) {
567
567
  const currentSnapshot = buildHistorySnapshot();
568
568
  historyFutureRef.current.push(currentSnapshot);
569
569
  isApplyingHistoryRef.current = true;
570
- const nextSnapshot = chunkIDW5UPXW_js.cloneHistorySnapshot(previousSnapshot);
571
- lastHistorySnapshotRef.current = chunkIDW5UPXW_js.cloneHistorySnapshot(nextSnapshot);
570
+ const nextSnapshot = chunkDOS7NY7C_js.cloneHistorySnapshot(previousSnapshot);
571
+ lastHistorySnapshotRef.current = chunkDOS7NY7C_js.cloneHistorySnapshot(nextSnapshot);
572
572
  lastHistorySerializedRef.current = JSON.stringify(nextSnapshot);
573
573
  applyHistorySnapshot(nextSnapshot);
574
574
  updateHistoryAvailability();
@@ -589,8 +589,8 @@ function useEditorHistory(input) {
589
589
  const currentSnapshot = buildHistorySnapshot();
590
590
  historyPastRef.current.push(currentSnapshot);
591
591
  isApplyingHistoryRef.current = true;
592
- const targetSnapshot = chunkIDW5UPXW_js.cloneHistorySnapshot(nextSnapshot);
593
- lastHistorySnapshotRef.current = chunkIDW5UPXW_js.cloneHistorySnapshot(targetSnapshot);
592
+ const targetSnapshot = chunkDOS7NY7C_js.cloneHistorySnapshot(nextSnapshot);
593
+ lastHistorySnapshotRef.current = chunkDOS7NY7C_js.cloneHistorySnapshot(targetSnapshot);
594
594
  lastHistorySerializedRef.current = JSON.stringify(targetSnapshot);
595
595
  applyHistorySnapshot(targetSnapshot);
596
596
  updateHistoryAvailability();
@@ -608,7 +608,7 @@ function useEditorHistory(input) {
608
608
  historyPastRef.current = [];
609
609
  historyFutureRef.current = [];
610
610
  if (initialSnapshot) {
611
- const clonedInitial = chunkIDW5UPXW_js.cloneHistorySnapshot(initialSnapshot);
611
+ const clonedInitial = chunkDOS7NY7C_js.cloneHistorySnapshot(initialSnapshot);
612
612
  lastHistorySnapshotRef.current = clonedInitial;
613
613
  lastHistorySerializedRef.current = JSON.stringify(clonedInitial);
614
614
  } else {
@@ -649,18 +649,18 @@ function useEditorHistory(input) {
649
649
  }
650
650
  const previousSnapshot = lastHistorySnapshotRef.current;
651
651
  if (!previousSnapshot) {
652
- lastHistorySnapshotRef.current = chunkIDW5UPXW_js.cloneHistorySnapshot(snapshot);
652
+ lastHistorySnapshotRef.current = chunkDOS7NY7C_js.cloneHistorySnapshot(snapshot);
653
653
  lastHistorySerializedRef.current = serialized;
654
654
  lastCheapHashRef.current = cheapHash;
655
655
  updateHistoryAvailability();
656
656
  return;
657
657
  }
658
- historyPastRef.current.push(chunkIDW5UPXW_js.cloneHistorySnapshot(previousSnapshot));
658
+ historyPastRef.current.push(chunkDOS7NY7C_js.cloneHistorySnapshot(previousSnapshot));
659
659
  while (historyPastRef.current.length > Math.max(1, maxHistoryEntries)) {
660
660
  historyPastRef.current.shift();
661
661
  }
662
662
  historyFutureRef.current = [];
663
- lastHistorySnapshotRef.current = chunkIDW5UPXW_js.cloneHistorySnapshot(snapshot);
663
+ lastHistorySnapshotRef.current = chunkDOS7NY7C_js.cloneHistorySnapshot(snapshot);
664
664
  lastHistorySerializedRef.current = serialized;
665
665
  lastCheapHashRef.current = cheapHash;
666
666
  updateHistoryAvailability();
@@ -750,7 +750,7 @@ function useZoomViewport({
750
750
  if (!wrapper || !canvasViewport) {
751
751
  return;
752
752
  }
753
- const boundedScale = chunkEFSQW6S5_js.clampZoomScale(nextScale);
753
+ const boundedScale = chunkFDR5W67L_js.clampZoomScale(nextScale);
754
754
  const nextEditorScale = fitScale * boundedScale;
755
755
  const centerX = (bounds.minX + bounds.maxX) / 2;
756
756
  const centerY = (bounds.minY + bounds.maxY) / 2;
@@ -765,10 +765,10 @@ function useZoomViewport({
765
765
  [fitScale]
766
766
  );
767
767
  const handleZoomIn = react.useCallback(() => {
768
- setScale((currentScale) => chunkEFSQW6S5_js.zoomInScale(currentScale));
768
+ setScale((currentScale) => chunkFDR5W67L_js.zoomInScale(currentScale));
769
769
  }, []);
770
770
  const handleZoomOut = react.useCallback(() => {
771
- setScale((currentScale) => chunkEFSQW6S5_js.zoomOutScale(currentScale));
771
+ setScale((currentScale) => chunkFDR5W67L_js.zoomOutScale(currentScale));
772
772
  }, []);
773
773
  const handleResetZoom = react.useCallback(() => {
774
774
  setScale(1);
@@ -787,29 +787,29 @@ function useZoomViewport({
787
787
  selectedElements.forEach((element) => {
788
788
  minX = Math.min(minX, element.x);
789
789
  minY = Math.min(minY, element.y);
790
- maxX = Math.max(maxX, element.x + Math.max(element.width, chunkIDW5UPXW_js.MIN_ELEMENT_SIZE));
791
- maxY = Math.max(maxY, element.y + Math.max(element.height, chunkIDW5UPXW_js.MIN_ELEMENT_SIZE));
790
+ maxX = Math.max(maxX, element.x + Math.max(element.width, chunkDOS7NY7C_js.MIN_ELEMENT_SIZE));
791
+ maxY = Math.max(maxY, element.y + Math.max(element.height, chunkDOS7NY7C_js.MIN_ELEMENT_SIZE));
792
792
  });
793
793
  if (!Number.isFinite(minX) || !Number.isFinite(minY) || !Number.isFinite(maxX) || !Number.isFinite(maxY)) {
794
794
  return;
795
795
  }
796
796
  const selectionBounds = { minX, minY, maxX, maxY };
797
- const boundsWidth = Math.max(selectionBounds.maxX - selectionBounds.minX, chunkIDW5UPXW_js.MIN_ELEMENT_SIZE);
798
- const boundsHeight = Math.max(selectionBounds.maxY - selectionBounds.minY, chunkIDW5UPXW_js.MIN_ELEMENT_SIZE);
797
+ const boundsWidth = Math.max(selectionBounds.maxX - selectionBounds.minX, chunkDOS7NY7C_js.MIN_ELEMENT_SIZE);
798
+ const boundsHeight = Math.max(selectionBounds.maxY - selectionBounds.minY, chunkDOS7NY7C_js.MIN_ELEMENT_SIZE);
799
799
  const availableWidth = Math.max(
800
- effectiveEditorDimensions.width - chunkIDW5UPXW_js.ZOOM_TO_SELECTION_PADDING,
801
- chunkIDW5UPXW_js.MIN_ELEMENT_SIZE
800
+ effectiveEditorDimensions.width - chunkDOS7NY7C_js.ZOOM_TO_SELECTION_PADDING,
801
+ chunkDOS7NY7C_js.MIN_ELEMENT_SIZE
802
802
  );
803
803
  const availableHeight = Math.max(
804
- effectiveEditorDimensions.height - chunkIDW5UPXW_js.ZOOM_TO_SELECTION_PADDING,
805
- chunkIDW5UPXW_js.MIN_ELEMENT_SIZE
804
+ effectiveEditorDimensions.height - chunkDOS7NY7C_js.ZOOM_TO_SELECTION_PADDING,
805
+ chunkDOS7NY7C_js.MIN_ELEMENT_SIZE
806
806
  );
807
807
  const targetEditorScale = Math.min(
808
808
  availableWidth / boundsWidth,
809
809
  availableHeight / boundsHeight
810
810
  );
811
811
  const safeFitScale = fitScale > Number.EPSILON ? fitScale : Number.EPSILON;
812
- const nextScale = chunkEFSQW6S5_js.clampZoomScale(targetEditorScale / safeFitScale);
812
+ const nextScale = chunkFDR5W67L_js.clampZoomScale(targetEditorScale / safeFitScale);
813
813
  setScale(nextScale);
814
814
  window.requestAnimationFrame(() => {
815
815
  window.requestAnimationFrame(() => {
@@ -829,7 +829,7 @@ function useZoomViewport({
829
829
  }
830
830
  event.preventDefault();
831
831
  const delta = event.deltaY * -1e-3;
832
- setScale((currentScale) => chunkEFSQW6S5_js.clampZoomScale(currentScale + delta));
832
+ setScale((currentScale) => chunkFDR5W67L_js.clampZoomScale(currentScale + delta));
833
833
  }, []);
834
834
  react.useEffect(() => {
835
835
  const viewport = canvasViewportRef.current;
@@ -906,7 +906,7 @@ function applyAnimationGroupSteps(group, onPlayActionSound, setPresentationEleme
906
906
  const command = step.command;
907
907
  const timer = window.setTimeout(
908
908
  () => {
909
- chunkIDW5UPXW_js.executeMediaCommand(command);
909
+ chunkDOS7NY7C_js.executeMediaCommand(command);
910
910
  },
911
911
  Math.max(0, step.delayMs)
912
912
  );
@@ -1022,7 +1022,7 @@ function useAnimationPlayback(input) {
1022
1022
  (controller, group) => {
1023
1023
  driveBuildReveal(
1024
1024
  controller,
1025
- chunkEFSQW6S5_js.PresentationAnimationController.collectBuildStepIds(group),
1025
+ chunkFDR5W67L_js.PresentationAnimationController.collectBuildStepIds(group),
1026
1026
  setPresentationElementStates,
1027
1027
  buildRafRef
1028
1028
  );
@@ -1085,7 +1085,7 @@ function useAnimationPlayback(input) {
1085
1085
  setHoverTriggerShapeIds(/* @__PURE__ */ new Set());
1086
1086
  return;
1087
1087
  }
1088
- const controller = chunkEFSQW6S5_js.PresentationAnimationController.fromSlide(slide);
1088
+ const controller = chunkFDR5W67L_js.PresentationAnimationController.fromSlide(slide);
1089
1089
  controllerRef.current = controller;
1090
1090
  setPresentationKeyframesCss(controller.keyframesCss);
1091
1091
  setInteractiveTriggerShapeIds(controller.interactiveTriggerShapeIds);
@@ -1233,7 +1233,7 @@ function useAnimationPlayback(input) {
1233
1233
  }))
1234
1234
  );
1235
1235
  entranceAnimations.forEach((animation, animationIndex) => {
1236
- const delay = chunkEFSQW6S5_js.computeEntranceAnimationDelay(animation.delayMs, animationIndex);
1236
+ const delay = chunkFDR5W67L_js.computeEntranceAnimationDelay(animation.delayMs, animationIndex);
1237
1237
  const timer = window.setTimeout(() => {
1238
1238
  setPresentationAnimations(
1239
1239
  (previousAnimations) => previousAnimations.map(
@@ -1270,12 +1270,12 @@ function useAnimationPlayback(input) {
1270
1270
  presentationTimersRef
1271
1271
  };
1272
1272
  }
1273
- var PRESENTER_CHANNEL_NAME = chunkEFSQW6S5_js.PRESENTATION_CHANNEL_NAME;
1274
- var AUDIENCE_HASH = chunkEFSQW6S5_js.PRESENTATION_HASH;
1275
- var PRESENTER_MSG_ORIGIN = chunkEFSQW6S5_js.PRESENTATION_MESSAGE_ORIGIN;
1276
- var AUDIENCE_NONCE_KEY = chunkEFSQW6S5_js.PRESENTATION_NONCE_KEY;
1273
+ var PRESENTER_CHANNEL_NAME = chunkFDR5W67L_js.PRESENTATION_CHANNEL_NAME;
1274
+ var AUDIENCE_HASH = chunkFDR5W67L_js.PRESENTATION_HASH;
1275
+ var PRESENTER_MSG_ORIGIN = chunkFDR5W67L_js.PRESENTATION_MESSAGE_ORIGIN;
1276
+ var AUDIENCE_NONCE_KEY = chunkFDR5W67L_js.PRESENTATION_NONCE_KEY;
1277
1277
  function generateSessionId() {
1278
- return chunkEFSQW6S5_js.createPresentationSessionId();
1278
+ return chunkFDR5W67L_js.createPresentationSessionId();
1279
1279
  }
1280
1280
  function parseAudienceNonce() {
1281
1281
  const hash = window.location.hash;
@@ -1311,7 +1311,7 @@ function usePresenterWindow(input) {
1311
1311
  }, []);
1312
1312
  const swapDisplays = react.useCallback(async () => {
1313
1313
  const audience = audienceWindowRef.current;
1314
- return audience && !audience.closed ? chunkEFSQW6S5_js.swapPresentationWindows(window, audience) : false;
1314
+ return audience && !audience.closed ? chunkFDR5W67L_js.swapPresentationWindows(window, audience) : false;
1315
1315
  }, []);
1316
1316
  const syncSlideToAudience = react.useCallback(
1317
1317
  (slideIndex) => {
@@ -1375,7 +1375,7 @@ function usePresenterWindow(input) {
1375
1375
  pollTimerRef.current = null;
1376
1376
  }
1377
1377
  if (closingSessionId) {
1378
- void chunkEFSQW6S5_js.clearAudienceContent(closingSessionId);
1378
+ void chunkFDR5W67L_js.clearAudienceContent(closingSessionId);
1379
1379
  }
1380
1380
  }, [getChannel]);
1381
1381
  const openAudienceWindow = react.useCallback(() => {
@@ -1393,10 +1393,10 @@ function usePresenterWindow(input) {
1393
1393
  audienceWindowRef.current = blankWin;
1394
1394
  const sessionId = generateSessionId();
1395
1395
  sessionIdRef.current = sessionId;
1396
- const audienceUrl = chunkEFSQW6S5_js.buildPresentationAudienceUrl(window.location.href, sessionId);
1397
- void chunkEFSQW6S5_js.resolveAudienceScreenPlacement(window).then((placement) => {
1396
+ const audienceUrl = chunkFDR5W67L_js.buildPresentationAudienceUrl(window.location.href, sessionId);
1397
+ void chunkFDR5W67L_js.resolveAudienceScreenPlacement(window).then((placement) => {
1398
1398
  if (placement && audienceWindowRef.current === blankWin && !blankWin.closed) {
1399
- chunkEFSQW6S5_js.placeAudienceWindow(blankWin, placement);
1399
+ chunkFDR5W67L_js.placeAudienceWindow(blankWin, placement);
1400
1400
  }
1401
1401
  return void 0;
1402
1402
  });
@@ -1426,7 +1426,7 @@ function usePresenterWindow(input) {
1426
1426
  }
1427
1427
  };
1428
1428
  if (content) {
1429
- void chunkEFSQW6S5_js.storeAudienceContent(content, sessionId).then(() => navigateOrClose(true)).catch(() => navigateOrClose(false));
1429
+ void chunkFDR5W67L_js.storeAudienceContent(content, sessionId).then(() => navigateOrClose(true)).catch(() => navigateOrClose(false));
1430
1430
  } else {
1431
1431
  navigateOrClose(true);
1432
1432
  }
@@ -1452,7 +1452,7 @@ function usePresenterWindow(input) {
1452
1452
  }
1453
1453
  const handleMessage = (event) => {
1454
1454
  const message = event.data;
1455
- if (chunkEFSQW6S5_js.isPresentationSessionMessage(message) && message.type === "audience-ready" && message.sessionId === sessionIdRef.current) {
1455
+ if (chunkFDR5W67L_js.isPresentationSessionMessage(message) && message.type === "audience-ready" && message.sessionId === sessionIdRef.current) {
1456
1456
  syncStateToAudience(snapshotRef.current);
1457
1457
  }
1458
1458
  };
@@ -1481,7 +1481,7 @@ function usePresenterWindow(input) {
1481
1481
  react.useEffect(() => {
1482
1482
  const handleBeforeUnload = () => {
1483
1483
  if (sessionIdRef.current) {
1484
- void chunkEFSQW6S5_js.clearAudienceContent(sessionIdRef.current);
1484
+ void chunkFDR5W67L_js.clearAudienceContent(sessionIdRef.current);
1485
1485
  }
1486
1486
  };
1487
1487
  window.addEventListener("beforeunload", handleBeforeUnload);
@@ -1543,7 +1543,7 @@ function useAudienceMode(input) {
1543
1543
  }
1544
1544
  channel.onmessage = (event) => {
1545
1545
  const data = event.data;
1546
- if (!chunkEFSQW6S5_js.isPresentationSessionMessage(data) || data.origin !== PRESENTER_MSG_ORIGIN) {
1546
+ if (!chunkFDR5W67L_js.isPresentationSessionMessage(data) || data.origin !== PRESENTER_MSG_ORIGIN) {
1547
1547
  return;
1548
1548
  }
1549
1549
  if (expectedSessionId && data.sessionId !== expectedSessionId) {
@@ -1559,16 +1559,16 @@ function useAudienceMode(input) {
1559
1559
  }
1560
1560
  if (data.type === "presenter-exit") {
1561
1561
  if (expectedSessionId) {
1562
- void chunkEFSQW6S5_js.clearAudienceContent(expectedSessionId);
1562
+ void chunkFDR5W67L_js.clearAudienceContent(expectedSessionId);
1563
1563
  }
1564
- if (chunkEFSQW6S5_js.endAudienceDisplay(window)) {
1564
+ if (chunkFDR5W67L_js.endAudienceDisplay(window)) {
1565
1565
  handlers.onPresenterEnded?.();
1566
1566
  }
1567
1567
  }
1568
1568
  };
1569
1569
  if (expectedSessionId) {
1570
1570
  channel.postMessage({
1571
- origin: chunkEFSQW6S5_js.PRESENTATION_MESSAGE_ORIGIN,
1571
+ origin: chunkFDR5W67L_js.PRESENTATION_MESSAGE_ORIGIN,
1572
1572
  type: "audience-ready",
1573
1573
  sessionId: expectedSessionId
1574
1574
  });
@@ -1601,14 +1601,14 @@ function usePresentationKeyboard(input) {
1601
1601
  presentationSlideIndex,
1602
1602
  setShowRehearsalSummary
1603
1603
  } = input;
1604
- const keyBufferRef = react.useRef(chunkEFSQW6S5_js.createPresentationKeyBuffer());
1604
+ const keyBufferRef = react.useRef(chunkFDR5W67L_js.createPresentationKeyBuffer());
1605
1605
  react.useEffect(() => {
1606
- if (mode !== "present" || !chunkEFSQW6S5_js.acceptsPresentationInput()) {
1607
- keyBufferRef.current = chunkEFSQW6S5_js.createPresentationKeyBuffer();
1606
+ if (mode !== "present" || !chunkFDR5W67L_js.acceptsPresentationInput()) {
1607
+ keyBufferRef.current = chunkFDR5W67L_js.createPresentationKeyBuffer();
1608
1608
  return;
1609
1609
  }
1610
1610
  const handleKeyDown = (event) => {
1611
- const mapped = chunkEFSQW6S5_js.mapPresentationKey(event, keyBufferRef.current);
1611
+ const mapped = chunkFDR5W67L_js.mapPresentationKey(event, keyBufferRef.current);
1612
1612
  if (mapped.action === "none") {
1613
1613
  return;
1614
1614
  }
@@ -1628,12 +1628,12 @@ function usePresentationKeyboard(input) {
1628
1628
  movePresentationSlide(-1);
1629
1629
  return;
1630
1630
  case "first": {
1631
- const first = chunkEFSQW6S5_js.firstShowSlideIndex(showSlideIndexes);
1631
+ const first = chunkFDR5W67L_js.firstShowSlideIndex(showSlideIndexes);
1632
1632
  navigateToSlide(first ?? 0);
1633
1633
  return;
1634
1634
  }
1635
1635
  case "last": {
1636
- const last = chunkEFSQW6S5_js.lastShowSlideIndex(showSlideIndexes);
1636
+ const last = chunkFDR5W67L_js.lastShowSlideIndex(showSlideIndexes);
1637
1637
  navigateToSlide(last ?? Math.max(0, slideCount - 1));
1638
1638
  return;
1639
1639
  }
@@ -1788,7 +1788,7 @@ function useRehearsalTimings(input) {
1788
1788
 
1789
1789
  // src/viewer/hooks/presentation-mode/presentation-actions.ts
1790
1790
  function handlePresentationActionImpl(action, deps) {
1791
- chunkEFSQW6S5_js.runPresentationAction(
1791
+ chunkFDR5W67L_js.runPresentationAction(
1792
1792
  action,
1793
1793
  { slideCount: deps.slidesLength },
1794
1794
  {
@@ -1810,7 +1810,7 @@ function handlePresentationActionImpl(action, deps) {
1810
1810
  function executeSlideTransition(nextSlideIndex, deps) {
1811
1811
  const incomingSlide = deps.slides[nextSlideIndex];
1812
1812
  const transition = incomingSlide?.transition;
1813
- const durationMs = deps.playTransition ? chunkEFSQW6S5_js.resolveTransitionDurationMs(transition) : 0;
1813
+ const durationMs = deps.playTransition ? chunkFDR5W67L_js.resolveTransitionDurationMs(transition) : 0;
1814
1814
  deps.clearPresentationTimers();
1815
1815
  deps.setPresentationSlideIndex(nextSlideIndex);
1816
1816
  deps.onSetActiveSlideIndex(nextSlideIndex);
@@ -1869,7 +1869,7 @@ function useSlideNavigation(input) {
1869
1869
  });
1870
1870
  const scheduleAutoAdvanceForSlide = react.useCallback(
1871
1871
  (slideIndex) => {
1872
- const delayMs = chunkEFSQW6S5_js.resolveAutoAdvanceDelayMs(slides[slideIndex], { useTimings });
1872
+ const delayMs = chunkFDR5W67L_js.resolveAutoAdvanceDelayMs(slides[slideIndex], { useTimings });
1873
1873
  if (delayMs === void 0) {
1874
1874
  return;
1875
1875
  }
@@ -1892,7 +1892,7 @@ function useSlideNavigation(input) {
1892
1892
  if (availableSlideIndexes.length === 0) {
1893
1893
  return;
1894
1894
  }
1895
- const pastLastSlide = direction === 1 && !chunkEFSQW6S5_js.hasShowSlideAfter(presentationSlideIndex, availableSlideIndexes);
1895
+ const pastLastSlide = direction === 1 && !chunkFDR5W67L_js.hasShowSlideAfter(presentationSlideIndex, availableSlideIndexes);
1896
1896
  if (rehearsing && pastLastSlide) {
1897
1897
  recordCurrentSlideTime(presentationSlideIndex);
1898
1898
  try {
@@ -1910,9 +1910,9 @@ function useSlideNavigation(input) {
1910
1910
  onAdvancePastLastSlide();
1911
1911
  return;
1912
1912
  }
1913
- const nextSlideIndex = direction === 1 ? chunkEFSQW6S5_js.nextShowSlideIndex(presentationSlideIndex, availableSlideIndexes, {
1913
+ const nextSlideIndex = direction === 1 ? chunkFDR5W67L_js.nextShowSlideIndex(presentationSlideIndex, availableSlideIndexes, {
1914
1914
  loop: Boolean(loopContinuously) && !rehearsing
1915
- }) : chunkEFSQW6S5_js.previousShowSlideIndex(presentationSlideIndex, availableSlideIndexes);
1915
+ }) : chunkFDR5W67L_js.previousShowSlideIndex(presentationSlideIndex, availableSlideIndexes);
1916
1916
  if (nextSlideIndex === void 0 || nextSlideIndex === presentationSlideIndex) {
1917
1917
  return;
1918
1918
  }
@@ -2053,17 +2053,17 @@ function useZoomNavigation(input) {
2053
2053
  };
2054
2054
  }
2055
2055
  function usePresenterConsole(slideIndex) {
2056
- const timerRef = react.useRef(chunkEFSQW6S5_js.createPresenterTimer());
2057
- const [snapshot, setSnapshot] = react.useState(() => chunkEFSQW6S5_js.createInitialPresentationSnapshot(slideIndex));
2056
+ const timerRef = react.useRef(chunkFDR5W67L_js.createPresenterTimer());
2057
+ const [snapshot, setSnapshot] = react.useState(() => chunkFDR5W67L_js.createInitialPresentationSnapshot(slideIndex));
2058
2058
  const patch = react.useCallback((value) => {
2059
- setSnapshot((current) => chunkEFSQW6S5_js.mergePresentationSnapshot(current, value));
2059
+ setSnapshot((current) => chunkFDR5W67L_js.mergePresentationSnapshot(current, value));
2060
2060
  }, []);
2061
2061
  react.useEffect(() => patch({ slideIndex }), [patch, slideIndex]);
2062
2062
  react.useEffect(() => {
2063
2063
  const timer = window.setInterval(() => {
2064
2064
  patch({
2065
2065
  paused: timerRef.current.paused,
2066
- elapsedMs: chunkEFSQW6S5_js.presenterElapsed(timerRef.current)
2066
+ elapsedMs: chunkFDR5W67L_js.presenterElapsed(timerRef.current)
2067
2067
  });
2068
2068
  }, 1e3);
2069
2069
  return () => window.clearInterval(timer);
@@ -2073,19 +2073,19 @@ function usePresenterConsole(slideIndex) {
2073
2073
  applyAudienceSnapshot: setSnapshot,
2074
2074
  setBlackout: (blackout) => patch({ blackout }),
2075
2075
  toggleTimer: () => {
2076
- timerRef.current = chunkEFSQW6S5_js.togglePresenterTimer(timerRef.current);
2076
+ timerRef.current = chunkFDR5W67L_js.togglePresenterTimer(timerRef.current);
2077
2077
  patch({
2078
2078
  paused: timerRef.current.paused,
2079
- elapsedMs: chunkEFSQW6S5_js.presenterElapsed(timerRef.current)
2079
+ elapsedMs: chunkFDR5W67L_js.presenterElapsed(timerRef.current)
2080
2080
  });
2081
2081
  },
2082
2082
  resetTimer: () => {
2083
- timerRef.current = chunkEFSQW6S5_js.resetPresenterTimer();
2083
+ timerRef.current = chunkFDR5W67L_js.resetPresenterTimer();
2084
2084
  patch({ paused: false, elapsedMs: 0 });
2085
2085
  },
2086
2086
  stepZoom: (direction) => setSnapshot(
2087
- (current) => chunkEFSQW6S5_js.mergePresentationSnapshot(current, {
2088
- zoom: chunkEFSQW6S5_js.stepPresenterZoom(
2087
+ (current) => chunkFDR5W67L_js.mergePresentationSnapshot(current, {
2088
+ zoom: chunkFDR5W67L_js.stepPresenterZoom(
2089
2089
  current.zoom ?? { scale: 1, originX: 0.5, originY: 0.5 },
2090
2090
  direction
2091
2091
  )
@@ -2130,7 +2130,7 @@ function usePresentationMode(input) {
2130
2130
  const [allSlidesOpen, setAllSlidesOpen] = react.useState(false);
2131
2131
  const [endOfShowVisible, setEndOfShowVisible] = react.useState(false);
2132
2132
  const [presentationStartTime, setPresentationStartTime] = react.useState(null);
2133
- const showGuard = react.useMemo(() => chunkEFSQW6S5_js.createPresenterShowGuard(), []);
2133
+ const showGuard = react.useMemo(() => chunkFDR5W67L_js.createPresenterShowGuard(), []);
2134
2134
  const {
2135
2135
  presentationAnimations,
2136
2136
  presentationElementStates,
@@ -2206,7 +2206,7 @@ function usePresentationMode(input) {
2206
2206
  });
2207
2207
  const movePresentationSlide = react.useCallback(
2208
2208
  (direction, trigger = "explicit") => {
2209
- if (!chunkEFSQW6S5_js.acceptsPresentationInput()) {
2209
+ if (!chunkFDR5W67L_js.acceptsPresentationInput()) {
2210
2210
  return;
2211
2211
  }
2212
2212
  if (endOfShowVisible) {
@@ -2335,6 +2335,20 @@ function usePresentationMode(input) {
2335
2335
  scheduleAutoAdvanceRef.current = scheduleAutoAdvanceForSlide;
2336
2336
  const activeSlideIndexRef = react.useRef(activeSlideIndex);
2337
2337
  activeSlideIndexRef.current = activeSlideIndex;
2338
+ const presentationSlideIndexRef = react.useRef(presentationSlideIndex);
2339
+ presentationSlideIndexRef.current = presentationSlideIndex;
2340
+ const clearPresentationTimersRef = react.useRef(clearPresentationTimers);
2341
+ clearPresentationTimersRef.current = clearPresentationTimers;
2342
+ react.useEffect(() => {
2343
+ if (mode !== "present") {
2344
+ return;
2345
+ }
2346
+ return chunkFDR5W67L_js.attachPresentationVisibilityPause({
2347
+ root: containerRef.current ?? void 0,
2348
+ onHidden: () => clearPresentationTimersRef.current(),
2349
+ onVisible: () => scheduleAutoAdvanceRef.current(presentationSlideIndexRef.current)
2350
+ });
2351
+ }, [mode, containerRef]);
2338
2352
  react.useEffect(() => {
2339
2353
  if (mode === "present") {
2340
2354
  const idx = activeSlideIndexRef.current;
@@ -2409,11 +2423,11 @@ function usePresentationMode(input) {
2409
2423
  if (!transitionOverlay || transitionOverlay.transition.type !== "morph") {
2410
2424
  return void 0;
2411
2425
  }
2412
- return chunkEFSQW6S5_js.buildMorphTransitionPlan(
2426
+ return chunkFDR5W67L_js.buildMorphTransitionPlan(
2413
2427
  slides[transitionOverlay.outgoingSlideIndex],
2414
2428
  slides[transitionOverlay.incomingSlideIndex],
2415
2429
  transitionOverlay.durationMs,
2416
- chunkEFSQW6S5_js.morphOptionToMode(transitionOverlay.transition.morphOption)
2430
+ chunkFDR5W67L_js.morphOptionToMode(transitionOverlay.transition.morphOption)
2417
2431
  );
2418
2432
  }, [transitionOverlay, slides]);
2419
2433
  const morphedElementStates = react.useMemo(() => {
@@ -2719,7 +2733,7 @@ function findInSlides(slides, findQuery, findMatchCase) {
2719
2733
  const normalised = findMatchCase ? findQuery : findQuery.toLowerCase();
2720
2734
  slides.forEach((slide, slideIndex) => {
2721
2735
  for (const element of slide.elements || []) {
2722
- if (!chunkEFSQW6S5_js.hasTextProperties(element)) {
2736
+ if (!chunkFDR5W67L_js.hasTextProperties(element)) {
2723
2737
  continue;
2724
2738
  }
2725
2739
  const segments = element.textSegments ?? [];
@@ -2770,7 +2784,7 @@ function applyFindReplacements(slides, toReplace, replaceQuery) {
2770
2784
  continue;
2771
2785
  }
2772
2786
  const element = slide.elements[elIdx];
2773
- if (!chunkEFSQW6S5_js.hasTextProperties(element)) {
2787
+ if (!chunkFDR5W67L_js.hasTextProperties(element)) {
2774
2788
  continue;
2775
2789
  }
2776
2790
  const segments = [...element.textSegments ?? []];
@@ -3368,7 +3382,7 @@ function useViewerCoreState(_input) {
3368
3382
  const shapeAdjustmentDragStateRef = react.useRef(null);
3369
3383
  const marqueeStateRef = react.useRef(null);
3370
3384
  const isDrawingRef = react.useRef(false);
3371
- const livePatcher = react.useMemo(() => chunkEFSQW6S5_js.createCollaborationLivePatcher(), []);
3385
+ const livePatcher = react.useMemo(() => chunkFDR5W67L_js.createCollaborationLivePatcher(), []);
3372
3386
  react.useEffect(() => () => livePatcher.dispose(), [livePatcher]);
3373
3387
  const slidesRef = react.useRef([]);
3374
3388
  const [mode, setMode] = react.useState("edit");
@@ -3377,8 +3391,8 @@ function useViewerCoreState(_input) {
3377
3391
  const [slides, setSlides] = react.useState([]);
3378
3392
  const [templateElementsBySlideId, setTemplateElementsBySlideId] = react.useState({});
3379
3393
  const [canvasSize, setCanvasSize] = react.useState({
3380
- width: chunkIDW5UPXW_js.DEFAULT_CANVAS_WIDTH,
3381
- height: chunkIDW5UPXW_js.DEFAULT_CANVAS_HEIGHT
3394
+ width: chunkDOS7NY7C_js.DEFAULT_CANVAS_WIDTH,
3395
+ height: chunkDOS7NY7C_js.DEFAULT_CANVAS_HEIGHT
3382
3396
  });
3383
3397
  const [activeSlideIndex, setActiveSlideIndex] = react.useState(0);
3384
3398
  const [selectedElementId, setSelectedElementId] = react.useState(null);
@@ -3398,7 +3412,7 @@ function useViewerCoreState(_input) {
3398
3412
  const resolved = typeof value === "function" ? value(inlineEditingTextRef.current) : value;
3399
3413
  inlineEditingTextRef.current = resolved;
3400
3414
  setInlineEditingTextBase(value);
3401
- chunkEFSQW6S5_js.publishLiveInlineText(
3415
+ chunkFDR5W67L_js.publishLiveInlineText(
3402
3416
  livePatcher,
3403
3417
  slidesRef.current[activeSlideIndexRef.current],
3404
3418
  inlineEditingElementIdRef.current,
@@ -3732,7 +3746,7 @@ function useLoadContent({
3732
3746
  );
3733
3747
  }
3734
3748
  const previousHandler = handlerRef.current;
3735
- const handler = new chunkEFSQW6S5_js.PptxHandler();
3749
+ const handler = new chunkFDR5W67L_js.PptxHandler();
3736
3750
  const parsed = await handler.load(buffer);
3737
3751
  if (cancelled || token !== renderTokenRef.current) {
3738
3752
  handler.dispose();
@@ -3744,7 +3758,7 @@ function useLoadContent({
3744
3758
  handlerRef.current = null;
3745
3759
  const mediaElements = [];
3746
3760
  for (const slide of parsed.slides) {
3747
- chunkEFSQW6S5_js.collectMediaElements(slide.elements, mediaElements);
3761
+ chunkFDR5W67L_js.collectMediaElements(slide.elements, mediaElements);
3748
3762
  }
3749
3763
  for (const url of mediaDataUrls.values()) {
3750
3764
  if (url.startsWith("blob:")) {
@@ -3785,7 +3799,7 @@ function useLoadContent({
3785
3799
  }
3786
3800
  })
3787
3801
  );
3788
- const { paths: imagePaths, refs: imageRefs } = chunkEFSQW6S5_js.collectImagePaths(parsed.slides);
3802
+ const { paths: imagePaths, refs: imageRefs } = chunkFDR5W67L_js.collectImagePaths(parsed.slides);
3789
3803
  let nextSlides = parsed.slides;
3790
3804
  if (imagePaths.size > 0) {
3791
3805
  const resolvedMap = /* @__PURE__ */ new Map();
@@ -3840,12 +3854,12 @@ function useLoadContent({
3840
3854
  }
3841
3855
  }
3842
3856
  handlerRef.current = handler;
3843
- const partition = chunkIDW5UPXW_js.partitionTemplateElements(nextSlides);
3857
+ const partition = chunkDOS7NY7C_js.partitionTemplateElements(nextSlides);
3844
3858
  setSlides(partition.slides);
3845
3859
  setTemplateElementsBySlideId(partition.templateElementsBySlideId);
3846
3860
  setCanvasSize({
3847
- width: parsed.width ?? chunkIDW5UPXW_js.DEFAULT_CANVAS_WIDTH,
3848
- height: parsed.height ?? chunkIDW5UPXW_js.DEFAULT_CANVAS_HEIGHT
3861
+ width: parsed.width ?? chunkDOS7NY7C_js.DEFAULT_CANVAS_WIDTH,
3862
+ height: parsed.height ?? chunkDOS7NY7C_js.DEFAULT_CANVAS_HEIGHT
3849
3863
  });
3850
3864
  setHeaderFooter(parsed.headerFooter ?? {});
3851
3865
  setLayoutOptions(parsed.layoutOptions ?? []);
@@ -3874,7 +3888,7 @@ function useLoadContent({
3874
3888
  setHasMacros(parsed.hasMacros === true);
3875
3889
  setHasDigitalSignatures(parsed.hasDigitalSignatures === true);
3876
3890
  setDigitalSignatureCount(parsed.digitalSignatureCount ?? 0);
3877
- setGuides(chunkEFSQW6S5_js.buildInitialGuides(parsed.presentationGuides, parsed.slides[0]?.guides));
3891
+ setGuides(chunkFDR5W67L_js.buildInitialGuides(parsed.presentationGuides, parsed.slides[0]?.guides));
3878
3892
  setActiveSlideIndex(0);
3879
3893
  clearSelection();
3880
3894
  setIsDirty(false);
@@ -3882,7 +3896,7 @@ function useLoadContent({
3882
3896
  onContentApplied?.();
3883
3897
  } catch (err) {
3884
3898
  if (!cancelled && token === renderTokenRef.current) {
3885
- if (err instanceof chunkEFSQW6S5_js.EncryptedFileError) {
3899
+ if (err instanceof chunkFDR5W67L_js.EncryptedFileError) {
3886
3900
  setIsEncrypted(true);
3887
3901
  } else {
3888
3902
  setError(err instanceof Error ? err.message : String(err));
@@ -3959,7 +3973,7 @@ function useAutosave(input) {
3959
3973
  isSavingRef.current = false;
3960
3974
  return;
3961
3975
  }
3962
- await chunkEFSQW6S5_js.saveAutosaveSnapshot(filePathRef.current, data);
3976
+ await chunkFDR5W67L_js.saveAutosaveSnapshot(filePathRef.current, data);
3963
3977
  setAutosaveStatus({ state: "saved", timestamp: Date.now() });
3964
3978
  } catch (err) {
3965
3979
  setAutosaveStatus({
@@ -4024,7 +4038,7 @@ function useElementOperations(input) {
4024
4038
  }, [applySelection, setInlineEditingElementId, setContextMenuState]);
4025
4039
  const updateElementById = react.useCallback(
4026
4040
  (elementId, updates) => {
4027
- if (chunkEFSQW6S5_js.isTemplateElementId(elementId)) {
4041
+ if (chunkFDR5W67L_js.isTemplateElementId(elementId)) {
4028
4042
  const slideId = activeSlide?.id;
4029
4043
  if (slideId) {
4030
4044
  setTemplateElementsBySlideId((prev) => ({
@@ -4064,7 +4078,7 @@ function useElementOperations(input) {
4064
4078
  );
4065
4079
  const updateSelectedShapeStyle = react.useCallback(
4066
4080
  (updates) => {
4067
- if (!selectedElement || !chunkEFSQW6S5_js.hasShapeProperties(selectedElement)) {
4081
+ if (!selectedElement || !chunkFDR5W67L_js.hasShapeProperties(selectedElement)) {
4068
4082
  return;
4069
4083
  }
4070
4084
  updateSelectedElement({
@@ -4075,17 +4089,17 @@ function useElementOperations(input) {
4075
4089
  );
4076
4090
  const updateSelectedTextStyle = react.useCallback(
4077
4091
  (updates) => {
4078
- if (!selectedElement || !chunkEFSQW6S5_js.hasTextProperties(selectedElement)) {
4092
+ if (!selectedElement || !chunkFDR5W67L_js.hasTextProperties(selectedElement)) {
4079
4093
  return;
4080
4094
  }
4081
- const inlineSel = chunkEFSQW6S5_js.getInlineEditorSelection(selectedElement.textSegments);
4095
+ const inlineSel = chunkFDR5W67L_js.getInlineEditorSelection(selectedElement.textSegments);
4082
4096
  if (inlineSel && selectedElement.textSegments) {
4083
- const { newSegments: newSegments2, newSelection } = chunkEFSQW6S5_js.applyStyleToSelectedSegments(
4097
+ const { newSegments: newSegments2, newSelection } = chunkFDR5W67L_js.applyStyleToSelectedSegments(
4084
4098
  selectedElement.textSegments,
4085
4099
  inlineSel,
4086
4100
  updates
4087
4101
  );
4088
- chunkEFSQW6S5_js.setPendingSelectionRestore(newSelection);
4102
+ chunkFDR5W67L_js.setPendingSelectionRestore(newSelection);
4089
4103
  updateSelectedElement({
4090
4104
  textSegments: newSegments2
4091
4105
  });
@@ -4105,12 +4119,12 @@ function useElementOperations(input) {
4105
4119
  );
4106
4120
  const updateSelectedTextCase = react.useCallback(
4107
4121
  (mode) => {
4108
- if (!selectedElement || !chunkEFSQW6S5_js.hasTextProperties(selectedElement)) {
4122
+ if (!selectedElement || !chunkFDR5W67L_js.hasTextProperties(selectedElement)) {
4109
4123
  return;
4110
4124
  }
4111
- const inlineSel = chunkEFSQW6S5_js.getInlineEditorSelection(selectedElement.textSegments);
4125
+ const inlineSel = chunkFDR5W67L_js.getInlineEditorSelection(selectedElement.textSegments);
4112
4126
  if (inlineSel && selectedElement.textSegments) {
4113
- const newSegments = chunkEFSQW6S5_js.applyCaseTransformToSegments(
4127
+ const newSegments = chunkFDR5W67L_js.applyCaseTransformToSegments(
4114
4128
  selectedElement.textSegments,
4115
4129
  inlineSel,
4116
4130
  mode
@@ -4120,14 +4134,14 @@ function useElementOperations(input) {
4120
4134
  }
4121
4135
  const updates = {};
4122
4136
  if (selectedElement.textSegments && selectedElement.textSegments.length > 0) {
4123
- updates.textSegments = chunkEFSQW6S5_js.applyCaseTransformToSegments(
4137
+ updates.textSegments = chunkFDR5W67L_js.applyCaseTransformToSegments(
4124
4138
  selectedElement.textSegments,
4125
4139
  null,
4126
4140
  mode
4127
4141
  );
4128
4142
  }
4129
4143
  if (typeof selectedElement.text === "string") {
4130
- updates.text = chunkEFSQW6S5_js.transformTextCase(selectedElement.text, mode);
4144
+ updates.text = chunkFDR5W67L_js.transformTextCase(selectedElement.text, mode);
4131
4145
  }
4132
4146
  updateSelectedElement(updates);
4133
4147
  },
@@ -4182,7 +4196,7 @@ function useSectionOperations(input) {
4182
4196
  const { sections, setSections, slides, setSlides, markDirty } = input;
4183
4197
  const addSection2 = react.useCallback(
4184
4198
  (name, afterSlideIndex) => {
4185
- const result = chunkEFSQW6S5_js.addSection(sections, slides, name, afterSlideIndex);
4199
+ const result = chunkFDR5W67L_js.addSection(sections, slides, name, afterSlideIndex);
4186
4200
  setSlides(result.slides);
4187
4201
  setSections(result.sections);
4188
4202
  markDirty();
@@ -4191,7 +4205,7 @@ function useSectionOperations(input) {
4191
4205
  );
4192
4206
  const renameSection2 = react.useCallback(
4193
4207
  (sectionId, newName) => {
4194
- const result = chunkEFSQW6S5_js.renameSection(sections, slides, sectionId, newName);
4208
+ const result = chunkFDR5W67L_js.renameSection(sections, slides, sectionId, newName);
4195
4209
  setSections(result.sections);
4196
4210
  setSlides(result.slides);
4197
4211
  markDirty();
@@ -4200,7 +4214,7 @@ function useSectionOperations(input) {
4200
4214
  );
4201
4215
  const deleteSection2 = react.useCallback(
4202
4216
  (sectionId) => {
4203
- const result = chunkEFSQW6S5_js.deleteSection(sections, slides, sectionId);
4217
+ const result = chunkFDR5W67L_js.deleteSection(sections, slides, sectionId);
4204
4218
  setSections(result.sections);
4205
4219
  setSlides(result.slides);
4206
4220
  markDirty();
@@ -4209,21 +4223,21 @@ function useSectionOperations(input) {
4209
4223
  );
4210
4224
  const moveSectionUp2 = react.useCallback(
4211
4225
  (sectionId) => {
4212
- setSections(chunkEFSQW6S5_js.moveSectionUp(sections, sectionId));
4226
+ setSections(chunkFDR5W67L_js.moveSectionUp(sections, sectionId));
4213
4227
  markDirty();
4214
4228
  },
4215
4229
  [sections, setSections, markDirty]
4216
4230
  );
4217
4231
  const moveSectionDown2 = react.useCallback(
4218
4232
  (sectionId) => {
4219
- setSections(chunkEFSQW6S5_js.moveSectionDown(sections, sectionId));
4233
+ setSections(chunkFDR5W67L_js.moveSectionDown(sections, sectionId));
4220
4234
  markDirty();
4221
4235
  },
4222
4236
  [sections, setSections, markDirty]
4223
4237
  );
4224
4238
  const moveSlidesToSection2 = react.useCallback(
4225
4239
  (slideIndexes, targetSectionId) => {
4226
- const result = chunkEFSQW6S5_js.moveSlidesToSection(sections, slides, slideIndexes, targetSectionId);
4240
+ const result = chunkFDR5W67L_js.moveSlidesToSection(sections, slides, slideIndexes, targetSectionId);
4227
4241
  setSlides(result.slides);
4228
4242
  setSections(result.sections);
4229
4243
  markDirty();
@@ -4242,19 +4256,19 @@ function useSectionOperations(input) {
4242
4256
 
4243
4257
  // src/viewer/hooks/pointer-move-handlers.ts
4244
4258
  function computeResizeGeometry(handle, startX, startY, startWidth, startHeight, dx, dy, snapToGrid, gridSpacingPx) {
4245
- const resized = chunkEFSQW6S5_js.applyResize(
4259
+ const resized = chunkFDR5W67L_js.applyResize(
4246
4260
  { x: startX, y: startY, width: startWidth, height: startHeight },
4247
4261
  handle,
4248
4262
  dx,
4249
4263
  dy,
4250
4264
  1,
4251
- { minSize: chunkIDW5UPXW_js.MIN_ELEMENT_SIZE }
4265
+ { minSize: chunkDOS7NY7C_js.MIN_ELEMENT_SIZE }
4252
4266
  );
4253
4267
  const box = { x: resized.x, y: resized.y, width: resized.width, height: resized.height };
4254
4268
  if (!snapToGrid) {
4255
4269
  return box;
4256
4270
  }
4257
- return chunkEFSQW6S5_js.snapBoxToGrid(box, handle, gridSpacingPx, chunkIDW5UPXW_js.MIN_ELEMENT_SIZE);
4271
+ return chunkFDR5W67L_js.snapBoxToGrid(box, handle, gridSpacingPx, chunkDOS7NY7C_js.MIN_ELEMENT_SIZE);
4258
4272
  }
4259
4273
  function computeAdjustmentValue(startAdjustment, dx, startWidth) {
4260
4274
  const range = startWidth || 200;
@@ -4372,7 +4386,7 @@ function processDragMove(e, drag, editorScale, snapToGrid, snapToShape, gridSpac
4372
4386
  width: el.width,
4373
4387
  height: el.height
4374
4388
  }));
4375
- const snapResult = chunkEFSQW6S5_js.computeSnapToShape(
4389
+ const snapResult = chunkFDR5W67L_js.computeSnapToShape(
4376
4390
  targetX,
4377
4391
  targetY,
4378
4392
  primaryEl.width,
@@ -4411,7 +4425,7 @@ function processDragMove(e, drag, editorScale, snapToGrid, snapToShape, gridSpac
4411
4425
  if (live) {
4412
4426
  for (const id of Object.keys(drag.startPositionsById)) {
4413
4427
  const start = drag.startPositionsById[id];
4414
- chunkEFSQW6S5_js.publishLiveGeometry(live.patcher, live.slideId, id, {
4428
+ chunkFDR5W67L_js.publishLiveGeometry(live.patcher, live.slideId, id, {
4415
4429
  x: start.x + appliedDx,
4416
4430
  y: start.y + appliedDy
4417
4431
  });
@@ -4445,15 +4459,15 @@ function processResizeMove(e, rs, editorScale, snapToGrid, gridSpacingPx, live)
4445
4459
  if (rs.domEl) {
4446
4460
  rs.domEl.style.left = `${geo.x}px`;
4447
4461
  rs.domEl.style.top = `${geo.y}px`;
4448
- rs.domEl.style.width = `${Math.max(geo.width, chunkIDW5UPXW_js.MIN_ELEMENT_SIZE)}px`;
4449
- rs.domEl.style.height = `${Math.max(geo.height, chunkIDW5UPXW_js.MIN_ELEMENT_SIZE)}px`;
4462
+ rs.domEl.style.width = `${Math.max(geo.width, chunkDOS7NY7C_js.MIN_ELEMENT_SIZE)}px`;
4463
+ rs.domEl.style.height = `${Math.max(geo.height, chunkDOS7NY7C_js.MIN_ELEMENT_SIZE)}px`;
4450
4464
  }
4451
4465
  if (live) {
4452
- chunkEFSQW6S5_js.publishLiveGeometry(live.patcher, live.slideId, rs.elementId, {
4466
+ chunkFDR5W67L_js.publishLiveGeometry(live.patcher, live.slideId, rs.elementId, {
4453
4467
  x: geo.x,
4454
4468
  y: geo.y,
4455
- width: Math.max(geo.width, chunkIDW5UPXW_js.MIN_ELEMENT_SIZE),
4456
- height: Math.max(geo.height, chunkIDW5UPXW_js.MIN_ELEMENT_SIZE)
4469
+ width: Math.max(geo.width, chunkDOS7NY7C_js.MIN_ELEMENT_SIZE),
4470
+ height: Math.max(geo.height, chunkDOS7NY7C_js.MIN_ELEMENT_SIZE)
4457
4471
  });
4458
4472
  }
4459
4473
  }
@@ -4533,13 +4547,13 @@ function processPointerUp(input) {
4533
4547
  if (i !== activeSlideIndex) {
4534
4548
  return s;
4535
4549
  }
4536
- const rerouted = chunkEFSQW6S5_js.rerouteConnectorsForMovedElements(s.elements, movedIds);
4550
+ const rerouted = chunkFDR5W67L_js.rerouteConnectorsForMovedElements(s.elements, movedIds);
4537
4551
  if (rerouted.length === 0) {
4538
4552
  return s;
4539
4553
  }
4540
4554
  return {
4541
4555
  ...s,
4542
- elements: chunkEFSQW6S5_js.applyReroutedConnectors(s.elements, rerouted)
4556
+ elements: chunkFDR5W67L_js.applyReroutedConnectors(s.elements, rerouted)
4543
4557
  };
4544
4558
  })
4545
4559
  );
@@ -4561,9 +4575,9 @@ function processPointerUp(input) {
4561
4575
  }
4562
4576
  function commitMarquee(marquee, editTemplateMode, templateElements, activeSlide, applySelection, clearSelection) {
4563
4577
  const sourceElements = editTemplateMode ? templateElements : activeSlide?.elements ?? [];
4564
- const hitIds = chunkEFSQW6S5_js.computeMarqueeHitIds(marquee, sourceElements);
4578
+ const hitIds = chunkFDR5W67L_js.computeMarqueeHitIds(marquee, sourceElements);
4565
4579
  if (marquee.additive) {
4566
- const merged = chunkEFSQW6S5_js.mergeAdditiveSelection(marquee.baseSelectionIds, hitIds);
4580
+ const merged = chunkFDR5W67L_js.mergeAdditiveSelection(marquee.baseSelectionIds, hitIds);
4567
4581
  if (merged.length > 0) {
4568
4582
  applySelection(merged[0], merged);
4569
4583
  } else {
@@ -4586,8 +4600,8 @@ function commitDrag(drag, editTemplateMode, activeSlide, activeSlideIndex, setTe
4586
4600
  }
4587
4601
  return { ...el, x: start.x + dx, y: start.y + dy };
4588
4602
  });
4589
- const rerouted = chunkEFSQW6S5_js.rerouteConnectorsForMovedElements(movedElements, movedIds);
4590
- return chunkEFSQW6S5_js.applyReroutedConnectors(movedElements, rerouted);
4603
+ const rerouted = chunkFDR5W67L_js.rerouteConnectorsForMovedElements(movedElements, movedIds);
4604
+ return chunkFDR5W67L_js.applyReroutedConnectors(movedElements, rerouted);
4591
4605
  };
4592
4606
  if (editTemplateMode) {
4593
4607
  const slideId = activeSlide?.id;
@@ -4743,9 +4757,9 @@ function useCanvasInteractions(input) {
4743
4757
  return;
4744
4758
  }
4745
4759
  const el = elementLookup.get(editId);
4746
- if (el && chunkEFSQW6S5_js.hasTextProperties(el)) {
4760
+ if (el && chunkFDR5W67L_js.hasTextProperties(el)) {
4747
4761
  const committedText = transformCommittedText ? transformCommittedText(inlineEditingText) : inlineEditingText;
4748
- const newSegments = chunkEFSQW6S5_js.remapTextToSegments(committedText, el.textSegments, el.textStyle);
4762
+ const newSegments = chunkFDR5W67L_js.remapTextToSegments(committedText, el.textSegments, el.textStyle);
4749
4763
  ops.updateElementById(editId, {
4750
4764
  text: committedText,
4751
4765
  textSegments: newSegments
@@ -4756,7 +4770,7 @@ function useCanvasInteractions(input) {
4756
4770
  setInlineEditingText("");
4757
4771
  };
4758
4772
  const openEquationEditorForElement = (el) => {
4759
- if (!chunkEFSQW6S5_js.hasTextProperties(el)) {
4773
+ if (!chunkFDR5W67L_js.hasTextProperties(el)) {
4760
4774
  return false;
4761
4775
  }
4762
4776
  const eqSeg = el.textSegments?.find((seg) => seg.equationXml);
@@ -4785,7 +4799,7 @@ function useCanvasInteractions(input) {
4785
4799
  justSelectedRef.current = false;
4786
4800
  } else {
4787
4801
  const el = elementLookup.get(elementId);
4788
- if (el && chunkEFSQW6S5_js.hasTextProperties(el) && !el.locks?.noTextEdit) {
4802
+ if (el && chunkFDR5W67L_js.hasTextProperties(el) && !el.locks?.noTextEdit) {
4789
4803
  if (!openEquationEditorForElement(el)) {
4790
4804
  setInlineEditingElementId(elementId);
4791
4805
  setInlineEditingText(el.text ?? "");
@@ -4804,7 +4818,7 @@ function useCanvasInteractions(input) {
4804
4818
  if (openEquationEditorForElement(el)) {
4805
4819
  return;
4806
4820
  }
4807
- if (chunkEFSQW6S5_js.hasTextProperties(el)) {
4821
+ if (chunkFDR5W67L_js.hasTextProperties(el)) {
4808
4822
  setInlineEditingElementId(elementId);
4809
4823
  setInlineEditingText(el.text ?? "");
4810
4824
  }
@@ -4997,7 +5011,7 @@ function createFileHandlers(deps) {
4997
5011
  h = Math.round(h * scale);
4998
5012
  }
4999
5013
  addElement({
5000
- id: chunkEFSQW6S5_js.generateElementId(),
5014
+ id: chunkFDR5W67L_js.generateElementId(),
5001
5015
  type: "image",
5002
5016
  x: Math.round((canvasSize.width - w) / 2),
5003
5017
  y: Math.round((canvasSize.height - h) / 2),
@@ -5008,7 +5022,7 @@ function createFileHandlers(deps) {
5008
5022
  };
5009
5023
  img.onerror = () => {
5010
5024
  addElement({
5011
- id: chunkEFSQW6S5_js.generateElementId(),
5025
+ id: chunkFDR5W67L_js.generateElementId(),
5012
5026
  type: "image",
5013
5027
  x: 100,
5014
5028
  y: 100,
@@ -5034,7 +5048,7 @@ function createFileHandlers(deps) {
5034
5048
  const elFilePath = file.path;
5035
5049
  const insertMediaElement = (mediaSourceUrl, width, height) => {
5036
5050
  addElement({
5037
- id: chunkEFSQW6S5_js.generateElementId(),
5051
+ id: chunkFDR5W67L_js.generateElementId(),
5038
5052
  type: "media",
5039
5053
  mediaType,
5040
5054
  mediaMimeType: file.type || void 0,
@@ -5209,13 +5223,13 @@ function createStructuredElementHandlers(deps) {
5209
5223
  return;
5210
5224
  }
5211
5225
  addElement({
5212
- id: chunkEFSQW6S5_js.generateElementId(),
5226
+ id: chunkFDR5W67L_js.generateElementId(),
5213
5227
  type: "smartArt",
5214
5228
  x: 100,
5215
5229
  y: 120,
5216
5230
  width: 600,
5217
5231
  height: 340,
5218
- smartArtData: chunkEFSQW6S5_js.buildSmartArtPresetData(
5232
+ smartArtData: chunkFDR5W67L_js.buildSmartArtPresetData(
5219
5233
  layout,
5220
5234
  defaultItems,
5221
5235
  (i) => `node-${Date.now()}-${i}-${Math.random().toString(36).slice(2, 8)}`
@@ -5227,7 +5241,7 @@ function createStructuredElementHandlers(deps) {
5227
5241
  return;
5228
5242
  }
5229
5243
  addElement({
5230
- id: chunkEFSQW6S5_js.generateElementId(),
5244
+ id: chunkFDR5W67L_js.generateElementId(),
5231
5245
  type: "shape",
5232
5246
  x: 120,
5233
5247
  y: 200,
@@ -5286,7 +5300,7 @@ function createStructuredElementHandlers(deps) {
5286
5300
  const displayText = value || fieldTexts[fieldType] || fieldType;
5287
5301
  const fieldGuid = `{${crypto.randomUUID().toUpperCase()}}`;
5288
5302
  addElement({
5289
- id: chunkEFSQW6S5_js.generateElementId(),
5303
+ id: chunkFDR5W67L_js.generateElementId(),
5290
5304
  type: "shape",
5291
5305
  x: 120,
5292
5306
  y: 200,
@@ -5308,11 +5322,11 @@ function createStructuredElementHandlers(deps) {
5308
5322
  if (!activeSlide) {
5309
5323
  return;
5310
5324
  }
5311
- const preset = chunkEFSQW6S5_js.ACTION_BUTTON_PRESETS.find((p) => p.shapeType === shapeType);
5325
+ const preset = chunkFDR5W67L_js.ACTION_BUTTON_PRESETS.find((p) => p.shapeType === shapeType);
5312
5326
  if (!preset) {
5313
5327
  return;
5314
5328
  }
5315
- const defaultPptxAction = chunkEFSQW6S5_js.elementActionToPptxAction({
5329
+ const defaultPptxAction = chunkFDR5W67L_js.elementActionToPptxAction({
5316
5330
  trigger: "click",
5317
5331
  type: preset.defaultAction
5318
5332
  });
@@ -5321,7 +5335,7 @@ function createStructuredElementHandlers(deps) {
5321
5335
  defaultPptxAction.highlightClick = true;
5322
5336
  }
5323
5337
  addElement({
5324
- id: chunkEFSQW6S5_js.generateElementId(),
5338
+ id: chunkFDR5W67L_js.generateElementId(),
5325
5339
  type: "shape",
5326
5340
  x: 150,
5327
5341
  y: 150,
@@ -5388,14 +5402,14 @@ function useInsertElements(input) {
5388
5402
  return;
5389
5403
  }
5390
5404
  addElement({
5391
- id: chunkEFSQW6S5_js.generateElementId(),
5405
+ id: chunkFDR5W67L_js.generateElementId(),
5392
5406
  type: "text",
5393
5407
  x: 100,
5394
5408
  y: 100,
5395
5409
  width: 300,
5396
5410
  height: 60,
5397
5411
  text: "",
5398
- textStyle: { fontSize: chunkIDW5UPXW_js.DEFAULT_TEXT_FONT_SIZE }
5412
+ textStyle: { fontSize: chunkDOS7NY7C_js.DEFAULT_TEXT_FONT_SIZE }
5399
5413
  });
5400
5414
  };
5401
5415
  const handleAddShape = () => {
@@ -5403,7 +5417,7 @@ function useInsertElements(input) {
5403
5417
  return;
5404
5418
  }
5405
5419
  addElement({
5406
- id: chunkEFSQW6S5_js.generateElementId(),
5420
+ id: chunkFDR5W67L_js.generateElementId(),
5407
5421
  type: "shape",
5408
5422
  x: 150,
5409
5423
  y: 150,
@@ -5422,15 +5436,15 @@ function useInsertElements(input) {
5422
5436
  return;
5423
5437
  }
5424
5438
  addElement({
5425
- ...chunkEFSQW6S5_js.newTableElement(chunkIDW5UPXW_js.DEFAULT_TABLE_ROWS, chunkIDW5UPXW_js.DEFAULT_TABLE_COLUMNS, 100, 200),
5426
- id: chunkEFSQW6S5_js.generateElementId()
5439
+ ...chunkFDR5W67L_js.newTableElement(chunkDOS7NY7C_js.DEFAULT_TABLE_ROWS, chunkDOS7NY7C_js.DEFAULT_TABLE_COLUMNS, 100, 200),
5440
+ id: chunkFDR5W67L_js.generateElementId()
5427
5441
  });
5428
5442
  };
5429
5443
  const handleAddChart = (chartType) => {
5430
5444
  if (!activeSlide) {
5431
5445
  return;
5432
5446
  }
5433
- addElement(chunkEFSQW6S5_js.createDefaultChartElement(chartType));
5447
+ addElement(chunkFDR5W67L_js.createDefaultChartElement(chartType));
5434
5448
  };
5435
5449
  const structured = createStructuredElementHandlers({
5436
5450
  activeSlide,
@@ -5500,7 +5514,7 @@ function useClipboardHandlers(input) {
5500
5514
  if (!selectedElement) {
5501
5515
  return;
5502
5516
  }
5503
- setClipboardPayload(chunkEFSQW6S5_js.buildElementClipboardPayload(selectedElement, editTemplateMode));
5517
+ setClipboardPayload(chunkFDR5W67L_js.buildElementClipboardPayload(selectedElement, editTemplateMode));
5504
5518
  };
5505
5519
  const handleDelete = () => {
5506
5520
  const idsToDelete = effectiveSelectedIds;
@@ -5517,7 +5531,7 @@ function useClipboardHandlers(input) {
5517
5531
  handleDelete();
5518
5532
  };
5519
5533
  const insertClone = (source) => {
5520
- const clone = chunkEFSQW6S5_js.cloneElementForPaste(source, { intoTemplate: editTemplateMode });
5534
+ const clone = chunkFDR5W67L_js.cloneElementForPaste(source, { intoTemplate: editTemplateMode });
5521
5535
  ops.updateActiveElements((els) => [...els, clone]);
5522
5536
  ops.applySelection(clone.id);
5523
5537
  history.markDirty();
@@ -5552,7 +5566,7 @@ function resolveShapePath(el) {
5552
5566
  return el.pathData;
5553
5567
  }
5554
5568
  if ("shapeType" in el && typeof el.shapeType === "string") {
5555
- const clipPath = chunkEFSQW6S5_js.getPresetShapeClipPath(el.shapeType);
5569
+ const clipPath = chunkFDR5W67L_js.getPresetShapeClipPath(el.shapeType);
5556
5570
  if (clipPath) {
5557
5571
  const svgPath = clipPathToSvgPath(clipPath, el.width, el.height);
5558
5572
  if (svgPath) {
@@ -5603,7 +5617,7 @@ function clipPathToSvgPath(clipPath, width, height) {
5603
5617
  return parts.join(" ");
5604
5618
  }
5605
5619
  function transformPathToGlobal(pathData, el) {
5606
- const polys = chunkEFSQW6S5_js.svgPathToPolygons(pathData);
5620
+ const polys = chunkFDR5W67L_js.svgPathToPolygons(pathData);
5607
5621
  if (polys.length === 0) {
5608
5622
  return pathData;
5609
5623
  }
@@ -5623,10 +5637,10 @@ function transformPathToGlobal(pathData, el) {
5623
5637
  y: pt.y * scaleY + el.y
5624
5638
  }))
5625
5639
  );
5626
- return chunkEFSQW6S5_js.polygonsToSvgPath(transformed);
5640
+ return chunkFDR5W67L_js.polygonsToSvgPath(transformed);
5627
5641
  }
5628
5642
  function transformPathToLocal(pathData, x, y, _width, _height) {
5629
- const polys = chunkEFSQW6S5_js.svgPathToPolygons(pathData);
5643
+ const polys = chunkFDR5W67L_js.svgPathToPolygons(pathData);
5630
5644
  if (polys.length === 0) {
5631
5645
  return pathData;
5632
5646
  }
@@ -5636,10 +5650,10 @@ function transformPathToLocal(pathData, x, y, _width, _height) {
5636
5650
  y: pt.y - y
5637
5651
  }))
5638
5652
  );
5639
- return chunkEFSQW6S5_js.polygonsToSvgPath(transformed);
5653
+ return chunkFDR5W67L_js.polygonsToSvgPath(transformed);
5640
5654
  }
5641
5655
  function pathBounds(pathData) {
5642
- const polys = chunkEFSQW6S5_js.svgPathToPolygons(pathData);
5656
+ const polys = chunkFDR5W67L_js.svgPathToPolygons(pathData);
5643
5657
  let minX = Infinity;
5644
5658
  let minY = Infinity;
5645
5659
  let maxX = -Infinity;
@@ -5698,7 +5712,7 @@ function useMergeShapesHandler(input) {
5698
5712
  let allFragments = [];
5699
5713
  let remaining = globalPaths[0];
5700
5714
  for (let i = 1; i < globalPaths.length; i++) {
5701
- const frags = chunkEFSQW6S5_js.mergeShapes("fragment", remaining, globalPaths[i]);
5715
+ const frags = chunkFDR5W67L_js.mergeShapes("fragment", remaining, globalPaths[i]);
5702
5716
  if (Array.isArray(frags)) {
5703
5717
  allFragments = frags;
5704
5718
  }
@@ -5727,7 +5741,7 @@ function useMergeShapesHandler(input) {
5727
5741
  bounds.height
5728
5742
  );
5729
5743
  const newEl = {
5730
- id: chunkEFSQW6S5_js.generateElementId(),
5744
+ id: chunkFDR5W67L_js.generateElementId(),
5731
5745
  type: "shape",
5732
5746
  x: bounds.x,
5733
5747
  y: bounds.y,
@@ -5765,7 +5779,7 @@ function useMergeShapesHandler(input) {
5765
5779
  } else {
5766
5780
  let resultPath = globalPaths[0];
5767
5781
  for (let i = 1; i < globalPaths.length; i++) {
5768
- const result = chunkEFSQW6S5_js.mergeShapes(operation, resultPath, globalPaths[i]);
5782
+ const result = chunkFDR5W67L_js.mergeShapes(operation, resultPath, globalPaths[i]);
5769
5783
  if (typeof result === "string") {
5770
5784
  resultPath = result;
5771
5785
  }
@@ -5786,7 +5800,7 @@ function useMergeShapesHandler(input) {
5786
5800
  );
5787
5801
  const primary = targets[0];
5788
5802
  const newEl = {
5789
- id: chunkEFSQW6S5_js.generateElementId(),
5803
+ id: chunkFDR5W67L_js.generateElementId(),
5790
5804
  type: "shape",
5791
5805
  x: bounds.x,
5792
5806
  y: bounds.y,
@@ -5849,7 +5863,7 @@ function useGroupAlignLayerHandlers(input) {
5849
5863
  if (ids.length < 2 || !activeSlide) {
5850
5864
  return;
5851
5865
  }
5852
- const { elements, groupId } = chunkEFSQW6S5_js.groupElements(ops.activeElements, ids, chunkEFSQW6S5_js.generateElementId());
5866
+ const { elements, groupId } = chunkFDR5W67L_js.groupElements(ops.activeElements, ids, chunkFDR5W67L_js.generateElementId());
5853
5867
  if (groupId === null) {
5854
5868
  return;
5855
5869
  }
@@ -5862,12 +5876,12 @@ function useGroupAlignLayerHandlers(input) {
5862
5876
  return;
5863
5877
  }
5864
5878
  const group = selectedElement;
5865
- const intoTemplate = chunkEFSQW6S5_js.isTemplateElementId(group.id);
5879
+ const intoTemplate = chunkFDR5W67L_js.isTemplateElementId(group.id);
5866
5880
  const ungrouped = group.children.map((child) => ({
5867
5881
  ...structuredClone(child),
5868
5882
  // Keep child ids in the same store as the group so later edits route
5869
5883
  // correctly: template groups yield template-prefixed child ids.
5870
- id: intoTemplate ? chunkEFSQW6S5_js.makeCloneId(true, child.id || group.id) : child.id || chunkEFSQW6S5_js.generateElementId(),
5884
+ id: intoTemplate ? chunkFDR5W67L_js.makeCloneId(true, child.id || group.id) : child.id || chunkFDR5W67L_js.generateElementId(),
5871
5885
  x: child.x + group.x,
5872
5886
  y: child.y + group.y
5873
5887
  }));
@@ -5891,7 +5905,7 @@ function useGroupAlignLayerHandlers(input) {
5891
5905
  if (!edge) {
5892
5906
  return;
5893
5907
  }
5894
- const positions = chunkEFSQW6S5_js.alignElements(selectedElements, edge);
5908
+ const positions = chunkFDR5W67L_js.alignElements(selectedElements, edge);
5895
5909
  for (const [id, pos] of positions) {
5896
5910
  const el = elementLookup.get(id);
5897
5911
  if (!el) {
@@ -5909,7 +5923,7 @@ function useGroupAlignLayerHandlers(input) {
5909
5923
  if (!distAxis) {
5910
5924
  return;
5911
5925
  }
5912
- const positions = chunkEFSQW6S5_js.distributeElements(selectedElements, distAxis);
5926
+ const positions = chunkFDR5W67L_js.distributeElements(selectedElements, distAxis);
5913
5927
  for (const [id, pos] of positions) {
5914
5928
  const el = elementLookup.get(id);
5915
5929
  if (!el) {
@@ -5926,7 +5940,7 @@ function useGroupAlignLayerHandlers(input) {
5926
5940
  }
5927
5941
  const id = selectedElement.id;
5928
5942
  ops.updateActiveElements(
5929
- (els) => direction === "forward" ? chunkEFSQW6S5_js.bringForward(els, id) : direction === "backward" ? chunkEFSQW6S5_js.sendBackward(els, id) : els
5943
+ (els) => direction === "forward" ? chunkFDR5W67L_js.bringForward(els, id) : direction === "backward" ? chunkFDR5W67L_js.sendBackward(els, id) : els
5930
5944
  );
5931
5945
  history.markDirty();
5932
5946
  };
@@ -5936,7 +5950,7 @@ function useGroupAlignLayerHandlers(input) {
5936
5950
  }
5937
5951
  const id = selectedElement.id;
5938
5952
  ops.updateActiveElements(
5939
- (els) => direction === "front" ? chunkEFSQW6S5_js.bringToFront(els, id) : chunkEFSQW6S5_js.sendToBack(els, id)
5953
+ (els) => direction === "front" ? chunkFDR5W67L_js.bringToFront(els, id) : chunkFDR5W67L_js.sendToBack(els, id)
5940
5954
  );
5941
5955
  history.markDirty();
5942
5956
  };
@@ -6058,7 +6072,7 @@ function insertSlideFromLayoutUpdater(slides, activeIndex, draft) {
6058
6072
  function useSlideManagement(input) {
6059
6073
  const { slides, activeSlideIndex, setActiveSlideIndex, ops, history, handlerRef } = input;
6060
6074
  const handleAddSlide = () => {
6061
- const newSlide = chunkEFSQW6S5_js.createBlankSlide(slides.length + 1);
6075
+ const newSlide = chunkFDR5W67L_js.createBlankSlide(slides.length + 1);
6062
6076
  ops.updateSlides((prev) => {
6063
6077
  const next = [...prev];
6064
6078
  next.splice(activeSlideIndex + 1, 0, newSlide);
@@ -6121,7 +6135,7 @@ function useSlideManagement(input) {
6121
6135
  }
6122
6136
  const clone = {
6123
6137
  ...src,
6124
- id: chunkEFSQW6S5_js.makeSlideId(),
6138
+ id: chunkFDR5W67L_js.makeSlideId(),
6125
6139
  elements: src.elements.map((el) => ({
6126
6140
  ...el,
6127
6141
  id: `${el.id}-dup-${Math.random().toString(36).slice(2, 6)}`
@@ -6153,7 +6167,7 @@ function useSlideManagement(input) {
6153
6167
  const handleInsertSlideFromLayout = (layoutPath, layoutName) => {
6154
6168
  const insertAt = activeSlideIndex + 1;
6155
6169
  const draft = {
6156
- ...chunkEFSQW6S5_js.createBlankSlide(slides.length + 1),
6170
+ ...chunkFDR5W67L_js.createBlankSlide(slides.length + 1),
6157
6171
  layoutPath,
6158
6172
  ...layoutName ? { layoutName } : {}
6159
6173
  };
@@ -6214,7 +6228,7 @@ function createTableMergeHandlers(input) {
6214
6228
  if (!nextCell || nextCell.hMerge || nextCell.vMerge) {
6215
6229
  return;
6216
6230
  }
6217
- const newTableData = chunkEFSQW6S5_js.mergeCells(
6231
+ const newTableData = chunkFDR5W67L_js.mergeCells(
6218
6232
  [
6219
6233
  { row: rowIndex, col: columnIndex },
6220
6234
  { row: rowIndex, col: nextColIdx }
@@ -6222,7 +6236,7 @@ function createTableMergeHandlers(input) {
6222
6236
  td
6223
6237
  );
6224
6238
  const updates = { tableData: newTableData };
6225
- const newRawXml = chunkEFSQW6S5_js.updateMergeAttrsInRawXml(selectedElement, newTableData);
6239
+ const newRawXml = chunkFDR5W67L_js.updateMergeAttrsInRawXml(selectedElement, newTableData);
6226
6240
  if (newRawXml) {
6227
6241
  updates.rawXml = newRawXml;
6228
6242
  }
@@ -6248,7 +6262,7 @@ function createTableMergeHandlers(input) {
6248
6262
  if (!targetNextCell || targetNextCell.hMerge || targetNextCell.vMerge) {
6249
6263
  return;
6250
6264
  }
6251
- const newTableData = chunkEFSQW6S5_js.mergeCells(
6265
+ const newTableData = chunkFDR5W67L_js.mergeCells(
6252
6266
  [
6253
6267
  { row: rowIndex, col: columnIndex },
6254
6268
  { row: targetNextRowIdx, col: columnIndex }
@@ -6256,7 +6270,7 @@ function createTableMergeHandlers(input) {
6256
6270
  td
6257
6271
  );
6258
6272
  const updates = { tableData: newTableData };
6259
- const newRawXml = chunkEFSQW6S5_js.updateMergeAttrsInRawXml(selectedElement, newTableData);
6273
+ const newRawXml = chunkFDR5W67L_js.updateMergeAttrsInRawXml(selectedElement, newTableData);
6260
6274
  if (newRawXml) {
6261
6275
  updates.rawXml = newRawXml;
6262
6276
  }
@@ -6271,9 +6285,9 @@ function createTableMergeHandlers(input) {
6271
6285
  return;
6272
6286
  }
6273
6287
  const td = selectedElement.tableData;
6274
- const newTableData = chunkEFSQW6S5_js.mergeCells(ts.selectedCells, td);
6288
+ const newTableData = chunkFDR5W67L_js.mergeCells(ts.selectedCells, td);
6275
6289
  const updates = { tableData: newTableData };
6276
- const newRawXml = chunkEFSQW6S5_js.updateMergeAttrsInRawXml(selectedElement, newTableData);
6290
+ const newRawXml = chunkFDR5W67L_js.updateMergeAttrsInRawXml(selectedElement, newTableData);
6277
6291
  if (newRawXml) {
6278
6292
  updates.rawXml = newRawXml;
6279
6293
  }
@@ -6290,9 +6304,9 @@ function createTableMergeHandlers(input) {
6290
6304
  }
6291
6305
  const { rowIndex, columnIndex } = ts;
6292
6306
  const td = selectedElement.tableData;
6293
- const newTableData = chunkEFSQW6S5_js.splitCell(rowIndex, columnIndex, td);
6307
+ const newTableData = chunkFDR5W67L_js.splitCell(rowIndex, columnIndex, td);
6294
6308
  const updates = { tableData: newTableData };
6295
- const newRawXml = chunkEFSQW6S5_js.updateMergeAttrsInRawXml(selectedElement, newTableData);
6309
+ const newRawXml = chunkFDR5W67L_js.updateMergeAttrsInRawXml(selectedElement, newTableData);
6296
6310
  if (newRawXml) {
6297
6311
  updates.rawXml = newRawXml;
6298
6312
  }
@@ -6336,7 +6350,7 @@ function createTableStructHandlers(input) {
6336
6350
  updates.tableData = { ...el.tableData, rows: newRows };
6337
6351
  }
6338
6352
  if (el.rawXml) {
6339
- const newRawXml = chunkEFSQW6S5_js.updateCellTextInRawXml(el, rowIndex, colIndex, text);
6353
+ const newRawXml = chunkFDR5W67L_js.updateCellTextInRawXml(el, rowIndex, colIndex, text);
6340
6354
  if (newRawXml) {
6341
6355
  updates.rawXml = newRawXml;
6342
6356
  }
@@ -6360,7 +6374,7 @@ function createTableStructHandlers(input) {
6360
6374
  const { rowIndex, columnIndex: colIndex } = ts;
6361
6375
  const updates = {};
6362
6376
  if (selectedElement.rawXml) {
6363
- const newRawXml = chunkEFSQW6S5_js.updateCellTextStyleInRawXml(
6377
+ const newRawXml = chunkFDR5W67L_js.updateCellTextStyleInRawXml(
6364
6378
  selectedElement,
6365
6379
  rowIndex,
6366
6380
  colIndex,
@@ -6424,9 +6438,9 @@ function createTableStructHandlers(input) {
6424
6438
  return;
6425
6439
  }
6426
6440
  const rowIdx = ts?.rowIndex ?? 0;
6427
- const newTableData = chunkEFSQW6S5_js.insertTableRow(selectedElement.tableData, rowIdx, position);
6441
+ const newTableData = chunkFDR5W67L_js.insertTableRow(selectedElement.tableData, rowIdx, position);
6428
6442
  const updates = { tableData: newTableData };
6429
- const newRawXml = chunkEFSQW6S5_js.rebuildTableStructureInRawXml(selectedElement, newTableData);
6443
+ const newRawXml = chunkFDR5W67L_js.rebuildTableStructureInRawXml(selectedElement, newTableData);
6430
6444
  if (newRawXml) {
6431
6445
  updates.rawXml = newRawXml;
6432
6446
  }
@@ -6439,12 +6453,12 @@ function createTableStructHandlers(input) {
6439
6453
  }
6440
6454
  const td = selectedElement.tableData;
6441
6455
  const rowIdx = ts?.rowIndex ?? 0;
6442
- const newTableData = chunkEFSQW6S5_js.deleteTableRow(td, rowIdx);
6456
+ const newTableData = chunkFDR5W67L_js.deleteTableRow(td, rowIdx);
6443
6457
  if (newTableData === td) {
6444
6458
  return;
6445
6459
  }
6446
6460
  const updates = { tableData: newTableData };
6447
- const newRawXml = chunkEFSQW6S5_js.rebuildTableStructureInRawXml(selectedElement, newTableData);
6461
+ const newRawXml = chunkFDR5W67L_js.rebuildTableStructureInRawXml(selectedElement, newTableData);
6448
6462
  if (newRawXml) {
6449
6463
  updates.rawXml = newRawXml;
6450
6464
  }
@@ -6456,9 +6470,9 @@ function createTableStructHandlers(input) {
6456
6470
  return;
6457
6471
  }
6458
6472
  const colIdx = ts?.columnIndex ?? 0;
6459
- const newTableData = chunkEFSQW6S5_js.insertTableColumn(selectedElement.tableData, colIdx, position);
6473
+ const newTableData = chunkFDR5W67L_js.insertTableColumn(selectedElement.tableData, colIdx, position);
6460
6474
  const updates = { tableData: newTableData };
6461
- const newRawXml = chunkEFSQW6S5_js.rebuildTableStructureInRawXml(selectedElement, newTableData);
6475
+ const newRawXml = chunkFDR5W67L_js.rebuildTableStructureInRawXml(selectedElement, newTableData);
6462
6476
  if (newRawXml) {
6463
6477
  updates.rawXml = newRawXml;
6464
6478
  }
@@ -6471,12 +6485,12 @@ function createTableStructHandlers(input) {
6471
6485
  }
6472
6486
  const td = selectedElement.tableData;
6473
6487
  const colIdx = ts?.columnIndex ?? 0;
6474
- const newTableData = chunkEFSQW6S5_js.deleteTableColumn(td, colIdx);
6488
+ const newTableData = chunkFDR5W67L_js.deleteTableColumn(td, colIdx);
6475
6489
  if (newTableData === td) {
6476
6490
  return;
6477
6491
  }
6478
6492
  const updates = { tableData: newTableData };
6479
- const newRawXml = chunkEFSQW6S5_js.rebuildTableStructureInRawXml(selectedElement, newTableData);
6493
+ const newRawXml = chunkFDR5W67L_js.rebuildTableStructureInRawXml(selectedElement, newTableData);
6480
6494
  if (newRawXml) {
6481
6495
  updates.rawXml = newRawXml;
6482
6496
  }
@@ -6512,8 +6526,8 @@ async function renderToCanvas(element, options = {}) {
6512
6526
  return html2canvasPro(element, {
6513
6527
  ...options,
6514
6528
  onclone: async (doc, clonedEl) => {
6515
- await chunkEFSQW6S5_js.normalizeColorsForCapture(doc, clonedEl);
6516
- chunkEFSQW6S5_js.preprocessCssForCapture(clonedEl);
6529
+ await chunkFDR5W67L_js.normalizeColorsForCapture(doc, clonedEl);
6530
+ chunkFDR5W67L_js.preprocessCssForCapture(clonedEl);
6517
6531
  if (typeof userOnClone === "function") {
6518
6532
  userOnClone(doc, clonedEl);
6519
6533
  }
@@ -6569,7 +6583,7 @@ async function exportSlideToPngBlob(slideElement, options = {}) {
6569
6583
  }
6570
6584
  async function exportSlideAsPng(slideElement, slideIndex, options = {}) {
6571
6585
  const blob = await exportSlideToPngBlob(slideElement, options);
6572
- chunkEFSQW6S5_js.downloadBlob(blob, `slide-${slideIndex + 1}.png`);
6586
+ chunkFDR5W67L_js.downloadBlob(blob, `slide-${slideIndex + 1}.png`);
6573
6587
  }
6574
6588
  async function copySlideToClipboard(slideElement, options = {}) {
6575
6589
  const blob = await exportSlideToPngBlob(slideElement, options);
@@ -6591,15 +6605,15 @@ async function exportAllSlidesAsPdf(slideStageRef, totalSlides, setActiveSlide,
6591
6605
  continue;
6592
6606
  }
6593
6607
  const canvas = await renderElementToCanvas(stageEl, scale);
6594
- images.push(chunkEFSQW6S5_js.canvasToJpegData(canvas));
6608
+ images.push(chunkFDR5W67L_js.canvasToJpegData(canvas));
6595
6609
  }
6596
6610
  onProgress?.(totalSlides, totalSlides);
6597
6611
  setActiveSlide(currentSlideIndex);
6598
6612
  if (images.length === 0) {
6599
6613
  throw new Error(chunkBXAK3JFM_js.translationsEn["pptx.export.errorNoSlidesPdf"]);
6600
6614
  }
6601
- const pdfBlobUrl = chunkIDW5UPXW_js.buildPdfFromImageData(images);
6602
- chunkEFSQW6S5_js.downloadDataUrl(pdfBlobUrl, filename);
6615
+ const pdfBlobUrl = chunkDOS7NY7C_js.buildPdfFromImageData(images);
6616
+ chunkFDR5W67L_js.downloadDataUrl(pdfBlobUrl, filename);
6603
6617
  }
6604
6618
  async function captureAllSlidesAsPngDataUrls(slideStageRef, totalSlides, setActiveSlide, currentSlideIndex, options = {}) {
6605
6619
  const { scale = 2, onProgress } = options;
@@ -6647,8 +6661,8 @@ async function exportAllSlidesAsNotesPdf(slideStageRef, totalSlides, setActiveSl
6647
6661
  if (pages.length === 0) {
6648
6662
  throw new Error(chunkBXAK3JFM_js.translationsEn["pptx.export.errorNoSlidesNotesPdf"]);
6649
6663
  }
6650
- const pdfDataUrl = chunkIDW5UPXW_js.buildNotesPdf(pages);
6651
- chunkEFSQW6S5_js.downloadDataUrl(pdfDataUrl, filename);
6664
+ const pdfDataUrl = chunkDOS7NY7C_js.buildNotesPdf(pages);
6665
+ chunkFDR5W67L_js.downloadDataUrl(pdfDataUrl, filename);
6652
6666
  }
6653
6667
 
6654
6668
  // src/viewer/utils/export-video.ts
@@ -6692,7 +6706,7 @@ async function exportAllSlidesAsVideo(slideStageRef, totalSlides, setActiveSlide
6692
6706
  const fps = 30;
6693
6707
  const stream = recordingCanvas.captureStream(fps);
6694
6708
  const recorder = new MediaRecorder(stream, {
6695
- mimeType: chunkEFSQW6S5_js.pickSupportedMimeType([...chunkEFSQW6S5_js.WEBM_MIME_CANDIDATES]),
6709
+ mimeType: chunkFDR5W67L_js.pickSupportedMimeType([...chunkFDR5W67L_js.WEBM_MIME_CANDIDATES]),
6696
6710
  videoBitsPerSecond: 5e6
6697
6711
  });
6698
6712
  const chunks = [];
@@ -6715,8 +6729,8 @@ async function exportAllSlidesAsVideo(slideStageRef, totalSlides, setActiveSlide
6715
6729
  const duration = slideTimingsMs?.[i] ?? slideDurationMs;
6716
6730
  ctx.clearRect(0, 0, recordingCanvas.width, recordingCanvas.height);
6717
6731
  ctx.drawImage(slideCanvases[i], 0, 0);
6718
- const frameInterval = chunkEFSQW6S5_js.fpsToFrameIntervalMs(fps);
6719
- const framesNeeded = chunkEFSQW6S5_js.segmentFrameCount(duration, fps);
6732
+ const frameInterval = chunkFDR5W67L_js.fpsToFrameIntervalMs(fps);
6733
+ const framesNeeded = chunkFDR5W67L_js.segmentFrameCount(duration, fps);
6720
6734
  for (let f = 0; f < framesNeeded; f++) {
6721
6735
  if (signal?.aborted) {
6722
6736
  recorder.stop();
@@ -6765,7 +6779,7 @@ async function exportAllSlidesAsGif(slideStageRef, totalSlides, setActiveSlide,
6765
6779
  if (frames.length === 0) {
6766
6780
  throw new Error(chunkBXAK3JFM_js.translationsEn["pptx.export.errorNoSlidesGif"]);
6767
6781
  }
6768
- const gifBytes = chunkEFSQW6S5_js.encodeGif(frames, Math.round(slideDurationMs / 10));
6782
+ const gifBytes = chunkFDR5W67L_js.encodeGif(frames, Math.round(slideDurationMs / 10));
6769
6783
  onProgress?.(totalSlides, totalSlides);
6770
6784
  const buf = new ArrayBuffer(gifBytes.length);
6771
6785
  new Uint8Array(buf).set(gifBytes);
@@ -6819,7 +6833,7 @@ function exportAllSlidesToSvg(data, options = {}) {
6819
6833
  continue;
6820
6834
  }
6821
6835
  onProgress?.(processedCount, data.slides.length);
6822
- let svg = chunkEFSQW6S5_js.SvgExporter.exportSlide(slide, data.width, data.height, svgOptions);
6836
+ let svg = chunkFDR5W67L_js.SvgExporter.exportSlide(slide, data.width, data.height, svgOptions);
6823
6837
  if (embedFonts && fontFaces?.length) {
6824
6838
  svg = injectFontFaces(svg, fontFaces);
6825
6839
  }
@@ -6879,7 +6893,7 @@ function useExportSaveAs(input) {
6879
6893
  }
6880
6894
  setExportProgress(70);
6881
6895
  setExportStatusMessage("Writing README...");
6882
- const readme = chunkEFSQW6S5_js.generatePackageReadme(pptxFilename);
6896
+ const readme = chunkFDR5W67L_js.generatePackageReadme(pptxFilename);
6883
6897
  pkgFolder.file("README.txt", readme);
6884
6898
  if (abortCtrl.signal.aborted) {
6885
6899
  throw new DOMException("Export cancelled", "AbortError");
@@ -6890,7 +6904,7 @@ function useExportSaveAs(input) {
6890
6904
  setExportProgress(95);
6891
6905
  setExportStatusMessage("Downloading...");
6892
6906
  const baseName = pptxFilename.replace(/\.[^.]+$/u, "");
6893
- chunkEFSQW6S5_js.downloadBlob(zipBlob, `${baseName}-package.zip`);
6907
+ chunkFDR5W67L_js.downloadBlob(zipBlob, `${baseName}-package.zip`);
6894
6908
  setExportProgress(100);
6895
6909
  } catch (err) {
6896
6910
  if (err.name !== "AbortError") {
@@ -6913,7 +6927,7 @@ function useExportSaveAs(input) {
6913
6927
  const blob = new Blob([data], {
6914
6928
  type: "application/vnd.openxmlformats-officedocument.presentationml.presentation"
6915
6929
  });
6916
- chunkEFSQW6S5_js.downloadBlob(blob, `${baseName}.${ext}`);
6930
+ chunkFDR5W67L_js.downloadBlob(blob, `${baseName}.${ext}`);
6917
6931
  } catch (err) {
6918
6932
  console.error(`[PowerPointViewer] Save as .${ext} failed:`, err);
6919
6933
  }
@@ -6926,14 +6940,14 @@ function useExportSaveAs(input) {
6926
6940
  const pptxGuides = guides.map((g) => ({
6927
6941
  id: g.id,
6928
6942
  orientation: g.axis === "h" ? "horz" : "vert",
6929
- positionEmu: chunkEFSQW6S5_js.guidePxToEmu(g.position)
6943
+ positionEmu: chunkFDR5W67L_js.guidePxToEmu(g.position)
6930
6944
  }));
6931
6945
  return {
6932
6946
  ...slide,
6933
6947
  guides: pptxGuides.length > 0 ? pptxGuides : void 0
6934
6948
  };
6935
6949
  });
6936
- const slidesToSave = chunkIDW5UPXW_js.buildSaveSlides(slidesWithGuides, templateElementsBySlideId);
6950
+ const slidesToSave = chunkDOS7NY7C_js.buildSaveSlides(slidesWithGuides, templateElementsBySlideId);
6937
6951
  const saveOptions = {
6938
6952
  headerFooter,
6939
6953
  presentationProperties,
@@ -6990,7 +7004,7 @@ function safeConfirm(message) {
6990
7004
  }
6991
7005
  }
6992
7006
  function downloadBlob2(blob, filename) {
6993
- chunkEFSQW6S5_js.downloadBlob(blob, chunkEFSQW6S5_js.sanitizeDownloadFilename(filename));
7007
+ chunkFDR5W67L_js.downloadBlob(blob, chunkFDR5W67L_js.sanitizeDownloadFilename(filename));
6994
7008
  }
6995
7009
 
6996
7010
  // src/viewer/hooks/useExportHandlers.ts
@@ -7091,21 +7105,21 @@ function useExportHandlers(input) {
7091
7105
  {
7092
7106
  scale: 2,
7093
7107
  onProgress: (current, total) => {
7094
- setExportProgress(chunkEFSQW6S5_js.slideProgressPercent(current, total));
7095
- setExportStatusMessage(chunkEFSQW6S5_js.slideStatusLabel("Rendering", current, total));
7108
+ setExportProgress(chunkFDR5W67L_js.slideProgressPercent(current, total));
7109
+ setExportStatusMessage(chunkFDR5W67L_js.slideStatusLabel("Rendering", current, total));
7096
7110
  },
7097
7111
  signal: abortCtrl.signal
7098
7112
  }
7099
7113
  );
7100
- setExportProgress(chunkEFSQW6S5_js.EXPORT_ASSEMBLING_PERCENT);
7114
+ setExportProgress(chunkFDR5W67L_js.EXPORT_ASSEMBLING_PERCENT);
7101
7115
  setExportStatusMessage("Building PDF...");
7102
7116
  await new Promise((r) => {
7103
7117
  setTimeout(r, 100);
7104
7118
  });
7105
- setExportProgress(chunkEFSQW6S5_js.EXPORT_DONE_PERCENT);
7119
+ setExportProgress(chunkFDR5W67L_js.EXPORT_DONE_PERCENT);
7106
7120
  setExportStatusMessage("Done!");
7107
7121
  } catch (err) {
7108
- if (!chunkEFSQW6S5_js.isExportAbortError(err)) {
7122
+ if (!chunkFDR5W67L_js.isExportAbortError(err)) {
7109
7123
  console.error("[PowerPointViewer] PDF export failed:", err);
7110
7124
  }
7111
7125
  } finally {
@@ -7135,21 +7149,21 @@ function useExportHandlers(input) {
7135
7149
  {
7136
7150
  scale: 2,
7137
7151
  onProgress: (current, total) => {
7138
- setExportProgress(chunkEFSQW6S5_js.slideProgressPercent(current, total));
7139
- setExportStatusMessage(chunkEFSQW6S5_js.slideStatusLabel("Rendering", current, total));
7152
+ setExportProgress(chunkFDR5W67L_js.slideProgressPercent(current, total));
7153
+ setExportStatusMessage(chunkFDR5W67L_js.slideStatusLabel("Rendering", current, total));
7140
7154
  },
7141
7155
  signal: abortCtrl.signal
7142
7156
  }
7143
7157
  );
7144
- setExportProgress(chunkEFSQW6S5_js.EXPORT_ASSEMBLING_PERCENT);
7158
+ setExportProgress(chunkFDR5W67L_js.EXPORT_ASSEMBLING_PERCENT);
7145
7159
  setExportStatusMessage("Building PDF...");
7146
7160
  await new Promise((r) => {
7147
7161
  setTimeout(r, 100);
7148
7162
  });
7149
- setExportProgress(chunkEFSQW6S5_js.EXPORT_DONE_PERCENT);
7163
+ setExportProgress(chunkFDR5W67L_js.EXPORT_DONE_PERCENT);
7150
7164
  setExportStatusMessage("Done!");
7151
7165
  } catch (err) {
7152
- if (!chunkEFSQW6S5_js.isExportAbortError(err)) {
7166
+ if (!chunkFDR5W67L_js.isExportAbortError(err)) {
7153
7167
  console.error("[PowerPointViewer] Notes PDF export failed:", err);
7154
7168
  }
7155
7169
  } finally {
@@ -7190,22 +7204,22 @@ function useExportHandlers(input) {
7190
7204
  scale: 1,
7191
7205
  slideDurationMs: 3e3,
7192
7206
  onProgress: (current, total) => {
7193
- setExportProgress(chunkEFSQW6S5_js.slideProgressPercent(current, total, 45));
7194
- setExportStatusMessage(chunkEFSQW6S5_js.slideStatusLabel("Capturing", current, total));
7207
+ setExportProgress(chunkFDR5W67L_js.slideProgressPercent(current, total, 45));
7208
+ setExportStatusMessage(chunkFDR5W67L_js.slideStatusLabel("Capturing", current, total));
7195
7209
  },
7196
7210
  onRecordProgress: (current, total) => {
7197
- setExportProgress(chunkEFSQW6S5_js.recordProgressPercent(current, total));
7198
- setExportStatusMessage(chunkEFSQW6S5_js.slideStatusLabel("Recording", current, total));
7211
+ setExportProgress(chunkFDR5W67L_js.recordProgressPercent(current, total));
7212
+ setExportStatusMessage(chunkFDR5W67L_js.slideStatusLabel("Recording", current, total));
7199
7213
  },
7200
7214
  signal: abortCtrl.signal
7201
7215
  }
7202
7216
  );
7203
- setExportProgress(chunkEFSQW6S5_js.EXPORT_ASSEMBLING_PERCENT);
7217
+ setExportProgress(chunkFDR5W67L_js.EXPORT_ASSEMBLING_PERCENT);
7204
7218
  setExportStatusMessage("Saving file...");
7205
7219
  downloadBlob2(blob, "presentation.webm");
7206
- setExportProgress(chunkEFSQW6S5_js.EXPORT_DONE_PERCENT);
7220
+ setExportProgress(chunkFDR5W67L_js.EXPORT_DONE_PERCENT);
7207
7221
  } catch (err) {
7208
- if (!chunkEFSQW6S5_js.isExportAbortError(err)) {
7222
+ if (!chunkFDR5W67L_js.isExportAbortError(err)) {
7209
7223
  console.error("[PowerPointViewer] Video export failed:", err);
7210
7224
  }
7211
7225
  } finally {
@@ -7233,18 +7247,18 @@ function useExportHandlers(input) {
7233
7247
  scale: 0.5,
7234
7248
  slideDurationMs: 2e3,
7235
7249
  onProgress: (current, total) => {
7236
- setExportProgress(chunkEFSQW6S5_js.slideProgressPercent(current, total));
7237
- setExportStatusMessage(chunkEFSQW6S5_js.slideStatusLabel("Encoding", current, total));
7250
+ setExportProgress(chunkFDR5W67L_js.slideProgressPercent(current, total));
7251
+ setExportStatusMessage(chunkFDR5W67L_js.slideStatusLabel("Encoding", current, total));
7238
7252
  },
7239
7253
  signal: abortCtrl.signal
7240
7254
  }
7241
7255
  );
7242
- setExportProgress(chunkEFSQW6S5_js.EXPORT_ASSEMBLING_PERCENT);
7256
+ setExportProgress(chunkFDR5W67L_js.EXPORT_ASSEMBLING_PERCENT);
7243
7257
  setExportStatusMessage("Saving file...");
7244
7258
  downloadBlob2(blob, "presentation.gif");
7245
- setExportProgress(chunkEFSQW6S5_js.EXPORT_DONE_PERCENT);
7259
+ setExportProgress(chunkFDR5W67L_js.EXPORT_DONE_PERCENT);
7246
7260
  } catch (err) {
7247
- if (!chunkEFSQW6S5_js.isExportAbortError(err)) {
7261
+ if (!chunkFDR5W67L_js.isExportAbortError(err)) {
7248
7262
  console.error("[PowerPointViewer] GIF export failed:", err);
7249
7263
  }
7250
7264
  } finally {
@@ -7284,7 +7298,7 @@ function openPrintWindow(title, bodyHtml, orientation, colorFilter, frameSlides)
7284
7298
  }
7285
7299
  printWindow.document.open();
7286
7300
  printWindow.document.write(
7287
- chunkEFSQW6S5_js.buildPrintHtmlDocument({ title, bodyHtml, orientation, colorFilter, frameSlides })
7301
+ chunkFDR5W67L_js.buildPrintHtmlDocument({ title, bodyHtml, orientation, colorFilter, frameSlides })
7288
7302
  );
7289
7303
  printWindow.document.close();
7290
7304
  printWindow.focus();
@@ -7345,7 +7359,7 @@ function usePrintHandlers(input) {
7345
7359
  if (svgs.length === 0) {
7346
7360
  return;
7347
7361
  }
7348
- const printDoc = chunkEFSQW6S5_js.buildPrintDocument(svgs, pptxData.width, pptxData.height, {
7362
+ const printDoc = chunkFDR5W67L_js.buildPrintDocument(svgs, pptxData.width, pptxData.height, {
7349
7363
  title: "Slides (Vector)",
7350
7364
  orientation: settings.orientation,
7351
7365
  colorFilter
@@ -7381,7 +7395,7 @@ function usePrintHandlers(input) {
7381
7395
  if (settings.printWhat === "outline") {
7382
7396
  openPrintWindow(
7383
7397
  "Outline",
7384
- `<div class="outline-page">${chunkEFSQW6S5_js.buildOutlineHtml(slideIndices, slides)}</div>`,
7398
+ `<div class="outline-page">${chunkFDR5W67L_js.buildOutlineHtml(slideIndices, slides)}</div>`,
7385
7399
  settings.orientation,
7386
7400
  colorFilter,
7387
7401
  settings.frameSlides
@@ -7406,7 +7420,7 @@ function usePrintHandlers(input) {
7406
7420
  if (settings.printWhat === "slides") {
7407
7421
  openPrintWindow(
7408
7422
  "Slides",
7409
- chunkEFSQW6S5_js.buildSlidesHtml(slideImages, slideIndices),
7423
+ chunkFDR5W67L_js.buildSlidesHtml(slideImages, slideIndices),
7410
7424
  settings.orientation,
7411
7425
  colorFilter,
7412
7426
  settings.frameSlides
@@ -7416,7 +7430,7 @@ function usePrintHandlers(input) {
7416
7430
  if (settings.printWhat === "notes") {
7417
7431
  openPrintWindow(
7418
7432
  "Notes Pages",
7419
- chunkEFSQW6S5_js.buildNotesHtml(slideImages, slideIndices, slides),
7433
+ chunkFDR5W67L_js.buildNotesHtml(slideImages, slideIndices, slides),
7420
7434
  "portrait",
7421
7435
  colorFilter,
7422
7436
  settings.frameSlides
@@ -7427,7 +7441,7 @@ function usePrintHandlers(input) {
7427
7441
  const spp = settings.slidesPerPage;
7428
7442
  openPrintWindow(
7429
7443
  `Handout ${spp} per page`,
7430
- chunkEFSQW6S5_js.buildHandoutsHtml(slideImages, slideIndices, spp),
7444
+ chunkFDR5W67L_js.buildHandoutsHtml(slideImages, slideIndices, spp),
7431
7445
  "portrait",
7432
7446
  colorFilter,
7433
7447
  settings.frameSlides
@@ -7491,8 +7505,8 @@ function useThemeHandlers(input) {
7491
7505
  return;
7492
7506
  }
7493
7507
  await handler.updateThemeColorScheme(colorScheme);
7494
- const previousMap = theme?.colorScheme ? chunkEFSQW6S5_js.buildThemeColorMap(theme.colorScheme) : {};
7495
- setSlides((prev) => chunkEFSQW6S5_js.reResolveSlideColors(prev, previousMap, colorScheme));
7508
+ const previousMap = theme?.colorScheme ? chunkFDR5W67L_js.buildThemeColorMap(theme.colorScheme) : {};
7509
+ setSlides((prev) => chunkFDR5W67L_js.reResolveSlideColors(prev, previousMap, colorScheme));
7496
7510
  setTheme((prev) => prev ? { ...prev, colorScheme } : { colorScheme });
7497
7511
  bumpHistory();
7498
7512
  history.markDirty();
@@ -7597,7 +7611,7 @@ function useThemeSwitching(input) {
7597
7611
  }
7598
7612
  try {
7599
7613
  await handler.applyTheme(preset.colorScheme, preset.fontScheme, preset.name);
7600
- const newData = chunkEFSQW6S5_js.applyThemeToData(data, preset.colorScheme, preset.fontScheme, preset.name);
7614
+ const newData = chunkFDR5W67L_js.applyThemeToData(data, preset.colorScheme, preset.fontScheme, preset.name);
7601
7615
  onDataChange(newData);
7602
7616
  onThemeChanged?.(preset);
7603
7617
  } catch (error) {
@@ -7614,7 +7628,7 @@ function useThemeSwitching(input) {
7614
7628
  }
7615
7629
  try {
7616
7630
  await handler.applyTheme(colorScheme, fontScheme ?? {}, themeName);
7617
- const newData = chunkEFSQW6S5_js.applyThemeToData(data, colorScheme, fontScheme, themeName);
7631
+ const newData = chunkFDR5W67L_js.applyThemeToData(data, colorScheme, fontScheme, themeName);
7618
7632
  onDataChange(newData);
7619
7633
  } catch (error) {
7620
7634
  console.error("Failed to switch to custom theme:", error);
@@ -7626,12 +7640,12 @@ function useThemeSwitching(input) {
7626
7640
  if (!data?.theme?.colorScheme) {
7627
7641
  return void 0;
7628
7642
  }
7629
- return chunkEFSQW6S5_js.THEME_PRESETS.find(
7630
- (p) => chunkEFSQW6S5_js.themeColorSchemesEqual(data.theme?.colorScheme, p.colorScheme)
7643
+ return chunkFDR5W67L_js.THEME_PRESETS.find(
7644
+ (p) => chunkFDR5W67L_js.themeColorSchemesEqual(data.theme?.colorScheme, p.colorScheme)
7631
7645
  );
7632
7646
  }, [data?.theme?.colorScheme]);
7633
7647
  return {
7634
- presets: chunkEFSQW6S5_js.THEME_PRESETS,
7648
+ presets: chunkFDR5W67L_js.THEME_PRESETS,
7635
7649
  switchToPreset,
7636
7650
  switchToCustom,
7637
7651
  currentPreset
@@ -7706,7 +7720,7 @@ function usePropertyHandlers(input) {
7706
7720
  }
7707
7721
  try {
7708
7722
  const ab = await file.arrayBuffer();
7709
- const h = new chunkEFSQW6S5_js.PptxHandler();
7723
+ const h = new chunkFDR5W67L_js.PptxHandler();
7710
7724
  const other = await h.load(ab);
7711
7725
  if (!other) {
7712
7726
  return;
@@ -7716,7 +7730,7 @@ function usePropertyHandlers(input) {
7716
7730
  width: canvasSize.width,
7717
7731
  height: canvasSize.height
7718
7732
  };
7719
- setCompareResult(chunkEFSQW6S5_js.comparePresentation(cur, other));
7733
+ setCompareResult(chunkFDR5W67L_js.comparePresentation(cur, other));
7720
7734
  setIsComparePanelOpen(true);
7721
7735
  } catch (err) {
7722
7736
  console.warn("Compare failed:", err);
@@ -7733,7 +7747,7 @@ function usePropertyHandlers(input) {
7733
7747
  if (!diff || diff.status === "unchanged") {
7734
7748
  return;
7735
7749
  }
7736
- setSlides((prev) => chunkEFSQW6S5_js.applyAcceptSlide(prev, diff));
7750
+ setSlides((prev) => chunkFDR5W67L_js.applyAcceptSlide(prev, diff));
7737
7751
  setIsDirty(true);
7738
7752
  },
7739
7753
  [compareResult, setSlides, setIsDirty]
@@ -7744,10 +7758,10 @@ function usePropertyHandlers(input) {
7744
7758
  if (!compareResult) {
7745
7759
  return;
7746
7760
  }
7747
- setSlides((prev) => chunkEFSQW6S5_js.applyAcceptAllSlides(prev, compareResult));
7761
+ setSlides((prev) => chunkFDR5W67L_js.applyAcceptAllSlides(prev, compareResult));
7748
7762
  setIsDirty(true);
7749
7763
  }, [compareResult, setSlides, setIsDirty]);
7750
- const usedFontFamilies = react.useMemo(() => chunkEFSQW6S5_js.collectUsedFonts(slides), [slides]);
7764
+ const usedFontFamilies = react.useMemo(() => chunkFDR5W67L_js.collectUsedFonts(slides), [slides]);
7751
7765
  return {
7752
7766
  handleUpdateNotes,
7753
7767
  handleUpdateSlide,
@@ -7866,7 +7880,7 @@ function useIsMobile(input) {
7866
7880
  const containerRef = input?.containerRef;
7867
7881
  const isTouchDevice = react.useSyncExternalStore(
7868
7882
  subscribeTouchCapability,
7869
- chunkEFSQW6S5_js.detectTouchDevice,
7883
+ chunkFDR5W67L_js.detectTouchDevice,
7870
7884
  () => false
7871
7885
  // server snapshot
7872
7886
  );
@@ -7882,7 +7896,7 @@ function useIsMobile(input) {
7882
7896
  }
7883
7897
  return containerRef?.current?.clientHeight ?? window.innerHeight;
7884
7898
  });
7885
- const [orientation, setOrientation] = react.useState(chunkEFSQW6S5_js.detectOrientation);
7899
+ const [orientation, setOrientation] = react.useState(chunkFDR5W67L_js.detectOrientation);
7886
7900
  const [isVirtualKeyboardOpen, setIsVirtualKeyboardOpen] = react.useState(false);
7887
7901
  const [initialViewportHeight] = react.useState(
7888
7902
  () => typeof window !== "undefined" ? window.innerHeight : 800
@@ -7926,7 +7940,7 @@ function useIsMobile(input) {
7926
7940
  return;
7927
7941
  }
7928
7942
  const handleOrientationChange = () => {
7929
- setOrientation(chunkEFSQW6S5_js.detectOrientation());
7943
+ setOrientation(chunkFDR5W67L_js.detectOrientation());
7930
7944
  };
7931
7945
  if (screen.orientation) {
7932
7946
  screen.orientation.addEventListener("change", handleOrientationChange);
@@ -7956,9 +7970,9 @@ function useIsMobile(input) {
7956
7970
  window.addEventListener("resize", handleResize);
7957
7971
  return () => window.removeEventListener("resize", handleResize);
7958
7972
  }, [isTouchDevice, initialViewportHeight]);
7959
- const isMobile = chunkEFSQW6S5_js.isMobileViewport(containerWidth, containerHeight, isTouchDevice);
7960
- const isTablet = !isMobile && containerWidth >= chunkEFSQW6S5_js.MOBILE_BREAKPOINT && containerWidth < chunkEFSQW6S5_js.TABLET_BREAKPOINT;
7961
- const isDesktop = !isMobile && containerWidth >= chunkEFSQW6S5_js.TABLET_BREAKPOINT;
7973
+ const isMobile = chunkFDR5W67L_js.isMobileViewport(containerWidth, containerHeight, isTouchDevice);
7974
+ const isTablet = !isMobile && containerWidth >= chunkFDR5W67L_js.MOBILE_BREAKPOINT && containerWidth < chunkFDR5W67L_js.TABLET_BREAKPOINT;
7975
+ const isDesktop = !isMobile && containerWidth >= chunkFDR5W67L_js.TABLET_BREAKPOINT;
7962
7976
  return {
7963
7977
  isMobile,
7964
7978
  isTablet,
@@ -8019,11 +8033,11 @@ function useViewerDialogs(input) {
8019
8033
  );
8020
8034
  const [embedFontsEnabled, setEmbedFontsEnabled] = react.useState(false);
8021
8035
  const [isNarrowViewport, setIsNarrowViewport] = react.useState(
8022
- () => typeof window !== "undefined" ? chunkEFSQW6S5_js.isMobileViewport(window.innerWidth, window.innerHeight, viewportIsTouch()) : false
8036
+ () => typeof window !== "undefined" ? chunkFDR5W67L_js.isMobileViewport(window.innerWidth, window.innerHeight, viewportIsTouch()) : false
8023
8037
  );
8024
8038
  react.useEffect(() => {
8025
8039
  const handleWindow = () => setIsNarrowViewport(
8026
- chunkEFSQW6S5_js.isMobileViewport(window.innerWidth, window.innerHeight, viewportIsTouch())
8040
+ chunkFDR5W67L_js.isMobileViewport(window.innerWidth, window.innerHeight, viewportIsTouch())
8027
8041
  );
8028
8042
  let observer = null;
8029
8043
  let raf = 0;
@@ -8037,12 +8051,12 @@ function useViewerDialogs(input) {
8037
8051
  const entry = entries[0];
8038
8052
  if (entry) {
8039
8053
  setIsNarrowViewport(
8040
- chunkEFSQW6S5_js.isMobileViewport(entry.contentRect.width, entry.contentRect.height, viewportIsTouch())
8054
+ chunkFDR5W67L_js.isMobileViewport(entry.contentRect.width, entry.contentRect.height, viewportIsTouch())
8041
8055
  );
8042
8056
  }
8043
8057
  });
8044
8058
  observer.observe(el);
8045
- setIsNarrowViewport(chunkEFSQW6S5_js.isMobileViewport(el.clientWidth, el.clientHeight, viewportIsTouch()));
8059
+ setIsNarrowViewport(chunkFDR5W67L_js.isMobileViewport(el.clientWidth, el.clientHeight, viewportIsTouch()));
8046
8060
  };
8047
8061
  attach();
8048
8062
  window.addEventListener("resize", handleWindow);
@@ -8200,20 +8214,20 @@ function useViewerDialogs(input) {
8200
8214
  }
8201
8215
  function computeGridSpacingPx(presentationGridSpacing) {
8202
8216
  if (presentationGridSpacing) {
8203
- const px = Math.round(presentationGridSpacing.cx / chunkIDW5UPXW_js.EMU_PER_PX);
8217
+ const px = Math.round(presentationGridSpacing.cx / chunkDOS7NY7C_js.EMU_PER_PX);
8204
8218
  if (px > 0) {
8205
8219
  return px;
8206
8220
  }
8207
8221
  }
8208
- return chunkIDW5UPXW_js.GRID_SIZE;
8222
+ return chunkDOS7NY7C_js.GRID_SIZE;
8209
8223
  }
8210
8224
  function computeVisibleSlideIndexes(slides, activeCustomShowId, customShows) {
8211
8225
  const activeShow = activeCustomShowId ? customShows.find((show) => show.id === activeCustomShowId) : void 0;
8212
- return chunkEFSQW6S5_js.resolveShowSlideIndexes(slides, activeShow);
8226
+ return chunkFDR5W67L_js.resolveShowSlideIndexes(slides, activeShow);
8213
8227
  }
8214
8228
  function computeSlideSectionGroups(slides, sections) {
8215
- return chunkEFSQW6S5_js.groupSlidesBySection(sections, slides).map((group) => ({
8216
- id: group.section?.id ?? (sections.length > 0 ? chunkIDW5UPXW_js.UNGROUPED_SECTION_ID : "default"),
8229
+ return chunkFDR5W67L_js.groupSlidesBySection(sections, slides).map((group) => ({
8230
+ id: group.section?.id ?? (sections.length > 0 ? chunkDOS7NY7C_js.UNGROUPED_SECTION_ID : "default"),
8217
8231
  label: group.section?.name ?? (sections.length > 0 ? "Ungrouped Slides" : "Slides"),
8218
8232
  slideIndexes: group.slideIndexes,
8219
8233
  ...group.section?.color !== void 0 ? { color: group.section.color } : {},
@@ -8268,7 +8282,7 @@ function useDerivedSlideState(input) {
8268
8282
  );
8269
8283
  const slideSectionGroups = react.useMemo(
8270
8284
  () => computeSlideSectionGroups(slides, sections).map((group) => {
8271
- if (group.id === chunkIDW5UPXW_js.UNGROUPED_SECTION_ID && group.label === "Ungrouped Slides") {
8285
+ if (group.id === chunkDOS7NY7C_js.UNGROUPED_SECTION_ID && group.label === "Ungrouped Slides") {
8272
8286
  return { ...group, label: t("pptx.slides.ungroupedSlides") };
8273
8287
  }
8274
8288
  if (group.id === "default" && group.label === "Slides") {
@@ -8371,13 +8385,13 @@ function useAnnotationHandlers(input) {
8371
8385
  }, [annotations, setMode, setSlides, history]);
8372
8386
  const handleSetMode = react.useCallback(
8373
8387
  (nextMode) => {
8374
- if (mode === "present" && nextMode !== "present" && !chunkEFSQW6S5_js.mayLeaveSlideShow()) {
8388
+ if (mode === "present" && nextMode !== "present" && !chunkFDR5W67L_js.mayLeaveSlideShow()) {
8375
8389
  return;
8376
8390
  }
8377
8391
  if (nextMode === "present") {
8378
8392
  presentation.enterPresentMode();
8379
8393
  } else if (mode === "present" && annotations.hasAnyAnnotations) {
8380
- chunkIDW5UPXW_js.stopAllPersistentAudio();
8394
+ chunkFDR5W67L_js.stopAllPersistentAudio();
8381
8395
  pendingModeAfterAnnotationsRef.current = nextMode;
8382
8396
  if (promptKeepInkAnnotations) {
8383
8397
  setShowKeepAnnotationsDialog(true);
@@ -8386,7 +8400,7 @@ function useAnnotationHandlers(input) {
8386
8400
  }
8387
8401
  } else {
8388
8402
  if (mode === "present") {
8389
- chunkIDW5UPXW_js.stopAllPersistentAudio();
8403
+ chunkFDR5W67L_js.stopAllPersistentAudio();
8390
8404
  }
8391
8405
  setMode(nextMode);
8392
8406
  }
@@ -8452,13 +8466,13 @@ function useSerialize(input) {
8452
8466
  let processedSlide = slide;
8453
8467
  if (pendingEditId) {
8454
8468
  const updatedElements = slide.elements.map((el) => {
8455
- if (el.id !== pendingEditId || !chunkEFSQW6S5_js.hasTextProperties(el)) {
8469
+ if (el.id !== pendingEditId || !chunkFDR5W67L_js.hasTextProperties(el)) {
8456
8470
  return el;
8457
8471
  }
8458
8472
  return {
8459
8473
  ...el,
8460
8474
  text: pendingEditText,
8461
- textSegments: chunkEFSQW6S5_js.remapTextToSegments(pendingEditText, el.textSegments, el.textStyle)
8475
+ textSegments: chunkFDR5W67L_js.remapTextToSegments(pendingEditText, el.textSegments, el.textStyle)
8462
8476
  };
8463
8477
  });
8464
8478
  if (updatedElements.some((el, i) => el !== slide.elements[i])) {
@@ -8471,14 +8485,14 @@ function useSerialize(input) {
8471
8485
  const pptxGuides = guides.map((g) => ({
8472
8486
  id: g.id,
8473
8487
  orientation: g.axis === "h" ? "horz" : "vert",
8474
- positionEmu: chunkEFSQW6S5_js.guidePxToEmu(g.position)
8488
+ positionEmu: chunkFDR5W67L_js.guidePxToEmu(g.position)
8475
8489
  }));
8476
8490
  return {
8477
8491
  ...processedSlide,
8478
8492
  guides: pptxGuides.length > 0 ? pptxGuides : void 0
8479
8493
  };
8480
8494
  });
8481
- const slidesToSave = chunkIDW5UPXW_js.buildSaveSlides(slidesWithGuides, templateElementsBySlideId);
8495
+ const slidesToSave = chunkDOS7NY7C_js.buildSaveSlides(slidesWithGuides, templateElementsBySlideId);
8482
8496
  const saveOptions = {
8483
8497
  headerFooter,
8484
8498
  presentationProperties,
@@ -8647,7 +8661,7 @@ function usePresentationSetup(input) {
8647
8661
  containerRef,
8648
8662
  content,
8649
8663
  onSetMode: (nextMode) => {
8650
- if (mode === "present" && nextMode !== "present" && !chunkEFSQW6S5_js.mayLeaveSlideShow()) {
8664
+ if (mode === "present" && nextMode !== "present" && !chunkFDR5W67L_js.mayLeaveSlideShow()) {
8651
8665
  return;
8652
8666
  }
8653
8667
  if (mode === "present" && nextMode !== "present" && annotations.hasAnyAnnotations && promptKeepInkAnnotations) {
@@ -8655,7 +8669,7 @@ function usePresentationSetup(input) {
8655
8669
  setShowKeepAnnotationsDialog(true);
8656
8670
  } else {
8657
8671
  if (mode === "present" && nextMode !== "present") {
8658
- chunkIDW5UPXW_js.stopAllPersistentAudio();
8672
+ chunkFDR5W67L_js.stopAllPersistentAudio();
8659
8673
  stopAnimationSound();
8660
8674
  }
8661
8675
  setMode(nextMode);
@@ -8709,10 +8723,10 @@ function usePresentationSetup(input) {
8709
8723
  onToggleInkMarkup: () => annotations.setInkMarkupVisible(!annotations.inkMarkupVisible),
8710
8724
  onToggleToolbar: () => annotations.setToolbarVisible(!annotations.toolbarVisible),
8711
8725
  onSaveRehearsalTimings: (timings) => {
8712
- setSlides((prev) => chunkEFSQW6S5_js.applyRehearsalTimings(prev, timings));
8726
+ setSlides((prev) => chunkFDR5W67L_js.applyRehearsalTimings(prev, timings));
8713
8727
  history.markDirty();
8714
8728
  },
8715
- loopContinuously: chunkEFSQW6S5_js.shouldLoopContinuously(presentationProperties),
8729
+ loopContinuously: chunkFDR5W67L_js.shouldLoopContinuously(presentationProperties),
8716
8730
  showWithAnimation: presentationProperties.showWithAnimation,
8717
8731
  useTimings: presentationProperties.advanceMode !== "manual",
8718
8732
  endWithBlackSlide
@@ -8874,7 +8888,7 @@ function useEditorOperations(input) {
8874
8888
  const { formatPainterActive, setFormatPainterActive, elementLookup } = state;
8875
8889
  react.useEffect(() => {
8876
8890
  if (formatPainterActive && !prevFormatPainterRef.current && selectedElement) {
8877
- copiedFormatRef.current = chunkEFSQW6S5_js.copyFormatFromElement(selectedElement);
8891
+ copiedFormatRef.current = chunkFDR5W67L_js.copyFormatFromElement(selectedElement);
8878
8892
  } else if (!formatPainterActive) {
8879
8893
  copiedFormatRef.current = null;
8880
8894
  }
@@ -8900,12 +8914,12 @@ function useEditorOperations(input) {
8900
8914
  e.stopPropagation();
8901
8915
  const element = elementLookup.get(elementId);
8902
8916
  if (element) {
8903
- const updated = chunkEFSQW6S5_js.applyFormatToElement(element, copiedFormatRef.current);
8917
+ const updated = chunkFDR5W67L_js.applyFormatToElement(element, copiedFormatRef.current);
8904
8918
  const updates = {};
8905
- if (chunkEFSQW6S5_js.hasShapeProperties(updated)) {
8919
+ if (chunkFDR5W67L_js.hasShapeProperties(updated)) {
8906
8920
  updates.shapeStyle = updated.shapeStyle;
8907
8921
  }
8908
- if (chunkEFSQW6S5_js.hasTextProperties(updated)) {
8922
+ if (chunkFDR5W67L_js.hasTextProperties(updated)) {
8909
8923
  updates.textStyle = updated.textStyle;
8910
8924
  }
8911
8925
  ops.updateElementById(elementId, updates);
@@ -9052,7 +9066,7 @@ function collectReferencedFontFamilies(slides) {
9052
9066
  const families = /* @__PURE__ */ new Set();
9053
9067
  for (const slide of slides) {
9054
9068
  for (const el of slide.elements) {
9055
- if (chunkEFSQW6S5_js.hasTextProperties(el) && el.textSegments) {
9069
+ if (chunkFDR5W67L_js.hasTextProperties(el) && el.textSegments) {
9056
9070
  for (const seg of el.textSegments) {
9057
9071
  if (seg.style.fontFamily) {
9058
9072
  families.add(seg.style.fontFamily);
@@ -9264,13 +9278,13 @@ function useKeyboardShortcuts(input) {
9264
9278
  inputRef.current = input;
9265
9279
  const handleKeyDown = react.useCallback((e) => {
9266
9280
  const current = inputRef.current;
9267
- const { action, dx, dy } = chunkEFSQW6S5_js.mapEditorKey(e, {
9281
+ const { action, dx, dy } = chunkFDR5W67L_js.mapEditorKey(e, {
9268
9282
  canEdit: current.canEdit,
9269
9283
  isPresenting: current.mode !== "edit",
9270
9284
  hasSelection: current.hasSelection,
9271
9285
  isEditingText: Boolean(current.inlineEditingElementId || current.tableEditorState?.isEditing),
9272
9286
  isDrawing: current.activeTool !== "select",
9273
- isTextInputTarget: chunkEFSQW6S5_js.isEditorTextInputTarget(e.target)
9287
+ isTextInputTarget: chunkFDR5W67L_js.isEditorTextInputTarget(e.target)
9274
9288
  });
9275
9289
  if (action === null) {
9276
9290
  return;
@@ -9563,7 +9577,7 @@ function useViewerIntegration(input) {
9563
9577
  return zoom.scale;
9564
9578
  },
9565
9579
  setZoom(level) {
9566
- zoom.setScale(chunkEFSQW6S5_js.clampZoomScale(level));
9580
+ zoom.setScale(chunkFDR5W67L_js.clampZoomScale(level));
9567
9581
  },
9568
9582
  zoomIn() {
9569
9583
  zoom.handleZoomIn();
@@ -9778,7 +9792,7 @@ function useReducedMotion() {
9778
9792
  }
9779
9793
  function useViewerOptions() {
9780
9794
  const storeRef = react.useRef(null);
9781
- storeRef.current ??= chunkEFSQW6S5_js.createViewerOptionsStore();
9795
+ storeRef.current ??= chunkFDR5W67L_js.createViewerOptionsStore();
9782
9796
  const store = storeRef.current;
9783
9797
  const options = react.useSyncExternalStore(
9784
9798
  (onStoreChange) => store.subscribe(onStoreChange),
@@ -9787,9 +9801,9 @@ function useViewerOptions() {
9787
9801
  );
9788
9802
  return { optionsStore: store, options };
9789
9803
  }
9790
- var KNOWN_TAB_IDS = new Set(chunkEFSQW6S5_js.TOOLBAR_TABS.map((tab) => tab.id));
9804
+ var KNOWN_TAB_IDS = new Set(chunkFDR5W67L_js.TOOLBAR_TABS.map((tab) => tab.id));
9791
9805
  function computeToolbarVisibility(hiddenActions) {
9792
- const isHidden = (id) => chunkEFSQW6S5_js.isActionHidden(id, hiddenActions);
9806
+ const isHidden = (id) => chunkFDR5W67L_js.isActionHidden(id, hiddenActions);
9793
9807
  const isTabVisible = (id) => !KNOWN_TAB_IDS.has(id) || !isHidden(id);
9794
9808
  return { isHidden, isTabVisible };
9795
9809
  }
@@ -9874,12 +9888,12 @@ function useYjsDocumentSync({
9874
9888
  return;
9875
9889
  }
9876
9890
  try {
9877
- const handler = new chunkEFSQW6S5_js.PptxHandler();
9891
+ const handler = new chunkFDR5W67L_js.PptxHandler();
9878
9892
  await handler.load(sourceBytes.buffer);
9879
- const currentSlides = chunkEFSQW6S5_js.readSlidesFromYDoc(
9893
+ const currentSlides = chunkFDR5W67L_js.readSlidesFromYDoc(
9880
9894
  doc
9881
9895
  );
9882
- const slidesToSave = chunkIDW5UPXW_js.buildSaveSlides(currentSlides, templateElementsBySlideId);
9896
+ const slidesToSave = chunkDOS7NY7C_js.buildSaveSlides(currentSlides, templateElementsBySlideId);
9883
9897
  const bytes = await handler.save(slidesToSave);
9884
9898
  config.onWriteBack(bytes);
9885
9899
  } catch {
@@ -9894,7 +9908,7 @@ function useYjsDocumentSync({
9894
9908
  if (!doc || !isConnected) {
9895
9909
  return;
9896
9910
  }
9897
- const docSlides = chunkEFSQW6S5_js.readSlidesFromYDoc(
9911
+ const docSlides = chunkFDR5W67L_js.readSlidesFromYDoc(
9898
9912
  doc
9899
9913
  );
9900
9914
  if (docSlides.length === 0) {
@@ -9916,11 +9930,11 @@ function useYjsDocumentSync({
9916
9930
  lastSyncedRef.current = serialized;
9917
9931
  void (async () => {
9918
9932
  const factories = await getFactories();
9919
- chunkEFSQW6S5_js.reconcileSlidesInYDoc(
9933
+ chunkFDR5W67L_js.reconcileSlidesInYDoc(
9920
9934
  slides,
9921
9935
  doc,
9922
9936
  factories,
9923
- chunkEFSQW6S5_js.LOCAL_SYNC_ORIGIN
9937
+ chunkFDR5W67L_js.LOCAL_SYNC_ORIGIN
9924
9938
  );
9925
9939
  scheduleWriteBack();
9926
9940
  })();
@@ -9934,10 +9948,10 @@ function useYjsDocumentSync({
9934
9948
  return;
9935
9949
  }
9936
9950
  const handleChange = (_events, transaction) => {
9937
- if (transaction?.origin === chunkEFSQW6S5_js.LOCAL_SYNC_ORIGIN) {
9951
+ if (transaction?.origin === chunkFDR5W67L_js.LOCAL_SYNC_ORIGIN) {
9938
9952
  return;
9939
9953
  }
9940
- const remoteSlides = chunkEFSQW6S5_js.readSlidesFromYDoc(
9954
+ const remoteSlides = chunkFDR5W67L_js.readSlidesFromYDoc(
9941
9955
  doc
9942
9956
  );
9943
9957
  if (remoteSlides.length === 0) {
@@ -9953,7 +9967,7 @@ function useYjsDocumentSync({
9953
9967
  isApplyingRemoteRef.current = false;
9954
9968
  scheduleWriteBack();
9955
9969
  };
9956
- const unobserve = chunkEFSQW6S5_js.observeYDocSlides(
9970
+ const unobserve = chunkFDR5W67L_js.observeYDocSlides(
9957
9971
  doc,
9958
9972
  handleChange
9959
9973
  );
@@ -9991,7 +10005,7 @@ function useBroadcastFollower({
9991
10005
  if (!broadcaster) {
9992
10006
  return;
9993
10007
  }
9994
- if (!chunkEFSQW6S5_js.shouldAutoFollowBroadcaster({
10008
+ if (!chunkFDR5W67L_js.shouldAutoFollowBroadcaster({
9995
10009
  localRole: collab.config.role,
9996
10010
  broadcasterRole: broadcaster.role
9997
10011
  })) {
@@ -10151,10 +10165,10 @@ function useTouchGestures(input) {
10151
10165
  if (!el || !enabled) {
10152
10166
  return;
10153
10167
  }
10154
- const recognizer = chunkEFSQW6S5_js.createTouchGestureRecognizer({
10168
+ const recognizer = chunkFDR5W67L_js.createTouchGestureRecognizer({
10155
10169
  getScale: () => scaleRef.current,
10156
- minScale: chunkEFSQW6S5_js.MIN_ZOOM_SCALE,
10157
- maxScale: chunkEFSQW6S5_js.MAX_ZOOM_SCALE,
10170
+ minScale: chunkFDR5W67L_js.MIN_ZOOM_SCALE,
10171
+ maxScale: chunkFDR5W67L_js.MAX_ZOOM_SCALE,
10158
10172
  callbacks: {
10159
10173
  onPinchZoom: (newScale) => callbacksRef.current.onPinchZoom?.(newScale),
10160
10174
  onSwipe: (direction) => callbacksRef.current.onSwipe?.(direction),
@@ -10194,7 +10208,7 @@ function scrollFocusedIntoView(keyboardInset) {
10194
10208
  return;
10195
10209
  }
10196
10210
  const rect = active.getBoundingClientRect();
10197
- const delta = chunkEFSQW6S5_js.computeScrollDelta(
10211
+ const delta = chunkFDR5W67L_js.computeScrollDelta(
10198
10212
  { top: rect.top, bottom: rect.bottom },
10199
10213
  window.innerHeight,
10200
10214
  keyboardInset
@@ -10214,8 +10228,8 @@ function useKeyboardInsets(enabled = true) {
10214
10228
  return;
10215
10229
  }
10216
10230
  const update = () => {
10217
- const metrics = chunkEFSQW6S5_js.readViewportMetrics(window);
10218
- const inset = metrics ? chunkEFSQW6S5_js.computeKeyboardInset(metrics) : 0;
10231
+ const metrics = chunkFDR5W67L_js.readViewportMetrics(window);
10232
+ const inset = metrics ? chunkFDR5W67L_js.computeKeyboardInset(metrics) : 0;
10219
10233
  setKeyboardInset(inset);
10220
10234
  if (inset > 0) {
10221
10235
  window.requestAnimationFrame(() => scrollFocusedIntoView(inset));
@@ -10226,8 +10240,8 @@ function useKeyboardInsets(enabled = true) {
10226
10240
  vv.addEventListener("scroll", update);
10227
10241
  const onFocusIn = () => {
10228
10242
  window.requestAnimationFrame(() => {
10229
- const metrics = chunkEFSQW6S5_js.readViewportMetrics(window);
10230
- const inset = metrics ? chunkEFSQW6S5_js.computeKeyboardInset(metrics) : 0;
10243
+ const metrics = chunkFDR5W67L_js.readViewportMetrics(window);
10244
+ const inset = metrics ? chunkFDR5W67L_js.computeKeyboardInset(metrics) : 0;
10231
10245
  if (inset > 0) {
10232
10246
  scrollFocusedIntoView(inset);
10233
10247
  }
@@ -10240,7 +10254,7 @@ function useKeyboardInsets(enabled = true) {
10240
10254
  document.removeEventListener("focusin", onFocusIn);
10241
10255
  };
10242
10256
  }, [enabled]);
10243
- return { keyboardInset, isKeyboardOpen: chunkEFSQW6S5_js.isKeyboardOpen(keyboardInset) };
10257
+ return { keyboardInset, isKeyboardOpen: chunkFDR5W67L_js.isKeyboardOpen(keyboardInset) };
10244
10258
  }
10245
10259
 
10246
10260
  // src/viewer/hooks/useViewerBuildingBlocks-canvas-props.ts
@@ -10267,7 +10281,7 @@ function buildCanvasProps(input) {
10267
10281
  } = input;
10268
10282
  const effectiveSlide = mode === "master" ? masterPseudoSlide : activeSlide;
10269
10283
  const effectiveTemplateElements = mode === "master" ? s.activeLayout ? s.activeMaster?.elements ?? [] : [] : templateElements;
10270
- const fieldContext = chunkEFSQW6S5_js.buildFieldSubstitutionContext({
10284
+ const fieldContext = chunkFDR5W67L_js.buildFieldSubstitutionContext({
10271
10285
  headerFooter: s.headerFooter,
10272
10286
  customProperties: s.customProperties,
10273
10287
  slide: activeSlide
@@ -10277,13 +10291,13 @@ function buildCanvasProps(input) {
10277
10291
  if (mode === "present") {
10278
10292
  presentation.handlePresentationAction(action);
10279
10293
  } else if (action.url) {
10280
- chunkEFSQW6S5_js.safeOpenUrl(action.url);
10294
+ chunkFDR5W67L_js.safeOpenUrl(action.url);
10281
10295
  }
10282
10296
  };
10283
10297
  const handleHyperlinkClick = (url) => {
10284
- if (chunkEFSQW6S5_js.isPpactionUrl(url)) {
10298
+ if (chunkFDR5W67L_js.isPpactionUrl(url)) {
10285
10299
  if (mode === "present") {
10286
- const parsed = chunkEFSQW6S5_js.parsePpactionUrl(url);
10300
+ const parsed = chunkFDR5W67L_js.parsePpactionUrl(url);
10287
10301
  if (parsed) {
10288
10302
  presentation.handlePresentationAction({
10289
10303
  action: parsed.action,
@@ -10293,7 +10307,7 @@ function buildCanvasProps(input) {
10293
10307
  }
10294
10308
  return;
10295
10309
  }
10296
- chunkEFSQW6S5_js.safeOpenUrl(url);
10310
+ chunkFDR5W67L_js.safeOpenUrl(url);
10297
10311
  };
10298
10312
  return {
10299
10313
  activeSlide: effectiveSlide,
@@ -10436,7 +10450,7 @@ function buildToolbarAnimationHandlers(input) {
10436
10450
  const current = activeSlide.animations ?? [];
10437
10451
  if (group === "motionPath") {
10438
10452
  propertyHandlers.handleUpdateSlide({
10439
- animations: chunkEFSQW6S5_js.applyMotionPathPreset(current, selectedElement.id, preset)
10453
+ animations: chunkFDR5W67L_js.applyMotionPathPreset(current, selectedElement.id, preset)
10440
10454
  });
10441
10455
  return;
10442
10456
  }
@@ -10630,7 +10644,7 @@ function buildToolbarProps(input) {
10630
10644
  onOpenFile,
10631
10645
  onOpenRecentFile,
10632
10646
  onCreatePresentation: (templateId) => {
10633
- s.setSlides(chunkEFSQW6S5_js.createBackstagePresentation(templateId));
10647
+ s.setSlides(chunkFDR5W67L_js.createBackstagePresentation(templateId));
10634
10648
  s.setActiveSlideIndex(0);
10635
10649
  s.setSelectedElementId(null);
10636
10650
  s.setSelectedElementIds([]);
@@ -10687,7 +10701,7 @@ function buildToolbarProps(input) {
10687
10701
  isCommentsPanelOpen: s.isInspectorPaneOpen,
10688
10702
  slideCommentCount: activeSlide?.comments?.length ?? 0,
10689
10703
  formatPainterActive: s.formatPainterActive,
10690
- canActivateFormatPainter: chunkEFSQW6S5_js.hasCopyableFormat(selectedElement),
10704
+ canActivateFormatPainter: chunkFDR5W67L_js.hasCopyableFormat(selectedElement),
10691
10705
  onToggleFormatPainter: () => s.setFormatPainterActive((p) => !p),
10692
10706
  isSelectionPaneOpen: s.isSelectionPaneOpen,
10693
10707
  onToggleSelectionPane: () => s.setIsSelectionPaneOpen((p) => !p),
@@ -10956,7 +10970,7 @@ function useViewerBuildingBlocks(input) {
10956
10970
  }, [incomingContent]);
10957
10971
  const onOpenFile = react.useCallback(() => {
10958
10972
  void (async () => {
10959
- const picked = await chunkEFSQW6S5_js.openPptxFile();
10973
+ const picked = await chunkFDR5W67L_js.openPptxFile();
10960
10974
  if (picked) {
10961
10975
  setContent(picked.buffer);
10962
10976
  }
@@ -10964,7 +10978,7 @@ function useViewerBuildingBlocks(input) {
10964
10978
  }, []);
10965
10979
  const onOpenRecentFile = react.useCallback((key) => {
10966
10980
  void (async () => {
10967
- const bytes = await chunkEFSQW6S5_js.readBackstageRecentFile(key);
10981
+ const bytes = await chunkFDR5W67L_js.readBackstageRecentFile(key);
10968
10982
  if (bytes) {
10969
10983
  setContent(bytes);
10970
10984
  }