pptx-react-viewer 2.10.0 → 2.11.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 (124) hide show
  1. package/CHANGELOG.md +2 -0
  2. package/dist/{AiChatPanel-35CHYS5N.mjs → AiChatPanel-EX2TBRJM.mjs} +4 -4
  3. package/dist/AiChatPanel-EX2TBRJM.mjs.br +0 -0
  4. package/dist/AiChatPanel-EX2TBRJM.mjs.gz +0 -0
  5. package/dist/{AiChatPanel-KTMWRUD5.js → AiChatPanel-PJPSDMN4.js} +23 -23
  6. package/dist/AiChatPanel-PJPSDMN4.js.br +0 -0
  7. package/dist/AiChatPanel-PJPSDMN4.js.gz +0 -0
  8. package/dist/{Model3DScene-2VMN3B65.mjs → Model3DScene-TTQFV7OS.mjs} +1 -1
  9. package/dist/Model3DScene-TTQFV7OS.mjs.br +0 -0
  10. package/dist/Model3DScene-TTQFV7OS.mjs.gz +0 -0
  11. package/dist/{Model3DScene-TMNUKCL6.js → Model3DScene-UCBPTEAY.js} +2 -2
  12. package/dist/Model3DScene-UCBPTEAY.js.br +0 -0
  13. package/dist/Model3DScene-UCBPTEAY.js.gz +0 -0
  14. package/dist/{SurfaceChart3DScene-GKRDDN2U.mjs → SurfaceChart3DScene-5SZCRHZI.mjs} +1 -1
  15. package/dist/{SurfaceChart3DScene-GKRDDN2U.mjs.br → SurfaceChart3DScene-5SZCRHZI.mjs.br} +0 -0
  16. package/dist/SurfaceChart3DScene-5SZCRHZI.mjs.gz +0 -0
  17. package/dist/{SurfaceChart3DScene-KPNP3QD5.js → SurfaceChart3DScene-ADKCYYOQ.js} +2 -2
  18. package/dist/SurfaceChart3DScene-ADKCYYOQ.js.br +0 -0
  19. package/dist/SurfaceChart3DScene-ADKCYYOQ.js.gz +0 -0
  20. package/dist/{chunk-A7HLINZU.js → chunk-4J7SPY64.js} +334 -324
  21. package/dist/chunk-4J7SPY64.js.br +0 -0
  22. package/dist/chunk-4J7SPY64.js.gz +0 -0
  23. package/dist/{chunk-SL3XPERE.mjs → chunk-53NXKDMZ.mjs} +47 -0
  24. package/dist/chunk-53NXKDMZ.mjs.br +0 -0
  25. package/dist/chunk-53NXKDMZ.mjs.gz +0 -0
  26. package/dist/{chunk-TJ55KUWH.mjs → chunk-C2UWTH42.mjs} +859 -112
  27. package/dist/chunk-C2UWTH42.mjs.br +0 -0
  28. package/dist/chunk-C2UWTH42.mjs.gz +0 -0
  29. package/dist/{chunk-JWMXOYSX.js → chunk-E367QIKR.js} +2162 -1736
  30. package/dist/chunk-E367QIKR.js.br +0 -0
  31. package/dist/chunk-E367QIKR.js.gz +0 -0
  32. package/dist/{chunk-OHPF2HTP.mjs → chunk-HK2UERUX.mjs} +13 -3
  33. package/dist/chunk-HK2UERUX.mjs.br +0 -0
  34. package/dist/chunk-HK2UERUX.mjs.gz +0 -0
  35. package/dist/{chunk-H74UXL4Q.js → chunk-HMQVOPQH.js} +880 -111
  36. package/dist/chunk-HMQVOPQH.js.br +0 -0
  37. package/dist/chunk-HMQVOPQH.js.gz +0 -0
  38. package/dist/{chunk-LCG7WBAG.mjs → chunk-L2CM5EUD.mjs} +491 -65
  39. package/dist/chunk-L2CM5EUD.mjs.br +0 -0
  40. package/dist/chunk-L2CM5EUD.mjs.gz +0 -0
  41. package/dist/{chunk-IJVDNQLG.js → chunk-MM5RMRSP.js} +275 -249
  42. package/dist/chunk-MM5RMRSP.js.br +0 -0
  43. package/dist/chunk-MM5RMRSP.js.gz +0 -0
  44. package/dist/{chunk-MMK4K3QI.js → chunk-N6IHR6PS.js} +47 -0
  45. package/dist/chunk-N6IHR6PS.js.br +0 -0
  46. package/dist/chunk-N6IHR6PS.js.gz +0 -0
  47. package/dist/{chunk-FY2AFXKP.mjs → chunk-RJEY2KZH.mjs} +29 -4
  48. package/dist/chunk-RJEY2KZH.mjs.br +0 -0
  49. package/dist/chunk-RJEY2KZH.mjs.gz +0 -0
  50. package/dist/{chunk-LXTKPSIG.mjs → chunk-UZVRM6LD.mjs} +1 -1
  51. package/dist/chunk-UZVRM6LD.mjs.br +0 -0
  52. package/dist/{chunk-LXTKPSIG.mjs.gz → chunk-UZVRM6LD.mjs.gz} +0 -0
  53. package/dist/{chunk-SPJR6MPI.js → chunk-VNP627O5.js} +3 -3
  54. package/dist/chunk-VNP627O5.js.br +0 -0
  55. package/dist/chunk-VNP627O5.js.gz +0 -0
  56. package/dist/i18n.js +4 -4
  57. package/dist/i18n.js.br +0 -0
  58. package/dist/i18n.js.gz +0 -0
  59. package/dist/i18n.mjs +1 -1
  60. package/dist/i18n.mjs.br +0 -0
  61. package/dist/i18n.mjs.gz +0 -0
  62. package/dist/index.d.ts +24 -3
  63. package/dist/index.d.ts.map +1 -1
  64. package/dist/index.js +36 -36
  65. package/dist/index.js.br +0 -0
  66. package/dist/index.js.gz +0 -0
  67. package/dist/index.mjs +6 -6
  68. package/dist/index.mjs.br +0 -0
  69. package/dist/index.mjs.gz +0 -0
  70. package/dist/internals.d.ts +26 -2
  71. package/dist/internals.d.ts.map +1 -1
  72. package/dist/internals.js +79 -79
  73. package/dist/internals.js.br +0 -0
  74. package/dist/internals.js.gz +0 -0
  75. package/dist/internals.mjs +4 -4
  76. package/dist/internals.mjs.br +0 -0
  77. package/dist/internals.mjs.gz +0 -0
  78. package/dist/pptx-viewer.css +1 -1
  79. package/dist/pptx-viewer.css.br +0 -0
  80. package/dist/pptx-viewer.css.gz +0 -0
  81. package/dist/{useViewerBuildingBlocks-CpUwhBD5.d.ts → useViewerBuildingBlocks-Rqxm0pRS.d.ts} +17 -5
  82. package/dist/useViewerBuildingBlocks-Rqxm0pRS.d.ts.map +1 -0
  83. package/dist/viewer/index.js +22 -22
  84. package/dist/viewer/index.js.br +0 -0
  85. package/dist/viewer/index.js.gz +0 -0
  86. package/dist/viewer/index.mjs +6 -6
  87. package/dist/viewer/index.mjs.br +0 -0
  88. package/dist/viewer/index.mjs.gz +0 -0
  89. package/package.json +1 -1
  90. package/dist/AiChatPanel-35CHYS5N.mjs.br +0 -0
  91. package/dist/AiChatPanel-35CHYS5N.mjs.gz +0 -0
  92. package/dist/AiChatPanel-KTMWRUD5.js.br +0 -0
  93. package/dist/AiChatPanel-KTMWRUD5.js.gz +0 -0
  94. package/dist/Model3DScene-2VMN3B65.mjs.br +0 -0
  95. package/dist/Model3DScene-2VMN3B65.mjs.gz +0 -0
  96. package/dist/Model3DScene-TMNUKCL6.js.br +0 -0
  97. package/dist/Model3DScene-TMNUKCL6.js.gz +0 -0
  98. package/dist/SurfaceChart3DScene-GKRDDN2U.mjs.gz +0 -0
  99. package/dist/SurfaceChart3DScene-KPNP3QD5.js.br +0 -0
  100. package/dist/SurfaceChart3DScene-KPNP3QD5.js.gz +0 -0
  101. package/dist/chunk-A7HLINZU.js.br +0 -0
  102. package/dist/chunk-A7HLINZU.js.gz +0 -0
  103. package/dist/chunk-FY2AFXKP.mjs.br +0 -0
  104. package/dist/chunk-FY2AFXKP.mjs.gz +0 -0
  105. package/dist/chunk-H74UXL4Q.js.br +0 -0
  106. package/dist/chunk-H74UXL4Q.js.gz +0 -0
  107. package/dist/chunk-IJVDNQLG.js.br +0 -0
  108. package/dist/chunk-IJVDNQLG.js.gz +0 -0
  109. package/dist/chunk-JWMXOYSX.js.br +0 -0
  110. package/dist/chunk-JWMXOYSX.js.gz +0 -0
  111. package/dist/chunk-LCG7WBAG.mjs.br +0 -0
  112. package/dist/chunk-LCG7WBAG.mjs.gz +0 -0
  113. package/dist/chunk-LXTKPSIG.mjs.br +0 -0
  114. package/dist/chunk-MMK4K3QI.js.br +0 -0
  115. package/dist/chunk-MMK4K3QI.js.gz +0 -0
  116. package/dist/chunk-OHPF2HTP.mjs.br +0 -0
  117. package/dist/chunk-OHPF2HTP.mjs.gz +0 -0
  118. package/dist/chunk-SL3XPERE.mjs.br +0 -0
  119. package/dist/chunk-SL3XPERE.mjs.gz +0 -0
  120. package/dist/chunk-SPJR6MPI.js.br +0 -0
  121. package/dist/chunk-SPJR6MPI.js.gz +0 -0
  122. package/dist/chunk-TJ55KUWH.mjs.br +0 -0
  123. package/dist/chunk-TJ55KUWH.mjs.gz +0 -0
  124. package/dist/useViewerBuildingBlocks-CpUwhBD5.d.ts.map +0 -1
@@ -1,8 +1,8 @@
1
1
  'use strict';
2
2
 
3
- var chunkIJVDNQLG_js = require('./chunk-IJVDNQLG.js');
4
- var chunkMMK4K3QI_js = require('./chunk-MMK4K3QI.js');
5
- var chunkH74UXL4Q_js = require('./chunk-H74UXL4Q.js');
3
+ var chunkMM5RMRSP_js = require('./chunk-MM5RMRSP.js');
4
+ var chunkN6IHR6PS_js = require('./chunk-N6IHR6PS.js');
5
+ var chunkHMQVOPQH_js = require('./chunk-HMQVOPQH.js');
6
6
  var react = require('react');
7
7
  var JSZip = require('jszip');
8
8
  var reactI18next = require('react-i18next');
@@ -14,7 +14,7 @@ var JSZip__default = /*#__PURE__*/_interopDefault(JSZip);
14
14
  function useVirtualizedSlides({
15
15
  totalItems,
16
16
  itemHeight,
17
- overscan = chunkH74UXL4Q_js.DEFAULT_VIRTUAL_OVERSCAN
17
+ overscan = chunkHMQVOPQH_js.DEFAULT_VIRTUAL_OVERSCAN
18
18
  }) {
19
19
  const scrollContainerRef = react.useRef(null);
20
20
  const [scrollTop, setScrollTop] = react.useState(0);
@@ -44,7 +44,7 @@ function useVirtualizedSlides({
44
44
  resizeObserver?.disconnect();
45
45
  };
46
46
  }, []);
47
- const range = chunkH74UXL4Q_js.computeVirtualRange(totalItems, itemHeight, scrollTop, viewportHeight, overscan);
47
+ const range = chunkHMQVOPQH_js.computeVirtualRange(totalItems, itemHeight, scrollTop, viewportHeight, overscan);
48
48
  const safeItemHeight = Math.max(itemHeight, 1);
