pptx-react-viewer 3.12.0 → 3.13.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 (135) hide show
  1. package/CHANGELOG.md +30 -0
  2. package/dist/{AiChatPanel-TXCDQDHD.js → AiChatPanel-E53JJRZX.js} +24 -24
  3. package/dist/AiChatPanel-E53JJRZX.js.br +0 -0
  4. package/dist/AiChatPanel-E53JJRZX.js.gz +0 -0
  5. package/dist/{AiChatPanel-SCA4RLFI.mjs → AiChatPanel-JTXC5WWH.mjs} +3 -3
  6. package/dist/AiChatPanel-JTXC5WWH.mjs.br +0 -0
  7. package/dist/AiChatPanel-JTXC5WWH.mjs.gz +0 -0
  8. package/dist/{Area3DChartScene-YAK6W2J5.js → Area3DChartScene-J7G54OH4.js} +2 -2
  9. package/dist/{Area3DChartScene-YAK6W2J5.js.br → Area3DChartScene-J7G54OH4.js.br} +0 -0
  10. package/dist/Area3DChartScene-J7G54OH4.js.gz +0 -0
  11. package/dist/{Area3DChartScene-NSV5AIMM.mjs → Area3DChartScene-JQ2VU73H.mjs} +1 -1
  12. package/dist/Area3DChartScene-JQ2VU73H.mjs.br +0 -0
  13. package/dist/Area3DChartScene-JQ2VU73H.mjs.gz +0 -0
  14. package/dist/{Bar3DChartScene-DFJ7XK3Q.mjs → Bar3DChartScene-5HC7LYBH.mjs} +1 -1
  15. package/dist/Bar3DChartScene-5HC7LYBH.mjs.br +0 -0
  16. package/dist/Bar3DChartScene-5HC7LYBH.mjs.gz +0 -0
  17. package/dist/{Bar3DChartScene-WNBEX3TN.js → Bar3DChartScene-JV3A2P6O.js} +2 -2
  18. package/dist/{Bar3DChartScene-WNBEX3TN.js.br → Bar3DChartScene-JV3A2P6O.js.br} +0 -0
  19. package/dist/Bar3DChartScene-JV3A2P6O.js.gz +0 -0
  20. package/dist/{Line3DChartScene-TK6RPGET.mjs → Line3DChartScene-4ZAOOU7U.mjs} +1 -1
  21. package/dist/Line3DChartScene-4ZAOOU7U.mjs.br +0 -0
  22. package/dist/Line3DChartScene-4ZAOOU7U.mjs.gz +0 -0
  23. package/dist/{Line3DChartScene-PXA6WAQG.js → Line3DChartScene-7SN7TVKQ.js} +2 -2
  24. package/dist/{Line3DChartScene-PXA6WAQG.js.br → Line3DChartScene-7SN7TVKQ.js.br} +0 -0
  25. package/dist/Line3DChartScene-7SN7TVKQ.js.gz +0 -0
  26. package/dist/{Model3DScene-FJQOUWCV.js → Model3DScene-GQANXXQD.js} +2 -2
  27. package/dist/Model3DScene-GQANXXQD.js.br +0 -0
  28. package/dist/Model3DScene-GQANXXQD.js.gz +0 -0
  29. package/dist/{Model3DScene-7FZSQ3SP.mjs → Model3DScene-GWIBUQ2U.mjs} +1 -1
  30. package/dist/Model3DScene-GWIBUQ2U.mjs.br +0 -0
  31. package/dist/Model3DScene-GWIBUQ2U.mjs.gz +0 -0
  32. package/dist/{PieChart3DScene-P25IGVT6.js → PieChart3DScene-QPFDRMEA.js} +2 -2
  33. package/dist/{PieChart3DScene-P25IGVT6.js.br → PieChart3DScene-QPFDRMEA.js.br} +0 -0
  34. package/dist/PieChart3DScene-QPFDRMEA.js.gz +0 -0
  35. package/dist/{PieChart3DScene-KKZTAIFB.mjs → PieChart3DScene-RDTOLFTD.mjs} +1 -1
  36. package/dist/PieChart3DScene-RDTOLFTD.mjs.br +0 -0
  37. package/dist/PieChart3DScene-RDTOLFTD.mjs.gz +0 -0
  38. package/dist/{SurfaceChart3DScene-LWJCERTR.mjs → SurfaceChart3DScene-5JQCRWA5.mjs} +1 -1
  39. package/dist/SurfaceChart3DScene-5JQCRWA5.mjs.br +0 -0
  40. package/dist/SurfaceChart3DScene-5JQCRWA5.mjs.gz +0 -0
  41. package/dist/{SurfaceChart3DScene-36MT6QAK.js → SurfaceChart3DScene-JLYGC7QU.js} +2 -2
  42. package/dist/{SurfaceChart3DScene-36MT6QAK.js.br → SurfaceChart3DScene-JLYGC7QU.js.br} +0 -0
  43. package/dist/SurfaceChart3DScene-JLYGC7QU.js.gz +0 -0
  44. package/dist/{chunk-45AVHO7M.js → chunk-G2Z7QULX.js} +5 -5
  45. package/dist/chunk-G2Z7QULX.js.br +0 -0
  46. package/dist/chunk-G2Z7QULX.js.gz +0 -0
  47. package/dist/{chunk-AARQTIMN.js → chunk-H3GHGSGW.js} +533 -483
  48. package/dist/chunk-H3GHGSGW.js.br +0 -0
  49. package/dist/chunk-H3GHGSGW.js.gz +0 -0
  50. package/dist/{chunk-2FSNTJVI.mjs → chunk-HB7DJENT.mjs} +1 -1
  51. package/dist/chunk-HB7DJENT.mjs.br +0 -0
  52. package/dist/chunk-HB7DJENT.mjs.gz +0 -0
  53. package/dist/{chunk-O27KNZLJ.js → chunk-IVCYND7A.js} +169 -169
  54. package/dist/chunk-IVCYND7A.js.br +0 -0
  55. package/dist/chunk-IVCYND7A.js.gz +0 -0
  56. package/dist/{chunk-WRHPPTYF.mjs → chunk-M7SNS3DQ.mjs} +103 -53
  57. package/dist/chunk-M7SNS3DQ.mjs.br +0 -0
  58. package/dist/chunk-M7SNS3DQ.mjs.gz +0 -0
  59. package/dist/{chunk-ZOEKVSSU.mjs → chunk-PKHTTHA2.mjs} +12 -12
  60. package/dist/chunk-PKHTTHA2.mjs.br +0 -0
  61. package/dist/chunk-PKHTTHA2.mjs.gz +0 -0
  62. package/dist/{chunk-C2BDHCL2.mjs → chunk-TS2DHMBS.mjs} +3443 -403
  63. package/dist/chunk-TS2DHMBS.mjs.br +0 -0
  64. package/dist/chunk-TS2DHMBS.mjs.gz +0 -0
  65. package/dist/{chunk-3WK4AE52.js → chunk-TWUAZRCG.js} +3450 -403
  66. package/dist/chunk-TWUAZRCG.js.br +0 -0
  67. package/dist/chunk-TWUAZRCG.js.gz +0 -0
  68. package/dist/{chunk-T7MY5L3O.js → chunk-UGVPKJSU.js} +1260 -1260
  69. package/dist/chunk-UGVPKJSU.js.br +0 -0
  70. package/dist/chunk-UGVPKJSU.js.gz +0 -0
  71. package/dist/{chunk-HXDNYDRJ.mjs → chunk-Y3SA5H5H.mjs} +4 -4
  72. package/dist/chunk-Y3SA5H5H.mjs.br +0 -0
  73. package/dist/chunk-Y3SA5H5H.mjs.gz +0 -0
  74. package/dist/index.js +45 -45
  75. package/dist/index.js.br +0 -0
  76. package/dist/index.js.gz +0 -0
  77. package/dist/index.mjs +5 -5
  78. package/dist/index.mjs.br +0 -0
  79. package/dist/index.mjs.gz +0 -0
  80. package/dist/internals.js +78 -78
  81. package/dist/internals.js.br +0 -0
  82. package/dist/internals.js.gz +0 -0
  83. package/dist/internals.mjs +3 -3
  84. package/dist/internals.mjs.br +0 -0
  85. package/dist/internals.mjs.gz +0 -0
  86. package/dist/viewer/index.js +26 -26
  87. package/dist/viewer/index.js.br +0 -0
  88. package/dist/viewer/index.js.gz +0 -0
  89. package/dist/viewer/index.mjs +5 -5
  90. package/dist/viewer/index.mjs.br +0 -0
  91. package/dist/viewer/index.mjs.gz +0 -0
  92. package/package.json +1 -1
  93. package/dist/AiChatPanel-SCA4RLFI.mjs.br +0 -0
  94. package/dist/AiChatPanel-SCA4RLFI.mjs.gz +0 -0
  95. package/dist/AiChatPanel-TXCDQDHD.js.br +0 -0
  96. package/dist/AiChatPanel-TXCDQDHD.js.gz +0 -0
  97. package/dist/Area3DChartScene-NSV5AIMM.mjs.br +0 -0
  98. package/dist/Area3DChartScene-NSV5AIMM.mjs.gz +0 -0
  99. package/dist/Area3DChartScene-YAK6W2J5.js.gz +0 -0
  100. package/dist/Bar3DChartScene-DFJ7XK3Q.mjs.br +0 -0
  101. package/dist/Bar3DChartScene-DFJ7XK3Q.mjs.gz +0 -0
  102. package/dist/Bar3DChartScene-WNBEX3TN.js.gz +0 -0
  103. package/dist/Line3DChartScene-PXA6WAQG.js.gz +0 -0
  104. package/dist/Line3DChartScene-TK6RPGET.mjs.br +0 -0
  105. package/dist/Line3DChartScene-TK6RPGET.mjs.gz +0 -0
  106. package/dist/Model3DScene-7FZSQ3SP.mjs.br +0 -0
  107. package/dist/Model3DScene-7FZSQ3SP.mjs.gz +0 -0
  108. package/dist/Model3DScene-FJQOUWCV.js.br +0 -0
  109. package/dist/Model3DScene-FJQOUWCV.js.gz +0 -0
  110. package/dist/PieChart3DScene-KKZTAIFB.mjs.br +0 -0
  111. package/dist/PieChart3DScene-KKZTAIFB.mjs.gz +0 -0
  112. package/dist/PieChart3DScene-P25IGVT6.js.gz +0 -0
  113. package/dist/SurfaceChart3DScene-36MT6QAK.js.gz +0 -0
  114. package/dist/SurfaceChart3DScene-LWJCERTR.mjs.br +0 -0
  115. package/dist/SurfaceChart3DScene-LWJCERTR.mjs.gz +0 -0
  116. package/dist/chunk-2FSNTJVI.mjs.br +0 -0
  117. package/dist/chunk-2FSNTJVI.mjs.gz +0 -0
  118. package/dist/chunk-3WK4AE52.js.br +0 -0
  119. package/dist/chunk-3WK4AE52.js.gz +0 -0
  120. package/dist/chunk-45AVHO7M.js.br +0 -0
  121. package/dist/chunk-45AVHO7M.js.gz +0 -0
  122. package/dist/chunk-AARQTIMN.js.br +0 -0
  123. package/dist/chunk-AARQTIMN.js.gz +0 -0
  124. package/dist/chunk-C2BDHCL2.mjs.br +0 -0
  125. package/dist/chunk-C2BDHCL2.mjs.gz +0 -0
  126. package/dist/chunk-HXDNYDRJ.mjs.br +0 -0
  127. package/dist/chunk-HXDNYDRJ.mjs.gz +0 -0
  128. package/dist/chunk-O27KNZLJ.js.br +0 -0
  129. package/dist/chunk-O27KNZLJ.js.gz +0 -0
  130. package/dist/chunk-T7MY5L3O.js.br +0 -0
  131. package/dist/chunk-T7MY5L3O.js.gz +0 -0
  132. package/dist/chunk-WRHPPTYF.mjs.br +0 -0
  133. package/dist/chunk-WRHPPTYF.mjs.gz +0 -0
  134. package/dist/chunk-ZOEKVSSU.mjs.br +0 -0
  135. package/dist/chunk-ZOEKVSSU.mjs.gz +0 -0
@@ -1,7 +1,7 @@
1
1
  'use strict';
2
2
 
3
- var chunkO27KNZLJ_js = require('./chunk-O27KNZLJ.js');
4
- var chunk3WK4AE52_js = require('./chunk-3WK4AE52.js');
3
+ var chunkIVCYND7A_js = require('./chunk-IVCYND7A.js');
4
+ var chunkTWUAZRCG_js = require('./chunk-TWUAZRCG.js');
5
5
  var chunk3AJ54EAB_js = require('./chunk-3AJ54EAB.js');
6
6
  var react = require('react');
7
7
  var reactI18next = require('react-i18next');
@@ -9,7 +9,7 @@ var reactI18next = require('react-i18next');
9
9
  function useVirtualizedSlides({
10
10
  totalItems,
11
11
  itemHeight,
12
- overscan = chunk3WK4AE52_js.DEFAULT_VIRTUAL_OVERSCAN
12
+ overscan = chunkTWUAZRCG_js.DEFAULT_VIRTUAL_OVERSCAN
13
13
  }) {
14
14
  const scrollContainerRef = react.useRef(null);
15
15
  const [scrollTop, setScrollTop] = react.useState(0);
@@ -39,7 +39,7 @@ function useVirtualizedSlides({
39
39
  resizeObserver?.disconnect();
40
40
  };
41
41
  }, []);
42
- const range = chunk3WK4AE52_js.computeVirtualRange(totalItems, itemHeight, scrollTop, viewportHeight, overscan);
42
+ const range = chunkTWUAZRCG_js.computeVirtualRange(totalItems, itemHeight, scrollTop, viewportHeight, overscan);
43
43
  const safeItemHeight = Math.max(itemHeight, 1);
