pptx-react-viewer 3.11.0 → 3.12.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 (156) hide show
  1. package/CHANGELOG.md +10 -0
  2. package/dist/{AiChatPanel-L5H455NZ.mjs → AiChatPanel-SCA4RLFI.mjs} +4 -4
  3. package/dist/AiChatPanel-SCA4RLFI.mjs.br +0 -0
  4. package/dist/AiChatPanel-SCA4RLFI.mjs.gz +0 -0
  5. package/dist/{AiChatPanel-A3ZMMVUA.js → AiChatPanel-TXCDQDHD.js} +25 -25
  6. package/dist/AiChatPanel-TXCDQDHD.js.br +0 -0
  7. package/dist/AiChatPanel-TXCDQDHD.js.gz +0 -0
  8. package/dist/{Area3DChartScene-OAD36KIX.mjs → Area3DChartScene-NSV5AIMM.mjs} +1 -1
  9. package/dist/{Area3DChartScene-OAD36KIX.mjs.br → Area3DChartScene-NSV5AIMM.mjs.br} +0 -0
  10. package/dist/Area3DChartScene-NSV5AIMM.mjs.gz +0 -0
  11. package/dist/{Area3DChartScene-R2CKCYCB.js → Area3DChartScene-YAK6W2J5.js} +2 -2
  12. package/dist/Area3DChartScene-YAK6W2J5.js.br +0 -0
  13. package/dist/Area3DChartScene-YAK6W2J5.js.gz +0 -0
  14. package/dist/{Bar3DChartScene-XNNXF26T.mjs → Bar3DChartScene-DFJ7XK3Q.mjs} +1 -1
  15. package/dist/{Bar3DChartScene-XNNXF26T.mjs.br → Bar3DChartScene-DFJ7XK3Q.mjs.br} +0 -0
  16. package/dist/Bar3DChartScene-DFJ7XK3Q.mjs.gz +0 -0
  17. package/dist/{Bar3DChartScene-CRRPMXGQ.js → Bar3DChartScene-WNBEX3TN.js} +2 -2
  18. package/dist/Bar3DChartScene-WNBEX3TN.js.br +0 -0
  19. package/dist/Bar3DChartScene-WNBEX3TN.js.gz +0 -0
  20. package/dist/{Line3DChartScene-44PLZML2.js → Line3DChartScene-PXA6WAQG.js} +2 -2
  21. package/dist/Line3DChartScene-PXA6WAQG.js.br +0 -0
  22. package/dist/Line3DChartScene-PXA6WAQG.js.gz +0 -0
  23. package/dist/{Line3DChartScene-MNNPB3LZ.mjs → Line3DChartScene-TK6RPGET.mjs} +1 -1
  24. package/dist/{Line3DChartScene-MNNPB3LZ.mjs.br → Line3DChartScene-TK6RPGET.mjs.br} +0 -0
  25. package/dist/Line3DChartScene-TK6RPGET.mjs.gz +0 -0
  26. package/dist/{Model3DScene-5MUREFLY.mjs → Model3DScene-7FZSQ3SP.mjs} +1 -1
  27. package/dist/Model3DScene-7FZSQ3SP.mjs.br +0 -0
  28. package/dist/Model3DScene-7FZSQ3SP.mjs.gz +0 -0
  29. package/dist/{Model3DScene-RYPYQPJH.js → Model3DScene-FJQOUWCV.js} +2 -2
  30. package/dist/{Model3DScene-RYPYQPJH.js.br → Model3DScene-FJQOUWCV.js.br} +0 -0
  31. package/dist/Model3DScene-FJQOUWCV.js.gz +0 -0
  32. package/dist/{PieChart3DScene-KYZSSG5X.mjs → PieChart3DScene-KKZTAIFB.mjs} +1 -1
  33. package/dist/PieChart3DScene-KKZTAIFB.mjs.br +0 -0
  34. package/dist/PieChart3DScene-KKZTAIFB.mjs.gz +0 -0
  35. package/dist/{PieChart3DScene-GACYCSSQ.js → PieChart3DScene-P25IGVT6.js} +2 -2
  36. package/dist/PieChart3DScene-P25IGVT6.js.br +0 -0
  37. package/dist/PieChart3DScene-P25IGVT6.js.gz +0 -0
  38. package/dist/PowerPointViewer-Cl6jBPNw.d.ts.map +1 -1
  39. package/dist/{SurfaceChart3DScene-RI5G4BHS.js → SurfaceChart3DScene-36MT6QAK.js} +2 -2
  40. package/dist/SurfaceChart3DScene-36MT6QAK.js.br +0 -0
  41. package/dist/SurfaceChart3DScene-36MT6QAK.js.gz +0 -0
  42. package/dist/{SurfaceChart3DScene-ZUP4PRUZ.mjs → SurfaceChart3DScene-LWJCERTR.mjs} +1 -1
  43. package/dist/SurfaceChart3DScene-LWJCERTR.mjs.br +0 -0
  44. package/dist/SurfaceChart3DScene-LWJCERTR.mjs.gz +0 -0
  45. package/dist/{chunk-SUEZMQRT.mjs → chunk-2FSNTJVI.mjs} +1 -1
  46. package/dist/chunk-2FSNTJVI.mjs.br +0 -0
  47. package/dist/{chunk-SUEZMQRT.mjs.gz → chunk-2FSNTJVI.mjs.gz} +0 -0
  48. package/dist/{chunk-Y6GG2OOW.js → chunk-3AJ54EAB.js} +5 -0
  49. package/dist/chunk-3AJ54EAB.js.br +0 -0
  50. package/dist/chunk-3AJ54EAB.js.gz +0 -0
  51. package/dist/{chunk-LY5535CF.js → chunk-3WK4AE52.js} +5364 -1513
  52. package/dist/chunk-3WK4AE52.js.br +0 -0
  53. package/dist/chunk-3WK4AE52.js.gz +0 -0
  54. package/dist/{chunk-BX4XVY5X.js → chunk-45AVHO7M.js} +5 -5
  55. package/dist/chunk-45AVHO7M.js.br +0 -0
  56. package/dist/chunk-45AVHO7M.js.gz +0 -0
  57. package/dist/{chunk-MRBHJ26I.js → chunk-AARQTIMN.js} +489 -456
  58. package/dist/chunk-AARQTIMN.js.br +0 -0
  59. package/dist/chunk-AARQTIMN.js.gz +0 -0
  60. package/dist/{chunk-6BNPHEEX.mjs → chunk-C2BDHCL2.mjs} +5359 -1514
  61. package/dist/chunk-C2BDHCL2.mjs.br +0 -0
  62. package/dist/chunk-C2BDHCL2.mjs.gz +0 -0
  63. package/dist/{chunk-TAGG5YNA.mjs → chunk-HMX3MQR7.mjs} +5 -0
  64. package/dist/chunk-HMX3MQR7.mjs.br +0 -0
  65. package/dist/chunk-HMX3MQR7.mjs.gz +0 -0
  66. package/dist/{chunk-5T4Y4QPV.mjs → chunk-HXDNYDRJ.mjs} +22 -8
  67. package/dist/chunk-HXDNYDRJ.mjs.br +0 -0
  68. package/dist/chunk-HXDNYDRJ.mjs.gz +0 -0
  69. package/dist/{chunk-IK25LY4C.js → chunk-O27KNZLJ.js} +195 -181
  70. package/dist/chunk-O27KNZLJ.js.br +0 -0
  71. package/dist/chunk-O27KNZLJ.js.gz +0 -0
  72. package/dist/{chunk-4PL3GBSD.js → chunk-T7MY5L3O.js} +1607 -1388
  73. package/dist/chunk-T7MY5L3O.js.br +0 -0
  74. package/dist/chunk-T7MY5L3O.js.gz +0 -0
  75. package/dist/{chunk-VHFPZBUW.mjs → chunk-WRHPPTYF.mjs} +53 -20
  76. package/dist/chunk-WRHPPTYF.mjs.br +0 -0
  77. package/dist/chunk-WRHPPTYF.mjs.gz +0 -0
  78. package/dist/{chunk-N75WRHON.mjs → chunk-ZOEKVSSU.mjs} +361 -142
  79. package/dist/chunk-ZOEKVSSU.mjs.br +0 -0
  80. package/dist/chunk-ZOEKVSSU.mjs.gz +0 -0
  81. package/dist/i18n.js +4 -4
  82. package/dist/i18n.js.br +0 -0
  83. package/dist/i18n.js.gz +0 -0
  84. package/dist/i18n.mjs +1 -1
  85. package/dist/i18n.mjs.br +0 -0
  86. package/dist/i18n.mjs.gz +0 -0
  87. package/dist/index.d.ts +92 -0
  88. package/dist/index.js +47 -47
  89. package/dist/index.js.br +0 -0
  90. package/dist/index.js.gz +0 -0
  91. package/dist/index.mjs +6 -6
  92. package/dist/index.mjs.br +0 -0
  93. package/dist/index.mjs.gz +0 -0
  94. package/dist/internals.d.ts +157 -0
  95. package/dist/internals.d.ts.map +1 -1
  96. package/dist/internals.js +79 -79
  97. package/dist/internals.js.br +0 -0
  98. package/dist/internals.js.gz +0 -0
  99. package/dist/internals.mjs +4 -4
  100. package/dist/internals.mjs.br +0 -0
  101. package/dist/internals.mjs.gz +0 -0
  102. package/dist/viewer/index.d.ts +81 -0
  103. package/dist/viewer/index.js +27 -27
  104. package/dist/viewer/index.js.br +0 -0
  105. package/dist/viewer/index.js.gz +0 -0
  106. package/dist/viewer/index.mjs +6 -6
  107. package/dist/viewer/index.mjs.br +0 -0
  108. package/dist/viewer/index.mjs.gz +0 -0
  109. package/package.json +1 -1
  110. package/dist/AiChatPanel-A3ZMMVUA.js.br +0 -0
  111. package/dist/AiChatPanel-A3ZMMVUA.js.gz +0 -0
  112. package/dist/AiChatPanel-L5H455NZ.mjs.br +0 -0
  113. package/dist/AiChatPanel-L5H455NZ.mjs.gz +0 -0
  114. package/dist/Area3DChartScene-OAD36KIX.mjs.gz +0 -0
  115. package/dist/Area3DChartScene-R2CKCYCB.js.br +0 -0
  116. package/dist/Area3DChartScene-R2CKCYCB.js.gz +0 -0
  117. package/dist/Bar3DChartScene-CRRPMXGQ.js.br +0 -0
  118. package/dist/Bar3DChartScene-CRRPMXGQ.js.gz +0 -0
  119. package/dist/Bar3DChartScene-XNNXF26T.mjs.gz +0 -0
  120. package/dist/Line3DChartScene-44PLZML2.js.br +0 -0
  121. package/dist/Line3DChartScene-44PLZML2.js.gz +0 -0
  122. package/dist/Line3DChartScene-MNNPB3LZ.mjs.gz +0 -0
  123. package/dist/Model3DScene-5MUREFLY.mjs.br +0 -0
  124. package/dist/Model3DScene-5MUREFLY.mjs.gz +0 -0
  125. package/dist/Model3DScene-RYPYQPJH.js.gz +0 -0
  126. package/dist/PieChart3DScene-GACYCSSQ.js.br +0 -0
  127. package/dist/PieChart3DScene-GACYCSSQ.js.gz +0 -0
  128. package/dist/PieChart3DScene-KYZSSG5X.mjs.br +0 -0
  129. package/dist/PieChart3DScene-KYZSSG5X.mjs.gz +0 -0
  130. package/dist/SurfaceChart3DScene-RI5G4BHS.js.br +0 -0
  131. package/dist/SurfaceChart3DScene-RI5G4BHS.js.gz +0 -0
  132. package/dist/SurfaceChart3DScene-ZUP4PRUZ.mjs.br +0 -0
  133. package/dist/SurfaceChart3DScene-ZUP4PRUZ.mjs.gz +0 -0
  134. package/dist/chunk-4PL3GBSD.js.br +0 -0
  135. package/dist/chunk-4PL3GBSD.js.gz +0 -0
  136. package/dist/chunk-5T4Y4QPV.mjs.br +0 -0
  137. package/dist/chunk-5T4Y4QPV.mjs.gz +0 -0
  138. package/dist/chunk-6BNPHEEX.mjs.br +0 -0
  139. package/dist/chunk-6BNPHEEX.mjs.gz +0 -0
  140. package/dist/chunk-BX4XVY5X.js.br +0 -0
  141. package/dist/chunk-BX4XVY5X.js.gz +0 -0
  142. package/dist/chunk-IK25LY4C.js.br +0 -0
  143. package/dist/chunk-IK25LY4C.js.gz +0 -0
  144. package/dist/chunk-LY5535CF.js.br +0 -0
  145. package/dist/chunk-LY5535CF.js.gz +0 -0
  146. package/dist/chunk-MRBHJ26I.js.br +0 -0
  147. package/dist/chunk-MRBHJ26I.js.gz +0 -0
  148. package/dist/chunk-N75WRHON.mjs.br +0 -0
  149. package/dist/chunk-N75WRHON.mjs.gz +0 -0
  150. package/dist/chunk-SUEZMQRT.mjs.br +0 -0
  151. package/dist/chunk-TAGG5YNA.mjs.br +0 -0
  152. package/dist/chunk-TAGG5YNA.mjs.gz +0 -0
  153. package/dist/chunk-VHFPZBUW.mjs.br +0 -0
  154. package/dist/chunk-VHFPZBUW.mjs.gz +0 -0
  155. package/dist/chunk-Y6GG2OOW.js.br +0 -0
  156. package/dist/chunk-Y6GG2OOW.js.gz +0 -0
@@ -1,15 +1,15 @@
1
1
  'use strict';
2
2
 
3
- var chunkIK25LY4C_js = require('./chunk-IK25LY4C.js');
4
- var chunkLY5535CF_js = require('./chunk-LY5535CF.js');
5
- var chunkY6GG2OOW_js = require('./chunk-Y6GG2OOW.js');
3
+ var chunkO27KNZLJ_js = require('./chunk-O27KNZLJ.js');
4
+ var chunk3WK4AE52_js = require('./chunk-3WK4AE52.js');
5
+ var chunk3AJ54EAB_js = require('./chunk-3AJ54EAB.js');
6
6
  var react = require('react');
7
7
  var reactI18next = require('react-i18next');
8
8
 
9
9
  function useVirtualizedSlides({
10
10
  totalItems,
11
11
  itemHeight,
12
- overscan = chunkLY5535CF_js.DEFAULT_VIRTUAL_OVERSCAN
12
+ overscan = chunk3WK4AE52_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 = chunkLY5535CF_js.computeVirtualRange(totalItems, itemHeight, scrollTop, viewportHeight, overscan);
42
+ const range = chunk3WK4AE52_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 ??= chunkLY5535CF_js.createPresenceProjector();
83
+ projectorRef.current ??= chunk3WK4AE52_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 >= chunkLY5535CF_js.BROADCAST_THROTTLE_MS) {
108
+ if (elapsed >= chunk3WK4AE52_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
- }, chunkLY5535CF_js.BROADCAST_THROTTLE_MS - elapsed);
118
+ }, chunk3WK4AE52_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 = chunkLY5535CF_js.createSyncGate(() => setSynced(true));
198
+ gateRef.current = chunk3WK4AE52_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
- chunkLY5535CF_js.clearLocalAwareness(provider.awareness);
218
+ chunk3WK4AE52_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 = chunkLY5535CF_js.validateRoomId(config.roomId);
243
+ const roomId = chunk3WK4AE52_js.validateRoomId(config.roomId);
244
244
  const provider = new WebrtcProvider(roomId, yDoc, opts);
245
- departureRef.current = chunkLY5535CF_js.createDepartureChannel(roomId, provider.awareness);
245
+ departureRef.current = chunk3WK4AE52_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 = chunkLY5535CF_js.validateRoomId(config.roomId);
288
- const transport = config.transport ?? chunkLY5535CF_js.resolveTransportForServerUrl(config.serverUrl);
287
+ const roomId = chunk3WK4AE52_js.validateRoomId(config.roomId);
288
+ const transport = config.transport ?? chunk3WK4AE52_js.resolveTransportForServerUrl(config.serverUrl);
289
289
  if (transport === "webrtc") {
290
290
  await initWebrtc();
291
291
  return;
292
292
  }
293
- if (chunkLY5535CF_js.isMixedContentBlocked(config.serverUrl)) {
293
+ if (chunk3WK4AE52_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 = chunkLY5535CF_js.createDepartureChannel(roomId, provider.awareness);
307
+ departureRef.current = chunk3WK4AE52_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
- chunkLY5535CF_js.clearLocalAwareness(provider.awareness);
347
+ chunk3WK4AE52_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
- }, chunkLY5535CF_js.CONNECTION_TIMEOUT_MS);
356
+ }, chunk3WK4AE52_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
- chunkLY5535CF_js.clearLocalAwareness(provider.awareness);
365
+ chunk3WK4AE52_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 = chunkLY5535CF_js.registerCollaborationTeardown({
391
+ const disposeTeardown = chunk3WK4AE52_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 = chunkLY5535CF_js.sanitizeColor(config?.userColor, "#6366f1");
412
+ const userColor = chunk3WK4AE52_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(chunkLY5535CF_js.cloneSlide),
531
- templateElementsBySlideId: chunkLY5535CF_js.cloneTemplateElementsBySlideId(templateElementsBySlideId),
530
+ slides: slides.map(chunk3WK4AE52_js.cloneSlide),
531
+ templateElementsBySlideId: chunk3WK4AE52_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(chunkLY5535CF_js.cloneSlide));
544
+ setSlides(snapshot.slides.map(chunk3WK4AE52_js.cloneSlide));
545
545
  setTemplateElementsBySlideId(
546
- chunkLY5535CF_js.cloneTemplateElementsBySlideId(snapshot.templateElementsBySlideId)
546
+ chunk3WK4AE52_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 = chunkIK25LY4C_js.cloneHistorySnapshot(previousSnapshot);
586
- lastHistorySnapshotRef.current = chunkIK25LY4C_js.cloneHistorySnapshot(nextSnapshot);
585
+ const nextSnapshot = chunkO27KNZLJ_js.cloneHistorySnapshot(previousSnapshot);
586
+ lastHistorySnapshotRef.current = chunkO27KNZLJ_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 = chunkIK25LY4C_js.cloneHistorySnapshot(nextSnapshot);
608
- lastHistorySnapshotRef.current = chunkIK25LY4C_js.cloneHistorySnapshot(targetSnapshot);
607
+ const targetSnapshot = chunkO27KNZLJ_js.cloneHistorySnapshot(nextSnapshot);
608
+ lastHistorySnapshotRef.current = chunkO27KNZLJ_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 = chunkIK25LY4C_js.cloneHistorySnapshot(initialSnapshot);
626
+ const clonedInitial = chunkO27KNZLJ_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 = chunkIK25LY4C_js.cloneHistorySnapshot(snapshot);
674
+ lastHistorySnapshotRef.current = chunkO27KNZLJ_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(chunkIK25LY4C_js.cloneHistorySnapshot(previousSnapshot));
681
+ historyPastRef.current.push(chunkO27KNZLJ_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 = chunkIK25LY4C_js.cloneHistorySnapshot(snapshot);
686
+ lastHistorySnapshotRef.current = chunkO27KNZLJ_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(chunkLY5535CF_js.createWheelStepBuffer());
746
+ const wheelBufferRef = react.useRef(chunk3WK4AE52_js.createWheelStepBuffer());
747
747
  const storeRef = react.useRef(null);
748
- storeRef.current ??= chunkLY5535CF_js.createViewerZoomStore();
748
+ storeRef.current ??= chunk3WK4AE52_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 = chunkLY5535CF_js.clampZoomScale(nextScale);
809
+ const boundedScale = chunk3WK4AE52_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, chunkIK25LY4C_js.MIN_ELEMENT_SIZE));
847
- maxY = Math.max(maxY, element.y + Math.max(element.height, chunkIK25LY4C_js.MIN_ELEMENT_SIZE));
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));
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, chunkIK25LY4C_js.MIN_ELEMENT_SIZE);
854
- const boundsHeight = Math.max(selectionBounds.maxY - selectionBounds.minY, chunkIK25LY4C_js.MIN_ELEMENT_SIZE);
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);
855
855
  const availableWidth = Math.max(
856
- effectiveEditorDimensions.width - chunkIK25LY4C_js.ZOOM_TO_SELECTION_PADDING,
857
- chunkIK25LY4C_js.MIN_ELEMENT_SIZE
856
+ effectiveEditorDimensions.width - chunkO27KNZLJ_js.ZOOM_TO_SELECTION_PADDING,
857
+ chunkO27KNZLJ_js.MIN_ELEMENT_SIZE
858
858
  );
