@aixa-transformation/pptx-viewer 2.0.2 → 2.0.15

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.
@@ -1,8 +1,8 @@
1
1
  'use strict';
2
2
 
3
- var chunk2TOLRBFU_js = require('./chunk-2TOLRBFU.js');
3
+ var chunkIVCWQLQK_js = require('./chunk-IVCWQLQK.js');
4
4
  var chunkCUUYYYC5_js = require('./chunk-CUUYYYC5.js');
5
- var chunkAD2CLKY6_js = require('./chunk-AD2CLKY6.js');
5
+ var chunkKAP5TS7O_js = require('./chunk-KAP5TS7O.js');
6
6
  var React4 = require('react');
7
7
  var lu = require('react-icons/lu');
8
8
  var clsx = require('clsx');
@@ -18,12 +18,12 @@ var JSZip__default = /*#__PURE__*/_interopDefault(JSZip);
18
18
 
19
19
  // src/viewer/utils/animation-effects.ts
20
20
  function getAnimationInitialStyle2(preset, nativeAnimation) {
21
- return chunk2TOLRBFU_js.getAnimationInitialStyle(preset, nativeAnimation);
21
+ return chunkIVCWQLQK_js.getAnimationInitialStyle(preset, nativeAnimation);
22
22
  }
23
23
  function useVirtualizedSlides({
24
24
  totalItems,
25
25
  itemHeight,
26
- overscan = chunk2TOLRBFU_js.DEFAULT_VIRTUAL_OVERSCAN
26
+ overscan = chunkIVCWQLQK_js.DEFAULT_VIRTUAL_OVERSCAN
27
27
  }) {
28
28
  const scrollContainerRef = React4.useRef(null);
29
29
  const [scrollTop, setScrollTop] = React4.useState(0);
@@ -53,7 +53,7 @@ function useVirtualizedSlides({
53
53
  resizeObserver?.disconnect();
54
54
  };
55
55
  }, []);
56
- const range = chunk2TOLRBFU_js.computeVirtualRange(totalItems, itemHeight, scrollTop, viewportHeight, overscan);
56
+ const range = chunkIVCWQLQK_js.computeVirtualRange(totalItems, itemHeight, scrollTop, viewportHeight, overscan);
57
57
  const safeItemHeight = Math.max(itemHeight, 1);