44
44
  const scrollToIndex = react.useCallback(
45
45
  (index, behavior = "smooth") => {
@@ -80,7 +80,7 @@ function usePresenceTracking({
80
80
  }) {
81
81
  const [remoteUsers, setRemoteUsers] = react.useState([]);
82
82
  const projectorRef = react.useRef(null);
83
- projectorRef.current ??= chunk3WK4AE52_js.createPresenceProjector();
83
+ projectorRef.current ??= chunkTWUAZRCG_js.createPresenceProjector();
84
84
  const projector = projectorRef.current;
85
85
  const lastBroadcastRef = react.useRef(0);
86
86
  const pendingBroadcastRef = react.useRef(null);
@@ -105,7 +105,7 @@ function usePresenceTracking({
105
105
  awareness.setLocalStateField("presence", state);
106
106
  lastBroadcastRef.current = Date.now();
107
107
  };
108
- if (elapsed >= chunk3WK4AE52_js.BROADCAST_THROTTLE_MS) {
108
+ if (elapsed >= chunkTWUAZRCG_js.BROADCAST_THROTTLE_MS) {
109
109
  if (pendingBroadcastRef.current) {
110
110
  clearTimeout(pendingBroadcastRef.current);
111
111
  pendingBroadcastRef.current = null;
@@ -115,7 +115,7 @@ function usePresenceTracking({
115
115
  pendingBroadcastRef.current = setTimeout(() => {
116
116
  pendingBroadcastRef.current = null;
117
117
  flush();
118
- }, chunk3WK4AE52_js.BROADCAST_THROTTLE_MS - elapsed);
118
+ }, chunkTWUAZRCG_js.BROADCAST_THROTTLE_MS - elapsed);
119
119
  }
120
120
  },
121
121
  [awareness, userName, userColor, userAvatar, role]
@@ -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 = chunk3WK4AE52_js.createSyncGate(() => setSynced(true));
198
+ gateRef.current = chunkTWUAZRCG_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
- chunk3WK4AE52_js.clearLocalAwareness(provider.awareness);
218
+ chunkTWUAZRCG_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 = chunk3WK4AE52_js.validateRoomId(config.roomId);
243
+ const roomId = chunkTWUAZRCG_js.validateRoomId(config.roomId);
244
244
  const provider = new WebrtcProvider(roomId, yDoc, opts);
245
- departureRef.current = chunk3WK4AE52_js.createDepartureChannel(roomId, provider.awareness);
245
+ departureRef.current = chunkTWUAZRCG_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 = chunk3WK4AE52_js.validateRoomId(config.roomId);
288
- const transport = config.transport ?? chunk3WK4AE52_js.resolveTransportForServerUrl(config.serverUrl);
287
+ const roomId = chunkTWUAZRCG_js.validateRoomId(config.roomId);
288
+ const transport = config.transport ?? chunkTWUAZRCG_js.resolveTransportForServerUrl(config.serverUrl);
289
289
  if (transport === "webrtc") {
290
290
  await initWebrtc();
291
291
  return;
292
292
  }
293
- if (chunk3WK4AE52_js.isMixedContentBlocked(config.serverUrl)) {
293
+ if (chunkTWUAZRCG_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 = chunk3WK4AE52_js.createDepartureChannel(roomId, provider.awareness);
307
+ departureRef.current = chunkTWUAZRCG_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
- chunk3WK4AE52_js.clearLocalAwareness(provider.awareness);
347
+ chunkTWUAZRCG_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
- }, chunk3WK4AE52_js.CONNECTION_TIMEOUT_MS);
356
+ }, chunkTWUAZRCG_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
- chunk3WK4AE52_js.clearLocalAwareness(provider.awareness);
365
+ chunkTWUAZRCG_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 = chunk3WK4AE52_js.registerCollaborationTeardown({
391
+ const disposeTeardown = chunkTWUAZRCG_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 = chunk3WK4AE52_js.sanitizeColor(config?.userColor, "#6366f1");
412
+ const userColor = chunkTWUAZRCG_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,
@@ -527,8 +527,8 @@ function useEditorHistory(input) {
527
527
  width: canvasSize.width,
528
528
  height: canvasSize.height,
529
529
  activeSlideIndex,
530
- slides: slides.map(chunk3WK4AE52_js.cloneSlide),
531
- templateElementsBySlideId: chunk3WK4AE52_js.cloneTemplateElementsBySlideId(templateElementsBySlideId),
530
+ slides: slides.map(chunkTWUAZRCG_js.cloneSlide),
531
+ templateElementsBySlideId: chunkTWUAZRCG_js.cloneTemplateElementsBySlideId(templateElementsBySlideId),
532
532
  ...actionLabel ? { actionLabel } : {}
533
533
  };
534
534
  },
@@ -541,9 +541,9 @@ function useEditorHistory(input) {
541
541
  width: snapshot.width,
542
542
  height: snapshot.height
543
543
  });
544
- setSlides(snapshot.slides.map(chunk3WK4AE52_js.cloneSlide));
544
+ setSlides(snapshot.slides.map(chunkTWUAZRCG_js.cloneSlide));
545
545
  setTemplateElementsBySlideId(
546
- chunk3WK4AE52_js.cloneTemplateElementsBySlideId(snapshot.templateElementsBySlideId)
546
+ chunkTWUAZRCG_js.cloneTemplateElementsBySlideId(snapshot.templateElementsBySlideId)
547
547
  );
548
548
  setActiveSlideIndex(Math.min(snapshot.activeSlideIndex, maxSlideIndex));
549
549
  setSelectedElementIds([]);
@@ -582,8 +582,8 @@ function useEditorHistory(input) {
582
582
  const currentSnapshot = buildHistorySnapshot();
583
583
  historyFutureRef.current.push(currentSnapshot);
584
584
  isApplyingHistoryRef.current = true;
585
- const nextSnapshot = chunkO27KNZLJ_js.cloneHistorySnapshot(previousSnapshot);
586
- lastHistorySnapshotRef.current = chunkO27KNZLJ_js.cloneHistorySnapshot(nextSnapshot);
585
+ const nextSnapshot = chunkIVCYND7A_js.cloneHistorySnapshot(previousSnapshot);
586
+ lastHistorySnapshotRef.current = chunkIVCYND7A_js.cloneHistorySnapshot(nextSnapshot);
587
587
  lastHistorySerializedRef.current = serializeDocument(nextSnapshot);
588
588
  applyHistorySnapshot(nextSnapshot);
589
589
  updateHistoryAvailability();
@@ -604,8 +604,8 @@ function useEditorHistory(input) {
604
604
  const currentSnapshot = buildHistorySnapshot();
605
605
  historyPastRef.current.push(currentSnapshot);
606
606
  isApplyingHistoryRef.current = true;
607
- const targetSnapshot = chunkO27KNZLJ_js.cloneHistorySnapshot(nextSnapshot);
608
- lastHistorySnapshotRef.current = chunkO27KNZLJ_js.cloneHistorySnapshot(targetSnapshot);
607
+ const targetSnapshot = chunkIVCYND7A_js.cloneHistorySnapshot(nextSnapshot);
608
+ lastHistorySnapshotRef.current = chunkIVCYND7A_js.cloneHistorySnapshot(targetSnapshot);
609
609
  lastHistorySerializedRef.current = serializeDocument(targetSnapshot);
610
610
  applyHistorySnapshot(targetSnapshot);
611
611
  updateHistoryAvailability();
@@ -623,7 +623,7 @@ function useEditorHistory(input) {
623
623
  historyPastRef.current = [];
624
624
  historyFutureRef.current = [];
625
625
  if (initialSnapshot) {
626
- const clonedInitial = chunkO27KNZLJ_js.cloneHistorySnapshot(initialSnapshot);
626
+ const clonedInitial = chunkIVCYND7A_js.cloneHistorySnapshot(initialSnapshot);
627
627
  lastHistorySnapshotRef.current = clonedInitial;
628
628
  lastHistorySerializedRef.current = serializeDocument(clonedInitial);
629
629
  } else {
@@ -671,19 +671,19 @@ function useEditorHistory(input) {
671
671
  }
672
672
  const previousSnapshot = lastHistorySnapshotRef.current;
673
673
  if (!previousSnapshot) {
674
- lastHistorySnapshotRef.current = chunkO27KNZLJ_js.cloneHistorySnapshot(snapshot);
674
+ lastHistorySnapshotRef.current = chunkIVCYND7A_js.cloneHistorySnapshot(snapshot);
675
675
  lastHistorySerializedRef.current = serialized;
676
676
  lastCheapHashRef.current = cheapHash;
677
677
  updateHistoryAvailability();
678
678
  return;
679
679
  }
680
680
  onDirtyRef.current?.();
681
- historyPastRef.current.push(chunkO27KNZLJ_js.cloneHistorySnapshot(previousSnapshot));
681
+ historyPastRef.current.push(chunkIVCYND7A_js.cloneHistorySnapshot(previousSnapshot));
682
682
  while (historyPastRef.current.length > Math.max(1, maxHistoryEntries)) {
683
683
  historyPastRef.current.shift();
684
684
  }
685
685
  historyFutureRef.current = [];
686
- lastHistorySnapshotRef.current = chunkO27KNZLJ_js.cloneHistorySnapshot(snapshot);
686
+ lastHistorySnapshotRef.current = chunkIVCYND7A_js.cloneHistorySnapshot(snapshot);
687
687
  lastHistorySerializedRef.current = serialized;
688
688
  lastCheapHashRef.current = cheapHash;
689
689
  updateHistoryAvailability();
@@ -743,9 +743,9 @@ function useZoomViewport({
743
743
  const canvasStageRef = react.useRef(null);
744
744
  const canvasViewportRef = react.useRef(null);
745
745
  const renderScaleRef = react.useRef(1);
746
- const wheelBufferRef = react.useRef(chunk3WK4AE52_js.createWheelStepBuffer());
746
+ const wheelBufferRef = react.useRef(chunkTWUAZRCG_js.createWheelStepBuffer());
747
747
  const storeRef = react.useRef(null);
748
- storeRef.current ??= chunk3WK4AE52_js.createViewerZoomStore();
748
+ storeRef.current ??= chunkTWUAZRCG_js.createViewerZoomStore();
749
749
  const store = storeRef.current;
750
750
  const scale = useViewerStore(store, selectZoom);
751
751
  const setScale = react.useCallback(
@@ -806,7 +806,7 @@ function useZoomViewport({
806
806
  if (!wrapper || !canvasViewport) {
807
807
  return;
808
808
  }
809
- const boundedScale = chunk3WK4AE52_js.clampZoomScale(nextScale);
809
+ const boundedScale = chunkTWUAZRCG_js.clampZoomScale(nextScale);
810
810
  const nextEditorScale = fitScale * boundedScale;
811
811
  const centerX = (bounds.minX + bounds.maxX) / 2;
812
812
  const centerY = (bounds.minY + bounds.maxY) / 2;
@@ -843,29 +843,29 @@ function useZoomViewport({
843
843
  selectedElements.forEach((element) => {
844
844
  minX = Math.min(minX, element.x);
845
845
  minY = Math.min(minY, element.y);
846
- maxX = Math.max(maxX, element.x + Math.max(element.width, chunkO27KNZLJ_js.MIN_ELEMENT_SIZE));
847
- maxY = Math.max(maxY, element.y + Math.max(element.height, chunkO27KNZLJ_js.MIN_ELEMENT_SIZE));
846
+ maxX = Math.max(maxX, element.x + Math.max(element.width, chunkIVCYND7A_js.MIN_ELEMENT_SIZE));
847
+ maxY = Math.max(maxY, element.y + Math.max(element.height, chunkIVCYND7A_js.MIN_ELEMENT_SIZE));
848
848
  });
849
849
  if (!Number.isFinite(minX) || !Number.isFinite(minY) || !Number.isFinite(maxX) || !Number.isFinite(maxY)) {
850
850
  return;
851
851
  }
852
852
  const selectionBounds = { minX, minY, maxX, maxY };
853
- const boundsWidth = Math.max(selectionBounds.maxX - selectionBounds.minX, chunkO27KNZLJ_js.MIN_ELEMENT_SIZE);
854
- const boundsHeight = Math.max(selectionBounds.maxY - selectionBounds.minY, chunkO27KNZLJ_js.MIN_ELEMENT_SIZE);
853
+ const boundsWidth = Math.max(selectionBounds.maxX - selectionBounds.minX, chunkIVCYND7A_js.MIN_ELEMENT_SIZE);
854
+ const boundsHeight = Math.max(selectionBounds.maxY - selectionBounds.minY, chunkIVCYND7A_js.MIN_ELEMENT_SIZE);
855
855
  const availableWidth = Math.max(
856
- effectiveEditorDimensions.width - chunkO27KNZLJ_js.ZOOM_TO_SELECTION_PADDING,
857
- chunkO27KNZLJ_js.MIN_ELEMENT_SIZE
856
+ effectiveEditorDimensions.width - chunkIVCYND7A_js.ZOOM_TO_SELECTION_PADDING,
857
+ chunkIVCYND7A_js.MIN_ELEMENT_SIZE
858
858
  );
859
859
  const availableHeight = Math.max(
860
- effectiveEditorDimensions.height - chunkO27KNZLJ_js.ZOOM_TO_SELECTION_PADDING,
861
- chunkO27KNZLJ_js.MIN_ELEMENT_SIZE
860
+ effectiveEditorDimensions.height - chunkIVCYND7A_js.ZOOM_TO_SELECTION_PADDING,
861
+ chunkIVCYND7A_js.MIN_ELEMENT_SIZE
862
862
  );
863
863
  const targetEditorScale = Math.min(
864
864
  availableWidth / boundsWidth,
865
865
  availableHeight / boundsHeight
866
866
  );
867
867
  const safeFitScale = fitScale > Number.EPSILON ? fitScale : Number.EPSILON;
868
- const nextScale = chunk3WK4AE52_js.clampZoomScale(targetEditorScale / safeFitScale);
868
+ const nextScale = chunkTWUAZRCG_js.clampZoomScale(targetEditorScale / safeFitScale);
869
869
  setScale(nextScale);
870
870
  window.requestAnimationFrame(() => {
871
871
  window.requestAnimationFrame(() => {
@@ -882,14 +882,14 @@ function useZoomViewport({
882
882
  ]);
883
883
  const handleWheel = react.useCallback(
884
884
  (event) => {
885
- const mapped = chunk3WK4AE52_js.mapEditingWheel(event, wheelBufferRef.current, true);
885
+ const mapped = chunkTWUAZRCG_js.mapEditingWheel(event, wheelBufferRef.current, true);
886
886
  if (mapped.intent !== "zoom") {
887
887
  return;
888
888
  }
889
889
  event.preventDefault();
890
890
  store.dispatch({
891
891
  type: "set-zoom",
892
- zoom: chunk3WK4AE52_js.clampZoomScale(store.getState().zoom + mapped.deltaScale)
892
+ zoom: chunkTWUAZRCG_js.clampZoomScale(store.getState().zoom + mapped.deltaScale)
893
893
  });
894
894
  },
895
895
  [store]
@@ -984,8 +984,8 @@ function scheduleOpeningAutoPlayGroup(controller, ctx) {
984
984
  if (!group) {
985
985
  return;
986
986
  }
987
- chunk3WK4AE52_js.playGroup(controller, group, ctx);
988
- chunk3WK4AE52_js.scheduleAutoAdvanceChain(controller, ctx);
987
+ chunkTWUAZRCG_js.playGroup(controller, group, ctx);
988
+ chunkTWUAZRCG_js.scheduleAutoAdvanceChain(controller, ctx);
989
989
  }, firstGroup.autoAdvanceDelayMs ?? 0);
990
990
  ctx.timers.push(timer);
991
991
  }
@@ -1004,7 +1004,7 @@ function scheduleEntranceAnimationTimers(slide, setPresentationAnimations, prese
1004
1004
  }))
1005
1005
  );
1006
1006
  entranceAnimations.forEach((animation, animationIndex) => {
1007
- const delay = chunk3WK4AE52_js.computeEntranceAnimationDelay(animation.delayMs, animationIndex);
1007
+ const delay = chunkTWUAZRCG_js.computeEntranceAnimationDelay(animation.delayMs, animationIndex);
1008
1008
  const timer = window.setTimeout(() => {
1009
1009
  setPresentationAnimations(
1010
1010
  (previousAnimations) => previousAnimations.map(
@@ -1037,7 +1037,7 @@ function useAnimationPlayback(input) {
1037
1037
  const presentationTimersRef = react.useRef([]);
1038
1038
  const controllerRef = react.useRef(null);
1039
1039
  const buildRafRef = react.useRef(null);
1040
- const activeAnimationGroupRef = react.useRef(chunk3WK4AE52_js.createActiveAnimationGroup());
1040
+ const activeAnimationGroupRef = react.useRef(chunkTWUAZRCG_js.createActiveAnimationGroup());
1041
1041
  const seededCompletedRef = react.useRef(false);
1042
1042
  const mediaTimeNodeElementIdsRef = react.useRef(/* @__PURE__ */ new Map());
1043
1043
  const lastSeedCompletedRef = react.useRef(false);
@@ -1054,15 +1054,15 @@ function useAnimationPlayback(input) {
1054
1054
  }, [onPlayActionSound]);
1055
1055
  react.useEffect(() => {
1056
1056
  return () => {
1057
- chunk3WK4AE52_js.cancelBuildReveal(buildRafRef);
1057
+ chunkTWUAZRCG_js.cancelBuildReveal(buildRafRef);
1058
1058
  };
1059
1059
  }, []);
1060
1060
  const clearPresentationTimers = react.useCallback(() => {
1061
- chunk3WK4AE52_js.clearPlaybackTimers(buildPlaybackContext(), activeAnimationGroupRef.current);
1061
+ chunkTWUAZRCG_js.clearPlaybackTimers(buildPlaybackContext(), activeAnimationGroupRef.current);
1062
1062
  }, [buildPlaybackContext]);
1063
1063
  const resetSlideTimeline = react.useCallback(
1064
1064
  (slideIndex) => {
1065
- chunk3WK4AE52_js.cancelBuildReveal(buildRafRef);
1065
+ chunkTWUAZRCG_js.cancelBuildReveal(buildRafRef);
1066
1066
  const slide = slides[slideIndex];
1067
1067
  if (!slide) {
1068
1068
  controllerRef.current = null;
@@ -1073,14 +1073,14 @@ function useAnimationPlayback(input) {
1073
1073
  setHoverTriggerShapeIds(/* @__PURE__ */ new Set());
1074
1074
  return;
1075
1075
  }
1076
- const controller = chunk3WK4AE52_js.PresentationAnimationController.fromSlide(slide, {
1076
+ const controller = chunkTWUAZRCG_js.PresentationAnimationController.fromSlide(slide, {
1077
1077
  slideHeightPx: canvasSize?.height,
1078
1078
  slideWidthPx: canvasSize?.width,
1079
1079
  themeColorMap,
1080
1080
  pixelateMosaic: pixelateMosaicAnimation
1081
1081
  });
1082
1082
  controllerRef.current = controller;
1083
- mediaTimeNodeElementIdsRef.current = chunk3WK4AE52_js.resolveMediaTimeNodeElementIds(
1083
+ mediaTimeNodeElementIdsRef.current = chunkTWUAZRCG_js.resolveMediaTimeNodeElementIds(
1084
1084
  slide.nativeAnimations ?? []
1085
1085
  );
1086
1086
  setPresentationKeyframesCss(controller.keyframesCss);
@@ -1094,7 +1094,7 @@ function useAnimationPlayback(input) {
1094
1094
  if (!animationsEnabled) {
1095
1095
  return false;
1096
1096
  }
1097
- return chunk3WK4AE52_js.advanceMainSequence(
1097
+ return chunkTWUAZRCG_js.advanceMainSequence(
1098
1098
  controllerRef.current,
1099
1099
  buildPlaybackContext(),
1100
1100
  activeAnimationGroupRef.current
@@ -1110,7 +1110,7 @@ function useAnimationPlayback(input) {
1110
1110
  if (!group) {
1111
1111
  return false;
1112
1112
  }
1113
- chunk3WK4AE52_js.playGroup(controller, group, buildPlaybackContext());
1113
+ chunkTWUAZRCG_js.playGroup(controller, group, buildPlaybackContext());
1114
1114
  return true;
1115
1115
  },
1116
1116
  [buildPlaybackContext]
@@ -1129,7 +1129,7 @@ function useAnimationPlayback(input) {
1129
1129
  if (!group) {
1130
1130
  return false;
1131
1131
  }
1132
- chunk3WK4AE52_js.playGroup(controller, group, buildPlaybackContext());
1132
+ chunkTWUAZRCG_js.playGroup(controller, group, buildPlaybackContext());
1133
1133
  return true;
1134
1134
  },
1135
1135
  [animationsEnabled, buildPlaybackContext]
@@ -1210,12 +1210,12 @@ function useAnimationPlayback(input) {
1210
1210
  presentationTimersRef
1211
1211
  };
1212
1212
  }
1213
- var PRESENTER_CHANNEL_NAME = chunk3WK4AE52_js.PRESENTATION_CHANNEL_NAME;
1214
- var AUDIENCE_HASH = chunk3WK4AE52_js.PRESENTATION_HASH;
1215
- var PRESENTER_MSG_ORIGIN = chunk3WK4AE52_js.PRESENTATION_MESSAGE_ORIGIN;
1216
- var AUDIENCE_NONCE_KEY = chunk3WK4AE52_js.PRESENTATION_NONCE_KEY;
1213
+ var PRESENTER_CHANNEL_NAME = chunkTWUAZRCG_js.PRESENTATION_CHANNEL_NAME;
1214
+ var AUDIENCE_HASH = chunkTWUAZRCG_js.PRESENTATION_HASH;
1215
+ var PRESENTER_MSG_ORIGIN = chunkTWUAZRCG_js.PRESENTATION_MESSAGE_ORIGIN;
1216
+ var AUDIENCE_NONCE_KEY = chunkTWUAZRCG_js.PRESENTATION_NONCE_KEY;
1217
1217
  function generateSessionId() {
1218
- return chunk3WK4AE52_js.createPresentationSessionId();
1218
+ return chunkTWUAZRCG_js.createPresentationSessionId();
1219
1219
  }
1220
1220
  function parseAudienceNonce() {
1221
1221
  const hash = window.location.hash;
@@ -1251,7 +1251,7 @@ function usePresenterWindow(input) {
1251
1251
  }, []);
1252
1252
  const swapDisplays = react.useCallback(async () => {
1253
1253
  const audience = audienceWindowRef.current;
1254
- return audience && !audience.closed ? chunk3WK4AE52_js.swapPresentationWindows(window, audience) : false;
1254
+ return audience && !audience.closed ? chunkTWUAZRCG_js.swapPresentationWindows(window, audience) : false;
1255
1255
  }, []);
1256
1256
  const syncSlideToAudience = react.useCallback(
1257
1257
  (slideIndex) => {
@@ -1315,7 +1315,7 @@ function usePresenterWindow(input) {
1315
1315
  pollTimerRef.current = null;
1316
1316
  }
1317
1317
  if (closingSessionId) {
1318
- void chunk3WK4AE52_js.clearAudienceContent(closingSessionId);
1318
+ void chunkTWUAZRCG_js.clearAudienceContent(closingSessionId);
1319
1319
  }
1320
1320
  }, [getChannel]);
1321
1321
  const openAudienceWindow = react.useCallback(() => {
@@ -1333,10 +1333,10 @@ function usePresenterWindow(input) {
1333
1333
  audienceWindowRef.current = blankWin;
1334
1334
  const sessionId = generateSessionId();
1335
1335
  sessionIdRef.current = sessionId;
1336
- const audienceUrl = chunk3WK4AE52_js.buildPresentationAudienceUrl(window.location.href, sessionId);
1337
- void chunk3WK4AE52_js.resolveAudienceScreenPlacement(window).then((placement) => {
1336
+ const audienceUrl = chunkTWUAZRCG_js.buildPresentationAudienceUrl(window.location.href, sessionId);
1337
+ void chunkTWUAZRCG_js.resolveAudienceScreenPlacement(window).then((placement) => {
1338
1338
  if (placement && audienceWindowRef.current === blankWin && !blankWin.closed) {
1339
- chunk3WK4AE52_js.placeAudienceWindow(blankWin, placement);
1339
+ chunkTWUAZRCG_js.placeAudienceWindow(blankWin, placement);
1340
1340
  }
1341
1341
  return void 0;
1342
1342
  });
@@ -1366,7 +1366,7 @@ function usePresenterWindow(input) {
1366
1366
  }
1367
1367
  };
1368
1368
  if (content) {
1369
- void chunk3WK4AE52_js.storeAudienceContent(content, sessionId).then(() => navigateOrClose(true)).catch(() => navigateOrClose(false));
1369
+ void chunkTWUAZRCG_js.storeAudienceContent(content, sessionId).then(() => navigateOrClose(true)).catch(() => navigateOrClose(false));
1370
1370
  } else {
1371
1371
  navigateOrClose(true);
1372
1372
  }
@@ -1392,7 +1392,7 @@ function usePresenterWindow(input) {
1392
1392
  }
1393
1393
  const handleMessage = (event) => {
1394
1394
  const message = event.data;
1395
- if (chunk3WK4AE52_js.isPresentationSessionMessage(message) && message.type === "audience-ready" && message.sessionId === sessionIdRef.current) {
1395
+ if (chunkTWUAZRCG_js.isPresentationSessionMessage(message) && message.type === "audience-ready" && message.sessionId === sessionIdRef.current) {
1396
1396
  syncStateToAudience(snapshotRef.current);
1397
1397
  }
1398
1398
  };
@@ -1421,7 +1421,7 @@ function usePresenterWindow(input) {
1421
1421
  react.useEffect(() => {
1422
1422
  const handleBeforeUnload = () => {
1423
1423
  if (sessionIdRef.current) {
1424
- void chunk3WK4AE52_js.clearAudienceContent(sessionIdRef.current);
1424
+ void chunkTWUAZRCG_js.clearAudienceContent(sessionIdRef.current);
1425
1425
  }
1426
1426
  };
1427
1427
  window.addEventListener("beforeunload", handleBeforeUnload);
@@ -1483,7 +1483,7 @@ function useAudienceMode(input) {
1483
1483
  }
1484
1484
  channel.onmessage = (event) => {
1485
1485
  const data = event.data;
1486
- if (!chunk3WK4AE52_js.isPresentationSessionMessage(data) || data.origin !== PRESENTER_MSG_ORIGIN) {
1486
+ if (!chunkTWUAZRCG_js.isPresentationSessionMessage(data) || data.origin !== PRESENTER_MSG_ORIGIN) {
1487
1487
  return;
1488
1488
  }
1489
1489
  if (expectedSessionId && data.sessionId !== expectedSessionId) {
@@ -1499,16 +1499,16 @@ function useAudienceMode(input) {
1499
1499
  }
1500
1500
  if (data.type === "presenter-exit") {
1501
1501
  if (expectedSessionId) {
1502
- void chunk3WK4AE52_js.clearAudienceContent(expectedSessionId);
1502
+ void chunkTWUAZRCG_js.clearAudienceContent(expectedSessionId);
1503
1503
  }
1504
- if (chunk3WK4AE52_js.endAudienceDisplay(window)) {
1504
+ if (chunkTWUAZRCG_js.endAudienceDisplay(window)) {
1505
1505
  handlers.onPresenterEnded?.();
1506
1506
  }
1507
1507
  }
1508
1508
  };
1509
1509
  if (expectedSessionId) {
1510
1510
  channel.postMessage({
1511
- origin: chunk3WK4AE52_js.PRESENTATION_MESSAGE_ORIGIN,
1511
+ origin: chunkTWUAZRCG_js.PRESENTATION_MESSAGE_ORIGIN,
1512
1512
  type: "audience-ready",
1513
1513
  sessionId: expectedSessionId
1514
1514
  });
@@ -1522,7 +1522,7 @@ function useAudienceMode(input) {
1522
1522
  }, []);
1523
1523
  }
1524
1524
  function usePresentationKeyboard(input) {
1525
- const wheelBufferRef = react.useRef(chunk3WK4AE52_js.createWheelStepBuffer());
1525
+ const wheelBufferRef = react.useRef(chunkTWUAZRCG_js.createWheelStepBuffer());
1526
1526
  const {
1527
1527
  mode,
1528
1528
  movePresentationSlide,
@@ -1543,14 +1543,14 @@ function usePresentationKeyboard(input) {
1543
1543
  presentationSlideIndex,
1544
1544
  setShowRehearsalSummary
1545
1545
  } = input;
1546
- const keyBufferRef = react.useRef(chunk3WK4AE52_js.createPresentationKeyBuffer());
1546
+ const keyBufferRef = react.useRef(chunkTWUAZRCG_js.createPresentationKeyBuffer());
1547
1547
  react.useEffect(() => {
1548
- if (mode !== "present" || !chunk3WK4AE52_js.acceptsPresentationInput()) {
1549
- keyBufferRef.current = chunk3WK4AE52_js.createPresentationKeyBuffer();
1548
+ if (mode !== "present" || !chunkTWUAZRCG_js.acceptsPresentationInput()) {
1549
+ keyBufferRef.current = chunkTWUAZRCG_js.createPresentationKeyBuffer();
1550
1550
  return;
1551
1551
  }
1552
1552
  const handleKeyDown = (event) => {
1553
- const mapped = chunk3WK4AE52_js.mapPresentationKey(event, keyBufferRef.current);
1553
+ const mapped = chunkTWUAZRCG_js.mapPresentationKey(event, keyBufferRef.current);
1554
1554
  if (mapped.action === "none") {
1555
1555
  return;
1556
1556
  }
@@ -1570,12 +1570,12 @@ function usePresentationKeyboard(input) {
1570
1570
  movePresentationSlide(-1);
1571
1571
  return;
1572
1572
  case "first": {
1573
- const first = chunk3WK4AE52_js.firstShowSlideIndex(showSlideIndexes);
1573
+ const first = chunkTWUAZRCG_js.firstShowSlideIndex(showSlideIndexes);
1574
1574
  navigateToSlide(first ?? 0);
1575
1575
  return;
1576
1576
  }
1577
1577
  case "last": {
1578
- const last = chunk3WK4AE52_js.lastShowSlideIndex(showSlideIndexes);
1578
+ const last = chunkTWUAZRCG_js.lastShowSlideIndex(showSlideIndexes);
1579
1579
  navigateToSlide(last ?? Math.max(0, slideCount - 1));
1580
1580
  return;
1581
1581
  }
@@ -1613,10 +1613,10 @@ function usePresentationKeyboard(input) {
1613
1613
  }
1614
1614
  };
1615
1615
  const handleWheel = (event) => {
1616
- if (mode !== "present" || !chunk3WK4AE52_js.acceptsPresentationInput()) {
1616
+ if (mode !== "present" || !chunkTWUAZRCG_js.acceptsPresentationInput()) {
1617
1617
  return;
1618
1618
  }
1619
- const mapped = chunk3WK4AE52_js.mapPresentationWheel(event, wheelBufferRef.current);
1619
+ const mapped = chunkTWUAZRCG_js.mapPresentationWheel(event, wheelBufferRef.current);
1620
1620
  if (mapped.intent === "next-slide") {
1621
1621
  event.preventDefault();
1622
1622
  movePresentationSlide(1);
@@ -1749,7 +1749,7 @@ function useRehearsalTimings(input) {
1749
1749
 
1750
1750
  // src/viewer/hooks/presentation-mode/presentation-actions.ts
1751
1751
  function handlePresentationActionImpl(action, deps) {
1752
- chunk3WK4AE52_js.runPresentationAction(
1752
+ chunkTWUAZRCG_js.runPresentationAction(
1753
1753
  action,
1754
1754
  { slideCount: deps.slidesLength, ...deps.elementId ? { elementId: deps.elementId } : {} },
1755
1755
  {
@@ -1778,13 +1778,13 @@ function handlePresentationActionImpl(action, deps) {
1778
1778
  function executeSlideTransition(nextSlideIndex, deps) {
1779
1779
  const incomingSlide = deps.slides[nextSlideIndex];
1780
1780
  const transition = deps.reverse ? deps.slides[deps.currentSlideIndex]?.transition : incomingSlide?.transition;
1781
- const durationMs = deps.playTransition ? chunk3WK4AE52_js.resolveTransitionDurationMs(transition) : 0;
1781
+ const durationMs = deps.playTransition ? chunkTWUAZRCG_js.resolveTransitionDurationMs(transition) : 0;
1782
1782
  deps.clearPresentationTimers();
1783
1783
  deps.setPresentationSlideIndex(nextSlideIndex);
1784
1784
  deps.onSetActiveSlideIndex(nextSlideIndex);
1785
1785
  deps.setPresentationSlideVisible(true);
1786
1786
  deps.seedSlideAnimations(nextSlideIndex, { completed: deps.seedCompleted });
1787
- const soundAction = chunk3WK4AE52_js.resolveTransitionSoundAction(transition);
1787
+ const soundAction = chunkTWUAZRCG_js.resolveTransitionSoundAction(transition);
1788
1788
  if (soundAction.kind === "play" && deps.onPlayActionSound) {
1789
1789
  deps.onPlayActionSound(soundAction.soundPath, { loop: soundAction.loop });
1790
1790
  } else if (soundAction.kind === "stop" && deps.onStopActionSound) {
@@ -1848,7 +1848,7 @@ function useSlideNavigation(input) {
1848
1848
  });
1849
1849
  const scheduleAutoAdvanceForSlide = react.useCallback(
1850
1850
  (slideIndex) => {
1851
- const delayMs = chunk3WK4AE52_js.resolveAutoAdvanceDelayMs(slides[slideIndex], { useTimings });
1851
+ const delayMs = chunkTWUAZRCG_js.resolveAutoAdvanceDelayMs(slides[slideIndex], { useTimings });
1852
1852
  if (delayMs === void 0) {
1853
1853
  return;
1854
1854
  }
@@ -1871,7 +1871,7 @@ function useSlideNavigation(input) {
1871
1871
  if (availableSlideIndexes.length === 0) {
1872
1872
  return;
1873
1873
  }
1874
- const pastLastSlide = direction === 1 && !chunk3WK4AE52_js.hasShowSlideAfter(presentationSlideIndex, availableSlideIndexes);
1874
+ const pastLastSlide = direction === 1 && !chunkTWUAZRCG_js.hasShowSlideAfter(presentationSlideIndex, availableSlideIndexes);
1875
1875
  if (rehearsing && pastLastSlide) {
1876
1876
  recordCurrentSlideTime(presentationSlideIndex);
1877
1877
  try {
@@ -1889,9 +1889,9 @@ function useSlideNavigation(input) {
1889
1889
  onAdvancePastLastSlide();
1890
1890
  return;
1891
1891
  }
1892
- const nextSlideIndex = direction === 1 ? chunk3WK4AE52_js.nextShowSlideIndex(presentationSlideIndex, availableSlideIndexes, {
1892
+ const nextSlideIndex = direction === 1 ? chunkTWUAZRCG_js.nextShowSlideIndex(presentationSlideIndex, availableSlideIndexes, {
1893
1893
  loop: Boolean(loopContinuously) && !rehearsing
1894
- }) : chunk3WK4AE52_js.previousShowSlideIndex(presentationSlideIndex, availableSlideIndexes);
1894
+ }) : chunkTWUAZRCG_js.previousShowSlideIndex(presentationSlideIndex, availableSlideIndexes);
1895
1895
  if (nextSlideIndex === void 0 || nextSlideIndex === presentationSlideIndex) {
1896
1896
  return;
1897
1897
  }
@@ -2072,7 +2072,7 @@ function createCustomShowRunner(deps) {
2072
2072
  return;
2073
2073
  }
2074
2074
  origin = returnAfter ? { showId: deps.getActiveCustomShowId(), slideIndex: deps.getPresentationSlideIndex() } : null;
2075
- const first = chunk3WK4AE52_js.firstShowSlideIndex(chunk3WK4AE52_js.resolveShowSlideIndexes(deps.getSlides(), target));
2075
+ const first = chunkTWUAZRCG_js.firstShowSlideIndex(chunkTWUAZRCG_js.resolveShowSlideIndexes(deps.getSlides(), target));
2076
2076
  deps.setActiveCustomShowId(customShowId);
2077
2077
  if (first !== void 0) {
2078
2078
  deps.navigateToSlide(first);
@@ -2150,33 +2150,33 @@ function usePresentationActionExtensions(input) {
2150
2150
  }
2151
2151
  }, [navigateToSlideViaRef]);
2152
2152
  const onOpenFile = react.useCallback((target) => {
2153
- chunk3WK4AE52_js.safeOpenUrl(target);
2153
+ chunkTWUAZRCG_js.safeOpenUrl(target);
2154
2154
  }, []);
2155
2155
  const onOpenPresentation = react.useCallback((target) => {
2156
- chunk3WK4AE52_js.safeOpenUrl(target);
2156
+ chunkTWUAZRCG_js.safeOpenUrl(target);
2157
2157
  }, []);
2158
2158
  const onRunProgram = react.useCallback(
2159
2159
  (target) => {
2160
- onAddRunProgramNotice?.(chunk3WK4AE52_js.buildRunProgramNotice(target));
2160
+ onAddRunProgramNotice?.(chunkTWUAZRCG_js.buildRunProgramNotice(target));
2161
2161
  },
2162
2162
  [onAddRunProgramNotice]
2163
2163
  );
2164
2164
  const onPlayMedia = react.useCallback(
2165
2165
  (elementId) => {
2166
- chunk3WK4AE52_js.toggleStageElementMedia(containerRef.current, elementId);
2166
+ chunkTWUAZRCG_js.toggleStageElementMedia(containerRef.current, elementId);
2167
2167
  },
2168
2168
  [containerRef]
2169
2169
  );
2170
2170
  const onOleVerb = react.useCallback(
2171
2171
  (verb, elementId) => {
2172
- const target = chunk3WK4AE52_js.resolveOleVerbTarget(slides[presentationSlideIndex], elementId, verb);
2172
+ const target = chunkTWUAZRCG_js.resolveOleVerbTarget(slides[presentationSlideIndex], elementId, verb);
2173
2173
  if (!target) {
2174
2174
  return;
2175
2175
  }
2176
2176
  if (target.action === "download") {
2177
- chunk3WK4AE52_js.downloadDataUrl(target.url, target.fileName ?? "download");
2177
+ chunkTWUAZRCG_js.downloadDataUrl(target.url, target.fileName ?? "download");
2178
2178
  } else {
2179
- chunk3WK4AE52_js.openUrlInNewTab(target.url);
2179
+ chunkTWUAZRCG_js.openUrlInNewTab(target.url);
2180
2180
  }
2181
2181
  },
2182
2182
  [slides, presentationSlideIndex]
@@ -2207,22 +2207,22 @@ function usePresentationActionExtensions(input) {
2207
2207
  };
2208
2208
  }
2209
2209
  function usePresenterConsole(slideIndex, active) {
2210
- const timerRef = react.useRef(chunk3WK4AE52_js.createPresenterTimer());
2211
- const [snapshot, setSnapshot] = react.useState(() => chunk3WK4AE52_js.createInitialPresentationSnapshot(slideIndex));
2210
+ const timerRef = react.useRef(chunkTWUAZRCG_js.createPresenterTimer());
2211
+ const [snapshot, setSnapshot] = react.useState(() => chunkTWUAZRCG_js.createInitialPresentationSnapshot(slideIndex));
2212
2212
  const patch = react.useCallback((value) => {
2213
- setSnapshot((current) => chunk3WK4AE52_js.mergePresentationSnapshot(current, value));
2213
+ setSnapshot((current) => chunkTWUAZRCG_js.mergePresentationSnapshot(current, value));
2214
2214
  }, []);
2215
2215
  react.useEffect(() => patch({ slideIndex }), [patch, slideIndex]);
2216
2216
  react.useEffect(() => {
2217
2217
  if (!active) {
2218
2218
  return;
2219
2219
  }
2220
- timerRef.current = chunk3WK4AE52_js.resetPresenterTimer();
2220
+ timerRef.current = chunkTWUAZRCG_js.resetPresenterTimer();
2221
2221
  patch({ paused: false, elapsedMs: 0 });
2222
2222
  const timer = window.setInterval(() => {
2223
2223
  patch({
2224
2224
  paused: timerRef.current.paused,
2225
- elapsedMs: chunk3WK4AE52_js.presenterElapsed(timerRef.current)
2225
+ elapsedMs: chunkTWUAZRCG_js.presenterElapsed(timerRef.current)
2226
2226
  });
2227
2227
  }, 1e3);
2228
2228
  return () => window.clearInterval(timer);
@@ -2232,19 +2232,19 @@ function usePresenterConsole(slideIndex, active) {
2232
2232
  applyAudienceSnapshot: setSnapshot,
2233
2233
  setBlackout: (blackout) => patch({ blackout }),
2234
2234
  toggleTimer: () => {
2235
- timerRef.current = chunk3WK4AE52_js.togglePresenterTimer(timerRef.current);
2235
+ timerRef.current = chunkTWUAZRCG_js.togglePresenterTimer(timerRef.current);
2236
2236
  patch({
2237
2237
  paused: timerRef.current.paused,
2238
- elapsedMs: chunk3WK4AE52_js.presenterElapsed(timerRef.current)
2238
+ elapsedMs: chunkTWUAZRCG_js.presenterElapsed(timerRef.current)
2239
2239
  });
2240
2240
  },
2241
2241
  resetTimer: () => {
2242
- timerRef.current = chunk3WK4AE52_js.resetPresenterTimer();
2242
+ timerRef.current = chunkTWUAZRCG_js.resetPresenterTimer();
2243
2243
  patch({ paused: false, elapsedMs: 0 });
2244
2244
  },
2245
2245
  stepZoom: (direction) => setSnapshot(
2246
- (current) => chunk3WK4AE52_js.mergePresentationSnapshot(current, {
2247
- zoom: chunk3WK4AE52_js.stepPresenterZoom(
2246
+ (current) => chunkTWUAZRCG_js.mergePresentationSnapshot(current, {
2247
+ zoom: chunkTWUAZRCG_js.stepPresenterZoom(
2248
2248
  current.zoom ?? { scale: 1, originX: 0.5, originY: 0.5 },
2249
2249
  direction
2250
2250
  )
@@ -2299,7 +2299,7 @@ function usePresentationMode(input) {
2299
2299
  const [allSlidesOpen, setAllSlidesOpen] = react.useState(false);
2300
2300
  const [endOfShowVisible, setEndOfShowVisible] = react.useState(false);
2301
2301
  const [presentationStartTime, setPresentationStartTime] = react.useState(null);
2302
- const showGuard = react.useMemo(() => chunk3WK4AE52_js.createPresenterShowGuard(), []);
2302
+ const showGuard = react.useMemo(() => chunkTWUAZRCG_js.createPresenterShowGuard(), []);
2303
2303
  const {
2304
2304
  presentationAnimations,
2305
2305
  presentationElementStates,
@@ -2399,7 +2399,7 @@ function usePresentationMode(input) {
2399
2399
  actionExtensions.bindNavigateToSlide(navigateToSlide);
2400
2400
  const movePresentationSlide = react.useCallback(
2401
2401
  (direction, trigger = "explicit") => {
2402
- if (!chunk3WK4AE52_js.acceptsPresentationInput()) {
2402
+ if (!chunkTWUAZRCG_js.acceptsPresentationInput()) {
2403
2403
  return;
2404
2404
  }
2405
2405
  if (endOfShowVisible) {
@@ -2468,7 +2468,7 @@ function usePresentationMode(input) {
2468
2468
  onSetMode("present");
2469
2469
  }, [containerRef, onSetMode, setRehearsing]);
2470
2470
  const enterPresentModeFromBeginning = react.useCallback(() => {
2471
- const first = chunk3WK4AE52_js.firstShowSlideIndex(visibleSlideIndexes);
2471
+ const first = chunkTWUAZRCG_js.firstShowSlideIndex(visibleSlideIndexes);
2472
2472
  if (first !== void 0) {
2473
2473
  onSetActiveSlideIndex(first);
2474
2474
  }
@@ -2548,7 +2548,7 @@ function usePresentationMode(input) {
2548
2548
  if (mode !== "present") {
2549
2549
  return;
2550
2550
  }
2551
- return chunk3WK4AE52_js.attachPresentationVisibilityPause({
2551
+ return chunkTWUAZRCG_js.attachPresentationVisibilityPause({
2552
2552
  root: containerRef.current ?? void 0,
2553
2553
  onHidden: () => clearPresentationTimersRef.current(),
2554
2554
  onVisible: () => scheduleAutoAdvanceRef.current(presentationSlideIndexRef.current)
@@ -2556,7 +2556,7 @@ function usePresentationMode(input) {
2556
2556
  }, [mode, containerRef]);
2557
2557
  react.useLayoutEffect(() => {
2558
2558
  if (mode === "present") {
2559
- const idx = chunk3WK4AE52_js.presentationEntrySlideIndex(
2559
+ const idx = chunkTWUAZRCG_js.presentationEntrySlideIndex(
2560
2560
  activeSlideIndexRef.current,
2561
2561
  visibleSlideIndexesRef.current
2562
2562
  );
@@ -2635,11 +2635,11 @@ function usePresentationMode(input) {
2635
2635
  return void 0;
2636
2636
  }
2637
2637
  const incoming = slides[transitionOverlay.incomingSlideIndex];
2638
- return chunk3WK4AE52_js.buildMorphTransitionPlan(
2638
+ return chunkTWUAZRCG_js.buildMorphTransitionPlan(
2639
2639
  slides[transitionOverlay.outgoingSlideIndex],
2640
2640
  incoming,
2641
2641
  transitionOverlay.durationMs,
2642
- chunk3WK4AE52_js.morphOptionToMode(transitionOverlay.transition.morphOption),
2642
+ chunkTWUAZRCG_js.morphOptionToMode(transitionOverlay.transition.morphOption),
2643
2643
  // `PresentationStage` stacks the incoming slide's elements above its
2644
2644
  // template shapes (`zIndex = templateElements.length + index`), so a
2645
2645
  // z-index journey has to start counting where the stage does.
@@ -2664,7 +2664,7 @@ function usePresentationMode(input) {
2664
2664
  if (!morphPlan) {
2665
2665
  return presentationKeyframesCss;
2666
2666
  }
2667
- const imageRules = chunk3WK4AE52_js.buildMorphAnimationRules(morphPlan, "", "incoming", "image");
2667
+ const imageRules = chunkTWUAZRCG_js.buildMorphAnimationRules(morphPlan, "", "incoming", "image");
2668
2668
  return `${presentationKeyframesCss ?? ""}
2669
2669
  ${morphPlan.keyframesCss}
2670
2670
  ${imageRules}`;
@@ -2961,7 +2961,7 @@ function useFindReplace({
2961
2961
  const [findResults, setFindResults] = react.useState([]);
2962
2962
  const [findResultIndex, setFindResultIndex] = react.useState(-1);
2963
2963
  const performFind = react.useCallback(() => {
2964
- const results = chunk3WK4AE52_js.findInSlides(slides, findQuery, { matchCase: findMatchCase });
2964
+ const results = chunkTWUAZRCG_js.findInSlides(slides, findQuery, { matchCase: findMatchCase });
2965
2965
  if (!findQuery) {
2966
2966
  setFindResults([]);
2967
2967
  setFindResultIndex(-1);
@@ -2995,7 +2995,7 @@ function useFindReplace({
2995
2995
  return;
2996
2996
  }
2997
2997
  onUpdateSlides(
2998
- (prevSlides) => chunk3WK4AE52_js.applyFindReplacements(prevSlides, toReplace, replaceQuery).slides
2998
+ (prevSlides) => chunkTWUAZRCG_js.applyFindReplacements(prevSlides, toReplace, replaceQuery).slides
2999
2999
  );
3000
3000
  onMarkDirty();
3001
3001
  },
@@ -3017,9 +3017,9 @@ function useFindReplace({
3017
3017
  }, [findResults, applyReplacements, performFind]);
3018
3018
  react.useEffect(() => {
3019
3019
  const handler = (event) => {
3020
- const { action } = chunk3WK4AE52_js.mapEditorKey(event, {
3020
+ const { action } = chunkTWUAZRCG_js.mapEditorKey(event, {
3021
3021
  canEdit: mode === "edit",
3022
- isTextInputTarget: chunk3WK4AE52_js.isEditorTextInputTarget(event.target)
3022
+ isTextInputTarget: chunkTWUAZRCG_js.isEditorTextInputTarget(event.target)
3023
3023
  });
3024
3024
  if (action !== "find") {
3025
3025
  return;
@@ -3130,7 +3130,7 @@ function addCommentToSlide(slides, slideIndex, text, authorName, elementId, ment
3130
3130
  if (!slide) {
3131
3131
  return { slides, didAdd: false };
3132
3132
  }
3133
- const next = chunk3WK4AE52_js.addCommentToList(
3133
+ const next = chunkTWUAZRCG_js.addCommentToList(
3134
3134
  slide.comments || [],
3135
3135
  text,
3136
3136
  authorName,
@@ -3151,7 +3151,7 @@ function removeCommentFromSlide(slides, slideIndex, commentId) {
3151
3151
  if (!slide) {
3152
3152
  return { slides, didDelete: false };
3153
3153
  }
3154
- const next = chunk3WK4AE52_js.removeCommentFromList(slide.comments || [], commentId);
3154
+ const next = chunkTWUAZRCG_js.removeCommentFromList(slide.comments || [], commentId);
3155
3155
  if (!next) {
3156
3156
  return { slides, didDelete: false };
3157
3157
  }
@@ -3162,7 +3162,7 @@ function editCommentInSlide(slides, slideIndex, commentId, newText) {
3162
3162
  if (!slide) {
3163
3163
  return { slides, didUpdate: false };
3164
3164
  }
3165
- const next = chunk3WK4AE52_js.editCommentInList(slide.comments || [], commentId, newText);
3165
+ const next = chunkTWUAZRCG_js.editCommentInList(slide.comments || [], commentId, newText);
3166
3166
  if (!next) {
3167
3167
  return { slides, didUpdate: false };
3168
3168
  }
@@ -3173,7 +3173,7 @@ function toggleResolvedInSlide(slides, slideIndex, commentId) {
3173
3173
  if (!slide) {
3174
3174
  return { slides, didUpdate: false };
3175
3175
  }
3176
- const next = chunk3WK4AE52_js.toggleCommentResolvedInList(slide.comments || [], commentId);
3176
+ const next = chunkTWUAZRCG_js.toggleCommentResolvedInList(slide.comments || [], commentId);
3177
3177
  if (!next) {
3178
3178
  return { slides, didUpdate: false };
3179
3179
  }
@@ -3184,7 +3184,7 @@ function addReplyToSlide(slides, slideIndex, parentId, text, authorName, mention
3184
3184
  if (!slide) {
3185
3185
  return { slides, didAdd: false };
3186
3186
  }
3187
- const next = chunk3WK4AE52_js.replyToCommentInList(slide.comments || [], parentId, text, authorName);
3187
+ const next = chunkTWUAZRCG_js.replyToCommentInList(slide.comments || [], parentId, text, authorName);
3188
3188
  if (!next) {
3189
3189
  return { slides, didAdd: false };
3190
3190
  }
@@ -3571,7 +3571,7 @@ function useDerivedElementState(input) {
3571
3571
  return [];
3572
3572
  }
3573
3573
  return [
3574
- ...chunk3WK4AE52_js.visibleTemplateElements(activeSlide, templateElementsBySlideId[activeSlide.id] ?? [])
3574
+ ...chunkTWUAZRCG_js.visibleTemplateElements(activeSlide, templateElementsBySlideId[activeSlide.id] ?? [])
3575
3575
  ];
3576
3576
  }, [activeSlide, templateElementsBySlideId]);
3577
3577
  const activeMaster = slideMasters[activeMasterIndex];
@@ -3638,7 +3638,7 @@ function useViewerCoreState(_input) {
3638
3638
  const marqueeStateRef = react.useRef(null);
3639
3639
  const isDrawingRef = react.useRef(false);
3640
3640
  const justInteractedRef = react.useRef(false);
3641
- const livePatcher = react.useMemo(() => chunk3WK4AE52_js.createCollaborationLivePatcher(), []);
3641
+ const livePatcher = react.useMemo(() => chunkTWUAZRCG_js.createCollaborationLivePatcher(), []);
3642
3642
  react.useEffect(() => () => livePatcher.dispose(), [livePatcher]);
3643
3643
  const slidesRef = react.useRef([]);
3644
3644
  const [mode, setMode] = react.useState("edit");
@@ -3647,8 +3647,8 @@ function useViewerCoreState(_input) {
3647
3647
  const [slides, setSlides] = react.useState([]);
3648
3648
  const [templateElementsBySlideId, setTemplateElementsBySlideId] = react.useState({});
3649
3649
  const [canvasSize, setCanvasSize] = react.useState({
3650
- width: chunkO27KNZLJ_js.DEFAULT_CANVAS_WIDTH,
3651
- height: chunkO27KNZLJ_js.DEFAULT_CANVAS_HEIGHT
3650
+ width: chunkIVCYND7A_js.DEFAULT_CANVAS_WIDTH,
3651
+ height: chunkIVCYND7A_js.DEFAULT_CANVAS_HEIGHT
3652
3652
  });
3653
3653
  const [slideSizeEmu, setSlideSizeEmu] = react.useState();
3654
3654
  const [activeSlideIndex, setActiveSlideIndex] = react.useState(0);
@@ -3669,7 +3669,7 @@ function useViewerCoreState(_input) {
3669
3669
  const resolved = typeof value === "function" ? value(inlineEditingTextRef.current) : value;
3670
3670
  inlineEditingTextRef.current = resolved;
3671
3671
  setInlineEditingTextBase(value);
3672
- chunk3WK4AE52_js.publishLiveInlineText(
3672
+ chunkTWUAZRCG_js.publishLiveInlineText(
3673
3673
  livePatcher,
3674
3674
  slidesRef.current[activeSlideIndexRef.current],
3675
3675
  inlineEditingElementIdRef.current,
@@ -4032,7 +4032,7 @@ function useLoadContent({
4032
4032
  );
4033
4033
  }
4034
4034
  const previousHandler = handlerRef.current;
4035
- const handler = new chunk3WK4AE52_js.PptxHandler();
4035
+ const handler = new chunkTWUAZRCG_js.PptxHandler();
4036
4036
  const parsed = await handler.load(buffer, { allowExternalImages });
4037
4037
  if (cancelled || token !== renderTokenRef.current) {
4038
4038
  handler.dispose();
@@ -4044,7 +4044,7 @@ function useLoadContent({
4044
4044
  handlerRef.current = null;
4045
4045
  const mediaElements = [];
4046
4046
  for (const slide of parsed.slides) {
4047
- chunk3WK4AE52_js.collectMediaElements(slide.elements, mediaElements);
4047
+ chunkTWUAZRCG_js.collectMediaElements(slide.elements, mediaElements);
4048
4048
  }
4049
4049
  for (const url of mediaDataUrls.values()) {
4050
4050
  if (url.startsWith("blob:")) {
@@ -4054,7 +4054,7 @@ function useLoadContent({
4054
4054
  mediaDataUrls.clear();
4055
4055
  await Promise.all(
4056
4056
  mediaElements.map(async (mediaElement) => {
4057
- const resolved = await chunk3WK4AE52_js.resolveMediaElementSource(mediaElement, handler);
4057
+ const resolved = await chunkTWUAZRCG_js.resolveMediaElementSource(mediaElement, handler);
4058
4058
  if (resolved.missing || !resolved.mediaPath || !resolved.url) {
4059
4059
  mediaElement.mediaMissing = true;
4060
4060
  return;
@@ -4065,7 +4065,7 @@ function useLoadContent({
4065
4065
  }
4066
4066
  })
4067
4067
  );
4068
- const { paths: imagePaths, refs: imageRefs } = chunk3WK4AE52_js.collectImagePaths(parsed.slides);
4068
+ const { paths: imagePaths, refs: imageRefs } = chunkTWUAZRCG_js.collectImagePaths(parsed.slides);
4069
4069
  let nextSlides = parsed.slides;
4070
4070
  if (imagePaths.size > 0) {
4071
4071
  const resolvedMap = /* @__PURE__ */ new Map();
@@ -4081,25 +4081,25 @@ function useLoadContent({
4081
4081
  })
4082
4082
  );
4083
4083
  nextSlides = parsed.slides.map((s) => {
4084
- const newElements = chunk3WK4AE52_js.applyImagePathPatches(s.elements, resolvedMap, imageRefs);
4084
+ const newElements = chunkTWUAZRCG_js.applyImagePathPatches(s.elements, resolvedMap, imageRefs);
4085
4085
  return newElements === s.elements ? s : { ...s, elements: newElements };
4086
4086
  });
4087
4087
  }
4088
- nextSlides = await chunk3WK4AE52_js.resolveTableCellImageUrls(
4088
+ nextSlides = await chunkTWUAZRCG_js.resolveTableCellImageUrls(
4089
4089
  nextSlides,
4090
4090
  (path) => handler.getImageData(path)
4091
4091
  );
4092
- const nextTableStyleMap = await chunk3WK4AE52_js.resolveTableStyleImageUrls(
4092
+ const nextTableStyleMap = await chunkTWUAZRCG_js.resolveTableStyleImageUrls(
4093
4093
  parsed.tableStyleMap,
4094
4094
  (path) => handler.getImageData(path)
4095
4095
  );
4096
4096
  handlerRef.current = handler;
4097
- const partition = chunk3WK4AE52_js.partitionTemplateElements(nextSlides);
4097
+ const partition = chunkTWUAZRCG_js.partitionTemplateElements(nextSlides);
4098
4098
  setSlides(partition.slides);
4099
4099
  setTemplateElementsBySlideId(partition.templateElementsBySlideId);
4100
4100
  setCanvasSize({
4101
- width: parsed.width ?? chunkO27KNZLJ_js.DEFAULT_CANVAS_WIDTH,
4102
- height: parsed.height ?? chunkO27KNZLJ_js.DEFAULT_CANVAS_HEIGHT
4101
+ width: parsed.width ?? chunkIVCYND7A_js.DEFAULT_CANVAS_WIDTH,
4102
+ height: parsed.height ?? chunkIVCYND7A_js.DEFAULT_CANVAS_HEIGHT
4103
4103
  });
4104
4104
  setSlideSizeEmu(
4105
4105
  typeof parsed.widthEmu === "number" && typeof parsed.heightEmu === "number" && parsed.widthEmu > 0 && parsed.heightEmu > 0 ? {
@@ -4112,7 +4112,7 @@ function useLoadContent({
4112
4112
  setLayoutOptions(parsed.layoutOptions ?? []);
4113
4113
  setSlideMasters(parsed.slideMasters ?? []);
4114
4114
  setModernCommentAuthors(parsed.modernCommentAuthors ?? []);
4115
- setRecentColors(chunk3WK4AE52_js.seedRecentColors({ mruColors: parsed.mruColors }));
4115
+ setRecentColors(chunkTWUAZRCG_js.seedRecentColors({ mruColors: parsed.mruColors }));
4116
4116
  setTheme(parsed.theme);
4117
4117
  setTableStyleMap(nextTableStyleMap);
4118
4118
  setTableStylesDefaultId(parsed.tableStylesDefaultId);
@@ -4120,7 +4120,7 @@ function useLoadContent({
4120
4120
  setThemeOptions(parsed.themeOptions ?? []);
4121
4121
  setCustomShows(parsed.customShows ?? []);
4122
4122
  setActiveCustomShowId(
4123
- chunk3WK4AE52_js.resolveAuthoredCustomShowId(parsed.presentationProperties, parsed.customShows) ?? null
4123
+ chunkTWUAZRCG_js.resolveAuthoredCustomShowId(parsed.presentationProperties, parsed.customShows) ?? null
4124
4124
  );
4125
4125
  setSections(parsed.sections ?? []);
4126
4126
  setPresentationProperties(parsed.presentationProperties ?? {});
@@ -4143,11 +4143,11 @@ function useLoadContent({
4143
4143
  setHasMacros(parsed.hasMacros === true);
4144
4144
  setHasDigitalSignatures(parsed.hasDigitalSignatures === true);
4145
4145
  setDigitalSignatureCount(parsed.digitalSignatureCount ?? 0);
4146
- setGuides(chunk3WK4AE52_js.buildInitialGuides(parsed.presentationGuides, parsed.slides[0]?.guides));
4147
- setReadOnlyRecommendation(chunk3WK4AE52_js.readOnlyRecommendation(parsed));
4146
+ setGuides(chunkTWUAZRCG_js.buildInitialGuides(parsed.presentationGuides, parsed.slides[0]?.guides));
4147
+ setReadOnlyRecommendation(chunkTWUAZRCG_js.readOnlyRecommendation(parsed));
4148
4148
  setModifyVerifier(parsed.modifyVerifier ?? void 0);
4149
4149
  setCompatToasts(
4150
- chunk3WK4AE52_js.compatibilityWarningToasts([
4150
+ chunkTWUAZRCG_js.compatibilityWarningToasts([
4151
4151
  ...parsed.warnings ?? [],
4152
4152
  ...parsed.slides.flatMap((slide) => slide.warnings ?? [])
4153
4153
  ])
@@ -4159,7 +4159,7 @@ function useLoadContent({
4159
4159
  onContentApplied?.();
4160
4160
  } catch (err) {
4161
4161
  if (!cancelled && token === renderTokenRef.current) {
4162
- if (err instanceof chunk3WK4AE52_js.EncryptedFileError) {
4162
+ if (err instanceof chunkTWUAZRCG_js.EncryptedFileError) {
4163
4163
  setIsEncrypted(true);
4164
4164
  } else {
4165
4165
  console.error("[pptx] Failed to load presentation content:", err);
@@ -4187,7 +4187,7 @@ function useLoadContent({
4187
4187
  }
4188
4188
  function useAutosave(input) {
4189
4189
  const { isDirty, filePath, serializeSlides, enabled = true, getChangeSources } = input;
4190
- const intervalMs = chunk3WK4AE52_js.resolveAutosaveIntervalMs({
4190
+ const intervalMs = chunkTWUAZRCG_js.resolveAutosaveIntervalMs({
4191
4191
  hostIntervalMs: input.intervalMs,
4192
4192
  optionsIntervalSeconds: input.intervalSeconds
4193
4193
  });
@@ -4218,7 +4218,7 @@ function useAutosave(input) {
4218
4218
  return;
4219
4219
  }
4220
4220
  const sources = changeSourcesRef.current?.() ?? [];
4221
- if (!chunk3WK4AE52_js.shouldWriteAutosaveSnapshot({
4221
+ if (!chunkTWUAZRCG_js.shouldWriteAutosaveSnapshot({
4222
4222
  filePath: path,
4223
4223
  isDirty: isDirtyRef.current,
4224
4224
  saving: isSavingRef.current,
@@ -4236,8 +4236,8 @@ function useAutosave(input) {
4236
4236
  isSavingRef.current = false;
4237
4237
  return;
4238
4238
  }
4239
- await chunk3WK4AE52_js.saveAutosaveSnapshot(path, data);
4240
- lastSnapshotRef.current = chunk3WK4AE52_js.autosaveSnapshotMark(path, sources);
4239
+ await chunkTWUAZRCG_js.saveAutosaveSnapshot(path, data);
4240
+ lastSnapshotRef.current = chunkTWUAZRCG_js.autosaveSnapshotMark(path, sources);
4241
4241
  setAutosaveStatus({ state: "saved", timestamp: Date.now() });
4242
4242
  } catch (err) {
4243
4243
  setAutosaveStatus({
@@ -4291,13 +4291,13 @@ function useElementOperations(input) {
4291
4291
  inlineEditingText
4292
4292
  } = input;
4293
4293
  const liveTextSegments = react.useCallback(() => {
4294
- if (!selectedElement || !chunk3WK4AE52_js.hasTextProperties(selectedElement)) {
4294
+ if (!selectedElement || !chunkTWUAZRCG_js.hasTextProperties(selectedElement)) {
4295
4295
  return void 0;
4296
4296
  }
4297
4297
  if (selectedElement.id !== inlineEditingElementId) {
4298
4298
  return selectedElement.textSegments;
4299
4299
  }
4300
- return chunk3WK4AE52_js.remapTextToSegments(
4300
+ return chunkTWUAZRCG_js.remapTextToSegments(
4301
4301
  inlineEditingText,
4302
4302
  selectedElement.textSegments,
4303
4303
  selectedElement.textStyle
@@ -4338,11 +4338,11 @@ function useElementOperations(input) {
4338
4338
  (elementId, updates) => {
4339
4339
  if (masterView?.target) {
4340
4340
  applyMasterViewWrite(
4341
- chunk3WK4AE52_js.updateMasterViewElement(masterView, masterView.target, elementId, updates)
4341
+ chunkTWUAZRCG_js.updateMasterViewElement(masterView, masterView.target, elementId, updates)
4342
4342
  );
4343
4343
  return;
4344
4344
  }
4345
- if (chunk3WK4AE52_js.isTemplateElementId(elementId)) {
4345
+ if (chunkTWUAZRCG_js.isTemplateElementId(elementId)) {
4346
4346
  const slideId = activeSlide?.id;
4347
4347
  if (slideId) {
4348
4348
  setTemplateElementsBySlideId((prev) => ({
@@ -4353,7 +4353,7 @@ function useElementOperations(input) {
4353
4353
  }));
4354
4354
  }
4355
4355
  } else {
4356
- setSlides((prev) => chunk3WK4AE52_js.updateElement(prev, activeSlideIndex, elementId, updates));
4356
+ setSlides((prev) => chunkTWUAZRCG_js.updateElement(prev, activeSlideIndex, elementId, updates));
4357
4357
  }
4358
4358
  history.markDirty();
4359
4359
  },
@@ -4378,7 +4378,7 @@ function useElementOperations(input) {
4378
4378
  );
4379
4379
  const updateSelectedShapeStyle = react.useCallback(
4380
4380
  (updates) => {
4381
- if (!selectedElement || !chunk3WK4AE52_js.hasShapeProperties(selectedElement)) {
4381
+ if (!selectedElement || !chunkTWUAZRCG_js.hasShapeProperties(selectedElement)) {
4382
4382
  return;
4383
4383
  }
4384
4384
  updateSelectedElement({
@@ -4389,19 +4389,19 @@ function useElementOperations(input) {
4389
4389
  );
4390
4390
  const updateSelectedTextStyle = react.useCallback(
4391
4391
  (updates) => {
4392
- if (!selectedElement || !chunk3WK4AE52_js.hasTextProperties(selectedElement)) {
4392
+ if (!selectedElement || !chunkTWUAZRCG_js.hasTextProperties(selectedElement)) {
4393
4393
  return;
4394
4394
  }
4395
4395
  const isLiveEditing = selectedElement.id === inlineEditingElementId;
4396
4396
  const currentSegments = liveTextSegments();
4397
- const inlineSel = chunk3WK4AE52_js.getInlineEditorSelection(currentSegments);
4397
+ const inlineSel = chunkTWUAZRCG_js.getInlineEditorSelection(currentSegments);
4398
4398
  if (inlineSel && currentSegments) {
4399
- const { newSegments: newSegments2, newSelection } = chunk3WK4AE52_js.applyStyleToSelectedSegments(
4399
+ const { newSegments: newSegments2, newSelection } = chunkTWUAZRCG_js.applyStyleToSelectedSegments(
4400
4400
  currentSegments,
4401
4401
  inlineSel,
4402
4402
  updates
4403
4403
  );
4404
- chunk3WK4AE52_js.setPendingSelectionRestore(newSelection);
4404
+ chunkTWUAZRCG_js.setPendingSelectionRestore(newSelection);
4405
4405
  updateSelectedElement({
4406
4406
  textSegments: newSegments2,
4407
4407
  ...isLiveEditing ? { text: inlineEditingText } : {}
@@ -4429,14 +4429,14 @@ function useElementOperations(input) {
4429
4429
  );
4430
4430
  const updateSelectedTextCase = react.useCallback(
4431
4431
  (mode) => {
4432
- if (!selectedElement || !chunk3WK4AE52_js.hasTextProperties(selectedElement)) {
4432
+ if (!selectedElement || !chunkTWUAZRCG_js.hasTextProperties(selectedElement)) {
4433
4433
  return;
4434
4434
  }
4435
4435
  const isLiveEditing = selectedElement.id === inlineEditingElementId;
4436
4436
  const currentSegments = liveTextSegments();
4437
- const inlineSel = chunk3WK4AE52_js.getInlineEditorSelection(currentSegments);
4437
+ const inlineSel = chunkTWUAZRCG_js.getInlineEditorSelection(currentSegments);
4438
4438
  if (inlineSel && currentSegments) {
4439
- const newSegments = chunk3WK4AE52_js.applyCaseTransformToSegments(currentSegments, inlineSel, mode);
4439
+ const newSegments = chunkTWUAZRCG_js.applyCaseTransformToSegments(currentSegments, inlineSel, mode);
4440
4440
  updateSelectedElement({
4441
4441
  textSegments: newSegments,
4442
4442
  ...isLiveEditing ? { text: inlineEditingText } : {}
@@ -4445,7 +4445,7 @@ function useElementOperations(input) {
4445
4445
  }
4446
4446
  const updates = {};
4447
4447
  if (currentSegments && currentSegments.length > 0) {
4448
- updates.textSegments = chunk3WK4AE52_js.applyCaseTransformToSegments(
4448
+ updates.textSegments = chunkTWUAZRCG_js.applyCaseTransformToSegments(
4449
4449
  currentSegments,
4450
4450
  null,
4451
4451
  mode
@@ -4453,7 +4453,7 @@ function useElementOperations(input) {
4453
4453
  }
4454
4454
  const baseText = isLiveEditing ? inlineEditingText : selectedElement.text;
4455
4455
  if (typeof baseText === "string") {
4456
- updates.text = chunk3WK4AE52_js.transformTextCase(baseText, mode);
4456
+ updates.text = chunkTWUAZRCG_js.transformTextCase(baseText, mode);
4457
4457
  }
4458
4458
  updateSelectedElement(updates);
4459
4459
  },
@@ -4472,15 +4472,15 @@ function useElementOperations(input) {
4472
4472
  [setSlides]
4473
4473
  );
4474
4474
  const masterViewTarget = masterView?.target ?? null;
4475
- const activeElements = masterViewTarget ? chunk3WK4AE52_js.masterViewElements(masterView, masterViewTarget) : editTemplateMode ? templateElements : activeSlide?.elements ?? [];
4475
+ const activeElements = masterViewTarget ? chunkTWUAZRCG_js.masterViewElements(masterView, masterViewTarget) : editTemplateMode ? templateElements : activeSlide?.elements ?? [];
4476
4476
  const updateActiveElements = react.useCallback(
4477
4477
  (updater) => {
4478
4478
  if (masterView?.target) {
4479
4479
  applyMasterViewWrite(
4480
- chunk3WK4AE52_js.replaceMasterViewElements(
4480
+ chunkTWUAZRCG_js.replaceMasterViewElements(
4481
4481
  masterView,
4482
4482
  masterView.target,
4483
- updater(chunk3WK4AE52_js.masterViewElements(masterView, masterView.target))
4483
+ updater(chunkTWUAZRCG_js.masterViewElements(masterView, masterView.target))
4484
4484
  )
4485
4485
  );
4486
4486
  return;
@@ -4533,7 +4533,7 @@ function useSectionOperations(input) {
4533
4533
  const { sections, setSections, slides, setSlides, markDirty } = input;
4534
4534
  const addSection2 = react.useCallback(
4535
4535
  (name, afterSlideIndex) => {
4536
- const result = chunk3WK4AE52_js.addSection(sections, slides, name, afterSlideIndex);
4536
+ const result = chunkTWUAZRCG_js.addSection(sections, slides, name, afterSlideIndex);
4537
4537
  setSlides(result.slides);
4538
4538
  setSections(result.sections);
4539
4539
  markDirty();
@@ -4542,7 +4542,7 @@ function useSectionOperations(input) {
4542
4542
  );
4543
4543
  const renameSection2 = react.useCallback(
4544
4544
  (sectionId, newName) => {
4545
- const result = chunk3WK4AE52_js.renameSection(sections, slides, sectionId, newName);
4545
+ const result = chunkTWUAZRCG_js.renameSection(sections, slides, sectionId, newName);
4546
4546
  setSections(result.sections);
4547
4547
  setSlides(result.slides);
4548
4548
  markDirty();
@@ -4551,7 +4551,7 @@ function useSectionOperations(input) {
4551
4551
  );
4552
4552
  const deleteSection2 = react.useCallback(
4553
4553
  (sectionId) => {
4554
- const result = chunk3WK4AE52_js.deleteSection(sections, slides, sectionId);
4554
+ const result = chunkTWUAZRCG_js.deleteSection(sections, slides, sectionId);
4555
4555
  setSections(result.sections);
4556
4556
  setSlides(result.slides);
4557
4557
  markDirty();
@@ -4560,21 +4560,21 @@ function useSectionOperations(input) {
4560
4560
  );
4561
4561
  const moveSectionUp2 = react.useCallback(
4562
4562
  (sectionId) => {
4563
- setSections(chunk3WK4AE52_js.moveSectionUp(sections, sectionId));
4563
+ setSections(chunkTWUAZRCG_js.moveSectionUp(sections, sectionId));
4564
4564
  markDirty();
4565
4565
  },
4566
4566
  [sections, setSections, markDirty]
4567
4567
  );
4568
4568
  const moveSectionDown2 = react.useCallback(
4569
4569
  (sectionId) => {
4570
- setSections(chunk3WK4AE52_js.moveSectionDown(sections, sectionId));
4570
+ setSections(chunkTWUAZRCG_js.moveSectionDown(sections, sectionId));
4571
4571
  markDirty();
4572
4572
  },
4573
4573
  [sections, setSections, markDirty]
4574
4574
  );
4575
4575
  const moveSlidesToSection2 = react.useCallback(
4576
4576
  (slideIndexes, targetSectionId) => {
4577
- const result = chunk3WK4AE52_js.moveSlidesToSection(sections, slides, slideIndexes, targetSectionId);
4577
+ const result = chunkTWUAZRCG_js.moveSlidesToSection(sections, slides, slideIndexes, targetSectionId);
4578
4578
  setSlides(result.slides);
4579
4579
  setSections(result.sections);
4580
4580
  markDirty();
@@ -4640,15 +4640,15 @@ function syncSelectionHandleOverlay(elementNode, elementId, geometry) {
4640
4640
  // src/viewer/hooks/pointer-move-handlers.ts
4641
4641
  function computeResizeGeometry(handle, startX, startY, startWidth, startHeight, dx, dy, snapToGrid, gridSpacingPx, lockAspect = false) {
4642
4642
  const startBox = { x: startX, y: startY, width: startWidth, height: startHeight };
4643
- let resized = chunk3WK4AE52_js.applyResize(startBox, handle, dx, dy, 1, { minSize: chunkO27KNZLJ_js.MIN_ELEMENT_SIZE });
4643
+ let resized = chunkTWUAZRCG_js.applyResize(startBox, handle, dx, dy, 1, { minSize: chunkIVCYND7A_js.MIN_ELEMENT_SIZE });
4644
4644
  if (lockAspect) {
4645
- resized = chunk3WK4AE52_js.lockResizeAspect(resized, startBox, handle, chunkO27KNZLJ_js.MIN_ELEMENT_SIZE);
4645
+ resized = chunkTWUAZRCG_js.lockResizeAspect(resized, startBox, handle, chunkIVCYND7A_js.MIN_ELEMENT_SIZE);
4646
4646
  }
4647
4647
  const box = { x: resized.x, y: resized.y, width: resized.width, height: resized.height };
4648
4648
  if (!snapToGrid) {
4649
4649
  return box;
4650
4650
  }
4651
- return chunk3WK4AE52_js.snapBoxToGrid(box, handle, gridSpacingPx, chunkO27KNZLJ_js.MIN_ELEMENT_SIZE);
4651
+ return chunkTWUAZRCG_js.snapBoxToGrid(box, handle, gridSpacingPx, chunkIVCYND7A_js.MIN_ELEMENT_SIZE);
4652
4652
  }
4653
4653
  function resolveLiveTarget(input) {
4654
4654
  const { livePatcher, editTemplateMode, activeSlide } = input;
@@ -4761,7 +4761,7 @@ function processDragMove(e, drag, editorScale, snapToGrid, snapToShape, gridSpac
4761
4761
  width: el.width,
4762
4762
  height: el.height
4763
4763
  }));
4764
- const snapResult = chunk3WK4AE52_js.computeSnapToShape(
4764
+ const snapResult = chunkTWUAZRCG_js.computeSnapToShape(
4765
4765
  targetX,
4766
4766
  targetY,
4767
4767
  primaryEl.width,
@@ -4803,7 +4803,7 @@ function processDragMove(e, drag, editorScale, snapToGrid, snapToShape, gridSpac
4803
4803
  if (live) {
4804
4804
  for (const id of Object.keys(drag.startPositionsById)) {
4805
4805
  const start = drag.startPositionsById[id];
4806
- chunk3WK4AE52_js.publishLiveGeometry(live.patcher, live.slideId, id, {
4806
+ chunkTWUAZRCG_js.publishLiveGeometry(live.patcher, live.slideId, id, {
4807
4807
  x: start.x + appliedDx,
4808
4808
  y: start.y + appliedDy
4809
4809
  });
@@ -4835,8 +4835,8 @@ function processResizeMove(e, rs, editorScale, snapToGrid, gridSpacingPx, live)
4835
4835
  rs.lastY = geo.y;
4836
4836
  rs.lastWidth = geo.width;
4837
4837
  rs.lastHeight = geo.height;
4838
- const width = Math.max(geo.width, chunkO27KNZLJ_js.MIN_ELEMENT_SIZE);
4839
- const height = Math.max(geo.height, chunkO27KNZLJ_js.MIN_ELEMENT_SIZE);
4838
+ const width = Math.max(geo.width, chunkIVCYND7A_js.MIN_ELEMENT_SIZE);
4839
+ const height = Math.max(geo.height, chunkIVCYND7A_js.MIN_ELEMENT_SIZE);
4840
4840
  if (rs.domEl) {
4841
4841
  rs.domEl.style.left = `${geo.x}px`;
4842
4842
  rs.domEl.style.top = `${geo.y}px`;
@@ -4845,7 +4845,7 @@ function processResizeMove(e, rs, editorScale, snapToGrid, gridSpacingPx, live)
4845
4845
  syncSelectionHandleOverlay(rs.domEl, rs.elementId, { x: geo.x, y: geo.y, width, height });
4846
4846
  }
4847
4847
  if (live) {
4848
- chunk3WK4AE52_js.publishLiveGeometry(live.patcher, live.slideId, rs.elementId, {
4848
+ chunkTWUAZRCG_js.publishLiveGeometry(live.patcher, live.slideId, rs.elementId, {
4849
4849
  x: geo.x,
4850
4850
  y: geo.y,
4851
4851
  width,
@@ -4856,7 +4856,7 @@ function processResizeMove(e, rs, editorScale, snapToGrid, gridSpacingPx, live)
4856
4856
  function processAdjustmentMove(e, adj, editorScale, updateElementById) {
4857
4857
  const dx = (e.clientX - adj.startClientX) / editorScale;
4858
4858
  const dy = (e.clientY - adj.startClientY) / editorScale;
4859
- const adjustments = chunk3WK4AE52_js.getDraggedShapeAdjustments(adj, dx, dy);
4859
+ const adjustments = chunkTWUAZRCG_js.getDraggedShapeAdjustments(adj, dx, dy);
4860
4860
  if (!adj.moved && Math.hypot(dx, dy) > 2) {
4861
4861
  adj.moved = true;
4862
4862
  }
@@ -4931,13 +4931,13 @@ function processPointerUp(input) {
4931
4931
  if (i !== activeSlideIndex) {
4932
4932
  return s;
4933
4933
  }
4934
- const rerouted = chunk3WK4AE52_js.rerouteConnectorsForMovedElements(s.elements, movedIds);
4934
+ const rerouted = chunkTWUAZRCG_js.rerouteConnectorsForMovedElements(s.elements, movedIds);
4935
4935
  if (rerouted.length === 0) {
4936
4936
  return s;
4937
4937
  }
4938
4938
  return {
4939
4939
  ...s,
4940
- elements: chunk3WK4AE52_js.applyReroutedConnectors(s.elements, rerouted)
4940
+ elements: chunkTWUAZRCG_js.applyReroutedConnectors(s.elements, rerouted)
4941
4941
  };
4942
4942
  })
4943
4943
  );
@@ -4962,9 +4962,9 @@ function processPointerUp(input) {
4962
4962
  }
4963
4963
  function commitMarquee(marquee, editTemplateMode, templateElements, activeSlide, applySelection, clearSelection) {
4964
4964
  const sourceElements = editTemplateMode ? templateElements : activeSlide?.elements ?? [];
4965
- const hitIds = chunk3WK4AE52_js.computeMarqueeHitIds(marquee, sourceElements);
4965
+ const hitIds = chunkTWUAZRCG_js.computeMarqueeHitIds(marquee, sourceElements);
4966
4966
  if (marquee.additive) {
4967
- const merged = chunk3WK4AE52_js.mergeAdditiveSelection(marquee.baseSelectionIds, hitIds);
4967
+ const merged = chunkTWUAZRCG_js.mergeAdditiveSelection(marquee.baseSelectionIds, hitIds);
4968
4968
  if (merged.length > 0) {
4969
4969
  applySelection(merged[0], merged);
4970
4970
  } else {
@@ -4987,8 +4987,8 @@ function commitDrag(drag, editTemplateMode, activeSlide, activeSlideIndex, setTe
4987
4987
  }
4988
4988
  return { ...el, x: start.x + dx, y: start.y + dy };
4989
4989
  });
4990
- const rerouted = chunk3WK4AE52_js.rerouteConnectorsForMovedElements(movedElements, movedIds);
4991
- return chunk3WK4AE52_js.applyReroutedConnectors(movedElements, rerouted);
4990
+ const rerouted = chunkTWUAZRCG_js.rerouteConnectorsForMovedElements(movedElements, movedIds);
4991
+ return chunkTWUAZRCG_js.applyReroutedConnectors(movedElements, rerouted);
4992
4992
  };
4993
4993
  if (editTemplateMode) {
4994
4994
  const slideId = activeSlide?.id;
@@ -5144,17 +5144,17 @@ function useCanvasInteractions(input) {
5144
5144
  return;
5145
5145
  }
5146
5146
  const el = elementLookup.get(editId);
5147
- if (el && chunk3WK4AE52_js.hasTextProperties(el)) {
5147
+ if (el && chunkTWUAZRCG_js.hasTextProperties(el)) {
5148
5148
  const committedText = transformCommittedText ? transformCommittedText(inlineEditingText) : inlineEditingText;
5149
- const textPatch = chunk3WK4AE52_js.buildInlineTextCommitPatch(el, committedText);
5149
+ const textPatch = chunkTWUAZRCG_js.buildInlineTextCommitPatch(el, committedText);
5150
5150
  if (!textPatch) {
5151
5151
  setInlineEditingElementId(null);
5152
5152
  setInlineEditingText("");
5153
5153
  return;
5154
5154
  }
5155
5155
  const editorEl = document.querySelector("[data-inline-editor]");
5156
- const newHeight = chunk3WK4AE52_js.resolveInlineEditAutoFitHeight(el.textStyle, el.height, editorEl);
5157
- const shrink = chunk3WK4AE52_js.resolveInlineEditNormAutofitShrink(el.textStyle, el.height, editorEl);
5156
+ const newHeight = chunkTWUAZRCG_js.resolveInlineEditAutoFitHeight(el.textStyle, el.height, editorEl);
5157
+ const shrink = chunkTWUAZRCG_js.resolveInlineEditNormAutofitShrink(el.textStyle, el.height, editorEl);
5158
5158
  ops.updateElementById(editId, {
5159
5159
  ...textPatch,
5160
5160
  ...newHeight !== void 0 ? { height: newHeight } : {},
@@ -5172,7 +5172,7 @@ function useCanvasInteractions(input) {
5172
5172
  setInlineEditingText("");
5173
5173
  };
5174
5174
  const openEquationEditorForElement = (el) => {
5175
- if (!chunk3WK4AE52_js.hasTextProperties(el)) {
5175
+ if (!chunkTWUAZRCG_js.hasTextProperties(el)) {
5176
5176
  return false;
5177
5177
  }
5178
5178
  const eqSeg = el.textSegments?.find((seg) => seg.equationXml);
@@ -5202,7 +5202,7 @@ function useCanvasInteractions(input) {
5202
5202
  justInteractedRef.current = false;
5203
5203
  } else {
5204
5204
  const el = elementLookup.get(elementId);
5205
- if (el && chunk3WK4AE52_js.hasTextProperties(el) && chunk3WK4AE52_js.canInteractWithElement(el, "textEdit")) {
5205
+ if (el && chunkTWUAZRCG_js.hasTextProperties(el) && chunkTWUAZRCG_js.canInteractWithElement(el, "textEdit")) {
5206
5206
  if (!openEquationEditorForElement(el)) {
5207
5207
  setInlineEditingElementId(elementId);
5208
5208
  setInlineEditingText(el.text ?? "");
@@ -5221,7 +5221,7 @@ function useCanvasInteractions(input) {
5221
5221
  if (openEquationEditorForElement(el)) {
5222
5222
  return;
5223
5223
  }
5224
- if (chunk3WK4AE52_js.hasTextProperties(el) && chunk3WK4AE52_js.canInteractWithElement(el, "textEdit")) {
5224
+ if (chunkTWUAZRCG_js.hasTextProperties(el) && chunkTWUAZRCG_js.canInteractWithElement(el, "textEdit")) {
5225
5225
  setInlineEditingElementId(elementId);
5226
5226
  setInlineEditingText(el.text ?? "");
5227
5227
  }
@@ -5244,7 +5244,7 @@ function useCanvasInteractions(input) {
5244
5244
  justSelectedRef.current = false;
5245
5245
  }
5246
5246
  const ids = !wasSelected ? [elementId] : effectiveSelectedIds.length ? effectiveSelectedIds : [elementId];
5247
- const movableIds = chunk3WK4AE52_js.filterInteractableIds(ids, (id) => elementLookup.get(id), "move");
5247
+ const movableIds = chunkTWUAZRCG_js.filterInteractableIds(ids, (id) => elementLookup.get(id), "move");
5248
5248
  if (movableIds.length === 0) {
5249
5249
  return;
5250
5250
  }
@@ -5314,7 +5314,7 @@ function useCanvasInteractions(input) {
5314
5314
  const handleResizePointerDown = (elementId, e, handle) => {
5315
5315
  e.stopPropagation();
5316
5316
  const el = elementLookup.get(elementId);
5317
- if (!el || !chunk3WK4AE52_js.canInteractWithElement(el, "resize")) {
5317
+ if (!el || !chunkTWUAZRCG_js.canInteractWithElement(el, "resize")) {
5318
5318
  return;
5319
5319
  }
5320
5320
  resizeStateRef.current = {
@@ -5336,7 +5336,7 @@ function useCanvasInteractions(input) {
5336
5336
  };
5337
5337
  const handleRotate = (elementId, rotationDeg) => {
5338
5338
  const el = elementLookup.get(elementId);
5339
- if (!el || !chunk3WK4AE52_js.canInteractWithElement(el, "rotate")) {
5339
+ if (!el || !chunkTWUAZRCG_js.canInteractWithElement(el, "rotate")) {
5340
5340
  return;
5341
5341
  }
5342
5342
  ops.updateElementById(elementId, { rotation: rotationDeg });
@@ -5356,10 +5356,10 @@ function useCanvasInteractions(input) {
5356
5356
  const handleAdjustmentPointerDown = (elementId, e, descriptor) => {
5357
5357
  e.stopPropagation();
5358
5358
  const el = elementLookup.get(elementId);
5359
- if (!el || !chunk3WK4AE52_js.canInteractWithElement(el, "adjustHandle")) {
5359
+ if (!el || !chunkTWUAZRCG_js.canInteractWithElement(el, "adjustHandle")) {
5360
5360
  return;
5361
5361
  }
5362
- shapeAdjustmentDragStateRef.current = chunk3WK4AE52_js.beginShapeAdjustment(
5362
+ shapeAdjustmentDragStateRef.current = chunkTWUAZRCG_js.beginShapeAdjustment(
5363
5363
  el,
5364
5364
  descriptor,
5365
5365
  e.clientX,
@@ -5406,7 +5406,7 @@ function createFileHandlers(deps) {
5406
5406
  h = Math.round(h * scale);
5407
5407
  }
5408
5408
  addElement({
5409
- id: chunk3WK4AE52_js.generateElementId(),
5409
+ id: chunkTWUAZRCG_js.generateElementId(),
5410
5410
  type: "image",
5411
5411
  x: Math.round((canvasSize.width - w) / 2),
5412
5412
  y: Math.round((canvasSize.height - h) / 2),
@@ -5417,7 +5417,7 @@ function createFileHandlers(deps) {
5417
5417
  };
5418
5418
  img.onerror = () => {
5419
5419
  addElement({
5420
- id: chunk3WK4AE52_js.generateElementId(),
5420
+ id: chunkTWUAZRCG_js.generateElementId(),
5421
5421
  type: "image",
5422
5422
  x: 100,
5423
5423
  y: 100,
@@ -5436,14 +5436,14 @@ function createFileHandlers(deps) {
5436
5436
  return;
5437
5437
  }
5438
5438
  e.target.value = "";
5439
- const mediaType = chunk3WK4AE52_js.classifyMediaType(file.type);
5439
+ const mediaType = chunkTWUAZRCG_js.classifyMediaType(file.type);
5440
5440
  if (!mediaType) {
5441
5441
  return;
5442
5442
  }
5443
5443
  const elFilePath = file.path;
5444
5444
  const insertMediaElement = (mediaSourceUrl, width, height) => {
5445
5445
  addElement({
5446
- id: chunk3WK4AE52_js.generateElementId(),
5446
+ id: chunkTWUAZRCG_js.generateElementId(),
5447
5447
  type: "media",
5448
5448
  mediaType,
5449
5449
  mediaMimeType: file.type || void 0,
@@ -5618,13 +5618,13 @@ function createStructuredElementHandlers(deps) {
5618
5618
  return;
5619
5619
  }
5620
5620
  addElement({
5621
- id: chunk3WK4AE52_js.generateElementId(),
5621
+ id: chunkTWUAZRCG_js.generateElementId(),
5622
5622
  type: "smartArt",
5623
5623
  x: 100,
5624
5624
  y: 120,
5625
5625
  width: 600,
5626
5626
  height: 340,
5627
- smartArtData: chunk3WK4AE52_js.buildSmartArtPresetData(
5627
+ smartArtData: chunkTWUAZRCG_js.buildSmartArtPresetData(
5628
5628
  layout,
5629
5629
  defaultItems,
5630
5630
  (i) => `node-${Date.now()}-${i}-${Math.random().toString(36).slice(2, 8)}`
@@ -5636,7 +5636,7 @@ function createStructuredElementHandlers(deps) {
5636
5636
  return;
5637
5637
  }
5638
5638
  addElement({
5639
- id: chunk3WK4AE52_js.generateElementId(),
5639
+ id: chunkTWUAZRCG_js.generateElementId(),
5640
5640
  type: "shape",
5641
5641
  x: 120,
5642
5642
  y: 200,
@@ -5674,7 +5674,7 @@ function createStructuredElementHandlers(deps) {
5674
5674
  return;
5675
5675
  }
5676
5676
  const resolved = resolveHyperlinkEditResult(data);
5677
- if (resolved.url && !chunk3WK4AE52_js.isUrlSafe(resolved.url)) {
5677
+ if (resolved.url && !chunkTWUAZRCG_js.isUrlSafe(resolved.url)) {
5678
5678
  return;
5679
5679
  }
5680
5680
  const actionClick = {
@@ -5698,7 +5698,7 @@ function createStructuredElementHandlers(deps) {
5698
5698
  const displayText = value || fieldTexts[fieldType] || fieldType;
5699
5699
  const fieldGuid = `{${crypto.randomUUID().toUpperCase()}}`;
5700
5700
  addElement({
5701
- id: chunk3WK4AE52_js.generateElementId(),
5701
+ id: chunkTWUAZRCG_js.generateElementId(),
5702
5702
  type: "shape",
5703
5703
  x: 120,
5704
5704
  y: 200,
@@ -5720,11 +5720,11 @@ function createStructuredElementHandlers(deps) {
5720
5720
  if (!activeSlide) {
5721
5721
  return;
5722
5722
  }
5723
- const preset = chunk3WK4AE52_js.ACTION_BUTTON_PRESETS.find((p) => p.shapeType === shapeType);
5723
+ const preset = chunkTWUAZRCG_js.ACTION_BUTTON_PRESETS.find((p) => p.shapeType === shapeType);
5724
5724
  if (!preset) {
5725
5725
  return;
5726
5726
  }
5727
- const defaultPptxAction = chunk3WK4AE52_js.elementActionToPptxAction({
5727
+ const defaultPptxAction = chunkTWUAZRCG_js.elementActionToPptxAction({
5728
5728
  trigger: "click",
5729
5729
  type: preset.defaultAction
5730
5730
  });
@@ -5733,7 +5733,7 @@ function createStructuredElementHandlers(deps) {
5733
5733
  defaultPptxAction.highlightClick = true;
5734
5734
  }
5735
5735
  addElement({
5736
- id: chunk3WK4AE52_js.generateElementId(),
5736
+ id: chunkTWUAZRCG_js.generateElementId(),
5737
5737
  type: "shape",
5738
5738
  x: 150,
5739
5739
  y: 150,
@@ -5800,14 +5800,14 @@ function useInsertElements(input) {
5800
5800
  return;
5801
5801
  }
5802
5802
  addElement({
5803
- id: chunk3WK4AE52_js.generateElementId(),
5803
+ id: chunkTWUAZRCG_js.generateElementId(),
5804
5804
  type: "text",
5805
5805
  x: 100,
5806
5806
  y: 100,
5807
5807
  width: 300,
5808
5808
  height: 60,
5809
5809
  text: "",
5810
- textStyle: { fontSize: chunkO27KNZLJ_js.DEFAULT_TEXT_FONT_SIZE }
5810
+ textStyle: { fontSize: chunkIVCYND7A_js.DEFAULT_TEXT_FONT_SIZE }
5811
5811
  });
5812
5812
  };
5813
5813
  const handleAddShape = () => {
@@ -5815,7 +5815,7 @@ function useInsertElements(input) {
5815
5815
  return;
5816
5816
  }
5817
5817
  addElement({
5818
- id: chunk3WK4AE52_js.generateElementId(),
5818
+ id: chunkTWUAZRCG_js.generateElementId(),
5819
5819
  type: "shape",
5820
5820
  x: 150,
5821
5821
  y: 150,
@@ -5834,15 +5834,15 @@ function useInsertElements(input) {
5834
5834
  return;
5835
5835
  }
5836
5836
  addElement({
5837
- ...chunk3WK4AE52_js.newTableElement(chunkO27KNZLJ_js.DEFAULT_TABLE_ROWS, chunkO27KNZLJ_js.DEFAULT_TABLE_COLUMNS, 100, 200),
5838
- id: chunk3WK4AE52_js.generateElementId()
5837
+ ...chunkTWUAZRCG_js.newTableElement(chunkIVCYND7A_js.DEFAULT_TABLE_ROWS, chunkIVCYND7A_js.DEFAULT_TABLE_COLUMNS, 100, 200),
5838
+ id: chunkTWUAZRCG_js.generateElementId()
5839
5839
  });
5840
5840
  };
5841
5841
  const handleAddChart = (chartKind) => {
5842
5842
  if (!activeSlide) {
5843
5843
  return;
5844
5844
  }
5845
- addElement(chunk3WK4AE52_js.createDefaultChartElement(chartKind));
5845
+ addElement(chunkTWUAZRCG_js.createDefaultChartElement(chartKind));
5846
5846
  };
5847
5847
  const structured = createStructuredElementHandlers({
5848
5848
  activeSlide,
@@ -5912,7 +5912,7 @@ function useClipboardHandlers(input) {
5912
5912
  if (!selectedElement) {
5913
5913
  return;
5914
5914
  }
5915
- setClipboardPayload(chunk3WK4AE52_js.buildElementClipboardPayload(selectedElement, editTemplateMode));
5915
+ setClipboardPayload(chunkTWUAZRCG_js.buildElementClipboardPayload(selectedElement, editTemplateMode));
5916
5916
  };
5917
5917
  const handleDelete = () => {
5918
5918
  const idsToDelete = effectiveSelectedIds;
@@ -5929,7 +5929,7 @@ function useClipboardHandlers(input) {
5929
5929
  handleDelete();
5930
5930
  };
5931
5931
  const insertClone = (source) => {
5932
- const clone = chunk3WK4AE52_js.cloneElementForPaste(source, { intoTemplate: editTemplateMode });
5932
+ const clone = chunkTWUAZRCG_js.cloneElementForPaste(source, { intoTemplate: editTemplateMode });
5933
5933
  ops.updateActiveElements((els) => [...els, clone]);
5934
5934
  ops.applySelection(clone.id);
5935
5935
  history.markDirty();
@@ -5964,7 +5964,7 @@ function resolveShapePath(el) {
5964
5964
  return el.pathData;
5965
5965
  }
5966
5966
  if ("shapeType" in el && typeof el.shapeType === "string") {
5967
- const clipPath = chunk3WK4AE52_js.getPresetShapeClipPath(el.shapeType);
5967
+ const clipPath = chunkTWUAZRCG_js.getPresetShapeClipPath(el.shapeType);
5968
5968
  if (clipPath) {
5969
5969
  const svgPath = clipPathToSvgPath(clipPath, el.width, el.height);
5970
5970
  if (svgPath) {
@@ -6015,7 +6015,7 @@ function clipPathToSvgPath(clipPath, width, height) {
6015
6015
  return parts.join(" ");
6016
6016
  }
6017
6017
  function transformPathToGlobal(pathData, el) {
6018
- const polys = chunk3WK4AE52_js.svgPathToPolygons(pathData);
6018
+ const polys = chunkTWUAZRCG_js.svgPathToPolygons(pathData);
6019
6019
  if (polys.length === 0) {
6020
6020
  return pathData;
6021
6021
  }
@@ -6035,10 +6035,10 @@ function transformPathToGlobal(pathData, el) {
6035
6035
  y: pt.y * scaleY + el.y
6036
6036
  }))
6037
6037
  );
6038
- return chunk3WK4AE52_js.polygonsToSvgPath(transformed);
6038
+ return chunkTWUAZRCG_js.polygonsToSvgPath(transformed);
6039
6039
  }
6040
6040
  function transformPathToLocal(pathData, x, y, _width, _height) {
6041
- const polys = chunk3WK4AE52_js.svgPathToPolygons(pathData);
6041
+ const polys = chunkTWUAZRCG_js.svgPathToPolygons(pathData);
6042
6042
  if (polys.length === 0) {
6043
6043
  return pathData;
6044
6044
  }
@@ -6048,10 +6048,10 @@ function transformPathToLocal(pathData, x, y, _width, _height) {
6048
6048
  y: pt.y - y
6049
6049
  }))
6050
6050
  );
6051
- return chunk3WK4AE52_js.polygonsToSvgPath(transformed);
6051
+ return chunkTWUAZRCG_js.polygonsToSvgPath(transformed);
6052
6052
  }
6053
6053
  function pathBounds(pathData) {
6054
- const polys = chunk3WK4AE52_js.svgPathToPolygons(pathData);
6054
+ const polys = chunkTWUAZRCG_js.svgPathToPolygons(pathData);
6055
6055
  let minX = Infinity;
6056
6056
  let minY = Infinity;
6057
6057
  let maxX = -Infinity;
@@ -6110,7 +6110,7 @@ function useMergeShapesHandler(input) {
6110
6110
  let allFragments = [];
6111
6111
  let remaining = globalPaths[0];
6112
6112
  for (let i = 1; i < globalPaths.length; i++) {
6113
- const frags = chunk3WK4AE52_js.mergeShapes("fragment", remaining, globalPaths[i]);
6113
+ const frags = chunkTWUAZRCG_js.mergeShapes("fragment", remaining, globalPaths[i]);
6114
6114
  if (Array.isArray(frags)) {
6115
6115
  allFragments = frags;
6116
6116
  }
@@ -6139,7 +6139,7 @@ function useMergeShapesHandler(input) {
6139
6139
  bounds.height
6140
6140
  );
6141
6141
  const newEl = {
6142
- id: chunk3WK4AE52_js.generateElementId(),
6142
+ id: chunkTWUAZRCG_js.generateElementId(),
6143
6143
  type: "shape",
6144
6144
  x: bounds.x,
6145
6145
  y: bounds.y,
@@ -6177,7 +6177,7 @@ function useMergeShapesHandler(input) {
6177
6177
  } else {
6178
6178
  let resultPath = globalPaths[0];
6179
6179
  for (let i = 1; i < globalPaths.length; i++) {
6180
- const result = chunk3WK4AE52_js.mergeShapes(operation, resultPath, globalPaths[i]);
6180
+ const result = chunkTWUAZRCG_js.mergeShapes(operation, resultPath, globalPaths[i]);
6181
6181
  if (typeof result === "string") {
6182
6182
  resultPath = result;
6183
6183
  }
@@ -6198,7 +6198,7 @@ function useMergeShapesHandler(input) {
6198
6198
  );
6199
6199
  const primary = targets[0];
6200
6200
  const newEl = {
6201
- id: chunk3WK4AE52_js.generateElementId(),
6201
+ id: chunkTWUAZRCG_js.generateElementId(),
6202
6202
  type: "shape",
6203
6203
  x: bounds.x,
6204
6204
  y: bounds.y,
@@ -6261,10 +6261,10 @@ function useGroupAlignLayerHandlers(input) {
6261
6261
  if (ids.length < 2 || !activeSlide) {
6262
6262
  return;
6263
6263
  }
6264
- if (!selectedElements.every((el) => chunk3WK4AE52_js.canInteractWithElement(el, "group"))) {
6264
+ if (!selectedElements.every((el) => chunkTWUAZRCG_js.canInteractWithElement(el, "group"))) {
6265
6265
  return;
6266
6266
  }
6267
- const { elements, groupId } = chunk3WK4AE52_js.groupElements(ops.activeElements, ids, chunk3WK4AE52_js.generateElementId());
6267
+ const { elements, groupId } = chunkTWUAZRCG_js.groupElements(ops.activeElements, ids, chunkTWUAZRCG_js.generateElementId());
6268
6268
  if (groupId === null) {
6269
6269
  return;
6270
6270
  }
@@ -6276,15 +6276,15 @@ function useGroupAlignLayerHandlers(input) {
6276
6276
  if (!selectedElement || selectedElement.type !== "group" || !activeSlide) {
6277
6277
  return;
6278
6278
  }
6279
- if (!chunk3WK4AE52_js.canInteractWithElement(selectedElement, "group")) {
6279
+ if (!chunkTWUAZRCG_js.canInteractWithElement(selectedElement, "group")) {
6280
6280
  return;
6281
6281
  }
6282
6282
  const group = selectedElement;
6283
- const intoTemplate = chunk3WK4AE52_js.isTemplateElementId(group.id);
6283
+ const intoTemplate = chunkTWUAZRCG_js.isTemplateElementId(group.id);
6284
6284
  const childIds = group.children.map(
6285
- (child) => intoTemplate ? chunk3WK4AE52_js.makeCloneId(true, child.id || group.id) : child.id || chunk3WK4AE52_js.generateElementId()
6285
+ (child) => intoTemplate ? chunkTWUAZRCG_js.makeCloneId(true, child.id || group.id) : child.id || chunkTWUAZRCG_js.generateElementId()
6286
6286
  );
6287
- const { elements, childIds: usedIds } = chunk3WK4AE52_js.ungroupElements(
6287
+ const { elements, childIds: usedIds } = chunkTWUAZRCG_js.ungroupElements(
6288
6288
  ops.activeElements,
6289
6289
  group.id,
6290
6290
  childIds,
@@ -6313,7 +6313,7 @@ function useGroupAlignLayerHandlers(input) {
6313
6313
  if (!edge) {
6314
6314
  return;
6315
6315
  }
6316
- const positions = chunk3WK4AE52_js.alignElements(selectedElements, edge);
6316
+ const positions = chunkTWUAZRCG_js.alignElements(selectedElements, edge);
6317
6317
  for (const [id, pos] of positions) {
6318
6318
  const el = elementLookup.get(id);
6319
6319
  if (!el) {
@@ -6331,7 +6331,7 @@ function useGroupAlignLayerHandlers(input) {
6331
6331
  if (!distAxis) {
6332
6332
  return;
6333
6333
  }
6334
- const positions = chunk3WK4AE52_js.distributeElements(selectedElements, distAxis);
6334
+ const positions = chunkTWUAZRCG_js.distributeElements(selectedElements, distAxis);
6335
6335
  for (const [id, pos] of positions) {
6336
6336
  const el = elementLookup.get(id);
6337
6337
  if (!el) {
@@ -6342,14 +6342,14 @@ function useGroupAlignLayerHandlers(input) {
6342
6342
  history.markDirty();
6343
6343
  };
6344
6344
  const canDistribute = selectedElements.length >= 3;
6345
- const selectionGroupable = selectedElements.every((el) => chunk3WK4AE52_js.canInteractWithElement(el, "group"));
6345
+ const selectionGroupable = selectedElements.every((el) => chunkTWUAZRCG_js.canInteractWithElement(el, "group"));
6346
6346
  const handleMoveLayer = (direction) => {
6347
6347
  if (!selectedElement || !activeSlide) {
6348
6348
  return;
6349
6349
  }
6350
6350
  const id = selectedElement.id;
6351
6351
  ops.updateActiveElements(
6352
- (els) => direction === "forward" ? chunk3WK4AE52_js.bringForward(els, id) : direction === "backward" ? chunk3WK4AE52_js.sendBackward(els, id) : els
6352
+ (els) => direction === "forward" ? chunkTWUAZRCG_js.bringForward(els, id) : direction === "backward" ? chunkTWUAZRCG_js.sendBackward(els, id) : els
6353
6353
  );
6354
6354
  history.markDirty();
6355
6355
  };
@@ -6359,7 +6359,7 @@ function useGroupAlignLayerHandlers(input) {
6359
6359
  }
6360
6360
  const id = selectedElement.id;
6361
6361
  ops.updateActiveElements(
6362
- (els) => direction === "front" ? chunk3WK4AE52_js.bringToFront(els, id) : chunk3WK4AE52_js.sendToBack(els, id)
6362
+ (els) => direction === "front" ? chunkTWUAZRCG_js.bringToFront(els, id) : chunkTWUAZRCG_js.sendToBack(els, id)
6363
6363
  );
6364
6364
  history.markDirty();
6365
6365
  };
@@ -6493,7 +6493,7 @@ function useSlideManagement(input) {
6493
6493
  theme
6494
6494
  } = input;
6495
6495
  const handleAddSlide = () => {
6496
- const newSlide = chunk3WK4AE52_js.createBlankSlide(slides.length + 1);
6496
+ const newSlide = chunkTWUAZRCG_js.createBlankSlide(slides.length + 1);
6497
6497
  ops.updateSlides((prev) => {
6498
6498
  const next = [...prev];
6499
6499
  next.splice(activeSlideIndex + 1, 0, newSlide);
@@ -6556,7 +6556,7 @@ function useSlideManagement(input) {
6556
6556
  }
6557
6557
  const clone = {
6558
6558
  ...src,
6559
- id: chunk3WK4AE52_js.makeSlideId(),
6559
+ id: chunkTWUAZRCG_js.makeSlideId(),
6560
6560
  elements: src.elements.map((el) => ({
6561
6561
  ...el,
6562
6562
  id: `${el.id}-dup-${Math.random().toString(36).slice(2, 6)}`
@@ -6588,7 +6588,7 @@ function useSlideManagement(input) {
6588
6588
  const handleInsertSlideFromLayout = (layoutPath, layoutName) => {
6589
6589
  const insertAt = activeSlideIndex + 1;
6590
6590
  const draft = {
6591
- ...chunk3WK4AE52_js.createBlankSlide(slides.length + 1),
6591
+ ...chunkTWUAZRCG_js.createBlankSlide(slides.length + 1),
6592
6592
  layoutPath,
6593
6593
  ...layoutName ? { layoutName } : {}
6594
6594
  };
@@ -6621,9 +6621,9 @@ function useSlideManagement(input) {
6621
6621
  };
6622
6622
  const handleInsertSlideFromTemplate = (templateId) => {
6623
6623
  const insertAt = activeSlideIndex + 1;
6624
- const draft = chunk3WK4AE52_js.buildSlideTemplateSlide(templateId, chunk3WK4AE52_js.makeSlideId(), slides.length + 1, {
6624
+ const draft = chunkTWUAZRCG_js.buildSlideTemplateSlide(templateId, chunkTWUAZRCG_js.makeSlideId(), slides.length + 1, {
6625
6625
  ...canvasSize ? { slideWidth: canvasSize.width, slideHeight: canvasSize.height } : {},
6626
- scheme: chunk3WK4AE52_js.templateSchemeFromTheme(theme?.colorScheme)
6626
+ scheme: chunkTWUAZRCG_js.templateSchemeFromTheme(theme?.colorScheme)
6627
6627
  });
6628
6628
  ops.updateSlides((prev) => insertSlideFromLayoutUpdater(prev, activeSlideIndex, draft));
6629
6629
  setActiveSlideIndex(insertAt);
@@ -6660,7 +6660,7 @@ function createTableMergeHandlers(input) {
6660
6660
  if (!nextCell || nextCell.hMerge || nextCell.vMerge) {
6661
6661
  return;
6662
6662
  }
6663
- const newTableData = chunk3WK4AE52_js.mergeCells(
6663
+ const newTableData = chunkTWUAZRCG_js.mergeCells(
6664
6664
  [
6665
6665
  { row: rowIndex, col: columnIndex },
6666
6666
  { row: rowIndex, col: nextColIdx }
@@ -6668,7 +6668,7 @@ function createTableMergeHandlers(input) {
6668
6668
  td
6669
6669
  );
6670
6670
  const updates = { tableData: newTableData };
6671
- const newRawXml = chunk3WK4AE52_js.updateMergeAttrsInRawXml(selectedElement, newTableData);
6671
+ const newRawXml = chunkTWUAZRCG_js.updateMergeAttrsInRawXml(selectedElement, newTableData);
6672
6672
  if (newRawXml) {
6673
6673
  updates.rawXml = newRawXml;
6674
6674
  }
@@ -6694,7 +6694,7 @@ function createTableMergeHandlers(input) {
6694
6694
  if (!targetNextCell || targetNextCell.hMerge || targetNextCell.vMerge) {
6695
6695
  return;
6696
6696
  }
6697
- const newTableData = chunk3WK4AE52_js.mergeCells(
6697
+ const newTableData = chunkTWUAZRCG_js.mergeCells(
6698
6698
  [
6699
6699
  { row: rowIndex, col: columnIndex },
6700
6700
  { row: targetNextRowIdx, col: columnIndex }
@@ -6702,7 +6702,7 @@ function createTableMergeHandlers(input) {
6702
6702
  td
6703
6703
  );
6704
6704
  const updates = { tableData: newTableData };
6705
- const newRawXml = chunk3WK4AE52_js.updateMergeAttrsInRawXml(selectedElement, newTableData);
6705
+ const newRawXml = chunkTWUAZRCG_js.updateMergeAttrsInRawXml(selectedElement, newTableData);
6706
6706
  if (newRawXml) {
6707
6707
  updates.rawXml = newRawXml;
6708
6708
  }
@@ -6717,9 +6717,9 @@ function createTableMergeHandlers(input) {
6717
6717
  return;
6718
6718
  }
6719
6719
  const td = selectedElement.tableData;
6720
- const newTableData = chunk3WK4AE52_js.mergeCells(ts.selectedCells, td);
6720
+ const newTableData = chunkTWUAZRCG_js.mergeCells(ts.selectedCells, td);
6721
6721
  const updates = { tableData: newTableData };
6722
- const newRawXml = chunk3WK4AE52_js.updateMergeAttrsInRawXml(selectedElement, newTableData);
6722
+ const newRawXml = chunkTWUAZRCG_js.updateMergeAttrsInRawXml(selectedElement, newTableData);
6723
6723
  if (newRawXml) {
6724
6724
  updates.rawXml = newRawXml;
6725
6725
  }
@@ -6736,9 +6736,9 @@ function createTableMergeHandlers(input) {
6736
6736
  }
6737
6737
  const { rowIndex, columnIndex } = ts;
6738
6738
  const td = selectedElement.tableData;
6739
- const newTableData = chunk3WK4AE52_js.splitCell(rowIndex, columnIndex, td);
6739
+ const newTableData = chunkTWUAZRCG_js.splitCell(rowIndex, columnIndex, td);
6740
6740
  const updates = { tableData: newTableData };
6741
- const newRawXml = chunk3WK4AE52_js.updateMergeAttrsInRawXml(selectedElement, newTableData);
6741
+ const newRawXml = chunkTWUAZRCG_js.updateMergeAttrsInRawXml(selectedElement, newTableData);
6742
6742
  if (newRawXml) {
6743
6743
  updates.rawXml = newRawXml;
6744
6744
  }
@@ -6772,10 +6772,10 @@ function createTableStructHandlers(input) {
6772
6772
  const text = transformCommittedText ? transformCommittedText(rawText) : rawText;
6773
6773
  const updates = {};
6774
6774
  if (el.tableData) {
6775
- updates.tableData = chunk3WK4AE52_js.setCellText(el, rowIndex, colIndex, text).tableData;
6775
+ updates.tableData = chunkTWUAZRCG_js.setCellText(el, rowIndex, colIndex, text).tableData;
6776
6776
  }
6777
6777
  if (el.rawXml) {
6778
- const newRawXml = chunk3WK4AE52_js.updateCellTextInRawXml(el, rowIndex, colIndex, text);
6778
+ const newRawXml = chunkTWUAZRCG_js.updateCellTextInRawXml(el, rowIndex, colIndex, text);
6779
6779
  if (newRawXml) {
6780
6780
  updates.rawXml = newRawXml;
6781
6781
  }
@@ -6799,7 +6799,7 @@ function createTableStructHandlers(input) {
6799
6799
  const { rowIndex, columnIndex: colIndex } = ts;
6800
6800
  const updates = {};
6801
6801
  if (selectedElement.rawXml) {
6802
- const newRawXml = chunk3WK4AE52_js.updateCellTextStyleInRawXml(
6802
+ const newRawXml = chunkTWUAZRCG_js.updateCellTextStyleInRawXml(
6803
6803
  selectedElement,
6804
6804
  rowIndex,
6805
6805
  colIndex,
@@ -6863,9 +6863,9 @@ function createTableStructHandlers(input) {
6863
6863
  return;
6864
6864
  }
6865
6865
  const rowIdx = ts?.rowIndex ?? 0;
6866
- const newTableData = chunk3WK4AE52_js.insertTableRow(selectedElement.tableData, rowIdx, position);
6866
+ const newTableData = chunkTWUAZRCG_js.insertTableRow(selectedElement.tableData, rowIdx, position);
6867
6867
  const updates = { tableData: newTableData };
6868
- const newRawXml = chunk3WK4AE52_js.rebuildTableStructureInRawXml(selectedElement, newTableData);
6868
+ const newRawXml = chunkTWUAZRCG_js.rebuildTableStructureInRawXml(selectedElement, newTableData);
6869
6869
  if (newRawXml) {
6870
6870
  updates.rawXml = newRawXml;
6871
6871
  }
@@ -6878,12 +6878,12 @@ function createTableStructHandlers(input) {
6878
6878
  }
6879
6879
  const td = selectedElement.tableData;
6880
6880
  const rowIdx = ts?.rowIndex ?? 0;
6881
- const newTableData = chunk3WK4AE52_js.deleteTableRow(td, rowIdx);
6881
+ const newTableData = chunkTWUAZRCG_js.deleteTableRow(td, rowIdx);
6882
6882
  if (newTableData === td) {
6883
6883
  return;
6884
6884
  }
6885
6885
  const updates = { tableData: newTableData };
6886
- const newRawXml = chunk3WK4AE52_js.rebuildTableStructureInRawXml(selectedElement, newTableData);
6886
+ const newRawXml = chunkTWUAZRCG_js.rebuildTableStructureInRawXml(selectedElement, newTableData);
6887
6887
  if (newRawXml) {
6888
6888
  updates.rawXml = newRawXml;
6889
6889
  }
@@ -6895,9 +6895,9 @@ function createTableStructHandlers(input) {
6895
6895
  return;
6896
6896
  }
6897
6897
  const colIdx = ts?.columnIndex ?? 0;
6898
- const newTableData = chunk3WK4AE52_js.insertTableColumn(selectedElement.tableData, colIdx, position);
6898
+ const newTableData = chunkTWUAZRCG_js.insertTableColumn(selectedElement.tableData, colIdx, position);
6899
6899
  const updates = { tableData: newTableData };
6900
- const newRawXml = chunk3WK4AE52_js.rebuildTableStructureInRawXml(selectedElement, newTableData);
6900
+ const newRawXml = chunkTWUAZRCG_js.rebuildTableStructureInRawXml(selectedElement, newTableData);
6901
6901
  if (newRawXml) {
6902
6902
  updates.rawXml = newRawXml;
6903
6903
  }
@@ -6910,12 +6910,12 @@ function createTableStructHandlers(input) {
6910
6910
  }
6911
6911
  const td = selectedElement.tableData;
6912
6912
  const colIdx = ts?.columnIndex ?? 0;
6913
- const newTableData = chunk3WK4AE52_js.deleteTableColumn(td, colIdx);
6913
+ const newTableData = chunkTWUAZRCG_js.deleteTableColumn(td, colIdx);
6914
6914
  if (newTableData === td) {
6915
6915
  return;
6916
6916
  }
6917
6917
  const updates = { tableData: newTableData };
6918
- const newRawXml = chunk3WK4AE52_js.rebuildTableStructureInRawXml(selectedElement, newTableData);
6918
+ const newRawXml = chunkTWUAZRCG_js.rebuildTableStructureInRawXml(selectedElement, newTableData);
6919
6919
  if (newRawXml) {
6920
6920
  updates.rawXml = newRawXml;
6921
6921
  }
@@ -6951,8 +6951,8 @@ async function renderToCanvas(element, options = {}) {
6951
6951
  return html2canvasPro(element, {
6952
6952
  ...options,
6953
6953
  onclone: async (doc, clonedEl) => {
6954
- await chunk3WK4AE52_js.normalizeColorsForCapture(doc, clonedEl);
6955
- chunk3WK4AE52_js.preprocessCssForCapture(clonedEl);
6954
+ await chunkTWUAZRCG_js.normalizeColorsForCapture(doc, clonedEl);
6955
+ chunkTWUAZRCG_js.preprocessCssForCapture(clonedEl);
6956
6956
  if (typeof userOnClone === "function") {
6957
6957
  userOnClone(doc, clonedEl);
6958
6958
  }
@@ -6982,7 +6982,7 @@ function useExportSaveAs(input) {
6982
6982
  slideSizeEmu
6983
6983
  } = input;
6984
6984
  const handleSaveAsFormat = async (format) => {
6985
- const downloadName = chunk3WK4AE52_js.savedPresentationFileName(filePath, format);
6985
+ const downloadName = chunkTWUAZRCG_js.savedPresentationFileName(filePath, format);
6986
6986
  try {
6987
6987
  const data = await serializeSlides(format);
6988
6988
  if (!data) {
@@ -6990,16 +6990,16 @@ function useExportSaveAs(input) {
6990
6990
  }
6991
6991
  const mimeType = format === "ppt" ? "application/vnd.ms-powerpoint" : "application/vnd.openxmlformats-officedocument.presentationml.presentation";
6992
6992
  const blob = new Blob([data], { type: mimeType });
6993
- chunk3WK4AE52_js.downloadBlob(blob, downloadName);
6993
+ chunkTWUAZRCG_js.downloadBlob(blob, downloadName);
6994
6994
  } catch (err) {
6995
6995
  console.error(`[PowerPointViewer] Save as .${format} failed:`, err);
6996
6996
  }
6997
6997
  };
6998
6998
  const handleExportJson = () => {
6999
6999
  const sourceName = filePath ? filePath.replace(/\\/gu, "/").split("/").pop() : void 0;
7000
- const slideSize = chunk3WK4AE52_js.resolveSlideSizeSelection({ current: slideSizeEmu, canvas: canvasSize }).size;
7000
+ const slideSize = chunkTWUAZRCG_js.resolveSlideSizeSelection({ current: slideSizeEmu, canvas: canvasSize }).size;
7001
7001
  const data = {
7002
- slides: chunk3WK4AE52_js.buildSaveSlides(slides, templateElementsBySlideId),
7002
+ slides: chunkTWUAZRCG_js.buildSaveSlides(slides, templateElementsBySlideId),
7003
7003
  width: canvasSize.width,
7004
7004
  height: canvasSize.height,
7005
7005
  widthEmu: slideSize.widthEmu,
@@ -7018,7 +7018,7 @@ function useExportSaveAs(input) {
7018
7018
  handoutMaster
7019
7019
  };
7020
7020
  try {
7021
- chunk3WK4AE52_js.exportDeckJson(data, sourceName);
7021
+ chunkTWUAZRCG_js.exportDeckJson(data, sourceName);
7022
7022
  } catch (err) {
7023
7023
  console.error("[PowerPointViewer] JSON export failed:", err);
7024
7024
  }
@@ -7062,26 +7062,70 @@ function safeConfirm(message) {
7062
7062
  }
7063
7063
 
7064
7064
  // src/viewer/utils/export-helpers.ts
7065
- async function renderElementToCanvas(element, scale = 2, backgroundColor) {
7066
- const canvas = await renderToCanvas(element, {
7065
+ function ignoreExportOverlayElements(el) {
7066
+ const htmlEl = el;
7067
+ if (htmlEl.dataset?.exportIgnore === "true") {
7068
+ return true;
7069
+ }
7070
+ return Boolean(
7071
+ htmlEl.classList?.contains("pointer-events-none") && (htmlEl.classList.contains("z-50") || htmlEl.classList.contains("z-[60]"))
7072
+ );
7073
+ }
7074
+ function measureNaturalSize(element) {
7075
+ const rect = element.getBoundingClientRect();
7076
+ return {
7077
+ width: rect.width || element.offsetWidth,
7078
+ height: rect.height || element.offsetHeight
7079
+ };
7080
+ }
7081
+ function buildRasterOptions(element, scale, backgroundColor, mode) {
7082
+ return {
7067
7083
  scale,
7068
- useCORS: true,
7069
- allowTaint: true,
7070
- backgroundColor: backgroundColor ?? null,
7071
- logging: false,
7072
- // Ignore elements that interfere with export (selection overlays, snap lines, etc.)
7073
- ignoreElements: (el) => {
7074
- const htmlEl = el;
7075
- if (htmlEl.dataset?.exportIgnore === "true") {
7076
- return true;
7077
- }
7078
- if (htmlEl.classList?.contains("pointer-events-none") && (htmlEl.classList.contains("z-50") || htmlEl.classList.contains("z-[60]"))) {
7079
- return true;
7080
- }
7081
- return false;
7082
- }
7083
- });
7084
- return canvas;
7084
+ backgroundColor,
7085
+ mode,
7086
+ html2canvasFallback: (sourceRect, outputSize) => renderToCanvas(element, {
7087
+ scale: outputSize.width / (sourceRect.width || 1),
7088
+ x: sourceRect.x,
7089
+ y: sourceRect.y,
7090
+ width: sourceRect.width,
7091
+ height: sourceRect.height,
7092
+ useCORS: true,
7093
+ allowTaint: true,
7094
+ backgroundColor: backgroundColor ?? null,
7095
+ logging: false,
7096
+ ignoreElements: ignoreExportOverlayElements
7097
+ })
7098
+ };
7099
+ }
7100
+ async function renderElementToRaster(element, scale = 2, backgroundColor, mode = "auto") {
7101
+ const { width, height } = measureNaturalSize(element);
7102
+ return chunkTWUAZRCG_js.rasterizeElement(
7103
+ element,
7104
+ width,
7105
+ height,
7106
+ element.ownerDocument,
7107
+ buildRasterOptions(element, scale, backgroundColor, mode)
7108
+ );
7109
+ }
7110
+ async function renderElementToTiles(element, scale = 2, backgroundColor, mode = "auto") {
7111
+ const { width, height } = measureNaturalSize(element);
7112
+ return chunkTWUAZRCG_js.rasterizeElementTiles(
7113
+ element,
7114
+ width,
7115
+ height,
7116
+ element.ownerDocument,
7117
+ buildRasterOptions(element, scale, backgroundColor, mode)
7118
+ );
7119
+ }
7120
+ async function renderElementToClampedCanvas(element, scale = 2, backgroundColor, mode = "auto") {
7121
+ const { width, height } = measureNaturalSize(element);
7122
+ return chunkTWUAZRCG_js.rasterizeElementClampedToCanvas(
7123
+ element,
7124
+ width,
7125
+ height,
7126
+ element.ownerDocument,
7127
+ buildRasterOptions(element, scale, backgroundColor, mode)
7128
+ );
7085
7129
  }
7086
7130
  function waitForRender(ms = 100) {
7087
7131
  return new Promise((resolve) => {
@@ -7096,32 +7140,21 @@ function waitForRender(ms = 100) {
7096
7140
  // src/viewer/utils/export-slides.ts
7097
7141
  async function exportSlideToPngBlob(slideElement, options = {}) {
7098
7142
  const { scale = 2, backgroundColor } = options;
7099
- const canvas = await renderElementToCanvas(slideElement, scale, backgroundColor);
7100
- return new Promise((resolve, reject) => {
7101
- canvas.toBlob((blob) => {
7102
- if (blob) {
7103
- resolve(blob);
7104
- } else {
7105
- reject(new Error("Canvas toBlob returned null"));
7106
- }
7107
- }, "image/png");
7108
- });
7143
+ const result = await renderElementToRaster(slideElement, scale, backgroundColor);
7144
+ return chunkTWUAZRCG_js.rasterResultToPngBlob(result);
7109
7145
  }
7110
7146
  async function exportSlideAsPng(slideElement, slideIndex, options = {}) {
7111
7147
  const blob = await exportSlideToPngBlob(slideElement, options);
7112
- chunk3WK4AE52_js.downloadBlob(blob, `slide-${slideIndex + 1}.png`);
7148
+ chunkTWUAZRCG_js.downloadBlob(blob, `slide-${slideIndex + 1}.png`);
7113
7149
  }
7114
7150
  async function copySlideToClipboard(slideElement, options = {}) {
7115
7151
  const blob = await exportSlideToPngBlob(slideElement, options);
7116
7152
  await navigator.clipboard.write([new ClipboardItem({ "image/png": blob })]);
7117
7153
  }
7118
- async function exportAllSlidesAsPdf(slideStageRef, totalSlides, setActiveSlide, currentSlideIndex, filename = "presentation.pdf", options = {}) {
7119
- const { scale = 2, onProgress, signal } = options;
7120
- const images = [];
7154
+ async function captureAllSlidesAsPngDataUrls(slideStageRef, totalSlides, setActiveSlide, currentSlideIndex, options = {}) {
7155
+ const { scale = 2, onProgress } = options;
7156
+ const dataUrls = [];
7121
7157
  for (let i = 0; i < totalSlides; i++) {
7122
- if (signal?.aborted) {
7123
- throw new DOMException("Export cancelled", "AbortError");
7124
- }
7125
7158
  onProgress?.(i, totalSlides);
7126
7159
  setActiveSlide(i);
7127
7160
  await waitForRender(150);
@@ -7130,21 +7163,34 @@ async function exportAllSlidesAsPdf(slideStageRef, totalSlides, setActiveSlide,
7130
7163
  console.warn(`[export] Could not find slide stage element for slide ${i}`);
7131
7164
  continue;
7132
7165
  }
7133
- const canvas = await renderElementToCanvas(stageEl, scale);
7134
- images.push(chunk3WK4AE52_js.canvasToJpegData(canvas));
7166
+ const { canvas } = await renderElementToClampedCanvas(stageEl, scale);
7167
+ dataUrls.push(canvas.toDataURL("image/png"));
7135
7168
  }
7136
7169
  onProgress?.(totalSlides, totalSlides);
7137
7170
  setActiveSlide(currentSlideIndex);
7138
- if (images.length === 0) {
7139
- throw new Error(chunk3AJ54EAB_js.translationsEn["pptx.export.errorNoSlidesPdf"]);
7140
- }
7141
- const pdfBlobUrl = chunkO27KNZLJ_js.buildPdfFromImageData(images);
7142
- chunk3WK4AE52_js.downloadDataUrl(pdfBlobUrl, filename);
7171
+ return dataUrls;
7143
7172
  }
7144
- async function captureAllSlidesAsPngDataUrls(slideStageRef, totalSlides, setActiveSlide, currentSlideIndex, options = {}) {
7145
- const { scale = 2, onProgress } = options;
7146
- const dataUrls = [];
7173
+
7174
+ // src/viewer/utils/export-pdf.ts
7175
+ function tilesToPdfPage(tilesResult) {
7176
+ return tilesResult.tiles.map((tile) => ({
7177
+ image: chunkTWUAZRCG_js.canvasToJpegData(tile.canvas),
7178
+ placement: chunkTWUAZRCG_js.placeTileOnPage(
7179
+ tile,
7180
+ tilesResult.fullWidth,
7181
+ tilesResult.fullHeight,
7182
+ chunkTWUAZRCG_js.PDF_SLIDES_PAGE_WIDTH_PT,
7183
+ chunkTWUAZRCG_js.PDF_SLIDES_PAGE_HEIGHT_PT
7184
+ )
7185
+ }));
7186
+ }
7187
+ async function exportAllSlidesAsPdf(slideStageRef, totalSlides, setActiveSlide, currentSlideIndex, filename = "presentation.pdf", options = {}) {
7188
+ const { scale = 2, onProgress, signal } = options;
7189
+ const pages = [];
7147
7190
  for (let i = 0; i < totalSlides; i++) {
7191
+ if (signal?.aborted) {
7192
+ throw new DOMException("Export cancelled", "AbortError");
7193
+ }
7148
7194
  onProgress?.(i, totalSlides);
7149
7195
  setActiveSlide(i);
7150
7196
  await waitForRender(150);
@@ -7153,12 +7199,16 @@ async function captureAllSlidesAsPngDataUrls(slideStageRef, totalSlides, setActi
7153
7199
  console.warn(`[export] Could not find slide stage element for slide ${i}`);
7154
7200
  continue;
7155
7201
  }
7156
- const canvas = await renderElementToCanvas(stageEl, scale);
7157
- dataUrls.push(canvas.toDataURL("image/png"));
7202
+ const tilesResult = await renderElementToTiles(stageEl, scale);
7203
+ pages.push(tilesToPdfPage(tilesResult));
7158
7204
  }
7159
7205
  onProgress?.(totalSlides, totalSlides);
7160
7206
  setActiveSlide(currentSlideIndex);
7161
- return dataUrls;
7207
+ if (pages.length === 0) {
7208
+ throw new Error(chunk3AJ54EAB_js.translationsEn["pptx.export.errorNoSlidesPdf"]);
7209
+ }
7210
+ const pdfBlobUrl = chunkIVCYND7A_js.buildPdfFromTiledImageData(pages);
7211
+ chunkTWUAZRCG_js.downloadDataUrl(pdfBlobUrl, filename);
7162
7212
  }
7163
7213
  async function exportAllSlidesAsNotesPdf(slideStageRef, totalSlides, setActiveSlide, currentSlideIndex, slideNotes, filename = "presentation-notes.pdf", options = {}) {
7164
7214
  const { scale = 2, onProgress, signal } = options;
@@ -7175,7 +7225,7 @@ async function exportAllSlidesAsNotesPdf(slideStageRef, totalSlides, setActiveSl
7175
7225
  console.warn(`[export] Could not find slide stage element for slide ${i}`);
7176
7226
  continue;
7177
7227
  }
7178
- const canvas = await renderElementToCanvas(stageEl, scale);
7228
+ const { canvas } = await renderElementToClampedCanvas(stageEl, scale);
7179
7229
  pages.push({
7180
7230
  canvas,
7181
7231
  notes: slideNotes[i],
@@ -7187,8 +7237,8 @@ async function exportAllSlidesAsNotesPdf(slideStageRef, totalSlides, setActiveSl
7187
7237
  if (pages.length === 0) {
7188
7238
  throw new Error(chunk3AJ54EAB_js.translationsEn["pptx.export.errorNoSlidesNotesPdf"]);
7189
7239
  }
7190
- const pdfDataUrl = chunkO27KNZLJ_js.buildNotesPdf(pages);
7191
- chunk3WK4AE52_js.downloadDataUrl(pdfDataUrl, filename);
7240
+ const pdfDataUrl = chunkIVCYND7A_js.buildNotesPdf(pages);
7241
+ chunkTWUAZRCG_js.downloadDataUrl(pdfDataUrl, filename);
7192
7242
  }
7193
7243
 
7194
7244
  // src/viewer/utils/export-video.ts
@@ -7214,7 +7264,7 @@ async function exportAllSlidesAsVideo(slideStageRef, totalSlides, setActiveSlide
7214
7264
  console.warn(`[export] Could not find slide stage element for slide ${i}`);
7215
7265
  continue;
7216
7266
  }
7217
- const canvas = await renderElementToCanvas(stageEl, scale);
7267
+ const { canvas } = await renderElementToClampedCanvas(stageEl, scale);
7218
7268
  slideCanvases.push(canvas);
7219
7269
  }
7220
7270
  setActiveSlide(currentSlideIndex);
@@ -7232,7 +7282,7 @@ async function exportAllSlidesAsVideo(slideStageRef, totalSlides, setActiveSlide
7232
7282
  const fps = 30;
7233
7283
  const stream = recordingCanvas.captureStream(fps);
7234
7284
  const recorder = new MediaRecorder(stream, {
7235
- mimeType: chunk3WK4AE52_js.pickSupportedMimeType([...chunk3WK4AE52_js.WEBM_MIME_CANDIDATES]),
7285
+ mimeType: chunkTWUAZRCG_js.pickSupportedMimeType([...chunkTWUAZRCG_js.WEBM_MIME_CANDIDATES]),
7236
7286
  videoBitsPerSecond: 5e6
7237
7287
  });
7238
7288
  const chunks = [];
@@ -7255,8 +7305,8 @@ async function exportAllSlidesAsVideo(slideStageRef, totalSlides, setActiveSlide
7255
7305
  const duration = slideTimingsMs?.[i] ?? slideDurationMs;
7256
7306
  ctx.clearRect(0, 0, recordingCanvas.width, recordingCanvas.height);
7257
7307
  ctx.drawImage(slideCanvases[i], 0, 0);
7258
- const frameInterval = chunk3WK4AE52_js.fpsToFrameIntervalMs(fps);
7259
- const framesNeeded = chunk3WK4AE52_js.segmentFrameCount(duration, fps);
7308
+ const frameInterval = chunkTWUAZRCG_js.fpsToFrameIntervalMs(fps);
7309
+ const framesNeeded = chunkTWUAZRCG_js.segmentFrameCount(duration, fps);
7260
7310
  for (let f = 0; f < framesNeeded; f++) {
7261
7311
  if (signal?.aborted) {
7262
7312
  recorder.stop();
@@ -7289,7 +7339,7 @@ async function exportAllSlidesAsGif(slideStageRef, totalSlides, setActiveSlide,
7289
7339
  if (!stageEl) {
7290
7340
  continue;
7291
7341
  }
7292
- const canvas = await renderElementToCanvas(stageEl, scale);
7342
+ const { canvas } = await renderElementToClampedCanvas(stageEl, scale);
7293
7343
  const ctx = canvas.getContext("2d");
7294
7344
  if (!ctx) {
7295
7345
  continue;
@@ -7305,7 +7355,7 @@ async function exportAllSlidesAsGif(slideStageRef, totalSlides, setActiveSlide,
7305
7355
  if (frames.length === 0) {
7306
7356
  throw new Error(chunk3AJ54EAB_js.translationsEn["pptx.export.errorNoSlidesGif"]);
7307
7357
  }
7308
- const gifBytes = chunk3WK4AE52_js.encodeGif(frames, Math.round(slideDurationMs / 10));
7358
+ const gifBytes = chunkTWUAZRCG_js.encodeGif(frames, Math.round(slideDurationMs / 10));
7309
7359
  onProgress?.(totalSlides, totalSlides);
7310
7360
  const buf = new ArrayBuffer(gifBytes.length);
7311
7361
  new Uint8Array(buf).set(gifBytes);
@@ -7359,7 +7409,7 @@ function exportAllSlidesToSvg(data, options = {}) {
7359
7409
  continue;
7360
7410
  }
7361
7411
  onProgress?.(processedCount, data.slides.length);
7362
- let svg = chunk3WK4AE52_js.SvgExporter.exportSlide(slide, data.width, data.height, svgOptions);
7412
+ let svg = chunkTWUAZRCG_js.SvgExporter.exportSlide(slide, data.width, data.height, svgOptions);
7363
7413
  if (embedFonts && fontFaces?.length) {
7364
7414
  svg = injectFontFaces(svg, fontFaces);
7365
7415
  }
@@ -7461,21 +7511,21 @@ function useExportHandlers(input) {
7461
7511
  {
7462
7512
  scale: imageExportScale,
7463
7513
  onProgress: (current, total) => {
7464
- setExportProgress(chunk3WK4AE52_js.slideProgressPercent(current, total));
7465
- setExportStatusMessage(chunk3WK4AE52_js.slideStatusLabel("Rendering", current, total));
7514
+ setExportProgress(chunkTWUAZRCG_js.slideProgressPercent(current, total));
7515
+ setExportStatusMessage(chunkTWUAZRCG_js.slideStatusLabel("Rendering", current, total));
7466
7516
  },
7467
7517
  signal: abortCtrl.signal
7468
7518
  }
7469
7519
  );
7470
- setExportProgress(chunk3WK4AE52_js.EXPORT_ASSEMBLING_PERCENT);
7520
+ setExportProgress(chunkTWUAZRCG_js.EXPORT_ASSEMBLING_PERCENT);
7471
7521
  setExportStatusMessage("Building PDF...");
7472
7522
  await new Promise((r) => {
7473
7523
  setTimeout(r, 100);
7474
7524
  });
7475
- setExportProgress(chunk3WK4AE52_js.EXPORT_DONE_PERCENT);
7525
+ setExportProgress(chunkTWUAZRCG_js.EXPORT_DONE_PERCENT);
7476
7526
  setExportStatusMessage("Done!");
7477
7527
  } catch (err) {
7478
- if (!chunk3WK4AE52_js.isExportAbortError(err)) {
7528
+ if (!chunkTWUAZRCG_js.isExportAbortError(err)) {
7479
7529
  console.error("[PowerPointViewer] PDF export failed:", err);
7480
7530
  }
7481
7531
  } finally {
@@ -7505,21 +7555,21 @@ function useExportHandlers(input) {
7505
7555
  {
7506
7556
  scale: imageExportScale,
7507
7557
  onProgress: (current, total) => {
7508
- setExportProgress(chunk3WK4AE52_js.slideProgressPercent(current, total));
7509
- setExportStatusMessage(chunk3WK4AE52_js.slideStatusLabel("Rendering", current, total));
7558
+ setExportProgress(chunkTWUAZRCG_js.slideProgressPercent(current, total));
7559
+ setExportStatusMessage(chunkTWUAZRCG_js.slideStatusLabel("Rendering", current, total));
7510
7560
  },
7511
7561
  signal: abortCtrl.signal
7512
7562
  }
7513
7563
  );
7514
- setExportProgress(chunk3WK4AE52_js.EXPORT_ASSEMBLING_PERCENT);
7564
+ setExportProgress(chunkTWUAZRCG_js.EXPORT_ASSEMBLING_PERCENT);
7515
7565
  setExportStatusMessage("Building PDF...");
7516
7566
  await new Promise((r) => {
7517
7567
  setTimeout(r, 100);
7518
7568
  });
7519
- setExportProgress(chunk3WK4AE52_js.EXPORT_DONE_PERCENT);
7569
+ setExportProgress(chunkTWUAZRCG_js.EXPORT_DONE_PERCENT);
7520
7570
  setExportStatusMessage("Done!");
7521
7571
  } catch (err) {
7522
- if (!chunk3WK4AE52_js.isExportAbortError(err)) {
7572
+ if (!chunkTWUAZRCG_js.isExportAbortError(err)) {
7523
7573
  console.error("[PowerPointViewer] Notes PDF export failed:", err);
7524
7574
  }
7525
7575
  } finally {
@@ -7561,22 +7611,22 @@ function useExportHandlers(input) {
7561
7611
  scale: 1,
7562
7612
  slideDurationMs: 3e3,
7563
7613
  onProgress: (current, total) => {
7564
- setExportProgress(chunk3WK4AE52_js.slideProgressPercent(current, total, 45));
7565
- setExportStatusMessage(chunk3WK4AE52_js.slideStatusLabel("Capturing", current, total));
7614
+ setExportProgress(chunkTWUAZRCG_js.slideProgressPercent(current, total, 45));
7615
+ setExportStatusMessage(chunkTWUAZRCG_js.slideStatusLabel("Capturing", current, total));
7566
7616
  },
7567
7617
  onRecordProgress: (current, total) => {
7568
- setExportProgress(chunk3WK4AE52_js.recordProgressPercent(current, total));
7569
- setExportStatusMessage(chunk3WK4AE52_js.slideStatusLabel("Recording", current, total));
7618
+ setExportProgress(chunkTWUAZRCG_js.recordProgressPercent(current, total));
7619
+ setExportStatusMessage(chunkTWUAZRCG_js.slideStatusLabel("Recording", current, total));
7570
7620
  },
7571
7621
  signal: abortCtrl.signal
7572
7622
  }
7573
7623
  );
7574
- setExportProgress(chunk3WK4AE52_js.EXPORT_ASSEMBLING_PERCENT);
7624
+ setExportProgress(chunkTWUAZRCG_js.EXPORT_ASSEMBLING_PERCENT);
7575
7625
  setExportStatusMessage("Saving file...");
7576
- chunk3WK4AE52_js.downloadBlob(blob, "presentation.webm");
7577
- setExportProgress(chunk3WK4AE52_js.EXPORT_DONE_PERCENT);
7626
+ chunkTWUAZRCG_js.downloadBlob(blob, "presentation.webm");
7627
+ setExportProgress(chunkTWUAZRCG_js.EXPORT_DONE_PERCENT);
7578
7628
  } catch (err) {
7579
- if (!chunk3WK4AE52_js.isExportAbortError(err)) {
7629
+ if (!chunkTWUAZRCG_js.isExportAbortError(err)) {
7580
7630
  console.error("[PowerPointViewer] Video export failed:", err);
7581
7631
  }
7582
7632
  } finally {
@@ -7604,18 +7654,18 @@ function useExportHandlers(input) {
7604
7654
  scale: 0.5,
7605
7655
  slideDurationMs: 2e3,
7606
7656
  onProgress: (current, total) => {
7607
- setExportProgress(chunk3WK4AE52_js.slideProgressPercent(current, total));
7608
- setExportStatusMessage(chunk3WK4AE52_js.slideStatusLabel("Encoding", current, total));
7657
+ setExportProgress(chunkTWUAZRCG_js.slideProgressPercent(current, total));
7658
+ setExportStatusMessage(chunkTWUAZRCG_js.slideStatusLabel("Encoding", current, total));
7609
7659
  },
7610
7660
  signal: abortCtrl.signal
7611
7661
  }
7612
7662
  );
7613
- setExportProgress(chunk3WK4AE52_js.EXPORT_ASSEMBLING_PERCENT);
7663
+ setExportProgress(chunkTWUAZRCG_js.EXPORT_ASSEMBLING_PERCENT);
7614
7664
  setExportStatusMessage("Saving file...");
7615
- chunk3WK4AE52_js.downloadBlob(blob, "presentation.gif");
7616
- setExportProgress(chunk3WK4AE52_js.EXPORT_DONE_PERCENT);
7665
+ chunkTWUAZRCG_js.downloadBlob(blob, "presentation.gif");
7666
+ setExportProgress(chunkTWUAZRCG_js.EXPORT_DONE_PERCENT);
7617
7667
  } catch (err) {
7618
- if (!chunk3WK4AE52_js.isExportAbortError(err)) {
7668
+ if (!chunkTWUAZRCG_js.isExportAbortError(err)) {
7619
7669
  console.error("[PowerPointViewer] GIF export failed:", err);
7620
7670
  }
7621
7671
  } finally {
@@ -7649,7 +7699,7 @@ function useExportHandlers(input) {
7649
7699
  exportStatusMessage
7650
7700
  };
7651
7701
  }
7652
- var ViewerOptionsContext = react.createContext(chunk3WK4AE52_js.DEFAULT_VIEWER_OPTIONS);
7702
+ var ViewerOptionsContext = react.createContext(chunkTWUAZRCG_js.DEFAULT_VIEWER_OPTIONS);
7653
7703
  function useViewerOptionsContext() {
7654
7704
  return react.useContext(ViewerOptionsContext);
7655
7705
  }
@@ -7661,13 +7711,13 @@ function usePrintHandlers(input) {
7661
7711
  const { t } = reactI18next.useTranslation();
7662
7712
  const viewerOptions = useViewerOptionsContext();
7663
7713
  const includeHiddenSlides = viewerOptions.advanced.printHiddenSlides;
7664
- const printRasterScale = (viewerOptions.advanced.printHighQuality ? 4 : 3) * chunk3WK4AE52_js.resolveImageResolutionScale(viewerOptions);
7714
+ const printRasterScale = (viewerOptions.advanced.printHighQuality ? 4 : 3) * chunkTWUAZRCG_js.resolveImageResolutionScale(viewerOptions);
7665
7715
  const handlePrint = () => {
7666
7716
  setIsPrintDialogOpen(true);
7667
7717
  };
7668
7718
  const handlePrintSvg = async (settings) => {
7669
7719
  setIsPrintDialogOpen(false);
7670
- const printWindow = chunk3WK4AE52_js.openPendingPrintWindow(t("pptx.print.preparingToPrint"));
7720
+ const printWindow = chunkTWUAZRCG_js.openPendingPrintWindow(t("pptx.print.preparingToPrint"));
7671
7721
  if (!printWindow) {
7672
7722
  console.warn(
7673
7723
  "[PowerPointViewer] Print window was blocked by the browser. Allow popups for this site to print."
@@ -7677,9 +7727,9 @@ function usePrintHandlers(input) {
7677
7727
  if (!pptxData || settings.printWhat !== "slides") {
7678
7728
  return runRasterPrint(printWindow, settings);
7679
7729
  }
7680
- const colorFilter = chunk3WK4AE52_js.computeColorFilter(settings.colorMode);
7681
- const slideIndices = chunk3WK4AE52_js.filterHiddenSlideIndices(
7682
- chunk3WK4AE52_js.computeSlideIndices(
7730
+ const colorFilter = chunkTWUAZRCG_js.computeColorFilter(settings.colorMode);
7731
+ const slideIndices = chunkTWUAZRCG_js.filterHiddenSlideIndices(
7732
+ chunkTWUAZRCG_js.computeSlideIndices(
7683
7733
  settings.slideRange,
7684
7734
  activeSlideIndex,
7685
7735
  slides.length,
@@ -7697,22 +7747,22 @@ function usePrintHandlers(input) {
7697
7747
  printWindow.close();
7698
7748
  return;
7699
7749
  }
7700
- const printDoc = chunk3WK4AE52_js.buildPrintDocument(svgs, pptxData.width, pptxData.height, {
7750
+ const printDoc = chunkTWUAZRCG_js.buildPrintDocument(svgs, pptxData.width, pptxData.height, {
7701
7751
  title: "Slides (Vector)",
7702
7752
  orientation: settings.orientation,
7703
7753
  colorFilter,
7704
7754
  scaleToFit: settings.scaleToFit
7705
7755
  });
7706
- chunk3WK4AE52_js.finishPrintWindow(printWindow, printDoc);
7756
+ chunkTWUAZRCG_js.finishPrintWindow(printWindow, printDoc);
7707
7757
  } catch (err) {
7708
7758
  console.warn("[PowerPointViewer] SVG print path failed, falling back to raster:", err);
7709
7759
  return runRasterPrint(printWindow, settings);
7710
7760
  }
7711
7761
  };
7712
7762
  const runRasterPrint = async (printWindow, settings) => {
7713
- const colorFilter = chunk3WK4AE52_js.computeColorFilter(settings.colorMode);
7714
- const slideIndices = chunk3WK4AE52_js.filterHiddenSlideIndices(
7715
- chunk3WK4AE52_js.computeSlideIndices(
7763
+ const colorFilter = chunkTWUAZRCG_js.computeColorFilter(settings.colorMode);
7764
+ const slideIndices = chunkTWUAZRCG_js.filterHiddenSlideIndices(
7765
+ chunkTWUAZRCG_js.computeSlideIndices(
7716
7766
  settings.slideRange,
7717
7767
  activeSlideIndex,
7718
7768
  slides.length,
@@ -7723,11 +7773,11 @@ function usePrintHandlers(input) {
7723
7773
  includeHiddenSlides
7724
7774
  );
7725
7775
  if (settings.printWhat === "outline") {
7726
- chunk3WK4AE52_js.finishPrintWindow(
7776
+ chunkTWUAZRCG_js.finishPrintWindow(
7727
7777
  printWindow,
7728
- chunk3WK4AE52_js.buildPrintHtmlDocument({
7778
+ chunkTWUAZRCG_js.buildPrintHtmlDocument({
7729
7779
  title: "Outline",
7730
- bodyHtml: `<div class="outline-page">${chunk3WK4AE52_js.buildOutlineHtml(slideIndices, slides)}</div>`,
7780
+ bodyHtml: `<div class="outline-page">${chunkTWUAZRCG_js.buildOutlineHtml(slideIndices, slides)}</div>`,
7731
7781
  orientation: settings.orientation,
7732
7782
  colorFilter,
7733
7783
  frameSlides: settings.frameSlides,
@@ -7754,11 +7804,11 @@ function usePrintHandlers(input) {
7754
7804
  }
7755
7805
  const slideImages = slideIndices.map((idx) => allImages[idx]).filter(Boolean);
7756
7806
  if (settings.printWhat === "slides") {
7757
- chunk3WK4AE52_js.finishPrintWindow(
7807
+ chunkTWUAZRCG_js.finishPrintWindow(
7758
7808
  printWindow,
7759
- chunk3WK4AE52_js.buildPrintHtmlDocument({
7809
+ chunkTWUAZRCG_js.buildPrintHtmlDocument({
7760
7810
  title: "Slides",
7761
- bodyHtml: chunk3WK4AE52_js.buildSlidesHtml(slideImages, slideIndices),
7811
+ bodyHtml: chunkTWUAZRCG_js.buildSlidesHtml(slideImages, slideIndices),
7762
7812
  orientation: settings.orientation,
7763
7813
  colorFilter,
7764
7814
  frameSlides: settings.frameSlides,
@@ -7768,11 +7818,11 @@ function usePrintHandlers(input) {
7768
7818
  return;
7769
7819
  }
7770
7820
  if (settings.printWhat === "notes") {
7771
- chunk3WK4AE52_js.finishPrintWindow(
7821
+ chunkTWUAZRCG_js.finishPrintWindow(
7772
7822
  printWindow,
7773
- chunk3WK4AE52_js.buildPrintHtmlDocument({
7823
+ chunkTWUAZRCG_js.buildPrintHtmlDocument({
7774
7824
  title: "Notes Pages",
7775
- bodyHtml: chunk3WK4AE52_js.buildNotesHtml(slideImages, slideIndices, slides),
7825
+ bodyHtml: chunkTWUAZRCG_js.buildNotesHtml(slideImages, slideIndices, slides),
7776
7826
  orientation: "portrait",
7777
7827
  colorFilter,
7778
7828
  frameSlides: settings.frameSlides,
@@ -7783,11 +7833,11 @@ function usePrintHandlers(input) {
7783
7833
  }
7784
7834
  if (settings.printWhat === "handouts") {
7785
7835
  const spp = settings.slidesPerPage;
7786
- chunk3WK4AE52_js.finishPrintWindow(
7836
+ chunkTWUAZRCG_js.finishPrintWindow(
7787
7837
  printWindow,
7788
- chunk3WK4AE52_js.buildPrintHtmlDocument({
7838
+ chunkTWUAZRCG_js.buildPrintHtmlDocument({
7789
7839
  title: `Handout ${spp} per page`,
7790
- bodyHtml: chunk3WK4AE52_js.buildHandoutsHtml(slideImages, slideIndices, spp, pptxData?.handoutMaster),
7840
+ bodyHtml: chunkTWUAZRCG_js.buildHandoutsHtml(slideImages, slideIndices, spp, pptxData?.handoutMaster),
7791
7841
  orientation: "portrait",
7792
7842
  colorFilter,
7793
7843
  frameSlides: settings.frameSlides,
@@ -7801,7 +7851,7 @@ function usePrintHandlers(input) {
7801
7851
  };
7802
7852
  const handlePrintWithSettings = async (settings) => {
7803
7853
  setIsPrintDialogOpen(false);
7804
- const printWindow = chunk3WK4AE52_js.openPendingPrintWindow(t("pptx.print.preparingToPrint"));
7854
+ const printWindow = chunkTWUAZRCG_js.openPendingPrintWindow(t("pptx.print.preparingToPrint"));
7805
7855
  if (!printWindow) {
7806
7856
  console.warn(
7807
7857
  "[PowerPointViewer] Print window was blocked by the browser. Allow popups for this site to print."
@@ -7866,13 +7916,13 @@ function useThemeHandlers(input) {
7866
7916
  return;
7867
7917
  }
7868
7918
  await handler.updateThemeColorScheme(colorScheme);
7869
- const previousMap = theme?.colorScheme ? chunk3WK4AE52_js.buildThemeColorMap(theme.colorScheme) : {};
7870
- setSlides((prev) => chunk3WK4AE52_js.reResolveSlideColors(prev, previousMap, colorScheme));
7919
+ const previousMap = theme?.colorScheme ? chunkTWUAZRCG_js.buildThemeColorMap(theme.colorScheme) : {};
7920
+ setSlides((prev) => chunkTWUAZRCG_js.reResolveSlideColors(prev, previousMap, colorScheme));
7871
7921
  if (Object.keys(templateElementsBySlideId).length > 0) {
7872
7922
  setTemplateElementsBySlideId((prev) => {
7873
7923
  const next = {};
7874
7924
  for (const [slideId, elements] of Object.entries(prev)) {
7875
- next[slideId] = chunk3WK4AE52_js.reResolveElementColors(elements, previousMap, colorScheme);
7925
+ next[slideId] = chunkTWUAZRCG_js.reResolveElementColors(elements, previousMap, colorScheme);
7876
7926
  }
7877
7927
  return next;
7878
7928
  });
@@ -7981,7 +8031,7 @@ function useThemeSwitching(input) {
7981
8031
  }
7982
8032
  try {
7983
8033
  await handler.applyTheme(preset.colorScheme, preset.fontScheme, preset.name);
7984
- const newData = chunk3WK4AE52_js.applyThemeToData(data, preset.colorScheme, preset.fontScheme, preset.name);
8034
+ const newData = chunkTWUAZRCG_js.applyThemeToData(data, preset.colorScheme, preset.fontScheme, preset.name);
7985
8035
  onDataChange(newData);
7986
8036
  onThemeChanged?.(preset);
7987
8037
  } catch (error) {
@@ -7998,7 +8048,7 @@ function useThemeSwitching(input) {
7998
8048
  }
7999
8049
  try {
8000
8050
  await handler.applyTheme(colorScheme, fontScheme ?? {}, themeName);
8001
- const newData = chunk3WK4AE52_js.applyThemeToData(data, colorScheme, fontScheme, themeName);
8051
+ const newData = chunkTWUAZRCG_js.applyThemeToData(data, colorScheme, fontScheme, themeName);
8002
8052
  onDataChange(newData);
8003
8053
  } catch (error) {
8004
8054
  console.error("Failed to switch to custom theme:", error);
@@ -8010,12 +8060,12 @@ function useThemeSwitching(input) {
8010
8060
  if (!data?.theme?.colorScheme) {
8011
8061
  return void 0;
8012
8062
  }
8013
- return chunk3WK4AE52_js.THEME_PRESETS.find(
8014
- (p) => chunk3WK4AE52_js.themeColorSchemesEqual(data.theme?.colorScheme, p.colorScheme)
8063
+ return chunkTWUAZRCG_js.THEME_PRESETS.find(
8064
+ (p) => chunkTWUAZRCG_js.themeColorSchemesEqual(data.theme?.colorScheme, p.colorScheme)
8015
8065
  );
8016
8066
  }, [data?.theme?.colorScheme]);
8017
8067
  return {
8018
- presets: chunk3WK4AE52_js.THEME_PRESETS,
8068
+ presets: chunkTWUAZRCG_js.THEME_PRESETS,
8019
8069
  switchToPreset,
8020
8070
  switchToCustom,
8021
8071
  currentPreset
@@ -8090,7 +8140,7 @@ function usePropertyHandlers(input) {
8090
8140
  }
8091
8141
  try {
8092
8142
  const ab = await file.arrayBuffer();
8093
- const h = new chunk3WK4AE52_js.PptxHandler();
8143
+ const h = new chunkTWUAZRCG_js.PptxHandler();
8094
8144
  const other = await h.load(ab);
8095
8145
  if (!other) {
8096
8146
  return;
@@ -8100,7 +8150,7 @@ function usePropertyHandlers(input) {
8100
8150
  width: canvasSize.width,
8101
8151
  height: canvasSize.height
8102
8152
  };
8103
- setCompareResult(chunk3WK4AE52_js.comparePresentation(cur, other));
8153
+ setCompareResult(chunkTWUAZRCG_js.comparePresentation(cur, other));
8104
8154
  setIsComparePanelOpen(true);
8105
8155
  } catch (err) {
8106
8156
  console.warn("Compare failed:", err);
@@ -8117,7 +8167,7 @@ function usePropertyHandlers(input) {
8117
8167
  if (!diff || diff.status === "unchanged") {
8118
8168
  return;
8119
8169
  }
8120
- setSlides((prev) => chunk3WK4AE52_js.applyAcceptSlide(prev, diff));
8170
+ setSlides((prev) => chunkTWUAZRCG_js.applyAcceptSlide(prev, diff));
8121
8171
  setIsDirty(true);
8122
8172
  },
8123
8173
  [compareResult, setSlides, setIsDirty]
@@ -8128,10 +8178,10 @@ function usePropertyHandlers(input) {
8128
8178
  if (!compareResult) {
8129
8179
  return;
8130
8180
  }
8131
- setSlides((prev) => chunk3WK4AE52_js.applyAcceptAllSlides(prev, compareResult));
8181
+ setSlides((prev) => chunkTWUAZRCG_js.applyAcceptAllSlides(prev, compareResult));
8132
8182
  setIsDirty(true);
8133
8183
  }, [compareResult, setSlides, setIsDirty]);
8134
- const usedFontFamilies = react.useMemo(() => chunk3WK4AE52_js.collectUsedFonts(slides), [slides]);
8184
+ const usedFontFamilies = react.useMemo(() => chunkTWUAZRCG_js.collectUsedFonts(slides), [slides]);
8135
8185
  return {
8136
8186
  handleUpdateNotes,
8137
8187
  handleUpdateSlide,
@@ -8286,7 +8336,7 @@ function useViewerDialogs(input) {
8286
8336
  );
8287
8337
  const embeddedFontKey = (embeddedFontFamilies ?? []).join("\0");
8288
8338
  const fontEmbedding = react.useMemo(
8289
- () => chunk3WK4AE52_js.describeFontEmbedding(embeddedFontKey ? embeddedFontKey.split("\0") : []),
8339
+ () => chunkTWUAZRCG_js.describeFontEmbedding(embeddedFontKey ? embeddedFontKey.split("\0") : []),
8290
8340
  [embeddedFontKey]
8291
8341
  );
8292
8342
  const [embedFontsEnabled, setEmbedFontsEnabled] = react.useState(fontEmbedding.initialEnabled);
@@ -8296,11 +8346,11 @@ function useViewerDialogs(input) {
8296
8346
  setEmbedFontsEnabled(fontEmbedding.initialEnabled);
8297
8347
  }
8298
8348
  const [isNarrowViewport, setIsNarrowViewport] = react.useState(
8299
- () => typeof window !== "undefined" ? chunk3WK4AE52_js.isMobileViewport(window.innerWidth, window.innerHeight, viewportIsTouch()) : false
8349
+ () => typeof window !== "undefined" ? chunkTWUAZRCG_js.isMobileViewport(window.innerWidth, window.innerHeight, viewportIsTouch()) : false
8300
8350
  );
8301
8351
  react.useEffect(() => {
8302
8352
  const handleWindow = () => setIsNarrowViewport(
8303
- chunk3WK4AE52_js.isMobileViewport(window.innerWidth, window.innerHeight, viewportIsTouch())
8353
+ chunkTWUAZRCG_js.isMobileViewport(window.innerWidth, window.innerHeight, viewportIsTouch())
8304
8354
  );
8305
8355
  window.addEventListener("resize", handleWindow);
8306
8356
  return () => window.removeEventListener("resize", handleWindow);
@@ -8453,16 +8503,16 @@ function useViewerDialogs(input) {
8453
8503
  };
8454
8504
  }
8455
8505
  function computeGridSpacingPx2(documentGridSpacing) {
8456
- return chunk3WK4AE52_js.computeGridSpacingPx(documentGridSpacing, chunkO27KNZLJ_js.GRID_SIZE);
8506
+ return chunkTWUAZRCG_js.computeGridSpacingPx(documentGridSpacing, chunkIVCYND7A_js.GRID_SIZE);
8457
8507
  }
8458
8508
  function computeVisibleSlideIndexes(slides, activeCustomShowId, customShows, presentationProperties) {
8459
8509
  const activeShow = activeCustomShowId ? customShows.find((show) => show.id === activeCustomShowId) : void 0;
8460
- const authoredRange = chunk3WK4AE52_js.resolveAuthoredSlideRange(presentationProperties, slides.length);
8461
- return chunk3WK4AE52_js.resolveShowSlideIndexes(slides, activeShow, authoredRange);
8510
+ const authoredRange = chunkTWUAZRCG_js.resolveAuthoredSlideRange(presentationProperties, slides.length);
8511
+ return chunkTWUAZRCG_js.resolveShowSlideIndexes(slides, activeShow, authoredRange);
8462
8512
  }
8463
8513
  function computeSlideSectionGroups(slides, sections) {
8464
- return chunk3WK4AE52_js.groupSlidesBySection(sections, slides).map((group) => ({
8465
- id: group.section?.id ?? (sections.length > 0 ? chunkO27KNZLJ_js.UNGROUPED_SECTION_ID : chunkO27KNZLJ_js.DEFAULT_SECTION_GROUP_ID),
8514
+ return chunkTWUAZRCG_js.groupSlidesBySection(sections, slides).map((group) => ({
8515
+ id: group.section?.id ?? (sections.length > 0 ? chunkIVCYND7A_js.UNGROUPED_SECTION_ID : chunkIVCYND7A_js.DEFAULT_SECTION_GROUP_ID),
8466
8516
  label: group.section?.name ?? (sections.length > 0 ? "Ungrouped Slides" : "Slides"),
8467
8517
  slideIndexes: group.slideIndexes,
8468
8518
  ...group.section?.color !== void 0 ? { color: group.section.color } : {},
@@ -8474,7 +8524,7 @@ function computeMasterPseudoSlide(mode, activeLayout, activeMaster) {
8474
8524
  return void 0;
8475
8525
  }
8476
8526
  const document2 = activeLayout ? { slideMasters: [{ ...activeMaster, layouts: [activeLayout] }] } : { slideMasters: [activeMaster] };
8477
- return chunk3WK4AE52_js.masterViewPseudoSlide(document2, {
8527
+ return chunkTWUAZRCG_js.masterViewPseudoSlide(document2, {
8478
8528
  tab: "slides",
8479
8529
  masterIndex: 0,
8480
8530
  layoutIndex: activeLayout ? 0 : null
@@ -8502,15 +8552,15 @@ function useDerivedSlideState(input) {
8502
8552
  [slides, activeCustomShowId, customShows, presentationProperties]
8503
8553
  );
8504
8554
  const authoredRange = react.useMemo(
8505
- () => chunk3WK4AE52_js.resolveAuthoredSlideRange(presentationProperties, slides.length),
8555
+ () => chunkTWUAZRCG_js.resolveAuthoredSlideRange(presentationProperties, slides.length),
8506
8556
  [presentationProperties, slides.length]
8507
8557
  );
8508
8558
  const slideSectionGroups = react.useMemo(
8509
8559
  () => computeSlideSectionGroups(slides, sections).map((group) => {
8510
- if (group.id === chunkO27KNZLJ_js.UNGROUPED_SECTION_ID && group.label === "Ungrouped Slides") {
8560
+ if (group.id === chunkIVCYND7A_js.UNGROUPED_SECTION_ID && group.label === "Ungrouped Slides") {
8511
8561
  return { ...group, label: t("pptx.slides.ungroupedSlides") };
8512
8562
  }
8513
- if (group.id === chunkO27KNZLJ_js.DEFAULT_SECTION_GROUP_ID && group.label === "Slides") {
8563
+ if (group.id === chunkIVCYND7A_js.DEFAULT_SECTION_GROUP_ID && group.label === "Slides") {
8514
8564
  return { ...group, label: t("pptx.sections.slides") };
8515
8565
  }
8516
8566
  return group;
@@ -8611,13 +8661,13 @@ function useAnnotationHandlers(input) {
8611
8661
  }, [annotations, setMode, setSlides, history]);
8612
8662
  const handleSetMode = react.useCallback(
8613
8663
  (nextMode) => {
8614
- if (mode === "present" && nextMode !== "present" && !chunk3WK4AE52_js.mayLeaveSlideShow()) {
8664
+ if (mode === "present" && nextMode !== "present" && !chunkTWUAZRCG_js.mayLeaveSlideShow()) {
8615
8665
  return;
8616
8666
  }
8617
8667
  if (nextMode === "present") {
8618
8668
  presentation.enterPresentMode();
8619
8669
  } else if (mode === "present" && annotations.hasAnyAnnotations) {
8620
- chunk3WK4AE52_js.stopAllPersistentAudio();
8670
+ chunkTWUAZRCG_js.stopAllPersistentAudio();
8621
8671
  if (promptKeepInkAnnotations) {
8622
8672
  pendingModeAfterAnnotationsRef.current = nextMode;
8623
8673
  setShowKeepAnnotationsDialog(true);
@@ -8627,7 +8677,7 @@ function useAnnotationHandlers(input) {
8627
8677
  }
8628
8678
  } else {
8629
8679
  if (mode === "present") {
8630
- chunk3WK4AE52_js.stopAllPersistentAudio();
8680
+ chunkTWUAZRCG_js.stopAllPersistentAudio();
8631
8681
  }
8632
8682
  setMode(nextMode);
8633
8683
  }
@@ -8696,13 +8746,13 @@ function useSerialize(input) {
8696
8746
  let processedSlide = slide;
8697
8747
  if (pendingEditId) {
8698
8748
  const updatedElements = slide.elements.map((el) => {
8699
- if (el.id !== pendingEditId || !chunk3WK4AE52_js.hasTextProperties(el)) {
8749
+ if (el.id !== pendingEditId || !chunkTWUAZRCG_js.hasTextProperties(el)) {
8700
8750
  return el;
8701
8751
  }
8702
8752
  return {
8703
8753
  ...el,
8704
8754
  text: pendingEditText,
8705
- textSegments: chunk3WK4AE52_js.remapTextToSegments(pendingEditText, el.textSegments, el.textStyle)
8755
+ textSegments: chunkTWUAZRCG_js.remapTextToSegments(pendingEditText, el.textSegments, el.textStyle)
8706
8756
  };
8707
8757
  });
8708
8758
  if (updatedElements.some((el, i) => el !== slide.elements[i])) {
@@ -8715,19 +8765,19 @@ function useSerialize(input) {
8715
8765
  const pptxGuides = guides.map((g) => ({
8716
8766
  id: g.id,
8717
8767
  orientation: g.axis === "h" ? "horz" : "vert",
8718
- positionEmu: chunk3WK4AE52_js.guidePxToEmu(g.position)
8768
+ positionEmu: chunkTWUAZRCG_js.guidePxToEmu(g.position)
8719
8769
  }));
8720
8770
  return {
8721
8771
  ...processedSlide,
8722
8772
  guides: pptxGuides.length > 0 ? pptxGuides : void 0
8723
8773
  };
8724
8774
  });
8725
- const slidesToSave = chunk3WK4AE52_js.buildSaveSlides(slidesWithGuides, templateElementsBySlideId);
8726
- const saveOptions = chunk3WK4AE52_js.buildDeckSaveOptions({
8775
+ const slidesToSave = chunkTWUAZRCG_js.buildSaveSlides(slidesWithGuides, templateElementsBySlideId);
8776
+ const saveOptions = chunkTWUAZRCG_js.buildDeckSaveOptions({
8727
8777
  // Without this the Slide Size card edited a viewer-only pixel value and
8728
8778
  // the saved `p:sldSz` never moved: passing `slideSize` is the only way a
8729
8779
  // slide-size edit reaches the file.
8730
- slideSize: chunk3WK4AE52_js.resolveSlideSizeSelection({ current: slideSizeEmu, canvas: canvasSize }).size,
8780
+ slideSize: chunkTWUAZRCG_js.resolveSlideSizeSelection({ current: slideSizeEmu, canvas: canvasSize }).size,
8731
8781
  headerFooter,
8732
8782
  presentationProperties,
8733
8783
  viewProperties,
@@ -8746,7 +8796,7 @@ function useSerialize(input) {
8746
8796
  embedFonts,
8747
8797
  outputFormat: format
8748
8798
  });
8749
- return chunk3WK4AE52_js.saveDeckWithPassword(handler, slidesToSave, saveOptions, { password, purpose });
8799
+ return chunkTWUAZRCG_js.saveDeckWithPassword(handler, slidesToSave, saveOptions, { password, purpose });
8750
8800
  },
8751
8801
  [
8752
8802
  slides,
@@ -8787,7 +8837,7 @@ function useRecoveryDetection(input) {
8787
8837
  const onRestore = input.onRestore;
8788
8838
  const openVersionHistory = input.openVersionHistory;
8789
8839
  react.useEffect(() => {
8790
- if (!chunk3WK4AE52_js.shouldProbeAutosaveRecovery({
8840
+ if (!chunkTWUAZRCG_js.shouldProbeAutosaveRecovery({
8791
8841
  alreadyChecked: recoveryCheckedRef.current,
8792
8842
  filePath,
8793
8843
  loading,
@@ -8799,7 +8849,7 @@ function useRecoveryDetection(input) {
8799
8849
  }
8800
8850
  recoveryCheckedRef.current = true;
8801
8851
  void (async () => {
8802
- const offer = await chunk3WK4AE52_js.probeAutosaveRecovery(filePath);
8852
+ const offer = await chunkTWUAZRCG_js.probeAutosaveRecovery(filePath);
8803
8853
  if (!offer) {
8804
8854
  return;
8805
8855
  }
@@ -8812,7 +8862,7 @@ function useRecoveryDetection(input) {
8812
8862
  const record = recordRef.current;
8813
8863
  setPrompt(null);
8814
8864
  if (record && onRestore) {
8815
- onRestore(chunk3WK4AE52_js.acceptAutosaveRecovery(record));
8865
+ onRestore(chunkTWUAZRCG_js.acceptAutosaveRecovery(record));
8816
8866
  }
8817
8867
  recordRef.current = null;
8818
8868
  }, [onRestore]);
@@ -8821,7 +8871,7 @@ function useRecoveryDetection(input) {
8821
8871
  setPrompt(null);
8822
8872
  recordRef.current = null;
8823
8873
  if (record) {
8824
- void chunk3WK4AE52_js.discardAutosaveRecovery(record);
8874
+ void chunkTWUAZRCG_js.discardAutosaveRecovery(record);
8825
8875
  }
8826
8876
  }, []);
8827
8877
  return { prompt, restore, discard };
@@ -8872,11 +8922,11 @@ function usePresentationSetup(input) {
8872
8922
  containerRef,
8873
8923
  content,
8874
8924
  onSetMode: (nextMode) => {
8875
- if (mode === "present" && nextMode !== "present" && !chunk3WK4AE52_js.mayLeaveSlideShow()) {
8925
+ if (mode === "present" && nextMode !== "present" && !chunkTWUAZRCG_js.mayLeaveSlideShow()) {
8876
8926
  return;
8877
8927
  }
8878
8928
  if (mode === "present" && nextMode !== "present") {
8879
- chunk3WK4AE52_js.stopAllPersistentAudio();
8929
+ chunkTWUAZRCG_js.stopAllPersistentAudio();
8880
8930
  stopAnimationSound();
8881
8931
  const exitHandler = exitModeHandlerRef.current;
8882
8932
  if (exitHandler) {
@@ -8944,10 +8994,10 @@ function usePresentationSetup(input) {
8944
8994
  onToggleToolbar: () => annotations.setToolbarVisible(!annotations.toolbarVisible),
8945
8995
  onToggleSubtitles,
8946
8996
  onSaveRehearsalTimings: (timings) => {
8947
- setSlides((prev) => chunk3WK4AE52_js.applyRehearsalTimings(prev, timings));
8997
+ setSlides((prev) => chunkTWUAZRCG_js.applyRehearsalTimings(prev, timings));
8948
8998
  history.markDirty();
8949
8999
  },
8950
- loopContinuously: chunk3WK4AE52_js.shouldLoopContinuously(presentationProperties),
9000
+ loopContinuously: chunkTWUAZRCG_js.shouldLoopContinuously(presentationProperties),
8951
9001
  showWithAnimation: presentationProperties.showWithAnimation,
8952
9002
  useTimings: presentationProperties.advanceMode !== "manual",
8953
9003
  endWithBlackSlide,
@@ -9154,7 +9204,7 @@ function useEditorOperations(input) {
9154
9204
  const { formatPainterActive, setFormatPainterActive, elementLookup } = state;
9155
9205
  react.useEffect(() => {
9156
9206
  if (formatPainterActive && !prevFormatPainterRef.current && selectedElement) {
9157
- copiedFormatRef.current = chunk3WK4AE52_js.copyFormatFromElement(selectedElement);
9207
+ copiedFormatRef.current = chunkTWUAZRCG_js.copyFormatFromElement(selectedElement);
9158
9208
  } else if (!formatPainterActive) {
9159
9209
  copiedFormatRef.current = null;
9160
9210
  }
@@ -9180,12 +9230,12 @@ function useEditorOperations(input) {
9180
9230
  e.stopPropagation();
9181
9231
  const element = elementLookup.get(elementId);
9182
9232
  if (element) {
9183
- const updated = chunk3WK4AE52_js.applyFormatToElement(element, copiedFormatRef.current);
9233
+ const updated = chunkTWUAZRCG_js.applyFormatToElement(element, copiedFormatRef.current);
9184
9234
  const updates = {};
9185
- if (chunk3WK4AE52_js.hasShapeProperties(updated)) {
9235
+ if (chunkTWUAZRCG_js.hasShapeProperties(updated)) {
9186
9236
  updates.shapeStyle = updated.shapeStyle;
9187
9237
  }
9188
- if (chunk3WK4AE52_js.hasTextProperties(updated)) {
9238
+ if (chunkTWUAZRCG_js.hasTextProperties(updated)) {
9189
9239
  updates.textStyle = updated.textStyle;
9190
9240
  }
9191
9241
  ops.updateElementById(elementId, updates);
@@ -9369,10 +9419,10 @@ function useFontInjection({ embeddedFonts, slides }) {
9369
9419
  }
9370
9420
  };
9371
9421
  }, [embeddedFonts]);
9372
- const referencedFamilies = react.useMemo(() => chunk3WK4AE52_js.collectReferencedFontFamilies(slides), [slides]);
9422
+ const referencedFamilies = react.useMemo(() => chunkTWUAZRCG_js.collectReferencedFontFamilies(slides), [slides]);
9373
9423
  react.useEffect(() => {
9374
9424
  let cancelled = false;
9375
- void chunk3WK4AE52_js.resolveGoogleWebfontHref(slides, embeddedFonts).then((href) => {
9425
+ void chunkTWUAZRCG_js.resolveGoogleWebfontHref(slides, embeddedFonts).then((href) => {
9376
9426
  if (cancelled) {
9377
9427
  return null;
9378
9428
  }
@@ -9562,7 +9612,7 @@ function useKeyboardShortcuts(input) {
9562
9612
  inputRef.current = input;
9563
9613
  const handleKeyDown = react.useCallback((e) => {
9564
9614
  const current = inputRef.current;
9565
- const startAction = chunk3WK4AE52_js.mapSlideShowStartKey(e, { isPresenting: current.mode === "present" });
9615
+ const startAction = chunkTWUAZRCG_js.mapSlideShowStartKey(e, { isPresenting: current.mode === "present" });
9566
9616
  if (startAction !== null) {
9567
9617
  e.preventDefault();
9568
9618
  if (startAction === "fromBeginning") {
@@ -9572,7 +9622,7 @@ function useKeyboardShortcuts(input) {
9572
9622
  }
9573
9623
  return;
9574
9624
  }
9575
- const { action, dx, dy } = chunk3WK4AE52_js.mapEditorKey(e, {
9625
+ const { action, dx, dy } = chunkTWUAZRCG_js.mapEditorKey(e, {
9576
9626
  canEdit: current.canEdit,
9577
9627
  // The Slide Master view is an editing surface, not a viewing one.
9578
9628
  // Gating on `mode !== 'edit'` alone made `mapEditorKey` return
@@ -9585,7 +9635,7 @@ function useKeyboardShortcuts(input) {
9585
9635
  hasSelection: current.hasSelection,
9586
9636
  isEditingText: Boolean(current.inlineEditingElementId || current.tableEditorState?.isEditing),
9587
9637
  isDrawing: current.activeTool !== "select",
9588
- isTextInputTarget: chunk3WK4AE52_js.isEditorTextInputTarget(e.target)
9638
+ isTextInputTarget: chunkTWUAZRCG_js.isEditorTextInputTarget(e.target)
9589
9639
  });
9590
9640
  if (action === null) {
9591
9641
  return;
@@ -9915,7 +9965,7 @@ function useViewerIntegration(input) {
9915
9965
  return zoom.scale;
9916
9966
  },
9917
9967
  setZoom(level) {
9918
- zoom.setScale(chunk3WK4AE52_js.clampZoomScale(level));
9968
+ zoom.setScale(chunkTWUAZRCG_js.clampZoomScale(level));
9919
9969
  },
9920
9970
  zoomIn() {
9921
9971
  zoom.handleZoomIn();
@@ -10133,7 +10183,7 @@ function useReducedMotion() {
10133
10183
  }
10134
10184
  function useViewerOptions() {
10135
10185
  const storeRef = react.useRef(null);
10136
- storeRef.current ??= chunk3WK4AE52_js.createViewerOptionsStore();
10186
+ storeRef.current ??= chunkTWUAZRCG_js.createViewerOptionsStore();
10137
10187
  const store = storeRef.current;
10138
10188
  const options = react.useSyncExternalStore(
10139
10189
  (onStoreChange) => store.subscribe(onStoreChange),
@@ -10142,9 +10192,9 @@ function useViewerOptions() {
10142
10192
  );
10143
10193
  return { optionsStore: store, options };
10144
10194
  }
10145
- var KNOWN_TAB_IDS = new Set(chunk3WK4AE52_js.TOOLBAR_TABS.map((tab) => tab.id));
10195
+ var KNOWN_TAB_IDS = new Set(chunkTWUAZRCG_js.TOOLBAR_TABS.map((tab) => tab.id));
10146
10196
  function computeToolbarVisibility(hiddenActions, hiddenTabIds = []) {
10147
- const isHidden = (id) => chunk3WK4AE52_js.isActionHidden(id, hiddenActions);
10197
+ const isHidden = (id) => chunkTWUAZRCG_js.isActionHidden(id, hiddenActions);
10148
10198
  const userHidden = new Set(hiddenTabIds);
10149
10199
  userHidden.delete("file");
10150
10200
  const isTabVisible = (id) => !KNOWN_TAB_IDS.has(id) || !isHidden(id) && !userHidden.has(id);
@@ -10237,12 +10287,12 @@ function useYjsDocumentSync({
10237
10287
  return;
10238
10288
  }
10239
10289
  try {
10240
- const handler = new chunk3WK4AE52_js.PptxHandler();
10290
+ const handler = new chunkTWUAZRCG_js.PptxHandler();
10241
10291
  await handler.load(sourceBytes.buffer);
10242
- const currentSlides = chunk3WK4AE52_js.readSlidesFromYDoc(
10292
+ const currentSlides = chunkTWUAZRCG_js.readSlidesFromYDoc(
10243
10293
  doc
10244
10294
  );
10245
- const slidesToSave = chunk3WK4AE52_js.buildSaveSlides(currentSlides, templateElementsBySlideId);
10295
+ const slidesToSave = chunkTWUAZRCG_js.buildSaveSlides(currentSlides, templateElementsBySlideId);
10246
10296
  const bytes = await handler.save(slidesToSave, getSaveOptions?.());
10247
10297
  config.onWriteBack(bytes);
10248
10298
  } catch {
@@ -10257,10 +10307,10 @@ function useYjsDocumentSync({
10257
10307
  if (!doc || !isConnected) {
10258
10308
  return;
10259
10309
  }
10260
- const docSlides = chunk3WK4AE52_js.readSlidesFromYDoc(
10310
+ const docSlides = chunkTWUAZRCG_js.readSlidesFromYDoc(
10261
10311
  doc
10262
10312
  );
10263
- if (!chunk3WK4AE52_js.shouldRoomSlidesReplaceLoad(loadOrigin, docSlides.length)) {
10313
+ if (!chunkTWUAZRCG_js.shouldRoomSlidesReplaceLoad(loadOrigin, docSlides.length)) {
10264
10314
  return;
10265
10315
  }
10266
10316
  lastSyncedRef.current = JSON.stringify(docSlides);
@@ -10279,11 +10329,11 @@ function useYjsDocumentSync({
10279
10329
  lastSyncedRef.current = serialized;
10280
10330
  void (async () => {
10281
10331
  const factories = await getFactories();
10282
- chunk3WK4AE52_js.reconcileSlidesInYDoc(
10332
+ chunkTWUAZRCG_js.reconcileSlidesInYDoc(
10283
10333
  slides,
10284
10334
  doc,
10285
10335
  factories,
10286
- chunk3WK4AE52_js.LOCAL_SYNC_ORIGIN
10336
+ chunkTWUAZRCG_js.LOCAL_SYNC_ORIGIN
10287
10337
  );
10288
10338
  scheduleWriteBack();
10289
10339
  })();
@@ -10297,10 +10347,10 @@ function useYjsDocumentSync({
10297
10347
  return;
10298
10348
  }
10299
10349
  const handleChange = (_events, transaction) => {
10300
- if (transaction?.origin === chunk3WK4AE52_js.LOCAL_SYNC_ORIGIN) {
10350
+ if (transaction?.origin === chunkTWUAZRCG_js.LOCAL_SYNC_ORIGIN) {
10301
10351
  return;
10302
10352
  }
10303
- const remoteSlides = chunk3WK4AE52_js.readSlidesFromYDoc(
10353
+ const remoteSlides = chunkTWUAZRCG_js.readSlidesFromYDoc(
10304
10354
  doc
10305
10355
  );
10306
10356
  if (remoteSlides.length === 0) {
@@ -10316,7 +10366,7 @@ function useYjsDocumentSync({
10316
10366
  isApplyingRemoteRef.current = false;
10317
10367
  scheduleWriteBack();
10318
10368
  };
10319
- const unobserve = chunk3WK4AE52_js.observeYDocSlides(
10369
+ const unobserve = chunkTWUAZRCG_js.observeYDocSlides(
10320
10370
  doc,
10321
10371
  handleChange
10322
10372
  );
@@ -10354,7 +10404,7 @@ function useBroadcastFollower({
10354
10404
  if (!broadcaster) {
10355
10405
  return;
10356
10406
  }
10357
- if (!chunk3WK4AE52_js.shouldAutoFollowBroadcaster({
10407
+ if (!chunkTWUAZRCG_js.shouldAutoFollowBroadcaster({
10358
10408
  localRole: collab.config.role,
10359
10409
  broadcasterRole: broadcaster.role
10360
10410
  })) {
@@ -10525,7 +10575,7 @@ function subscribeTouchCapability(callback) {
10525
10575
  function useIsMobile() {
10526
10576
  const isTouchDevice = react.useSyncExternalStore(
10527
10577
  subscribeTouchCapability,
10528
- chunk3WK4AE52_js.detectTouchDevice,
10578
+ chunkTWUAZRCG_js.detectTouchDevice,
10529
10579
  () => false
10530
10580
  // server snapshot
10531
10581
  );
@@ -10535,7 +10585,7 @@ function useIsMobile() {
10535
10585
  const [viewportHeight, setViewportHeight] = react.useState(
10536
10586
  () => typeof window === "undefined" ? 768 : window.innerHeight
10537
10587
  );
10538
- const [orientation, setOrientation] = react.useState(chunk3WK4AE52_js.detectOrientation);
10588
+ const [orientation, setOrientation] = react.useState(chunkTWUAZRCG_js.detectOrientation);
10539
10589
  const [isVirtualKeyboardOpen, setIsVirtualKeyboardOpen] = react.useState(false);
10540
10590
  const [initialViewportHeight] = react.useState(
10541
10591
  () => typeof window !== "undefined" ? window.innerHeight : 800
@@ -10556,7 +10606,7 @@ function useIsMobile() {
10556
10606
  return;
10557
10607
  }
10558
10608
  const handleOrientationChange = () => {
10559
- setOrientation(chunk3WK4AE52_js.detectOrientation());
10609
+ setOrientation(chunkTWUAZRCG_js.detectOrientation());
10560
10610
  };
10561
10611
  if (screen.orientation) {
10562
10612
  screen.orientation.addEventListener("change", handleOrientationChange);
@@ -10586,7 +10636,7 @@ function useIsMobile() {
10586
10636
  window.addEventListener("resize", handleResize);
10587
10637
  return () => window.removeEventListener("resize", handleResize);
10588
10638
  }, [isTouchDevice, initialViewportHeight]);
10589
- const { isMobile, isTablet, isDesktop } = chunk3WK4AE52_js.deriveViewportBreakpoints(
10639
+ const { isMobile, isTablet, isDesktop } = chunkTWUAZRCG_js.deriveViewportBreakpoints(
10590
10640
  viewportWidth,
10591
10641
  viewportHeight,
10592
10642
  isTouchDevice
@@ -10617,10 +10667,10 @@ function useTouchGestures(input) {
10617
10667
  if (!el || !enabled) {
10618
10668
  return;
10619
10669
  }
10620
- const recognizer = chunk3WK4AE52_js.createTouchGestureRecognizer({
10670
+ const recognizer = chunkTWUAZRCG_js.createTouchGestureRecognizer({
10621
10671
  getScale: () => scaleRef.current,
10622
- minScale: chunk3WK4AE52_js.MIN_ZOOM_SCALE,
10623
- maxScale: chunk3WK4AE52_js.MAX_ZOOM_SCALE,
10672
+ minScale: chunkTWUAZRCG_js.MIN_ZOOM_SCALE,
10673
+ maxScale: chunkTWUAZRCG_js.MAX_ZOOM_SCALE,
10624
10674
  callbacks: {
10625
10675
  onPinchZoom: (newScale) => callbacksRef.current.onPinchZoom?.(newScale),
10626
10676
  onSwipe: (direction) => callbacksRef.current.onSwipe?.(direction),
@@ -10660,7 +10710,7 @@ function scrollFocusedIntoView(keyboardInset) {
10660
10710
  return;
10661
10711
  }
10662
10712
  const rect = active.getBoundingClientRect();
10663
- const delta = chunk3WK4AE52_js.computeScrollDelta(
10713
+ const delta = chunkTWUAZRCG_js.computeScrollDelta(
10664
10714
  { top: rect.top, bottom: rect.bottom },
10665
10715
  window.innerHeight,
10666
10716
  keyboardInset
@@ -10680,8 +10730,8 @@ function useKeyboardInsets(enabled = true) {
10680
10730
  return;
10681
10731
  }
10682
10732
  const update = () => {
10683
- const metrics = chunk3WK4AE52_js.readViewportMetrics(window);
10684
- const inset = metrics ? chunk3WK4AE52_js.computeKeyboardInset(metrics) : 0;
10733
+ const metrics = chunkTWUAZRCG_js.readViewportMetrics(window);
10734
+ const inset = metrics ? chunkTWUAZRCG_js.computeKeyboardInset(metrics) : 0;
10685
10735
  setKeyboardInset(inset);
10686
10736
  if (inset > 0) {
10687
10737
  window.requestAnimationFrame(() => scrollFocusedIntoView(inset));
@@ -10692,8 +10742,8 @@ function useKeyboardInsets(enabled = true) {
10692
10742
  vv.addEventListener("scroll", update);
10693
10743
  const onFocusIn = () => {
10694
10744
  window.requestAnimationFrame(() => {
10695
- const metrics = chunk3WK4AE52_js.readViewportMetrics(window);
10696
- const inset = metrics ? chunk3WK4AE52_js.computeKeyboardInset(metrics) : 0;
10745
+ const metrics = chunkTWUAZRCG_js.readViewportMetrics(window);
10746
+ const inset = metrics ? chunkTWUAZRCG_js.computeKeyboardInset(metrics) : 0;
10697
10747
  if (inset > 0) {
10698
10748
  scrollFocusedIntoView(inset);
10699
10749
  }
@@ -10706,7 +10756,7 @@ function useKeyboardInsets(enabled = true) {
10706
10756
  document.removeEventListener("focusin", onFocusIn);
10707
10757
  };
10708
10758
  }, [enabled]);
10709
- return { keyboardInset, isKeyboardOpen: chunk3WK4AE52_js.isKeyboardOpen(keyboardInset) };
10759
+ return { keyboardInset, isKeyboardOpen: chunkTWUAZRCG_js.isKeyboardOpen(keyboardInset) };
10710
10760
  }
10711
10761
 
10712
10762
  // src/viewer/hooks/useViewerBuildingBlocks-canvas-props.ts
@@ -10735,21 +10785,21 @@ function buildCanvasProps(input) {
10735
10785
  } = input;
10736
10786
  const effectiveSlide = mode === "master" ? masterPseudoSlide : activeSlide;
10737
10787
  const effectiveTemplateElements = mode === "master" ? s.activeLayout ? s.activeMaster?.elements ?? [] : [] : templateElements;
10738
- const fieldContext = chunk3WK4AE52_js.buildFieldSubstitutionContext({
10788
+ const fieldContext = chunkTWUAZRCG_js.buildFieldSubstitutionContext({
10739
10789
  headerFooter: s.headerFooter,
10740
10790
  customProperties: s.customProperties,
10741
10791
  slide: activeSlide
10742
10792
  });
10743
10793
  const tableStyleContext = s.theme || s.tableStyleMap ? { theme: s.theme, tableStyleMap: s.tableStyleMap } : void 0;
10744
10794
  const openExternalUrl = (url, target) => {
10745
- if (chunk3WK4AE52_js.shouldConfirmExternalHyperlink(viewerOptions, url) && !window.confirm(buildHyperlinkConfirmMessage(url))) {
10795
+ if (chunkTWUAZRCG_js.shouldConfirmExternalHyperlink(viewerOptions, url) && !window.confirm(buildHyperlinkConfirmMessage(url))) {
10746
10796
  return;
10747
10797
  }
10748
- chunk3WK4AE52_js.safeOpenUrl(url, target);
10798
+ chunkTWUAZRCG_js.safeOpenUrl(url, target);
10749
10799
  };
10750
10800
  const handleActionClick = (elementId, action) => {
10751
10801
  if (mode === "present") {
10752
- const resolved = chunk3WK4AE52_js.resolvePresentationAction(action, { slideCount: slides.length });
10802
+ const resolved = chunkTWUAZRCG_js.resolvePresentationAction(action, { slideCount: slides.length });
10753
10803
  if (resolved.intent.kind === "openUrl") {
10754
10804
  openExternalUrl(resolved.intent.url);
10755
10805
  return;
@@ -10760,9 +10810,9 @@ function buildCanvasProps(input) {
10760
10810
  }
10761
10811
  };
10762
10812
  const handleHyperlinkClick = (url, target) => {
10763
- if (chunk3WK4AE52_js.isPpactionUrl(url)) {
10813
+ if (chunkTWUAZRCG_js.isPpactionUrl(url)) {
10764
10814
  if (mode === "present") {
10765
- const parsed = chunk3WK4AE52_js.parsePpactionUrl(url);
10815
+ const parsed = chunkTWUAZRCG_js.parsePpactionUrl(url);
10766
10816
  if (parsed) {
10767
10817
  presentation.handlePresentationAction({
10768
10818
  action: parsed.action,
@@ -10868,7 +10918,7 @@ function buildCanvasProps(input) {
10868
10918
 
10869
10919
  // src/viewer/hooks/useScopedLayoutOptions.ts
10870
10920
  function scopeLayoutOptionsToActiveSlide(options, activeSlide) {
10871
- return chunk3WK4AE52_js.scopeLayoutOptionsToSlide(options, activeSlide?.layoutPath);
10921
+ return chunkTWUAZRCG_js.scopeLayoutOptionsToSlide(options, activeSlide?.layoutPath);
10872
10922
  }
10873
10923
 
10874
10924
  // src/viewer/hooks/useViewerBuildingBlocks-toolbar-handlers.ts
@@ -10881,7 +10931,7 @@ function buildToolbarAnimationHandlers(input) {
10881
10931
  const current = activeSlide.animations ?? [];
10882
10932
  if (group === "motionPath") {
10883
10933
  propertyHandlers.handleUpdateSlide({
10884
- animations: chunk3WK4AE52_js.applyMotionPathPreset(current, selectedElement.id, preset)
10934
+ animations: chunkTWUAZRCG_js.applyMotionPathPreset(current, selectedElement.id, preset)
10885
10935
  });
10886
10936
  return;
10887
10937
  }
@@ -11077,7 +11127,7 @@ function buildToolbarProps(input) {
11077
11127
  onOpenFile,
11078
11128
  onOpenRecentFile,
11079
11129
  onCreatePresentation: (templateId) => {
11080
- s.setSlides(chunk3WK4AE52_js.createBackstagePresentation(templateId));
11130
+ s.setSlides(chunkTWUAZRCG_js.createBackstagePresentation(templateId));
11081
11131
  s.setActiveSlideIndex(0);
11082
11132
  s.setSelectedElementId(null);
11083
11133
  s.setSelectedElementIds([]);
@@ -11107,7 +11157,7 @@ function buildToolbarProps(input) {
11107
11157
  loadLayoutPreviews: input.loadLayoutPreviews,
11108
11158
  onInsertSlideFromLayout: slideOps.handleInsertSlideFromLayout,
11109
11159
  onInsertSlideFromTemplate: slideOps.handleInsertSlideFromTemplate,
11110
- templateScheme: chunk3WK4AE52_js.templateSchemeFromTheme(s.theme?.colorScheme),
11160
+ templateScheme: chunkTWUAZRCG_js.templateSchemeFromTheme(s.theme?.colorScheme),
11111
11161
  customShows: s.customShows,
11112
11162
  activeCustomShowId: s.activeCustomShowId,
11113
11163
  onSetActiveCustomShowId: s.setActiveCustomShowId,
@@ -11148,7 +11198,7 @@ function buildToolbarProps(input) {
11148
11198
  isCommentsPanelOpen: s.isInspectorPaneOpen,
11149
11199
  slideCommentCount: activeSlide?.comments?.length ?? 0,
11150
11200
  formatPainterActive: s.formatPainterActive,
11151
- canActivateFormatPainter: chunk3WK4AE52_js.hasCopyableFormat(selectedElement),
11201
+ canActivateFormatPainter: chunkTWUAZRCG_js.hasCopyableFormat(selectedElement),
11152
11202
  onToggleFormatPainter: () => s.setFormatPainterActive((p) => !p),
11153
11203
  isSelectionPaneOpen: s.isSelectionPaneOpen,
11154
11204
  onToggleSelectionPane: () => s.setIsSelectionPaneOpen((p) => !p),
@@ -11226,7 +11276,7 @@ function useViewerBuildingBlocksCore(input) {
11226
11276
  headerFooter: state.headerFooter,
11227
11277
  loading,
11228
11278
  error,
11229
- maxHistoryEntries: chunk3WK4AE52_js.resolveHistoryDepth(viewerOptions),
11279
+ maxHistoryEntries: chunkTWUAZRCG_js.resolveHistoryDepth(viewerOptions),
11230
11280
  hasActivePointerInteraction,
11231
11281
  pointerCommitNonce: state.pointerCommitNonce,
11232
11282
  onDirty: markDocumentDirty,
@@ -11251,7 +11301,7 @@ function useViewerBuildingBlocksCore(input) {
11251
11301
  documentGridSpacing: state.viewProperties?.gridSpacing
11252
11302
  });
11253
11303
  const themeColorMap = react.useMemo(
11254
- () => state.theme?.colorScheme ? chunk3WK4AE52_js.buildThemeColorMap(state.theme.colorScheme) : void 0,
11304
+ () => state.theme?.colorScheme ? chunkTWUAZRCG_js.buildThemeColorMap(state.theme.colorScheme) : void 0,
11255
11305
  [state.theme?.colorScheme]
11256
11306
  );
11257
11307
  const { presentation, annotations, actionSoundHandlerRef, setExitModeHandler } = usePresentationSetup({
@@ -11300,7 +11350,7 @@ function useViewerBuildingBlocksCore(input) {
11300
11350
  gridSpacingPx,
11301
11351
  // Multiplied against the pre-existing 2x baseline; see the matching
11302
11352
  // comment in `PowerPointViewer.tsx`.
11303
- imageExportScale: 2 * chunk3WK4AE52_js.resolveImageResolutionScale(viewerOptions),
11353
+ imageExportScale: 2 * chunkTWUAZRCG_js.resolveImageResolutionScale(viewerOptions),
11304
11354
  viewerOptions
11305
11355
  };
11306
11356
  }
@@ -11316,7 +11366,7 @@ function useCompatibilityToastsState() {
11316
11366
  }
11317
11367
  function useReadOnlyRecommendationState(content) {
11318
11368
  const [recommendation, setRecommendation] = react.useState(
11319
- () => chunk3WK4AE52_js.readOnlyRecommendation(void 0)
11369
+ () => chunkTWUAZRCG_js.readOnlyRecommendation(void 0)
11320
11370
  );
11321
11371
  const [modifyVerifier, setModifyVerifier] = react.useState(void 0);
11322
11372
  const [bannerHidden, setBannerHidden] = react.useState(false);
@@ -11356,7 +11406,7 @@ function useReadOnlyRecommendationState(content) {
11356
11406
  async (password) => {
11357
11407
  setCheckingPassword(true);
11358
11408
  try {
11359
- const result = await chunk3WK4AE52_js.checkModifyPassword(modifyVerifier, password);
11409
+ const result = await chunkTWUAZRCG_js.checkModifyPassword(modifyVerifier, password);
11360
11410
  if (result.ok) {
11361
11411
  unlock();
11362
11412
  } else {
@@ -11401,9 +11451,9 @@ function useViewPreferencesSync(input) {
11401
11451
  setShowGuides
11402
11452
  } = input;
11403
11453
  react.useEffect(() => {
11404
- const seeded = chunk3WK4AE52_js.viewerPreferencesFromViewProperties(
11454
+ const seeded = chunkTWUAZRCG_js.viewerPreferencesFromViewProperties(
11405
11455
  { viewProperties },
11406
- { ...chunk3WK4AE52_js.DEFAULT_VIEWER_PREFERENCES, snapToGrid, snapToObjects: snapToShape, showGuides }
11456
+ { ...chunkTWUAZRCG_js.DEFAULT_VIEWER_PREFERENCES, snapToGrid, snapToObjects: snapToShape, showGuides }
11407
11457
  );
11408
11458
  setSnapToGrid(seeded.snapToGrid);
11409
11459
  setSnapToShape(seeded.snapToObjects ?? snapToShape);
@@ -11413,7 +11463,7 @@ function useViewPreferencesSync(input) {
11413
11463
  (prefsOverride) => {
11414
11464
  setViewProperties((prev) => {
11415
11465
  const merged = {
11416
- ...chunk3WK4AE52_js.DEFAULT_VIEWER_PREFERENCES,
11466
+ ...chunkTWUAZRCG_js.DEFAULT_VIEWER_PREFERENCES,
11417
11467
  snapToGrid,
11418
11468
  snapToObjects: snapToShape,
11419
11469
  showGuides,
@@ -11421,7 +11471,7 @@ function useViewPreferencesSync(input) {
11421
11471
  gridSpacingCy: prev?.gridSpacing?.cy,
11422
11472
  ...prefsOverride
11423
11473
  };
11424
- const patch = chunk3WK4AE52_js.viewPropertiesPatchFromPreferences(merged);
11474
+ const patch = chunkTWUAZRCG_js.viewPropertiesPatchFromPreferences(merged);
11425
11475
  return {
11426
11476
  ...prev,
11427
11477
  slideViewPr: { ...prev?.slideViewPr, ...patch.slideViewPr },
@@ -11640,7 +11690,7 @@ function useViewerBuildingBlocks(input) {
11640
11690
  }, [incomingContent]);
11641
11691
  const onOpenFile = react.useCallback(() => {
11642
11692
  void (async () => {
11643
- const picked = await chunk3WK4AE52_js.openPptxFile();
11693
+ const picked = await chunkTWUAZRCG_js.openPptxFile();
11644
11694
  if (picked) {
11645
11695
  setContent(picked.buffer);
11646
11696
  }
@@ -11648,7 +11698,7 @@ function useViewerBuildingBlocks(input) {
11648
11698
  }, []);
11649
11699
  const onOpenRecentFile = react.useCallback((key) => {
11650
11700
  void (async () => {
11651
- const bytes = await chunk3WK4AE52_js.readBackstageRecentFile(key);
11701
+ const bytes = await chunkTWUAZRCG_js.readBackstageRecentFile(key);
11652
11702
  if (bytes) {
11653
11703
  setContent(bytes);
11654
11704
  }