pptx-react-viewer 3.8.0 → 3.10.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 (184) hide show
  1. package/CHANGELOG.md +16 -0
  2. package/dist/{AiChatPanel-A5DCEHTO.mjs → AiChatPanel-BQSUE2OO.mjs} +4 -4
  3. package/dist/AiChatPanel-BQSUE2OO.mjs.br +0 -0
  4. package/dist/AiChatPanel-BQSUE2OO.mjs.gz +0 -0
  5. package/dist/{AiChatPanel-XLQM4BQJ.js → AiChatPanel-NSVSBJC7.js} +25 -25
  6. package/dist/AiChatPanel-NSVSBJC7.js.br +0 -0
  7. package/dist/AiChatPanel-NSVSBJC7.js.gz +0 -0
  8. package/dist/{Area3DChartScene-5CMEMIBI.mjs → Area3DChartScene-2FQHPGNE.mjs} +21 -4
  9. package/dist/Area3DChartScene-2FQHPGNE.mjs.br +0 -0
  10. package/dist/Area3DChartScene-2FQHPGNE.mjs.gz +0 -0
  11. package/dist/{Area3DChartScene-RZ3V3WOR.js → Area3DChartScene-V3W2V7N5.js} +21 -4
  12. package/dist/Area3DChartScene-V3W2V7N5.js.br +0 -0
  13. package/dist/Area3DChartScene-V3W2V7N5.js.gz +0 -0
  14. package/dist/{Bar3DChartScene-KHCQ6TEC.js → Bar3DChartScene-55XMAUC7.js} +21 -4
  15. package/dist/Bar3DChartScene-55XMAUC7.js.br +0 -0
  16. package/dist/Bar3DChartScene-55XMAUC7.js.gz +0 -0
  17. package/dist/{Bar3DChartScene-H3MYUJKV.mjs → Bar3DChartScene-PSJEVANA.mjs} +21 -4
  18. package/dist/Bar3DChartScene-PSJEVANA.mjs.br +0 -0
  19. package/dist/Bar3DChartScene-PSJEVANA.mjs.gz +0 -0
  20. package/dist/{Line3DChartScene-QEACF3U3.js → Line3DChartScene-5KACYRSQ.js} +21 -4
  21. package/dist/Line3DChartScene-5KACYRSQ.js.br +0 -0
  22. package/dist/Line3DChartScene-5KACYRSQ.js.gz +0 -0
  23. package/dist/{Line3DChartScene-YFRPJHDX.mjs → Line3DChartScene-BUVNUFNO.mjs} +21 -4
  24. package/dist/Line3DChartScene-BUVNUFNO.mjs.br +0 -0
  25. package/dist/Line3DChartScene-BUVNUFNO.mjs.gz +0 -0
  26. package/dist/{Model3DScene-QQWKGJ3T.js → Model3DScene-6U6TN36M.js} +2 -2
  27. package/dist/Model3DScene-6U6TN36M.js.br +0 -0
  28. package/dist/Model3DScene-6U6TN36M.js.gz +0 -0
  29. package/dist/{Model3DScene-O24KP723.mjs → Model3DScene-REKMR2L6.mjs} +1 -1
  30. package/dist/{Model3DScene-O24KP723.mjs.br → Model3DScene-REKMR2L6.mjs.br} +0 -0
  31. package/dist/Model3DScene-REKMR2L6.mjs.gz +0 -0
  32. package/dist/{PieChart3DScene-CI6CW22C.mjs → PieChart3DScene-4L2VVIUJ.mjs} +15 -4
  33. package/dist/PieChart3DScene-4L2VVIUJ.mjs.br +0 -0
  34. package/dist/PieChart3DScene-4L2VVIUJ.mjs.gz +0 -0
  35. package/dist/{PieChart3DScene-L3MHKQHW.js → PieChart3DScene-MV3JF7EM.js} +15 -4
  36. package/dist/PieChart3DScene-MV3JF7EM.js.br +0 -0
  37. package/dist/PieChart3DScene-MV3JF7EM.js.gz +0 -0
  38. package/dist/{SmartArt3DScene-ZO3KFDI2.js → SmartArt3DScene-BK7QN3WT.js} +85 -23
  39. package/dist/SmartArt3DScene-BK7QN3WT.js.br +0 -0
  40. package/dist/SmartArt3DScene-BK7QN3WT.js.gz +0 -0
  41. package/dist/{SmartArt3DScene-XCFVGCXE.mjs → SmartArt3DScene-ODKCGJBO.mjs} +85 -23
  42. package/dist/SmartArt3DScene-ODKCGJBO.mjs.br +0 -0
  43. package/dist/SmartArt3DScene-ODKCGJBO.mjs.gz +0 -0
  44. package/dist/{SurfaceChart3DScene-JUXRC3K2.mjs → SurfaceChart3DScene-ARE7OBFI.mjs} +19 -4
  45. package/dist/SurfaceChart3DScene-ARE7OBFI.mjs.br +0 -0
  46. package/dist/SurfaceChart3DScene-ARE7OBFI.mjs.gz +0 -0
  47. package/dist/{SurfaceChart3DScene-5IER6VFW.js → SurfaceChart3DScene-SFIOK3G3.js} +19 -4
  48. package/dist/SurfaceChart3DScene-SFIOK3G3.js.br +0 -0
  49. package/dist/SurfaceChart3DScene-SFIOK3G3.js.gz +0 -0
  50. package/dist/{chunk-SN5EUDIT.js → chunk-2Q2NFPXA.js} +81834 -57577
  51. package/dist/chunk-2Q2NFPXA.js.br +0 -0
  52. package/dist/chunk-2Q2NFPXA.js.gz +0 -0
  53. package/dist/chunk-DNR6CH6I.js +30 -0
  54. package/dist/chunk-DNR6CH6I.js.br +0 -0
  55. package/dist/chunk-DNR6CH6I.js.gz +0 -0
  56. package/dist/{chunk-4222CHFH.js → chunk-DZ3HWACD.js} +3763 -2551
  57. package/dist/chunk-DZ3HWACD.js.br +0 -0
  58. package/dist/chunk-DZ3HWACD.js.gz +0 -0
  59. package/dist/{chunk-DE3S3UHX.js → chunk-FHOUTYMB.js} +536 -448
  60. package/dist/chunk-FHOUTYMB.js.br +0 -0
  61. package/dist/chunk-FHOUTYMB.js.gz +0 -0
  62. package/dist/{chunk-UPJW34YG.mjs → chunk-HJZA3O3S.mjs} +103 -16
  63. package/dist/chunk-HJZA3O3S.mjs.br +0 -0
  64. package/dist/chunk-HJZA3O3S.mjs.gz +0 -0
  65. package/dist/{chunk-F5NPGNMA.js → chunk-HYUPPQJW.js} +6168 -1929
  66. package/dist/chunk-HYUPPQJW.js.br +0 -0
  67. package/dist/chunk-HYUPPQJW.js.gz +0 -0
  68. package/dist/{chunk-PFPKBNNZ.mjs → chunk-KWHURCVT.mjs} +1771 -559
  69. package/dist/chunk-KWHURCVT.mjs.br +0 -0
  70. package/dist/chunk-KWHURCVT.mjs.gz +0 -0
  71. package/dist/{chunk-RHWQKZLB.mjs → chunk-M6GIPAY4.mjs} +23 -7
  72. package/dist/chunk-M6GIPAY4.mjs.br +0 -0
  73. package/dist/chunk-M6GIPAY4.mjs.gz +0 -0
  74. package/dist/{chunk-RNP5HP4L.mjs → chunk-T4ZRSRQZ.mjs} +6164 -1925
  75. package/dist/chunk-T4ZRSRQZ.mjs.br +0 -0
  76. package/dist/chunk-T4ZRSRQZ.mjs.gz +0 -0
  77. package/dist/chunk-T6GFCLSM.mjs +27 -0
  78. package/dist/chunk-T6GFCLSM.mjs.br +4 -0
  79. package/dist/chunk-T6GFCLSM.mjs.gz +0 -0
  80. package/dist/{chunk-FRZIBZTE.mjs → chunk-TAGG5YNA.mjs} +76 -1
  81. package/dist/chunk-TAGG5YNA.mjs.br +0 -0
  82. package/dist/chunk-TAGG5YNA.mjs.gz +0 -0
  83. package/dist/{chunk-6IMB5DNJ.mjs → chunk-UKPGYJ7G.mjs} +90204 -65968
  84. package/dist/chunk-UKPGYJ7G.mjs.br +0 -0
  85. package/dist/chunk-UKPGYJ7G.mjs.gz +0 -0
  86. package/dist/{chunk-QWA5YEIZ.js → chunk-XW46A7DN.js} +194 -178
  87. package/dist/chunk-XW46A7DN.js.br +0 -0
  88. package/dist/chunk-XW46A7DN.js.gz +0 -0
  89. package/dist/{chunk-L3ZIBQEB.js → chunk-Y6GG2OOW.js} +76 -1
  90. package/dist/chunk-Y6GG2OOW.js.br +0 -0
  91. package/dist/chunk-Y6GG2OOW.js.gz +0 -0
  92. package/dist/i18n.js +4 -4
  93. package/dist/i18n.js.br +0 -0
  94. package/dist/i18n.js.gz +0 -0
  95. package/dist/i18n.mjs +1 -1
  96. package/dist/i18n.mjs.br +0 -0
  97. package/dist/i18n.mjs.gz +0 -0
  98. package/dist/index-CGKutKk1.d.ts.map +1 -1
  99. package/dist/index.d.ts +616 -99
  100. package/dist/index.d.ts.map +1 -1
  101. package/dist/index.js +47 -47
  102. package/dist/index.js.br +0 -0
  103. package/dist/index.js.gz +0 -0
  104. package/dist/index.mjs +6 -6
  105. package/dist/index.mjs.br +0 -0
  106. package/dist/index.mjs.gz +0 -0
  107. package/dist/internals.d.ts +657 -86
  108. package/dist/internals.d.ts.map +1 -1
  109. package/dist/internals.js +79 -79
  110. package/dist/internals.js.br +0 -0
  111. package/dist/internals.js.gz +0 -0
  112. package/dist/internals.mjs +4 -4
  113. package/dist/internals.mjs.br +0 -0
  114. package/dist/internals.mjs.gz +0 -0
  115. package/dist/pptx-viewer.css +1 -1
  116. package/dist/pptx-viewer.css.br +0 -0
  117. package/dist/pptx-viewer.css.gz +0 -0
  118. package/dist/{useViewerBuildingBlocks-C8F_4Pzb.d.ts → useViewerBuildingBlocks-FbK-4ORi.d.ts} +2 -1
  119. package/dist/useViewerBuildingBlocks-FbK-4ORi.d.ts.map +1 -0
  120. package/dist/viewer/index.d.ts +545 -48
  121. package/dist/viewer/index.d.ts.map +1 -1
  122. package/dist/viewer/index.js +27 -27
  123. package/dist/viewer/index.js.br +0 -0
  124. package/dist/viewer/index.js.gz +0 -0
  125. package/dist/viewer/index.mjs +6 -6
  126. package/dist/viewer/index.mjs.br +0 -0
  127. package/dist/viewer/index.mjs.gz +0 -0
  128. package/package.json +9 -9
  129. package/dist/AiChatPanel-A5DCEHTO.mjs.br +0 -0
  130. package/dist/AiChatPanel-A5DCEHTO.mjs.gz +0 -0
  131. package/dist/AiChatPanel-XLQM4BQJ.js.br +0 -0
  132. package/dist/AiChatPanel-XLQM4BQJ.js.gz +0 -0
  133. package/dist/Area3DChartScene-5CMEMIBI.mjs.br +0 -0
  134. package/dist/Area3DChartScene-5CMEMIBI.mjs.gz +0 -0
  135. package/dist/Area3DChartScene-RZ3V3WOR.js.br +0 -0
  136. package/dist/Area3DChartScene-RZ3V3WOR.js.gz +0 -0
  137. package/dist/Bar3DChartScene-H3MYUJKV.mjs.br +0 -0
  138. package/dist/Bar3DChartScene-H3MYUJKV.mjs.gz +0 -0
  139. package/dist/Bar3DChartScene-KHCQ6TEC.js.br +0 -0
  140. package/dist/Bar3DChartScene-KHCQ6TEC.js.gz +0 -0
  141. package/dist/Line3DChartScene-QEACF3U3.js.br +0 -0
  142. package/dist/Line3DChartScene-QEACF3U3.js.gz +0 -0
  143. package/dist/Line3DChartScene-YFRPJHDX.mjs.br +0 -0
  144. package/dist/Line3DChartScene-YFRPJHDX.mjs.gz +0 -0
  145. package/dist/Model3DScene-O24KP723.mjs.gz +0 -0
  146. package/dist/Model3DScene-QQWKGJ3T.js.br +0 -0
  147. package/dist/Model3DScene-QQWKGJ3T.js.gz +0 -0
  148. package/dist/PieChart3DScene-CI6CW22C.mjs.br +0 -0
  149. package/dist/PieChart3DScene-CI6CW22C.mjs.gz +0 -0
  150. package/dist/PieChart3DScene-L3MHKQHW.js.br +0 -0
  151. package/dist/PieChart3DScene-L3MHKQHW.js.gz +0 -0
  152. package/dist/SmartArt3DScene-XCFVGCXE.mjs.br +0 -0
  153. package/dist/SmartArt3DScene-XCFVGCXE.mjs.gz +0 -0
  154. package/dist/SmartArt3DScene-ZO3KFDI2.js.br +0 -0
  155. package/dist/SmartArt3DScene-ZO3KFDI2.js.gz +0 -0
  156. package/dist/SurfaceChart3DScene-5IER6VFW.js.br +0 -0
  157. package/dist/SurfaceChart3DScene-5IER6VFW.js.gz +0 -0
  158. package/dist/SurfaceChart3DScene-JUXRC3K2.mjs.br +0 -0
  159. package/dist/SurfaceChart3DScene-JUXRC3K2.mjs.gz +0 -0
  160. package/dist/chunk-4222CHFH.js.br +0 -0
  161. package/dist/chunk-4222CHFH.js.gz +0 -0
  162. package/dist/chunk-6IMB5DNJ.mjs.br +0 -0
  163. package/dist/chunk-6IMB5DNJ.mjs.gz +0 -0
  164. package/dist/chunk-DE3S3UHX.js.br +0 -0
  165. package/dist/chunk-DE3S3UHX.js.gz +0 -0
  166. package/dist/chunk-F5NPGNMA.js.br +0 -0
  167. package/dist/chunk-F5NPGNMA.js.gz +0 -0
  168. package/dist/chunk-FRZIBZTE.mjs.br +0 -0
  169. package/dist/chunk-FRZIBZTE.mjs.gz +0 -0
  170. package/dist/chunk-L3ZIBQEB.js.br +0 -0
  171. package/dist/chunk-L3ZIBQEB.js.gz +0 -0
  172. package/dist/chunk-PFPKBNNZ.mjs.br +0 -0
  173. package/dist/chunk-PFPKBNNZ.mjs.gz +0 -0
  174. package/dist/chunk-QWA5YEIZ.js.br +0 -0
  175. package/dist/chunk-QWA5YEIZ.js.gz +0 -0
  176. package/dist/chunk-RHWQKZLB.mjs.br +0 -0
  177. package/dist/chunk-RHWQKZLB.mjs.gz +0 -0
  178. package/dist/chunk-RNP5HP4L.mjs.br +0 -0
  179. package/dist/chunk-RNP5HP4L.mjs.gz +0 -0
  180. package/dist/chunk-SN5EUDIT.js.br +0 -0
  181. package/dist/chunk-SN5EUDIT.js.gz +0 -0
  182. package/dist/chunk-UPJW34YG.mjs.br +0 -0
  183. package/dist/chunk-UPJW34YG.mjs.gz +0 -0
  184. package/dist/useViewerBuildingBlocks-C8F_4Pzb.d.ts.map +0 -1
@@ -1,15 +1,15 @@
1
1
  'use strict';
2
2
 
3
- var chunkQWA5YEIZ_js = require('./chunk-QWA5YEIZ.js');
4
- var chunkSN5EUDIT_js = require('./chunk-SN5EUDIT.js');
5
- var chunkL3ZIBQEB_js = require('./chunk-L3ZIBQEB.js');
3
+ var chunkXW46A7DN_js = require('./chunk-XW46A7DN.js');
4
+ var chunk2Q2NFPXA_js = require('./chunk-2Q2NFPXA.js');
5
+ var chunkY6GG2OOW_js = require('./chunk-Y6GG2OOW.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 = chunkSN5EUDIT_js.DEFAULT_VIRTUAL_OVERSCAN
12
+ overscan = chunk2Q2NFPXA_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 = chunkSN5EUDIT_js.computeVirtualRange(totalItems, itemHeight, scrollTop, viewportHeight, overscan);
42
+ const range = chunk2Q2NFPXA_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 ??= chunkSN5EUDIT_js.createPresenceProjector();
83
+ projectorRef.current ??= chunk2Q2NFPXA_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 >= chunkSN5EUDIT_js.BROADCAST_THROTTLE_MS) {
108
+ if (elapsed >= chunk2Q2NFPXA_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
- }, chunkSN5EUDIT_js.BROADCAST_THROTTLE_MS - elapsed);
118
+ }, chunk2Q2NFPXA_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 = chunkSN5EUDIT_js.createSyncGate(() => setSynced(true));
198
+ gateRef.current = chunk2Q2NFPXA_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
- chunkSN5EUDIT_js.clearLocalAwareness(provider.awareness);
218
+ chunk2Q2NFPXA_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 = chunkSN5EUDIT_js.validateRoomId(config.roomId);
243
+ const roomId = chunk2Q2NFPXA_js.validateRoomId(config.roomId);
244
244
  const provider = new WebrtcProvider(roomId, yDoc, opts);
245
- departureRef.current = chunkSN5EUDIT_js.createDepartureChannel(roomId, provider.awareness);
245
+ departureRef.current = chunk2Q2NFPXA_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 = chunkSN5EUDIT_js.validateRoomId(config.roomId);
288
- const transport = config.transport ?? chunkSN5EUDIT_js.resolveTransportForServerUrl(config.serverUrl);
287
+ const roomId = chunk2Q2NFPXA_js.validateRoomId(config.roomId);
288
+ const transport = config.transport ?? chunk2Q2NFPXA_js.resolveTransportForServerUrl(config.serverUrl);
289
289
  if (transport === "webrtc") {
290
290
  await initWebrtc();
291
291
  return;
292
292
  }