58
58
  const scrollToIndex = React4.useCallback(
59
59
  (index, behavior = "smooth") => {
@@ -116,7 +116,7 @@ function usePresenceTracking({
116
116
  awareness.setLocalStateField("presence", state);
117
117
  lastBroadcastRef.current = Date.now();
118
118
  };
119
- if (elapsed >= chunk2TOLRBFU_js.BROADCAST_THROTTLE_MS) {
119
+ if (elapsed >= chunkIVCWQLQK_js.BROADCAST_THROTTLE_MS) {
120
120
  if (pendingBroadcastRef.current) {
121
121
  clearTimeout(pendingBroadcastRef.current);
122
122
  pendingBroadcastRef.current = null;
@@ -126,7 +126,7 @@ function usePresenceTracking({
126
126
  pendingBroadcastRef.current = setTimeout(() => {
127
127
  pendingBroadcastRef.current = null;
128
128
  flush();
129
- }, chunk2TOLRBFU_js.BROADCAST_THROTTLE_MS - elapsed);
129
+ }, chunkIVCWQLQK_js.BROADCAST_THROTTLE_MS - elapsed);
130
130
  }
131
131
  },
132
132
  [awareness, userName, userColor, userAvatar, role]
@@ -151,7 +151,7 @@ function usePresenceTracking({
151
151
  return;
152
152
  }
153
153
  const handleChange = () => {
154
- const users = chunk2TOLRBFU_js.derivePresenceList(
154
+ const users = chunkIVCWQLQK_js.derivePresenceList(
155
155
  awareness.getStates(),
156
156
  localClientId,
157
157
  canvasWidth,
@@ -202,7 +202,7 @@ function useYjsProvider({ config }) {
202
202
  const timeoutRef = React4.useRef(null);
203
203
  const gateRef = React4.useRef(null);
204
204
  if (!gateRef.current) {
205
- gateRef.current = chunk2TOLRBFU_js.createSyncGate(() => setSynced(true));
205
+ gateRef.current = chunkIVCWQLQK_js.createSyncGate(() => setSynced(true));
206
206
  }
207
207
  const teardown = React4.useCallback(() => {
208
208
  if (timeoutRef.current) {
@@ -240,7 +240,7 @@ function useYjsProvider({ config }) {
240
240
  if (config.authToken) {
241
241
  opts.password = config.authToken;
242
242
  }
243
- const provider = new WebrtcProvider(chunk2TOLRBFU_js.validateRoomId(config.roomId), yDoc, opts);
243
+ const provider = new WebrtcProvider(chunkIVCWQLQK_js.validateRoomId(config.roomId), yDoc, opts);
244
244
  setDoc(yDoc);
245
245
  setAwareness(provider.awareness);
246
246
  setClientId(provider.awareness.clientID);
@@ -282,13 +282,13 @@ function useYjsProvider({ config }) {
282
282
  if (!config) {
283
283
  return;
284
284
  }
285
- const roomId = chunk2TOLRBFU_js.validateRoomId(config.roomId);
286
- const transport = config.transport ?? chunk2TOLRBFU_js.resolveTransportForServerUrl(config.serverUrl);
285
+ const roomId = chunkIVCWQLQK_js.validateRoomId(config.roomId);
286
+ const transport = config.transport ?? chunkIVCWQLQK_js.resolveTransportForServerUrl(config.serverUrl);
287
287
  if (transport === "webrtc") {
288
288
  await initWebrtc();
289
289
  return;
290
290
  }
291
- if (chunk2TOLRBFU_js.isMixedContentBlocked(config.serverUrl)) {
291
+ if (chunkIVCWQLQK_js.isMixedContentBlocked(config.serverUrl)) {
292
292
  console.warn(
293
293
  `[pptx-viewer] Refusing to connect: insecure ws:// server "${config.serverUrl}" is blocked from a secure (https) page. Use a wss:// URL.`
294
294
  );
@@ -348,7 +348,7 @@ function useYjsProvider({ config }) {
348
348
  cleanupRef.current = null;
349
349
  setStatus("error");
350
350
  }
351
- }, chunk2TOLRBFU_js.CONNECTION_TIMEOUT_MS);
351
+ }, chunkIVCWQLQK_js.CONNECTION_TIMEOUT_MS);
352
352
  }
353
353
  setDoc(yDoc);
354
354
  setAwareness(provider.awareness);
@@ -394,7 +394,7 @@ function useCollaborativeState({
394
394
  canvasWidth,
395
395
  canvasHeight
396
396
  }) {
397
- const userColor = chunk2TOLRBFU_js.sanitizeColor(config?.userColor, "#6366f1");
397
+ const userColor = chunkIVCWQLQK_js.sanitizeColor(config?.userColor, "#6366f1");
398
398
  const { status, awareness, doc, clientId, synced, retry } = useYjsProvider({ config });
399
399
  const { remoteUsers, broadcastPresence } = usePresenceTracking({
400
400
  awareness,
@@ -461,7 +461,7 @@ function useSheetDismissDrag(onClose, threshold = 120) {
461
461
 
462
462
  // src/viewer/utils/clone.ts
463
463
  function cloneHistorySnapshot2(snapshot) {
464
- return chunk2TOLRBFU_js.cloneHistorySnapshot(snapshot);
464
+ return chunkIVCWQLQK_js.cloneHistorySnapshot(snapshot);
465
465
  }
466
466
 
467
467
  // src/viewer/hooks/useEditorHistory.ts
@@ -510,8 +510,8 @@ function useEditorHistory(input) {
510
510
  width: canvasSize.width,
511
511
  height: canvasSize.height,
512
512
  activeSlideIndex,
513
- slides: slides.map(chunk2TOLRBFU_js.cloneSlide),
514
- templateElementsBySlideId: chunk2TOLRBFU_js.cloneTemplateElementsBySlideId(templateElementsBySlideId),
513
+ slides: slides.map(chunkIVCWQLQK_js.cloneSlide),
514
+ templateElementsBySlideId: chunkIVCWQLQK_js.cloneTemplateElementsBySlideId(templateElementsBySlideId),
515
515
  ...actionLabel ? { actionLabel } : {}
516
516
  };
517
517
  },
@@ -524,9 +524,9 @@ function useEditorHistory(input) {
524
524
  width: snapshot.width,
525
525
  height: snapshot.height
526
526
  });
527
- setSlides(snapshot.slides.map(chunk2TOLRBFU_js.cloneSlide));
527
+ setSlides(snapshot.slides.map(chunkIVCWQLQK_js.cloneSlide));
528
528
  setTemplateElementsBySlideId(
529
- chunk2TOLRBFU_js.cloneTemplateElementsBySlideId(snapshot.templateElementsBySlideId)
529
+ chunkIVCWQLQK_js.cloneTemplateElementsBySlideId(snapshot.templateElementsBySlideId)
530
530
  );
531
531
  setActiveSlideIndex(Math.min(snapshot.activeSlideIndex, maxSlideIndex));
532
532
  setSelectedElementIds([]);
@@ -790,7 +790,7 @@ var GLYPH_COMPONENTS = {
790
790
  plus: lu.LuPlus,
791
791
  triangle: lu.LuTriangle
792
792
  };
793
- var SHAPE_PRESETS = chunk2TOLRBFU_js.SHAPE_PRESET_DEFS.map(
793
+ var SHAPE_PRESETS = chunkIVCWQLQK_js.SHAPE_PRESET_DEFS.map(
794
794
  (def) => ({
795
795
  type: def.type,
796
796
  label: def.label,
@@ -1035,7 +1035,7 @@ function executeMediaCommand(command) {
1035
1035
  if (!el) {
1036
1036
  return false;
1037
1037
  }
1038
- const parsed = chunk2TOLRBFU_js.parseMediaCommand(command.command);
1038
+ const parsed = chunkIVCWQLQK_js.parseMediaCommand(command.command);
1039
1039
  if (!parsed) {
1040
1040
  return false;
1041
1041
  }
@@ -1198,7 +1198,7 @@ function useAnimationPlayback(input) {
1198
1198
  (controller, group) => {
1199
1199
  driveBuildReveal(
1200
1200
  controller,
1201
- chunk2TOLRBFU_js.PresentationAnimationController.collectBuildStepIds(group),
1201
+ chunkIVCWQLQK_js.PresentationAnimationController.collectBuildStepIds(group),
1202
1202
  setPresentationElementStates,
1203
1203
  buildRafRef
1204
1204
  );
@@ -1261,7 +1261,7 @@ function useAnimationPlayback(input) {
1261
1261
  setHoverTriggerShapeIds(/* @__PURE__ */ new Set());
1262
1262
  return;
1263
1263
  }
1264
- const controller = chunk2TOLRBFU_js.PresentationAnimationController.fromSlide(slide);
1264
+ const controller = chunkIVCWQLQK_js.PresentationAnimationController.fromSlide(slide);
1265
1265
  controllerRef.current = controller;
1266
1266
  setPresentationKeyframesCss(controller.keyframesCss);
1267
1267
  setInteractiveTriggerShapeIds(controller.interactiveTriggerShapeIds);
@@ -1398,7 +1398,7 @@ function useAnimationPlayback(input) {
1398
1398
  }))
1399
1399
  );
1400
1400
  entranceAnimations.forEach((animation, animationIndex) => {
1401
- const delay = chunk2TOLRBFU_js.computeEntranceAnimationDelay(animation.delayMs, animationIndex);
1401
+ const delay = chunkIVCWQLQK_js.computeEntranceAnimationDelay(animation.delayMs, animationIndex);
1402
1402
  const timer = window.setTimeout(() => {
1403
1403
  setPresentationAnimations(
1404
1404
  (previousAnimations) => previousAnimations.map(
@@ -1434,12 +1434,12 @@ function useAnimationPlayback(input) {
1434
1434
  presentationTimersRef
1435
1435
  };
1436
1436
  }
1437
- var PRESENTER_CHANNEL_NAME = chunk2TOLRBFU_js.PRESENTATION_CHANNEL_NAME;
1438
- var AUDIENCE_HASH = chunk2TOLRBFU_js.PRESENTATION_HASH;
1439
- var PRESENTER_MSG_ORIGIN = chunk2TOLRBFU_js.PRESENTATION_MESSAGE_ORIGIN;
1440
- var AUDIENCE_NONCE_KEY = chunk2TOLRBFU_js.PRESENTATION_NONCE_KEY;
1437
+ var PRESENTER_CHANNEL_NAME = chunkIVCWQLQK_js.PRESENTATION_CHANNEL_NAME;
1438
+ var AUDIENCE_HASH = chunkIVCWQLQK_js.PRESENTATION_HASH;
1439
+ var PRESENTER_MSG_ORIGIN = chunkIVCWQLQK_js.PRESENTATION_MESSAGE_ORIGIN;
1440
+ var AUDIENCE_NONCE_KEY = chunkIVCWQLQK_js.PRESENTATION_NONCE_KEY;
1441
1441
  function generateSessionId() {
1442
- return chunk2TOLRBFU_js.createPresentationSessionId();
1442
+ return chunkIVCWQLQK_js.createPresentationSessionId();
1443
1443
  }
1444
1444
  function parseAudienceNonce() {
1445
1445
  const hash = window.location.hash;
@@ -1475,7 +1475,7 @@ function usePresenterWindow(input) {
1475
1475
  }, []);
1476
1476
  const swapDisplays = React4.useCallback(async () => {
1477
1477
  const audience = audienceWindowRef.current;
1478
- return audience && !audience.closed ? chunk2TOLRBFU_js.swapPresentationWindows(window, audience) : false;
1478
+ return audience && !audience.closed ? chunkIVCWQLQK_js.swapPresentationWindows(window, audience) : false;
1479
1479
  }, []);
1480
1480
  const syncSlideToAudience = React4.useCallback(
1481
1481
  (slideIndex) => {
@@ -1539,7 +1539,7 @@ function usePresenterWindow(input) {
1539
1539
  pollTimerRef.current = null;
1540
1540
  }
1541
1541
  if (closingSessionId) {
1542
- void chunk2TOLRBFU_js.clearAudienceContent(closingSessionId);
1542
+ void chunkIVCWQLQK_js.clearAudienceContent(closingSessionId);
1543
1543
  }
1544
1544
  }, [getChannel]);
1545
1545
  const openAudienceWindow = React4.useCallback(() => {
@@ -1557,10 +1557,10 @@ function usePresenterWindow(input) {
1557
1557
  audienceWindowRef.current = blankWin;
1558
1558
  const sessionId = generateSessionId();
1559
1559
  sessionIdRef.current = sessionId;
1560
- const audienceUrl = chunk2TOLRBFU_js.buildPresentationAudienceUrl(window.location.href, sessionId);
1561
- void chunk2TOLRBFU_js.resolveAudienceScreenPlacement(window).then((placement) => {
1560
+ const audienceUrl = chunkIVCWQLQK_js.buildPresentationAudienceUrl(window.location.href, sessionId);
1561
+ void chunkIVCWQLQK_js.resolveAudienceScreenPlacement(window).then((placement) => {
1562
1562
  if (placement && audienceWindowRef.current === blankWin && !blankWin.closed) {
1563
- chunk2TOLRBFU_js.placeAudienceWindow(blankWin, placement);
1563
+ chunkIVCWQLQK_js.placeAudienceWindow(blankWin, placement);
1564
1564
  }
1565
1565
  return void 0;
1566
1566
  });
@@ -1590,7 +1590,7 @@ function usePresenterWindow(input) {
1590
1590
  }
1591
1591
  };
1592
1592
  if (content) {
1593
- void chunk2TOLRBFU_js.storeAudienceContent(content, sessionId).then(() => navigateOrClose(true)).catch(() => navigateOrClose(false));
1593
+ void chunkIVCWQLQK_js.storeAudienceContent(content, sessionId).then(() => navigateOrClose(true)).catch(() => navigateOrClose(false));
1594
1594
  } else {
1595
1595
  navigateOrClose(true);
1596
1596
  }
@@ -1616,7 +1616,7 @@ function usePresenterWindow(input) {
1616
1616
  }
1617
1617
  const handleMessage = (event) => {
1618
1618
  const message = event.data;
1619
- if (chunk2TOLRBFU_js.isPresentationSessionMessage(message) && message.type === "audience-ready" && message.sessionId === sessionIdRef.current) {
1619
+ if (chunkIVCWQLQK_js.isPresentationSessionMessage(message) && message.type === "audience-ready" && message.sessionId === sessionIdRef.current) {
1620
1620
  syncStateToAudience(snapshotRef.current);
1621
1621
  }
1622
1622
  };
@@ -1645,7 +1645,7 @@ function usePresenterWindow(input) {
1645
1645
  React4.useEffect(() => {
1646
1646
  const handleBeforeUnload = () => {
1647
1647
  if (sessionIdRef.current) {
1648
- void chunk2TOLRBFU_js.clearAudienceContent(sessionIdRef.current);
1648
+ void chunkIVCWQLQK_js.clearAudienceContent(sessionIdRef.current);
1649
1649
  }
1650
1650
  };
1651
1651
  window.addEventListener("beforeunload", handleBeforeUnload);
@@ -1698,7 +1698,7 @@ function useAudienceMode(input) {
1698
1698
  }
1699
1699
  channel.onmessage = (event) => {
1700
1700
  const data = event.data;
1701
- if (!chunk2TOLRBFU_js.isPresentationSessionMessage(data) || data.origin !== PRESENTER_MSG_ORIGIN) {
1701
+ if (!chunkIVCWQLQK_js.isPresentationSessionMessage(data) || data.origin !== PRESENTER_MSG_ORIGIN) {
1702
1702
  return;
1703
1703
  }
1704
1704
  if (expectedSessionId && data.sessionId !== expectedSessionId) {
@@ -1713,7 +1713,7 @@ function useAudienceMode(input) {
1713
1713
  }
1714
1714
  if (data.type === "presenter-exit") {
1715
1715
  if (expectedSessionId) {
1716
- void chunk2TOLRBFU_js.clearAudienceContent(expectedSessionId);
1716
+ void chunkIVCWQLQK_js.clearAudienceContent(expectedSessionId);
1717
1717
  }
1718
1718
  onSetMode("edit");
1719
1719
  try {
@@ -1724,7 +1724,7 @@ function useAudienceMode(input) {
1724
1724
  };
1725
1725
  if (expectedSessionId) {
1726
1726
  channel.postMessage({
1727
- origin: chunk2TOLRBFU_js.PRESENTATION_MESSAGE_ORIGIN,
1727
+ origin: chunkIVCWQLQK_js.PRESENTATION_MESSAGE_ORIGIN,
1728
1728
  type: "audience-ready",
1729
1729
  sessionId: expectedSessionId
1730
1730
  });
@@ -1989,7 +1989,7 @@ function handlePresentationActionImpl(action, deps) {
1989
1989
  return;
1990
1990
  }
1991
1991
  if (action.url && !actionStr.includes("hlinksldjump")) {
1992
- if (chunk2TOLRBFU_js.isUrlSafe(action.url)) {
1992
+ if (chunkIVCWQLQK_js.isUrlSafe(action.url)) {
1993
1993
  window.open(action.url, "_blank", "noopener,noreferrer");
1994
1994
  }
1995
1995
  }
@@ -1999,7 +1999,7 @@ function handlePresentationActionImpl(action, deps) {
1999
1999
  function executeSlideTransition(nextSlideIndex, deps) {
2000
2000
  const incomingSlide = deps.slides[nextSlideIndex];
2001
2001
  const transition = incomingSlide?.transition;
2002
- const durationMs = deps.playTransition ? chunk2TOLRBFU_js.resolveTransitionDurationMs(transition) : 0;
2002
+ const durationMs = deps.playTransition ? chunkIVCWQLQK_js.resolveTransitionDurationMs(transition) : 0;
2003
2003
  deps.clearPresentationTimers();
2004
2004
  deps.setPresentationSlideIndex(nextSlideIndex);
2005
2005
  deps.onSetActiveSlideIndex(nextSlideIndex);
@@ -2245,17 +2245,17 @@ function useZoomNavigation(input) {
2245
2245
  };
2246
2246
  }
2247
2247
  function usePresenterConsole(slideIndex) {
2248
- const timerRef = React4.useRef(chunk2TOLRBFU_js.createPresenterTimer());
2249
- const [snapshot, setSnapshot] = React4.useState(() => chunk2TOLRBFU_js.createInitialPresentationSnapshot(slideIndex));
2248
+ const timerRef = React4.useRef(chunkIVCWQLQK_js.createPresenterTimer());
2249
+ const [snapshot, setSnapshot] = React4.useState(() => chunkIVCWQLQK_js.createInitialPresentationSnapshot(slideIndex));
2250
2250
  const patch = React4.useCallback((value) => {
2251
- setSnapshot((current) => chunk2TOLRBFU_js.mergePresentationSnapshot(current, value));
2251
+ setSnapshot((current) => chunkIVCWQLQK_js.mergePresentationSnapshot(current, value));
2252
2252
  }, []);
2253
2253
  React4.useEffect(() => patch({ slideIndex }), [patch, slideIndex]);
2254
2254
  React4.useEffect(() => {
2255
2255
  const timer = window.setInterval(() => {
2256
2256
  patch({
2257
2257
  paused: timerRef.current.paused,
2258
- elapsedMs: chunk2TOLRBFU_js.presenterElapsed(timerRef.current)
2258
+ elapsedMs: chunkIVCWQLQK_js.presenterElapsed(timerRef.current)
2259
2259
  });
2260
2260
  }, 1e3);
2261
2261
  return () => window.clearInterval(timer);
@@ -2265,19 +2265,19 @@ function usePresenterConsole(slideIndex) {
2265
2265
  applyAudienceSnapshot: setSnapshot,
2266
2266
  setBlackout: (blackout) => patch({ blackout }),
2267
2267
  toggleTimer: () => {
2268
- timerRef.current = chunk2TOLRBFU_js.togglePresenterTimer(timerRef.current);
2268
+ timerRef.current = chunkIVCWQLQK_js.togglePresenterTimer(timerRef.current);
2269
2269
  patch({
2270
2270
  paused: timerRef.current.paused,
2271
- elapsedMs: chunk2TOLRBFU_js.presenterElapsed(timerRef.current)
2271
+ elapsedMs: chunkIVCWQLQK_js.presenterElapsed(timerRef.current)
2272
2272
  });
2273
2273
  },
2274
2274
  resetTimer: () => {
2275
- timerRef.current = chunk2TOLRBFU_js.resetPresenterTimer();
2275
+ timerRef.current = chunkIVCWQLQK_js.resetPresenterTimer();
2276
2276
  patch({ paused: false, elapsedMs: 0 });
2277
2277
  },
2278
2278
  stepZoom: (direction) => setSnapshot(
2279
- (current) => chunk2TOLRBFU_js.mergePresentationSnapshot(current, {
2280
- zoom: chunk2TOLRBFU_js.stepPresenterZoom(
2279
+ (current) => chunkIVCWQLQK_js.mergePresentationSnapshot(current, {
2280
+ zoom: chunkIVCWQLQK_js.stepPresenterZoom(
2281
2281
  current.zoom ?? { scale: 1, originX: 0.5, originY: 0.5 },
2282
2282
  direction
2283
2283
  )
@@ -2845,7 +2845,7 @@ function findInSlides(slides, findQuery, findMatchCase) {
2845
2845
  const normalised = findMatchCase ? findQuery : findQuery.toLowerCase();
2846
2846
  slides.forEach((slide, slideIndex) => {
2847
2847
  for (const element of slide.elements || []) {
2848
- if (!chunkAD2CLKY6_js.hasTextProperties(element)) {
2848
+ if (!chunkKAP5TS7O_js.hasTextProperties(element)) {
2849
2849
  continue;
2850
2850
  }
2851
2851
  const segments = element.textSegments ?? [];
@@ -2896,7 +2896,7 @@ function applyFindReplacements(slides, toReplace, replaceQuery) {
2896
2896
  continue;
2897
2897
  }
2898
2898
  const element = slide.elements[elIdx];
2899
- if (!chunkAD2CLKY6_js.hasTextProperties(element)) {
2899
+ if (!chunkKAP5TS7O_js.hasTextProperties(element)) {
2900
2900
  continue;
2901
2901
  }
2902
2902
  const segments = [...element.textSegments ?? []];
@@ -3784,12 +3784,12 @@ function useViewerState(input) {
3784
3784
  function partitionTemplateElements(slides) {
3785
3785
  const templateElementsBySlideId = {};
3786
3786
  const nextSlides = slides.map((slide) => {
3787
- const template = slide.elements.filter((el) => chunk2TOLRBFU_js.isTemplateElement(el));
3787
+ const template = slide.elements.filter((el) => chunkIVCWQLQK_js.isTemplateElement(el));
3788
3788
  if (template.length === 0) {
3789
3789
  return slide;
3790
3790
  }
3791
3791
  templateElementsBySlideId[slide.id] = template;
3792
- return { ...slide, elements: slide.elements.filter((el) => !chunk2TOLRBFU_js.isTemplateElement(el)) };
3792
+ return { ...slide, elements: slide.elements.filter((el) => !chunkIVCWQLQK_js.isTemplateElement(el)) };
3793
3793
  });
3794
3794
  return { slides: nextSlides, templateElementsBySlideId };
3795
3795
  }
@@ -3863,7 +3863,7 @@ function useLoadContent({
3863
3863
  );
3864
3864
  }
3865
3865
  const previousHandler = handlerRef.current;
3866
- const handler = new chunkAD2CLKY6_js.PptxHandler();
3866
+ const handler = new chunkKAP5TS7O_js.PptxHandler();
3867
3867
  const parsed = await handler.load(buffer, {
3868
3868
  // PowerPoint supports externally linked pictures. The project upload is
3869
3869
  // already security-scanned; allow the browser viewer to retain those
@@ -3880,7 +3880,7 @@ function useLoadContent({
3880
3880
  handlerRef.current = null;
3881
3881
  const mediaElements = [];
3882
3882
  for (const slide of parsed.slides) {
3883
- chunk2TOLRBFU_js.collectMediaElements(slide.elements, mediaElements);
3883
+ chunkIVCWQLQK_js.collectMediaElements(slide.elements, mediaElements);
3884
3884
  }
3885
3885
  for (const url of mediaDataUrls.values()) {
3886
3886
  if (url.startsWith("blob:")) {
@@ -3921,7 +3921,7 @@ function useLoadContent({
3921
3921
  }
3922
3922
  })
3923
3923
  );
3924
- const { paths: imagePaths, refs: imageRefs } = chunk2TOLRBFU_js.collectImagePaths(parsed.slides);
3924
+ const { paths: imagePaths, refs: imageRefs } = chunkIVCWQLQK_js.collectImagePaths(parsed.slides);
3925
3925
  let nextSlides = parsed.slides;
3926
3926
  if (imagePaths.size > 0) {
3927
3927
  const resolvedMap = /* @__PURE__ */ new Map();
@@ -4010,7 +4010,7 @@ function useLoadContent({
4010
4010
  setHasMacros(parsed.hasMacros === true);
4011
4011
  setHasDigitalSignatures(parsed.hasDigitalSignatures === true);
4012
4012
  setDigitalSignatureCount(parsed.digitalSignatureCount ?? 0);
4013
- setGuides(chunk2TOLRBFU_js.buildInitialGuides(parsed.presentationGuides, parsed.slides[0]?.guides));
4013
+ setGuides(chunkIVCWQLQK_js.buildInitialGuides(parsed.presentationGuides, parsed.slides[0]?.guides));
4014
4014
  setActiveSlideIndex(0);
4015
4015
  clearSelection();
4016
4016
  setIsDirty(false);
@@ -4018,7 +4018,7 @@ function useLoadContent({
4018
4018
  onContentApplied?.();
4019
4019
  } catch (err) {
4020
4020
  if (!cancelled && token === renderTokenRef.current) {
4021
- if (err instanceof chunkAD2CLKY6_js.EncryptedFileError) {
4021
+ if (err instanceof chunkKAP5TS7O_js.EncryptedFileError) {
4022
4022
  setIsEncrypted(true);
4023
4023
  } else {
4024
4024
  setError(err instanceof Error ? err.message : String(err));
@@ -4095,7 +4095,7 @@ function useAutosave(input) {
4095
4095
  isSavingRef.current = false;
4096
4096
  return;
4097
4097
  }
4098
- await chunk2TOLRBFU_js.saveAutosaveSnapshot(filePathRef.current, data);
4098
+ await chunkIVCWQLQK_js.saveAutosaveSnapshot(filePathRef.current, data);
4099
4099
  setAutosaveStatus({ state: "saved", timestamp: Date.now() });
4100
4100
  } catch (err) {
4101
4101
  setAutosaveStatus({
@@ -4136,7 +4136,7 @@ function cn(...inputs) {
4136
4136
 
4137
4137
  // src/viewer/utils/text-utils.tsx
4138
4138
  function getTextStyleForElement(element, fallbackColor) {
4139
- if (!chunkAD2CLKY6_js.hasTextProperties(element)) {
4139
+ if (!chunkKAP5TS7O_js.hasTextProperties(element)) {
4140
4140
  return { color: fallbackColor };
4141
4141
  }
4142
4142
  const textDecorationTokens = [];
@@ -4150,20 +4150,24 @@ function getTextStyleForElement(element, fallbackColor) {
4150
4150
  const textDecorationStyle = isDoubleStrike ? "double" : void 0;
4151
4151
  const hasItalicRuns = element.textStyle?.italic || Boolean(element.textSegments?.some((segment) => segment.style?.italic));
4152
4152
  const isRtl = element.textStyle?.rtl === true;
4153
- const resolvedTextColor = element.textStyle?.hyperlink ? chunk2TOLRBFU_js.normalizeHexColor(element.textStyle?.color, HYPERLINK_COLOR) : chunk2TOLRBFU_js.normalizeHexColor(element.textStyle?.color, fallbackColor);
4153
+ const resolvedTextColor = element.textStyle?.hyperlink ? chunkIVCWQLQK_js.normalizeHexColor(element.textStyle?.color, HYPERLINK_COLOR) : chunkIVCWQLQK_js.normalizeHexColor(element.textStyle?.color, fallbackColor);
4154
4154
  const bodyTop = element.textStyle?.bodyInsetTop ?? DEFAULT_BODY_INSET_TB_PX;
4155
4155
  const bodyBottom = element.textStyle?.bodyInsetBottom ?? DEFAULT_BODY_INSET_TB_PX;
4156
4156
  const bodyLeft = element.textStyle?.bodyInsetLeft ?? DEFAULT_BODY_INSET_LR_PX;
4157
4157
  const bodyRight = element.textStyle?.bodyInsetRight ?? DEFAULT_BODY_INSET_LR_PX;
4158
- const writingMode = chunk2TOLRBFU_js.toCssWritingMode(element.textStyle?.textDirection);
4159
- const textOrientation = chunk2TOLRBFU_js.toCssTextOrientation(element.textStyle?.textDirection);
4160
- const verticalDirection = chunk2TOLRBFU_js.toCssVerticalDirection(element.textStyle?.textDirection);
4158
+ const hasParagraphIndents = Boolean(element.paragraphIndents?.length);
4159
+ const bodyParagraphMarginLeft = hasParagraphIndents ? 0 : element.textStyle?.paragraphMarginLeft ?? 0;
4160
+ const bodyParagraphMarginRight = hasParagraphIndents ? 0 : element.textStyle?.paragraphMarginRight ?? 0;
4161
+ const bodyParagraphIndent = hasParagraphIndents ? 0 : element.textStyle?.paragraphIndent ?? 0;
4162
+ const writingMode = chunkIVCWQLQK_js.toCssWritingMode(element.textStyle?.textDirection);
4163
+ const textOrientation = chunkIVCWQLQK_js.toCssTextOrientation(element.textStyle?.textDirection);
4164
+ const verticalDirection = chunkIVCWQLQK_js.toCssVerticalDirection(element.textStyle?.textDirection);
4161
4165
  const resolvedDirection = verticalDirection || (isRtl ? "rtl" : "ltr");
4162
4166
  const resolvedUnicodeBidi = isRtl ? "plaintext" : void 0;
4163
4167
  const hasSegments = (element.textSegments?.length ?? 0) > 0;
4164
4168
  return {
4165
4169
  color: resolvedTextColor,
4166
- backgroundColor: !hasSegments && element.textStyle?.highlightColor ? chunk2TOLRBFU_js.normalizeHexColor(element.textStyle.highlightColor, void 0) : void 0,
4170
+ backgroundColor: !hasSegments && element.textStyle?.highlightColor ? chunkIVCWQLQK_js.normalizeHexColor(element.textStyle.highlightColor, void 0) : void 0,
4167
4171
  textAlign: (() => {
4168
4172
  const a = element.textStyle?.align;
4169
4173
  if (a === "justLow" || a === "dist" || a === "thaiDist") {
@@ -4179,12 +4183,12 @@ function getTextStyleForElement(element, fallbackColor) {
4179
4183
  textDecorationLine: textDecorationTokens.length > 0 ? textDecorationTokens.join(" ") : "none",
4180
4184
  textDecorationStyle,
4181
4185
  fontFamily: element.textStyle?.fontFamily || DEFAULT_FONT_FAMILY,
4182
- lineHeight: chunk2TOLRBFU_js.resolveLineHeight(element.textStyle, hasItalicRuns),
4186
+ lineHeight: chunkIVCWQLQK_js.resolveLineHeight(element.textStyle, hasItalicRuns),
4183
4187
  paddingTop: bodyTop + (hasItalicRuns ? 1 : 0),
4184
4188
  paddingBottom: bodyBottom + (hasItalicRuns ? 1 : 0),
4185
- paddingLeft: bodyLeft + (element.textStyle?.paragraphMarginLeft || 0),
4186
- paddingRight: bodyRight + (element.textStyle?.paragraphMarginRight || 0),
4187
- textIndent: element.textStyle?.paragraphIndent || 0,
4189
+ paddingLeft: bodyLeft + bodyParagraphMarginLeft,
4190
+ paddingRight: bodyRight + bodyParagraphMarginRight,
4191
+ textIndent: bodyParagraphIndent,
4188
4192
  overflow: "visible",
4189
4193
  writingMode,
4190
4194
  textOrientation,
@@ -4192,7 +4196,7 @@ function getTextStyleForElement(element, fallbackColor) {
4192
4196
  // Auto-fit: use OOXML-provided fontScale/lnSpcReduction when available,
4193
4197
  // otherwise fall back to heuristic estimation. The pure font-scale maths
4194
4198
  // now lives in pptx-viewer-shared (computeAutoFitTextStyle).
4195
- ...chunk2TOLRBFU_js.computeAutoFitTextStyle({
4199
+ ...chunkIVCWQLQK_js.computeAutoFitTextStyle({
4196
4200
  textStyle: element.textStyle,
4197
4201
  text: element.text ?? "",
4198
4202
  width: element.width,
@@ -4226,13 +4230,13 @@ function computeTabSize(tabStops, defaultTabSize) {
4226
4230
  return avgGap > 0 ? `${Math.round(avgGap)}px` : fromDefault;
4227
4231
  }
4228
4232
  function getTextLayoutStyle(element) {
4229
- if (!chunkAD2CLKY6_js.hasTextProperties(element)) {
4233
+ if (!chunkKAP5TS7O_js.hasTextProperties(element)) {
4230
4234
  return {};
4231
4235
  }
4232
4236
  const verticalAlign = element.textStyle?.vAlign || "top";
4233
- const writingMode = chunk2TOLRBFU_js.toCssWritingMode(element.textStyle?.textDirection);
4234
- const textOrientation = chunk2TOLRBFU_js.toCssTextOrientation(element.textStyle?.textDirection);
4235
- const verticalDirection = chunk2TOLRBFU_js.toCssVerticalDirection(element.textStyle?.textDirection);
4237
+ const writingMode = chunkIVCWQLQK_js.toCssWritingMode(element.textStyle?.textDirection);
4238
+ const textOrientation = chunkIVCWQLQK_js.toCssTextOrientation(element.textStyle?.textDirection);
4239
+ const verticalDirection = chunkIVCWQLQK_js.toCssVerticalDirection(element.textStyle?.textDirection);
4236
4240
  const parsedColumnCount = Number(element.textStyle?.columnCount);
4237
4241
  const columnCount = Number.isFinite(parsedColumnCount) ? Math.max(1, Math.min(16, Math.round(parsedColumnCount))) : 1;
4238
4242
  const hasColumns = columnCount > 1;
@@ -4240,7 +4244,7 @@ function getTextLayoutStyle(element) {
4240
4244
  const tabStops = element.textStyle?.tabStops;
4241
4245
  const tabSize = computeTabSize(tabStops, element.textStyle?.defaultTabSize);
4242
4246
  const textWrapNone = element.textStyle?.textWrap === "none";
4243
- const hasParagraphIndents = chunkAD2CLKY6_js.hasTextProperties(element) && element.paragraphIndents && element.paragraphIndents.length > 0;
4247
+ const hasParagraphIndents = chunkKAP5TS7O_js.hasTextProperties(element) && element.paragraphIndents && element.paragraphIndents.length > 0;
4244
4248
  const paragraphMarginLeft = element.textStyle?.paragraphMarginLeft;
4245
4249
  const paragraphIndent = element.textStyle?.paragraphIndent;
4246
4250
  const marginLeft = !hasParagraphIndents && typeof paragraphMarginLeft === "number" && paragraphMarginLeft !== 0 ? paragraphMarginLeft : void 0;
@@ -4249,7 +4253,7 @@ function getTextLayoutStyle(element) {
4249
4253
  const bodyBottom = element.textStyle?.bodyInsetBottom ?? DEFAULT_BODY_INSET_TB_PX;
4250
4254
  const parsedColumnSpacing = Number(element.textStyle?.columnSpacing);
4251
4255
  const columnGap = Number.isFinite(parsedColumnSpacing) && parsedColumnSpacing > 0 ? `${parsedColumnSpacing}px` : "0.75em";
4252
- const kinsokuStyles = chunk2TOLRBFU_js.getKinsokuLineBreakStyles(element.textStyle);
4256
+ const kinsokuStyles = chunkIVCWQLQK_js.getKinsokuLineBreakStyles(element.textStyle);
4253
4257
  if (hasColumns) {
4254
4258
  return {
4255
4259
  display: "block",
@@ -4296,10 +4300,10 @@ function getTextLayoutStyle(element) {
4296
4300
 
4297
4301
  // src/viewer/utils/text-effects.tsx
4298
4302
  function buildTextFillCss2(style) {
4299
- return chunk2TOLRBFU_js.buildTextFillCss(style);
4303
+ return chunkIVCWQLQK_js.buildTextFillCss(style);
4300
4304
  }
4301
4305
  function buildTextBody3DSceneStyle2(textStyle) {
4302
- return chunk2TOLRBFU_js.buildTextBody3DSceneStyle(textStyle);
4306
+ return chunkIVCWQLQK_js.buildTextBody3DSceneStyle(textStyle);
4303
4307
  }
4304
4308
 
4305
4309
  // src/viewer/utils/text-warp-css.tsx
@@ -4484,17 +4488,17 @@ function wrapWithTextBuildAnimation(elementId, paraIndex, renderedSegments, para
4484
4488
  if (!subElementAnimStates || subElementAnimStates.size === 0) {
4485
4489
  return renderedSegments;
4486
4490
  }
4487
- const paraKey = `${elementId}${chunk2TOLRBFU_js.TEXT_BUILD_ID_SEP}p${paraIndex}`;
4491
+ const paraKey = `${elementId}${chunkIVCWQLQK_js.TEXT_BUILD_ID_SEP}p${paraIndex}`;
4488
4492
  const paraState = subElementAnimStates.get(paraKey);
4489
4493
  if (paraState) {
4490
4494
  const style = buildAnimStyle(paraState);
4491
4495
  return /* @__PURE__ */ jsxRuntime.jsx("span", { "data-anim-id": paraKey, style: { display: "inline", ...style }, children: renderedSegments }, paraKey);
4492
4496
  }
4493
- const firstWordKey = `${elementId}${chunk2TOLRBFU_js.TEXT_BUILD_ID_SEP}w${paraIndex}-0`;
4497
+ const firstWordKey = `${elementId}${chunkIVCWQLQK_js.TEXT_BUILD_ID_SEP}w${paraIndex}-0`;
4494
4498
  if (subElementAnimStates.has(firstWordKey)) {
4495
4499
  return wrapByWord(elementId, paraIndex, paraSegments, subElementAnimStates);
4496
4500
  }
4497
- const firstCharKey = `${elementId}${chunk2TOLRBFU_js.TEXT_BUILD_ID_SEP}c${paraIndex}-0`;
4501
+ const firstCharKey = `${elementId}${chunkIVCWQLQK_js.TEXT_BUILD_ID_SEP}c${paraIndex}-0`;
4498
4502
  if (subElementAnimStates.has(firstCharKey)) {
4499
4503
  return wrapByChar(elementId, paraIndex, paraSegments, subElementAnimStates);
4500
4504
  }
@@ -4515,7 +4519,7 @@ function wrapByWord(elementId, paraIndex, paraSegments, states) {
4515
4519
  nodes.push(/* @__PURE__ */ jsxRuntime.jsx(React4__default.default.Fragment, { children: w }, `ws-${i}`));
4516
4520
  continue;
4517
4521
  }
4518
- const key = `${elementId}${chunk2TOLRBFU_js.TEXT_BUILD_ID_SEP}w${paraIndex}-${wordIdx}`;
4522
+ const key = `${elementId}${chunkIVCWQLQK_js.TEXT_BUILD_ID_SEP}w${paraIndex}-${wordIdx}`;
4519
4523
  const state = states.get(key);
4520
4524
  const style = buildAnimStyle(state);
4521
4525
  nodes.push(
@@ -4529,7 +4533,7 @@ function wrapByChar(elementId, paraIndex, paraSegments, states) {
4529
4533
  const fullText = paraSegments.map((e) => e.segment.text).join("");
4530
4534
  const nodes = [];
4531
4535
  for (let i = 0; i < fullText.length; i++) {
4532
- const key = `${elementId}${chunk2TOLRBFU_js.TEXT_BUILD_ID_SEP}c${paraIndex}-${i}`;
4536
+ const key = `${elementId}${chunkIVCWQLQK_js.TEXT_BUILD_ID_SEP}c${paraIndex}-${i}`;
4533
4537
  const state = states.get(key);
4534
4538
  const style = buildAnimStyle(state);
4535
4539
  nodes.push(
@@ -4675,10 +4679,10 @@ function renderScriptAwareText(text, needsScriptFonts, scriptFonts, baseFontFami
4675
4679
  if (!needsScriptFonts || !text) {
4676
4680
  return text;
4677
4681
  }
4678
- const runs = chunk2TOLRBFU_js.segmentByScript(text);
4682
+ const runs = chunkIVCWQLQK_js.segmentByScript(text);
4679
4683
  if (runs.length <= 1) {
4680
4684
  if (runs.length === 1) {
4681
- const font = chunk2TOLRBFU_js.resolveFontForScript(runs[0].script, scriptFonts);
4685
+ const font = chunkIVCWQLQK_js.resolveFontForScript(runs[0].script, scriptFonts);
4682
4686
  if (font && font !== baseFontFamily) {
4683
4687
  return /* @__PURE__ */ jsxRuntime.jsx("span", { style: { fontFamily: font }, children: text });
4684
4688
  }
@@ -4686,7 +4690,7 @@ function renderScriptAwareText(text, needsScriptFonts, scriptFonts, baseFontFami
4686
4690
  return text;
4687
4691
  }
4688
4692
  return runs.map((run, i) => {
4689
- const font = chunk2TOLRBFU_js.resolveFontForScript(run.script, scriptFonts);
4693
+ const font = chunkIVCWQLQK_js.resolveFontForScript(run.script, scriptFonts);
4690
4694
  if (!font || font === baseFontFamily) {
4691
4695
  return /* @__PURE__ */ jsxRuntime.jsx(React4__default.default.Fragment, { children: run.text }, `${keyPrefix}-r${i}`);
4692
4696
  }
@@ -4758,8 +4762,8 @@ function renderSegmentContent(elementId, segmentIndex, textValue, lines, needsSc
4758
4762
  );
4759
4763
  }
4760
4764
  function renderEquationSegment(elementId, segmentIndex, equationXml, equationNumber) {
4761
- const mathml = chunk2TOLRBFU_js.convertOmmlToMathMl(equationXml);
4762
- const safeMathml = mathml ? chunk2TOLRBFU_js.sanitizeMathMl(mathml) : "";
4765
+ const mathml = chunkIVCWQLQK_js.convertOmmlToMathMl(equationXml);
4766
+ const safeMathml = mathml ? chunkIVCWQLQK_js.sanitizeMathMl(mathml) : "";
4763
4767
  const equationContent = safeMathml ? /* @__PURE__ */ jsxRuntime.jsx(
4764
4768
  "span",
4765
4769
  {
@@ -4809,7 +4813,7 @@ function renderEquationSegment(elementId, segmentIndex, equationXml, equationNum
4809
4813
  return /* @__PURE__ */ jsxRuntime.jsx("span", { children: equationContent }, `${elementId}-seg-${segmentIndex}`);
4810
4814
  }
4811
4815
  function renderPictureBullet(elementId, segmentIndex, bulletInfo, baseFontSize) {
4812
- const picture = chunk2TOLRBFU_js.resolvePictureBullet(bulletInfo, baseFontSize) ?? {
4816
+ const picture = chunkIVCWQLQK_js.resolvePictureBullet(bulletInfo, baseFontSize) ?? {
4813
4817
  sizePx: baseFontSize,
4814
4818
  fallbackMarker: "\u2022",
4815
4819
  accessibleLabel: "Bullet"
@@ -4849,7 +4853,7 @@ function renderPictureBullet(elementId, segmentIndex, bulletInfo, baseFontSize)
4849
4853
  `${elementId}-seg-${segmentIndex}-bullet-img`
4850
4854
  );
4851
4855
  }
4852
- function renderSingleSegment(element, segment, segmentIndex, fallbackColor, findHighlights, bulletInfo, onHyperlinkClick, fieldContext, paragraphRtl, requireCtrlClick) {
4856
+ function renderSingleSegment(element, segment, segmentIndex, fallbackColor, findHighlights, bulletInfo, onHyperlinkClick, fieldContext, paragraphRtl, requireCtrlClick, bulletMarkerWidth) {
4853
4857
  if (segment.equationXml) {
4854
4858
  return renderEquationSegment(
4855
4859
  element.id,
@@ -4859,7 +4863,7 @@ function renderSingleSegment(element, segment, segmentIndex, fallbackColor, find
4859
4863
  );
4860
4864
  }
4861
4865
  const segmentStyle = segment.style || {};
4862
- const textValue = chunk2TOLRBFU_js.substituteFieldText(segment.text || "", segment.fieldType, fieldContext);
4866
+ const textValue = chunkIVCWQLQK_js.substituteFieldText(segment.text || "", segment.fieldType, fieldContext);
4863
4867
  const lines = textValue.split("\n");
4864
4868
  const textDecorationTokens = [];
4865
4869
  if (segmentStyle.underline || segmentStyle.hyperlink) {
@@ -4869,8 +4873,8 @@ function renderSingleSegment(element, segment, segmentIndex, fallbackColor, find
4869
4873
  textDecorationTokens.push("line-through");
4870
4874
  }
4871
4875
  const isDoubleStrike = segmentStyle.strikethrough && segmentStyle.strikeType === "dblStrike";
4872
- const resolvedSegmentColor = segmentStyle.hyperlink ? chunk2TOLRBFU_js.normalizeHexColor(segmentStyle.color || element.textStyle?.color, HYPERLINK_COLOR) : chunk2TOLRBFU_js.normalizeHexColor(segmentStyle.color || element.textStyle?.color, fallbackColor);
4873
- const underlineDecoration = chunk2TOLRBFU_js.resolveUnderlineDecorationStyle(
4876
+ const resolvedSegmentColor = segmentStyle.hyperlink ? chunkIVCWQLQK_js.normalizeHexColor(segmentStyle.color || element.textStyle?.color, HYPERLINK_COLOR) : chunkIVCWQLQK_js.normalizeHexColor(segmentStyle.color || element.textStyle?.color, fallbackColor);
4877
+ const underlineDecoration = chunkIVCWQLQK_js.resolveUnderlineDecorationStyle(
4874
4878
  Boolean(isDoubleStrike),
4875
4879
  segmentStyle.underlineStyle
4876
4880
  );
@@ -4886,14 +4890,14 @@ function renderSingleSegment(element, segment, segmentIndex, fallbackColor, find
4886
4890
  const baseFontSizePt = baseFontSize * (72 / 96);
4887
4891
  const fontKerning = typeof segmentStyle.kerning === "number" ? segmentStyle.kerning === 0 ? "none" : baseFontSizePt >= segmentStyle.kerning / 100 ? "normal" : "none" : void 0;
4888
4892
  const rawFontFamily = segmentStyle.fontFamily || element.textStyle?.fontFamily;
4889
- const baseFontFamily = rawFontFamily ? chunkAD2CLKY6_js.getSubstituteFontFamily(rawFontFamily) : DEFAULT_FONT_FAMILY;
4893
+ const baseFontFamily = rawFontFamily ? chunkKAP5TS7O_js.getSubstituteFontFamily(rawFontFamily) : DEFAULT_FONT_FAMILY;
4890
4894
  const scriptFonts = {
4891
4895
  latin: baseFontFamily,
4892
4896
  eastAsia: segmentStyle.eastAsiaFont || element.textStyle?.eastAsiaFont || baseFontFamily,
4893
4897
  complexScript: segmentStyle.complexScriptFont || element.textStyle?.complexScriptFont || baseFontFamily,
4894
4898
  symbol: segmentStyle.symbolFont || element.textStyle?.symbolFont || baseFontFamily
4895
4899
  };
4896
- const needsScriptFonts = chunk2TOLRBFU_js.hasDistinctScriptFonts(scriptFonts);
4900
+ const needsScriptFonts = chunkIVCWQLQK_js.hasDistinctScriptFonts(scriptFonts);
4897
4901
  const spanStyle = {
4898
4902
  color: resolvedSegmentColor,
4899
4903
  fontSize: baseFontSize * baselineFontScale,
@@ -4911,15 +4915,15 @@ function renderSingleSegment(element, segment, segmentIndex, fallbackColor, find
4911
4915
  fontVariantCaps: segmentStyle.textCaps === "small" ? "small-caps" : void 0,
4912
4916
  letterSpacing,
4913
4917
  fontKerning,
4914
- backgroundColor: textFillStyles ? void 0 : segmentStyle.highlightColor ? chunk2TOLRBFU_js.normalizeHexColor(segmentStyle.highlightColor, "transparent") : void 0,
4918
+ backgroundColor: textFillStyles ? void 0 : segmentStyle.highlightColor ? chunkIVCWQLQK_js.normalizeHexColor(segmentStyle.highlightColor, "transparent") : void 0,
4915
4919
  ...textFillStyles,
4916
- textDecorationColor: segmentStyle.underlineColor ? chunk2TOLRBFU_js.normalizeHexColor(segmentStyle.underlineColor, void 0) : void 0,
4917
- WebkitTextStroke: segmentStyle.textOutlineWidth && segmentStyle.textOutlineColor ? `${segmentStyle.textOutlineWidth}px ${chunk2TOLRBFU_js.normalizeHexColor(segmentStyle.textOutlineColor, "#000000")}` : segmentStyle.textOutlineWidth ? `${segmentStyle.textOutlineWidth}px currentColor` : void 0,
4920
+ textDecorationColor: segmentStyle.underlineColor ? chunkIVCWQLQK_js.normalizeHexColor(segmentStyle.underlineColor, void 0) : void 0,
4921
+ WebkitTextStroke: segmentStyle.textOutlineWidth && segmentStyle.textOutlineColor ? `${segmentStyle.textOutlineWidth}px ${chunkIVCWQLQK_js.normalizeHexColor(segmentStyle.textOutlineColor, "#000000")}` : segmentStyle.textOutlineWidth ? `${segmentStyle.textOutlineWidth}px currentColor` : void 0,
4918
4922
  paintOrder: segmentStyle.textOutlineWidth ? "stroke fill" : void 0,
4919
- textShadow: chunk2TOLRBFU_js.buildTextShadowCss(segmentStyle),
4920
- filter: chunk2TOLRBFU_js.buildTextRunFilterChain(segmentStyle),
4921
- opacity: chunk2TOLRBFU_js.getTextAlphaOpacity(segmentStyle),
4922
- WebkitBoxReflect: chunk2TOLRBFU_js.buildTextReflectionCss(segmentStyle)
4923
+ textShadow: chunkIVCWQLQK_js.buildTextShadowCss(segmentStyle),
4924
+ filter: chunkIVCWQLQK_js.buildTextRunFilterChain(segmentStyle),
4925
+ opacity: chunkIVCWQLQK_js.getTextAlphaOpacity(segmentStyle),
4926
+ WebkitBoxReflect: chunkIVCWQLQK_js.buildTextReflectionCss(segmentStyle)
4923
4927
  };
4924
4928
  const runRtl = segmentStyle.rtl;
4925
4929
  if (runRtl !== void 0 && runRtl !== paragraphRtl) {
@@ -4930,6 +4934,12 @@ function renderSingleSegment(element, segment, segmentIndex, fallbackColor, find
4930
4934
  spanStyle.unicodeBidi = "embed";
4931
4935
  }
4932
4936
  if (bulletInfo) {
4937
+ if (typeof bulletMarkerWidth === "number" && bulletMarkerWidth > 0) {
4938
+ spanStyle.display = "inline-block";
4939
+ spanStyle.width = bulletMarkerWidth;
4940
+ spanStyle.textAlign = "right";
4941
+ spanStyle.textIndent = 0;
4942
+ }
4933
4943
  if (bulletInfo.fontFamily) {
4934
4944
  spanStyle.fontFamily = bulletInfo.fontFamily;
4935
4945
  }
@@ -4939,7 +4949,7 @@ function renderSingleSegment(element, segment, segmentIndex, fallbackColor, find
4939
4949
  spanStyle.fontSize = baseFontSize * (bulletInfo.sizePercent / 100) * baselineFontScale;
4940
4950
  }
4941
4951
  if (bulletInfo.color) {
4942
- spanStyle.color = chunk2TOLRBFU_js.normalizeHexColor(bulletInfo.color, resolvedSegmentColor);
4952
+ spanStyle.color = chunkIVCWQLQK_js.normalizeHexColor(bulletInfo.color, resolvedSegmentColor);
4943
4953
  }
4944
4954
  }
4945
4955
  if (bulletInfo?.imageDataUrl || bulletInfo?.imageRelId) {
@@ -4979,7 +4989,7 @@ function renderSingleSegment(element, segment, segmentIndex, fallbackColor, find
4979
4989
  textAlign: segment.rubyAlignment === "l" ? "left" : segment.rubyAlignment === "r" ? "right" : segment.rubyAlignment === "dist" || segment.rubyAlignment === "distCat" || segment.rubyAlignment === "distLetter" ? "justify" : "center"
4980
4990
  };
4981
4991
  if (segment.rubyStyle?.color) {
4982
- rubyStyle.color = chunk2TOLRBFU_js.normalizeHexColor(segment.rubyStyle.color, resolvedSegmentColor);
4992
+ rubyStyle.color = chunkIVCWQLQK_js.normalizeHexColor(segment.rubyStyle.color, resolvedSegmentColor);
4983
4993
  }
4984
4994
  innerContent = /* @__PURE__ */ jsxRuntime.jsxs("ruby", { children: [
4985
4995
  baseContent,
@@ -5074,7 +5084,7 @@ function groupSegmentsIntoParagraphs(segments) {
5074
5084
  return paragraphs;
5075
5085
  }
5076
5086
  function renderTextSegments(element, fallbackColor, emptyFallback, findHighlights, onHyperlinkClick, fieldContext, subElementAnimStates, segmentOverrides, requireCtrlClick) {
5077
- if (!chunkAD2CLKY6_js.hasTextProperties(element)) {
5087
+ if (!chunkKAP5TS7O_js.hasTextProperties(element)) {
5078
5088
  return emptyFallback || null;
5079
5089
  }
5080
5090
  const effectiveSegments = segmentOverrides ?? element.textSegments;
@@ -5095,11 +5105,11 @@ function renderTextSegments(element, fallbackColor, emptyFallback, findHighlight
5095
5105
  return element.text || emptyFallback || "";
5096
5106
  }
5097
5107
  const paragraphs = groupSegmentsIntoParagraphs(effectiveSegments);
5098
- const paragraphIndents = chunkAD2CLKY6_js.hasTextProperties(element) ? element.paragraphIndents : void 0;
5099
- const elementRtl = chunkAD2CLKY6_js.hasTextProperties(element) ? element.textStyle?.rtl : void 0;
5100
- const elementAlign = chunkAD2CLKY6_js.hasTextProperties(element) ? element.textStyle?.align : void 0;
5101
- const bodyStyle = chunkAD2CLKY6_js.hasTextProperties(element) ? element.textStyle : void 0;
5102
- const spaceFirstLast = bodyStyle?.spaceFirstLastParagraph !== false;
5108
+ const paragraphIndents = chunkKAP5TS7O_js.hasTextProperties(element) ? element.paragraphIndents : void 0;
5109
+ const elementRtl = chunkKAP5TS7O_js.hasTextProperties(element) ? element.textStyle?.rtl : void 0;
5110
+ const elementAlign = chunkKAP5TS7O_js.hasTextProperties(element) ? element.textStyle?.align : void 0;
5111
+ const bodyStyle = chunkKAP5TS7O_js.hasTextProperties(element) ? element.textStyle : void 0;
5112
+ const spaceFirstLast = bodyStyle?.spaceFirstLastParagraph === true;
5103
5113
  return paragraphs.map((paraSegments, paraIndex) => {
5104
5114
  const paraIndent = paragraphIndents?.[paraIndex];
5105
5115
  const rawMarginLeft = typeof paraIndent?.marginLeft === "number" && paraIndent.marginLeft !== 0 ? paraIndent.marginLeft : void 0;
@@ -5118,18 +5128,22 @@ function renderTextSegments(element, fallbackColor, emptyFallback, findHighlight
5118
5128
  return Boolean(segment.text) && segment.text.trim().length > 0;
5119
5129
  });
5120
5130
  const hasBullet = bulletInfo && !bulletInfo.none && hasVisibleTextContent && !hasDuplicateAuthoredAutoNumber;
5121
- const paraRtl = chunk2TOLRBFU_js.resolveParagraphRtl(paraSegments, elementRtl);
5131
+ const paraRtl = chunkIVCWQLQK_js.resolveParagraphRtl(paraSegments, elementRtl);
5122
5132
  const isRtlParagraph = paraRtl === true;
5123
- const paraAlign = chunk2TOLRBFU_js.resolveParagraphAlign(paraSegments, elementAlign);
5124
- const cssTextAlign = chunk2TOLRBFU_js.resolveCssTextAlign(paraAlign, isRtlParagraph);
5133
+ const paraAlign = chunkIVCWQLQK_js.resolveParagraphAlign(paraSegments, elementAlign);
5134
+ const cssTextAlign = chunkIVCWQLQK_js.resolveCssTextAlign(paraAlign, isRtlParagraph);
5125
5135
  const paraMarginLeft = isRtlParagraph ? void 0 : rawMarginLeft;
5126
5136
  const paraMarginRight = isRtlParagraph ? rawMarginLeft : void 0;
5127
5137
  const paraTextIndent = rawTextIndent;
5128
- const paraKinsokuStyle = chunk2TOLRBFU_js.getKinsokuLineBreakStyles(firstSeg?.segment.style);
5138
+ const paraKinsokuStyle = chunkIVCWQLQK_js.getKinsokuLineBreakStyles(firstSeg?.segment.style);
5129
5139
  const hasParaKinsoku = Object.keys(paraKinsokuStyle).length > 0;
5130
5140
  const paraProps = effectiveSegments[firstSeg?.globalIndex ?? -1]?.paragraphProperties;
5141
+ const effectiveParaProps = {
5142
+ ...firstSeg?.segment.style,
5143
+ ...paraProps
5144
+ };
5131
5145
  const spacing = resolveParagraphSpacing({
5132
- paraProps,
5146
+ paraProps: effectiveParaProps,
5133
5147
  bodyStyle,
5134
5148
  isFirst: paraIndex === 0,
5135
5149
  isLast: paraIndex === paragraphs.length - 1,
@@ -5163,6 +5177,7 @@ function renderTextSegments(element, fallbackColor, emptyFallback, findHighlight
5163
5177
  }
5164
5178
  if (cssTextAlign !== void 0) {
5165
5179
  paraStyle.textAlign = cssTextAlign;
5180
+ paraStyle["--pptx-paragraph-align"] = cssTextAlign;
5166
5181
  }
5167
5182
  const needsWrapper = paraMarginLeft !== void 0 || paraMarginRight !== void 0 || paraTextIndent !== void 0 || hasBullet || paraRtl !== void 0 || cssTextAlign !== void 0 || hasParaKinsoku || hasParaSpacing;
5168
5183
  const renderedSegments = paraSegments.filter(({ segment }) => {
@@ -5181,7 +5196,8 @@ function renderTextSegments(element, fallbackColor, emptyFallback, findHighlight
5181
5196
  onHyperlinkClick,
5182
5197
  fieldContext,
5183
5198
  paraRtl,
5184
- requireCtrlClick
5199
+ requireCtrlClick,
5200
+ hasBullet && globalIndex === firstSeg.globalIndex ? Math.max(0, -(rawTextIndent ?? 0)) : void 0
5185
5201
  )
5186
5202
  );
5187
5203
  const wrappedContent = wrapWithTextBuildAnimation(
@@ -5197,7 +5213,7 @@ function renderTextSegments(element, fallbackColor, emptyFallback, findHighlight
5197
5213
  paraIndex < paragraphs.length - 1 ? /* @__PURE__ */ jsxRuntime.jsx("br", {}) : null
5198
5214
  ] }, `${element.id}-para-${paraIndex}`);
5199
5215
  }
5200
- return /* @__PURE__ */ jsxRuntime.jsx("div", { style: paraStyle, children: wrappedContent }, `${element.id}-para-${paraIndex}`);
5216
+ return /* @__PURE__ */ jsxRuntime.jsx("div", { "data-pptx-paragraph": true, style: paraStyle, children: wrappedContent }, `${element.id}-para-${paraIndex}`);
5201
5217
  });
5202
5218
  }
5203
5219
 
@@ -5308,7 +5324,7 @@ function isConnectorOrLineElement(element) {
5308
5324
  if (element.type === "connector") {
5309
5325
  return true;
5310
5326
  }
5311
- if (!chunkAD2CLKY6_js.hasShapeProperties(element)) {
5327
+ if (!chunkKAP5TS7O_js.hasShapeProperties(element)) {
5312
5328
  return false;
5313
5329
  }
5314
5330
  const st = getShapeType(element.shapeType);
@@ -5326,13 +5342,13 @@ function hexToRgbUnit(hex) {
5326
5342
  };
5327
5343
  }
5328
5344
  function getDuotoneColors(element) {
5329
- if (!chunkAD2CLKY6_js.isImageLikeElement(element)) {
5345
+ if (!chunkKAP5TS7O_js.isImageLikeElement(element)) {
5330
5346
  return void 0;
5331
5347
  }
5332
5348
  return element.imageEffects?.duotone;
5333
5349
  }
5334
5350
  function buildLineShadowCss(element) {
5335
- if (!chunkAD2CLKY6_js.hasShapeProperties(element)) {
5351
+ if (!chunkKAP5TS7O_js.hasShapeProperties(element)) {
5336
5352
  return void 0;
5337
5353
  }
5338
5354
  const ss = element.shapeStyle;
@@ -5343,13 +5359,13 @@ function buildLineShadowCss(element) {
5343
5359
  const offsetY = typeof ss.lineShadowOffsetY === "number" ? ss.lineShadowOffsetY : 2;
5344
5360
  const blur = typeof ss.lineShadowBlur === "number" ? Math.max(0, ss.lineShadowBlur) : 4;
5345
5361
  const opacity = typeof ss.lineShadowOpacity === "number" ? Math.max(0, Math.min(1, ss.lineShadowOpacity)) : 0.35;
5346
- return `${Math.round(offsetX)}px ${Math.round(offsetY)}px ${Math.round(blur)}px ${chunk2TOLRBFU_js.colorWithOpacity(
5347
- chunk2TOLRBFU_js.normalizeHexColor(ss.lineShadowColor, "#000000"),
5362
+ return `${Math.round(offsetX)}px ${Math.round(offsetY)}px ${Math.round(blur)}px ${chunkIVCWQLQK_js.colorWithOpacity(
5363
+ chunkIVCWQLQK_js.normalizeHexColor(ss.lineShadowColor, "#000000"),
5348
5364
  opacity
5349
5365
  )}`;
5350
5366
  }
5351
5367
  function buildLineGlowFilter(element) {
5352
- if (!chunkAD2CLKY6_js.hasShapeProperties(element)) {
5368
+ if (!chunkKAP5TS7O_js.hasShapeProperties(element)) {
5353
5369
  return void 0;
5354
5370
  }
5355
5371
  const ss = element.shapeStyle;
@@ -5358,7 +5374,7 @@ function buildLineGlowFilter(element) {
5358
5374
  }
5359
5375
  const glowOpacity = typeof ss.lineGlowOpacity === "number" ? ss.lineGlowOpacity : 0.75;
5360
5376
  const glowRad = Math.round(Math.max(0, ss.lineGlowRadius));
5361
- const glowCol = chunk2TOLRBFU_js.colorWithOpacity(chunk2TOLRBFU_js.normalizeHexColor(ss.lineGlowColor, "#ffff00"), glowOpacity);
5377
+ const glowCol = chunkIVCWQLQK_js.colorWithOpacity(chunkIVCWQLQK_js.normalizeHexColor(ss.lineGlowColor, "#ffff00"), glowOpacity);
5362
5378
  return `drop-shadow(0 0 ${glowRad}px ${glowCol})`;
5363
5379
  }
5364
5380
  function mapDagBlendModeToCss(blend) {
@@ -5382,7 +5398,7 @@ function getDagDuotoneFilterId(elementId) {
5382
5398
  return `dag-duotone-${elementId}`;
5383
5399
  }
5384
5400
  function hasDagDuotoneEffect(element) {
5385
- if (!chunkAD2CLKY6_js.hasShapeProperties(element)) {
5401
+ if (!chunkKAP5TS7O_js.hasShapeProperties(element)) {
5386
5402
  return false;
5387
5403
  }
5388
5404
  return Boolean(element.shapeStyle?.dagDuotone);
@@ -5445,7 +5461,7 @@ function getRoundRectRadiusPx2(element) {
5445
5461
 
5446
5462
  // src/viewer/utils/shape-visual-3d.ts
5447
5463
  function build3DExtrusionData2(shape3d, scene3d, fillColor, elementWidth, elementHeight) {
5448
- return chunk2TOLRBFU_js.build3DExtrusionData(
5464
+ return chunkIVCWQLQK_js.build3DExtrusionData(
5449
5465
  shape3d,
5450
5466
  scene3d,
5451
5467
  fillColor,
@@ -5454,7 +5470,7 @@ function build3DExtrusionData2(shape3d, scene3d, fillColor, elementWidth, elemen
5454
5470
  );
5455
5471
  }
5456
5472
  function apply3dEffects2(base, scene3d, shape3d, fillColorFallback) {
5457
- chunk2TOLRBFU_js.apply3dEffects(base, scene3d, shape3d, fillColorFallback);
5473
+ chunkIVCWQLQK_js.apply3dEffects(base, scene3d, shape3d, fillColorFallback);
5458
5474
  }
5459
5475
 
5460
5476
  // src/viewer/utils/vector-subpath-paint.ts
@@ -5463,7 +5479,7 @@ function toHexByte(value) {
5463
5479
  return clamped.toString(16).padStart(2, "0");
5464
5480
  }
5465
5481
  function shiftHex(hex, factor, towardsWhite) {
5466
- const channels = chunk2TOLRBFU_js.hexToRgbChannels(hex);
5482
+ const channels = chunkIVCWQLQK_js.hexToRgbChannels(hex);
5467
5483
  if (!channels) {
5468
5484
  return hex;
5469
5485
  }
@@ -5489,13 +5505,13 @@ function buildCustomSubpathPaints(subpaths, hasFill, fillColor, fillOpacity) {
5489
5505
  const fillOff = subpath.fillMode === "none" || !hasFill;
5490
5506
  return {
5491
5507
  d: subpath.d,
5492
- fill: fillOff ? "none" : chunk2TOLRBFU_js.colorWithOpacity(adjustFillForMode(fillColor, subpath.fillMode), fillOpacity),
5508
+ fill: fillOff ? "none" : chunkIVCWQLQK_js.colorWithOpacity(adjustFillForMode(fillColor, subpath.fillMode), fillOpacity),
5493
5509
  stroked: subpath.stroke !== false
5494
5510
  };
5495
5511
  });
5496
5512
  }
5497
5513
  function getStrokeOnlyPresetPaths(element) {
5498
- if (element.type !== "shape" || !chunkAD2CLKY6_js.hasShapeProperties(element)) {
5514
+ if (element.type !== "shape" || !chunkKAP5TS7O_js.hasShapeProperties(element)) {
5499
5515
  return void 0;
5500
5516
  }
5501
5517
  const shapeType = element.shapeType;
@@ -5505,7 +5521,7 @@ function getStrokeOnlyPresetPaths(element) {
5505
5521
  if (element.pathData) {
5506
5522
  return void 0;
5507
5523
  }
5508
- const result = chunkAD2CLKY6_js.evaluatePresetShape(
5524
+ const result = chunkKAP5TS7O_js.evaluatePresetShape(
5509
5525
  shapeType,
5510
5526
  Math.max(element.width, 1),
5511
5527
  Math.max(element.height, 1),
@@ -5520,27 +5536,27 @@ function getStrokeOnlyPresetPaths(element) {
5520
5536
 
5521
5537
  // src/viewer/utils/shape-visual-style.ts
5522
5538
  function getShapeVisualStyle(element, hasFill, fillColor, strokeWidth, strokeColor, animatesFill, animatesStroke) {
5523
- if (!chunkAD2CLKY6_js.hasShapeProperties(element)) {
5539
+ if (!chunkKAP5TS7O_js.hasShapeProperties(element)) {
5524
5540
  return {};
5525
5541
  }
5526
5542
  const normalizedShapeType = getShapeType(element.shapeType);
5527
- const clipPath = chunk2TOLRBFU_js.getResolvedShapeClipPath(element);
5543
+ const clipPath = chunkIVCWQLQK_js.getResolvedShapeClipPath(element);
5528
5544
  const rendersCustomVectorPath = (element.type === "shape" || element.type === "image" || element.type === "picture") && Boolean(element.pathData) && typeof element.pathWidth === "number" && element.pathWidth > 0 && typeof element.pathHeight === "number" && element.pathHeight > 0;
5529
5545
  const rendersStrokeOnlyPreset = Boolean(getStrokeOnlyPresetPaths(element));
5530
5546
  const fillOpacity = element.shapeStyle?.fillOpacity;
5531
5547
  const strokeOpacity = element.shapeStyle?.strokeOpacity;
5532
- const strokeDash = chunk2TOLRBFU_js.normalizeStrokeDashType(element.shapeStyle?.strokeDash);
5533
- const fillGradient = chunk2TOLRBFU_js.buildCssGradientFromShapeStyle(element.shapeStyle) || element.shapeStyle?.fillGradient;
5534
- const shadowCss = chunk2TOLRBFU_js.buildShadowCssFromShapeStyle(element.shapeStyle);
5535
- const innerShadowCss = chunk2TOLRBFU_js.buildInnerShadowCssFromShapeStyle(element.shapeStyle);
5536
- const resolvedFillColor = chunk2TOLRBFU_js.colorWithOpacity(fillColor, fillOpacity);
5537
- const resolvedStrokeColor = chunk2TOLRBFU_js.colorWithOpacity(strokeColor, strokeOpacity);
5548
+ const strokeDash = chunkIVCWQLQK_js.normalizeStrokeDashType(element.shapeStyle?.strokeDash);
5549
+ const fillGradient = chunkIVCWQLQK_js.buildCssGradientFromShapeStyle(element.shapeStyle) || element.shapeStyle?.fillGradient;
5550
+ const shadowCss = chunkIVCWQLQK_js.buildShadowCssFromShapeStyle(element.shapeStyle);
5551
+ const innerShadowCss = chunkIVCWQLQK_js.buildInnerShadowCssFromShapeStyle(element.shapeStyle);
5552
+ const resolvedFillColor = chunkIVCWQLQK_js.colorWithOpacity(fillColor, fillOpacity);
5553
+ const resolvedStrokeColor = chunkIVCWQLQK_js.colorWithOpacity(strokeColor, strokeOpacity);
5538
5554
  const ss = element.shapeStyle;
5539
5555
  const hasFillOverlayColor = Boolean(
5540
5556
  ss?.dagFillOverlayColor && ss.dagFillOverlayColor !== "transparent"
5541
5557
  );
5542
5558
  const combinedShadowParts = [];
5543
- const multiLayerShadow = chunk2TOLRBFU_js.buildMultiLayerShadowCss(element.shapeStyle);
5559
+ const multiLayerShadow = chunkIVCWQLQK_js.buildMultiLayerShadowCss(element.shapeStyle);
5544
5560
  if (multiLayerShadow) {
5545
5561
  combinedShadowParts.push(multiLayerShadow);
5546
5562
  } else if (shadowCss) {
@@ -5549,7 +5565,7 @@ function getShapeVisualStyle(element, hasFill, fillColor, strokeWidth, strokeCol
5549
5565
  if (innerShadowCss) {
5550
5566
  combinedShadowParts.push(innerShadowCss);
5551
5567
  }
5552
- const glowBoxShadow = chunk2TOLRBFU_js.buildGlowBoxShadow(ss?.glowColor, ss?.glowRadius, ss?.glowOpacity);
5568
+ const glowBoxShadow = chunkIVCWQLQK_js.buildGlowBoxShadow(ss?.glowColor, ss?.glowRadius, ss?.glowOpacity);
5553
5569
  if (glowBoxShadow) {
5554
5570
  combinedShadowParts.push(glowBoxShadow);
5555
5571
  }
@@ -5557,7 +5573,7 @@ function getShapeVisualStyle(element, hasFill, fillColor, strokeWidth, strokeCol
5557
5573
  if (lineShadow) {
5558
5574
  combinedShadowParts.push(lineShadow);
5559
5575
  }
5560
- const compoundLineShadow = chunk2TOLRBFU_js.getCompoundLineBoxShadow(
5576
+ const compoundLineShadow = chunkIVCWQLQK_js.getCompoundLineBoxShadow(
5561
5577
  element.shapeStyle?.compoundLine,
5562
5578
  strokeWidth,
5563
5579
  resolvedStrokeColor
@@ -5570,11 +5586,11 @@ function getShapeVisualStyle(element, hasFill, fillColor, strokeWidth, strokeCol
5570
5586
  if (ss?.glowColor && ss.glowColor !== "transparent" && ss.glowRadius) {
5571
5587
  const glowOpacity = typeof ss.glowOpacity === "number" ? ss.glowOpacity : 0.75;
5572
5588
  const glowRad = Math.round(Math.max(0, ss.glowRadius));
5573
- const glowCol = chunk2TOLRBFU_js.colorWithOpacity(chunk2TOLRBFU_js.normalizeHexColor(ss.glowColor, "#ffff00"), glowOpacity);
5589
+ const glowCol = chunkIVCWQLQK_js.colorWithOpacity(chunkIVCWQLQK_js.normalizeHexColor(ss.glowColor, "#ffff00"), glowOpacity);
5574
5590
  filterParts.push(`drop-shadow(0 0 ${glowRad}px ${glowCol})`);
5575
5591
  }
5576
5592
  if (typeof ss?.softEdgeRadius === "number" && ss.softEdgeRadius > 0) {
5577
- filterParts.push(`url(#${chunk2TOLRBFU_js.getSoftEdgeFilterId(element.id)})`);
5593
+ filterParts.push(`url(#${chunkIVCWQLQK_js.getSoftEdgeFilterId(element.id)})`);
5578
5594
  }
5579
5595
  if (typeof ss?.blurRadius === "number" && ss.blurRadius > 0) {
5580
5596
  filterParts.push(`blur(${Math.round(ss.blurRadius)}px)`);
@@ -5583,13 +5599,13 @@ function getShapeVisualStyle(element, hasFill, fillColor, strokeWidth, strokeCol
5583
5599
  if (lineGlowCss) {
5584
5600
  filterParts.push(lineGlowCss);
5585
5601
  }
5586
- const dagFilter = chunk2TOLRBFU_js.getEffectDagFilter(ss, element.id);
5602
+ const dagFilter = chunkIVCWQLQK_js.getEffectDagFilter(ss, element.id);
5587
5603
  if (dagFilter) {
5588
5604
  filterParts.push(dagFilter);
5589
5605
  }
5590
5606
  const lineJoinCss = ss?.lineJoin === "round" ? "round" : ss?.lineJoin === "bevel" ? "bevel" : ss?.lineJoin === "miter" ? "miter" : void 0;
5591
5607
  const miterLimitCss = ss?.lineJoin === "miter" && typeof ss?.miterLimit === "number" ? Math.max(ss.miterLimit / 1e5, 1) : void 0;
5592
- const patternFill = chunk2TOLRBFU_js.buildPatternFillCss(element.shapeStyle);
5608
+ const patternFill = chunkIVCWQLQK_js.buildPatternFillCss(element.shapeStyle);
5593
5609
  const imageFillUrl = ss?.fillMode === "image" && ss.fillImageUrl ? ss.fillImageUrl : void 0;
5594
5610
  const imageFillMode = ss?.fillImageMode || "stretch";
5595
5611
  let reflectCss;
@@ -5601,7 +5617,7 @@ function getShapeVisualStyle(element, hasFill, fillColor, strokeWidth, strokeCol
5601
5617
  const endOpacity = typeof ss.reflectionEndOpacity === "number" ? ss.reflectionEndOpacity : 0;
5602
5618
  const fadeLength = typeof ss.reflectionEndPosition === "number" ? Math.round(ss.reflectionEndPosition * Math.max(element.height, 1)) : 100;
5603
5619
  const blurRadius = typeof ss.reflectionBlurRadius === "number" ? ss.reflectionBlurRadius : 0;
5604
- reflectCss = chunk2TOLRBFU_js.buildReflectionCss(distance, startOpacity, endOpacity, fadeLength, blurRadius);
5620
+ reflectCss = chunkIVCWQLQK_js.buildReflectionCss(distance, startOpacity, endOpacity, fadeLength, blurRadius);
5605
5621
  }
5606
5622
  }
5607
5623
  const base = {
@@ -5619,9 +5635,9 @@ function getShapeVisualStyle(element, hasFill, fillColor, strokeWidth, strokeCol
5619
5635
  // is present, `ShapeEffectOverlay` paints a separate blended tint layer so
5620
5636
  // the colour is actually rendered (and text/children are not tinted).
5621
5637
  mixBlendMode: hasFillOverlayColor ? void 0 : mapDagBlendModeToCss(ss?.dagFillOverlayBlend),
5622
- borderWidth: strokeWidth > 0 ? chunk2TOLRBFU_js.getCompoundLineBorderWidth(ss?.compoundLine, strokeWidth) : void 0,
5638
+ borderWidth: strokeWidth > 0 ? chunkIVCWQLQK_js.getCompoundLineBorderWidth(ss?.compoundLine, strokeWidth) : void 0,
5623
5639
  borderColor: strokeWidth > 0 ? resolvedStrokeColor : void 0,
5624
- borderStyle: strokeWidth > 0 ? chunk2TOLRBFU_js.getCssBorderDashStyle(strokeDash, ss?.compoundLine) : void 0,
5640
+ borderStyle: strokeWidth > 0 ? chunkIVCWQLQK_js.getCssBorderDashStyle(strokeDash, ss?.compoundLine) : void 0,
5625
5641
  strokeLinejoin: lineJoinCss,
5626
5642
  strokeMiterlimit: miterLimitCss,
5627
5643
  strokeLinecap: ss?.lineCap === "rnd" ? "round" : ss?.lineCap === "sq" ? "square" : ss?.lineCap === "flat" ? "butt" : void 0
@@ -5677,7 +5693,7 @@ function getShapeVisualStyle(element, hasFill, fillColor, strokeWidth, strokeCol
5677
5693
  borderWidth: 0,
5678
5694
  borderTopWidth: Math.max(strokeWidth, 2),
5679
5695
  borderTopColor: resolvedStrokeColor,
5680
- borderTopStyle: chunk2TOLRBFU_js.getCssBorderDashStyle(strokeDash)
5696
+ borderTopStyle: chunkIVCWQLQK_js.getCssBorderDashStyle(strokeDash)
5681
5697
  };
5682
5698
  }
5683
5699
  if (normalizedShapeType === "cylinder") {
@@ -5691,13 +5707,13 @@ function getShapeVisualStyle(element, hasFill, fillColor, strokeWidth, strokeCol
5691
5707
  function getConnectorAdjustment(element, key, fallback) {
5692
5708
  const direct = element.shapeAdjustments?.[key];
5693
5709
  if (typeof direct === "number" && Number.isFinite(direct)) {
5694
- return chunk2TOLRBFU_js.clampUnitInterval(direct / 1e5);
5710
+ return chunkIVCWQLQK_js.clampUnitInterval(direct / 1e5);
5695
5711
  }
5696
5712
  const fallbackKey = element.shapeAdjustments?.adj;
5697
5713
  if (typeof fallbackKey === "number" && Number.isFinite(fallbackKey)) {
5698
- return chunk2TOLRBFU_js.clampUnitInterval(fallbackKey / 1e5);
5714
+ return chunkIVCWQLQK_js.clampUnitInterval(fallbackKey / 1e5);
5699
5715
  }
5700
- return chunk2TOLRBFU_js.clampUnitInterval(fallback);
5716
+ return chunkIVCWQLQK_js.clampUnitInterval(fallback);
5701
5717
  }
5702
5718
  function getConnectorPathGeometry(element) {
5703
5719
  const width = Math.max(element.width, 1);
@@ -5834,11 +5850,11 @@ function strokeContext(shapeStyle, strokePaint, strokeWidth, dashArray) {
5834
5850
  strokePaint,
5835
5851
  strokeWidth,
5836
5852
  dashArray,
5837
- lineCap: chunk2TOLRBFU_js.svgLineCap(shapeStyle?.lineCap),
5853
+ lineCap: chunkIVCWQLQK_js.svgLineCap(shapeStyle?.lineCap),
5838
5854
  lineJoin,
5839
5855
  miterLimit,
5840
- offsets: chunk2TOLRBFU_js.getCompoundLineOffsets(shapeStyle?.compoundLine, strokeWidth),
5841
- widths: chunk2TOLRBFU_js.getCompoundLineWidths(shapeStyle?.compoundLine, strokeWidth)
5856
+ offsets: chunkIVCWQLQK_js.getCompoundLineOffsets(shapeStyle?.compoundLine, strokeWidth),
5857
+ widths: chunkIVCWQLQK_js.getCompoundLineWidths(shapeStyle?.compoundLine, strokeWidth)
5842
5858
  };
5843
5859
  }
5844
5860
  function strokeStrands(d, keyBase, ctx) {
@@ -5861,7 +5877,42 @@ function strokeStrands(d, keyBase, ctx) {
5861
5877
  }
5862
5878
  function renderCustomGeometryVector(pathData, pathWidth, pathHeight, structuredPaths, shapeStyle, hasFill, fillColor, fillOpacity, strokePaint, strokeWidth, dashArray, animatesFill = false) {
5863
5879
  const ctx = strokeContext(shapeStyle, strokePaint, strokeWidth, dashArray);
5864
- const subpaths = structuredPaths && structuredPaths.length > 0 ? chunkAD2CLKY6_js.customGeometryPathsToSvgSubpaths(structuredPaths, pathWidth, pathHeight) : void 0;
5880
+ const gradientStops = shapeStyle?.fillGradientStops;
5881
+ const hasGradient = Boolean(gradientStops && gradientStops.length > 0);
5882
+ let gradientId;
5883
+ let gradientNode;
5884
+ if (hasGradient && gradientStops) {
5885
+ let hash = 2166136261;
5886
+ for (let i = 0; i < pathData.length; i++) {
5887
+ hash = Math.imul(hash ^ pathData.charCodeAt(i), 16777619);
5888
+ }
5889
+ gradientId = `pptx-custom-gradient-${(hash >>> 0).toString(36)}`;
5890
+ const angle = shapeStyle?.fillGradientAngle ?? 0;
5891
+ const radians = (angle - 90) * Math.PI / 180;
5892
+ const dx = Math.cos(radians) * 50;
5893
+ const dy = Math.sin(radians) * 50;
5894
+ gradientNode = /* @__PURE__ */ jsxRuntime.jsx("defs", { children: /* @__PURE__ */ jsxRuntime.jsx(
5895
+ "linearGradient",
5896
+ {
5897
+ id: gradientId,
5898
+ x1: `${50 - dx}%`,
5899
+ y1: `${50 - dy}%`,
5900
+ x2: `${50 + dx}%`,
5901
+ y2: `${50 + dy}%`,
5902
+ children: [...gradientStops].sort((a, b) => a.position - b.position).map((stop, index) => /* @__PURE__ */ jsxRuntime.jsx(
5903
+ "stop",
5904
+ {
5905
+ offset: `${stop.position}%`,
5906
+ stopColor: stop.color,
5907
+ stopOpacity: stop.opacity ?? 1
5908
+ },
5909
+ `${stop.position}-${index}`
5910
+ ))
5911
+ }
5912
+ ) });
5913
+ }
5914
+ const customFillPaint = gradientId ? `url(#${gradientId})` : void 0;
5915
+ const subpaths = structuredPaths && structuredPaths.length > 0 ? chunkKAP5TS7O_js.customGeometryPathsToSvgSubpaths(structuredPaths, pathWidth, pathHeight) : void 0;
5865
5916
  const needsPerSubpath = subpaths !== void 0 && subpaths.some((sp) => sp.fillMode && sp.fillMode !== "norm" || sp.stroke === false);
5866
5917
  const nodes = [];
5867
5918
  if (subpaths && needsPerSubpath) {
@@ -5873,7 +5924,7 @@ function renderCustomGeometryVector(pathData, pathWidth, pathHeight, structuredP
5873
5924
  "path",
5874
5925
  {
5875
5926
  d: paint.d,
5876
- fill: animatesFill ? "inherit" : paint.fill,
5927
+ fill: animatesFill ? "inherit" : customFillPaint ?? paint.fill,
5877
5928
  stroke: "none",
5878
5929
  vectorEffect: "non-scaling-stroke"
5879
5930
  },
@@ -5892,7 +5943,7 @@ function renderCustomGeometryVector(pathData, pathWidth, pathHeight, structuredP
5892
5943
  "path",
5893
5944
  {
5894
5945
  d: pathData,
5895
- fill: animatesFill ? "inherit" : chunk2TOLRBFU_js.colorWithOpacity(fillColor, fillOpacity),
5946
+ fill: animatesFill ? "inherit" : customFillPaint ?? chunkIVCWQLQK_js.colorWithOpacity(fillColor, fillOpacity),
5896
5947
  stroke: "none",
5897
5948
  vectorEffect: "non-scaling-stroke"
5898
5949
  },
@@ -5904,13 +5955,16 @@ function renderCustomGeometryVector(pathData, pathWidth, pathHeight, structuredP
5904
5955
  nodes.push(...strokeStrands(pathData, "agg", ctx));
5905
5956
  }
5906
5957
  }
5907
- return /* @__PURE__ */ jsxRuntime.jsx(
5958
+ return /* @__PURE__ */ jsxRuntime.jsxs(
5908
5959
  "svg",
5909
5960
  {
5910
5961
  viewBox: `0 0 ${pathWidth} ${pathHeight}`,
5911
5962
  className: "w-full h-full pointer-events-none",
5912
5963
  preserveAspectRatio: "none",
5913
- children: nodes
5964
+ children: [
5965
+ gradientNode,
5966
+ nodes
5967
+ ]
5914
5968
  }
5915
5969
  );
5916
5970
  }
@@ -5934,14 +5988,14 @@ function renderStrokeOnlyPreset(presetPaths, width, height, shapeStyle, strokePa
5934
5988
  );
5935
5989
  }
5936
5990
  function renderVectorShape(element, hasFill, fillColor, strokeWidth, strokeColor, animatesFill, animatesStroke) {
5937
- if (!chunkAD2CLKY6_js.hasShapeProperties(element)) {
5991
+ if (!chunkKAP5TS7O_js.hasShapeProperties(element)) {
5938
5992
  return null;
5939
5993
  }
5940
5994
  const normalizedType = (element.shapeType || "").toLowerCase();
5941
- const fillPaint = animatesFill ? "inherit" : chunk2TOLRBFU_js.colorWithOpacity(fillColor, element.shapeStyle?.fillOpacity);
5942
- const strokePaint = animatesStroke ? "inherit" : chunk2TOLRBFU_js.colorWithOpacity(strokeColor, element.shapeStyle?.strokeOpacity);
5943
- const dashType = chunk2TOLRBFU_js.normalizeStrokeDashType(element.shapeStyle?.strokeDash);
5944
- const dashArray = chunk2TOLRBFU_js.getSvgStrokeDasharray(
5995
+ const fillPaint = animatesFill ? "inherit" : chunkIVCWQLQK_js.colorWithOpacity(fillColor, element.shapeStyle?.fillOpacity);
5996
+ const strokePaint = animatesStroke ? "inherit" : chunkIVCWQLQK_js.colorWithOpacity(strokeColor, element.shapeStyle?.strokeOpacity);
5997
+ const dashType = chunkIVCWQLQK_js.normalizeStrokeDashType(element.shapeStyle?.strokeDash);
5998
+ const dashArray = chunkIVCWQLQK_js.getSvgStrokeDasharray(
5945
5999
  dashType,
5946
6000
  Math.max(strokeWidth, 1),
5947
6001
  element.shapeStyle?.customDashSegments
@@ -6020,18 +6074,18 @@ function renderVectorShape(element, hasFill, fillColor, strokeWidth, strokeColor
6020
6074
  Boolean(animatesFill)
6021
6075
  );
6022
6076
  }
6023
- if (chunkAD2CLKY6_js.isCalloutShape(normalizedType)) {
6077
+ if (chunkKAP5TS7O_js.isCalloutShape(normalizedType)) {
6024
6078
  const width = Math.max(element.width, 1);
6025
6079
  const height = Math.max(element.height, 1);
6026
- const geometry = chunkAD2CLKY6_js.getCalloutLeaderLineGeometry(
6080
+ const geometry = chunkKAP5TS7O_js.getCalloutLeaderLineGeometry(
6027
6081
  normalizedType,
6028
6082
  width,
6029
6083
  height,
6030
6084
  element.shapeAdjustments
6031
6085
  );
6032
6086
  if (geometry && geometry.points.length >= 2) {
6033
- const leaderPath = chunkAD2CLKY6_js.buildCalloutLeaderLineSvgPath(geometry);
6034
- const bounds = chunkAD2CLKY6_js.getCalloutViewBoxBounds(width, height, geometry);
6087
+ const leaderPath = chunkKAP5TS7O_js.buildCalloutLeaderLineSvgPath(geometry);
6088
+ const bounds = chunkKAP5TS7O_js.getCalloutViewBoxBounds(width, height, geometry);
6035
6089
  const lineStroke = Math.max(strokeWidth, 1);
6036
6090
  const offsetLeft = bounds.minX;
6037
6091
  const offsetTop = bounds.minY;
@@ -6094,10 +6148,10 @@ function renderVectorShape(element, hasFill, fillColor, strokeWidth, strokeColor
6094
6148
  const endArrowW = element.shapeStyle?.connectorEndArrowWidth;
6095
6149
  const endArrowL = element.shapeStyle?.connectorEndArrowLength;
6096
6150
  const compoundLine = element.shapeStyle?.compoundLine;
6097
- const connectorLineCap = chunk2TOLRBFU_js.svgLineCap(element.shapeStyle?.lineCap);
6151
+ const connectorLineCap = chunkIVCWQLQK_js.svgLineCap(element.shapeStyle?.lineCap);
6098
6152
  const hitTargetWidth = Math.max(strokeWidth * 3, 12);
6099
- const offsets = chunk2TOLRBFU_js.getCompoundLineOffsets(compoundLine, strokeWidth);
6100
- const widths = chunk2TOLRBFU_js.getCompoundLineWidths(compoundLine, strokeWidth);
6153
+ const offsets = chunkIVCWQLQK_js.getCompoundLineOffsets(compoundLine, strokeWidth);
6154
+ const widths = chunkIVCWQLQK_js.getCompoundLineWidths(compoundLine, strokeWidth);
6101
6155
  return /* @__PURE__ */ jsxRuntime.jsxs(
6102
6156
  "svg",
6103
6157
  {
@@ -6163,7 +6217,7 @@ function renderVectorShape(element, hasFill, fillColor, strokeWidth, strokeColor
6163
6217
 
6164
6218
  // src/viewer/utils/image-style.ts
6165
6219
  function getImageMaskStyle(element) {
6166
- if (!chunkAD2CLKY6_js.hasShapeProperties(element)) {
6220
+ if (!chunkKAP5TS7O_js.hasShapeProperties(element)) {
6167
6221
  return void 0;
6168
6222
  }
6169
6223
  const shapeType = element.shapeType;
@@ -6172,7 +6226,7 @@ function getImageMaskStyle(element) {
6172
6226
  }
6173
6227
  const normalized = shapeType.toLowerCase();
6174
6228
  if (normalized === "roundrect" || normalized === "round1rect" || normalized === "round2samerect" || normalized === "round2diagrect" || normalized === "sniproundrect" || normalized === "snip1rect" || normalized === "snip2diagrect") {
6175
- const radiusPx = chunk2TOLRBFU_js.getRoundRectRadiusPx(element);
6229
+ const radiusPx = chunkIVCWQLQK_js.getRoundRectRadiusPx(element);
6176
6230
  if (radiusPx <= 0.01) {
6177
6231
  return void 0;
6178
6232
  }
@@ -6184,7 +6238,7 @@ function getImageMaskStyle(element) {
6184
6238
  if (normalized === "can" || normalized === "cylinder") {
6185
6239
  return { borderRadius: "48% / 12%" };
6186
6240
  }
6187
- const clipPath = chunk2TOLRBFU_js.getResolvedShapeClipPath(element);
6241
+ const clipPath = chunkIVCWQLQK_js.getResolvedShapeClipPath(element);
6188
6242
  if (!clipPath) {
6189
6243
  return void 0;
6190
6244
  }
@@ -6192,7 +6246,7 @@ function getImageMaskStyle(element) {
6192
6246
  }
6193
6247
  function getImageRenderStyle(element) {
6194
6248
  const maskStyle = getImageMaskStyle(element) || {};
6195
- if (!chunkAD2CLKY6_js.isImageLikeElement(element)) {
6249
+ if (!chunkKAP5TS7O_js.isImageLikeElement(element)) {
6196
6250
  return {
6197
6251
  ...maskStyle,
6198
6252
  width: "100%",
@@ -6200,10 +6254,10 @@ function getImageRenderStyle(element) {
6200
6254
  objectFit: "cover"
6201
6255
  };
6202
6256
  }
6203
- const cropLeft = chunk2TOLRBFU_js.clampCropValue(element.cropLeft);
6204
- const cropTop = chunk2TOLRBFU_js.clampCropValue(element.cropTop);
6205
- const cropRight = chunk2TOLRBFU_js.clampCropValue(element.cropRight);
6206
- const cropBottom = chunk2TOLRBFU_js.clampCropValue(element.cropBottom);
6257
+ const cropLeft = chunkIVCWQLQK_js.clampCropValue(element.cropLeft);
6258
+ const cropTop = chunkIVCWQLQK_js.clampCropValue(element.cropTop);
6259
+ const cropRight = chunkIVCWQLQK_js.clampCropValue(element.cropRight);
6260
+ const cropBottom = chunkIVCWQLQK_js.clampCropValue(element.cropBottom);
6207
6261
  const hasCrop = cropLeft + cropRight > 1e-4 || cropTop + cropBottom > 1e-4;
6208
6262
  if (!hasCrop) {
6209
6263
  return {
@@ -6215,10 +6269,10 @@ function getImageRenderStyle(element) {
6215
6269
  }
6216
6270
  const safeHorizontalScale = cropLeft + cropRight >= 0.99 ? 0.99 / (cropLeft + cropRight) : 1;
6217
6271
  const safeVerticalScale = cropTop + cropBottom >= 0.99 ? 0.99 / (cropTop + cropBottom) : 1;
6218
- const normalizedLeft = chunk2TOLRBFU_js.clampCropValue(cropLeft * safeHorizontalScale);
6219
- const normalizedRight = chunk2TOLRBFU_js.clampCropValue(cropRight * safeHorizontalScale);
6220
- const normalizedTop = chunk2TOLRBFU_js.clampCropValue(cropTop * safeVerticalScale);
6221
- const normalizedBottom = chunk2TOLRBFU_js.clampCropValue(cropBottom * safeVerticalScale);
6272
+ const normalizedLeft = chunkIVCWQLQK_js.clampCropValue(cropLeft * safeHorizontalScale);
6273
+ const normalizedRight = chunkIVCWQLQK_js.clampCropValue(cropRight * safeHorizontalScale);
6274
+ const normalizedTop = chunkIVCWQLQK_js.clampCropValue(cropTop * safeVerticalScale);
6275
+ const normalizedBottom = chunkIVCWQLQK_js.clampCropValue(cropBottom * safeVerticalScale);
6222
6276
  const remainingWidth = Math.max(0.01, 1 - normalizedLeft - normalizedRight);
6223
6277
  const remainingHeight = Math.max(0.01, 1 - normalizedTop - normalizedBottom);
6224
6278
  const tx = Math.round(-normalizedLeft / remainingWidth * 1e4) / 100;
@@ -6247,7 +6301,7 @@ var CROP_SHAPE_CLIP_PATHS = {
6247
6301
  star: "polygon(50% 0%, 61% 35%, 98% 35%, 68% 57%, 79% 91%, 50% 70%, 21% 91%, 32% 57%, 2% 35%, 39% 35%)"
6248
6302
  };
6249
6303
  function getCropShapeClipPath(element) {
6250
- if (!chunkAD2CLKY6_js.isImageLikeElement(element)) {
6304
+ if (!chunkKAP5TS7O_js.isImageLikeElement(element)) {
6251
6305
  return void 0;
6252
6306
  }
6253
6307
  const shape = element.cropShape;
@@ -6257,7 +6311,7 @@ function getCropShapeClipPath(element) {
6257
6311
  return CROP_SHAPE_CLIP_PATHS[shape];
6258
6312
  }
6259
6313
  function isImageTiled(element) {
6260
- if (!chunkAD2CLKY6_js.isImageLikeElement(element)) {
6314
+ if (!chunkKAP5TS7O_js.isImageLikeElement(element)) {
6261
6315
  return false;
6262
6316
  }
6263
6317
  return typeof element.tileScaleX === "number" || typeof element.tileScaleY === "number";
@@ -6315,7 +6369,7 @@ function buildMirrorTiledBackground(src, flip, scaleX, scaleY) {
6315
6369
  };
6316
6370
  }
6317
6371
  function getImageTilingStyle(element) {
6318
- if (!chunkAD2CLKY6_js.isImageLikeElement(element) || !isImageTiled(element)) {
6372
+ if (!chunkKAP5TS7O_js.isImageLikeElement(element) || !isImageTiled(element)) {
6319
6373
  return void 0;
6320
6374
  }
6321
6375
  const scaleX = typeof element.tileScaleX === "number" ? element.tileScaleX * 100 : 100;
@@ -6389,9 +6443,9 @@ function parseGradientFillCss(gradFill) {
6389
6443
  }
6390
6444
  const parsed = stops.map((gs) => {
6391
6445
  const pos = Number.parseInt(String(gs["@_pos"] || "0"), 10) / 1e3;
6392
- const color = chunk2TOLRBFU_js.parseDrawingColor(gs) ?? "#888888";
6393
- const opacity = chunk2TOLRBFU_js.parseDrawingColorOpacity(gs);
6394
- return { pos, color: chunk2TOLRBFU_js.colorWithOpacity(color, opacity) };
6446
+ const color = chunkIVCWQLQK_js.parseDrawingColor(gs) ?? "#888888";
6447
+ const opacity = chunkIVCWQLQK_js.parseDrawingColorOpacity(gs);
6448
+ return { pos, color: chunkIVCWQLQK_js.colorWithOpacity(color, opacity) };
6395
6449
  }).sort((a, b) => a.pos - b.pos);
6396
6450
  const stopStrings = parsed.map((s) => `${s.color} ${s.pos.toFixed(1)}%`).join(", ");
6397
6451
  const lin = gradFill["a:lin"];
@@ -6432,8 +6486,8 @@ function parsePatternFillCss(pattFill) {
6432
6486
  if (!pattFill) {
6433
6487
  return void 0;
6434
6488
  }
6435
- const fgColor = chunk2TOLRBFU_js.parseDrawingColor(pattFill["a:fgClr"]) ?? "#000000";
6436
- const bgColor = chunk2TOLRBFU_js.parseDrawingColor(pattFill["a:bgClr"]) ?? "#ffffff";
6489
+ const fgColor = chunkIVCWQLQK_js.parseDrawingColor(pattFill["a:fgClr"]) ?? "#000000";
6490
+ const bgColor = chunkIVCWQLQK_js.parseDrawingColor(pattFill["a:bgClr"]) ?? "#ffffff";
6437
6491
  const preset = String(pattFill["@_prst"] || "ltDnDiag");
6438
6492
  switch (preset) {
6439
6493
  case "ltHorz":
@@ -6544,11 +6598,11 @@ function parseCellBorders(cellProperties) {
6544
6598
  const prstDash = ln["a:prstDash"];
6545
6599
  const dashVal = prstDash ? String(prstDash["@_val"] || "") : void 0;
6546
6600
  const cssBorderStyle = ooxmlDashToCss(dashVal);
6547
- const color = chunk2TOLRBFU_js.parseDrawingColor(ln["a:solidFill"]);
6601
+ const color = chunkIVCWQLQK_js.parseDrawingColor(ln["a:solidFill"]);
6548
6602
  if (color) {
6549
- const opacity = chunk2TOLRBFU_js.parseDrawingColorOpacity(ln["a:solidFill"]);
6603
+ const opacity = chunkIVCWQLQK_js.parseDrawingColorOpacity(ln["a:solidFill"]);
6550
6604
  const key = `${edge.prefix}`;
6551
- borderStyle[key] = `${widthPx}px ${cssBorderStyle} ${chunk2TOLRBFU_js.colorWithOpacity(color, opacity)}`;
6605
+ borderStyle[key] = `${widthPx}px ${cssBorderStyle} ${chunkIVCWQLQK_js.colorWithOpacity(color, opacity)}`;
6552
6606
  }
6553
6607
  }
6554
6608
  return borderStyle;
@@ -6561,7 +6615,7 @@ function parseCellTextEffects(runProps) {
6561
6615
  const textShadowParts = [];
6562
6616
  const outerShdw = effectLst["a:outerShdw"];
6563
6617
  if (outerShdw) {
6564
- const shdwColor = chunk2TOLRBFU_js.parseDrawingColor(outerShdw);
6618
+ const shdwColor = chunkIVCWQLQK_js.parseDrawingColor(outerShdw);
6565
6619
  if (shdwColor) {
6566
6620
  const blurRad = Number.parseInt(String(outerShdw["@_blurRad"] || "0"), 10);
6567
6621
  const blurPx = blurRad > 0 ? Math.round(blurRad / 12700) : 0;
@@ -6579,7 +6633,7 @@ function parseCellTextEffects(runProps) {
6579
6633
  }
6580
6634
  const glow = effectLst["a:glow"];
6581
6635
  if (glow) {
6582
- const glowColor = chunk2TOLRBFU_js.parseDrawingColor(glow);
6636
+ const glowColor = chunkIVCWQLQK_js.parseDrawingColor(glow);
6583
6637
  if (glowColor) {
6584
6638
  const glowRad = Number.parseInt(String(glow["@_rad"] || "0"), 10);
6585
6639
  const glowPx = glowRad > 0 ? Math.round(glowRad / 12700) : 2;
@@ -6658,10 +6712,10 @@ function extractTableCellStyle(cellXml, fallbackStyle, schemeColorOverrides) {
6658
6712
  if (runProps?.["@_u"] !== void 0) {
6659
6713
  cellStyle.textDecorationLine = runProps["@_u"] === "sng" ? "underline" : "none";
6660
6714
  }
6661
- const runColor = chunk2TOLRBFU_js.parseDrawingColor(runProps?.["a:solidFill"], schemeColorOverrides) || chunk2TOLRBFU_js.parseDrawingColor(runProps?.["a:highlight"], schemeColorOverrides);
6715
+ const runColor = chunkIVCWQLQK_js.parseDrawingColor(runProps?.["a:solidFill"], schemeColorOverrides) || chunkIVCWQLQK_js.parseDrawingColor(runProps?.["a:highlight"], schemeColorOverrides);
6662
6716
  if (runColor) {
6663
- const opacity = chunk2TOLRBFU_js.parseDrawingColorOpacity(runProps?.["a:solidFill"]);
6664
- cellStyle.color = chunk2TOLRBFU_js.colorWithOpacity(runColor, opacity);
6717
+ const opacity = chunkIVCWQLQK_js.parseDrawingColorOpacity(runProps?.["a:solidFill"]);
6718
+ cellStyle.color = chunkIVCWQLQK_js.colorWithOpacity(runColor, opacity);
6665
6719
  }
6666
6720
  const fontFamily = runProps?.["a:latin"]?.["@_typeface"] || runProps?.["a:ea"]?.["@_typeface"] || runProps?.["a:cs"]?.["@_typeface"];
6667
6721
  if (fontFamily) {
@@ -6671,15 +6725,15 @@ function extractTableCellStyle(cellXml, fallbackStyle, schemeColorOverrides) {
6671
6725
  cellStyle.textAlign = parseParagraphAlignment(paragraphProperties["@_algn"]);
6672
6726
  }
6673
6727
  const cellProperties = cellXml["a:tcPr"];
6674
- const cellFill = chunk2TOLRBFU_js.parseDrawingColor(
6728
+ const cellFill = chunkIVCWQLQK_js.parseDrawingColor(
6675
6729
  cellProperties?.["a:solidFill"],
6676
6730
  schemeColorOverrides
6677
6731
  );
6678
6732
  if (cellFill) {
6679
- const opacity = chunk2TOLRBFU_js.parseDrawingColorOpacity(
6733
+ const opacity = chunkIVCWQLQK_js.parseDrawingColorOpacity(
6680
6734
  cellProperties?.["a:solidFill"]
6681
6735
  );
6682
- cellStyle.backgroundColor = chunk2TOLRBFU_js.colorWithOpacity(cellFill, opacity);
6736
+ cellStyle.backgroundColor = chunkIVCWQLQK_js.colorWithOpacity(cellFill, opacity);
6683
6737
  } else {
6684
6738
  const gradCss = parseGradientFillCss(cellProperties?.["a:gradFill"]);
6685
6739
  if (gradCss) {
@@ -6694,16 +6748,16 @@ function extractTableCellStyle(cellXml, fallbackStyle, schemeColorOverrides) {
6694
6748
  const edgeBorders = parseCellBorders(cellProperties);
6695
6749
  Object.assign(cellStyle, edgeBorders);
6696
6750
  if (!cellStyle.borderLeftColor && !cellStyle.borderRightColor && !cellStyle.borderTopColor && !cellStyle.borderBottomColor) {
6697
- const borderColor = chunk2TOLRBFU_js.parseDrawingColor(
6751
+ const borderColor = chunkIVCWQLQK_js.parseDrawingColor(
6698
6752
  cellProperties?.["a:lnL"]?.["a:solidFill"],
6699
6753
  schemeColorOverrides
6700
- ) || chunk2TOLRBFU_js.parseDrawingColor(
6754
+ ) || chunkIVCWQLQK_js.parseDrawingColor(
6701
6755
  cellProperties?.["a:lnR"]?.["a:solidFill"],
6702
6756
  schemeColorOverrides
6703
- ) || chunk2TOLRBFU_js.parseDrawingColor(
6757
+ ) || chunkIVCWQLQK_js.parseDrawingColor(
6704
6758
  cellProperties?.["a:lnT"]?.["a:solidFill"],
6705
6759
  schemeColorOverrides
6706
- ) || chunk2TOLRBFU_js.parseDrawingColor(
6760
+ ) || chunkIVCWQLQK_js.parseDrawingColor(
6707
6761
  cellProperties?.["a:lnB"]?.["a:solidFill"],
6708
6762
  schemeColorOverrides
6709
6763
  );
@@ -6782,10 +6836,10 @@ function resolveTableStyleFillColor(fill, colorScheme) {
6782
6836
  }
6783
6837
  let color = base;
6784
6838
  if (fill.tint !== void 0 && fill.tint > 0) {
6785
- color = chunk2TOLRBFU_js.tintColor2(color, fill.tint / 1e5);
6839
+ color = chunkIVCWQLQK_js.tintColor2(color, fill.tint / 1e5);
6786
6840
  }
6787
6841
  if (fill.shade !== void 0 && fill.shade > 0) {
6788
- color = chunk2TOLRBFU_js.shadeColor2(color, 1 - fill.shade / 1e5);
6842
+ color = chunkIVCWQLQK_js.shadeColor2(color, 1 - fill.shade / 1e5);
6789
6843
  }
6790
6844
  return color;
6791
6845
  }
@@ -6810,7 +6864,7 @@ function applyTableStyleText(text, colorScheme, style, fontScheme) {
6810
6864
  style.fontFamily = text.fontFace;
6811
6865
  applied = true;
6812
6866
  } else {
6813
- const refFont = chunk2TOLRBFU_js.resolveFontRefIdx(text.fontRefIdx, fontScheme);
6867
+ const refFont = chunkIVCWQLQK_js.resolveFontRefIdx(text.fontRefIdx, fontScheme);
6814
6868
  if (refFont) {
6815
6869
  style.fontFamily = refFont;
6816
6870
  applied = true;
@@ -6821,10 +6875,10 @@ function applyTableStyleText(text, colorScheme, style, fontScheme) {
6821
6875
  if (base) {
6822
6876
  let color = base;
6823
6877
  if (text.fontTint !== void 0 && text.fontTint > 0) {
6824
- color = chunk2TOLRBFU_js.tintColor2(color, text.fontTint / 1e5);
6878
+ color = chunkIVCWQLQK_js.tintColor2(color, text.fontTint / 1e5);
6825
6879
  }
6826
6880
  if (text.fontShade !== void 0 && text.fontShade > 0) {
6827
- color = chunk2TOLRBFU_js.shadeColor2(color, 1 - text.fontShade / 1e5);
6881
+ color = chunkIVCWQLQK_js.shadeColor2(color, 1 - text.fontShade / 1e5);
6828
6882
  }
6829
6883
  style.color = color;
6830
6884
  applied = true;
@@ -6913,9 +6967,12 @@ function getTableCellBandStyle(element, rowIndex, cellIndex, rowCount, columnCou
6913
6967
  }
6914
6968
  if (td.firstRowHeader && rowIndex === 0) {
6915
6969
  style.fontWeight = 700;
6916
- const headerBg = resolveFill(styleEntry?.firstRowFill, "rgba(68, 114, 196, 0.85)");
6917
- style.backgroundColor = headerBg;
6918
- style.color = "#ffffff";
6970
+ const authoredHeaderFill = styleEntry?.firstRowFill;
6971
+ const headerBg = resolveFill(authoredHeaderFill, "rgba(68, 114, 196, 0.85)");
6972
+ if (!authoredHeaderFill?.noFill) {
6973
+ style.backgroundColor = headerBg;
6974
+ style.color = "#ffffff";
6975
+ }
6919
6976
  applyTableStyleText(styleEntry?.firstRowText, colorScheme, style, fontScheme);
6920
6977
  applied = true;
6921
6978
  }
@@ -7013,7 +7070,7 @@ function parseTableElementData(element, fallbackTextStyle) {
7013
7070
  };
7014
7071
  }
7015
7072
  function getCellDiagonalBorders2(style, tableData, pos, styleCtx) {
7016
- return chunk2TOLRBFU_js.getCellDiagonalBorders(style, tableData, pos, {
7073
+ return chunkIVCWQLQK_js.getCellDiagonalBorders(style, tableData, pos, {
7017
7074
  tableStyleMap: styleCtx?.tableStyleMap,
7018
7075
  colorScheme: styleCtx?.theme?.colorScheme,
7019
7076
  fontScheme: styleCtx?.theme?.fontScheme
@@ -7161,9 +7218,9 @@ function cellStyleToCss(style) {
7161
7218
  if (style.gradientFillCss) {
7162
7219
  css.background = style.gradientFillCss;
7163
7220
  } else if (style.fillMode === "pattern" && style.patternFillPreset) {
7164
- const fg = chunk2TOLRBFU_js.normalizeHexColor(style.patternFillForeground, "#000000");
7165
- const bg = chunk2TOLRBFU_js.normalizeHexColor(style.patternFillBackground, "#ffffff");
7166
- const svgPattern = chunk2TOLRBFU_js.getPatternSvg(style.patternFillPreset, fg, bg);
7221
+ const fg = chunkIVCWQLQK_js.normalizeHexColor(style.patternFillForeground, "#000000");
7222
+ const bg = chunkIVCWQLQK_js.normalizeHexColor(style.patternFillBackground, "#ffffff");
7223
+ const svgPattern = chunkIVCWQLQK_js.getPatternSvg(style.patternFillPreset, fg, bg);
7167
7224
  if (svgPattern) {
7168
7225
  const encoded = encodeURIComponent(svgPattern);
7169
7226
  css.backgroundImage = `url("data:image/svg+xml,${encoded}")`;
@@ -7239,7 +7296,7 @@ function cellStyleToCss(style) {
7239
7296
  if (edge.width || edge.color) {
7240
7297
  const w = edge.width ?? 1;
7241
7298
  const c = edge.color ?? style.borderColor ?? "#000000";
7242
- const s = chunk2TOLRBFU_js.ooxmlDashToCssBorderStyle(edge.dash);
7299
+ const s = chunkIVCWQLQK_js.ooxmlDashToCssBorderStyle(edge.dash);
7243
7300
  css[edge.prefix] = `${w}px ${s} ${c}`;
7244
7301
  }
7245
7302
  }
@@ -7270,7 +7327,7 @@ function cellStyleToCss(style) {
7270
7327
  css.textShadow = textShadowParts.join(", ");
7271
7328
  }
7272
7329
  if (style.cell3D) {
7273
- Object.assign(css, chunk2TOLRBFU_js.cell3DBevelCss(style.cell3D));
7330
+ Object.assign(css, chunkIVCWQLQK_js.cell3DBevelCss(style.cell3D));
7274
7331
  }
7275
7332
  return css;
7276
7333
  }
@@ -7284,7 +7341,7 @@ function TableResizeOverlay({
7284
7341
  const containerRef = React4.useRef(null);
7285
7342
  const [rowBounds, setRowBounds] = React4.useState([]);
7286
7343
  const dragRef = React4.useRef(null);
7287
- const colBoundaries = React4.useMemo(() => chunk2TOLRBFU_js.computeColumnBoundaries(columnWidths), [columnWidths]);
7344
+ const colBoundaries = React4.useMemo(() => chunkIVCWQLQK_js.computeColumnBoundaries(columnWidths), [columnWidths]);
7288
7345
  const measureRows = React4.useCallback(() => {
7289
7346
  const container = containerRef.current;
7290
7347
  if (!container) {
@@ -7331,11 +7388,11 @@ function TableResizeOverlay({
7331
7388
  const rect = containerRef.current.getBoundingClientRect();
7332
7389
  if (drag.type === "col" && drag.initialWidths && onResizeColumns) {
7333
7390
  const deltaProp = (e.clientX - drag.startPos) / rect.width;
7334
- onResizeColumns(chunk2TOLRBFU_js.computeResizedColumnWidths(drag.initialWidths, drag.index, deltaProp));
7391
+ onResizeColumns(chunkIVCWQLQK_js.computeResizedColumnWidths(drag.initialWidths, drag.index, deltaProp));
7335
7392
  } else if (drag.type === "row" && onResizeRow) {
7336
7393
  const deltaY = e.clientY - drag.startPos;
7337
- const newHeight = chunk2TOLRBFU_js.computeResizedRowHeight(
7338
- drag.initialRowHeight ?? chunk2TOLRBFU_js.DEFAULT_ROW_HEIGHT,
7394
+ const newHeight = chunkIVCWQLQK_js.computeResizedRowHeight(
7395
+ drag.initialRowHeight ?? chunkIVCWQLQK_js.DEFAULT_ROW_HEIGHT,
7339
7396
  deltaY
7340
7397
  );
7341
7398
  onResizeRow(drag.index, newHeight);
@@ -7373,7 +7430,7 @@ function TableResizeOverlay({
7373
7430
  e.stopPropagation();
7374
7431
  const table = containerRef.current?.querySelector("table");
7375
7432
  const tr = table?.querySelectorAll("tbody > tr")[index];
7376
- const actualHeight = tr?.offsetHeight ?? chunk2TOLRBFU_js.DEFAULT_ROW_HEIGHT;
7433
+ const actualHeight = tr?.offsetHeight ?? chunkIVCWQLQK_js.DEFAULT_ROW_HEIGHT;
7377
7434
  document.body.style.cursor = "row-resize";
7378
7435
  document.body.style.userSelect = "none";
7379
7436
  dragRef.current = {
@@ -7421,7 +7478,7 @@ function renderTableFromTableData(element, textStyle, options) {
7421
7478
  }
7422
7479
  const first = selectedCell.selectedCells[0];
7423
7480
  const last = selectedCell.selectedCells[selectedCell.selectedCells.length - 1];
7424
- return chunk2TOLRBFU_js.computeSelectionRect(first.row, first.col, last.row, last.col, tableData);
7481
+ return chunkIVCWQLQK_js.computeSelectionRect(first.row, first.col, last.row, last.col, tableData);
7425
7482
  })();
7426
7483
  return /* @__PURE__ */ jsxRuntime.jsx(
7427
7484
  TableResizeOverlay,
@@ -7454,7 +7511,7 @@ function renderTableFromTableData(element, textStyle, options) {
7454
7511
  return null;
7455
7512
  }
7456
7513
  const isCellSelected = selectedCell?.rowIndex === rowIndex && selectedCell?.columnIndex === cellIndex;
7457
- const isInMultiSelection = chunk2TOLRBFU_js.isCellInRect(rowIndex, cellIndex, selectionRect);
7514
+ const isInMultiSelection = chunkIVCWQLQK_js.isCellInRect(rowIndex, cellIndex, selectionRect);
7458
7515
  const isCellEditing = isCellSelected && selectedCell?.isEditing;
7459
7516
  const diag = getCellDiagonalBorders2(
7460
7517
  cell.style,
@@ -7484,7 +7541,7 @@ function renderTableFromTableData(element, textStyle, options) {
7484
7541
  }
7485
7542
  event.stopPropagation();
7486
7543
  if (event.shiftKey && selectedCell) {
7487
- const rect = chunk2TOLRBFU_js.computeSelectionRect(
7544
+ const rect = chunkIVCWQLQK_js.computeSelectionRect(
7488
7545
  selectedCell.rowIndex,
7489
7546
  selectedCell.columnIndex,
7490
7547
  rowIndex,
@@ -7494,7 +7551,7 @@ function renderTableFromTableData(element, textStyle, options) {
7494
7551
  options?.onSelectCell?.({
7495
7552
  rowIndex: selectedCell.rowIndex,
7496
7553
  columnIndex: selectedCell.columnIndex,
7497
- selectedCells: chunk2TOLRBFU_js.rectToCells(rect)
7554
+ selectedCells: chunkIVCWQLQK_js.rectToCells(rect)
7498
7555
  });
7499
7556
  } else {
7500
7557
  options?.onSelectCell?.({
@@ -7571,7 +7628,7 @@ function renderTableElement(element, textStyle, options) {
7571
7628
  }
7572
7629
  const first = selectedCell.selectedCells[0];
7573
7630
  const last = selectedCell.selectedCells[selectedCell.selectedCells.length - 1];
7574
- return chunk2TOLRBFU_js.computeSelectionRect(first.row, first.col, last.row, last.col, tableEl.tableData);
7631
+ return chunkIVCWQLQK_js.computeSelectionRect(first.row, first.col, last.row, last.col, tableEl.tableData);
7575
7632
  })();
7576
7633
  const schemeOverrides = options?.styleCtx?.theme?.colorScheme ? options.styleCtx.theme.colorScheme : void 0;
7577
7634
  return /* @__PURE__ */ jsxRuntime.jsx(
@@ -7648,7 +7705,7 @@ function renderTableElement(element, textStyle, options) {
7648
7705
  "border px-1 py-0.5 align-top",
7649
7706
  isEditable2 && hasCellSelectionHandler ? "border-blue-200/70 cursor-cell" : "border-white/30",
7650
7707
  selectedCell?.rowIndex === rowIndex && selectedCell?.columnIndex === cellIndex ? "ring-1 ring-inset ring-blue-500" : null,
7651
- chunk2TOLRBFU_js.isCellInRect(rowIndex, cellIndex, xmlSelectionRect) && !(selectedCell?.rowIndex === rowIndex && selectedCell?.columnIndex === cellIndex) ? "bg-blue-500/15 ring-1 ring-inset ring-blue-400/50" : null
7708
+ chunkIVCWQLQK_js.isCellInRect(rowIndex, cellIndex, xmlSelectionRect) && !(selectedCell?.rowIndex === rowIndex && selectedCell?.columnIndex === cellIndex) ? "bg-blue-500/15 ring-1 ring-inset ring-blue-400/50" : null
7652
7709
  ),
7653
7710
  colSpan,
7654
7711
  rowSpan: rSpan,
@@ -7659,7 +7716,7 @@ function renderTableElement(element, textStyle, options) {
7659
7716
  }
7660
7717
  event.stopPropagation();
7661
7718
  if (event.shiftKey && selectedCell && tableEl.tableData) {
7662
- const rect = chunk2TOLRBFU_js.computeSelectionRect(
7719
+ const rect = chunkIVCWQLQK_js.computeSelectionRect(
7663
7720
  selectedCell.rowIndex,
7664
7721
  selectedCell.columnIndex,
7665
7722
  rowIndex,
@@ -7669,7 +7726,7 @@ function renderTableElement(element, textStyle, options) {
7669
7726
  options?.onSelectCell?.({
7670
7727
  rowIndex: selectedCell.rowIndex,
7671
7728
  columnIndex: selectedCell.columnIndex,
7672
- selectedCells: chunk2TOLRBFU_js.rectToCells(rect)
7729
+ selectedCells: chunkIVCWQLQK_js.rectToCells(rect)
7673
7730
  });
7674
7731
  } else {
7675
7732
  options?.onSelectCell?.({
@@ -7724,24 +7781,24 @@ function renderTableElement(element, textStyle, options) {
7724
7781
  }
7725
7782
  var LEGEND_ITEM_WIDTH = 80;
7726
7783
  function partAttrs(part) {
7727
- return part ? chunk2TOLRBFU_js.chartPartToAttrs(part) : void 0;
7784
+ return part ? chunkIVCWQLQK_js.chartPartToAttrs(part) : void 0;
7728
7785
  }
7729
7786
  function resolveReactPalette(chartData) {
7730
7787
  if (chartData.colorPalette && chartData.colorPalette.length > 0) {
7731
7788
  return chartData.colorPalette;
7732
7789
  }
7733
- return [...chunk2TOLRBFU_js.getChartStylePalette(chartData.style?.styleId)];
7790
+ return [...chunkIVCWQLQK_js.getChartStylePalette(chartData.style?.styleId)];
7734
7791
  }
7735
7792
  function buildReactChartViewModel(element) {
7736
7793
  if (element.type !== "chart" || !element.chartData) {
7737
- return chunk2TOLRBFU_js.buildChartViewModel(element);
7794
+ return chunkIVCWQLQK_js.buildChartViewModel(element);
7738
7795
  }
7739
7796
  const palette = resolveReactPalette(element.chartData);
7740
7797
  const themedElement = {
7741
7798
  ...element,
7742
7799
  chartData: { ...element.chartData, colorPalette: palette }
7743
7800
  };
7744
- return chunk2TOLRBFU_js.buildChartViewModel(themedElement);
7801
+ return chunkIVCWQLQK_js.buildChartViewModel(themedElement);
7745
7802
  }
7746
7803
  function renderPrimitive(prim, key) {
7747
7804
  switch (prim.kind) {
@@ -8130,7 +8187,7 @@ function renderMapChart(element, chartData, categoryLabels) {
8130
8187
  const unmatchedRows = [];
8131
8188
  categories.forEach((cat, i) => {
8132
8189
  const value = values[i] ?? 0;
8133
- const code = chunk2TOLRBFU_js.resolveRegionCode(cat);
8190
+ const code = chunkIVCWQLQK_js.resolveRegionCode(cat);
8134
8191
  if (code) {
8135
8192
  regionValueMap.set(code, { value, label: cat });
8136
8193
  } else {
@@ -8168,8 +8225,8 @@ function renderMapChart(element, chartData, categoryLabels) {
8168
8225
  let fill = "#e2e8f0";
8169
8226
  let dataLabel = null;
8170
8227
  if (entry) {
8171
- const t = chunk2TOLRBFU_js.normalizeValue(entry.value, minVal, maxVal);
8172
- fill = chunk2TOLRBFU_js.sequentialColorScale(t);
8228
+ const t = chunkIVCWQLQK_js.normalizeValue(entry.value, minVal, maxVal);
8229
+ fill = chunkIVCWQLQK_js.sequentialColorScale(t);
8173
8230
  dataLabel = /* @__PURE__ */ jsxRuntime.jsx(
8174
8231
  "text",
8175
8232
  {
@@ -8180,7 +8237,7 @@ function renderMapChart(element, chartData, categoryLabels) {
8180
8237
  fontWeight: 600,
8181
8238
  fill: "#1e293b",
8182
8239
  style: { pointerEvents: "none" },
8183
- children: chunk2TOLRBFU_js.formatAxisValue(entry.value)
8240
+ children: chunkIVCWQLQK_js.formatAxisValue(entry.value)
8184
8241
  },
8185
8242
  `${element.id}-map-dl-${region.code}`
8186
8243
  );
@@ -8198,7 +8255,7 @@ function renderMapChart(element, chartData, categoryLabels) {
8198
8255
  opacity: 0.9,
8199
8256
  children: /* @__PURE__ */ jsxRuntime.jsxs("title", { children: [
8200
8257
  region.name,
8201
- entry ? `: ${chunk2TOLRBFU_js.formatAxisValue(entry.value)}` : ""
8258
+ entry ? `: ${chunkIVCWQLQK_js.formatAxisValue(entry.value)}` : ""
8202
8259
  ] })
8203
8260
  }
8204
8261
  ),
@@ -8236,7 +8293,7 @@ function renderMapChart(element, chartData, categoryLabels) {
8236
8293
  fontSize: 7,
8237
8294
  fill: "#64748b",
8238
8295
  textAnchor: "middle",
8239
- children: chunk2TOLRBFU_js.formatAxisValue(minVal)
8296
+ children: chunkIVCWQLQK_js.formatAxisValue(minVal)
8240
8297
  },
8241
8298
  `${element.id}-map-legend-min`
8242
8299
  ),
@@ -8248,7 +8305,7 @@ function renderMapChart(element, chartData, categoryLabels) {
8248
8305
  fontSize: 7,
8249
8306
  fill: "#64748b",
8250
8307
  textAnchor: "middle",
8251
- children: chunk2TOLRBFU_js.formatAxisValue(maxVal)
8308
+ children: chunkIVCWQLQK_js.formatAxisValue(maxVal)
8252
8309
  },
8253
8310
  `${element.id}-map-legend-max`
8254
8311
  )
@@ -8314,7 +8371,7 @@ function renderMapChart(element, chartData, categoryLabels) {
8314
8371
  y,
8315
8372
  fontSize,
8316
8373
  fill: "#475569",
8317
- children: chunk2TOLRBFU_js.formatAxisValue(row.value)
8374
+ children: chunkIVCWQLQK_js.formatAxisValue(row.value)
8318
8375
  },
8319
8376
  `${element.id}-map-ft-val-${i}`
8320
8377
  )
@@ -8385,7 +8442,7 @@ function renderStackedBarChart(element, _chartData, _categoryLabels) {
8385
8442
 
8386
8443
  // src/viewer/utils/chart-overlay-utils.ts
8387
8444
  function sColor(series, idx) {
8388
- return chunk2TOLRBFU_js.seriesColor(series, idx);
8445
+ return chunkIVCWQLQK_js.seriesColor(series, idx);
8389
8446
  }
8390
8447
  function valToY(val, range, topY, bottomY) {
8391
8448
  const usable = bottomY - topY;
@@ -8924,7 +8981,7 @@ function renderLegend(id, style, series, layout, colorPalette) {
8924
8981
  width: 10,
8925
8982
  height: 10,
8926
8983
  rx: 2,
8927
- fill: chunk2TOLRBFU_js.seriesColor(s, i, style?.styleId, colorPalette)
8984
+ fill: chunkIVCWQLQK_js.seriesColor(s, i, style?.styleId, colorPalette)
8928
8985
  },
8929
8986
  `${id}-leg-r-${i}`
8930
8987
  )
@@ -8948,7 +9005,7 @@ function renderLegend(id, style, series, layout, colorPalette) {
8948
9005
  width: 10,
8949
9006
  height: 10,
8950
9007
  rx: 2,
8951
- fill: chunk2TOLRBFU_js.seriesColor(s, i, style?.styleId, colorPalette)
9008
+ fill: chunkIVCWQLQK_js.seriesColor(s, i, style?.styleId, colorPalette)
8952
9009
  }
8953
9010
  ),
8954
9011
  /* @__PURE__ */ jsxRuntime.jsx("text", { x: x + 14, y: cy + 8, fontSize: 9, fill: "#475569", children: s.name || `Series ${i + 1}` })
@@ -8961,9 +9018,9 @@ function renderGridlines(id, style, range, layout) {
8961
9018
  }
8962
9019
  const lines = [];
8963
9020
  if (range.logScale && range.logBase) {
8964
- const ticks = chunk2TOLRBFU_js.generateLogTicks(range);
9021
+ const ticks = chunkIVCWQLQK_js.generateLogTicks(range);
8965
9022
  ticks.forEach((tickVal, i) => {
8966
- const y = chunk2TOLRBFU_js.valueToY(tickVal, range, layout.plotTop, layout.plotBottom);
9023
+ const y = chunkIVCWQLQK_js.valueToY(tickVal, range, layout.plotTop, layout.plotBottom);
8967
9024
  lines.push(
8968
9025
  /* @__PURE__ */ jsxRuntime.jsx(
8969
9026
  "line",
@@ -8984,7 +9041,7 @@ function renderGridlines(id, style, range, layout) {
8984
9041
  const steps = 4;
8985
9042
  for (let i = 0; i <= steps; i++) {
8986
9043
  const val = range.min + range.span * i / steps;
8987
- const y = chunk2TOLRBFU_js.valueToY(val, range, layout.plotTop, layout.plotBottom);
9044
+ const y = chunkIVCWQLQK_js.valueToY(val, range, layout.plotTop, layout.plotBottom);
8988
9045
  lines.push(
8989
9046
  /* @__PURE__ */ jsxRuntime.jsx(
8990
9047
  "line",
@@ -9008,9 +9065,9 @@ function renderValueAxis(id, range, layout, axisFormatting) {
9008
9065
  const labels = [];
9009
9066
  const hasDisplayUnits = Boolean(axisFormatting?.displayUnits);
9010
9067
  if (range.logScale && range.logBase) {
9011
- const ticks = chunk2TOLRBFU_js.generateLogTicks(range);
9068
+ const ticks = chunkIVCWQLQK_js.generateLogTicks(range);
9012
9069
  ticks.forEach((tickVal, i) => {
9013
- const y = chunk2TOLRBFU_js.valueToY(tickVal, range, layout.plotTop, layout.plotBottom);
9070
+ const y = chunkIVCWQLQK_js.valueToY(tickVal, range, layout.plotTop, layout.plotBottom);
9014
9071
  labels.push(
9015
9072
  /* @__PURE__ */ jsxRuntime.jsx(
9016
9073
  "text",
@@ -9020,7 +9077,7 @@ function renderValueAxis(id, range, layout, axisFormatting) {
9020
9077
  textAnchor: "end",
9021
9078
  fontSize: 8,
9022
9079
  fill: "#64748b",
9023
- children: hasDisplayUnits ? chunk2TOLRBFU_js.formatAxisValueWithUnits(tickVal, axisFormatting) : chunk2TOLRBFU_js.formatAxisValue(tickVal)
9080
+ children: hasDisplayUnits ? chunkIVCWQLQK_js.formatAxisValueWithUnits(tickVal, axisFormatting) : chunkIVCWQLQK_js.formatAxisValue(tickVal)
9024
9081
  },
9025
9082
  `${id}-vaxis-log-${i}`
9026
9083
  )
@@ -9030,7 +9087,7 @@ function renderValueAxis(id, range, layout, axisFormatting) {
9030
9087
  const steps = 4;
9031
9088
  for (let i = 0; i <= steps; i++) {
9032
9089
  const val = range.min + range.span * i / steps;
9033
- const y = chunk2TOLRBFU_js.valueToY(val, range, layout.plotTop, layout.plotBottom);
9090
+ const y = chunkIVCWQLQK_js.valueToY(val, range, layout.plotTop, layout.plotBottom);
9034
9091
  labels.push(
9035
9092
  /* @__PURE__ */ jsxRuntime.jsx(
9036
9093
  "text",
@@ -9040,7 +9097,7 @@ function renderValueAxis(id, range, layout, axisFormatting) {
9040
9097
  textAnchor: "end",
9041
9098
  fontSize: 8,
9042
9099
  fill: "#64748b",
9043
- children: hasDisplayUnits ? chunk2TOLRBFU_js.formatAxisValueWithUnits(val, axisFormatting) : chunk2TOLRBFU_js.formatAxisValue(val)
9100
+ children: hasDisplayUnits ? chunkIVCWQLQK_js.formatAxisValueWithUnits(val, axisFormatting) : chunkIVCWQLQK_js.formatAxisValue(val)
9044
9101
  },
9045
9102
  `${id}-vaxis-${i}`
9046
9103
  )
@@ -9048,7 +9105,7 @@ function renderValueAxis(id, range, layout, axisFormatting) {
9048
9105
  }
9049
9106
  }
9050
9107
  if (hasDisplayUnits) {
9051
- const unitLabel = chunk2TOLRBFU_js.getDisplayUnitLabel(
9108
+ const unitLabel = chunkIVCWQLQK_js.getDisplayUnitLabel(
9052
9109
  axisFormatting.displayUnits,
9053
9110
  axisFormatting.displayUnitsLabel
9054
9111
  );
@@ -9123,7 +9180,7 @@ function renderZeroLine(id, range, layout) {
9123
9180
  if (range.min >= 0) {
9124
9181
  return null;
9125
9182
  }
9126
- const y = chunk2TOLRBFU_js.valueToY(0, range, layout.plotTop, layout.plotBottom);
9183
+ const y = chunkIVCWQLQK_js.valueToY(0, range, layout.plotTop, layout.plotBottom);
9127
9184
  return /* @__PURE__ */ jsxRuntime.jsx(
9128
9185
  "line",
9129
9186
  {
@@ -9147,7 +9204,7 @@ function renderSecondaryValueAxis(id, range, layout, axisFormatting) {
9147
9204
  const hasDisplayUnits = Boolean(axisFormatting?.displayUnits);
9148
9205
  for (let i = 0; i <= steps; i++) {
9149
9206
  const val = range.min + range.span * i / steps;
9150
- const y = chunk2TOLRBFU_js.valueToY(val, range, layout.plotTop, layout.plotBottom);
9207
+ const y = chunkIVCWQLQK_js.valueToY(val, range, layout.plotTop, layout.plotBottom);
9151
9208
  labels.push(
9152
9209
  /* @__PURE__ */ jsxRuntime.jsx(
9153
9210
  "text",
@@ -9159,7 +9216,7 @@ function renderSecondaryValueAxis(id, range, layout, axisFormatting) {
9159
9216
  fontFamily,
9160
9217
  fontWeight,
9161
9218
  fill: fontColor,
9162
- children: hasDisplayUnits ? chunk2TOLRBFU_js.formatAxisValueWithUnits(val, axisFormatting) : chunk2TOLRBFU_js.formatAxisValue(val)
9219
+ children: hasDisplayUnits ? chunkIVCWQLQK_js.formatAxisValueWithUnits(val, axisFormatting) : chunkIVCWQLQK_js.formatAxisValue(val)
9163
9220
  },
9164
9221
  `${id}-sec-vaxis-${i}`
9165
9222
  )
@@ -9183,7 +9240,7 @@ function renderSecondaryValueAxis(id, range, layout, axisFormatting) {
9183
9240
  );
9184
9241
  }
9185
9242
  if (hasDisplayUnits) {
9186
- const unitLabel = chunk2TOLRBFU_js.getDisplayUnitLabel(
9243
+ const unitLabel = chunkIVCWQLQK_js.getDisplayUnitLabel(
9187
9244
  axisFormatting.displayUnits,
9188
9245
  axisFormatting.displayUnitsLabel
9189
9246
  );
@@ -9214,7 +9271,7 @@ function renderSecondaryAxisTicks(id, range, layout) {
9214
9271
  const ticks = [];
9215
9272
  for (let i = 0; i <= steps; i++) {
9216
9273
  const val = range.min + range.span * i / steps;
9217
- const y = chunk2TOLRBFU_js.valueToY(val, range, layout.plotTop, layout.plotBottom);
9274
+ const y = chunkIVCWQLQK_js.valueToY(val, range, layout.plotTop, layout.plotBottom);
9218
9275
  ticks.push(
9219
9276
  /* @__PURE__ */ jsxRuntime.jsx(
9220
9277
  "line",
@@ -9241,7 +9298,7 @@ function renderSecondaryGridlines(id, range, layout, axisFormatting) {
9241
9298
  const gridColor = axisFormatting.majorGridlinesSpPr?.strokeColor ?? "#e2e8f0";
9242
9299
  for (let i = 0; i <= steps; i++) {
9243
9300
  const val = range.min + range.span * i / steps;
9244
- const y = chunk2TOLRBFU_js.valueToY(val, range, layout.plotTop, layout.plotBottom);
9301
+ const y = chunkIVCWQLQK_js.valueToY(val, range, layout.plotTop, layout.plotBottom);
9245
9302
  lines.push(
9246
9303
  /* @__PURE__ */ jsxRuntime.jsx(
9247
9304
  "line",
@@ -9403,7 +9460,7 @@ function renderChartDataTable(elementId, chartData, svgWidth) {
9403
9460
  width: 8,
9404
9461
  height: 8,
9405
9462
  borderRadius: 2,
9406
- backgroundColor: chunk2TOLRBFU_js.seriesColor(
9463
+ backgroundColor: chunkIVCWQLQK_js.seriesColor(
9407
9464
  s,
9408
9465
  si,
9409
9466
  chartData.style?.styleId,
@@ -9442,8 +9499,8 @@ function renderChartDataTable(elementId, chartData, svgWidth) {
9442
9499
  function renderStockChart(element, chartData, categoryLabels) {
9443
9500
  const style = chartData.style;
9444
9501
  const legendPos = style?.legendPosition || "b";
9445
- const range = chunk2TOLRBFU_js.computeValueRangeForChart(chartData.series, chartData.axes);
9446
- const layout = chunk2TOLRBFU_js.computeLayout(element.width, element.height, style, true, legendPos);
9502
+ const range = chunkIVCWQLQK_js.computeValueRangeForChart(chartData.series, chartData.axes);
9503
+ const layout = chunkIVCWQLQK_js.computeLayout(element.width, element.height, style, true, legendPos);
9447
9504
  const catCount = Math.max(categoryLabels.length, 1);
9448
9505
  const barGroupWidth = layout.plotWidth / catCount;
9449
9506
  const candleWidth = barGroupWidth * 0.5;
@@ -9464,10 +9521,10 @@ function renderStockChart(element, chartData, categoryLabels) {
9464
9521
  const close = closeSeries.values[ci] ?? high;
9465
9522
  const isUp = close >= open;
9466
9523
  const cx = layout.plotLeft + barGroupWidth * ci + barGroupWidth / 2;
9467
- const highY = chunk2TOLRBFU_js.valueToY(high, range, layout.plotTop, layout.plotBottom);
9468
- const lowY = chunk2TOLRBFU_js.valueToY(low, range, layout.plotTop, layout.plotBottom);
9469
- const openY = chunk2TOLRBFU_js.valueToY(open, range, layout.plotTop, layout.plotBottom);
9470
- const closeY = chunk2TOLRBFU_js.valueToY(close, range, layout.plotTop, layout.plotBottom);
9524
+ const highY = chunkIVCWQLQK_js.valueToY(high, range, layout.plotTop, layout.plotBottom);
9525
+ const lowY = chunkIVCWQLQK_js.valueToY(low, range, layout.plotTop, layout.plotBottom);
9526
+ const openY = chunkIVCWQLQK_js.valueToY(open, range, layout.plotTop, layout.plotBottom);
9527
+ const closeY = chunkIVCWQLQK_js.valueToY(close, range, layout.plotTop, layout.plotBottom);
9471
9528
  elements.push(
9472
9529
  /* @__PURE__ */ jsxRuntime.jsx(
9473
9530
  "line",
@@ -9510,7 +9567,7 @@ function renderStockChart(element, chartData, categoryLabels) {
9510
9567
  textAnchor: "middle",
9511
9568
  fontSize: 7,
9512
9569
  fill: "#334155",
9513
- children: chunk2TOLRBFU_js.formatAxisValue(close)
9570
+ children: chunkIVCWQLQK_js.formatAxisValue(close)
9514
9571
  },
9515
9572
  `${element.id}-stock-dl-${ci}`
9516
9573
  )
@@ -9552,7 +9609,7 @@ function FailedToLoad() {
9552
9609
  var LazySurfaceChart3DScene = React4__default.default.lazy(
9553
9610
  async () => {
9554
9611
  try {
9555
- return await import('./SurfaceChart3DScene-KHMGQAGP.js');
9612
+ return await import('./SurfaceChart3DScene-BVA2NRED.js');
9556
9613
  } catch {
9557
9614
  return { default: FailedToLoad };
9558
9615
  }
@@ -9576,7 +9633,7 @@ var SurfaceChart3DErrorBoundary = class extends React4__default.default.Componen
9576
9633
  function buildSurfaceData(chartData, categoryLabels) {
9577
9634
  const rows = chartData.series.length;
9578
9635
  const cols = Math.max(categoryLabels.length, 1);
9579
- const range = chunk2TOLRBFU_js.computeValueRangeForChart(chartData.series, chartData.axes);
9636
+ const range = chunkIVCWQLQK_js.computeValueRangeForChart(chartData.series, chartData.axes);
9580
9637
  const heightMap = new Float32Array(rows * cols);
9581
9638
  const colorMap = new Float32Array(rows * cols * 3);
9582
9639
  for (let r = 0; r < rows; r++) {
@@ -9696,8 +9753,8 @@ function darkenRgb(r, g, b, factor) {
9696
9753
  function renderIsometricSurfaceChart(element, chartData, categoryLabels) {
9697
9754
  const style = chartData.style;
9698
9755
  const legendPos = style?.legendPosition || "b";
9699
- const layout = chunk2TOLRBFU_js.computeLayout(element.width, element.height, style, false, legendPos);
9700
- const range = chunk2TOLRBFU_js.computeValueRangeForChart(chartData.series, chartData.axes);
9756
+ const layout = chunkIVCWQLQK_js.computeLayout(element.width, element.height, style, false, legendPos);
9757
+ const range = chunkIVCWQLQK_js.computeValueRangeForChart(chartData.series, chartData.axes);
9701
9758
  const catCount = Math.max(categoryLabels.length, 1);
9702
9759
  const seriesCount = chartData.series.length;
9703
9760
  const cols = catCount - 1;
@@ -9787,8 +9844,8 @@ function renderIsometricSurfaceChart(element, chartData, categoryLabels) {
9787
9844
  function renderFlatSurfaceChart(element, chartData, categoryLabels) {
9788
9845
  const style = chartData.style;
9789
9846
  const legendPos = style?.legendPosition || "b";
9790
- const layout = chunk2TOLRBFU_js.computeLayout(element.width, element.height, style, true, legendPos);
9791
- const range = chunk2TOLRBFU_js.computeValueRangeForChart(chartData.series, chartData.axes);
9847
+ const layout = chunkIVCWQLQK_js.computeLayout(element.width, element.height, style, true, legendPos);
9848
+ const range = chunkIVCWQLQK_js.computeValueRangeForChart(chartData.series, chartData.axes);
9792
9849
  const catCount = Math.max(categoryLabels.length, 1);
9793
9850
  const seriesCount = chartData.series.length;
9794
9851
  const cellW = layout.plotWidth / Math.max(catCount - 1, 1);
@@ -9851,7 +9908,7 @@ function renderSurfaceChart(element, chartData, categoryLabels) {
9851
9908
  function renderTreemapChart(element, chartData, categoryLabels) {
9852
9909
  const style = chartData.style;
9853
9910
  const legendPos = style?.legendPosition || "b";
9854
- const layout = chunk2TOLRBFU_js.computeLayout(element.width, element.height, style, false, legendPos);
9911
+ const layout = chunkIVCWQLQK_js.computeLayout(element.width, element.height, style, false, legendPos);
9855
9912
  const allValues = chartData.series.flatMap((s) => s.values);
9856
9913
  const totalAbs = allValues.reduce((sum, v) => sum + Math.abs(v), 0) || 1;
9857
9914
  const rects = [];
@@ -9874,7 +9931,7 @@ function renderTreemapChart(element, chartData, categoryLabels) {
9874
9931
  y: curY,
9875
9932
  width: Math.max(w - 1, 1),
9876
9933
  height: Math.max(h - 1, 1),
9877
- fill: chunk2TOLRBFU_js.paletteColor(item.index, chartData.style?.styleId, chartData.colorPalette),
9934
+ fill: chunkIVCWQLQK_js.paletteColor(item.index, chartData.style?.styleId, chartData.colorPalette),
9878
9935
  rx: 2,
9879
9936
  opacity: 0.85
9880
9937
  },
@@ -9927,8 +9984,8 @@ function renderWaterfallChart(element, chartData, categoryLabels) {
9927
9984
  const style = chartData.style;
9928
9985
  const legendPos = style?.legendPosition || "b";
9929
9986
  const values = chartData.series[0]?.values ?? [];
9930
- const range = chunk2TOLRBFU_js.computeValueRangeForChart(chartData.series, chartData.axes);
9931
- const layout = chunk2TOLRBFU_js.computeLayout(element.width, element.height, style, true, legendPos);
9987
+ const range = chunkIVCWQLQK_js.computeValueRangeForChart(chartData.series, chartData.axes);
9988
+ const layout = chunkIVCWQLQK_js.computeLayout(element.width, element.height, style, true, legendPos);
9932
9989
  const catCount = Math.max(categoryLabels.length, values.length, 1);
9933
9990
  const barWidth = layout.plotWidth / catCount * 0.6;
9934
9991
  const gap = layout.plotWidth / catCount * 0.2;
@@ -9939,8 +9996,8 @@ function renderWaterfallChart(element, chartData, categoryLabels) {
9939
9996
  const isLast = i === values.length - 1;
9940
9997
  const startVal = isLast ? 0 : runningTotal;
9941
9998
  const endVal = isLast ? runningTotal + val : runningTotal + val;
9942
- const barStartY = chunk2TOLRBFU_js.valueToY(startVal, range, layout.plotTop, layout.plotBottom);
9943
- const barEndY = chunk2TOLRBFU_js.valueToY(endVal, range, layout.plotTop, layout.plotBottom);
9999
+ const barStartY = chunkIVCWQLQK_js.valueToY(startVal, range, layout.plotTop, layout.plotBottom);
10000
+ const barEndY = chunkIVCWQLQK_js.valueToY(endVal, range, layout.plotTop, layout.plotBottom);
9944
10001
  const x = layout.plotLeft + layout.plotWidth / catCount * i + gap;
9945
10002
  const y = Math.min(barStartY, barEndY);
9946
10003
  const h = Math.max(Math.abs(barEndY - barStartY), 1);
@@ -9969,7 +10026,7 @@ function renderWaterfallChart(element, chartData, categoryLabels) {
9969
10026
  textAnchor: "middle",
9970
10027
  fontSize: 7,
9971
10028
  fill: "#334155",
9972
- children: chunk2TOLRBFU_js.formatAxisValue(isLast ? endVal : val)
10029
+ children: chunkIVCWQLQK_js.formatAxisValue(isLast ? endVal : val)
9973
10030
  },
9974
10031
  `${element.id}-wf-dl-${i}`
9975
10032
  )
@@ -10017,18 +10074,18 @@ function renderWaterfallChart(element, chartData, categoryLabels) {
10017
10074
  function renderComboChart(element, chartData, categoryLabels) {
10018
10075
  const style = chartData.style;
10019
10076
  const legendPos = style?.legendPosition || "b";
10020
- const layoutOpts = chunk2TOLRBFU_js.computeLayoutOptions(
10077
+ const layoutOpts = chunkIVCWQLQK_js.computeLayoutOptions(
10021
10078
  chartData.axes,
10022
10079
  chartData.dataTable,
10023
10080
  chartData.series.length
10024
10081
  );
10025
- const layout = chunk2TOLRBFU_js.computeLayout(element.width, element.height, style, true, legendPos, layoutOpts);
10026
- const { primary, secondary } = chunk2TOLRBFU_js.splitSeriesByAxis(chartData.series, chartData.axes);
10082
+ const layout = chunkIVCWQLQK_js.computeLayout(element.width, element.height, style, true, legendPos, layoutOpts);
10083
+ const { primary, secondary } = chunkIVCWQLQK_js.splitSeriesByAxis(chartData.series, chartData.axes);
10027
10084
  const primarySeries = primary.length > 0 ? primary.map((e) => e.series) : chartData.series;
10028
10085
  const secondarySeries = secondary.map((e) => e.series);
10029
- const range = chunk2TOLRBFU_js.computeValueRangeForChart(primarySeries, chartData.axes);
10030
- const secondaryRange = secondarySeries.length > 0 ? chunk2TOLRBFU_js.computeValueRange(secondarySeries) : void 0;
10031
- const secondaryAxisFmt = chunk2TOLRBFU_js.getSecondaryValueAxis(chartData.axes);
10086
+ const range = chunkIVCWQLQK_js.computeValueRangeForChart(primarySeries, chartData.axes);
10087
+ const secondaryRange = secondarySeries.length > 0 ? chunkIVCWQLQK_js.computeValueRange(secondarySeries) : void 0;
10088
+ const secondaryAxisFmt = chunkIVCWQLQK_js.getSecondaryValueAxis(chartData.axes);
10032
10089
  const catCount = Math.max(categoryLabels.length, 1);
10033
10090
  const barSeriesCount = 1;
10034
10091
  const barGroupWidth = layout.plotWidth / catCount;
@@ -10044,8 +10101,8 @@ function renderComboChart(element, chartData, categoryLabels) {
10044
10101
  const barRange = isBarSecondary && secondaryRange ? secondaryRange : range;
10045
10102
  barSeries.values.forEach((val, vi) => {
10046
10103
  const x = layout.plotLeft + barGroupWidth * vi + barOffset;
10047
- const zeroY = chunk2TOLRBFU_js.valueToY(0, barRange, layout.plotTop, layout.plotBottom);
10048
- const valY = chunk2TOLRBFU_js.valueToY(val, barRange, layout.plotTop, layout.plotBottom);
10104
+ const zeroY = chunkIVCWQLQK_js.valueToY(0, barRange, layout.plotTop, layout.plotBottom);
10105
+ const valY = chunkIVCWQLQK_js.valueToY(val, barRange, layout.plotTop, layout.plotBottom);
10049
10106
  const y = Math.min(zeroY, valY);
10050
10107
  const h = Math.max(Math.abs(zeroY - valY), 1);
10051
10108
  barElements.push(
@@ -10056,7 +10113,7 @@ function renderComboChart(element, chartData, categoryLabels) {
10056
10113
  y,
10057
10114
  width: barWidth,
10058
10115
  height: h,
10059
- fill: chunk2TOLRBFU_js.seriesColor(barSeries, 0, chartData.style?.styleId, chartData.colorPalette),
10116
+ fill: chunkIVCWQLQK_js.seriesColor(barSeries, 0, chartData.style?.styleId, chartData.colorPalette),
10060
10117
  rx: 1
10061
10118
  },
10062
10119
  `${element.id}-combo-bar-${vi}`
@@ -10072,7 +10129,7 @@ function renderComboChart(element, chartData, categoryLabels) {
10072
10129
  textAnchor: "middle",
10073
10130
  fontSize: 7,
10074
10131
  fill: "#334155",
10075
- children: chunk2TOLRBFU_js.formatAxisValue(val)
10132
+ children: chunkIVCWQLQK_js.formatAxisValue(val)
10076
10133
  },
10077
10134
  `${element.id}-combo-bar-dl-${vi}`
10078
10135
  )
@@ -10089,10 +10146,10 @@ function renderComboChart(element, chartData, categoryLabels) {
10089
10146
  const activeRange = isSecondary && secondaryRange ? secondaryRange : range;
10090
10147
  const points = series.values.map((val, vi) => {
10091
10148
  const x = layout.plotLeft + barGroupWidth * vi + barGroupWidth / 2;
10092
- const y = chunk2TOLRBFU_js.valueToY(val, activeRange, layout.plotTop, layout.plotBottom);
10149
+ const y = chunkIVCWQLQK_js.valueToY(val, activeRange, layout.plotTop, layout.plotBottom);
10093
10150
  return { x, y, val };
10094
10151
  });
10095
- const c = chunk2TOLRBFU_js.seriesColor(series, seriesIdx, chartData.style?.styleId, chartData.colorPalette);
10152
+ const c = chunkIVCWQLQK_js.seriesColor(series, seriesIdx, chartData.style?.styleId, chartData.colorPalette);
10096
10153
  lineElements.push(
10097
10154
  /* @__PURE__ */ jsxRuntime.jsx(
10098
10155
  "polyline",
@@ -10119,7 +10176,7 @@ function renderComboChart(element, chartData, categoryLabels) {
10119
10176
  textAnchor: "middle",
10120
10177
  fontSize: 7,
10121
10178
  fill: "#334155",
10122
- children: chunk2TOLRBFU_js.formatAxisValue(p.val)
10179
+ children: chunkIVCWQLQK_js.formatAxisValue(p.val)
10123
10180
  },
10124
10181
  `${element.id}-combo-line-dl-${si}-${vi}`
10125
10182
  )
@@ -10233,6 +10290,21 @@ var DEFAULT_PALETTE = PALETTES.colorful1;
10233
10290
  function colour(index, palette = DEFAULT_PALETTE) {
10234
10291
  return palette[index % palette.length];
10235
10292
  }
10293
+ function contrastingTextColor(background) {
10294
+ if (!background) {
10295
+ return "#000000";
10296
+ }
10297
+ const match = /^#([\da-f]{3}|[\da-f]{6})$/iu.exec(background.trim());
10298
+ if (!match) {
10299
+ return "#000000";
10300
+ }
10301
+ const hex = match[1].length === 3 ? [...match[1]].map((component) => component + component).join("") : match[1];
10302
+ const red = Number.parseInt(hex.slice(0, 2), 16);
10303
+ const green = Number.parseInt(hex.slice(2, 4), 16);
10304
+ const blue = Number.parseInt(hex.slice(4, 6), 16);
10305
+ const luminance = (red * 299 + green * 587 + blue * 114) / 1e3;
10306
+ return luminance >= 160 ? "#000000" : "#FFFFFF";
10307
+ }
10236
10308
  function nodeOpacity(index, total, style) {
10237
10309
  const base = style === "intense" ? 1 : style === "moderate" ? 0.92 : 0.85;
10238
10310
  if (total <= 1) {
@@ -10399,6 +10471,30 @@ function gearPath(cx, cy, outerR, innerR, teeth) {
10399
10471
  segments.push("Z");
10400
10472
  return segments.join(" ");
10401
10473
  }
10474
+ function wrapSmartArtText(text, maxWidth, fontSize) {
10475
+ const estimatedCharacterWidth = Math.max(fontSize * 0.52, 1);
10476
+ const maxCharacters = Math.max(1, Math.floor(maxWidth / estimatedCharacterWidth));
10477
+ const lines = [];
10478
+ for (const authoredLine of text.split("\n")) {
10479
+ if (authoredLine.length <= maxCharacters) {
10480
+ if (authoredLine.length > 0) lines.push(authoredLine);
10481
+ continue;
10482
+ }
10483
+ const words = authoredLine.split(/\s+/u).filter(Boolean);
10484
+ let current = "";
10485
+ for (const word of words) {
10486
+ const candidate = current ? `${current} ${word}` : word;
10487
+ if (candidate.length <= maxCharacters || current.length === 0) {
10488
+ current = candidate;
10489
+ } else {
10490
+ lines.push(current);
10491
+ current = word;
10492
+ }
10493
+ }
10494
+ if (current) lines.push(current);
10495
+ }
10496
+ return lines;
10497
+ }
10402
10498
  function SmartArtNodeText({
10403
10499
  text,
10404
10500
  x,
@@ -10408,9 +10504,10 @@ function SmartArtNodeText({
10408
10504
  fontWeight,
10409
10505
  fontStyle,
10410
10506
  className,
10411
- anchor = "middle"
10507
+ anchor = "middle",
10508
+ maxWidth
10412
10509
  }) {
10413
- const lines = text.split("\n").filter((l) => l.length > 0);
10510
+ const lines = maxWidth ? wrapSmartArtText(text, maxWidth, fontSize) : text.split("\n").filter((l) => l.length > 0);
10414
10511
  const lineHeight = fontSize * 1.2;
10415
10512
  let startY;
10416
10513
  let dominantBaseline;
@@ -11880,14 +11977,14 @@ function buildNotesPdf(pages) {
11880
11977
  notes: page.notes,
11881
11978
  slideNumber: page.slideNumber
11882
11979
  }));
11883
- const bytes = chunk2TOLRBFU_js.buildNotesPdfBytes(images, meta);
11980
+ const bytes = chunkIVCWQLQK_js.buildNotesPdfBytes(images, meta);
11884
11981
  const blob = new Blob([bytes], { type: "application/pdf" });
11885
11982
  return URL.createObjectURL(blob);
11886
11983
  }
11887
11984
 
11888
11985
  // src/viewer/utils/pdf-builder-slides.ts
11889
11986
  function buildPdfFromImageData(images) {
11890
- const bytes = chunk2TOLRBFU_js.buildSlidesPdfBytes(images);
11987
+ const bytes = chunkIVCWQLQK_js.buildSlidesPdfBytes(images);
11891
11988
  const blob = new Blob([bytes], { type: "application/pdf" });
11892
11989
  return URL.createObjectURL(blob);
11893
11990
  }
@@ -11896,7 +11993,7 @@ function buildPdfFromImageData(images) {
11896
11993
  var activePreview = null;
11897
11994
  function startPreviewAnimation(elementId, preset, options) {
11898
11995
  stopPreviewAnimation();
11899
- const descriptor = chunk2TOLRBFU_js.buildPreviewAnimation(preset, options);
11996
+ const descriptor = chunkIVCWQLQK_js.buildPreviewAnimation(preset, options);
11900
11997
  if (!descriptor) {
11901
11998
  return;
11902
11999
  }
@@ -11974,7 +12071,7 @@ function useElementOperations(input) {
11974
12071
  }, [applySelection, setInlineEditingElementId, setContextMenuState]);
11975
12072
  const updateElementById = React4.useCallback(
11976
12073
  (elementId, updates) => {
11977
- if (chunk2TOLRBFU_js.isTemplateElementId(elementId)) {
12074
+ if (chunkIVCWQLQK_js.isTemplateElementId(elementId)) {
11978
12075
  const slideId = activeSlide?.id;
11979
12076
  if (slideId) {
11980
12077
  setTemplateElementsBySlideId((prev) => ({
@@ -12014,7 +12111,7 @@ function useElementOperations(input) {
12014
12111
  );
12015
12112
  const updateSelectedShapeStyle = React4.useCallback(
12016
12113
  (updates) => {
12017
- if (!selectedElement || !chunkAD2CLKY6_js.hasShapeProperties(selectedElement)) {
12114
+ if (!selectedElement || !chunkKAP5TS7O_js.hasShapeProperties(selectedElement)) {
12018
12115
  return;
12019
12116
  }
12020
12117
  updateSelectedElement({
@@ -12025,17 +12122,17 @@ function useElementOperations(input) {
12025
12122
  );
12026
12123
  const updateSelectedTextStyle = React4.useCallback(
12027
12124
  (updates) => {
12028
- if (!selectedElement || !chunkAD2CLKY6_js.hasTextProperties(selectedElement)) {
12125
+ if (!selectedElement || !chunkKAP5TS7O_js.hasTextProperties(selectedElement)) {
12029
12126
  return;
12030
12127
  }
12031
- const inlineSel = chunk2TOLRBFU_js.getInlineEditorSelection(selectedElement.textSegments);
12128
+ const inlineSel = chunkIVCWQLQK_js.getInlineEditorSelection(selectedElement.textSegments);
12032
12129
  if (inlineSel && selectedElement.textSegments) {
12033
- const { newSegments: newSegments2, newSelection } = chunk2TOLRBFU_js.applyStyleToSelectedSegments(
12130
+ const { newSegments: newSegments2, newSelection } = chunkIVCWQLQK_js.applyStyleToSelectedSegments(
12034
12131
  selectedElement.textSegments,
12035
12132
  inlineSel,
12036
12133
  updates
12037
12134
  );
12038
- chunk2TOLRBFU_js.setPendingSelectionRestore(newSelection);
12135
+ chunkIVCWQLQK_js.setPendingSelectionRestore(newSelection);
12039
12136
  updateSelectedElement({
12040
12137
  textSegments: newSegments2
12041
12138
  });
@@ -12055,12 +12152,12 @@ function useElementOperations(input) {
12055
12152
  );
12056
12153
  const updateSelectedTextCase = React4.useCallback(
12057
12154
  (mode) => {
12058
- if (!selectedElement || !chunkAD2CLKY6_js.hasTextProperties(selectedElement)) {
12155
+ if (!selectedElement || !chunkKAP5TS7O_js.hasTextProperties(selectedElement)) {
12059
12156
  return;
12060
12157
  }
12061
- const inlineSel = chunk2TOLRBFU_js.getInlineEditorSelection(selectedElement.textSegments);
12158
+ const inlineSel = chunkIVCWQLQK_js.getInlineEditorSelection(selectedElement.textSegments);
12062
12159
  if (inlineSel && selectedElement.textSegments) {
12063
- const newSegments = chunk2TOLRBFU_js.applyCaseTransformToSegments(
12160
+ const newSegments = chunkIVCWQLQK_js.applyCaseTransformToSegments(
12064
12161
  selectedElement.textSegments,
12065
12162
  inlineSel,
12066
12163
  mode
@@ -12070,14 +12167,14 @@ function useElementOperations(input) {
12070
12167
  }
12071
12168
  const updates = {};
12072
12169
  if (selectedElement.textSegments && selectedElement.textSegments.length > 0) {
12073
- updates.textSegments = chunk2TOLRBFU_js.applyCaseTransformToSegments(
12170
+ updates.textSegments = chunkIVCWQLQK_js.applyCaseTransformToSegments(
12074
12171
  selectedElement.textSegments,
12075
12172
  null,
12076
12173
  mode
12077
12174
  );
12078
12175
  }
12079
12176
  if (typeof selectedElement.text === "string") {
12080
- updates.text = chunk2TOLRBFU_js.transformTextCase(selectedElement.text, mode);
12177
+ updates.text = chunkIVCWQLQK_js.transformTextCase(selectedElement.text, mode);
12081
12178
  }
12082
12179
  updateSelectedElement(updates);
12083
12180
  },
@@ -12132,7 +12229,7 @@ function useSectionOperations(input) {
12132
12229
  const { sections, setSections, slides, setSlides, markDirty } = input;
12133
12230
  const addSection2 = React4.useCallback(
12134
12231
  (name, afterSlideIndex) => {
12135
- const result = chunk2TOLRBFU_js.addSection(sections, slides, name, afterSlideIndex);
12232
+ const result = chunkIVCWQLQK_js.addSection(sections, slides, name, afterSlideIndex);
12136
12233
  setSlides(result.slides);
12137
12234
  setSections(result.sections);
12138
12235
  markDirty();
@@ -12141,7 +12238,7 @@ function useSectionOperations(input) {
12141
12238
  );
12142
12239
  const renameSection2 = React4.useCallback(
12143
12240
  (sectionId, newName) => {
12144
- const result = chunk2TOLRBFU_js.renameSection(sections, slides, sectionId, newName);
12241
+ const result = chunkIVCWQLQK_js.renameSection(sections, slides, sectionId, newName);
12145
12242
  setSections(result.sections);
12146
12243
  setSlides(result.slides);
12147
12244
  markDirty();
@@ -12150,7 +12247,7 @@ function useSectionOperations(input) {
12150
12247
  );
12151
12248
  const deleteSection2 = React4.useCallback(
12152
12249
  (sectionId) => {
12153
- const result = chunk2TOLRBFU_js.deleteSection(sections, slides, sectionId);
12250
+ const result = chunkIVCWQLQK_js.deleteSection(sections, slides, sectionId);
12154
12251
  setSections(result.sections);
12155
12252
  setSlides(result.slides);
12156
12253
  markDirty();
@@ -12159,21 +12256,21 @@ function useSectionOperations(input) {
12159
12256
  );
12160
12257
  const moveSectionUp2 = React4.useCallback(
12161
12258
  (sectionId) => {
12162
- setSections(chunk2TOLRBFU_js.moveSectionUp(sections, sectionId));
12259
+ setSections(chunkIVCWQLQK_js.moveSectionUp(sections, sectionId));
12163
12260
  markDirty();
12164
12261
  },
12165
12262
  [sections, setSections, markDirty]
12166
12263
  );
12167
12264
  const moveSectionDown2 = React4.useCallback(
12168
12265
  (sectionId) => {
12169
- setSections(chunk2TOLRBFU_js.moveSectionDown(sections, sectionId));
12266
+ setSections(chunkIVCWQLQK_js.moveSectionDown(sections, sectionId));
12170
12267
  markDirty();
12171
12268
  },
12172
12269
  [sections, setSections, markDirty]
12173
12270
  );
12174
12271
  const moveSlidesToSection2 = React4.useCallback(
12175
12272
  (slideIndexes, targetSectionId) => {
12176
- const result = chunk2TOLRBFU_js.moveSlidesToSection(sections, slides, slideIndexes, targetSectionId);
12273
+ const result = chunkIVCWQLQK_js.moveSlidesToSection(sections, slides, slideIndexes, targetSectionId);
12177
12274
  setSlides(result.slides);
12178
12275
  setSections(result.sections);
12179
12276
  markDirty();
@@ -12192,7 +12289,7 @@ function useSectionOperations(input) {
12192
12289
 
12193
12290
  // src/viewer/hooks/pointer-move-handlers.ts
12194
12291
  function computeResizeGeometry(handle, startX, startY, startWidth, startHeight, dx, dy, snapToGrid, gridSpacingPx) {
12195
- const resized = chunk2TOLRBFU_js.applyResize(
12292
+ const resized = chunkIVCWQLQK_js.applyResize(
12196
12293
  { x: startX, y: startY, width: startWidth, height: startHeight },
12197
12294
  handle,
12198
12295
  dx,
@@ -12204,7 +12301,7 @@ function computeResizeGeometry(handle, startX, startY, startWidth, startHeight,
12204
12301
  if (!snapToGrid) {
12205
12302
  return box;
12206
12303
  }
12207
- return chunk2TOLRBFU_js.snapBoxToGrid(box, handle, gridSpacingPx, MIN_ELEMENT_SIZE);
12304
+ return chunkIVCWQLQK_js.snapBoxToGrid(box, handle, gridSpacingPx, MIN_ELEMENT_SIZE);
12208
12305
  }
12209
12306
  function computeAdjustmentValue(startAdjustment, dx, startWidth) {
12210
12307
  const range = startWidth || 200;
@@ -12314,7 +12411,7 @@ function processDragMove(e, drag, editorScale, snapToGrid, snapToShape, gridSpac
12314
12411
  width: el.width,
12315
12412
  height: el.height
12316
12413
  }));
12317
- const snapResult = chunk2TOLRBFU_js.computeSnapToShape(
12414
+ const snapResult = chunkIVCWQLQK_js.computeSnapToShape(
12318
12415
  targetX,
12319
12416
  targetY,
12320
12417
  primaryEl.width,
@@ -12457,13 +12554,13 @@ function processPointerUp(input) {
12457
12554
  if (i !== activeSlideIndex) {
12458
12555
  return s;
12459
12556
  }
12460
- const rerouted = chunk2TOLRBFU_js.rerouteConnectorsForMovedElements(s.elements, movedIds);
12557
+ const rerouted = chunkIVCWQLQK_js.rerouteConnectorsForMovedElements(s.elements, movedIds);
12461
12558
  if (rerouted.length === 0) {
12462
12559
  return s;
12463
12560
  }
12464
12561
  return {
12465
12562
  ...s,
12466
- elements: chunk2TOLRBFU_js.applyReroutedConnectors(s.elements, rerouted)
12563
+ elements: chunkIVCWQLQK_js.applyReroutedConnectors(s.elements, rerouted)
12467
12564
  };
12468
12565
  })
12469
12566
  );
@@ -12482,9 +12579,9 @@ function processPointerUp(input) {
12482
12579
  }
12483
12580
  function commitMarquee(marquee, editTemplateMode, templateElements, activeSlide, applySelection, clearSelection) {
12484
12581
  const sourceElements = editTemplateMode ? templateElements : activeSlide?.elements ?? [];
12485
- const hitIds = chunk2TOLRBFU_js.computeMarqueeHitIds(marquee, sourceElements);
12582
+ const hitIds = chunkIVCWQLQK_js.computeMarqueeHitIds(marquee, sourceElements);
12486
12583
  if (marquee.additive) {
12487
- const merged = chunk2TOLRBFU_js.mergeAdditiveSelection(marquee.baseSelectionIds, hitIds);
12584
+ const merged = chunkIVCWQLQK_js.mergeAdditiveSelection(marquee.baseSelectionIds, hitIds);
12488
12585
  if (merged.length > 0) {
12489
12586
  applySelection(merged[0], merged);
12490
12587
  } else {
@@ -12507,8 +12604,8 @@ function commitDrag(drag, editTemplateMode, activeSlide, activeSlideIndex, setTe
12507
12604
  }
12508
12605
  return { ...el, x: start.x + dx, y: start.y + dy };
12509
12606
  });
12510
- const rerouted = chunk2TOLRBFU_js.rerouteConnectorsForMovedElements(movedElements, movedIds);
12511
- return chunk2TOLRBFU_js.applyReroutedConnectors(movedElements, rerouted);
12607
+ const rerouted = chunkIVCWQLQK_js.rerouteConnectorsForMovedElements(movedElements, movedIds);
12608
+ return chunkIVCWQLQK_js.applyReroutedConnectors(movedElements, rerouted);
12512
12609
  };
12513
12610
  if (editTemplateMode) {
12514
12611
  const slideId = activeSlide?.id;
@@ -12659,9 +12756,9 @@ function useCanvasInteractions(input) {
12659
12756
  return;
12660
12757
  }
12661
12758
  const el = elementLookup.get(editId);
12662
- if (el && chunkAD2CLKY6_js.hasTextProperties(el)) {
12759
+ if (el && chunkKAP5TS7O_js.hasTextProperties(el)) {
12663
12760
  const committedText = transformCommittedText ? transformCommittedText(inlineEditingText) : inlineEditingText;
12664
- const newSegments = chunk2TOLRBFU_js.remapTextToSegments(committedText, el.textSegments, el.textStyle);
12761
+ const newSegments = chunkIVCWQLQK_js.remapTextToSegments(committedText, el.textSegments, el.textStyle);
12665
12762
  ops.updateElementById(editId, {
12666
12763
  text: committedText,
12667
12764
  textSegments: newSegments
@@ -12672,7 +12769,7 @@ function useCanvasInteractions(input) {
12672
12769
  setInlineEditingText("");
12673
12770
  };
12674
12771
  const openEquationEditorForElement = (el) => {
12675
- if (!chunkAD2CLKY6_js.hasTextProperties(el)) {
12772
+ if (!chunkKAP5TS7O_js.hasTextProperties(el)) {
12676
12773
  return false;
12677
12774
  }
12678
12775
  const eqSeg = el.textSegments?.find((seg) => seg.equationXml);
@@ -12701,7 +12798,7 @@ function useCanvasInteractions(input) {
12701
12798
  justSelectedRef.current = false;
12702
12799
  } else {
12703
12800
  const el = elementLookup.get(elementId);
12704
- if (el && chunkAD2CLKY6_js.hasTextProperties(el) && !el.locks?.noTextEdit) {
12801
+ if (el && chunkKAP5TS7O_js.hasTextProperties(el) && !el.locks?.noTextEdit) {
12705
12802
  if (!openEquationEditorForElement(el)) {
12706
12803
  setInlineEditingElementId(elementId);
12707
12804
  setInlineEditingText(el.text ?? "");
@@ -12720,7 +12817,7 @@ function useCanvasInteractions(input) {
12720
12817
  if (openEquationEditorForElement(el)) {
12721
12818
  return;
12722
12819
  }
12723
- if (chunkAD2CLKY6_js.hasTextProperties(el)) {
12820
+ if (chunkKAP5TS7O_js.hasTextProperties(el)) {
12724
12821
  setInlineEditingElementId(elementId);
12725
12822
  setInlineEditingText(el.text ?? "");
12726
12823
  }
@@ -12910,7 +13007,7 @@ function createFileHandlers(deps) {
12910
13007
  h = Math.round(h * scale);
12911
13008
  }
12912
13009
  addElement({
12913
- id: chunk2TOLRBFU_js.generateElementId(),
13010
+ id: chunkIVCWQLQK_js.generateElementId(),
12914
13011
  type: "image",
12915
13012
  x: Math.round((canvasSize.width - w) / 2),
12916
13013
  y: Math.round((canvasSize.height - h) / 2),
@@ -12921,7 +13018,7 @@ function createFileHandlers(deps) {
12921
13018
  };
12922
13019
  img.onerror = () => {
12923
13020
  addElement({
12924
- id: chunk2TOLRBFU_js.generateElementId(),
13021
+ id: chunkIVCWQLQK_js.generateElementId(),
12925
13022
  type: "image",
12926
13023
  x: 100,
12927
13024
  y: 100,
@@ -12947,7 +13044,7 @@ function createFileHandlers(deps) {
12947
13044
  const elFilePath = file.path;
12948
13045
  const insertMediaElement = (mediaSourceUrl, width, height) => {
12949
13046
  addElement({
12950
- id: chunk2TOLRBFU_js.generateElementId(),
13047
+ id: chunkIVCWQLQK_js.generateElementId(),
12951
13048
  type: "media",
12952
13049
  mediaType,
12953
13050
  mediaMimeType: file.type || void 0,
@@ -13122,13 +13219,13 @@ function createStructuredElementHandlers(deps) {
13122
13219
  return;
13123
13220
  }
13124
13221
  addElement({
13125
- id: chunk2TOLRBFU_js.generateElementId(),
13222
+ id: chunkIVCWQLQK_js.generateElementId(),
13126
13223
  type: "smartArt",
13127
13224
  x: 100,
13128
13225
  y: 120,
13129
13226
  width: 600,
13130
13227
  height: 340,
13131
- smartArtData: chunk2TOLRBFU_js.buildSmartArtPresetData(
13228
+ smartArtData: chunkIVCWQLQK_js.buildSmartArtPresetData(
13132
13229
  layout,
13133
13230
  defaultItems,
13134
13231
  (i) => `node-${Date.now()}-${i}-${Math.random().toString(36).slice(2, 8)}`
@@ -13140,7 +13237,7 @@ function createStructuredElementHandlers(deps) {
13140
13237
  return;
13141
13238
  }
13142
13239
  addElement({
13143
- id: chunk2TOLRBFU_js.generateElementId(),
13240
+ id: chunkIVCWQLQK_js.generateElementId(),
13144
13241
  type: "shape",
13145
13242
  x: 120,
13146
13243
  y: 200,
@@ -13199,7 +13296,7 @@ function createStructuredElementHandlers(deps) {
13199
13296
  const displayText = value || fieldTexts[fieldType] || fieldType;
13200
13297
  const fieldGuid = `{${crypto.randomUUID().toUpperCase()}}`;
13201
13298
  addElement({
13202
- id: chunk2TOLRBFU_js.generateElementId(),
13299
+ id: chunkIVCWQLQK_js.generateElementId(),
13203
13300
  type: "shape",
13204
13301
  x: 120,
13205
13302
  y: 200,
@@ -13221,11 +13318,11 @@ function createStructuredElementHandlers(deps) {
13221
13318
  if (!activeSlide) {
13222
13319
  return;
13223
13320
  }
13224
- const preset = chunk2TOLRBFU_js.ACTION_BUTTON_PRESETS.find((p) => p.shapeType === shapeType);
13321
+ const preset = chunkIVCWQLQK_js.ACTION_BUTTON_PRESETS.find((p) => p.shapeType === shapeType);
13225
13322
  if (!preset) {
13226
13323
  return;
13227
13324
  }
13228
- const defaultPptxAction = chunkAD2CLKY6_js.elementActionToPptxAction({
13325
+ const defaultPptxAction = chunkKAP5TS7O_js.elementActionToPptxAction({
13229
13326
  trigger: "click",
13230
13327
  type: preset.defaultAction
13231
13328
  });
@@ -13234,7 +13331,7 @@ function createStructuredElementHandlers(deps) {
13234
13331
  defaultPptxAction.highlightClick = true;
13235
13332
  }
13236
13333
  addElement({
13237
- id: chunk2TOLRBFU_js.generateElementId(),
13334
+ id: chunkIVCWQLQK_js.generateElementId(),
13238
13335
  type: "shape",
13239
13336
  x: 150,
13240
13337
  y: 150,
@@ -13301,7 +13398,7 @@ function useInsertElements(input) {
13301
13398
  return;
13302
13399
  }
13303
13400
  addElement({
13304
- id: chunk2TOLRBFU_js.generateElementId(),
13401
+ id: chunkIVCWQLQK_js.generateElementId(),
13305
13402
  type: "text",
13306
13403
  x: 100,
13307
13404
  y: 100,
@@ -13316,7 +13413,7 @@ function useInsertElements(input) {
13316
13413
  return;
13317
13414
  }
13318
13415
  addElement({
13319
- id: chunk2TOLRBFU_js.generateElementId(),
13416
+ id: chunkIVCWQLQK_js.generateElementId(),
13320
13417
  type: "shape",
13321
13418
  x: 150,
13322
13419
  y: 150,
@@ -13335,15 +13432,15 @@ function useInsertElements(input) {
13335
13432
  return;
13336
13433
  }
13337
13434
  addElement({
13338
- ...chunk2TOLRBFU_js.newTableElement(DEFAULT_TABLE_ROWS, DEFAULT_TABLE_COLUMNS, 100, 200),
13339
- id: chunk2TOLRBFU_js.generateElementId()
13435
+ ...chunkIVCWQLQK_js.newTableElement(DEFAULT_TABLE_ROWS, DEFAULT_TABLE_COLUMNS, 100, 200),
13436
+ id: chunkIVCWQLQK_js.generateElementId()
13340
13437
  });
13341
13438
  };
13342
13439
  const handleAddChart = (chartType) => {
13343
13440
  if (!activeSlide) {
13344
13441
  return;
13345
13442
  }
13346
- addElement(chunk2TOLRBFU_js.createDefaultChartElement(chartType));
13443
+ addElement(chunkIVCWQLQK_js.createDefaultChartElement(chartType));
13347
13444
  };
13348
13445
  const structured = createStructuredElementHandlers({
13349
13446
  activeSlide,
@@ -13413,7 +13510,7 @@ function useClipboardHandlers(input) {
13413
13510
  if (!selectedElement) {
13414
13511
  return;
13415
13512
  }
13416
- setClipboardPayload(chunk2TOLRBFU_js.buildElementClipboardPayload(selectedElement, editTemplateMode));
13513
+ setClipboardPayload(chunkIVCWQLQK_js.buildElementClipboardPayload(selectedElement, editTemplateMode));
13417
13514
  };
13418
13515
  const handleDelete = () => {
13419
13516
  const idsToDelete = effectiveSelectedIds;
@@ -13430,7 +13527,7 @@ function useClipboardHandlers(input) {
13430
13527
  handleDelete();
13431
13528
  };
13432
13529
  const insertClone = (source) => {
13433
- const clone = chunk2TOLRBFU_js.cloneElementForPaste(source, { intoTemplate: editTemplateMode });
13530
+ const clone = chunkIVCWQLQK_js.cloneElementForPaste(source, { intoTemplate: editTemplateMode });
13434
13531
  ops.updateActiveElements((els) => [...els, clone]);
13435
13532
  ops.applySelection(clone.id);
13436
13533
  history.markDirty();
@@ -13465,7 +13562,7 @@ function resolveShapePath(el) {
13465
13562
  return el.pathData;
13466
13563
  }
13467
13564
  if ("shapeType" in el && typeof el.shapeType === "string") {
13468
- const clipPath = chunkAD2CLKY6_js.getPresetShapeClipPath(el.shapeType);
13565
+ const clipPath = chunkKAP5TS7O_js.getPresetShapeClipPath(el.shapeType);
13469
13566
  if (clipPath) {
13470
13567
  const svgPath = clipPathToSvgPath(clipPath, el.width, el.height);
13471
13568
  if (svgPath) {
@@ -13516,7 +13613,7 @@ function clipPathToSvgPath(clipPath, width, height) {
13516
13613
  return parts.join(" ");
13517
13614
  }
13518
13615
  function transformPathToGlobal(pathData, el) {
13519
- const polys = chunkAD2CLKY6_js.svgPathToPolygons(pathData);
13616
+ const polys = chunkKAP5TS7O_js.svgPathToPolygons(pathData);
13520
13617
  if (polys.length === 0) {
13521
13618
  return pathData;
13522
13619
  }
@@ -13536,10 +13633,10 @@ function transformPathToGlobal(pathData, el) {
13536
13633
  y: pt.y * scaleY + el.y
13537
13634
  }))
13538
13635
  );
13539
- return chunkAD2CLKY6_js.polygonsToSvgPath(transformed);
13636
+ return chunkKAP5TS7O_js.polygonsToSvgPath(transformed);
13540
13637
  }
13541
13638
  function transformPathToLocal(pathData, x, y, _width, _height) {
13542
- const polys = chunkAD2CLKY6_js.svgPathToPolygons(pathData);
13639
+ const polys = chunkKAP5TS7O_js.svgPathToPolygons(pathData);
13543
13640
  if (polys.length === 0) {
13544
13641
  return pathData;
13545
13642
  }
@@ -13549,10 +13646,10 @@ function transformPathToLocal(pathData, x, y, _width, _height) {
13549
13646
  y: pt.y - y
13550
13647
  }))
13551
13648
  );
13552
- return chunkAD2CLKY6_js.polygonsToSvgPath(transformed);
13649
+ return chunkKAP5TS7O_js.polygonsToSvgPath(transformed);
13553
13650
  }
13554
13651
  function pathBounds(pathData) {
13555
- const polys = chunkAD2CLKY6_js.svgPathToPolygons(pathData);
13652
+ const polys = chunkKAP5TS7O_js.svgPathToPolygons(pathData);
13556
13653
  let minX = Infinity;
13557
13654
  let minY = Infinity;
13558
13655
  let maxX = -Infinity;
@@ -13611,7 +13708,7 @@ function useMergeShapesHandler(input) {
13611
13708
  let allFragments = [];
13612
13709
  let remaining = globalPaths[0];
13613
13710
  for (let i = 1; i < globalPaths.length; i++) {
13614
- const frags = chunkAD2CLKY6_js.mergeShapes("fragment", remaining, globalPaths[i]);
13711
+ const frags = chunkKAP5TS7O_js.mergeShapes("fragment", remaining, globalPaths[i]);
13615
13712
  if (Array.isArray(frags)) {
13616
13713
  allFragments = frags;
13617
13714
  }
@@ -13640,7 +13737,7 @@ function useMergeShapesHandler(input) {
13640
13737
  bounds.height
13641
13738
  );
13642
13739
  const newEl = {
13643
- id: chunk2TOLRBFU_js.generateElementId(),
13740
+ id: chunkIVCWQLQK_js.generateElementId(),
13644
13741
  type: "shape",
13645
13742
  x: bounds.x,
13646
13743
  y: bounds.y,
@@ -13678,7 +13775,7 @@ function useMergeShapesHandler(input) {
13678
13775
  } else {
13679
13776
  let resultPath = globalPaths[0];
13680
13777
  for (let i = 1; i < globalPaths.length; i++) {
13681
- const result = chunkAD2CLKY6_js.mergeShapes(operation, resultPath, globalPaths[i]);
13778
+ const result = chunkKAP5TS7O_js.mergeShapes(operation, resultPath, globalPaths[i]);
13682
13779
  if (typeof result === "string") {
13683
13780
  resultPath = result;
13684
13781
  }
@@ -13699,7 +13796,7 @@ function useMergeShapesHandler(input) {
13699
13796
  );
13700
13797
  const primary = targets[0];
13701
13798
  const newEl = {
13702
- id: chunk2TOLRBFU_js.generateElementId(),
13799
+ id: chunkIVCWQLQK_js.generateElementId(),
13703
13800
  type: "shape",
13704
13801
  x: bounds.x,
13705
13802
  y: bounds.y,
@@ -13762,7 +13859,7 @@ function useGroupAlignLayerHandlers(input) {
13762
13859
  if (ids.length < 2 || !activeSlide) {
13763
13860
  return;
13764
13861
  }
13765
- const { elements, groupId } = chunk2TOLRBFU_js.groupElements(ops.activeElements, ids, chunk2TOLRBFU_js.generateElementId());
13862
+ const { elements, groupId } = chunkIVCWQLQK_js.groupElements(ops.activeElements, ids, chunkIVCWQLQK_js.generateElementId());
13766
13863
  if (groupId === null) {
13767
13864
  return;
13768
13865
  }
@@ -13775,12 +13872,12 @@ function useGroupAlignLayerHandlers(input) {
13775
13872
  return;
13776
13873
  }
13777
13874
  const group = selectedElement;
13778
- const intoTemplate = chunk2TOLRBFU_js.isTemplateElementId(group.id);
13875
+ const intoTemplate = chunkIVCWQLQK_js.isTemplateElementId(group.id);
13779
13876
  const ungrouped = group.children.map((child) => ({
13780
13877
  ...structuredClone(child),
13781
13878
  // Keep child ids in the same store as the group so later edits route
13782
13879
  // correctly: template groups yield template-prefixed child ids.
13783
- id: intoTemplate ? chunk2TOLRBFU_js.makeCloneId(true, child.id || group.id) : child.id || chunk2TOLRBFU_js.generateElementId(),
13880
+ id: intoTemplate ? chunkIVCWQLQK_js.makeCloneId(true, child.id || group.id) : child.id || chunkIVCWQLQK_js.generateElementId(),
13784
13881
  x: child.x + group.x,
13785
13882
  y: child.y + group.y
13786
13883
  }));
@@ -13804,7 +13901,7 @@ function useGroupAlignLayerHandlers(input) {
13804
13901
  if (!edge) {
13805
13902
  return;
13806
13903
  }
13807
- const positions = chunk2TOLRBFU_js.alignElements(selectedElements, edge);
13904
+ const positions = chunkIVCWQLQK_js.alignElements(selectedElements, edge);
13808
13905
  for (const [id, pos] of positions) {
13809
13906
  const el = elementLookup.get(id);
13810
13907
  if (!el) {
@@ -13822,7 +13919,7 @@ function useGroupAlignLayerHandlers(input) {
13822
13919
  if (!distAxis) {
13823
13920
  return;
13824
13921
  }
13825
- const positions = chunk2TOLRBFU_js.distributeElements(selectedElements, distAxis);
13922
+ const positions = chunkIVCWQLQK_js.distributeElements(selectedElements, distAxis);
13826
13923
  for (const [id, pos] of positions) {
13827
13924
  const el = elementLookup.get(id);
13828
13925
  if (!el) {
@@ -13839,7 +13936,7 @@ function useGroupAlignLayerHandlers(input) {
13839
13936
  }
13840
13937
  const id = selectedElement.id;
13841
13938
  ops.updateActiveElements(
13842
- (els) => direction === "forward" ? chunk2TOLRBFU_js.bringForward(els, id) : direction === "backward" ? chunk2TOLRBFU_js.sendBackward(els, id) : els
13939
+ (els) => direction === "forward" ? chunkIVCWQLQK_js.bringForward(els, id) : direction === "backward" ? chunkIVCWQLQK_js.sendBackward(els, id) : els
13843
13940
  );
13844
13941
  history.markDirty();
13845
13942
  };
@@ -13849,7 +13946,7 @@ function useGroupAlignLayerHandlers(input) {
13849
13946
  }
13850
13947
  const id = selectedElement.id;
13851
13948
  ops.updateActiveElements(
13852
- (els) => direction === "front" ? chunk2TOLRBFU_js.bringToFront(els, id) : chunk2TOLRBFU_js.sendToBack(els, id)
13949
+ (els) => direction === "front" ? chunkIVCWQLQK_js.bringToFront(els, id) : chunkIVCWQLQK_js.sendToBack(els, id)
13853
13950
  );
13854
13951
  history.markDirty();
13855
13952
  };
@@ -13971,7 +14068,7 @@ function insertSlideFromLayoutUpdater(slides, activeIndex, draft) {
13971
14068
  function useSlideManagement(input) {
13972
14069
  const { slides, activeSlideIndex, setActiveSlideIndex, ops, history, handlerRef } = input;
13973
14070
  const handleAddSlide = () => {
13974
- const newSlide = chunk2TOLRBFU_js.createBlankSlide(slides.length + 1);
14071
+ const newSlide = chunkIVCWQLQK_js.createBlankSlide(slides.length + 1);
13975
14072
  ops.updateSlides((prev) => {
13976
14073
  const next = [...prev];
13977
14074
  next.splice(activeSlideIndex + 1, 0, newSlide);
@@ -14034,7 +14131,7 @@ function useSlideManagement(input) {
14034
14131
  }
14035
14132
  const clone = {
14036
14133
  ...src,
14037
- id: chunk2TOLRBFU_js.makeSlideId(),
14134
+ id: chunkIVCWQLQK_js.makeSlideId(),
14038
14135
  elements: src.elements.map((el) => ({
14039
14136
  ...el,
14040
14137
  id: `${el.id}-dup-${Math.random().toString(36).slice(2, 6)}`
@@ -14066,7 +14163,7 @@ function useSlideManagement(input) {
14066
14163
  const handleInsertSlideFromLayout = (layoutPath, layoutName) => {
14067
14164
  const insertAt = activeSlideIndex + 1;
14068
14165
  const draft = {
14069
- ...chunk2TOLRBFU_js.createBlankSlide(slides.length + 1),
14166
+ ...chunkIVCWQLQK_js.createBlankSlide(slides.length + 1),
14070
14167
  layoutPath,
14071
14168
  ...layoutName ? { layoutName } : {}
14072
14169
  };
@@ -14127,7 +14224,7 @@ function createTableMergeHandlers(input) {
14127
14224
  if (!nextCell || nextCell.hMerge || nextCell.vMerge) {
14128
14225
  return;
14129
14226
  }
14130
- const newTableData = chunk2TOLRBFU_js.mergeCells(
14227
+ const newTableData = chunkIVCWQLQK_js.mergeCells(
14131
14228
  [
14132
14229
  { row: rowIndex, col: columnIndex },
14133
14230
  { row: rowIndex, col: nextColIdx }
@@ -14135,7 +14232,7 @@ function createTableMergeHandlers(input) {
14135
14232
  td
14136
14233
  );
14137
14234
  const updates = { tableData: newTableData };
14138
- const newRawXml = chunkAD2CLKY6_js.updateMergeAttrsInRawXml(selectedElement, newTableData);
14235
+ const newRawXml = chunkKAP5TS7O_js.updateMergeAttrsInRawXml(selectedElement, newTableData);
14139
14236
  if (newRawXml) {
14140
14237
  updates.rawXml = newRawXml;
14141
14238
  }
@@ -14161,7 +14258,7 @@ function createTableMergeHandlers(input) {
14161
14258
  if (!targetNextCell || targetNextCell.hMerge || targetNextCell.vMerge) {
14162
14259
  return;
14163
14260
  }
14164
- const newTableData = chunk2TOLRBFU_js.mergeCells(
14261
+ const newTableData = chunkIVCWQLQK_js.mergeCells(
14165
14262
  [
14166
14263
  { row: rowIndex, col: columnIndex },
14167
14264
  { row: targetNextRowIdx, col: columnIndex }
@@ -14169,7 +14266,7 @@ function createTableMergeHandlers(input) {
14169
14266
  td
14170
14267
  );
14171
14268
  const updates = { tableData: newTableData };
14172
- const newRawXml = chunkAD2CLKY6_js.updateMergeAttrsInRawXml(selectedElement, newTableData);
14269
+ const newRawXml = chunkKAP5TS7O_js.updateMergeAttrsInRawXml(selectedElement, newTableData);
14173
14270
  if (newRawXml) {
14174
14271
  updates.rawXml = newRawXml;
14175
14272
  }
@@ -14184,9 +14281,9 @@ function createTableMergeHandlers(input) {
14184
14281
  return;
14185
14282
  }
14186
14283
  const td = selectedElement.tableData;
14187
- const newTableData = chunk2TOLRBFU_js.mergeCells(ts.selectedCells, td);
14284
+ const newTableData = chunkIVCWQLQK_js.mergeCells(ts.selectedCells, td);
14188
14285
  const updates = { tableData: newTableData };
14189
- const newRawXml = chunkAD2CLKY6_js.updateMergeAttrsInRawXml(selectedElement, newTableData);
14286
+ const newRawXml = chunkKAP5TS7O_js.updateMergeAttrsInRawXml(selectedElement, newTableData);
14190
14287
  if (newRawXml) {
14191
14288
  updates.rawXml = newRawXml;
14192
14289
  }
@@ -14203,9 +14300,9 @@ function createTableMergeHandlers(input) {
14203
14300
  }
14204
14301
  const { rowIndex, columnIndex } = ts;
14205
14302
  const td = selectedElement.tableData;
14206
- const newTableData = chunk2TOLRBFU_js.splitCell(rowIndex, columnIndex, td);
14303
+ const newTableData = chunkIVCWQLQK_js.splitCell(rowIndex, columnIndex, td);
14207
14304
  const updates = { tableData: newTableData };
14208
- const newRawXml = chunkAD2CLKY6_js.updateMergeAttrsInRawXml(selectedElement, newTableData);
14305
+ const newRawXml = chunkKAP5TS7O_js.updateMergeAttrsInRawXml(selectedElement, newTableData);
14209
14306
  if (newRawXml) {
14210
14307
  updates.rawXml = newRawXml;
14211
14308
  }
@@ -14249,7 +14346,7 @@ function createTableStructHandlers(input) {
14249
14346
  updates.tableData = { ...el.tableData, rows: newRows };
14250
14347
  }
14251
14348
  if (el.rawXml) {
14252
- const newRawXml = chunkAD2CLKY6_js.updateCellTextInRawXml(el, rowIndex, colIndex, text);
14349
+ const newRawXml = chunkKAP5TS7O_js.updateCellTextInRawXml(el, rowIndex, colIndex, text);
14253
14350
  if (newRawXml) {
14254
14351
  updates.rawXml = newRawXml;
14255
14352
  }
@@ -14273,7 +14370,7 @@ function createTableStructHandlers(input) {
14273
14370
  const { rowIndex, columnIndex: colIndex } = ts;
14274
14371
  const updates = {};
14275
14372
  if (selectedElement.rawXml) {
14276
- const newRawXml = chunkAD2CLKY6_js.updateCellTextStyleInRawXml(
14373
+ const newRawXml = chunkKAP5TS7O_js.updateCellTextStyleInRawXml(
14277
14374
  selectedElement,
14278
14375
  rowIndex,
14279
14376
  colIndex,
@@ -14337,9 +14434,9 @@ function createTableStructHandlers(input) {
14337
14434
  return;
14338
14435
  }
14339
14436
  const rowIdx = ts?.rowIndex ?? 0;
14340
- const newTableData = chunk2TOLRBFU_js.insertTableRow(selectedElement.tableData, rowIdx, position);
14437
+ const newTableData = chunkIVCWQLQK_js.insertTableRow(selectedElement.tableData, rowIdx, position);
14341
14438
  const updates = { tableData: newTableData };
14342
- const newRawXml = chunkAD2CLKY6_js.rebuildTableStructureInRawXml(selectedElement, newTableData);
14439
+ const newRawXml = chunkKAP5TS7O_js.rebuildTableStructureInRawXml(selectedElement, newTableData);
14343
14440
  if (newRawXml) {
14344
14441
  updates.rawXml = newRawXml;
14345
14442
  }
@@ -14352,12 +14449,12 @@ function createTableStructHandlers(input) {
14352
14449
  }
14353
14450
  const td = selectedElement.tableData;
14354
14451
  const rowIdx = ts?.rowIndex ?? 0;
14355
- const newTableData = chunk2TOLRBFU_js.deleteTableRow(td, rowIdx);
14452
+ const newTableData = chunkIVCWQLQK_js.deleteTableRow(td, rowIdx);
14356
14453
  if (newTableData === td) {
14357
14454
  return;
14358
14455
  }
14359
14456
  const updates = { tableData: newTableData };
14360
- const newRawXml = chunkAD2CLKY6_js.rebuildTableStructureInRawXml(selectedElement, newTableData);
14457
+ const newRawXml = chunkKAP5TS7O_js.rebuildTableStructureInRawXml(selectedElement, newTableData);
14361
14458
  if (newRawXml) {
14362
14459
  updates.rawXml = newRawXml;
14363
14460
  }
@@ -14369,9 +14466,9 @@ function createTableStructHandlers(input) {
14369
14466
  return;
14370
14467
  }
14371
14468
  const colIdx = ts?.columnIndex ?? 0;
14372
- const newTableData = chunk2TOLRBFU_js.insertTableColumn(selectedElement.tableData, colIdx, position);
14469
+ const newTableData = chunkIVCWQLQK_js.insertTableColumn(selectedElement.tableData, colIdx, position);
14373
14470
  const updates = { tableData: newTableData };
14374
- const newRawXml = chunkAD2CLKY6_js.rebuildTableStructureInRawXml(selectedElement, newTableData);
14471
+ const newRawXml = chunkKAP5TS7O_js.rebuildTableStructureInRawXml(selectedElement, newTableData);
14375
14472
  if (newRawXml) {
14376
14473
  updates.rawXml = newRawXml;
14377
14474
  }
@@ -14384,12 +14481,12 @@ function createTableStructHandlers(input) {
14384
14481
  }
14385
14482
  const td = selectedElement.tableData;
14386
14483
  const colIdx = ts?.columnIndex ?? 0;
14387
- const newTableData = chunk2TOLRBFU_js.deleteTableColumn(td, colIdx);
14484
+ const newTableData = chunkIVCWQLQK_js.deleteTableColumn(td, colIdx);
14388
14485
  if (newTableData === td) {
14389
14486
  return;
14390
14487
  }
14391
14488
  const updates = { tableData: newTableData };
14392
- const newRawXml = chunkAD2CLKY6_js.rebuildTableStructureInRawXml(selectedElement, newTableData);
14489
+ const newRawXml = chunkKAP5TS7O_js.rebuildTableStructureInRawXml(selectedElement, newTableData);
14393
14490
  if (newRawXml) {
14394
14491
  updates.rawXml = newRawXml;
14395
14492
  }
@@ -14425,8 +14522,8 @@ async function renderToCanvas(element, options = {}) {
14425
14522
  return html2canvasPro(element, {
14426
14523
  ...options,
14427
14524
  onclone: async (doc, clonedEl) => {
14428
- await chunk2TOLRBFU_js.normalizeColorsForCapture(doc, clonedEl);
14429
- chunk2TOLRBFU_js.preprocessCssForCapture(clonedEl);
14525
+ await chunkIVCWQLQK_js.normalizeColorsForCapture(doc, clonedEl);
14526
+ chunkIVCWQLQK_js.preprocessCssForCapture(clonedEl);
14430
14527
  if (typeof userOnClone === "function") {
14431
14528
  userOnClone(doc, clonedEl);
14432
14529
  }
@@ -14482,7 +14579,7 @@ async function exportSlideToPngBlob(slideElement, options = {}) {
14482
14579
  }
14483
14580
  async function exportSlideAsPng(slideElement, slideIndex, options = {}) {
14484
14581
  const blob = await exportSlideToPngBlob(slideElement, options);
14485
- chunk2TOLRBFU_js.downloadBlob(blob, `slide-${slideIndex + 1}.png`);
14582
+ chunkIVCWQLQK_js.downloadBlob(blob, `slide-${slideIndex + 1}.png`);
14486
14583
  }
14487
14584
  async function copySlideToClipboard(slideElement, options = {}) {
14488
14585
  const blob = await exportSlideToPngBlob(slideElement, options);
@@ -14504,7 +14601,7 @@ async function exportAllSlidesAsPdf(slideStageRef, totalSlides, setActiveSlide,
14504
14601
  continue;
14505
14602
  }
14506
14603
  const canvas = await renderElementToCanvas(stageEl, scale);
14507
- images.push(chunk2TOLRBFU_js.canvasToJpegData(canvas));
14604
+ images.push(chunkIVCWQLQK_js.canvasToJpegData(canvas));
14508
14605
  }
14509
14606
  onProgress?.(totalSlides, totalSlides);
14510
14607
  setActiveSlide(currentSlideIndex);
@@ -14512,7 +14609,7 @@ async function exportAllSlidesAsPdf(slideStageRef, totalSlides, setActiveSlide,
14512
14609
  throw new Error(chunkCUUYYYC5_js.translationsEn["pptx.export.errorNoSlidesPdf"]);
14513
14610
  }
14514
14611
  const pdfBlobUrl = buildPdfFromImageData(images);
14515
- chunk2TOLRBFU_js.downloadDataUrl(pdfBlobUrl, filename);
14612
+ chunkIVCWQLQK_js.downloadDataUrl(pdfBlobUrl, filename);
14516
14613
  }
14517
14614
  async function captureAllSlidesAsPngDataUrls(slideStageRef, totalSlides, setActiveSlide, currentSlideIndex, options = {}) {
14518
14615
  const { scale = 2, onProgress } = options;
@@ -14561,7 +14658,7 @@ async function exportAllSlidesAsNotesPdf(slideStageRef, totalSlides, setActiveSl
14561
14658
  throw new Error(chunkCUUYYYC5_js.translationsEn["pptx.export.errorNoSlidesNotesPdf"]);
14562
14659
  }
14563
14660
  const pdfDataUrl = buildNotesPdf(pages);
14564
- chunk2TOLRBFU_js.downloadDataUrl(pdfDataUrl, filename);
14661
+ chunkIVCWQLQK_js.downloadDataUrl(pdfDataUrl, filename);
14565
14662
  }
14566
14663
 
14567
14664
  // src/viewer/utils/export-video.ts
@@ -14605,7 +14702,7 @@ async function exportAllSlidesAsVideo(slideStageRef, totalSlides, setActiveSlide
14605
14702
  const fps = 30;
14606
14703
  const stream = recordingCanvas.captureStream(fps);
14607
14704
  const recorder = new MediaRecorder(stream, {
14608
- mimeType: chunk2TOLRBFU_js.pickSupportedMimeType([...chunk2TOLRBFU_js.WEBM_MIME_CANDIDATES]),
14705
+ mimeType: chunkIVCWQLQK_js.pickSupportedMimeType([...chunkIVCWQLQK_js.WEBM_MIME_CANDIDATES]),
14609
14706
  videoBitsPerSecond: 5e6
14610
14707
  });
14611
14708
  const chunks = [];
@@ -14628,8 +14725,8 @@ async function exportAllSlidesAsVideo(slideStageRef, totalSlides, setActiveSlide
14628
14725
  const duration = slideTimingsMs?.[i] ?? slideDurationMs;
14629
14726
  ctx.clearRect(0, 0, recordingCanvas.width, recordingCanvas.height);
14630
14727
  ctx.drawImage(slideCanvases[i], 0, 0);
14631
- const frameInterval = chunk2TOLRBFU_js.fpsToFrameIntervalMs(fps);
14632
- const framesNeeded = chunk2TOLRBFU_js.segmentFrameCount(duration, fps);
14728
+ const frameInterval = chunkIVCWQLQK_js.fpsToFrameIntervalMs(fps);
14729
+ const framesNeeded = chunkIVCWQLQK_js.segmentFrameCount(duration, fps);
14633
14730
  for (let f = 0; f < framesNeeded; f++) {
14634
14731
  if (signal?.aborted) {
14635
14732
  recorder.stop();
@@ -14678,7 +14775,7 @@ async function exportAllSlidesAsGif(slideStageRef, totalSlides, setActiveSlide,
14678
14775
  if (frames.length === 0) {
14679
14776
  throw new Error(chunkCUUYYYC5_js.translationsEn["pptx.export.errorNoSlidesGif"]);
14680
14777
  }
14681
- const gifBytes = chunk2TOLRBFU_js.encodeGif(frames, Math.round(slideDurationMs / 10));
14778
+ const gifBytes = chunkIVCWQLQK_js.encodeGif(frames, Math.round(slideDurationMs / 10));
14682
14779
  onProgress?.(totalSlides, totalSlides);
14683
14780
  const buf = new ArrayBuffer(gifBytes.length);
14684
14781
  new Uint8Array(buf).set(gifBytes);
@@ -14732,7 +14829,7 @@ function exportAllSlidesToSvg(data, options = {}) {
14732
14829
  continue;
14733
14830
  }
14734
14831
  onProgress?.(processedCount, data.slides.length);
14735
- let svg = chunkAD2CLKY6_js.SvgExporter.exportSlide(slide, data.width, data.height, svgOptions);
14832
+ let svg = chunkKAP5TS7O_js.SvgExporter.exportSlide(slide, data.width, data.height, svgOptions);
14736
14833
  if (embedFonts && fontFaces?.length) {
14737
14834
  svg = injectFontFaces(svg, fontFaces);
14738
14835
  }
@@ -14792,7 +14889,7 @@ function useExportSaveAs(input) {
14792
14889
  }
14793
14890
  setExportProgress(70);
14794
14891
  setExportStatusMessage("Writing README...");
14795
- const readme = chunk2TOLRBFU_js.generatePackageReadme(pptxFilename);
14892
+ const readme = chunkIVCWQLQK_js.generatePackageReadme(pptxFilename);
14796
14893
  pkgFolder.file("README.txt", readme);
14797
14894
  if (abortCtrl.signal.aborted) {
14798
14895
  throw new DOMException("Export cancelled", "AbortError");
@@ -14803,7 +14900,7 @@ function useExportSaveAs(input) {
14803
14900
  setExportProgress(95);
14804
14901
  setExportStatusMessage("Downloading...");
14805
14902
  const baseName = pptxFilename.replace(/\.[^.]+$/u, "");
14806
- chunk2TOLRBFU_js.downloadBlob(zipBlob, `${baseName}-package.zip`);
14903
+ chunkIVCWQLQK_js.downloadBlob(zipBlob, `${baseName}-package.zip`);
14807
14904
  setExportProgress(100);
14808
14905
  } catch (err) {
14809
14906
  if (err.name !== "AbortError") {
@@ -14826,7 +14923,7 @@ function useExportSaveAs(input) {
14826
14923
  const blob = new Blob([data], {
14827
14924
  type: "application/vnd.openxmlformats-officedocument.presentationml.presentation"
14828
14925
  });
14829
- chunk2TOLRBFU_js.downloadBlob(blob, `${baseName}.${ext}`);
14926
+ chunkIVCWQLQK_js.downloadBlob(blob, `${baseName}.${ext}`);
14830
14927
  } catch (err) {
14831
14928
  console.error(`[PowerPointViewer] Save as .${ext} failed:`, err);
14832
14929
  }
@@ -14839,7 +14936,7 @@ function useExportSaveAs(input) {
14839
14936
  const pptxGuides = guides.map((g) => ({
14840
14937
  id: g.id,
14841
14938
  orientation: g.axis === "h" ? "horz" : "vert",
14842
- positionEmu: chunkAD2CLKY6_js.guidePxToEmu(g.position)
14939
+ positionEmu: chunkKAP5TS7O_js.guidePxToEmu(g.position)
14843
14940
  }));
14844
14941
  return {
14845
14942
  ...slide,
@@ -14903,7 +15000,7 @@ function safeConfirm(message) {
14903
15000
  }
14904
15001
  }
14905
15002
  function downloadBlob2(blob, filename) {
14906
- chunk2TOLRBFU_js.downloadBlob(blob, chunk2TOLRBFU_js.sanitizeDownloadFilename(filename));
15003
+ chunkIVCWQLQK_js.downloadBlob(blob, chunkIVCWQLQK_js.sanitizeDownloadFilename(filename));
14907
15004
  }
14908
15005
 
14909
15006
  // src/viewer/hooks/useExportHandlers.ts
@@ -15004,21 +15101,21 @@ function useExportHandlers(input) {
15004
15101
  {
15005
15102
  scale: 2,
15006
15103
  onProgress: (current, total) => {
15007
- setExportProgress(chunk2TOLRBFU_js.slideProgressPercent(current, total));
15008
- setExportStatusMessage(chunk2TOLRBFU_js.slideStatusLabel("Rendering", current, total));
15104
+ setExportProgress(chunkIVCWQLQK_js.slideProgressPercent(current, total));
15105
+ setExportStatusMessage(chunkIVCWQLQK_js.slideStatusLabel("Rendering", current, total));
15009
15106
  },
15010
15107
  signal: abortCtrl.signal
15011
15108
  }
15012
15109
  );
15013
- setExportProgress(chunk2TOLRBFU_js.EXPORT_ASSEMBLING_PERCENT);
15110
+ setExportProgress(chunkIVCWQLQK_js.EXPORT_ASSEMBLING_PERCENT);
15014
15111
  setExportStatusMessage("Building PDF...");
15015
15112
  await new Promise((r) => {
15016
15113
  setTimeout(r, 100);
15017
15114
  });
15018
- setExportProgress(chunk2TOLRBFU_js.EXPORT_DONE_PERCENT);
15115
+ setExportProgress(chunkIVCWQLQK_js.EXPORT_DONE_PERCENT);
15019
15116
  setExportStatusMessage("Done!");
15020
15117
  } catch (err) {
15021
- if (!chunk2TOLRBFU_js.isExportAbortError(err)) {
15118
+ if (!chunkIVCWQLQK_js.isExportAbortError(err)) {
15022
15119
  console.error("[PowerPointViewer] PDF export failed:", err);
15023
15120
  }
15024
15121
  } finally {
@@ -15048,21 +15145,21 @@ function useExportHandlers(input) {
15048
15145
  {
15049
15146
  scale: 2,
15050
15147
  onProgress: (current, total) => {
15051
- setExportProgress(chunk2TOLRBFU_js.slideProgressPercent(current, total));
15052
- setExportStatusMessage(chunk2TOLRBFU_js.slideStatusLabel("Rendering", current, total));
15148
+ setExportProgress(chunkIVCWQLQK_js.slideProgressPercent(current, total));
15149
+ setExportStatusMessage(chunkIVCWQLQK_js.slideStatusLabel("Rendering", current, total));
15053
15150
  },
15054
15151
  signal: abortCtrl.signal
15055
15152
  }
15056
15153
  );
15057
- setExportProgress(chunk2TOLRBFU_js.EXPORT_ASSEMBLING_PERCENT);
15154
+ setExportProgress(chunkIVCWQLQK_js.EXPORT_ASSEMBLING_PERCENT);
15058
15155
  setExportStatusMessage("Building PDF...");
15059
15156
  await new Promise((r) => {
15060
15157
  setTimeout(r, 100);
15061
15158
  });
15062
- setExportProgress(chunk2TOLRBFU_js.EXPORT_DONE_PERCENT);
15159
+ setExportProgress(chunkIVCWQLQK_js.EXPORT_DONE_PERCENT);
15063
15160
  setExportStatusMessage("Done!");
15064
15161
  } catch (err) {
15065
- if (!chunk2TOLRBFU_js.isExportAbortError(err)) {
15162
+ if (!chunkIVCWQLQK_js.isExportAbortError(err)) {
15066
15163
  console.error("[PowerPointViewer] Notes PDF export failed:", err);
15067
15164
  }
15068
15165
  } finally {
@@ -15103,22 +15200,22 @@ function useExportHandlers(input) {
15103
15200
  scale: 1,
15104
15201
  slideDurationMs: 3e3,
15105
15202
  onProgress: (current, total) => {
15106
- setExportProgress(chunk2TOLRBFU_js.slideProgressPercent(current, total, 45));
15107
- setExportStatusMessage(chunk2TOLRBFU_js.slideStatusLabel("Capturing", current, total));
15203
+ setExportProgress(chunkIVCWQLQK_js.slideProgressPercent(current, total, 45));
15204
+ setExportStatusMessage(chunkIVCWQLQK_js.slideStatusLabel("Capturing", current, total));
15108
15205
  },
15109
15206
  onRecordProgress: (current, total) => {
15110
- setExportProgress(chunk2TOLRBFU_js.recordProgressPercent(current, total));
15111
- setExportStatusMessage(chunk2TOLRBFU_js.slideStatusLabel("Recording", current, total));
15207
+ setExportProgress(chunkIVCWQLQK_js.recordProgressPercent(current, total));
15208
+ setExportStatusMessage(chunkIVCWQLQK_js.slideStatusLabel("Recording", current, total));
15112
15209
  },
15113
15210
  signal: abortCtrl.signal
15114
15211
  }
15115
15212
  );
15116
- setExportProgress(chunk2TOLRBFU_js.EXPORT_ASSEMBLING_PERCENT);
15213
+ setExportProgress(chunkIVCWQLQK_js.EXPORT_ASSEMBLING_PERCENT);
15117
15214
  setExportStatusMessage("Saving file...");
15118
15215
  downloadBlob2(blob, "presentation.webm");
15119
- setExportProgress(chunk2TOLRBFU_js.EXPORT_DONE_PERCENT);
15216
+ setExportProgress(chunkIVCWQLQK_js.EXPORT_DONE_PERCENT);
15120
15217
  } catch (err) {
15121
- if (!chunk2TOLRBFU_js.isExportAbortError(err)) {
15218
+ if (!chunkIVCWQLQK_js.isExportAbortError(err)) {
15122
15219
  console.error("[PowerPointViewer] Video export failed:", err);
15123
15220
  }
15124
15221
  } finally {
@@ -15146,18 +15243,18 @@ function useExportHandlers(input) {
15146
15243
  scale: 0.5,
15147
15244
  slideDurationMs: 2e3,
15148
15245
  onProgress: (current, total) => {
15149
- setExportProgress(chunk2TOLRBFU_js.slideProgressPercent(current, total));
15150
- setExportStatusMessage(chunk2TOLRBFU_js.slideStatusLabel("Encoding", current, total));
15246
+ setExportProgress(chunkIVCWQLQK_js.slideProgressPercent(current, total));
15247
+ setExportStatusMessage(chunkIVCWQLQK_js.slideStatusLabel("Encoding", current, total));
15151
15248
  },
15152
15249
  signal: abortCtrl.signal
15153
15250
  }
15154
15251
  );
15155
- setExportProgress(chunk2TOLRBFU_js.EXPORT_ASSEMBLING_PERCENT);
15252
+ setExportProgress(chunkIVCWQLQK_js.EXPORT_ASSEMBLING_PERCENT);
15156
15253
  setExportStatusMessage("Saving file...");
15157
15254
  downloadBlob2(blob, "presentation.gif");
15158
- setExportProgress(chunk2TOLRBFU_js.EXPORT_DONE_PERCENT);
15255
+ setExportProgress(chunkIVCWQLQK_js.EXPORT_DONE_PERCENT);
15159
15256
  } catch (err) {
15160
- if (!chunk2TOLRBFU_js.isExportAbortError(err)) {
15257
+ if (!chunkIVCWQLQK_js.isExportAbortError(err)) {
15161
15258
  console.error("[PowerPointViewer] GIF export failed:", err);
15162
15259
  }
15163
15260
  } finally {
@@ -15197,7 +15294,7 @@ function openPrintWindow(title, bodyHtml, orientation, colorFilter, frameSlides)
15197
15294
  }
15198
15295
  printWindow.document.open();
15199
15296
  printWindow.document.write(
15200
- chunk2TOLRBFU_js.buildPrintHtmlDocument({ title, bodyHtml, orientation, colorFilter, frameSlides })
15297
+ chunkIVCWQLQK_js.buildPrintHtmlDocument({ title, bodyHtml, orientation, colorFilter, frameSlides })
15201
15298
  );
15202
15299
  printWindow.document.close();
15203
15300
  printWindow.focus();
@@ -15258,7 +15355,7 @@ function usePrintHandlers(input) {
15258
15355
  if (svgs.length === 0) {
15259
15356
  return;
15260
15357
  }
15261
- const printDoc = chunk2TOLRBFU_js.buildPrintDocument(svgs, pptxData.width, pptxData.height, {
15358
+ const printDoc = chunkIVCWQLQK_js.buildPrintDocument(svgs, pptxData.width, pptxData.height, {
15262
15359
  title: "Slides (Vector)",
15263
15360
  orientation: settings.orientation,
15264
15361
  colorFilter
@@ -15294,7 +15391,7 @@ function usePrintHandlers(input) {
15294
15391
  if (settings.printWhat === "outline") {
15295
15392
  openPrintWindow(
15296
15393
  "Outline",
15297
- `<div class="outline-page">${chunk2TOLRBFU_js.buildOutlineHtml(slideIndices, slides)}</div>`,
15394
+ `<div class="outline-page">${chunkIVCWQLQK_js.buildOutlineHtml(slideIndices, slides)}</div>`,
15298
15395
  settings.orientation,
15299
15396
  colorFilter,
15300
15397
  settings.frameSlides
@@ -15319,7 +15416,7 @@ function usePrintHandlers(input) {
15319
15416
  if (settings.printWhat === "slides") {
15320
15417
  openPrintWindow(
15321
15418
  "Slides",
15322
- chunk2TOLRBFU_js.buildSlidesHtml(slideImages, slideIndices),
15419
+ chunkIVCWQLQK_js.buildSlidesHtml(slideImages, slideIndices),
15323
15420
  settings.orientation,
15324
15421
  colorFilter,
15325
15422
  settings.frameSlides
@@ -15329,7 +15426,7 @@ function usePrintHandlers(input) {
15329
15426
  if (settings.printWhat === "notes") {
15330
15427
  openPrintWindow(
15331
15428
  "Notes Pages",
15332
- chunk2TOLRBFU_js.buildNotesHtml(slideImages, slideIndices, slides),
15429
+ chunkIVCWQLQK_js.buildNotesHtml(slideImages, slideIndices, slides),
15333
15430
  "portrait",
15334
15431
  colorFilter,
15335
15432
  settings.frameSlides
@@ -15340,7 +15437,7 @@ function usePrintHandlers(input) {
15340
15437
  const spp = settings.slidesPerPage;
15341
15438
  openPrintWindow(
15342
15439
  `Handout ${spp} per page`,
15343
- chunk2TOLRBFU_js.buildHandoutsHtml(slideImages, slideIndices, spp),
15440
+ chunkIVCWQLQK_js.buildHandoutsHtml(slideImages, slideIndices, spp),
15344
15441
  "portrait",
15345
15442
  colorFilter,
15346
15443
  settings.frameSlides
@@ -15404,8 +15501,8 @@ function useThemeHandlers(input) {
15404
15501
  return;
15405
15502
  }
15406
15503
  await handler.updateThemeColorScheme(colorScheme);
15407
- const previousMap = theme?.colorScheme ? chunkAD2CLKY6_js.buildThemeColorMap(theme.colorScheme) : {};
15408
- setSlides((prev) => chunkAD2CLKY6_js.reResolveSlideColors(prev, previousMap, colorScheme));
15504
+ const previousMap = theme?.colorScheme ? chunkKAP5TS7O_js.buildThemeColorMap(theme.colorScheme) : {};
15505
+ setSlides((prev) => chunkKAP5TS7O_js.reResolveSlideColors(prev, previousMap, colorScheme));
15409
15506
  setTheme((prev) => prev ? { ...prev, colorScheme } : { colorScheme });
15410
15507
  bumpHistory();
15411
15508
  history.markDirty();
@@ -15510,7 +15607,7 @@ function useThemeSwitching(input) {
15510
15607
  }
15511
15608
  try {
15512
15609
  await handler.applyTheme(preset.colorScheme, preset.fontScheme, preset.name);
15513
- const newData = chunkAD2CLKY6_js.applyThemeToData(data, preset.colorScheme, preset.fontScheme, preset.name);
15610
+ const newData = chunkKAP5TS7O_js.applyThemeToData(data, preset.colorScheme, preset.fontScheme, preset.name);
15514
15611
  onDataChange(newData);
15515
15612
  onThemeChanged?.(preset);
15516
15613
  } catch (error) {
@@ -15527,7 +15624,7 @@ function useThemeSwitching(input) {
15527
15624
  }
15528
15625
  try {
15529
15626
  await handler.applyTheme(colorScheme, fontScheme ?? {}, themeName);
15530
- const newData = chunkAD2CLKY6_js.applyThemeToData(data, colorScheme, fontScheme, themeName);
15627
+ const newData = chunkKAP5TS7O_js.applyThemeToData(data, colorScheme, fontScheme, themeName);
15531
15628
  onDataChange(newData);
15532
15629
  } catch (error) {
15533
15630
  console.error("Failed to switch to custom theme:", error);
@@ -15539,12 +15636,12 @@ function useThemeSwitching(input) {
15539
15636
  if (!data?.theme?.colorScheme) {
15540
15637
  return void 0;
15541
15638
  }
15542
- return chunkAD2CLKY6_js.THEME_PRESETS.find(
15543
- (p) => chunkAD2CLKY6_js.themeColorSchemesEqual(data.theme?.colorScheme, p.colorScheme)
15639
+ return chunkKAP5TS7O_js.THEME_PRESETS.find(
15640
+ (p) => chunkKAP5TS7O_js.themeColorSchemesEqual(data.theme?.colorScheme, p.colorScheme)
15544
15641
  );
15545
15642
  }, [data?.theme?.colorScheme]);
15546
15643
  return {
15547
- presets: chunkAD2CLKY6_js.THEME_PRESETS,
15644
+ presets: chunkKAP5TS7O_js.THEME_PRESETS,
15548
15645
  switchToPreset,
15549
15646
  switchToCustom,
15550
15647
  currentPreset
@@ -15619,7 +15716,7 @@ function usePropertyHandlers(input) {
15619
15716
  }
15620
15717
  try {
15621
15718
  const ab = await file.arrayBuffer();
15622
- const h = new chunkAD2CLKY6_js.PptxHandler();
15719
+ const h = new chunkKAP5TS7O_js.PptxHandler();
15623
15720
  const other = await h.load(ab);
15624
15721
  if (!other) {
15625
15722
  return;
@@ -15629,7 +15726,7 @@ function usePropertyHandlers(input) {
15629
15726
  width: canvasSize.width,
15630
15727
  height: canvasSize.height
15631
15728
  };
15632
- setCompareResult(chunk2TOLRBFU_js.comparePresentation(cur, other));
15729
+ setCompareResult(chunkIVCWQLQK_js.comparePresentation(cur, other));
15633
15730
  setIsComparePanelOpen(true);
15634
15731
  } catch (err) {
15635
15732
  console.warn("Compare failed:", err);
@@ -15646,7 +15743,7 @@ function usePropertyHandlers(input) {
15646
15743
  if (!diff || diff.status === "unchanged") {
15647
15744
  return;
15648
15745
  }
15649
- setSlides((prev) => chunk2TOLRBFU_js.applyAcceptSlide(prev, diff));
15746
+ setSlides((prev) => chunkIVCWQLQK_js.applyAcceptSlide(prev, diff));
15650
15747
  setIsDirty(true);
15651
15748
  },
15652
15749
  [compareResult, setSlides, setIsDirty]
@@ -15657,10 +15754,10 @@ function usePropertyHandlers(input) {
15657
15754
  if (!compareResult) {
15658
15755
  return;
15659
15756
  }
15660
- setSlides((prev) => chunk2TOLRBFU_js.applyAcceptAllSlides(prev, compareResult));
15757
+ setSlides((prev) => chunkIVCWQLQK_js.applyAcceptAllSlides(prev, compareResult));
15661
15758
  setIsDirty(true);
15662
15759
  }, [compareResult, setSlides, setIsDirty]);
15663
- const usedFontFamilies = React4.useMemo(() => chunk2TOLRBFU_js.collectUsedFonts(slides), [slides]);
15760
+ const usedFontFamilies = React4.useMemo(() => chunkIVCWQLQK_js.collectUsedFonts(slides), [slides]);
15664
15761
  return {
15665
15762
  handleUpdateNotes,
15666
15763
  handleUpdateSlide,
@@ -15779,7 +15876,7 @@ function useIsMobile(input) {
15779
15876
  const containerRef = input?.containerRef;
15780
15877
  const isTouchDevice = React4.useSyncExternalStore(
15781
15878
  subscribeTouchCapability,
15782
- chunk2TOLRBFU_js.detectTouchDevice,
15879
+ chunkIVCWQLQK_js.detectTouchDevice,
15783
15880
  () => false
15784
15881
  // server snapshot
15785
15882
  );
@@ -15795,7 +15892,7 @@ function useIsMobile(input) {
15795
15892
  }
15796
15893
  return containerRef?.current?.clientHeight ?? window.innerHeight;
15797
15894
  });
15798
- const [orientation, setOrientation] = React4.useState(chunk2TOLRBFU_js.detectOrientation);
15895
+ const [orientation, setOrientation] = React4.useState(chunkIVCWQLQK_js.detectOrientation);
15799
15896
  const [isVirtualKeyboardOpen, setIsVirtualKeyboardOpen] = React4.useState(false);
15800
15897
  const [initialViewportHeight] = React4.useState(
15801
15898
  () => typeof window !== "undefined" ? window.innerHeight : 800
@@ -15839,7 +15936,7 @@ function useIsMobile(input) {
15839
15936
  return;
15840
15937
  }
15841
15938
  const handleOrientationChange = () => {
15842
- setOrientation(chunk2TOLRBFU_js.detectOrientation());
15939
+ setOrientation(chunkIVCWQLQK_js.detectOrientation());
15843
15940
  };
15844
15941
  if (screen.orientation) {
15845
15942
  screen.orientation.addEventListener("change", handleOrientationChange);
@@ -15869,9 +15966,9 @@ function useIsMobile(input) {
15869
15966
  window.addEventListener("resize", handleResize);
15870
15967
  return () => window.removeEventListener("resize", handleResize);
15871
15968
  }, [isTouchDevice, initialViewportHeight]);
15872
- const isMobile = chunk2TOLRBFU_js.isMobileViewport(containerWidth, containerHeight, isTouchDevice);
15873
- const isTablet = !isMobile && containerWidth >= chunk2TOLRBFU_js.MOBILE_BREAKPOINT && containerWidth < chunk2TOLRBFU_js.TABLET_BREAKPOINT;
15874
- const isDesktop = !isMobile && containerWidth >= chunk2TOLRBFU_js.TABLET_BREAKPOINT;
15969
+ const isMobile = chunkIVCWQLQK_js.isMobileViewport(containerWidth, containerHeight, isTouchDevice);
15970
+ const isTablet = !isMobile && containerWidth >= chunkIVCWQLQK_js.MOBILE_BREAKPOINT && containerWidth < chunkIVCWQLQK_js.TABLET_BREAKPOINT;
15971
+ const isDesktop = !isMobile && containerWidth >= chunkIVCWQLQK_js.TABLET_BREAKPOINT;
15875
15972
  return {
15876
15973
  isMobile,
15877
15974
  isTablet,
@@ -15932,11 +16029,11 @@ function useViewerDialogs(input) {
15932
16029
  );
15933
16030
  const [embedFontsEnabled, setEmbedFontsEnabled] = React4.useState(false);
15934
16031
  const [isNarrowViewport, setIsNarrowViewport] = React4.useState(
15935
- () => typeof window !== "undefined" ? chunk2TOLRBFU_js.isMobileViewport(window.innerWidth, window.innerHeight, viewportIsTouch()) : false
16032
+ () => typeof window !== "undefined" ? chunkIVCWQLQK_js.isMobileViewport(window.innerWidth, window.innerHeight, viewportIsTouch()) : false
15936
16033
  );
15937
16034
  React4.useEffect(() => {
15938
16035
  const handleWindow = () => setIsNarrowViewport(
15939
- chunk2TOLRBFU_js.isMobileViewport(window.innerWidth, window.innerHeight, viewportIsTouch())
16036
+ chunkIVCWQLQK_js.isMobileViewport(window.innerWidth, window.innerHeight, viewportIsTouch())
15940
16037
  );
15941
16038
  let observer = null;
15942
16039
  let raf = 0;
@@ -15950,12 +16047,12 @@ function useViewerDialogs(input) {
15950
16047
  const entry = entries[0];
15951
16048
  if (entry) {
15952
16049
  setIsNarrowViewport(
15953
- chunk2TOLRBFU_js.isMobileViewport(entry.contentRect.width, entry.contentRect.height, viewportIsTouch())
16050
+ chunkIVCWQLQK_js.isMobileViewport(entry.contentRect.width, entry.contentRect.height, viewportIsTouch())
15954
16051
  );
15955
16052
  }
15956
16053
  });
15957
16054
  observer.observe(el);
15958
- setIsNarrowViewport(chunk2TOLRBFU_js.isMobileViewport(el.clientWidth, el.clientHeight, viewportIsTouch()));
16055
+ setIsNarrowViewport(chunkIVCWQLQK_js.isMobileViewport(el.clientWidth, el.clientHeight, viewportIsTouch()));
15959
16056
  };
15960
16057
  attach();
15961
16058
  window.addEventListener("resize", handleWindow);
@@ -16132,7 +16229,7 @@ function computeVisibleSlideIndexes(slides, activeCustomShowId, customShows) {
16132
16229
  return slides.map((_, i) => i).filter((i) => !slides[i]?.hidden);
16133
16230
  }
16134
16231
  function computeSlideSectionGroups(slides, sections) {
16135
- return chunk2TOLRBFU_js.groupSlidesBySection(sections, slides).map((group) => ({
16232
+ return chunkIVCWQLQK_js.groupSlidesBySection(sections, slides).map((group) => ({
16136
16233
  id: group.section?.id ?? (sections.length > 0 ? UNGROUPED_SECTION_ID : "default"),
16137
16234
  label: group.section?.name ?? (sections.length > 0 ? "Ungrouped Slides" : "Slides"),
16138
16235
  slideIndexes: group.slideIndexes,
@@ -16369,13 +16466,13 @@ function useSerialize(input) {
16369
16466
  let processedSlide = slide;
16370
16467
  if (pendingEditId) {
16371
16468
  const updatedElements = slide.elements.map((el) => {
16372
- if (el.id !== pendingEditId || !chunkAD2CLKY6_js.hasTextProperties(el)) {
16469
+ if (el.id !== pendingEditId || !chunkKAP5TS7O_js.hasTextProperties(el)) {
16373
16470
  return el;
16374
16471
  }
16375
16472
  return {
16376
16473
  ...el,
16377
16474
  text: pendingEditText,
16378
- textSegments: chunk2TOLRBFU_js.remapTextToSegments(pendingEditText, el.textSegments, el.textStyle)
16475
+ textSegments: chunkIVCWQLQK_js.remapTextToSegments(pendingEditText, el.textSegments, el.textStyle)
16379
16476
  };
16380
16477
  });
16381
16478
  if (updatedElements.some((el, i) => el !== slide.elements[i])) {
@@ -16388,7 +16485,7 @@ function useSerialize(input) {
16388
16485
  const pptxGuides = guides.map((g) => ({
16389
16486
  id: g.id,
16390
16487
  orientation: g.axis === "h" ? "horz" : "vert",
16391
- positionEmu: chunkAD2CLKY6_js.guidePxToEmu(g.position)
16488
+ positionEmu: chunkKAP5TS7O_js.guidePxToEmu(g.position)
16392
16489
  }));
16393
16490
  return {
16394
16491
  ...processedSlide,
@@ -16622,10 +16719,10 @@ function usePresentationSetup(input) {
16622
16719
  onToggleEraser: () => annotations.setPresentationTool("eraser"),
16623
16720
  onToggleToolbar: () => annotations.setToolbarVisible(!annotations.toolbarVisible),
16624
16721
  onSaveRehearsalTimings: (timings) => {
16625
- setSlides((prev) => chunk2TOLRBFU_js.applyRehearsalTimings(prev, timings));
16722
+ setSlides((prev) => chunkIVCWQLQK_js.applyRehearsalTimings(prev, timings));
16626
16723
  history.markDirty();
16627
16724
  },
16628
- loopContinuously: chunk2TOLRBFU_js.shouldLoopContinuously(presentationProperties),
16725
+ loopContinuously: chunkIVCWQLQK_js.shouldLoopContinuously(presentationProperties),
16629
16726
  showWithAnimation: presentationProperties.showWithAnimation,
16630
16727
  useTimings: presentationProperties.advanceMode !== "manual",
16631
16728
  endWithBlackSlide
@@ -16787,7 +16884,7 @@ function useEditorOperations(input) {
16787
16884
  const { formatPainterActive, setFormatPainterActive, elementLookup } = state;
16788
16885
  React4.useEffect(() => {
16789
16886
  if (formatPainterActive && !prevFormatPainterRef.current && selectedElement) {
16790
- copiedFormatRef.current = chunk2TOLRBFU_js.copyFormatFromElement(selectedElement);
16887
+ copiedFormatRef.current = chunkIVCWQLQK_js.copyFormatFromElement(selectedElement);
16791
16888
  } else if (!formatPainterActive) {
16792
16889
  copiedFormatRef.current = null;
16793
16890
  }
@@ -16813,12 +16910,12 @@ function useEditorOperations(input) {
16813
16910
  e.stopPropagation();
16814
16911
  const element = elementLookup.get(elementId);
16815
16912
  if (element) {
16816
- const updated = chunk2TOLRBFU_js.applyFormatToElement(element, copiedFormatRef.current);
16913
+ const updated = chunkIVCWQLQK_js.applyFormatToElement(element, copiedFormatRef.current);
16817
16914
  const updates = {};
16818
- if (chunkAD2CLKY6_js.hasShapeProperties(updated)) {
16915
+ if (chunkKAP5TS7O_js.hasShapeProperties(updated)) {
16819
16916
  updates.shapeStyle = updated.shapeStyle;
16820
16917
  }
16821
- if (chunkAD2CLKY6_js.hasTextProperties(updated)) {
16918
+ if (chunkKAP5TS7O_js.hasTextProperties(updated)) {
16822
16919
  updates.textStyle = updated.textStyle;
16823
16920
  }
16824
16921
  ops.updateElementById(elementId, updates);
@@ -16965,7 +17062,7 @@ function collectReferencedFontFamilies(slides) {
16965
17062
  const families = /* @__PURE__ */ new Set();
16966
17063
  for (const slide of slides) {
16967
17064
  for (const el of slide.elements) {
16968
- if (chunkAD2CLKY6_js.hasTextProperties(el) && el.textSegments) {
17065
+ if (chunkKAP5TS7O_js.hasTextProperties(el) && el.textSegments) {
16969
17066
  for (const seg of el.textSegments) {
16970
17067
  if (seg.style.fontFamily) {
16971
17068
  families.add(seg.style.fontFamily);
@@ -17748,7 +17845,7 @@ function useReducedMotion() {
17748
17845
  }
17749
17846
  function useViewerOptions() {
17750
17847
  const storeRef = React4.useRef(null);
17751
- storeRef.current ??= chunk2TOLRBFU_js.createViewerOptionsStore();
17848
+ storeRef.current ??= chunkIVCWQLQK_js.createViewerOptionsStore();
17752
17849
  const store = storeRef.current;
17753
17850
  const options = React4.useSyncExternalStore(
17754
17851
  (onStoreChange) => store.subscribe(onStoreChange),
@@ -17757,9 +17854,9 @@ function useViewerOptions() {
17757
17854
  );
17758
17855
  return { optionsStore: store, options };
17759
17856
  }
17760
- var KNOWN_TAB_IDS = new Set(chunk2TOLRBFU_js.TOOLBAR_TABS.map((tab) => tab.id));
17857
+ var KNOWN_TAB_IDS = new Set(chunkIVCWQLQK_js.TOOLBAR_TABS.map((tab) => tab.id));
17761
17858
  function computeToolbarVisibility(hiddenActions) {
17762
- const isHidden = (id) => chunk2TOLRBFU_js.isActionHidden(id, hiddenActions);
17859
+ const isHidden = (id) => chunkIVCWQLQK_js.isActionHidden(id, hiddenActions);
17763
17860
  const isTabVisible = (id) => !KNOWN_TAB_IDS.has(id) || !isHidden(id);
17764
17861
  return { isHidden, isTabVisible };
17765
17862
  }
@@ -17844,10 +17941,10 @@ function useYjsDocumentSync({
17844
17941
  return;
17845
17942
  }
17846
17943
  try {
17847
- const { PptxHandler: PptxHandler2 } = await import('./dist-NVA3FEUV.js');
17944
+ const { PptxHandler: PptxHandler2 } = await import('./dist-VPE4R4KO.js');
17848
17945
  const handler = new PptxHandler2();
17849
17946
  await handler.load(sourceBytes.buffer);
17850
- const currentSlides = chunk2TOLRBFU_js.readSlidesFromYDoc(
17947
+ const currentSlides = chunkIVCWQLQK_js.readSlidesFromYDoc(
17851
17948
  doc
17852
17949
  );
17853
17950
  const slidesToSave = buildSaveSlides(currentSlides, templateElementsBySlideId);
@@ -17865,7 +17962,7 @@ function useYjsDocumentSync({
17865
17962
  if (!doc || !isConnected) {
17866
17963
  return;
17867
17964
  }
17868
- const docSlides = chunk2TOLRBFU_js.readSlidesFromYDoc(
17965
+ const docSlides = chunkIVCWQLQK_js.readSlidesFromYDoc(
17869
17966
  doc
17870
17967
  );
17871
17968
  if (docSlides.length === 0) {
@@ -17887,11 +17984,11 @@ function useYjsDocumentSync({
17887
17984
  lastSyncedRef.current = serialized;
17888
17985
  void (async () => {
17889
17986
  const factories = await getFactories();
17890
- chunk2TOLRBFU_js.reconcileSlidesInYDoc(
17987
+ chunkIVCWQLQK_js.reconcileSlidesInYDoc(
17891
17988
  slides,
17892
17989
  doc,
17893
17990
  factories,
17894
- chunk2TOLRBFU_js.LOCAL_SYNC_ORIGIN
17991
+ chunkIVCWQLQK_js.LOCAL_SYNC_ORIGIN
17895
17992
  );
17896
17993
  scheduleWriteBack();
17897
17994
  })();
@@ -17905,10 +18002,10 @@ function useYjsDocumentSync({
17905
18002
  return;
17906
18003
  }
17907
18004
  const handleChange = (_events, transaction) => {
17908
- if (transaction?.origin === chunk2TOLRBFU_js.LOCAL_SYNC_ORIGIN) {
18005
+ if (transaction?.origin === chunkIVCWQLQK_js.LOCAL_SYNC_ORIGIN) {
17909
18006
  return;
17910
18007
  }
17911
- const remoteSlides = chunk2TOLRBFU_js.readSlidesFromYDoc(
18008
+ const remoteSlides = chunkIVCWQLQK_js.readSlidesFromYDoc(
17912
18009
  doc
17913
18010
  );
17914
18011
  if (remoteSlides.length === 0) {
@@ -17924,7 +18021,7 @@ function useYjsDocumentSync({
17924
18021
  isApplyingRemoteRef.current = false;
17925
18022
  scheduleWriteBack();
17926
18023
  };
17927
- const unobserve = chunk2TOLRBFU_js.observeYDocSlides(
18024
+ const unobserve = chunkIVCWQLQK_js.observeYDocSlides(
17928
18025
  doc,
17929
18026
  handleChange
17930
18027
  );
@@ -17962,7 +18059,7 @@ function useBroadcastFollower({
17962
18059
  if (!broadcaster) {
17963
18060
  return;
17964
18061
  }
17965
- if (!chunk2TOLRBFU_js.shouldAutoFollowBroadcaster({
18062
+ if (!chunkIVCWQLQK_js.shouldAutoFollowBroadcaster({
17966
18063
  localRole: collab.config.role,
17967
18064
  broadcasterRole: broadcaster.role
17968
18065
  })) {
@@ -18022,7 +18119,7 @@ function useFollowMode({
18022
18119
  return { followedClientId, followUser };
18023
18120
  }
18024
18121
  function useLayoutSwitching(input) {
18025
- const { handler, slides, activeSlideIndex, ops, history } = input;
18122
+ const { handler, slides, activeSlideIndex, ops, history, setTemplateElementsBySlideId } = input;
18026
18123
  const [availableLayouts, setAvailableLayouts] = React4.useState([]);
18027
18124
  const [isLoading, setIsLoading] = React4.useState(false);
18028
18125
  const slidesRef = React4.useRef(slides);
@@ -18060,12 +18157,17 @@ function useLayoutSwitching(input) {
18060
18157
  next[activeSlideIndex] = updated;
18061
18158
  return next;
18062
18159
  });
18160
+ const templateElements = await handler.getTemplateElementsForSlide(updated.id);
18161
+ setTemplateElementsBySlideId((prev) => ({
18162
+ ...prev,
18163
+ [updated.id]: templateElements
18164
+ }));
18063
18165
  history.markDirty();
18064
18166
  } finally {
18065
18167
  setIsLoading(false);
18066
18168
  }
18067
18169
  },
18068
- [handler, activeSlideIndex, ops, history]
18170
+ [handler, activeSlideIndex, ops, history, setTemplateElementsBySlideId]
18069
18171
  );
18070
18172
  return {
18071
18173
  availableLayouts,
@@ -18092,7 +18194,7 @@ function useTouchGestures(input) {
18092
18194
  if (!el || !enabled) {
18093
18195
  return;
18094
18196
  }
18095
- const recognizer = chunk2TOLRBFU_js.createTouchGestureRecognizer({
18197
+ const recognizer = chunkIVCWQLQK_js.createTouchGestureRecognizer({
18096
18198
  getScale: () => scaleRef.current,
18097
18199
  minScale: MIN_ZOOM_SCALE,
18098
18200
  maxScale: MAX_ZOOM_SCALE,
@@ -18135,7 +18237,7 @@ function scrollFocusedIntoView(keyboardInset) {
18135
18237
  return;
18136
18238
  }
18137
18239
  const rect = active.getBoundingClientRect();
18138
- const delta = chunk2TOLRBFU_js.computeScrollDelta(
18240
+ const delta = chunkIVCWQLQK_js.computeScrollDelta(
18139
18241
  { top: rect.top, bottom: rect.bottom },
18140
18242
  window.innerHeight,
18141
18243
  keyboardInset
@@ -18155,8 +18257,8 @@ function useKeyboardInsets(enabled = true) {
18155
18257
  return;
18156
18258
  }
18157
18259
  const update = () => {
18158
- const metrics = chunk2TOLRBFU_js.readViewportMetrics(window);
18159
- const inset = metrics ? chunk2TOLRBFU_js.computeKeyboardInset(metrics) : 0;
18260
+ const metrics = chunkIVCWQLQK_js.readViewportMetrics(window);
18261
+ const inset = metrics ? chunkIVCWQLQK_js.computeKeyboardInset(metrics) : 0;
18160
18262
  setKeyboardInset(inset);
18161
18263
  if (inset > 0) {
18162
18264
  window.requestAnimationFrame(() => scrollFocusedIntoView(inset));
@@ -18167,8 +18269,8 @@ function useKeyboardInsets(enabled = true) {
18167
18269
  vv.addEventListener("scroll", update);
18168
18270
  const onFocusIn = () => {
18169
18271
  window.requestAnimationFrame(() => {
18170
- const metrics = chunk2TOLRBFU_js.readViewportMetrics(window);
18171
- const inset = metrics ? chunk2TOLRBFU_js.computeKeyboardInset(metrics) : 0;
18272
+ const metrics = chunkIVCWQLQK_js.readViewportMetrics(window);
18273
+ const inset = metrics ? chunkIVCWQLQK_js.computeKeyboardInset(metrics) : 0;
18172
18274
  if (inset > 0) {
18173
18275
  scrollFocusedIntoView(inset);
18174
18276
  }
@@ -18181,7 +18283,7 @@ function useKeyboardInsets(enabled = true) {
18181
18283
  document.removeEventListener("focusin", onFocusIn);
18182
18284
  };
18183
18285
  }, [enabled]);
18184
- return { keyboardInset, isKeyboardOpen: chunk2TOLRBFU_js.isKeyboardOpen(keyboardInset) };
18286
+ return { keyboardInset, isKeyboardOpen: chunkIVCWQLQK_js.isKeyboardOpen(keyboardInset) };
18185
18287
  }
18186
18288
 
18187
18289
  // src/viewer/hooks/useViewerBuildingBlocks-canvas-props.ts
@@ -18236,13 +18338,13 @@ function buildCanvasProps(input) {
18236
18338
  if (mode === "present") {
18237
18339
  presentation.handlePresentationAction(action);
18238
18340
  } else if (action.url) {
18239
- chunk2TOLRBFU_js.safeOpenUrl(action.url);
18341
+ chunkIVCWQLQK_js.safeOpenUrl(action.url);
18240
18342
  }
18241
18343
  };
18242
18344
  const handleHyperlinkClick = (url) => {
18243
- if (chunk2TOLRBFU_js.isPpactionUrl(url)) {
18345
+ if (chunkIVCWQLQK_js.isPpactionUrl(url)) {
18244
18346
  if (mode === "present") {
18245
- const parsed = chunk2TOLRBFU_js.parsePpactionUrl(url);
18347
+ const parsed = chunkIVCWQLQK_js.parsePpactionUrl(url);
18246
18348
  if (parsed) {
18247
18349
  presentation.handlePresentationAction({
18248
18350
  action: parsed.action,
@@ -18252,7 +18354,7 @@ function buildCanvasProps(input) {
18252
18354
  }
18253
18355
  return;
18254
18356
  }
18255
- chunk2TOLRBFU_js.safeOpenUrl(url);
18357
+ chunkIVCWQLQK_js.safeOpenUrl(url);
18256
18358
  };
18257
18359
  return {
18258
18360
  activeSlide: effectiveSlide,
@@ -18572,7 +18674,7 @@ function buildToolbarProps(input) {
18572
18674
  onOpenFile,
18573
18675
  onOpenRecentFile,
18574
18676
  onCreatePresentation: (templateId) => {
18575
- s.setSlides(chunk2TOLRBFU_js.createBackstagePresentation(templateId));
18677
+ s.setSlides(chunkIVCWQLQK_js.createBackstagePresentation(templateId));
18576
18678
  s.setActiveSlideIndex(0);
18577
18679
  s.setSelectedElementId(null);
18578
18680
  s.setSelectedElementIds([]);
@@ -18627,7 +18729,7 @@ function buildToolbarProps(input) {
18627
18729
  isCommentsPanelOpen: s.isInspectorPaneOpen,
18628
18730
  slideCommentCount: activeSlide?.comments?.length ?? 0,
18629
18731
  formatPainterActive: s.formatPainterActive,
18630
- canActivateFormatPainter: chunk2TOLRBFU_js.hasCopyableFormat(selectedElement),
18732
+ canActivateFormatPainter: chunkIVCWQLQK_js.hasCopyableFormat(selectedElement),
18631
18733
  onToggleFormatPainter: () => s.setFormatPainterActive((p) => !p),
18632
18734
  isSelectionPaneOpen: s.isSelectionPaneOpen,
18633
18735
  onToggleSelectionPane: () => s.setIsSelectionPaneOpen((p) => !p),
@@ -18890,7 +18992,7 @@ function useViewerBuildingBlocks(input) {
18890
18992
  }, [incomingContent]);
18891
18993
  const onOpenFile = React4.useCallback(() => {
18892
18994
  void (async () => {
18893
- const picked = await chunk2TOLRBFU_js.openPptxFile();
18995
+ const picked = await chunkIVCWQLQK_js.openPptxFile();
18894
18996
  if (picked) {
18895
18997
  setContent(picked.buffer);
18896
18998
  }
@@ -18898,7 +19000,7 @@ function useViewerBuildingBlocks(input) {
18898
19000
  }, []);
18899
19001
  const onOpenRecentFile = React4.useCallback((key) => {
18900
19002
  void (async () => {
18901
- const bytes = await chunk2TOLRBFU_js.readBackstageRecentFile(key);
19003
+ const bytes = await chunkIVCWQLQK_js.readBackstageRecentFile(key);
18902
19004
  if (bytes) {
18903
19005
  setContent(bytes);
18904
19006
  }
@@ -19094,6 +19196,7 @@ exports.chevronPoints = chevronPoints;
19094
19196
  exports.cn = cn;
19095
19197
  exports.colour = colour;
19096
19198
  exports.computeToolbarVisibility = computeToolbarVisibility;
19199
+ exports.contrastingTextColor = contrastingTextColor;
19097
19200
  exports.detectTargetType = detectTargetType;
19098
19201
  exports.fitFontSize = fitFontSize;
19099
19202
  exports.gearPath = gearPath;