pptx-react-viewer 2.1.0 → 2.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (110) hide show
  1. package/CHANGELOG.md +6 -0
  2. package/dist/{AiChatPanel-RFBZWMUE.mjs → AiChatPanel-JFCJCR3O.mjs} +3 -3
  3. package/dist/AiChatPanel-JFCJCR3O.mjs.br +0 -0
  4. package/dist/AiChatPanel-JFCJCR3O.mjs.gz +0 -0
  5. package/dist/{AiChatPanel-VCCVHAAI.js → AiChatPanel-S3FWARWG.js} +11 -11
  6. package/dist/AiChatPanel-S3FWARWG.js.br +0 -0
  7. package/dist/AiChatPanel-S3FWARWG.js.gz +0 -0
  8. package/dist/{Model3DScene-RQIGSYGQ.js → Model3DScene-BZK4UHL4.js} +2 -2
  9. package/dist/Model3DScene-BZK4UHL4.js.br +0 -0
  10. package/dist/Model3DScene-BZK4UHL4.js.gz +0 -0
  11. package/dist/{Model3DScene-2M6HVWTE.mjs → Model3DScene-RCZCBW52.mjs} +1 -1
  12. package/dist/{Model3DScene-2M6HVWTE.mjs.br → Model3DScene-RCZCBW52.mjs.br} +0 -0
  13. package/dist/Model3DScene-RCZCBW52.mjs.gz +0 -0
  14. package/dist/{SurfaceChart3DScene-2FVASQGC.js → SurfaceChart3DScene-EGPAMPX4.js} +2 -2
  15. package/dist/SurfaceChart3DScene-EGPAMPX4.js.br +0 -0
  16. package/dist/SurfaceChart3DScene-EGPAMPX4.js.gz +0 -0
  17. package/dist/{SurfaceChart3DScene-EGMWY4CZ.mjs → SurfaceChart3DScene-IRLH4ADG.mjs} +1 -1
  18. package/dist/{SurfaceChart3DScene-EGMWY4CZ.mjs.br → SurfaceChart3DScene-IRLH4ADG.mjs.br} +0 -0
  19. package/dist/SurfaceChart3DScene-IRLH4ADG.mjs.gz +0 -0
  20. package/dist/{chunk-VHO53ZXZ.js → chunk-3KD6S6VM.js} +1102 -829
  21. package/dist/chunk-3KD6S6VM.js.br +0 -0
  22. package/dist/chunk-3KD6S6VM.js.gz +0 -0
  23. package/dist/{chunk-Y4OSELBT.mjs → chunk-6BUR4MJO.mjs} +348 -75
  24. package/dist/chunk-6BUR4MJO.mjs.br +0 -0
  25. package/dist/chunk-6BUR4MJO.mjs.gz +0 -0
  26. package/dist/{chunk-ZRY7NLKS.js → chunk-JPJBOVU7.js} +328 -334
  27. package/dist/chunk-JPJBOVU7.js.br +0 -0
  28. package/dist/chunk-JPJBOVU7.js.gz +0 -0
  29. package/dist/{chunk-NGE7YQTF.mjs → chunk-L4ETDT4F.mjs} +66 -72
  30. package/dist/chunk-L4ETDT4F.mjs.br +0 -0
  31. package/dist/chunk-L4ETDT4F.mjs.gz +0 -0
  32. package/dist/{chunk-2X72MOPZ.mjs → chunk-PZTPX3HK.mjs} +10 -1
  33. package/dist/chunk-PZTPX3HK.mjs.br +0 -0
  34. package/dist/chunk-PZTPX3HK.mjs.gz +0 -0
  35. package/dist/{chunk-27XBWVO5.mjs → chunk-RLK72AOU.mjs} +94 -1
  36. package/dist/chunk-RLK72AOU.mjs.br +0 -0
  37. package/dist/{chunk-27XBWVO5.mjs.gz → chunk-RLK72AOU.mjs.gz} +0 -0
  38. package/dist/{chunk-LDF77JJD.js → chunk-RNZJKGA7.js} +219 -219
  39. package/dist/chunk-RNZJKGA7.js.br +0 -0
  40. package/dist/chunk-RNZJKGA7.js.gz +0 -0
  41. package/dist/{chunk-7DQHWPIB.mjs → chunk-SOHIKHL4.mjs} +3 -3
  42. package/dist/chunk-SOHIKHL4.mjs.br +0 -0
  43. package/dist/chunk-SOHIKHL4.mjs.gz +0 -0
  44. package/dist/{chunk-46Z6MNRS.js → chunk-UTTXH3GH.js} +95 -0
  45. package/dist/chunk-UTTXH3GH.js.br +0 -0
  46. package/dist/{chunk-46Z6MNRS.js.gz → chunk-UTTXH3GH.js.gz} +0 -0
  47. package/dist/{chunk-CUUYYYC5.js → chunk-YIFO3WQO.js} +10 -1
  48. package/dist/chunk-YIFO3WQO.js.br +0 -0
  49. package/dist/chunk-YIFO3WQO.js.gz +0 -0
  50. package/dist/i18n.js +4 -4
  51. package/dist/i18n.js.br +0 -0
  52. package/dist/i18n.js.gz +0 -0
  53. package/dist/i18n.mjs +1 -1
  54. package/dist/i18n.mjs.br +0 -0
  55. package/dist/i18n.mjs.gz +0 -0
  56. package/dist/{index-nAyIdGqF.d.ts → index-CDCSXtK3.d.ts} +32 -16
  57. package/dist/index-CDCSXtK3.d.ts.map +1 -0
  58. package/dist/index.js +35 -35
  59. package/dist/index.js.br +0 -0
  60. package/dist/index.js.gz +0 -0
  61. package/dist/index.mjs +5 -5
  62. package/dist/index.mjs.br +0 -0
  63. package/dist/index.mjs.gz +0 -0
  64. package/dist/internals.d.ts +42 -14
  65. package/dist/internals.d.ts.map +1 -1
  66. package/dist/internals.js +79 -79
  67. package/dist/internals.js.br +0 -0
  68. package/dist/internals.js.gz +0 -0
  69. package/dist/internals.mjs +4 -4
  70. package/dist/internals.mjs.br +0 -0
  71. package/dist/internals.mjs.gz +0 -0
  72. package/dist/pptx-viewer.css +1 -1
  73. package/dist/pptx-viewer.css.br +0 -0
  74. package/dist/pptx-viewer.css.gz +0 -0
  75. package/dist/viewer/index.js +21 -21
  76. package/dist/viewer/index.js.br +0 -0
  77. package/dist/viewer/index.js.gz +0 -0
  78. package/dist/viewer/index.mjs +5 -5
  79. package/dist/viewer/index.mjs.br +0 -0
  80. package/dist/viewer/index.mjs.gz +0 -0
  81. package/package.json +1 -1
  82. package/dist/AiChatPanel-RFBZWMUE.mjs.br +0 -0
  83. package/dist/AiChatPanel-RFBZWMUE.mjs.gz +0 -0
  84. package/dist/AiChatPanel-VCCVHAAI.js.br +0 -0
  85. package/dist/AiChatPanel-VCCVHAAI.js.gz +0 -0
  86. package/dist/Model3DScene-2M6HVWTE.mjs.gz +0 -0
  87. package/dist/Model3DScene-RQIGSYGQ.js.br +0 -0
  88. package/dist/Model3DScene-RQIGSYGQ.js.gz +0 -0
  89. package/dist/SurfaceChart3DScene-2FVASQGC.js.br +0 -0
  90. package/dist/SurfaceChart3DScene-2FVASQGC.js.gz +0 -0
  91. package/dist/SurfaceChart3DScene-EGMWY4CZ.mjs.gz +0 -0
  92. package/dist/chunk-27XBWVO5.mjs.br +0 -0
  93. package/dist/chunk-2X72MOPZ.mjs.br +0 -0
  94. package/dist/chunk-2X72MOPZ.mjs.gz +0 -0
  95. package/dist/chunk-46Z6MNRS.js.br +0 -0
  96. package/dist/chunk-7DQHWPIB.mjs.br +0 -0
  97. package/dist/chunk-7DQHWPIB.mjs.gz +0 -0
  98. package/dist/chunk-CUUYYYC5.js.br +0 -0
  99. package/dist/chunk-CUUYYYC5.js.gz +0 -0
  100. package/dist/chunk-LDF77JJD.js.br +0 -0
  101. package/dist/chunk-LDF77JJD.js.gz +0 -0
  102. package/dist/chunk-NGE7YQTF.mjs.br +0 -0
  103. package/dist/chunk-NGE7YQTF.mjs.gz +0 -0
  104. package/dist/chunk-VHO53ZXZ.js.br +0 -0
  105. package/dist/chunk-VHO53ZXZ.js.gz +0 -0
  106. package/dist/chunk-Y4OSELBT.mjs.br +0 -0
  107. package/dist/chunk-Y4OSELBT.mjs.gz +0 -0
  108. package/dist/chunk-ZRY7NLKS.js.br +0 -0
  109. package/dist/chunk-ZRY7NLKS.js.gz +0 -0
  110. package/dist/index-nAyIdGqF.d.ts.map +0 -1
@@ -1,8 +1,8 @@
1
1
  'use strict';
2
2
 
3
- var chunkLDF77JJD_js = require('./chunk-LDF77JJD.js');
4
- var chunk46Z6MNRS_js = require('./chunk-46Z6MNRS.js');
5
- var chunkCUUYYYC5_js = require('./chunk-CUUYYYC5.js');
3
+ var chunkRNZJKGA7_js = require('./chunk-RNZJKGA7.js');
4
+ var chunkUTTXH3GH_js = require('./chunk-UTTXH3GH.js');
5
+ var chunkYIFO3WQO_js = require('./chunk-YIFO3WQO.js');
6
6
  var chunkCLNGAVNH_js = require('./chunk-CLNGAVNH.js');
7
7
  var react = require('react');
8
8
  var JSZip = require('jszip');
@@ -15,7 +15,7 @@ var JSZip__default = /*#__PURE__*/_interopDefault(JSZip);
15
15
  function useVirtualizedSlides({
16
16
  totalItems,
17
17
  itemHeight,
18
- overscan = chunk46Z6MNRS_js.DEFAULT_VIRTUAL_OVERSCAN
18
+ overscan = chunkUTTXH3GH_js.DEFAULT_VIRTUAL_OVERSCAN
19
19
  }) {
20
20
  const scrollContainerRef = react.useRef(null);
21
21
  const [scrollTop, setScrollTop] = react.useState(0);
@@ -45,7 +45,7 @@ function useVirtualizedSlides({
45
45
  resizeObserver?.disconnect();
46
46
  };
47
47
  }, []);
48
- const range = chunk46Z6MNRS_js.computeVirtualRange(totalItems, itemHeight, scrollTop, viewportHeight, overscan);
48
+ const range = chunkUTTXH3GH_js.computeVirtualRange(totalItems, itemHeight, scrollTop, viewportHeight, overscan);
49
49
  const safeItemHeight = Math.max(itemHeight, 1);