859
859
  const availableHeight = Math.max(
860
- effectiveEditorDimensions.height - chunkIK25LY4C_js.ZOOM_TO_SELECTION_PADDING,
861
- chunkIK25LY4C_js.MIN_ELEMENT_SIZE
860
+ effectiveEditorDimensions.height - chunkO27KNZLJ_js.ZOOM_TO_SELECTION_PADDING,
861
+ chunkO27KNZLJ_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 = chunkLY5535CF_js.clampZoomScale(targetEditorScale / safeFitScale);
868
+ const nextScale = chunk3WK4AE52_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 = chunkLY5535CF_js.mapEditingWheel(event, wheelBufferRef.current, true);
885
+ const mapped = chunk3WK4AE52_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: chunkLY5535CF_js.clampZoomScale(store.getState().zoom + mapped.deltaScale)
892
+ zoom: chunk3WK4AE52_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
- chunkLY5535CF_js.playGroup(controller, group, ctx);
988
- chunkLY5535CF_js.scheduleAutoAdvanceChain(controller, ctx);
987
+ chunk3WK4AE52_js.playGroup(controller, group, ctx);
988
+ chunk3WK4AE52_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 = chunkLY5535CF_js.computeEntranceAnimationDelay(animation.delayMs, animationIndex);
1007
+ const delay = chunk3WK4AE52_js.computeEntranceAnimationDelay(animation.delayMs, animationIndex);
1008
1008
  const timer = window.setTimeout(() => {
1009
1009
  setPresentationAnimations(
1010
1010
  (previousAnimations) => previousAnimations.map(
@@ -1018,7 +1018,14 @@ function scheduleEntranceAnimationTimers(slide, setPresentationAnimations, prese
1018
1018
 
1019
1019
  // src/viewer/hooks/presentation-mode/useAnimationPlayback.ts
1020
1020
  function useAnimationPlayback(input) {
1021
- const { slides, onPlayActionSound, showWithAnimation, canvasSize, themeColorMap } = input;
1021
+ const {
1022
+ slides,
1023
+ onPlayActionSound,
1024
+ showWithAnimation,
1025
+ canvasSize,
1026
+ themeColorMap,
1027
+ pixelateMosaicAnimation
1028
+ } = input;
1022
1029
  const animationsEnabled = showWithAnimation !== false;
1023
1030
  const [presentationAnimations, setPresentationAnimations] = react.useState([]);
1024
1031
  const [presentationElementStates, setPresentationElementStates] = react.useState(/* @__PURE__ */ new Map());
@@ -1030,7 +1037,7 @@ function useAnimationPlayback(input) {
1030
1037
  const presentationTimersRef = react.useRef([]);
1031
1038
  const controllerRef = react.useRef(null);
1032
1039
  const buildRafRef = react.useRef(null);
1033
- const activeAnimationGroupRef = react.useRef(chunkLY5535CF_js.createActiveAnimationGroup());
1040
+ const activeAnimationGroupRef = react.useRef(chunk3WK4AE52_js.createActiveAnimationGroup());
1034
1041
  const seededCompletedRef = react.useRef(false);
1035
1042
  const mediaTimeNodeElementIdsRef = react.useRef(/* @__PURE__ */ new Map());
1036
1043
  const lastSeedCompletedRef = react.useRef(false);
@@ -1047,15 +1054,15 @@ function useAnimationPlayback(input) {
1047
1054
  }, [onPlayActionSound]);
1048
1055
  react.useEffect(() => {
1049
1056
  return () => {
1050
- chunkLY5535CF_js.cancelBuildReveal(buildRafRef);
1057
+ chunk3WK4AE52_js.cancelBuildReveal(buildRafRef);
1051
1058
  };
1052
1059
  }, []);
1053
1060
  const clearPresentationTimers = react.useCallback(() => {
1054
- chunkLY5535CF_js.clearPlaybackTimers(buildPlaybackContext(), activeAnimationGroupRef.current);
1061
+ chunk3WK4AE52_js.clearPlaybackTimers(buildPlaybackContext(), activeAnimationGroupRef.current);
1055
1062
  }, [buildPlaybackContext]);
1056
1063
  const resetSlideTimeline = react.useCallback(
1057
1064
  (slideIndex) => {
1058
- chunkLY5535CF_js.cancelBuildReveal(buildRafRef);
1065
+ chunk3WK4AE52_js.cancelBuildReveal(buildRafRef);
1059
1066
  const slide = slides[slideIndex];
1060
1067
  if (!slide) {
1061
1068
  controllerRef.current = null;
@@ -1066,13 +1073,14 @@ function useAnimationPlayback(input) {
1066
1073
  setHoverTriggerShapeIds(/* @__PURE__ */ new Set());
1067
1074
  return;
1068
1075
  }
1069
- const controller = chunkLY5535CF_js.PresentationAnimationController.fromSlide(slide, {
1076
+ const controller = chunk3WK4AE52_js.PresentationAnimationController.fromSlide(slide, {
1070
1077
  slideHeightPx: canvasSize?.height,
1071
1078
  slideWidthPx: canvasSize?.width,
1072
- themeColorMap
1079
+ themeColorMap,
1080
+ pixelateMosaic: pixelateMosaicAnimation
1073
1081
  });
1074
1082
  controllerRef.current = controller;
1075
- mediaTimeNodeElementIdsRef.current = chunkLY5535CF_js.resolveMediaTimeNodeElementIds(
1083
+ mediaTimeNodeElementIdsRef.current = chunk3WK4AE52_js.resolveMediaTimeNodeElementIds(
1076
1084
  slide.nativeAnimations ?? []
1077
1085
  );
1078
1086
  setPresentationKeyframesCss(controller.keyframesCss);
@@ -1080,13 +1088,13 @@ function useAnimationPlayback(input) {
1080
1088
  setHoverTriggerShapeIds(controller.hoverTriggerShapeIds);
1081
1089
  setPresentationElementStates(controller.computeStates());
1082
1090
  },
1083
- [slides, canvasSize, themeColorMap]
1091
+ [slides, canvasSize, themeColorMap, pixelateMosaicAnimation]
1084
1092
  );
1085
1093
  const playNextAnimationGroup = react.useCallback(() => {
1086
1094
  if (!animationsEnabled) {
1087
1095
  return false;
1088
1096
  }
1089
- return chunkLY5535CF_js.advanceMainSequence(
1097
+ return chunk3WK4AE52_js.advanceMainSequence(
1090
1098
  controllerRef.current,
1091
1099
  buildPlaybackContext(),
1092
1100
  activeAnimationGroupRef.current
@@ -1102,7 +1110,7 @@ function useAnimationPlayback(input) {
1102
1110
  if (!group) {
1103
1111
  return false;
1104
1112
  }
1105
- chunkLY5535CF_js.playGroup(controller, group, buildPlaybackContext());
1113
+ chunk3WK4AE52_js.playGroup(controller, group, buildPlaybackContext());
1106
1114
  return true;
1107
1115
  },
1108
1116
  [buildPlaybackContext]
@@ -1121,7 +1129,7 @@ function useAnimationPlayback(input) {
1121
1129
  if (!group) {
1122
1130
  return false;
1123
1131
  }
1124
- chunkLY5535CF_js.playGroup(controller, group, buildPlaybackContext());
1132
+ chunk3WK4AE52_js.playGroup(controller, group, buildPlaybackContext());
1125
1133
  return true;
1126
1134
  },
1127
1135
  [animationsEnabled, buildPlaybackContext]
@@ -1202,12 +1210,12 @@ function useAnimationPlayback(input) {
1202
1210
  presentationTimersRef
1203
1211
  };
1204
1212
  }
1205
- var PRESENTER_CHANNEL_NAME = chunkLY5535CF_js.PRESENTATION_CHANNEL_NAME;
1206
- var AUDIENCE_HASH = chunkLY5535CF_js.PRESENTATION_HASH;
1207
- var PRESENTER_MSG_ORIGIN = chunkLY5535CF_js.PRESENTATION_MESSAGE_ORIGIN;
1208
- var AUDIENCE_NONCE_KEY = chunkLY5535CF_js.PRESENTATION_NONCE_KEY;
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;
1209
1217
  function generateSessionId() {
1210
- return chunkLY5535CF_js.createPresentationSessionId();
1218
+ return chunk3WK4AE52_js.createPresentationSessionId();
1211
1219
  }
1212
1220
  function parseAudienceNonce() {
1213
1221
  const hash = window.location.hash;
@@ -1243,7 +1251,7 @@ function usePresenterWindow(input) {
1243
1251
  }, []);
1244
1252
  const swapDisplays = react.useCallback(async () => {
1245
1253
  const audience = audienceWindowRef.current;
1246
- return audience && !audience.closed ? chunkLY5535CF_js.swapPresentationWindows(window, audience) : false;
1254
+ return audience && !audience.closed ? chunk3WK4AE52_js.swapPresentationWindows(window, audience) : false;
1247
1255
  }, []);
1248
1256
  const syncSlideToAudience = react.useCallback(
1249
1257
  (slideIndex) => {
@@ -1307,7 +1315,7 @@ function usePresenterWindow(input) {
1307
1315
  pollTimerRef.current = null;
1308
1316
  }
1309
1317
  if (closingSessionId) {
1310
- void chunkLY5535CF_js.clearAudienceContent(closingSessionId);
1318
+ void chunk3WK4AE52_js.clearAudienceContent(closingSessionId);
1311
1319
  }
1312
1320
  }, [getChannel]);
1313
1321
  const openAudienceWindow = react.useCallback(() => {
@@ -1325,10 +1333,10 @@ function usePresenterWindow(input) {
1325
1333
  audienceWindowRef.current = blankWin;
1326
1334
  const sessionId = generateSessionId();
1327
1335
  sessionIdRef.current = sessionId;
1328
- const audienceUrl = chunkLY5535CF_js.buildPresentationAudienceUrl(window.location.href, sessionId);
1329
- void chunkLY5535CF_js.resolveAudienceScreenPlacement(window).then((placement) => {
1336
+ const audienceUrl = chunk3WK4AE52_js.buildPresentationAudienceUrl(window.location.href, sessionId);
1337
+ void chunk3WK4AE52_js.resolveAudienceScreenPlacement(window).then((placement) => {
1330
1338
  if (placement && audienceWindowRef.current === blankWin && !blankWin.closed) {
1331
- chunkLY5535CF_js.placeAudienceWindow(blankWin, placement);
1339
+ chunk3WK4AE52_js.placeAudienceWindow(blankWin, placement);
1332
1340
  }
1333
1341
  return void 0;
1334
1342
  });
@@ -1358,7 +1366,7 @@ function usePresenterWindow(input) {
1358
1366
  }
1359
1367
  };
1360
1368
  if (content) {
1361
- void chunkLY5535CF_js.storeAudienceContent(content, sessionId).then(() => navigateOrClose(true)).catch(() => navigateOrClose(false));
1369
+ void chunk3WK4AE52_js.storeAudienceContent(content, sessionId).then(() => navigateOrClose(true)).catch(() => navigateOrClose(false));
1362
1370
  } else {
1363
1371
  navigateOrClose(true);
1364
1372
  }
@@ -1384,7 +1392,7 @@ function usePresenterWindow(input) {
1384
1392
  }
1385
1393
  const handleMessage = (event) => {
1386
1394
  const message = event.data;
1387
- if (chunkLY5535CF_js.isPresentationSessionMessage(message) && message.type === "audience-ready" && message.sessionId === sessionIdRef.current) {
1395
+ if (chunk3WK4AE52_js.isPresentationSessionMessage(message) && message.type === "audience-ready" && message.sessionId === sessionIdRef.current) {
1388
1396
  syncStateToAudience(snapshotRef.current);
1389
1397
  }
1390
1398
  };
@@ -1413,7 +1421,7 @@ function usePresenterWindow(input) {
1413
1421
  react.useEffect(() => {
1414
1422
  const handleBeforeUnload = () => {
1415
1423
  if (sessionIdRef.current) {
1416
- void chunkLY5535CF_js.clearAudienceContent(sessionIdRef.current);
1424
+ void chunk3WK4AE52_js.clearAudienceContent(sessionIdRef.current);
1417
1425
  }
1418
1426
  };
1419
1427
  window.addEventListener("beforeunload", handleBeforeUnload);
@@ -1475,7 +1483,7 @@ function useAudienceMode(input) {
1475
1483
  }
1476
1484
  channel.onmessage = (event) => {
1477
1485
  const data = event.data;
1478
- if (!chunkLY5535CF_js.isPresentationSessionMessage(data) || data.origin !== PRESENTER_MSG_ORIGIN) {
1486
+ if (!chunk3WK4AE52_js.isPresentationSessionMessage(data) || data.origin !== PRESENTER_MSG_ORIGIN) {
1479
1487
  return;
1480
1488
  }
1481
1489
  if (expectedSessionId && data.sessionId !== expectedSessionId) {
@@ -1491,16 +1499,16 @@ function useAudienceMode(input) {
1491
1499
  }
1492
1500
  if (data.type === "presenter-exit") {
1493
1501
  if (expectedSessionId) {
1494
- void chunkLY5535CF_js.clearAudienceContent(expectedSessionId);
1502
+ void chunk3WK4AE52_js.clearAudienceContent(expectedSessionId);
1495
1503
  }
1496
- if (chunkLY5535CF_js.endAudienceDisplay(window)) {
1504
+ if (chunk3WK4AE52_js.endAudienceDisplay(window)) {
1497
1505
  handlers.onPresenterEnded?.();
1498
1506
  }
1499
1507
  }
1500
1508
  };
1501
1509
  if (expectedSessionId) {
1502
1510
  channel.postMessage({
1503
- origin: chunkLY5535CF_js.PRESENTATION_MESSAGE_ORIGIN,
1511
+ origin: chunk3WK4AE52_js.PRESENTATION_MESSAGE_ORIGIN,
1504
1512
  type: "audience-ready",
1505
1513
  sessionId: expectedSessionId
1506
1514
  });
@@ -1514,7 +1522,7 @@ function useAudienceMode(input) {
1514
1522
  }, []);
1515
1523
  }
1516
1524
  function usePresentationKeyboard(input) {
1517
- const wheelBufferRef = react.useRef(chunkLY5535CF_js.createWheelStepBuffer());
1525
+ const wheelBufferRef = react.useRef(chunk3WK4AE52_js.createWheelStepBuffer());
1518
1526
  const {
1519
1527
  mode,
1520
1528
  movePresentationSlide,
@@ -1535,14 +1543,14 @@ function usePresentationKeyboard(input) {
1535
1543
  presentationSlideIndex,
1536
1544
  setShowRehearsalSummary
1537
1545
  } = input;
1538
- const keyBufferRef = react.useRef(chunkLY5535CF_js.createPresentationKeyBuffer());
1546
+ const keyBufferRef = react.useRef(chunk3WK4AE52_js.createPresentationKeyBuffer());
1539
1547
  react.useEffect(() => {
1540
- if (mode !== "present" || !chunkLY5535CF_js.acceptsPresentationInput()) {
1541
- keyBufferRef.current = chunkLY5535CF_js.createPresentationKeyBuffer();
1548
+ if (mode !== "present" || !chunk3WK4AE52_js.acceptsPresentationInput()) {
1549
+ keyBufferRef.current = chunk3WK4AE52_js.createPresentationKeyBuffer();
1542
1550
  return;
1543
1551
  }
1544
1552
  const handleKeyDown = (event) => {
1545
- const mapped = chunkLY5535CF_js.mapPresentationKey(event, keyBufferRef.current);
1553
+ const mapped = chunk3WK4AE52_js.mapPresentationKey(event, keyBufferRef.current);
1546
1554
  if (mapped.action === "none") {
1547
1555
  return;
1548
1556
  }
@@ -1562,12 +1570,12 @@ function usePresentationKeyboard(input) {
1562
1570
  movePresentationSlide(-1);
1563
1571
  return;
1564
1572
  case "first": {
1565
- const first = chunkLY5535CF_js.firstShowSlideIndex(showSlideIndexes);
1573
+ const first = chunk3WK4AE52_js.firstShowSlideIndex(showSlideIndexes);
1566
1574
  navigateToSlide(first ?? 0);
1567
1575
  return;
1568
1576
  }
1569
1577
  case "last": {
1570
- const last = chunkLY5535CF_js.lastShowSlideIndex(showSlideIndexes);
1578
+ const last = chunk3WK4AE52_js.lastShowSlideIndex(showSlideIndexes);
1571
1579
  navigateToSlide(last ?? Math.max(0, slideCount - 1));
1572
1580
  return;
1573
1581
  }
@@ -1605,10 +1613,10 @@ function usePresentationKeyboard(input) {
1605
1613
  }
1606
1614
  };
1607
1615
  const handleWheel = (event) => {
1608
- if (mode !== "present" || !chunkLY5535CF_js.acceptsPresentationInput()) {
1616
+ if (mode !== "present" || !chunk3WK4AE52_js.acceptsPresentationInput()) {
1609
1617
  return;
1610
1618
  }
1611
- const mapped = chunkLY5535CF_js.mapPresentationWheel(event, wheelBufferRef.current);
1619
+ const mapped = chunk3WK4AE52_js.mapPresentationWheel(event, wheelBufferRef.current);
1612
1620
  if (mapped.intent === "next-slide") {
1613
1621
  event.preventDefault();
1614
1622
  movePresentationSlide(1);
@@ -1741,7 +1749,7 @@ function useRehearsalTimings(input) {
1741
1749
 
1742
1750
  // src/viewer/hooks/presentation-mode/presentation-actions.ts
1743
1751
  function handlePresentationActionImpl(action, deps) {
1744
- chunkLY5535CF_js.runPresentationAction(
1752
+ chunk3WK4AE52_js.runPresentationAction(
1745
1753
  action,
1746
1754
  { slideCount: deps.slidesLength, ...deps.elementId ? { elementId: deps.elementId } : {} },
1747
1755
  {
@@ -1760,7 +1768,8 @@ function handlePresentationActionImpl(action, deps) {
1760
1768
  openFile: deps.onOpenFile,
1761
1769
  openPresentation: deps.onOpenPresentation,
1762
1770
  playMedia: deps.onPlayMedia,
1763
- oleVerb: deps.onOleVerb
1771
+ oleVerb: deps.onOleVerb,
1772
+ runProgram: deps.onRunProgram
1764
1773
  }
1765
1774
  );
1766
1775
  }
@@ -1769,13 +1778,13 @@ function handlePresentationActionImpl(action, deps) {
1769
1778
  function executeSlideTransition(nextSlideIndex, deps) {
1770
1779
  const incomingSlide = deps.slides[nextSlideIndex];
1771
1780
  const transition = deps.reverse ? deps.slides[deps.currentSlideIndex]?.transition : incomingSlide?.transition;
1772
- const durationMs = deps.playTransition ? chunkLY5535CF_js.resolveTransitionDurationMs(transition) : 0;
1781
+ const durationMs = deps.playTransition ? chunk3WK4AE52_js.resolveTransitionDurationMs(transition) : 0;
1773
1782
  deps.clearPresentationTimers();
1774
1783
  deps.setPresentationSlideIndex(nextSlideIndex);
1775
1784
  deps.onSetActiveSlideIndex(nextSlideIndex);
1776
1785
  deps.setPresentationSlideVisible(true);
1777
1786
  deps.seedSlideAnimations(nextSlideIndex, { completed: deps.seedCompleted });
1778
- const soundAction = chunkLY5535CF_js.resolveTransitionSoundAction(transition);
1787
+ const soundAction = chunk3WK4AE52_js.resolveTransitionSoundAction(transition);
1779
1788
  if (soundAction.kind === "play" && deps.onPlayActionSound) {
1780
1789
  deps.onPlayActionSound(soundAction.soundPath, { loop: soundAction.loop });
1781
1790
  } else if (soundAction.kind === "stop" && deps.onStopActionSound) {
@@ -1832,13 +1841,14 @@ function useSlideNavigation(input) {
1832
1841
  onOpenFile,
1833
1842
  onOpenPresentation,
1834
1843
  onPlayMedia,
1835
- onOleVerb
1844
+ onOleVerb,
1845
+ onRunProgram
1836
1846
  } = input;
1837
1847
  const movePresentationSlideRef = react.useRef(() => {
1838
1848
  });
1839
1849
  const scheduleAutoAdvanceForSlide = react.useCallback(
1840
1850
  (slideIndex) => {
1841
- const delayMs = chunkLY5535CF_js.resolveAutoAdvanceDelayMs(slides[slideIndex], { useTimings });
1851
+ const delayMs = chunk3WK4AE52_js.resolveAutoAdvanceDelayMs(slides[slideIndex], { useTimings });
1842
1852
  if (delayMs === void 0) {
1843
1853
  return;
1844
1854
  }
@@ -1861,7 +1871,7 @@ function useSlideNavigation(input) {
1861
1871
  if (availableSlideIndexes.length === 0) {
1862
1872
  return;
1863
1873
  }
1864
- const pastLastSlide = direction === 1 && !chunkLY5535CF_js.hasShowSlideAfter(presentationSlideIndex, availableSlideIndexes);
1874
+ const pastLastSlide = direction === 1 && !chunk3WK4AE52_js.hasShowSlideAfter(presentationSlideIndex, availableSlideIndexes);
1865
1875
  if (rehearsing && pastLastSlide) {
1866
1876
  recordCurrentSlideTime(presentationSlideIndex);
1867
1877
  try {
@@ -1879,9 +1889,9 @@ function useSlideNavigation(input) {
1879
1889
  onAdvancePastLastSlide();
1880
1890
  return;
1881
1891
  }
1882
- const nextSlideIndex = direction === 1 ? chunkLY5535CF_js.nextShowSlideIndex(presentationSlideIndex, availableSlideIndexes, {
1892
+ const nextSlideIndex = direction === 1 ? chunk3WK4AE52_js.nextShowSlideIndex(presentationSlideIndex, availableSlideIndexes, {
1883
1893
  loop: Boolean(loopContinuously) && !rehearsing
1884
- }) : chunkLY5535CF_js.previousShowSlideIndex(presentationSlideIndex, availableSlideIndexes);
1894
+ }) : chunk3WK4AE52_js.previousShowSlideIndex(presentationSlideIndex, availableSlideIndexes);
1885
1895
  if (nextSlideIndex === void 0 || nextSlideIndex === presentationSlideIndex) {
1886
1896
  return;
1887
1897
  }
@@ -1998,7 +2008,8 @@ function useSlideNavigation(input) {
1998
2008
  onOpenFile,
1999
2009
  onOpenPresentation,
2000
2010
  onPlayMedia,
2001
- onOleVerb
2011
+ onOleVerb,
2012
+ onRunProgram
2002
2013
  });
2003
2014
  },
2004
2015
  [
@@ -2012,7 +2023,8 @@ function useSlideNavigation(input) {
2012
2023
  onOpenFile,
2013
2024
  onOpenPresentation,
2014
2025
  onPlayMedia,
2015
- onOleVerb
2026
+ onOleVerb,
2027
+ onRunProgram
2016
2028
  ]
2017
2029
  );
2018
2030
  return {
@@ -2060,7 +2072,7 @@ function createCustomShowRunner(deps) {
2060
2072
  return;
2061
2073
  }
2062
2074
  origin = returnAfter ? { showId: deps.getActiveCustomShowId(), slideIndex: deps.getPresentationSlideIndex() } : null;
2063
- const first = chunkLY5535CF_js.firstShowSlideIndex(chunkLY5535CF_js.resolveShowSlideIndexes(deps.getSlides(), target));
2075
+ const first = chunk3WK4AE52_js.firstShowSlideIndex(chunk3WK4AE52_js.resolveShowSlideIndexes(deps.getSlides(), target));
2064
2076
  deps.setActiveCustomShowId(customShowId);
2065
2077
  if (first !== void 0) {
2066
2078
  deps.navigateToSlide(first);
@@ -2104,7 +2116,8 @@ function usePresentationActionExtensions(input) {
2104
2116
  containerRef,
2105
2117
  endWithBlackSlide,
2106
2118
  onSetMode,
2107
- setEndOfShowVisible
2119
+ setEndOfShowVisible,
2120
+ onAddRunProgramNotice
2108
2121
  } = input;
2109
2122
  const navigateToSlideRef = react.useRef(null);
2110
2123
  const navigateToSlideViaRef = react.useCallback((index) => {
@@ -2137,27 +2150,33 @@ function usePresentationActionExtensions(input) {
2137
2150
  }
2138
2151
  }, [navigateToSlideViaRef]);
2139
2152
  const onOpenFile = react.useCallback((target) => {
2140
- chunkLY5535CF_js.safeOpenUrl(target);
2153
+ chunk3WK4AE52_js.safeOpenUrl(target);
2141
2154
  }, []);
2142
2155
  const onOpenPresentation = react.useCallback((target) => {
2143
- chunkLY5535CF_js.safeOpenUrl(target);
2156
+ chunk3WK4AE52_js.safeOpenUrl(target);
2144
2157
  }, []);
2158
+ const onRunProgram = react.useCallback(
2159
+ (target) => {
2160
+ onAddRunProgramNotice?.(chunk3WK4AE52_js.buildRunProgramNotice(target));
2161
+ },
2162
+ [onAddRunProgramNotice]
2163
+ );
2145
2164
  const onPlayMedia = react.useCallback(
2146
2165
  (elementId) => {
2147
- chunkLY5535CF_js.toggleStageElementMedia(containerRef.current, elementId);
2166
+ chunk3WK4AE52_js.toggleStageElementMedia(containerRef.current, elementId);
2148
2167
  },
2149
2168
  [containerRef]
2150
2169
  );
2151
2170
  const onOleVerb = react.useCallback(
2152
2171
  (verb, elementId) => {
2153
- const target = chunkLY5535CF_js.resolveOleVerbTarget(slides[presentationSlideIndex], elementId, verb);
2172
+ const target = chunk3WK4AE52_js.resolveOleVerbTarget(slides[presentationSlideIndex], elementId, verb);
2154
2173
  if (!target) {
2155
2174
  return;
2156
2175
  }
2157
2176
  if (target.action === "download") {
2158
- chunkLY5535CF_js.downloadDataUrl(target.url, target.fileName ?? "download");
2177
+ chunk3WK4AE52_js.downloadDataUrl(target.url, target.fileName ?? "download");
2159
2178
  } else {
2160
- chunkLY5535CF_js.openUrlInNewTab(target.url);
2179
+ chunk3WK4AE52_js.openUrlInNewTab(target.url);
2161
2180
  }
2162
2181
  },
2163
2182
  [slides, presentationSlideIndex]
@@ -2182,27 +2201,28 @@ function usePresentationActionExtensions(input) {
2182
2201
  onOpenPresentation,
2183
2202
  onPlayMedia,
2184
2203
  onOleVerb,
2204
+ onRunProgram,
2185
2205
  handleAdvancePastLastSlide,
2186
2206
  bindNavigateToSlide
2187
2207
  };
2188
2208
  }
2189
2209
  function usePresenterConsole(slideIndex, active) {
2190
- const timerRef = react.useRef(chunkLY5535CF_js.createPresenterTimer());
2191
- const [snapshot, setSnapshot] = react.useState(() => chunkLY5535CF_js.createInitialPresentationSnapshot(slideIndex));
2210
+ const timerRef = react.useRef(chunk3WK4AE52_js.createPresenterTimer());
2211
+ const [snapshot, setSnapshot] = react.useState(() => chunk3WK4AE52_js.createInitialPresentationSnapshot(slideIndex));
2192
2212
  const patch = react.useCallback((value) => {
2193
- setSnapshot((current) => chunkLY5535CF_js.mergePresentationSnapshot(current, value));
2213
+ setSnapshot((current) => chunk3WK4AE52_js.mergePresentationSnapshot(current, value));
2194
2214
  }, []);
2195
2215
  react.useEffect(() => patch({ slideIndex }), [patch, slideIndex]);
2196
2216
  react.useEffect(() => {
2197
2217
  if (!active) {
2198
2218
  return;
2199
2219
  }
2200
- timerRef.current = chunkLY5535CF_js.resetPresenterTimer();
2220
+ timerRef.current = chunk3WK4AE52_js.resetPresenterTimer();
2201
2221
  patch({ paused: false, elapsedMs: 0 });
2202
2222
  const timer = window.setInterval(() => {
2203
2223
  patch({
2204
2224
  paused: timerRef.current.paused,
2205
- elapsedMs: chunkLY5535CF_js.presenterElapsed(timerRef.current)
2225
+ elapsedMs: chunk3WK4AE52_js.presenterElapsed(timerRef.current)
2206
2226
  });
2207
2227
  }, 1e3);
2208
2228
  return () => window.clearInterval(timer);
@@ -2212,19 +2232,19 @@ function usePresenterConsole(slideIndex, active) {
2212
2232
  applyAudienceSnapshot: setSnapshot,
2213
2233
  setBlackout: (blackout) => patch({ blackout }),
2214
2234
  toggleTimer: () => {
2215
- timerRef.current = chunkLY5535CF_js.togglePresenterTimer(timerRef.current);
2235
+ timerRef.current = chunk3WK4AE52_js.togglePresenterTimer(timerRef.current);
2216
2236
  patch({
2217
2237
  paused: timerRef.current.paused,
2218
- elapsedMs: chunkLY5535CF_js.presenterElapsed(timerRef.current)
2238
+ elapsedMs: chunk3WK4AE52_js.presenterElapsed(timerRef.current)
2219
2239
  });
2220
2240
  },
2221
2241
  resetTimer: () => {
2222
- timerRef.current = chunkLY5535CF_js.resetPresenterTimer();
2242
+ timerRef.current = chunk3WK4AE52_js.resetPresenterTimer();
2223
2243
  patch({ paused: false, elapsedMs: 0 });
2224
2244
  },
2225
2245
  stepZoom: (direction) => setSnapshot(
2226
- (current) => chunkLY5535CF_js.mergePresentationSnapshot(current, {
2227
- zoom: chunkLY5535CF_js.stepPresenterZoom(
2246
+ (current) => chunk3WK4AE52_js.mergePresentationSnapshot(current, {
2247
+ zoom: chunk3WK4AE52_js.stepPresenterZoom(
2228
2248
  current.zoom ?? { scale: 1, originX: 0.5, originY: 0.5 },
2229
2249
  direction
2230
2250
  )
@@ -2246,6 +2266,7 @@ function usePresentationMode(input) {
2246
2266
  visibleSlideIndexes,
2247
2267
  canvasSize,
2248
2268
  themeColorMap,
2269
+ pixelateMosaicAnimation,
2249
2270
  activeSlideIndex,
2250
2271
  containerRef,
2251
2272
  content,
@@ -2265,7 +2286,8 @@ function usePresentationMode(input) {
2265
2286
  endWithBlackSlide = true,
2266
2287
  customShows = [],
2267
2288
  activeCustomShowId = null,
2268
- onSetActiveCustomShowId
2289
+ onSetActiveCustomShowId,
2290
+ onAddRunProgramNotice
2269
2291
  } = input;
2270
2292
  const [presentationSlideIndex, setPresentationSlideIndex] = react.useState(0);
2271
2293
  const [presentationSlideVisible, setPresentationSlideVisible] = react.useState(true);
@@ -2277,7 +2299,7 @@ function usePresentationMode(input) {
2277
2299
  const [allSlidesOpen, setAllSlidesOpen] = react.useState(false);
2278
2300
  const [endOfShowVisible, setEndOfShowVisible] = react.useState(false);
2279
2301
  const [presentationStartTime, setPresentationStartTime] = react.useState(null);
2280
- const showGuard = react.useMemo(() => chunkLY5535CF_js.createPresenterShowGuard(), []);
2302
+ const showGuard = react.useMemo(() => chunk3WK4AE52_js.createPresenterShowGuard(), []);
2281
2303
  const {
2282
2304
  presentationAnimations,
2283
2305
  presentationElementStates,
@@ -2299,7 +2321,8 @@ function usePresentationMode(input) {
2299
2321
  onPlayActionSound,
2300
2322
  showWithAnimation,
2301
2323
  canvasSize,
2302
- themeColorMap
2324
+ themeColorMap,
2325
+ pixelateMosaicAnimation
2303
2326
  });
2304
2327
  const {
2305
2328
  rehearsing,
@@ -2335,7 +2358,8 @@ function usePresentationMode(input) {
2335
2358
  containerRef,
2336
2359
  endWithBlackSlide,
2337
2360
  onSetMode,
2338
- setEndOfShowVisible
2361
+ setEndOfShowVisible,
2362
+ onAddRunProgramNotice
2339
2363
  });
2340
2364
  const {
2341
2365
  movePresentationSlide: moveNavigationSlide,
@@ -2369,12 +2393,13 @@ function usePresentationMode(input) {
2369
2393
  onOpenFile: actionExtensions.onOpenFile,
2370
2394
  onOpenPresentation: actionExtensions.onOpenPresentation,
2371
2395
  onPlayMedia: actionExtensions.onPlayMedia,
2372
- onOleVerb: actionExtensions.onOleVerb
2396
+ onOleVerb: actionExtensions.onOleVerb,
2397
+ onRunProgram: actionExtensions.onRunProgram
2373
2398
  });
2374
2399
  actionExtensions.bindNavigateToSlide(navigateToSlide);
2375
2400
  const movePresentationSlide = react.useCallback(
2376
2401
  (direction, trigger = "explicit") => {
2377
- if (!chunkLY5535CF_js.acceptsPresentationInput()) {
2402
+ if (!chunk3WK4AE52_js.acceptsPresentationInput()) {
2378
2403
  return;
2379
2404
  }
2380
2405
  if (endOfShowVisible) {
@@ -2443,7 +2468,7 @@ function usePresentationMode(input) {
2443
2468
  onSetMode("present");
2444
2469
  }, [containerRef, onSetMode, setRehearsing]);
2445
2470
  const enterPresentModeFromBeginning = react.useCallback(() => {
2446
- const first = chunkLY5535CF_js.firstShowSlideIndex(visibleSlideIndexes);
2471
+ const first = chunk3WK4AE52_js.firstShowSlideIndex(visibleSlideIndexes);
2447
2472
  if (first !== void 0) {
2448
2473
  onSetActiveSlideIndex(first);
2449
2474
  }
@@ -2523,7 +2548,7 @@ function usePresentationMode(input) {
2523
2548
  if (mode !== "present") {
2524
2549
  return;
2525
2550
  }
2526
- return chunkLY5535CF_js.attachPresentationVisibilityPause({
2551
+ return chunk3WK4AE52_js.attachPresentationVisibilityPause({
2527
2552
  root: containerRef.current ?? void 0,
2528
2553
  onHidden: () => clearPresentationTimersRef.current(),
2529
2554
  onVisible: () => scheduleAutoAdvanceRef.current(presentationSlideIndexRef.current)
@@ -2531,7 +2556,7 @@ function usePresentationMode(input) {
2531
2556
  }, [mode, containerRef]);
2532
2557
  react.useLayoutEffect(() => {
2533
2558
  if (mode === "present") {
2534
- const idx = chunkLY5535CF_js.presentationEntrySlideIndex(
2559
+ const idx = chunk3WK4AE52_js.presentationEntrySlideIndex(
2535
2560
  activeSlideIndexRef.current,
2536
2561
  visibleSlideIndexesRef.current
2537
2562
  );
@@ -2610,11 +2635,11 @@ function usePresentationMode(input) {
2610
2635
  return void 0;
2611
2636
  }
2612
2637
  const incoming = slides[transitionOverlay.incomingSlideIndex];
2613
- return chunkLY5535CF_js.buildMorphTransitionPlan(
2638
+ return chunk3WK4AE52_js.buildMorphTransitionPlan(
2614
2639
  slides[transitionOverlay.outgoingSlideIndex],
2615
2640
  incoming,
2616
2641
  transitionOverlay.durationMs,
2617
- chunkLY5535CF_js.morphOptionToMode(transitionOverlay.transition.morphOption),
2642
+ chunk3WK4AE52_js.morphOptionToMode(transitionOverlay.transition.morphOption),
2618
2643
  // `PresentationStage` stacks the incoming slide's elements above its
2619
2644
  // template shapes (`zIndex = templateElements.length + index`), so a
2620
2645
  // z-index journey has to start counting where the stage does.
@@ -2639,7 +2664,7 @@ function usePresentationMode(input) {
2639
2664
  if (!morphPlan) {
2640
2665
  return presentationKeyframesCss;
2641
2666
  }
2642
- const imageRules = chunkLY5535CF_js.buildMorphAnimationRules(morphPlan, "", "incoming", "image");
2667
+ const imageRules = chunk3WK4AE52_js.buildMorphAnimationRules(morphPlan, "", "incoming", "image");
2643
2668
  return `${presentationKeyframesCss ?? ""}
2644
2669
  ${morphPlan.keyframesCss}
2645
2670
  ${imageRules}`;
@@ -2936,7 +2961,7 @@ function useFindReplace({
2936
2961
  const [findResults, setFindResults] = react.useState([]);
2937
2962
  const [findResultIndex, setFindResultIndex] = react.useState(-1);
2938
2963
  const performFind = react.useCallback(() => {
2939
- const results = chunkLY5535CF_js.findInSlides(slides, findQuery, { matchCase: findMatchCase });
2964
+ const results = chunk3WK4AE52_js.findInSlides(slides, findQuery, { matchCase: findMatchCase });
2940
2965
  if (!findQuery) {
2941
2966
  setFindResults([]);
2942
2967
  setFindResultIndex(-1);
@@ -2970,7 +2995,7 @@ function useFindReplace({
2970
2995
  return;
2971
2996
  }
2972
2997
  onUpdateSlides(
2973
- (prevSlides) => chunkLY5535CF_js.applyFindReplacements(prevSlides, toReplace, replaceQuery).slides
2998
+ (prevSlides) => chunk3WK4AE52_js.applyFindReplacements(prevSlides, toReplace, replaceQuery).slides
2974
2999
  );
2975
3000
  onMarkDirty();
2976
3001
  },
@@ -2992,9 +3017,9 @@ function useFindReplace({
2992
3017
  }, [findResults, applyReplacements, performFind]);
2993
3018
  react.useEffect(() => {
2994
3019
  const handler = (event) => {
2995
- const { action } = chunkLY5535CF_js.mapEditorKey(event, {
3020
+ const { action } = chunk3WK4AE52_js.mapEditorKey(event, {
2996
3021
  canEdit: mode === "edit",
2997
- isTextInputTarget: chunkLY5535CF_js.isEditorTextInputTarget(event.target)
3022
+ isTextInputTarget: chunk3WK4AE52_js.isEditorTextInputTarget(event.target)
2998
3023
  });
2999
3024
  if (action !== "find") {
3000
3025
  return;
@@ -3105,7 +3130,7 @@ function addCommentToSlide(slides, slideIndex, text, authorName, elementId, ment
3105
3130
  if (!slide) {
3106
3131
  return { slides, didAdd: false };
3107
3132
  }
3108
- const next = chunkLY5535CF_js.addCommentToList(
3133
+ const next = chunk3WK4AE52_js.addCommentToList(
3109
3134
  slide.comments || [],
3110
3135
  text,
3111
3136
  authorName,
@@ -3126,7 +3151,7 @@ function removeCommentFromSlide(slides, slideIndex, commentId) {
3126
3151
  if (!slide) {
3127
3152
  return { slides, didDelete: false };
3128
3153
  }
3129
- const next = chunkLY5535CF_js.removeCommentFromList(slide.comments || [], commentId);
3154
+ const next = chunk3WK4AE52_js.removeCommentFromList(slide.comments || [], commentId);
3130
3155
  if (!next) {
3131
3156
  return { slides, didDelete: false };
3132
3157
  }
@@ -3137,7 +3162,7 @@ function editCommentInSlide(slides, slideIndex, commentId, newText) {
3137
3162
  if (!slide) {
3138
3163
  return { slides, didUpdate: false };
3139
3164
  }
3140
- const next = chunkLY5535CF_js.editCommentInList(slide.comments || [], commentId, newText);
3165
+ const next = chunk3WK4AE52_js.editCommentInList(slide.comments || [], commentId, newText);
3141
3166
  if (!next) {
3142
3167
  return { slides, didUpdate: false };
3143
3168
  }
@@ -3148,7 +3173,7 @@ function toggleResolvedInSlide(slides, slideIndex, commentId) {
3148
3173
  if (!slide) {
3149
3174
  return { slides, didUpdate: false };
3150
3175
  }
3151
- const next = chunkLY5535CF_js.toggleCommentResolvedInList(slide.comments || [], commentId);
3176
+ const next = chunk3WK4AE52_js.toggleCommentResolvedInList(slide.comments || [], commentId);
3152
3177
  if (!next) {
3153
3178
  return { slides, didUpdate: false };
3154
3179
  }
@@ -3159,7 +3184,7 @@ function addReplyToSlide(slides, slideIndex, parentId, text, authorName, mention
3159
3184
  if (!slide) {
3160
3185
  return { slides, didAdd: false };
3161
3186
  }
3162
- const next = chunkLY5535CF_js.replyToCommentInList(slide.comments || [], parentId, text, authorName);
3187
+ const next = chunk3WK4AE52_js.replyToCommentInList(slide.comments || [], parentId, text, authorName);
3163
3188
  if (!next) {
3164
3189
  return { slides, didAdd: false };
3165
3190
  }
@@ -3546,7 +3571,7 @@ function useDerivedElementState(input) {
3546
3571
  return [];
3547
3572
  }
3548
3573
  return [
3549
- ...chunkLY5535CF_js.visibleTemplateElements(activeSlide, templateElementsBySlideId[activeSlide.id] ?? [])
3574
+ ...chunk3WK4AE52_js.visibleTemplateElements(activeSlide, templateElementsBySlideId[activeSlide.id] ?? [])
3550
3575
  ];
3551
3576
  }, [activeSlide, templateElementsBySlideId]);
3552
3577
  const activeMaster = slideMasters[activeMasterIndex];
@@ -3613,7 +3638,7 @@ function useViewerCoreState(_input) {
3613
3638
  const marqueeStateRef = react.useRef(null);
3614
3639
  const isDrawingRef = react.useRef(false);
3615
3640
  const justInteractedRef = react.useRef(false);
3616
- const livePatcher = react.useMemo(() => chunkLY5535CF_js.createCollaborationLivePatcher(), []);
3641
+ const livePatcher = react.useMemo(() => chunk3WK4AE52_js.createCollaborationLivePatcher(), []);
3617
3642
  react.useEffect(() => () => livePatcher.dispose(), [livePatcher]);
3618
3643
  const slidesRef = react.useRef([]);
3619
3644
  const [mode, setMode] = react.useState("edit");
@@ -3622,8 +3647,8 @@ function useViewerCoreState(_input) {
3622
3647
  const [slides, setSlides] = react.useState([]);
3623
3648
  const [templateElementsBySlideId, setTemplateElementsBySlideId] = react.useState({});
3624
3649
  const [canvasSize, setCanvasSize] = react.useState({
3625
- width: chunkIK25LY4C_js.DEFAULT_CANVAS_WIDTH,
3626
- height: chunkIK25LY4C_js.DEFAULT_CANVAS_HEIGHT
3650
+ width: chunkO27KNZLJ_js.DEFAULT_CANVAS_WIDTH,
3651
+ height: chunkO27KNZLJ_js.DEFAULT_CANVAS_HEIGHT
3627
3652
  });
3628
3653
  const [slideSizeEmu, setSlideSizeEmu] = react.useState();
3629
3654
  const [activeSlideIndex, setActiveSlideIndex] = react.useState(0);
@@ -3644,7 +3669,7 @@ function useViewerCoreState(_input) {
3644
3669
  const resolved = typeof value === "function" ? value(inlineEditingTextRef.current) : value;
3645
3670
  inlineEditingTextRef.current = resolved;
3646
3671
  setInlineEditingTextBase(value);
3647
- chunkLY5535CF_js.publishLiveInlineText(
3672
+ chunk3WK4AE52_js.publishLiveInlineText(
3648
3673
  livePatcher,
3649
3674
  slidesRef.current[activeSlideIndexRef.current],
3650
3675
  inlineEditingElementIdRef.current,
@@ -4007,7 +4032,7 @@ function useLoadContent({
4007
4032
  );
4008
4033
  }
4009
4034
  const previousHandler = handlerRef.current;
4010
- const handler = new chunkLY5535CF_js.PptxHandler();
4035
+ const handler = new chunk3WK4AE52_js.PptxHandler();
4011
4036
  const parsed = await handler.load(buffer, { allowExternalImages });
4012
4037
  if (cancelled || token !== renderTokenRef.current) {
4013
4038
  handler.dispose();
@@ -4019,7 +4044,7 @@ function useLoadContent({
4019
4044
  handlerRef.current = null;
4020
4045
  const mediaElements = [];
4021
4046
  for (const slide of parsed.slides) {
4022
- chunkLY5535CF_js.collectMediaElements(slide.elements, mediaElements);
4047
+ chunk3WK4AE52_js.collectMediaElements(slide.elements, mediaElements);
4023
4048
  }
4024
4049
  for (const url of mediaDataUrls.values()) {
4025
4050
  if (url.startsWith("blob:")) {
@@ -4029,7 +4054,7 @@ function useLoadContent({
4029
4054
  mediaDataUrls.clear();
4030
4055
  await Promise.all(
4031
4056
  mediaElements.map(async (mediaElement) => {
4032
- const resolved = await chunkLY5535CF_js.resolveMediaElementSource(mediaElement, handler);
4057
+ const resolved = await chunk3WK4AE52_js.resolveMediaElementSource(mediaElement, handler);
4033
4058
  if (resolved.missing || !resolved.mediaPath || !resolved.url) {
4034
4059
  mediaElement.mediaMissing = true;
4035
4060
  return;
@@ -4040,7 +4065,7 @@ function useLoadContent({
4040
4065
  }
4041
4066
  })
4042
4067
  );
4043
- const { paths: imagePaths, refs: imageRefs } = chunkLY5535CF_js.collectImagePaths(parsed.slides);
4068
+ const { paths: imagePaths, refs: imageRefs } = chunk3WK4AE52_js.collectImagePaths(parsed.slides);
4044
4069
  let nextSlides = parsed.slides;
4045
4070
  if (imagePaths.size > 0) {
4046
4071
  const resolvedMap = /* @__PURE__ */ new Map();
@@ -4056,25 +4081,25 @@ function useLoadContent({
4056
4081
  })
4057
4082
  );
4058
4083
  nextSlides = parsed.slides.map((s) => {
4059
- const newElements = chunkLY5535CF_js.applyImagePathPatches(s.elements, resolvedMap, imageRefs);
4084
+ const newElements = chunk3WK4AE52_js.applyImagePathPatches(s.elements, resolvedMap, imageRefs);
4060
4085
  return newElements === s.elements ? s : { ...s, elements: newElements };
4061
4086
  });
4062
4087
  }
4063
- nextSlides = await chunkLY5535CF_js.resolveTableCellImageUrls(
4088
+ nextSlides = await chunk3WK4AE52_js.resolveTableCellImageUrls(
4064
4089
  nextSlides,
4065
4090
  (path) => handler.getImageData(path)
4066
4091
  );
4067
- const nextTableStyleMap = await chunkLY5535CF_js.resolveTableStyleImageUrls(
4092
+ const nextTableStyleMap = await chunk3WK4AE52_js.resolveTableStyleImageUrls(
4068
4093
  parsed.tableStyleMap,
4069
4094
  (path) => handler.getImageData(path)
4070
4095
  );
4071
4096
  handlerRef.current = handler;
4072
- const partition = chunkLY5535CF_js.partitionTemplateElements(nextSlides);
4097
+ const partition = chunk3WK4AE52_js.partitionTemplateElements(nextSlides);
4073
4098
  setSlides(partition.slides);
4074
4099
  setTemplateElementsBySlideId(partition.templateElementsBySlideId);
4075
4100
  setCanvasSize({
4076
- width: parsed.width ?? chunkIK25LY4C_js.DEFAULT_CANVAS_WIDTH,
4077
- height: parsed.height ?? chunkIK25LY4C_js.DEFAULT_CANVAS_HEIGHT
4101
+ width: parsed.width ?? chunkO27KNZLJ_js.DEFAULT_CANVAS_WIDTH,
4102
+ height: parsed.height ?? chunkO27KNZLJ_js.DEFAULT_CANVAS_HEIGHT
4078
4103
  });
4079
4104
  setSlideSizeEmu(
4080
4105
  typeof parsed.widthEmu === "number" && typeof parsed.heightEmu === "number" && parsed.widthEmu > 0 && parsed.heightEmu > 0 ? {
@@ -4087,7 +4112,7 @@ function useLoadContent({
4087
4112
  setLayoutOptions(parsed.layoutOptions ?? []);
4088
4113
  setSlideMasters(parsed.slideMasters ?? []);
4089
4114
  setModernCommentAuthors(parsed.modernCommentAuthors ?? []);
4090
- setRecentColors(chunkLY5535CF_js.seedRecentColors({ mruColors: parsed.mruColors }));
4115
+ setRecentColors(chunk3WK4AE52_js.seedRecentColors({ mruColors: parsed.mruColors }));
4091
4116
  setTheme(parsed.theme);
4092
4117
  setTableStyleMap(nextTableStyleMap);
4093
4118
  setTableStylesDefaultId(parsed.tableStylesDefaultId);
@@ -4095,7 +4120,7 @@ function useLoadContent({
4095
4120
  setThemeOptions(parsed.themeOptions ?? []);
4096
4121
  setCustomShows(parsed.customShows ?? []);
4097
4122
  setActiveCustomShowId(
4098
- chunkLY5535CF_js.resolveAuthoredCustomShowId(parsed.presentationProperties, parsed.customShows) ?? null
4123
+ chunk3WK4AE52_js.resolveAuthoredCustomShowId(parsed.presentationProperties, parsed.customShows) ?? null
4099
4124
  );
4100
4125
  setSections(parsed.sections ?? []);
4101
4126
  setPresentationProperties(parsed.presentationProperties ?? {});
@@ -4118,11 +4143,11 @@ function useLoadContent({
4118
4143
  setHasMacros(parsed.hasMacros === true);
4119
4144
  setHasDigitalSignatures(parsed.hasDigitalSignatures === true);
4120
4145
  setDigitalSignatureCount(parsed.digitalSignatureCount ?? 0);
4121
- setGuides(chunkLY5535CF_js.buildInitialGuides(parsed.presentationGuides, parsed.slides[0]?.guides));
4122
- setReadOnlyRecommendation(chunkLY5535CF_js.readOnlyRecommendation(parsed));
4146
+ setGuides(chunk3WK4AE52_js.buildInitialGuides(parsed.presentationGuides, parsed.slides[0]?.guides));
4147
+ setReadOnlyRecommendation(chunk3WK4AE52_js.readOnlyRecommendation(parsed));
4123
4148
  setModifyVerifier(parsed.modifyVerifier ?? void 0);
4124
4149
  setCompatToasts(
4125
- chunkLY5535CF_js.compatibilityWarningToasts([
4150
+ chunk3WK4AE52_js.compatibilityWarningToasts([
4126
4151
  ...parsed.warnings ?? [],
4127
4152
  ...parsed.slides.flatMap((slide) => slide.warnings ?? [])
4128
4153
  ])
@@ -4134,7 +4159,7 @@ function useLoadContent({
4134
4159
  onContentApplied?.();
4135
4160
  } catch (err) {
4136
4161
  if (!cancelled && token === renderTokenRef.current) {
4137
- if (err instanceof chunkLY5535CF_js.EncryptedFileError) {
4162
+ if (err instanceof chunk3WK4AE52_js.EncryptedFileError) {
4138
4163
  setIsEncrypted(true);
4139
4164
  } else {
4140
4165
  console.error("[pptx] Failed to load presentation content:", err);
@@ -4162,7 +4187,7 @@ function useLoadContent({
4162
4187
  }
4163
4188
  function useAutosave(input) {
4164
4189
  const { isDirty, filePath, serializeSlides, enabled = true, getChangeSources } = input;
4165
- const intervalMs = chunkLY5535CF_js.resolveAutosaveIntervalMs({
4190
+ const intervalMs = chunk3WK4AE52_js.resolveAutosaveIntervalMs({
4166
4191
  hostIntervalMs: input.intervalMs,
4167
4192
  optionsIntervalSeconds: input.intervalSeconds
4168
4193
  });
@@ -4193,7 +4218,7 @@ function useAutosave(input) {
4193
4218
  return;
4194
4219
  }
4195
4220
  const sources = changeSourcesRef.current?.() ?? [];
4196
- if (!chunkLY5535CF_js.shouldWriteAutosaveSnapshot({
4221
+ if (!chunk3WK4AE52_js.shouldWriteAutosaveSnapshot({
4197
4222
  filePath: path,
4198
4223
  isDirty: isDirtyRef.current,
4199
4224
  saving: isSavingRef.current,
@@ -4211,8 +4236,8 @@ function useAutosave(input) {
4211
4236
  isSavingRef.current = false;
4212
4237
  return;
4213
4238
  }
4214
- await chunkLY5535CF_js.saveAutosaveSnapshot(path, data);
4215
- lastSnapshotRef.current = chunkLY5535CF_js.autosaveSnapshotMark(path, sources);
4239
+ await chunk3WK4AE52_js.saveAutosaveSnapshot(path, data);
4240
+ lastSnapshotRef.current = chunk3WK4AE52_js.autosaveSnapshotMark(path, sources);
4216
4241
  setAutosaveStatus({ state: "saved", timestamp: Date.now() });
4217
4242
  } catch (err) {
4218
4243
  setAutosaveStatus({
@@ -4266,13 +4291,13 @@ function useElementOperations(input) {
4266
4291
  inlineEditingText
4267
4292
  } = input;
4268
4293
  const liveTextSegments = react.useCallback(() => {
4269
- if (!selectedElement || !chunkLY5535CF_js.hasTextProperties(selectedElement)) {
4294
+ if (!selectedElement || !chunk3WK4AE52_js.hasTextProperties(selectedElement)) {
4270
4295
  return void 0;
4271
4296
  }
4272
4297
  if (selectedElement.id !== inlineEditingElementId) {
4273
4298
  return selectedElement.textSegments;
4274
4299
  }
4275
- return chunkLY5535CF_js.remapTextToSegments(
4300
+ return chunk3WK4AE52_js.remapTextToSegments(
4276
4301
  inlineEditingText,
4277
4302
  selectedElement.textSegments,
4278
4303
  selectedElement.textStyle
@@ -4313,11 +4338,11 @@ function useElementOperations(input) {
4313
4338
  (elementId, updates) => {
4314
4339
  if (masterView?.target) {
4315
4340
  applyMasterViewWrite(
4316
- chunkLY5535CF_js.updateMasterViewElement(masterView, masterView.target, elementId, updates)
4341
+ chunk3WK4AE52_js.updateMasterViewElement(masterView, masterView.target, elementId, updates)
4317
4342
  );
4318
4343
  return;
4319
4344
  }
4320
- if (chunkLY5535CF_js.isTemplateElementId(elementId)) {
4345
+ if (chunk3WK4AE52_js.isTemplateElementId(elementId)) {
4321
4346
  const slideId = activeSlide?.id;
4322
4347
  if (slideId) {
4323
4348
  setTemplateElementsBySlideId((prev) => ({
@@ -4328,7 +4353,7 @@ function useElementOperations(input) {
4328
4353
  }));
4329
4354
  }
4330
4355
  } else {
4331
- setSlides((prev) => chunkLY5535CF_js.updateElement(prev, activeSlideIndex, elementId, updates));
4356
+ setSlides((prev) => chunk3WK4AE52_js.updateElement(prev, activeSlideIndex, elementId, updates));
4332
4357
  }
4333
4358
  history.markDirty();
4334
4359
  },
@@ -4353,7 +4378,7 @@ function useElementOperations(input) {
4353
4378
  );
4354
4379
  const updateSelectedShapeStyle = react.useCallback(
4355
4380
  (updates) => {
4356
- if (!selectedElement || !chunkLY5535CF_js.hasShapeProperties(selectedElement)) {
4381
+ if (!selectedElement || !chunk3WK4AE52_js.hasShapeProperties(selectedElement)) {
4357
4382
  return;
4358
4383
  }
4359
4384
  updateSelectedElement({
@@ -4364,19 +4389,19 @@ function useElementOperations(input) {
4364
4389
  );
4365
4390
  const updateSelectedTextStyle = react.useCallback(
4366
4391
  (updates) => {
4367
- if (!selectedElement || !chunkLY5535CF_js.hasTextProperties(selectedElement)) {
4392
+ if (!selectedElement || !chunk3WK4AE52_js.hasTextProperties(selectedElement)) {
4368
4393
  return;
4369
4394
  }
4370
4395
  const isLiveEditing = selectedElement.id === inlineEditingElementId;
4371
4396
  const currentSegments = liveTextSegments();
4372
- const inlineSel = chunkLY5535CF_js.getInlineEditorSelection(currentSegments);
4397
+ const inlineSel = chunk3WK4AE52_js.getInlineEditorSelection(currentSegments);
4373
4398
  if (inlineSel && currentSegments) {
4374
- const { newSegments: newSegments2, newSelection } = chunkLY5535CF_js.applyStyleToSelectedSegments(
4399
+ const { newSegments: newSegments2, newSelection } = chunk3WK4AE52_js.applyStyleToSelectedSegments(
4375
4400
  currentSegments,
4376
4401
  inlineSel,
4377
4402
  updates
4378
4403
  );
4379
- chunkLY5535CF_js.setPendingSelectionRestore(newSelection);
4404
+ chunk3WK4AE52_js.setPendingSelectionRestore(newSelection);
4380
4405
  updateSelectedElement({
4381
4406
  textSegments: newSegments2,
4382
4407
  ...isLiveEditing ? { text: inlineEditingText } : {}
@@ -4404,14 +4429,14 @@ function useElementOperations(input) {
4404
4429
  );
4405
4430
  const updateSelectedTextCase = react.useCallback(
4406
4431
  (mode) => {
4407
- if (!selectedElement || !chunkLY5535CF_js.hasTextProperties(selectedElement)) {
4432
+ if (!selectedElement || !chunk3WK4AE52_js.hasTextProperties(selectedElement)) {
4408
4433
  return;
4409
4434
  }
4410
4435
  const isLiveEditing = selectedElement.id === inlineEditingElementId;
4411
4436
  const currentSegments = liveTextSegments();
4412
- const inlineSel = chunkLY5535CF_js.getInlineEditorSelection(currentSegments);
4437
+ const inlineSel = chunk3WK4AE52_js.getInlineEditorSelection(currentSegments);
4413
4438
  if (inlineSel && currentSegments) {
4414
- const newSegments = chunkLY5535CF_js.applyCaseTransformToSegments(currentSegments, inlineSel, mode);
4439
+ const newSegments = chunk3WK4AE52_js.applyCaseTransformToSegments(currentSegments, inlineSel, mode);
4415
4440
  updateSelectedElement({
4416
4441
  textSegments: newSegments,
4417
4442
  ...isLiveEditing ? { text: inlineEditingText } : {}
@@ -4420,7 +4445,7 @@ function useElementOperations(input) {
4420
4445
  }
4421
4446
  const updates = {};
4422
4447
  if (currentSegments && currentSegments.length > 0) {
4423
- updates.textSegments = chunkLY5535CF_js.applyCaseTransformToSegments(
4448
+ updates.textSegments = chunk3WK4AE52_js.applyCaseTransformToSegments(
4424
4449
  currentSegments,
4425
4450
  null,
4426
4451
  mode
@@ -4428,7 +4453,7 @@ function useElementOperations(input) {
4428
4453
  }
4429
4454
  const baseText = isLiveEditing ? inlineEditingText : selectedElement.text;
4430
4455
  if (typeof baseText === "string") {
4431
- updates.text = chunkLY5535CF_js.transformTextCase(baseText, mode);
4456
+ updates.text = chunk3WK4AE52_js.transformTextCase(baseText, mode);
4432
4457
  }
4433
4458
  updateSelectedElement(updates);
4434
4459
  },
@@ -4447,15 +4472,15 @@ function useElementOperations(input) {
4447
4472
  [setSlides]
4448
4473
  );
4449
4474
  const masterViewTarget = masterView?.target ?? null;
4450
- const activeElements = masterViewTarget ? chunkLY5535CF_js.masterViewElements(masterView, masterViewTarget) : editTemplateMode ? templateElements : activeSlide?.elements ?? [];
4475
+ const activeElements = masterViewTarget ? chunk3WK4AE52_js.masterViewElements(masterView, masterViewTarget) : editTemplateMode ? templateElements : activeSlide?.elements ?? [];
4451
4476
  const updateActiveElements = react.useCallback(
4452
4477
  (updater) => {
4453
4478
  if (masterView?.target) {
4454
4479
  applyMasterViewWrite(
4455
- chunkLY5535CF_js.replaceMasterViewElements(
4480
+ chunk3WK4AE52_js.replaceMasterViewElements(
4456
4481
  masterView,
4457
4482
  masterView.target,
4458
- updater(chunkLY5535CF_js.masterViewElements(masterView, masterView.target))
4483
+ updater(chunk3WK4AE52_js.masterViewElements(masterView, masterView.target))
4459
4484
  )
4460
4485
  );
4461
4486
  return;
@@ -4508,7 +4533,7 @@ function useSectionOperations(input) {
4508
4533
  const { sections, setSections, slides, setSlides, markDirty } = input;
4509
4534
  const addSection2 = react.useCallback(
4510
4535
  (name, afterSlideIndex) => {
4511
- const result = chunkLY5535CF_js.addSection(sections, slides, name, afterSlideIndex);
4536
+ const result = chunk3WK4AE52_js.addSection(sections, slides, name, afterSlideIndex);
4512
4537
  setSlides(result.slides);
4513
4538
  setSections(result.sections);
4514
4539
  markDirty();
@@ -4517,7 +4542,7 @@ function useSectionOperations(input) {
4517
4542
  );
4518
4543
  const renameSection2 = react.useCallback(
4519
4544
  (sectionId, newName) => {
4520
- const result = chunkLY5535CF_js.renameSection(sections, slides, sectionId, newName);
4545
+ const result = chunk3WK4AE52_js.renameSection(sections, slides, sectionId, newName);
4521
4546
  setSections(result.sections);
4522
4547
  setSlides(result.slides);
4523
4548
  markDirty();
@@ -4526,7 +4551,7 @@ function useSectionOperations(input) {
4526
4551
  );
4527
4552
  const deleteSection2 = react.useCallback(
4528
4553
  (sectionId) => {
4529
- const result = chunkLY5535CF_js.deleteSection(sections, slides, sectionId);
4554
+ const result = chunk3WK4AE52_js.deleteSection(sections, slides, sectionId);
4530
4555
  setSections(result.sections);
4531
4556
  setSlides(result.slides);
4532
4557
  markDirty();
@@ -4535,21 +4560,21 @@ function useSectionOperations(input) {
4535
4560
  );
4536
4561
  const moveSectionUp2 = react.useCallback(
4537
4562
  (sectionId) => {
4538
- setSections(chunkLY5535CF_js.moveSectionUp(sections, sectionId));
4563
+ setSections(chunk3WK4AE52_js.moveSectionUp(sections, sectionId));
4539
4564
  markDirty();
4540
4565
  },
4541
4566
  [sections, setSections, markDirty]
4542
4567
  );
4543
4568
  const moveSectionDown2 = react.useCallback(
4544
4569
  (sectionId) => {
4545
- setSections(chunkLY5535CF_js.moveSectionDown(sections, sectionId));
4570
+ setSections(chunk3WK4AE52_js.moveSectionDown(sections, sectionId));
4546
4571
  markDirty();
4547
4572
  },
4548
4573
  [sections, setSections, markDirty]
4549
4574
  );
4550
4575
  const moveSlidesToSection2 = react.useCallback(
4551
4576
  (slideIndexes, targetSectionId) => {
4552
- const result = chunkLY5535CF_js.moveSlidesToSection(sections, slides, slideIndexes, targetSectionId);
4577
+ const result = chunk3WK4AE52_js.moveSlidesToSection(sections, slides, slideIndexes, targetSectionId);
4553
4578
  setSlides(result.slides);
4554
4579
  setSections(result.sections);
4555
4580
  markDirty();
@@ -4615,15 +4640,15 @@ function syncSelectionHandleOverlay(elementNode, elementId, geometry) {
4615
4640
  // src/viewer/hooks/pointer-move-handlers.ts
4616
4641
  function computeResizeGeometry(handle, startX, startY, startWidth, startHeight, dx, dy, snapToGrid, gridSpacingPx, lockAspect = false) {
4617
4642
  const startBox = { x: startX, y: startY, width: startWidth, height: startHeight };
4618
- let resized = chunkLY5535CF_js.applyResize(startBox, handle, dx, dy, 1, { minSize: chunkIK25LY4C_js.MIN_ELEMENT_SIZE });
4643
+ let resized = chunk3WK4AE52_js.applyResize(startBox, handle, dx, dy, 1, { minSize: chunkO27KNZLJ_js.MIN_ELEMENT_SIZE });
4619
4644
  if (lockAspect) {
4620
- resized = chunkLY5535CF_js.lockResizeAspect(resized, startBox, handle, chunkIK25LY4C_js.MIN_ELEMENT_SIZE);
4645
+ resized = chunk3WK4AE52_js.lockResizeAspect(resized, startBox, handle, chunkO27KNZLJ_js.MIN_ELEMENT_SIZE);
4621
4646
  }
4622
4647
  const box = { x: resized.x, y: resized.y, width: resized.width, height: resized.height };
4623
4648
  if (!snapToGrid) {
4624
4649
  return box;
4625
4650
  }
4626
- return chunkLY5535CF_js.snapBoxToGrid(box, handle, gridSpacingPx, chunkIK25LY4C_js.MIN_ELEMENT_SIZE);
4651
+ return chunk3WK4AE52_js.snapBoxToGrid(box, handle, gridSpacingPx, chunkO27KNZLJ_js.MIN_ELEMENT_SIZE);
4627
4652
  }
4628
4653
  function resolveLiveTarget(input) {
4629
4654
  const { livePatcher, editTemplateMode, activeSlide } = input;
@@ -4736,7 +4761,7 @@ function processDragMove(e, drag, editorScale, snapToGrid, snapToShape, gridSpac
4736
4761
  width: el.width,
4737
4762
  height: el.height
4738
4763
  }));
4739
- const snapResult = chunkLY5535CF_js.computeSnapToShape(
4764
+ const snapResult = chunk3WK4AE52_js.computeSnapToShape(
4740
4765
  targetX,
4741
4766
  targetY,
4742
4767
  primaryEl.width,
@@ -4778,7 +4803,7 @@ function processDragMove(e, drag, editorScale, snapToGrid, snapToShape, gridSpac
4778
4803
  if (live) {
4779
4804
  for (const id of Object.keys(drag.startPositionsById)) {
4780
4805
  const start = drag.startPositionsById[id];
4781
- chunkLY5535CF_js.publishLiveGeometry(live.patcher, live.slideId, id, {
4806
+ chunk3WK4AE52_js.publishLiveGeometry(live.patcher, live.slideId, id, {
4782
4807
  x: start.x + appliedDx,
4783
4808
  y: start.y + appliedDy
4784
4809
  });
@@ -4810,8 +4835,8 @@ function processResizeMove(e, rs, editorScale, snapToGrid, gridSpacingPx, live)
4810
4835
  rs.lastY = geo.y;
4811
4836
  rs.lastWidth = geo.width;
4812
4837
  rs.lastHeight = geo.height;
4813
- const width = Math.max(geo.width, chunkIK25LY4C_js.MIN_ELEMENT_SIZE);
4814
- const height = Math.max(geo.height, chunkIK25LY4C_js.MIN_ELEMENT_SIZE);
4838
+ const width = Math.max(geo.width, chunkO27KNZLJ_js.MIN_ELEMENT_SIZE);
4839
+ const height = Math.max(geo.height, chunkO27KNZLJ_js.MIN_ELEMENT_SIZE);
4815
4840
  if (rs.domEl) {
4816
4841
  rs.domEl.style.left = `${geo.x}px`;
4817
4842
  rs.domEl.style.top = `${geo.y}px`;
@@ -4820,7 +4845,7 @@ function processResizeMove(e, rs, editorScale, snapToGrid, gridSpacingPx, live)
4820
4845
  syncSelectionHandleOverlay(rs.domEl, rs.elementId, { x: geo.x, y: geo.y, width, height });
4821
4846
  }
4822
4847
  if (live) {
4823
- chunkLY5535CF_js.publishLiveGeometry(live.patcher, live.slideId, rs.elementId, {
4848
+ chunk3WK4AE52_js.publishLiveGeometry(live.patcher, live.slideId, rs.elementId, {
4824
4849
  x: geo.x,
4825
4850
  y: geo.y,
4826
4851
  width,
@@ -4831,7 +4856,7 @@ function processResizeMove(e, rs, editorScale, snapToGrid, gridSpacingPx, live)
4831
4856
  function processAdjustmentMove(e, adj, editorScale, updateElementById) {
4832
4857
  const dx = (e.clientX - adj.startClientX) / editorScale;
4833
4858
  const dy = (e.clientY - adj.startClientY) / editorScale;
4834
- const adjustments = chunkLY5535CF_js.getDraggedShapeAdjustments(adj, dx, dy);
4859
+ const adjustments = chunk3WK4AE52_js.getDraggedShapeAdjustments(adj, dx, dy);
4835
4860
  if (!adj.moved && Math.hypot(dx, dy) > 2) {
4836
4861
  adj.moved = true;
4837
4862
  }
@@ -4906,13 +4931,13 @@ function processPointerUp(input) {
4906
4931
  if (i !== activeSlideIndex) {
4907
4932
  return s;
4908
4933
  }
4909
- const rerouted = chunkLY5535CF_js.rerouteConnectorsForMovedElements(s.elements, movedIds);
4934
+ const rerouted = chunk3WK4AE52_js.rerouteConnectorsForMovedElements(s.elements, movedIds);
4910
4935
  if (rerouted.length === 0) {
4911
4936
  return s;
4912
4937
  }
4913
4938
  return {
4914
4939
  ...s,
4915
- elements: chunkLY5535CF_js.applyReroutedConnectors(s.elements, rerouted)
4940
+ elements: chunk3WK4AE52_js.applyReroutedConnectors(s.elements, rerouted)
4916
4941
  };
4917
4942
  })
4918
4943
  );
@@ -4937,9 +4962,9 @@ function processPointerUp(input) {
4937
4962
  }
4938
4963
  function commitMarquee(marquee, editTemplateMode, templateElements, activeSlide, applySelection, clearSelection) {
4939
4964
  const sourceElements = editTemplateMode ? templateElements : activeSlide?.elements ?? [];
4940
- const hitIds = chunkLY5535CF_js.computeMarqueeHitIds(marquee, sourceElements);
4965
+ const hitIds = chunk3WK4AE52_js.computeMarqueeHitIds(marquee, sourceElements);
4941
4966
  if (marquee.additive) {
4942
- const merged = chunkLY5535CF_js.mergeAdditiveSelection(marquee.baseSelectionIds, hitIds);
4967
+ const merged = chunk3WK4AE52_js.mergeAdditiveSelection(marquee.baseSelectionIds, hitIds);
4943
4968
  if (merged.length > 0) {
4944
4969
  applySelection(merged[0], merged);
4945
4970
  } else {
@@ -4962,8 +4987,8 @@ function commitDrag(drag, editTemplateMode, activeSlide, activeSlideIndex, setTe
4962
4987
  }
4963
4988
  return { ...el, x: start.x + dx, y: start.y + dy };
4964
4989
  });
4965
- const rerouted = chunkLY5535CF_js.rerouteConnectorsForMovedElements(movedElements, movedIds);
4966
- return chunkLY5535CF_js.applyReroutedConnectors(movedElements, rerouted);
4990
+ const rerouted = chunk3WK4AE52_js.rerouteConnectorsForMovedElements(movedElements, movedIds);
4991
+ return chunk3WK4AE52_js.applyReroutedConnectors(movedElements, rerouted);
4967
4992
  };
4968
4993
  if (editTemplateMode) {
4969
4994
  const slideId = activeSlide?.id;
@@ -5119,15 +5144,19 @@ function useCanvasInteractions(input) {
5119
5144
  return;
5120
5145
  }
5121
5146
  const el = elementLookup.get(editId);
5122
- if (el && chunkLY5535CF_js.hasTextProperties(el)) {
5147
+ if (el && chunk3WK4AE52_js.hasTextProperties(el)) {
5123
5148
  const committedText = transformCommittedText ? transformCommittedText(inlineEditingText) : inlineEditingText;
5124
- const newSegments = chunkLY5535CF_js.remapTextToSegments(committedText, el.textSegments, el.textStyle);
5149
+ const textPatch = chunk3WK4AE52_js.buildInlineTextCommitPatch(el, committedText);
5150
+ if (!textPatch) {
5151
+ setInlineEditingElementId(null);
5152
+ setInlineEditingText("");
5153
+ return;
5154
+ }
5125
5155
  const editorEl = document.querySelector("[data-inline-editor]");
5126
- const newHeight = chunkLY5535CF_js.resolveInlineEditAutoFitHeight(el.textStyle, el.height, editorEl);
5127
- const shrink = chunkLY5535CF_js.resolveInlineEditNormAutofitShrink(el.textStyle, el.height, editorEl);
5156
+ const newHeight = chunk3WK4AE52_js.resolveInlineEditAutoFitHeight(el.textStyle, el.height, editorEl);
5157
+ const shrink = chunk3WK4AE52_js.resolveInlineEditNormAutofitShrink(el.textStyle, el.height, editorEl);
5128
5158
  ops.updateElementById(editId, {
5129
- text: committedText,
5130
- textSegments: newSegments,
5159
+ ...textPatch,
5131
5160
  ...newHeight !== void 0 ? { height: newHeight } : {},
5132
5161
  ...shrink !== "unchanged" ? {
5133
5162
  textStyle: {
@@ -5143,7 +5172,7 @@ function useCanvasInteractions(input) {
5143
5172
  setInlineEditingText("");
5144
5173
  };
5145
5174
  const openEquationEditorForElement = (el) => {
5146
- if (!chunkLY5535CF_js.hasTextProperties(el)) {
5175
+ if (!chunk3WK4AE52_js.hasTextProperties(el)) {
5147
5176
  return false;
5148
5177
  }
5149
5178
  const eqSeg = el.textSegments?.find((seg) => seg.equationXml);
@@ -5173,7 +5202,7 @@ function useCanvasInteractions(input) {
5173
5202
  justInteractedRef.current = false;
5174
5203
  } else {
5175
5204
  const el = elementLookup.get(elementId);
5176
- if (el && chunkLY5535CF_js.hasTextProperties(el) && chunkLY5535CF_js.canInteractWithElement(el, "textEdit")) {
5205
+ if (el && chunk3WK4AE52_js.hasTextProperties(el) && chunk3WK4AE52_js.canInteractWithElement(el, "textEdit")) {
5177
5206
  if (!openEquationEditorForElement(el)) {
5178
5207
  setInlineEditingElementId(elementId);
5179
5208
  setInlineEditingText(el.text ?? "");
@@ -5192,7 +5221,7 @@ function useCanvasInteractions(input) {
5192
5221
  if (openEquationEditorForElement(el)) {
5193
5222
  return;
5194
5223
  }
5195
- if (chunkLY5535CF_js.hasTextProperties(el) && chunkLY5535CF_js.canInteractWithElement(el, "textEdit")) {
5224
+ if (chunk3WK4AE52_js.hasTextProperties(el) && chunk3WK4AE52_js.canInteractWithElement(el, "textEdit")) {
5196
5225
  setInlineEditingElementId(elementId);
5197
5226
  setInlineEditingText(el.text ?? "");
5198
5227
  }
@@ -5215,7 +5244,7 @@ function useCanvasInteractions(input) {
5215
5244
  justSelectedRef.current = false;
5216
5245
  }
5217
5246
  const ids = !wasSelected ? [elementId] : effectiveSelectedIds.length ? effectiveSelectedIds : [elementId];
5218
- const movableIds = chunkLY5535CF_js.filterInteractableIds(ids, (id) => elementLookup.get(id), "move");
5247
+ const movableIds = chunk3WK4AE52_js.filterInteractableIds(ids, (id) => elementLookup.get(id), "move");
5219
5248
  if (movableIds.length === 0) {
5220
5249
  return;
5221
5250
  }
@@ -5285,7 +5314,7 @@ function useCanvasInteractions(input) {
5285
5314
  const handleResizePointerDown = (elementId, e, handle) => {
5286
5315
  e.stopPropagation();
5287
5316
  const el = elementLookup.get(elementId);
5288
- if (!el || !chunkLY5535CF_js.canInteractWithElement(el, "resize")) {
5317
+ if (!el || !chunk3WK4AE52_js.canInteractWithElement(el, "resize")) {
5289
5318
  return;
5290
5319
  }
5291
5320
  resizeStateRef.current = {
@@ -5307,7 +5336,7 @@ function useCanvasInteractions(input) {
5307
5336
  };
5308
5337
  const handleRotate = (elementId, rotationDeg) => {
5309
5338
  const el = elementLookup.get(elementId);
5310
- if (!el || !chunkLY5535CF_js.canInteractWithElement(el, "rotate")) {
5339
+ if (!el || !chunk3WK4AE52_js.canInteractWithElement(el, "rotate")) {
5311
5340
  return;
5312
5341
  }
5313
5342
  ops.updateElementById(elementId, { rotation: rotationDeg });
@@ -5327,10 +5356,10 @@ function useCanvasInteractions(input) {
5327
5356
  const handleAdjustmentPointerDown = (elementId, e, descriptor) => {
5328
5357
  e.stopPropagation();
5329
5358
  const el = elementLookup.get(elementId);
5330
- if (!el || !chunkLY5535CF_js.canInteractWithElement(el, "adjustHandle")) {
5359
+ if (!el || !chunk3WK4AE52_js.canInteractWithElement(el, "adjustHandle")) {
5331
5360
  return;
5332
5361
  }
5333
- shapeAdjustmentDragStateRef.current = chunkLY5535CF_js.beginShapeAdjustment(
5362
+ shapeAdjustmentDragStateRef.current = chunk3WK4AE52_js.beginShapeAdjustment(
5334
5363
  el,
5335
5364
  descriptor,
5336
5365
  e.clientX,
@@ -5377,7 +5406,7 @@ function createFileHandlers(deps) {
5377
5406
  h = Math.round(h * scale);
5378
5407
  }
5379
5408
  addElement({
5380
- id: chunkLY5535CF_js.generateElementId(),
5409
+ id: chunk3WK4AE52_js.generateElementId(),
5381
5410
  type: "image",
5382
5411
  x: Math.round((canvasSize.width - w) / 2),
5383
5412
  y: Math.round((canvasSize.height - h) / 2),
@@ -5388,7 +5417,7 @@ function createFileHandlers(deps) {
5388
5417
  };
5389
5418
  img.onerror = () => {
5390
5419
  addElement({
5391
- id: chunkLY5535CF_js.generateElementId(),
5420
+ id: chunk3WK4AE52_js.generateElementId(),
5392
5421
  type: "image",
5393
5422
  x: 100,
5394
5423
  y: 100,
@@ -5407,14 +5436,14 @@ function createFileHandlers(deps) {
5407
5436
  return;
5408
5437
  }
5409
5438
  e.target.value = "";
5410
- const mediaType = chunkLY5535CF_js.classifyMediaType(file.type);
5439
+ const mediaType = chunk3WK4AE52_js.classifyMediaType(file.type);
5411
5440
  if (!mediaType) {
5412
5441
  return;
5413
5442
  }
5414
5443
  const elFilePath = file.path;
5415
5444
  const insertMediaElement = (mediaSourceUrl, width, height) => {
5416
5445
  addElement({
5417
- id: chunkLY5535CF_js.generateElementId(),
5446
+ id: chunk3WK4AE52_js.generateElementId(),
5418
5447
  type: "media",
5419
5448
  mediaType,
5420
5449
  mediaMimeType: file.type || void 0,
@@ -5589,13 +5618,13 @@ function createStructuredElementHandlers(deps) {
5589
5618
  return;
5590
5619
  }
5591
5620
  addElement({
5592
- id: chunkLY5535CF_js.generateElementId(),
5621
+ id: chunk3WK4AE52_js.generateElementId(),
5593
5622
  type: "smartArt",
5594
5623
  x: 100,
5595
5624
  y: 120,
5596
5625
  width: 600,
5597
5626
  height: 340,
5598
- smartArtData: chunkLY5535CF_js.buildSmartArtPresetData(
5627
+ smartArtData: chunk3WK4AE52_js.buildSmartArtPresetData(
5599
5628
  layout,
5600
5629
  defaultItems,
5601
5630
  (i) => `node-${Date.now()}-${i}-${Math.random().toString(36).slice(2, 8)}`
@@ -5607,7 +5636,7 @@ function createStructuredElementHandlers(deps) {
5607
5636
  return;
5608
5637
  }
5609
5638
  addElement({
5610
- id: chunkLY5535CF_js.generateElementId(),
5639
+ id: chunk3WK4AE52_js.generateElementId(),
5611
5640
  type: "shape",
5612
5641
  x: 120,
5613
5642
  y: 200,
@@ -5645,7 +5674,7 @@ function createStructuredElementHandlers(deps) {
5645
5674
  return;
5646
5675
  }
5647
5676
  const resolved = resolveHyperlinkEditResult(data);
5648
- if (resolved.url && !chunkLY5535CF_js.isUrlSafe(resolved.url)) {
5677
+ if (resolved.url && !chunk3WK4AE52_js.isUrlSafe(resolved.url)) {
5649
5678
  return;
5650
5679
  }
5651
5680
  const actionClick = {
@@ -5669,7 +5698,7 @@ function createStructuredElementHandlers(deps) {
5669
5698
  const displayText = value || fieldTexts[fieldType] || fieldType;
5670
5699
  const fieldGuid = `{${crypto.randomUUID().toUpperCase()}}`;
5671
5700
  addElement({
5672
- id: chunkLY5535CF_js.generateElementId(),
5701
+ id: chunk3WK4AE52_js.generateElementId(),
5673
5702
  type: "shape",
5674
5703
  x: 120,
5675
5704
  y: 200,
@@ -5691,11 +5720,11 @@ function createStructuredElementHandlers(deps) {
5691
5720
  if (!activeSlide) {
5692
5721
  return;
5693
5722
  }
5694
- const preset = chunkLY5535CF_js.ACTION_BUTTON_PRESETS.find((p) => p.shapeType === shapeType);
5723
+ const preset = chunk3WK4AE52_js.ACTION_BUTTON_PRESETS.find((p) => p.shapeType === shapeType);
5695
5724
  if (!preset) {
5696
5725
  return;
5697
5726
  }
5698
- const defaultPptxAction = chunkLY5535CF_js.elementActionToPptxAction({
5727
+ const defaultPptxAction = chunk3WK4AE52_js.elementActionToPptxAction({
5699
5728
  trigger: "click",
5700
5729
  type: preset.defaultAction
5701
5730
  });
@@ -5704,7 +5733,7 @@ function createStructuredElementHandlers(deps) {
5704
5733
  defaultPptxAction.highlightClick = true;
5705
5734
  }
5706
5735
  addElement({
5707
- id: chunkLY5535CF_js.generateElementId(),
5736
+ id: chunk3WK4AE52_js.generateElementId(),
5708
5737
  type: "shape",
5709
5738
  x: 150,
5710
5739
  y: 150,
@@ -5771,14 +5800,14 @@ function useInsertElements(input) {
5771
5800
  return;
5772
5801
  }
5773
5802
  addElement({
5774
- id: chunkLY5535CF_js.generateElementId(),
5803
+ id: chunk3WK4AE52_js.generateElementId(),
5775
5804
  type: "text",
5776
5805
  x: 100,
5777
5806
  y: 100,
5778
5807
  width: 300,
5779
5808
  height: 60,
5780
5809
  text: "",
5781
- textStyle: { fontSize: chunkIK25LY4C_js.DEFAULT_TEXT_FONT_SIZE }
5810
+ textStyle: { fontSize: chunkO27KNZLJ_js.DEFAULT_TEXT_FONT_SIZE }
5782
5811
  });
5783
5812
  };
5784
5813
  const handleAddShape = () => {
@@ -5786,7 +5815,7 @@ function useInsertElements(input) {
5786
5815
  return;
5787
5816
  }
5788
5817
  addElement({
5789
- id: chunkLY5535CF_js.generateElementId(),
5818
+ id: chunk3WK4AE52_js.generateElementId(),
5790
5819
  type: "shape",
5791
5820
  x: 150,
5792
5821
  y: 150,
@@ -5805,15 +5834,15 @@ function useInsertElements(input) {
5805
5834
  return;
5806
5835
  }
5807
5836
  addElement({
5808
- ...chunkLY5535CF_js.newTableElement(chunkIK25LY4C_js.DEFAULT_TABLE_ROWS, chunkIK25LY4C_js.DEFAULT_TABLE_COLUMNS, 100, 200),
5809
- id: chunkLY5535CF_js.generateElementId()
5837
+ ...chunk3WK4AE52_js.newTableElement(chunkO27KNZLJ_js.DEFAULT_TABLE_ROWS, chunkO27KNZLJ_js.DEFAULT_TABLE_COLUMNS, 100, 200),
5838
+ id: chunk3WK4AE52_js.generateElementId()
5810
5839
  });
5811
5840
  };
5812
5841
  const handleAddChart = (chartKind) => {
5813
5842
  if (!activeSlide) {
5814
5843
  return;
5815
5844
  }
5816
- addElement(chunkLY5535CF_js.createDefaultChartElement(chartKind));
5845
+ addElement(chunk3WK4AE52_js.createDefaultChartElement(chartKind));
5817
5846
  };
5818
5847
  const structured = createStructuredElementHandlers({
5819
5848
  activeSlide,
@@ -5883,7 +5912,7 @@ function useClipboardHandlers(input) {
5883
5912
  if (!selectedElement) {
5884
5913
  return;
5885
5914
  }
5886
- setClipboardPayload(chunkLY5535CF_js.buildElementClipboardPayload(selectedElement, editTemplateMode));
5915
+ setClipboardPayload(chunk3WK4AE52_js.buildElementClipboardPayload(selectedElement, editTemplateMode));
5887
5916
  };
5888
5917
  const handleDelete = () => {
5889
5918
  const idsToDelete = effectiveSelectedIds;
@@ -5900,7 +5929,7 @@ function useClipboardHandlers(input) {
5900
5929
  handleDelete();
5901
5930
  };
5902
5931
  const insertClone = (source) => {
5903
- const clone = chunkLY5535CF_js.cloneElementForPaste(source, { intoTemplate: editTemplateMode });
5932
+ const clone = chunk3WK4AE52_js.cloneElementForPaste(source, { intoTemplate: editTemplateMode });
5904
5933
  ops.updateActiveElements((els) => [...els, clone]);
5905
5934
  ops.applySelection(clone.id);
5906
5935
  history.markDirty();
@@ -5935,7 +5964,7 @@ function resolveShapePath(el) {
5935
5964
  return el.pathData;
5936
5965
  }
5937
5966
  if ("shapeType" in el && typeof el.shapeType === "string") {
5938
- const clipPath = chunkLY5535CF_js.getPresetShapeClipPath(el.shapeType);
5967
+ const clipPath = chunk3WK4AE52_js.getPresetShapeClipPath(el.shapeType);
5939
5968
  if (clipPath) {
5940
5969
  const svgPath = clipPathToSvgPath(clipPath, el.width, el.height);
5941
5970
  if (svgPath) {
@@ -5986,7 +6015,7 @@ function clipPathToSvgPath(clipPath, width, height) {
5986
6015
  return parts.join(" ");
5987
6016
  }
5988
6017
  function transformPathToGlobal(pathData, el) {
5989
- const polys = chunkLY5535CF_js.svgPathToPolygons(pathData);
6018
+ const polys = chunk3WK4AE52_js.svgPathToPolygons(pathData);
5990
6019
  if (polys.length === 0) {
5991
6020
  return pathData;
5992
6021
  }
@@ -6006,10 +6035,10 @@ function transformPathToGlobal(pathData, el) {
6006
6035
  y: pt.y * scaleY + el.y
6007
6036
  }))
6008
6037
  );
6009
- return chunkLY5535CF_js.polygonsToSvgPath(transformed);
6038
+ return chunk3WK4AE52_js.polygonsToSvgPath(transformed);
6010
6039
  }
6011
6040
  function transformPathToLocal(pathData, x, y, _width, _height) {
6012
- const polys = chunkLY5535CF_js.svgPathToPolygons(pathData);
6041
+ const polys = chunk3WK4AE52_js.svgPathToPolygons(pathData);
6013
6042
  if (polys.length === 0) {
6014
6043
  return pathData;
6015
6044
  }
@@ -6019,10 +6048,10 @@ function transformPathToLocal(pathData, x, y, _width, _height) {
6019
6048
  y: pt.y - y
6020
6049
  }))
6021
6050
  );
6022
- return chunkLY5535CF_js.polygonsToSvgPath(transformed);
6051
+ return chunk3WK4AE52_js.polygonsToSvgPath(transformed);
6023
6052
  }
6024
6053
  function pathBounds(pathData) {
6025
- const polys = chunkLY5535CF_js.svgPathToPolygons(pathData);
6054
+ const polys = chunk3WK4AE52_js.svgPathToPolygons(pathData);
6026
6055
  let minX = Infinity;
6027
6056
  let minY = Infinity;
6028
6057
  let maxX = -Infinity;
@@ -6081,7 +6110,7 @@ function useMergeShapesHandler(input) {
6081
6110
  let allFragments = [];
6082
6111
  let remaining = globalPaths[0];
6083
6112
  for (let i = 1; i < globalPaths.length; i++) {
6084
- const frags = chunkLY5535CF_js.mergeShapes("fragment", remaining, globalPaths[i]);
6113
+ const frags = chunk3WK4AE52_js.mergeShapes("fragment", remaining, globalPaths[i]);
6085
6114
  if (Array.isArray(frags)) {
6086
6115
  allFragments = frags;
6087
6116
  }
@@ -6110,7 +6139,7 @@ function useMergeShapesHandler(input) {
6110
6139
  bounds.height
6111
6140
  );
6112
6141
  const newEl = {
6113
- id: chunkLY5535CF_js.generateElementId(),
6142
+ id: chunk3WK4AE52_js.generateElementId(),
6114
6143
  type: "shape",
6115
6144
  x: bounds.x,
6116
6145
  y: bounds.y,
@@ -6148,7 +6177,7 @@ function useMergeShapesHandler(input) {
6148
6177
  } else {
6149
6178
  let resultPath = globalPaths[0];
6150
6179
  for (let i = 1; i < globalPaths.length; i++) {
6151
- const result = chunkLY5535CF_js.mergeShapes(operation, resultPath, globalPaths[i]);
6180
+ const result = chunk3WK4AE52_js.mergeShapes(operation, resultPath, globalPaths[i]);
6152
6181
  if (typeof result === "string") {
6153
6182
  resultPath = result;
6154
6183
  }
@@ -6169,7 +6198,7 @@ function useMergeShapesHandler(input) {
6169
6198
  );
6170
6199
  const primary = targets[0];
6171
6200
  const newEl = {
6172
- id: chunkLY5535CF_js.generateElementId(),
6201
+ id: chunk3WK4AE52_js.generateElementId(),
6173
6202
  type: "shape",
6174
6203
  x: bounds.x,
6175
6204
  y: bounds.y,
@@ -6232,10 +6261,10 @@ function useGroupAlignLayerHandlers(input) {
6232
6261
  if (ids.length < 2 || !activeSlide) {
6233
6262
  return;
6234
6263
  }
6235
- if (!selectedElements.every((el) => chunkLY5535CF_js.canInteractWithElement(el, "group"))) {
6264
+ if (!selectedElements.every((el) => chunk3WK4AE52_js.canInteractWithElement(el, "group"))) {
6236
6265
  return;
6237
6266
  }
6238
- const { elements, groupId } = chunkLY5535CF_js.groupElements(ops.activeElements, ids, chunkLY5535CF_js.generateElementId());
6267
+ const { elements, groupId } = chunk3WK4AE52_js.groupElements(ops.activeElements, ids, chunk3WK4AE52_js.generateElementId());
6239
6268
  if (groupId === null) {
6240
6269
  return;
6241
6270
  }
@@ -6247,15 +6276,15 @@ function useGroupAlignLayerHandlers(input) {
6247
6276
  if (!selectedElement || selectedElement.type !== "group" || !activeSlide) {
6248
6277
  return;
6249
6278
  }
6250
- if (!chunkLY5535CF_js.canInteractWithElement(selectedElement, "group")) {
6279
+ if (!chunk3WK4AE52_js.canInteractWithElement(selectedElement, "group")) {
6251
6280
  return;
6252
6281
  }
6253
6282
  const group = selectedElement;
6254
- const intoTemplate = chunkLY5535CF_js.isTemplateElementId(group.id);
6283
+ const intoTemplate = chunk3WK4AE52_js.isTemplateElementId(group.id);
6255
6284
  const childIds = group.children.map(
6256
- (child) => intoTemplate ? chunkLY5535CF_js.makeCloneId(true, child.id || group.id) : child.id || chunkLY5535CF_js.generateElementId()
6285
+ (child) => intoTemplate ? chunk3WK4AE52_js.makeCloneId(true, child.id || group.id) : child.id || chunk3WK4AE52_js.generateElementId()
6257
6286
  );
6258
- const { elements, childIds: usedIds } = chunkLY5535CF_js.ungroupElements(
6287
+ const { elements, childIds: usedIds } = chunk3WK4AE52_js.ungroupElements(
6259
6288
  ops.activeElements,
6260
6289
  group.id,
6261
6290
  childIds,
@@ -6284,7 +6313,7 @@ function useGroupAlignLayerHandlers(input) {
6284
6313
  if (!edge) {
6285
6314
  return;
6286
6315
  }
6287
- const positions = chunkLY5535CF_js.alignElements(selectedElements, edge);
6316
+ const positions = chunk3WK4AE52_js.alignElements(selectedElements, edge);
6288
6317
  for (const [id, pos] of positions) {
6289
6318
  const el = elementLookup.get(id);
6290
6319
  if (!el) {
@@ -6302,7 +6331,7 @@ function useGroupAlignLayerHandlers(input) {
6302
6331
  if (!distAxis) {
6303
6332
  return;
6304
6333
  }
6305
- const positions = chunkLY5535CF_js.distributeElements(selectedElements, distAxis);
6334
+ const positions = chunk3WK4AE52_js.distributeElements(selectedElements, distAxis);
6306
6335
  for (const [id, pos] of positions) {
6307
6336
  const el = elementLookup.get(id);
6308
6337
  if (!el) {
@@ -6313,14 +6342,14 @@ function useGroupAlignLayerHandlers(input) {
6313
6342
  history.markDirty();
6314
6343
  };
6315
6344
  const canDistribute = selectedElements.length >= 3;
6316
- const selectionGroupable = selectedElements.every((el) => chunkLY5535CF_js.canInteractWithElement(el, "group"));
6345
+ const selectionGroupable = selectedElements.every((el) => chunk3WK4AE52_js.canInteractWithElement(el, "group"));
6317
6346
  const handleMoveLayer = (direction) => {
6318
6347
  if (!selectedElement || !activeSlide) {
6319
6348
  return;
6320
6349
  }
6321
6350
  const id = selectedElement.id;
6322
6351
  ops.updateActiveElements(
6323
- (els) => direction === "forward" ? chunkLY5535CF_js.bringForward(els, id) : direction === "backward" ? chunkLY5535CF_js.sendBackward(els, id) : els
6352
+ (els) => direction === "forward" ? chunk3WK4AE52_js.bringForward(els, id) : direction === "backward" ? chunk3WK4AE52_js.sendBackward(els, id) : els
6324
6353
  );
6325
6354
  history.markDirty();
6326
6355
  };
@@ -6330,7 +6359,7 @@ function useGroupAlignLayerHandlers(input) {
6330
6359
  }
6331
6360
  const id = selectedElement.id;
6332
6361
  ops.updateActiveElements(
6333
- (els) => direction === "front" ? chunkLY5535CF_js.bringToFront(els, id) : chunkLY5535CF_js.sendToBack(els, id)
6362
+ (els) => direction === "front" ? chunk3WK4AE52_js.bringToFront(els, id) : chunk3WK4AE52_js.sendToBack(els, id)
6334
6363
  );
6335
6364
  history.markDirty();
6336
6365
  };
@@ -6464,7 +6493,7 @@ function useSlideManagement(input) {
6464
6493
  theme
6465
6494
  } = input;
6466
6495
  const handleAddSlide = () => {
6467
- const newSlide = chunkLY5535CF_js.createBlankSlide(slides.length + 1);
6496
+ const newSlide = chunk3WK4AE52_js.createBlankSlide(slides.length + 1);
6468
6497
  ops.updateSlides((prev) => {
6469
6498
  const next = [...prev];
6470
6499
  next.splice(activeSlideIndex + 1, 0, newSlide);
@@ -6527,7 +6556,7 @@ function useSlideManagement(input) {
6527
6556
  }
6528
6557
  const clone = {
6529
6558
  ...src,
6530
- id: chunkLY5535CF_js.makeSlideId(),
6559
+ id: chunk3WK4AE52_js.makeSlideId(),
6531
6560
  elements: src.elements.map((el) => ({
6532
6561
  ...el,
6533
6562
  id: `${el.id}-dup-${Math.random().toString(36).slice(2, 6)}`
@@ -6559,7 +6588,7 @@ function useSlideManagement(input) {
6559
6588
  const handleInsertSlideFromLayout = (layoutPath, layoutName) => {
6560
6589
  const insertAt = activeSlideIndex + 1;
6561
6590
  const draft = {
6562
- ...chunkLY5535CF_js.createBlankSlide(slides.length + 1),
6591
+ ...chunk3WK4AE52_js.createBlankSlide(slides.length + 1),
6563
6592
  layoutPath,
6564
6593
  ...layoutName ? { layoutName } : {}
6565
6594
  };
@@ -6592,9 +6621,9 @@ function useSlideManagement(input) {
6592
6621
  };
6593
6622
  const handleInsertSlideFromTemplate = (templateId) => {
6594
6623
  const insertAt = activeSlideIndex + 1;
6595
- const draft = chunkLY5535CF_js.buildSlideTemplateSlide(templateId, chunkLY5535CF_js.makeSlideId(), slides.length + 1, {
6624
+ const draft = chunk3WK4AE52_js.buildSlideTemplateSlide(templateId, chunk3WK4AE52_js.makeSlideId(), slides.length + 1, {
6596
6625
  ...canvasSize ? { slideWidth: canvasSize.width, slideHeight: canvasSize.height } : {},
6597
- scheme: chunkLY5535CF_js.templateSchemeFromTheme(theme?.colorScheme)
6626
+ scheme: chunk3WK4AE52_js.templateSchemeFromTheme(theme?.colorScheme)
6598
6627
  });
6599
6628
  ops.updateSlides((prev) => insertSlideFromLayoutUpdater(prev, activeSlideIndex, draft));
6600
6629
  setActiveSlideIndex(insertAt);
@@ -6631,7 +6660,7 @@ function createTableMergeHandlers(input) {
6631
6660
  if (!nextCell || nextCell.hMerge || nextCell.vMerge) {
6632
6661
  return;
6633
6662
  }
6634
- const newTableData = chunkLY5535CF_js.mergeCells(
6663
+ const newTableData = chunk3WK4AE52_js.mergeCells(
6635
6664
  [
6636
6665
  { row: rowIndex, col: columnIndex },
6637
6666
  { row: rowIndex, col: nextColIdx }
@@ -6639,7 +6668,7 @@ function createTableMergeHandlers(input) {
6639
6668
  td
6640
6669
  );
6641
6670
  const updates = { tableData: newTableData };
6642
- const newRawXml = chunkLY5535CF_js.updateMergeAttrsInRawXml(selectedElement, newTableData);
6671
+ const newRawXml = chunk3WK4AE52_js.updateMergeAttrsInRawXml(selectedElement, newTableData);
6643
6672
  if (newRawXml) {
6644
6673
  updates.rawXml = newRawXml;
6645
6674
  }
@@ -6665,7 +6694,7 @@ function createTableMergeHandlers(input) {
6665
6694
  if (!targetNextCell || targetNextCell.hMerge || targetNextCell.vMerge) {
6666
6695
  return;
6667
6696
  }
6668
- const newTableData = chunkLY5535CF_js.mergeCells(
6697
+ const newTableData = chunk3WK4AE52_js.mergeCells(
6669
6698
  [
6670
6699
  { row: rowIndex, col: columnIndex },
6671
6700
  { row: targetNextRowIdx, col: columnIndex }
@@ -6673,7 +6702,7 @@ function createTableMergeHandlers(input) {
6673
6702
  td
6674
6703
  );
6675
6704
  const updates = { tableData: newTableData };
6676
- const newRawXml = chunkLY5535CF_js.updateMergeAttrsInRawXml(selectedElement, newTableData);
6705
+ const newRawXml = chunk3WK4AE52_js.updateMergeAttrsInRawXml(selectedElement, newTableData);
6677
6706
  if (newRawXml) {
6678
6707
  updates.rawXml = newRawXml;
6679
6708
  }
@@ -6688,9 +6717,9 @@ function createTableMergeHandlers(input) {
6688
6717
  return;
6689
6718
  }
6690
6719
  const td = selectedElement.tableData;
6691
- const newTableData = chunkLY5535CF_js.mergeCells(ts.selectedCells, td);
6720
+ const newTableData = chunk3WK4AE52_js.mergeCells(ts.selectedCells, td);
6692
6721
  const updates = { tableData: newTableData };
6693
- const newRawXml = chunkLY5535CF_js.updateMergeAttrsInRawXml(selectedElement, newTableData);
6722
+ const newRawXml = chunk3WK4AE52_js.updateMergeAttrsInRawXml(selectedElement, newTableData);
6694
6723
  if (newRawXml) {
6695
6724
  updates.rawXml = newRawXml;
6696
6725
  }
@@ -6707,9 +6736,9 @@ function createTableMergeHandlers(input) {
6707
6736
  }
6708
6737
  const { rowIndex, columnIndex } = ts;
6709
6738
  const td = selectedElement.tableData;
6710
- const newTableData = chunkLY5535CF_js.splitCell(rowIndex, columnIndex, td);
6739
+ const newTableData = chunk3WK4AE52_js.splitCell(rowIndex, columnIndex, td);
6711
6740
  const updates = { tableData: newTableData };
6712
- const newRawXml = chunkLY5535CF_js.updateMergeAttrsInRawXml(selectedElement, newTableData);
6741
+ const newRawXml = chunk3WK4AE52_js.updateMergeAttrsInRawXml(selectedElement, newTableData);
6713
6742
  if (newRawXml) {
6714
6743
  updates.rawXml = newRawXml;
6715
6744
  }
@@ -6743,10 +6772,10 @@ function createTableStructHandlers(input) {
6743
6772
  const text = transformCommittedText ? transformCommittedText(rawText) : rawText;
6744
6773
  const updates = {};
6745
6774
  if (el.tableData) {
6746
- updates.tableData = chunkLY5535CF_js.setCellText(el, rowIndex, colIndex, text).tableData;
6775
+ updates.tableData = chunk3WK4AE52_js.setCellText(el, rowIndex, colIndex, text).tableData;
6747
6776
  }
6748
6777
  if (el.rawXml) {
6749
- const newRawXml = chunkLY5535CF_js.updateCellTextInRawXml(el, rowIndex, colIndex, text);
6778
+ const newRawXml = chunk3WK4AE52_js.updateCellTextInRawXml(el, rowIndex, colIndex, text);
6750
6779
  if (newRawXml) {
6751
6780
  updates.rawXml = newRawXml;
6752
6781
  }
@@ -6770,7 +6799,7 @@ function createTableStructHandlers(input) {
6770
6799
  const { rowIndex, columnIndex: colIndex } = ts;
6771
6800
  const updates = {};
6772
6801
  if (selectedElement.rawXml) {
6773
- const newRawXml = chunkLY5535CF_js.updateCellTextStyleInRawXml(
6802
+ const newRawXml = chunk3WK4AE52_js.updateCellTextStyleInRawXml(
6774
6803
  selectedElement,
6775
6804
  rowIndex,
6776
6805
  colIndex,
@@ -6834,9 +6863,9 @@ function createTableStructHandlers(input) {
6834
6863
  return;
6835
6864
  }
6836
6865
  const rowIdx = ts?.rowIndex ?? 0;
6837
- const newTableData = chunkLY5535CF_js.insertTableRow(selectedElement.tableData, rowIdx, position);
6866
+ const newTableData = chunk3WK4AE52_js.insertTableRow(selectedElement.tableData, rowIdx, position);
6838
6867
  const updates = { tableData: newTableData };
6839
- const newRawXml = chunkLY5535CF_js.rebuildTableStructureInRawXml(selectedElement, newTableData);
6868
+ const newRawXml = chunk3WK4AE52_js.rebuildTableStructureInRawXml(selectedElement, newTableData);
6840
6869
  if (newRawXml) {
6841
6870
  updates.rawXml = newRawXml;
6842
6871
  }
@@ -6849,12 +6878,12 @@ function createTableStructHandlers(input) {
6849
6878
  }
6850
6879
  const td = selectedElement.tableData;
6851
6880
  const rowIdx = ts?.rowIndex ?? 0;
6852
- const newTableData = chunkLY5535CF_js.deleteTableRow(td, rowIdx);
6881
+ const newTableData = chunk3WK4AE52_js.deleteTableRow(td, rowIdx);
6853
6882
  if (newTableData === td) {
6854
6883
  return;
6855
6884
  }
6856
6885
  const updates = { tableData: newTableData };
6857
- const newRawXml = chunkLY5535CF_js.rebuildTableStructureInRawXml(selectedElement, newTableData);
6886
+ const newRawXml = chunk3WK4AE52_js.rebuildTableStructureInRawXml(selectedElement, newTableData);
6858
6887
  if (newRawXml) {
6859
6888
  updates.rawXml = newRawXml;
6860
6889
  }
@@ -6866,9 +6895,9 @@ function createTableStructHandlers(input) {
6866
6895
  return;
6867
6896
  }
6868
6897
  const colIdx = ts?.columnIndex ?? 0;
6869
- const newTableData = chunkLY5535CF_js.insertTableColumn(selectedElement.tableData, colIdx, position);
6898
+ const newTableData = chunk3WK4AE52_js.insertTableColumn(selectedElement.tableData, colIdx, position);
6870
6899
  const updates = { tableData: newTableData };
6871
- const newRawXml = chunkLY5535CF_js.rebuildTableStructureInRawXml(selectedElement, newTableData);
6900
+ const newRawXml = chunk3WK4AE52_js.rebuildTableStructureInRawXml(selectedElement, newTableData);
6872
6901
  if (newRawXml) {
6873
6902
  updates.rawXml = newRawXml;
6874
6903
  }
@@ -6881,12 +6910,12 @@ function createTableStructHandlers(input) {
6881
6910
  }
6882
6911
  const td = selectedElement.tableData;
6883
6912
  const colIdx = ts?.columnIndex ?? 0;
6884
- const newTableData = chunkLY5535CF_js.deleteTableColumn(td, colIdx);
6913
+ const newTableData = chunk3WK4AE52_js.deleteTableColumn(td, colIdx);
6885
6914
  if (newTableData === td) {
6886
6915
  return;
6887
6916
  }
6888
6917
  const updates = { tableData: newTableData };
6889
- const newRawXml = chunkLY5535CF_js.rebuildTableStructureInRawXml(selectedElement, newTableData);
6918
+ const newRawXml = chunk3WK4AE52_js.rebuildTableStructureInRawXml(selectedElement, newTableData);
6890
6919
  if (newRawXml) {
6891
6920
  updates.rawXml = newRawXml;
6892
6921
  }
@@ -6922,8 +6951,8 @@ async function renderToCanvas(element, options = {}) {
6922
6951
  return html2canvasPro(element, {
6923
6952
  ...options,
6924
6953
  onclone: async (doc, clonedEl) => {
6925
- await chunkLY5535CF_js.normalizeColorsForCapture(doc, clonedEl);
6926
- chunkLY5535CF_js.preprocessCssForCapture(clonedEl);
6954
+ await chunk3WK4AE52_js.normalizeColorsForCapture(doc, clonedEl);
6955
+ chunk3WK4AE52_js.preprocessCssForCapture(clonedEl);
6927
6956
  if (typeof userOnClone === "function") {
6928
6957
  userOnClone(doc, clonedEl);
6929
6958
  }
@@ -6953,7 +6982,7 @@ function useExportSaveAs(input) {
6953
6982
  slideSizeEmu
6954
6983
  } = input;
6955
6984
  const handleSaveAsFormat = async (format) => {
6956
- const downloadName = chunkLY5535CF_js.savedPresentationFileName(filePath, format);
6985
+ const downloadName = chunk3WK4AE52_js.savedPresentationFileName(filePath, format);
6957
6986
  try {
6958
6987
  const data = await serializeSlides(format);
6959
6988
  if (!data) {
@@ -6961,16 +6990,16 @@ function useExportSaveAs(input) {
6961
6990
  }
6962
6991
  const mimeType = format === "ppt" ? "application/vnd.ms-powerpoint" : "application/vnd.openxmlformats-officedocument.presentationml.presentation";
6963
6992
  const blob = new Blob([data], { type: mimeType });
6964
- chunkLY5535CF_js.downloadBlob(blob, downloadName);
6993
+ chunk3WK4AE52_js.downloadBlob(blob, downloadName);
6965
6994
  } catch (err) {
6966
6995
  console.error(`[PowerPointViewer] Save as .${format} failed:`, err);
6967
6996
  }
6968
6997
  };
6969
6998
  const handleExportJson = () => {
6970
6999
  const sourceName = filePath ? filePath.replace(/\\/gu, "/").split("/").pop() : void 0;
6971
- const slideSize = chunkLY5535CF_js.resolveSlideSizeSelection({ current: slideSizeEmu, canvas: canvasSize }).size;
7000
+ const slideSize = chunk3WK4AE52_js.resolveSlideSizeSelection({ current: slideSizeEmu, canvas: canvasSize }).size;
6972
7001
  const data = {
6973
- slides: chunkLY5535CF_js.buildSaveSlides(slides, templateElementsBySlideId),
7002
+ slides: chunk3WK4AE52_js.buildSaveSlides(slides, templateElementsBySlideId),
6974
7003
  width: canvasSize.width,
6975
7004
  height: canvasSize.height,
6976
7005
  widthEmu: slideSize.widthEmu,
@@ -6989,7 +7018,7 @@ function useExportSaveAs(input) {
6989
7018
  handoutMaster
6990
7019
  };
6991
7020
  try {
6992
- chunkLY5535CF_js.exportDeckJson(data, sourceName);
7021
+ chunk3WK4AE52_js.exportDeckJson(data, sourceName);
6993
7022
  } catch (err) {
6994
7023
  console.error("[PowerPointViewer] JSON export failed:", err);
6995
7024
  }
@@ -7080,7 +7109,7 @@ async function exportSlideToPngBlob(slideElement, options = {}) {
7080
7109
  }
7081
7110
  async function exportSlideAsPng(slideElement, slideIndex, options = {}) {
7082
7111
  const blob = await exportSlideToPngBlob(slideElement, options);
7083
- chunkLY5535CF_js.downloadBlob(blob, `slide-${slideIndex + 1}.png`);
7112
+ chunk3WK4AE52_js.downloadBlob(blob, `slide-${slideIndex + 1}.png`);
7084
7113
  }
7085
7114
  async function copySlideToClipboard(slideElement, options = {}) {
7086
7115
  const blob = await exportSlideToPngBlob(slideElement, options);
@@ -7102,15 +7131,15 @@ async function exportAllSlidesAsPdf(slideStageRef, totalSlides, setActiveSlide,
7102
7131
  continue;
7103
7132
  }
7104
7133
  const canvas = await renderElementToCanvas(stageEl, scale);
7105
- images.push(chunkLY5535CF_js.canvasToJpegData(canvas));
7134
+ images.push(chunk3WK4AE52_js.canvasToJpegData(canvas));
7106
7135
  }
7107
7136
  onProgress?.(totalSlides, totalSlides);
7108
7137
  setActiveSlide(currentSlideIndex);
7109
7138
  if (images.length === 0) {
7110
- throw new Error(chunkY6GG2OOW_js.translationsEn["pptx.export.errorNoSlidesPdf"]);
7139
+ throw new Error(chunk3AJ54EAB_js.translationsEn["pptx.export.errorNoSlidesPdf"]);
7111
7140
  }
7112
- const pdfBlobUrl = chunkIK25LY4C_js.buildPdfFromImageData(images);
7113
- chunkLY5535CF_js.downloadDataUrl(pdfBlobUrl, filename);
7141
+ const pdfBlobUrl = chunkO27KNZLJ_js.buildPdfFromImageData(images);
7142
+ chunk3WK4AE52_js.downloadDataUrl(pdfBlobUrl, filename);
7114
7143
  }
7115
7144
  async function captureAllSlidesAsPngDataUrls(slideStageRef, totalSlides, setActiveSlide, currentSlideIndex, options = {}) {
7116
7145
  const { scale = 2, onProgress } = options;
@@ -7156,10 +7185,10 @@ async function exportAllSlidesAsNotesPdf(slideStageRef, totalSlides, setActiveSl
7156
7185
  onProgress?.(totalSlides, totalSlides);
7157
7186
  setActiveSlide(currentSlideIndex);
7158
7187
  if (pages.length === 0) {
7159
- throw new Error(chunkY6GG2OOW_js.translationsEn["pptx.export.errorNoSlidesNotesPdf"]);
7188
+ throw new Error(chunk3AJ54EAB_js.translationsEn["pptx.export.errorNoSlidesNotesPdf"]);
7160
7189
  }
7161
- const pdfDataUrl = chunkIK25LY4C_js.buildNotesPdf(pages);
7162
- chunkLY5535CF_js.downloadDataUrl(pdfDataUrl, filename);
7190
+ const pdfDataUrl = chunkO27KNZLJ_js.buildNotesPdf(pages);
7191
+ chunk3WK4AE52_js.downloadDataUrl(pdfDataUrl, filename);
7163
7192
  }
7164
7193
 
7165
7194
  // src/viewer/utils/export-video.ts
@@ -7190,7 +7219,7 @@ async function exportAllSlidesAsVideo(slideStageRef, totalSlides, setActiveSlide
7190
7219
  }
7191
7220
  setActiveSlide(currentSlideIndex);
7192
7221
  if (slideCanvases.length === 0) {
7193
- throw new Error(chunkY6GG2OOW_js.translationsEn["pptx.export.errorNoSlidesVideo"]);
7222
+ throw new Error(chunk3AJ54EAB_js.translationsEn["pptx.export.errorNoSlidesVideo"]);
7194
7223
  }
7195
7224
  const firstCanvas = slideCanvases[0];
7196
7225
  const recordingCanvas = document.createElement("canvas");
@@ -7198,12 +7227,12 @@ async function exportAllSlidesAsVideo(slideStageRef, totalSlides, setActiveSlide
7198
7227
  recordingCanvas.height = firstCanvas.height;
7199
7228
  const ctx = recordingCanvas.getContext("2d");
7200
7229
  if (!ctx) {
7201
- throw new Error(chunkY6GG2OOW_js.translationsEn["pptx.export.errorNo2dContext"]);
7230
+ throw new Error(chunk3AJ54EAB_js.translationsEn["pptx.export.errorNo2dContext"]);
7202
7231
  }
7203
7232
  const fps = 30;
7204
7233
  const stream = recordingCanvas.captureStream(fps);
7205
7234
  const recorder = new MediaRecorder(stream, {
7206
- mimeType: chunkLY5535CF_js.pickSupportedMimeType([...chunkLY5535CF_js.WEBM_MIME_CANDIDATES]),
7235
+ mimeType: chunk3WK4AE52_js.pickSupportedMimeType([...chunk3WK4AE52_js.WEBM_MIME_CANDIDATES]),
7207
7236
  videoBitsPerSecond: 5e6
7208
7237
  });
7209
7238
  const chunks = [];
@@ -7226,8 +7255,8 @@ async function exportAllSlidesAsVideo(slideStageRef, totalSlides, setActiveSlide
7226
7255
  const duration = slideTimingsMs?.[i] ?? slideDurationMs;
7227
7256
  ctx.clearRect(0, 0, recordingCanvas.width, recordingCanvas.height);
7228
7257
  ctx.drawImage(slideCanvases[i], 0, 0);
7229
- const frameInterval = chunkLY5535CF_js.fpsToFrameIntervalMs(fps);
7230
- const framesNeeded = chunkLY5535CF_js.segmentFrameCount(duration, fps);
7258
+ const frameInterval = chunk3WK4AE52_js.fpsToFrameIntervalMs(fps);
7259
+ const framesNeeded = chunk3WK4AE52_js.segmentFrameCount(duration, fps);
7231
7260
  for (let f = 0; f < framesNeeded; f++) {
7232
7261
  if (signal?.aborted) {
7233
7262
  recorder.stop();
@@ -7274,9 +7303,9 @@ async function exportAllSlidesAsGif(slideStageRef, totalSlides, setActiveSlide,
7274
7303
  }
7275
7304
  setActiveSlide(currentSlideIndex);
7276
7305
  if (frames.length === 0) {
7277
- throw new Error(chunkY6GG2OOW_js.translationsEn["pptx.export.errorNoSlidesGif"]);
7306
+ throw new Error(chunk3AJ54EAB_js.translationsEn["pptx.export.errorNoSlidesGif"]);
7278
7307
  }
7279
- const gifBytes = chunkLY5535CF_js.encodeGif(frames, Math.round(slideDurationMs / 10));
7308
+ const gifBytes = chunk3WK4AE52_js.encodeGif(frames, Math.round(slideDurationMs / 10));
7280
7309
  onProgress?.(totalSlides, totalSlides);
7281
7310
  const buf = new ArrayBuffer(gifBytes.length);
7282
7311
  new Uint8Array(buf).set(gifBytes);
@@ -7330,7 +7359,7 @@ function exportAllSlidesToSvg(data, options = {}) {
7330
7359
  continue;
7331
7360
  }
7332
7361
  onProgress?.(processedCount, data.slides.length);
7333
- let svg = chunkLY5535CF_js.SvgExporter.exportSlide(slide, data.width, data.height, svgOptions);
7362
+ let svg = chunk3WK4AE52_js.SvgExporter.exportSlide(slide, data.width, data.height, svgOptions);
7334
7363
  if (embedFonts && fontFaces?.length) {
7335
7364
  svg = injectFontFaces(svg, fontFaces);
7336
7365
  }
@@ -7432,21 +7461,21 @@ function useExportHandlers(input) {
7432
7461
  {
7433
7462
  scale: imageExportScale,
7434
7463
  onProgress: (current, total) => {
7435
- setExportProgress(chunkLY5535CF_js.slideProgressPercent(current, total));
7436
- setExportStatusMessage(chunkLY5535CF_js.slideStatusLabel("Rendering", current, total));
7464
+ setExportProgress(chunk3WK4AE52_js.slideProgressPercent(current, total));
7465
+ setExportStatusMessage(chunk3WK4AE52_js.slideStatusLabel("Rendering", current, total));
7437
7466
  },
7438
7467
  signal: abortCtrl.signal
7439
7468
  }
7440
7469
  );
7441
- setExportProgress(chunkLY5535CF_js.EXPORT_ASSEMBLING_PERCENT);
7470
+ setExportProgress(chunk3WK4AE52_js.EXPORT_ASSEMBLING_PERCENT);
7442
7471
  setExportStatusMessage("Building PDF...");
7443
7472
  await new Promise((r) => {
7444
7473
  setTimeout(r, 100);
7445
7474
  });
7446
- setExportProgress(chunkLY5535CF_js.EXPORT_DONE_PERCENT);
7475
+ setExportProgress(chunk3WK4AE52_js.EXPORT_DONE_PERCENT);
7447
7476
  setExportStatusMessage("Done!");
7448
7477
  } catch (err) {
7449
- if (!chunkLY5535CF_js.isExportAbortError(err)) {
7478
+ if (!chunk3WK4AE52_js.isExportAbortError(err)) {
7450
7479
  console.error("[PowerPointViewer] PDF export failed:", err);
7451
7480
  }
7452
7481
  } finally {
@@ -7476,21 +7505,21 @@ function useExportHandlers(input) {
7476
7505
  {
7477
7506
  scale: imageExportScale,
7478
7507
  onProgress: (current, total) => {
7479
- setExportProgress(chunkLY5535CF_js.slideProgressPercent(current, total));
7480
- setExportStatusMessage(chunkLY5535CF_js.slideStatusLabel("Rendering", current, total));
7508
+ setExportProgress(chunk3WK4AE52_js.slideProgressPercent(current, total));
7509
+ setExportStatusMessage(chunk3WK4AE52_js.slideStatusLabel("Rendering", current, total));
7481
7510
  },
7482
7511
  signal: abortCtrl.signal
7483
7512
  }
7484
7513
  );
7485
- setExportProgress(chunkLY5535CF_js.EXPORT_ASSEMBLING_PERCENT);
7514
+ setExportProgress(chunk3WK4AE52_js.EXPORT_ASSEMBLING_PERCENT);
7486
7515
  setExportStatusMessage("Building PDF...");
7487
7516
  await new Promise((r) => {
7488
7517
  setTimeout(r, 100);
7489
7518
  });
7490
- setExportProgress(chunkLY5535CF_js.EXPORT_DONE_PERCENT);
7519
+ setExportProgress(chunk3WK4AE52_js.EXPORT_DONE_PERCENT);
7491
7520
  setExportStatusMessage("Done!");
7492
7521
  } catch (err) {
7493
- if (!chunkLY5535CF_js.isExportAbortError(err)) {
7522
+ if (!chunk3WK4AE52_js.isExportAbortError(err)) {
7494
7523
  console.error("[PowerPointViewer] Notes PDF export failed:", err);
7495
7524
  }
7496
7525
  } finally {
@@ -7532,22 +7561,22 @@ function useExportHandlers(input) {
7532
7561
  scale: 1,
7533
7562
  slideDurationMs: 3e3,
7534
7563
  onProgress: (current, total) => {
7535
- setExportProgress(chunkLY5535CF_js.slideProgressPercent(current, total, 45));
7536
- setExportStatusMessage(chunkLY5535CF_js.slideStatusLabel("Capturing", current, total));
7564
+ setExportProgress(chunk3WK4AE52_js.slideProgressPercent(current, total, 45));
7565
+ setExportStatusMessage(chunk3WK4AE52_js.slideStatusLabel("Capturing", current, total));
7537
7566
  },
7538
7567
  onRecordProgress: (current, total) => {
7539
- setExportProgress(chunkLY5535CF_js.recordProgressPercent(current, total));
7540
- setExportStatusMessage(chunkLY5535CF_js.slideStatusLabel("Recording", current, total));
7568
+ setExportProgress(chunk3WK4AE52_js.recordProgressPercent(current, total));
7569
+ setExportStatusMessage(chunk3WK4AE52_js.slideStatusLabel("Recording", current, total));
7541
7570
  },
7542
7571
  signal: abortCtrl.signal
7543
7572
  }
7544
7573
  );
7545
- setExportProgress(chunkLY5535CF_js.EXPORT_ASSEMBLING_PERCENT);
7574
+ setExportProgress(chunk3WK4AE52_js.EXPORT_ASSEMBLING_PERCENT);
7546
7575
  setExportStatusMessage("Saving file...");
7547
- chunkLY5535CF_js.downloadBlob(blob, "presentation.webm");
7548
- setExportProgress(chunkLY5535CF_js.EXPORT_DONE_PERCENT);
7576
+ chunk3WK4AE52_js.downloadBlob(blob, "presentation.webm");
7577
+ setExportProgress(chunk3WK4AE52_js.EXPORT_DONE_PERCENT);
7549
7578
  } catch (err) {
7550
- if (!chunkLY5535CF_js.isExportAbortError(err)) {
7579
+ if (!chunk3WK4AE52_js.isExportAbortError(err)) {
7551
7580
  console.error("[PowerPointViewer] Video export failed:", err);
7552
7581
  }
7553
7582
  } finally {
@@ -7575,18 +7604,18 @@ function useExportHandlers(input) {
7575
7604
  scale: 0.5,
7576
7605
  slideDurationMs: 2e3,
7577
7606
  onProgress: (current, total) => {
7578
- setExportProgress(chunkLY5535CF_js.slideProgressPercent(current, total));
7579
- setExportStatusMessage(chunkLY5535CF_js.slideStatusLabel("Encoding", current, total));
7607
+ setExportProgress(chunk3WK4AE52_js.slideProgressPercent(current, total));
7608
+ setExportStatusMessage(chunk3WK4AE52_js.slideStatusLabel("Encoding", current, total));
7580
7609
  },
7581
7610
  signal: abortCtrl.signal
7582
7611
  }
7583
7612
  );
7584
- setExportProgress(chunkLY5535CF_js.EXPORT_ASSEMBLING_PERCENT);
7613
+ setExportProgress(chunk3WK4AE52_js.EXPORT_ASSEMBLING_PERCENT);
7585
7614
  setExportStatusMessage("Saving file...");
7586
- chunkLY5535CF_js.downloadBlob(blob, "presentation.gif");
7587
- setExportProgress(chunkLY5535CF_js.EXPORT_DONE_PERCENT);
7615
+ chunk3WK4AE52_js.downloadBlob(blob, "presentation.gif");
7616
+ setExportProgress(chunk3WK4AE52_js.EXPORT_DONE_PERCENT);
7588
7617
  } catch (err) {
7589
- if (!chunkLY5535CF_js.isExportAbortError(err)) {
7618
+ if (!chunk3WK4AE52_js.isExportAbortError(err)) {
7590
7619
  console.error("[PowerPointViewer] GIF export failed:", err);
7591
7620
  }
7592
7621
  } finally {
@@ -7620,7 +7649,7 @@ function useExportHandlers(input) {
7620
7649
  exportStatusMessage
7621
7650
  };
7622
7651
  }
7623
- var ViewerOptionsContext = react.createContext(chunkLY5535CF_js.DEFAULT_VIEWER_OPTIONS);
7652
+ var ViewerOptionsContext = react.createContext(chunk3WK4AE52_js.DEFAULT_VIEWER_OPTIONS);
7624
7653
  function useViewerOptionsContext() {
7625
7654
  return react.useContext(ViewerOptionsContext);
7626
7655
  }
@@ -7632,13 +7661,13 @@ function usePrintHandlers(input) {
7632
7661
  const { t } = reactI18next.useTranslation();
7633
7662
  const viewerOptions = useViewerOptionsContext();
7634
7663
  const includeHiddenSlides = viewerOptions.advanced.printHiddenSlides;
7635
- const printRasterScale = (viewerOptions.advanced.printHighQuality ? 4 : 3) * chunkLY5535CF_js.resolveImageResolutionScale(viewerOptions);
7664
+ const printRasterScale = (viewerOptions.advanced.printHighQuality ? 4 : 3) * chunk3WK4AE52_js.resolveImageResolutionScale(viewerOptions);
7636
7665
  const handlePrint = () => {
7637
7666
  setIsPrintDialogOpen(true);
7638
7667
  };
7639
7668
  const handlePrintSvg = async (settings) => {
7640
7669
  setIsPrintDialogOpen(false);
7641
- const printWindow = chunkLY5535CF_js.openPendingPrintWindow(t("pptx.print.preparingToPrint"));
7670
+ const printWindow = chunk3WK4AE52_js.openPendingPrintWindow(t("pptx.print.preparingToPrint"));
7642
7671
  if (!printWindow) {
7643
7672
  console.warn(
7644
7673
  "[PowerPointViewer] Print window was blocked by the browser. Allow popups for this site to print."
@@ -7648,9 +7677,9 @@ function usePrintHandlers(input) {
7648
7677
  if (!pptxData || settings.printWhat !== "slides") {
7649
7678
  return runRasterPrint(printWindow, settings);
7650
7679
  }
7651
- const colorFilter = chunkLY5535CF_js.computeColorFilter(settings.colorMode);
7652
- const slideIndices = chunkLY5535CF_js.filterHiddenSlideIndices(
7653
- chunkLY5535CF_js.computeSlideIndices(
7680
+ const colorFilter = chunk3WK4AE52_js.computeColorFilter(settings.colorMode);
7681
+ const slideIndices = chunk3WK4AE52_js.filterHiddenSlideIndices(
7682
+ chunk3WK4AE52_js.computeSlideIndices(
7654
7683
  settings.slideRange,
7655
7684
  activeSlideIndex,
7656
7685
  slides.length,
@@ -7668,22 +7697,22 @@ function usePrintHandlers(input) {
7668
7697
  printWindow.close();
7669
7698
  return;
7670
7699
  }
7671
- const printDoc = chunkLY5535CF_js.buildPrintDocument(svgs, pptxData.width, pptxData.height, {
7700
+ const printDoc = chunk3WK4AE52_js.buildPrintDocument(svgs, pptxData.width, pptxData.height, {
7672
7701
  title: "Slides (Vector)",
7673
7702
  orientation: settings.orientation,
7674
7703
  colorFilter,
7675
7704
  scaleToFit: settings.scaleToFit
7676
7705
  });
7677
- chunkLY5535CF_js.finishPrintWindow(printWindow, printDoc);
7706
+ chunk3WK4AE52_js.finishPrintWindow(printWindow, printDoc);
7678
7707
  } catch (err) {
7679
7708
  console.warn("[PowerPointViewer] SVG print path failed, falling back to raster:", err);
7680
7709
  return runRasterPrint(printWindow, settings);
7681
7710
  }
7682
7711
  };
7683
7712
  const runRasterPrint = async (printWindow, settings) => {
7684
- const colorFilter = chunkLY5535CF_js.computeColorFilter(settings.colorMode);
7685
- const slideIndices = chunkLY5535CF_js.filterHiddenSlideIndices(
7686
- chunkLY5535CF_js.computeSlideIndices(
7713
+ const colorFilter = chunk3WK4AE52_js.computeColorFilter(settings.colorMode);
7714
+ const slideIndices = chunk3WK4AE52_js.filterHiddenSlideIndices(
7715
+ chunk3WK4AE52_js.computeSlideIndices(
7687
7716
  settings.slideRange,
7688
7717
  activeSlideIndex,
7689
7718
  slides.length,
@@ -7694,11 +7723,11 @@ function usePrintHandlers(input) {
7694
7723
  includeHiddenSlides
7695
7724
  );
7696
7725
  if (settings.printWhat === "outline") {
7697
- chunkLY5535CF_js.finishPrintWindow(
7726
+ chunk3WK4AE52_js.finishPrintWindow(
7698
7727
  printWindow,
7699
- chunkLY5535CF_js.buildPrintHtmlDocument({
7728
+ chunk3WK4AE52_js.buildPrintHtmlDocument({
7700
7729
  title: "Outline",
7701
- bodyHtml: `<div class="outline-page">${chunkLY5535CF_js.buildOutlineHtml(slideIndices, slides)}</div>`,
7730
+ bodyHtml: `<div class="outline-page">${chunk3WK4AE52_js.buildOutlineHtml(slideIndices, slides)}</div>`,
7702
7731
  orientation: settings.orientation,
7703
7732
  colorFilter,
7704
7733
  frameSlides: settings.frameSlides,
@@ -7725,11 +7754,11 @@ function usePrintHandlers(input) {
7725
7754
  }
7726
7755
  const slideImages = slideIndices.map((idx) => allImages[idx]).filter(Boolean);
7727
7756
  if (settings.printWhat === "slides") {
7728
- chunkLY5535CF_js.finishPrintWindow(
7757
+ chunk3WK4AE52_js.finishPrintWindow(
7729
7758
  printWindow,
7730
- chunkLY5535CF_js.buildPrintHtmlDocument({
7759
+ chunk3WK4AE52_js.buildPrintHtmlDocument({
7731
7760
  title: "Slides",
7732
- bodyHtml: chunkLY5535CF_js.buildSlidesHtml(slideImages, slideIndices),
7761
+ bodyHtml: chunk3WK4AE52_js.buildSlidesHtml(slideImages, slideIndices),
7733
7762
  orientation: settings.orientation,
7734
7763
  colorFilter,
7735
7764
  frameSlides: settings.frameSlides,
@@ -7739,11 +7768,11 @@ function usePrintHandlers(input) {
7739
7768
  return;
7740
7769
  }
7741
7770
  if (settings.printWhat === "notes") {
7742
- chunkLY5535CF_js.finishPrintWindow(
7771
+ chunk3WK4AE52_js.finishPrintWindow(
7743
7772
  printWindow,
7744
- chunkLY5535CF_js.buildPrintHtmlDocument({
7773
+ chunk3WK4AE52_js.buildPrintHtmlDocument({
7745
7774
  title: "Notes Pages",
7746
- bodyHtml: chunkLY5535CF_js.buildNotesHtml(slideImages, slideIndices, slides),
7775
+ bodyHtml: chunk3WK4AE52_js.buildNotesHtml(slideImages, slideIndices, slides),
7747
7776
  orientation: "portrait",
7748
7777
  colorFilter,
7749
7778
  frameSlides: settings.frameSlides,
@@ -7754,11 +7783,11 @@ function usePrintHandlers(input) {
7754
7783
  }
7755
7784
  if (settings.printWhat === "handouts") {
7756
7785
  const spp = settings.slidesPerPage;
7757
- chunkLY5535CF_js.finishPrintWindow(
7786
+ chunk3WK4AE52_js.finishPrintWindow(
7758
7787
  printWindow,
7759
- chunkLY5535CF_js.buildPrintHtmlDocument({
7788
+ chunk3WK4AE52_js.buildPrintHtmlDocument({
7760
7789
  title: `Handout ${spp} per page`,
7761
- bodyHtml: chunkLY5535CF_js.buildHandoutsHtml(slideImages, slideIndices, spp, pptxData?.handoutMaster),
7790
+ bodyHtml: chunk3WK4AE52_js.buildHandoutsHtml(slideImages, slideIndices, spp, pptxData?.handoutMaster),
7762
7791
  orientation: "portrait",
7763
7792
  colorFilter,
7764
7793
  frameSlides: settings.frameSlides,
@@ -7772,7 +7801,7 @@ function usePrintHandlers(input) {
7772
7801
  };
7773
7802
  const handlePrintWithSettings = async (settings) => {
7774
7803
  setIsPrintDialogOpen(false);
7775
- const printWindow = chunkLY5535CF_js.openPendingPrintWindow(t("pptx.print.preparingToPrint"));
7804
+ const printWindow = chunk3WK4AE52_js.openPendingPrintWindow(t("pptx.print.preparingToPrint"));
7776
7805
  if (!printWindow) {
7777
7806
  console.warn(
7778
7807
  "[PowerPointViewer] Print window was blocked by the browser. Allow popups for this site to print."
@@ -7837,13 +7866,13 @@ function useThemeHandlers(input) {
7837
7866
  return;
7838
7867
  }
7839
7868
  await handler.updateThemeColorScheme(colorScheme);
7840
- const previousMap = theme?.colorScheme ? chunkLY5535CF_js.buildThemeColorMap(theme.colorScheme) : {};
7841
- setSlides((prev) => chunkLY5535CF_js.reResolveSlideColors(prev, previousMap, colorScheme));
7869
+ const previousMap = theme?.colorScheme ? chunk3WK4AE52_js.buildThemeColorMap(theme.colorScheme) : {};
7870
+ setSlides((prev) => chunk3WK4AE52_js.reResolveSlideColors(prev, previousMap, colorScheme));
7842
7871
  if (Object.keys(templateElementsBySlideId).length > 0) {
7843
7872
  setTemplateElementsBySlideId((prev) => {
7844
7873
  const next = {};
7845
7874
  for (const [slideId, elements] of Object.entries(prev)) {
7846
- next[slideId] = chunkLY5535CF_js.reResolveElementColors(elements, previousMap, colorScheme);
7875
+ next[slideId] = chunk3WK4AE52_js.reResolveElementColors(elements, previousMap, colorScheme);
7847
7876
  }
7848
7877
  return next;
7849
7878
  });
@@ -7952,7 +7981,7 @@ function useThemeSwitching(input) {
7952
7981
  }
7953
7982
  try {
7954
7983
  await handler.applyTheme(preset.colorScheme, preset.fontScheme, preset.name);
7955
- const newData = chunkLY5535CF_js.applyThemeToData(data, preset.colorScheme, preset.fontScheme, preset.name);
7984
+ const newData = chunk3WK4AE52_js.applyThemeToData(data, preset.colorScheme, preset.fontScheme, preset.name);
7956
7985
  onDataChange(newData);
7957
7986
  onThemeChanged?.(preset);
7958
7987
  } catch (error) {
@@ -7969,7 +7998,7 @@ function useThemeSwitching(input) {
7969
7998
  }
7970
7999
  try {
7971
8000
  await handler.applyTheme(colorScheme, fontScheme ?? {}, themeName);
7972
- const newData = chunkLY5535CF_js.applyThemeToData(data, colorScheme, fontScheme, themeName);
8001
+ const newData = chunk3WK4AE52_js.applyThemeToData(data, colorScheme, fontScheme, themeName);
7973
8002
  onDataChange(newData);
7974
8003
  } catch (error) {
7975
8004
  console.error("Failed to switch to custom theme:", error);
@@ -7981,12 +8010,12 @@ function useThemeSwitching(input) {
7981
8010
  if (!data?.theme?.colorScheme) {
7982
8011
  return void 0;
7983
8012
  }
7984
- return chunkLY5535CF_js.THEME_PRESETS.find(
7985
- (p) => chunkLY5535CF_js.themeColorSchemesEqual(data.theme?.colorScheme, p.colorScheme)
8013
+ return chunk3WK4AE52_js.THEME_PRESETS.find(
8014
+ (p) => chunk3WK4AE52_js.themeColorSchemesEqual(data.theme?.colorScheme, p.colorScheme)
7986
8015
  );
7987
8016
  }, [data?.theme?.colorScheme]);
7988
8017
  return {
7989
- presets: chunkLY5535CF_js.THEME_PRESETS,
8018
+ presets: chunk3WK4AE52_js.THEME_PRESETS,
7990
8019
  switchToPreset,
7991
8020
  switchToCustom,
7992
8021
  currentPreset
@@ -8061,7 +8090,7 @@ function usePropertyHandlers(input) {
8061
8090
  }
8062
8091
  try {
8063
8092
  const ab = await file.arrayBuffer();
8064
- const h = new chunkLY5535CF_js.PptxHandler();
8093
+ const h = new chunk3WK4AE52_js.PptxHandler();
8065
8094
  const other = await h.load(ab);
8066
8095
  if (!other) {
8067
8096
  return;
@@ -8071,7 +8100,7 @@ function usePropertyHandlers(input) {
8071
8100
  width: canvasSize.width,
8072
8101
  height: canvasSize.height
8073
8102
  };
8074
- setCompareResult(chunkLY5535CF_js.comparePresentation(cur, other));
8103
+ setCompareResult(chunk3WK4AE52_js.comparePresentation(cur, other));
8075
8104
  setIsComparePanelOpen(true);
8076
8105
  } catch (err) {
8077
8106
  console.warn("Compare failed:", err);
@@ -8088,7 +8117,7 @@ function usePropertyHandlers(input) {
8088
8117
  if (!diff || diff.status === "unchanged") {
8089
8118
  return;
8090
8119
  }
8091
- setSlides((prev) => chunkLY5535CF_js.applyAcceptSlide(prev, diff));
8120
+ setSlides((prev) => chunk3WK4AE52_js.applyAcceptSlide(prev, diff));
8092
8121
  setIsDirty(true);
8093
8122
  },
8094
8123
  [compareResult, setSlides, setIsDirty]
@@ -8099,10 +8128,10 @@ function usePropertyHandlers(input) {
8099
8128
  if (!compareResult) {
8100
8129
  return;
8101
8130
  }
8102
- setSlides((prev) => chunkLY5535CF_js.applyAcceptAllSlides(prev, compareResult));
8131
+ setSlides((prev) => chunk3WK4AE52_js.applyAcceptAllSlides(prev, compareResult));
8103
8132
  setIsDirty(true);
8104
8133
  }, [compareResult, setSlides, setIsDirty]);
8105
- const usedFontFamilies = react.useMemo(() => chunkLY5535CF_js.collectUsedFonts(slides), [slides]);
8134
+ const usedFontFamilies = react.useMemo(() => chunk3WK4AE52_js.collectUsedFonts(slides), [slides]);
8106
8135
  return {
8107
8136
  handleUpdateNotes,
8108
8137
  handleUpdateSlide,
@@ -8257,7 +8286,7 @@ function useViewerDialogs(input) {
8257
8286
  );
8258
8287
  const embeddedFontKey = (embeddedFontFamilies ?? []).join("\0");
8259
8288
  const fontEmbedding = react.useMemo(
8260
- () => chunkLY5535CF_js.describeFontEmbedding(embeddedFontKey ? embeddedFontKey.split("\0") : []),
8289
+ () => chunk3WK4AE52_js.describeFontEmbedding(embeddedFontKey ? embeddedFontKey.split("\0") : []),
8261
8290
  [embeddedFontKey]
8262
8291
  );
8263
8292
  const [embedFontsEnabled, setEmbedFontsEnabled] = react.useState(fontEmbedding.initialEnabled);
@@ -8267,11 +8296,11 @@ function useViewerDialogs(input) {
8267
8296
  setEmbedFontsEnabled(fontEmbedding.initialEnabled);
8268
8297
  }
8269
8298
  const [isNarrowViewport, setIsNarrowViewport] = react.useState(
8270
- () => typeof window !== "undefined" ? chunkLY5535CF_js.isMobileViewport(window.innerWidth, window.innerHeight, viewportIsTouch()) : false
8299
+ () => typeof window !== "undefined" ? chunk3WK4AE52_js.isMobileViewport(window.innerWidth, window.innerHeight, viewportIsTouch()) : false
8271
8300
  );
8272
8301
  react.useEffect(() => {
8273
8302
  const handleWindow = () => setIsNarrowViewport(
8274
- chunkLY5535CF_js.isMobileViewport(window.innerWidth, window.innerHeight, viewportIsTouch())
8303
+ chunk3WK4AE52_js.isMobileViewport(window.innerWidth, window.innerHeight, viewportIsTouch())
8275
8304
  );
8276
8305
  window.addEventListener("resize", handleWindow);
8277
8306
  return () => window.removeEventListener("resize", handleWindow);
@@ -8424,16 +8453,16 @@ function useViewerDialogs(input) {
8424
8453
  };
8425
8454
  }
8426
8455
  function computeGridSpacingPx2(documentGridSpacing) {
8427
- return chunkLY5535CF_js.computeGridSpacingPx(documentGridSpacing, chunkIK25LY4C_js.GRID_SIZE);
8456
+ return chunk3WK4AE52_js.computeGridSpacingPx(documentGridSpacing, chunkO27KNZLJ_js.GRID_SIZE);
8428
8457
  }
8429
8458
  function computeVisibleSlideIndexes(slides, activeCustomShowId, customShows, presentationProperties) {
8430
8459
  const activeShow = activeCustomShowId ? customShows.find((show) => show.id === activeCustomShowId) : void 0;
8431
- const authoredRange = chunkLY5535CF_js.resolveAuthoredSlideRange(presentationProperties, slides.length);
8432
- return chunkLY5535CF_js.resolveShowSlideIndexes(slides, activeShow, authoredRange);
8460
+ const authoredRange = chunk3WK4AE52_js.resolveAuthoredSlideRange(presentationProperties, slides.length);
8461
+ return chunk3WK4AE52_js.resolveShowSlideIndexes(slides, activeShow, authoredRange);
8433
8462
  }
8434
8463
  function computeSlideSectionGroups(slides, sections) {
8435
- return chunkLY5535CF_js.groupSlidesBySection(sections, slides).map((group) => ({
8436
- id: group.section?.id ?? (sections.length > 0 ? chunkIK25LY4C_js.UNGROUPED_SECTION_ID : chunkIK25LY4C_js.DEFAULT_SECTION_GROUP_ID),
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),
8437
8466
  label: group.section?.name ?? (sections.length > 0 ? "Ungrouped Slides" : "Slides"),
8438
8467
  slideIndexes: group.slideIndexes,
8439
8468
  ...group.section?.color !== void 0 ? { color: group.section.color } : {},
@@ -8445,7 +8474,7 @@ function computeMasterPseudoSlide(mode, activeLayout, activeMaster) {
8445
8474
  return void 0;
8446
8475
  }
8447
8476
  const document2 = activeLayout ? { slideMasters: [{ ...activeMaster, layouts: [activeLayout] }] } : { slideMasters: [activeMaster] };
8448
- return chunkLY5535CF_js.masterViewPseudoSlide(document2, {
8477
+ return chunk3WK4AE52_js.masterViewPseudoSlide(document2, {
8449
8478
  tab: "slides",
8450
8479
  masterIndex: 0,
8451
8480
  layoutIndex: activeLayout ? 0 : null
@@ -8473,15 +8502,15 @@ function useDerivedSlideState(input) {
8473
8502
  [slides, activeCustomShowId, customShows, presentationProperties]
8474
8503
  );
8475
8504
  const authoredRange = react.useMemo(
8476
- () => chunkLY5535CF_js.resolveAuthoredSlideRange(presentationProperties, slides.length),
8505
+ () => chunk3WK4AE52_js.resolveAuthoredSlideRange(presentationProperties, slides.length),
8477
8506
  [presentationProperties, slides.length]
8478
8507
  );
8479
8508
  const slideSectionGroups = react.useMemo(
8480
8509
  () => computeSlideSectionGroups(slides, sections).map((group) => {
8481
- if (group.id === chunkIK25LY4C_js.UNGROUPED_SECTION_ID && group.label === "Ungrouped Slides") {
8510
+ if (group.id === chunkO27KNZLJ_js.UNGROUPED_SECTION_ID && group.label === "Ungrouped Slides") {
8482
8511
  return { ...group, label: t("pptx.slides.ungroupedSlides") };
8483
8512
  }
8484
- if (group.id === chunkIK25LY4C_js.DEFAULT_SECTION_GROUP_ID && group.label === "Slides") {
8513
+ if (group.id === chunkO27KNZLJ_js.DEFAULT_SECTION_GROUP_ID && group.label === "Slides") {
8485
8514
  return { ...group, label: t("pptx.sections.slides") };
8486
8515
  }
8487
8516
  return group;
@@ -8582,13 +8611,13 @@ function useAnnotationHandlers(input) {
8582
8611
  }, [annotations, setMode, setSlides, history]);
8583
8612
  const handleSetMode = react.useCallback(
8584
8613
  (nextMode) => {
8585
- if (mode === "present" && nextMode !== "present" && !chunkLY5535CF_js.mayLeaveSlideShow()) {
8614
+ if (mode === "present" && nextMode !== "present" && !chunk3WK4AE52_js.mayLeaveSlideShow()) {
8586
8615
  return;
8587
8616
  }
8588
8617
  if (nextMode === "present") {
8589
8618
  presentation.enterPresentMode();
8590
8619
  } else if (mode === "present" && annotations.hasAnyAnnotations) {
8591
- chunkLY5535CF_js.stopAllPersistentAudio();
8620
+ chunk3WK4AE52_js.stopAllPersistentAudio();
8592
8621
  if (promptKeepInkAnnotations) {
8593
8622
  pendingModeAfterAnnotationsRef.current = nextMode;
8594
8623
  setShowKeepAnnotationsDialog(true);
@@ -8598,7 +8627,7 @@ function useAnnotationHandlers(input) {
8598
8627
  }
8599
8628
  } else {
8600
8629
  if (mode === "present") {
8601
- chunkLY5535CF_js.stopAllPersistentAudio();
8630
+ chunk3WK4AE52_js.stopAllPersistentAudio();
8602
8631
  }
8603
8632
  setMode(nextMode);
8604
8633
  }
@@ -8667,13 +8696,13 @@ function useSerialize(input) {
8667
8696
  let processedSlide = slide;
8668
8697
  if (pendingEditId) {
8669
8698
  const updatedElements = slide.elements.map((el) => {
8670
- if (el.id !== pendingEditId || !chunkLY5535CF_js.hasTextProperties(el)) {
8699
+ if (el.id !== pendingEditId || !chunk3WK4AE52_js.hasTextProperties(el)) {
8671
8700
  return el;
8672
8701
  }
8673
8702
  return {
8674
8703
  ...el,
8675
8704
  text: pendingEditText,
8676
- textSegments: chunkLY5535CF_js.remapTextToSegments(pendingEditText, el.textSegments, el.textStyle)
8705
+ textSegments: chunk3WK4AE52_js.remapTextToSegments(pendingEditText, el.textSegments, el.textStyle)
8677
8706
  };
8678
8707
  });
8679
8708
  if (updatedElements.some((el, i) => el !== slide.elements[i])) {
@@ -8686,19 +8715,19 @@ function useSerialize(input) {
8686
8715
  const pptxGuides = guides.map((g) => ({
8687
8716
  id: g.id,
8688
8717
  orientation: g.axis === "h" ? "horz" : "vert",
8689
- positionEmu: chunkLY5535CF_js.guidePxToEmu(g.position)
8718
+ positionEmu: chunk3WK4AE52_js.guidePxToEmu(g.position)
8690
8719
  }));
8691
8720
  return {
8692
8721
  ...processedSlide,
8693
8722
  guides: pptxGuides.length > 0 ? pptxGuides : void 0
8694
8723
  };
8695
8724
  });
8696
- const slidesToSave = chunkLY5535CF_js.buildSaveSlides(slidesWithGuides, templateElementsBySlideId);
8697
- const saveOptions = chunkLY5535CF_js.buildDeckSaveOptions({
8725
+ const slidesToSave = chunk3WK4AE52_js.buildSaveSlides(slidesWithGuides, templateElementsBySlideId);
8726
+ const saveOptions = chunk3WK4AE52_js.buildDeckSaveOptions({
8698
8727
  // Without this the Slide Size card edited a viewer-only pixel value and
8699
8728
  // the saved `p:sldSz` never moved: passing `slideSize` is the only way a
8700
8729
  // slide-size edit reaches the file.
8701
- slideSize: chunkLY5535CF_js.resolveSlideSizeSelection({ current: slideSizeEmu, canvas: canvasSize }).size,
8730
+ slideSize: chunk3WK4AE52_js.resolveSlideSizeSelection({ current: slideSizeEmu, canvas: canvasSize }).size,
8702
8731
  headerFooter,
8703
8732
  presentationProperties,
8704
8733
  viewProperties,
@@ -8717,7 +8746,7 @@ function useSerialize(input) {
8717
8746
  embedFonts,
8718
8747
  outputFormat: format
8719
8748
  });
8720
- return chunkLY5535CF_js.saveDeckWithPassword(handler, slidesToSave, saveOptions, { password, purpose });
8749
+ return chunk3WK4AE52_js.saveDeckWithPassword(handler, slidesToSave, saveOptions, { password, purpose });
8721
8750
  },
8722
8751
  [
8723
8752
  slides,
@@ -8758,7 +8787,7 @@ function useRecoveryDetection(input) {
8758
8787
  const onRestore = input.onRestore;
8759
8788
  const openVersionHistory = input.openVersionHistory;
8760
8789
  react.useEffect(() => {
8761
- if (!chunkLY5535CF_js.shouldProbeAutosaveRecovery({
8790
+ if (!chunk3WK4AE52_js.shouldProbeAutosaveRecovery({
8762
8791
  alreadyChecked: recoveryCheckedRef.current,
8763
8792
  filePath,
8764
8793
  loading,
@@ -8770,7 +8799,7 @@ function useRecoveryDetection(input) {
8770
8799
  }
8771
8800
  recoveryCheckedRef.current = true;
8772
8801
  void (async () => {
8773
- const offer = await chunkLY5535CF_js.probeAutosaveRecovery(filePath);
8802
+ const offer = await chunk3WK4AE52_js.probeAutosaveRecovery(filePath);
8774
8803
  if (!offer) {
8775
8804
  return;
8776
8805
  }
@@ -8783,7 +8812,7 @@ function useRecoveryDetection(input) {
8783
8812
  const record = recordRef.current;
8784
8813
  setPrompt(null);
8785
8814
  if (record && onRestore) {
8786
- onRestore(chunkLY5535CF_js.acceptAutosaveRecovery(record));
8815
+ onRestore(chunk3WK4AE52_js.acceptAutosaveRecovery(record));
8787
8816
  }
8788
8817
  recordRef.current = null;
8789
8818
  }, [onRestore]);
@@ -8792,7 +8821,7 @@ function useRecoveryDetection(input) {
8792
8821
  setPrompt(null);
8793
8822
  recordRef.current = null;
8794
8823
  if (record) {
8795
- void chunkLY5535CF_js.discardAutosaveRecovery(record);
8824
+ void chunk3WK4AE52_js.discardAutosaveRecovery(record);
8796
8825
  }
8797
8826
  }, []);
8798
8827
  return { prompt, restore, discard };
@@ -8815,12 +8844,14 @@ function usePresentationSetup(input) {
8815
8844
  setSlides,
8816
8845
  history,
8817
8846
  endWithBlackSlide = true,
8847
+ pixelateMosaicAnimation = false,
8818
8848
  promptKeepInkAnnotations = true,
8819
8849
  popupToolbarEnabled = true,
8820
8850
  onToggleSubtitles,
8821
8851
  customShows = [],
8822
8852
  activeCustomShowId = null,
8823
- onSetActiveCustomShowId
8853
+ onSetActiveCustomShowId,
8854
+ onAddRunProgramNotice
8824
8855
  } = input;
8825
8856
  const actionSoundHandlerRef = react.useRef(null);
8826
8857
  const exitModeHandlerRef = react.useRef(null);
@@ -8836,15 +8867,16 @@ function usePresentationSetup(input) {
8836
8867
  visibleSlideIndexes,
8837
8868
  canvasSize,
8838
8869
  themeColorMap,
8870
+ pixelateMosaicAnimation,
8839
8871
  activeSlideIndex,
8840
8872
  containerRef,
8841
8873
  content,
8842
8874
  onSetMode: (nextMode) => {
8843
- if (mode === "present" && nextMode !== "present" && !chunkLY5535CF_js.mayLeaveSlideShow()) {
8875
+ if (mode === "present" && nextMode !== "present" && !chunk3WK4AE52_js.mayLeaveSlideShow()) {
8844
8876
  return;
8845
8877
  }
8846
8878
  if (mode === "present" && nextMode !== "present") {
8847
- chunkLY5535CF_js.stopAllPersistentAudio();
8879
+ chunk3WK4AE52_js.stopAllPersistentAudio();
8848
8880
  stopAnimationSound();
8849
8881
  const exitHandler = exitModeHandlerRef.current;
8850
8882
  if (exitHandler) {
@@ -8912,16 +8944,17 @@ function usePresentationSetup(input) {
8912
8944
  onToggleToolbar: () => annotations.setToolbarVisible(!annotations.toolbarVisible),
8913
8945
  onToggleSubtitles,
8914
8946
  onSaveRehearsalTimings: (timings) => {
8915
- setSlides((prev) => chunkLY5535CF_js.applyRehearsalTimings(prev, timings));
8947
+ setSlides((prev) => chunk3WK4AE52_js.applyRehearsalTimings(prev, timings));
8916
8948
  history.markDirty();
8917
8949
  },
8918
- loopContinuously: chunkLY5535CF_js.shouldLoopContinuously(presentationProperties),
8950
+ loopContinuously: chunk3WK4AE52_js.shouldLoopContinuously(presentationProperties),
8919
8951
  showWithAnimation: presentationProperties.showWithAnimation,
8920
8952
  useTimings: presentationProperties.advanceMode !== "manual",
8921
8953
  endWithBlackSlide,
8922
8954
  customShows,
8923
8955
  activeCustomShowId,
8924
- onSetActiveCustomShowId
8956
+ onSetActiveCustomShowId,
8957
+ onAddRunProgramNotice
8925
8958
  });
8926
8959
  return {
8927
8960
  presentation,
@@ -9121,7 +9154,7 @@ function useEditorOperations(input) {
9121
9154
  const { formatPainterActive, setFormatPainterActive, elementLookup } = state;
9122
9155
  react.useEffect(() => {
9123
9156
  if (formatPainterActive && !prevFormatPainterRef.current && selectedElement) {
9124
- copiedFormatRef.current = chunkLY5535CF_js.copyFormatFromElement(selectedElement);
9157
+ copiedFormatRef.current = chunk3WK4AE52_js.copyFormatFromElement(selectedElement);
9125
9158
  } else if (!formatPainterActive) {
9126
9159
  copiedFormatRef.current = null;
9127
9160
  }
@@ -9147,12 +9180,12 @@ function useEditorOperations(input) {
9147
9180
  e.stopPropagation();
9148
9181
  const element = elementLookup.get(elementId);
9149
9182
  if (element) {
9150
- const updated = chunkLY5535CF_js.applyFormatToElement(element, copiedFormatRef.current);
9183
+ const updated = chunk3WK4AE52_js.applyFormatToElement(element, copiedFormatRef.current);
9151
9184
  const updates = {};
9152
- if (chunkLY5535CF_js.hasShapeProperties(updated)) {
9185
+ if (chunk3WK4AE52_js.hasShapeProperties(updated)) {
9153
9186
  updates.shapeStyle = updated.shapeStyle;
9154
9187
  }
9155
- if (chunkLY5535CF_js.hasTextProperties(updated)) {
9188
+ if (chunk3WK4AE52_js.hasTextProperties(updated)) {
9156
9189
  updates.textStyle = updated.textStyle;
9157
9190
  }
9158
9191
  ops.updateElementById(elementId, updates);
@@ -9336,10 +9369,10 @@ function useFontInjection({ embeddedFonts, slides }) {
9336
9369
  }
9337
9370
  };
9338
9371
  }, [embeddedFonts]);
9339
- const referencedFamilies = react.useMemo(() => chunkLY5535CF_js.collectReferencedFontFamilies(slides), [slides]);
9372
+ const referencedFamilies = react.useMemo(() => chunk3WK4AE52_js.collectReferencedFontFamilies(slides), [slides]);
9340
9373
  react.useEffect(() => {
9341
9374
  let cancelled = false;
9342
- void chunkLY5535CF_js.resolveGoogleWebfontHref(slides, embeddedFonts).then((href) => {
9375
+ void chunk3WK4AE52_js.resolveGoogleWebfontHref(slides, embeddedFonts).then((href) => {
9343
9376
  if (cancelled) {
9344
9377
  return null;
9345
9378
  }
@@ -9529,7 +9562,7 @@ function useKeyboardShortcuts(input) {
9529
9562
  inputRef.current = input;
9530
9563
  const handleKeyDown = react.useCallback((e) => {
9531
9564
  const current = inputRef.current;
9532
- const startAction = chunkLY5535CF_js.mapSlideShowStartKey(e, { isPresenting: current.mode === "present" });
9565
+ const startAction = chunk3WK4AE52_js.mapSlideShowStartKey(e, { isPresenting: current.mode === "present" });
9533
9566
  if (startAction !== null) {
9534
9567
  e.preventDefault();
9535
9568
  if (startAction === "fromBeginning") {
@@ -9539,7 +9572,7 @@ function useKeyboardShortcuts(input) {
9539
9572
  }
9540
9573
  return;
9541
9574
  }
9542
- const { action, dx, dy } = chunkLY5535CF_js.mapEditorKey(e, {
9575
+ const { action, dx, dy } = chunk3WK4AE52_js.mapEditorKey(e, {
9543
9576
  canEdit: current.canEdit,
9544
9577
  // The Slide Master view is an editing surface, not a viewing one.
9545
9578
  // Gating on `mode !== 'edit'` alone made `mapEditorKey` return
@@ -9552,7 +9585,7 @@ function useKeyboardShortcuts(input) {
9552
9585
  hasSelection: current.hasSelection,
9553
9586
  isEditingText: Boolean(current.inlineEditingElementId || current.tableEditorState?.isEditing),
9554
9587
  isDrawing: current.activeTool !== "select",
9555
- isTextInputTarget: chunkLY5535CF_js.isEditorTextInputTarget(e.target)
9588
+ isTextInputTarget: chunk3WK4AE52_js.isEditorTextInputTarget(e.target)
9556
9589
  });
9557
9590
  if (action === null) {
9558
9591
  return;
@@ -9882,7 +9915,7 @@ function useViewerIntegration(input) {
9882
9915
  return zoom.scale;
9883
9916
  },
9884
9917
  setZoom(level) {
9885
- zoom.setScale(chunkLY5535CF_js.clampZoomScale(level));
9918
+ zoom.setScale(chunk3WK4AE52_js.clampZoomScale(level));
9886
9919
  },
9887
9920
  zoomIn() {
9888
9921
  zoom.handleZoomIn();
@@ -10100,7 +10133,7 @@ function useReducedMotion() {
10100
10133
  }
10101
10134
  function useViewerOptions() {
10102
10135
  const storeRef = react.useRef(null);
10103
- storeRef.current ??= chunkLY5535CF_js.createViewerOptionsStore();
10136
+ storeRef.current ??= chunk3WK4AE52_js.createViewerOptionsStore();
10104
10137
  const store = storeRef.current;
10105
10138
  const options = react.useSyncExternalStore(
10106
10139
  (onStoreChange) => store.subscribe(onStoreChange),
@@ -10109,9 +10142,9 @@ function useViewerOptions() {
10109
10142
  );
10110
10143
  return { optionsStore: store, options };
10111
10144
  }
10112
- var KNOWN_TAB_IDS = new Set(chunkLY5535CF_js.TOOLBAR_TABS.map((tab) => tab.id));
10145
+ var KNOWN_TAB_IDS = new Set(chunk3WK4AE52_js.TOOLBAR_TABS.map((tab) => tab.id));
10113
10146
  function computeToolbarVisibility(hiddenActions, hiddenTabIds = []) {
10114
- const isHidden = (id) => chunkLY5535CF_js.isActionHidden(id, hiddenActions);
10147
+ const isHidden = (id) => chunk3WK4AE52_js.isActionHidden(id, hiddenActions);
10115
10148
  const userHidden = new Set(hiddenTabIds);
10116
10149
  userHidden.delete("file");
10117
10150
  const isTabVisible = (id) => !KNOWN_TAB_IDS.has(id) || !isHidden(id) && !userHidden.has(id);
@@ -10204,12 +10237,12 @@ function useYjsDocumentSync({
10204
10237
  return;
10205
10238
  }
10206
10239
  try {
10207
- const handler = new chunkLY5535CF_js.PptxHandler();
10240
+ const handler = new chunk3WK4AE52_js.PptxHandler();
10208
10241
  await handler.load(sourceBytes.buffer);
10209
- const currentSlides = chunkLY5535CF_js.readSlidesFromYDoc(
10242
+ const currentSlides = chunk3WK4AE52_js.readSlidesFromYDoc(
10210
10243
  doc
10211
10244
  );
10212
- const slidesToSave = chunkLY5535CF_js.buildSaveSlides(currentSlides, templateElementsBySlideId);
10245
+ const slidesToSave = chunk3WK4AE52_js.buildSaveSlides(currentSlides, templateElementsBySlideId);
10213
10246
  const bytes = await handler.save(slidesToSave, getSaveOptions?.());
10214
10247
  config.onWriteBack(bytes);
10215
10248
  } catch {
@@ -10224,10 +10257,10 @@ function useYjsDocumentSync({
10224
10257
  if (!doc || !isConnected) {
10225
10258
  return;
10226
10259
  }
10227
- const docSlides = chunkLY5535CF_js.readSlidesFromYDoc(
10260
+ const docSlides = chunk3WK4AE52_js.readSlidesFromYDoc(
10228
10261
  doc
10229
10262
  );
10230
- if (!chunkLY5535CF_js.shouldRoomSlidesReplaceLoad(loadOrigin, docSlides.length)) {
10263
+ if (!chunk3WK4AE52_js.shouldRoomSlidesReplaceLoad(loadOrigin, docSlides.length)) {
10231
10264
  return;
10232
10265
  }
10233
10266
  lastSyncedRef.current = JSON.stringify(docSlides);
@@ -10246,11 +10279,11 @@ function useYjsDocumentSync({
10246
10279
  lastSyncedRef.current = serialized;
10247
10280
  void (async () => {
10248
10281
  const factories = await getFactories();
10249
- chunkLY5535CF_js.reconcileSlidesInYDoc(
10282
+ chunk3WK4AE52_js.reconcileSlidesInYDoc(
10250
10283
  slides,
10251
10284
  doc,
10252
10285
  factories,
10253
- chunkLY5535CF_js.LOCAL_SYNC_ORIGIN
10286
+ chunk3WK4AE52_js.LOCAL_SYNC_ORIGIN
10254
10287
  );
10255
10288
  scheduleWriteBack();
10256
10289
  })();
@@ -10264,10 +10297,10 @@ function useYjsDocumentSync({
10264
10297
  return;
10265
10298
  }
10266
10299
  const handleChange = (_events, transaction) => {
10267
- if (transaction?.origin === chunkLY5535CF_js.LOCAL_SYNC_ORIGIN) {
10300
+ if (transaction?.origin === chunk3WK4AE52_js.LOCAL_SYNC_ORIGIN) {
10268
10301
  return;
10269
10302
  }
10270
- const remoteSlides = chunkLY5535CF_js.readSlidesFromYDoc(
10303
+ const remoteSlides = chunk3WK4AE52_js.readSlidesFromYDoc(
10271
10304
  doc
10272
10305
  );
10273
10306
  if (remoteSlides.length === 0) {
@@ -10283,7 +10316,7 @@ function useYjsDocumentSync({
10283
10316
  isApplyingRemoteRef.current = false;
10284
10317
  scheduleWriteBack();
10285
10318
  };
10286
- const unobserve = chunkLY5535CF_js.observeYDocSlides(
10319
+ const unobserve = chunk3WK4AE52_js.observeYDocSlides(
10287
10320
  doc,
10288
10321
  handleChange
10289
10322
  );
@@ -10321,7 +10354,7 @@ function useBroadcastFollower({
10321
10354
  if (!broadcaster) {
10322
10355
  return;
10323
10356
  }
10324
- if (!chunkLY5535CF_js.shouldAutoFollowBroadcaster({
10357
+ if (!chunk3WK4AE52_js.shouldAutoFollowBroadcaster({
10325
10358
  localRole: collab.config.role,
10326
10359
  broadcasterRole: broadcaster.role
10327
10360
  })) {
@@ -10492,7 +10525,7 @@ function subscribeTouchCapability(callback) {
10492
10525
  function useIsMobile() {
10493
10526
  const isTouchDevice = react.useSyncExternalStore(
10494
10527
  subscribeTouchCapability,
10495
- chunkLY5535CF_js.detectTouchDevice,
10528
+ chunk3WK4AE52_js.detectTouchDevice,
10496
10529
  () => false
10497
10530
  // server snapshot
10498
10531
  );
@@ -10502,7 +10535,7 @@ function useIsMobile() {
10502
10535
  const [viewportHeight, setViewportHeight] = react.useState(
10503
10536
  () => typeof window === "undefined" ? 768 : window.innerHeight
10504
10537
  );
10505
- const [orientation, setOrientation] = react.useState(chunkLY5535CF_js.detectOrientation);
10538
+ const [orientation, setOrientation] = react.useState(chunk3WK4AE52_js.detectOrientation);
10506
10539
  const [isVirtualKeyboardOpen, setIsVirtualKeyboardOpen] = react.useState(false);
10507
10540
  const [initialViewportHeight] = react.useState(
10508
10541
  () => typeof window !== "undefined" ? window.innerHeight : 800
@@ -10523,7 +10556,7 @@ function useIsMobile() {
10523
10556
  return;
10524
10557
  }
10525
10558
  const handleOrientationChange = () => {
10526
- setOrientation(chunkLY5535CF_js.detectOrientation());
10559
+ setOrientation(chunk3WK4AE52_js.detectOrientation());
10527
10560
  };
10528
10561
  if (screen.orientation) {
10529
10562
  screen.orientation.addEventListener("change", handleOrientationChange);
@@ -10553,7 +10586,7 @@ function useIsMobile() {
10553
10586
  window.addEventListener("resize", handleResize);
10554
10587
  return () => window.removeEventListener("resize", handleResize);
10555
10588
  }, [isTouchDevice, initialViewportHeight]);
10556
- const { isMobile, isTablet, isDesktop } = chunkLY5535CF_js.deriveViewportBreakpoints(
10589
+ const { isMobile, isTablet, isDesktop } = chunk3WK4AE52_js.deriveViewportBreakpoints(
10557
10590
  viewportWidth,
10558
10591
  viewportHeight,
10559
10592
  isTouchDevice
@@ -10584,10 +10617,10 @@ function useTouchGestures(input) {
10584
10617
  if (!el || !enabled) {
10585
10618
  return;
10586
10619
  }
10587
- const recognizer = chunkLY5535CF_js.createTouchGestureRecognizer({
10620
+ const recognizer = chunk3WK4AE52_js.createTouchGestureRecognizer({
10588
10621
  getScale: () => scaleRef.current,
10589
- minScale: chunkLY5535CF_js.MIN_ZOOM_SCALE,
10590
- maxScale: chunkLY5535CF_js.MAX_ZOOM_SCALE,
10622
+ minScale: chunk3WK4AE52_js.MIN_ZOOM_SCALE,
10623
+ maxScale: chunk3WK4AE52_js.MAX_ZOOM_SCALE,
10591
10624
  callbacks: {
10592
10625
  onPinchZoom: (newScale) => callbacksRef.current.onPinchZoom?.(newScale),
10593
10626
  onSwipe: (direction) => callbacksRef.current.onSwipe?.(direction),
@@ -10627,7 +10660,7 @@ function scrollFocusedIntoView(keyboardInset) {
10627
10660
  return;
10628
10661
  }
10629
10662
  const rect = active.getBoundingClientRect();
10630
- const delta = chunkLY5535CF_js.computeScrollDelta(
10663
+ const delta = chunk3WK4AE52_js.computeScrollDelta(
10631
10664
  { top: rect.top, bottom: rect.bottom },
10632
10665
  window.innerHeight,
10633
10666
  keyboardInset
@@ -10647,8 +10680,8 @@ function useKeyboardInsets(enabled = true) {
10647
10680
  return;
10648
10681
  }
10649
10682
  const update = () => {
10650
- const metrics = chunkLY5535CF_js.readViewportMetrics(window);
10651
- const inset = metrics ? chunkLY5535CF_js.computeKeyboardInset(metrics) : 0;
10683
+ const metrics = chunk3WK4AE52_js.readViewportMetrics(window);
10684
+ const inset = metrics ? chunk3WK4AE52_js.computeKeyboardInset(metrics) : 0;
10652
10685
  setKeyboardInset(inset);
10653
10686
  if (inset > 0) {
10654
10687
  window.requestAnimationFrame(() => scrollFocusedIntoView(inset));
@@ -10659,8 +10692,8 @@ function useKeyboardInsets(enabled = true) {
10659
10692
  vv.addEventListener("scroll", update);
10660
10693
  const onFocusIn = () => {
10661
10694
  window.requestAnimationFrame(() => {
10662
- const metrics = chunkLY5535CF_js.readViewportMetrics(window);
10663
- const inset = metrics ? chunkLY5535CF_js.computeKeyboardInset(metrics) : 0;
10695
+ const metrics = chunk3WK4AE52_js.readViewportMetrics(window);
10696
+ const inset = metrics ? chunk3WK4AE52_js.computeKeyboardInset(metrics) : 0;
10664
10697
  if (inset > 0) {
10665
10698
  scrollFocusedIntoView(inset);
10666
10699
  }
@@ -10673,7 +10706,7 @@ function useKeyboardInsets(enabled = true) {
10673
10706
  document.removeEventListener("focusin", onFocusIn);
10674
10707
  };
10675
10708
  }, [enabled]);
10676
- return { keyboardInset, isKeyboardOpen: chunkLY5535CF_js.isKeyboardOpen(keyboardInset) };
10709
+ return { keyboardInset, isKeyboardOpen: chunk3WK4AE52_js.isKeyboardOpen(keyboardInset) };
10677
10710
  }
10678
10711
 
10679
10712
  // src/viewer/hooks/useViewerBuildingBlocks-canvas-props.ts
@@ -10702,21 +10735,21 @@ function buildCanvasProps(input) {
10702
10735
  } = input;
10703
10736
  const effectiveSlide = mode === "master" ? masterPseudoSlide : activeSlide;
10704
10737
  const effectiveTemplateElements = mode === "master" ? s.activeLayout ? s.activeMaster?.elements ?? [] : [] : templateElements;
10705
- const fieldContext = chunkLY5535CF_js.buildFieldSubstitutionContext({
10738
+ const fieldContext = chunk3WK4AE52_js.buildFieldSubstitutionContext({
10706
10739
  headerFooter: s.headerFooter,
10707
10740
  customProperties: s.customProperties,
10708
10741
  slide: activeSlide
10709
10742
  });
10710
10743
  const tableStyleContext = s.theme || s.tableStyleMap ? { theme: s.theme, tableStyleMap: s.tableStyleMap } : void 0;
10711
10744
  const openExternalUrl = (url, target) => {
10712
- if (chunkLY5535CF_js.shouldConfirmExternalHyperlink(viewerOptions, url) && !window.confirm(buildHyperlinkConfirmMessage(url))) {
10745
+ if (chunk3WK4AE52_js.shouldConfirmExternalHyperlink(viewerOptions, url) && !window.confirm(buildHyperlinkConfirmMessage(url))) {
10713
10746
  return;
10714
10747
  }
10715
- chunkLY5535CF_js.safeOpenUrl(url, target);
10748
+ chunk3WK4AE52_js.safeOpenUrl(url, target);
10716
10749
  };
10717
10750
  const handleActionClick = (elementId, action) => {
10718
10751
  if (mode === "present") {
10719
- const resolved = chunkLY5535CF_js.resolvePresentationAction(action, { slideCount: slides.length });
10752
+ const resolved = chunk3WK4AE52_js.resolvePresentationAction(action, { slideCount: slides.length });
10720
10753
  if (resolved.intent.kind === "openUrl") {
10721
10754
  openExternalUrl(resolved.intent.url);
10722
10755
  return;
@@ -10727,9 +10760,9 @@ function buildCanvasProps(input) {
10727
10760
  }
10728
10761
  };
10729
10762
  const handleHyperlinkClick = (url, target) => {
10730
- if (chunkLY5535CF_js.isPpactionUrl(url)) {
10763
+ if (chunk3WK4AE52_js.isPpactionUrl(url)) {
10731
10764
  if (mode === "present") {
10732
- const parsed = chunkLY5535CF_js.parsePpactionUrl(url);
10765
+ const parsed = chunk3WK4AE52_js.parsePpactionUrl(url);
10733
10766
  if (parsed) {
10734
10767
  presentation.handlePresentationAction({
10735
10768
  action: parsed.action,
@@ -10835,7 +10868,7 @@ function buildCanvasProps(input) {
10835
10868
 
10836
10869
  // src/viewer/hooks/useScopedLayoutOptions.ts
10837
10870
  function scopeLayoutOptionsToActiveSlide(options, activeSlide) {
10838
- return chunkLY5535CF_js.scopeLayoutOptionsToSlide(options, activeSlide?.layoutPath);
10871
+ return chunk3WK4AE52_js.scopeLayoutOptionsToSlide(options, activeSlide?.layoutPath);
10839
10872
  }
10840
10873
 
10841
10874
  // src/viewer/hooks/useViewerBuildingBlocks-toolbar-handlers.ts
@@ -10848,7 +10881,7 @@ function buildToolbarAnimationHandlers(input) {
10848
10881
  const current = activeSlide.animations ?? [];
10849
10882
  if (group === "motionPath") {
10850
10883
  propertyHandlers.handleUpdateSlide({
10851
- animations: chunkLY5535CF_js.applyMotionPathPreset(current, selectedElement.id, preset)
10884
+ animations: chunk3WK4AE52_js.applyMotionPathPreset(current, selectedElement.id, preset)
10852
10885
  });
10853
10886
  return;
10854
10887
  }
@@ -11044,7 +11077,7 @@ function buildToolbarProps(input) {
11044
11077
  onOpenFile,
11045
11078
  onOpenRecentFile,
11046
11079
  onCreatePresentation: (templateId) => {
11047
- s.setSlides(chunkLY5535CF_js.createBackstagePresentation(templateId));
11080
+ s.setSlides(chunk3WK4AE52_js.createBackstagePresentation(templateId));
11048
11081
  s.setActiveSlideIndex(0);
11049
11082
  s.setSelectedElementId(null);
11050
11083
  s.setSelectedElementIds([]);
@@ -11074,7 +11107,7 @@ function buildToolbarProps(input) {
11074
11107
  loadLayoutPreviews: input.loadLayoutPreviews,
11075
11108
  onInsertSlideFromLayout: slideOps.handleInsertSlideFromLayout,
11076
11109
  onInsertSlideFromTemplate: slideOps.handleInsertSlideFromTemplate,
11077
- templateScheme: chunkLY5535CF_js.templateSchemeFromTheme(s.theme?.colorScheme),
11110
+ templateScheme: chunk3WK4AE52_js.templateSchemeFromTheme(s.theme?.colorScheme),
11078
11111
  customShows: s.customShows,
11079
11112
  activeCustomShowId: s.activeCustomShowId,
11080
11113
  onSetActiveCustomShowId: s.setActiveCustomShowId,
@@ -11115,7 +11148,7 @@ function buildToolbarProps(input) {
11115
11148
  isCommentsPanelOpen: s.isInspectorPaneOpen,
11116
11149
  slideCommentCount: activeSlide?.comments?.length ?? 0,
11117
11150
  formatPainterActive: s.formatPainterActive,
11118
- canActivateFormatPainter: chunkLY5535CF_js.hasCopyableFormat(selectedElement),
11151
+ canActivateFormatPainter: chunk3WK4AE52_js.hasCopyableFormat(selectedElement),
11119
11152
  onToggleFormatPainter: () => s.setFormatPainterActive((p) => !p),
11120
11153
  isSelectionPaneOpen: s.isSelectionPaneOpen,
11121
11154
  onToggleSelectionPane: () => s.setIsSelectionPaneOpen((p) => !p),
@@ -11193,7 +11226,7 @@ function useViewerBuildingBlocksCore(input) {
11193
11226
  headerFooter: state.headerFooter,
11194
11227
  loading,
11195
11228
  error,
11196
- maxHistoryEntries: chunkLY5535CF_js.resolveHistoryDepth(viewerOptions),
11229
+ maxHistoryEntries: chunk3WK4AE52_js.resolveHistoryDepth(viewerOptions),
11197
11230
  hasActivePointerInteraction,
11198
11231
  pointerCommitNonce: state.pointerCommitNonce,
11199
11232
  onDirty: markDocumentDirty,
@@ -11218,7 +11251,7 @@ function useViewerBuildingBlocksCore(input) {
11218
11251
  documentGridSpacing: state.viewProperties?.gridSpacing
11219
11252
  });
11220
11253
  const themeColorMap = react.useMemo(
11221
- () => state.theme?.colorScheme ? chunkLY5535CF_js.buildThemeColorMap(state.theme.colorScheme) : void 0,
11254
+ () => state.theme?.colorScheme ? chunk3WK4AE52_js.buildThemeColorMap(state.theme.colorScheme) : void 0,
11222
11255
  [state.theme?.colorScheme]
11223
11256
  );
11224
11257
  const { presentation, annotations, actionSoundHandlerRef, setExitModeHandler } = usePresentationSetup({
@@ -11267,7 +11300,7 @@ function useViewerBuildingBlocksCore(input) {
11267
11300
  gridSpacingPx,
11268
11301
  // Multiplied against the pre-existing 2x baseline; see the matching
11269
11302
  // comment in `PowerPointViewer.tsx`.
11270
- imageExportScale: 2 * chunkLY5535CF_js.resolveImageResolutionScale(viewerOptions),
11303
+ imageExportScale: 2 * chunk3WK4AE52_js.resolveImageResolutionScale(viewerOptions),
11271
11304
  viewerOptions
11272
11305
  };
11273
11306
  }
@@ -11283,7 +11316,7 @@ function useCompatibilityToastsState() {
11283
11316
  }
11284
11317
  function useReadOnlyRecommendationState(content) {
11285
11318
  const [recommendation, setRecommendation] = react.useState(
11286
- () => chunkLY5535CF_js.readOnlyRecommendation(void 0)
11319
+ () => chunk3WK4AE52_js.readOnlyRecommendation(void 0)
11287
11320
  );
11288
11321
  const [modifyVerifier, setModifyVerifier] = react.useState(void 0);
11289
11322
  const [bannerHidden, setBannerHidden] = react.useState(false);
@@ -11323,7 +11356,7 @@ function useReadOnlyRecommendationState(content) {
11323
11356
  async (password) => {
11324
11357
  setCheckingPassword(true);
11325
11358
  try {
11326
- const result = await chunkLY5535CF_js.checkModifyPassword(modifyVerifier, password);
11359
+ const result = await chunk3WK4AE52_js.checkModifyPassword(modifyVerifier, password);
11327
11360
  if (result.ok) {
11328
11361
  unlock();
11329
11362
  } else {
@@ -11368,9 +11401,9 @@ function useViewPreferencesSync(input) {
11368
11401
  setShowGuides
11369
11402
  } = input;
11370
11403
  react.useEffect(() => {
11371
- const seeded = chunkLY5535CF_js.viewerPreferencesFromViewProperties(
11404
+ const seeded = chunk3WK4AE52_js.viewerPreferencesFromViewProperties(
11372
11405
  { viewProperties },
11373
- { ...chunkLY5535CF_js.DEFAULT_VIEWER_PREFERENCES, snapToGrid, snapToObjects: snapToShape, showGuides }
11406
+ { ...chunk3WK4AE52_js.DEFAULT_VIEWER_PREFERENCES, snapToGrid, snapToObjects: snapToShape, showGuides }
11374
11407
  );
11375
11408
  setSnapToGrid(seeded.snapToGrid);
11376
11409
  setSnapToShape(seeded.snapToObjects ?? snapToShape);
@@ -11380,7 +11413,7 @@ function useViewPreferencesSync(input) {
11380
11413
  (prefsOverride) => {
11381
11414
  setViewProperties((prev) => {
11382
11415
  const merged = {
11383
- ...chunkLY5535CF_js.DEFAULT_VIEWER_PREFERENCES,
11416
+ ...chunk3WK4AE52_js.DEFAULT_VIEWER_PREFERENCES,
11384
11417
  snapToGrid,
11385
11418
  snapToObjects: snapToShape,
11386
11419
  showGuides,
@@ -11388,7 +11421,7 @@ function useViewPreferencesSync(input) {
11388
11421
  gridSpacingCy: prev?.gridSpacing?.cy,
11389
11422
  ...prefsOverride
11390
11423
  };
11391
- const patch = chunkLY5535CF_js.viewPropertiesPatchFromPreferences(merged);
11424
+ const patch = chunk3WK4AE52_js.viewPropertiesPatchFromPreferences(merged);
11392
11425
  return {
11393
11426
  ...prev,
11394
11427
  slideViewPr: { ...prev?.slideViewPr, ...patch.slideViewPr },
@@ -11607,7 +11640,7 @@ function useViewerBuildingBlocks(input) {
11607
11640
  }, [incomingContent]);
11608
11641
  const onOpenFile = react.useCallback(() => {
11609
11642
  void (async () => {
11610
- const picked = await chunkLY5535CF_js.openPptxFile();
11643
+ const picked = await chunk3WK4AE52_js.openPptxFile();
11611
11644
  if (picked) {
11612
11645
  setContent(picked.buffer);
11613
11646
  }
@@ -11615,7 +11648,7 @@ function useViewerBuildingBlocks(input) {
11615
11648
  }, []);
11616
11649
  const onOpenRecentFile = react.useCallback((key) => {
11617
11650
  void (async () => {
11618
- const bytes = await chunkLY5535CF_js.readBackstageRecentFile(key);
11651
+ const bytes = await chunk3WK4AE52_js.readBackstageRecentFile(key);
11619
11652
  if (bytes) {
11620
11653
  setContent(bytes);
11621
11654
  }