49
49
  const scrollToIndex = react.useCallback(
50
50
  (index, behavior = "smooth") => {
@@ -107,7 +107,7 @@ function usePresenceTracking({
107
107
  awareness.setLocalStateField("presence", state);
108
108
  lastBroadcastRef.current = Date.now();
109
109
  };
110
- if (elapsed >= chunkH74UXL4Q_js.BROADCAST_THROTTLE_MS) {
110
+ if (elapsed >= chunkHMQVOPQH_js.BROADCAST_THROTTLE_MS) {
111
111
  if (pendingBroadcastRef.current) {
112
112
  clearTimeout(pendingBroadcastRef.current);
113
113
  pendingBroadcastRef.current = null;
@@ -117,7 +117,7 @@ function usePresenceTracking({
117
117
  pendingBroadcastRef.current = setTimeout(() => {
118
118
  pendingBroadcastRef.current = null;
119
119
  flush();
120
- }, chunkH74UXL4Q_js.BROADCAST_THROTTLE_MS - elapsed);
120
+ }, chunkHMQVOPQH_js.BROADCAST_THROTTLE_MS - elapsed);
121
121
  }
122
122
  },
123
123
  [awareness, userName, userColor, userAvatar, role]
@@ -142,7 +142,7 @@ function usePresenceTracking({
142
142
  return;
143
143
  }
144
144
  const handleChange = () => {
145
- const users = chunkH74UXL4Q_js.derivePresenceList(
145
+ const users = chunkHMQVOPQH_js.derivePresenceList(
146
146
  awareness.getStates(),
147
147
  localClientId,
148
148
  canvasWidth,
@@ -194,7 +194,7 @@ function useYjsProvider({ config }) {
194
194
  const departureRef = react.useRef(null);
195
195
  const gateRef = react.useRef(null);
196
196
  if (!gateRef.current) {
197
- gateRef.current = chunkH74UXL4Q_js.createSyncGate(() => setSynced(true));
197
+ gateRef.current = chunkHMQVOPQH_js.createSyncGate(() => setSynced(true));
198
198
  }
199
199
  const teardown = react.useCallback(() => {
200
200
  if (timeoutRef.current) {
@@ -214,7 +214,7 @@ function useYjsProvider({ config }) {
214
214
  const buildCleanup = react.useCallback(
215
215
  (provider, yDoc) => () => {
216
216
  announceDeparture();
217
- chunkH74UXL4Q_js.clearLocalAwareness(provider.awareness);
217
+ chunkHMQVOPQH_js.clearLocalAwareness(provider.awareness);
218
218
  provider.destroy();
219
219
  yDoc.destroy();
220
220
  setDoc(null);
@@ -239,9 +239,9 @@ function useYjsProvider({ config }) {
239
239
  if (config.authToken) {
240
240
  opts.password = config.authToken;
241
241
  }
242
- const roomId = chunkH74UXL4Q_js.validateRoomId(config.roomId);
242
+ const roomId = chunkHMQVOPQH_js.validateRoomId(config.roomId);
243
243
  const provider = new WebrtcProvider(roomId, yDoc, opts);
244
- departureRef.current = chunkH74UXL4Q_js.createDepartureChannel(roomId, provider.awareness);
244
+ departureRef.current = chunkHMQVOPQH_js.createDepartureChannel(roomId, provider.awareness);
245
245
  setDoc(yDoc);
246
246
  setAwareness(provider.awareness);
247
247
  setClientId(provider.awareness.clientID);
@@ -283,13 +283,13 @@ function useYjsProvider({ config }) {
283
283
  if (!config) {
284
284
  return;
285
285
  }
286
- const roomId = chunkH74UXL4Q_js.validateRoomId(config.roomId);
287
- const transport = config.transport ?? chunkH74UXL4Q_js.resolveTransportForServerUrl(config.serverUrl);
286
+ const roomId = chunkHMQVOPQH_js.validateRoomId(config.roomId);
287
+ const transport = config.transport ?? chunkHMQVOPQH_js.resolveTransportForServerUrl(config.serverUrl);
288
288
  if (transport === "webrtc") {
289
289
  await initWebrtc();
290
290
  return;
291
291
  }
292
- if (chunkH74UXL4Q_js.isMixedContentBlocked(config.serverUrl)) {
292
+ if (chunkHMQVOPQH_js.isMixedContentBlocked(config.serverUrl)) {
293
293
  console.warn(
294
294
  `[pptx-viewer] Refusing to connect: insecure ws:// server "${config.serverUrl}" is blocked from a secure (https) page. Use a wss:// URL.`
295
295
  );
@@ -303,7 +303,7 @@ function useYjsProvider({ config }) {
303
303
  const provider = new WebsocketProvider(config.serverUrl, roomId, yDoc, {
304
304
  params: config.authToken ? { token: config.authToken } : void 0
305
305
  });
306
- departureRef.current = chunkH74UXL4Q_js.createDepartureChannel(roomId, provider.awareness);
306
+ departureRef.current = chunkHMQVOPQH_js.createDepartureChannel(roomId, provider.awareness);
307
307
  let connected = false;
308
308
  const handleStatus = (event) => {
309
309
  if (event.status === "connected") {
@@ -343,7 +343,7 @@ function useYjsProvider({ config }) {
343
343
  provider.off("status", handleStatus);
344
344
  provider.off("sync", handleSynced);
345
345
  announceDeparture();
346
- chunkH74UXL4Q_js.clearLocalAwareness(provider.awareness);
346
+ chunkHMQVOPQH_js.clearLocalAwareness(provider.awareness);
347
347
  provider.destroy();
348
348
  yDoc.destroy();
349
349
  setDoc(null);
@@ -352,7 +352,7 @@ function useYjsProvider({ config }) {
352
352
  cleanupRef.current = null;
353
353
  setStatus("error");
354
354
  }
355
- }, chunkH74UXL4Q_js.CONNECTION_TIMEOUT_MS);
355
+ }, chunkHMQVOPQH_js.CONNECTION_TIMEOUT_MS);
356
356
  }
357
357
  setDoc(yDoc);
358
358
  setAwareness(provider.awareness);
@@ -361,7 +361,7 @@ function useYjsProvider({ config }) {
361
361
  provider.off("status", handleStatus);
362
362
  provider.off("sync", handleSynced);
363
363
  announceDeparture();
364
- chunkH74UXL4Q_js.clearLocalAwareness(provider.awareness);
364
+ chunkHMQVOPQH_js.clearLocalAwareness(provider.awareness);
365
365
  provider.destroy();
366
366
  yDoc.destroy();
367
367
  setDoc(null);
@@ -387,7 +387,7 @@ function useYjsProvider({ config }) {
387
387
  ]);
388
388
  react.useEffect(() => {
389
389
  init();
390
- const disposeTeardown = chunkH74UXL4Q_js.registerCollaborationTeardown({
390
+ const disposeTeardown = chunkHMQVOPQH_js.registerCollaborationTeardown({
391
391
  leave: teardown,
392
392
  rejoin: init
393
393
  });
@@ -408,7 +408,7 @@ function useCollaborativeState({
408
408
  canvasWidth,
409
409
  canvasHeight
410
410
  }) {
411
- const userColor = chunkH74UXL4Q_js.sanitizeColor(config?.userColor, "#6366f1");
411
+ const userColor = chunkHMQVOPQH_js.sanitizeColor(config?.userColor, "#6366f1");
412
412
  const { status, awareness, doc, clientId, synced, retry } = useYjsProvider({ config });
413
413
  const { remoteUsers, broadcastPresence } = usePresenceTracking({
414
414
  awareness,
@@ -517,8 +517,8 @@ function useEditorHistory(input) {
517
517
  width: canvasSize.width,
518
518
  height: canvasSize.height,
519
519
  activeSlideIndex,
520
- slides: slides.map(chunkH74UXL4Q_js.cloneSlide),
521
- templateElementsBySlideId: chunkH74UXL4Q_js.cloneTemplateElementsBySlideId(templateElementsBySlideId),
520
+ slides: slides.map(chunkHMQVOPQH_js.cloneSlide),
521
+ templateElementsBySlideId: chunkHMQVOPQH_js.cloneTemplateElementsBySlideId(templateElementsBySlideId),
522
522
  ...actionLabel ? { actionLabel } : {}
523
523
  };
524
524
  },
@@ -531,9 +531,9 @@ function useEditorHistory(input) {
531
531
  width: snapshot.width,
532
532
  height: snapshot.height
533
533
  });
534
- setSlides(snapshot.slides.map(chunkH74UXL4Q_js.cloneSlide));
534
+ setSlides(snapshot.slides.map(chunkHMQVOPQH_js.cloneSlide));
535
535
  setTemplateElementsBySlideId(
536
- chunkH74UXL4Q_js.cloneTemplateElementsBySlideId(snapshot.templateElementsBySlideId)
536
+ chunkHMQVOPQH_js.cloneTemplateElementsBySlideId(snapshot.templateElementsBySlideId)
537
537
  );
538
538
  setActiveSlideIndex(Math.min(snapshot.activeSlideIndex, maxSlideIndex));
539
539
  setSelectedElementIds([]);
@@ -567,8 +567,8 @@ function useEditorHistory(input) {
567
567
  const currentSnapshot = buildHistorySnapshot();
568
568
  historyFutureRef.current.push(currentSnapshot);
569
569
  isApplyingHistoryRef.current = true;
570
- const nextSnapshot = chunkIJVDNQLG_js.cloneHistorySnapshot(previousSnapshot);
571
- lastHistorySnapshotRef.current = chunkIJVDNQLG_js.cloneHistorySnapshot(nextSnapshot);
570
+ const nextSnapshot = chunkMM5RMRSP_js.cloneHistorySnapshot(previousSnapshot);
571
+ lastHistorySnapshotRef.current = chunkMM5RMRSP_js.cloneHistorySnapshot(nextSnapshot);
572
572
  lastHistorySerializedRef.current = JSON.stringify(nextSnapshot);
573
573
  applyHistorySnapshot(nextSnapshot);
574
574
  updateHistoryAvailability();
@@ -589,8 +589,8 @@ function useEditorHistory(input) {
589
589
  const currentSnapshot = buildHistorySnapshot();
590
590
  historyPastRef.current.push(currentSnapshot);
591
591
  isApplyingHistoryRef.current = true;
592
- const targetSnapshot = chunkIJVDNQLG_js.cloneHistorySnapshot(nextSnapshot);
593
- lastHistorySnapshotRef.current = chunkIJVDNQLG_js.cloneHistorySnapshot(targetSnapshot);
592
+ const targetSnapshot = chunkMM5RMRSP_js.cloneHistorySnapshot(nextSnapshot);
593
+ lastHistorySnapshotRef.current = chunkMM5RMRSP_js.cloneHistorySnapshot(targetSnapshot);
594
594
  lastHistorySerializedRef.current = JSON.stringify(targetSnapshot);
595
595
  applyHistorySnapshot(targetSnapshot);
596
596
  updateHistoryAvailability();
@@ -608,7 +608,7 @@ function useEditorHistory(input) {
608
608
  historyPastRef.current = [];
609
609
  historyFutureRef.current = [];
610
610
  if (initialSnapshot) {
611
- const clonedInitial = chunkIJVDNQLG_js.cloneHistorySnapshot(initialSnapshot);
611
+ const clonedInitial = chunkMM5RMRSP_js.cloneHistorySnapshot(initialSnapshot);
612
612
  lastHistorySnapshotRef.current = clonedInitial;
613
613
  lastHistorySerializedRef.current = JSON.stringify(clonedInitial);
614
614
  } else {
@@ -649,18 +649,18 @@ function useEditorHistory(input) {
649
649
  }
650
650
  const previousSnapshot = lastHistorySnapshotRef.current;
651
651
  if (!previousSnapshot) {
652
- lastHistorySnapshotRef.current = chunkIJVDNQLG_js.cloneHistorySnapshot(snapshot);
652
+ lastHistorySnapshotRef.current = chunkMM5RMRSP_js.cloneHistorySnapshot(snapshot);
653
653
  lastHistorySerializedRef.current = serialized;
654
654
  lastCheapHashRef.current = cheapHash;
655
655
  updateHistoryAvailability();
656
656
  return;
657
657
  }
658
- historyPastRef.current.push(chunkIJVDNQLG_js.cloneHistorySnapshot(previousSnapshot));
658
+ historyPastRef.current.push(chunkMM5RMRSP_js.cloneHistorySnapshot(previousSnapshot));
659
659
  while (historyPastRef.current.length > Math.max(1, maxHistoryEntries)) {
660
660
  historyPastRef.current.shift();
661
661
  }
662
662
  historyFutureRef.current = [];
663
- lastHistorySnapshotRef.current = chunkIJVDNQLG_js.cloneHistorySnapshot(snapshot);
663
+ lastHistorySnapshotRef.current = chunkMM5RMRSP_js.cloneHistorySnapshot(snapshot);
664
664
  lastHistorySerializedRef.current = serialized;
665
665
  lastCheapHashRef.current = cheapHash;
666
666
  updateHistoryAvailability();
@@ -749,7 +749,7 @@ function useZoomViewport({
749
749
  if (!wrapper || !canvasViewport) {
750
750
  return;
751
751
  }
752
- const boundedScale = chunkH74UXL4Q_js.clampZoomScale(nextScale);
752
+ const boundedScale = chunkHMQVOPQH_js.clampZoomScale(nextScale);
753
753
  const nextEditorScale = fitScale * boundedScale;
754
754
  const centerX = (bounds.minX + bounds.maxX) / 2;
755
755
  const centerY = (bounds.minY + bounds.maxY) / 2;
@@ -764,10 +764,10 @@ function useZoomViewport({
764
764
  [fitScale]
765
765
  );
766
766
  const handleZoomIn = react.useCallback(() => {
767
- setScale((currentScale) => chunkH74UXL4Q_js.zoomInScale(currentScale));
767
+ setScale((currentScale) => chunkHMQVOPQH_js.zoomInScale(currentScale));
768
768
  }, []);
769
769
  const handleZoomOut = react.useCallback(() => {
770
- setScale((currentScale) => chunkH74UXL4Q_js.zoomOutScale(currentScale));
770
+ setScale((currentScale) => chunkHMQVOPQH_js.zoomOutScale(currentScale));
771
771
  }, []);
772
772
  const handleResetZoom = react.useCallback(() => {
773
773
  setScale(1);
@@ -786,29 +786,29 @@ function useZoomViewport({
786
786
  selectedElements.forEach((element) => {
787
787
  minX = Math.min(minX, element.x);
788
788
  minY = Math.min(minY, element.y);
789
- maxX = Math.max(maxX, element.x + Math.max(element.width, chunkIJVDNQLG_js.MIN_ELEMENT_SIZE));
790
- maxY = Math.max(maxY, element.y + Math.max(element.height, chunkIJVDNQLG_js.MIN_ELEMENT_SIZE));
789
+ maxX = Math.max(maxX, element.x + Math.max(element.width, chunkMM5RMRSP_js.MIN_ELEMENT_SIZE));
790
+ maxY = Math.max(maxY, element.y + Math.max(element.height, chunkMM5RMRSP_js.MIN_ELEMENT_SIZE));
791
791
  });
792
792
  if (!Number.isFinite(minX) || !Number.isFinite(minY) || !Number.isFinite(maxX) || !Number.isFinite(maxY)) {
793
793
  return;
794
794
  }
795
795
  const selectionBounds = { minX, minY, maxX, maxY };
796
- const boundsWidth = Math.max(selectionBounds.maxX - selectionBounds.minX, chunkIJVDNQLG_js.MIN_ELEMENT_SIZE);
797
- const boundsHeight = Math.max(selectionBounds.maxY - selectionBounds.minY, chunkIJVDNQLG_js.MIN_ELEMENT_SIZE);
796
+ const boundsWidth = Math.max(selectionBounds.maxX - selectionBounds.minX, chunkMM5RMRSP_js.MIN_ELEMENT_SIZE);
797
+ const boundsHeight = Math.max(selectionBounds.maxY - selectionBounds.minY, chunkMM5RMRSP_js.MIN_ELEMENT_SIZE);
798
798
  const availableWidth = Math.max(
799
- effectiveEditorDimensions.width - chunkIJVDNQLG_js.ZOOM_TO_SELECTION_PADDING,
800
- chunkIJVDNQLG_js.MIN_ELEMENT_SIZE
799
+ effectiveEditorDimensions.width - chunkMM5RMRSP_js.ZOOM_TO_SELECTION_PADDING,
800
+ chunkMM5RMRSP_js.MIN_ELEMENT_SIZE
801
801
  );
802
802
  const availableHeight = Math.max(
803
- effectiveEditorDimensions.height - chunkIJVDNQLG_js.ZOOM_TO_SELECTION_PADDING,
804
- chunkIJVDNQLG_js.MIN_ELEMENT_SIZE
803
+ effectiveEditorDimensions.height - chunkMM5RMRSP_js.ZOOM_TO_SELECTION_PADDING,
804
+ chunkMM5RMRSP_js.MIN_ELEMENT_SIZE
805
805
  );
806
806
  const targetEditorScale = Math.min(
807
807
  availableWidth / boundsWidth,
808
808
  availableHeight / boundsHeight
809
809
  );
810
810
  const safeFitScale = fitScale > Number.EPSILON ? fitScale : Number.EPSILON;
811
- const nextScale = chunkH74UXL4Q_js.clampZoomScale(targetEditorScale / safeFitScale);
811
+ const nextScale = chunkHMQVOPQH_js.clampZoomScale(targetEditorScale / safeFitScale);
812
812
  setScale(nextScale);
813
813
  window.requestAnimationFrame(() => {
814
814
  window.requestAnimationFrame(() => {
@@ -828,7 +828,7 @@ function useZoomViewport({
828
828
  }
829
829
  event.preventDefault();
830
830
  const delta = event.deltaY * -1e-3;
831
- setScale((currentScale) => chunkH74UXL4Q_js.clampZoomScale(currentScale + delta));
831
+ setScale((currentScale) => chunkHMQVOPQH_js.clampZoomScale(currentScale + delta));
832
832
  }, []);
833
833
  react.useEffect(() => {
834
834
  const viewport = canvasViewportRef.current;
@@ -905,7 +905,7 @@ function applyAnimationGroupSteps(group, onPlayActionSound, setPresentationEleme
905
905
  const command = step.command;
906
906
  const timer = window.setTimeout(
907
907
  () => {
908
- chunkIJVDNQLG_js.executeMediaCommand(command);
908
+ chunkMM5RMRSP_js.executeMediaCommand(command);
909
909
  },
910
910
  Math.max(0, step.delayMs)
911
911
  );
@@ -1021,7 +1021,7 @@ function useAnimationPlayback(input) {
1021
1021
  (controller, group) => {
1022
1022
  driveBuildReveal(
1023
1023
  controller,
1024
- chunkH74UXL4Q_js.PresentationAnimationController.collectBuildStepIds(group),
1024
+ chunkHMQVOPQH_js.PresentationAnimationController.collectBuildStepIds(group),
1025
1025
  setPresentationElementStates,
1026
1026
  buildRafRef
1027
1027
  );
@@ -1084,7 +1084,7 @@ function useAnimationPlayback(input) {
1084
1084
  setHoverTriggerShapeIds(/* @__PURE__ */ new Set());
1085
1085
  return;
1086
1086
  }
1087
- const controller = chunkH74UXL4Q_js.PresentationAnimationController.fromSlide(slide);
1087
+ const controller = chunkHMQVOPQH_js.PresentationAnimationController.fromSlide(slide);
1088
1088
  controllerRef.current = controller;
1089
1089
  setPresentationKeyframesCss(controller.keyframesCss);
1090
1090
  setInteractiveTriggerShapeIds(controller.interactiveTriggerShapeIds);
@@ -1232,7 +1232,7 @@ function useAnimationPlayback(input) {
1232
1232
  }))
1233
1233
  );
1234
1234
  entranceAnimations.forEach((animation, animationIndex) => {
1235
- const delay = chunkH74UXL4Q_js.computeEntranceAnimationDelay(animation.delayMs, animationIndex);
1235
+ const delay = chunkHMQVOPQH_js.computeEntranceAnimationDelay(animation.delayMs, animationIndex);
1236
1236
  const timer = window.setTimeout(() => {
1237
1237
  setPresentationAnimations(
1238
1238
  (previousAnimations) => previousAnimations.map(
@@ -1269,12 +1269,12 @@ function useAnimationPlayback(input) {
1269
1269
  presentationTimersRef
1270
1270
  };
1271
1271
  }
1272
- var PRESENTER_CHANNEL_NAME = chunkH74UXL4Q_js.PRESENTATION_CHANNEL_NAME;
1273
- var AUDIENCE_HASH = chunkH74UXL4Q_js.PRESENTATION_HASH;
1274
- var PRESENTER_MSG_ORIGIN = chunkH74UXL4Q_js.PRESENTATION_MESSAGE_ORIGIN;
1275
- var AUDIENCE_NONCE_KEY = chunkH74UXL4Q_js.PRESENTATION_NONCE_KEY;
1272
+ var PRESENTER_CHANNEL_NAME = chunkHMQVOPQH_js.PRESENTATION_CHANNEL_NAME;
1273
+ var AUDIENCE_HASH = chunkHMQVOPQH_js.PRESENTATION_HASH;
1274
+ var PRESENTER_MSG_ORIGIN = chunkHMQVOPQH_js.PRESENTATION_MESSAGE_ORIGIN;
1275
+ var AUDIENCE_NONCE_KEY = chunkHMQVOPQH_js.PRESENTATION_NONCE_KEY;
1276
1276
  function generateSessionId() {
1277
- return chunkH74UXL4Q_js.createPresentationSessionId();
1277
+ return chunkHMQVOPQH_js.createPresentationSessionId();
1278
1278
  }
1279
1279
  function parseAudienceNonce() {
1280
1280
  const hash = window.location.hash;
@@ -1310,7 +1310,7 @@ function usePresenterWindow(input) {
1310
1310
  }, []);
1311
1311
  const swapDisplays = react.useCallback(async () => {
1312
1312
  const audience = audienceWindowRef.current;
1313
- return audience && !audience.closed ? chunkH74UXL4Q_js.swapPresentationWindows(window, audience) : false;
1313
+ return audience && !audience.closed ? chunkHMQVOPQH_js.swapPresentationWindows(window, audience) : false;
1314
1314
  }, []);
1315
1315
  const syncSlideToAudience = react.useCallback(
1316
1316
  (slideIndex) => {
@@ -1374,7 +1374,7 @@ function usePresenterWindow(input) {
1374
1374
  pollTimerRef.current = null;
1375
1375
  }
1376
1376
  if (closingSessionId) {
1377
- void chunkH74UXL4Q_js.clearAudienceContent(closingSessionId);
1377
+ void chunkHMQVOPQH_js.clearAudienceContent(closingSessionId);
1378
1378
  }
1379
1379
  }, [getChannel]);
1380
1380
  const openAudienceWindow = react.useCallback(() => {
@@ -1392,10 +1392,10 @@ function usePresenterWindow(input) {
1392
1392
  audienceWindowRef.current = blankWin;
1393
1393
  const sessionId = generateSessionId();
1394
1394
  sessionIdRef.current = sessionId;
1395
- const audienceUrl = chunkH74UXL4Q_js.buildPresentationAudienceUrl(window.location.href, sessionId);
1396
- void chunkH74UXL4Q_js.resolveAudienceScreenPlacement(window).then((placement) => {
1395
+ const audienceUrl = chunkHMQVOPQH_js.buildPresentationAudienceUrl(window.location.href, sessionId);
1396
+ void chunkHMQVOPQH_js.resolveAudienceScreenPlacement(window).then((placement) => {
1397
1397
  if (placement && audienceWindowRef.current === blankWin && !blankWin.closed) {
1398
- chunkH74UXL4Q_js.placeAudienceWindow(blankWin, placement);
1398
+ chunkHMQVOPQH_js.placeAudienceWindow(blankWin, placement);
1399
1399
  }
1400
1400
  return void 0;
1401
1401
  });
@@ -1425,7 +1425,7 @@ function usePresenterWindow(input) {
1425
1425
  }
1426
1426
  };
1427
1427
  if (content) {
1428
- void chunkH74UXL4Q_js.storeAudienceContent(content, sessionId).then(() => navigateOrClose(true)).catch(() => navigateOrClose(false));
1428
+ void chunkHMQVOPQH_js.storeAudienceContent(content, sessionId).then(() => navigateOrClose(true)).catch(() => navigateOrClose(false));
1429
1429
  } else {
1430
1430
  navigateOrClose(true);
1431
1431
  }
@@ -1451,7 +1451,7 @@ function usePresenterWindow(input) {
1451
1451
  }
1452
1452
  const handleMessage = (event) => {
1453
1453
  const message = event.data;
1454
- if (chunkH74UXL4Q_js.isPresentationSessionMessage(message) && message.type === "audience-ready" && message.sessionId === sessionIdRef.current) {
1454
+ if (chunkHMQVOPQH_js.isPresentationSessionMessage(message) && message.type === "audience-ready" && message.sessionId === sessionIdRef.current) {
1455
1455
  syncStateToAudience(snapshotRef.current);
1456
1456
  }
1457
1457
  };
@@ -1480,7 +1480,7 @@ function usePresenterWindow(input) {
1480
1480
  react.useEffect(() => {
1481
1481
  const handleBeforeUnload = () => {
1482
1482
  if (sessionIdRef.current) {
1483
- void chunkH74UXL4Q_js.clearAudienceContent(sessionIdRef.current);
1483
+ void chunkHMQVOPQH_js.clearAudienceContent(sessionIdRef.current);
1484
1484
  }
1485
1485
  };
1486
1486
  window.addEventListener("beforeunload", handleBeforeUnload);
@@ -1542,7 +1542,7 @@ function useAudienceMode(input) {
1542
1542
  }
1543
1543
  channel.onmessage = (event) => {
1544
1544
  const data = event.data;
1545
- if (!chunkH74UXL4Q_js.isPresentationSessionMessage(data) || data.origin !== PRESENTER_MSG_ORIGIN) {
1545
+ if (!chunkHMQVOPQH_js.isPresentationSessionMessage(data) || data.origin !== PRESENTER_MSG_ORIGIN) {
1546
1546
  return;
1547
1547
  }
1548
1548
  if (expectedSessionId && data.sessionId !== expectedSessionId) {
@@ -1558,16 +1558,16 @@ function useAudienceMode(input) {
1558
1558
  }
1559
1559
  if (data.type === "presenter-exit") {
1560
1560
  if (expectedSessionId) {
1561
- void chunkH74UXL4Q_js.clearAudienceContent(expectedSessionId);
1561
+ void chunkHMQVOPQH_js.clearAudienceContent(expectedSessionId);
1562
1562
  }
1563
- if (chunkH74UXL4Q_js.endAudienceDisplay(window)) {
1563
+ if (chunkHMQVOPQH_js.endAudienceDisplay(window)) {
1564
1564
  handlers.onPresenterEnded?.();
1565
1565
  }
1566
1566
  }
1567
1567
  };
1568
1568
  if (expectedSessionId) {
1569
1569
  channel.postMessage({
1570
- origin: chunkH74UXL4Q_js.PRESENTATION_MESSAGE_ORIGIN,
1570
+ origin: chunkHMQVOPQH_js.PRESENTATION_MESSAGE_ORIGIN,
1571
1571
  type: "audience-ready",
1572
1572
  sessionId: expectedSessionId
1573
1573
  });
@@ -1599,14 +1599,14 @@ function usePresentationKeyboard(input) {
1599
1599
  presentationSlideIndex,
1600
1600
  setShowRehearsalSummary
1601
1601
  } = input;
1602
- const keyBufferRef = react.useRef(chunkH74UXL4Q_js.createPresentationKeyBuffer());
1602
+ const keyBufferRef = react.useRef(chunkHMQVOPQH_js.createPresentationKeyBuffer());
1603
1603
  react.useEffect(() => {
1604
- if (mode !== "present" || !chunkH74UXL4Q_js.acceptsPresentationInput()) {
1605
- keyBufferRef.current = chunkH74UXL4Q_js.createPresentationKeyBuffer();
1604
+ if (mode !== "present" || !chunkHMQVOPQH_js.acceptsPresentationInput()) {
1605
+ keyBufferRef.current = chunkHMQVOPQH_js.createPresentationKeyBuffer();
1606
1606
  return;
1607
1607
  }
1608
1608
  const handleKeyDown = (event) => {
1609
- const mapped = chunkH74UXL4Q_js.mapPresentationKey(event, keyBufferRef.current);
1609
+ const mapped = chunkHMQVOPQH_js.mapPresentationKey(event, keyBufferRef.current);
1610
1610
  if (mapped.action === "none") {
1611
1611
  return;
1612
1612
  }
@@ -1814,7 +1814,7 @@ function handlePresentationActionImpl(action, deps) {
1814
1814
  return;
1815
1815
  }
1816
1816
  if (action.url && !actionStr.includes("hlinksldjump")) {
1817
- if (chunkH74UXL4Q_js.isUrlSafe(action.url)) {
1817
+ if (chunkHMQVOPQH_js.isUrlSafe(action.url)) {
1818
1818
  window.open(action.url, "_blank", "noopener,noreferrer");
1819
1819
  }
1820
1820
  }
@@ -1824,7 +1824,7 @@ function handlePresentationActionImpl(action, deps) {
1824
1824
  function executeSlideTransition(nextSlideIndex, deps) {
1825
1825
  const incomingSlide = deps.slides[nextSlideIndex];
1826
1826
  const transition = incomingSlide?.transition;
1827
- const durationMs = deps.playTransition ? chunkH74UXL4Q_js.resolveTransitionDurationMs(transition) : 0;
1827
+ const durationMs = deps.playTransition ? chunkHMQVOPQH_js.resolveTransitionDurationMs(transition) : 0;
1828
1828
  deps.clearPresentationTimers();
1829
1829
  deps.setPresentationSlideIndex(nextSlideIndex);
1830
1830
  deps.onSetActiveSlideIndex(nextSlideIndex);
@@ -1883,7 +1883,7 @@ function useSlideNavigation(input) {
1883
1883
  });
1884
1884
  const scheduleAutoAdvanceForSlide = react.useCallback(
1885
1885
  (slideIndex) => {
1886
- const delayMs = chunkH74UXL4Q_js.resolveAutoAdvanceDelayMs(slides[slideIndex], { useTimings });
1886
+ const delayMs = chunkHMQVOPQH_js.resolveAutoAdvanceDelayMs(slides[slideIndex], { useTimings });
1887
1887
  if (delayMs === void 0) {
1888
1888
  return;
1889
1889
  }
@@ -2073,17 +2073,17 @@ function useZoomNavigation(input) {
2073
2073
  };
2074
2074
  }
2075
2075
  function usePresenterConsole(slideIndex) {
2076
- const timerRef = react.useRef(chunkH74UXL4Q_js.createPresenterTimer());
2077
- const [snapshot, setSnapshot] = react.useState(() => chunkH74UXL4Q_js.createInitialPresentationSnapshot(slideIndex));
2076
+ const timerRef = react.useRef(chunkHMQVOPQH_js.createPresenterTimer());
2077
+ const [snapshot, setSnapshot] = react.useState(() => chunkHMQVOPQH_js.createInitialPresentationSnapshot(slideIndex));
2078
2078
  const patch = react.useCallback((value) => {
2079
- setSnapshot((current) => chunkH74UXL4Q_js.mergePresentationSnapshot(current, value));
2079
+ setSnapshot((current) => chunkHMQVOPQH_js.mergePresentationSnapshot(current, value));
2080
2080
  }, []);
2081
2081
  react.useEffect(() => patch({ slideIndex }), [patch, slideIndex]);
2082
2082
  react.useEffect(() => {
2083
2083
  const timer = window.setInterval(() => {
2084
2084
  patch({
2085
2085
  paused: timerRef.current.paused,
2086
- elapsedMs: chunkH74UXL4Q_js.presenterElapsed(timerRef.current)
2086
+ elapsedMs: chunkHMQVOPQH_js.presenterElapsed(timerRef.current)
2087
2087
  });
2088
2088
  }, 1e3);
2089
2089
  return () => window.clearInterval(timer);
@@ -2093,19 +2093,19 @@ function usePresenterConsole(slideIndex) {
2093
2093
  applyAudienceSnapshot: setSnapshot,
2094
2094
  setBlackout: (blackout) => patch({ blackout }),
2095
2095
  toggleTimer: () => {
2096
- timerRef.current = chunkH74UXL4Q_js.togglePresenterTimer(timerRef.current);
2096
+ timerRef.current = chunkHMQVOPQH_js.togglePresenterTimer(timerRef.current);
2097
2097
  patch({
2098
2098
  paused: timerRef.current.paused,
2099
- elapsedMs: chunkH74UXL4Q_js.presenterElapsed(timerRef.current)
2099
+ elapsedMs: chunkHMQVOPQH_js.presenterElapsed(timerRef.current)
2100
2100
  });
2101
2101
  },
2102
2102
  resetTimer: () => {
2103
- timerRef.current = chunkH74UXL4Q_js.resetPresenterTimer();
2103
+ timerRef.current = chunkHMQVOPQH_js.resetPresenterTimer();
2104
2104
  patch({ paused: false, elapsedMs: 0 });
2105
2105
  },
2106
2106
  stepZoom: (direction) => setSnapshot(
2107
- (current) => chunkH74UXL4Q_js.mergePresentationSnapshot(current, {
2108
- zoom: chunkH74UXL4Q_js.stepPresenterZoom(
2107
+ (current) => chunkHMQVOPQH_js.mergePresentationSnapshot(current, {
2108
+ zoom: chunkHMQVOPQH_js.stepPresenterZoom(
2109
2109
  current.zoom ?? { scale: 1, originX: 0.5, originY: 0.5 },
2110
2110
  direction
2111
2111
  )
@@ -2226,7 +2226,7 @@ function usePresentationMode(input) {
2226
2226
  });
2227
2227
  const movePresentationSlide = react.useCallback(
2228
2228
  (direction, trigger = "explicit") => {
2229
- if (!chunkH74UXL4Q_js.acceptsPresentationInput()) {
2229
+ if (!chunkHMQVOPQH_js.acceptsPresentationInput()) {
2230
2230
  return;
2231
2231
  }
2232
2232
  if (endOfShowVisible) {
@@ -2428,11 +2428,11 @@ function usePresentationMode(input) {
2428
2428
  if (!transitionOverlay || transitionOverlay.transition.type !== "morph") {
2429
2429
  return void 0;
2430
2430
  }
2431
- return chunkH74UXL4Q_js.buildMorphTransitionPlan(
2431
+ return chunkHMQVOPQH_js.buildMorphTransitionPlan(
2432
2432
  slides[transitionOverlay.outgoingSlideIndex],
2433
2433
  slides[transitionOverlay.incomingSlideIndex],
2434
2434
  transitionOverlay.durationMs,
2435
- chunkH74UXL4Q_js.morphOptionToMode(transitionOverlay.transition.morphOption)
2435
+ chunkHMQVOPQH_js.morphOptionToMode(transitionOverlay.transition.morphOption)
2436
2436
  );
2437
2437
  }, [transitionOverlay, slides]);
2438
2438
  const morphedElementStates = react.useMemo(() => {
@@ -2738,7 +2738,7 @@ function findInSlides(slides, findQuery, findMatchCase) {
2738
2738
  const normalised = findMatchCase ? findQuery : findQuery.toLowerCase();
2739
2739
  slides.forEach((slide, slideIndex) => {
2740
2740
  for (const element of slide.elements || []) {
2741
- if (!chunkH74UXL4Q_js.hasTextProperties(element)) {
2741
+ if (!chunkHMQVOPQH_js.hasTextProperties(element)) {
2742
2742
  continue;
2743
2743
  }
2744
2744
  const segments = element.textSegments ?? [];
@@ -2789,7 +2789,7 @@ function applyFindReplacements(slides, toReplace, replaceQuery) {
2789
2789
  continue;
2790
2790
  }
2791
2791
  const element = slide.elements[elIdx];
2792
- if (!chunkH74UXL4Q_js.hasTextProperties(element)) {
2792
+ if (!chunkHMQVOPQH_js.hasTextProperties(element)) {
2793
2793
  continue;
2794
2794
  }
2795
2795
  const segments = [...element.textSegments ?? []];
@@ -3387,7 +3387,7 @@ function useViewerCoreState(_input) {
3387
3387
  const shapeAdjustmentDragStateRef = react.useRef(null);
3388
3388
  const marqueeStateRef = react.useRef(null);
3389
3389
  const isDrawingRef = react.useRef(false);
3390
- const livePatcher = react.useMemo(() => chunkH74UXL4Q_js.createCollaborationLivePatcher(), []);
3390
+ const livePatcher = react.useMemo(() => chunkHMQVOPQH_js.createCollaborationLivePatcher(), []);
3391
3391
  react.useEffect(() => () => livePatcher.dispose(), [livePatcher]);
3392
3392
  const slidesRef = react.useRef([]);
3393
3393
  const [mode, setMode] = react.useState("edit");
@@ -3396,8 +3396,8 @@ function useViewerCoreState(_input) {
3396
3396
  const [slides, setSlides] = react.useState([]);
3397
3397
  const [templateElementsBySlideId, setTemplateElementsBySlideId] = react.useState({});
3398
3398
  const [canvasSize, setCanvasSize] = react.useState({
3399
- width: chunkIJVDNQLG_js.DEFAULT_CANVAS_WIDTH,
3400
- height: chunkIJVDNQLG_js.DEFAULT_CANVAS_HEIGHT
3399
+ width: chunkMM5RMRSP_js.DEFAULT_CANVAS_WIDTH,
3400
+ height: chunkMM5RMRSP_js.DEFAULT_CANVAS_HEIGHT
3401
3401
  });
3402
3402
  const [activeSlideIndex, setActiveSlideIndex] = react.useState(0);
3403
3403
  const [selectedElementId, setSelectedElementId] = react.useState(null);
@@ -3417,7 +3417,7 @@ function useViewerCoreState(_input) {
3417
3417
  const resolved = typeof value === "function" ? value(inlineEditingTextRef.current) : value;
3418
3418
  inlineEditingTextRef.current = resolved;
3419
3419
  setInlineEditingTextBase(value);
3420
- chunkH74UXL4Q_js.publishLiveInlineText(
3420
+ chunkHMQVOPQH_js.publishLiveInlineText(
3421
3421
  livePatcher,
3422
3422
  slidesRef.current[activeSlideIndexRef.current],
3423
3423
  inlineEditingElementIdRef.current,
@@ -3586,6 +3586,7 @@ function useViewerUIState() {
3586
3586
  const [sidebarPanelMode, setSidebarPanelMode] = react.useState("properties");
3587
3587
  const [showSlideSorter, setShowSlideSorter] = react.useState(false);
3588
3588
  const [showReadingView, setShowReadingView] = react.useState(false);
3589
+ const [showOutlineView, setShowOutlineView] = react.useState(false);
3589
3590
  const [isShortcutHelpOpen, setIsShortcutHelpOpen] = react.useState(false);
3590
3591
  const [isAccessibilityPanelOpen, setIsAccessibilityPanelOpen] = react.useState(false);
3591
3592
  const [accessibilityIssues, setAccessibilityIssues] = react.useState([]);
@@ -3634,6 +3635,8 @@ function useViewerUIState() {
3634
3635
  setShowSlideSorter,
3635
3636
  showReadingView,
3636
3637
  setShowReadingView,
3638
+ showOutlineView,
3639
+ setShowOutlineView,
3637
3640
  isShortcutHelpOpen,
3638
3641
  setIsShortcutHelpOpen,
3639
3642
  isAccessibilityPanelOpen,
@@ -3748,7 +3751,7 @@ function useLoadContent({
3748
3751
  );
3749
3752
  }
3750
3753
  const previousHandler = handlerRef.current;
3751
- const handler = new chunkH74UXL4Q_js.PptxHandler();
3754
+ const handler = new chunkHMQVOPQH_js.PptxHandler();
3752
3755
  const parsed = await handler.load(buffer);
3753
3756
  if (cancelled || token !== renderTokenRef.current) {
3754
3757
  handler.dispose();
@@ -3760,7 +3763,7 @@ function useLoadContent({
3760
3763
  handlerRef.current = null;
3761
3764
  const mediaElements = [];
3762
3765
  for (const slide of parsed.slides) {
3763
- chunkH74UXL4Q_js.collectMediaElements(slide.elements, mediaElements);
3766
+ chunkHMQVOPQH_js.collectMediaElements(slide.elements, mediaElements);
3764
3767
  }
3765
3768
  for (const url of mediaDataUrls.values()) {
3766
3769
  if (url.startsWith("blob:")) {
@@ -3801,7 +3804,7 @@ function useLoadContent({
3801
3804
  }
3802
3805
  })
3803
3806
  );
3804
- const { paths: imagePaths, refs: imageRefs } = chunkH74UXL4Q_js.collectImagePaths(parsed.slides);
3807
+ const { paths: imagePaths, refs: imageRefs } = chunkHMQVOPQH_js.collectImagePaths(parsed.slides);
3805
3808
  let nextSlides = parsed.slides;
3806
3809
  if (imagePaths.size > 0) {
3807
3810
  const resolvedMap = /* @__PURE__ */ new Map();
@@ -3856,12 +3859,12 @@ function useLoadContent({
3856
3859
  }
3857
3860
  }
3858
3861
  handlerRef.current = handler;
3859
- const partition = chunkIJVDNQLG_js.partitionTemplateElements(nextSlides);
3862
+ const partition = chunkMM5RMRSP_js.partitionTemplateElements(nextSlides);
3860
3863
  setSlides(partition.slides);
3861
3864
  setTemplateElementsBySlideId(partition.templateElementsBySlideId);
3862
3865
  setCanvasSize({
3863
- width: parsed.width ?? chunkIJVDNQLG_js.DEFAULT_CANVAS_WIDTH,
3864
- height: parsed.height ?? chunkIJVDNQLG_js.DEFAULT_CANVAS_HEIGHT
3866
+ width: parsed.width ?? chunkMM5RMRSP_js.DEFAULT_CANVAS_WIDTH,
3867
+ height: parsed.height ?? chunkMM5RMRSP_js.DEFAULT_CANVAS_HEIGHT
3865
3868
  });
3866
3869
  setHeaderFooter(parsed.headerFooter ?? {});
3867
3870
  setLayoutOptions(parsed.layoutOptions ?? []);
@@ -3890,7 +3893,7 @@ function useLoadContent({
3890
3893
  setHasMacros(parsed.hasMacros === true);
3891
3894
  setHasDigitalSignatures(parsed.hasDigitalSignatures === true);
3892
3895
  setDigitalSignatureCount(parsed.digitalSignatureCount ?? 0);
3893
- setGuides(chunkH74UXL4Q_js.buildInitialGuides(parsed.presentationGuides, parsed.slides[0]?.guides));
3896
+ setGuides(chunkHMQVOPQH_js.buildInitialGuides(parsed.presentationGuides, parsed.slides[0]?.guides));
3894
3897
  setActiveSlideIndex(0);
3895
3898
  clearSelection();
3896
3899
  setIsDirty(false);
@@ -3898,7 +3901,7 @@ function useLoadContent({
3898
3901
  onContentApplied?.();
3899
3902
  } catch (err) {
3900
3903
  if (!cancelled && token === renderTokenRef.current) {
3901
- if (err instanceof chunkH74UXL4Q_js.EncryptedFileError) {
3904
+ if (err instanceof chunkHMQVOPQH_js.EncryptedFileError) {
3902
3905
  setIsEncrypted(true);
3903
3906
  } else {
3904
3907
  setError(err instanceof Error ? err.message : String(err));
@@ -3975,7 +3978,7 @@ function useAutosave(input) {
3975
3978
  isSavingRef.current = false;
3976
3979
  return;
3977
3980
  }
3978
- await chunkH74UXL4Q_js.saveAutosaveSnapshot(filePathRef.current, data);
3981
+ await chunkHMQVOPQH_js.saveAutosaveSnapshot(filePathRef.current, data);
3979
3982
  setAutosaveStatus({ state: "saved", timestamp: Date.now() });
3980
3983
  } catch (err) {
3981
3984
  setAutosaveStatus({
@@ -4040,7 +4043,7 @@ function useElementOperations(input) {
4040
4043
  }, [applySelection, setInlineEditingElementId, setContextMenuState]);
4041
4044
  const updateElementById = react.useCallback(
4042
4045
  (elementId, updates) => {
4043
- if (chunkH74UXL4Q_js.isTemplateElementId(elementId)) {
4046
+ if (chunkHMQVOPQH_js.isTemplateElementId(elementId)) {
4044
4047
  const slideId = activeSlide?.id;
4045
4048
  if (slideId) {
4046
4049
  setTemplateElementsBySlideId((prev) => ({
@@ -4080,7 +4083,7 @@ function useElementOperations(input) {
4080
4083
  );
4081
4084
  const updateSelectedShapeStyle = react.useCallback(
4082
4085
  (updates) => {
4083
- if (!selectedElement || !chunkH74UXL4Q_js.hasShapeProperties(selectedElement)) {
4086
+ if (!selectedElement || !chunkHMQVOPQH_js.hasShapeProperties(selectedElement)) {
4084
4087
  return;
4085
4088
  }
4086
4089
  updateSelectedElement({
@@ -4091,17 +4094,17 @@ function useElementOperations(input) {
4091
4094
  );
4092
4095
  const updateSelectedTextStyle = react.useCallback(
4093
4096
  (updates) => {
4094
- if (!selectedElement || !chunkH74UXL4Q_js.hasTextProperties(selectedElement)) {
4097
+ if (!selectedElement || !chunkHMQVOPQH_js.hasTextProperties(selectedElement)) {
4095
4098
  return;
4096
4099
  }
4097
- const inlineSel = chunkH74UXL4Q_js.getInlineEditorSelection(selectedElement.textSegments);
4100
+ const inlineSel = chunkHMQVOPQH_js.getInlineEditorSelection(selectedElement.textSegments);
4098
4101
  if (inlineSel && selectedElement.textSegments) {
4099
- const { newSegments: newSegments2, newSelection } = chunkH74UXL4Q_js.applyStyleToSelectedSegments(
4102
+ const { newSegments: newSegments2, newSelection } = chunkHMQVOPQH_js.applyStyleToSelectedSegments(
4100
4103
  selectedElement.textSegments,
4101
4104
  inlineSel,
4102
4105
  updates
4103
4106
  );
4104
- chunkH74UXL4Q_js.setPendingSelectionRestore(newSelection);
4107
+ chunkHMQVOPQH_js.setPendingSelectionRestore(newSelection);
4105
4108
  updateSelectedElement({
4106
4109
  textSegments: newSegments2
4107
4110
  });
@@ -4121,12 +4124,12 @@ function useElementOperations(input) {
4121
4124
  );
4122
4125
  const updateSelectedTextCase = react.useCallback(
4123
4126
  (mode) => {
4124
- if (!selectedElement || !chunkH74UXL4Q_js.hasTextProperties(selectedElement)) {
4127
+ if (!selectedElement || !chunkHMQVOPQH_js.hasTextProperties(selectedElement)) {
4125
4128
  return;
4126
4129
  }
4127
- const inlineSel = chunkH74UXL4Q_js.getInlineEditorSelection(selectedElement.textSegments);
4130
+ const inlineSel = chunkHMQVOPQH_js.getInlineEditorSelection(selectedElement.textSegments);
4128
4131
  if (inlineSel && selectedElement.textSegments) {
4129
- const newSegments = chunkH74UXL4Q_js.applyCaseTransformToSegments(
4132
+ const newSegments = chunkHMQVOPQH_js.applyCaseTransformToSegments(
4130
4133
  selectedElement.textSegments,
4131
4134
  inlineSel,
4132
4135
  mode
@@ -4136,14 +4139,14 @@ function useElementOperations(input) {
4136
4139
  }
4137
4140
  const updates = {};
4138
4141
  if (selectedElement.textSegments && selectedElement.textSegments.length > 0) {
4139
- updates.textSegments = chunkH74UXL4Q_js.applyCaseTransformToSegments(
4142
+ updates.textSegments = chunkHMQVOPQH_js.applyCaseTransformToSegments(
4140
4143
  selectedElement.textSegments,
4141
4144
  null,
4142
4145
  mode
4143
4146
  );
4144
4147
  }
4145
4148
  if (typeof selectedElement.text === "string") {
4146
- updates.text = chunkH74UXL4Q_js.transformTextCase(selectedElement.text, mode);
4149
+ updates.text = chunkHMQVOPQH_js.transformTextCase(selectedElement.text, mode);
4147
4150
  }
4148
4151
  updateSelectedElement(updates);
4149
4152
  },
@@ -4198,7 +4201,7 @@ function useSectionOperations(input) {
4198
4201
  const { sections, setSections, slides, setSlides, markDirty } = input;
4199
4202
  const addSection2 = react.useCallback(
4200
4203
  (name, afterSlideIndex) => {
4201
- const result = chunkH74UXL4Q_js.addSection(sections, slides, name, afterSlideIndex);
4204
+ const result = chunkHMQVOPQH_js.addSection(sections, slides, name, afterSlideIndex);
4202
4205
  setSlides(result.slides);
4203
4206
  setSections(result.sections);
4204
4207
  markDirty();
@@ -4207,7 +4210,7 @@ function useSectionOperations(input) {
4207
4210
  );
4208
4211
  const renameSection2 = react.useCallback(
4209
4212
  (sectionId, newName) => {
4210
- const result = chunkH74UXL4Q_js.renameSection(sections, slides, sectionId, newName);
4213
+ const result = chunkHMQVOPQH_js.renameSection(sections, slides, sectionId, newName);
4211
4214
  setSections(result.sections);
4212
4215
  setSlides(result.slides);
4213
4216
  markDirty();
@@ -4216,7 +4219,7 @@ function useSectionOperations(input) {
4216
4219
  );
4217
4220
  const deleteSection2 = react.useCallback(
4218
4221
  (sectionId) => {
4219
- const result = chunkH74UXL4Q_js.deleteSection(sections, slides, sectionId);
4222
+ const result = chunkHMQVOPQH_js.deleteSection(sections, slides, sectionId);
4220
4223
  setSections(result.sections);
4221
4224
  setSlides(result.slides);
4222
4225
  markDirty();
@@ -4225,21 +4228,21 @@ function useSectionOperations(input) {
4225
4228
  );
4226
4229
  const moveSectionUp2 = react.useCallback(
4227
4230
  (sectionId) => {
4228
- setSections(chunkH74UXL4Q_js.moveSectionUp(sections, sectionId));
4231
+ setSections(chunkHMQVOPQH_js.moveSectionUp(sections, sectionId));
4229
4232
  markDirty();
4230
4233
  },
4231
4234
  [sections, setSections, markDirty]
4232
4235
  );
4233
4236
  const moveSectionDown2 = react.useCallback(
4234
4237
  (sectionId) => {
4235
- setSections(chunkH74UXL4Q_js.moveSectionDown(sections, sectionId));
4238
+ setSections(chunkHMQVOPQH_js.moveSectionDown(sections, sectionId));
4236
4239
  markDirty();
4237
4240
  },
4238
4241
  [sections, setSections, markDirty]
4239
4242
  );
4240
4243
  const moveSlidesToSection2 = react.useCallback(
4241
4244
  (slideIndexes, targetSectionId) => {
4242
- const result = chunkH74UXL4Q_js.moveSlidesToSection(sections, slides, slideIndexes, targetSectionId);
4245
+ const result = chunkHMQVOPQH_js.moveSlidesToSection(sections, slides, slideIndexes, targetSectionId);
4243
4246
  setSlides(result.slides);
4244
4247
  setSections(result.sections);
4245
4248
  markDirty();
@@ -4258,19 +4261,19 @@ function useSectionOperations(input) {
4258
4261
 
4259
4262
  // src/viewer/hooks/pointer-move-handlers.ts
4260
4263
  function computeResizeGeometry(handle, startX, startY, startWidth, startHeight, dx, dy, snapToGrid, gridSpacingPx) {
4261
- const resized = chunkH74UXL4Q_js.applyResize(
4264
+ const resized = chunkHMQVOPQH_js.applyResize(
4262
4265
  { x: startX, y: startY, width: startWidth, height: startHeight },
4263
4266
  handle,
4264
4267
  dx,
4265
4268
  dy,
4266
4269
  1,
4267
- { minSize: chunkIJVDNQLG_js.MIN_ELEMENT_SIZE }
4270
+ { minSize: chunkMM5RMRSP_js.MIN_ELEMENT_SIZE }
4268
4271
  );
4269
4272
  const box = { x: resized.x, y: resized.y, width: resized.width, height: resized.height };
4270
4273
  if (!snapToGrid) {
4271
4274
  return box;
4272
4275
  }
4273
- return chunkH74UXL4Q_js.snapBoxToGrid(box, handle, gridSpacingPx, chunkIJVDNQLG_js.MIN_ELEMENT_SIZE);
4276
+ return chunkHMQVOPQH_js.snapBoxToGrid(box, handle, gridSpacingPx, chunkMM5RMRSP_js.MIN_ELEMENT_SIZE);
4274
4277
  }
4275
4278
  function computeAdjustmentValue(startAdjustment, dx, startWidth) {
4276
4279
  const range = startWidth || 200;
@@ -4388,7 +4391,7 @@ function processDragMove(e, drag, editorScale, snapToGrid, snapToShape, gridSpac
4388
4391
  width: el.width,
4389
4392
  height: el.height
4390
4393
  }));
4391
- const snapResult = chunkH74UXL4Q_js.computeSnapToShape(
4394
+ const snapResult = chunkHMQVOPQH_js.computeSnapToShape(
4392
4395
  targetX,
4393
4396
  targetY,
4394
4397
  primaryEl.width,
@@ -4427,7 +4430,7 @@ function processDragMove(e, drag, editorScale, snapToGrid, snapToShape, gridSpac
4427
4430
  if (live) {
4428
4431
  for (const id of Object.keys(drag.startPositionsById)) {
4429
4432
  const start = drag.startPositionsById[id];
4430
- chunkH74UXL4Q_js.publishLiveGeometry(live.patcher, live.slideId, id, {
4433
+ chunkHMQVOPQH_js.publishLiveGeometry(live.patcher, live.slideId, id, {
4431
4434
  x: start.x + appliedDx,
4432
4435
  y: start.y + appliedDy
4433
4436
  });
@@ -4461,15 +4464,15 @@ function processResizeMove(e, rs, editorScale, snapToGrid, gridSpacingPx, live)
4461
4464
  if (rs.domEl) {
4462
4465
  rs.domEl.style.left = `${geo.x}px`;
4463
4466
  rs.domEl.style.top = `${geo.y}px`;
4464
- rs.domEl.style.width = `${Math.max(geo.width, chunkIJVDNQLG_js.MIN_ELEMENT_SIZE)}px`;
4465
- rs.domEl.style.height = `${Math.max(geo.height, chunkIJVDNQLG_js.MIN_ELEMENT_SIZE)}px`;
4467
+ rs.domEl.style.width = `${Math.max(geo.width, chunkMM5RMRSP_js.MIN_ELEMENT_SIZE)}px`;
4468
+ rs.domEl.style.height = `${Math.max(geo.height, chunkMM5RMRSP_js.MIN_ELEMENT_SIZE)}px`;
4466
4469
  }
4467
4470
  if (live) {
4468
- chunkH74UXL4Q_js.publishLiveGeometry(live.patcher, live.slideId, rs.elementId, {
4471
+ chunkHMQVOPQH_js.publishLiveGeometry(live.patcher, live.slideId, rs.elementId, {
4469
4472
  x: geo.x,
4470
4473
  y: geo.y,
4471
- width: Math.max(geo.width, chunkIJVDNQLG_js.MIN_ELEMENT_SIZE),
4472
- height: Math.max(geo.height, chunkIJVDNQLG_js.MIN_ELEMENT_SIZE)
4474
+ width: Math.max(geo.width, chunkMM5RMRSP_js.MIN_ELEMENT_SIZE),
4475
+ height: Math.max(geo.height, chunkMM5RMRSP_js.MIN_ELEMENT_SIZE)
4473
4476
  });
4474
4477
  }
4475
4478
  }
@@ -4549,13 +4552,13 @@ function processPointerUp(input) {
4549
4552
  if (i !== activeSlideIndex) {
4550
4553
  return s;
4551
4554
  }
4552
- const rerouted = chunkH74UXL4Q_js.rerouteConnectorsForMovedElements(s.elements, movedIds);
4555
+ const rerouted = chunkHMQVOPQH_js.rerouteConnectorsForMovedElements(s.elements, movedIds);
4553
4556
  if (rerouted.length === 0) {
4554
4557
  return s;
4555
4558
  }
4556
4559
  return {
4557
4560
  ...s,
4558
- elements: chunkH74UXL4Q_js.applyReroutedConnectors(s.elements, rerouted)
4561
+ elements: chunkHMQVOPQH_js.applyReroutedConnectors(s.elements, rerouted)
4559
4562
  };
4560
4563
  })
4561
4564
  );
@@ -4577,9 +4580,9 @@ function processPointerUp(input) {
4577
4580
  }
4578
4581
  function commitMarquee(marquee, editTemplateMode, templateElements, activeSlide, applySelection, clearSelection) {
4579
4582
  const sourceElements = editTemplateMode ? templateElements : activeSlide?.elements ?? [];
4580
- const hitIds = chunkH74UXL4Q_js.computeMarqueeHitIds(marquee, sourceElements);
4583
+ const hitIds = chunkHMQVOPQH_js.computeMarqueeHitIds(marquee, sourceElements);
4581
4584
  if (marquee.additive) {
4582
- const merged = chunkH74UXL4Q_js.mergeAdditiveSelection(marquee.baseSelectionIds, hitIds);
4585
+ const merged = chunkHMQVOPQH_js.mergeAdditiveSelection(marquee.baseSelectionIds, hitIds);
4583
4586
  if (merged.length > 0) {
4584
4587
  applySelection(merged[0], merged);
4585
4588
  } else {
@@ -4602,8 +4605,8 @@ function commitDrag(drag, editTemplateMode, activeSlide, activeSlideIndex, setTe
4602
4605
  }
4603
4606
  return { ...el, x: start.x + dx, y: start.y + dy };
4604
4607
  });
4605
- const rerouted = chunkH74UXL4Q_js.rerouteConnectorsForMovedElements(movedElements, movedIds);
4606
- return chunkH74UXL4Q_js.applyReroutedConnectors(movedElements, rerouted);
4608
+ const rerouted = chunkHMQVOPQH_js.rerouteConnectorsForMovedElements(movedElements, movedIds);
4609
+ return chunkHMQVOPQH_js.applyReroutedConnectors(movedElements, rerouted);
4607
4610
  };
4608
4611
  if (editTemplateMode) {
4609
4612
  const slideId = activeSlide?.id;
@@ -4759,9 +4762,9 @@ function useCanvasInteractions(input) {
4759
4762
  return;
4760
4763
  }
4761
4764
  const el = elementLookup.get(editId);
4762
- if (el && chunkH74UXL4Q_js.hasTextProperties(el)) {
4765
+ if (el && chunkHMQVOPQH_js.hasTextProperties(el)) {
4763
4766
  const committedText = transformCommittedText ? transformCommittedText(inlineEditingText) : inlineEditingText;
4764
- const newSegments = chunkH74UXL4Q_js.remapTextToSegments(committedText, el.textSegments, el.textStyle);
4767
+ const newSegments = chunkHMQVOPQH_js.remapTextToSegments(committedText, el.textSegments, el.textStyle);
4765
4768
  ops.updateElementById(editId, {
4766
4769
  text: committedText,
4767
4770
  textSegments: newSegments
@@ -4772,7 +4775,7 @@ function useCanvasInteractions(input) {
4772
4775
  setInlineEditingText("");
4773
4776
  };
4774
4777
  const openEquationEditorForElement = (el) => {
4775
- if (!chunkH74UXL4Q_js.hasTextProperties(el)) {
4778
+ if (!chunkHMQVOPQH_js.hasTextProperties(el)) {
4776
4779
  return false;
4777
4780
  }
4778
4781
  const eqSeg = el.textSegments?.find((seg) => seg.equationXml);
@@ -4801,7 +4804,7 @@ function useCanvasInteractions(input) {
4801
4804
  justSelectedRef.current = false;
4802
4805
  } else {
4803
4806
  const el = elementLookup.get(elementId);
4804
- if (el && chunkH74UXL4Q_js.hasTextProperties(el) && !el.locks?.noTextEdit) {
4807
+ if (el && chunkHMQVOPQH_js.hasTextProperties(el) && !el.locks?.noTextEdit) {
4805
4808
  if (!openEquationEditorForElement(el)) {
4806
4809
  setInlineEditingElementId(elementId);
4807
4810
  setInlineEditingText(el.text ?? "");
@@ -4820,7 +4823,7 @@ function useCanvasInteractions(input) {
4820
4823
  if (openEquationEditorForElement(el)) {
4821
4824
  return;
4822
4825
  }
4823
- if (chunkH74UXL4Q_js.hasTextProperties(el)) {
4826
+ if (chunkHMQVOPQH_js.hasTextProperties(el)) {
4824
4827
  setInlineEditingElementId(elementId);
4825
4828
  setInlineEditingText(el.text ?? "");
4826
4829
  }
@@ -5013,7 +5016,7 @@ function createFileHandlers(deps) {
5013
5016
  h = Math.round(h * scale);
5014
5017
  }
5015
5018
  addElement({
5016
- id: chunkH74UXL4Q_js.generateElementId(),
5019
+ id: chunkHMQVOPQH_js.generateElementId(),
5017
5020
  type: "image",
5018
5021
  x: Math.round((canvasSize.width - w) / 2),
5019
5022
  y: Math.round((canvasSize.height - h) / 2),
@@ -5024,7 +5027,7 @@ function createFileHandlers(deps) {
5024
5027
  };
5025
5028
  img.onerror = () => {
5026
5029
  addElement({
5027
- id: chunkH74UXL4Q_js.generateElementId(),
5030
+ id: chunkHMQVOPQH_js.generateElementId(),
5028
5031
  type: "image",
5029
5032
  x: 100,
5030
5033
  y: 100,
@@ -5050,7 +5053,7 @@ function createFileHandlers(deps) {
5050
5053
  const elFilePath = file.path;
5051
5054
  const insertMediaElement = (mediaSourceUrl, width, height) => {
5052
5055
  addElement({
5053
- id: chunkH74UXL4Q_js.generateElementId(),
5056
+ id: chunkHMQVOPQH_js.generateElementId(),
5054
5057
  type: "media",
5055
5058
  mediaType,
5056
5059
  mediaMimeType: file.type || void 0,
@@ -5225,13 +5228,13 @@ function createStructuredElementHandlers(deps) {
5225
5228
  return;
5226
5229
  }
5227
5230
  addElement({
5228
- id: chunkH74UXL4Q_js.generateElementId(),
5231
+ id: chunkHMQVOPQH_js.generateElementId(),
5229
5232
  type: "smartArt",
5230
5233
  x: 100,
5231
5234
  y: 120,
5232
5235
  width: 600,
5233
5236
  height: 340,
5234
- smartArtData: chunkH74UXL4Q_js.buildSmartArtPresetData(
5237
+ smartArtData: chunkHMQVOPQH_js.buildSmartArtPresetData(
5235
5238
  layout,
5236
5239
  defaultItems,
5237
5240
  (i) => `node-${Date.now()}-${i}-${Math.random().toString(36).slice(2, 8)}`
@@ -5243,7 +5246,7 @@ function createStructuredElementHandlers(deps) {
5243
5246
  return;
5244
5247
  }
5245
5248
  addElement({
5246
- id: chunkH74UXL4Q_js.generateElementId(),
5249
+ id: chunkHMQVOPQH_js.generateElementId(),
5247
5250
  type: "shape",
5248
5251
  x: 120,
5249
5252
  y: 200,
@@ -5302,7 +5305,7 @@ function createStructuredElementHandlers(deps) {
5302
5305
  const displayText = value || fieldTexts[fieldType] || fieldType;
5303
5306
  const fieldGuid = `{${crypto.randomUUID().toUpperCase()}}`;
5304
5307
  addElement({
5305
- id: chunkH74UXL4Q_js.generateElementId(),
5308
+ id: chunkHMQVOPQH_js.generateElementId(),
5306
5309
  type: "shape",
5307
5310
  x: 120,
5308
5311
  y: 200,
@@ -5324,11 +5327,11 @@ function createStructuredElementHandlers(deps) {
5324
5327
  if (!activeSlide) {
5325
5328
  return;
5326
5329
  }
5327
- const preset = chunkH74UXL4Q_js.ACTION_BUTTON_PRESETS.find((p) => p.shapeType === shapeType);
5330
+ const preset = chunkHMQVOPQH_js.ACTION_BUTTON_PRESETS.find((p) => p.shapeType === shapeType);
5328
5331
  if (!preset) {
5329
5332
  return;
5330
5333
  }
5331
- const defaultPptxAction = chunkH74UXL4Q_js.elementActionToPptxAction({
5334
+ const defaultPptxAction = chunkHMQVOPQH_js.elementActionToPptxAction({
5332
5335
  trigger: "click",
5333
5336
  type: preset.defaultAction
5334
5337
  });
@@ -5337,7 +5340,7 @@ function createStructuredElementHandlers(deps) {
5337
5340
  defaultPptxAction.highlightClick = true;
5338
5341
  }
5339
5342
  addElement({
5340
- id: chunkH74UXL4Q_js.generateElementId(),
5343
+ id: chunkHMQVOPQH_js.generateElementId(),
5341
5344
  type: "shape",
5342
5345
  x: 150,
5343
5346
  y: 150,
@@ -5404,14 +5407,14 @@ function useInsertElements(input) {
5404
5407
  return;
5405
5408
  }
5406
5409
  addElement({
5407
- id: chunkH74UXL4Q_js.generateElementId(),
5410
+ id: chunkHMQVOPQH_js.generateElementId(),
5408
5411
  type: "text",
5409
5412
  x: 100,
5410
5413
  y: 100,
5411
5414
  width: 300,
5412
5415
  height: 60,
5413
5416
  text: "",
5414
- textStyle: { fontSize: chunkIJVDNQLG_js.DEFAULT_TEXT_FONT_SIZE }
5417
+ textStyle: { fontSize: chunkMM5RMRSP_js.DEFAULT_TEXT_FONT_SIZE }
5415
5418
  });
5416
5419
  };
5417
5420
  const handleAddShape = () => {
@@ -5419,7 +5422,7 @@ function useInsertElements(input) {
5419
5422
  return;
5420
5423
  }
5421
5424
  addElement({
5422
- id: chunkH74UXL4Q_js.generateElementId(),
5425
+ id: chunkHMQVOPQH_js.generateElementId(),
5423
5426
  type: "shape",
5424
5427
  x: 150,
5425
5428
  y: 150,
@@ -5438,15 +5441,15 @@ function useInsertElements(input) {
5438
5441
  return;
5439
5442
  }
5440
5443
  addElement({
5441
- ...chunkH74UXL4Q_js.newTableElement(chunkIJVDNQLG_js.DEFAULT_TABLE_ROWS, chunkIJVDNQLG_js.DEFAULT_TABLE_COLUMNS, 100, 200),
5442
- id: chunkH74UXL4Q_js.generateElementId()
5444
+ ...chunkHMQVOPQH_js.newTableElement(chunkMM5RMRSP_js.DEFAULT_TABLE_ROWS, chunkMM5RMRSP_js.DEFAULT_TABLE_COLUMNS, 100, 200),
5445
+ id: chunkHMQVOPQH_js.generateElementId()
5443
5446
  });
5444
5447
  };
5445
5448
  const handleAddChart = (chartType) => {
5446
5449
  if (!activeSlide) {
5447
5450
  return;
5448
5451
  }
5449
- addElement(chunkH74UXL4Q_js.createDefaultChartElement(chartType));
5452
+ addElement(chunkHMQVOPQH_js.createDefaultChartElement(chartType));
5450
5453
  };
5451
5454
  const structured = createStructuredElementHandlers({
5452
5455
  activeSlide,
@@ -5516,7 +5519,7 @@ function useClipboardHandlers(input) {
5516
5519
  if (!selectedElement) {
5517
5520
  return;
5518
5521
  }
5519
- setClipboardPayload(chunkH74UXL4Q_js.buildElementClipboardPayload(selectedElement, editTemplateMode));
5522
+ setClipboardPayload(chunkHMQVOPQH_js.buildElementClipboardPayload(selectedElement, editTemplateMode));
5520
5523
  };
5521
5524
  const handleDelete = () => {
5522
5525
  const idsToDelete = effectiveSelectedIds;
@@ -5533,7 +5536,7 @@ function useClipboardHandlers(input) {
5533
5536
  handleDelete();
5534
5537
  };
5535
5538
  const insertClone = (source) => {
5536
- const clone = chunkH74UXL4Q_js.cloneElementForPaste(source, { intoTemplate: editTemplateMode });
5539
+ const clone = chunkHMQVOPQH_js.cloneElementForPaste(source, { intoTemplate: editTemplateMode });
5537
5540
  ops.updateActiveElements((els) => [...els, clone]);
5538
5541
  ops.applySelection(clone.id);
5539
5542
  history.markDirty();
@@ -5568,7 +5571,7 @@ function resolveShapePath(el) {
5568
5571
  return el.pathData;
5569
5572
  }
5570
5573
  if ("shapeType" in el && typeof el.shapeType === "string") {
5571
- const clipPath = chunkH74UXL4Q_js.getPresetShapeClipPath(el.shapeType);
5574
+ const clipPath = chunkHMQVOPQH_js.getPresetShapeClipPath(el.shapeType);
5572
5575
  if (clipPath) {
5573
5576
  const svgPath = clipPathToSvgPath(clipPath, el.width, el.height);
5574
5577
  if (svgPath) {
@@ -5619,7 +5622,7 @@ function clipPathToSvgPath(clipPath, width, height) {
5619
5622
  return parts.join(" ");
5620
5623
  }
5621
5624
  function transformPathToGlobal(pathData, el) {
5622
- const polys = chunkH74UXL4Q_js.svgPathToPolygons(pathData);
5625
+ const polys = chunkHMQVOPQH_js.svgPathToPolygons(pathData);
5623
5626
  if (polys.length === 0) {
5624
5627
  return pathData;
5625
5628
  }
@@ -5639,10 +5642,10 @@ function transformPathToGlobal(pathData, el) {
5639
5642
  y: pt.y * scaleY + el.y
5640
5643
  }))
5641
5644
  );
5642
- return chunkH74UXL4Q_js.polygonsToSvgPath(transformed);
5645
+ return chunkHMQVOPQH_js.polygonsToSvgPath(transformed);
5643
5646
  }
5644
5647
  function transformPathToLocal(pathData, x, y, _width, _height) {
5645
- const polys = chunkH74UXL4Q_js.svgPathToPolygons(pathData);
5648
+ const polys = chunkHMQVOPQH_js.svgPathToPolygons(pathData);
5646
5649
  if (polys.length === 0) {
5647
5650
  return pathData;
5648
5651
  }
@@ -5652,10 +5655,10 @@ function transformPathToLocal(pathData, x, y, _width, _height) {
5652
5655
  y: pt.y - y
5653
5656
  }))
5654
5657
  );
5655
- return chunkH74UXL4Q_js.polygonsToSvgPath(transformed);
5658
+ return chunkHMQVOPQH_js.polygonsToSvgPath(transformed);
5656
5659
  }
5657
5660
  function pathBounds(pathData) {
5658
- const polys = chunkH74UXL4Q_js.svgPathToPolygons(pathData);
5661
+ const polys = chunkHMQVOPQH_js.svgPathToPolygons(pathData);
5659
5662
  let minX = Infinity;
5660
5663
  let minY = Infinity;
5661
5664
  let maxX = -Infinity;
@@ -5714,7 +5717,7 @@ function useMergeShapesHandler(input) {
5714
5717
  let allFragments = [];
5715
5718
  let remaining = globalPaths[0];
5716
5719
  for (let i = 1; i < globalPaths.length; i++) {
5717
- const frags = chunkH74UXL4Q_js.mergeShapes("fragment", remaining, globalPaths[i]);
5720
+ const frags = chunkHMQVOPQH_js.mergeShapes("fragment", remaining, globalPaths[i]);
5718
5721
  if (Array.isArray(frags)) {
5719
5722
  allFragments = frags;
5720
5723
  }
@@ -5743,7 +5746,7 @@ function useMergeShapesHandler(input) {
5743
5746
  bounds.height
5744
5747
  );
5745
5748
  const newEl = {
5746
- id: chunkH74UXL4Q_js.generateElementId(),
5749
+ id: chunkHMQVOPQH_js.generateElementId(),
5747
5750
  type: "shape",
5748
5751
  x: bounds.x,
5749
5752
  y: bounds.y,
@@ -5781,7 +5784,7 @@ function useMergeShapesHandler(input) {
5781
5784
  } else {
5782
5785
  let resultPath = globalPaths[0];
5783
5786
  for (let i = 1; i < globalPaths.length; i++) {
5784
- const result = chunkH74UXL4Q_js.mergeShapes(operation, resultPath, globalPaths[i]);
5787
+ const result = chunkHMQVOPQH_js.mergeShapes(operation, resultPath, globalPaths[i]);
5785
5788
  if (typeof result === "string") {
5786
5789
  resultPath = result;
5787
5790
  }
@@ -5802,7 +5805,7 @@ function useMergeShapesHandler(input) {
5802
5805
  );
5803
5806
  const primary = targets[0];
5804
5807
  const newEl = {
5805
- id: chunkH74UXL4Q_js.generateElementId(),
5808
+ id: chunkHMQVOPQH_js.generateElementId(),
5806
5809
  type: "shape",
5807
5810
  x: bounds.x,
5808
5811
  y: bounds.y,
@@ -5865,7 +5868,7 @@ function useGroupAlignLayerHandlers(input) {
5865
5868
  if (ids.length < 2 || !activeSlide) {
5866
5869
  return;
5867
5870
  }
5868
- const { elements, groupId } = chunkH74UXL4Q_js.groupElements(ops.activeElements, ids, chunkH74UXL4Q_js.generateElementId());
5871
+ const { elements, groupId } = chunkHMQVOPQH_js.groupElements(ops.activeElements, ids, chunkHMQVOPQH_js.generateElementId());
5869
5872
  if (groupId === null) {
5870
5873
  return;
5871
5874
  }
@@ -5878,12 +5881,12 @@ function useGroupAlignLayerHandlers(input) {
5878
5881
  return;
5879
5882
  }
5880
5883
  const group = selectedElement;
5881
- const intoTemplate = chunkH74UXL4Q_js.isTemplateElementId(group.id);
5884
+ const intoTemplate = chunkHMQVOPQH_js.isTemplateElementId(group.id);
5882
5885
  const ungrouped = group.children.map((child) => ({
5883
5886
  ...structuredClone(child),
5884
5887
  // Keep child ids in the same store as the group so later edits route
5885
5888
  // correctly: template groups yield template-prefixed child ids.
5886
- id: intoTemplate ? chunkH74UXL4Q_js.makeCloneId(true, child.id || group.id) : child.id || chunkH74UXL4Q_js.generateElementId(),
5889
+ id: intoTemplate ? chunkHMQVOPQH_js.makeCloneId(true, child.id || group.id) : child.id || chunkHMQVOPQH_js.generateElementId(),
5887
5890
  x: child.x + group.x,
5888
5891
  y: child.y + group.y
5889
5892
  }));
@@ -5907,7 +5910,7 @@ function useGroupAlignLayerHandlers(input) {
5907
5910
  if (!edge) {
5908
5911
  return;
5909
5912
  }
5910
- const positions = chunkH74UXL4Q_js.alignElements(selectedElements, edge);
5913
+ const positions = chunkHMQVOPQH_js.alignElements(selectedElements, edge);
5911
5914
  for (const [id, pos] of positions) {
5912
5915
  const el = elementLookup.get(id);
5913
5916
  if (!el) {
@@ -5925,7 +5928,7 @@ function useGroupAlignLayerHandlers(input) {
5925
5928
  if (!distAxis) {
5926
5929
  return;
5927
5930
  }
5928
- const positions = chunkH74UXL4Q_js.distributeElements(selectedElements, distAxis);
5931
+ const positions = chunkHMQVOPQH_js.distributeElements(selectedElements, distAxis);
5929
5932
  for (const [id, pos] of positions) {
5930
5933
  const el = elementLookup.get(id);
5931
5934
  if (!el) {
@@ -5942,7 +5945,7 @@ function useGroupAlignLayerHandlers(input) {
5942
5945
  }
5943
5946
  const id = selectedElement.id;
5944
5947
  ops.updateActiveElements(
5945
- (els) => direction === "forward" ? chunkH74UXL4Q_js.bringForward(els, id) : direction === "backward" ? chunkH74UXL4Q_js.sendBackward(els, id) : els
5948
+ (els) => direction === "forward" ? chunkHMQVOPQH_js.bringForward(els, id) : direction === "backward" ? chunkHMQVOPQH_js.sendBackward(els, id) : els
5946
5949
  );
5947
5950
  history.markDirty();
5948
5951
  };
@@ -5952,7 +5955,7 @@ function useGroupAlignLayerHandlers(input) {
5952
5955
  }
5953
5956
  const id = selectedElement.id;
5954
5957
  ops.updateActiveElements(
5955
- (els) => direction === "front" ? chunkH74UXL4Q_js.bringToFront(els, id) : chunkH74UXL4Q_js.sendToBack(els, id)
5958
+ (els) => direction === "front" ? chunkHMQVOPQH_js.bringToFront(els, id) : chunkHMQVOPQH_js.sendToBack(els, id)
5956
5959
  );
5957
5960
  history.markDirty();
5958
5961
  };
@@ -6074,7 +6077,7 @@ function insertSlideFromLayoutUpdater(slides, activeIndex, draft) {
6074
6077
  function useSlideManagement(input) {
6075
6078
  const { slides, activeSlideIndex, setActiveSlideIndex, ops, history, handlerRef } = input;
6076
6079
  const handleAddSlide = () => {
6077
- const newSlide = chunkH74UXL4Q_js.createBlankSlide(slides.length + 1);
6080
+ const newSlide = chunkHMQVOPQH_js.createBlankSlide(slides.length + 1);
6078
6081
  ops.updateSlides((prev) => {
6079
6082
  const next = [...prev];
6080
6083
  next.splice(activeSlideIndex + 1, 0, newSlide);
@@ -6137,7 +6140,7 @@ function useSlideManagement(input) {
6137
6140
  }
6138
6141
  const clone = {
6139
6142
  ...src,
6140
- id: chunkH74UXL4Q_js.makeSlideId(),
6143
+ id: chunkHMQVOPQH_js.makeSlideId(),
6141
6144
  elements: src.elements.map((el) => ({
6142
6145
  ...el,
6143
6146
  id: `${el.id}-dup-${Math.random().toString(36).slice(2, 6)}`
@@ -6169,7 +6172,7 @@ function useSlideManagement(input) {
6169
6172
  const handleInsertSlideFromLayout = (layoutPath, layoutName) => {
6170
6173
  const insertAt = activeSlideIndex + 1;
6171
6174
  const draft = {
6172
- ...chunkH74UXL4Q_js.createBlankSlide(slides.length + 1),
6175
+ ...chunkHMQVOPQH_js.createBlankSlide(slides.length + 1),
6173
6176
  layoutPath,
6174
6177
  ...layoutName ? { layoutName } : {}
6175
6178
  };
@@ -6230,7 +6233,7 @@ function createTableMergeHandlers(input) {
6230
6233
  if (!nextCell || nextCell.hMerge || nextCell.vMerge) {
6231
6234
  return;
6232
6235
  }
6233
- const newTableData = chunkH74UXL4Q_js.mergeCells(
6236
+ const newTableData = chunkHMQVOPQH_js.mergeCells(
6234
6237
  [
6235
6238
  { row: rowIndex, col: columnIndex },
6236
6239
  { row: rowIndex, col: nextColIdx }
@@ -6238,7 +6241,7 @@ function createTableMergeHandlers(input) {
6238
6241
  td
6239
6242
  );
6240
6243
  const updates = { tableData: newTableData };
6241
- const newRawXml = chunkH74UXL4Q_js.updateMergeAttrsInRawXml(selectedElement, newTableData);
6244
+ const newRawXml = chunkHMQVOPQH_js.updateMergeAttrsInRawXml(selectedElement, newTableData);
6242
6245
  if (newRawXml) {
6243
6246
  updates.rawXml = newRawXml;
6244
6247
  }
@@ -6264,7 +6267,7 @@ function createTableMergeHandlers(input) {
6264
6267
  if (!targetNextCell || targetNextCell.hMerge || targetNextCell.vMerge) {
6265
6268
  return;
6266
6269
  }
6267
- const newTableData = chunkH74UXL4Q_js.mergeCells(
6270
+ const newTableData = chunkHMQVOPQH_js.mergeCells(
6268
6271
  [
6269
6272
  { row: rowIndex, col: columnIndex },
6270
6273
  { row: targetNextRowIdx, col: columnIndex }
@@ -6272,7 +6275,7 @@ function createTableMergeHandlers(input) {
6272
6275
  td
6273
6276
  );
6274
6277
  const updates = { tableData: newTableData };
6275
- const newRawXml = chunkH74UXL4Q_js.updateMergeAttrsInRawXml(selectedElement, newTableData);
6278
+ const newRawXml = chunkHMQVOPQH_js.updateMergeAttrsInRawXml(selectedElement, newTableData);
6276
6279
  if (newRawXml) {
6277
6280
  updates.rawXml = newRawXml;
6278
6281
  }
@@ -6287,9 +6290,9 @@ function createTableMergeHandlers(input) {
6287
6290
  return;
6288
6291
  }
6289
6292
  const td = selectedElement.tableData;
6290
- const newTableData = chunkH74UXL4Q_js.mergeCells(ts.selectedCells, td);
6293
+ const newTableData = chunkHMQVOPQH_js.mergeCells(ts.selectedCells, td);
6291
6294
  const updates = { tableData: newTableData };
6292
- const newRawXml = chunkH74UXL4Q_js.updateMergeAttrsInRawXml(selectedElement, newTableData);
6295
+ const newRawXml = chunkHMQVOPQH_js.updateMergeAttrsInRawXml(selectedElement, newTableData);
6293
6296
  if (newRawXml) {
6294
6297
  updates.rawXml = newRawXml;
6295
6298
  }
@@ -6306,9 +6309,9 @@ function createTableMergeHandlers(input) {
6306
6309
  }
6307
6310
  const { rowIndex, columnIndex } = ts;
6308
6311
  const td = selectedElement.tableData;
6309
- const newTableData = chunkH74UXL4Q_js.splitCell(rowIndex, columnIndex, td);
6312
+ const newTableData = chunkHMQVOPQH_js.splitCell(rowIndex, columnIndex, td);
6310
6313
  const updates = { tableData: newTableData };
6311
- const newRawXml = chunkH74UXL4Q_js.updateMergeAttrsInRawXml(selectedElement, newTableData);
6314
+ const newRawXml = chunkHMQVOPQH_js.updateMergeAttrsInRawXml(selectedElement, newTableData);
6312
6315
  if (newRawXml) {
6313
6316
  updates.rawXml = newRawXml;
6314
6317
  }
@@ -6352,7 +6355,7 @@ function createTableStructHandlers(input) {
6352
6355
  updates.tableData = { ...el.tableData, rows: newRows };
6353
6356
  }
6354
6357
  if (el.rawXml) {
6355
- const newRawXml = chunkH74UXL4Q_js.updateCellTextInRawXml(el, rowIndex, colIndex, text);
6358
+ const newRawXml = chunkHMQVOPQH_js.updateCellTextInRawXml(el, rowIndex, colIndex, text);
6356
6359
  if (newRawXml) {
6357
6360
  updates.rawXml = newRawXml;
6358
6361
  }
@@ -6376,7 +6379,7 @@ function createTableStructHandlers(input) {
6376
6379
  const { rowIndex, columnIndex: colIndex } = ts;
6377
6380
  const updates = {};
6378
6381
  if (selectedElement.rawXml) {
6379
- const newRawXml = chunkH74UXL4Q_js.updateCellTextStyleInRawXml(
6382
+ const newRawXml = chunkHMQVOPQH_js.updateCellTextStyleInRawXml(
6380
6383
  selectedElement,
6381
6384
  rowIndex,
6382
6385
  colIndex,
@@ -6440,9 +6443,9 @@ function createTableStructHandlers(input) {
6440
6443
  return;
6441
6444
  }
6442
6445
  const rowIdx = ts?.rowIndex ?? 0;
6443
- const newTableData = chunkH74UXL4Q_js.insertTableRow(selectedElement.tableData, rowIdx, position);
6446
+ const newTableData = chunkHMQVOPQH_js.insertTableRow(selectedElement.tableData, rowIdx, position);
6444
6447
  const updates = { tableData: newTableData };
6445
- const newRawXml = chunkH74UXL4Q_js.rebuildTableStructureInRawXml(selectedElement, newTableData);
6448
+ const newRawXml = chunkHMQVOPQH_js.rebuildTableStructureInRawXml(selectedElement, newTableData);
6446
6449
  if (newRawXml) {
6447
6450
  updates.rawXml = newRawXml;
6448
6451
  }
@@ -6455,12 +6458,12 @@ function createTableStructHandlers(input) {
6455
6458
  }
6456
6459
  const td = selectedElement.tableData;
6457
6460
  const rowIdx = ts?.rowIndex ?? 0;
6458
- const newTableData = chunkH74UXL4Q_js.deleteTableRow(td, rowIdx);
6461
+ const newTableData = chunkHMQVOPQH_js.deleteTableRow(td, rowIdx);
6459
6462
  if (newTableData === td) {
6460
6463
  return;
6461
6464
  }
6462
6465
  const updates = { tableData: newTableData };
6463
- const newRawXml = chunkH74UXL4Q_js.rebuildTableStructureInRawXml(selectedElement, newTableData);
6466
+ const newRawXml = chunkHMQVOPQH_js.rebuildTableStructureInRawXml(selectedElement, newTableData);
6464
6467
  if (newRawXml) {
6465
6468
  updates.rawXml = newRawXml;
6466
6469
  }
@@ -6472,9 +6475,9 @@ function createTableStructHandlers(input) {
6472
6475
  return;
6473
6476
  }
6474
6477
  const colIdx = ts?.columnIndex ?? 0;
6475
- const newTableData = chunkH74UXL4Q_js.insertTableColumn(selectedElement.tableData, colIdx, position);
6478
+ const newTableData = chunkHMQVOPQH_js.insertTableColumn(selectedElement.tableData, colIdx, position);
6476
6479
  const updates = { tableData: newTableData };
6477
- const newRawXml = chunkH74UXL4Q_js.rebuildTableStructureInRawXml(selectedElement, newTableData);
6480
+ const newRawXml = chunkHMQVOPQH_js.rebuildTableStructureInRawXml(selectedElement, newTableData);
6478
6481
  if (newRawXml) {
6479
6482
  updates.rawXml = newRawXml;
6480
6483
  }
@@ -6487,12 +6490,12 @@ function createTableStructHandlers(input) {
6487
6490
  }
6488
6491
  const td = selectedElement.tableData;
6489
6492
  const colIdx = ts?.columnIndex ?? 0;
6490
- const newTableData = chunkH74UXL4Q_js.deleteTableColumn(td, colIdx);
6493
+ const newTableData = chunkHMQVOPQH_js.deleteTableColumn(td, colIdx);
6491
6494
  if (newTableData === td) {
6492
6495
  return;
6493
6496
  }
6494
6497
  const updates = { tableData: newTableData };
6495
- const newRawXml = chunkH74UXL4Q_js.rebuildTableStructureInRawXml(selectedElement, newTableData);
6498
+ const newRawXml = chunkHMQVOPQH_js.rebuildTableStructureInRawXml(selectedElement, newTableData);
6496
6499
  if (newRawXml) {
6497
6500
  updates.rawXml = newRawXml;
6498
6501
  }
@@ -6528,8 +6531,8 @@ async function renderToCanvas(element, options = {}) {
6528
6531
  return html2canvasPro(element, {
6529
6532
  ...options,
6530
6533
  onclone: async (doc, clonedEl) => {
6531
- await chunkH74UXL4Q_js.normalizeColorsForCapture(doc, clonedEl);
6532
- chunkH74UXL4Q_js.preprocessCssForCapture(clonedEl);
6534
+ await chunkHMQVOPQH_js.normalizeColorsForCapture(doc, clonedEl);
6535
+ chunkHMQVOPQH_js.preprocessCssForCapture(clonedEl);
6533
6536
  if (typeof userOnClone === "function") {
6534
6537
  userOnClone(doc, clonedEl);
6535
6538
  }
@@ -6585,7 +6588,7 @@ async function exportSlideToPngBlob(slideElement, options = {}) {
6585
6588
  }
6586
6589
  async function exportSlideAsPng(slideElement, slideIndex, options = {}) {
6587
6590
  const blob = await exportSlideToPngBlob(slideElement, options);
6588
- chunkH74UXL4Q_js.downloadBlob(blob, `slide-${slideIndex + 1}.png`);
6591
+ chunkHMQVOPQH_js.downloadBlob(blob, `slide-${slideIndex + 1}.png`);
6589
6592
  }
6590
6593
  async function copySlideToClipboard(slideElement, options = {}) {
6591
6594
  const blob = await exportSlideToPngBlob(slideElement, options);
@@ -6607,15 +6610,15 @@ async function exportAllSlidesAsPdf(slideStageRef, totalSlides, setActiveSlide,
6607
6610
  continue;
6608
6611
  }
6609
6612
  const canvas = await renderElementToCanvas(stageEl, scale);
6610
- images.push(chunkH74UXL4Q_js.canvasToJpegData(canvas));
6613
+ images.push(chunkHMQVOPQH_js.canvasToJpegData(canvas));
6611
6614
  }
6612
6615
  onProgress?.(totalSlides, totalSlides);
6613
6616
  setActiveSlide(currentSlideIndex);
6614
6617
  if (images.length === 0) {
6615
- throw new Error(chunkMMK4K3QI_js.translationsEn["pptx.export.errorNoSlidesPdf"]);
6618
+ throw new Error(chunkN6IHR6PS_js.translationsEn["pptx.export.errorNoSlidesPdf"]);
6616
6619
  }
6617
- const pdfBlobUrl = chunkIJVDNQLG_js.buildPdfFromImageData(images);
6618
- chunkH74UXL4Q_js.downloadDataUrl(pdfBlobUrl, filename);
6620
+ const pdfBlobUrl = chunkMM5RMRSP_js.buildPdfFromImageData(images);
6621
+ chunkHMQVOPQH_js.downloadDataUrl(pdfBlobUrl, filename);
6619
6622
  }
6620
6623
  async function captureAllSlidesAsPngDataUrls(slideStageRef, totalSlides, setActiveSlide, currentSlideIndex, options = {}) {
6621
6624
  const { scale = 2, onProgress } = options;
@@ -6661,10 +6664,10 @@ async function exportAllSlidesAsNotesPdf(slideStageRef, totalSlides, setActiveSl
6661
6664
  onProgress?.(totalSlides, totalSlides);
6662
6665
  setActiveSlide(currentSlideIndex);
6663
6666
  if (pages.length === 0) {
6664
- throw new Error(chunkMMK4K3QI_js.translationsEn["pptx.export.errorNoSlidesNotesPdf"]);
6667
+ throw new Error(chunkN6IHR6PS_js.translationsEn["pptx.export.errorNoSlidesNotesPdf"]);
6665
6668
  }
6666
- const pdfDataUrl = chunkIJVDNQLG_js.buildNotesPdf(pages);
6667
- chunkH74UXL4Q_js.downloadDataUrl(pdfDataUrl, filename);
6669
+ const pdfDataUrl = chunkMM5RMRSP_js.buildNotesPdf(pages);
6670
+ chunkHMQVOPQH_js.downloadDataUrl(pdfDataUrl, filename);
6668
6671
  }
6669
6672
 
6670
6673
  // src/viewer/utils/export-video.ts
@@ -6695,7 +6698,7 @@ async function exportAllSlidesAsVideo(slideStageRef, totalSlides, setActiveSlide
6695
6698
  }
6696
6699
  setActiveSlide(currentSlideIndex);
6697
6700
  if (slideCanvases.length === 0) {
6698
- throw new Error(chunkMMK4K3QI_js.translationsEn["pptx.export.errorNoSlidesVideo"]);
6701
+ throw new Error(chunkN6IHR6PS_js.translationsEn["pptx.export.errorNoSlidesVideo"]);
6699
6702
  }
6700
6703
  const firstCanvas = slideCanvases[0];
6701
6704
  const recordingCanvas = document.createElement("canvas");
@@ -6703,12 +6706,12 @@ async function exportAllSlidesAsVideo(slideStageRef, totalSlides, setActiveSlide
6703
6706
  recordingCanvas.height = firstCanvas.height;
6704
6707
  const ctx = recordingCanvas.getContext("2d");
6705
6708
  if (!ctx) {
6706
- throw new Error(chunkMMK4K3QI_js.translationsEn["pptx.export.errorNo2dContext"]);
6709
+ throw new Error(chunkN6IHR6PS_js.translationsEn["pptx.export.errorNo2dContext"]);
6707
6710
  }
6708
6711
  const fps = 30;
6709
6712
  const stream = recordingCanvas.captureStream(fps);
6710
6713
  const recorder = new MediaRecorder(stream, {
6711
- mimeType: chunkH74UXL4Q_js.pickSupportedMimeType([...chunkH74UXL4Q_js.WEBM_MIME_CANDIDATES]),
6714
+ mimeType: chunkHMQVOPQH_js.pickSupportedMimeType([...chunkHMQVOPQH_js.WEBM_MIME_CANDIDATES]),
6712
6715
  videoBitsPerSecond: 5e6
6713
6716
  });
6714
6717
  const chunks = [];
@@ -6731,8 +6734,8 @@ async function exportAllSlidesAsVideo(slideStageRef, totalSlides, setActiveSlide
6731
6734
  const duration = slideTimingsMs?.[i] ?? slideDurationMs;
6732
6735
  ctx.clearRect(0, 0, recordingCanvas.width, recordingCanvas.height);
6733
6736
  ctx.drawImage(slideCanvases[i], 0, 0);
6734
- const frameInterval = chunkH74UXL4Q_js.fpsToFrameIntervalMs(fps);
6735
- const framesNeeded = chunkH74UXL4Q_js.segmentFrameCount(duration, fps);
6737
+ const frameInterval = chunkHMQVOPQH_js.fpsToFrameIntervalMs(fps);
6738
+ const framesNeeded = chunkHMQVOPQH_js.segmentFrameCount(duration, fps);
6736
6739
  for (let f = 0; f < framesNeeded; f++) {
6737
6740
  if (signal?.aborted) {
6738
6741
  recorder.stop();
@@ -6779,9 +6782,9 @@ async function exportAllSlidesAsGif(slideStageRef, totalSlides, setActiveSlide,
6779
6782
  }
6780
6783
  setActiveSlide(currentSlideIndex);
6781
6784
  if (frames.length === 0) {
6782
- throw new Error(chunkMMK4K3QI_js.translationsEn["pptx.export.errorNoSlidesGif"]);
6785
+ throw new Error(chunkN6IHR6PS_js.translationsEn["pptx.export.errorNoSlidesGif"]);
6783
6786
  }
6784
- const gifBytes = chunkH74UXL4Q_js.encodeGif(frames, Math.round(slideDurationMs / 10));
6787
+ const gifBytes = chunkHMQVOPQH_js.encodeGif(frames, Math.round(slideDurationMs / 10));
6785
6788
  onProgress?.(totalSlides, totalSlides);
6786
6789
  const buf = new ArrayBuffer(gifBytes.length);
6787
6790
  new Uint8Array(buf).set(gifBytes);
@@ -6835,7 +6838,7 @@ function exportAllSlidesToSvg(data, options = {}) {
6835
6838
  continue;
6836
6839
  }
6837
6840
  onProgress?.(processedCount, data.slides.length);
6838
- let svg = chunkH74UXL4Q_js.SvgExporter.exportSlide(slide, data.width, data.height, svgOptions);
6841
+ let svg = chunkHMQVOPQH_js.SvgExporter.exportSlide(slide, data.width, data.height, svgOptions);
6839
6842
  if (embedFonts && fontFaces?.length) {
6840
6843
  svg = injectFontFaces(svg, fontFaces);
6841
6844
  }
@@ -6895,7 +6898,7 @@ function useExportSaveAs(input) {
6895
6898
  }
6896
6899
  setExportProgress(70);
6897
6900
  setExportStatusMessage("Writing README...");
6898
- const readme = chunkH74UXL4Q_js.generatePackageReadme(pptxFilename);
6901
+ const readme = chunkHMQVOPQH_js.generatePackageReadme(pptxFilename);
6899
6902
  pkgFolder.file("README.txt", readme);
6900
6903
  if (abortCtrl.signal.aborted) {
6901
6904
  throw new DOMException("Export cancelled", "AbortError");
@@ -6906,7 +6909,7 @@ function useExportSaveAs(input) {
6906
6909
  setExportProgress(95);
6907
6910
  setExportStatusMessage("Downloading...");
6908
6911
  const baseName = pptxFilename.replace(/\.[^.]+$/u, "");
6909
- chunkH74UXL4Q_js.downloadBlob(zipBlob, `${baseName}-package.zip`);
6912
+ chunkHMQVOPQH_js.downloadBlob(zipBlob, `${baseName}-package.zip`);
6910
6913
  setExportProgress(100);
6911
6914
  } catch (err) {
6912
6915
  if (err.name !== "AbortError") {
@@ -6929,7 +6932,7 @@ function useExportSaveAs(input) {
6929
6932
  const blob = new Blob([data], {
6930
6933
  type: "application/vnd.openxmlformats-officedocument.presentationml.presentation"
6931
6934
  });
6932
- chunkH74UXL4Q_js.downloadBlob(blob, `${baseName}.${ext}`);
6935
+ chunkHMQVOPQH_js.downloadBlob(blob, `${baseName}.${ext}`);
6933
6936
  } catch (err) {
6934
6937
  console.error(`[PowerPointViewer] Save as .${ext} failed:`, err);
6935
6938
  }
@@ -6942,14 +6945,14 @@ function useExportSaveAs(input) {
6942
6945
  const pptxGuides = guides.map((g) => ({
6943
6946
  id: g.id,
6944
6947
  orientation: g.axis === "h" ? "horz" : "vert",
6945
- positionEmu: chunkH74UXL4Q_js.guidePxToEmu(g.position)
6948
+ positionEmu: chunkHMQVOPQH_js.guidePxToEmu(g.position)
6946
6949
  }));
6947
6950
  return {
6948
6951
  ...slide,
6949
6952
  guides: pptxGuides.length > 0 ? pptxGuides : void 0
6950
6953
  };
6951
6954
  });
6952
- const slidesToSave = chunkIJVDNQLG_js.buildSaveSlides(slidesWithGuides, templateElementsBySlideId);
6955
+ const slidesToSave = chunkMM5RMRSP_js.buildSaveSlides(slidesWithGuides, templateElementsBySlideId);
6953
6956
  const saveOptions = {
6954
6957
  headerFooter,
6955
6958
  presentationProperties,
@@ -7006,7 +7009,7 @@ function safeConfirm(message) {
7006
7009
  }
7007
7010
  }
7008
7011
  function downloadBlob2(blob, filename) {
7009
- chunkH74UXL4Q_js.downloadBlob(blob, chunkH74UXL4Q_js.sanitizeDownloadFilename(filename));
7012
+ chunkHMQVOPQH_js.downloadBlob(blob, chunkHMQVOPQH_js.sanitizeDownloadFilename(filename));
7010
7013
  }
7011
7014
 
7012
7015
  // src/viewer/hooks/useExportHandlers.ts
@@ -7107,21 +7110,21 @@ function useExportHandlers(input) {
7107
7110
  {
7108
7111
  scale: 2,
7109
7112
  onProgress: (current, total) => {
7110
- setExportProgress(chunkH74UXL4Q_js.slideProgressPercent(current, total));
7111
- setExportStatusMessage(chunkH74UXL4Q_js.slideStatusLabel("Rendering", current, total));
7113
+ setExportProgress(chunkHMQVOPQH_js.slideProgressPercent(current, total));
7114
+ setExportStatusMessage(chunkHMQVOPQH_js.slideStatusLabel("Rendering", current, total));
7112
7115
  },
7113
7116
  signal: abortCtrl.signal
7114
7117
  }
7115
7118
  );
7116
- setExportProgress(chunkH74UXL4Q_js.EXPORT_ASSEMBLING_PERCENT);
7119
+ setExportProgress(chunkHMQVOPQH_js.EXPORT_ASSEMBLING_PERCENT);
7117
7120
  setExportStatusMessage("Building PDF...");
7118
7121
  await new Promise((r) => {
7119
7122
  setTimeout(r, 100);
7120
7123
  });
7121
- setExportProgress(chunkH74UXL4Q_js.EXPORT_DONE_PERCENT);
7124
+ setExportProgress(chunkHMQVOPQH_js.EXPORT_DONE_PERCENT);
7122
7125
  setExportStatusMessage("Done!");
7123
7126
  } catch (err) {
7124
- if (!chunkH74UXL4Q_js.isExportAbortError(err)) {
7127
+ if (!chunkHMQVOPQH_js.isExportAbortError(err)) {
7125
7128
  console.error("[PowerPointViewer] PDF export failed:", err);
7126
7129
  }
7127
7130
  } finally {
@@ -7151,21 +7154,21 @@ function useExportHandlers(input) {
7151
7154
  {
7152
7155
  scale: 2,
7153
7156
  onProgress: (current, total) => {
7154
- setExportProgress(chunkH74UXL4Q_js.slideProgressPercent(current, total));
7155
- setExportStatusMessage(chunkH74UXL4Q_js.slideStatusLabel("Rendering", current, total));
7157
+ setExportProgress(chunkHMQVOPQH_js.slideProgressPercent(current, total));
7158
+ setExportStatusMessage(chunkHMQVOPQH_js.slideStatusLabel("Rendering", current, total));
7156
7159
  },
7157
7160
  signal: abortCtrl.signal
7158
7161
  }
7159
7162
  );
7160
- setExportProgress(chunkH74UXL4Q_js.EXPORT_ASSEMBLING_PERCENT);
7163
+ setExportProgress(chunkHMQVOPQH_js.EXPORT_ASSEMBLING_PERCENT);
7161
7164
  setExportStatusMessage("Building PDF...");
7162
7165
  await new Promise((r) => {
7163
7166
  setTimeout(r, 100);
7164
7167
  });
7165
- setExportProgress(chunkH74UXL4Q_js.EXPORT_DONE_PERCENT);
7168
+ setExportProgress(chunkHMQVOPQH_js.EXPORT_DONE_PERCENT);
7166
7169
  setExportStatusMessage("Done!");
7167
7170
  } catch (err) {
7168
- if (!chunkH74UXL4Q_js.isExportAbortError(err)) {
7171
+ if (!chunkHMQVOPQH_js.isExportAbortError(err)) {
7169
7172
  console.error("[PowerPointViewer] Notes PDF export failed:", err);
7170
7173
  }
7171
7174
  } finally {
@@ -7206,22 +7209,22 @@ function useExportHandlers(input) {
7206
7209
  scale: 1,
7207
7210
  slideDurationMs: 3e3,
7208
7211
  onProgress: (current, total) => {
7209
- setExportProgress(chunkH74UXL4Q_js.slideProgressPercent(current, total, 45));
7210
- setExportStatusMessage(chunkH74UXL4Q_js.slideStatusLabel("Capturing", current, total));
7212
+ setExportProgress(chunkHMQVOPQH_js.slideProgressPercent(current, total, 45));
7213
+ setExportStatusMessage(chunkHMQVOPQH_js.slideStatusLabel("Capturing", current, total));
7211
7214
  },
7212
7215
  onRecordProgress: (current, total) => {
7213
- setExportProgress(chunkH74UXL4Q_js.recordProgressPercent(current, total));
7214
- setExportStatusMessage(chunkH74UXL4Q_js.slideStatusLabel("Recording", current, total));
7216
+ setExportProgress(chunkHMQVOPQH_js.recordProgressPercent(current, total));
7217
+ setExportStatusMessage(chunkHMQVOPQH_js.slideStatusLabel("Recording", current, total));
7215
7218
  },
7216
7219
  signal: abortCtrl.signal
7217
7220
  }
7218
7221
  );
7219
- setExportProgress(chunkH74UXL4Q_js.EXPORT_ASSEMBLING_PERCENT);
7222
+ setExportProgress(chunkHMQVOPQH_js.EXPORT_ASSEMBLING_PERCENT);
7220
7223
  setExportStatusMessage("Saving file...");
7221
7224
  downloadBlob2(blob, "presentation.webm");
7222
- setExportProgress(chunkH74UXL4Q_js.EXPORT_DONE_PERCENT);
7225
+ setExportProgress(chunkHMQVOPQH_js.EXPORT_DONE_PERCENT);
7223
7226
  } catch (err) {
7224
- if (!chunkH74UXL4Q_js.isExportAbortError(err)) {
7227
+ if (!chunkHMQVOPQH_js.isExportAbortError(err)) {
7225
7228
  console.error("[PowerPointViewer] Video export failed:", err);
7226
7229
  }
7227
7230
  } finally {
@@ -7249,18 +7252,18 @@ function useExportHandlers(input) {
7249
7252
  scale: 0.5,
7250
7253
  slideDurationMs: 2e3,
7251
7254
  onProgress: (current, total) => {
7252
- setExportProgress(chunkH74UXL4Q_js.slideProgressPercent(current, total));
7253
- setExportStatusMessage(chunkH74UXL4Q_js.slideStatusLabel("Encoding", current, total));
7255
+ setExportProgress(chunkHMQVOPQH_js.slideProgressPercent(current, total));
7256
+ setExportStatusMessage(chunkHMQVOPQH_js.slideStatusLabel("Encoding", current, total));
7254
7257
  },
7255
7258
  signal: abortCtrl.signal
7256
7259
  }
7257
7260
  );
7258
- setExportProgress(chunkH74UXL4Q_js.EXPORT_ASSEMBLING_PERCENT);
7261
+ setExportProgress(chunkHMQVOPQH_js.EXPORT_ASSEMBLING_PERCENT);
7259
7262
  setExportStatusMessage("Saving file...");
7260
7263
  downloadBlob2(blob, "presentation.gif");
7261
- setExportProgress(chunkH74UXL4Q_js.EXPORT_DONE_PERCENT);
7264
+ setExportProgress(chunkHMQVOPQH_js.EXPORT_DONE_PERCENT);
7262
7265
  } catch (err) {
7263
- if (!chunkH74UXL4Q_js.isExportAbortError(err)) {
7266
+ if (!chunkHMQVOPQH_js.isExportAbortError(err)) {
7264
7267
  console.error("[PowerPointViewer] GIF export failed:", err);
7265
7268
  }
7266
7269
  } finally {
@@ -7300,7 +7303,7 @@ function openPrintWindow(title, bodyHtml, orientation, colorFilter, frameSlides)
7300
7303
  }
7301
7304
  printWindow.document.open();
7302
7305
  printWindow.document.write(
7303
- chunkH74UXL4Q_js.buildPrintHtmlDocument({ title, bodyHtml, orientation, colorFilter, frameSlides })
7306
+ chunkHMQVOPQH_js.buildPrintHtmlDocument({ title, bodyHtml, orientation, colorFilter, frameSlides })
7304
7307
  );
7305
7308
  printWindow.document.close();
7306
7309
  printWindow.focus();
@@ -7361,7 +7364,7 @@ function usePrintHandlers(input) {
7361
7364
  if (svgs.length === 0) {
7362
7365
  return;
7363
7366
  }
7364
- const printDoc = chunkH74UXL4Q_js.buildPrintDocument(svgs, pptxData.width, pptxData.height, {
7367
+ const printDoc = chunkHMQVOPQH_js.buildPrintDocument(svgs, pptxData.width, pptxData.height, {
7365
7368
  title: "Slides (Vector)",
7366
7369
  orientation: settings.orientation,
7367
7370
  colorFilter
@@ -7397,7 +7400,7 @@ function usePrintHandlers(input) {
7397
7400
  if (settings.printWhat === "outline") {
7398
7401
  openPrintWindow(
7399
7402
  "Outline",
7400
- `<div class="outline-page">${chunkH74UXL4Q_js.buildOutlineHtml(slideIndices, slides)}</div>`,
7403
+ `<div class="outline-page">${chunkHMQVOPQH_js.buildOutlineHtml(slideIndices, slides)}</div>`,
7401
7404
  settings.orientation,
7402
7405
  colorFilter,
7403
7406
  settings.frameSlides
@@ -7422,7 +7425,7 @@ function usePrintHandlers(input) {
7422
7425
  if (settings.printWhat === "slides") {
7423
7426
  openPrintWindow(
7424
7427
  "Slides",
7425
- chunkH74UXL4Q_js.buildSlidesHtml(slideImages, slideIndices),
7428
+ chunkHMQVOPQH_js.buildSlidesHtml(slideImages, slideIndices),
7426
7429
  settings.orientation,
7427
7430
  colorFilter,
7428
7431
  settings.frameSlides
@@ -7432,7 +7435,7 @@ function usePrintHandlers(input) {
7432
7435
  if (settings.printWhat === "notes") {
7433
7436
  openPrintWindow(
7434
7437
  "Notes Pages",
7435
- chunkH74UXL4Q_js.buildNotesHtml(slideImages, slideIndices, slides),
7438
+ chunkHMQVOPQH_js.buildNotesHtml(slideImages, slideIndices, slides),
7436
7439
  "portrait",
7437
7440
  colorFilter,
7438
7441
  settings.frameSlides
@@ -7443,7 +7446,7 @@ function usePrintHandlers(input) {
7443
7446
  const spp = settings.slidesPerPage;
7444
7447
  openPrintWindow(
7445
7448
  `Handout ${spp} per page`,
7446
- chunkH74UXL4Q_js.buildHandoutsHtml(slideImages, slideIndices, spp),
7449
+ chunkHMQVOPQH_js.buildHandoutsHtml(slideImages, slideIndices, spp),
7447
7450
  "portrait",
7448
7451
  colorFilter,
7449
7452
  settings.frameSlides
@@ -7507,8 +7510,8 @@ function useThemeHandlers(input) {
7507
7510
  return;
7508
7511
  }
7509
7512
  await handler.updateThemeColorScheme(colorScheme);
7510
- const previousMap = theme?.colorScheme ? chunkH74UXL4Q_js.buildThemeColorMap(theme.colorScheme) : {};
7511
- setSlides((prev) => chunkH74UXL4Q_js.reResolveSlideColors(prev, previousMap, colorScheme));
7513
+ const previousMap = theme?.colorScheme ? chunkHMQVOPQH_js.buildThemeColorMap(theme.colorScheme) : {};
7514
+ setSlides((prev) => chunkHMQVOPQH_js.reResolveSlideColors(prev, previousMap, colorScheme));
7512
7515
  setTheme((prev) => prev ? { ...prev, colorScheme } : { colorScheme });
7513
7516
  bumpHistory();
7514
7517
  history.markDirty();
@@ -7613,7 +7616,7 @@ function useThemeSwitching(input) {
7613
7616
  }
7614
7617
  try {
7615
7618
  await handler.applyTheme(preset.colorScheme, preset.fontScheme, preset.name);
7616
- const newData = chunkH74UXL4Q_js.applyThemeToData(data, preset.colorScheme, preset.fontScheme, preset.name);
7619
+ const newData = chunkHMQVOPQH_js.applyThemeToData(data, preset.colorScheme, preset.fontScheme, preset.name);
7617
7620
  onDataChange(newData);
7618
7621
  onThemeChanged?.(preset);
7619
7622
  } catch (error) {
@@ -7630,7 +7633,7 @@ function useThemeSwitching(input) {
7630
7633
  }
7631
7634
  try {
7632
7635
  await handler.applyTheme(colorScheme, fontScheme ?? {}, themeName);
7633
- const newData = chunkH74UXL4Q_js.applyThemeToData(data, colorScheme, fontScheme, themeName);
7636
+ const newData = chunkHMQVOPQH_js.applyThemeToData(data, colorScheme, fontScheme, themeName);
7634
7637
  onDataChange(newData);
7635
7638
  } catch (error) {
7636
7639
  console.error("Failed to switch to custom theme:", error);
@@ -7642,12 +7645,12 @@ function useThemeSwitching(input) {
7642
7645
  if (!data?.theme?.colorScheme) {
7643
7646
  return void 0;
7644
7647
  }
7645
- return chunkH74UXL4Q_js.THEME_PRESETS.find(
7646
- (p) => chunkH74UXL4Q_js.themeColorSchemesEqual(data.theme?.colorScheme, p.colorScheme)
7648
+ return chunkHMQVOPQH_js.THEME_PRESETS.find(
7649
+ (p) => chunkHMQVOPQH_js.themeColorSchemesEqual(data.theme?.colorScheme, p.colorScheme)
7647
7650
  );
7648
7651
  }, [data?.theme?.colorScheme]);
7649
7652
  return {
7650
- presets: chunkH74UXL4Q_js.THEME_PRESETS,
7653
+ presets: chunkHMQVOPQH_js.THEME_PRESETS,
7651
7654
  switchToPreset,
7652
7655
  switchToCustom,
7653
7656
  currentPreset
@@ -7722,7 +7725,7 @@ function usePropertyHandlers(input) {
7722
7725
  }
7723
7726
  try {
7724
7727
  const ab = await file.arrayBuffer();
7725
- const h = new chunkH74UXL4Q_js.PptxHandler();
7728
+ const h = new chunkHMQVOPQH_js.PptxHandler();
7726
7729
  const other = await h.load(ab);
7727
7730
  if (!other) {
7728
7731
  return;
@@ -7732,7 +7735,7 @@ function usePropertyHandlers(input) {
7732
7735
  width: canvasSize.width,
7733
7736
  height: canvasSize.height
7734
7737
  };
7735
- setCompareResult(chunkH74UXL4Q_js.comparePresentation(cur, other));
7738
+ setCompareResult(chunkHMQVOPQH_js.comparePresentation(cur, other));
7736
7739
  setIsComparePanelOpen(true);
7737
7740
  } catch (err) {
7738
7741
  console.warn("Compare failed:", err);
@@ -7749,7 +7752,7 @@ function usePropertyHandlers(input) {
7749
7752
  if (!diff || diff.status === "unchanged") {
7750
7753
  return;
7751
7754
  }
7752
- setSlides((prev) => chunkH74UXL4Q_js.applyAcceptSlide(prev, diff));
7755
+ setSlides((prev) => chunkHMQVOPQH_js.applyAcceptSlide(prev, diff));
7753
7756
  setIsDirty(true);
7754
7757
  },
7755
7758
  [compareResult, setSlides, setIsDirty]
@@ -7760,10 +7763,10 @@ function usePropertyHandlers(input) {
7760
7763
  if (!compareResult) {
7761
7764
  return;
7762
7765
  }
7763
- setSlides((prev) => chunkH74UXL4Q_js.applyAcceptAllSlides(prev, compareResult));
7766
+ setSlides((prev) => chunkHMQVOPQH_js.applyAcceptAllSlides(prev, compareResult));
7764
7767
  setIsDirty(true);
7765
7768
  }, [compareResult, setSlides, setIsDirty]);
7766
- const usedFontFamilies = react.useMemo(() => chunkH74UXL4Q_js.collectUsedFonts(slides), [slides]);
7769
+ const usedFontFamilies = react.useMemo(() => chunkHMQVOPQH_js.collectUsedFonts(slides), [slides]);
7767
7770
  return {
7768
7771
  handleUpdateNotes,
7769
7772
  handleUpdateSlide,
@@ -7882,7 +7885,7 @@ function useIsMobile(input) {
7882
7885
  const containerRef = input?.containerRef;
7883
7886
  const isTouchDevice = react.useSyncExternalStore(
7884
7887
  subscribeTouchCapability,
7885
- chunkH74UXL4Q_js.detectTouchDevice,
7888
+ chunkHMQVOPQH_js.detectTouchDevice,
7886
7889
  () => false
7887
7890
  // server snapshot
7888
7891
  );
@@ -7898,7 +7901,7 @@ function useIsMobile(input) {
7898
7901
  }
7899
7902
  return containerRef?.current?.clientHeight ?? window.innerHeight;
7900
7903
  });
7901
- const [orientation, setOrientation] = react.useState(chunkH74UXL4Q_js.detectOrientation);
7904
+ const [orientation, setOrientation] = react.useState(chunkHMQVOPQH_js.detectOrientation);
7902
7905
  const [isVirtualKeyboardOpen, setIsVirtualKeyboardOpen] = react.useState(false);
7903
7906
  const [initialViewportHeight] = react.useState(
7904
7907
  () => typeof window !== "undefined" ? window.innerHeight : 800
@@ -7942,7 +7945,7 @@ function useIsMobile(input) {
7942
7945
  return;
7943
7946
  }
7944
7947
  const handleOrientationChange = () => {
7945
- setOrientation(chunkH74UXL4Q_js.detectOrientation());
7948
+ setOrientation(chunkHMQVOPQH_js.detectOrientation());
7946
7949
  };
7947
7950
  if (screen.orientation) {
7948
7951
  screen.orientation.addEventListener("change", handleOrientationChange);
@@ -7972,9 +7975,9 @@ function useIsMobile(input) {
7972
7975
  window.addEventListener("resize", handleResize);
7973
7976
  return () => window.removeEventListener("resize", handleResize);
7974
7977
  }, [isTouchDevice, initialViewportHeight]);
7975
- const isMobile = chunkH74UXL4Q_js.isMobileViewport(containerWidth, containerHeight, isTouchDevice);
7976
- const isTablet = !isMobile && containerWidth >= chunkH74UXL4Q_js.MOBILE_BREAKPOINT && containerWidth < chunkH74UXL4Q_js.TABLET_BREAKPOINT;
7977
- const isDesktop = !isMobile && containerWidth >= chunkH74UXL4Q_js.TABLET_BREAKPOINT;
7978
+ const isMobile = chunkHMQVOPQH_js.isMobileViewport(containerWidth, containerHeight, isTouchDevice);
7979
+ const isTablet = !isMobile && containerWidth >= chunkHMQVOPQH_js.MOBILE_BREAKPOINT && containerWidth < chunkHMQVOPQH_js.TABLET_BREAKPOINT;
7980
+ const isDesktop = !isMobile && containerWidth >= chunkHMQVOPQH_js.TABLET_BREAKPOINT;
7978
7981
  return {
7979
7982
  isMobile,
7980
7983
  isTablet,
@@ -8035,11 +8038,11 @@ function useViewerDialogs(input) {
8035
8038
  );
8036
8039
  const [embedFontsEnabled, setEmbedFontsEnabled] = react.useState(false);
8037
8040
  const [isNarrowViewport, setIsNarrowViewport] = react.useState(
8038
- () => typeof window !== "undefined" ? chunkH74UXL4Q_js.isMobileViewport(window.innerWidth, window.innerHeight, viewportIsTouch()) : false
8041
+ () => typeof window !== "undefined" ? chunkHMQVOPQH_js.isMobileViewport(window.innerWidth, window.innerHeight, viewportIsTouch()) : false
8039
8042
  );
8040
8043
  react.useEffect(() => {
8041
8044
  const handleWindow = () => setIsNarrowViewport(
8042
- chunkH74UXL4Q_js.isMobileViewport(window.innerWidth, window.innerHeight, viewportIsTouch())
8045
+ chunkHMQVOPQH_js.isMobileViewport(window.innerWidth, window.innerHeight, viewportIsTouch())
8043
8046
  );
8044
8047
  let observer = null;
8045
8048
  let raf = 0;
@@ -8053,12 +8056,12 @@ function useViewerDialogs(input) {
8053
8056
  const entry = entries[0];
8054
8057
  if (entry) {
8055
8058
  setIsNarrowViewport(
8056
- chunkH74UXL4Q_js.isMobileViewport(entry.contentRect.width, entry.contentRect.height, viewportIsTouch())
8059
+ chunkHMQVOPQH_js.isMobileViewport(entry.contentRect.width, entry.contentRect.height, viewportIsTouch())
8057
8060
  );
8058
8061
  }
8059
8062
  });
8060
8063
  observer.observe(el);
8061
- setIsNarrowViewport(chunkH74UXL4Q_js.isMobileViewport(el.clientWidth, el.clientHeight, viewportIsTouch()));
8064
+ setIsNarrowViewport(chunkHMQVOPQH_js.isMobileViewport(el.clientWidth, el.clientHeight, viewportIsTouch()));
8062
8065
  };
8063
8066
  attach();
8064
8067
  window.addEventListener("resize", handleWindow);
@@ -8216,12 +8219,12 @@ function useViewerDialogs(input) {
8216
8219
  }
8217
8220
  function computeGridSpacingPx(presentationGridSpacing) {
8218
8221
  if (presentationGridSpacing) {
8219
- const px = Math.round(presentationGridSpacing.cx / chunkIJVDNQLG_js.EMU_PER_PX);
8222
+ const px = Math.round(presentationGridSpacing.cx / chunkMM5RMRSP_js.EMU_PER_PX);
8220
8223
  if (px > 0) {
8221
8224
  return px;
8222
8225
  }
8223
8226
  }
8224
- return chunkIJVDNQLG_js.GRID_SIZE;
8227
+ return chunkMM5RMRSP_js.GRID_SIZE;
8225
8228
  }
8226
8229
  function computeVisibleSlideIndexes(slides, activeCustomShowId, customShows) {
8227
8230
  if (activeCustomShowId) {
@@ -8235,8 +8238,8 @@ function computeVisibleSlideIndexes(slides, activeCustomShowId, customShows) {
8235
8238
  return slides.map((_, i) => i).filter((i) => !slides[i]?.hidden);
8236
8239
  }
8237
8240
  function computeSlideSectionGroups(slides, sections) {
8238
- return chunkH74UXL4Q_js.groupSlidesBySection(sections, slides).map((group) => ({
8239
- id: group.section?.id ?? (sections.length > 0 ? chunkIJVDNQLG_js.UNGROUPED_SECTION_ID : "default"),
8241
+ return chunkHMQVOPQH_js.groupSlidesBySection(sections, slides).map((group) => ({
8242
+ id: group.section?.id ?? (sections.length > 0 ? chunkMM5RMRSP_js.UNGROUPED_SECTION_ID : "default"),
8240
8243
  label: group.section?.name ?? (sections.length > 0 ? "Ungrouped Slides" : "Slides"),
8241
8244
  slideIndexes: group.slideIndexes,
8242
8245
  ...group.section?.color !== void 0 ? { color: group.section.color } : {},
@@ -8291,7 +8294,7 @@ function useDerivedSlideState(input) {
8291
8294
  );
8292
8295
  const slideSectionGroups = react.useMemo(
8293
8296
  () => computeSlideSectionGroups(slides, sections).map((group) => {
8294
- if (group.id === chunkIJVDNQLG_js.UNGROUPED_SECTION_ID && group.label === "Ungrouped Slides") {
8297
+ if (group.id === chunkMM5RMRSP_js.UNGROUPED_SECTION_ID && group.label === "Ungrouped Slides") {
8295
8298
  return { ...group, label: t("pptx.slides.ungroupedSlides") };
8296
8299
  }
8297
8300
  if (group.id === "default" && group.label === "Slides") {
@@ -8394,13 +8397,13 @@ function useAnnotationHandlers(input) {
8394
8397
  }, [annotations, setMode, setSlides, history]);
8395
8398
  const handleSetMode = react.useCallback(
8396
8399
  (nextMode) => {
8397
- if (mode === "present" && nextMode !== "present" && !chunkH74UXL4Q_js.mayLeaveSlideShow()) {
8400
+ if (mode === "present" && nextMode !== "present" && !chunkHMQVOPQH_js.mayLeaveSlideShow()) {
8398
8401
  return;
8399
8402
  }
8400
8403
  if (nextMode === "present") {
8401
8404
  presentation.enterPresentMode();
8402
8405
  } else if (mode === "present" && annotations.hasAnyAnnotations) {
8403
- chunkIJVDNQLG_js.stopAllPersistentAudio();
8406
+ chunkMM5RMRSP_js.stopAllPersistentAudio();
8404
8407
  pendingModeAfterAnnotationsRef.current = nextMode;
8405
8408
  if (promptKeepInkAnnotations) {
8406
8409
  setShowKeepAnnotationsDialog(true);
@@ -8409,7 +8412,7 @@ function useAnnotationHandlers(input) {
8409
8412
  }
8410
8413
  } else {
8411
8414
  if (mode === "present") {
8412
- chunkIJVDNQLG_js.stopAllPersistentAudio();
8415
+ chunkMM5RMRSP_js.stopAllPersistentAudio();
8413
8416
  }
8414
8417
  setMode(nextMode);
8415
8418
  }
@@ -8475,13 +8478,13 @@ function useSerialize(input) {
8475
8478
  let processedSlide = slide;
8476
8479
  if (pendingEditId) {
8477
8480
  const updatedElements = slide.elements.map((el) => {
8478
- if (el.id !== pendingEditId || !chunkH74UXL4Q_js.hasTextProperties(el)) {
8481
+ if (el.id !== pendingEditId || !chunkHMQVOPQH_js.hasTextProperties(el)) {
8479
8482
  return el;
8480
8483
  }
8481
8484
  return {
8482
8485
  ...el,
8483
8486
  text: pendingEditText,
8484
- textSegments: chunkH74UXL4Q_js.remapTextToSegments(pendingEditText, el.textSegments, el.textStyle)
8487
+ textSegments: chunkHMQVOPQH_js.remapTextToSegments(pendingEditText, el.textSegments, el.textStyle)
8485
8488
  };
8486
8489
  });
8487
8490
  if (updatedElements.some((el, i) => el !== slide.elements[i])) {
@@ -8494,14 +8497,14 @@ function useSerialize(input) {
8494
8497
  const pptxGuides = guides.map((g) => ({
8495
8498
  id: g.id,
8496
8499
  orientation: g.axis === "h" ? "horz" : "vert",
8497
- positionEmu: chunkH74UXL4Q_js.guidePxToEmu(g.position)
8500
+ positionEmu: chunkHMQVOPQH_js.guidePxToEmu(g.position)
8498
8501
  }));
8499
8502
  return {
8500
8503
  ...processedSlide,
8501
8504
  guides: pptxGuides.length > 0 ? pptxGuides : void 0
8502
8505
  };
8503
8506
  });
8504
- const slidesToSave = chunkIJVDNQLG_js.buildSaveSlides(slidesWithGuides, templateElementsBySlideId);
8507
+ const slidesToSave = chunkMM5RMRSP_js.buildSaveSlides(slidesWithGuides, templateElementsBySlideId);
8505
8508
  const saveOptions = {
8506
8509
  headerFooter,
8507
8510
  presentationProperties,
@@ -8670,7 +8673,7 @@ function usePresentationSetup(input) {
8670
8673
  containerRef,
8671
8674
  content,
8672
8675
  onSetMode: (nextMode) => {
8673
- if (mode === "present" && nextMode !== "present" && !chunkH74UXL4Q_js.mayLeaveSlideShow()) {
8676
+ if (mode === "present" && nextMode !== "present" && !chunkHMQVOPQH_js.mayLeaveSlideShow()) {
8674
8677
  return;
8675
8678
  }
8676
8679
  if (mode === "present" && nextMode !== "present" && annotations.hasAnyAnnotations && promptKeepInkAnnotations) {
@@ -8678,7 +8681,7 @@ function usePresentationSetup(input) {
8678
8681
  setShowKeepAnnotationsDialog(true);
8679
8682
  } else {
8680
8683
  if (mode === "present" && nextMode !== "present") {
8681
- chunkIJVDNQLG_js.stopAllPersistentAudio();
8684
+ chunkMM5RMRSP_js.stopAllPersistentAudio();
8682
8685
  stopAnimationSound();
8683
8686
  }
8684
8687
  setMode(nextMode);
@@ -8732,10 +8735,10 @@ function usePresentationSetup(input) {
8732
8735
  onToggleInkMarkup: () => annotations.setInkMarkupVisible(!annotations.inkMarkupVisible),
8733
8736
  onToggleToolbar: () => annotations.setToolbarVisible(!annotations.toolbarVisible),
8734
8737
  onSaveRehearsalTimings: (timings) => {
8735
- setSlides((prev) => chunkH74UXL4Q_js.applyRehearsalTimings(prev, timings));
8738
+ setSlides((prev) => chunkHMQVOPQH_js.applyRehearsalTimings(prev, timings));
8736
8739
  history.markDirty();
8737
8740
  },
8738
- loopContinuously: chunkH74UXL4Q_js.shouldLoopContinuously(presentationProperties),
8741
+ loopContinuously: chunkHMQVOPQH_js.shouldLoopContinuously(presentationProperties),
8739
8742
  showWithAnimation: presentationProperties.showWithAnimation,
8740
8743
  useTimings: presentationProperties.advanceMode !== "manual",
8741
8744
  endWithBlackSlide
@@ -8897,7 +8900,7 @@ function useEditorOperations(input) {
8897
8900
  const { formatPainterActive, setFormatPainterActive, elementLookup } = state;
8898
8901
  react.useEffect(() => {
8899
8902
  if (formatPainterActive && !prevFormatPainterRef.current && selectedElement) {
8900
- copiedFormatRef.current = chunkH74UXL4Q_js.copyFormatFromElement(selectedElement);
8903
+ copiedFormatRef.current = chunkHMQVOPQH_js.copyFormatFromElement(selectedElement);
8901
8904
  } else if (!formatPainterActive) {
8902
8905
  copiedFormatRef.current = null;
8903
8906
  }
@@ -8923,12 +8926,12 @@ function useEditorOperations(input) {
8923
8926
  e.stopPropagation();
8924
8927
  const element = elementLookup.get(elementId);
8925
8928
  if (element) {
8926
- const updated = chunkH74UXL4Q_js.applyFormatToElement(element, copiedFormatRef.current);
8929
+ const updated = chunkHMQVOPQH_js.applyFormatToElement(element, copiedFormatRef.current);
8927
8930
  const updates = {};
8928
- if (chunkH74UXL4Q_js.hasShapeProperties(updated)) {
8931
+ if (chunkHMQVOPQH_js.hasShapeProperties(updated)) {
8929
8932
  updates.shapeStyle = updated.shapeStyle;
8930
8933
  }
8931
- if (chunkH74UXL4Q_js.hasTextProperties(updated)) {
8934
+ if (chunkHMQVOPQH_js.hasTextProperties(updated)) {
8932
8935
  updates.textStyle = updated.textStyle;
8933
8936
  }
8934
8937
  ops.updateElementById(elementId, updates);
@@ -9075,7 +9078,7 @@ function collectReferencedFontFamilies(slides) {
9075
9078
  const families = /* @__PURE__ */ new Set();
9076
9079
  for (const slide of slides) {
9077
9080
  for (const el of slide.elements) {
9078
- if (chunkH74UXL4Q_js.hasTextProperties(el) && el.textSegments) {
9081
+ if (chunkHMQVOPQH_js.hasTextProperties(el) && el.textSegments) {
9079
9082
  for (const seg of el.textSegments) {
9080
9083
  if (seg.style.fontFamily) {
9081
9084
  families.add(seg.style.fontFamily);
@@ -9287,13 +9290,13 @@ function useKeyboardShortcuts(input) {
9287
9290
  inputRef.current = input;
9288
9291
  const handleKeyDown = react.useCallback((e) => {
9289
9292
  const current = inputRef.current;
9290
- const { action, dx, dy } = chunkH74UXL4Q_js.mapEditorKey(e, {
9293
+ const { action, dx, dy } = chunkHMQVOPQH_js.mapEditorKey(e, {
9291
9294
  canEdit: current.canEdit,
9292
9295
  isPresenting: current.mode !== "edit",
9293
9296
  hasSelection: current.hasSelection,
9294
9297
  isEditingText: Boolean(current.inlineEditingElementId || current.tableEditorState?.isEditing),
9295
9298
  isDrawing: current.activeTool !== "select",
9296
- isTextInputTarget: chunkH74UXL4Q_js.isEditorTextInputTarget(e.target)
9299
+ isTextInputTarget: chunkHMQVOPQH_js.isEditorTextInputTarget(e.target)
9297
9300
  });
9298
9301
  if (action === null) {
9299
9302
  return;
@@ -9586,7 +9589,7 @@ function useViewerIntegration(input) {
9586
9589
  return zoom.scale;
9587
9590
  },
9588
9591
  setZoom(level) {
9589
- zoom.setScale(chunkH74UXL4Q_js.clampZoomScale(level));
9592
+ zoom.setScale(chunkHMQVOPQH_js.clampZoomScale(level));
9590
9593
  },
9591
9594
  zoomIn() {
9592
9595
  zoom.handleZoomIn();
@@ -9801,7 +9804,7 @@ function useReducedMotion() {
9801
9804
  }
9802
9805
  function useViewerOptions() {
9803
9806
  const storeRef = react.useRef(null);
9804
- storeRef.current ??= chunkH74UXL4Q_js.createViewerOptionsStore();
9807
+ storeRef.current ??= chunkHMQVOPQH_js.createViewerOptionsStore();
9805
9808
  const store = storeRef.current;
9806
9809
  const options = react.useSyncExternalStore(
9807
9810
  (onStoreChange) => store.subscribe(onStoreChange),
@@ -9810,9 +9813,9 @@ function useViewerOptions() {
9810
9813
  );
9811
9814
  return { optionsStore: store, options };
9812
9815
  }
9813
- var KNOWN_TAB_IDS = new Set(chunkH74UXL4Q_js.TOOLBAR_TABS.map((tab) => tab.id));
9816
+ var KNOWN_TAB_IDS = new Set(chunkHMQVOPQH_js.TOOLBAR_TABS.map((tab) => tab.id));
9814
9817
  function computeToolbarVisibility(hiddenActions) {
9815
- const isHidden = (id) => chunkH74UXL4Q_js.isActionHidden(id, hiddenActions);
9818
+ const isHidden = (id) => chunkHMQVOPQH_js.isActionHidden(id, hiddenActions);
9816
9819
  const isTabVisible = (id) => !KNOWN_TAB_IDS.has(id) || !isHidden(id);
9817
9820
  return { isHidden, isTabVisible };
9818
9821
  }
@@ -9897,12 +9900,12 @@ function useYjsDocumentSync({
9897
9900
  return;
9898
9901
  }
9899
9902
  try {
9900
- const handler = new chunkH74UXL4Q_js.PptxHandler();
9903
+ const handler = new chunkHMQVOPQH_js.PptxHandler();
9901
9904
  await handler.load(sourceBytes.buffer);
9902
- const currentSlides = chunkH74UXL4Q_js.readSlidesFromYDoc(
9905
+ const currentSlides = chunkHMQVOPQH_js.readSlidesFromYDoc(
9903
9906
  doc
9904
9907
  );
9905
- const slidesToSave = chunkIJVDNQLG_js.buildSaveSlides(currentSlides, templateElementsBySlideId);
9908
+ const slidesToSave = chunkMM5RMRSP_js.buildSaveSlides(currentSlides, templateElementsBySlideId);
9906
9909
  const bytes = await handler.save(slidesToSave);
9907
9910
  config.onWriteBack(bytes);
9908
9911
  } catch {
@@ -9917,7 +9920,7 @@ function useYjsDocumentSync({
9917
9920
  if (!doc || !isConnected) {
9918
9921
  return;
9919
9922
  }
9920
- const docSlides = chunkH74UXL4Q_js.readSlidesFromYDoc(
9923
+ const docSlides = chunkHMQVOPQH_js.readSlidesFromYDoc(
9921
9924
  doc
9922
9925
  );
9923
9926
  if (docSlides.length === 0) {
@@ -9939,11 +9942,11 @@ function useYjsDocumentSync({
9939
9942
  lastSyncedRef.current = serialized;
9940
9943
  void (async () => {
9941
9944
  const factories = await getFactories();
9942
- chunkH74UXL4Q_js.reconcileSlidesInYDoc(
9945
+ chunkHMQVOPQH_js.reconcileSlidesInYDoc(
9943
9946
  slides,
9944
9947
  doc,
9945
9948
  factories,
9946
- chunkH74UXL4Q_js.LOCAL_SYNC_ORIGIN
9949
+ chunkHMQVOPQH_js.LOCAL_SYNC_ORIGIN
9947
9950
  );
9948
9951
  scheduleWriteBack();
9949
9952
  })();
@@ -9957,10 +9960,10 @@ function useYjsDocumentSync({
9957
9960
  return;
9958
9961
  }
9959
9962
  const handleChange = (_events, transaction) => {
9960
- if (transaction?.origin === chunkH74UXL4Q_js.LOCAL_SYNC_ORIGIN) {
9963
+ if (transaction?.origin === chunkHMQVOPQH_js.LOCAL_SYNC_ORIGIN) {
9961
9964
  return;
9962
9965
  }
9963
- const remoteSlides = chunkH74UXL4Q_js.readSlidesFromYDoc(
9966
+ const remoteSlides = chunkHMQVOPQH_js.readSlidesFromYDoc(
9964
9967
  doc
9965
9968
  );
9966
9969
  if (remoteSlides.length === 0) {
@@ -9976,7 +9979,7 @@ function useYjsDocumentSync({
9976
9979
  isApplyingRemoteRef.current = false;
9977
9980
  scheduleWriteBack();
9978
9981
  };
9979
- const unobserve = chunkH74UXL4Q_js.observeYDocSlides(
9982
+ const unobserve = chunkHMQVOPQH_js.observeYDocSlides(
9980
9983
  doc,
9981
9984
  handleChange
9982
9985
  );
@@ -10014,7 +10017,7 @@ function useBroadcastFollower({
10014
10017
  if (!broadcaster) {
10015
10018
  return;
10016
10019
  }
10017
- if (!chunkH74UXL4Q_js.shouldAutoFollowBroadcaster({
10020
+ if (!chunkHMQVOPQH_js.shouldAutoFollowBroadcaster({
10018
10021
  localRole: collab.config.role,
10019
10022
  broadcasterRole: broadcaster.role
10020
10023
  })) {
@@ -10174,10 +10177,10 @@ function useTouchGestures(input) {
10174
10177
  if (!el || !enabled) {
10175
10178
  return;
10176
10179
  }
10177
- const recognizer = chunkH74UXL4Q_js.createTouchGestureRecognizer({
10180
+ const recognizer = chunkHMQVOPQH_js.createTouchGestureRecognizer({
10178
10181
  getScale: () => scaleRef.current,
10179
- minScale: chunkH74UXL4Q_js.MIN_ZOOM_SCALE,
10180
- maxScale: chunkH74UXL4Q_js.MAX_ZOOM_SCALE,
10182
+ minScale: chunkHMQVOPQH_js.MIN_ZOOM_SCALE,
10183
+ maxScale: chunkHMQVOPQH_js.MAX_ZOOM_SCALE,
10181
10184
  callbacks: {
10182
10185
  onPinchZoom: (newScale) => callbacksRef.current.onPinchZoom?.(newScale),
10183
10186
  onSwipe: (direction) => callbacksRef.current.onSwipe?.(direction),
@@ -10217,7 +10220,7 @@ function scrollFocusedIntoView(keyboardInset) {
10217
10220
  return;
10218
10221
  }
10219
10222
  const rect = active.getBoundingClientRect();
10220
- const delta = chunkH74UXL4Q_js.computeScrollDelta(
10223
+ const delta = chunkHMQVOPQH_js.computeScrollDelta(
10221
10224
  { top: rect.top, bottom: rect.bottom },
10222
10225
  window.innerHeight,
10223
10226
  keyboardInset
@@ -10237,8 +10240,8 @@ function useKeyboardInsets(enabled = true) {
10237
10240
  return;
10238
10241
  }
10239
10242
  const update = () => {
10240
- const metrics = chunkH74UXL4Q_js.readViewportMetrics(window);
10241
- const inset = metrics ? chunkH74UXL4Q_js.computeKeyboardInset(metrics) : 0;
10243
+ const metrics = chunkHMQVOPQH_js.readViewportMetrics(window);
10244
+ const inset = metrics ? chunkHMQVOPQH_js.computeKeyboardInset(metrics) : 0;
10242
10245
  setKeyboardInset(inset);
10243
10246
  if (inset > 0) {
10244
10247
  window.requestAnimationFrame(() => scrollFocusedIntoView(inset));
@@ -10249,8 +10252,8 @@ function useKeyboardInsets(enabled = true) {
10249
10252
  vv.addEventListener("scroll", update);
10250
10253
  const onFocusIn = () => {
10251
10254
  window.requestAnimationFrame(() => {
10252
- const metrics = chunkH74UXL4Q_js.readViewportMetrics(window);
10253
- const inset = metrics ? chunkH74UXL4Q_js.computeKeyboardInset(metrics) : 0;
10255
+ const metrics = chunkHMQVOPQH_js.readViewportMetrics(window);
10256
+ const inset = metrics ? chunkHMQVOPQH_js.computeKeyboardInset(metrics) : 0;
10254
10257
  if (inset > 0) {
10255
10258
  scrollFocusedIntoView(inset);
10256
10259
  }
@@ -10263,7 +10266,7 @@ function useKeyboardInsets(enabled = true) {
10263
10266
  document.removeEventListener("focusin", onFocusIn);
10264
10267
  };
10265
10268
  }, [enabled]);
10266
- return { keyboardInset, isKeyboardOpen: chunkH74UXL4Q_js.isKeyboardOpen(keyboardInset) };
10269
+ return { keyboardInset, isKeyboardOpen: chunkHMQVOPQH_js.isKeyboardOpen(keyboardInset) };
10267
10270
  }
10268
10271
 
10269
10272
  // src/viewer/hooks/useViewerBuildingBlocks-canvas-props.ts
@@ -10290,7 +10293,7 @@ function buildCanvasProps(input) {
10290
10293
  } = input;
10291
10294
  const effectiveSlide = mode === "master" ? masterPseudoSlide : activeSlide;
10292
10295
  const effectiveTemplateElements = mode === "master" ? s.activeLayout ? s.activeMaster?.elements ?? [] : [] : templateElements;
10293
- const fieldContext = chunkH74UXL4Q_js.buildFieldSubstitutionContext({
10296
+ const fieldContext = chunkHMQVOPQH_js.buildFieldSubstitutionContext({
10294
10297
  headerFooter: s.headerFooter,
10295
10298
  customProperties: s.customProperties,
10296
10299
  slide: activeSlide
@@ -10300,13 +10303,13 @@ function buildCanvasProps(input) {
10300
10303
  if (mode === "present") {
10301
10304
  presentation.handlePresentationAction(action);
10302
10305
  } else if (action.url) {
10303
- chunkH74UXL4Q_js.safeOpenUrl(action.url);
10306
+ chunkHMQVOPQH_js.safeOpenUrl(action.url);
10304
10307
  }
10305
10308
  };
10306
10309
  const handleHyperlinkClick = (url) => {
10307
- if (chunkH74UXL4Q_js.isPpactionUrl(url)) {
10310
+ if (chunkHMQVOPQH_js.isPpactionUrl(url)) {
10308
10311
  if (mode === "present") {
10309
- const parsed = chunkH74UXL4Q_js.parsePpactionUrl(url);
10312
+ const parsed = chunkHMQVOPQH_js.parsePpactionUrl(url);
10310
10313
  if (parsed) {
10311
10314
  presentation.handlePresentationAction({
10312
10315
  action: parsed.action,
@@ -10316,7 +10319,7 @@ function buildCanvasProps(input) {
10316
10319
  }
10317
10320
  return;
10318
10321
  }
10319
- chunkH74UXL4Q_js.safeOpenUrl(url);
10322
+ chunkHMQVOPQH_js.safeOpenUrl(url);
10320
10323
  };
10321
10324
  return {
10322
10325
  activeSlide: effectiveSlide,
@@ -10457,6 +10460,12 @@ function buildToolbarAnimationHandlers(input) {
10457
10460
  return;
10458
10461
  }
10459
10462
  const current = activeSlide.animations ?? [];
10463
+ if (group === "motionPath") {
10464
+ propertyHandlers.handleUpdateSlide({
10465
+ animations: chunkHMQVOPQH_js.applyMotionPathPreset(current, selectedElement.id, preset)
10466
+ });
10467
+ return;
10468
+ }
10460
10469
  const existing = current.find((a) => a.elementId === selectedElement.id);
10461
10470
  const presetValue = preset;
10462
10471
  if (existing) {
@@ -10646,7 +10655,7 @@ function buildToolbarProps(input) {
10646
10655
  onOpenFile,
10647
10656
  onOpenRecentFile,
10648
10657
  onCreatePresentation: (templateId) => {
10649
- s.setSlides(chunkH74UXL4Q_js.createBackstagePresentation(templateId));
10658
+ s.setSlides(chunkHMQVOPQH_js.createBackstagePresentation(templateId));
10650
10659
  s.setActiveSlideIndex(0);
10651
10660
  s.setSelectedElementId(null);
10652
10661
  s.setSelectedElementIds([]);
@@ -10665,6 +10674,7 @@ function buildToolbarProps(input) {
10665
10674
  onRunAccessibilityCheck: dialogs.handleRunAccessibilityCheck,
10666
10675
  onToggleSlideSorter: () => s.setShowSlideSorter((p) => !p),
10667
10676
  onOpenReadingView: () => s.setShowReadingView(true),
10677
+ onOpenOutlineView: () => s.setShowOutlineView(true),
10668
10678
  onUpdateTextStyle: ops.updateSelectedTextStyle,
10669
10679
  onTransformTextCase: ops.updateSelectedTextCase,
10670
10680
  isOverflowMenuOpen: s.isOverflowMenuOpen,
@@ -10702,7 +10712,7 @@ function buildToolbarProps(input) {
10702
10712
  isCommentsPanelOpen: s.isInspectorPaneOpen,
10703
10713
  slideCommentCount: activeSlide?.comments?.length ?? 0,
10704
10714
  formatPainterActive: s.formatPainterActive,
10705
- canActivateFormatPainter: chunkH74UXL4Q_js.hasCopyableFormat(selectedElement),
10715
+ canActivateFormatPainter: chunkHMQVOPQH_js.hasCopyableFormat(selectedElement),
10706
10716
  onToggleFormatPainter: () => s.setFormatPainterActive((p) => !p),
10707
10717
  isSelectionPaneOpen: s.isSelectionPaneOpen,
10708
10718
  onToggleSelectionPane: () => s.setIsSelectionPaneOpen((p) => !p),
@@ -10965,7 +10975,7 @@ function useViewerBuildingBlocks(input) {
10965
10975
  }, [incomingContent]);
10966
10976
  const onOpenFile = react.useCallback(() => {
10967
10977
  void (async () => {
10968
- const picked = await chunkH74UXL4Q_js.openPptxFile();
10978
+ const picked = await chunkHMQVOPQH_js.openPptxFile();
10969
10979
  if (picked) {
10970
10980
  setContent(picked.buffer);
10971
10981
  }
@@ -10973,7 +10983,7 @@ function useViewerBuildingBlocks(input) {
10973
10983
  }, []);
10974
10984
  const onOpenRecentFile = react.useCallback((key) => {
10975
10985
  void (async () => {
10976
- const bytes = await chunkH74UXL4Q_js.readBackstageRecentFile(key);
10986
+ const bytes = await chunkHMQVOPQH_js.readBackstageRecentFile(key);
10977
10987
  if (bytes) {
10978
10988
  setContent(bytes);
10979
10989
  }