293
- if (chunkSN5EUDIT_js.isMixedContentBlocked(config.serverUrl)) {
293
+ if (chunk2Q2NFPXA_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 = chunkSN5EUDIT_js.createDepartureChannel(roomId, provider.awareness);
307
+ departureRef.current = chunk2Q2NFPXA_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
- chunkSN5EUDIT_js.clearLocalAwareness(provider.awareness);
347
+ chunk2Q2NFPXA_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
- }, chunkSN5EUDIT_js.CONNECTION_TIMEOUT_MS);
356
+ }, chunk2Q2NFPXA_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
- chunkSN5EUDIT_js.clearLocalAwareness(provider.awareness);
365
+ chunk2Q2NFPXA_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 = chunkSN5EUDIT_js.registerCollaborationTeardown({
391
+ const disposeTeardown = chunk2Q2NFPXA_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 = chunkSN5EUDIT_js.sanitizeColor(config?.userColor, "#6366f1");
412
+ const userColor = chunk2Q2NFPXA_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(chunkSN5EUDIT_js.cloneSlide),
531
- templateElementsBySlideId: chunkSN5EUDIT_js.cloneTemplateElementsBySlideId(templateElementsBySlideId),
530
+ slides: slides.map(chunk2Q2NFPXA_js.cloneSlide),
531
+ templateElementsBySlideId: chunk2Q2NFPXA_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(chunkSN5EUDIT_js.cloneSlide));
544
+ setSlides(snapshot.slides.map(chunk2Q2NFPXA_js.cloneSlide));
545
545
  setTemplateElementsBySlideId(
546
- chunkSN5EUDIT_js.cloneTemplateElementsBySlideId(snapshot.templateElementsBySlideId)
546
+ chunk2Q2NFPXA_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 = chunkQWA5YEIZ_js.cloneHistorySnapshot(previousSnapshot);
586
- lastHistorySnapshotRef.current = chunkQWA5YEIZ_js.cloneHistorySnapshot(nextSnapshot);
585
+ const nextSnapshot = chunkXW46A7DN_js.cloneHistorySnapshot(previousSnapshot);
586
+ lastHistorySnapshotRef.current = chunkXW46A7DN_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 = chunkQWA5YEIZ_js.cloneHistorySnapshot(nextSnapshot);
608
- lastHistorySnapshotRef.current = chunkQWA5YEIZ_js.cloneHistorySnapshot(targetSnapshot);
607
+ const targetSnapshot = chunkXW46A7DN_js.cloneHistorySnapshot(nextSnapshot);
608
+ lastHistorySnapshotRef.current = chunkXW46A7DN_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 = chunkQWA5YEIZ_js.cloneHistorySnapshot(initialSnapshot);
626
+ const clonedInitial = chunkXW46A7DN_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 = chunkQWA5YEIZ_js.cloneHistorySnapshot(snapshot);
674
+ lastHistorySnapshotRef.current = chunkXW46A7DN_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(chunkQWA5YEIZ_js.cloneHistorySnapshot(previousSnapshot));
681
+ historyPastRef.current.push(chunkXW46A7DN_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 = chunkQWA5YEIZ_js.cloneHistorySnapshot(snapshot);
686
+ lastHistorySnapshotRef.current = chunkXW46A7DN_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(chunkSN5EUDIT_js.createWheelStepBuffer());
746
+ const wheelBufferRef = react.useRef(chunk2Q2NFPXA_js.createWheelStepBuffer());
747
747
  const storeRef = react.useRef(null);
748
- storeRef.current ??= chunkSN5EUDIT_js.createViewerZoomStore();
748
+ storeRef.current ??= chunk2Q2NFPXA_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 = chunkSN5EUDIT_js.clampZoomScale(nextScale);
809
+ const boundedScale = chunk2Q2NFPXA_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, chunkQWA5YEIZ_js.MIN_ELEMENT_SIZE));
847
- maxY = Math.max(maxY, element.y + Math.max(element.height, chunkQWA5YEIZ_js.MIN_ELEMENT_SIZE));
846
+ maxX = Math.max(maxX, element.x + Math.max(element.width, chunkXW46A7DN_js.MIN_ELEMENT_SIZE));
847
+ maxY = Math.max(maxY, element.y + Math.max(element.height, chunkXW46A7DN_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, chunkQWA5YEIZ_js.MIN_ELEMENT_SIZE);
854
- const boundsHeight = Math.max(selectionBounds.maxY - selectionBounds.minY, chunkQWA5YEIZ_js.MIN_ELEMENT_SIZE);
853
+ const boundsWidth = Math.max(selectionBounds.maxX - selectionBounds.minX, chunkXW46A7DN_js.MIN_ELEMENT_SIZE);
854
+ const boundsHeight = Math.max(selectionBounds.maxY - selectionBounds.minY, chunkXW46A7DN_js.MIN_ELEMENT_SIZE);
855
855
  const availableWidth = Math.max(
856
- effectiveEditorDimensions.width - chunkQWA5YEIZ_js.ZOOM_TO_SELECTION_PADDING,
857
- chunkQWA5YEIZ_js.MIN_ELEMENT_SIZE
856
+ effectiveEditorDimensions.width - chunkXW46A7DN_js.ZOOM_TO_SELECTION_PADDING,
857
+ chunkXW46A7DN_js.MIN_ELEMENT_SIZE
858
858
  );
859
859
  const availableHeight = Math.max(
860
- effectiveEditorDimensions.height - chunkQWA5YEIZ_js.ZOOM_TO_SELECTION_PADDING,
861
- chunkQWA5YEIZ_js.MIN_ELEMENT_SIZE
860
+ effectiveEditorDimensions.height - chunkXW46A7DN_js.ZOOM_TO_SELECTION_PADDING,
861
+ chunkXW46A7DN_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 = chunkSN5EUDIT_js.clampZoomScale(targetEditorScale / safeFitScale);
868
+ const nextScale = chunk2Q2NFPXA_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 = chunkSN5EUDIT_js.mapEditingWheel(event, wheelBufferRef.current, true);
885
+ const mapped = chunk2Q2NFPXA_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: chunkSN5EUDIT_js.clampZoomScale(store.getState().zoom + mapped.deltaScale)
892
+ zoom: chunk2Q2NFPXA_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
- chunkSN5EUDIT_js.playGroup(controller, group, ctx);
988
- chunkSN5EUDIT_js.scheduleAutoAdvanceChain(controller, ctx);
987
+ chunk2Q2NFPXA_js.playGroup(controller, group, ctx);
988
+ chunk2Q2NFPXA_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 = chunkSN5EUDIT_js.computeEntranceAnimationDelay(animation.delayMs, animationIndex);
1007
+ const delay = chunk2Q2NFPXA_js.computeEntranceAnimationDelay(animation.delayMs, animationIndex);
1008
1008
  const timer = window.setTimeout(() => {
1009
1009
  setPresentationAnimations(
1010
1010
  (previousAnimations) => previousAnimations.map(
@@ -1018,7 +1018,7 @@ 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 } = input;
1021
+ const { slides, onPlayActionSound, showWithAnimation, canvasSize, themeColorMap } = input;
1022
1022
  const animationsEnabled = showWithAnimation !== false;
1023
1023
  const [presentationAnimations, setPresentationAnimations] = react.useState([]);
1024
1024
  const [presentationElementStates, setPresentationElementStates] = react.useState(/* @__PURE__ */ new Map());
@@ -1030,7 +1030,7 @@ function useAnimationPlayback(input) {
1030
1030
  const presentationTimersRef = react.useRef([]);
1031
1031
  const controllerRef = react.useRef(null);
1032
1032
  const buildRafRef = react.useRef(null);
1033
- const activeAnimationGroupRef = react.useRef(chunkSN5EUDIT_js.createActiveAnimationGroup());
1033
+ const activeAnimationGroupRef = react.useRef(chunk2Q2NFPXA_js.createActiveAnimationGroup());
1034
1034
  const seededCompletedRef = react.useRef(false);
1035
1035
  const mediaTimeNodeElementIdsRef = react.useRef(/* @__PURE__ */ new Map());
1036
1036
  const lastSeedCompletedRef = react.useRef(false);
@@ -1047,15 +1047,15 @@ function useAnimationPlayback(input) {
1047
1047
  }, [onPlayActionSound]);
1048
1048
  react.useEffect(() => {
1049
1049
  return () => {
1050
- chunkSN5EUDIT_js.cancelBuildReveal(buildRafRef);
1050
+ chunk2Q2NFPXA_js.cancelBuildReveal(buildRafRef);
1051
1051
  };
1052
1052
  }, []);
1053
1053
  const clearPresentationTimers = react.useCallback(() => {
1054
- chunkSN5EUDIT_js.clearPlaybackTimers(buildPlaybackContext(), activeAnimationGroupRef.current);
1054
+ chunk2Q2NFPXA_js.clearPlaybackTimers(buildPlaybackContext(), activeAnimationGroupRef.current);
1055
1055
  }, [buildPlaybackContext]);
1056
1056
  const resetSlideTimeline = react.useCallback(
1057
1057
  (slideIndex) => {
1058
- chunkSN5EUDIT_js.cancelBuildReveal(buildRafRef);
1058
+ chunk2Q2NFPXA_js.cancelBuildReveal(buildRafRef);
1059
1059
  const slide = slides[slideIndex];
1060
1060
  if (!slide) {
1061
1061
  controllerRef.current = null;
@@ -1066,9 +1066,13 @@ function useAnimationPlayback(input) {
1066
1066
  setHoverTriggerShapeIds(/* @__PURE__ */ new Set());
1067
1067
  return;
1068
1068
  }
1069
- const controller = chunkSN5EUDIT_js.PresentationAnimationController.fromSlide(slide);
1069
+ const controller = chunk2Q2NFPXA_js.PresentationAnimationController.fromSlide(slide, {
1070
+ slideHeightPx: canvasSize?.height,
1071
+ slideWidthPx: canvasSize?.width,
1072
+ themeColorMap
1073
+ });
1070
1074
  controllerRef.current = controller;
1071
- mediaTimeNodeElementIdsRef.current = chunkSN5EUDIT_js.resolveMediaTimeNodeElementIds(
1075
+ mediaTimeNodeElementIdsRef.current = chunk2Q2NFPXA_js.resolveMediaTimeNodeElementIds(
1072
1076
  slide.nativeAnimations ?? []
1073
1077
  );
1074
1078
  setPresentationKeyframesCss(controller.keyframesCss);
@@ -1076,13 +1080,13 @@ function useAnimationPlayback(input) {
1076
1080
  setHoverTriggerShapeIds(controller.hoverTriggerShapeIds);
1077
1081
  setPresentationElementStates(controller.computeStates());
1078
1082
  },
1079
- [slides]
1083
+ [slides, canvasSize, themeColorMap]
1080
1084
  );
1081
1085
  const playNextAnimationGroup = react.useCallback(() => {
1082
1086
  if (!animationsEnabled) {
1083
1087
  return false;
1084
1088
  }
1085
- return chunkSN5EUDIT_js.advanceMainSequence(
1089
+ return chunk2Q2NFPXA_js.advanceMainSequence(
1086
1090
  controllerRef.current,
1087
1091
  buildPlaybackContext(),
1088
1092
  activeAnimationGroupRef.current
@@ -1098,7 +1102,7 @@ function useAnimationPlayback(input) {
1098
1102
  if (!group) {
1099
1103
  return false;
1100
1104
  }
1101
- chunkSN5EUDIT_js.playGroup(controller, group, buildPlaybackContext());
1105
+ chunk2Q2NFPXA_js.playGroup(controller, group, buildPlaybackContext());
1102
1106
  return true;
1103
1107
  },
1104
1108
  [buildPlaybackContext]
@@ -1117,7 +1121,7 @@ function useAnimationPlayback(input) {
1117
1121
  if (!group) {
1118
1122
  return false;
1119
1123
  }
1120
- chunkSN5EUDIT_js.playGroup(controller, group, buildPlaybackContext());
1124
+ chunk2Q2NFPXA_js.playGroup(controller, group, buildPlaybackContext());
1121
1125
  return true;
1122
1126
  },
1123
1127
  [animationsEnabled, buildPlaybackContext]
@@ -1198,12 +1202,12 @@ function useAnimationPlayback(input) {
1198
1202
  presentationTimersRef
1199
1203
  };
1200
1204
  }
1201
- var PRESENTER_CHANNEL_NAME = chunkSN5EUDIT_js.PRESENTATION_CHANNEL_NAME;
1202
- var AUDIENCE_HASH = chunkSN5EUDIT_js.PRESENTATION_HASH;
1203
- var PRESENTER_MSG_ORIGIN = chunkSN5EUDIT_js.PRESENTATION_MESSAGE_ORIGIN;
1204
- var AUDIENCE_NONCE_KEY = chunkSN5EUDIT_js.PRESENTATION_NONCE_KEY;
1205
+ var PRESENTER_CHANNEL_NAME = chunk2Q2NFPXA_js.PRESENTATION_CHANNEL_NAME;
1206
+ var AUDIENCE_HASH = chunk2Q2NFPXA_js.PRESENTATION_HASH;
1207
+ var PRESENTER_MSG_ORIGIN = chunk2Q2NFPXA_js.PRESENTATION_MESSAGE_ORIGIN;
1208
+ var AUDIENCE_NONCE_KEY = chunk2Q2NFPXA_js.PRESENTATION_NONCE_KEY;
1205
1209
  function generateSessionId() {
1206
- return chunkSN5EUDIT_js.createPresentationSessionId();
1210
+ return chunk2Q2NFPXA_js.createPresentationSessionId();
1207
1211
  }
1208
1212
  function parseAudienceNonce() {
1209
1213
  const hash = window.location.hash;
@@ -1239,7 +1243,7 @@ function usePresenterWindow(input) {
1239
1243
  }, []);
1240
1244
  const swapDisplays = react.useCallback(async () => {
1241
1245
  const audience = audienceWindowRef.current;
1242
- return audience && !audience.closed ? chunkSN5EUDIT_js.swapPresentationWindows(window, audience) : false;
1246
+ return audience && !audience.closed ? chunk2Q2NFPXA_js.swapPresentationWindows(window, audience) : false;
1243
1247
  }, []);
1244
1248
  const syncSlideToAudience = react.useCallback(
1245
1249
  (slideIndex) => {
@@ -1303,7 +1307,7 @@ function usePresenterWindow(input) {
1303
1307
  pollTimerRef.current = null;
1304
1308
  }
1305
1309
  if (closingSessionId) {
1306
- void chunkSN5EUDIT_js.clearAudienceContent(closingSessionId);
1310
+ void chunk2Q2NFPXA_js.clearAudienceContent(closingSessionId);
1307
1311
  }
1308
1312
  }, [getChannel]);
1309
1313
  const openAudienceWindow = react.useCallback(() => {
@@ -1321,10 +1325,10 @@ function usePresenterWindow(input) {
1321
1325
  audienceWindowRef.current = blankWin;
1322
1326
  const sessionId = generateSessionId();
1323
1327
  sessionIdRef.current = sessionId;
1324
- const audienceUrl = chunkSN5EUDIT_js.buildPresentationAudienceUrl(window.location.href, sessionId);
1325
- void chunkSN5EUDIT_js.resolveAudienceScreenPlacement(window).then((placement) => {
1328
+ const audienceUrl = chunk2Q2NFPXA_js.buildPresentationAudienceUrl(window.location.href, sessionId);
1329
+ void chunk2Q2NFPXA_js.resolveAudienceScreenPlacement(window).then((placement) => {
1326
1330
  if (placement && audienceWindowRef.current === blankWin && !blankWin.closed) {
1327
- chunkSN5EUDIT_js.placeAudienceWindow(blankWin, placement);
1331
+ chunk2Q2NFPXA_js.placeAudienceWindow(blankWin, placement);
1328
1332
  }
1329
1333
  return void 0;
1330
1334
  });
@@ -1354,7 +1358,7 @@ function usePresenterWindow(input) {
1354
1358
  }
1355
1359
  };
1356
1360
  if (content) {
1357
- void chunkSN5EUDIT_js.storeAudienceContent(content, sessionId).then(() => navigateOrClose(true)).catch(() => navigateOrClose(false));
1361
+ void chunk2Q2NFPXA_js.storeAudienceContent(content, sessionId).then(() => navigateOrClose(true)).catch(() => navigateOrClose(false));
1358
1362
  } else {
1359
1363
  navigateOrClose(true);
1360
1364
  }
@@ -1380,7 +1384,7 @@ function usePresenterWindow(input) {
1380
1384
  }
1381
1385
  const handleMessage = (event) => {
1382
1386
  const message = event.data;
1383
- if (chunkSN5EUDIT_js.isPresentationSessionMessage(message) && message.type === "audience-ready" && message.sessionId === sessionIdRef.current) {
1387
+ if (chunk2Q2NFPXA_js.isPresentationSessionMessage(message) && message.type === "audience-ready" && message.sessionId === sessionIdRef.current) {
1384
1388
  syncStateToAudience(snapshotRef.current);
1385
1389
  }
1386
1390
  };
@@ -1409,7 +1413,7 @@ function usePresenterWindow(input) {
1409
1413
  react.useEffect(() => {
1410
1414
  const handleBeforeUnload = () => {
1411
1415
  if (sessionIdRef.current) {
1412
- void chunkSN5EUDIT_js.clearAudienceContent(sessionIdRef.current);
1416
+ void chunk2Q2NFPXA_js.clearAudienceContent(sessionIdRef.current);
1413
1417
  }
1414
1418
  };
1415
1419
  window.addEventListener("beforeunload", handleBeforeUnload);
@@ -1471,7 +1475,7 @@ function useAudienceMode(input) {
1471
1475
  }
1472
1476
  channel.onmessage = (event) => {
1473
1477
  const data = event.data;
1474
- if (!chunkSN5EUDIT_js.isPresentationSessionMessage(data) || data.origin !== PRESENTER_MSG_ORIGIN) {
1478
+ if (!chunk2Q2NFPXA_js.isPresentationSessionMessage(data) || data.origin !== PRESENTER_MSG_ORIGIN) {
1475
1479
  return;
1476
1480
  }
1477
1481
  if (expectedSessionId && data.sessionId !== expectedSessionId) {
@@ -1487,16 +1491,16 @@ function useAudienceMode(input) {
1487
1491
  }
1488
1492
  if (data.type === "presenter-exit") {
1489
1493
  if (expectedSessionId) {
1490
- void chunkSN5EUDIT_js.clearAudienceContent(expectedSessionId);
1494
+ void chunk2Q2NFPXA_js.clearAudienceContent(expectedSessionId);
1491
1495
  }
1492
- if (chunkSN5EUDIT_js.endAudienceDisplay(window)) {
1496
+ if (chunk2Q2NFPXA_js.endAudienceDisplay(window)) {
1493
1497
  handlers.onPresenterEnded?.();
1494
1498
  }
1495
1499
  }
1496
1500
  };
1497
1501
  if (expectedSessionId) {
1498
1502
  channel.postMessage({
1499
- origin: chunkSN5EUDIT_js.PRESENTATION_MESSAGE_ORIGIN,
1503
+ origin: chunk2Q2NFPXA_js.PRESENTATION_MESSAGE_ORIGIN,
1500
1504
  type: "audience-ready",
1501
1505
  sessionId: expectedSessionId
1502
1506
  });
@@ -1510,7 +1514,7 @@ function useAudienceMode(input) {
1510
1514
  }, []);
1511
1515
  }
1512
1516
  function usePresentationKeyboard(input) {
1513
- const wheelBufferRef = react.useRef(chunkSN5EUDIT_js.createWheelStepBuffer());
1517
+ const wheelBufferRef = react.useRef(chunk2Q2NFPXA_js.createWheelStepBuffer());
1514
1518
  const {
1515
1519
  mode,
1516
1520
  movePresentationSlide,
@@ -1531,14 +1535,14 @@ function usePresentationKeyboard(input) {
1531
1535
  presentationSlideIndex,
1532
1536
  setShowRehearsalSummary
1533
1537
  } = input;
1534
- const keyBufferRef = react.useRef(chunkSN5EUDIT_js.createPresentationKeyBuffer());
1538
+ const keyBufferRef = react.useRef(chunk2Q2NFPXA_js.createPresentationKeyBuffer());
1535
1539
  react.useEffect(() => {
1536
- if (mode !== "present" || !chunkSN5EUDIT_js.acceptsPresentationInput()) {
1537
- keyBufferRef.current = chunkSN5EUDIT_js.createPresentationKeyBuffer();
1540
+ if (mode !== "present" || !chunk2Q2NFPXA_js.acceptsPresentationInput()) {
1541
+ keyBufferRef.current = chunk2Q2NFPXA_js.createPresentationKeyBuffer();
1538
1542
  return;
1539
1543
  }
1540
1544
  const handleKeyDown = (event) => {
1541
- const mapped = chunkSN5EUDIT_js.mapPresentationKey(event, keyBufferRef.current);
1545
+ const mapped = chunk2Q2NFPXA_js.mapPresentationKey(event, keyBufferRef.current);
1542
1546
  if (mapped.action === "none") {
1543
1547
  return;
1544
1548
  }
@@ -1558,12 +1562,12 @@ function usePresentationKeyboard(input) {
1558
1562
  movePresentationSlide(-1);
1559
1563
  return;
1560
1564
  case "first": {
1561
- const first = chunkSN5EUDIT_js.firstShowSlideIndex(showSlideIndexes);
1565
+ const first = chunk2Q2NFPXA_js.firstShowSlideIndex(showSlideIndexes);
1562
1566
  navigateToSlide(first ?? 0);
1563
1567
  return;
1564
1568
  }
1565
1569
  case "last": {
1566
- const last = chunkSN5EUDIT_js.lastShowSlideIndex(showSlideIndexes);
1570
+ const last = chunk2Q2NFPXA_js.lastShowSlideIndex(showSlideIndexes);
1567
1571
  navigateToSlide(last ?? Math.max(0, slideCount - 1));
1568
1572
  return;
1569
1573
  }
@@ -1601,10 +1605,10 @@ function usePresentationKeyboard(input) {
1601
1605
  }
1602
1606
  };
1603
1607
  const handleWheel = (event) => {
1604
- if (mode !== "present" || !chunkSN5EUDIT_js.acceptsPresentationInput()) {
1608
+ if (mode !== "present" || !chunk2Q2NFPXA_js.acceptsPresentationInput()) {
1605
1609
  return;
1606
1610
  }
1607
- const mapped = chunkSN5EUDIT_js.mapPresentationWheel(event, wheelBufferRef.current);
1611
+ const mapped = chunk2Q2NFPXA_js.mapPresentationWheel(event, wheelBufferRef.current);
1608
1612
  if (mapped.intent === "next-slide") {
1609
1613
  event.preventDefault();
1610
1614
  movePresentationSlide(1);
@@ -1737,7 +1741,7 @@ function useRehearsalTimings(input) {
1737
1741
 
1738
1742
  // src/viewer/hooks/presentation-mode/presentation-actions.ts
1739
1743
  function handlePresentationActionImpl(action, deps) {
1740
- chunkSN5EUDIT_js.runPresentationAction(
1744
+ chunk2Q2NFPXA_js.runPresentationAction(
1741
1745
  action,
1742
1746
  { slideCount: deps.slidesLength, ...deps.elementId ? { elementId: deps.elementId } : {} },
1743
1747
  {
@@ -1765,13 +1769,13 @@ function handlePresentationActionImpl(action, deps) {
1765
1769
  function executeSlideTransition(nextSlideIndex, deps) {
1766
1770
  const incomingSlide = deps.slides[nextSlideIndex];
1767
1771
  const transition = deps.reverse ? deps.slides[deps.currentSlideIndex]?.transition : incomingSlide?.transition;
1768
- const durationMs = deps.playTransition ? chunkSN5EUDIT_js.resolveTransitionDurationMs(transition) : 0;
1772
+ const durationMs = deps.playTransition ? chunk2Q2NFPXA_js.resolveTransitionDurationMs(transition) : 0;
1769
1773
  deps.clearPresentationTimers();
1770
1774
  deps.setPresentationSlideIndex(nextSlideIndex);
1771
1775
  deps.onSetActiveSlideIndex(nextSlideIndex);
1772
1776
  deps.setPresentationSlideVisible(true);
1773
1777
  deps.seedSlideAnimations(nextSlideIndex, { completed: deps.seedCompleted });
1774
- const soundAction = chunkSN5EUDIT_js.resolveTransitionSoundAction(transition);
1778
+ const soundAction = chunk2Q2NFPXA_js.resolveTransitionSoundAction(transition);
1775
1779
  if (soundAction.kind === "play" && deps.onPlayActionSound) {
1776
1780
  deps.onPlayActionSound(soundAction.soundPath, { loop: soundAction.loop });
1777
1781
  } else if (soundAction.kind === "stop" && deps.onStopActionSound) {
@@ -1834,7 +1838,7 @@ function useSlideNavigation(input) {
1834
1838
  });
1835
1839
  const scheduleAutoAdvanceForSlide = react.useCallback(
1836
1840
  (slideIndex) => {
1837
- const delayMs = chunkSN5EUDIT_js.resolveAutoAdvanceDelayMs(slides[slideIndex], { useTimings });
1841
+ const delayMs = chunk2Q2NFPXA_js.resolveAutoAdvanceDelayMs(slides[slideIndex], { useTimings });
1838
1842
  if (delayMs === void 0) {
1839
1843
  return;
1840
1844
  }
@@ -1857,7 +1861,7 @@ function useSlideNavigation(input) {
1857
1861
  if (availableSlideIndexes.length === 0) {
1858
1862
  return;
1859
1863
  }
1860
- const pastLastSlide = direction === 1 && !chunkSN5EUDIT_js.hasShowSlideAfter(presentationSlideIndex, availableSlideIndexes);
1864
+ const pastLastSlide = direction === 1 && !chunk2Q2NFPXA_js.hasShowSlideAfter(presentationSlideIndex, availableSlideIndexes);
1861
1865
  if (rehearsing && pastLastSlide) {
1862
1866
  recordCurrentSlideTime(presentationSlideIndex);
1863
1867
  try {
@@ -1875,9 +1879,9 @@ function useSlideNavigation(input) {
1875
1879
  onAdvancePastLastSlide();
1876
1880
  return;
1877
1881
  }
1878
- const nextSlideIndex = direction === 1 ? chunkSN5EUDIT_js.nextShowSlideIndex(presentationSlideIndex, availableSlideIndexes, {
1882
+ const nextSlideIndex = direction === 1 ? chunk2Q2NFPXA_js.nextShowSlideIndex(presentationSlideIndex, availableSlideIndexes, {
1879
1883
  loop: Boolean(loopContinuously) && !rehearsing
1880
- }) : chunkSN5EUDIT_js.previousShowSlideIndex(presentationSlideIndex, availableSlideIndexes);
1884
+ }) : chunk2Q2NFPXA_js.previousShowSlideIndex(presentationSlideIndex, availableSlideIndexes);
1881
1885
  if (nextSlideIndex === void 0 || nextSlideIndex === presentationSlideIndex) {
1882
1886
  return;
1883
1887
  }
@@ -2056,7 +2060,7 @@ function createCustomShowRunner(deps) {
2056
2060
  return;
2057
2061
  }
2058
2062
  origin = returnAfter ? { showId: deps.getActiveCustomShowId(), slideIndex: deps.getPresentationSlideIndex() } : null;
2059
- const first = chunkSN5EUDIT_js.firstShowSlideIndex(chunkSN5EUDIT_js.resolveShowSlideIndexes(deps.getSlides(), target));
2063
+ const first = chunk2Q2NFPXA_js.firstShowSlideIndex(chunk2Q2NFPXA_js.resolveShowSlideIndexes(deps.getSlides(), target));
2060
2064
  deps.setActiveCustomShowId(customShowId);
2061
2065
  if (first !== void 0) {
2062
2066
  deps.navigateToSlide(first);
@@ -2133,22 +2137,27 @@ function usePresentationActionExtensions(input) {
2133
2137
  }
2134
2138
  }, [navigateToSlideViaRef]);
2135
2139
  const onOpenFile = react.useCallback((target) => {
2136
- chunkSN5EUDIT_js.safeOpenUrl(target);
2140
+ chunk2Q2NFPXA_js.safeOpenUrl(target);
2137
2141
  }, []);
2138
2142
  const onOpenPresentation = react.useCallback((target) => {
2139
- chunkSN5EUDIT_js.safeOpenUrl(target);
2143
+ chunk2Q2NFPXA_js.safeOpenUrl(target);
2140
2144
  }, []);
2141
2145
  const onPlayMedia = react.useCallback(
2142
2146
  (elementId) => {
2143
- chunkSN5EUDIT_js.toggleStageElementMedia(containerRef.current, elementId);
2147
+ chunk2Q2NFPXA_js.toggleStageElementMedia(containerRef.current, elementId);
2144
2148
  },
2145
2149
  [containerRef]
2146
2150
  );
2147
2151
  const onOleVerb = react.useCallback(
2148
2152
  (verb, elementId) => {
2149
- const target = chunkSN5EUDIT_js.resolveOleVerbTarget(slides[presentationSlideIndex], elementId, verb);
2150
- if (target) {
2151
- chunkSN5EUDIT_js.openUrlInNewTab(target.url);
2153
+ const target = chunk2Q2NFPXA_js.resolveOleVerbTarget(slides[presentationSlideIndex], elementId, verb);
2154
+ if (!target) {
2155
+ return;
2156
+ }
2157
+ if (target.action === "download") {
2158
+ chunk2Q2NFPXA_js.downloadDataUrl(target.url, target.fileName ?? "download");
2159
+ } else {
2160
+ chunk2Q2NFPXA_js.openUrlInNewTab(target.url);
2152
2161
  }
2153
2162
  },
2154
2163
  [slides, presentationSlideIndex]
@@ -2178,22 +2187,22 @@ function usePresentationActionExtensions(input) {
2178
2187
  };
2179
2188
  }
2180
2189
  function usePresenterConsole(slideIndex, active) {
2181
- const timerRef = react.useRef(chunkSN5EUDIT_js.createPresenterTimer());
2182
- const [snapshot, setSnapshot] = react.useState(() => chunkSN5EUDIT_js.createInitialPresentationSnapshot(slideIndex));
2190
+ const timerRef = react.useRef(chunk2Q2NFPXA_js.createPresenterTimer());
2191
+ const [snapshot, setSnapshot] = react.useState(() => chunk2Q2NFPXA_js.createInitialPresentationSnapshot(slideIndex));
2183
2192
  const patch = react.useCallback((value) => {
2184
- setSnapshot((current) => chunkSN5EUDIT_js.mergePresentationSnapshot(current, value));
2193
+ setSnapshot((current) => chunk2Q2NFPXA_js.mergePresentationSnapshot(current, value));
2185
2194
  }, []);
2186
2195
  react.useEffect(() => patch({ slideIndex }), [patch, slideIndex]);
2187
2196
  react.useEffect(() => {
2188
2197
  if (!active) {
2189
2198
  return;
2190
2199
  }
2191
- timerRef.current = chunkSN5EUDIT_js.resetPresenterTimer();
2200
+ timerRef.current = chunk2Q2NFPXA_js.resetPresenterTimer();
2192
2201
  patch({ paused: false, elapsedMs: 0 });
2193
2202
  const timer = window.setInterval(() => {
2194
2203
  patch({
2195
2204
  paused: timerRef.current.paused,
2196
- elapsedMs: chunkSN5EUDIT_js.presenterElapsed(timerRef.current)
2205
+ elapsedMs: chunk2Q2NFPXA_js.presenterElapsed(timerRef.current)
2197
2206
  });
2198
2207
  }, 1e3);
2199
2208
  return () => window.clearInterval(timer);
@@ -2203,19 +2212,19 @@ function usePresenterConsole(slideIndex, active) {
2203
2212
  applyAudienceSnapshot: setSnapshot,
2204
2213
  setBlackout: (blackout) => patch({ blackout }),
2205
2214
  toggleTimer: () => {
2206
- timerRef.current = chunkSN5EUDIT_js.togglePresenterTimer(timerRef.current);
2215
+ timerRef.current = chunk2Q2NFPXA_js.togglePresenterTimer(timerRef.current);
2207
2216
  patch({
2208
2217
  paused: timerRef.current.paused,
2209
- elapsedMs: chunkSN5EUDIT_js.presenterElapsed(timerRef.current)
2218
+ elapsedMs: chunk2Q2NFPXA_js.presenterElapsed(timerRef.current)
2210
2219
  });
2211
2220
  },
2212
2221
  resetTimer: () => {
2213
- timerRef.current = chunkSN5EUDIT_js.resetPresenterTimer();
2222
+ timerRef.current = chunk2Q2NFPXA_js.resetPresenterTimer();
2214
2223
  patch({ paused: false, elapsedMs: 0 });
2215
2224
  },
2216
2225
  stepZoom: (direction) => setSnapshot(
2217
- (current) => chunkSN5EUDIT_js.mergePresentationSnapshot(current, {
2218
- zoom: chunkSN5EUDIT_js.stepPresenterZoom(
2226
+ (current) => chunk2Q2NFPXA_js.mergePresentationSnapshot(current, {
2227
+ zoom: chunk2Q2NFPXA_js.stepPresenterZoom(
2219
2228
  current.zoom ?? { scale: 1, originX: 0.5, originY: 0.5 },
2220
2229
  direction
2221
2230
  )
@@ -2235,6 +2244,8 @@ function usePresentationMode(input) {
2235
2244
  slides,
2236
2245
  templateElementsBySlideId,
2237
2246
  visibleSlideIndexes,
2247
+ canvasSize,
2248
+ themeColorMap,
2238
2249
  activeSlideIndex,
2239
2250
  containerRef,
2240
2251
  content,
@@ -2266,7 +2277,7 @@ function usePresentationMode(input) {
2266
2277
  const [allSlidesOpen, setAllSlidesOpen] = react.useState(false);
2267
2278
  const [endOfShowVisible, setEndOfShowVisible] = react.useState(false);
2268
2279
  const [presentationStartTime, setPresentationStartTime] = react.useState(null);
2269
- const showGuard = react.useMemo(() => chunkSN5EUDIT_js.createPresenterShowGuard(), []);
2280
+ const showGuard = react.useMemo(() => chunk2Q2NFPXA_js.createPresenterShowGuard(), []);
2270
2281
  const {
2271
2282
  presentationAnimations,
2272
2283
  presentationElementStates,
@@ -2283,7 +2294,13 @@ function usePresentationMode(input) {
2283
2294
  startSlideAnimations,
2284
2295
  isSeededCompleted,
2285
2296
  presentationTimersRef
2286
- } = useAnimationPlayback({ slides, onPlayActionSound, showWithAnimation });
2297
+ } = useAnimationPlayback({
2298
+ slides,
2299
+ onPlayActionSound,
2300
+ showWithAnimation,
2301
+ canvasSize,
2302
+ themeColorMap
2303
+ });
2287
2304
  const {
2288
2305
  rehearsing,
2289
2306
  setRehearsing,
@@ -2357,7 +2374,7 @@ function usePresentationMode(input) {
2357
2374
  actionExtensions.bindNavigateToSlide(navigateToSlide);
2358
2375
  const movePresentationSlide = react.useCallback(
2359
2376
  (direction, trigger = "explicit") => {
2360
- if (!chunkSN5EUDIT_js.acceptsPresentationInput()) {
2377
+ if (!chunk2Q2NFPXA_js.acceptsPresentationInput()) {
2361
2378
  return;
2362
2379
  }
2363
2380
  if (endOfShowVisible) {
@@ -2426,7 +2443,7 @@ function usePresentationMode(input) {
2426
2443
  onSetMode("present");
2427
2444
  }, [containerRef, onSetMode, setRehearsing]);
2428
2445
  const enterPresentModeFromBeginning = react.useCallback(() => {
2429
- const first = chunkSN5EUDIT_js.firstShowSlideIndex(visibleSlideIndexes);
2446
+ const first = chunk2Q2NFPXA_js.firstShowSlideIndex(visibleSlideIndexes);
2430
2447
  if (first !== void 0) {
2431
2448
  onSetActiveSlideIndex(first);
2432
2449
  }
@@ -2506,7 +2523,7 @@ function usePresentationMode(input) {
2506
2523
  if (mode !== "present") {
2507
2524
  return;
2508
2525
  }
2509
- return chunkSN5EUDIT_js.attachPresentationVisibilityPause({
2526
+ return chunk2Q2NFPXA_js.attachPresentationVisibilityPause({
2510
2527
  root: containerRef.current ?? void 0,
2511
2528
  onHidden: () => clearPresentationTimersRef.current(),
2512
2529
  onVisible: () => scheduleAutoAdvanceRef.current(presentationSlideIndexRef.current)
@@ -2514,7 +2531,7 @@ function usePresentationMode(input) {
2514
2531
  }, [mode, containerRef]);
2515
2532
  react.useLayoutEffect(() => {
2516
2533
  if (mode === "present") {
2517
- const idx = chunkSN5EUDIT_js.presentationEntrySlideIndex(
2534
+ const idx = chunk2Q2NFPXA_js.presentationEntrySlideIndex(
2518
2535
  activeSlideIndexRef.current,
2519
2536
  visibleSlideIndexesRef.current
2520
2537
  );
@@ -2593,11 +2610,11 @@ function usePresentationMode(input) {
2593
2610
  return void 0;
2594
2611
  }
2595
2612
  const incoming = slides[transitionOverlay.incomingSlideIndex];
2596
- return chunkSN5EUDIT_js.buildMorphTransitionPlan(
2613
+ return chunk2Q2NFPXA_js.buildMorphTransitionPlan(
2597
2614
  slides[transitionOverlay.outgoingSlideIndex],
2598
2615
  incoming,
2599
2616
  transitionOverlay.durationMs,
2600
- chunkSN5EUDIT_js.morphOptionToMode(transitionOverlay.transition.morphOption),
2617
+ chunk2Q2NFPXA_js.morphOptionToMode(transitionOverlay.transition.morphOption),
2601
2618
  // `PresentationStage` stacks the incoming slide's elements above its
2602
2619
  // template shapes (`zIndex = templateElements.length + index`), so a
2603
2620
  // z-index journey has to start counting where the stage does.
@@ -2622,7 +2639,7 @@ function usePresentationMode(input) {
2622
2639
  if (!morphPlan) {
2623
2640
  return presentationKeyframesCss;
2624
2641
  }
2625
- const imageRules = chunkSN5EUDIT_js.buildMorphAnimationRules(morphPlan, "", "incoming", "image");
2642
+ const imageRules = chunk2Q2NFPXA_js.buildMorphAnimationRules(morphPlan, "", "incoming", "image");
2626
2643
  return `${presentationKeyframesCss ?? ""}
2627
2644
  ${morphPlan.keyframesCss}
2628
2645
  ${imageRules}`;
@@ -2919,7 +2936,7 @@ function useFindReplace({
2919
2936
  const [findResults, setFindResults] = react.useState([]);
2920
2937
  const [findResultIndex, setFindResultIndex] = react.useState(-1);
2921
2938
  const performFind = react.useCallback(() => {
2922
- const results = chunkSN5EUDIT_js.findInSlides(slides, findQuery, { matchCase: findMatchCase });
2939
+ const results = chunk2Q2NFPXA_js.findInSlides(slides, findQuery, { matchCase: findMatchCase });
2923
2940
  if (!findQuery) {
2924
2941
  setFindResults([]);
2925
2942
  setFindResultIndex(-1);
@@ -2953,7 +2970,7 @@ function useFindReplace({
2953
2970
  return;
2954
2971
  }
2955
2972
  onUpdateSlides(
2956
- (prevSlides) => chunkSN5EUDIT_js.applyFindReplacements(prevSlides, toReplace, replaceQuery).slides
2973
+ (prevSlides) => chunk2Q2NFPXA_js.applyFindReplacements(prevSlides, toReplace, replaceQuery).slides
2957
2974
  );
2958
2975
  onMarkDirty();
2959
2976
  },
@@ -2975,9 +2992,9 @@ function useFindReplace({
2975
2992
  }, [findResults, applyReplacements, performFind]);
2976
2993
  react.useEffect(() => {
2977
2994
  const handler = (event) => {
2978
- const { action } = chunkSN5EUDIT_js.mapEditorKey(event, {
2995
+ const { action } = chunk2Q2NFPXA_js.mapEditorKey(event, {
2979
2996
  canEdit: mode === "edit",
2980
- isTextInputTarget: chunkSN5EUDIT_js.isEditorTextInputTarget(event.target)
2997
+ isTextInputTarget: chunk2Q2NFPXA_js.isEditorTextInputTarget(event.target)
2981
2998
  });
2982
2999
  if (action !== "find") {
2983
3000
  return;
@@ -3088,7 +3105,7 @@ function addCommentToSlide(slides, slideIndex, text, authorName, elementId, ment
3088
3105
  if (!slide) {
3089
3106
  return { slides, didAdd: false };
3090
3107
  }
3091
- const next = chunkSN5EUDIT_js.addCommentToList(
3108
+ const next = chunk2Q2NFPXA_js.addCommentToList(
3092
3109
  slide.comments || [],
3093
3110
  text,
3094
3111
  authorName,
@@ -3109,7 +3126,7 @@ function removeCommentFromSlide(slides, slideIndex, commentId) {
3109
3126
  if (!slide) {
3110
3127
  return { slides, didDelete: false };
3111
3128
  }
3112
- const next = chunkSN5EUDIT_js.removeCommentFromList(slide.comments || [], commentId);
3129
+ const next = chunk2Q2NFPXA_js.removeCommentFromList(slide.comments || [], commentId);
3113
3130
  if (!next) {
3114
3131
  return { slides, didDelete: false };
3115
3132
  }
@@ -3120,7 +3137,7 @@ function editCommentInSlide(slides, slideIndex, commentId, newText) {
3120
3137
  if (!slide) {
3121
3138
  return { slides, didUpdate: false };
3122
3139
  }
3123
- const next = chunkSN5EUDIT_js.editCommentInList(slide.comments || [], commentId, newText);
3140
+ const next = chunk2Q2NFPXA_js.editCommentInList(slide.comments || [], commentId, newText);
3124
3141
  if (!next) {
3125
3142
  return { slides, didUpdate: false };
3126
3143
  }
@@ -3131,7 +3148,7 @@ function toggleResolvedInSlide(slides, slideIndex, commentId) {
3131
3148
  if (!slide) {
3132
3149
  return { slides, didUpdate: false };
3133
3150
  }
3134
- const next = chunkSN5EUDIT_js.toggleCommentResolvedInList(slide.comments || [], commentId);
3151
+ const next = chunk2Q2NFPXA_js.toggleCommentResolvedInList(slide.comments || [], commentId);
3135
3152
  if (!next) {
3136
3153
  return { slides, didUpdate: false };
3137
3154
  }
@@ -3142,7 +3159,7 @@ function addReplyToSlide(slides, slideIndex, parentId, text, authorName, mention
3142
3159
  if (!slide) {
3143
3160
  return { slides, didAdd: false };
3144
3161
  }
3145
- const next = chunkSN5EUDIT_js.replyToCommentInList(slide.comments || [], parentId, text, authorName);
3162
+ const next = chunk2Q2NFPXA_js.replyToCommentInList(slide.comments || [], parentId, text, authorName);
3146
3163
  if (!next) {
3147
3164
  return { slides, didAdd: false };
3148
3165
  }
@@ -3529,7 +3546,7 @@ function useDerivedElementState(input) {
3529
3546
  return [];
3530
3547
  }
3531
3548
  return [
3532
- ...chunkSN5EUDIT_js.visibleTemplateElements(activeSlide, templateElementsBySlideId[activeSlide.id] ?? [])
3549
+ ...chunk2Q2NFPXA_js.visibleTemplateElements(activeSlide, templateElementsBySlideId[activeSlide.id] ?? [])
3533
3550
  ];
3534
3551
  }, [activeSlide, templateElementsBySlideId]);
3535
3552
  const activeMaster = slideMasters[activeMasterIndex];
@@ -3596,7 +3613,7 @@ function useViewerCoreState(_input) {
3596
3613
  const marqueeStateRef = react.useRef(null);
3597
3614
  const isDrawingRef = react.useRef(false);
3598
3615
  const justInteractedRef = react.useRef(false);
3599
- const livePatcher = react.useMemo(() => chunkSN5EUDIT_js.createCollaborationLivePatcher(), []);
3616
+ const livePatcher = react.useMemo(() => chunk2Q2NFPXA_js.createCollaborationLivePatcher(), []);
3600
3617
  react.useEffect(() => () => livePatcher.dispose(), [livePatcher]);
3601
3618
  const slidesRef = react.useRef([]);
3602
3619
  const [mode, setMode] = react.useState("edit");
@@ -3605,8 +3622,8 @@ function useViewerCoreState(_input) {
3605
3622
  const [slides, setSlides] = react.useState([]);
3606
3623
  const [templateElementsBySlideId, setTemplateElementsBySlideId] = react.useState({});
3607
3624
  const [canvasSize, setCanvasSize] = react.useState({
3608
- width: chunkQWA5YEIZ_js.DEFAULT_CANVAS_WIDTH,
3609
- height: chunkQWA5YEIZ_js.DEFAULT_CANVAS_HEIGHT
3625
+ width: chunkXW46A7DN_js.DEFAULT_CANVAS_WIDTH,
3626
+ height: chunkXW46A7DN_js.DEFAULT_CANVAS_HEIGHT
3610
3627
  });
3611
3628
  const [slideSizeEmu, setSlideSizeEmu] = react.useState();
3612
3629
  const [activeSlideIndex, setActiveSlideIndex] = react.useState(0);
@@ -3627,7 +3644,7 @@ function useViewerCoreState(_input) {
3627
3644
  const resolved = typeof value === "function" ? value(inlineEditingTextRef.current) : value;
3628
3645
  inlineEditingTextRef.current = resolved;
3629
3646
  setInlineEditingTextBase(value);
3630
- chunkSN5EUDIT_js.publishLiveInlineText(
3647
+ chunk2Q2NFPXA_js.publishLiveInlineText(
3631
3648
  livePatcher,
3632
3649
  slidesRef.current[activeSlideIndexRef.current],
3633
3650
  inlineEditingElementIdRef.current,
@@ -3958,6 +3975,7 @@ function useLoadContent({
3958
3975
  setDigitalSignatureCount,
3959
3976
  setGuides,
3960
3977
  setReadOnlyRecommendation,
3978
+ setModifyVerifier,
3961
3979
  setCompatToasts,
3962
3980
  setLoading,
3963
3981
  setError,
@@ -3989,7 +4007,7 @@ function useLoadContent({
3989
4007
  );
3990
4008
  }
3991
4009
  const previousHandler = handlerRef.current;
3992
- const handler = new chunkSN5EUDIT_js.PptxHandler();
4010
+ const handler = new chunk2Q2NFPXA_js.PptxHandler();
3993
4011
  const parsed = await handler.load(buffer, { allowExternalImages });
3994
4012
  if (cancelled || token !== renderTokenRef.current) {
3995
4013
  handler.dispose();
@@ -4001,7 +4019,7 @@ function useLoadContent({
4001
4019
  handlerRef.current = null;
4002
4020
  const mediaElements = [];
4003
4021
  for (const slide of parsed.slides) {
4004
- chunkSN5EUDIT_js.collectMediaElements(slide.elements, mediaElements);
4022
+ chunk2Q2NFPXA_js.collectMediaElements(slide.elements, mediaElements);
4005
4023
  }
4006
4024
  for (const url of mediaDataUrls.values()) {
4007
4025
  if (url.startsWith("blob:")) {
@@ -4011,7 +4029,7 @@ function useLoadContent({
4011
4029
  mediaDataUrls.clear();
4012
4030
  await Promise.all(
4013
4031
  mediaElements.map(async (mediaElement) => {
4014
- const resolved = await chunkSN5EUDIT_js.resolveMediaElementSource(mediaElement, handler);
4032
+ const resolved = await chunk2Q2NFPXA_js.resolveMediaElementSource(mediaElement, handler);
4015
4033
  if (resolved.missing || !resolved.mediaPath || !resolved.url) {
4016
4034
  mediaElement.mediaMissing = true;
4017
4035
  return;
@@ -4022,7 +4040,7 @@ function useLoadContent({
4022
4040
  }
4023
4041
  })
4024
4042
  );
4025
- const { paths: imagePaths, refs: imageRefs } = chunkSN5EUDIT_js.collectImagePaths(parsed.slides);
4043
+ const { paths: imagePaths, refs: imageRefs } = chunk2Q2NFPXA_js.collectImagePaths(parsed.slides);
4026
4044
  let nextSlides = parsed.slides;
4027
4045
  if (imagePaths.size > 0) {
4028
4046
  const resolvedMap = /* @__PURE__ */ new Map();
@@ -4038,25 +4056,25 @@ function useLoadContent({
4038
4056
  })
4039
4057
  );
4040
4058
  nextSlides = parsed.slides.map((s) => {
4041
- const newElements = chunkSN5EUDIT_js.applyImagePathPatches(s.elements, resolvedMap, imageRefs);
4059
+ const newElements = chunk2Q2NFPXA_js.applyImagePathPatches(s.elements, resolvedMap, imageRefs);
4042
4060
  return newElements === s.elements ? s : { ...s, elements: newElements };
4043
4061
  });
4044
4062
  }
4045
- nextSlides = await chunkSN5EUDIT_js.resolveTableCellImageUrls(
4063
+ nextSlides = await chunk2Q2NFPXA_js.resolveTableCellImageUrls(
4046
4064
  nextSlides,
4047
4065
  (path) => handler.getImageData(path)
4048
4066
  );
4049
- const nextTableStyleMap = await chunkSN5EUDIT_js.resolveTableStyleImageUrls(
4067
+ const nextTableStyleMap = await chunk2Q2NFPXA_js.resolveTableStyleImageUrls(
4050
4068
  parsed.tableStyleMap,
4051
4069
  (path) => handler.getImageData(path)
4052
4070
  );
4053
4071
  handlerRef.current = handler;
4054
- const partition = chunkSN5EUDIT_js.partitionTemplateElements(nextSlides);
4072
+ const partition = chunk2Q2NFPXA_js.partitionTemplateElements(nextSlides);
4055
4073
  setSlides(partition.slides);
4056
4074
  setTemplateElementsBySlideId(partition.templateElementsBySlideId);
4057
4075
  setCanvasSize({
4058
- width: parsed.width ?? chunkQWA5YEIZ_js.DEFAULT_CANVAS_WIDTH,
4059
- height: parsed.height ?? chunkQWA5YEIZ_js.DEFAULT_CANVAS_HEIGHT
4076
+ width: parsed.width ?? chunkXW46A7DN_js.DEFAULT_CANVAS_WIDTH,
4077
+ height: parsed.height ?? chunkXW46A7DN_js.DEFAULT_CANVAS_HEIGHT
4060
4078
  });
4061
4079
  setSlideSizeEmu(
4062
4080
  typeof parsed.widthEmu === "number" && typeof parsed.heightEmu === "number" && parsed.widthEmu > 0 && parsed.heightEmu > 0 ? {
@@ -4069,7 +4087,7 @@ function useLoadContent({
4069
4087
  setLayoutOptions(parsed.layoutOptions ?? []);
4070
4088
  setSlideMasters(parsed.slideMasters ?? []);
4071
4089
  setModernCommentAuthors(parsed.modernCommentAuthors ?? []);
4072
- setRecentColors(chunkSN5EUDIT_js.seedRecentColors({ mruColors: parsed.mruColors }));
4090
+ setRecentColors(chunk2Q2NFPXA_js.seedRecentColors({ mruColors: parsed.mruColors }));
4073
4091
  setTheme(parsed.theme);
4074
4092
  setTableStyleMap(nextTableStyleMap);
4075
4093
  setTableStylesDefaultId(parsed.tableStylesDefaultId);
@@ -4077,7 +4095,7 @@ function useLoadContent({
4077
4095
  setThemeOptions(parsed.themeOptions ?? []);
4078
4096
  setCustomShows(parsed.customShows ?? []);
4079
4097
  setActiveCustomShowId(
4080
- chunkSN5EUDIT_js.resolveAuthoredCustomShowId(parsed.presentationProperties, parsed.customShows) ?? null
4098
+ chunk2Q2NFPXA_js.resolveAuthoredCustomShowId(parsed.presentationProperties, parsed.customShows) ?? null
4081
4099
  );
4082
4100
  setSections(parsed.sections ?? []);
4083
4101
  setPresentationProperties(parsed.presentationProperties ?? {});
@@ -4100,10 +4118,11 @@ function useLoadContent({
4100
4118
  setHasMacros(parsed.hasMacros === true);
4101
4119
  setHasDigitalSignatures(parsed.hasDigitalSignatures === true);
4102
4120
  setDigitalSignatureCount(parsed.digitalSignatureCount ?? 0);
4103
- setGuides(chunkSN5EUDIT_js.buildInitialGuides(parsed.presentationGuides, parsed.slides[0]?.guides));
4104
- setReadOnlyRecommendation(chunkSN5EUDIT_js.readOnlyRecommendation(parsed));
4121
+ setGuides(chunk2Q2NFPXA_js.buildInitialGuides(parsed.presentationGuides, parsed.slides[0]?.guides));
4122
+ setReadOnlyRecommendation(chunk2Q2NFPXA_js.readOnlyRecommendation(parsed));
4123
+ setModifyVerifier(parsed.modifyVerifier ?? void 0);
4105
4124
  setCompatToasts(
4106
- chunkSN5EUDIT_js.compatibilityWarningToasts([
4125
+ chunk2Q2NFPXA_js.compatibilityWarningToasts([
4107
4126
  ...parsed.warnings ?? [],
4108
4127
  ...parsed.slides.flatMap((slide) => slide.warnings ?? [])
4109
4128
  ])
@@ -4115,7 +4134,7 @@ function useLoadContent({
4115
4134
  onContentApplied?.();
4116
4135
  } catch (err) {
4117
4136
  if (!cancelled && token === renderTokenRef.current) {
4118
- if (err instanceof chunkSN5EUDIT_js.EncryptedFileError) {
4137
+ if (err instanceof chunk2Q2NFPXA_js.EncryptedFileError) {
4119
4138
  setIsEncrypted(true);
4120
4139
  } else {
4121
4140
  console.error("[pptx] Failed to load presentation content:", err);
@@ -4143,7 +4162,7 @@ function useLoadContent({
4143
4162
  }
4144
4163
  function useAutosave(input) {
4145
4164
  const { isDirty, filePath, serializeSlides, enabled = true, getChangeSources } = input;
4146
- const intervalMs = chunkSN5EUDIT_js.resolveAutosaveIntervalMs({
4165
+ const intervalMs = chunk2Q2NFPXA_js.resolveAutosaveIntervalMs({
4147
4166
  hostIntervalMs: input.intervalMs,
4148
4167
  optionsIntervalSeconds: input.intervalSeconds
4149
4168
  });
@@ -4174,7 +4193,7 @@ function useAutosave(input) {
4174
4193
  return;
4175
4194
  }
4176
4195
  const sources = changeSourcesRef.current?.() ?? [];
4177
- if (!chunkSN5EUDIT_js.shouldWriteAutosaveSnapshot({
4196
+ if (!chunk2Q2NFPXA_js.shouldWriteAutosaveSnapshot({
4178
4197
  filePath: path,
4179
4198
  isDirty: isDirtyRef.current,
4180
4199
  saving: isSavingRef.current,
@@ -4192,8 +4211,8 @@ function useAutosave(input) {
4192
4211
  isSavingRef.current = false;
4193
4212
  return;
4194
4213
  }
4195
- await chunkSN5EUDIT_js.saveAutosaveSnapshot(path, data);
4196
- lastSnapshotRef.current = chunkSN5EUDIT_js.autosaveSnapshotMark(path, sources);
4214
+ await chunk2Q2NFPXA_js.saveAutosaveSnapshot(path, data);
4215
+ lastSnapshotRef.current = chunk2Q2NFPXA_js.autosaveSnapshotMark(path, sources);
4197
4216
  setAutosaveStatus({ state: "saved", timestamp: Date.now() });
4198
4217
  } catch (err) {
4199
4218
  setAutosaveStatus({
@@ -4247,13 +4266,13 @@ function useElementOperations(input) {
4247
4266
  inlineEditingText
4248
4267
  } = input;
4249
4268
  const liveTextSegments = react.useCallback(() => {
4250
- if (!selectedElement || !chunkSN5EUDIT_js.hasTextProperties(selectedElement)) {
4269
+ if (!selectedElement || !chunk2Q2NFPXA_js.hasTextProperties(selectedElement)) {
4251
4270
  return void 0;
4252
4271
  }
4253
4272
  if (selectedElement.id !== inlineEditingElementId) {
4254
4273
  return selectedElement.textSegments;
4255
4274
  }
4256
- return chunkSN5EUDIT_js.remapTextToSegments(
4275
+ return chunk2Q2NFPXA_js.remapTextToSegments(
4257
4276
  inlineEditingText,
4258
4277
  selectedElement.textSegments,
4259
4278
  selectedElement.textStyle
@@ -4294,11 +4313,11 @@ function useElementOperations(input) {
4294
4313
  (elementId, updates) => {
4295
4314
  if (masterView?.target) {
4296
4315
  applyMasterViewWrite(
4297
- chunkSN5EUDIT_js.updateMasterViewElement(masterView, masterView.target, elementId, updates)
4316
+ chunk2Q2NFPXA_js.updateMasterViewElement(masterView, masterView.target, elementId, updates)
4298
4317
  );
4299
4318
  return;
4300
4319
  }
4301
- if (chunkSN5EUDIT_js.isTemplateElementId(elementId)) {
4320
+ if (chunk2Q2NFPXA_js.isTemplateElementId(elementId)) {
4302
4321
  const slideId = activeSlide?.id;
4303
4322
  if (slideId) {
4304
4323
  setTemplateElementsBySlideId((prev) => ({
@@ -4309,7 +4328,7 @@ function useElementOperations(input) {
4309
4328
  }));
4310
4329
  }
4311
4330
  } else {
4312
- setSlides((prev) => chunkSN5EUDIT_js.updateElement(prev, activeSlideIndex, elementId, updates));
4331
+ setSlides((prev) => chunk2Q2NFPXA_js.updateElement(prev, activeSlideIndex, elementId, updates));
4313
4332
  }
4314
4333
  history.markDirty();
4315
4334
  },
@@ -4334,7 +4353,7 @@ function useElementOperations(input) {
4334
4353
  );
4335
4354
  const updateSelectedShapeStyle = react.useCallback(
4336
4355
  (updates) => {
4337
- if (!selectedElement || !chunkSN5EUDIT_js.hasShapeProperties(selectedElement)) {
4356
+ if (!selectedElement || !chunk2Q2NFPXA_js.hasShapeProperties(selectedElement)) {
4338
4357
  return;
4339
4358
  }
4340
4359
  updateSelectedElement({
@@ -4345,19 +4364,19 @@ function useElementOperations(input) {
4345
4364
  );
4346
4365
  const updateSelectedTextStyle = react.useCallback(
4347
4366
  (updates) => {
4348
- if (!selectedElement || !chunkSN5EUDIT_js.hasTextProperties(selectedElement)) {
4367
+ if (!selectedElement || !chunk2Q2NFPXA_js.hasTextProperties(selectedElement)) {
4349
4368
  return;
4350
4369
  }
4351
4370
  const isLiveEditing = selectedElement.id === inlineEditingElementId;
4352
4371
  const currentSegments = liveTextSegments();
4353
- const inlineSel = chunkSN5EUDIT_js.getInlineEditorSelection(currentSegments);
4372
+ const inlineSel = chunk2Q2NFPXA_js.getInlineEditorSelection(currentSegments);
4354
4373
  if (inlineSel && currentSegments) {
4355
- const { newSegments: newSegments2, newSelection } = chunkSN5EUDIT_js.applyStyleToSelectedSegments(
4374
+ const { newSegments: newSegments2, newSelection } = chunk2Q2NFPXA_js.applyStyleToSelectedSegments(
4356
4375
  currentSegments,
4357
4376
  inlineSel,
4358
4377
  updates
4359
4378
  );
4360
- chunkSN5EUDIT_js.setPendingSelectionRestore(newSelection);
4379
+ chunk2Q2NFPXA_js.setPendingSelectionRestore(newSelection);
4361
4380
  updateSelectedElement({
4362
4381
  textSegments: newSegments2,
4363
4382
  ...isLiveEditing ? { text: inlineEditingText } : {}
@@ -4385,14 +4404,14 @@ function useElementOperations(input) {
4385
4404
  );
4386
4405
  const updateSelectedTextCase = react.useCallback(
4387
4406
  (mode) => {
4388
- if (!selectedElement || !chunkSN5EUDIT_js.hasTextProperties(selectedElement)) {
4407
+ if (!selectedElement || !chunk2Q2NFPXA_js.hasTextProperties(selectedElement)) {
4389
4408
  return;
4390
4409
  }
4391
4410
  const isLiveEditing = selectedElement.id === inlineEditingElementId;
4392
4411
  const currentSegments = liveTextSegments();
4393
- const inlineSel = chunkSN5EUDIT_js.getInlineEditorSelection(currentSegments);
4412
+ const inlineSel = chunk2Q2NFPXA_js.getInlineEditorSelection(currentSegments);
4394
4413
  if (inlineSel && currentSegments) {
4395
- const newSegments = chunkSN5EUDIT_js.applyCaseTransformToSegments(currentSegments, inlineSel, mode);
4414
+ const newSegments = chunk2Q2NFPXA_js.applyCaseTransformToSegments(currentSegments, inlineSel, mode);
4396
4415
  updateSelectedElement({
4397
4416
  textSegments: newSegments,
4398
4417
  ...isLiveEditing ? { text: inlineEditingText } : {}
@@ -4401,7 +4420,7 @@ function useElementOperations(input) {
4401
4420
  }
4402
4421
  const updates = {};
4403
4422
  if (currentSegments && currentSegments.length > 0) {
4404
- updates.textSegments = chunkSN5EUDIT_js.applyCaseTransformToSegments(
4423
+ updates.textSegments = chunk2Q2NFPXA_js.applyCaseTransformToSegments(
4405
4424
  currentSegments,
4406
4425
  null,
4407
4426
  mode
@@ -4409,7 +4428,7 @@ function useElementOperations(input) {
4409
4428
  }
4410
4429
  const baseText = isLiveEditing ? inlineEditingText : selectedElement.text;
4411
4430
  if (typeof baseText === "string") {
4412
- updates.text = chunkSN5EUDIT_js.transformTextCase(baseText, mode);
4431
+ updates.text = chunk2Q2NFPXA_js.transformTextCase(baseText, mode);
4413
4432
  }
4414
4433
  updateSelectedElement(updates);
4415
4434
  },
@@ -4428,15 +4447,15 @@ function useElementOperations(input) {
4428
4447
  [setSlides]
4429
4448
  );
4430
4449
  const masterViewTarget = masterView?.target ?? null;
4431
- const activeElements = masterViewTarget ? chunkSN5EUDIT_js.masterViewElements(masterView, masterViewTarget) : editTemplateMode ? templateElements : activeSlide?.elements ?? [];
4450
+ const activeElements = masterViewTarget ? chunk2Q2NFPXA_js.masterViewElements(masterView, masterViewTarget) : editTemplateMode ? templateElements : activeSlide?.elements ?? [];
4432
4451
  const updateActiveElements = react.useCallback(
4433
4452
  (updater) => {
4434
4453
  if (masterView?.target) {
4435
4454
  applyMasterViewWrite(
4436
- chunkSN5EUDIT_js.replaceMasterViewElements(
4455
+ chunk2Q2NFPXA_js.replaceMasterViewElements(
4437
4456
  masterView,
4438
4457
  masterView.target,
4439
- updater(chunkSN5EUDIT_js.masterViewElements(masterView, masterView.target))
4458
+ updater(chunk2Q2NFPXA_js.masterViewElements(masterView, masterView.target))
4440
4459
  )
4441
4460
  );
4442
4461
  return;
@@ -4489,7 +4508,7 @@ function useSectionOperations(input) {
4489
4508
  const { sections, setSections, slides, setSlides, markDirty } = input;
4490
4509
  const addSection2 = react.useCallback(
4491
4510
  (name, afterSlideIndex) => {
4492
- const result = chunkSN5EUDIT_js.addSection(sections, slides, name, afterSlideIndex);
4511
+ const result = chunk2Q2NFPXA_js.addSection(sections, slides, name, afterSlideIndex);
4493
4512
  setSlides(result.slides);
4494
4513
  setSections(result.sections);
4495
4514
  markDirty();
@@ -4498,7 +4517,7 @@ function useSectionOperations(input) {
4498
4517
  );
4499
4518
  const renameSection2 = react.useCallback(
4500
4519
  (sectionId, newName) => {
4501
- const result = chunkSN5EUDIT_js.renameSection(sections, slides, sectionId, newName);
4520
+ const result = chunk2Q2NFPXA_js.renameSection(sections, slides, sectionId, newName);
4502
4521
  setSections(result.sections);
4503
4522
  setSlides(result.slides);
4504
4523
  markDirty();
@@ -4507,7 +4526,7 @@ function useSectionOperations(input) {
4507
4526
  );
4508
4527
  const deleteSection2 = react.useCallback(
4509
4528
  (sectionId) => {
4510
- const result = chunkSN5EUDIT_js.deleteSection(sections, slides, sectionId);
4529
+ const result = chunk2Q2NFPXA_js.deleteSection(sections, slides, sectionId);
4511
4530
  setSections(result.sections);
4512
4531
  setSlides(result.slides);
4513
4532
  markDirty();
@@ -4516,21 +4535,21 @@ function useSectionOperations(input) {
4516
4535
  );
4517
4536
  const moveSectionUp2 = react.useCallback(
4518
4537
  (sectionId) => {
4519
- setSections(chunkSN5EUDIT_js.moveSectionUp(sections, sectionId));
4538
+ setSections(chunk2Q2NFPXA_js.moveSectionUp(sections, sectionId));
4520
4539
  markDirty();
4521
4540
  },
4522
4541
  [sections, setSections, markDirty]
4523
4542
  );
4524
4543
  const moveSectionDown2 = react.useCallback(
4525
4544
  (sectionId) => {
4526
- setSections(chunkSN5EUDIT_js.moveSectionDown(sections, sectionId));
4545
+ setSections(chunk2Q2NFPXA_js.moveSectionDown(sections, sectionId));
4527
4546
  markDirty();
4528
4547
  },
4529
4548
  [sections, setSections, markDirty]
4530
4549
  );
4531
4550
  const moveSlidesToSection2 = react.useCallback(
4532
4551
  (slideIndexes, targetSectionId) => {
4533
- const result = chunkSN5EUDIT_js.moveSlidesToSection(sections, slides, slideIndexes, targetSectionId);
4552
+ const result = chunk2Q2NFPXA_js.moveSlidesToSection(sections, slides, slideIndexes, targetSectionId);
4534
4553
  setSlides(result.slides);
4535
4554
  setSections(result.sections);
4536
4555
  markDirty();
@@ -4596,15 +4615,15 @@ function syncSelectionHandleOverlay(elementNode, elementId, geometry) {
4596
4615
  // src/viewer/hooks/pointer-move-handlers.ts
4597
4616
  function computeResizeGeometry(handle, startX, startY, startWidth, startHeight, dx, dy, snapToGrid, gridSpacingPx, lockAspect = false) {
4598
4617
  const startBox = { x: startX, y: startY, width: startWidth, height: startHeight };
4599
- let resized = chunkSN5EUDIT_js.applyResize(startBox, handle, dx, dy, 1, { minSize: chunkQWA5YEIZ_js.MIN_ELEMENT_SIZE });
4618
+ let resized = chunk2Q2NFPXA_js.applyResize(startBox, handle, dx, dy, 1, { minSize: chunkXW46A7DN_js.MIN_ELEMENT_SIZE });
4600
4619
  if (lockAspect) {
4601
- resized = chunkSN5EUDIT_js.lockResizeAspect(resized, startBox, handle, chunkQWA5YEIZ_js.MIN_ELEMENT_SIZE);
4620
+ resized = chunk2Q2NFPXA_js.lockResizeAspect(resized, startBox, handle, chunkXW46A7DN_js.MIN_ELEMENT_SIZE);
4602
4621
  }
4603
4622
  const box = { x: resized.x, y: resized.y, width: resized.width, height: resized.height };
4604
4623
  if (!snapToGrid) {
4605
4624
  return box;
4606
4625
  }
4607
- return chunkSN5EUDIT_js.snapBoxToGrid(box, handle, gridSpacingPx, chunkQWA5YEIZ_js.MIN_ELEMENT_SIZE);
4626
+ return chunk2Q2NFPXA_js.snapBoxToGrid(box, handle, gridSpacingPx, chunkXW46A7DN_js.MIN_ELEMENT_SIZE);
4608
4627
  }
4609
4628
  function resolveLiveTarget(input) {
4610
4629
  const { livePatcher, editTemplateMode, activeSlide } = input;
@@ -4717,7 +4736,7 @@ function processDragMove(e, drag, editorScale, snapToGrid, snapToShape, gridSpac
4717
4736
  width: el.width,
4718
4737
  height: el.height
4719
4738
  }));
4720
- const snapResult = chunkSN5EUDIT_js.computeSnapToShape(
4739
+ const snapResult = chunk2Q2NFPXA_js.computeSnapToShape(
4721
4740
  targetX,
4722
4741
  targetY,
4723
4742
  primaryEl.width,
@@ -4759,7 +4778,7 @@ function processDragMove(e, drag, editorScale, snapToGrid, snapToShape, gridSpac
4759
4778
  if (live) {
4760
4779
  for (const id of Object.keys(drag.startPositionsById)) {
4761
4780
  const start = drag.startPositionsById[id];
4762
- chunkSN5EUDIT_js.publishLiveGeometry(live.patcher, live.slideId, id, {
4781
+ chunk2Q2NFPXA_js.publishLiveGeometry(live.patcher, live.slideId, id, {
4763
4782
  x: start.x + appliedDx,
4764
4783
  y: start.y + appliedDy
4765
4784
  });
@@ -4791,8 +4810,8 @@ function processResizeMove(e, rs, editorScale, snapToGrid, gridSpacingPx, live)
4791
4810
  rs.lastY = geo.y;
4792
4811
  rs.lastWidth = geo.width;
4793
4812
  rs.lastHeight = geo.height;
4794
- const width = Math.max(geo.width, chunkQWA5YEIZ_js.MIN_ELEMENT_SIZE);
4795
- const height = Math.max(geo.height, chunkQWA5YEIZ_js.MIN_ELEMENT_SIZE);
4813
+ const width = Math.max(geo.width, chunkXW46A7DN_js.MIN_ELEMENT_SIZE);
4814
+ const height = Math.max(geo.height, chunkXW46A7DN_js.MIN_ELEMENT_SIZE);
4796
4815
  if (rs.domEl) {
4797
4816
  rs.domEl.style.left = `${geo.x}px`;
4798
4817
  rs.domEl.style.top = `${geo.y}px`;
@@ -4801,7 +4820,7 @@ function processResizeMove(e, rs, editorScale, snapToGrid, gridSpacingPx, live)
4801
4820
  syncSelectionHandleOverlay(rs.domEl, rs.elementId, { x: geo.x, y: geo.y, width, height });
4802
4821
  }
4803
4822
  if (live) {
4804
- chunkSN5EUDIT_js.publishLiveGeometry(live.patcher, live.slideId, rs.elementId, {
4823
+ chunk2Q2NFPXA_js.publishLiveGeometry(live.patcher, live.slideId, rs.elementId, {
4805
4824
  x: geo.x,
4806
4825
  y: geo.y,
4807
4826
  width,
@@ -4812,7 +4831,7 @@ function processResizeMove(e, rs, editorScale, snapToGrid, gridSpacingPx, live)
4812
4831
  function processAdjustmentMove(e, adj, editorScale, updateElementById) {
4813
4832
  const dx = (e.clientX - adj.startClientX) / editorScale;
4814
4833
  const dy = (e.clientY - adj.startClientY) / editorScale;
4815
- const adjustments = chunkSN5EUDIT_js.getDraggedShapeAdjustments(adj, dx, dy);
4834
+ const adjustments = chunk2Q2NFPXA_js.getDraggedShapeAdjustments(adj, dx, dy);
4816
4835
  if (!adj.moved && Math.hypot(dx, dy) > 2) {
4817
4836
  adj.moved = true;
4818
4837
  }
@@ -4887,13 +4906,13 @@ function processPointerUp(input) {
4887
4906
  if (i !== activeSlideIndex) {
4888
4907
  return s;
4889
4908
  }
4890
- const rerouted = chunkSN5EUDIT_js.rerouteConnectorsForMovedElements(s.elements, movedIds);
4909
+ const rerouted = chunk2Q2NFPXA_js.rerouteConnectorsForMovedElements(s.elements, movedIds);
4891
4910
  if (rerouted.length === 0) {
4892
4911
  return s;
4893
4912
  }
4894
4913
  return {
4895
4914
  ...s,
4896
- elements: chunkSN5EUDIT_js.applyReroutedConnectors(s.elements, rerouted)
4915
+ elements: chunk2Q2NFPXA_js.applyReroutedConnectors(s.elements, rerouted)
4897
4916
  };
4898
4917
  })
4899
4918
  );
@@ -4918,9 +4937,9 @@ function processPointerUp(input) {
4918
4937
  }
4919
4938
  function commitMarquee(marquee, editTemplateMode, templateElements, activeSlide, applySelection, clearSelection) {
4920
4939
  const sourceElements = editTemplateMode ? templateElements : activeSlide?.elements ?? [];
4921
- const hitIds = chunkSN5EUDIT_js.computeMarqueeHitIds(marquee, sourceElements);
4940
+ const hitIds = chunk2Q2NFPXA_js.computeMarqueeHitIds(marquee, sourceElements);
4922
4941
  if (marquee.additive) {
4923
- const merged = chunkSN5EUDIT_js.mergeAdditiveSelection(marquee.baseSelectionIds, hitIds);
4942
+ const merged = chunk2Q2NFPXA_js.mergeAdditiveSelection(marquee.baseSelectionIds, hitIds);
4924
4943
  if (merged.length > 0) {
4925
4944
  applySelection(merged[0], merged);
4926
4945
  } else {
@@ -4943,8 +4962,8 @@ function commitDrag(drag, editTemplateMode, activeSlide, activeSlideIndex, setTe
4943
4962
  }
4944
4963
  return { ...el, x: start.x + dx, y: start.y + dy };
4945
4964
  });
4946
- const rerouted = chunkSN5EUDIT_js.rerouteConnectorsForMovedElements(movedElements, movedIds);
4947
- return chunkSN5EUDIT_js.applyReroutedConnectors(movedElements, rerouted);
4965
+ const rerouted = chunk2Q2NFPXA_js.rerouteConnectorsForMovedElements(movedElements, movedIds);
4966
+ return chunk2Q2NFPXA_js.applyReroutedConnectors(movedElements, rerouted);
4948
4967
  };
4949
4968
  if (editTemplateMode) {
4950
4969
  const slideId = activeSlide?.id;
@@ -5100,12 +5119,12 @@ function useCanvasInteractions(input) {
5100
5119
  return;
5101
5120
  }
5102
5121
  const el = elementLookup.get(editId);
5103
- if (el && chunkSN5EUDIT_js.hasTextProperties(el)) {
5122
+ if (el && chunk2Q2NFPXA_js.hasTextProperties(el)) {
5104
5123
  const committedText = transformCommittedText ? transformCommittedText(inlineEditingText) : inlineEditingText;
5105
- const newSegments = chunkSN5EUDIT_js.remapTextToSegments(committedText, el.textSegments, el.textStyle);
5124
+ const newSegments = chunk2Q2NFPXA_js.remapTextToSegments(committedText, el.textSegments, el.textStyle);
5106
5125
  const editorEl = document.querySelector("[data-inline-editor]");
5107
- const newHeight = chunkSN5EUDIT_js.resolveInlineEditAutoFitHeight(el.textStyle, el.height, editorEl);
5108
- const shrink = chunkSN5EUDIT_js.resolveInlineEditNormAutofitShrink(el.textStyle, el.height, editorEl);
5126
+ const newHeight = chunk2Q2NFPXA_js.resolveInlineEditAutoFitHeight(el.textStyle, el.height, editorEl);
5127
+ const shrink = chunk2Q2NFPXA_js.resolveInlineEditNormAutofitShrink(el.textStyle, el.height, editorEl);
5109
5128
  ops.updateElementById(editId, {
5110
5129
  text: committedText,
5111
5130
  textSegments: newSegments,
@@ -5124,7 +5143,7 @@ function useCanvasInteractions(input) {
5124
5143
  setInlineEditingText("");
5125
5144
  };
5126
5145
  const openEquationEditorForElement = (el) => {
5127
- if (!chunkSN5EUDIT_js.hasTextProperties(el)) {
5146
+ if (!chunk2Q2NFPXA_js.hasTextProperties(el)) {
5128
5147
  return false;
5129
5148
  }
5130
5149
  const eqSeg = el.textSegments?.find((seg) => seg.equationXml);
@@ -5154,7 +5173,7 @@ function useCanvasInteractions(input) {
5154
5173
  justInteractedRef.current = false;
5155
5174
  } else {
5156
5175
  const el = elementLookup.get(elementId);
5157
- if (el && chunkSN5EUDIT_js.hasTextProperties(el) && chunkSN5EUDIT_js.canInteractWithElement(el, "textEdit")) {
5176
+ if (el && chunk2Q2NFPXA_js.hasTextProperties(el) && chunk2Q2NFPXA_js.canInteractWithElement(el, "textEdit")) {
5158
5177
  if (!openEquationEditorForElement(el)) {
5159
5178
  setInlineEditingElementId(elementId);
5160
5179
  setInlineEditingText(el.text ?? "");
@@ -5173,7 +5192,7 @@ function useCanvasInteractions(input) {
5173
5192
  if (openEquationEditorForElement(el)) {
5174
5193
  return;
5175
5194
  }
5176
- if (chunkSN5EUDIT_js.hasTextProperties(el) && chunkSN5EUDIT_js.canInteractWithElement(el, "textEdit")) {
5195
+ if (chunk2Q2NFPXA_js.hasTextProperties(el) && chunk2Q2NFPXA_js.canInteractWithElement(el, "textEdit")) {
5177
5196
  setInlineEditingElementId(elementId);
5178
5197
  setInlineEditingText(el.text ?? "");
5179
5198
  }
@@ -5196,7 +5215,7 @@ function useCanvasInteractions(input) {
5196
5215
  justSelectedRef.current = false;
5197
5216
  }
5198
5217
  const ids = !wasSelected ? [elementId] : effectiveSelectedIds.length ? effectiveSelectedIds : [elementId];
5199
- const movableIds = chunkSN5EUDIT_js.filterInteractableIds(ids, (id) => elementLookup.get(id), "move");
5218
+ const movableIds = chunk2Q2NFPXA_js.filterInteractableIds(ids, (id) => elementLookup.get(id), "move");
5200
5219
  if (movableIds.length === 0) {
5201
5220
  return;
5202
5221
  }
@@ -5266,7 +5285,7 @@ function useCanvasInteractions(input) {
5266
5285
  const handleResizePointerDown = (elementId, e, handle) => {
5267
5286
  e.stopPropagation();
5268
5287
  const el = elementLookup.get(elementId);
5269
- if (!el || !chunkSN5EUDIT_js.canInteractWithElement(el, "resize")) {
5288
+ if (!el || !chunk2Q2NFPXA_js.canInteractWithElement(el, "resize")) {
5270
5289
  return;
5271
5290
  }
5272
5291
  resizeStateRef.current = {
@@ -5288,7 +5307,7 @@ function useCanvasInteractions(input) {
5288
5307
  };
5289
5308
  const handleRotate = (elementId, rotationDeg) => {
5290
5309
  const el = elementLookup.get(elementId);
5291
- if (!el || !chunkSN5EUDIT_js.canInteractWithElement(el, "rotate")) {
5310
+ if (!el || !chunk2Q2NFPXA_js.canInteractWithElement(el, "rotate")) {
5292
5311
  return;
5293
5312
  }
5294
5313
  ops.updateElementById(elementId, { rotation: rotationDeg });
@@ -5308,10 +5327,10 @@ function useCanvasInteractions(input) {
5308
5327
  const handleAdjustmentPointerDown = (elementId, e, descriptor) => {
5309
5328
  e.stopPropagation();
5310
5329
  const el = elementLookup.get(elementId);
5311
- if (!el || !chunkSN5EUDIT_js.canInteractWithElement(el, "adjustHandle")) {
5330
+ if (!el || !chunk2Q2NFPXA_js.canInteractWithElement(el, "adjustHandle")) {
5312
5331
  return;
5313
5332
  }
5314
- shapeAdjustmentDragStateRef.current = chunkSN5EUDIT_js.beginShapeAdjustment(
5333
+ shapeAdjustmentDragStateRef.current = chunk2Q2NFPXA_js.beginShapeAdjustment(
5315
5334
  el,
5316
5335
  descriptor,
5317
5336
  e.clientX,
@@ -5358,7 +5377,7 @@ function createFileHandlers(deps) {
5358
5377
  h = Math.round(h * scale);
5359
5378
  }
5360
5379
  addElement({
5361
- id: chunkSN5EUDIT_js.generateElementId(),
5380
+ id: chunk2Q2NFPXA_js.generateElementId(),
5362
5381
  type: "image",
5363
5382
  x: Math.round((canvasSize.width - w) / 2),
5364
5383
  y: Math.round((canvasSize.height - h) / 2),
@@ -5369,7 +5388,7 @@ function createFileHandlers(deps) {
5369
5388
  };
5370
5389
  img.onerror = () => {
5371
5390
  addElement({
5372
- id: chunkSN5EUDIT_js.generateElementId(),
5391
+ id: chunk2Q2NFPXA_js.generateElementId(),
5373
5392
  type: "image",
5374
5393
  x: 100,
5375
5394
  y: 100,
@@ -5388,14 +5407,14 @@ function createFileHandlers(deps) {
5388
5407
  return;
5389
5408
  }
5390
5409
  e.target.value = "";
5391
- const mediaType = chunkSN5EUDIT_js.classifyMediaType(file.type);
5410
+ const mediaType = chunk2Q2NFPXA_js.classifyMediaType(file.type);
5392
5411
  if (!mediaType) {
5393
5412
  return;
5394
5413
  }
5395
5414
  const elFilePath = file.path;
5396
5415
  const insertMediaElement = (mediaSourceUrl, width, height) => {
5397
5416
  addElement({
5398
- id: chunkSN5EUDIT_js.generateElementId(),
5417
+ id: chunk2Q2NFPXA_js.generateElementId(),
5399
5418
  type: "media",
5400
5419
  mediaType,
5401
5420
  mediaMimeType: file.type || void 0,
@@ -5570,13 +5589,13 @@ function createStructuredElementHandlers(deps) {
5570
5589
  return;
5571
5590
  }
5572
5591
  addElement({
5573
- id: chunkSN5EUDIT_js.generateElementId(),
5592
+ id: chunk2Q2NFPXA_js.generateElementId(),
5574
5593
  type: "smartArt",
5575
5594
  x: 100,
5576
5595
  y: 120,
5577
5596
  width: 600,
5578
5597
  height: 340,
5579
- smartArtData: chunkSN5EUDIT_js.buildSmartArtPresetData(
5598
+ smartArtData: chunk2Q2NFPXA_js.buildSmartArtPresetData(
5580
5599
  layout,
5581
5600
  defaultItems,
5582
5601
  (i) => `node-${Date.now()}-${i}-${Math.random().toString(36).slice(2, 8)}`
@@ -5588,7 +5607,7 @@ function createStructuredElementHandlers(deps) {
5588
5607
  return;
5589
5608
  }
5590
5609
  addElement({
5591
- id: chunkSN5EUDIT_js.generateElementId(),
5610
+ id: chunk2Q2NFPXA_js.generateElementId(),
5592
5611
  type: "shape",
5593
5612
  x: 120,
5594
5613
  y: 200,
@@ -5626,7 +5645,7 @@ function createStructuredElementHandlers(deps) {
5626
5645
  return;
5627
5646
  }
5628
5647
  const resolved = resolveHyperlinkEditResult(data);
5629
- if (resolved.url && !chunkSN5EUDIT_js.isUrlSafe(resolved.url)) {
5648
+ if (resolved.url && !chunk2Q2NFPXA_js.isUrlSafe(resolved.url)) {
5630
5649
  return;
5631
5650
  }
5632
5651
  const actionClick = {
@@ -5650,7 +5669,7 @@ function createStructuredElementHandlers(deps) {
5650
5669
  const displayText = value || fieldTexts[fieldType] || fieldType;
5651
5670
  const fieldGuid = `{${crypto.randomUUID().toUpperCase()}}`;
5652
5671
  addElement({
5653
- id: chunkSN5EUDIT_js.generateElementId(),
5672
+ id: chunk2Q2NFPXA_js.generateElementId(),
5654
5673
  type: "shape",
5655
5674
  x: 120,
5656
5675
  y: 200,
@@ -5672,11 +5691,11 @@ function createStructuredElementHandlers(deps) {
5672
5691
  if (!activeSlide) {
5673
5692
  return;
5674
5693
  }
5675
- const preset = chunkSN5EUDIT_js.ACTION_BUTTON_PRESETS.find((p) => p.shapeType === shapeType);
5694
+ const preset = chunk2Q2NFPXA_js.ACTION_BUTTON_PRESETS.find((p) => p.shapeType === shapeType);
5676
5695
  if (!preset) {
5677
5696
  return;
5678
5697
  }
5679
- const defaultPptxAction = chunkSN5EUDIT_js.elementActionToPptxAction({
5698
+ const defaultPptxAction = chunk2Q2NFPXA_js.elementActionToPptxAction({
5680
5699
  trigger: "click",
5681
5700
  type: preset.defaultAction
5682
5701
  });
@@ -5685,7 +5704,7 @@ function createStructuredElementHandlers(deps) {
5685
5704
  defaultPptxAction.highlightClick = true;
5686
5705
  }
5687
5706
  addElement({
5688
- id: chunkSN5EUDIT_js.generateElementId(),
5707
+ id: chunk2Q2NFPXA_js.generateElementId(),
5689
5708
  type: "shape",
5690
5709
  x: 150,
5691
5710
  y: 150,
@@ -5752,14 +5771,14 @@ function useInsertElements(input) {
5752
5771
  return;
5753
5772
  }
5754
5773
  addElement({
5755
- id: chunkSN5EUDIT_js.generateElementId(),
5774
+ id: chunk2Q2NFPXA_js.generateElementId(),
5756
5775
  type: "text",
5757
5776
  x: 100,
5758
5777
  y: 100,
5759
5778
  width: 300,
5760
5779
  height: 60,
5761
5780
  text: "",
5762
- textStyle: { fontSize: chunkQWA5YEIZ_js.DEFAULT_TEXT_FONT_SIZE }
5781
+ textStyle: { fontSize: chunkXW46A7DN_js.DEFAULT_TEXT_FONT_SIZE }
5763
5782
  });
5764
5783
  };
5765
5784
  const handleAddShape = () => {
@@ -5767,7 +5786,7 @@ function useInsertElements(input) {
5767
5786
  return;
5768
5787
  }
5769
5788
  addElement({
5770
- id: chunkSN5EUDIT_js.generateElementId(),
5789
+ id: chunk2Q2NFPXA_js.generateElementId(),
5771
5790
  type: "shape",
5772
5791
  x: 150,
5773
5792
  y: 150,
@@ -5786,15 +5805,15 @@ function useInsertElements(input) {
5786
5805
  return;
5787
5806
  }
5788
5807
  addElement({
5789
- ...chunkSN5EUDIT_js.newTableElement(chunkQWA5YEIZ_js.DEFAULT_TABLE_ROWS, chunkQWA5YEIZ_js.DEFAULT_TABLE_COLUMNS, 100, 200),
5790
- id: chunkSN5EUDIT_js.generateElementId()
5808
+ ...chunk2Q2NFPXA_js.newTableElement(chunkXW46A7DN_js.DEFAULT_TABLE_ROWS, chunkXW46A7DN_js.DEFAULT_TABLE_COLUMNS, 100, 200),
5809
+ id: chunk2Q2NFPXA_js.generateElementId()
5791
5810
  });
5792
5811
  };
5793
5812
  const handleAddChart = (chartKind) => {
5794
5813
  if (!activeSlide) {
5795
5814
  return;
5796
5815
  }
5797
- addElement(chunkSN5EUDIT_js.createDefaultChartElement(chartKind));
5816
+ addElement(chunk2Q2NFPXA_js.createDefaultChartElement(chartKind));
5798
5817
  };
5799
5818
  const structured = createStructuredElementHandlers({
5800
5819
  activeSlide,
@@ -5864,7 +5883,7 @@ function useClipboardHandlers(input) {
5864
5883
  if (!selectedElement) {
5865
5884
  return;
5866
5885
  }
5867
- setClipboardPayload(chunkSN5EUDIT_js.buildElementClipboardPayload(selectedElement, editTemplateMode));
5886
+ setClipboardPayload(chunk2Q2NFPXA_js.buildElementClipboardPayload(selectedElement, editTemplateMode));
5868
5887
  };
5869
5888
  const handleDelete = () => {
5870
5889
  const idsToDelete = effectiveSelectedIds;
@@ -5881,7 +5900,7 @@ function useClipboardHandlers(input) {
5881
5900
  handleDelete();
5882
5901
  };
5883
5902
  const insertClone = (source) => {
5884
- const clone = chunkSN5EUDIT_js.cloneElementForPaste(source, { intoTemplate: editTemplateMode });
5903
+ const clone = chunk2Q2NFPXA_js.cloneElementForPaste(source, { intoTemplate: editTemplateMode });
5885
5904
  ops.updateActiveElements((els) => [...els, clone]);
5886
5905
  ops.applySelection(clone.id);
5887
5906
  history.markDirty();
@@ -5916,7 +5935,7 @@ function resolveShapePath(el) {
5916
5935
  return el.pathData;
5917
5936
  }
5918
5937
  if ("shapeType" in el && typeof el.shapeType === "string") {
5919
- const clipPath = chunkSN5EUDIT_js.getPresetShapeClipPath(el.shapeType);
5938
+ const clipPath = chunk2Q2NFPXA_js.getPresetShapeClipPath(el.shapeType);
5920
5939
  if (clipPath) {
5921
5940
  const svgPath = clipPathToSvgPath(clipPath, el.width, el.height);
5922
5941
  if (svgPath) {
@@ -5967,7 +5986,7 @@ function clipPathToSvgPath(clipPath, width, height) {
5967
5986
  return parts.join(" ");
5968
5987
  }
5969
5988
  function transformPathToGlobal(pathData, el) {
5970
- const polys = chunkSN5EUDIT_js.svgPathToPolygons(pathData);
5989
+ const polys = chunk2Q2NFPXA_js.svgPathToPolygons(pathData);
5971
5990
  if (polys.length === 0) {
5972
5991
  return pathData;
5973
5992
  }
@@ -5987,10 +6006,10 @@ function transformPathToGlobal(pathData, el) {
5987
6006
  y: pt.y * scaleY + el.y
5988
6007
  }))
5989
6008
  );
5990
- return chunkSN5EUDIT_js.polygonsToSvgPath(transformed);
6009
+ return chunk2Q2NFPXA_js.polygonsToSvgPath(transformed);
5991
6010
  }
5992
6011
  function transformPathToLocal(pathData, x, y, _width, _height) {
5993
- const polys = chunkSN5EUDIT_js.svgPathToPolygons(pathData);
6012
+ const polys = chunk2Q2NFPXA_js.svgPathToPolygons(pathData);
5994
6013
  if (polys.length === 0) {
5995
6014
  return pathData;
5996
6015
  }
@@ -6000,10 +6019,10 @@ function transformPathToLocal(pathData, x, y, _width, _height) {
6000
6019
  y: pt.y - y
6001
6020
  }))
6002
6021
  );
6003
- return chunkSN5EUDIT_js.polygonsToSvgPath(transformed);
6022
+ return chunk2Q2NFPXA_js.polygonsToSvgPath(transformed);
6004
6023
  }
6005
6024
  function pathBounds(pathData) {
6006
- const polys = chunkSN5EUDIT_js.svgPathToPolygons(pathData);
6025
+ const polys = chunk2Q2NFPXA_js.svgPathToPolygons(pathData);
6007
6026
  let minX = Infinity;
6008
6027
  let minY = Infinity;
6009
6028
  let maxX = -Infinity;
@@ -6062,7 +6081,7 @@ function useMergeShapesHandler(input) {
6062
6081
  let allFragments = [];
6063
6082
  let remaining = globalPaths[0];
6064
6083
  for (let i = 1; i < globalPaths.length; i++) {
6065
- const frags = chunkSN5EUDIT_js.mergeShapes("fragment", remaining, globalPaths[i]);
6084
+ const frags = chunk2Q2NFPXA_js.mergeShapes("fragment", remaining, globalPaths[i]);
6066
6085
  if (Array.isArray(frags)) {
6067
6086
  allFragments = frags;
6068
6087
  }
@@ -6091,7 +6110,7 @@ function useMergeShapesHandler(input) {
6091
6110
  bounds.height
6092
6111
  );
6093
6112
  const newEl = {
6094
- id: chunkSN5EUDIT_js.generateElementId(),
6113
+ id: chunk2Q2NFPXA_js.generateElementId(),
6095
6114
  type: "shape",
6096
6115
  x: bounds.x,
6097
6116
  y: bounds.y,
@@ -6129,7 +6148,7 @@ function useMergeShapesHandler(input) {
6129
6148
  } else {
6130
6149
  let resultPath = globalPaths[0];
6131
6150
  for (let i = 1; i < globalPaths.length; i++) {
6132
- const result = chunkSN5EUDIT_js.mergeShapes(operation, resultPath, globalPaths[i]);
6151
+ const result = chunk2Q2NFPXA_js.mergeShapes(operation, resultPath, globalPaths[i]);
6133
6152
  if (typeof result === "string") {
6134
6153
  resultPath = result;
6135
6154
  }
@@ -6150,7 +6169,7 @@ function useMergeShapesHandler(input) {
6150
6169
  );
6151
6170
  const primary = targets[0];
6152
6171
  const newEl = {
6153
- id: chunkSN5EUDIT_js.generateElementId(),
6172
+ id: chunk2Q2NFPXA_js.generateElementId(),
6154
6173
  type: "shape",
6155
6174
  x: bounds.x,
6156
6175
  y: bounds.y,
@@ -6213,10 +6232,10 @@ function useGroupAlignLayerHandlers(input) {
6213
6232
  if (ids.length < 2 || !activeSlide) {
6214
6233
  return;
6215
6234
  }
6216
- if (!selectedElements.every((el) => chunkSN5EUDIT_js.canInteractWithElement(el, "group"))) {
6235
+ if (!selectedElements.every((el) => chunk2Q2NFPXA_js.canInteractWithElement(el, "group"))) {
6217
6236
  return;
6218
6237
  }
6219
- const { elements, groupId } = chunkSN5EUDIT_js.groupElements(ops.activeElements, ids, chunkSN5EUDIT_js.generateElementId());
6238
+ const { elements, groupId } = chunk2Q2NFPXA_js.groupElements(ops.activeElements, ids, chunk2Q2NFPXA_js.generateElementId());
6220
6239
  if (groupId === null) {
6221
6240
  return;
6222
6241
  }
@@ -6228,15 +6247,15 @@ function useGroupAlignLayerHandlers(input) {
6228
6247
  if (!selectedElement || selectedElement.type !== "group" || !activeSlide) {
6229
6248
  return;
6230
6249
  }
6231
- if (!chunkSN5EUDIT_js.canInteractWithElement(selectedElement, "group")) {
6250
+ if (!chunk2Q2NFPXA_js.canInteractWithElement(selectedElement, "group")) {
6232
6251
  return;
6233
6252
  }
6234
6253
  const group = selectedElement;
6235
- const intoTemplate = chunkSN5EUDIT_js.isTemplateElementId(group.id);
6254
+ const intoTemplate = chunk2Q2NFPXA_js.isTemplateElementId(group.id);
6236
6255
  const childIds = group.children.map(
6237
- (child) => intoTemplate ? chunkSN5EUDIT_js.makeCloneId(true, child.id || group.id) : child.id || chunkSN5EUDIT_js.generateElementId()
6256
+ (child) => intoTemplate ? chunk2Q2NFPXA_js.makeCloneId(true, child.id || group.id) : child.id || chunk2Q2NFPXA_js.generateElementId()
6238
6257
  );
6239
- const { elements, childIds: usedIds } = chunkSN5EUDIT_js.ungroupElements(
6258
+ const { elements, childIds: usedIds } = chunk2Q2NFPXA_js.ungroupElements(
6240
6259
  ops.activeElements,
6241
6260
  group.id,
6242
6261
  childIds,
@@ -6265,7 +6284,7 @@ function useGroupAlignLayerHandlers(input) {
6265
6284
  if (!edge) {
6266
6285
  return;
6267
6286
  }
6268
- const positions = chunkSN5EUDIT_js.alignElements(selectedElements, edge);
6287
+ const positions = chunk2Q2NFPXA_js.alignElements(selectedElements, edge);
6269
6288
  for (const [id, pos] of positions) {
6270
6289
  const el = elementLookup.get(id);
6271
6290
  if (!el) {
@@ -6283,7 +6302,7 @@ function useGroupAlignLayerHandlers(input) {
6283
6302
  if (!distAxis) {
6284
6303
  return;
6285
6304
  }
6286
- const positions = chunkSN5EUDIT_js.distributeElements(selectedElements, distAxis);
6305
+ const positions = chunk2Q2NFPXA_js.distributeElements(selectedElements, distAxis);
6287
6306
  for (const [id, pos] of positions) {
6288
6307
  const el = elementLookup.get(id);
6289
6308
  if (!el) {
@@ -6294,14 +6313,14 @@ function useGroupAlignLayerHandlers(input) {
6294
6313
  history.markDirty();
6295
6314
  };
6296
6315
  const canDistribute = selectedElements.length >= 3;
6297
- const selectionGroupable = selectedElements.every((el) => chunkSN5EUDIT_js.canInteractWithElement(el, "group"));
6316
+ const selectionGroupable = selectedElements.every((el) => chunk2Q2NFPXA_js.canInteractWithElement(el, "group"));
6298
6317
  const handleMoveLayer = (direction) => {
6299
6318
  if (!selectedElement || !activeSlide) {
6300
6319
  return;
6301
6320
  }
6302
6321
  const id = selectedElement.id;
6303
6322
  ops.updateActiveElements(
6304
- (els) => direction === "forward" ? chunkSN5EUDIT_js.bringForward(els, id) : direction === "backward" ? chunkSN5EUDIT_js.sendBackward(els, id) : els
6323
+ (els) => direction === "forward" ? chunk2Q2NFPXA_js.bringForward(els, id) : direction === "backward" ? chunk2Q2NFPXA_js.sendBackward(els, id) : els
6305
6324
  );
6306
6325
  history.markDirty();
6307
6326
  };
@@ -6311,7 +6330,7 @@ function useGroupAlignLayerHandlers(input) {
6311
6330
  }
6312
6331
  const id = selectedElement.id;
6313
6332
  ops.updateActiveElements(
6314
- (els) => direction === "front" ? chunkSN5EUDIT_js.bringToFront(els, id) : chunkSN5EUDIT_js.sendToBack(els, id)
6333
+ (els) => direction === "front" ? chunk2Q2NFPXA_js.bringToFront(els, id) : chunk2Q2NFPXA_js.sendToBack(els, id)
6315
6334
  );
6316
6335
  history.markDirty();
6317
6336
  };
@@ -6445,7 +6464,7 @@ function useSlideManagement(input) {
6445
6464
  theme
6446
6465
  } = input;
6447
6466
  const handleAddSlide = () => {
6448
- const newSlide = chunkSN5EUDIT_js.createBlankSlide(slides.length + 1);
6467
+ const newSlide = chunk2Q2NFPXA_js.createBlankSlide(slides.length + 1);
6449
6468
  ops.updateSlides((prev) => {
6450
6469
  const next = [...prev];
6451
6470
  next.splice(activeSlideIndex + 1, 0, newSlide);
@@ -6508,7 +6527,7 @@ function useSlideManagement(input) {
6508
6527
  }
6509
6528
  const clone = {
6510
6529
  ...src,
6511
- id: chunkSN5EUDIT_js.makeSlideId(),
6530
+ id: chunk2Q2NFPXA_js.makeSlideId(),
6512
6531
  elements: src.elements.map((el) => ({
6513
6532
  ...el,
6514
6533
  id: `${el.id}-dup-${Math.random().toString(36).slice(2, 6)}`
@@ -6540,7 +6559,7 @@ function useSlideManagement(input) {
6540
6559
  const handleInsertSlideFromLayout = (layoutPath, layoutName) => {
6541
6560
  const insertAt = activeSlideIndex + 1;
6542
6561
  const draft = {
6543
- ...chunkSN5EUDIT_js.createBlankSlide(slides.length + 1),
6562
+ ...chunk2Q2NFPXA_js.createBlankSlide(slides.length + 1),
6544
6563
  layoutPath,
6545
6564
  ...layoutName ? { layoutName } : {}
6546
6565
  };
@@ -6573,9 +6592,9 @@ function useSlideManagement(input) {
6573
6592
  };
6574
6593
  const handleInsertSlideFromTemplate = (templateId) => {
6575
6594
  const insertAt = activeSlideIndex + 1;
6576
- const draft = chunkSN5EUDIT_js.buildSlideTemplateSlide(templateId, chunkSN5EUDIT_js.makeSlideId(), slides.length + 1, {
6595
+ const draft = chunk2Q2NFPXA_js.buildSlideTemplateSlide(templateId, chunk2Q2NFPXA_js.makeSlideId(), slides.length + 1, {
6577
6596
  ...canvasSize ? { slideWidth: canvasSize.width, slideHeight: canvasSize.height } : {},
6578
- scheme: chunkSN5EUDIT_js.templateSchemeFromTheme(theme?.colorScheme)
6597
+ scheme: chunk2Q2NFPXA_js.templateSchemeFromTheme(theme?.colorScheme)
6579
6598
  });
6580
6599
  ops.updateSlides((prev) => insertSlideFromLayoutUpdater(prev, activeSlideIndex, draft));
6581
6600
  setActiveSlideIndex(insertAt);
@@ -6612,7 +6631,7 @@ function createTableMergeHandlers(input) {
6612
6631
  if (!nextCell || nextCell.hMerge || nextCell.vMerge) {
6613
6632
  return;
6614
6633
  }
6615
- const newTableData = chunkSN5EUDIT_js.mergeCells(
6634
+ const newTableData = chunk2Q2NFPXA_js.mergeCells(
6616
6635
  [
6617
6636
  { row: rowIndex, col: columnIndex },
6618
6637
  { row: rowIndex, col: nextColIdx }
@@ -6620,7 +6639,7 @@ function createTableMergeHandlers(input) {
6620
6639
  td
6621
6640
  );
6622
6641
  const updates = { tableData: newTableData };
6623
- const newRawXml = chunkSN5EUDIT_js.updateMergeAttrsInRawXml(selectedElement, newTableData);
6642
+ const newRawXml = chunk2Q2NFPXA_js.updateMergeAttrsInRawXml(selectedElement, newTableData);
6624
6643
  if (newRawXml) {
6625
6644
  updates.rawXml = newRawXml;
6626
6645
  }
@@ -6646,7 +6665,7 @@ function createTableMergeHandlers(input) {
6646
6665
  if (!targetNextCell || targetNextCell.hMerge || targetNextCell.vMerge) {
6647
6666
  return;
6648
6667
  }
6649
- const newTableData = chunkSN5EUDIT_js.mergeCells(
6668
+ const newTableData = chunk2Q2NFPXA_js.mergeCells(
6650
6669
  [
6651
6670
  { row: rowIndex, col: columnIndex },
6652
6671
  { row: targetNextRowIdx, col: columnIndex }
@@ -6654,7 +6673,7 @@ function createTableMergeHandlers(input) {
6654
6673
  td
6655
6674
  );
6656
6675
  const updates = { tableData: newTableData };
6657
- const newRawXml = chunkSN5EUDIT_js.updateMergeAttrsInRawXml(selectedElement, newTableData);
6676
+ const newRawXml = chunk2Q2NFPXA_js.updateMergeAttrsInRawXml(selectedElement, newTableData);
6658
6677
  if (newRawXml) {
6659
6678
  updates.rawXml = newRawXml;
6660
6679
  }
@@ -6669,9 +6688,9 @@ function createTableMergeHandlers(input) {
6669
6688
  return;
6670
6689
  }
6671
6690
  const td = selectedElement.tableData;
6672
- const newTableData = chunkSN5EUDIT_js.mergeCells(ts.selectedCells, td);
6691
+ const newTableData = chunk2Q2NFPXA_js.mergeCells(ts.selectedCells, td);
6673
6692
  const updates = { tableData: newTableData };
6674
- const newRawXml = chunkSN5EUDIT_js.updateMergeAttrsInRawXml(selectedElement, newTableData);
6693
+ const newRawXml = chunk2Q2NFPXA_js.updateMergeAttrsInRawXml(selectedElement, newTableData);
6675
6694
  if (newRawXml) {
6676
6695
  updates.rawXml = newRawXml;
6677
6696
  }
@@ -6688,9 +6707,9 @@ function createTableMergeHandlers(input) {
6688
6707
  }
6689
6708
  const { rowIndex, columnIndex } = ts;
6690
6709
  const td = selectedElement.tableData;
6691
- const newTableData = chunkSN5EUDIT_js.splitCell(rowIndex, columnIndex, td);
6710
+ const newTableData = chunk2Q2NFPXA_js.splitCell(rowIndex, columnIndex, td);
6692
6711
  const updates = { tableData: newTableData };
6693
- const newRawXml = chunkSN5EUDIT_js.updateMergeAttrsInRawXml(selectedElement, newTableData);
6712
+ const newRawXml = chunk2Q2NFPXA_js.updateMergeAttrsInRawXml(selectedElement, newTableData);
6694
6713
  if (newRawXml) {
6695
6714
  updates.rawXml = newRawXml;
6696
6715
  }
@@ -6724,10 +6743,10 @@ function createTableStructHandlers(input) {
6724
6743
  const text = transformCommittedText ? transformCommittedText(rawText) : rawText;
6725
6744
  const updates = {};
6726
6745
  if (el.tableData) {
6727
- updates.tableData = chunkSN5EUDIT_js.setCellText(el, rowIndex, colIndex, text).tableData;
6746
+ updates.tableData = chunk2Q2NFPXA_js.setCellText(el, rowIndex, colIndex, text).tableData;
6728
6747
  }
6729
6748
  if (el.rawXml) {
6730
- const newRawXml = chunkSN5EUDIT_js.updateCellTextInRawXml(el, rowIndex, colIndex, text);
6749
+ const newRawXml = chunk2Q2NFPXA_js.updateCellTextInRawXml(el, rowIndex, colIndex, text);
6731
6750
  if (newRawXml) {
6732
6751
  updates.rawXml = newRawXml;
6733
6752
  }
@@ -6751,7 +6770,7 @@ function createTableStructHandlers(input) {
6751
6770
  const { rowIndex, columnIndex: colIndex } = ts;
6752
6771
  const updates = {};
6753
6772
  if (selectedElement.rawXml) {
6754
- const newRawXml = chunkSN5EUDIT_js.updateCellTextStyleInRawXml(
6773
+ const newRawXml = chunk2Q2NFPXA_js.updateCellTextStyleInRawXml(
6755
6774
  selectedElement,
6756
6775
  rowIndex,
6757
6776
  colIndex,
@@ -6815,9 +6834,9 @@ function createTableStructHandlers(input) {
6815
6834
  return;
6816
6835
  }
6817
6836
  const rowIdx = ts?.rowIndex ?? 0;
6818
- const newTableData = chunkSN5EUDIT_js.insertTableRow(selectedElement.tableData, rowIdx, position);
6837
+ const newTableData = chunk2Q2NFPXA_js.insertTableRow(selectedElement.tableData, rowIdx, position);
6819
6838
  const updates = { tableData: newTableData };
6820
- const newRawXml = chunkSN5EUDIT_js.rebuildTableStructureInRawXml(selectedElement, newTableData);
6839
+ const newRawXml = chunk2Q2NFPXA_js.rebuildTableStructureInRawXml(selectedElement, newTableData);
6821
6840
  if (newRawXml) {
6822
6841
  updates.rawXml = newRawXml;
6823
6842
  }
@@ -6830,12 +6849,12 @@ function createTableStructHandlers(input) {
6830
6849
  }
6831
6850
  const td = selectedElement.tableData;
6832
6851
  const rowIdx = ts?.rowIndex ?? 0;
6833
- const newTableData = chunkSN5EUDIT_js.deleteTableRow(td, rowIdx);
6852
+ const newTableData = chunk2Q2NFPXA_js.deleteTableRow(td, rowIdx);
6834
6853
  if (newTableData === td) {
6835
6854
  return;
6836
6855
  }
6837
6856
  const updates = { tableData: newTableData };
6838
- const newRawXml = chunkSN5EUDIT_js.rebuildTableStructureInRawXml(selectedElement, newTableData);
6857
+ const newRawXml = chunk2Q2NFPXA_js.rebuildTableStructureInRawXml(selectedElement, newTableData);
6839
6858
  if (newRawXml) {
6840
6859
  updates.rawXml = newRawXml;
6841
6860
  }
@@ -6847,9 +6866,9 @@ function createTableStructHandlers(input) {
6847
6866
  return;
6848
6867
  }
6849
6868
  const colIdx = ts?.columnIndex ?? 0;
6850
- const newTableData = chunkSN5EUDIT_js.insertTableColumn(selectedElement.tableData, colIdx, position);
6869
+ const newTableData = chunk2Q2NFPXA_js.insertTableColumn(selectedElement.tableData, colIdx, position);
6851
6870
  const updates = { tableData: newTableData };
6852
- const newRawXml = chunkSN5EUDIT_js.rebuildTableStructureInRawXml(selectedElement, newTableData);
6871
+ const newRawXml = chunk2Q2NFPXA_js.rebuildTableStructureInRawXml(selectedElement, newTableData);
6853
6872
  if (newRawXml) {
6854
6873
  updates.rawXml = newRawXml;
6855
6874
  }
@@ -6862,12 +6881,12 @@ function createTableStructHandlers(input) {
6862
6881
  }
6863
6882
  const td = selectedElement.tableData;
6864
6883
  const colIdx = ts?.columnIndex ?? 0;
6865
- const newTableData = chunkSN5EUDIT_js.deleteTableColumn(td, colIdx);
6884
+ const newTableData = chunk2Q2NFPXA_js.deleteTableColumn(td, colIdx);
6866
6885
  if (newTableData === td) {
6867
6886
  return;
6868
6887
  }
6869
6888
  const updates = { tableData: newTableData };
6870
- const newRawXml = chunkSN5EUDIT_js.rebuildTableStructureInRawXml(selectedElement, newTableData);
6889
+ const newRawXml = chunk2Q2NFPXA_js.rebuildTableStructureInRawXml(selectedElement, newTableData);
6871
6890
  if (newRawXml) {
6872
6891
  updates.rawXml = newRawXml;
6873
6892
  }
@@ -6903,8 +6922,8 @@ async function renderToCanvas(element, options = {}) {
6903
6922
  return html2canvasPro(element, {
6904
6923
  ...options,
6905
6924
  onclone: async (doc, clonedEl) => {
6906
- await chunkSN5EUDIT_js.normalizeColorsForCapture(doc, clonedEl);
6907
- chunkSN5EUDIT_js.preprocessCssForCapture(clonedEl);
6925
+ await chunk2Q2NFPXA_js.normalizeColorsForCapture(doc, clonedEl);
6926
+ chunk2Q2NFPXA_js.preprocessCssForCapture(clonedEl);
6908
6927
  if (typeof userOnClone === "function") {
6909
6928
  userOnClone(doc, clonedEl);
6910
6929
  }
@@ -6934,25 +6953,24 @@ function useExportSaveAs(input) {
6934
6953
  slideSizeEmu
6935
6954
  } = input;
6936
6955
  const handleSaveAsFormat = async (format) => {
6937
- const downloadName = chunkSN5EUDIT_js.savedPresentationFileName(filePath, format);
6956
+ const downloadName = chunk2Q2NFPXA_js.savedPresentationFileName(filePath, format);
6938
6957
  try {
6939
6958
  const data = await serializeSlides(format);
6940
6959
  if (!data) {
6941
6960
  return;
6942
6961
  }
6943
- const blob = new Blob([data], {
6944
- type: "application/vnd.openxmlformats-officedocument.presentationml.presentation"
6945
- });
6946
- chunkSN5EUDIT_js.downloadBlob(blob, downloadName);
6962
+ const mimeType = format === "ppt" ? "application/vnd.ms-powerpoint" : "application/vnd.openxmlformats-officedocument.presentationml.presentation";
6963
+ const blob = new Blob([data], { type: mimeType });
6964
+ chunk2Q2NFPXA_js.downloadBlob(blob, downloadName);
6947
6965
  } catch (err) {
6948
6966
  console.error(`[PowerPointViewer] Save as .${format} failed:`, err);
6949
6967
  }
6950
6968
  };
6951
6969
  const handleExportJson = () => {
6952
6970
  const sourceName = filePath ? filePath.replace(/\\/gu, "/").split("/").pop() : void 0;
6953
- const slideSize = chunkSN5EUDIT_js.resolveSlideSizeSelection({ current: slideSizeEmu, canvas: canvasSize }).size;
6971
+ const slideSize = chunk2Q2NFPXA_js.resolveSlideSizeSelection({ current: slideSizeEmu, canvas: canvasSize }).size;
6954
6972
  const data = {
6955
- slides: chunkSN5EUDIT_js.buildSaveSlides(slides, templateElementsBySlideId),
6973
+ slides: chunk2Q2NFPXA_js.buildSaveSlides(slides, templateElementsBySlideId),
6956
6974
  width: canvasSize.width,
6957
6975
  height: canvasSize.height,
6958
6976
  widthEmu: slideSize.widthEmu,
@@ -6971,7 +6989,7 @@ function useExportSaveAs(input) {
6971
6989
  handoutMaster
6972
6990
  };
6973
6991
  try {
6974
- chunkSN5EUDIT_js.exportDeckJson(data, sourceName);
6992
+ chunk2Q2NFPXA_js.exportDeckJson(data, sourceName);
6975
6993
  } catch (err) {
6976
6994
  console.error("[PowerPointViewer] JSON export failed:", err);
6977
6995
  }
@@ -6985,12 +7003,16 @@ function useExportSaveAs(input) {
6985
7003
  const handleSaveAsPptm = () => {
6986
7004
  void handleSaveAsFormat("pptm");
6987
7005
  };
7006
+ const handleSaveAsPpt = () => {
7007
+ void handleSaveAsFormat("ppt");
7008
+ };
6988
7009
  return {
6989
7010
  handleExportJson,
6990
7011
  handleSaveAsFormat,
6991
7012
  handleSaveAsPptx,
6992
7013
  handleSaveAsPpsx,
6993
- handleSaveAsPptm
7014
+ handleSaveAsPptm,
7015
+ handleSaveAsPpt
6994
7016
  };
6995
7017
  }
6996
7018
 
@@ -7058,7 +7080,7 @@ async function exportSlideToPngBlob(slideElement, options = {}) {
7058
7080
  }
7059
7081
  async function exportSlideAsPng(slideElement, slideIndex, options = {}) {
7060
7082
  const blob = await exportSlideToPngBlob(slideElement, options);
7061
- chunkSN5EUDIT_js.downloadBlob(blob, `slide-${slideIndex + 1}.png`);
7083
+ chunk2Q2NFPXA_js.downloadBlob(blob, `slide-${slideIndex + 1}.png`);
7062
7084
  }
7063
7085
  async function copySlideToClipboard(slideElement, options = {}) {
7064
7086
  const blob = await exportSlideToPngBlob(slideElement, options);
@@ -7080,15 +7102,15 @@ async function exportAllSlidesAsPdf(slideStageRef, totalSlides, setActiveSlide,
7080
7102
  continue;
7081
7103
  }
7082
7104
  const canvas = await renderElementToCanvas(stageEl, scale);
7083
- images.push(chunkSN5EUDIT_js.canvasToJpegData(canvas));
7105
+ images.push(chunk2Q2NFPXA_js.canvasToJpegData(canvas));
7084
7106
  }
7085
7107
  onProgress?.(totalSlides, totalSlides);
7086
7108
  setActiveSlide(currentSlideIndex);
7087
7109
  if (images.length === 0) {
7088
- throw new Error(chunkL3ZIBQEB_js.translationsEn["pptx.export.errorNoSlidesPdf"]);
7110
+ throw new Error(chunkY6GG2OOW_js.translationsEn["pptx.export.errorNoSlidesPdf"]);
7089
7111
  }
7090
- const pdfBlobUrl = chunkQWA5YEIZ_js.buildPdfFromImageData(images);
7091
- chunkSN5EUDIT_js.downloadDataUrl(pdfBlobUrl, filename);
7112
+ const pdfBlobUrl = chunkXW46A7DN_js.buildPdfFromImageData(images);
7113
+ chunk2Q2NFPXA_js.downloadDataUrl(pdfBlobUrl, filename);
7092
7114
  }
7093
7115
  async function captureAllSlidesAsPngDataUrls(slideStageRef, totalSlides, setActiveSlide, currentSlideIndex, options = {}) {
7094
7116
  const { scale = 2, onProgress } = options;
@@ -7134,10 +7156,10 @@ async function exportAllSlidesAsNotesPdf(slideStageRef, totalSlides, setActiveSl
7134
7156
  onProgress?.(totalSlides, totalSlides);
7135
7157
  setActiveSlide(currentSlideIndex);
7136
7158
  if (pages.length === 0) {
7137
- throw new Error(chunkL3ZIBQEB_js.translationsEn["pptx.export.errorNoSlidesNotesPdf"]);
7159
+ throw new Error(chunkY6GG2OOW_js.translationsEn["pptx.export.errorNoSlidesNotesPdf"]);
7138
7160
  }
7139
- const pdfDataUrl = chunkQWA5YEIZ_js.buildNotesPdf(pages);
7140
- chunkSN5EUDIT_js.downloadDataUrl(pdfDataUrl, filename);
7161
+ const pdfDataUrl = chunkXW46A7DN_js.buildNotesPdf(pages);
7162
+ chunk2Q2NFPXA_js.downloadDataUrl(pdfDataUrl, filename);
7141
7163
  }
7142
7164
 
7143
7165
  // src/viewer/utils/export-video.ts
@@ -7168,7 +7190,7 @@ async function exportAllSlidesAsVideo(slideStageRef, totalSlides, setActiveSlide
7168
7190
  }
7169
7191
  setActiveSlide(currentSlideIndex);
7170
7192
  if (slideCanvases.length === 0) {
7171
- throw new Error(chunkL3ZIBQEB_js.translationsEn["pptx.export.errorNoSlidesVideo"]);
7193
+ throw new Error(chunkY6GG2OOW_js.translationsEn["pptx.export.errorNoSlidesVideo"]);
7172
7194
  }
7173
7195
  const firstCanvas = slideCanvases[0];
7174
7196
  const recordingCanvas = document.createElement("canvas");
@@ -7176,12 +7198,12 @@ async function exportAllSlidesAsVideo(slideStageRef, totalSlides, setActiveSlide
7176
7198
  recordingCanvas.height = firstCanvas.height;
7177
7199
  const ctx = recordingCanvas.getContext("2d");
7178
7200
  if (!ctx) {
7179
- throw new Error(chunkL3ZIBQEB_js.translationsEn["pptx.export.errorNo2dContext"]);
7201
+ throw new Error(chunkY6GG2OOW_js.translationsEn["pptx.export.errorNo2dContext"]);
7180
7202
  }
7181
7203
  const fps = 30;
7182
7204
  const stream = recordingCanvas.captureStream(fps);
7183
7205
  const recorder = new MediaRecorder(stream, {
7184
- mimeType: chunkSN5EUDIT_js.pickSupportedMimeType([...chunkSN5EUDIT_js.WEBM_MIME_CANDIDATES]),
7206
+ mimeType: chunk2Q2NFPXA_js.pickSupportedMimeType([...chunk2Q2NFPXA_js.WEBM_MIME_CANDIDATES]),
7185
7207
  videoBitsPerSecond: 5e6
7186
7208
  });
7187
7209
  const chunks = [];
@@ -7204,8 +7226,8 @@ async function exportAllSlidesAsVideo(slideStageRef, totalSlides, setActiveSlide
7204
7226
  const duration = slideTimingsMs?.[i] ?? slideDurationMs;
7205
7227
  ctx.clearRect(0, 0, recordingCanvas.width, recordingCanvas.height);
7206
7228
  ctx.drawImage(slideCanvases[i], 0, 0);
7207
- const frameInterval = chunkSN5EUDIT_js.fpsToFrameIntervalMs(fps);
7208
- const framesNeeded = chunkSN5EUDIT_js.segmentFrameCount(duration, fps);
7229
+ const frameInterval = chunk2Q2NFPXA_js.fpsToFrameIntervalMs(fps);
7230
+ const framesNeeded = chunk2Q2NFPXA_js.segmentFrameCount(duration, fps);
7209
7231
  for (let f = 0; f < framesNeeded; f++) {
7210
7232
  if (signal?.aborted) {
7211
7233
  recorder.stop();
@@ -7252,9 +7274,9 @@ async function exportAllSlidesAsGif(slideStageRef, totalSlides, setActiveSlide,
7252
7274
  }
7253
7275
  setActiveSlide(currentSlideIndex);
7254
7276
  if (frames.length === 0) {
7255
- throw new Error(chunkL3ZIBQEB_js.translationsEn["pptx.export.errorNoSlidesGif"]);
7277
+ throw new Error(chunkY6GG2OOW_js.translationsEn["pptx.export.errorNoSlidesGif"]);
7256
7278
  }
7257
- const gifBytes = chunkSN5EUDIT_js.encodeGif(frames, Math.round(slideDurationMs / 10));
7279
+ const gifBytes = chunk2Q2NFPXA_js.encodeGif(frames, Math.round(slideDurationMs / 10));
7258
7280
  onProgress?.(totalSlides, totalSlides);
7259
7281
  const buf = new ArrayBuffer(gifBytes.length);
7260
7282
  new Uint8Array(buf).set(gifBytes);
@@ -7308,7 +7330,7 @@ function exportAllSlidesToSvg(data, options = {}) {
7308
7330
  continue;
7309
7331
  }
7310
7332
  onProgress?.(processedCount, data.slides.length);
7311
- let svg = chunkSN5EUDIT_js.SvgExporter.exportSlide(slide, data.width, data.height, svgOptions);
7333
+ let svg = chunk2Q2NFPXA_js.SvgExporter.exportSlide(slide, data.width, data.height, svgOptions);
7312
7334
  if (embedFonts && fontFaces?.length) {
7313
7335
  svg = injectFontFaces(svg, fontFaces);
7314
7336
  }
@@ -7355,7 +7377,8 @@ function useExportHandlers(input) {
7355
7377
  handleSaveAsFormat,
7356
7378
  handleSaveAsPptx,
7357
7379
  handleSaveAsPpsx,
7358
- handleSaveAsPptm
7380
+ handleSaveAsPptm,
7381
+ handleSaveAsPpt
7359
7382
  } = useExportSaveAs({
7360
7383
  slides,
7361
7384
  templateElementsBySlideId,
@@ -7409,21 +7432,21 @@ function useExportHandlers(input) {
7409
7432
  {
7410
7433
  scale: imageExportScale,
7411
7434
  onProgress: (current, total) => {
7412
- setExportProgress(chunkSN5EUDIT_js.slideProgressPercent(current, total));
7413
- setExportStatusMessage(chunkSN5EUDIT_js.slideStatusLabel("Rendering", current, total));
7435
+ setExportProgress(chunk2Q2NFPXA_js.slideProgressPercent(current, total));
7436
+ setExportStatusMessage(chunk2Q2NFPXA_js.slideStatusLabel("Rendering", current, total));
7414
7437
  },
7415
7438
  signal: abortCtrl.signal
7416
7439
  }
7417
7440
  );
7418
- setExportProgress(chunkSN5EUDIT_js.EXPORT_ASSEMBLING_PERCENT);
7441
+ setExportProgress(chunk2Q2NFPXA_js.EXPORT_ASSEMBLING_PERCENT);
7419
7442
  setExportStatusMessage("Building PDF...");
7420
7443
  await new Promise((r) => {
7421
7444
  setTimeout(r, 100);
7422
7445
  });
7423
- setExportProgress(chunkSN5EUDIT_js.EXPORT_DONE_PERCENT);
7446
+ setExportProgress(chunk2Q2NFPXA_js.EXPORT_DONE_PERCENT);
7424
7447
  setExportStatusMessage("Done!");
7425
7448
  } catch (err) {
7426
- if (!chunkSN5EUDIT_js.isExportAbortError(err)) {
7449
+ if (!chunk2Q2NFPXA_js.isExportAbortError(err)) {
7427
7450
  console.error("[PowerPointViewer] PDF export failed:", err);
7428
7451
  }
7429
7452
  } finally {
@@ -7453,21 +7476,21 @@ function useExportHandlers(input) {
7453
7476
  {
7454
7477
  scale: imageExportScale,
7455
7478
  onProgress: (current, total) => {
7456
- setExportProgress(chunkSN5EUDIT_js.slideProgressPercent(current, total));
7457
- setExportStatusMessage(chunkSN5EUDIT_js.slideStatusLabel("Rendering", current, total));
7479
+ setExportProgress(chunk2Q2NFPXA_js.slideProgressPercent(current, total));
7480
+ setExportStatusMessage(chunk2Q2NFPXA_js.slideStatusLabel("Rendering", current, total));
7458
7481
  },
7459
7482
  signal: abortCtrl.signal
7460
7483
  }
7461
7484
  );
7462
- setExportProgress(chunkSN5EUDIT_js.EXPORT_ASSEMBLING_PERCENT);
7485
+ setExportProgress(chunk2Q2NFPXA_js.EXPORT_ASSEMBLING_PERCENT);
7463
7486
  setExportStatusMessage("Building PDF...");
7464
7487
  await new Promise((r) => {
7465
7488
  setTimeout(r, 100);
7466
7489
  });
7467
- setExportProgress(chunkSN5EUDIT_js.EXPORT_DONE_PERCENT);
7490
+ setExportProgress(chunk2Q2NFPXA_js.EXPORT_DONE_PERCENT);
7468
7491
  setExportStatusMessage("Done!");
7469
7492
  } catch (err) {
7470
- if (!chunkSN5EUDIT_js.isExportAbortError(err)) {
7493
+ if (!chunk2Q2NFPXA_js.isExportAbortError(err)) {
7471
7494
  console.error("[PowerPointViewer] Notes PDF export failed:", err);
7472
7495
  }
7473
7496
  } finally {
@@ -7509,22 +7532,22 @@ function useExportHandlers(input) {
7509
7532
  scale: 1,
7510
7533
  slideDurationMs: 3e3,
7511
7534
  onProgress: (current, total) => {
7512
- setExportProgress(chunkSN5EUDIT_js.slideProgressPercent(current, total, 45));
7513
- setExportStatusMessage(chunkSN5EUDIT_js.slideStatusLabel("Capturing", current, total));
7535
+ setExportProgress(chunk2Q2NFPXA_js.slideProgressPercent(current, total, 45));
7536
+ setExportStatusMessage(chunk2Q2NFPXA_js.slideStatusLabel("Capturing", current, total));
7514
7537
  },
7515
7538
  onRecordProgress: (current, total) => {
7516
- setExportProgress(chunkSN5EUDIT_js.recordProgressPercent(current, total));
7517
- setExportStatusMessage(chunkSN5EUDIT_js.slideStatusLabel("Recording", current, total));
7539
+ setExportProgress(chunk2Q2NFPXA_js.recordProgressPercent(current, total));
7540
+ setExportStatusMessage(chunk2Q2NFPXA_js.slideStatusLabel("Recording", current, total));
7518
7541
  },
7519
7542
  signal: abortCtrl.signal
7520
7543
  }
7521
7544
  );
7522
- setExportProgress(chunkSN5EUDIT_js.EXPORT_ASSEMBLING_PERCENT);
7545
+ setExportProgress(chunk2Q2NFPXA_js.EXPORT_ASSEMBLING_PERCENT);
7523
7546
  setExportStatusMessage("Saving file...");
7524
- chunkSN5EUDIT_js.downloadBlob(blob, "presentation.webm");
7525
- setExportProgress(chunkSN5EUDIT_js.EXPORT_DONE_PERCENT);
7547
+ chunk2Q2NFPXA_js.downloadBlob(blob, "presentation.webm");
7548
+ setExportProgress(chunk2Q2NFPXA_js.EXPORT_DONE_PERCENT);
7526
7549
  } catch (err) {
7527
- if (!chunkSN5EUDIT_js.isExportAbortError(err)) {
7550
+ if (!chunk2Q2NFPXA_js.isExportAbortError(err)) {
7528
7551
  console.error("[PowerPointViewer] Video export failed:", err);
7529
7552
  }
7530
7553
  } finally {
@@ -7552,18 +7575,18 @@ function useExportHandlers(input) {
7552
7575
  scale: 0.5,
7553
7576
  slideDurationMs: 2e3,
7554
7577
  onProgress: (current, total) => {
7555
- setExportProgress(chunkSN5EUDIT_js.slideProgressPercent(current, total));
7556
- setExportStatusMessage(chunkSN5EUDIT_js.slideStatusLabel("Encoding", current, total));
7578
+ setExportProgress(chunk2Q2NFPXA_js.slideProgressPercent(current, total));
7579
+ setExportStatusMessage(chunk2Q2NFPXA_js.slideStatusLabel("Encoding", current, total));
7557
7580
  },
7558
7581
  signal: abortCtrl.signal
7559
7582
  }
7560
7583
  );
7561
- setExportProgress(chunkSN5EUDIT_js.EXPORT_ASSEMBLING_PERCENT);
7584
+ setExportProgress(chunk2Q2NFPXA_js.EXPORT_ASSEMBLING_PERCENT);
7562
7585
  setExportStatusMessage("Saving file...");
7563
- chunkSN5EUDIT_js.downloadBlob(blob, "presentation.gif");
7564
- setExportProgress(chunkSN5EUDIT_js.EXPORT_DONE_PERCENT);
7586
+ chunk2Q2NFPXA_js.downloadBlob(blob, "presentation.gif");
7587
+ setExportProgress(chunk2Q2NFPXA_js.EXPORT_DONE_PERCENT);
7565
7588
  } catch (err) {
7566
- if (!chunkSN5EUDIT_js.isExportAbortError(err)) {
7589
+ if (!chunk2Q2NFPXA_js.isExportAbortError(err)) {
7567
7590
  console.error("[PowerPointViewer] GIF export failed:", err);
7568
7591
  }
7569
7592
  } finally {
@@ -7589,6 +7612,7 @@ function useExportHandlers(input) {
7589
7612
  handleSaveAsPptx,
7590
7613
  handleSaveAsPpsx,
7591
7614
  handleSaveAsPptm,
7615
+ handleSaveAsPpt,
7592
7616
  handleCancelExport,
7593
7617
  exportModalOpen,
7594
7618
  exportModalTitle,
@@ -7596,7 +7620,7 @@ function useExportHandlers(input) {
7596
7620
  exportStatusMessage
7597
7621
  };
7598
7622
  }
7599
- var ViewerOptionsContext = react.createContext(chunkSN5EUDIT_js.DEFAULT_VIEWER_OPTIONS);
7623
+ var ViewerOptionsContext = react.createContext(chunk2Q2NFPXA_js.DEFAULT_VIEWER_OPTIONS);
7600
7624
  function useViewerOptionsContext() {
7601
7625
  return react.useContext(ViewerOptionsContext);
7602
7626
  }
@@ -7608,13 +7632,13 @@ function usePrintHandlers(input) {
7608
7632
  const { t } = reactI18next.useTranslation();
7609
7633
  const viewerOptions = useViewerOptionsContext();
7610
7634
  const includeHiddenSlides = viewerOptions.advanced.printHiddenSlides;
7611
- const printRasterScale = (viewerOptions.advanced.printHighQuality ? 4 : 3) * chunkSN5EUDIT_js.resolveImageResolutionScale(viewerOptions);
7635
+ const printRasterScale = (viewerOptions.advanced.printHighQuality ? 4 : 3) * chunk2Q2NFPXA_js.resolveImageResolutionScale(viewerOptions);
7612
7636
  const handlePrint = () => {
7613
7637
  setIsPrintDialogOpen(true);
7614
7638
  };
7615
7639
  const handlePrintSvg = async (settings) => {
7616
7640
  setIsPrintDialogOpen(false);
7617
- const printWindow = chunkSN5EUDIT_js.openPendingPrintWindow(t("pptx.print.preparingToPrint"));
7641
+ const printWindow = chunk2Q2NFPXA_js.openPendingPrintWindow(t("pptx.print.preparingToPrint"));
7618
7642
  if (!printWindow) {
7619
7643
  console.warn(
7620
7644
  "[PowerPointViewer] Print window was blocked by the browser. Allow popups for this site to print."
@@ -7624,9 +7648,9 @@ function usePrintHandlers(input) {
7624
7648
  if (!pptxData || settings.printWhat !== "slides") {
7625
7649
  return runRasterPrint(printWindow, settings);
7626
7650
  }
7627
- const colorFilter = chunkSN5EUDIT_js.computeColorFilter(settings.colorMode);
7628
- const slideIndices = chunkSN5EUDIT_js.filterHiddenSlideIndices(
7629
- chunkSN5EUDIT_js.computeSlideIndices(
7651
+ const colorFilter = chunk2Q2NFPXA_js.computeColorFilter(settings.colorMode);
7652
+ const slideIndices = chunk2Q2NFPXA_js.filterHiddenSlideIndices(
7653
+ chunk2Q2NFPXA_js.computeSlideIndices(
7630
7654
  settings.slideRange,
7631
7655
  activeSlideIndex,
7632
7656
  slides.length,
@@ -7644,22 +7668,22 @@ function usePrintHandlers(input) {
7644
7668
  printWindow.close();
7645
7669
  return;
7646
7670
  }
7647
- const printDoc = chunkSN5EUDIT_js.buildPrintDocument(svgs, pptxData.width, pptxData.height, {
7671
+ const printDoc = chunk2Q2NFPXA_js.buildPrintDocument(svgs, pptxData.width, pptxData.height, {
7648
7672
  title: "Slides (Vector)",
7649
7673
  orientation: settings.orientation,
7650
7674
  colorFilter,
7651
7675
  scaleToFit: settings.scaleToFit
7652
7676
  });
7653
- chunkSN5EUDIT_js.finishPrintWindow(printWindow, printDoc);
7677
+ chunk2Q2NFPXA_js.finishPrintWindow(printWindow, printDoc);
7654
7678
  } catch (err) {
7655
7679
  console.warn("[PowerPointViewer] SVG print path failed, falling back to raster:", err);
7656
7680
  return runRasterPrint(printWindow, settings);
7657
7681
  }
7658
7682
  };
7659
7683
  const runRasterPrint = async (printWindow, settings) => {
7660
- const colorFilter = chunkSN5EUDIT_js.computeColorFilter(settings.colorMode);
7661
- const slideIndices = chunkSN5EUDIT_js.filterHiddenSlideIndices(
7662
- chunkSN5EUDIT_js.computeSlideIndices(
7684
+ const colorFilter = chunk2Q2NFPXA_js.computeColorFilter(settings.colorMode);
7685
+ const slideIndices = chunk2Q2NFPXA_js.filterHiddenSlideIndices(
7686
+ chunk2Q2NFPXA_js.computeSlideIndices(
7663
7687
  settings.slideRange,
7664
7688
  activeSlideIndex,
7665
7689
  slides.length,
@@ -7670,11 +7694,11 @@ function usePrintHandlers(input) {
7670
7694
  includeHiddenSlides
7671
7695
  );
7672
7696
  if (settings.printWhat === "outline") {
7673
- chunkSN5EUDIT_js.finishPrintWindow(
7697
+ chunk2Q2NFPXA_js.finishPrintWindow(
7674
7698
  printWindow,
7675
- chunkSN5EUDIT_js.buildPrintHtmlDocument({
7699
+ chunk2Q2NFPXA_js.buildPrintHtmlDocument({
7676
7700
  title: "Outline",
7677
- bodyHtml: `<div class="outline-page">${chunkSN5EUDIT_js.buildOutlineHtml(slideIndices, slides)}</div>`,
7701
+ bodyHtml: `<div class="outline-page">${chunk2Q2NFPXA_js.buildOutlineHtml(slideIndices, slides)}</div>`,
7678
7702
  orientation: settings.orientation,
7679
7703
  colorFilter,
7680
7704
  frameSlides: settings.frameSlides,
@@ -7701,11 +7725,11 @@ function usePrintHandlers(input) {
7701
7725
  }
7702
7726
  const slideImages = slideIndices.map((idx) => allImages[idx]).filter(Boolean);
7703
7727
  if (settings.printWhat === "slides") {
7704
- chunkSN5EUDIT_js.finishPrintWindow(
7728
+ chunk2Q2NFPXA_js.finishPrintWindow(
7705
7729
  printWindow,
7706
- chunkSN5EUDIT_js.buildPrintHtmlDocument({
7730
+ chunk2Q2NFPXA_js.buildPrintHtmlDocument({
7707
7731
  title: "Slides",
7708
- bodyHtml: chunkSN5EUDIT_js.buildSlidesHtml(slideImages, slideIndices),
7732
+ bodyHtml: chunk2Q2NFPXA_js.buildSlidesHtml(slideImages, slideIndices),
7709
7733
  orientation: settings.orientation,
7710
7734
  colorFilter,
7711
7735
  frameSlides: settings.frameSlides,
@@ -7715,11 +7739,11 @@ function usePrintHandlers(input) {
7715
7739
  return;
7716
7740
  }
7717
7741
  if (settings.printWhat === "notes") {
7718
- chunkSN5EUDIT_js.finishPrintWindow(
7742
+ chunk2Q2NFPXA_js.finishPrintWindow(
7719
7743
  printWindow,
7720
- chunkSN5EUDIT_js.buildPrintHtmlDocument({
7744
+ chunk2Q2NFPXA_js.buildPrintHtmlDocument({
7721
7745
  title: "Notes Pages",
7722
- bodyHtml: chunkSN5EUDIT_js.buildNotesHtml(slideImages, slideIndices, slides),
7746
+ bodyHtml: chunk2Q2NFPXA_js.buildNotesHtml(slideImages, slideIndices, slides),
7723
7747
  orientation: "portrait",
7724
7748
  colorFilter,
7725
7749
  frameSlides: settings.frameSlides,
@@ -7730,11 +7754,11 @@ function usePrintHandlers(input) {
7730
7754
  }
7731
7755
  if (settings.printWhat === "handouts") {
7732
7756
  const spp = settings.slidesPerPage;
7733
- chunkSN5EUDIT_js.finishPrintWindow(
7757
+ chunk2Q2NFPXA_js.finishPrintWindow(
7734
7758
  printWindow,
7735
- chunkSN5EUDIT_js.buildPrintHtmlDocument({
7759
+ chunk2Q2NFPXA_js.buildPrintHtmlDocument({
7736
7760
  title: `Handout ${spp} per page`,
7737
- bodyHtml: chunkSN5EUDIT_js.buildHandoutsHtml(slideImages, slideIndices, spp, pptxData?.handoutMaster),
7761
+ bodyHtml: chunk2Q2NFPXA_js.buildHandoutsHtml(slideImages, slideIndices, spp, pptxData?.handoutMaster),
7738
7762
  orientation: "portrait",
7739
7763
  colorFilter,
7740
7764
  frameSlides: settings.frameSlides,
@@ -7748,7 +7772,7 @@ function usePrintHandlers(input) {
7748
7772
  };
7749
7773
  const handlePrintWithSettings = async (settings) => {
7750
7774
  setIsPrintDialogOpen(false);
7751
- const printWindow = chunkSN5EUDIT_js.openPendingPrintWindow(t("pptx.print.preparingToPrint"));
7775
+ const printWindow = chunk2Q2NFPXA_js.openPendingPrintWindow(t("pptx.print.preparingToPrint"));
7752
7776
  if (!printWindow) {
7753
7777
  console.warn(
7754
7778
  "[PowerPointViewer] Print window was blocked by the browser. Allow popups for this site to print."
@@ -7813,13 +7837,13 @@ function useThemeHandlers(input) {
7813
7837
  return;
7814
7838
  }
7815
7839
  await handler.updateThemeColorScheme(colorScheme);
7816
- const previousMap = theme?.colorScheme ? chunkSN5EUDIT_js.buildThemeColorMap(theme.colorScheme) : {};
7817
- setSlides((prev) => chunkSN5EUDIT_js.reResolveSlideColors(prev, previousMap, colorScheme));
7840
+ const previousMap = theme?.colorScheme ? chunk2Q2NFPXA_js.buildThemeColorMap(theme.colorScheme) : {};
7841
+ setSlides((prev) => chunk2Q2NFPXA_js.reResolveSlideColors(prev, previousMap, colorScheme));
7818
7842
  if (Object.keys(templateElementsBySlideId).length > 0) {
7819
7843
  setTemplateElementsBySlideId((prev) => {
7820
7844
  const next = {};
7821
7845
  for (const [slideId, elements] of Object.entries(prev)) {
7822
- next[slideId] = chunkSN5EUDIT_js.reResolveElementColors(elements, previousMap, colorScheme);
7846
+ next[slideId] = chunk2Q2NFPXA_js.reResolveElementColors(elements, previousMap, colorScheme);
7823
7847
  }
7824
7848
  return next;
7825
7849
  });
@@ -7928,7 +7952,7 @@ function useThemeSwitching(input) {
7928
7952
  }
7929
7953
  try {
7930
7954
  await handler.applyTheme(preset.colorScheme, preset.fontScheme, preset.name);
7931
- const newData = chunkSN5EUDIT_js.applyThemeToData(data, preset.colorScheme, preset.fontScheme, preset.name);
7955
+ const newData = chunk2Q2NFPXA_js.applyThemeToData(data, preset.colorScheme, preset.fontScheme, preset.name);
7932
7956
  onDataChange(newData);
7933
7957
  onThemeChanged?.(preset);
7934
7958
  } catch (error) {
@@ -7945,7 +7969,7 @@ function useThemeSwitching(input) {
7945
7969
  }
7946
7970
  try {
7947
7971
  await handler.applyTheme(colorScheme, fontScheme ?? {}, themeName);
7948
- const newData = chunkSN5EUDIT_js.applyThemeToData(data, colorScheme, fontScheme, themeName);
7972
+ const newData = chunk2Q2NFPXA_js.applyThemeToData(data, colorScheme, fontScheme, themeName);
7949
7973
  onDataChange(newData);
7950
7974
  } catch (error) {
7951
7975
  console.error("Failed to switch to custom theme:", error);
@@ -7957,12 +7981,12 @@ function useThemeSwitching(input) {
7957
7981
  if (!data?.theme?.colorScheme) {
7958
7982
  return void 0;
7959
7983
  }
7960
- return chunkSN5EUDIT_js.THEME_PRESETS.find(
7961
- (p) => chunkSN5EUDIT_js.themeColorSchemesEqual(data.theme?.colorScheme, p.colorScheme)
7984
+ return chunk2Q2NFPXA_js.THEME_PRESETS.find(
7985
+ (p) => chunk2Q2NFPXA_js.themeColorSchemesEqual(data.theme?.colorScheme, p.colorScheme)
7962
7986
  );
7963
7987
  }, [data?.theme?.colorScheme]);
7964
7988
  return {
7965
- presets: chunkSN5EUDIT_js.THEME_PRESETS,
7989
+ presets: chunk2Q2NFPXA_js.THEME_PRESETS,
7966
7990
  switchToPreset,
7967
7991
  switchToCustom,
7968
7992
  currentPreset
@@ -8037,7 +8061,7 @@ function usePropertyHandlers(input) {
8037
8061
  }
8038
8062
  try {
8039
8063
  const ab = await file.arrayBuffer();
8040
- const h = new chunkSN5EUDIT_js.PptxHandler();
8064
+ const h = new chunk2Q2NFPXA_js.PptxHandler();
8041
8065
  const other = await h.load(ab);
8042
8066
  if (!other) {
8043
8067
  return;
@@ -8047,7 +8071,7 @@ function usePropertyHandlers(input) {
8047
8071
  width: canvasSize.width,
8048
8072
  height: canvasSize.height
8049
8073
  };
8050
- setCompareResult(chunkSN5EUDIT_js.comparePresentation(cur, other));
8074
+ setCompareResult(chunk2Q2NFPXA_js.comparePresentation(cur, other));
8051
8075
  setIsComparePanelOpen(true);
8052
8076
  } catch (err) {
8053
8077
  console.warn("Compare failed:", err);
@@ -8064,7 +8088,7 @@ function usePropertyHandlers(input) {
8064
8088
  if (!diff || diff.status === "unchanged") {
8065
8089
  return;
8066
8090
  }
8067
- setSlides((prev) => chunkSN5EUDIT_js.applyAcceptSlide(prev, diff));
8091
+ setSlides((prev) => chunk2Q2NFPXA_js.applyAcceptSlide(prev, diff));
8068
8092
  setIsDirty(true);
8069
8093
  },
8070
8094
  [compareResult, setSlides, setIsDirty]
@@ -8075,10 +8099,10 @@ function usePropertyHandlers(input) {
8075
8099
  if (!compareResult) {
8076
8100
  return;
8077
8101
  }
8078
- setSlides((prev) => chunkSN5EUDIT_js.applyAcceptAllSlides(prev, compareResult));
8102
+ setSlides((prev) => chunk2Q2NFPXA_js.applyAcceptAllSlides(prev, compareResult));
8079
8103
  setIsDirty(true);
8080
8104
  }, [compareResult, setSlides, setIsDirty]);
8081
- const usedFontFamilies = react.useMemo(() => chunkSN5EUDIT_js.collectUsedFonts(slides), [slides]);
8105
+ const usedFontFamilies = react.useMemo(() => chunk2Q2NFPXA_js.collectUsedFonts(slides), [slides]);
8082
8106
  return {
8083
8107
  handleUpdateNotes,
8084
8108
  handleUpdateSlide,
@@ -8233,7 +8257,7 @@ function useViewerDialogs(input) {
8233
8257
  );
8234
8258
  const embeddedFontKey = (embeddedFontFamilies ?? []).join("\0");
8235
8259
  const fontEmbedding = react.useMemo(
8236
- () => chunkSN5EUDIT_js.describeFontEmbedding(embeddedFontKey ? embeddedFontKey.split("\0") : []),
8260
+ () => chunk2Q2NFPXA_js.describeFontEmbedding(embeddedFontKey ? embeddedFontKey.split("\0") : []),
8237
8261
  [embeddedFontKey]
8238
8262
  );
8239
8263
  const [embedFontsEnabled, setEmbedFontsEnabled] = react.useState(fontEmbedding.initialEnabled);
@@ -8243,11 +8267,11 @@ function useViewerDialogs(input) {
8243
8267
  setEmbedFontsEnabled(fontEmbedding.initialEnabled);
8244
8268
  }
8245
8269
  const [isNarrowViewport, setIsNarrowViewport] = react.useState(
8246
- () => typeof window !== "undefined" ? chunkSN5EUDIT_js.isMobileViewport(window.innerWidth, window.innerHeight, viewportIsTouch()) : false
8270
+ () => typeof window !== "undefined" ? chunk2Q2NFPXA_js.isMobileViewport(window.innerWidth, window.innerHeight, viewportIsTouch()) : false
8247
8271
  );
8248
8272
  react.useEffect(() => {
8249
8273
  const handleWindow = () => setIsNarrowViewport(
8250
- chunkSN5EUDIT_js.isMobileViewport(window.innerWidth, window.innerHeight, viewportIsTouch())
8274
+ chunk2Q2NFPXA_js.isMobileViewport(window.innerWidth, window.innerHeight, viewportIsTouch())
8251
8275
  );
8252
8276
  window.addEventListener("resize", handleWindow);
8253
8277
  return () => window.removeEventListener("resize", handleWindow);
@@ -8400,16 +8424,16 @@ function useViewerDialogs(input) {
8400
8424
  };
8401
8425
  }
8402
8426
  function computeGridSpacingPx2(documentGridSpacing) {
8403
- return chunkSN5EUDIT_js.computeGridSpacingPx(documentGridSpacing, chunkQWA5YEIZ_js.GRID_SIZE);
8427
+ return chunk2Q2NFPXA_js.computeGridSpacingPx(documentGridSpacing, chunkXW46A7DN_js.GRID_SIZE);
8404
8428
  }
8405
8429
  function computeVisibleSlideIndexes(slides, activeCustomShowId, customShows, presentationProperties) {
8406
8430
  const activeShow = activeCustomShowId ? customShows.find((show) => show.id === activeCustomShowId) : void 0;
8407
- const authoredRange = chunkSN5EUDIT_js.resolveAuthoredSlideRange(presentationProperties, slides.length);
8408
- return chunkSN5EUDIT_js.resolveShowSlideIndexes(slides, activeShow, authoredRange);
8431
+ const authoredRange = chunk2Q2NFPXA_js.resolveAuthoredSlideRange(presentationProperties, slides.length);
8432
+ return chunk2Q2NFPXA_js.resolveShowSlideIndexes(slides, activeShow, authoredRange);
8409
8433
  }
8410
8434
  function computeSlideSectionGroups(slides, sections) {
8411
- return chunkSN5EUDIT_js.groupSlidesBySection(sections, slides).map((group) => ({
8412
- id: group.section?.id ?? (sections.length > 0 ? chunkQWA5YEIZ_js.UNGROUPED_SECTION_ID : chunkQWA5YEIZ_js.DEFAULT_SECTION_GROUP_ID),
8435
+ return chunk2Q2NFPXA_js.groupSlidesBySection(sections, slides).map((group) => ({
8436
+ id: group.section?.id ?? (sections.length > 0 ? chunkXW46A7DN_js.UNGROUPED_SECTION_ID : chunkXW46A7DN_js.DEFAULT_SECTION_GROUP_ID),
8413
8437
  label: group.section?.name ?? (sections.length > 0 ? "Ungrouped Slides" : "Slides"),
8414
8438
  slideIndexes: group.slideIndexes,
8415
8439
  ...group.section?.color !== void 0 ? { color: group.section.color } : {},
@@ -8421,7 +8445,7 @@ function computeMasterPseudoSlide(mode, activeLayout, activeMaster) {
8421
8445
  return void 0;
8422
8446
  }
8423
8447
  const document2 = activeLayout ? { slideMasters: [{ ...activeMaster, layouts: [activeLayout] }] } : { slideMasters: [activeMaster] };
8424
- return chunkSN5EUDIT_js.masterViewPseudoSlide(document2, {
8448
+ return chunk2Q2NFPXA_js.masterViewPseudoSlide(document2, {
8425
8449
  tab: "slides",
8426
8450
  masterIndex: 0,
8427
8451
  layoutIndex: activeLayout ? 0 : null
@@ -8449,15 +8473,15 @@ function useDerivedSlideState(input) {
8449
8473
  [slides, activeCustomShowId, customShows, presentationProperties]
8450
8474
  );
8451
8475
  const authoredRange = react.useMemo(
8452
- () => chunkSN5EUDIT_js.resolveAuthoredSlideRange(presentationProperties, slides.length),
8476
+ () => chunk2Q2NFPXA_js.resolveAuthoredSlideRange(presentationProperties, slides.length),
8453
8477
  [presentationProperties, slides.length]
8454
8478
  );
8455
8479
  const slideSectionGroups = react.useMemo(
8456
8480
  () => computeSlideSectionGroups(slides, sections).map((group) => {
8457
- if (group.id === chunkQWA5YEIZ_js.UNGROUPED_SECTION_ID && group.label === "Ungrouped Slides") {
8481
+ if (group.id === chunkXW46A7DN_js.UNGROUPED_SECTION_ID && group.label === "Ungrouped Slides") {
8458
8482
  return { ...group, label: t("pptx.slides.ungroupedSlides") };
8459
8483
  }
8460
- if (group.id === chunkQWA5YEIZ_js.DEFAULT_SECTION_GROUP_ID && group.label === "Slides") {
8484
+ if (group.id === chunkXW46A7DN_js.DEFAULT_SECTION_GROUP_ID && group.label === "Slides") {
8461
8485
  return { ...group, label: t("pptx.sections.slides") };
8462
8486
  }
8463
8487
  return group;
@@ -8558,13 +8582,13 @@ function useAnnotationHandlers(input) {
8558
8582
  }, [annotations, setMode, setSlides, history]);
8559
8583
  const handleSetMode = react.useCallback(
8560
8584
  (nextMode) => {
8561
- if (mode === "present" && nextMode !== "present" && !chunkSN5EUDIT_js.mayLeaveSlideShow()) {
8585
+ if (mode === "present" && nextMode !== "present" && !chunk2Q2NFPXA_js.mayLeaveSlideShow()) {
8562
8586
  return;
8563
8587
  }
8564
8588
  if (nextMode === "present") {
8565
8589
  presentation.enterPresentMode();
8566
8590
  } else if (mode === "present" && annotations.hasAnyAnnotations) {
8567
- chunkSN5EUDIT_js.stopAllPersistentAudio();
8591
+ chunk2Q2NFPXA_js.stopAllPersistentAudio();
8568
8592
  if (promptKeepInkAnnotations) {
8569
8593
  pendingModeAfterAnnotationsRef.current = nextMode;
8570
8594
  setShowKeepAnnotationsDialog(true);
@@ -8574,7 +8598,7 @@ function useAnnotationHandlers(input) {
8574
8598
  }
8575
8599
  } else {
8576
8600
  if (mode === "present") {
8577
- chunkSN5EUDIT_js.stopAllPersistentAudio();
8601
+ chunk2Q2NFPXA_js.stopAllPersistentAudio();
8578
8602
  }
8579
8603
  setMode(nextMode);
8580
8604
  }
@@ -8643,13 +8667,13 @@ function useSerialize(input) {
8643
8667
  let processedSlide = slide;
8644
8668
  if (pendingEditId) {
8645
8669
  const updatedElements = slide.elements.map((el) => {
8646
- if (el.id !== pendingEditId || !chunkSN5EUDIT_js.hasTextProperties(el)) {
8670
+ if (el.id !== pendingEditId || !chunk2Q2NFPXA_js.hasTextProperties(el)) {
8647
8671
  return el;
8648
8672
  }
8649
8673
  return {
8650
8674
  ...el,
8651
8675
  text: pendingEditText,
8652
- textSegments: chunkSN5EUDIT_js.remapTextToSegments(pendingEditText, el.textSegments, el.textStyle)
8676
+ textSegments: chunk2Q2NFPXA_js.remapTextToSegments(pendingEditText, el.textSegments, el.textStyle)
8653
8677
  };
8654
8678
  });
8655
8679
  if (updatedElements.some((el, i) => el !== slide.elements[i])) {
@@ -8662,19 +8686,19 @@ function useSerialize(input) {
8662
8686
  const pptxGuides = guides.map((g) => ({
8663
8687
  id: g.id,
8664
8688
  orientation: g.axis === "h" ? "horz" : "vert",
8665
- positionEmu: chunkSN5EUDIT_js.guidePxToEmu(g.position)
8689
+ positionEmu: chunk2Q2NFPXA_js.guidePxToEmu(g.position)
8666
8690
  }));
8667
8691
  return {
8668
8692
  ...processedSlide,
8669
8693
  guides: pptxGuides.length > 0 ? pptxGuides : void 0
8670
8694
  };
8671
8695
  });
8672
- const slidesToSave = chunkSN5EUDIT_js.buildSaveSlides(slidesWithGuides, templateElementsBySlideId);
8673
- const saveOptions = chunkSN5EUDIT_js.buildDeckSaveOptions({
8696
+ const slidesToSave = chunk2Q2NFPXA_js.buildSaveSlides(slidesWithGuides, templateElementsBySlideId);
8697
+ const saveOptions = chunk2Q2NFPXA_js.buildDeckSaveOptions({
8674
8698
  // Without this the Slide Size card edited a viewer-only pixel value and
8675
8699
  // the saved `p:sldSz` never moved: passing `slideSize` is the only way a
8676
8700
  // slide-size edit reaches the file.
8677
- slideSize: chunkSN5EUDIT_js.resolveSlideSizeSelection({ current: slideSizeEmu, canvas: canvasSize }).size,
8701
+ slideSize: chunk2Q2NFPXA_js.resolveSlideSizeSelection({ current: slideSizeEmu, canvas: canvasSize }).size,
8678
8702
  headerFooter,
8679
8703
  presentationProperties,
8680
8704
  viewProperties,
@@ -8693,7 +8717,7 @@ function useSerialize(input) {
8693
8717
  embedFonts,
8694
8718
  outputFormat: format
8695
8719
  });
8696
- return chunkSN5EUDIT_js.saveDeckWithPassword(handler, slidesToSave, saveOptions, { password, purpose });
8720
+ return chunk2Q2NFPXA_js.saveDeckWithPassword(handler, slidesToSave, saveOptions, { password, purpose });
8697
8721
  },
8698
8722
  [
8699
8723
  slides,
@@ -8734,7 +8758,7 @@ function useRecoveryDetection(input) {
8734
8758
  const onRestore = input.onRestore;
8735
8759
  const openVersionHistory = input.openVersionHistory;
8736
8760
  react.useEffect(() => {
8737
- if (!chunkSN5EUDIT_js.shouldProbeAutosaveRecovery({
8761
+ if (!chunk2Q2NFPXA_js.shouldProbeAutosaveRecovery({
8738
8762
  alreadyChecked: recoveryCheckedRef.current,
8739
8763
  filePath,
8740
8764
  loading,
@@ -8746,7 +8770,7 @@ function useRecoveryDetection(input) {
8746
8770
  }
8747
8771
  recoveryCheckedRef.current = true;
8748
8772
  void (async () => {
8749
- const offer = await chunkSN5EUDIT_js.probeAutosaveRecovery(filePath);
8773
+ const offer = await chunk2Q2NFPXA_js.probeAutosaveRecovery(filePath);
8750
8774
  if (!offer) {
8751
8775
  return;
8752
8776
  }
@@ -8759,7 +8783,7 @@ function useRecoveryDetection(input) {
8759
8783
  const record = recordRef.current;
8760
8784
  setPrompt(null);
8761
8785
  if (record && onRestore) {
8762
- onRestore(chunkSN5EUDIT_js.acceptAutosaveRecovery(record));
8786
+ onRestore(chunk2Q2NFPXA_js.acceptAutosaveRecovery(record));
8763
8787
  }
8764
8788
  recordRef.current = null;
8765
8789
  }, [onRestore]);
@@ -8768,7 +8792,7 @@ function useRecoveryDetection(input) {
8768
8792
  setPrompt(null);
8769
8793
  recordRef.current = null;
8770
8794
  if (record) {
8771
- void chunkSN5EUDIT_js.discardAutosaveRecovery(record);
8795
+ void chunk2Q2NFPXA_js.discardAutosaveRecovery(record);
8772
8796
  }
8773
8797
  }, []);
8774
8798
  return { prompt, restore, discard };
@@ -8779,6 +8803,8 @@ function usePresentationSetup(input) {
8779
8803
  slides,
8780
8804
  templateElementsBySlideId,
8781
8805
  visibleSlideIndexes,
8806
+ canvasSize,
8807
+ themeColorMap,
8782
8808
  activeSlideIndex,
8783
8809
  containerRef,
8784
8810
  content,
@@ -8808,15 +8834,17 @@ function usePresentationSetup(input) {
8808
8834
  slides,
8809
8835
  templateElementsBySlideId,
8810
8836
  visibleSlideIndexes,
8837
+ canvasSize,
8838
+ themeColorMap,
8811
8839
  activeSlideIndex,
8812
8840
  containerRef,
8813
8841
  content,
8814
8842
  onSetMode: (nextMode) => {
8815
- if (mode === "present" && nextMode !== "present" && !chunkSN5EUDIT_js.mayLeaveSlideShow()) {
8843
+ if (mode === "present" && nextMode !== "present" && !chunk2Q2NFPXA_js.mayLeaveSlideShow()) {
8816
8844
  return;
8817
8845
  }
8818
8846
  if (mode === "present" && nextMode !== "present") {
8819
- chunkSN5EUDIT_js.stopAllPersistentAudio();
8847
+ chunk2Q2NFPXA_js.stopAllPersistentAudio();
8820
8848
  stopAnimationSound();
8821
8849
  const exitHandler = exitModeHandlerRef.current;
8822
8850
  if (exitHandler) {
@@ -8884,10 +8912,10 @@ function usePresentationSetup(input) {
8884
8912
  onToggleToolbar: () => annotations.setToolbarVisible(!annotations.toolbarVisible),
8885
8913
  onToggleSubtitles,
8886
8914
  onSaveRehearsalTimings: (timings) => {
8887
- setSlides((prev) => chunkSN5EUDIT_js.applyRehearsalTimings(prev, timings));
8915
+ setSlides((prev) => chunk2Q2NFPXA_js.applyRehearsalTimings(prev, timings));
8888
8916
  history.markDirty();
8889
8917
  },
8890
- loopContinuously: chunkSN5EUDIT_js.shouldLoopContinuously(presentationProperties),
8918
+ loopContinuously: chunk2Q2NFPXA_js.shouldLoopContinuously(presentationProperties),
8891
8919
  showWithAnimation: presentationProperties.showWithAnimation,
8892
8920
  useTimings: presentationProperties.advanceMode !== "manual",
8893
8921
  endWithBlackSlide,
@@ -9093,7 +9121,7 @@ function useEditorOperations(input) {
9093
9121
  const { formatPainterActive, setFormatPainterActive, elementLookup } = state;
9094
9122
  react.useEffect(() => {
9095
9123
  if (formatPainterActive && !prevFormatPainterRef.current && selectedElement) {
9096
- copiedFormatRef.current = chunkSN5EUDIT_js.copyFormatFromElement(selectedElement);
9124
+ copiedFormatRef.current = chunk2Q2NFPXA_js.copyFormatFromElement(selectedElement);
9097
9125
  } else if (!formatPainterActive) {
9098
9126
  copiedFormatRef.current = null;
9099
9127
  }
@@ -9119,12 +9147,12 @@ function useEditorOperations(input) {
9119
9147
  e.stopPropagation();
9120
9148
  const element = elementLookup.get(elementId);
9121
9149
  if (element) {
9122
- const updated = chunkSN5EUDIT_js.applyFormatToElement(element, copiedFormatRef.current);
9150
+ const updated = chunk2Q2NFPXA_js.applyFormatToElement(element, copiedFormatRef.current);
9123
9151
  const updates = {};
9124
- if (chunkSN5EUDIT_js.hasShapeProperties(updated)) {
9152
+ if (chunk2Q2NFPXA_js.hasShapeProperties(updated)) {
9125
9153
  updates.shapeStyle = updated.shapeStyle;
9126
9154
  }
9127
- if (chunkSN5EUDIT_js.hasTextProperties(updated)) {
9155
+ if (chunk2Q2NFPXA_js.hasTextProperties(updated)) {
9128
9156
  updates.textStyle = updated.textStyle;
9129
9157
  }
9130
9158
  ops.updateElementById(elementId, updates);
@@ -9308,10 +9336,10 @@ function useFontInjection({ embeddedFonts, slides }) {
9308
9336
  }
9309
9337
  };
9310
9338
  }, [embeddedFonts]);
9311
- const referencedFamilies = react.useMemo(() => chunkSN5EUDIT_js.collectReferencedFontFamilies(slides), [slides]);
9339
+ const referencedFamilies = react.useMemo(() => chunk2Q2NFPXA_js.collectReferencedFontFamilies(slides), [slides]);
9312
9340
  react.useEffect(() => {
9313
9341
  let cancelled = false;
9314
- void chunkSN5EUDIT_js.resolveGoogleWebfontHref(slides, embeddedFonts).then((href) => {
9342
+ void chunk2Q2NFPXA_js.resolveGoogleWebfontHref(slides, embeddedFonts).then((href) => {
9315
9343
  if (cancelled) {
9316
9344
  return null;
9317
9345
  }
@@ -9379,6 +9407,7 @@ function useContentLifecycle(input) {
9379
9407
  onContentApplied,
9380
9408
  allowExternalImages,
9381
9409
  setReadOnlyRecommendation,
9410
+ setModifyVerifier,
9382
9411
  setCompatToasts
9383
9412
  } = input;
9384
9413
  const { handlerRef } = useLoadContent({
@@ -9419,6 +9448,7 @@ function useContentLifecycle(input) {
9419
9448
  setDigitalSignatureCount: state.setDigitalSignatureCount,
9420
9449
  setGuides: state.setGuides,
9421
9450
  setReadOnlyRecommendation,
9451
+ setModifyVerifier,
9422
9452
  setCompatToasts,
9423
9453
  setLoading: state.setLoading,
9424
9454
  setError: state.setError,
@@ -9499,7 +9529,7 @@ function useKeyboardShortcuts(input) {
9499
9529
  inputRef.current = input;
9500
9530
  const handleKeyDown = react.useCallback((e) => {
9501
9531
  const current = inputRef.current;
9502
- const startAction = chunkSN5EUDIT_js.mapSlideShowStartKey(e, { isPresenting: current.mode === "present" });
9532
+ const startAction = chunk2Q2NFPXA_js.mapSlideShowStartKey(e, { isPresenting: current.mode === "present" });
9503
9533
  if (startAction !== null) {
9504
9534
  e.preventDefault();
9505
9535
  if (startAction === "fromBeginning") {
@@ -9509,7 +9539,7 @@ function useKeyboardShortcuts(input) {
9509
9539
  }
9510
9540
  return;
9511
9541
  }
9512
- const { action, dx, dy } = chunkSN5EUDIT_js.mapEditorKey(e, {
9542
+ const { action, dx, dy } = chunk2Q2NFPXA_js.mapEditorKey(e, {
9513
9543
  canEdit: current.canEdit,
9514
9544
  // The Slide Master view is an editing surface, not a viewing one.
9515
9545
  // Gating on `mode !== 'edit'` alone made `mapEditorKey` return
@@ -9522,7 +9552,7 @@ function useKeyboardShortcuts(input) {
9522
9552
  hasSelection: current.hasSelection,
9523
9553
  isEditingText: Boolean(current.inlineEditingElementId || current.tableEditorState?.isEditing),
9524
9554
  isDrawing: current.activeTool !== "select",
9525
- isTextInputTarget: chunkSN5EUDIT_js.isEditorTextInputTarget(e.target)
9555
+ isTextInputTarget: chunk2Q2NFPXA_js.isEditorTextInputTarget(e.target)
9526
9556
  });
9527
9557
  if (action === null) {
9528
9558
  return;
@@ -9693,6 +9723,7 @@ function useViewerIntegration(input) {
9693
9723
  autosaveIntervalMs,
9694
9724
  allowExternalImages,
9695
9725
  setReadOnlyRecommendation,
9726
+ setModifyVerifier,
9696
9727
  setCompatToasts,
9697
9728
  canEdit,
9698
9729
  promptKeepInkAnnotations,
@@ -9764,6 +9795,7 @@ function useViewerIntegration(input) {
9764
9795
  onContentApplied: () => setLoadVersion((v) => v + 1),
9765
9796
  allowExternalImages,
9766
9797
  setReadOnlyRecommendation,
9798
+ setModifyVerifier,
9767
9799
  setCompatToasts
9768
9800
  }
9769
9801
  );
@@ -9850,7 +9882,7 @@ function useViewerIntegration(input) {
9850
9882
  return zoom.scale;
9851
9883
  },
9852
9884
  setZoom(level) {
9853
- zoom.setScale(chunkSN5EUDIT_js.clampZoomScale(level));
9885
+ zoom.setScale(chunk2Q2NFPXA_js.clampZoomScale(level));
9854
9886
  },
9855
9887
  zoomIn() {
9856
9888
  zoom.handleZoomIn();
@@ -10068,7 +10100,7 @@ function useReducedMotion() {
10068
10100
  }
10069
10101
  function useViewerOptions() {
10070
10102
  const storeRef = react.useRef(null);
10071
- storeRef.current ??= chunkSN5EUDIT_js.createViewerOptionsStore();
10103
+ storeRef.current ??= chunk2Q2NFPXA_js.createViewerOptionsStore();
10072
10104
  const store = storeRef.current;
10073
10105
  const options = react.useSyncExternalStore(
10074
10106
  (onStoreChange) => store.subscribe(onStoreChange),
@@ -10077,9 +10109,9 @@ function useViewerOptions() {
10077
10109
  );
10078
10110
  return { optionsStore: store, options };
10079
10111
  }
10080
- var KNOWN_TAB_IDS = new Set(chunkSN5EUDIT_js.TOOLBAR_TABS.map((tab) => tab.id));
10112
+ var KNOWN_TAB_IDS = new Set(chunk2Q2NFPXA_js.TOOLBAR_TABS.map((tab) => tab.id));
10081
10113
  function computeToolbarVisibility(hiddenActions, hiddenTabIds = []) {
10082
- const isHidden = (id) => chunkSN5EUDIT_js.isActionHidden(id, hiddenActions);
10114
+ const isHidden = (id) => chunk2Q2NFPXA_js.isActionHidden(id, hiddenActions);
10083
10115
  const userHidden = new Set(hiddenTabIds);
10084
10116
  userHidden.delete("file");
10085
10117
  const isTabVisible = (id) => !KNOWN_TAB_IDS.has(id) || !isHidden(id) && !userHidden.has(id);
@@ -10172,12 +10204,12 @@ function useYjsDocumentSync({
10172
10204
  return;
10173
10205
  }
10174
10206
  try {
10175
- const handler = new chunkSN5EUDIT_js.PptxHandler();
10207
+ const handler = new chunk2Q2NFPXA_js.PptxHandler();
10176
10208
  await handler.load(sourceBytes.buffer);
10177
- const currentSlides = chunkSN5EUDIT_js.readSlidesFromYDoc(
10209
+ const currentSlides = chunk2Q2NFPXA_js.readSlidesFromYDoc(
10178
10210
  doc
10179
10211
  );
10180
- const slidesToSave = chunkSN5EUDIT_js.buildSaveSlides(currentSlides, templateElementsBySlideId);
10212
+ const slidesToSave = chunk2Q2NFPXA_js.buildSaveSlides(currentSlides, templateElementsBySlideId);
10181
10213
  const bytes = await handler.save(slidesToSave, getSaveOptions?.());
10182
10214
  config.onWriteBack(bytes);
10183
10215
  } catch {
@@ -10192,10 +10224,10 @@ function useYjsDocumentSync({
10192
10224
  if (!doc || !isConnected) {
10193
10225
  return;
10194
10226
  }
10195
- const docSlides = chunkSN5EUDIT_js.readSlidesFromYDoc(
10227
+ const docSlides = chunk2Q2NFPXA_js.readSlidesFromYDoc(
10196
10228
  doc
10197
10229
  );
10198
- if (!chunkSN5EUDIT_js.shouldRoomSlidesReplaceLoad(loadOrigin, docSlides.length)) {
10230
+ if (!chunk2Q2NFPXA_js.shouldRoomSlidesReplaceLoad(loadOrigin, docSlides.length)) {
10199
10231
  return;
10200
10232
  }
10201
10233
  lastSyncedRef.current = JSON.stringify(docSlides);
@@ -10214,11 +10246,11 @@ function useYjsDocumentSync({
10214
10246
  lastSyncedRef.current = serialized;
10215
10247
  void (async () => {
10216
10248
  const factories = await getFactories();
10217
- chunkSN5EUDIT_js.reconcileSlidesInYDoc(
10249
+ chunk2Q2NFPXA_js.reconcileSlidesInYDoc(
10218
10250
  slides,
10219
10251
  doc,
10220
10252
  factories,
10221
- chunkSN5EUDIT_js.LOCAL_SYNC_ORIGIN
10253
+ chunk2Q2NFPXA_js.LOCAL_SYNC_ORIGIN
10222
10254
  );
10223
10255
  scheduleWriteBack();
10224
10256
  })();
@@ -10232,10 +10264,10 @@ function useYjsDocumentSync({
10232
10264
  return;
10233
10265
  }
10234
10266
  const handleChange = (_events, transaction) => {
10235
- if (transaction?.origin === chunkSN5EUDIT_js.LOCAL_SYNC_ORIGIN) {
10267
+ if (transaction?.origin === chunk2Q2NFPXA_js.LOCAL_SYNC_ORIGIN) {
10236
10268
  return;
10237
10269
  }
10238
- const remoteSlides = chunkSN5EUDIT_js.readSlidesFromYDoc(
10270
+ const remoteSlides = chunk2Q2NFPXA_js.readSlidesFromYDoc(
10239
10271
  doc
10240
10272
  );
10241
10273
  if (remoteSlides.length === 0) {
@@ -10251,7 +10283,7 @@ function useYjsDocumentSync({
10251
10283
  isApplyingRemoteRef.current = false;
10252
10284
  scheduleWriteBack();
10253
10285
  };
10254
- const unobserve = chunkSN5EUDIT_js.observeYDocSlides(
10286
+ const unobserve = chunk2Q2NFPXA_js.observeYDocSlides(
10255
10287
  doc,
10256
10288
  handleChange
10257
10289
  );
@@ -10289,7 +10321,7 @@ function useBroadcastFollower({
10289
10321
  if (!broadcaster) {
10290
10322
  return;
10291
10323
  }
10292
- if (!chunkSN5EUDIT_js.shouldAutoFollowBroadcaster({
10324
+ if (!chunk2Q2NFPXA_js.shouldAutoFollowBroadcaster({
10293
10325
  localRole: collab.config.role,
10294
10326
  broadcasterRole: broadcaster.role
10295
10327
  })) {
@@ -10460,7 +10492,7 @@ function subscribeTouchCapability(callback) {
10460
10492
  function useIsMobile() {
10461
10493
  const isTouchDevice = react.useSyncExternalStore(
10462
10494
  subscribeTouchCapability,
10463
- chunkSN5EUDIT_js.detectTouchDevice,
10495
+ chunk2Q2NFPXA_js.detectTouchDevice,
10464
10496
  () => false
10465
10497
  // server snapshot
10466
10498
  );
@@ -10470,7 +10502,7 @@ function useIsMobile() {
10470
10502
  const [viewportHeight, setViewportHeight] = react.useState(
10471
10503
  () => typeof window === "undefined" ? 768 : window.innerHeight
10472
10504
  );
10473
- const [orientation, setOrientation] = react.useState(chunkSN5EUDIT_js.detectOrientation);
10505
+ const [orientation, setOrientation] = react.useState(chunk2Q2NFPXA_js.detectOrientation);
10474
10506
  const [isVirtualKeyboardOpen, setIsVirtualKeyboardOpen] = react.useState(false);
10475
10507
  const [initialViewportHeight] = react.useState(
10476
10508
  () => typeof window !== "undefined" ? window.innerHeight : 800
@@ -10491,7 +10523,7 @@ function useIsMobile() {
10491
10523
  return;
10492
10524
  }
10493
10525
  const handleOrientationChange = () => {
10494
- setOrientation(chunkSN5EUDIT_js.detectOrientation());
10526
+ setOrientation(chunk2Q2NFPXA_js.detectOrientation());
10495
10527
  };
10496
10528
  if (screen.orientation) {
10497
10529
  screen.orientation.addEventListener("change", handleOrientationChange);
@@ -10521,7 +10553,7 @@ function useIsMobile() {
10521
10553
  window.addEventListener("resize", handleResize);
10522
10554
  return () => window.removeEventListener("resize", handleResize);
10523
10555
  }, [isTouchDevice, initialViewportHeight]);
10524
- const { isMobile, isTablet, isDesktop } = chunkSN5EUDIT_js.deriveViewportBreakpoints(
10556
+ const { isMobile, isTablet, isDesktop } = chunk2Q2NFPXA_js.deriveViewportBreakpoints(
10525
10557
  viewportWidth,
10526
10558
  viewportHeight,
10527
10559
  isTouchDevice
@@ -10552,10 +10584,10 @@ function useTouchGestures(input) {
10552
10584
  if (!el || !enabled) {
10553
10585
  return;
10554
10586
  }
10555
- const recognizer = chunkSN5EUDIT_js.createTouchGestureRecognizer({
10587
+ const recognizer = chunk2Q2NFPXA_js.createTouchGestureRecognizer({
10556
10588
  getScale: () => scaleRef.current,
10557
- minScale: chunkSN5EUDIT_js.MIN_ZOOM_SCALE,
10558
- maxScale: chunkSN5EUDIT_js.MAX_ZOOM_SCALE,
10589
+ minScale: chunk2Q2NFPXA_js.MIN_ZOOM_SCALE,
10590
+ maxScale: chunk2Q2NFPXA_js.MAX_ZOOM_SCALE,
10559
10591
  callbacks: {
10560
10592
  onPinchZoom: (newScale) => callbacksRef.current.onPinchZoom?.(newScale),
10561
10593
  onSwipe: (direction) => callbacksRef.current.onSwipe?.(direction),
@@ -10595,7 +10627,7 @@ function scrollFocusedIntoView(keyboardInset) {
10595
10627
  return;
10596
10628
  }
10597
10629
  const rect = active.getBoundingClientRect();
10598
- const delta = chunkSN5EUDIT_js.computeScrollDelta(
10630
+ const delta = chunk2Q2NFPXA_js.computeScrollDelta(
10599
10631
  { top: rect.top, bottom: rect.bottom },
10600
10632
  window.innerHeight,
10601
10633
  keyboardInset
@@ -10615,8 +10647,8 @@ function useKeyboardInsets(enabled = true) {
10615
10647
  return;
10616
10648
  }
10617
10649
  const update = () => {
10618
- const metrics = chunkSN5EUDIT_js.readViewportMetrics(window);
10619
- const inset = metrics ? chunkSN5EUDIT_js.computeKeyboardInset(metrics) : 0;
10650
+ const metrics = chunk2Q2NFPXA_js.readViewportMetrics(window);
10651
+ const inset = metrics ? chunk2Q2NFPXA_js.computeKeyboardInset(metrics) : 0;
10620
10652
  setKeyboardInset(inset);
10621
10653
  if (inset > 0) {
10622
10654
  window.requestAnimationFrame(() => scrollFocusedIntoView(inset));
@@ -10627,8 +10659,8 @@ function useKeyboardInsets(enabled = true) {
10627
10659
  vv.addEventListener("scroll", update);
10628
10660
  const onFocusIn = () => {
10629
10661
  window.requestAnimationFrame(() => {
10630
- const metrics = chunkSN5EUDIT_js.readViewportMetrics(window);
10631
- const inset = metrics ? chunkSN5EUDIT_js.computeKeyboardInset(metrics) : 0;
10662
+ const metrics = chunk2Q2NFPXA_js.readViewportMetrics(window);
10663
+ const inset = metrics ? chunk2Q2NFPXA_js.computeKeyboardInset(metrics) : 0;
10632
10664
  if (inset > 0) {
10633
10665
  scrollFocusedIntoView(inset);
10634
10666
  }
@@ -10641,7 +10673,7 @@ function useKeyboardInsets(enabled = true) {
10641
10673
  document.removeEventListener("focusin", onFocusIn);
10642
10674
  };
10643
10675
  }, [enabled]);
10644
- return { keyboardInset, isKeyboardOpen: chunkSN5EUDIT_js.isKeyboardOpen(keyboardInset) };
10676
+ return { keyboardInset, isKeyboardOpen: chunk2Q2NFPXA_js.isKeyboardOpen(keyboardInset) };
10645
10677
  }
10646
10678
 
10647
10679
  // src/viewer/hooks/useViewerBuildingBlocks-canvas-props.ts
@@ -10670,21 +10702,21 @@ function buildCanvasProps(input) {
10670
10702
  } = input;
10671
10703
  const effectiveSlide = mode === "master" ? masterPseudoSlide : activeSlide;
10672
10704
  const effectiveTemplateElements = mode === "master" ? s.activeLayout ? s.activeMaster?.elements ?? [] : [] : templateElements;
10673
- const fieldContext = chunkSN5EUDIT_js.buildFieldSubstitutionContext({
10705
+ const fieldContext = chunk2Q2NFPXA_js.buildFieldSubstitutionContext({
10674
10706
  headerFooter: s.headerFooter,
10675
10707
  customProperties: s.customProperties,
10676
10708
  slide: activeSlide
10677
10709
  });
10678
10710
  const tableStyleContext = s.theme || s.tableStyleMap ? { theme: s.theme, tableStyleMap: s.tableStyleMap } : void 0;
10679
10711
  const openExternalUrl = (url, target) => {
10680
- if (chunkSN5EUDIT_js.shouldConfirmExternalHyperlink(viewerOptions, url) && !window.confirm(buildHyperlinkConfirmMessage(url))) {
10712
+ if (chunk2Q2NFPXA_js.shouldConfirmExternalHyperlink(viewerOptions, url) && !window.confirm(buildHyperlinkConfirmMessage(url))) {
10681
10713
  return;
10682
10714
  }
10683
- chunkSN5EUDIT_js.safeOpenUrl(url, target);
10715
+ chunk2Q2NFPXA_js.safeOpenUrl(url, target);
10684
10716
  };
10685
10717
  const handleActionClick = (elementId, action) => {
10686
10718
  if (mode === "present") {
10687
- const resolved = chunkSN5EUDIT_js.resolvePresentationAction(action, { slideCount: slides.length });
10719
+ const resolved = chunk2Q2NFPXA_js.resolvePresentationAction(action, { slideCount: slides.length });
10688
10720
  if (resolved.intent.kind === "openUrl") {
10689
10721
  openExternalUrl(resolved.intent.url);
10690
10722
  return;
@@ -10695,9 +10727,9 @@ function buildCanvasProps(input) {
10695
10727
  }
10696
10728
  };
10697
10729
  const handleHyperlinkClick = (url, target) => {
10698
- if (chunkSN5EUDIT_js.isPpactionUrl(url)) {
10730
+ if (chunk2Q2NFPXA_js.isPpactionUrl(url)) {
10699
10731
  if (mode === "present") {
10700
- const parsed = chunkSN5EUDIT_js.parsePpactionUrl(url);
10732
+ const parsed = chunk2Q2NFPXA_js.parsePpactionUrl(url);
10701
10733
  if (parsed) {
10702
10734
  presentation.handlePresentationAction({
10703
10735
  action: parsed.action,
@@ -10803,7 +10835,7 @@ function buildCanvasProps(input) {
10803
10835
 
10804
10836
  // src/viewer/hooks/useScopedLayoutOptions.ts
10805
10837
  function scopeLayoutOptionsToActiveSlide(options, activeSlide) {
10806
- return chunkSN5EUDIT_js.scopeLayoutOptionsToSlide(options, activeSlide?.layoutPath);
10838
+ return chunk2Q2NFPXA_js.scopeLayoutOptionsToSlide(options, activeSlide?.layoutPath);
10807
10839
  }
10808
10840
 
10809
10841
  // src/viewer/hooks/useViewerBuildingBlocks-toolbar-handlers.ts
@@ -10816,7 +10848,7 @@ function buildToolbarAnimationHandlers(input) {
10816
10848
  const current = activeSlide.animations ?? [];
10817
10849
  if (group === "motionPath") {
10818
10850
  propertyHandlers.handleUpdateSlide({
10819
- animations: chunkSN5EUDIT_js.applyMotionPathPreset(current, selectedElement.id, preset)
10851
+ animations: chunk2Q2NFPXA_js.applyMotionPathPreset(current, selectedElement.id, preset)
10820
10852
  });
10821
10853
  return;
10822
10854
  }
@@ -11012,7 +11044,7 @@ function buildToolbarProps(input) {
11012
11044
  onOpenFile,
11013
11045
  onOpenRecentFile,
11014
11046
  onCreatePresentation: (templateId) => {
11015
- s.setSlides(chunkSN5EUDIT_js.createBackstagePresentation(templateId));
11047
+ s.setSlides(chunk2Q2NFPXA_js.createBackstagePresentation(templateId));
11016
11048
  s.setActiveSlideIndex(0);
11017
11049
  s.setSelectedElementId(null);
11018
11050
  s.setSelectedElementIds([]);
@@ -11023,6 +11055,7 @@ function buildToolbarProps(input) {
11023
11055
  onSaveAsPptx: exportHandlers.handleSaveAsPptx,
11024
11056
  onSaveAsPpsx: exportHandlers.handleSaveAsPpsx,
11025
11057
  onSaveAsPptm: exportHandlers.handleSaveAsPptm,
11058
+ onSaveAsPpt: exportHandlers.handleSaveAsPpt,
11026
11059
  hasMacros: s.hasMacros,
11027
11060
  onCopySlideAsImage: exportHandlers.handleCopySlideAsImage,
11028
11061
  onPrint: printHandlers.handlePrint,
@@ -11041,7 +11074,7 @@ function buildToolbarProps(input) {
11041
11074
  loadLayoutPreviews: input.loadLayoutPreviews,
11042
11075
  onInsertSlideFromLayout: slideOps.handleInsertSlideFromLayout,
11043
11076
  onInsertSlideFromTemplate: slideOps.handleInsertSlideFromTemplate,
11044
- templateScheme: chunkSN5EUDIT_js.templateSchemeFromTheme(s.theme?.colorScheme),
11077
+ templateScheme: chunk2Q2NFPXA_js.templateSchemeFromTheme(s.theme?.colorScheme),
11045
11078
  customShows: s.customShows,
11046
11079
  activeCustomShowId: s.activeCustomShowId,
11047
11080
  onSetActiveCustomShowId: s.setActiveCustomShowId,
@@ -11082,7 +11115,7 @@ function buildToolbarProps(input) {
11082
11115
  isCommentsPanelOpen: s.isInspectorPaneOpen,
11083
11116
  slideCommentCount: activeSlide?.comments?.length ?? 0,
11084
11117
  formatPainterActive: s.formatPainterActive,
11085
- canActivateFormatPainter: chunkSN5EUDIT_js.hasCopyableFormat(selectedElement),
11118
+ canActivateFormatPainter: chunk2Q2NFPXA_js.hasCopyableFormat(selectedElement),
11086
11119
  onToggleFormatPainter: () => s.setFormatPainterActive((p) => !p),
11087
11120
  isSelectionPaneOpen: s.isSelectionPaneOpen,
11088
11121
  onToggleSelectionPane: () => s.setIsSelectionPaneOpen((p) => !p),
@@ -11160,7 +11193,7 @@ function useViewerBuildingBlocksCore(input) {
11160
11193
  headerFooter: state.headerFooter,
11161
11194
  loading,
11162
11195
  error,
11163
- maxHistoryEntries: chunkSN5EUDIT_js.resolveHistoryDepth(viewerOptions),
11196
+ maxHistoryEntries: chunk2Q2NFPXA_js.resolveHistoryDepth(viewerOptions),
11164
11197
  hasActivePointerInteraction,
11165
11198
  pointerCommitNonce: state.pointerCommitNonce,
11166
11199
  onDirty: markDocumentDirty,
@@ -11184,11 +11217,17 @@ function useViewerBuildingBlocksCore(input) {
11184
11217
  activeMaster: state.activeMaster,
11185
11218
  documentGridSpacing: state.viewProperties?.gridSpacing
11186
11219
  });
11220
+ const themeColorMap = react.useMemo(
11221
+ () => state.theme?.colorScheme ? chunk2Q2NFPXA_js.buildThemeColorMap(state.theme.colorScheme) : void 0,
11222
+ [state.theme?.colorScheme]
11223
+ );
11187
11224
  const { presentation, annotations, actionSoundHandlerRef, setExitModeHandler } = usePresentationSetup({
11188
11225
  mode,
11189
11226
  slides,
11190
11227
  templateElementsBySlideId,
11191
11228
  visibleSlideIndexes,
11229
+ canvasSize,
11230
+ themeColorMap,
11192
11231
  endWithBlackSlide: viewerOptions.advanced.slideShowEndWithBlackSlide,
11193
11232
  // File > Options > Advanced > "Prompt to keep ink annotations when
11194
11233
  // exiting" / "Show popup toolbar" while presenting.
@@ -11228,7 +11267,7 @@ function useViewerBuildingBlocksCore(input) {
11228
11267
  gridSpacingPx,
11229
11268
  // Multiplied against the pre-existing 2x baseline; see the matching
11230
11269
  // comment in `PowerPointViewer.tsx`.
11231
- imageExportScale: 2 * chunkSN5EUDIT_js.resolveImageResolutionScale(viewerOptions),
11270
+ imageExportScale: 2 * chunk2Q2NFPXA_js.resolveImageResolutionScale(viewerOptions),
11232
11271
  viewerOptions
11233
11272
  };
11234
11273
  }
@@ -11244,29 +11283,76 @@ function useCompatibilityToastsState() {
11244
11283
  }
11245
11284
  function useReadOnlyRecommendationState(content) {
11246
11285
  const [recommendation, setRecommendation] = react.useState(
11247
- () => chunkSN5EUDIT_js.readOnlyRecommendation(void 0)
11286
+ () => chunk2Q2NFPXA_js.readOnlyRecommendation(void 0)
11248
11287
  );
11288
+ const [modifyVerifier, setModifyVerifier] = react.useState(void 0);
11249
11289
  const [bannerHidden, setBannerHidden] = react.useState(false);
11250
11290
  const [editAnywayActive, setEditAnywayActive] = react.useState(false);
11291
+ const [passwordPromptOpen, setPasswordPromptOpen] = react.useState(false);
11292
+ const [passwordError, setPasswordError] = react.useState(null);
11293
+ const [checkingPassword, setCheckingPassword] = react.useState(false);
11251
11294
  react.useEffect(() => {
11252
11295
  setBannerHidden(false);
11253
11296
  setEditAnywayActive(false);
11297
+ setPasswordPromptOpen(false);
11298
+ setPasswordError(null);
11299
+ setCheckingPassword(false);
11254
11300
  }, [content]);
11255
- const editAnyway = react.useCallback(() => {
11301
+ const unlock = react.useCallback(() => {
11256
11302
  setEditAnywayActive(true);
11257
11303
  setBannerHidden(true);
11304
+ setPasswordPromptOpen(false);
11305
+ setPasswordError(null);
11258
11306
  }, []);
11307
+ const editAnyway = react.useCallback(() => {
11308
+ if (recommendation.requiresPassword) {
11309
+ setPasswordPromptOpen(true);
11310
+ setPasswordError(null);
11311
+ return;
11312
+ }
11313
+ unlock();
11314
+ }, [recommendation.requiresPassword, unlock]);
11259
11315
  const dismiss = react.useCallback(() => {
11260
11316
  setBannerHidden(true);
11261
11317
  }, []);
11318
+ const cancelPasswordPrompt = react.useCallback(() => {
11319
+ setPasswordPromptOpen(false);
11320
+ setPasswordError(null);
11321
+ }, []);
11322
+ const submitPassword = react.useCallback(
11323
+ async (password) => {
11324
+ setCheckingPassword(true);
11325
+ try {
11326
+ const result = await chunk2Q2NFPXA_js.checkModifyPassword(modifyVerifier, password);
11327
+ if (result.ok) {
11328
+ unlock();
11329
+ } else {
11330
+ setPasswordError(result.reason);
11331
+ }
11332
+ } finally {
11333
+ setCheckingPassword(false);
11334
+ }
11335
+ },
11336
+ // oxlint-disable-next-line react/memo-dependencies -- see comment above
11337
+ [modifyVerifier, unlock]
11338
+ );
11262
11339
  return {
11263
11340
  recommendation,
11264
11341
  setRecommendation,
11342
+ setModifyVerifier,
11265
11343
  /** Whether the viewer's `canEdit` should be forced off. */
11266
11344
  locked: recommendation.defaultReadOnly && !editAnywayActive,
11267
11345
  bannerVisible: recommendation.kind !== null && !bannerHidden,
11268
11346
  editAnyway,
11269
- dismiss
11347
+ dismiss,
11348
+ /** Whether the inline password prompt should render in place of the banner's buttons. */
11349
+ passwordPromptOpen,
11350
+ /** Reason the last password attempt failed, or null before any attempt / after success. */
11351
+ passwordError,
11352
+ /** True while `submitPassword`'s check is in flight (disables the form). */
11353
+ checkingPassword,
11354
+ submitPassword,
11355
+ cancelPasswordPrompt
11270
11356
  };
11271
11357
  }
11272
11358
  function useViewPreferencesSync(input) {
@@ -11282,9 +11368,9 @@ function useViewPreferencesSync(input) {
11282
11368
  setShowGuides
11283
11369
  } = input;
11284
11370
  react.useEffect(() => {
11285
- const seeded = chunkSN5EUDIT_js.viewerPreferencesFromViewProperties(
11371
+ const seeded = chunk2Q2NFPXA_js.viewerPreferencesFromViewProperties(
11286
11372
  { viewProperties },
11287
- { ...chunkSN5EUDIT_js.DEFAULT_VIEWER_PREFERENCES, snapToGrid, snapToObjects: snapToShape, showGuides }
11373
+ { ...chunk2Q2NFPXA_js.DEFAULT_VIEWER_PREFERENCES, snapToGrid, snapToObjects: snapToShape, showGuides }
11288
11374
  );
11289
11375
  setSnapToGrid(seeded.snapToGrid);
11290
11376
  setSnapToShape(seeded.snapToObjects ?? snapToShape);
@@ -11294,7 +11380,7 @@ function useViewPreferencesSync(input) {
11294
11380
  (prefsOverride) => {
11295
11381
  setViewProperties((prev) => {
11296
11382
  const merged = {
11297
- ...chunkSN5EUDIT_js.DEFAULT_VIEWER_PREFERENCES,
11383
+ ...chunk2Q2NFPXA_js.DEFAULT_VIEWER_PREFERENCES,
11298
11384
  snapToGrid,
11299
11385
  snapToObjects: snapToShape,
11300
11386
  showGuides,
@@ -11302,7 +11388,7 @@ function useViewPreferencesSync(input) {
11302
11388
  gridSpacingCy: prev?.gridSpacing?.cy,
11303
11389
  ...prefsOverride
11304
11390
  };
11305
- const patch = chunkSN5EUDIT_js.viewPropertiesPatchFromPreferences(merged);
11391
+ const patch = chunk2Q2NFPXA_js.viewPropertiesPatchFromPreferences(merged);
11306
11392
  return {
11307
11393
  ...prev,
11308
11394
  slideViewPr: { ...prev?.slideViewPr, ...patch.slideViewPr },
@@ -11444,6 +11530,7 @@ function useViewerBuildingBlocksState(input) {
11444
11530
  // under the same default-off, core-side SSRF/privacy guard.
11445
11531
  allowExternalImages: viewerOptions.trust.allowExternalContent,
11446
11532
  setReadOnlyRecommendation: readOnlyRec.setRecommendation,
11533
+ setModifyVerifier: readOnlyRec.setModifyVerifier,
11447
11534
  setCompatToasts: compatToastsState.setToasts,
11448
11535
  canEdit,
11449
11536
  promptKeepInkAnnotations: viewerOptions.advanced.slideShowPromptKeepInkAnnotations,
@@ -11520,7 +11607,7 @@ function useViewerBuildingBlocks(input) {
11520
11607
  }, [incomingContent]);
11521
11608
  const onOpenFile = react.useCallback(() => {
11522
11609
  void (async () => {
11523
- const picked = await chunkSN5EUDIT_js.openPptxFile();
11610
+ const picked = await chunk2Q2NFPXA_js.openPptxFile();
11524
11611
  if (picked) {
11525
11612
  setContent(picked.buffer);
11526
11613
  }
@@ -11528,7 +11615,7 @@ function useViewerBuildingBlocks(input) {
11528
11615
  }, []);
11529
11616
  const onOpenRecentFile = react.useCallback((key) => {
11530
11617
  void (async () => {
11531
- const bytes = await chunkSN5EUDIT_js.readBackstageRecentFile(key);
11618
+ const bytes = await chunk2Q2NFPXA_js.readBackstageRecentFile(key);
11532
11619
  if (bytes) {
11533
11620
  setContent(bytes);
11534
11621
  }
@@ -11714,6 +11801,7 @@ exports.isAudienceTab = isAudienceTab;
11714
11801
  exports.parseAudienceNonce = parseAudienceNonce;
11715
11802
  exports.parseEmailUrl = parseEmailUrl;
11716
11803
  exports.parseSlideFromUrl = parseSlideFromUrl;
11804
+ exports.playAnimationSound = playAnimationSound;
11717
11805
  exports.renderToCanvas = renderToCanvas;
11718
11806
  exports.safePrompt = safePrompt;
11719
11807
  exports.scopeLayoutOptionsToActiveSlide = scopeLayoutOptionsToActiveSlide;