50
50
  const scrollToIndex = react.useCallback(
51
51
  (index, behavior = "smooth") => {
@@ -108,7 +108,7 @@ function usePresenceTracking({
108
108
  awareness.setLocalStateField("presence", state);
109
109
  lastBroadcastRef.current = Date.now();
110
110
  };
111
- if (elapsed >= chunk46Z6MNRS_js.BROADCAST_THROTTLE_MS) {
111
+ if (elapsed >= chunkUTTXH3GH_js.BROADCAST_THROTTLE_MS) {
112
112
  if (pendingBroadcastRef.current) {
113
113
  clearTimeout(pendingBroadcastRef.current);
114
114
  pendingBroadcastRef.current = null;
@@ -118,7 +118,7 @@ function usePresenceTracking({
118
118
  pendingBroadcastRef.current = setTimeout(() => {
119
119
  pendingBroadcastRef.current = null;
120
120
  flush();
121
- }, chunk46Z6MNRS_js.BROADCAST_THROTTLE_MS - elapsed);
121
+ }, chunkUTTXH3GH_js.BROADCAST_THROTTLE_MS - elapsed);
122
122
  }
123
123
  },
124
124
  [awareness, userName, userColor, userAvatar, role]
@@ -143,7 +143,7 @@ function usePresenceTracking({
143
143
  return;
144
144
  }
145
145
  const handleChange = () => {
146
- const users = chunk46Z6MNRS_js.derivePresenceList(
146
+ const users = chunkUTTXH3GH_js.derivePresenceList(
147
147
  awareness.getStates(),
148
148
  localClientId,
149
149
  canvasWidth,
@@ -195,7 +195,7 @@ function useYjsProvider({ config }) {
195
195
  const departureRef = react.useRef(null);
196
196
  const gateRef = react.useRef(null);
197
197
  if (!gateRef.current) {
198
- gateRef.current = chunk46Z6MNRS_js.createSyncGate(() => setSynced(true));
198
+ gateRef.current = chunkUTTXH3GH_js.createSyncGate(() => setSynced(true));
199
199
  }
200
200
  const teardown = react.useCallback(() => {
201
201
  if (timeoutRef.current) {
@@ -215,7 +215,7 @@ function useYjsProvider({ config }) {
215
215
  const buildCleanup = react.useCallback(
216
216
  (provider, yDoc) => () => {
217
217
  announceDeparture();
218
- chunk46Z6MNRS_js.clearLocalAwareness(provider.awareness);
218
+ chunkUTTXH3GH_js.clearLocalAwareness(provider.awareness);
219
219
  provider.destroy();
220
220
  yDoc.destroy();
221
221
  setDoc(null);
@@ -240,9 +240,9 @@ function useYjsProvider({ config }) {
240
240
  if (config.authToken) {
241
241
  opts.password = config.authToken;
242
242
  }
243
- const roomId = chunk46Z6MNRS_js.validateRoomId(config.roomId);
243
+ const roomId = chunkUTTXH3GH_js.validateRoomId(config.roomId);
244
244
  const provider = new WebrtcProvider(roomId, yDoc, opts);
245
- departureRef.current = chunk46Z6MNRS_js.createDepartureChannel(roomId, provider.awareness);
245
+ departureRef.current = chunkUTTXH3GH_js.createDepartureChannel(roomId, provider.awareness);
246
246
  setDoc(yDoc);
247
247
  setAwareness(provider.awareness);
248
248
  setClientId(provider.awareness.clientID);
@@ -284,13 +284,13 @@ function useYjsProvider({ config }) {
284
284
  if (!config) {
285
285
  return;
286
286
  }
287
- const roomId = chunk46Z6MNRS_js.validateRoomId(config.roomId);
288
- const transport = config.transport ?? chunk46Z6MNRS_js.resolveTransportForServerUrl(config.serverUrl);
287
+ const roomId = chunkUTTXH3GH_js.validateRoomId(config.roomId);
288
+ const transport = config.transport ?? chunkUTTXH3GH_js.resolveTransportForServerUrl(config.serverUrl);
289
289
  if (transport === "webrtc") {
290
290
  await initWebrtc();
291
291
  return;
292
292
  }
293
- if (chunk46Z6MNRS_js.isMixedContentBlocked(config.serverUrl)) {
293
+ if (chunkUTTXH3GH_js.isMixedContentBlocked(config.serverUrl)) {
294
294
  console.warn(
295
295
  `[pptx-viewer] Refusing to connect: insecure ws:// server "${config.serverUrl}" is blocked from a secure (https) page. Use a wss:// URL.`
296
296
  );
@@ -304,7 +304,7 @@ function useYjsProvider({ config }) {
304
304
  const provider = new WebsocketProvider(config.serverUrl, roomId, yDoc, {
305
305
  params: config.authToken ? { token: config.authToken } : void 0
306
306
  });
307
- departureRef.current = chunk46Z6MNRS_js.createDepartureChannel(roomId, provider.awareness);
307
+ departureRef.current = chunkUTTXH3GH_js.createDepartureChannel(roomId, provider.awareness);
308
308
  let connected = false;
309
309
  const handleStatus = (event) => {
310
310
  if (event.status === "connected") {
@@ -344,7 +344,7 @@ function useYjsProvider({ config }) {
344
344
  provider.off("status", handleStatus);
345
345
  provider.off("sync", handleSynced);
346
346
  announceDeparture();
347
- chunk46Z6MNRS_js.clearLocalAwareness(provider.awareness);
347
+ chunkUTTXH3GH_js.clearLocalAwareness(provider.awareness);
348
348
  provider.destroy();
349
349
  yDoc.destroy();
350
350
  setDoc(null);
@@ -353,7 +353,7 @@ function useYjsProvider({ config }) {
353
353
  cleanupRef.current = null;
354
354
  setStatus("error");
355
355
  }
356
- }, chunk46Z6MNRS_js.CONNECTION_TIMEOUT_MS);
356
+ }, chunkUTTXH3GH_js.CONNECTION_TIMEOUT_MS);
357
357
  }
358
358
  setDoc(yDoc);
359
359
  setAwareness(provider.awareness);
@@ -362,7 +362,7 @@ function useYjsProvider({ config }) {
362
362
  provider.off("status", handleStatus);
363
363
  provider.off("sync", handleSynced);
364
364
  announceDeparture();
365
- chunk46Z6MNRS_js.clearLocalAwareness(provider.awareness);
365
+ chunkUTTXH3GH_js.clearLocalAwareness(provider.awareness);
366
366
  provider.destroy();
367
367
  yDoc.destroy();
368
368
  setDoc(null);
@@ -388,7 +388,7 @@ function useYjsProvider({ config }) {
388
388
  ]);
389
389
  react.useEffect(() => {
390
390
  init();
391
- const disposeTeardown = chunk46Z6MNRS_js.registerCollaborationTeardown({
391
+ const disposeTeardown = chunkUTTXH3GH_js.registerCollaborationTeardown({
392
392
  leave: teardown,
393
393
  rejoin: init
394
394
  });
@@ -409,7 +409,7 @@ function useCollaborativeState({
409
409
  canvasWidth,
410
410
  canvasHeight
411
411
  }) {
412
- const userColor = chunk46Z6MNRS_js.sanitizeColor(config?.userColor, "#6366f1");
412
+ const userColor = chunkUTTXH3GH_js.sanitizeColor(config?.userColor, "#6366f1");
413
413
  const { status, awareness, doc, clientId, synced, retry } = useYjsProvider({ config });
414
414
  const { remoteUsers, broadcastPresence } = usePresenceTracking({
415
415
  awareness,
@@ -518,8 +518,8 @@ function useEditorHistory(input) {
518
518
  width: canvasSize.width,
519
519
  height: canvasSize.height,
520
520
  activeSlideIndex,
521
- slides: slides.map(chunk46Z6MNRS_js.cloneSlide),
522
- templateElementsBySlideId: chunk46Z6MNRS_js.cloneTemplateElementsBySlideId(templateElementsBySlideId),
521
+ slides: slides.map(chunkUTTXH3GH_js.cloneSlide),
522
+ templateElementsBySlideId: chunkUTTXH3GH_js.cloneTemplateElementsBySlideId(templateElementsBySlideId),
523
523
  ...actionLabel ? { actionLabel } : {}
524
524
  };
525
525
  },
@@ -532,9 +532,9 @@ function useEditorHistory(input) {
532
532
  width: snapshot.width,
533
533
  height: snapshot.height
534
534
  });
535
- setSlides(snapshot.slides.map(chunk46Z6MNRS_js.cloneSlide));
535
+ setSlides(snapshot.slides.map(chunkUTTXH3GH_js.cloneSlide));
536
536
  setTemplateElementsBySlideId(
537
- chunk46Z6MNRS_js.cloneTemplateElementsBySlideId(snapshot.templateElementsBySlideId)
537
+ chunkUTTXH3GH_js.cloneTemplateElementsBySlideId(snapshot.templateElementsBySlideId)
538
538
  );
539
539
  setActiveSlideIndex(Math.min(snapshot.activeSlideIndex, maxSlideIndex));
540
540
  setSelectedElementIds([]);
@@ -568,8 +568,8 @@ function useEditorHistory(input) {
568
568
  const currentSnapshot = buildHistorySnapshot();
569
569
  historyFutureRef.current.push(currentSnapshot);
570
570
  isApplyingHistoryRef.current = true;
571
- const nextSnapshot = chunkLDF77JJD_js.cloneHistorySnapshot(previousSnapshot);
572
- lastHistorySnapshotRef.current = chunkLDF77JJD_js.cloneHistorySnapshot(nextSnapshot);
571
+ const nextSnapshot = chunkRNZJKGA7_js.cloneHistorySnapshot(previousSnapshot);
572
+ lastHistorySnapshotRef.current = chunkRNZJKGA7_js.cloneHistorySnapshot(nextSnapshot);
573
573
  lastHistorySerializedRef.current = JSON.stringify(nextSnapshot);
574
574
  applyHistorySnapshot(nextSnapshot);
575
575
  updateHistoryAvailability();
@@ -590,8 +590,8 @@ function useEditorHistory(input) {
590
590
  const currentSnapshot = buildHistorySnapshot();
591
591
  historyPastRef.current.push(currentSnapshot);
592
592
  isApplyingHistoryRef.current = true;
593
- const targetSnapshot = chunkLDF77JJD_js.cloneHistorySnapshot(nextSnapshot);
594
- lastHistorySnapshotRef.current = chunkLDF77JJD_js.cloneHistorySnapshot(targetSnapshot);
593
+ const targetSnapshot = chunkRNZJKGA7_js.cloneHistorySnapshot(nextSnapshot);
594
+ lastHistorySnapshotRef.current = chunkRNZJKGA7_js.cloneHistorySnapshot(targetSnapshot);
595
595
  lastHistorySerializedRef.current = JSON.stringify(targetSnapshot);
596
596
  applyHistorySnapshot(targetSnapshot);
597
597
  updateHistoryAvailability();
@@ -609,7 +609,7 @@ function useEditorHistory(input) {
609
609
  historyPastRef.current = [];
610
610
  historyFutureRef.current = [];
611
611
  if (initialSnapshot) {
612
- const clonedInitial = chunkLDF77JJD_js.cloneHistorySnapshot(initialSnapshot);
612
+ const clonedInitial = chunkRNZJKGA7_js.cloneHistorySnapshot(initialSnapshot);
613
613
  lastHistorySnapshotRef.current = clonedInitial;
614
614
  lastHistorySerializedRef.current = JSON.stringify(clonedInitial);
615
615
  } else {
@@ -650,18 +650,18 @@ function useEditorHistory(input) {
650
650
  }
651
651
  const previousSnapshot = lastHistorySnapshotRef.current;
652
652
  if (!previousSnapshot) {
653
- lastHistorySnapshotRef.current = chunkLDF77JJD_js.cloneHistorySnapshot(snapshot);
653
+ lastHistorySnapshotRef.current = chunkRNZJKGA7_js.cloneHistorySnapshot(snapshot);
654
654
  lastHistorySerializedRef.current = serialized;
655
655
  lastCheapHashRef.current = cheapHash;
656
656
  updateHistoryAvailability();
657
657
  return;
658
658
  }
659
- historyPastRef.current.push(chunkLDF77JJD_js.cloneHistorySnapshot(previousSnapshot));
659
+ historyPastRef.current.push(chunkRNZJKGA7_js.cloneHistorySnapshot(previousSnapshot));
660
660
  while (historyPastRef.current.length > Math.max(1, maxHistoryEntries)) {
661
661
  historyPastRef.current.shift();
662
662
  }
663
663
  historyFutureRef.current = [];
664
- lastHistorySnapshotRef.current = chunkLDF77JJD_js.cloneHistorySnapshot(snapshot);
664
+ lastHistorySnapshotRef.current = chunkRNZJKGA7_js.cloneHistorySnapshot(snapshot);
665
665
  lastHistorySerializedRef.current = serialized;
666
666
  lastCheapHashRef.current = cheapHash;
667
667
  updateHistoryAvailability();
@@ -750,7 +750,7 @@ function useZoomViewport({
750
750
  if (!wrapper || !canvasViewport) {
751
751
  return;
752
752
  }
753
- const boundedScale = Math.min(Math.max(nextScale, chunkLDF77JJD_js.MIN_ZOOM_SCALE), chunkLDF77JJD_js.MAX_ZOOM_SCALE);
753
+ const boundedScale = Math.min(Math.max(nextScale, chunkRNZJKGA7_js.MIN_ZOOM_SCALE), chunkRNZJKGA7_js.MAX_ZOOM_SCALE);
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) => Math.min(currentScale + 0.1, chunkLDF77JJD_js.MAX_ZOOM_SCALE));
768
+ setScale((currentScale) => Math.min(currentScale + 0.1, chunkRNZJKGA7_js.MAX_ZOOM_SCALE));
769
769
  }, []);
770
770
  const handleZoomOut = react.useCallback(() => {
771
- setScale((currentScale) => Math.max(currentScale - 0.1, chunkLDF77JJD_js.MIN_ZOOM_SCALE));
771
+ setScale((currentScale) => Math.max(currentScale - 0.1, chunkRNZJKGA7_js.MIN_ZOOM_SCALE));
772
772
  }, []);
773
773
  const handleResetZoom = react.useCallback(() => {
774
774
  setScale(1);
@@ -787,22 +787,22 @@ 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, chunkLDF77JJD_js.MIN_ELEMENT_SIZE));
791
- maxY = Math.max(maxY, element.y + Math.max(element.height, chunkLDF77JJD_js.MIN_ELEMENT_SIZE));
790
+ maxX = Math.max(maxX, element.x + Math.max(element.width, chunkRNZJKGA7_js.MIN_ELEMENT_SIZE));
791
+ maxY = Math.max(maxY, element.y + Math.max(element.height, chunkRNZJKGA7_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, chunkLDF77JJD_js.MIN_ELEMENT_SIZE);
798
- const boundsHeight = Math.max(selectionBounds.maxY - selectionBounds.minY, chunkLDF77JJD_js.MIN_ELEMENT_SIZE);
797
+ const boundsWidth = Math.max(selectionBounds.maxX - selectionBounds.minX, chunkRNZJKGA7_js.MIN_ELEMENT_SIZE);
798
+ const boundsHeight = Math.max(selectionBounds.maxY - selectionBounds.minY, chunkRNZJKGA7_js.MIN_ELEMENT_SIZE);
799
799
  const availableWidth = Math.max(
800
- effectiveEditorDimensions.width - chunkLDF77JJD_js.ZOOM_TO_SELECTION_PADDING,
801
- chunkLDF77JJD_js.MIN_ELEMENT_SIZE
800
+ effectiveEditorDimensions.width - chunkRNZJKGA7_js.ZOOM_TO_SELECTION_PADDING,
801
+ chunkRNZJKGA7_js.MIN_ELEMENT_SIZE
802
802
  );
803
803
  const availableHeight = Math.max(
804
- effectiveEditorDimensions.height - chunkLDF77JJD_js.ZOOM_TO_SELECTION_PADDING,
805
- chunkLDF77JJD_js.MIN_ELEMENT_SIZE
804
+ effectiveEditorDimensions.height - chunkRNZJKGA7_js.ZOOM_TO_SELECTION_PADDING,
805
+ chunkRNZJKGA7_js.MIN_ELEMENT_SIZE
806
806
  );
807
807
  const targetEditorScale = Math.min(
808
808
  availableWidth / boundsWidth,
@@ -810,8 +810,8 @@ function useZoomViewport({
810
810
  );
811
811
  const safeFitScale = fitScale > Number.EPSILON ? fitScale : Number.EPSILON;
812
812
  const nextScale = Math.min(
813
- Math.max(targetEditorScale / safeFitScale, chunkLDF77JJD_js.MIN_ZOOM_SCALE),
814
- chunkLDF77JJD_js.MAX_ZOOM_SCALE
813
+ Math.max(targetEditorScale / safeFitScale, chunkRNZJKGA7_js.MIN_ZOOM_SCALE),
814
+ chunkRNZJKGA7_js.MAX_ZOOM_SCALE
815
815
  );
816
816
  setScale(nextScale);
817
817
  window.requestAnimationFrame(() => {
@@ -833,7 +833,7 @@ function useZoomViewport({
833
833
  event.preventDefault();
834
834
  const delta = event.deltaY * -1e-3;
835
835
  setScale(
836
- (currentScale) => Math.min(Math.max(currentScale + delta, chunkLDF77JJD_js.MIN_ZOOM_SCALE), chunkLDF77JJD_js.MAX_ZOOM_SCALE)
836
+ (currentScale) => Math.min(Math.max(currentScale + delta, chunkRNZJKGA7_js.MIN_ZOOM_SCALE), chunkRNZJKGA7_js.MAX_ZOOM_SCALE)
837
837
  );
838
838
  }, []);
839
839
  react.useEffect(() => {
@@ -911,7 +911,7 @@ function applyAnimationGroupSteps(group, onPlayActionSound, setPresentationEleme
911
911
  const command = step.command;
912
912
  const timer = window.setTimeout(
913
913
  () => {
914
- chunkLDF77JJD_js.executeMediaCommand(command);
914
+ chunkRNZJKGA7_js.executeMediaCommand(command);
915
915
  },
916
916
  Math.max(0, step.delayMs)
917
917
  );
@@ -1026,7 +1026,7 @@ function useAnimationPlayback(input) {
1026
1026
  (controller, group) => {
1027
1027
  driveBuildReveal(
1028
1028
  controller,
1029
- chunk46Z6MNRS_js.PresentationAnimationController.collectBuildStepIds(group),
1029
+ chunkUTTXH3GH_js.PresentationAnimationController.collectBuildStepIds(group),
1030
1030
  setPresentationElementStates,
1031
1031
  buildRafRef
1032
1032
  );
@@ -1089,7 +1089,7 @@ function useAnimationPlayback(input) {
1089
1089
  setHoverTriggerShapeIds(/* @__PURE__ */ new Set());
1090
1090
  return;
1091
1091
  }
1092
- const controller = chunk46Z6MNRS_js.PresentationAnimationController.fromSlide(slide);
1092
+ const controller = chunkUTTXH3GH_js.PresentationAnimationController.fromSlide(slide);
1093
1093
  controllerRef.current = controller;
1094
1094
  setPresentationKeyframesCss(controller.keyframesCss);
1095
1095
  setInteractiveTriggerShapeIds(controller.interactiveTriggerShapeIds);
@@ -1226,7 +1226,7 @@ function useAnimationPlayback(input) {
1226
1226
  }))
1227
1227
  );
1228
1228
  entranceAnimations.forEach((animation, animationIndex) => {
1229
- const delay = chunk46Z6MNRS_js.computeEntranceAnimationDelay(animation.delayMs, animationIndex);
1229
+ const delay = chunkUTTXH3GH_js.computeEntranceAnimationDelay(animation.delayMs, animationIndex);
1230
1230
  const timer = window.setTimeout(() => {
1231
1231
  setPresentationAnimations(
1232
1232
  (previousAnimations) => previousAnimations.map(
@@ -1262,12 +1262,12 @@ function useAnimationPlayback(input) {
1262
1262
  presentationTimersRef
1263
1263
  };
1264
1264
  }
1265
- var PRESENTER_CHANNEL_NAME = chunk46Z6MNRS_js.PRESENTATION_CHANNEL_NAME;
1266
- var AUDIENCE_HASH = chunk46Z6MNRS_js.PRESENTATION_HASH;
1267
- var PRESENTER_MSG_ORIGIN = chunk46Z6MNRS_js.PRESENTATION_MESSAGE_ORIGIN;
1268
- var AUDIENCE_NONCE_KEY = chunk46Z6MNRS_js.PRESENTATION_NONCE_KEY;
1265
+ var PRESENTER_CHANNEL_NAME = chunkUTTXH3GH_js.PRESENTATION_CHANNEL_NAME;
1266
+ var AUDIENCE_HASH = chunkUTTXH3GH_js.PRESENTATION_HASH;
1267
+ var PRESENTER_MSG_ORIGIN = chunkUTTXH3GH_js.PRESENTATION_MESSAGE_ORIGIN;
1268
+ var AUDIENCE_NONCE_KEY = chunkUTTXH3GH_js.PRESENTATION_NONCE_KEY;
1269
1269
  function generateSessionId() {
1270
- return chunk46Z6MNRS_js.createPresentationSessionId();
1270
+ return chunkUTTXH3GH_js.createPresentationSessionId();
1271
1271
  }
1272
1272
  function parseAudienceNonce() {
1273
1273
  const hash = window.location.hash;
@@ -1303,7 +1303,7 @@ function usePresenterWindow(input) {
1303
1303
  }, []);
1304
1304
  const swapDisplays = react.useCallback(async () => {
1305
1305
  const audience = audienceWindowRef.current;
1306
- return audience && !audience.closed ? chunk46Z6MNRS_js.swapPresentationWindows(window, audience) : false;
1306
+ return audience && !audience.closed ? chunkUTTXH3GH_js.swapPresentationWindows(window, audience) : false;
1307
1307
  }, []);
1308
1308
  const syncSlideToAudience = react.useCallback(
1309
1309
  (slideIndex) => {
@@ -1367,7 +1367,7 @@ function usePresenterWindow(input) {
1367
1367
  pollTimerRef.current = null;
1368
1368
  }
1369
1369
  if (closingSessionId) {
1370
- void chunk46Z6MNRS_js.clearAudienceContent(closingSessionId);
1370
+ void chunkUTTXH3GH_js.clearAudienceContent(closingSessionId);
1371
1371
  }
1372
1372
  }, [getChannel]);
1373
1373
  const openAudienceWindow = react.useCallback(() => {
@@ -1385,10 +1385,10 @@ function usePresenterWindow(input) {
1385
1385
  audienceWindowRef.current = blankWin;
1386
1386
  const sessionId = generateSessionId();
1387
1387
  sessionIdRef.current = sessionId;
1388
- const audienceUrl = chunk46Z6MNRS_js.buildPresentationAudienceUrl(window.location.href, sessionId);
1389
- void chunk46Z6MNRS_js.resolveAudienceScreenPlacement(window).then((placement) => {
1388
+ const audienceUrl = chunkUTTXH3GH_js.buildPresentationAudienceUrl(window.location.href, sessionId);
1389
+ void chunkUTTXH3GH_js.resolveAudienceScreenPlacement(window).then((placement) => {
1390
1390
  if (placement && audienceWindowRef.current === blankWin && !blankWin.closed) {
1391
- chunk46Z6MNRS_js.placeAudienceWindow(blankWin, placement);
1391
+ chunkUTTXH3GH_js.placeAudienceWindow(blankWin, placement);
1392
1392
  }
1393
1393
  return void 0;
1394
1394
  });
@@ -1418,7 +1418,7 @@ function usePresenterWindow(input) {
1418
1418
  }
1419
1419
  };
1420
1420
  if (content) {
1421
- void chunk46Z6MNRS_js.storeAudienceContent(content, sessionId).then(() => navigateOrClose(true)).catch(() => navigateOrClose(false));
1421
+ void chunkUTTXH3GH_js.storeAudienceContent(content, sessionId).then(() => navigateOrClose(true)).catch(() => navigateOrClose(false));
1422
1422
  } else {
1423
1423
  navigateOrClose(true);
1424
1424
  }
@@ -1444,7 +1444,7 @@ function usePresenterWindow(input) {
1444
1444
  }
1445
1445
  const handleMessage = (event) => {
1446
1446
  const message = event.data;
1447
- if (chunk46Z6MNRS_js.isPresentationSessionMessage(message) && message.type === "audience-ready" && message.sessionId === sessionIdRef.current) {
1447
+ if (chunkUTTXH3GH_js.isPresentationSessionMessage(message) && message.type === "audience-ready" && message.sessionId === sessionIdRef.current) {
1448
1448
  syncStateToAudience(snapshotRef.current);
1449
1449
  }
1450
1450
  };
@@ -1473,7 +1473,7 @@ function usePresenterWindow(input) {
1473
1473
  react.useEffect(() => {
1474
1474
  const handleBeforeUnload = () => {
1475
1475
  if (sessionIdRef.current) {
1476
- void chunk46Z6MNRS_js.clearAudienceContent(sessionIdRef.current);
1476
+ void chunkUTTXH3GH_js.clearAudienceContent(sessionIdRef.current);
1477
1477
  }
1478
1478
  };
1479
1479
  window.addEventListener("beforeunload", handleBeforeUnload);
@@ -1526,7 +1526,7 @@ function useAudienceMode(input) {
1526
1526
  }
1527
1527
  channel.onmessage = (event) => {
1528
1528
  const data = event.data;
1529
- if (!chunk46Z6MNRS_js.isPresentationSessionMessage(data) || data.origin !== PRESENTER_MSG_ORIGIN) {
1529
+ if (!chunkUTTXH3GH_js.isPresentationSessionMessage(data) || data.origin !== PRESENTER_MSG_ORIGIN) {
1530
1530
  return;
1531
1531
  }
1532
1532
  if (expectedSessionId && data.sessionId !== expectedSessionId) {
@@ -1541,7 +1541,7 @@ function useAudienceMode(input) {
1541
1541
  }
1542
1542
  if (data.type === "presenter-exit") {
1543
1543
  if (expectedSessionId) {
1544
- void chunk46Z6MNRS_js.clearAudienceContent(expectedSessionId);
1544
+ void chunkUTTXH3GH_js.clearAudienceContent(expectedSessionId);
1545
1545
  }
1546
1546
  onSetMode("edit");
1547
1547
  try {
@@ -1552,7 +1552,7 @@ function useAudienceMode(input) {
1552
1552
  };
1553
1553
  if (expectedSessionId) {
1554
1554
  channel.postMessage({
1555
- origin: chunk46Z6MNRS_js.PRESENTATION_MESSAGE_ORIGIN,
1555
+ origin: chunkUTTXH3GH_js.PRESENTATION_MESSAGE_ORIGIN,
1556
1556
  type: "audience-ready",
1557
1557
  sessionId: expectedSessionId
1558
1558
  });
@@ -1565,53 +1565,18 @@ function useAudienceMode(input) {
1565
1565
  };
1566
1566
  }, [onSetMode, onSetActiveSlideIndex, onSnapshot]);
1567
1567
  }
1568
-
1569
- // src/viewer/hooks/presentation-mode/keyboard-helpers.ts
1570
- function mapKeyToPresentationAction(key, ctrlKey) {
1571
- if (key === "Escape") {
1572
- return { action: "exit" };
1573
- }
1574
- if (key === "ArrowRight" || key === "PageDown" || key === " ") {
1575
- return { action: "next" };
1576
- }
1577
- if (key === "ArrowLeft" || key === "PageUp") {
1578
- return { action: "prev" };
1579
- }
1580
- if (key === "l" || key === "L") {
1581
- return { action: "toggleLaser" };
1582
- }
1583
- if (key === "p" || key === "P") {
1584
- return { action: "togglePen" };
1585
- }
1586
- if (key === "e" || key === "E") {
1587
- return { action: "toggleEraser" };
1588
- }
1589
- if (key === "b" || key === "B") {
1590
- return { action: "toggleBlackScreen" };
1591
- }
1592
- if (key === "w" || key === "W") {
1593
- return { action: "toggleWhiteScreen" };
1594
- }
1595
- if (key === "m" && ctrlKey) {
1596
- return { action: "toggleToolbar" };
1597
- }
1598
- if (key === "n" || key === "N") {
1599
- return { action: "togglePresenterView" };
1600
- }
1601
- return { action: "none" };
1602
- }
1603
-
1604
- // src/viewer/hooks/presentation-mode/usePresentationKeyboard.ts
1605
1568
  function usePresentationKeyboard(input) {
1606
1569
  const {
1607
1570
  mode,
1608
1571
  movePresentationSlide,
1572
+ navigateToSlide,
1573
+ slideCount,
1609
1574
  onSetMode,
1610
- onToggleLaser,
1611
- onTogglePen,
1612
- onToggleEraser,
1575
+ onSetPointerTool,
1576
+ onEraseAnnotations,
1577
+ onToggleInkMarkup,
1613
1578
  onToggleToolbar,
1614
- onTogglePresenterView,
1579
+ onShowAllSlides,
1615
1580
  onToggleBlackScreen,
1616
1581
  onToggleWhiteScreen,
1617
1582
  rehearsing,
@@ -1619,18 +1584,20 @@ function usePresentationKeyboard(input) {
1619
1584
  presentationSlideIndex,
1620
1585
  setShowRehearsalSummary
1621
1586
  } = input;
1587
+ const keyBufferRef = react.useRef(chunkUTTXH3GH_js.createPresentationKeyBuffer());
1622
1588
  react.useEffect(() => {
1623
1589
  if (mode !== "present") {
1590
+ keyBufferRef.current = chunkUTTXH3GH_js.createPresentationKeyBuffer();
1624
1591
  return;
1625
1592
  }
1626
1593
  const handleKeyDown = (event) => {
1627
- const mapped = mapKeyToPresentationAction(event.key, event.ctrlKey);
1594
+ const mapped = chunkUTTXH3GH_js.mapPresentationKey(event, keyBufferRef.current);
1628
1595
  if (mapped.action === "none") {
1629
1596
  return;
1630
1597
  }
1631
1598
  event.preventDefault();
1632
1599
  switch (mapped.action) {
1633
- case "exit":
1600
+ case "end":
1634
1601
  if (rehearsing) {
1635
1602
  recordCurrentSlideTime(presentationSlideIndex);
1636
1603
  setShowRehearsalSummary(true);
@@ -1640,27 +1607,40 @@ function usePresentationKeyboard(input) {
1640
1607
  case "next":
1641
1608
  movePresentationSlide(1);
1642
1609
  return;
1643
- case "prev":
1610
+ case "previous":
1644
1611
  movePresentationSlide(-1);
1645
1612
  return;
1646
- case "toggleLaser":
1647
- onToggleLaser?.();
1613
+ case "first":
1614
+ navigateToSlide(0);
1615
+ return;
1616
+ case "last":
1617
+ navigateToSlide(Math.max(0, slideCount - 1));
1648
1618
  return;
1649
- case "togglePen":
1650
- onTogglePen?.();
1619
+ case "goto": {
1620
+ const index = mapped.slideNumber - 1;
1621
+ if (index >= 0 && index < slideCount) {
1622
+ navigateToSlide(index);
1623
+ }
1651
1624
  return;
1652
- case "toggleEraser":
1653
- onToggleEraser?.();
1625
+ }
1626
+ case "pointerTool":
1627
+ onSetPointerTool?.(mapped.tool);
1654
1628
  return;
1655
- case "toggleToolbar":
1629
+ case "eraseAnnotations":
1630
+ onEraseAnnotations?.();
1631
+ return;
1632
+ case "toggleInkMarkup":
1633
+ onToggleInkMarkup?.();
1634
+ return;
1635
+ case "toggleChrome":
1656
1636
  onToggleToolbar?.();
1657
1637
  return;
1658
- case "togglePresenterView":
1659
- onTogglePresenterView?.();
1660
- break;
1638
+ case "showAllSlides":
1639
+ onShowAllSlides?.();
1640
+ return;
1661
1641
  case "toggleBlackScreen":
1662
1642
  onToggleBlackScreen?.();
1663
- break;
1643
+ return;
1664
1644
  case "toggleWhiteScreen":
1665
1645
  onToggleWhiteScreen?.();
1666
1646
  break;
@@ -1673,12 +1653,14 @@ function usePresentationKeyboard(input) {
1673
1653
  }, [
1674
1654
  mode,
1675
1655
  movePresentationSlide,
1656
+ navigateToSlide,
1657
+ slideCount,
1676
1658
  onSetMode,
1677
- onToggleLaser,
1678
- onTogglePen,
1679
- onToggleEraser,
1659
+ onSetPointerTool,
1660
+ onEraseAnnotations,
1661
+ onToggleInkMarkup,
1680
1662
  onToggleToolbar,
1681
- onTogglePresenterView,
1663
+ onShowAllSlides,
1682
1664
  onToggleBlackScreen,
1683
1665
  onToggleWhiteScreen,
1684
1666
  rehearsing,
@@ -1817,7 +1799,7 @@ function handlePresentationActionImpl(action, deps) {
1817
1799
  return;
1818
1800
  }
1819
1801
  if (action.url && !actionStr.includes("hlinksldjump")) {
1820
- if (chunk46Z6MNRS_js.isUrlSafe(action.url)) {
1802
+ if (chunkUTTXH3GH_js.isUrlSafe(action.url)) {
1821
1803
  window.open(action.url, "_blank", "noopener,noreferrer");
1822
1804
  }
1823
1805
  }
@@ -1827,7 +1809,7 @@ function handlePresentationActionImpl(action, deps) {
1827
1809
  function executeSlideTransition(nextSlideIndex, deps) {
1828
1810
  const incomingSlide = deps.slides[nextSlideIndex];
1829
1811
  const transition = incomingSlide?.transition;
1830
- const durationMs = deps.playTransition ? chunk46Z6MNRS_js.resolveTransitionDurationMs(transition) : 0;
1812
+ const durationMs = deps.playTransition ? chunkUTTXH3GH_js.resolveTransitionDurationMs(transition) : 0;
1831
1813
  deps.clearPresentationTimers();
1832
1814
  deps.setPresentationSlideIndex(nextSlideIndex);
1833
1815
  deps.onSetActiveSlideIndex(nextSlideIndex);
@@ -2073,17 +2055,17 @@ function useZoomNavigation(input) {
2073
2055
  };
2074
2056
  }
2075
2057
  function usePresenterConsole(slideIndex) {
2076
- const timerRef = react.useRef(chunk46Z6MNRS_js.createPresenterTimer());
2077
- const [snapshot, setSnapshot] = react.useState(() => chunk46Z6MNRS_js.createInitialPresentationSnapshot(slideIndex));
2058
+ const timerRef = react.useRef(chunkUTTXH3GH_js.createPresenterTimer());
2059
+ const [snapshot, setSnapshot] = react.useState(() => chunkUTTXH3GH_js.createInitialPresentationSnapshot(slideIndex));
2078
2060
  const patch = react.useCallback((value) => {
2079
- setSnapshot((current) => chunk46Z6MNRS_js.mergePresentationSnapshot(current, value));
2061
+ setSnapshot((current) => chunkUTTXH3GH_js.mergePresentationSnapshot(current, value));
2080
2062
  }, []);
2081
2063
  react.useEffect(() => patch({ slideIndex }), [patch, slideIndex]);
2082
2064
  react.useEffect(() => {
2083
2065
  const timer = window.setInterval(() => {
2084
2066
  patch({
2085
2067
  paused: timerRef.current.paused,
2086
- elapsedMs: chunk46Z6MNRS_js.presenterElapsed(timerRef.current)
2068
+ elapsedMs: chunkUTTXH3GH_js.presenterElapsed(timerRef.current)
2087
2069
  });
2088
2070
  }, 1e3);
2089
2071
  return () => window.clearInterval(timer);
@@ -2093,19 +2075,19 @@ function usePresenterConsole(slideIndex) {
2093
2075
  applyAudienceSnapshot: setSnapshot,
2094
2076
  setBlackout: (blackout) => patch({ blackout }),
2095
2077
  toggleTimer: () => {
2096
- timerRef.current = chunk46Z6MNRS_js.togglePresenterTimer(timerRef.current);
2078
+ timerRef.current = chunkUTTXH3GH_js.togglePresenterTimer(timerRef.current);
2097
2079
  patch({
2098
2080
  paused: timerRef.current.paused,
2099
- elapsedMs: chunk46Z6MNRS_js.presenterElapsed(timerRef.current)
2081
+ elapsedMs: chunkUTTXH3GH_js.presenterElapsed(timerRef.current)
2100
2082
  });
2101
2083
  },
2102
2084
  resetTimer: () => {
2103
- timerRef.current = chunk46Z6MNRS_js.resetPresenterTimer();
2085
+ timerRef.current = chunkUTTXH3GH_js.resetPresenterTimer();
2104
2086
  patch({ paused: false, elapsedMs: 0 });
2105
2087
  },
2106
2088
  stepZoom: (direction) => setSnapshot(
2107
- (current) => chunk46Z6MNRS_js.mergePresentationSnapshot(current, {
2108
- zoom: chunk46Z6MNRS_js.stepPresenterZoom(
2089
+ (current) => chunkUTTXH3GH_js.mergePresentationSnapshot(current, {
2090
+ zoom: chunkUTTXH3GH_js.stepPresenterZoom(
2109
2091
  current.zoom ?? { scale: 1, originX: 0.5, originY: 0.5 },
2110
2092
  direction
2111
2093
  )
@@ -2130,9 +2112,9 @@ function usePresentationMode(input) {
2130
2112
  onSetMode,
2131
2113
  onSetActiveSlideIndex,
2132
2114
  onPlayActionSound,
2133
- onToggleLaser,
2134
- onTogglePen,
2135
- onToggleEraser,
2115
+ onSetPointerTool,
2116
+ onEraseAnnotations,
2117
+ onToggleInkMarkup,
2136
2118
  onToggleToolbar,
2137
2119
  onSaveRehearsalTimings,
2138
2120
  loopContinuously,
@@ -2147,6 +2129,7 @@ function usePresentationMode(input) {
2147
2129
  setTransitionOverlay(null);
2148
2130
  }, []);
2149
2131
  const [presenterMode, setPresenterMode] = react.useState(false);
2132
+ const [allSlidesOpen, setAllSlidesOpen] = react.useState(false);
2150
2133
  const [endOfShowVisible, setEndOfShowVisible] = react.useState(false);
2151
2134
  const [presentationStartTime, setPresentationStartTime] = react.useState(null);
2152
2135
  const switchingToPresenterRef = react.useRef(false);
@@ -2231,6 +2214,8 @@ function usePresentationMode(input) {
2231
2214
  [endOfShowVisible, moveNavigationSlide, onSetMode]
2232
2215
  );
2233
2216
  const { handleZoomClick, zoomReturnSlideIndex, returnToZoomSlide, clearZoomReturn } = useZoomNavigation({ navigateToSlide });
2217
+ const openAllSlides = react.useCallback(() => setAllSlidesOpen(true), []);
2218
+ const closeAllSlides = react.useCallback(() => setAllSlidesOpen(false), []);
2234
2219
  const presenterConsole = usePresenterConsole(presentationSlideIndex);
2235
2220
  const {
2236
2221
  openAudienceWindow,
@@ -2303,12 +2288,14 @@ function usePresentationMode(input) {
2303
2288
  usePresentationKeyboard({
2304
2289
  mode,
2305
2290
  movePresentationSlide,
2291
+ navigateToSlide,
2292
+ slideCount: slides.length,
2306
2293
  onSetMode,
2307
- onToggleLaser,
2308
- onTogglePen,
2309
- onToggleEraser,
2294
+ onSetPointerTool,
2295
+ onEraseAnnotations,
2296
+ onToggleInkMarkup,
2310
2297
  onToggleToolbar,
2311
- onTogglePresenterView: togglePresenterView,
2298
+ onShowAllSlides: openAllSlides,
2312
2299
  onToggleBlackScreen: () => presenterConsole.setBlackout(
2313
2300
  presenterConsole.snapshot.blackout === "black" ? "none" : "black"
2314
2301
  ),
@@ -2408,6 +2395,9 @@ function usePresentationMode(input) {
2408
2395
  clearPresentationTimers,
2409
2396
  runPresentationEntranceAnimations,
2410
2397
  endOfShowVisible,
2398
+ allSlidesOpen,
2399
+ openAllSlides,
2400
+ closeAllSlides,
2411
2401
  movePresentationSlide,
2412
2402
  navigateToSlide,
2413
2403
  handlePresentationAction,
@@ -2468,6 +2458,7 @@ function usePresentationAnnotations(input) {
2468
2458
  const [currentStroke, setCurrentStroke] = react.useState(null);
2469
2459
  const [laserPosition, setLaserPosition] = react.useState(null);
2470
2460
  const [toolbarVisible, setToolbarVisible] = react.useState(false);
2461
+ const [inkMarkupVisible, setInkMarkupVisible] = react.useState(true);
2471
2462
  const slideAnnotationsRef = react.useRef(/* @__PURE__ */ new Map());
2472
2463
  const [annotationStrokes, setAnnotationStrokes] = react.useState([]);
2473
2464
  const [annotationVersion, setAnnotationVersion] = react.useState(0);
@@ -2653,6 +2644,8 @@ function usePresentationAnnotations(input) {
2653
2644
  laserPosition,
2654
2645
  toolbarVisible,
2655
2646
  setToolbarVisible,
2647
+ inkMarkupVisible,
2648
+ setInkMarkupVisible,
2656
2649
  handlePointerDown,
2657
2650
  handlePointerMove,
2658
2651
  handlePointerUp,
@@ -3322,7 +3315,7 @@ function useViewerCoreState(_input) {
3322
3315
  const shapeAdjustmentDragStateRef = react.useRef(null);
3323
3316
  const marqueeStateRef = react.useRef(null);
3324
3317
  const isDrawingRef = react.useRef(false);
3325
- const livePatcher = react.useMemo(() => chunk46Z6MNRS_js.createCollaborationLivePatcher(), []);
3318
+ const livePatcher = react.useMemo(() => chunkUTTXH3GH_js.createCollaborationLivePatcher(), []);
3326
3319
  react.useEffect(() => () => livePatcher.dispose(), [livePatcher]);
3327
3320
  const slidesRef = react.useRef([]);
3328
3321
  const [mode, setMode] = react.useState("edit");
@@ -3331,8 +3324,8 @@ function useViewerCoreState(_input) {
3331
3324
  const [slides, setSlides] = react.useState([]);
3332
3325
  const [templateElementsBySlideId, setTemplateElementsBySlideId] = react.useState({});
3333
3326
  const [canvasSize, setCanvasSize] = react.useState({
3334
- width: chunkLDF77JJD_js.DEFAULT_CANVAS_WIDTH,
3335
- height: chunkLDF77JJD_js.DEFAULT_CANVAS_HEIGHT
3327
+ width: chunkRNZJKGA7_js.DEFAULT_CANVAS_WIDTH,
3328
+ height: chunkRNZJKGA7_js.DEFAULT_CANVAS_HEIGHT
3336
3329
  });
3337
3330
  const [activeSlideIndex, setActiveSlideIndex] = react.useState(0);
3338
3331
  const [selectedElementId, setSelectedElementId] = react.useState(null);
@@ -3352,7 +3345,7 @@ function useViewerCoreState(_input) {
3352
3345
  const resolved = typeof value === "function" ? value(inlineEditingTextRef.current) : value;
3353
3346
  inlineEditingTextRef.current = resolved;
3354
3347
  setInlineEditingTextBase(value);
3355
- chunk46Z6MNRS_js.publishLiveInlineText(
3348
+ chunkUTTXH3GH_js.publishLiveInlineText(
3356
3349
  livePatcher,
3357
3350
  slidesRef.current[activeSlideIndexRef.current],
3358
3351
  inlineEditingElementIdRef.current,
@@ -3689,7 +3682,7 @@ function useLoadContent({
3689
3682
  handlerRef.current = null;
3690
3683
  const mediaElements = [];
3691
3684
  for (const slide of parsed.slides) {
3692
- chunk46Z6MNRS_js.collectMediaElements(slide.elements, mediaElements);
3685
+ chunkUTTXH3GH_js.collectMediaElements(slide.elements, mediaElements);
3693
3686
  }
3694
3687
  for (const url of mediaDataUrls.values()) {
3695
3688
  if (url.startsWith("blob:")) {
@@ -3730,7 +3723,7 @@ function useLoadContent({
3730
3723
  }
3731
3724
  })
3732
3725
  );
3733
- const { paths: imagePaths, refs: imageRefs } = chunk46Z6MNRS_js.collectImagePaths(parsed.slides);
3726
+ const { paths: imagePaths, refs: imageRefs } = chunkUTTXH3GH_js.collectImagePaths(parsed.slides);
3734
3727
  let nextSlides = parsed.slides;
3735
3728
  if (imagePaths.size > 0) {
3736
3729
  const resolvedMap = /* @__PURE__ */ new Map();
@@ -3785,12 +3778,12 @@ function useLoadContent({
3785
3778
  }
3786
3779
  }
3787
3780
  handlerRef.current = handler;
3788
- const partition = chunkLDF77JJD_js.partitionTemplateElements(nextSlides);
3781
+ const partition = chunkRNZJKGA7_js.partitionTemplateElements(nextSlides);
3789
3782
  setSlides(partition.slides);
3790
3783
  setTemplateElementsBySlideId(partition.templateElementsBySlideId);
3791
3784
  setCanvasSize({
3792
- width: parsed.width ?? chunkLDF77JJD_js.DEFAULT_CANVAS_WIDTH,
3793
- height: parsed.height ?? chunkLDF77JJD_js.DEFAULT_CANVAS_HEIGHT
3785
+ width: parsed.width ?? chunkRNZJKGA7_js.DEFAULT_CANVAS_WIDTH,
3786
+ height: parsed.height ?? chunkRNZJKGA7_js.DEFAULT_CANVAS_HEIGHT
3794
3787
  });
3795
3788
  setHeaderFooter(parsed.headerFooter ?? {});
3796
3789
  setLayoutOptions(parsed.layoutOptions ?? []);
@@ -3819,7 +3812,7 @@ function useLoadContent({
3819
3812
  setHasMacros(parsed.hasMacros === true);
3820
3813
  setHasDigitalSignatures(parsed.hasDigitalSignatures === true);
3821
3814
  setDigitalSignatureCount(parsed.digitalSignatureCount ?? 0);
3822
- setGuides(chunk46Z6MNRS_js.buildInitialGuides(parsed.presentationGuides, parsed.slides[0]?.guides));
3815
+ setGuides(chunkUTTXH3GH_js.buildInitialGuides(parsed.presentationGuides, parsed.slides[0]?.guides));
3823
3816
  setActiveSlideIndex(0);
3824
3817
  clearSelection();
3825
3818
  setIsDirty(false);
@@ -3904,7 +3897,7 @@ function useAutosave(input) {
3904
3897
  isSavingRef.current = false;
3905
3898
  return;
3906
3899
  }
3907
- await chunk46Z6MNRS_js.saveAutosaveSnapshot(filePathRef.current, data);
3900
+ await chunkUTTXH3GH_js.saveAutosaveSnapshot(filePathRef.current, data);
3908
3901
  setAutosaveStatus({ state: "saved", timestamp: Date.now() });
3909
3902
  } catch (err) {
3910
3903
  setAutosaveStatus({
@@ -3969,7 +3962,7 @@ function useElementOperations(input) {
3969
3962
  }, [applySelection, setInlineEditingElementId, setContextMenuState]);
3970
3963
  const updateElementById = react.useCallback(
3971
3964
  (elementId, updates) => {
3972
- if (chunk46Z6MNRS_js.isTemplateElementId(elementId)) {
3965
+ if (chunkUTTXH3GH_js.isTemplateElementId(elementId)) {
3973
3966
  const slideId = activeSlide?.id;
3974
3967
  if (slideId) {
3975
3968
  setTemplateElementsBySlideId((prev) => ({
@@ -4023,14 +4016,14 @@ function useElementOperations(input) {
4023
4016
  if (!selectedElement || !chunkCLNGAVNH_js.hasTextProperties(selectedElement)) {
4024
4017
  return;
4025
4018
  }
4026
- const inlineSel = chunk46Z6MNRS_js.getInlineEditorSelection(selectedElement.textSegments);
4019
+ const inlineSel = chunkUTTXH3GH_js.getInlineEditorSelection(selectedElement.textSegments);
4027
4020
  if (inlineSel && selectedElement.textSegments) {
4028
- const { newSegments: newSegments2, newSelection } = chunk46Z6MNRS_js.applyStyleToSelectedSegments(
4021
+ const { newSegments: newSegments2, newSelection } = chunkUTTXH3GH_js.applyStyleToSelectedSegments(
4029
4022
  selectedElement.textSegments,
4030
4023
  inlineSel,
4031
4024
  updates
4032
4025
  );
4033
- chunk46Z6MNRS_js.setPendingSelectionRestore(newSelection);
4026
+ chunkUTTXH3GH_js.setPendingSelectionRestore(newSelection);
4034
4027
  updateSelectedElement({
4035
4028
  textSegments: newSegments2
4036
4029
  });
@@ -4053,9 +4046,9 @@ function useElementOperations(input) {
4053
4046
  if (!selectedElement || !chunkCLNGAVNH_js.hasTextProperties(selectedElement)) {
4054
4047
  return;
4055
4048
  }
4056
- const inlineSel = chunk46Z6MNRS_js.getInlineEditorSelection(selectedElement.textSegments);
4049
+ const inlineSel = chunkUTTXH3GH_js.getInlineEditorSelection(selectedElement.textSegments);
4057
4050
  if (inlineSel && selectedElement.textSegments) {
4058
- const newSegments = chunk46Z6MNRS_js.applyCaseTransformToSegments(
4051
+ const newSegments = chunkUTTXH3GH_js.applyCaseTransformToSegments(
4059
4052
  selectedElement.textSegments,
4060
4053
  inlineSel,
4061
4054
  mode
@@ -4065,14 +4058,14 @@ function useElementOperations(input) {
4065
4058
  }
4066
4059
  const updates = {};
4067
4060
  if (selectedElement.textSegments && selectedElement.textSegments.length > 0) {
4068
- updates.textSegments = chunk46Z6MNRS_js.applyCaseTransformToSegments(
4061
+ updates.textSegments = chunkUTTXH3GH_js.applyCaseTransformToSegments(
4069
4062
  selectedElement.textSegments,
4070
4063
  null,
4071
4064
  mode
4072
4065
  );
4073
4066
  }
4074
4067
  if (typeof selectedElement.text === "string") {
4075
- updates.text = chunk46Z6MNRS_js.transformTextCase(selectedElement.text, mode);
4068
+ updates.text = chunkUTTXH3GH_js.transformTextCase(selectedElement.text, mode);
4076
4069
  }
4077
4070
  updateSelectedElement(updates);
4078
4071
  },
@@ -4127,7 +4120,7 @@ function useSectionOperations(input) {
4127
4120
  const { sections, setSections, slides, setSlides, markDirty } = input;
4128
4121
  const addSection2 = react.useCallback(
4129
4122
  (name, afterSlideIndex) => {
4130
- const result = chunk46Z6MNRS_js.addSection(sections, slides, name, afterSlideIndex);
4123
+ const result = chunkUTTXH3GH_js.addSection(sections, slides, name, afterSlideIndex);
4131
4124
  setSlides(result.slides);
4132
4125
  setSections(result.sections);
4133
4126
  markDirty();
@@ -4136,7 +4129,7 @@ function useSectionOperations(input) {
4136
4129
  );
4137
4130
  const renameSection2 = react.useCallback(
4138
4131
  (sectionId, newName) => {
4139
- const result = chunk46Z6MNRS_js.renameSection(sections, slides, sectionId, newName);
4132
+ const result = chunkUTTXH3GH_js.renameSection(sections, slides, sectionId, newName);
4140
4133
  setSections(result.sections);
4141
4134
  setSlides(result.slides);
4142
4135
  markDirty();
@@ -4145,7 +4138,7 @@ function useSectionOperations(input) {
4145
4138
  );
4146
4139
  const deleteSection2 = react.useCallback(
4147
4140
  (sectionId) => {
4148
- const result = chunk46Z6MNRS_js.deleteSection(sections, slides, sectionId);
4141
+ const result = chunkUTTXH3GH_js.deleteSection(sections, slides, sectionId);
4149
4142
  setSections(result.sections);
4150
4143
  setSlides(result.slides);
4151
4144
  markDirty();
@@ -4154,21 +4147,21 @@ function useSectionOperations(input) {
4154
4147
  );
4155
4148
  const moveSectionUp2 = react.useCallback(
4156
4149
  (sectionId) => {
4157
- setSections(chunk46Z6MNRS_js.moveSectionUp(sections, sectionId));
4150
+ setSections(chunkUTTXH3GH_js.moveSectionUp(sections, sectionId));
4158
4151
  markDirty();
4159
4152
  },
4160
4153
  [sections, setSections, markDirty]
4161
4154
  );
4162
4155
  const moveSectionDown2 = react.useCallback(
4163
4156
  (sectionId) => {
4164
- setSections(chunk46Z6MNRS_js.moveSectionDown(sections, sectionId));
4157
+ setSections(chunkUTTXH3GH_js.moveSectionDown(sections, sectionId));
4165
4158
  markDirty();
4166
4159
  },
4167
4160
  [sections, setSections, markDirty]
4168
4161
  );
4169
4162
  const moveSlidesToSection2 = react.useCallback(
4170
4163
  (slideIndexes, targetSectionId) => {
4171
- const result = chunk46Z6MNRS_js.moveSlidesToSection(sections, slides, slideIndexes, targetSectionId);
4164
+ const result = chunkUTTXH3GH_js.moveSlidesToSection(sections, slides, slideIndexes, targetSectionId);
4172
4165
  setSlides(result.slides);
4173
4166
  setSections(result.sections);
4174
4167
  markDirty();
@@ -4187,19 +4180,19 @@ function useSectionOperations(input) {
4187
4180
 
4188
4181
  // src/viewer/hooks/pointer-move-handlers.ts
4189
4182
  function computeResizeGeometry(handle, startX, startY, startWidth, startHeight, dx, dy, snapToGrid, gridSpacingPx) {
4190
- const resized = chunk46Z6MNRS_js.applyResize(
4183
+ const resized = chunkUTTXH3GH_js.applyResize(
4191
4184
  { x: startX, y: startY, width: startWidth, height: startHeight },
4192
4185
  handle,
4193
4186
  dx,
4194
4187
  dy,
4195
4188
  1,
4196
- { minSize: chunkLDF77JJD_js.MIN_ELEMENT_SIZE }
4189
+ { minSize: chunkRNZJKGA7_js.MIN_ELEMENT_SIZE }
4197
4190
  );
4198
4191
  const box = { x: resized.x, y: resized.y, width: resized.width, height: resized.height };
4199
4192
  if (!snapToGrid) {
4200
4193
  return box;
4201
4194
  }
4202
- return chunk46Z6MNRS_js.snapBoxToGrid(box, handle, gridSpacingPx, chunkLDF77JJD_js.MIN_ELEMENT_SIZE);
4195
+ return chunkUTTXH3GH_js.snapBoxToGrid(box, handle, gridSpacingPx, chunkRNZJKGA7_js.MIN_ELEMENT_SIZE);
4203
4196
  }
4204
4197
  function computeAdjustmentValue(startAdjustment, dx, startWidth) {
4205
4198
  const range = startWidth || 200;
@@ -4317,7 +4310,7 @@ function processDragMove(e, drag, editorScale, snapToGrid, snapToShape, gridSpac
4317
4310
  width: el.width,
4318
4311
  height: el.height
4319
4312
  }));
4320
- const snapResult = chunk46Z6MNRS_js.computeSnapToShape(
4313
+ const snapResult = chunkUTTXH3GH_js.computeSnapToShape(
4321
4314
  targetX,
4322
4315
  targetY,
4323
4316
  primaryEl.width,
@@ -4356,7 +4349,7 @@ function processDragMove(e, drag, editorScale, snapToGrid, snapToShape, gridSpac
4356
4349
  if (live) {
4357
4350
  for (const id of Object.keys(drag.startPositionsById)) {
4358
4351
  const start = drag.startPositionsById[id];
4359
- chunk46Z6MNRS_js.publishLiveGeometry(live.patcher, live.slideId, id, {
4352
+ chunkUTTXH3GH_js.publishLiveGeometry(live.patcher, live.slideId, id, {
4360
4353
  x: start.x + appliedDx,
4361
4354
  y: start.y + appliedDy
4362
4355
  });
@@ -4390,15 +4383,15 @@ function processResizeMove(e, rs, editorScale, snapToGrid, gridSpacingPx, live)
4390
4383
  if (rs.domEl) {
4391
4384
  rs.domEl.style.left = `${geo.x}px`;
4392
4385
  rs.domEl.style.top = `${geo.y}px`;
4393
- rs.domEl.style.width = `${Math.max(geo.width, chunkLDF77JJD_js.MIN_ELEMENT_SIZE)}px`;
4394
- rs.domEl.style.height = `${Math.max(geo.height, chunkLDF77JJD_js.MIN_ELEMENT_SIZE)}px`;
4386
+ rs.domEl.style.width = `${Math.max(geo.width, chunkRNZJKGA7_js.MIN_ELEMENT_SIZE)}px`;
4387
+ rs.domEl.style.height = `${Math.max(geo.height, chunkRNZJKGA7_js.MIN_ELEMENT_SIZE)}px`;
4395
4388
  }
4396
4389
  if (live) {
4397
- chunk46Z6MNRS_js.publishLiveGeometry(live.patcher, live.slideId, rs.elementId, {
4390
+ chunkUTTXH3GH_js.publishLiveGeometry(live.patcher, live.slideId, rs.elementId, {
4398
4391
  x: geo.x,
4399
4392
  y: geo.y,
4400
- width: Math.max(geo.width, chunkLDF77JJD_js.MIN_ELEMENT_SIZE),
4401
- height: Math.max(geo.height, chunkLDF77JJD_js.MIN_ELEMENT_SIZE)
4393
+ width: Math.max(geo.width, chunkRNZJKGA7_js.MIN_ELEMENT_SIZE),
4394
+ height: Math.max(geo.height, chunkRNZJKGA7_js.MIN_ELEMENT_SIZE)
4402
4395
  });
4403
4396
  }
4404
4397
  }
@@ -4478,13 +4471,13 @@ function processPointerUp(input) {
4478
4471
  if (i !== activeSlideIndex) {
4479
4472
  return s;
4480
4473
  }
4481
- const rerouted = chunk46Z6MNRS_js.rerouteConnectorsForMovedElements(s.elements, movedIds);
4474
+ const rerouted = chunkUTTXH3GH_js.rerouteConnectorsForMovedElements(s.elements, movedIds);
4482
4475
  if (rerouted.length === 0) {
4483
4476
  return s;
4484
4477
  }
4485
4478
  return {
4486
4479
  ...s,
4487
- elements: chunk46Z6MNRS_js.applyReroutedConnectors(s.elements, rerouted)
4480
+ elements: chunkUTTXH3GH_js.applyReroutedConnectors(s.elements, rerouted)
4488
4481
  };
4489
4482
  })
4490
4483
  );
@@ -4506,9 +4499,9 @@ function processPointerUp(input) {
4506
4499
  }
4507
4500
  function commitMarquee(marquee, editTemplateMode, templateElements, activeSlide, applySelection, clearSelection) {
4508
4501
  const sourceElements = editTemplateMode ? templateElements : activeSlide?.elements ?? [];
4509
- const hitIds = chunk46Z6MNRS_js.computeMarqueeHitIds(marquee, sourceElements);
4502
+ const hitIds = chunkUTTXH3GH_js.computeMarqueeHitIds(marquee, sourceElements);
4510
4503
  if (marquee.additive) {
4511
- const merged = chunk46Z6MNRS_js.mergeAdditiveSelection(marquee.baseSelectionIds, hitIds);
4504
+ const merged = chunkUTTXH3GH_js.mergeAdditiveSelection(marquee.baseSelectionIds, hitIds);
4512
4505
  if (merged.length > 0) {
4513
4506
  applySelection(merged[0], merged);
4514
4507
  } else {
@@ -4531,8 +4524,8 @@ function commitDrag(drag, editTemplateMode, activeSlide, activeSlideIndex, setTe
4531
4524
  }
4532
4525
  return { ...el, x: start.x + dx, y: start.y + dy };
4533
4526
  });
4534
- const rerouted = chunk46Z6MNRS_js.rerouteConnectorsForMovedElements(movedElements, movedIds);
4535
- return chunk46Z6MNRS_js.applyReroutedConnectors(movedElements, rerouted);
4527
+ const rerouted = chunkUTTXH3GH_js.rerouteConnectorsForMovedElements(movedElements, movedIds);
4528
+ return chunkUTTXH3GH_js.applyReroutedConnectors(movedElements, rerouted);
4536
4529
  };
4537
4530
  if (editTemplateMode) {
4538
4531
  const slideId = activeSlide?.id;
@@ -4687,7 +4680,7 @@ function useCanvasInteractions(input) {
4687
4680
  const el = elementLookup.get(editId);
4688
4681
  if (el && chunkCLNGAVNH_js.hasTextProperties(el)) {
4689
4682
  const committedText = transformCommittedText ? transformCommittedText(inlineEditingText) : inlineEditingText;
4690
- const newSegments = chunk46Z6MNRS_js.remapTextToSegments(committedText, el.textSegments, el.textStyle);
4683
+ const newSegments = chunkUTTXH3GH_js.remapTextToSegments(committedText, el.textSegments, el.textStyle);
4691
4684
  ops.updateElementById(editId, {
4692
4685
  text: committedText,
4693
4686
  textSegments: newSegments
@@ -4936,7 +4929,7 @@ function createFileHandlers(deps) {
4936
4929
  h = Math.round(h * scale);
4937
4930
  }
4938
4931
  addElement({
4939
- id: chunk46Z6MNRS_js.generateElementId(),
4932
+ id: chunkUTTXH3GH_js.generateElementId(),
4940
4933
  type: "image",
4941
4934
  x: Math.round((canvasSize.width - w) / 2),
4942
4935
  y: Math.round((canvasSize.height - h) / 2),
@@ -4947,7 +4940,7 @@ function createFileHandlers(deps) {
4947
4940
  };
4948
4941
  img.onerror = () => {
4949
4942
  addElement({
4950
- id: chunk46Z6MNRS_js.generateElementId(),
4943
+ id: chunkUTTXH3GH_js.generateElementId(),
4951
4944
  type: "image",
4952
4945
  x: 100,
4953
4946
  y: 100,
@@ -4973,7 +4966,7 @@ function createFileHandlers(deps) {
4973
4966
  const elFilePath = file.path;
4974
4967
  const insertMediaElement = (mediaSourceUrl, width, height) => {
4975
4968
  addElement({
4976
- id: chunk46Z6MNRS_js.generateElementId(),
4969
+ id: chunkUTTXH3GH_js.generateElementId(),
4977
4970
  type: "media",
4978
4971
  mediaType,
4979
4972
  mediaMimeType: file.type || void 0,
@@ -5148,13 +5141,13 @@ function createStructuredElementHandlers(deps) {
5148
5141
  return;
5149
5142
  }
5150
5143
  addElement({
5151
- id: chunk46Z6MNRS_js.generateElementId(),
5144
+ id: chunkUTTXH3GH_js.generateElementId(),
5152
5145
  type: "smartArt",
5153
5146
  x: 100,
5154
5147
  y: 120,
5155
5148
  width: 600,
5156
5149
  height: 340,
5157
- smartArtData: chunk46Z6MNRS_js.buildSmartArtPresetData(
5150
+ smartArtData: chunkUTTXH3GH_js.buildSmartArtPresetData(
5158
5151
  layout,
5159
5152
  defaultItems,
5160
5153
  (i) => `node-${Date.now()}-${i}-${Math.random().toString(36).slice(2, 8)}`
@@ -5166,7 +5159,7 @@ function createStructuredElementHandlers(deps) {
5166
5159
  return;
5167
5160
  }
5168
5161
  addElement({
5169
- id: chunk46Z6MNRS_js.generateElementId(),
5162
+ id: chunkUTTXH3GH_js.generateElementId(),
5170
5163
  type: "shape",
5171
5164
  x: 120,
5172
5165
  y: 200,
@@ -5225,7 +5218,7 @@ function createStructuredElementHandlers(deps) {
5225
5218
  const displayText = value || fieldTexts[fieldType] || fieldType;
5226
5219
  const fieldGuid = `{${crypto.randomUUID().toUpperCase()}}`;
5227
5220
  addElement({
5228
- id: chunk46Z6MNRS_js.generateElementId(),
5221
+ id: chunkUTTXH3GH_js.generateElementId(),
5229
5222
  type: "shape",
5230
5223
  x: 120,
5231
5224
  y: 200,
@@ -5247,7 +5240,7 @@ function createStructuredElementHandlers(deps) {
5247
5240
  if (!activeSlide) {
5248
5241
  return;
5249
5242
  }
5250
- const preset = chunk46Z6MNRS_js.ACTION_BUTTON_PRESETS.find((p) => p.shapeType === shapeType);
5243
+ const preset = chunkUTTXH3GH_js.ACTION_BUTTON_PRESETS.find((p) => p.shapeType === shapeType);
5251
5244
  if (!preset) {
5252
5245
  return;
5253
5246
  }
@@ -5260,7 +5253,7 @@ function createStructuredElementHandlers(deps) {
5260
5253
  defaultPptxAction.highlightClick = true;
5261
5254
  }
5262
5255
  addElement({
5263
- id: chunk46Z6MNRS_js.generateElementId(),
5256
+ id: chunkUTTXH3GH_js.generateElementId(),
5264
5257
  type: "shape",
5265
5258
  x: 150,
5266
5259
  y: 150,
@@ -5327,14 +5320,14 @@ function useInsertElements(input) {
5327
5320
  return;
5328
5321
  }
5329
5322
  addElement({
5330
- id: chunk46Z6MNRS_js.generateElementId(),
5323
+ id: chunkUTTXH3GH_js.generateElementId(),
5331
5324
  type: "text",
5332
5325
  x: 100,
5333
5326
  y: 100,
5334
5327
  width: 300,
5335
5328
  height: 60,
5336
5329
  text: "",
5337
- textStyle: { fontSize: chunkLDF77JJD_js.DEFAULT_TEXT_FONT_SIZE }
5330
+ textStyle: { fontSize: chunkRNZJKGA7_js.DEFAULT_TEXT_FONT_SIZE }
5338
5331
  });
5339
5332
  };
5340
5333
  const handleAddShape = () => {
@@ -5342,7 +5335,7 @@ function useInsertElements(input) {
5342
5335
  return;
5343
5336
  }
5344
5337
  addElement({
5345
- id: chunk46Z6MNRS_js.generateElementId(),
5338
+ id: chunkUTTXH3GH_js.generateElementId(),
5346
5339
  type: "shape",
5347
5340
  x: 150,
5348
5341
  y: 150,
@@ -5361,15 +5354,15 @@ function useInsertElements(input) {
5361
5354
  return;
5362
5355
  }
5363
5356
  addElement({
5364
- ...chunk46Z6MNRS_js.newTableElement(chunkLDF77JJD_js.DEFAULT_TABLE_ROWS, chunkLDF77JJD_js.DEFAULT_TABLE_COLUMNS, 100, 200),
5365
- id: chunk46Z6MNRS_js.generateElementId()
5357
+ ...chunkUTTXH3GH_js.newTableElement(chunkRNZJKGA7_js.DEFAULT_TABLE_ROWS, chunkRNZJKGA7_js.DEFAULT_TABLE_COLUMNS, 100, 200),
5358
+ id: chunkUTTXH3GH_js.generateElementId()
5366
5359
  });
5367
5360
  };
5368
5361
  const handleAddChart = (chartType) => {
5369
5362
  if (!activeSlide) {
5370
5363
  return;
5371
5364
  }
5372
- addElement(chunk46Z6MNRS_js.createDefaultChartElement(chartType));
5365
+ addElement(chunkUTTXH3GH_js.createDefaultChartElement(chartType));
5373
5366
  };
5374
5367
  const structured = createStructuredElementHandlers({
5375
5368
  activeSlide,
@@ -5439,7 +5432,7 @@ function useClipboardHandlers(input) {
5439
5432
  if (!selectedElement) {
5440
5433
  return;
5441
5434
  }
5442
- setClipboardPayload(chunk46Z6MNRS_js.buildElementClipboardPayload(selectedElement, editTemplateMode));
5435
+ setClipboardPayload(chunkUTTXH3GH_js.buildElementClipboardPayload(selectedElement, editTemplateMode));
5443
5436
  };
5444
5437
  const handleDelete = () => {
5445
5438
  const idsToDelete = effectiveSelectedIds;
@@ -5456,7 +5449,7 @@ function useClipboardHandlers(input) {
5456
5449
  handleDelete();
5457
5450
  };
5458
5451
  const insertClone = (source) => {
5459
- const clone = chunk46Z6MNRS_js.cloneElementForPaste(source, { intoTemplate: editTemplateMode });
5452
+ const clone = chunkUTTXH3GH_js.cloneElementForPaste(source, { intoTemplate: editTemplateMode });
5460
5453
  ops.updateActiveElements((els) => [...els, clone]);
5461
5454
  ops.applySelection(clone.id);
5462
5455
  history.markDirty();
@@ -5666,7 +5659,7 @@ function useMergeShapesHandler(input) {
5666
5659
  bounds.height
5667
5660
  );
5668
5661
  const newEl = {
5669
- id: chunk46Z6MNRS_js.generateElementId(),
5662
+ id: chunkUTTXH3GH_js.generateElementId(),
5670
5663
  type: "shape",
5671
5664
  x: bounds.x,
5672
5665
  y: bounds.y,
@@ -5725,7 +5718,7 @@ function useMergeShapesHandler(input) {
5725
5718
  );
5726
5719
  const primary = targets[0];
5727
5720
  const newEl = {
5728
- id: chunk46Z6MNRS_js.generateElementId(),
5721
+ id: chunkUTTXH3GH_js.generateElementId(),
5729
5722
  type: "shape",
5730
5723
  x: bounds.x,
5731
5724
  y: bounds.y,
@@ -5788,7 +5781,7 @@ function useGroupAlignLayerHandlers(input) {
5788
5781
  if (ids.length < 2 || !activeSlide) {
5789
5782
  return;
5790
5783
  }
5791
- const { elements, groupId } = chunk46Z6MNRS_js.groupElements(ops.activeElements, ids, chunk46Z6MNRS_js.generateElementId());
5784
+ const { elements, groupId } = chunkUTTXH3GH_js.groupElements(ops.activeElements, ids, chunkUTTXH3GH_js.generateElementId());
5792
5785
  if (groupId === null) {
5793
5786
  return;
5794
5787
  }
@@ -5801,12 +5794,12 @@ function useGroupAlignLayerHandlers(input) {
5801
5794
  return;
5802
5795
  }
5803
5796
  const group = selectedElement;
5804
- const intoTemplate = chunk46Z6MNRS_js.isTemplateElementId(group.id);
5797
+ const intoTemplate = chunkUTTXH3GH_js.isTemplateElementId(group.id);
5805
5798
  const ungrouped = group.children.map((child) => ({
5806
5799
  ...structuredClone(child),
5807
5800
  // Keep child ids in the same store as the group so later edits route
5808
5801
  // correctly: template groups yield template-prefixed child ids.
5809
- id: intoTemplate ? chunk46Z6MNRS_js.makeCloneId(true, child.id || group.id) : child.id || chunk46Z6MNRS_js.generateElementId(),
5802
+ id: intoTemplate ? chunkUTTXH3GH_js.makeCloneId(true, child.id || group.id) : child.id || chunkUTTXH3GH_js.generateElementId(),
5810
5803
  x: child.x + group.x,
5811
5804
  y: child.y + group.y
5812
5805
  }));
@@ -5830,7 +5823,7 @@ function useGroupAlignLayerHandlers(input) {
5830
5823
  if (!edge) {
5831
5824
  return;
5832
5825
  }
5833
- const positions = chunk46Z6MNRS_js.alignElements(selectedElements, edge);
5826
+ const positions = chunkUTTXH3GH_js.alignElements(selectedElements, edge);
5834
5827
  for (const [id, pos] of positions) {
5835
5828
  const el = elementLookup.get(id);
5836
5829
  if (!el) {
@@ -5848,7 +5841,7 @@ function useGroupAlignLayerHandlers(input) {
5848
5841
  if (!distAxis) {
5849
5842
  return;
5850
5843
  }
5851
- const positions = chunk46Z6MNRS_js.distributeElements(selectedElements, distAxis);
5844
+ const positions = chunkUTTXH3GH_js.distributeElements(selectedElements, distAxis);
5852
5845
  for (const [id, pos] of positions) {
5853
5846
  const el = elementLookup.get(id);
5854
5847
  if (!el) {
@@ -5865,7 +5858,7 @@ function useGroupAlignLayerHandlers(input) {
5865
5858
  }
5866
5859
  const id = selectedElement.id;
5867
5860
  ops.updateActiveElements(
5868
- (els) => direction === "forward" ? chunk46Z6MNRS_js.bringForward(els, id) : direction === "backward" ? chunk46Z6MNRS_js.sendBackward(els, id) : els
5861
+ (els) => direction === "forward" ? chunkUTTXH3GH_js.bringForward(els, id) : direction === "backward" ? chunkUTTXH3GH_js.sendBackward(els, id) : els
5869
5862
  );
5870
5863
  history.markDirty();
5871
5864
  };
@@ -5875,7 +5868,7 @@ function useGroupAlignLayerHandlers(input) {
5875
5868
  }
5876
5869
  const id = selectedElement.id;
5877
5870
  ops.updateActiveElements(
5878
- (els) => direction === "front" ? chunk46Z6MNRS_js.bringToFront(els, id) : chunk46Z6MNRS_js.sendToBack(els, id)
5871
+ (els) => direction === "front" ? chunkUTTXH3GH_js.bringToFront(els, id) : chunkUTTXH3GH_js.sendToBack(els, id)
5879
5872
  );
5880
5873
  history.markDirty();
5881
5874
  };
@@ -5997,7 +5990,7 @@ function insertSlideFromLayoutUpdater(slides, activeIndex, draft) {
5997
5990
  function useSlideManagement(input) {
5998
5991
  const { slides, activeSlideIndex, setActiveSlideIndex, ops, history, handlerRef } = input;
5999
5992
  const handleAddSlide = () => {
6000
- const newSlide = chunk46Z6MNRS_js.createBlankSlide(slides.length + 1);
5993
+ const newSlide = chunkUTTXH3GH_js.createBlankSlide(slides.length + 1);
6001
5994
  ops.updateSlides((prev) => {
6002
5995
  const next = [...prev];
6003
5996
  next.splice(activeSlideIndex + 1, 0, newSlide);
@@ -6060,7 +6053,7 @@ function useSlideManagement(input) {
6060
6053
  }
6061
6054
  const clone = {
6062
6055
  ...src,
6063
- id: chunk46Z6MNRS_js.makeSlideId(),
6056
+ id: chunkUTTXH3GH_js.makeSlideId(),
6064
6057
  elements: src.elements.map((el) => ({
6065
6058
  ...el,
6066
6059
  id: `${el.id}-dup-${Math.random().toString(36).slice(2, 6)}`
@@ -6092,7 +6085,7 @@ function useSlideManagement(input) {
6092
6085
  const handleInsertSlideFromLayout = (layoutPath, layoutName) => {
6093
6086
  const insertAt = activeSlideIndex + 1;
6094
6087
  const draft = {
6095
- ...chunk46Z6MNRS_js.createBlankSlide(slides.length + 1),
6088
+ ...chunkUTTXH3GH_js.createBlankSlide(slides.length + 1),
6096
6089
  layoutPath,
6097
6090
  ...layoutName ? { layoutName } : {}
6098
6091
  };
@@ -6153,7 +6146,7 @@ function createTableMergeHandlers(input) {
6153
6146
  if (!nextCell || nextCell.hMerge || nextCell.vMerge) {
6154
6147
  return;
6155
6148
  }
6156
- const newTableData = chunk46Z6MNRS_js.mergeCells(
6149
+ const newTableData = chunkUTTXH3GH_js.mergeCells(
6157
6150
  [
6158
6151
  { row: rowIndex, col: columnIndex },
6159
6152
  { row: rowIndex, col: nextColIdx }
@@ -6187,7 +6180,7 @@ function createTableMergeHandlers(input) {
6187
6180
  if (!targetNextCell || targetNextCell.hMerge || targetNextCell.vMerge) {
6188
6181
  return;
6189
6182
  }
6190
- const newTableData = chunk46Z6MNRS_js.mergeCells(
6183
+ const newTableData = chunkUTTXH3GH_js.mergeCells(
6191
6184
  [
6192
6185
  { row: rowIndex, col: columnIndex },
6193
6186
  { row: targetNextRowIdx, col: columnIndex }
@@ -6210,7 +6203,7 @@ function createTableMergeHandlers(input) {
6210
6203
  return;
6211
6204
  }
6212
6205
  const td = selectedElement.tableData;
6213
- const newTableData = chunk46Z6MNRS_js.mergeCells(ts.selectedCells, td);
6206
+ const newTableData = chunkUTTXH3GH_js.mergeCells(ts.selectedCells, td);
6214
6207
  const updates = { tableData: newTableData };
6215
6208
  const newRawXml = chunkCLNGAVNH_js.updateMergeAttrsInRawXml(selectedElement, newTableData);
6216
6209
  if (newRawXml) {
@@ -6229,7 +6222,7 @@ function createTableMergeHandlers(input) {
6229
6222
  }
6230
6223
  const { rowIndex, columnIndex } = ts;
6231
6224
  const td = selectedElement.tableData;
6232
- const newTableData = chunk46Z6MNRS_js.splitCell(rowIndex, columnIndex, td);
6225
+ const newTableData = chunkUTTXH3GH_js.splitCell(rowIndex, columnIndex, td);
6233
6226
  const updates = { tableData: newTableData };
6234
6227
  const newRawXml = chunkCLNGAVNH_js.updateMergeAttrsInRawXml(selectedElement, newTableData);
6235
6228
  if (newRawXml) {
@@ -6363,7 +6356,7 @@ function createTableStructHandlers(input) {
6363
6356
  return;
6364
6357
  }
6365
6358
  const rowIdx = ts?.rowIndex ?? 0;
6366
- const newTableData = chunk46Z6MNRS_js.insertTableRow(selectedElement.tableData, rowIdx, position);
6359
+ const newTableData = chunkUTTXH3GH_js.insertTableRow(selectedElement.tableData, rowIdx, position);
6367
6360
  const updates = { tableData: newTableData };
6368
6361
  const newRawXml = chunkCLNGAVNH_js.rebuildTableStructureInRawXml(selectedElement, newTableData);
6369
6362
  if (newRawXml) {
@@ -6378,7 +6371,7 @@ function createTableStructHandlers(input) {
6378
6371
  }
6379
6372
  const td = selectedElement.tableData;
6380
6373
  const rowIdx = ts?.rowIndex ?? 0;
6381
- const newTableData = chunk46Z6MNRS_js.deleteTableRow(td, rowIdx);
6374
+ const newTableData = chunkUTTXH3GH_js.deleteTableRow(td, rowIdx);
6382
6375
  if (newTableData === td) {
6383
6376
  return;
6384
6377
  }
@@ -6395,7 +6388,7 @@ function createTableStructHandlers(input) {
6395
6388
  return;
6396
6389
  }
6397
6390
  const colIdx = ts?.columnIndex ?? 0;
6398
- const newTableData = chunk46Z6MNRS_js.insertTableColumn(selectedElement.tableData, colIdx, position);
6391
+ const newTableData = chunkUTTXH3GH_js.insertTableColumn(selectedElement.tableData, colIdx, position);
6399
6392
  const updates = { tableData: newTableData };
6400
6393
  const newRawXml = chunkCLNGAVNH_js.rebuildTableStructureInRawXml(selectedElement, newTableData);
6401
6394
  if (newRawXml) {
@@ -6410,7 +6403,7 @@ function createTableStructHandlers(input) {
6410
6403
  }
6411
6404
  const td = selectedElement.tableData;
6412
6405
  const colIdx = ts?.columnIndex ?? 0;
6413
- const newTableData = chunk46Z6MNRS_js.deleteTableColumn(td, colIdx);
6406
+ const newTableData = chunkUTTXH3GH_js.deleteTableColumn(td, colIdx);
6414
6407
  if (newTableData === td) {
6415
6408
  return;
6416
6409
  }
@@ -6451,8 +6444,8 @@ async function renderToCanvas(element, options = {}) {
6451
6444
  return html2canvasPro(element, {
6452
6445
  ...options,
6453
6446
  onclone: async (doc, clonedEl) => {
6454
- await chunk46Z6MNRS_js.normalizeColorsForCapture(doc, clonedEl);
6455
- chunk46Z6MNRS_js.preprocessCssForCapture(clonedEl);
6447
+ await chunkUTTXH3GH_js.normalizeColorsForCapture(doc, clonedEl);
6448
+ chunkUTTXH3GH_js.preprocessCssForCapture(clonedEl);
6456
6449
  if (typeof userOnClone === "function") {
6457
6450
  userOnClone(doc, clonedEl);
6458
6451
  }
@@ -6508,7 +6501,7 @@ async function exportSlideToPngBlob(slideElement, options = {}) {
6508
6501
  }
6509
6502
  async function exportSlideAsPng(slideElement, slideIndex, options = {}) {
6510
6503
  const blob = await exportSlideToPngBlob(slideElement, options);
6511
- chunk46Z6MNRS_js.downloadBlob(blob, `slide-${slideIndex + 1}.png`);
6504
+ chunkUTTXH3GH_js.downloadBlob(blob, `slide-${slideIndex + 1}.png`);
6512
6505
  }
6513
6506
  async function copySlideToClipboard(slideElement, options = {}) {
6514
6507
  const blob = await exportSlideToPngBlob(slideElement, options);
@@ -6530,15 +6523,15 @@ async function exportAllSlidesAsPdf(slideStageRef, totalSlides, setActiveSlide,
6530
6523
  continue;
6531
6524
  }
6532
6525
  const canvas = await renderElementToCanvas(stageEl, scale);
6533
- images.push(chunk46Z6MNRS_js.canvasToJpegData(canvas));
6526
+ images.push(chunkUTTXH3GH_js.canvasToJpegData(canvas));
6534
6527
  }
6535
6528
  onProgress?.(totalSlides, totalSlides);
6536
6529
  setActiveSlide(currentSlideIndex);
6537
6530
  if (images.length === 0) {
6538
- throw new Error(chunkCUUYYYC5_js.translationsEn["pptx.export.errorNoSlidesPdf"]);
6531
+ throw new Error(chunkYIFO3WQO_js.translationsEn["pptx.export.errorNoSlidesPdf"]);
6539
6532
  }
6540
- const pdfBlobUrl = chunkLDF77JJD_js.buildPdfFromImageData(images);
6541
- chunk46Z6MNRS_js.downloadDataUrl(pdfBlobUrl, filename);
6533
+ const pdfBlobUrl = chunkRNZJKGA7_js.buildPdfFromImageData(images);
6534
+ chunkUTTXH3GH_js.downloadDataUrl(pdfBlobUrl, filename);
6542
6535
  }
6543
6536
  async function captureAllSlidesAsPngDataUrls(slideStageRef, totalSlides, setActiveSlide, currentSlideIndex, options = {}) {
6544
6537
  const { scale = 2, onProgress } = options;
@@ -6584,10 +6577,10 @@ async function exportAllSlidesAsNotesPdf(slideStageRef, totalSlides, setActiveSl
6584
6577
  onProgress?.(totalSlides, totalSlides);
6585
6578
  setActiveSlide(currentSlideIndex);
6586
6579
  if (pages.length === 0) {
6587
- throw new Error(chunkCUUYYYC5_js.translationsEn["pptx.export.errorNoSlidesNotesPdf"]);
6580
+ throw new Error(chunkYIFO3WQO_js.translationsEn["pptx.export.errorNoSlidesNotesPdf"]);
6588
6581
  }
6589
- const pdfDataUrl = chunkLDF77JJD_js.buildNotesPdf(pages);
6590
- chunk46Z6MNRS_js.downloadDataUrl(pdfDataUrl, filename);
6582
+ const pdfDataUrl = chunkRNZJKGA7_js.buildNotesPdf(pages);
6583
+ chunkUTTXH3GH_js.downloadDataUrl(pdfDataUrl, filename);
6591
6584
  }
6592
6585
 
6593
6586
  // src/viewer/utils/export-video.ts
@@ -6618,7 +6611,7 @@ async function exportAllSlidesAsVideo(slideStageRef, totalSlides, setActiveSlide
6618
6611
  }
6619
6612
  setActiveSlide(currentSlideIndex);
6620
6613
  if (slideCanvases.length === 0) {
6621
- throw new Error(chunkCUUYYYC5_js.translationsEn["pptx.export.errorNoSlidesVideo"]);
6614
+ throw new Error(chunkYIFO3WQO_js.translationsEn["pptx.export.errorNoSlidesVideo"]);
6622
6615
  }
6623
6616
  const firstCanvas = slideCanvases[0];
6624
6617
  const recordingCanvas = document.createElement("canvas");
@@ -6626,12 +6619,12 @@ async function exportAllSlidesAsVideo(slideStageRef, totalSlides, setActiveSlide
6626
6619
  recordingCanvas.height = firstCanvas.height;
6627
6620
  const ctx = recordingCanvas.getContext("2d");
6628
6621
  if (!ctx) {
6629
- throw new Error(chunkCUUYYYC5_js.translationsEn["pptx.export.errorNo2dContext"]);
6622
+ throw new Error(chunkYIFO3WQO_js.translationsEn["pptx.export.errorNo2dContext"]);
6630
6623
  }
6631
6624
  const fps = 30;
6632
6625
  const stream = recordingCanvas.captureStream(fps);
6633
6626
  const recorder = new MediaRecorder(stream, {
6634
- mimeType: chunk46Z6MNRS_js.pickSupportedMimeType([...chunk46Z6MNRS_js.WEBM_MIME_CANDIDATES]),
6627
+ mimeType: chunkUTTXH3GH_js.pickSupportedMimeType([...chunkUTTXH3GH_js.WEBM_MIME_CANDIDATES]),
6635
6628
  videoBitsPerSecond: 5e6
6636
6629
  });
6637
6630
  const chunks = [];
@@ -6654,8 +6647,8 @@ async function exportAllSlidesAsVideo(slideStageRef, totalSlides, setActiveSlide
6654
6647
  const duration = slideTimingsMs?.[i] ?? slideDurationMs;
6655
6648
  ctx.clearRect(0, 0, recordingCanvas.width, recordingCanvas.height);
6656
6649
  ctx.drawImage(slideCanvases[i], 0, 0);
6657
- const frameInterval = chunk46Z6MNRS_js.fpsToFrameIntervalMs(fps);
6658
- const framesNeeded = chunk46Z6MNRS_js.segmentFrameCount(duration, fps);
6650
+ const frameInterval = chunkUTTXH3GH_js.fpsToFrameIntervalMs(fps);
6651
+ const framesNeeded = chunkUTTXH3GH_js.segmentFrameCount(duration, fps);
6659
6652
  for (let f = 0; f < framesNeeded; f++) {
6660
6653
  if (signal?.aborted) {
6661
6654
  recorder.stop();
@@ -6702,9 +6695,9 @@ async function exportAllSlidesAsGif(slideStageRef, totalSlides, setActiveSlide,
6702
6695
  }
6703
6696
  setActiveSlide(currentSlideIndex);
6704
6697
  if (frames.length === 0) {
6705
- throw new Error(chunkCUUYYYC5_js.translationsEn["pptx.export.errorNoSlidesGif"]);
6698
+ throw new Error(chunkYIFO3WQO_js.translationsEn["pptx.export.errorNoSlidesGif"]);
6706
6699
  }
6707
- const gifBytes = chunk46Z6MNRS_js.encodeGif(frames, Math.round(slideDurationMs / 10));
6700
+ const gifBytes = chunkUTTXH3GH_js.encodeGif(frames, Math.round(slideDurationMs / 10));
6708
6701
  onProgress?.(totalSlides, totalSlides);
6709
6702
  const buf = new ArrayBuffer(gifBytes.length);
6710
6703
  new Uint8Array(buf).set(gifBytes);
@@ -6818,7 +6811,7 @@ function useExportSaveAs(input) {
6818
6811
  }
6819
6812
  setExportProgress(70);
6820
6813
  setExportStatusMessage("Writing README...");
6821
- const readme = chunk46Z6MNRS_js.generatePackageReadme(pptxFilename);
6814
+ const readme = chunkUTTXH3GH_js.generatePackageReadme(pptxFilename);
6822
6815
  pkgFolder.file("README.txt", readme);
6823
6816
  if (abortCtrl.signal.aborted) {
6824
6817
  throw new DOMException("Export cancelled", "AbortError");
@@ -6829,7 +6822,7 @@ function useExportSaveAs(input) {
6829
6822
  setExportProgress(95);
6830
6823
  setExportStatusMessage("Downloading...");
6831
6824
  const baseName = pptxFilename.replace(/\.[^.]+$/u, "");
6832
- chunk46Z6MNRS_js.downloadBlob(zipBlob, `${baseName}-package.zip`);
6825
+ chunkUTTXH3GH_js.downloadBlob(zipBlob, `${baseName}-package.zip`);
6833
6826
  setExportProgress(100);
6834
6827
  } catch (err) {
6835
6828
  if (err.name !== "AbortError") {
@@ -6852,7 +6845,7 @@ function useExportSaveAs(input) {
6852
6845
  const blob = new Blob([data], {
6853
6846
  type: "application/vnd.openxmlformats-officedocument.presentationml.presentation"
6854
6847
  });
6855
- chunk46Z6MNRS_js.downloadBlob(blob, `${baseName}.${ext}`);
6848
+ chunkUTTXH3GH_js.downloadBlob(blob, `${baseName}.${ext}`);
6856
6849
  } catch (err) {
6857
6850
  console.error(`[PowerPointViewer] Save as .${ext} failed:`, err);
6858
6851
  }
@@ -6872,7 +6865,7 @@ function useExportSaveAs(input) {
6872
6865
  guides: pptxGuides.length > 0 ? pptxGuides : void 0
6873
6866
  };
6874
6867
  });
6875
- const slidesToSave = chunkLDF77JJD_js.buildSaveSlides(slidesWithGuides, templateElementsBySlideId);
6868
+ const slidesToSave = chunkRNZJKGA7_js.buildSaveSlides(slidesWithGuides, templateElementsBySlideId);
6876
6869
  const saveOptions = {
6877
6870
  headerFooter,
6878
6871
  presentationProperties,
@@ -6929,7 +6922,7 @@ function safeConfirm(message) {
6929
6922
  }
6930
6923
  }
6931
6924
  function downloadBlob2(blob, filename) {
6932
- chunk46Z6MNRS_js.downloadBlob(blob, chunk46Z6MNRS_js.sanitizeDownloadFilename(filename));
6925
+ chunkUTTXH3GH_js.downloadBlob(blob, chunkUTTXH3GH_js.sanitizeDownloadFilename(filename));
6933
6926
  }
6934
6927
 
6935
6928
  // src/viewer/hooks/useExportHandlers.ts
@@ -7030,21 +7023,21 @@ function useExportHandlers(input) {
7030
7023
  {
7031
7024
  scale: 2,
7032
7025
  onProgress: (current, total) => {
7033
- setExportProgress(chunk46Z6MNRS_js.slideProgressPercent(current, total));
7034
- setExportStatusMessage(chunk46Z6MNRS_js.slideStatusLabel("Rendering", current, total));
7026
+ setExportProgress(chunkUTTXH3GH_js.slideProgressPercent(current, total));
7027
+ setExportStatusMessage(chunkUTTXH3GH_js.slideStatusLabel("Rendering", current, total));
7035
7028
  },
7036
7029
  signal: abortCtrl.signal
7037
7030
  }
7038
7031
  );
7039
- setExportProgress(chunk46Z6MNRS_js.EXPORT_ASSEMBLING_PERCENT);
7032
+ setExportProgress(chunkUTTXH3GH_js.EXPORT_ASSEMBLING_PERCENT);
7040
7033
  setExportStatusMessage("Building PDF...");
7041
7034
  await new Promise((r) => {
7042
7035
  setTimeout(r, 100);
7043
7036
  });
7044
- setExportProgress(chunk46Z6MNRS_js.EXPORT_DONE_PERCENT);
7037
+ setExportProgress(chunkUTTXH3GH_js.EXPORT_DONE_PERCENT);
7045
7038
  setExportStatusMessage("Done!");
7046
7039
  } catch (err) {
7047
- if (!chunk46Z6MNRS_js.isExportAbortError(err)) {
7040
+ if (!chunkUTTXH3GH_js.isExportAbortError(err)) {
7048
7041
  console.error("[PowerPointViewer] PDF export failed:", err);
7049
7042
  }
7050
7043
  } finally {
@@ -7074,21 +7067,21 @@ function useExportHandlers(input) {
7074
7067
  {
7075
7068
  scale: 2,
7076
7069
  onProgress: (current, total) => {
7077
- setExportProgress(chunk46Z6MNRS_js.slideProgressPercent(current, total));
7078
- setExportStatusMessage(chunk46Z6MNRS_js.slideStatusLabel("Rendering", current, total));
7070
+ setExportProgress(chunkUTTXH3GH_js.slideProgressPercent(current, total));
7071
+ setExportStatusMessage(chunkUTTXH3GH_js.slideStatusLabel("Rendering", current, total));
7079
7072
  },
7080
7073
  signal: abortCtrl.signal
7081
7074
  }
7082
7075
  );
7083
- setExportProgress(chunk46Z6MNRS_js.EXPORT_ASSEMBLING_PERCENT);
7076
+ setExportProgress(chunkUTTXH3GH_js.EXPORT_ASSEMBLING_PERCENT);
7084
7077
  setExportStatusMessage("Building PDF...");
7085
7078
  await new Promise((r) => {
7086
7079
  setTimeout(r, 100);
7087
7080
  });
7088
- setExportProgress(chunk46Z6MNRS_js.EXPORT_DONE_PERCENT);
7081
+ setExportProgress(chunkUTTXH3GH_js.EXPORT_DONE_PERCENT);
7089
7082
  setExportStatusMessage("Done!");
7090
7083
  } catch (err) {
7091
- if (!chunk46Z6MNRS_js.isExportAbortError(err)) {
7084
+ if (!chunkUTTXH3GH_js.isExportAbortError(err)) {
7092
7085
  console.error("[PowerPointViewer] Notes PDF export failed:", err);
7093
7086
  }
7094
7087
  } finally {
@@ -7129,22 +7122,22 @@ function useExportHandlers(input) {
7129
7122
  scale: 1,
7130
7123
  slideDurationMs: 3e3,
7131
7124
  onProgress: (current, total) => {
7132
- setExportProgress(chunk46Z6MNRS_js.slideProgressPercent(current, total, 45));
7133
- setExportStatusMessage(chunk46Z6MNRS_js.slideStatusLabel("Capturing", current, total));
7125
+ setExportProgress(chunkUTTXH3GH_js.slideProgressPercent(current, total, 45));
7126
+ setExportStatusMessage(chunkUTTXH3GH_js.slideStatusLabel("Capturing", current, total));
7134
7127
  },
7135
7128
  onRecordProgress: (current, total) => {
7136
- setExportProgress(chunk46Z6MNRS_js.recordProgressPercent(current, total));
7137
- setExportStatusMessage(chunk46Z6MNRS_js.slideStatusLabel("Recording", current, total));
7129
+ setExportProgress(chunkUTTXH3GH_js.recordProgressPercent(current, total));
7130
+ setExportStatusMessage(chunkUTTXH3GH_js.slideStatusLabel("Recording", current, total));
7138
7131
  },
7139
7132
  signal: abortCtrl.signal
7140
7133
  }
7141
7134
  );
7142
- setExportProgress(chunk46Z6MNRS_js.EXPORT_ASSEMBLING_PERCENT);
7135
+ setExportProgress(chunkUTTXH3GH_js.EXPORT_ASSEMBLING_PERCENT);
7143
7136
  setExportStatusMessage("Saving file...");
7144
7137
  downloadBlob2(blob, "presentation.webm");
7145
- setExportProgress(chunk46Z6MNRS_js.EXPORT_DONE_PERCENT);
7138
+ setExportProgress(chunkUTTXH3GH_js.EXPORT_DONE_PERCENT);
7146
7139
  } catch (err) {
7147
- if (!chunk46Z6MNRS_js.isExportAbortError(err)) {
7140
+ if (!chunkUTTXH3GH_js.isExportAbortError(err)) {
7148
7141
  console.error("[PowerPointViewer] Video export failed:", err);
7149
7142
  }
7150
7143
  } finally {
@@ -7172,18 +7165,18 @@ function useExportHandlers(input) {
7172
7165
  scale: 0.5,
7173
7166
  slideDurationMs: 2e3,
7174
7167
  onProgress: (current, total) => {
7175
- setExportProgress(chunk46Z6MNRS_js.slideProgressPercent(current, total));
7176
- setExportStatusMessage(chunk46Z6MNRS_js.slideStatusLabel("Encoding", current, total));
7168
+ setExportProgress(chunkUTTXH3GH_js.slideProgressPercent(current, total));
7169
+ setExportStatusMessage(chunkUTTXH3GH_js.slideStatusLabel("Encoding", current, total));
7177
7170
  },
7178
7171
  signal: abortCtrl.signal
7179
7172
  }
7180
7173
  );
7181
- setExportProgress(chunk46Z6MNRS_js.EXPORT_ASSEMBLING_PERCENT);
7174
+ setExportProgress(chunkUTTXH3GH_js.EXPORT_ASSEMBLING_PERCENT);
7182
7175
  setExportStatusMessage("Saving file...");
7183
7176
  downloadBlob2(blob, "presentation.gif");
7184
- setExportProgress(chunk46Z6MNRS_js.EXPORT_DONE_PERCENT);
7177
+ setExportProgress(chunkUTTXH3GH_js.EXPORT_DONE_PERCENT);
7185
7178
  } catch (err) {
7186
- if (!chunk46Z6MNRS_js.isExportAbortError(err)) {
7179
+ if (!chunkUTTXH3GH_js.isExportAbortError(err)) {
7187
7180
  console.error("[PowerPointViewer] GIF export failed:", err);
7188
7181
  }
7189
7182
  } finally {
@@ -7223,7 +7216,7 @@ function openPrintWindow(title, bodyHtml, orientation, colorFilter, frameSlides)
7223
7216
  }
7224
7217
  printWindow.document.open();
7225
7218
  printWindow.document.write(
7226
- chunk46Z6MNRS_js.buildPrintHtmlDocument({ title, bodyHtml, orientation, colorFilter, frameSlides })
7219
+ chunkUTTXH3GH_js.buildPrintHtmlDocument({ title, bodyHtml, orientation, colorFilter, frameSlides })
7227
7220
  );
7228
7221
  printWindow.document.close();
7229
7222
  printWindow.focus();
@@ -7284,7 +7277,7 @@ function usePrintHandlers(input) {
7284
7277
  if (svgs.length === 0) {
7285
7278
  return;
7286
7279
  }
7287
- const printDoc = chunk46Z6MNRS_js.buildPrintDocument(svgs, pptxData.width, pptxData.height, {
7280
+ const printDoc = chunkUTTXH3GH_js.buildPrintDocument(svgs, pptxData.width, pptxData.height, {
7288
7281
  title: "Slides (Vector)",
7289
7282
  orientation: settings.orientation,
7290
7283
  colorFilter
@@ -7320,7 +7313,7 @@ function usePrintHandlers(input) {
7320
7313
  if (settings.printWhat === "outline") {
7321
7314
  openPrintWindow(
7322
7315
  "Outline",
7323
- `<div class="outline-page">${chunk46Z6MNRS_js.buildOutlineHtml(slideIndices, slides)}</div>`,
7316
+ `<div class="outline-page">${chunkUTTXH3GH_js.buildOutlineHtml(slideIndices, slides)}</div>`,
7324
7317
  settings.orientation,
7325
7318
  colorFilter,
7326
7319
  settings.frameSlides
@@ -7345,7 +7338,7 @@ function usePrintHandlers(input) {
7345
7338
  if (settings.printWhat === "slides") {
7346
7339
  openPrintWindow(
7347
7340
  "Slides",
7348
- chunk46Z6MNRS_js.buildSlidesHtml(slideImages, slideIndices),
7341
+ chunkUTTXH3GH_js.buildSlidesHtml(slideImages, slideIndices),
7349
7342
  settings.orientation,
7350
7343
  colorFilter,
7351
7344
  settings.frameSlides
@@ -7355,7 +7348,7 @@ function usePrintHandlers(input) {
7355
7348
  if (settings.printWhat === "notes") {
7356
7349
  openPrintWindow(
7357
7350
  "Notes Pages",
7358
- chunk46Z6MNRS_js.buildNotesHtml(slideImages, slideIndices, slides),
7351
+ chunkUTTXH3GH_js.buildNotesHtml(slideImages, slideIndices, slides),
7359
7352
  "portrait",
7360
7353
  colorFilter,
7361
7354
  settings.frameSlides
@@ -7366,7 +7359,7 @@ function usePrintHandlers(input) {
7366
7359
  const spp = settings.slidesPerPage;
7367
7360
  openPrintWindow(
7368
7361
  `Handout ${spp} per page`,
7369
- chunk46Z6MNRS_js.buildHandoutsHtml(slideImages, slideIndices, spp),
7362
+ chunkUTTXH3GH_js.buildHandoutsHtml(slideImages, slideIndices, spp),
7370
7363
  "portrait",
7371
7364
  colorFilter,
7372
7365
  settings.frameSlides
@@ -7655,7 +7648,7 @@ function usePropertyHandlers(input) {
7655
7648
  width: canvasSize.width,
7656
7649
  height: canvasSize.height
7657
7650
  };
7658
- setCompareResult(chunk46Z6MNRS_js.comparePresentation(cur, other));
7651
+ setCompareResult(chunkUTTXH3GH_js.comparePresentation(cur, other));
7659
7652
  setIsComparePanelOpen(true);
7660
7653
  } catch (err) {
7661
7654
  console.warn("Compare failed:", err);
@@ -7672,7 +7665,7 @@ function usePropertyHandlers(input) {
7672
7665
  if (!diff || diff.status === "unchanged") {
7673
7666
  return;
7674
7667
  }
7675
- setSlides((prev) => chunk46Z6MNRS_js.applyAcceptSlide(prev, diff));
7668
+ setSlides((prev) => chunkUTTXH3GH_js.applyAcceptSlide(prev, diff));
7676
7669
  setIsDirty(true);
7677
7670
  },
7678
7671
  [compareResult, setSlides, setIsDirty]
@@ -7683,10 +7676,10 @@ function usePropertyHandlers(input) {
7683
7676
  if (!compareResult) {
7684
7677
  return;
7685
7678
  }
7686
- setSlides((prev) => chunk46Z6MNRS_js.applyAcceptAllSlides(prev, compareResult));
7679
+ setSlides((prev) => chunkUTTXH3GH_js.applyAcceptAllSlides(prev, compareResult));
7687
7680
  setIsDirty(true);
7688
7681
  }, [compareResult, setSlides, setIsDirty]);
7689
- const usedFontFamilies = react.useMemo(() => chunk46Z6MNRS_js.collectUsedFonts(slides), [slides]);
7682
+ const usedFontFamilies = react.useMemo(() => chunkUTTXH3GH_js.collectUsedFonts(slides), [slides]);
7690
7683
  return {
7691
7684
  handleUpdateNotes,
7692
7685
  handleUpdateSlide,
@@ -7805,7 +7798,7 @@ function useIsMobile(input) {
7805
7798
  const containerRef = input?.containerRef;
7806
7799
  const isTouchDevice = react.useSyncExternalStore(
7807
7800
  subscribeTouchCapability,
7808
- chunk46Z6MNRS_js.detectTouchDevice,
7801
+ chunkUTTXH3GH_js.detectTouchDevice,
7809
7802
  () => false
7810
7803
  // server snapshot
7811
7804
  );
@@ -7821,7 +7814,7 @@ function useIsMobile(input) {
7821
7814
  }
7822
7815
  return containerRef?.current?.clientHeight ?? window.innerHeight;
7823
7816
  });
7824
- const [orientation, setOrientation] = react.useState(chunk46Z6MNRS_js.detectOrientation);
7817
+ const [orientation, setOrientation] = react.useState(chunkUTTXH3GH_js.detectOrientation);
7825
7818
  const [isVirtualKeyboardOpen, setIsVirtualKeyboardOpen] = react.useState(false);
7826
7819
  const [initialViewportHeight] = react.useState(
7827
7820
  () => typeof window !== "undefined" ? window.innerHeight : 800
@@ -7865,7 +7858,7 @@ function useIsMobile(input) {
7865
7858
  return;
7866
7859
  }
7867
7860
  const handleOrientationChange = () => {
7868
- setOrientation(chunk46Z6MNRS_js.detectOrientation());
7861
+ setOrientation(chunkUTTXH3GH_js.detectOrientation());
7869
7862
  };
7870
7863
  if (screen.orientation) {
7871
7864
  screen.orientation.addEventListener("change", handleOrientationChange);
@@ -7895,9 +7888,9 @@ function useIsMobile(input) {
7895
7888
  window.addEventListener("resize", handleResize);
7896
7889
  return () => window.removeEventListener("resize", handleResize);
7897
7890
  }, [isTouchDevice, initialViewportHeight]);
7898
- const isMobile = chunk46Z6MNRS_js.isMobileViewport(containerWidth, containerHeight, isTouchDevice);
7899
- const isTablet = !isMobile && containerWidth >= chunk46Z6MNRS_js.MOBILE_BREAKPOINT && containerWidth < chunk46Z6MNRS_js.TABLET_BREAKPOINT;
7900
- const isDesktop = !isMobile && containerWidth >= chunk46Z6MNRS_js.TABLET_BREAKPOINT;
7891
+ const isMobile = chunkUTTXH3GH_js.isMobileViewport(containerWidth, containerHeight, isTouchDevice);
7892
+ const isTablet = !isMobile && containerWidth >= chunkUTTXH3GH_js.MOBILE_BREAKPOINT && containerWidth < chunkUTTXH3GH_js.TABLET_BREAKPOINT;
7893
+ const isDesktop = !isMobile && containerWidth >= chunkUTTXH3GH_js.TABLET_BREAKPOINT;
7901
7894
  return {
7902
7895
  isMobile,
7903
7896
  isTablet,
@@ -7958,11 +7951,11 @@ function useViewerDialogs(input) {
7958
7951
  );
7959
7952
  const [embedFontsEnabled, setEmbedFontsEnabled] = react.useState(false);
7960
7953
  const [isNarrowViewport, setIsNarrowViewport] = react.useState(
7961
- () => typeof window !== "undefined" ? chunk46Z6MNRS_js.isMobileViewport(window.innerWidth, window.innerHeight, viewportIsTouch()) : false
7954
+ () => typeof window !== "undefined" ? chunkUTTXH3GH_js.isMobileViewport(window.innerWidth, window.innerHeight, viewportIsTouch()) : false
7962
7955
  );
7963
7956
  react.useEffect(() => {
7964
7957
  const handleWindow = () => setIsNarrowViewport(
7965
- chunk46Z6MNRS_js.isMobileViewport(window.innerWidth, window.innerHeight, viewportIsTouch())
7958
+ chunkUTTXH3GH_js.isMobileViewport(window.innerWidth, window.innerHeight, viewportIsTouch())
7966
7959
  );
7967
7960
  let observer = null;
7968
7961
  let raf = 0;
@@ -7976,12 +7969,12 @@ function useViewerDialogs(input) {
7976
7969
  const entry = entries[0];
7977
7970
  if (entry) {
7978
7971
  setIsNarrowViewport(
7979
- chunk46Z6MNRS_js.isMobileViewport(entry.contentRect.width, entry.contentRect.height, viewportIsTouch())
7972
+ chunkUTTXH3GH_js.isMobileViewport(entry.contentRect.width, entry.contentRect.height, viewportIsTouch())
7980
7973
  );
7981
7974
  }
7982
7975
  });
7983
7976
  observer.observe(el);
7984
- setIsNarrowViewport(chunk46Z6MNRS_js.isMobileViewport(el.clientWidth, el.clientHeight, viewportIsTouch()));
7977
+ setIsNarrowViewport(chunkUTTXH3GH_js.isMobileViewport(el.clientWidth, el.clientHeight, viewportIsTouch()));
7985
7978
  };
7986
7979
  attach();
7987
7980
  window.addEventListener("resize", handleWindow);
@@ -8139,12 +8132,12 @@ function useViewerDialogs(input) {
8139
8132
  }
8140
8133
  function computeGridSpacingPx(presentationGridSpacing) {
8141
8134
  if (presentationGridSpacing) {
8142
- const px = Math.round(presentationGridSpacing.cx / chunkLDF77JJD_js.EMU_PER_PX);
8135
+ const px = Math.round(presentationGridSpacing.cx / chunkRNZJKGA7_js.EMU_PER_PX);
8143
8136
  if (px > 0) {
8144
8137
  return px;
8145
8138
  }
8146
8139
  }
8147
- return chunkLDF77JJD_js.GRID_SIZE;
8140
+ return chunkRNZJKGA7_js.GRID_SIZE;
8148
8141
  }
8149
8142
  function computeVisibleSlideIndexes(slides, activeCustomShowId, customShows) {
8150
8143
  if (activeCustomShowId) {
@@ -8158,8 +8151,8 @@ function computeVisibleSlideIndexes(slides, activeCustomShowId, customShows) {
8158
8151
  return slides.map((_, i) => i).filter((i) => !slides[i]?.hidden);
8159
8152
  }
8160
8153
  function computeSlideSectionGroups(slides, sections) {
8161
- return chunk46Z6MNRS_js.groupSlidesBySection(sections, slides).map((group) => ({
8162
- id: group.section?.id ?? (sections.length > 0 ? chunkLDF77JJD_js.UNGROUPED_SECTION_ID : "default"),
8154
+ return chunkUTTXH3GH_js.groupSlidesBySection(sections, slides).map((group) => ({
8155
+ id: group.section?.id ?? (sections.length > 0 ? chunkRNZJKGA7_js.UNGROUPED_SECTION_ID : "default"),
8163
8156
  label: group.section?.name ?? (sections.length > 0 ? "Ungrouped Slides" : "Slides"),
8164
8157
  slideIndexes: group.slideIndexes,
8165
8158
  ...group.section?.color !== void 0 ? { color: group.section.color } : {},
@@ -8214,7 +8207,7 @@ function useDerivedSlideState(input) {
8214
8207
  );
8215
8208
  const slideSectionGroups = react.useMemo(
8216
8209
  () => computeSlideSectionGroups(slides, sections).map((group) => {
8217
- if (group.id === chunkLDF77JJD_js.UNGROUPED_SECTION_ID && group.label === "Ungrouped Slides") {
8210
+ if (group.id === chunkRNZJKGA7_js.UNGROUPED_SECTION_ID && group.label === "Ungrouped Slides") {
8218
8211
  return { ...group, label: t("pptx.slides.ungroupedSlides") };
8219
8212
  }
8220
8213
  if (group.id === "default" && group.label === "Slides") {
@@ -8320,7 +8313,7 @@ function useAnnotationHandlers(input) {
8320
8313
  if (nextMode === "present") {
8321
8314
  presentation.enterPresentMode();
8322
8315
  } else if (mode === "present" && annotations.hasAnyAnnotations) {
8323
- chunkLDF77JJD_js.stopAllPersistentAudio();
8316
+ chunkRNZJKGA7_js.stopAllPersistentAudio();
8324
8317
  pendingModeAfterAnnotationsRef.current = nextMode;
8325
8318
  if (promptKeepInkAnnotations) {
8326
8319
  setShowKeepAnnotationsDialog(true);
@@ -8329,7 +8322,7 @@ function useAnnotationHandlers(input) {
8329
8322
  }
8330
8323
  } else {
8331
8324
  if (mode === "present") {
8332
- chunkLDF77JJD_js.stopAllPersistentAudio();
8325
+ chunkRNZJKGA7_js.stopAllPersistentAudio();
8333
8326
  }
8334
8327
  setMode(nextMode);
8335
8328
  }
@@ -8401,7 +8394,7 @@ function useSerialize(input) {
8401
8394
  return {
8402
8395
  ...el,
8403
8396
  text: pendingEditText,
8404
- textSegments: chunk46Z6MNRS_js.remapTextToSegments(pendingEditText, el.textSegments, el.textStyle)
8397
+ textSegments: chunkUTTXH3GH_js.remapTextToSegments(pendingEditText, el.textSegments, el.textStyle)
8405
8398
  };
8406
8399
  });
8407
8400
  if (updatedElements.some((el, i) => el !== slide.elements[i])) {
@@ -8421,7 +8414,7 @@ function useSerialize(input) {
8421
8414
  guides: pptxGuides.length > 0 ? pptxGuides : void 0
8422
8415
  };
8423
8416
  });
8424
- const slidesToSave = chunkLDF77JJD_js.buildSaveSlides(slidesWithGuides, templateElementsBySlideId);
8417
+ const slidesToSave = chunkRNZJKGA7_js.buildSaveSlides(slidesWithGuides, templateElementsBySlideId);
8425
8418
  const saveOptions = {
8426
8419
  headerFooter,
8427
8420
  presentationProperties,
@@ -8595,7 +8588,7 @@ function usePresentationSetup(input) {
8595
8588
  setShowKeepAnnotationsDialog(true);
8596
8589
  } else {
8597
8590
  if (mode === "present" && nextMode !== "present") {
8598
- chunkLDF77JJD_js.stopAllPersistentAudio();
8591
+ chunkRNZJKGA7_js.stopAllPersistentAudio();
8599
8592
  stopAnimationSound();
8600
8593
  }
8601
8594
  setMode(nextMode);
@@ -8643,15 +8636,16 @@ function usePresentationSetup(input) {
8643
8636
  }
8644
8637
  })();
8645
8638
  },
8646
- onToggleLaser: () => annotations.setPresentationTool("laser"),
8647
- onTogglePen: () => annotations.setPresentationTool("pen"),
8648
- onToggleEraser: () => annotations.setPresentationTool("eraser"),
8639
+ // PowerPoint's Ctrl+A "arrow" is the plain pointer, i.e. no active tool.
8640
+ onSetPointerTool: (tool) => annotations.setPresentationTool(tool === "arrow" ? "none" : tool),
8641
+ onEraseAnnotations: () => annotations.clearAnnotations(),
8642
+ onToggleInkMarkup: () => annotations.setInkMarkupVisible(!annotations.inkMarkupVisible),
8649
8643
  onToggleToolbar: () => annotations.setToolbarVisible(!annotations.toolbarVisible),
8650
8644
  onSaveRehearsalTimings: (timings) => {
8651
- setSlides((prev) => chunk46Z6MNRS_js.applyRehearsalTimings(prev, timings));
8645
+ setSlides((prev) => chunkUTTXH3GH_js.applyRehearsalTimings(prev, timings));
8652
8646
  history.markDirty();
8653
8647
  },
8654
- loopContinuously: chunk46Z6MNRS_js.shouldLoopContinuously(presentationProperties),
8648
+ loopContinuously: chunkUTTXH3GH_js.shouldLoopContinuously(presentationProperties),
8655
8649
  showWithAnimation: presentationProperties.showWithAnimation,
8656
8650
  useTimings: presentationProperties.advanceMode !== "manual",
8657
8651
  endWithBlackSlide
@@ -8813,7 +8807,7 @@ function useEditorOperations(input) {
8813
8807
  const { formatPainterActive, setFormatPainterActive, elementLookup } = state;
8814
8808
  react.useEffect(() => {
8815
8809
  if (formatPainterActive && !prevFormatPainterRef.current && selectedElement) {
8816
- copiedFormatRef.current = chunk46Z6MNRS_js.copyFormatFromElement(selectedElement);
8810
+ copiedFormatRef.current = chunkUTTXH3GH_js.copyFormatFromElement(selectedElement);
8817
8811
  } else if (!formatPainterActive) {
8818
8812
  copiedFormatRef.current = null;
8819
8813
  }
@@ -8839,7 +8833,7 @@ function useEditorOperations(input) {
8839
8833
  e.stopPropagation();
8840
8834
  const element = elementLookup.get(elementId);
8841
8835
  if (element) {
8842
- const updated = chunk46Z6MNRS_js.applyFormatToElement(element, copiedFormatRef.current);
8836
+ const updated = chunkUTTXH3GH_js.applyFormatToElement(element, copiedFormatRef.current);
8843
8837
  const updates = {};
8844
8838
  if (chunkCLNGAVNH_js.hasShapeProperties(updated)) {
8845
8839
  updates.shapeStyle = updated.shapeStyle;
@@ -9560,7 +9554,7 @@ function useViewerIntegration(input) {
9560
9554
  return zoom.scale;
9561
9555
  },
9562
9556
  setZoom(level) {
9563
- zoom.setScale(Math.min(Math.max(level, chunkLDF77JJD_js.MIN_ZOOM_SCALE), chunkLDF77JJD_js.MAX_ZOOM_SCALE));
9557
+ zoom.setScale(Math.min(Math.max(level, chunkRNZJKGA7_js.MIN_ZOOM_SCALE), chunkRNZJKGA7_js.MAX_ZOOM_SCALE));
9564
9558
  },
9565
9559
  zoomIn() {
9566
9560
  zoom.handleZoomIn();
@@ -9775,7 +9769,7 @@ function useReducedMotion() {
9775
9769
  }
9776
9770
  function useViewerOptions() {
9777
9771
  const storeRef = react.useRef(null);
9778
- storeRef.current ??= chunk46Z6MNRS_js.createViewerOptionsStore();
9772
+ storeRef.current ??= chunkUTTXH3GH_js.createViewerOptionsStore();
9779
9773
  const store = storeRef.current;
9780
9774
  const options = react.useSyncExternalStore(
9781
9775
  (onStoreChange) => store.subscribe(onStoreChange),
@@ -9784,9 +9778,9 @@ function useViewerOptions() {
9784
9778
  );
9785
9779
  return { optionsStore: store, options };
9786
9780
  }
9787
- var KNOWN_TAB_IDS = new Set(chunk46Z6MNRS_js.TOOLBAR_TABS.map((tab) => tab.id));
9781
+ var KNOWN_TAB_IDS = new Set(chunkUTTXH3GH_js.TOOLBAR_TABS.map((tab) => tab.id));
9788
9782
  function computeToolbarVisibility(hiddenActions) {
9789
- const isHidden = (id) => chunk46Z6MNRS_js.isActionHidden(id, hiddenActions);
9783
+ const isHidden = (id) => chunkUTTXH3GH_js.isActionHidden(id, hiddenActions);
9790
9784
  const isTabVisible = (id) => !KNOWN_TAB_IDS.has(id) || !isHidden(id);
9791
9785
  return { isHidden, isTabVisible };
9792
9786
  }
@@ -9874,10 +9868,10 @@ function useYjsDocumentSync({
9874
9868
  const { PptxHandler: PptxHandler2 } = await import('./dist-4LUVI3SW.js');
9875
9869
  const handler = new PptxHandler2();
9876
9870
  await handler.load(sourceBytes.buffer);
9877
- const currentSlides = chunk46Z6MNRS_js.readSlidesFromYDoc(
9871
+ const currentSlides = chunkUTTXH3GH_js.readSlidesFromYDoc(
9878
9872
  doc
9879
9873
  );
9880
- const slidesToSave = chunkLDF77JJD_js.buildSaveSlides(currentSlides, templateElementsBySlideId);
9874
+ const slidesToSave = chunkRNZJKGA7_js.buildSaveSlides(currentSlides, templateElementsBySlideId);
9881
9875
  const bytes = await handler.save(slidesToSave);
9882
9876
  config.onWriteBack(bytes);
9883
9877
  } catch {
@@ -9892,7 +9886,7 @@ function useYjsDocumentSync({
9892
9886
  if (!doc || !isConnected) {
9893
9887
  return;
9894
9888
  }
9895
- const docSlides = chunk46Z6MNRS_js.readSlidesFromYDoc(
9889
+ const docSlides = chunkUTTXH3GH_js.readSlidesFromYDoc(
9896
9890
  doc
9897
9891
  );
9898
9892
  if (docSlides.length === 0) {
@@ -9914,11 +9908,11 @@ function useYjsDocumentSync({
9914
9908
  lastSyncedRef.current = serialized;
9915
9909
  void (async () => {
9916
9910
  const factories = await getFactories();
9917
- chunk46Z6MNRS_js.reconcileSlidesInYDoc(
9911
+ chunkUTTXH3GH_js.reconcileSlidesInYDoc(
9918
9912
  slides,
9919
9913
  doc,
9920
9914
  factories,
9921
- chunk46Z6MNRS_js.LOCAL_SYNC_ORIGIN
9915
+ chunkUTTXH3GH_js.LOCAL_SYNC_ORIGIN
9922
9916
  );
9923
9917
  scheduleWriteBack();
9924
9918
  })();
@@ -9932,10 +9926,10 @@ function useYjsDocumentSync({
9932
9926
  return;
9933
9927
  }
9934
9928
  const handleChange = (_events, transaction) => {
9935
- if (transaction?.origin === chunk46Z6MNRS_js.LOCAL_SYNC_ORIGIN) {
9929
+ if (transaction?.origin === chunkUTTXH3GH_js.LOCAL_SYNC_ORIGIN) {
9936
9930
  return;
9937
9931
  }
9938
- const remoteSlides = chunk46Z6MNRS_js.readSlidesFromYDoc(
9932
+ const remoteSlides = chunkUTTXH3GH_js.readSlidesFromYDoc(
9939
9933
  doc
9940
9934
  );
9941
9935
  if (remoteSlides.length === 0) {
@@ -9951,7 +9945,7 @@ function useYjsDocumentSync({
9951
9945
  isApplyingRemoteRef.current = false;
9952
9946
  scheduleWriteBack();
9953
9947
  };
9954
- const unobserve = chunk46Z6MNRS_js.observeYDocSlides(
9948
+ const unobserve = chunkUTTXH3GH_js.observeYDocSlides(
9955
9949
  doc,
9956
9950
  handleChange
9957
9951
  );
@@ -9989,7 +9983,7 @@ function useBroadcastFollower({
9989
9983
  if (!broadcaster) {
9990
9984
  return;
9991
9985
  }
9992
- if (!chunk46Z6MNRS_js.shouldAutoFollowBroadcaster({
9986
+ if (!chunkUTTXH3GH_js.shouldAutoFollowBroadcaster({
9993
9987
  localRole: collab.config.role,
9994
9988
  broadcasterRole: broadcaster.role
9995
9989
  })) {
@@ -10149,10 +10143,10 @@ function useTouchGestures(input) {
10149
10143
  if (!el || !enabled) {
10150
10144
  return;
10151
10145
  }
10152
- const recognizer = chunk46Z6MNRS_js.createTouchGestureRecognizer({
10146
+ const recognizer = chunkUTTXH3GH_js.createTouchGestureRecognizer({
10153
10147
  getScale: () => scaleRef.current,
10154
- minScale: chunkLDF77JJD_js.MIN_ZOOM_SCALE,
10155
- maxScale: chunkLDF77JJD_js.MAX_ZOOM_SCALE,
10148
+ minScale: chunkRNZJKGA7_js.MIN_ZOOM_SCALE,
10149
+ maxScale: chunkRNZJKGA7_js.MAX_ZOOM_SCALE,
10156
10150
  callbacks: {
10157
10151
  onPinchZoom: (newScale) => callbacksRef.current.onPinchZoom?.(newScale),
10158
10152
  onSwipe: (direction) => callbacksRef.current.onSwipe?.(direction),
@@ -10192,7 +10186,7 @@ function scrollFocusedIntoView(keyboardInset) {
10192
10186
  return;
10193
10187
  }
10194
10188
  const rect = active.getBoundingClientRect();
10195
- const delta = chunk46Z6MNRS_js.computeScrollDelta(
10189
+ const delta = chunkUTTXH3GH_js.computeScrollDelta(
10196
10190
  { top: rect.top, bottom: rect.bottom },
10197
10191
  window.innerHeight,
10198
10192
  keyboardInset
@@ -10212,8 +10206,8 @@ function useKeyboardInsets(enabled = true) {
10212
10206
  return;
10213
10207
  }
10214
10208
  const update = () => {
10215
- const metrics = chunk46Z6MNRS_js.readViewportMetrics(window);
10216
- const inset = metrics ? chunk46Z6MNRS_js.computeKeyboardInset(metrics) : 0;
10209
+ const metrics = chunkUTTXH3GH_js.readViewportMetrics(window);
10210
+ const inset = metrics ? chunkUTTXH3GH_js.computeKeyboardInset(metrics) : 0;
10217
10211
  setKeyboardInset(inset);
10218
10212
  if (inset > 0) {
10219
10213
  window.requestAnimationFrame(() => scrollFocusedIntoView(inset));
@@ -10224,8 +10218,8 @@ function useKeyboardInsets(enabled = true) {
10224
10218
  vv.addEventListener("scroll", update);
10225
10219
  const onFocusIn = () => {
10226
10220
  window.requestAnimationFrame(() => {
10227
- const metrics = chunk46Z6MNRS_js.readViewportMetrics(window);
10228
- const inset = metrics ? chunk46Z6MNRS_js.computeKeyboardInset(metrics) : 0;
10221
+ const metrics = chunkUTTXH3GH_js.readViewportMetrics(window);
10222
+ const inset = metrics ? chunkUTTXH3GH_js.computeKeyboardInset(metrics) : 0;
10229
10223
  if (inset > 0) {
10230
10224
  scrollFocusedIntoView(inset);
10231
10225
  }
@@ -10238,7 +10232,7 @@ function useKeyboardInsets(enabled = true) {
10238
10232
  document.removeEventListener("focusin", onFocusIn);
10239
10233
  };
10240
10234
  }, [enabled]);
10241
- return { keyboardInset, isKeyboardOpen: chunk46Z6MNRS_js.isKeyboardOpen(keyboardInset) };
10235
+ return { keyboardInset, isKeyboardOpen: chunkUTTXH3GH_js.isKeyboardOpen(keyboardInset) };
10242
10236
  }
10243
10237
 
10244
10238
  // src/viewer/hooks/useViewerBuildingBlocks-canvas-props.ts
@@ -10293,13 +10287,13 @@ function buildCanvasProps(input) {
10293
10287
  if (mode === "present") {
10294
10288
  presentation.handlePresentationAction(action);
10295
10289
  } else if (action.url) {
10296
- chunk46Z6MNRS_js.safeOpenUrl(action.url);
10290
+ chunkUTTXH3GH_js.safeOpenUrl(action.url);
10297
10291
  }
10298
10292
  };
10299
10293
  const handleHyperlinkClick = (url) => {
10300
- if (chunk46Z6MNRS_js.isPpactionUrl(url)) {
10294
+ if (chunkUTTXH3GH_js.isPpactionUrl(url)) {
10301
10295
  if (mode === "present") {
10302
- const parsed = chunk46Z6MNRS_js.parsePpactionUrl(url);
10296
+ const parsed = chunkUTTXH3GH_js.parsePpactionUrl(url);
10303
10297
  if (parsed) {
10304
10298
  presentation.handlePresentationAction({
10305
10299
  action: parsed.action,
@@ -10309,7 +10303,7 @@ function buildCanvasProps(input) {
10309
10303
  }
10310
10304
  return;
10311
10305
  }
10312
- chunk46Z6MNRS_js.safeOpenUrl(url);
10306
+ chunkUTTXH3GH_js.safeOpenUrl(url);
10313
10307
  };
10314
10308
  return {
10315
10309
  activeSlide: effectiveSlide,
@@ -10629,7 +10623,7 @@ function buildToolbarProps(input) {
10629
10623
  onOpenFile,
10630
10624
  onOpenRecentFile,
10631
10625
  onCreatePresentation: (templateId) => {
10632
- s.setSlides(chunk46Z6MNRS_js.createBackstagePresentation(templateId));
10626
+ s.setSlides(chunkUTTXH3GH_js.createBackstagePresentation(templateId));
10633
10627
  s.setActiveSlideIndex(0);
10634
10628
  s.setSelectedElementId(null);
10635
10629
  s.setSelectedElementIds([]);
@@ -10684,7 +10678,7 @@ function buildToolbarProps(input) {
10684
10678
  isCommentsPanelOpen: s.isInspectorPaneOpen,
10685
10679
  slideCommentCount: activeSlide?.comments?.length ?? 0,
10686
10680
  formatPainterActive: s.formatPainterActive,
10687
- canActivateFormatPainter: chunk46Z6MNRS_js.hasCopyableFormat(selectedElement),
10681
+ canActivateFormatPainter: chunkUTTXH3GH_js.hasCopyableFormat(selectedElement),
10688
10682
  onToggleFormatPainter: () => s.setFormatPainterActive((p) => !p),
10689
10683
  isSelectionPaneOpen: s.isSelectionPaneOpen,
10690
10684
  onToggleSelectionPane: () => s.setIsSelectionPaneOpen((p) => !p),
@@ -10947,7 +10941,7 @@ function useViewerBuildingBlocks(input) {
10947
10941
  }, [incomingContent]);
10948
10942
  const onOpenFile = react.useCallback(() => {
10949
10943
  void (async () => {
10950
- const picked = await chunk46Z6MNRS_js.openPptxFile();
10944
+ const picked = await chunkUTTXH3GH_js.openPptxFile();
10951
10945
  if (picked) {
10952
10946
  setContent(picked.buffer);
10953
10947
  }
@@ -10955,7 +10949,7 @@ function useViewerBuildingBlocks(input) {
10955
10949
  }, []);
10956
10950
  const onOpenRecentFile = react.useCallback((key) => {
10957
10951
  void (async () => {
10958
- const bytes = await chunk46Z6MNRS_js.readBackstageRecentFile(key);
10952
+ const bytes = await chunkUTTXH3GH_js.readBackstageRecentFile(key);
10959
10953
  if (bytes) {
10960
10954
  setContent(bytes);
10961
10955
  }