pptx-react-viewer 3.8.0 → 3.9.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (176) hide show
  1. package/CHANGELOG.md +8 -0
  2. package/dist/{AiChatPanel-XLQM4BQJ.js → AiChatPanel-3A42W7RW.js} +25 -25
  3. package/dist/AiChatPanel-3A42W7RW.js.br +0 -0
  4. package/dist/AiChatPanel-3A42W7RW.js.gz +0 -0
  5. package/dist/{AiChatPanel-A5DCEHTO.mjs → AiChatPanel-II6VOOAL.mjs} +4 -4
  6. package/dist/AiChatPanel-II6VOOAL.mjs.br +0 -0
  7. package/dist/AiChatPanel-II6VOOAL.mjs.gz +0 -0
  8. package/dist/{Area3DChartScene-5CMEMIBI.mjs → Area3DChartScene-JM3CQ3WQ.mjs} +21 -4
  9. package/dist/Area3DChartScene-JM3CQ3WQ.mjs.br +0 -0
  10. package/dist/Area3DChartScene-JM3CQ3WQ.mjs.gz +0 -0
  11. package/dist/{Area3DChartScene-RZ3V3WOR.js → Area3DChartScene-XJK4ZA4R.js} +21 -4
  12. package/dist/Area3DChartScene-XJK4ZA4R.js.br +0 -0
  13. package/dist/Area3DChartScene-XJK4ZA4R.js.gz +0 -0
  14. package/dist/{Bar3DChartScene-KHCQ6TEC.js → Bar3DChartScene-RGRZY5P6.js} +21 -4
  15. package/dist/Bar3DChartScene-RGRZY5P6.js.br +0 -0
  16. package/dist/Bar3DChartScene-RGRZY5P6.js.gz +0 -0
  17. package/dist/{Bar3DChartScene-H3MYUJKV.mjs → Bar3DChartScene-VNFWI2QG.mjs} +21 -4
  18. package/dist/Bar3DChartScene-VNFWI2QG.mjs.br +0 -0
  19. package/dist/Bar3DChartScene-VNFWI2QG.mjs.gz +0 -0
  20. package/dist/{Line3DChartScene-YFRPJHDX.mjs → Line3DChartScene-GXOWGIFJ.mjs} +21 -4
  21. package/dist/Line3DChartScene-GXOWGIFJ.mjs.br +0 -0
  22. package/dist/Line3DChartScene-GXOWGIFJ.mjs.gz +0 -0
  23. package/dist/{Line3DChartScene-QEACF3U3.js → Line3DChartScene-MEY42DBF.js} +21 -4
  24. package/dist/Line3DChartScene-MEY42DBF.js.br +0 -0
  25. package/dist/Line3DChartScene-MEY42DBF.js.gz +0 -0
  26. package/dist/{Model3DScene-QQWKGJ3T.js → Model3DScene-MWXTGHDM.js} +2 -2
  27. package/dist/Model3DScene-MWXTGHDM.js.br +0 -0
  28. package/dist/Model3DScene-MWXTGHDM.js.gz +0 -0
  29. package/dist/{Model3DScene-O24KP723.mjs → Model3DScene-WJ3MMIZH.mjs} +1 -1
  30. package/dist/Model3DScene-WJ3MMIZH.mjs.br +0 -0
  31. package/dist/Model3DScene-WJ3MMIZH.mjs.gz +0 -0
  32. package/dist/{PieChart3DScene-L3MHKQHW.js → PieChart3DScene-FJJGOQIS.js} +15 -4
  33. package/dist/PieChart3DScene-FJJGOQIS.js.br +0 -0
  34. package/dist/PieChart3DScene-FJJGOQIS.js.gz +0 -0
  35. package/dist/{PieChart3DScene-CI6CW22C.mjs → PieChart3DScene-WXJEDYMK.mjs} +15 -4
  36. package/dist/PieChart3DScene-WXJEDYMK.mjs.br +0 -0
  37. package/dist/PieChart3DScene-WXJEDYMK.mjs.gz +0 -0
  38. package/dist/{SmartArt3DScene-ZO3KFDI2.js → SmartArt3DScene-BK7QN3WT.js} +85 -23
  39. package/dist/SmartArt3DScene-BK7QN3WT.js.br +0 -0
  40. package/dist/SmartArt3DScene-BK7QN3WT.js.gz +0 -0
  41. package/dist/{SmartArt3DScene-XCFVGCXE.mjs → SmartArt3DScene-ODKCGJBO.mjs} +85 -23
  42. package/dist/SmartArt3DScene-ODKCGJBO.mjs.br +0 -0
  43. package/dist/SmartArt3DScene-ODKCGJBO.mjs.gz +0 -0
  44. package/dist/{SurfaceChart3DScene-JUXRC3K2.mjs → SurfaceChart3DScene-IKPE2SVE.mjs} +19 -4
  45. package/dist/SurfaceChart3DScene-IKPE2SVE.mjs.br +0 -0
  46. package/dist/SurfaceChart3DScene-IKPE2SVE.mjs.gz +0 -0
  47. package/dist/{SurfaceChart3DScene-5IER6VFW.js → SurfaceChart3DScene-VDK3F224.js} +19 -4
  48. package/dist/SurfaceChart3DScene-VDK3F224.js.br +0 -0
  49. package/dist/SurfaceChart3DScene-VDK3F224.js.gz +0 -0
  50. package/dist/{chunk-4222CHFH.js → chunk-3NIJ5HIZ.js} +3187 -2514
  51. package/dist/chunk-3NIJ5HIZ.js.br +0 -0
  52. package/dist/chunk-3NIJ5HIZ.js.gz +0 -0
  53. package/dist/{chunk-RNP5HP4L.mjs → chunk-3Y63XPIN.mjs} +1 -1
  54. package/dist/chunk-3Y63XPIN.mjs.br +0 -0
  55. package/dist/{chunk-RNP5HP4L.mjs.gz → chunk-3Y63XPIN.mjs.gz} +0 -0
  56. package/dist/{chunk-DE3S3UHX.js → chunk-5CPGDXD6.js} +518 -442
  57. package/dist/chunk-5CPGDXD6.js.br +0 -0
  58. package/dist/chunk-5CPGDXD6.js.gz +0 -0
  59. package/dist/{chunk-PFPKBNNZ.mjs → chunk-76Z3X6JX.mjs} +1189 -516
  60. package/dist/chunk-76Z3X6JX.mjs.br +0 -0
  61. package/dist/chunk-76Z3X6JX.mjs.gz +0 -0
  62. package/dist/chunk-DNR6CH6I.js +30 -0
  63. package/dist/chunk-DNR6CH6I.js.br +0 -0
  64. package/dist/chunk-DNR6CH6I.js.gz +0 -0
  65. package/dist/{chunk-SN5EUDIT.js → chunk-G3JPCRKN.js} +13644 -7350
  66. package/dist/chunk-G3JPCRKN.js.br +0 -0
  67. package/dist/chunk-G3JPCRKN.js.gz +0 -0
  68. package/dist/{chunk-FRZIBZTE.mjs → chunk-JBSAKP4Z.mjs} +15 -0
  69. package/dist/chunk-JBSAKP4Z.mjs.br +0 -0
  70. package/dist/{chunk-FRZIBZTE.mjs.gz → chunk-JBSAKP4Z.mjs.gz} +0 -0
  71. package/dist/{chunk-F5NPGNMA.js → chunk-K6Q6KLA6.js} +5 -5
  72. package/dist/chunk-K6Q6KLA6.js.br +0 -0
  73. package/dist/chunk-K6Q6KLA6.js.gz +0 -0
  74. package/dist/{chunk-QWA5YEIZ.js → chunk-LBJAVP3H.js} +194 -178
  75. package/dist/chunk-LBJAVP3H.js.br +0 -0
  76. package/dist/chunk-LBJAVP3H.js.gz +0 -0
  77. package/dist/{chunk-RHWQKZLB.mjs → chunk-NTWFXLZX.mjs} +23 -7
  78. package/dist/chunk-NTWFXLZX.mjs.br +0 -0
  79. package/dist/chunk-NTWFXLZX.mjs.gz +0 -0
  80. package/dist/{chunk-UPJW34YG.mjs → chunk-PCCM7NVY.mjs} +85 -9
  81. package/dist/chunk-PCCM7NVY.mjs.br +0 -0
  82. package/dist/chunk-PCCM7NVY.mjs.gz +0 -0
  83. package/dist/chunk-T6GFCLSM.mjs +27 -0
  84. package/dist/chunk-T6GFCLSM.mjs.br +4 -0
  85. package/dist/chunk-T6GFCLSM.mjs.gz +0 -0
  86. package/dist/{chunk-L3ZIBQEB.js → chunk-TEVGDXVW.js} +15 -0
  87. package/dist/chunk-TEVGDXVW.js.br +0 -0
  88. package/dist/{chunk-L3ZIBQEB.js.gz → chunk-TEVGDXVW.js.gz} +0 -0
  89. package/dist/{chunk-6IMB5DNJ.mjs → chunk-VQX7G75Z.mjs} +13621 -7340
  90. package/dist/chunk-VQX7G75Z.mjs.br +0 -0
  91. package/dist/chunk-VQX7G75Z.mjs.gz +0 -0
  92. package/dist/i18n.js +4 -4
  93. package/dist/i18n.js.br +0 -0
  94. package/dist/i18n.js.gz +0 -0
  95. package/dist/i18n.mjs +1 -1
  96. package/dist/i18n.mjs.br +0 -0
  97. package/dist/i18n.mjs.gz +0 -0
  98. package/dist/index.d.ts +388 -80
  99. package/dist/index.js +47 -47
  100. package/dist/index.js.br +0 -0
  101. package/dist/index.js.gz +0 -0
  102. package/dist/index.mjs +6 -6
  103. package/dist/index.mjs.br +0 -0
  104. package/dist/index.mjs.gz +0 -0
  105. package/dist/internals.d.ts +445 -81
  106. package/dist/internals.d.ts.map +1 -1
  107. package/dist/internals.js +79 -79
  108. package/dist/internals.js.br +0 -0
  109. package/dist/internals.js.gz +0 -0
  110. package/dist/internals.mjs +4 -4
  111. package/dist/internals.mjs.br +0 -0
  112. package/dist/internals.mjs.gz +0 -0
  113. package/dist/pptx-viewer.css +1 -1
  114. package/dist/pptx-viewer.css.br +0 -0
  115. package/dist/pptx-viewer.css.gz +0 -0
  116. package/dist/viewer/index.d.ts +338 -43
  117. package/dist/viewer/index.js +27 -27
  118. package/dist/viewer/index.js.br +0 -0
  119. package/dist/viewer/index.js.gz +0 -0
  120. package/dist/viewer/index.mjs +6 -6
  121. package/dist/viewer/index.mjs.br +0 -0
  122. package/dist/viewer/index.mjs.gz +0 -0
  123. package/package.json +2 -2
  124. package/dist/AiChatPanel-A5DCEHTO.mjs.br +0 -0
  125. package/dist/AiChatPanel-A5DCEHTO.mjs.gz +0 -0
  126. package/dist/AiChatPanel-XLQM4BQJ.js.br +0 -0
  127. package/dist/AiChatPanel-XLQM4BQJ.js.gz +0 -0
  128. package/dist/Area3DChartScene-5CMEMIBI.mjs.br +0 -0
  129. package/dist/Area3DChartScene-5CMEMIBI.mjs.gz +0 -0
  130. package/dist/Area3DChartScene-RZ3V3WOR.js.br +0 -0
  131. package/dist/Area3DChartScene-RZ3V3WOR.js.gz +0 -0
  132. package/dist/Bar3DChartScene-H3MYUJKV.mjs.br +0 -0
  133. package/dist/Bar3DChartScene-H3MYUJKV.mjs.gz +0 -0
  134. package/dist/Bar3DChartScene-KHCQ6TEC.js.br +0 -0
  135. package/dist/Bar3DChartScene-KHCQ6TEC.js.gz +0 -0
  136. package/dist/Line3DChartScene-QEACF3U3.js.br +0 -0
  137. package/dist/Line3DChartScene-QEACF3U3.js.gz +0 -0
  138. package/dist/Line3DChartScene-YFRPJHDX.mjs.br +0 -0
  139. package/dist/Line3DChartScene-YFRPJHDX.mjs.gz +0 -0
  140. package/dist/Model3DScene-O24KP723.mjs.br +0 -0
  141. package/dist/Model3DScene-O24KP723.mjs.gz +0 -0
  142. package/dist/Model3DScene-QQWKGJ3T.js.br +0 -0
  143. package/dist/Model3DScene-QQWKGJ3T.js.gz +0 -0
  144. package/dist/PieChart3DScene-CI6CW22C.mjs.br +0 -0
  145. package/dist/PieChart3DScene-CI6CW22C.mjs.gz +0 -0
  146. package/dist/PieChart3DScene-L3MHKQHW.js.br +0 -0
  147. package/dist/PieChart3DScene-L3MHKQHW.js.gz +0 -0
  148. package/dist/SmartArt3DScene-XCFVGCXE.mjs.br +0 -0
  149. package/dist/SmartArt3DScene-XCFVGCXE.mjs.gz +0 -0
  150. package/dist/SmartArt3DScene-ZO3KFDI2.js.br +0 -0
  151. package/dist/SmartArt3DScene-ZO3KFDI2.js.gz +0 -0
  152. package/dist/SurfaceChart3DScene-5IER6VFW.js.br +0 -0
  153. package/dist/SurfaceChart3DScene-5IER6VFW.js.gz +0 -0
  154. package/dist/SurfaceChart3DScene-JUXRC3K2.mjs.br +0 -0
  155. package/dist/SurfaceChart3DScene-JUXRC3K2.mjs.gz +0 -0
  156. package/dist/chunk-4222CHFH.js.br +0 -0
  157. package/dist/chunk-4222CHFH.js.gz +0 -0
  158. package/dist/chunk-6IMB5DNJ.mjs.br +0 -0
  159. package/dist/chunk-6IMB5DNJ.mjs.gz +0 -0
  160. package/dist/chunk-DE3S3UHX.js.br +0 -0
  161. package/dist/chunk-DE3S3UHX.js.gz +0 -0
  162. package/dist/chunk-F5NPGNMA.js.br +0 -0
  163. package/dist/chunk-F5NPGNMA.js.gz +0 -0
  164. package/dist/chunk-FRZIBZTE.mjs.br +0 -0
  165. package/dist/chunk-L3ZIBQEB.js.br +0 -0
  166. package/dist/chunk-PFPKBNNZ.mjs.br +0 -0
  167. package/dist/chunk-PFPKBNNZ.mjs.gz +0 -0
  168. package/dist/chunk-QWA5YEIZ.js.br +0 -0
  169. package/dist/chunk-QWA5YEIZ.js.gz +0 -0
  170. package/dist/chunk-RHWQKZLB.mjs.br +0 -0
  171. package/dist/chunk-RHWQKZLB.mjs.gz +0 -0
  172. package/dist/chunk-RNP5HP4L.mjs.br +0 -0
  173. package/dist/chunk-SN5EUDIT.js.br +0 -0
  174. package/dist/chunk-SN5EUDIT.js.gz +0 -0
  175. package/dist/chunk-UPJW34YG.mjs.br +0 -0
  176. package/dist/chunk-UPJW34YG.mjs.gz +0 -0
@@ -1,9 +1,9 @@
1
- import { computeFocusTargets, deckDataFieldChanged, aiChangeAnimationCss, changeGhostStyle, createChatHistoryStore, collectStoredChats, exportAiChatLogs, applyElementUpdate } from './chunk-RNP5HP4L.mjs';
2
- import { useViewerOptions, useReadOnlyRecommendationState, useCompatibilityToastsState, useReducedMotion, useViewerState, useIsMobile, useResizablePanels, useDerivedSlideState, useZoomViewport, useEditorHistory, usePresentationSetup, useTouchGestures, useViewerDialogs, useEditorOperations, useViewerIntegration, useViewPreferencesSync, useLayoutSwitching, ViewerOptionsContext, useYjsDocumentSync, useCollaborationLivePatch, useFollowMode, useBroadcastFollower, safePrompt, scopeLayoutOptionsToActiveSlide, useToolbarVisibility, useKeyboardInsets, useModalDismissDrag, useCollaborativeState, useViewerOptionsContext, useVirtualizedSlides, useSwipeNavigation, useSheetDismissDrag, detectTargetType, parseEmailUrl, parseSlideFromUrl, ACTION_VERB_MAP, syncSelectionHandleOverlay } from './chunk-UPJW34YG.mjs';
3
- import { MIN_ELEMENT_SIZE, DEFAULT_STROKE_COLOR, getConnectorPathGeometry, buildLineShadowCss, buildLineGlowFilter, renderConnectorMarker, getShapeVisualStyle, getTextStyleForElement, DEFAULT_TEXT_COLOR, renderVectorShape, isConnectorOrLineElement, build3DExtrusionData, getImageRenderStyle, cn, getImageSurfaceStyle, getTextLayoutStyle, renderTableElement, renderMediaElement, shouldRenderFallbackLabel, SHAPE_PRESETS, ANIMATION_PRESET_OPTIONS, DEFAULT_FILL_COLOR, hasDagDuotoneEffect, renderDagDuotoneSvgFilter, getImageSurfaceMaskStyle, getCropShapeClipPath, getImageTilingStyle, getDuotoneColors, getTextWarpStyle, renderTextSegments, buildReactChartViewModel, renderChartElement, buildTextBody3DSceneStyle, SLIDE_NAV_THUMBNAIL_WIDTH, DEFAULT_TEXT_FONT_SIZE, DEFAULT_FONT_FAMILY, TOOLBAR_SECTIONS, DEFAULT_SECTION_GROUP_ID, SHORTCUT_REFERENCE_ITEMS as SHORTCUT_REFERENCE_ITEMS$1, HYPERLINK_COLOR, GRID_SIZE, CONNECTOR_ARROW_OPTIONS, ARROW_SIZE_OPTIONS, startMotionPathPreview, startPreviewAnimation, stopPreviewAnimation, STROKE_DASH_OPTIONS } from './chunk-RHWQKZLB.mjs';
4
- import { hasShapeProperties, normalizeHexColor, colorWithOpacity, normalizeStrokeDashType, getSvgStrokeDasharray, getCompoundLineOffsets, getCompoundLineWidths, svgLineCap, hasTextProperties, connectorWrapperTransform, getAriaRoleDescription, getAriaLabel, getAriaRole, resolveElementInteractivity, isEditableTextElement, buildTextStyleOverrideCss, isElementRendered, resolveElementAriaAttributes, getImageEffectsOpacity, getImageEffectsFilter, inlineElementPointerEvents, isHollowShapeElement, LINK_TOOLTIP_HOST_CLASS, ACTION_BUTTON_PRESETS, mediaTransportVisible, isInkElement, getGroupChildParentFill, getElementLabel, SWITCHABLE_LAYOUT_TYPES, compileEquationTemplateMathMl, buildUserFontFaceStyles, readStoredViewerPrefs, resolveThemeCatalogEntry, THEME_CATALOG, writeStoredViewerPrefs, openPptxFile, readBackstageRecentFile, resolveAutosaveActivation, buildThemeColorMap, viewerOptionsToPreferences, applyPreferenceToOptions, listAutosaveSnapshots, deleteAutosaveSnapshot, resolveExpiredAutosaveSnapshots, resolveHistoryDepth, applyAutoCorrect, resolveImageResolutionScale, resolveAutosaveIntervalMs, resolveAutosaveIntervalSeconds, shouldShowAutosaveRecoveryPrompt, resolveOptionRootClasses, resolve3DRenderingFlags, resolveSlideSizeSelection, buildDeckSaveOptions, paintedStrokeWidth, buildCssGradientFromShapeStyle, ensureActionAffordanceStyles, resolveElementActionAffordance, actionAffordanceLabels, resolveElementHighlightClick, applyHighlightClickStyle, getComputedEffectStyle, getSoftEdgeSvgFilter, buildStrokeOutline, buildHollowHitOutline, buildSubpathFillOverlay, isImageLikeElement, getComputedFillStyle, strokeOutlineViewBox, getElementTransform, resolveRevealedSmartArtNodes, resolveRevealedDrawingShapes, buildSmartArtA11y, canDrillDown, computeSmartArtElementLayout, flattenNodes, buildSummaryZoomView, isImageTiled, getImageColorWashStyle, readEditableText, placeCaretAtEnd, getPendingSelectionRestore, restoreSegmentSelection, getTextCompensationTransform, resolveChartKind, ensureChartInteractionStyles, applyChartPartHighlight, resolveRevealedChartData, formatAxisValue, hasPressureVariation, getInkReplayStyles, INK_REPLAY_KEYFRAMES, resolveInkColor, resolveInkWidth, resolveInkOpacity, pressuresToWidths, getContentPartReplayStyles, resolveOleType, getOleAriaLabel, getOleTypeColor, getOleTypeLabel, filterRenderedElements, resolveGroupChildFill, isLinkedTextBox, getOverflowSegments, shouldUseSvgWarp, getTextBodyRotationTransform, placeholderPromptDescriptor, isWedgeCalloutPresetShape, isElementActionable, RULER_THICKNESS, RULER_FONT_SIZE, buildPreviewElements, deriveSlideFieldContext, SLIDE_TRANSITION_OPTIONS, hiddenSlideCue, HIDDEN_SLIDE_SLASH_GRADIENT, HIDDEN_SLIDE_LABEL_KEY, visibleTemplateElements, themeToCssVars, shouldClearAutosaveCacheOnClose, masterViewCrudActions, applyMasterViewCrudAction, masterViewCrudFailureKey, applyMotionPathPreset, resetSlideLayoutPath, DEFAULT_INSERT_CHART_KIND, hasCopyableFormat, templateSchemeFromTheme, createBackstagePresentation, playFeedbackSound, shouldDiscardAutosaveOnSuccessfulSave, setMasterViewBackgroundColor, compatToastStackStyle, printPropertiesFrameSlides, printPropertiesSlidesPerPage, VIEWER_OPTIONS_TABS, DEFAULT_QUICK_ACCESS_COMMAND_IDS, isHeaderFooterDateTextVisible, isHeaderFooterHeaderTextVisible, isHeaderFooterFooterTextVisible, buildJoinCollaborationConfig, buildCreateCollaborationConfig, generateBroadcastRoomId, DEFAULT_BROADCAST_SERVER_URL, buildBroadcastViewerUrl, resolveTransportForServerUrl, elementIdSelector, ACTION_INDICATOR_CLASS, ACTION_INDICATOR_ICON_PATH, LINK_TOOLTIP_CLASS, LINK_TOOLTIP_PANEL_CLASS, LINK_TOOLTIP_LABEL_CLASS, LINK_TOOLTIP_HINT_CLASS, DEFAULT_PALETTE2, resolvePalette, computeDrawingViewBox, projectDrawingShapes, resolveRevealedDrawingShapeNodeIds, styleShadowFilter, buildChromeStyle, modelDataToBlobUrl, getImageSvgFilters, buildDuotoneCacheKey, getDuotoneCachedResult, applyDuotone, setDuotoneCachedResult, buildCacheKey, DEFAULT_COLOR_CHANGE_TOLERANCE, getCachedResult, applyColorChange, setCachedResult, getInlineEditorSelection, findChartPartTarget, advanceChartMarkDrag, advanceChartValueDrag, buildChartMarkDragGeometry, beginChartMarkDrag, beginChartValueDrag, buildSurfaceChart3DDataForElement, buildBarChart3DDataForElement, buildLineChart3DDataForElement, buildAreaChart3DDataForElement, buildPieChart3DDataForElement, withChartTitle, buildSmartArt3DModel, collectCoherent3DOffNodeIds, extractPathPoints, generatePressureCircles, generateNibMarks, isBrowserOpenableMime, formatBytes, getOleDisplayName, getOleBadgeLabel, openUrlInNewTab, getSubstituteFontFamily, getWarpPath, getSlideBackgroundStyle, pushRecentColor, mruColorsPatch, filterCommands, resolveTitleBarStatusKey, TITLE_BAR_CLASSES, TITLE_BAR_DEFAULT_FILE_KEY, resolveScreenTip, masterViewBackgroundColor, buildFieldSubstitutionContext, shouldConfirmExternalHyperlink, safeOpenUrl, resolvePresentationAction, isPpactionUrl, parsePpactionUrl, isPresentationAdvanceClick, toggleBlackboard, PRESENT_TOOLBAR_CLASSES, buildContextMenuEntries, themeColorSchemesEqual, EXPANDED_MAX_HEIGHT, STATUS_BAR_CLASSES, buildBarActions, formatVersionTimestamp, formatRelativeTime, scanAvailableFontFamilies, PRESETS, CATEGORIES, convertOmmlToLatex, compileLatexEquation, convertLatexToOmml, EQUATION_TEMPLATES, clampPercent2, resolveDefaultPrintSettings, HANDOUT_OPTIONS, TOOLBAR_TABS, SHORTCUT_REFERENCE_ITEMS, resolveViewerAddinRows, availableQuickAccessCommands, addQuickAccessCommand, removeQuickAccessCommand, moveQuickAccessCommand, CUSTOM_FONT_ACCEPT, activateModalFocus, buildCollaborationShareUrl, buildActiveSessionUsers, SORTER_MIN_ZOOM, SORTER_ZOOM_STEP, SORTER_MAX_ZOOM, canGoPrevious, formatSlideCounter, READING_VIEW_COUNTER_ATTR, canGoNext, READING_VIEW_ATTR, OUTLINE_LEVEL_ATTR, OUTLINE_SLIDE_ATTR, OUTLINE_ROW_ATTR, OUTLINE_VIEW_ATTR, mobileElapsedSince, nextPresentedSlide, presenterPrevDisabled, presenterNextDisabled, formatMobileElapsed, mobileSlideCounter, presenterPaneAdvancesOnClick, presenterTimerProgress, PRESENTER_CONSOLE_CLASSES, formatElapsed, centeredSvgTextLines, computeInlineEditorRect, findSmartArtNodeText, setSmartArtNodeStyle, rebuildDrawingShapesIfCleared, shouldCommitSmartArtNodeText, updateSmartArtNodeText, groupIntoParagraphs, substituteFieldText, extraQuickAccessCommands, TAB_ROW_ACTION_CLASSES, listBackstageRecentFiles, BACKSTAGE_NAV, COMMON_FONT_SIZES, textFontSizePtToPx, INSERT_CHART_TYPES, CHARACTER_SPACING_OPTIONS, OFFICE_COLOR_SWATCHES, shapeFillChange, shapeOutlineChange, readRibbonTransitionDraft, ribbonTransitionUpdates, readSoundFileAsDataUrl, applyTransitionSoundFile, playSlideTransitionPreview, RIBBON_TRANSITION_PRESETS, transitionSoundOptions, transitionSoundSelectedValue, DEFAULT_MOTION_PATH_PRESET_ID, SLIDE_SHOW_OPTIONS, slideShowOptionChange, readSlideShowOption, SLIDE_VIRTUALIZATION_THRESHOLD, PRESENTATION_HIT_TEST_CSS, PRESENTATION_STAGE_ATTRIBUTE, getSlideTransitionAnimations, MORPH_CROSSFADE_GROUP_STYLE, MORPH_CROSSFADE_HALF_STYLE, SLIDE_TRANSITION_KEYFRAMES, buildStrokePathD, cursorForTool, annotationOverlayZIndex, presentationInkPath, resolveNotesSchematicBodyFontSizePx, motionPathFor, setMotionPath, getShapeAdjustmentHandleDescriptors, shouldShowElementHandles, PRESENTER_NAVIGATOR_LABEL_KEYS, PEN_COLORS, HIGHLIGHTER_COLORS, isBlackboardActive, scaleSlidesForSizeChange, slideSizeToCanvasPx, resolveSelectionPaneRename, PRESET_THEMES, resolveNotesSegments, segmentsToEditorHtml, DEBOUNCE_MS, createPlainNotesSegments, parseSegmentsFromRichEditor, segmentsToPlainText, getCurrentParagraphIndex, segmentsToParagraphs, paragraphsToSegments, MAX_INDENT_LEVEL, INDENT_PX, isUrlSafe, buildNotesPrintHtml, toggleSheet, SMARTART_PREVIEW_ELEMENT_HEIGHT, SMARTART_PREVIEW_ELEMENT_WIDTH, buildSmartArtPreviewElement, sanitizeMathMl, computeHandoutLayout, getPrintableArea, generateNoteLineCount, computeAllNotesPages, getNotesPrintableArea, downloadBlob, clampOptionNumber, QUICK_ACCESS_COMMAND_CATALOG, registerCustomFont, openReadingView, applyReadingViewCommand, createPresentationKeyBuffer, readingViewFitScale, READING_VIEW_STAGE_ATTR, buildOutline, applyOutlineEdit, mapOutlineKey, notesSegmentsToSpans, erasePresentationInkAt, movePresenterPointer, appendPresentationInkPoint, PRESENTER_CONSOLE_CONTROLS, NOTES_FONT_SIZE_DEFAULT, formatTime, NOTES_FONT_SIZE_MIN, clampNotesFontSize, NOTES_FONT_SIZE_STEP, NOTES_FONT_SIZE_MAX, BACKSTAGE_TEMPLATES, formatBackstageDate, formatBackstageSize, backstageCardsFor, DEFAULT_VIEWER_PROFILE, resolveProfileInitial, AVATAR_COLOR_SWATCHES, resolveDefaultFontFamily, textFontSizePxToPt, buildFontCatalog, buildThemeColorSwatchGrid, themeColorSwatchRows, findSelectedThemeSwatch, themeSwatchCommit, RIBBON_SHAPE_SWATCHES, canGroupSelection, canUngroupSelection, canSetStrokeWidth, strokeWidthOf, TRANSITION_SOUND_OTHER_VALUE, TRANSITION_SOUND_NONE_VALUE, clearTransitionSound, ENTRANCE_PRESET_VALUES, EMPHASIS_PRESET_VALUES, EXIT_PRESET_VALUES, MOTION_PATH_FAMILIES, motionPathFamilyLabelKey, motionPathPresetsByFamily, motionPathPresetLabelKey, masterViewPseudoSlide, authorConnectorBetweenSites, findEraserHitElementId, generateTicks, rulerDragToGuidePosition, getElementTransformWithoutRotation, getActiveXControlOverlayView, buildCommentMarkers, COMMENT_MARKER_SIZE, collectConnectorSiteCandidates, getConnectorEndpointHandles, findConnectorSiteNear, motionPathToSvgD, motionPathEndPixel, isEditableMotionPath, setMotionPathEnd, applyTableStyleDelete, applyTableStyleMapChange, themeColorLabel, buildThemeColorGrid, THEME_COLOR_SCHEME_KEYS, COMMON_FONTS, handleReadingViewKey, getLocalStorageUsageSummary, saveViewerProfile, clearAllLocalViewerData, isCurrentLayout, SLIDE_TEMPLATES, computeAnchoredPopupPosition, CONNECTOR_SITE_SNAP_PX, resolveConnectorEndpointUpdate, withConnectorEndpointUpdate, getShapeConnectionSites, isElementLocked, mergeSlideTransition, mapSlideSorterKey, isEditorTextInputTarget, clampSorterZoom, buildLayoutPreviewGeometry, buildSlideTemplateContent, elementLockTogglePatch, buildTableDataGrid, appendTableElementRow, removeLastTableElementRow, appendTableElementColumn, removeLastTableElementColumn, removeTableElementColumn, removeTableElementRow, setTableElementCellText, TABLE_STYLE_PRESETS, applyTableStylePreset, tableStyleAssignmentUpdate, evenColumnWidths, redistributeColumnWidth, evenRowHeights, patchChartData, collapseChartTitleRunsForEdit, chartGridlinesState, chartGridlinesPatch, seriesSecondaryAxisPatch, setChartCategoryLabel, setChartCellValue, addChartCategory, removeChartCategory, addChartSeries, removeChartSeries, setChartAxisLogScale, setChartAxisTitleStyle, setChartAxisGridlineStyle, setChartSeriesMarker, setChartSeriesChartType, setChartDataPointFill, setChartDataPointExplosion, setChartDataPointMarker, setChartDataPointLabel, describeSmartArtBounds, canAddTopLevelNode, classifyExtraConnections, siblingIndex, siblingCount, canRemoveTopLevelNode, canInteractWithElement, buildOleObjectNamePatch, getOleObjectTypeLabel, sanitizeGradientStops, pptxActionToElementAction, withFrameSlides, withSlidesPerPage, applyThemeOverrideToSlide, COLOR_MAP_ALIAS_KEYS, DEFAULT_COLOR_MAP, schemaLabel, THEME_COLOR_SLOT_LABEL_KEYS, SLIDE_SIZE_PRESETS, TRANSITION_VALID_DIRECTIONS, TRANSITION_ORIENTATION_TYPES, clampTransitionNumber, TRANSITION_SPEED_OPTIONS, TRANSITION_MORPH_OPTIONS, flattenTagCollections, resolveTemplateBackgroundRows, formatCommentTimestamp, commentMentionQuery, matchCommentMentionAuthors, buildAnimationTimelineRows, clearMotionPath, getEffectSoundState, setEffectSound, setAfterAnimation, setAfterAnimationColor, DIRECTIONAL_PRESETS, buildAnimationTimelineBars, motionPathPresetIdForPath, normalizeTableStyleGuid, describeTableStyleEditor, TABLE_STYLE_EDITOR_PARTS, computeMergeCellRight, computeMergeCellDown, computeSplitCell, CHART_TYPE_OPTIONS, BAR3D_SHAPE_OPTIONS, bar3DShapePatch, RADAR_STYLE_OPTIONS, radarStylePatch, SURFACE_WIREFRAME_OPTIONS, surfaceWireframePatch, isSeriesUsingSecondaryAxis, listChartUserShapeDescriptors, withChartUserShapeAdded, createDefaultChartUserShape, withChartUserShapeRemoved, withChartUserShapeUpdated, SMARTART_COLOR_SCHEME_LABEL_KEYS, SMARTART_STYLE_LABEL_KEYS, addSmartArtNodeAsChild, removeSmartArtNode, addSiblingAfter, removeEmptyNode, demote, promote, reorder, clampCropValue, DUOTONE_PRESETS, ARTISTIC_EFFECTS, mediaTrimEndSeconds, trimmedMediaDurationMs, mediaTrimEndAbsoluteMs, mediaTrimEndMsFromAbsoluteMs, getNonVisualDescriptionFields, resolveActionType, ELEMENT_ACTION_TYPE_OPTIONS, elementActionToPptxAction, canCommitActionType, slideSizeFromPreset, withSlideSizeOrientation, TRANSITION_DIR_ARROWS, buildDirectionGrid, updateTagInCollections, deleteTagFromCollections, addTagToCollections, commentTextSegments, COMMENT_MENTION_CLASS, COMMENT_MENTION_ATTRIBUTE, insertCommentMention, reorderAnimationTimelineRows, applyAnimationTimelineOrder, animationEffectLabel, TABLE_STYLE_BORDER_SIDES, applyTableStyleFieldEdit, createTableStyleEntry, addTableStyleToMap, deleteTableStyleFromMap, LBL, SEL, FILL_MODE_OPTIONS, SECTION_HEADING, NUM, switchSmartArtLayout, mediaTrimEndMsFromSeconds, validateMediaTrimRange, SHAPE_QUICK_STYLES, quickStyleSwatchCss, PATTERN_PRESET_OPTIONS, getPatternSvg, COMPOUND_LINE_OPTIONS, LINE_JOIN_OPTIONS, LINE_CAP_OPTIONS, TEXT_WARP_PRESETS, warpPreviewPath, text3dPtToEmu, text3dEmuToPt, MATERIAL_PRESETS, toSlideIndex, TABLE_STYLE_BORDER_SIDE_LABEL_KEYS, TABLE_STYLE_DASH_PRESETS, GRADIENT_TYPE_OPTIONS, PATTERN_OPTIONS, FILL_PATTERN_LABEL_KEYS, openNativeEyeDropper, toggleText3dExtrusion, BEVEL_PRESETS } from './chunk-6IMB5DNJ.mjs';
5
- import { LOCALE_CATALOG, translationsEn } from './chunk-FRZIBZTE.mjs';
6
- import React19, { createContext, useMemo, useState, useCallback, lazy, forwardRef, useEffect, useRef, Suspense, useLayoutEffect, useContext, Fragment as Fragment$1, useDeferredValue } from 'react';
1
+ import { computeFocusTargets, deckDataFieldChanged, aiChangeAnimationCss, changeGhostStyle, createChatHistoryStore, collectStoredChats, exportAiChatLogs, applyElementUpdate } from './chunk-3Y63XPIN.mjs';
2
+ import { useViewerOptions, useReadOnlyRecommendationState, useCompatibilityToastsState, useReducedMotion, useViewerState, useIsMobile, useResizablePanels, useDerivedSlideState, useZoomViewport, useEditorHistory, usePresentationSetup, useTouchGestures, useViewerDialogs, useEditorOperations, useViewerIntegration, useViewPreferencesSync, useLayoutSwitching, ViewerOptionsContext, useYjsDocumentSync, useCollaborationLivePatch, useFollowMode, useBroadcastFollower, safePrompt, scopeLayoutOptionsToActiveSlide, useToolbarVisibility, useKeyboardInsets, useModalDismissDrag, useCollaborativeState, useViewerOptionsContext, useVirtualizedSlides, useSwipeNavigation, useSheetDismissDrag, detectTargetType, parseEmailUrl, parseSlideFromUrl, ACTION_VERB_MAP, syncSelectionHandleOverlay } from './chunk-PCCM7NVY.mjs';
3
+ import { MIN_ELEMENT_SIZE, DEFAULT_STROKE_COLOR, getConnectorPathGeometry, buildLineShadowCss, buildLineGlowFilter, renderConnectorMarker, getShapeVisualStyle, getTextStyleForElement, DEFAULT_TEXT_COLOR, renderVectorShape, isConnectorOrLineElement, build3DExtrusionData, getImageRenderStyle, cn, getImageSurfaceStyle, getTextLayoutStyle, renderTableElement, renderMediaElement, shouldRenderFallbackLabel, SHAPE_PRESETS, ANIMATION_PRESET_OPTIONS, DEFAULT_FILL_COLOR, hasDagDuotoneEffect, renderDagDuotoneSvgFilter, getImageSurfaceMaskStyle, getCropShapeClipPath, getImageTilingStyle, getDuotoneColors, getTextWarpStyle, renderTextSegments, buildReactChartViewModel, renderChartElement, buildTextBody3DSceneStyle, SLIDE_NAV_THUMBNAIL_WIDTH, DEFAULT_TEXT_FONT_SIZE, DEFAULT_FONT_FAMILY, TOOLBAR_SECTIONS, DEFAULT_SECTION_GROUP_ID, SHORTCUT_REFERENCE_ITEMS as SHORTCUT_REFERENCE_ITEMS$1, HYPERLINK_COLOR, GRID_SIZE, CONNECTOR_ARROW_OPTIONS, ARROW_SIZE_OPTIONS, startMotionPathPreview, startPreviewAnimation, stopPreviewAnimation, STROKE_DASH_OPTIONS } from './chunk-NTWFXLZX.mjs';
4
+ import { hasShapeProperties, normalizeHexColor, colorWithOpacity, normalizeStrokeDashType, getSvgStrokeDasharray, getCompoundLineOffsets, getCompoundLineWidths, svgLineCap, hasTextProperties, connectorWrapperTransform, getAriaRoleDescription, getAriaLabel, getAriaRole, resolveElementInteractivity, isEditableTextElement, buildTextStyleOverrideCss, isElementRendered, resolveElementAriaAttributes, getImageEffectsOpacity, getImageEffectsFilter, inlineElementPointerEvents, isHollowShapeElement, LINK_TOOLTIP_HOST_CLASS, ACTION_BUTTON_PRESETS, mediaTransportVisible, isInkElement, getGroupChildParentFill, getElementLabel, SWITCHABLE_LAYOUT_TYPES, compileEquationTemplateMathMl, buildUserFontFaceStyles, readStoredViewerPrefs, resolveThemeCatalogEntry, THEME_CATALOG, writeStoredViewerPrefs, openPptxFile, readBackstageRecentFile, resolveAutosaveActivation, buildThemeColorMap, viewerOptionsToPreferences, applyPreferenceToOptions, listAutosaveSnapshots, deleteAutosaveSnapshot, resolveExpiredAutosaveSnapshots, resolveHistoryDepth, applyAutoCorrect, resolveImageResolutionScale, resolveAutosaveIntervalMs, resolveAutosaveIntervalSeconds, shouldShowAutosaveRecoveryPrompt, resolveOptionRootClasses, resolve3DRenderingFlags, resolveSlideSizeSelection, buildDeckSaveOptions, paintedStrokeWidth, buildCssGradientFromShapeStyle, ensureActionAffordanceStyles, resolveElementActionAffordance, actionAffordanceLabels, resolveElementHighlightClick, applyHighlightClickStyle, getComputedEffectStyle, getSoftEdgeSvgFilter, getEffectStyleSource, buildStrokeOutline, buildHollowHitOutline, buildSubpathFillOverlay, isImageLikeElement, strokeOutlineViewBox, getElementTransform, resolveRevealedSmartArtNodes, resolveRevealedDrawingShapes, buildSmartArtA11y, canDrillDown, computeSmartArtElementLayout, flattenNodes, buildSummaryZoomView, isImageTiled, getImageColorWashStyle, readEditableText, placeCaretAtEnd, getPendingSelectionRestore, restoreSegmentSelection, getTextCompensationTransform, resolveChartKind, subscribeBarFacePicturePixelSamples, getBarFacePicturePixelSampleVersion, ensureChartInteractionStyles, applyChartPartHighlight, resolveRevealedChartData, formatAxisValue, buildInkGroupStrokes, getInkReplayStyles, INK_REPLAY_KEYFRAMES, buildContentPartStrokes, getContentPartReplayStyles, resolveOleType, getOleAriaLabel, getOleTypeColor, getOleTypeLabel, filterRenderedElements, resolveGroupChildFill, isLinkedTextBox, getOverflowSegments, shouldUseSvgWarp, getTextBodyRotationTransform, placeholderPromptDescriptor, RULER_THICKNESS, RULER_FONT_SIZE, buildPreviewElements, deriveSlideFieldContext, SLIDE_TRANSITION_OPTIONS, hiddenSlideCue, HIDDEN_SLIDE_SLASH_GRADIENT, HIDDEN_SLIDE_LABEL_KEY, visibleTemplateElements, themeToCssVars, shouldClearAutosaveCacheOnClose, masterViewCrudActions, applyMasterViewCrudAction, masterViewCrudFailureKey, applyMotionPathPreset, resetSlideLayoutPath, DEFAULT_INSERT_CHART_KIND, hasCopyableFormat, templateSchemeFromTheme, createBackstagePresentation, playFeedbackSound, shouldDiscardAutosaveOnSuccessfulSave, setMasterViewBackgroundColor, compatToastStackStyle, printPropertiesFrameSlides, printPropertiesSlidesPerPage, VIEWER_OPTIONS_TABS, DEFAULT_QUICK_ACCESS_COMMAND_IDS, isHeaderFooterDateTextVisible, isHeaderFooterHeaderTextVisible, isHeaderFooterFooterTextVisible, buildJoinCollaborationConfig, buildCreateCollaborationConfig, generateBroadcastRoomId, DEFAULT_BROADCAST_SERVER_URL, buildBroadcastViewerUrl, resolveTransportForServerUrl, elementIdSelector, ACTION_INDICATOR_CLASS, ACTION_INDICATOR_ICON_PATH, LINK_TOOLTIP_CLASS, LINK_TOOLTIP_PANEL_CLASS, LINK_TOOLTIP_LABEL_CLASS, LINK_TOOLTIP_HINT_CLASS, DEFAULT_PALETTE2, resolvePalette, computeDrawingViewBox, projectDrawingShapes, resolveRevealedDrawingShapeNodeIds, styleShadowFilter, buildChromeStyle, modelDataToBlobUrl, getImageSvgFilters, buildDuotoneCacheKey, getDuotoneCachedResult, applyDuotone, setDuotoneCachedResult, buildCacheKey, DEFAULT_COLOR_CHANGE_TOLERANCE, getCachedResult, applyColorChange, setCachedResult, getInlineEditorSelection, findChartPartTarget, buildSurfaceChart3DDataForElement, buildBarChart3DDataForElement, buildLineChart3DDataForElement, buildAreaChart3DDataForElement, buildPieChart3DDataForElement, withChartTitle, buildSmartArt3DModel, collectCoherent3DOffNodeIds, isBrowserOpenableMime, formatBytes, getOleDisplayName, getOleBadgeLabel, openUrlInNewTab, getSubstituteFontFamily, hasGlyphEnvelope, buildGlyphEnvelope, getWarpPath, isWedgeCalloutPresetShape, isElementActionable, getSlideBackgroundStyle, pushRecentColor, mruColorsPatch, filterCommands, resolveTitleBarStatusKey, TITLE_BAR_CLASSES, TITLE_BAR_DEFAULT_FILE_KEY, resolveScreenTip, masterViewBackgroundColor, buildFieldSubstitutionContext, shouldConfirmExternalHyperlink, safeOpenUrl, resolvePresentationAction, isPpactionUrl, parsePpactionUrl, isPresentationAdvanceClick, toggleBlackboard, PRESENT_TOOLBAR_CLASSES, buildContextMenuEntries, themeColorSchemesEqual, EXPANDED_MAX_HEIGHT, STATUS_BAR_CLASSES, buildBarActions, formatVersionTimestamp, formatRelativeTime, scanAvailableFontFamilies, PRESETS, CATEGORIES, convertOmmlToLatex, compileLatexEquation, convertLatexToOmml, EQUATION_TEMPLATES, clampPercent2, resolveDefaultPrintSettings, HANDOUT_OPTIONS, TOOLBAR_TABS, SHORTCUT_REFERENCE_ITEMS, resolveViewerAddinRows, availableQuickAccessCommands, addQuickAccessCommand, removeQuickAccessCommand, moveQuickAccessCommand, CUSTOM_FONT_ACCEPT, activateModalFocus, buildCollaborationShareUrl, buildActiveSessionUsers, SORTER_MIN_ZOOM, SORTER_ZOOM_STEP, SORTER_MAX_ZOOM, canGoPrevious, formatSlideCounter, READING_VIEW_COUNTER_ATTR, canGoNext, READING_VIEW_ATTR, OUTLINE_LEVEL_ATTR, OUTLINE_SLIDE_ATTR, OUTLINE_ROW_ATTR, OUTLINE_VIEW_ATTR, mobileElapsedSince, nextPresentedSlide, presenterPrevDisabled, presenterNextDisabled, formatMobileElapsed, mobileSlideCounter, presenterPaneAdvancesOnClick, presenterTimerProgress, PRESENTER_CONSOLE_CLASSES, formatElapsed, centeredSvgTextLines, computeInlineEditorRect, findSmartArtNodeText, setSmartArtNodeStyle, rebuildDrawingShapesIfCleared, shouldCommitSmartArtNodeText, updateSmartArtNodeText, advanceChartMarkDrag, advanceChartValueDrag, buildChartMarkDragGeometry, beginChartMarkDrag, beginChartValueDrag, groupIntoParagraphs, substituteFieldText, extraQuickAccessCommands, TAB_ROW_ACTION_CLASSES, listBackstageRecentFiles, BACKSTAGE_NAV, COMMON_FONT_SIZES, textFontSizePtToPx, INSERT_CHART_TYPES, CHARACTER_SPACING_OPTIONS, OFFICE_COLOR_SWATCHES, shapeFillChange, shapeOutlineChange, readRibbonTransitionDraft, ribbonTransitionUpdates, readSoundFileAsDataUrl, applyTransitionSoundFile, playSlideTransitionPreview, RIBBON_TRANSITION_PRESETS, transitionSoundOptions, transitionSoundSelectedValue, DEFAULT_MOTION_PATH_PRESET_ID, SLIDE_SHOW_OPTIONS, slideShowOptionChange, readSlideShowOption, SLIDE_VIRTUALIZATION_THRESHOLD, PRESENTATION_HIT_TEST_CSS, PRESENTATION_STAGE_ATTRIBUTE, getSlideTransitionAnimations, MORPH_CROSSFADE_GROUP_STYLE, MORPH_CROSSFADE_HALF_STYLE, SLIDE_TRANSITION_KEYFRAMES, buildStrokePathD, cursorForTool, annotationOverlayZIndex, presentationInkPath, resolveNotesSchematicBodyFontSizePx, motionPathFor, setMotionPath, getShapeAdjustmentHandleDescriptors, shouldShowElementHandles, PRESENTER_NAVIGATOR_LABEL_KEYS, PEN_COLORS, HIGHLIGHTER_COLORS, isBlackboardActive, scaleSlidesForSizeChange, slideSizeToCanvasPx, resolveSelectionPaneRename, PRESET_THEMES, resolveNotesSegments, segmentsToEditorHtml, DEBOUNCE_MS, createPlainNotesSegments, parseSegmentsFromRichEditor, segmentsToPlainText, getCurrentParagraphIndex, segmentsToParagraphs, paragraphsToSegments, MAX_INDENT_LEVEL, INDENT_PX, isUrlSafe, buildNotesPrintHtml, toggleSheet, SMARTART_PREVIEW_ELEMENT_HEIGHT, SMARTART_PREVIEW_ELEMENT_WIDTH, buildSmartArtPreviewElement, sanitizeMathMl, computeHandoutLayout, getPrintableArea, generateNoteLineCount, computeAllNotesPages, getNotesPrintableArea, downloadBlob, clampOptionNumber, QUICK_ACCESS_COMMAND_CATALOG, registerCustomFont, openReadingView, applyReadingViewCommand, createPresentationKeyBuffer, readingViewFitScale, READING_VIEW_STAGE_ATTR, buildOutline, applyOutlineEdit, mapOutlineKey, notesSegmentsToSpans, erasePresentationInkAt, movePresenterPointer, appendPresentationInkPoint, PRESENTER_CONSOLE_CONTROLS, NOTES_FONT_SIZE_DEFAULT, formatTime, NOTES_FONT_SIZE_MIN, clampNotesFontSize, NOTES_FONT_SIZE_STEP, NOTES_FONT_SIZE_MAX, withChartPointValue, BACKSTAGE_TEMPLATES, formatBackstageDate, formatBackstageSize, backstageCardsFor, DEFAULT_VIEWER_PROFILE, resolveProfileInitial, AVATAR_COLOR_SWATCHES, resolveDefaultFontFamily, textFontSizePxToPt, buildFontCatalog, buildThemeColorSwatchGrid, themeColorSwatchRows, findSelectedThemeSwatch, themeSwatchCommit, RIBBON_SHAPE_SWATCHES, canGroupSelection, canUngroupSelection, canSetStrokeWidth, strokeWidthOf, TRANSITION_SOUND_OTHER_VALUE, TRANSITION_SOUND_NONE_VALUE, clearTransitionSound, ENTRANCE_PRESET_VALUES, EMPHASIS_PRESET_VALUES, EXIT_PRESET_VALUES, MOTION_PATH_FAMILIES, motionPathFamilyLabelKey, motionPathPresetsByFamily, motionPathPresetLabelKey, masterViewPseudoSlide, authorConnectorBetweenSites, findEraserHitElementId, generateTicks, rulerDragToGuidePosition, getElementTransformWithoutRotation, getActiveXControlOverlayView, buildCommentMarkers, COMMENT_MARKER_SIZE, collectConnectorSiteCandidates, getConnectorEndpointHandles, findConnectorSiteNear, motionPathToSvgD, motionPathEndPixel, isEditableMotionPath, setMotionPathEnd, applyTableStyleDelete, applyTableStyleMapChange, themeColorLabel, buildThemeColorGrid, THEME_COLOR_SCHEME_KEYS, COMMON_FONTS, handleReadingViewKey, getLocalStorageUsageSummary, saveViewerProfile, clearAllLocalViewerData, isCurrentLayout, SLIDE_TEMPLATES, computeAnchoredPopupPosition, buildLiveInkStrokeView, CONNECTOR_SITE_SNAP_PX, resolveConnectorEndpointUpdate, withConnectorEndpointUpdate, getShapeConnectionSites, isElementLocked, mergeSlideTransition, mapSlideSorterKey, isEditorTextInputTarget, clampSorterZoom, buildLayoutPreviewGeometry, buildSlideTemplateContent, hasTiltData, elementLockTogglePatch, buildTableDataGrid, appendTableElementRow, removeLastTableElementRow, appendTableElementColumn, removeLastTableElementColumn, removeTableElementColumn, removeTableElementRow, setTableElementCellText, TABLE_STYLE_PRESETS, applyTableStylePreset, tableStyleAssignmentUpdate, evenColumnWidths, redistributeColumnWidth, evenRowHeights, patchChartData, collapseChartTitleRunsForEdit, chartGridlinesState, chartGridlinesPatch, seriesSecondaryAxisPatch, setChartCategoryLabel, setChartCellValue, addChartCategory, removeChartCategory, addChartSeries, removeChartSeries, setChartAxisLogScale, setChartAxisTitleStyle, setChartAxisGridlineStyle, setChartSeriesMarker, setChartSeriesChartType, setChartDataPointFill, setChartDataPointExplosion, setChartDataPointMarker, setChartDataPointLabel, describeSmartArtBounds, canAddTopLevelNode, classifyExtraConnections, siblingIndex, siblingCount, canRemoveTopLevelNode, canInteractWithElement, buildOleObjectNamePatch, getOleObjectTypeLabel, sanitizeGradientStops, shouldShowAccessibilitySection, pptxActionToElementAction, withFrameSlides, withSlidesPerPage, applyThemeOverrideToSlide, COLOR_MAP_ALIAS_KEYS, DEFAULT_COLOR_MAP, schemaLabel, THEME_COLOR_SLOT_LABEL_KEYS, SLIDE_SIZE_PRESETS, TRANSITION_VALID_DIRECTIONS, TRANSITION_ORIENTATION_TYPES, clampTransitionNumber, TRANSITION_SPEED_OPTIONS, TRANSITION_MORPH_OPTIONS, flattenTagCollections, resolveTemplateBackgroundRows, formatCommentTimestamp, commentMentionQuery, matchCommentMentionAuthors, buildAnimationTimelineRows, clearMotionPath, getEffectSoundState, setEffectSound, setAfterAnimation, setAfterAnimationColor, DIRECTIONAL_PRESETS, buildAnimationTimelineBars, motionPathPresetIdForPath, normalizeTableStyleGuid, describeTableStyleEditor, TABLE_STYLE_EDITOR_PARTS, computeMergeCellRight, computeMergeCellDown, computeSplitCell, resolveDisplayedChartType, CHART_TYPE_OPTIONS, BAR3D_SHAPE_OPTIONS, bar3DShapePatch, RADAR_STYLE_OPTIONS, radarStylePatch, SURFACE_WIREFRAME_OPTIONS, surfaceWireframePatch, isSeriesUsingSecondaryAxis, listChartUserShapeRows, withChartUserShapeAdded, createDefaultChartUserShape, withChartUserShapeRowRemoved, withChartUserShapeRowTextUpdated, SMARTART_COLOR_SCHEME_LABEL_KEYS, SMARTART_STYLE_LABEL_KEYS, addSmartArtNodeAsChild, removeSmartArtNode, addSiblingAfter, removeEmptyNode, demote, promote, reorder, clampCropValue, DUOTONE_PRESETS, ARTISTIC_EFFECTS, mediaTrimEndSeconds, trimmedMediaDurationMs, mediaTrimEndAbsoluteMs, mediaTrimEndMsFromAbsoluteMs, getNonVisualDescriptionFields, resolveActionType, ELEMENT_ACTION_TYPE_OPTIONS, elementActionToPptxAction, canCommitActionType, slideSizeFromPreset, withSlideSizeOrientation, TRANSITION_DIR_ARROWS, buildDirectionGrid, updateTagInCollections, deleteTagFromCollections, addTagToCollections, commentTextSegments, COMMENT_MENTION_CLASS, COMMENT_MENTION_ATTRIBUTE, insertCommentMention, reorderAnimationTimelineRows, applyAnimationTimelineOrder, animationEffectLabel, TABLE_STYLE_BORDER_SIDES, applyTableStyleFieldEdit, createTableStyleEntry, addTableStyleToMap, deleteTableStyleFromMap, LBL, SEL, FILL_MODE_OPTIONS, SECTION_HEADING, NUM, getChartUserShapeGroupTransform, withChartUserShapeGroupChildAdded, createDefaultChartUserShapeGroupChild, withChartUserShapeRowUpdated, getChartUserShapeRowChartBox, withChartUserShapeRowFlipUpdated, withChartUserShapeRowRotationUpdated, withChartUserShapeRowChartBoxUpdated, switchSmartArtLayout, mediaTrimEndMsFromSeconds, validateMediaTrimRange, SHAPE_QUICK_STYLES, quickStyleSwatchCss, PATTERN_PRESET_OPTIONS, getPatternSvg, COMPOUND_LINE_OPTIONS, LINE_JOIN_OPTIONS, LINE_CAP_OPTIONS, TEXT_WARP_PRESETS, warpPreviewPath, text3dPtToEmu, text3dEmuToPt, MATERIAL_PRESETS, toSlideIndex, TABLE_STYLE_BORDER_SIDE_LABEL_KEYS, TABLE_STYLE_DASH_PRESETS, GRADIENT_TYPE_OPTIONS, PATTERN_OPTIONS, FILL_PATTERN_LABEL_KEYS, openNativeEyeDropper, toggleText3dExtrusion, BEVEL_PRESETS } from './chunk-VQX7G75Z.mjs';
5
+ import { LOCALE_CATALOG, translationsEn } from './chunk-JBSAKP4Z.mjs';
6
+ import React20, { createContext, useMemo, useState, useCallback, lazy, forwardRef, useEffect, useRef, Suspense, useLayoutEffect, useContext, useSyncExternalStore, useId, Fragment as Fragment$1, useDeferredValue } from 'react';
7
7
  import { jsxs, jsx, Fragment } from 'react/jsx-runtime';
8
8
  import { useTranslation } from 'react-i18next';
9
9
  import { LuRotateCw, LuMessageSquare, LuEyeOff, LuHistory, LuTrash2, LuSettings, LuX, LuCalendarDays, LuClock, LuHash, LuFileText, LuText, LuCast, LuSave, LuUndo, LuRedo, LuSearch, LuShieldCheck, LuPlus, LuPanelLeftClose, LuStickyNote, LuMonitor, LuColumns2, LuPresentation, LuMinus, LuSettings2, LuLayers, LuDownload, LuCheck, LuLock, LuEye, LuType, LuLoader, LuShieldAlert, LuSignature, LuInfo, LuTriangleAlert, LuPrinter, LuPenTool, LuBug, LuChevronUp, LuChevronDown, LuUpload, LuWifi, LuWifiOff, LuUsers, LuCopy, LuChevronLeft, LuChevronRight, LuPlay, LuPause, LuZoomOut, LuZoomIn, LuSpellCheck, LuFileDown, LuMenu, LuSparkles, LuShare2, LuPanelLeft, LuPanelRight, LuArrowLeft, LuFolderOpen, LuClipboardPaste, LuScissors, LuPaintbrush, LuSquare, LuImage, LuVideo, LuDatabase, LuAArrowUp, LuAArrowDown, LuRemoveFormatting, LuHighlighter, LuList, LuListOrdered, LuIndentDecrease, LuIndentIncrease, LuReplace, LuMousePointer2, LuShapes, LuPaintBucket, LuPenLine, LuPalette, LuPencil, LuStar, LuMoveRight, LuMousePointerClick, LuClock3, LuMonitorPlay, LuListVideo, LuCaptions, LuCamera, LuEraser, LuRotateCcw, LuCircleHelp, LuBookOpen, LuLanguages, LuGlobe, LuGitCompare, LuMessageSquarePlus, LuLockKeyhole, LuPanelTop, LuLayoutGrid, LuGrid3X3, LuPipette, LuRuler, LuMaximize2, LuCode, LuCaseSensitive, LuTimer, LuGripVertical, LuLoaderCircle, LuBold, LuItalic, LuUnderline, LuStrikethrough, LuLink, LuGrid2X2, LuCopyPlus, LuScan, LuMonitorOff, LuCirclePlay, LuCirclePause, LuArrowLeftRight, LuClipboardCopy, LuWand, LuTextCursorInput, LuFile, LuEllipsis, LuUserRound, LuFilePlus2, LuHouse, LuFileJson, LuBox, LuFileImage, LuUser, LuHardDrive, LuLogIn, LuLayoutTemplate, LuFolderPlus, LuAlignLeft, LuAlignCenter, LuAlignRight, LuAlignJustify, LuColumns3, LuSpline, LuAlignHorizontalSpaceAround, LuAlignVerticalSpaceAround, LuGroup, LuUngroup, LuMove, LuRadio, LuLockOpen, LuArrowDown, LuArrowUp, LuArrowRight, LuReply, LuBookmark } from 'react-icons/lu';
@@ -511,16 +511,16 @@ function LoadingState({ className }) {
511
511
  function FailedToLoad() {
512
512
  return null;
513
513
  }
514
- var LazyArea3DChartScene = React19.lazy(
514
+ var LazyArea3DChartScene = React20.lazy(
515
515
  async () => {
516
516
  try {
517
- return await import('./Area3DChartScene-5CMEMIBI.mjs');
517
+ return await import('./Area3DChartScene-JM3CQ3WQ.mjs');
518
518
  } catch {
519
519
  return { default: FailedToLoad };
520
520
  }
521
521
  }
522
522
  );
523
- var SceneErrorBoundary = class extends React19.Component {
523
+ var SceneErrorBoundary = class extends React20.Component {
524
524
  constructor(props) {
525
525
  super(props);
526
526
  this.state = { hasError: false };
@@ -532,7 +532,12 @@ var SceneErrorBoundary = class extends React19.Component {
532
532
  return this.state.hasError ? this.props.fallback : this.props.children;
533
533
  }
534
534
  };
535
- function Area3DChartRenderer({ element }) {
535
+ function Area3DChartRenderer({
536
+ element,
537
+ interaction,
538
+ selectedPart,
539
+ textStyle
540
+ }) {
536
541
  const [threeAvailable, setThreeAvailable] = useState(null);
537
542
  useEffect(() => {
538
543
  let cancelled = false;
@@ -561,22 +566,30 @@ function Area3DChartRenderer({ element }) {
561
566
  if (threeAvailable === null) {
562
567
  return /* @__PURE__ */ jsx(LoadingState, {});
563
568
  }
564
- return /* @__PURE__ */ jsx(SceneErrorBoundary, { fallback: svgFallback, children: /* @__PURE__ */ jsx(Suspense, { fallback: /* @__PURE__ */ jsx(LoadingState, {}), children: /* @__PURE__ */ jsx(LazyArea3DChartScene, { options }) }) });
569
+ return /* @__PURE__ */ jsx(SceneErrorBoundary, { fallback: svgFallback, children: /* @__PURE__ */ jsx(Suspense, { fallback: /* @__PURE__ */ jsx(LoadingState, {}), children: /* @__PURE__ */ jsx(
570
+ LazyArea3DChartScene,
571
+ {
572
+ options,
573
+ interaction,
574
+ selectedPart,
575
+ textStyle
576
+ }
577
+ ) }) });
565
578
  }
566
579
  var BarChart3DContext = createContext(false);
567
580
  function FailedToLoad2() {
568
581
  return null;
569
582
  }
570
- var LazyBar3DChartScene = React19.lazy(
583
+ var LazyBar3DChartScene = React20.lazy(
571
584
  async () => {
572
585
  try {
573
- return await import('./Bar3DChartScene-H3MYUJKV.mjs');
586
+ return await import('./Bar3DChartScene-VNFWI2QG.mjs');
574
587
  } catch {
575
588
  return { default: FailedToLoad2 };
576
589
  }
577
590
  }
578
591
  );
579
- var SceneErrorBoundary2 = class extends React19.Component {
592
+ var SceneErrorBoundary2 = class extends React20.Component {
580
593
  constructor(props) {
581
594
  super(props);
582
595
  this.state = { hasError: false };
@@ -588,7 +601,12 @@ var SceneErrorBoundary2 = class extends React19.Component {
588
601
  return this.state.hasError ? this.props.fallback : this.props.children;
589
602
  }
590
603
  };
591
- function Bar3DChartRenderer({ element }) {
604
+ function Bar3DChartRenderer({
605
+ element,
606
+ interaction,
607
+ selectedPart,
608
+ textStyle
609
+ }) {
592
610
  const [threeAvailable, setThreeAvailable] = useState(null);
593
611
  useEffect(() => {
594
612
  let cancelled = false;
@@ -617,22 +635,64 @@ function Bar3DChartRenderer({ element }) {
617
635
  if (threeAvailable === null) {
618
636
  return /* @__PURE__ */ jsx(LoadingState, {});
619
637
  }
620
- return /* @__PURE__ */ jsx(SceneErrorBoundary2, { fallback: svgFallback, children: /* @__PURE__ */ jsx(Suspense, { fallback: /* @__PURE__ */ jsx(LoadingState, {}), children: /* @__PURE__ */ jsx(LazyBar3DChartScene, { options }) }) });
638
+ return /* @__PURE__ */ jsx(SceneErrorBoundary2, { fallback: svgFallback, children: /* @__PURE__ */ jsx(Suspense, { fallback: /* @__PURE__ */ jsx(LoadingState, {}), children: /* @__PURE__ */ jsx(
639
+ LazyBar3DChartScene,
640
+ {
641
+ options,
642
+ interaction,
643
+ selectedPart,
644
+ textStyle
645
+ }
646
+ ) }) });
647
+ }
648
+
649
+ // src/viewer/components/elements/build-chart3d-part-interaction.ts
650
+ function buildChart3DPartInteraction({
651
+ element,
652
+ canEdit,
653
+ onUpdateElement,
654
+ selection,
655
+ setSelection,
656
+ setDragValue
657
+ }) {
658
+ if (!canEdit) {
659
+ return void 0;
660
+ }
661
+ const onSelect = (part) => {
662
+ if (part) {
663
+ setSelection({ elementId: element.id, part });
664
+ } else if (selection?.elementId === element.id) {
665
+ setSelection(null);
666
+ }
667
+ };
668
+ const onValueDragPreview = (_part, value) => {
669
+ setDragValue(value);
670
+ };
671
+ const onValueDragCommit = (part, value) => {
672
+ setDragValue(null);
673
+ if (!onUpdateElement || !element.chartData || part.pointIndex === void 0) {
674
+ return;
675
+ }
676
+ onUpdateElement({
677
+ chartData: withChartPointValue(element.chartData, part.seriesIndex, part.pointIndex, value)
678
+ });
679
+ };
680
+ return { onSelect, onValueDragPreview, onValueDragCommit };
621
681
  }
622
682
  var LineChart3DContext = createContext(false);
623
683
  function FailedToLoad3() {
624
684
  return null;
625
685
  }
626
- var LazyLine3DChartScene = React19.lazy(
686
+ var LazyLine3DChartScene = React20.lazy(
627
687
  async () => {
628
688
  try {
629
- return await import('./Line3DChartScene-YFRPJHDX.mjs');
689
+ return await import('./Line3DChartScene-GXOWGIFJ.mjs');
630
690
  } catch {
631
691
  return { default: FailedToLoad3 };
632
692
  }
633
693
  }
634
694
  );
635
- var SceneErrorBoundary3 = class extends React19.Component {
695
+ var SceneErrorBoundary3 = class extends React20.Component {
636
696
  constructor(props) {
637
697
  super(props);
638
698
  this.state = { hasError: false };
@@ -644,7 +704,12 @@ var SceneErrorBoundary3 = class extends React19.Component {
644
704
  return this.state.hasError ? this.props.fallback : this.props.children;
645
705
  }
646
706
  };
647
- function Line3DChartRenderer({ element }) {
707
+ function Line3DChartRenderer({
708
+ element,
709
+ interaction,
710
+ selectedPart,
711
+ textStyle
712
+ }) {
648
713
  const [threeAvailable, setThreeAvailable] = useState(null);
649
714
  useEffect(() => {
650
715
  let cancelled = false;
@@ -673,22 +738,30 @@ function Line3DChartRenderer({ element }) {
673
738
  if (threeAvailable === null) {
674
739
  return /* @__PURE__ */ jsx(LoadingState, {});
675
740
  }
676
- return /* @__PURE__ */ jsx(SceneErrorBoundary3, { fallback: svgFallback, children: /* @__PURE__ */ jsx(Suspense, { fallback: /* @__PURE__ */ jsx(LoadingState, {}), children: /* @__PURE__ */ jsx(LazyLine3DChartScene, { options }) }) });
741
+ return /* @__PURE__ */ jsx(SceneErrorBoundary3, { fallback: svgFallback, children: /* @__PURE__ */ jsx(Suspense, { fallback: /* @__PURE__ */ jsx(LoadingState, {}), children: /* @__PURE__ */ jsx(
742
+ LazyLine3DChartScene,
743
+ {
744
+ options,
745
+ interaction,
746
+ selectedPart,
747
+ textStyle
748
+ }
749
+ ) }) });
677
750
  }
678
751
  var PieChart3DContext = createContext(false);
679
752
  function FailedToLoad4() {
680
753
  return null;
681
754
  }
682
- var LazyPieChart3DScene = React19.lazy(
755
+ var LazyPieChart3DScene = React20.lazy(
683
756
  async () => {
684
757
  try {
685
- return await import('./PieChart3DScene-CI6CW22C.mjs');
758
+ return await import('./PieChart3DScene-WXJEDYMK.mjs');
686
759
  } catch {
687
760
  return { default: FailedToLoad4 };
688
761
  }
689
762
  }
690
763
  );
691
- var SceneErrorBoundary4 = class extends React19.Component {
764
+ var SceneErrorBoundary4 = class extends React20.Component {
692
765
  constructor(props) {
693
766
  super(props);
694
767
  this.state = { hasError: false };
@@ -700,7 +773,11 @@ var SceneErrorBoundary4 = class extends React19.Component {
700
773
  return this.state.hasError ? this.props.fallback : this.props.children;
701
774
  }
702
775
  };
703
- function PieChart3DRenderer({ element }) {
776
+ function PieChart3DRenderer({
777
+ element,
778
+ interaction,
779
+ selectedPart
780
+ }) {
704
781
  const [threeAvailable, setThreeAvailable] = useState(null);
705
782
  useEffect(() => {
706
783
  let cancelled = false;
@@ -729,22 +806,29 @@ function PieChart3DRenderer({ element }) {
729
806
  if (threeAvailable === null) {
730
807
  return /* @__PURE__ */ jsx(LoadingState, {});
731
808
  }
732
- return /* @__PURE__ */ jsx(SceneErrorBoundary4, { fallback: svgFallback, children: /* @__PURE__ */ jsx(Suspense, { fallback: /* @__PURE__ */ jsx(LoadingState, {}), children: /* @__PURE__ */ jsx(LazyPieChart3DScene, { options }) }) });
809
+ return /* @__PURE__ */ jsx(SceneErrorBoundary4, { fallback: svgFallback, children: /* @__PURE__ */ jsx(Suspense, { fallback: /* @__PURE__ */ jsx(LoadingState, {}), children: /* @__PURE__ */ jsx(
810
+ LazyPieChart3DScene,
811
+ {
812
+ options,
813
+ interaction,
814
+ selectedPart
815
+ }
816
+ ) }) });
733
817
  }
734
818
  var SurfaceChart3DContext = createContext(false);
735
819
  function FailedToLoad5() {
736
820
  return null;
737
821
  }
738
- var LazySurfaceChart3DScene = React19.lazy(
822
+ var LazySurfaceChart3DScene = React20.lazy(
739
823
  async () => {
740
824
  try {
741
- return await import('./SurfaceChart3DScene-JUXRC3K2.mjs');
825
+ return await import('./SurfaceChart3DScene-IKPE2SVE.mjs');
742
826
  } catch {
743
827
  return { default: FailedToLoad5 };
744
828
  }
745
829
  }
746
830
  );
747
- var SceneErrorBoundary5 = class extends React19.Component {
831
+ var SceneErrorBoundary5 = class extends React20.Component {
748
832
  constructor(props) {
749
833
  super(props);
750
834
  this.state = { hasError: false };
@@ -757,7 +841,10 @@ var SceneErrorBoundary5 = class extends React19.Component {
757
841
  }
758
842
  };
759
843
  function SurfaceChart3DRenderer({
760
- element
844
+ element,
845
+ interaction,
846
+ selectedPart,
847
+ textStyle
761
848
  }) {
762
849
  const [threeAvailable, setThreeAvailable] = useState(null);
763
850
  useEffect(() => {
@@ -787,49 +874,28 @@ function SurfaceChart3DRenderer({
787
874
  if (threeAvailable === null) {
788
875
  return /* @__PURE__ */ jsx(LoadingState, {});
789
876
  }
790
- return /* @__PURE__ */ jsx(SceneErrorBoundary5, { fallback: svgFallback, children: /* @__PURE__ */ jsx(Suspense, { fallback: /* @__PURE__ */ jsx(LoadingState, {}), children: /* @__PURE__ */ jsx(LazySurfaceChart3DScene, { options }) }) });
877
+ return /* @__PURE__ */ jsx(SceneErrorBoundary5, { fallback: svgFallback, children: /* @__PURE__ */ jsx(Suspense, { fallback: /* @__PURE__ */ jsx(LoadingState, {}), children: /* @__PURE__ */ jsx(
878
+ LazySurfaceChart3DScene,
879
+ {
880
+ options,
881
+ interaction,
882
+ selectedPart,
883
+ textStyle
884
+ }
885
+ ) }) });
791
886
  }
792
- function ChartElementView({
887
+ function useChartMarkInteraction({
793
888
  element,
794
- editable,
889
+ canEdit,
795
890
  onUpdateElement,
796
- animationState
891
+ viewModel,
892
+ wrapperRef,
893
+ setSelection
797
894
  }) {
798
- const wrapperRef = useRef(null);
799
895
  const dragRef = useRef(null);
800
896
  const markDragRef = useRef(null);
801
- const { selection, setSelection } = useChartPartSelection();
802
897
  const [previewData, setPreviewData] = useState(null);
803
898
  const [dragValue, setDragValue] = useState(null);
804
- const [titleDraft, setTitleDraft] = useState(null);
805
- const selectedPart = selection?.elementId === element.id ? selection.part : null;
806
- const canEdit = editable && Boolean(onUpdateElement);
807
- const use3D = useContext(SurfaceChart3DContext);
808
- const isSurfaceKind = resolveChartKind(element.chartData?.chartType ?? "bar") === "surface";
809
- const use3DBar = useContext(BarChart3DContext);
810
- const isBar3DKind = element.chartData?.chartType === "bar3D";
811
- const use3DLine = useContext(LineChart3DContext);
812
- const isLine3DKind = element.chartData?.chartType === "line3D";
813
- const use3DArea = useContext(AreaChart3DContext);
814
- const isArea3DKind = element.chartData?.chartType === "area3D";
815
- const use3DPie = useContext(PieChart3DContext);
816
- const isPie3DKind = element.chartData?.chartType === "pie3D";
817
- const viewModel = useMemo(
818
- () => canEdit ? buildReactChartViewModel(element) : null,
819
- [canEdit, element]
820
- );
821
- useEffect(ensureChartInteractionStyles, []);
822
- useEffect(() => {
823
- if (!onUpdateElement) {
824
- return;
825
- }
826
- if (!canEdit && selection?.elementId === element.id) {
827
- setSelection(null);
828
- }
829
- }, [canEdit, selection, element.id, setSelection, onUpdateElement]);
830
- useEffect(() => {
831
- applyChartPartHighlight(wrapperRef.current, selectedPart);
832
- });
833
899
  const endDrag = (commit) => {
834
900
  const active = dragRef.current;
835
901
  const markActive = markDragRef.current;
@@ -949,6 +1015,79 @@ function ChartElementView({
949
1015
  endDrag(true);
950
1016
  }
951
1017
  };
1018
+ return {
1019
+ previewData,
1020
+ dragValue,
1021
+ setDragValue,
1022
+ handlePointerDown,
1023
+ handlePointerMove,
1024
+ handlePointerUp
1025
+ };
1026
+ }
1027
+ function ChartElementView({
1028
+ element,
1029
+ editable,
1030
+ onUpdateElement,
1031
+ animationState
1032
+ }) {
1033
+ const wrapperRef = useRef(null);
1034
+ const { selection, setSelection } = useChartPartSelection();
1035
+ const [titleDraft, setTitleDraft] = useState(null);
1036
+ const selectedPart = selection?.elementId === element.id ? selection.part : null;
1037
+ const canEdit = editable && Boolean(onUpdateElement);
1038
+ const use3D = useContext(SurfaceChart3DContext);
1039
+ const isSurfaceKind = resolveChartKind(element.chartData?.chartType ?? "bar") === "surface";
1040
+ const use3DBar = useContext(BarChart3DContext);
1041
+ const isBar3DKind = element.chartData?.chartType === "bar3D";
1042
+ const use3DLine = useContext(LineChart3DContext);
1043
+ const isLine3DKind = element.chartData?.chartType === "line3D";
1044
+ const use3DArea = useContext(AreaChart3DContext);
1045
+ const isArea3DKind = element.chartData?.chartType === "area3D";
1046
+ const use3DPie = useContext(PieChart3DContext);
1047
+ const isPie3DKind = element.chartData?.chartType === "pie3D";
1048
+ const barFacePictureSampleVersion = useSyncExternalStore(
1049
+ subscribeBarFacePicturePixelSamples,
1050
+ getBarFacePicturePixelSampleVersion,
1051
+ getBarFacePicturePixelSampleVersion
1052
+ );
1053
+ const viewModel = useMemo(() => {
1054
+ return canEdit ? buildReactChartViewModel(element) : null;
1055
+ }, [canEdit, element, barFacePictureSampleVersion]);
1056
+ useEffect(ensureChartInteractionStyles, []);
1057
+ useEffect(() => {
1058
+ if (!onUpdateElement) {
1059
+ return;
1060
+ }
1061
+ if (!canEdit && selection?.elementId === element.id) {
1062
+ setSelection(null);
1063
+ }
1064
+ }, [canEdit, selection, element.id, setSelection, onUpdateElement]);
1065
+ useEffect(() => {
1066
+ applyChartPartHighlight(wrapperRef.current, selectedPart);
1067
+ });
1068
+ const {
1069
+ previewData,
1070
+ dragValue,
1071
+ setDragValue,
1072
+ handlePointerDown,
1073
+ handlePointerMove,
1074
+ handlePointerUp
1075
+ } = useChartMarkInteraction({
1076
+ element,
1077
+ canEdit,
1078
+ onUpdateElement,
1079
+ viewModel,
1080
+ wrapperRef,
1081
+ setSelection
1082
+ });
1083
+ const chart3DInteraction = buildChart3DPartInteraction({
1084
+ element,
1085
+ canEdit,
1086
+ onUpdateElement,
1087
+ selection,
1088
+ setSelection,
1089
+ setDragValue
1090
+ });
952
1091
  const handleDoubleClick = (e) => {
953
1092
  if (!canEdit || !canDrillDown(element)) {
954
1093
  return;
@@ -987,7 +1126,46 @@ function ChartElementView({
987
1126
  onPointerUp: handlePointerUp,
988
1127
  onDoubleClick: handleDoubleClick,
989
1128
  children: [
990
- use3D && isSurfaceKind ? /* @__PURE__ */ jsx(SurfaceChart3DRenderer, { element: renderedElement }) : use3DBar && isBar3DKind ? /* @__PURE__ */ jsx(Bar3DChartRenderer, { element: renderedElement }) : use3DLine && isLine3DKind ? /* @__PURE__ */ jsx(Line3DChartRenderer, { element: renderedElement }) : use3DArea && isArea3DKind ? /* @__PURE__ */ jsx(Area3DChartRenderer, { element: renderedElement }) : use3DPie && isPie3DKind ? /* @__PURE__ */ jsx(PieChart3DRenderer, { element: renderedElement }) : renderChartElement(renderedElement),
1129
+ use3D && isSurfaceKind ? /* @__PURE__ */ jsx(
1130
+ SurfaceChart3DRenderer,
1131
+ {
1132
+ element: renderedElement,
1133
+ interaction: chart3DInteraction,
1134
+ selectedPart,
1135
+ textStyle: animationState?.textStyle
1136
+ }
1137
+ ) : use3DBar && isBar3DKind ? /* @__PURE__ */ jsx(
1138
+ Bar3DChartRenderer,
1139
+ {
1140
+ element: renderedElement,
1141
+ interaction: chart3DInteraction,
1142
+ selectedPart,
1143
+ textStyle: animationState?.textStyle
1144
+ }
1145
+ ) : use3DLine && isLine3DKind ? /* @__PURE__ */ jsx(
1146
+ Line3DChartRenderer,
1147
+ {
1148
+ element: renderedElement,
1149
+ interaction: chart3DInteraction,
1150
+ selectedPart,
1151
+ textStyle: animationState?.textStyle
1152
+ }
1153
+ ) : use3DArea && isArea3DKind ? /* @__PURE__ */ jsx(
1154
+ Area3DChartRenderer,
1155
+ {
1156
+ element: renderedElement,
1157
+ interaction: chart3DInteraction,
1158
+ selectedPart,
1159
+ textStyle: animationState?.textStyle
1160
+ }
1161
+ ) : use3DPie && isPie3DKind ? /* @__PURE__ */ jsx(
1162
+ PieChart3DRenderer,
1163
+ {
1164
+ element: renderedElement,
1165
+ interaction: chart3DInteraction,
1166
+ selectedPart
1167
+ }
1168
+ ) : renderChartElement(renderedElement),
991
1169
  dragValue !== null && /* @__PURE__ */ jsx("div", { className: "absolute top-1 right-1 z-10 rounded bg-primary/90 px-1.5 py-0.5 text-[10px] font-medium text-white pointer-events-none", children: formatAxisValue(dragValue) }),
992
1170
  titleDraft !== null && /* @__PURE__ */ jsx(
993
1171
  "input",
@@ -1540,7 +1718,7 @@ function ResizeHandles({
1540
1718
  ))
1541
1719
  ] });
1542
1720
  }
1543
- var ConnectorElementRenderer = React19.memo(
1721
+ var ConnectorElementRenderer = React20.memo(
1544
1722
  // oxlint-disable-next-line prefer-arrow-callback -- named fn gives the memo component its displayName
1545
1723
  function ConnectorElementRendererInner({
1546
1724
  el,
@@ -1921,7 +2099,7 @@ function shapeParams(element) {
1921
2099
  const hasFill = style?.fillColor !== void 0 && style.fillColor !== "transparent" || Boolean(buildCssGradientFromShapeStyle(style) || style?.fillGradient) || style?.fillMode === "pattern" && Boolean(style.fillPatternPreset);
1922
2100
  return { hf: hasFill, fc: fillColor, sw: strokeWidth, sc: strokeColor };
1923
2101
  }
1924
- var Extrusion3DOverlay = React19.memo(
2102
+ var Extrusion3DOverlay = React20.memo(
1925
2103
  // oxlint-disable-next-line prefer-arrow-callback -- named fn gives the memo component its displayName
1926
2104
  function Extrusion3DOverlayInner({ data }) {
1927
2105
  if (!data.hasExtrusion || data.panels.length === 0) {
@@ -2006,23 +2184,19 @@ function renderOutlinePaint(paint) {
2006
2184
  function ShapeEffectOverlay({
2007
2185
  element,
2008
2186
  animatesFill = false,
2009
- animatesStroke = false
2187
+ animatesStroke = false,
2188
+ suppressReflection = false
2010
2189
  }) {
2011
- if (!hasShapeProperties(element)) {
2012
- return null;
2013
- }
2014
2190
  const fx = getComputedEffectStyle(element);
2015
2191
  const overlay = fx.fillOverlay;
2016
- const reflection = fx.reflection;
2017
- const softEdge = getSoftEdgeSvgFilter(element.shapeStyle, element.id);
2192
+ const reflection = suppressReflection ? void 0 : fx.reflection;
2193
+ const softEdge = getSoftEdgeSvgFilter(getEffectStyleSource(element), element.id);
2018
2194
  const strokeOutline = buildStrokeOutline(element);
2019
2195
  const hollowHit = buildHollowHitOutline(element);
2020
2196
  const subpathFill = buildSubpathFillOverlay(element);
2021
2197
  if (!overlay && !softEdge && !strokeOutline && !hollowHit && !subpathFill && !reflection) {
2022
2198
  return null;
2023
2199
  }
2024
- const reflectionFill = reflection && !isImageLikeElement(element) ? getComputedFillStyle(element) : void 0;
2025
- const reflectionImgSrc = reflection && isImageLikeElement(element) ? imgSrc(element) : void 0;
2026
2200
  const fillOverlayStyle = overlay ? {
2027
2201
  position: "absolute",
2028
2202
  inset: 0,
@@ -2138,44 +2312,12 @@ function ShapeEffectOverlay({
2138
2312
  className: "pptx-react-reflection",
2139
2313
  "aria-hidden": "true",
2140
2314
  style: reflection,
2141
- children: reflectionImgSrc ? /* @__PURE__ */ jsx(
2142
- "div",
2143
- {
2144
- className: "pptx-react-reflection-picture-surface",
2145
- style: getImageSurfaceStyle(element),
2146
- children: /* @__PURE__ */ jsx(
2147
- "img",
2148
- {
2149
- src: reflectionImgSrc,
2150
- alt: "",
2151
- draggable: false,
2152
- style: {
2153
- width: "100%",
2154
- height: "100%",
2155
- ...getImageRenderStyle(element)
2156
- }
2157
- }
2158
- )
2159
- }
2160
- ) : reflectionFill ? /* @__PURE__ */ jsx(
2161
- "div",
2162
- {
2163
- style: {
2164
- width: "100%",
2165
- height: "100%",
2166
- backgroundColor: reflectionFill.backgroundColor,
2167
- backgroundImage: reflectionFill.backgroundImage,
2168
- backgroundSize: reflectionFill.backgroundSize,
2169
- backgroundPosition: reflectionFill.backgroundPosition,
2170
- backgroundRepeat: reflectionFill.backgroundRepeat
2171
- }
2172
- }
2173
- ) : null
2315
+ children: /* @__PURE__ */ jsx(StaticElementRenderer, { element, positioned: false, suppressReflection: true })
2174
2316
  }
2175
2317
  ) : null
2176
2318
  ] });
2177
2319
  }
2178
- var ElementRenderer = React19.memo(
2320
+ var ElementRenderer = React20.memo(
2179
2321
  // oxlint-disable-next-line prefer-arrow-callback -- named fn gives the memo component its displayName
2180
2322
  function ElementRendererInner({
2181
2323
  element: el,
@@ -2482,22 +2624,10 @@ var ElementRenderer = React19.memo(
2482
2624
  );
2483
2625
  }
2484
2626
  );
2485
- function renderPressureStroke(pathD, widths, baseWidth, color, opacity, keyPrefix) {
2486
- const points = extractPathPoints(pathD);
2487
- const circles = generatePressureCircles(points, widths, {
2488
- baseWidth,
2489
- minRadius: 0.5,
2490
- maxRadius: baseWidth * 1.5
2491
- });
2627
+ function renderPressureStroke(circles, color, opacity, keyPrefix) {
2492
2628
  return /* @__PURE__ */ jsx("g", { opacity, children: circles.map((c, j) => /* @__PURE__ */ jsx("circle", { cx: c.cx, cy: c.cy, r: c.r, fill: color }, `${keyPrefix}-pc-${j}`)) });
2493
2629
  }
2494
- function renderNibMarkStroke(pathD, widths, tiltAngles, tiltMagnitudes, baseWidth, color, opacity, keyPrefix) {
2495
- const points = extractPathPoints(pathD);
2496
- const marks = generateNibMarks(points, widths, tiltAngles, tiltMagnitudes, {
2497
- baseWidth,
2498
- minRadius: 0.5,
2499
- maxRadius: baseWidth * 1.5
2500
- });
2630
+ function renderNibMarkStroke(marks, color, opacity, keyPrefix) {
2501
2631
  return /* @__PURE__ */ jsx("g", { opacity, children: marks.map((m, j) => /* @__PURE__ */ jsx(
2502
2632
  "ellipse",
2503
2633
  {
@@ -2511,10 +2641,41 @@ function renderNibMarkStroke(pathD, widths, tiltAngles, tiltMagnitudes, baseWidt
2511
2641
  `${keyPrefix}-nib-${j}`
2512
2642
  )) });
2513
2643
  }
2644
+ function renderStrokeView(view, pressureSensitive, replayStyle, key) {
2645
+ if (view.nibMarks) {
2646
+ return /* @__PURE__ */ jsx("g", { children: renderNibMarkStroke(view.nibMarks, view.color, view.opacity, key) }, key);
2647
+ }
2648
+ if (pressureSensitive && view.circles) {
2649
+ return /* @__PURE__ */ jsx("g", { children: renderPressureStroke(view.circles, view.color, view.opacity, key) }, key);
2650
+ }
2651
+ return /* @__PURE__ */ jsx(
2652
+ "path",
2653
+ {
2654
+ d: view.d,
2655
+ fill: "none",
2656
+ stroke: view.color,
2657
+ strokeWidth: view.width,
2658
+ strokeOpacity: view.opacity,
2659
+ strokeLinecap: "round",
2660
+ strokeLinejoin: "round",
2661
+ vectorEffect: "non-scaling-stroke",
2662
+ ...replayStyle ? {
2663
+ strokeDasharray: replayStyle.strokeDasharray,
2664
+ strokeDashoffset: replayStyle.strokeDashoffset,
2665
+ style: {
2666
+ animation: replayStyle.animation,
2667
+ "--ink-path-length": replayStyle.pathLength
2668
+ }
2669
+ } : {}
2670
+ },
2671
+ key
2672
+ );
2673
+ }
2514
2674
  function renderInk(el, options) {
2515
2675
  const replay = options?.replay ?? false;
2516
- Boolean(el.inkPointPressures) && el.inkPointPressures.length > 0;
2517
- Boolean(el.inkWidths) && el.inkWidths.length > 1 && hasPressureVariation(el.inkWidths);
2676
+ const strokes = buildInkGroupStrokes(el, { color: "#000", width: 3 });
2677
+ strokes.some((s) => s.circles || s.nibMarks);
2678
+ const pressureSensitive = options?.pressureSensitive;
2518
2679
  const replayStyles = replay ? getInkReplayStyles(el, options?.replayConfig) : null;
2519
2680
  return /* @__PURE__ */ jsxs(
2520
2681
  "svg",
@@ -2524,44 +2685,9 @@ function renderInk(el, options) {
2524
2685
  preserveAspectRatio: "none",
2525
2686
  children: [
2526
2687
  replay && /* @__PURE__ */ jsx("style", { children: INK_REPLAY_KEYFRAMES }),
2527
- el.inkPaths.map((d, i) => {
2528
- const color = resolveInkColor(el.inkColors, i);
2529
- const width = resolveInkWidth(el.inkWidths, i);
2530
- const opacity = resolveInkOpacity(el.inkOpacities, i);
2531
- {
2532
- const pointPressures = el.inkPointPressures?.[i];
2533
- if (pointPressures && pointPressures.length > 1 && hasPressureVariation(pointPressures)) {
2534
- const pointWidths = pressuresToWidths(pointPressures, width);
2535
- return /* @__PURE__ */ jsx("g", { children: renderPressureStroke(d, pointWidths, width, color, opacity, `${el.id}-ink-${i}`) }, `${el.id}-ink-${i}`);
2536
- }
2537
- if (el.inkWidths && el.inkWidths.length > 1 && hasPressureVariation(el.inkWidths)) {
2538
- return /* @__PURE__ */ jsx("g", { children: renderPressureStroke(d, el.inkWidths, width, color, opacity, `${el.id}-ink-${i}`) }, `${el.id}-ink-${i}`);
2539
- }
2540
- }
2541
- const replayStyle = replayStyles?.[i];
2542
- return /* @__PURE__ */ jsx(
2543
- "path",
2544
- {
2545
- d,
2546
- fill: "none",
2547
- stroke: color,
2548
- strokeWidth: width,
2549
- strokeOpacity: opacity,
2550
- strokeLinecap: "round",
2551
- strokeLinejoin: "round",
2552
- vectorEffect: "non-scaling-stroke",
2553
- ...replayStyle ? {
2554
- strokeDasharray: replayStyle.strokeDasharray,
2555
- strokeDashoffset: replayStyle.strokeDashoffset,
2556
- style: {
2557
- animation: replayStyle.animation,
2558
- "--ink-path-length": replayStyle.pathLength
2559
- }
2560
- } : {}
2561
- },
2562
- `${el.id}-ink-${i}`
2563
- );
2564
- })
2688
+ strokes.map(
2689
+ (s, i) => renderStrokeView(s, pressureSensitive, replayStyles?.[i], `${el.id}-ink-${i}`)
2690
+ )
2565
2691
  ]
2566
2692
  }
2567
2693
  );
@@ -2657,6 +2783,7 @@ function renderContentPart(el, options) {
2657
2783
  if (el.inkStrokes && el.inkStrokes.length > 0) {
2658
2784
  const replay = options?.replay ?? false;
2659
2785
  const pressureSensitive = options?.pressureSensitive ?? true;
2786
+ const strokes = buildContentPartStrokes(el);
2660
2787
  const replayStyles = replay ? getContentPartReplayStyles(el.inkStrokes, options?.replayConfig) : null;
2661
2788
  return /* @__PURE__ */ jsxs(
2662
2789
  "svg",
@@ -2666,56 +2793,9 @@ function renderContentPart(el, options) {
2666
2793
  preserveAspectRatio: "none",
2667
2794
  children: [
2668
2795
  replay && /* @__PURE__ */ jsx("style", { children: INK_REPLAY_KEYFRAMES }),
2669
- el.inkStrokes.map((stroke, i) => {
2670
- if (stroke.tiltAngles && stroke.tiltAngles.length > 0) {
2671
- const magnitudes = stroke.tiltMagnitudes ?? stroke.tiltAngles.map(() => 0.5);
2672
- const widths = stroke.pressures && stroke.pressures.length > 1 && hasPressureVariation(stroke.pressures) ? pressuresToWidths(stroke.pressures, stroke.width) : [stroke.width];
2673
- return /* @__PURE__ */ jsx("g", { children: renderNibMarkStroke(
2674
- stroke.path,
2675
- widths,
2676
- stroke.tiltAngles,
2677
- magnitudes,
2678
- stroke.width,
2679
- stroke.color,
2680
- stroke.opacity,
2681
- `${el.id}-cp-ink-${i}`
2682
- ) }, `${el.id}-cp-ink-${i}`);
2683
- }
2684
- if (pressureSensitive && stroke.pressures && stroke.pressures.length > 1 && hasPressureVariation(stroke.pressures)) {
2685
- const pointWidths = pressuresToWidths(stroke.pressures, stroke.width);
2686
- return /* @__PURE__ */ jsx("g", { children: renderPressureStroke(
2687
- stroke.path,
2688
- pointWidths,
2689
- stroke.width,
2690
- stroke.color,
2691
- stroke.opacity,
2692
- `${el.id}-cp-ink-${i}`
2693
- ) }, `${el.id}-cp-ink-${i}`);
2694
- }
2695
- const replayStyle = replayStyles?.[i];
2696
- return /* @__PURE__ */ jsx(
2697
- "path",
2698
- {
2699
- d: stroke.path,
2700
- fill: "none",
2701
- stroke: stroke.color,
2702
- strokeWidth: stroke.width,
2703
- strokeOpacity: stroke.opacity,
2704
- strokeLinecap: "round",
2705
- strokeLinejoin: "round",
2706
- vectorEffect: "non-scaling-stroke",
2707
- ...replayStyle ? {
2708
- strokeDasharray: replayStyle.strokeDasharray,
2709
- strokeDashoffset: replayStyle.strokeDashoffset,
2710
- style: {
2711
- animation: replayStyle.animation,
2712
- "--ink-path-length": replayStyle.pathLength
2713
- }
2714
- } : {}
2715
- },
2716
- `${el.id}-cp-ink-${i}`
2717
- );
2718
- })
2796
+ strokes.map(
2797
+ (s, i) => renderStrokeView(s, pressureSensitive, replayStyles?.[i], `${el.id}-cp-ink-${i}`)
2798
+ )
2719
2799
  ]
2720
2800
  }
2721
2801
  );
@@ -3082,10 +3162,10 @@ function InlineTextEditor({
3082
3162
  function FailedToLoad6() {
3083
3163
  return null;
3084
3164
  }
3085
- var LazyModel3DScene = React19.lazy(
3165
+ var LazyModel3DScene = React20.lazy(
3086
3166
  async () => {
3087
3167
  try {
3088
- return await import('./Model3DScene-O24KP723.mjs');
3168
+ return await import('./Model3DScene-WJ3MMIZH.mjs');
3089
3169
  } catch {
3090
3170
  return { default: FailedToLoad6 };
3091
3171
  }
@@ -3147,7 +3227,7 @@ function PosterFallback({
3147
3227
  }
3148
3228
  );
3149
3229
  }
3150
- var Model3DErrorBoundary = class extends React19.Component {
3230
+ var Model3DErrorBoundary = class extends React20.Component {
3151
3231
  constructor(props) {
3152
3232
  super(props);
3153
3233
  this.state = { hasError: false };
@@ -3356,10 +3436,10 @@ function SmartArtInlineNodeEditor({
3356
3436
  onCancel
3357
3437
  }) {
3358
3438
  const { t } = useTranslation();
3359
- const ref = React19.useRef(null);
3360
- const [value, setValue] = React19.useState(initialText);
3361
- const settled = React19.useRef(false);
3362
- React19.useEffect(() => {
3439
+ const ref = React20.useRef(null);
3440
+ const [value, setValue] = React20.useState(initialText);
3441
+ const settled = React20.useRef(false);
3442
+ React20.useEffect(() => {
3363
3443
  const el = ref.current;
3364
3444
  if (el) {
3365
3445
  el.focus();
@@ -3451,16 +3531,16 @@ function findNodeIdFromEvent(target) {
3451
3531
  return null;
3452
3532
  }
3453
3533
  function useSmartArtHoverState(containerRef) {
3454
- const [hoveredNodeId, setHoveredNodeId] = React19.useState(null);
3455
- const [hoveredNodeRect, setHoveredNodeRect] = React19.useState(null);
3456
- const hideTimeoutRef = React19.useRef(null);
3457
- const cancelPendingHide = React19.useCallback(() => {
3534
+ const [hoveredNodeId, setHoveredNodeId] = React20.useState(null);
3535
+ const [hoveredNodeRect, setHoveredNodeRect] = React20.useState(null);
3536
+ const hideTimeoutRef = React20.useRef(null);
3537
+ const cancelPendingHide = React20.useCallback(() => {
3458
3538
  if (hideTimeoutRef.current !== null) {
3459
3539
  window.clearTimeout(hideTimeoutRef.current);
3460
3540
  hideTimeoutRef.current = null;
3461
3541
  }
3462
3542
  }, []);
3463
- const handleMouseMove = React19.useCallback(
3543
+ const handleMouseMove = React20.useCallback(
3464
3544
  (e, ignoreRef) => {
3465
3545
  const nodeEl = findNodeIdFromEvent(e.target);
3466
3546
  const container = containerRef.current;
@@ -3488,12 +3568,12 @@ function useSmartArtHoverState(containerRef) {
3488
3568
  },
3489
3569
  [containerRef, cancelPendingHide]
3490
3570
  );
3491
- const clearHover = React19.useCallback(() => {
3571
+ const clearHover = React20.useCallback(() => {
3492
3572
  cancelPendingHide();
3493
3573
  setHoveredNodeId(null);
3494
3574
  setHoveredNodeRect(null);
3495
3575
  }, [cancelPendingHide]);
3496
- React19.useEffect(() => cancelPendingHide, [cancelPendingHide]);
3576
+ React20.useEffect(() => cancelPendingHide, [cancelPendingHide]);
3497
3577
  return { hoveredNodeId, hoveredNodeRect, handleMouseMove, clearHover };
3498
3578
  }
3499
3579
  var EDITOR_PADDING = 4;
@@ -3508,11 +3588,11 @@ function SmartArtEditableLayer({
3508
3588
  onChangeNodeStyle,
3509
3589
  children
3510
3590
  }) {
3511
- const containerRef = React19.useRef(null);
3512
- const styleBarRef = React19.useRef(null);
3513
- const [edit, setEdit] = React19.useState(null);
3591
+ const containerRef = React20.useRef(null);
3592
+ const styleBarRef = React20.useRef(null);
3593
+ const [edit, setEdit] = React20.useState(null);
3514
3594
  const { hoveredNodeId, hoveredNodeRect, handleMouseMove, clearHover } = useSmartArtHoverState(containerRef);
3515
- const openEditor = React19.useCallback(
3595
+ const openEditor = React20.useCallback(
3516
3596
  (target) => {
3517
3597
  const nodeEl = findNodeIdFromEvent(target);
3518
3598
  const container = containerRef.current;
@@ -4124,20 +4204,20 @@ function sameDiagramReveal(prev, next) {
4124
4204
  }
4125
4205
  return true;
4126
4206
  }
4127
- var SmartArtRenderer = React19.memo(SmartArtRendererImpl, arePropsEqual);
4207
+ var SmartArtRenderer = React20.memo(SmartArtRendererImpl, arePropsEqual);
4128
4208
  function FailedToLoad7() {
4129
4209
  return null;
4130
4210
  }
4131
- var LazySmartArt3DScene = React19.lazy(
4211
+ var LazySmartArt3DScene = React20.lazy(
4132
4212
  async () => {
4133
4213
  try {
4134
- return await import('./SmartArt3DScene-XCFVGCXE.mjs');
4214
+ return await import('./SmartArt3DScene-ODKCGJBO.mjs');
4135
4215
  } catch {
4136
4216
  return { default: FailedToLoad7 };
4137
4217
  }
4138
4218
  }
4139
4219
  );
4140
- var SceneErrorBoundary6 = class extends React19.Component {
4220
+ var SceneErrorBoundary6 = class extends React20.Component {
4141
4221
  constructor(props) {
4142
4222
  super(props);
4143
4223
  this.state = { hasError: false };
@@ -4154,7 +4234,8 @@ function SmartArt3DRenderer({
4154
4234
  className,
4155
4235
  interactive = false,
4156
4236
  canEdit,
4157
- onUpdateElement
4237
+ onUpdateElement,
4238
+ animationState
4158
4239
  }) {
4159
4240
  const [threeAvailable, setThreeAvailable] = useState(null);
4160
4241
  useEffect(() => {
@@ -4210,7 +4291,8 @@ function SmartArt3DRenderer({
4210
4291
  model,
4211
4292
  width: element.width,
4212
4293
  height: element.height,
4213
- interactive
4294
+ interactive,
4295
+ textStyle: animationState?.textStyle
4214
4296
  }
4215
4297
  ) }) });
4216
4298
  const editEnabled = canEdit && Boolean(onUpdateElement);
@@ -4254,7 +4336,8 @@ function SmartArtElement({
4254
4336
  element,
4255
4337
  className,
4256
4338
  canEdit,
4257
- onUpdateElement
4339
+ onUpdateElement,
4340
+ animationState
4258
4341
  }
4259
4342
  );
4260
4343
  }
@@ -4314,6 +4397,67 @@ function getSegmentTspanProps(segment, element, fallbackColor) {
4314
4397
  textDecoration: decos.length > 0 ? decos.join(" ") : void 0
4315
4398
  };
4316
4399
  }
4400
+ function resolveSegmentFont(segment, element) {
4401
+ const s = segment.style || {};
4402
+ const family = s.fontFamily || element.textStyle?.fontFamily;
4403
+ return {
4404
+ fontFamily: family ? getSubstituteFontFamily(family) : DEFAULT_FONT_FAMILY,
4405
+ fontSizePx: s.fontSize ?? element.textStyle?.fontSize ?? DEFAULT_TEXT_FONT_SIZE,
4406
+ bold: s.bold ?? element.textStyle?.bold,
4407
+ italic: s.italic ?? element.textStyle?.italic
4408
+ };
4409
+ }
4410
+ function EnvelopeGlyph({
4411
+ glyphKey,
4412
+ glyph,
4413
+ tspanProps
4414
+ }) {
4415
+ if (!glyph.slices || glyph.slices.length <= 1) {
4416
+ return /* @__PURE__ */ jsx("text", { x: glyph.x, y: glyph.y, transform: glyph.transform, ...tspanProps, children: glyph.char });
4417
+ }
4418
+ return /* @__PURE__ */ jsx("g", { "data-glyph-slices": glyph.slices.length, children: glyph.slices.map((slice, si) => {
4419
+ const clipId = `${glyphKey}-s${si}`;
4420
+ return /* @__PURE__ */ jsxs(React20.Fragment, { children: [
4421
+ /* @__PURE__ */ jsx("clipPath", { id: clipId, clipPathUnits: "userSpaceOnUse", children: /* @__PURE__ */ jsx(
4422
+ "rect",
4423
+ {
4424
+ x: slice.clipX0,
4425
+ y: -1e5,
4426
+ width: Math.max(0, slice.clipX1 - slice.clipX0),
4427
+ height: 2e5
4428
+ }
4429
+ ) }),
4430
+ /* @__PURE__ */ jsx(
4431
+ "text",
4432
+ {
4433
+ x: glyph.x,
4434
+ y: glyph.y,
4435
+ transform: slice.transform,
4436
+ clipPath: `url(#${clipId})`,
4437
+ ...tspanProps,
4438
+ children: glyph.char
4439
+ }
4440
+ )
4441
+ ] }, clipId);
4442
+ }) });
4443
+ }
4444
+ function EnvelopeLine({
4445
+ paraSegments,
4446
+ glyphs,
4447
+ element,
4448
+ fallbackColor,
4449
+ lineIdPrefix
4450
+ }) {
4451
+ return /* @__PURE__ */ jsx(Fragment, { children: glyphs.map((g, i) => /* @__PURE__ */ jsx(
4452
+ EnvelopeGlyph,
4453
+ {
4454
+ glyphKey: `${lineIdPrefix}-g${i}`,
4455
+ glyph: g,
4456
+ tspanProps: getSegmentTspanProps(paraSegments[g.segmentIndex], element, fallbackColor)
4457
+ },
4458
+ i
4459
+ )) });
4460
+ }
4317
4461
  function WarpedText({
4318
4462
  element,
4319
4463
  width,
@@ -4342,6 +4486,48 @@ function WarpedText({
4342
4486
  const baseFontSize = textEl.textStyle?.fontSize ?? DEFAULT_TEXT_FONT_SIZE;
4343
4487
  const baseFontFamily = textEl.textStyle?.fontFamily ? getSubstituteFontFamily(textEl.textStyle.fontFamily) : DEFAULT_FONT_FAMILY;
4344
4488
  const baseFill = normalizeHexColor(textEl.textStyle?.color, fallbackColor);
4489
+ if (hasGlyphEnvelope(preset)) {
4490
+ return /* @__PURE__ */ jsx(
4491
+ "svg",
4492
+ {
4493
+ width,
4494
+ height,
4495
+ viewBox: `0 0 ${width} ${height}`,
4496
+ xmlns: "http://www.w3.org/2000/svg",
4497
+ style: { overflow: "visible", position: "absolute", inset: 0, pointerEvents: "none" },
4498
+ "aria-hidden": "true",
4499
+ children: paragraphs.map((para, paraIdx) => {
4500
+ const segsInput = para.segments.map((seg, i) => ({
4501
+ text: seg.text,
4502
+ font: resolveSegmentFont(seg, textEl),
4503
+ segmentIndex: i
4504
+ }));
4505
+ const glyphs = buildGlyphEnvelope(
4506
+ preset,
4507
+ segsInput,
4508
+ width,
4509
+ height,
4510
+ align,
4511
+ warpAdj,
4512
+ warpAdj2,
4513
+ paraIdx,
4514
+ lineCount
4515
+ );
4516
+ return /* @__PURE__ */ jsx(
4517
+ EnvelopeLine,
4518
+ {
4519
+ paraSegments: para.segments,
4520
+ glyphs,
4521
+ element: textEl,
4522
+ fallbackColor,
4523
+ lineIdPrefix: `warp-${element.id}-l${paraIdx}`
4524
+ },
4525
+ `envelope-line-${paraIdx}`
4526
+ );
4527
+ })
4528
+ }
4529
+ );
4530
+ }
4345
4531
  return /* @__PURE__ */ jsxs(
4346
4532
  "svg",
4347
4533
  {
@@ -4470,13 +4656,26 @@ function renderTextElementBody(options) {
4470
4656
  const useSvgWarp = shouldUseSvgWarp(
4471
4657
  hasTextProperties(el) ? el.textStyle?.textWarpPreset : void 0
4472
4658
  );
4473
- const scene3dStyle = hasTextProperties(el) ? buildTextBody3DSceneStyle(el.textStyle) : void 0;
4659
+ const scene3dStyle = hasTextProperties(el) ? buildTextBody3DSceneStyle(el.textStyle, { width: el.width, height: el.height }) : void 0;
4474
4660
  const rotationTransform = getTextBodyRotationTransform(el);
4475
4661
  const composedTransform = [rotationTransform, getTextCompensationTransform(el), scene3dStyle?.transform].filter(Boolean).join(" ") || void 0;
4476
4662
  const transformStyle = {
4477
4663
  transform: composedTransform,
4478
- transformOrigin: "center",
4664
+ // A COM-measured homography (`scene3dStyle.transformOrigin === '0 0'`)
4665
+ // MUST win over the default centred origin, or the matrix3d's baked-in
4666
+ // translation (relative to the element's own top-left) is applied from
4667
+ // the wrong pivot and the projection is wrong (see
4668
+ // `visual-3d-camera-homography`'s module doc comment). This used to be
4669
+ // hardcoded to `'center'` unconditionally, silently clobbering
4670
+ // `scene3dStyle.transformOrigin` the same way Svelte's `ElementRenderer`
4671
+ // once re-clobbered `pointerEvents` from its own interactive flag.
4672
+ transformOrigin: scene3dStyle?.transformOrigin ?? "center",
4479
4673
  ...scene3dStyle?.perspective ? { perspective: scene3dStyle.perspective } : {},
4674
+ // COM-calibrated off-axis correction for a handful of camera presets
4675
+ // (see `visual-3d-camera`'s module doc comment); only reachable when an
4676
+ // explicit `a:camera/a:rot`/`@fov`/`@zoom` override sits alongside one of
4677
+ // those presets, since the homography path above never sets it.
4678
+ ...scene3dStyle?.perspectiveOrigin ? { perspectiveOrigin: scene3dStyle.perspectiveOrigin } : {},
4480
4679
  ...scene3dStyle?.transformStyle ? { transformStyle: scene3dStyle.transformStyle } : {},
4481
4680
  ...isLinkedTextBox2 ? { overflow: "hidden" } : {}
4482
4681
  };
@@ -4903,7 +5102,9 @@ function renderBody(options) {
4903
5102
  }
4904
5103
  if (doInk && isInkElement(el)) {
4905
5104
  return renderInk(el, {
4906
- replay: isPresentationPassive});
5105
+ replay: isPresentationPassive,
5106
+ pressureSensitive: true
5107
+ });
4907
5108
  }
4908
5109
  if (el.type === "contentPart") {
4909
5110
  return renderContentPart(el, {
@@ -4924,9 +5125,8 @@ function renderBody(options) {
4924
5125
  }
4925
5126
  return renderTextElementBody(options);
4926
5127
  }
4927
- var noop = () => {
4928
- };
4929
- var EMPTY_MEDIA_DATA_URLS = /* @__PURE__ */ new Map();
5128
+
5129
+ // src/viewer/components/static-element-renderer-utils.ts
4930
5130
  function defaultTextColorForFill(fillColor) {
4931
5131
  const hex = String(fillColor ?? "").replace(/^#/u, "");
4932
5132
  if (!/^[0-9a-f]{6}$/iu.test(hex)) {
@@ -4936,26 +5136,7 @@ function defaultTextColorForFill(fillColor) {
4936
5136
  const luminance = channels[0] * 0.2126 + channels[1] * 0.7152 + channels[2] * 0.0722;
4937
5137
  return luminance > 0.179 ? DEFAULT_TEXT_COLOR : "#ffffff";
4938
5138
  }
4939
- function StaticElementRendererImpl({
4940
- element,
4941
- activeSlide,
4942
- allSlides,
4943
- mediaDataUrls = EMPTY_MEDIA_DATA_URLS,
4944
- sourceSlideIndex,
4945
- zIndex,
4946
- positioned = true,
4947
- fieldContext,
4948
- tableStyleContext,
4949
- parentGroupFill,
4950
- onActionClick,
4951
- actionRequiresModifier = false,
4952
- animation,
4953
- imageAnimation,
4954
- exposeElementId = false
4955
- }) {
4956
- if (!isElementRendered(element)) {
4957
- return null;
4958
- }
5139
+ function getStaticElementVisualState(element, parentGroupFill) {
4959
5140
  const style = hasShapeProperties(element) ? element.shapeStyle : void 0;
4960
5141
  const hasFill = style?.fillColor !== void 0 && style.fillColor !== "transparent" || Boolean(buildCssGradientFromShapeStyle(style) || style?.fillGradient) || style?.fillMode === "pattern" && Boolean(style.fillPatternPreset);
4961
5142
  const fill = normalizeHexColor(style?.fillColor, DEFAULT_FILL_COLOR);
@@ -4979,9 +5160,69 @@ function StaticElementRendererImpl({
4979
5160
  const letsTextOverflow = hasTextProperties(element) && element.textStyle?.autoFitMode === "shrink" && (element.type === "text" || element.locks?.txBox === true);
4980
5161
  const shapeType = hasShapeProperties(element) ? element.shapeType : void 0;
4981
5162
  const isCallout = isWedgeCalloutPresetShape(shapeType) || String(shapeType ?? "").toLowerCase().includes("callout");
5163
+ return {
5164
+ hasFill,
5165
+ fill,
5166
+ strokeWidth,
5167
+ stroke,
5168
+ visualStyle,
5169
+ textStyle,
5170
+ isImage,
5171
+ letsTextOverflow,
5172
+ isCallout
5173
+ };
5174
+ }
5175
+ function getStaticElementInteractionState(element, hasActionHandler, exposeElementId) {
4982
5176
  const action = element.actionClick;
4983
- const isActionable = Boolean(action && onActionClick);
5177
+ const isActionable = Boolean(action && hasActionHandler);
4984
5178
  const contractRole = exposeElementId ? getAriaRole(element, { actionable: isElementActionable(element) }) : isActionable ? "button" : void 0;
5179
+ return { action, isActionable, contractRole };
5180
+ }
5181
+ function getStaticElementWrapperClassName(element, visual, positioned, isActionable) {
5182
+ const overflowClass = visual.isImage || element.type === "group" || isConnectorOrLineElement(element) || visual.isCallout || visual.letsTextOverflow ? "" : "overflow-hidden";
5183
+ const pointerClass = isActionable ? "pointer-events-auto cursor-pointer" : "pointer-events-none";
5184
+ return `${positioned ? "absolute" : "relative"} ${overflowClass} ${pointerClass}`;
5185
+ }
5186
+ var noop = () => {
5187
+ };
5188
+ var EMPTY_MEDIA_DATA_URLS = /* @__PURE__ */ new Map();
5189
+ function StaticElementRendererImpl({
5190
+ element,
5191
+ activeSlide,
5192
+ allSlides,
5193
+ mediaDataUrls = EMPTY_MEDIA_DATA_URLS,
5194
+ sourceSlideIndex,
5195
+ zIndex,
5196
+ positioned = true,
5197
+ fieldContext,
5198
+ tableStyleContext,
5199
+ parentGroupFill,
5200
+ onActionClick,
5201
+ actionRequiresModifier = false,
5202
+ animation,
5203
+ imageAnimation,
5204
+ exposeElementId = false,
5205
+ suppressReflection = false
5206
+ }) {
5207
+ if (!isElementRendered(element)) {
5208
+ return null;
5209
+ }
5210
+ const {
5211
+ hasFill,
5212
+ fill,
5213
+ strokeWidth,
5214
+ stroke,
5215
+ visualStyle,
5216
+ textStyle,
5217
+ isImage,
5218
+ letsTextOverflow,
5219
+ isCallout
5220
+ } = getStaticElementVisualState(element, parentGroupFill);
5221
+ const { action, isActionable, contractRole } = getStaticElementInteractionState(
5222
+ element,
5223
+ Boolean(onActionClick),
5224
+ exposeElementId
5225
+ );
4985
5226
  return /* @__PURE__ */ jsxs(
4986
5227
  "div",
4987
5228
  {
@@ -4989,7 +5230,12 @@ function StaticElementRendererImpl({
4989
5230
  "data-element-id": exposeElementId ? element.id : void 0,
4990
5231
  "data-pptx-element": exposeElementId ? "true" : void 0,
4991
5232
  "data-pptx-action": isActionable ? "click" : void 0,
4992
- className: `${positioned ? "absolute" : "relative"} ${isImage || element.type === "group" || isConnectorOrLineElement(element) || isCallout || letsTextOverflow ? "" : "overflow-hidden"} ${isActionable ? "pointer-events-auto cursor-pointer" : "pointer-events-none"}`,
5233
+ className: getStaticElementWrapperClassName(
5234
+ element,
5235
+ { isImage, letsTextOverflow, isCallout },
5236
+ positioned,
5237
+ isActionable
5238
+ ),
4993
5239
  role: contractRole,
4994
5240
  "aria-label": exposeElementId ? getAriaLabel(element) : void 0,
4995
5241
  "aria-roledescription": exposeElementId ? getAriaRoleDescription(element) : void 0,
@@ -5033,7 +5279,7 @@ function StaticElementRendererImpl({
5033
5279
  animation
5034
5280
  },
5035
5281
  children: [
5036
- /* @__PURE__ */ jsx(ShapeEffectOverlay, { element }),
5282
+ /* @__PURE__ */ jsx(ShapeEffectOverlay, { element, suppressReflection }),
5037
5283
  element.type === "group" ? /* @__PURE__ */ jsx("div", { className: "relative w-full h-full", children: (element.children ?? []).map((child, index) => /* @__PURE__ */ jsx(
5038
5284
  StaticElementRenderer,
5039
5285
  {
@@ -5098,7 +5344,7 @@ function StaticElementRendererImpl({
5098
5344
  }
5099
5345
  );
5100
5346
  }
5101
- var StaticElementRenderer = React19.memo(StaticElementRendererImpl);
5347
+ var StaticElementRenderer = React20.memo(StaticElementRendererImpl);
5102
5348
  StaticElementRenderer.displayName = "StaticElementRenderer";
5103
5349
  var PREVIEW_CANVAS_WIDTH = 1280;
5104
5350
  var PREVIEW_CANVAS_HEIGHT = 720;
@@ -6015,17 +6261,17 @@ function ArrangeSection(p) {
6015
6261
  function TransitionsSection(p) {
6016
6262
  const { t } = useTranslation();
6017
6263
  const canEdit = p.canEdit !== false;
6018
- const draft = React19.useMemo(() => readRibbonTransitionDraft(p.activeSlide), [p.activeSlide]);
6019
- const [durationBuffer, setDurationBuffer] = React19.useState(null);
6020
- const [advanceBuffer, setAdvanceBuffer] = React19.useState(null);
6021
- const commit = React19.useCallback(
6264
+ const draft = React20.useMemo(() => readRibbonTransitionDraft(p.activeSlide), [p.activeSlide]);
6265
+ const [durationBuffer, setDurationBuffer] = React20.useState(null);
6266
+ const [advanceBuffer, setAdvanceBuffer] = React20.useState(null);
6267
+ const commit = React20.useCallback(
6022
6268
  (changes) => {
6023
6269
  p.onTransitionChange(ribbonTransitionUpdates({ ...draft, ...changes }));
6024
6270
  },
6025
6271
  [draft, p]
6026
6272
  );
6027
- const soundFileInputRef = React19.useRef(null);
6028
- const handleSoundFilePicked = React19.useCallback(
6273
+ const soundFileInputRef = React20.useRef(null);
6274
+ const handleSoundFilePicked = React20.useCallback(
6029
6275
  (file) => {
6030
6276
  void readSoundFileAsDataUrl(file).then((dataUrl) => {
6031
6277
  if (dataUrl) {
@@ -6390,7 +6636,7 @@ function AccountPage() {
6390
6636
  return void 0;
6391
6637
  });
6392
6638
  };
6393
- const version = "3.7.0" ;
6639
+ const version = "3.8.0" ;
6394
6640
  return /* @__PURE__ */ jsxs("div", { className: "mt-8 max-w-[700px] space-y-6", children: [
6395
6641
  /* @__PURE__ */ jsxs("section", { className: cardClass, children: [
6396
6642
  /* @__PURE__ */ jsxs("h2", { className: "flex items-center gap-2 text-sm font-semibold", children: [
@@ -6826,7 +7072,7 @@ function FontFamilyMenu(p) {
6826
7072
  embeddedFonts: p.embeddedFonts,
6827
7073
  customFonts: p.customFonts
6828
7074
  });
6829
- return /* @__PURE__ */ jsx(RibbonMenu, { anchorRef: p.anchorRef, className: "flex flex-col w-64 pt-1", children: /* @__PURE__ */ jsx("div", { className: "rounded-lg border border-border bg-popover backdrop-blur-lg shadow-2xl py-1 max-h-80 overflow-y-auto", children: groups.map((group, groupIndex) => /* @__PURE__ */ jsxs(React19.Fragment, { children: [
7075
+ return /* @__PURE__ */ jsx(RibbonMenu, { anchorRef: p.anchorRef, className: "flex flex-col w-64 pt-1", children: /* @__PURE__ */ jsx("div", { className: "rounded-lg border border-border bg-popover backdrop-blur-lg shadow-2xl py-1 max-h-80 overflow-y-auto", children: groups.map((group, groupIndex) => /* @__PURE__ */ jsxs(React20.Fragment, { children: [
6830
7076
  /* @__PURE__ */ jsx(
6831
7077
  "div",
6832
7078
  {
@@ -11020,8 +11266,8 @@ function Toolbar(p) {
11020
11266
  }
11021
11267
 
11022
11268
  // src/viewer/utils/slide-background-style.ts
11023
- function getReactSlideBackgroundStyle(slide) {
11024
- const style = getSlideBackgroundStyle(slide);
11269
+ function getReactSlideBackgroundStyle(slide, slideSize) {
11270
+ const style = getSlideBackgroundStyle(slide, slideSize);
11025
11271
  return {
11026
11272
  backgroundColor: style["background-color"],
11027
11273
  backgroundImage: slide?.backgroundImage ? void 0 : style["background-image"],
@@ -11363,6 +11609,7 @@ function DrawingOverlaySvg({
11363
11609
  drawingWidth,
11364
11610
  isStrokeActive,
11365
11611
  liveStrokeD,
11612
+ liveStrokeView,
11366
11613
  onPointerDown,
11367
11614
  onPointerMove,
11368
11615
  onPointerUp
@@ -11381,7 +11628,7 @@ function DrawingOverlaySvg({
11381
11628
  onPointerDown,
11382
11629
  onPointerMove,
11383
11630
  onPointerUp,
11384
- children: isStrokeActive && liveStrokeD && /* @__PURE__ */ jsx(
11631
+ children: isStrokeActive && liveStrokeView ? renderStrokeView(liveStrokeView, true, void 0, "ink-live-preview") : isStrokeActive && liveStrokeD && /* @__PURE__ */ jsx(
11385
11632
  "path",
11386
11633
  {
11387
11634
  d: liveStrokeD,
@@ -11600,7 +11847,7 @@ function HorizontalRulerView({ ticks, widthPx, highlight }) {
11600
11847
  }
11601
11848
  );
11602
11849
  }
11603
- var HorizontalRuler = React19.memo(HorizontalRulerView);
11850
+ var HorizontalRuler = React20.memo(HorizontalRulerView);
11604
11851
  HorizontalRuler.displayName = "HorizontalRuler";
11605
11852
  function VerticalRulerView({ ticks, heightPx, highlight }) {
11606
11853
  return /* @__PURE__ */ jsxs(
@@ -11672,7 +11919,7 @@ function VerticalRulerView({ ticks, heightPx, highlight }) {
11672
11919
  }
11673
11920
  );
11674
11921
  }
11675
- var VerticalRuler = React19.memo(VerticalRulerView);
11922
+ var VerticalRuler = React20.memo(VerticalRulerView);
11676
11923
  VerticalRuler.displayName = "VerticalRuler";
11677
11924
  function Ruler({
11678
11925
  canvasSize,
@@ -12145,6 +12392,140 @@ function useConnectorCreation({
12145
12392
  handleConnectorDragEnd
12146
12393
  };
12147
12394
  }
12395
+
12396
+ // src/viewer/components/canvas/canvas-path.ts
12397
+ function buildCanvasPathD(points) {
12398
+ if (points.length === 0) {
12399
+ return "";
12400
+ }
12401
+ const parts = [`M ${points[0].x} ${points[0].y}`];
12402
+ for (let i = 1; i < points.length; i++) {
12403
+ parts.push(`L ${points[i].x} ${points[i].y}`);
12404
+ }
12405
+ return parts.join(" ");
12406
+ }
12407
+
12408
+ // src/viewer/components/canvas/finishDrawStroke.ts
12409
+ function finishDrawStroke(input) {
12410
+ const { tool, points, pressures, tiltX, tiltY, color, width } = input;
12411
+ if (points.length < 2) {
12412
+ return null;
12413
+ }
12414
+ let minX = Infinity;
12415
+ let minY = Infinity;
12416
+ let maxX = -Infinity;
12417
+ let maxY = -Infinity;
12418
+ for (const pt of points) {
12419
+ if (pt.x < minX) {
12420
+ minX = pt.x;
12421
+ }
12422
+ if (pt.y < minY) {
12423
+ minY = pt.y;
12424
+ }
12425
+ if (pt.x > maxX) {
12426
+ maxX = pt.x;
12427
+ }
12428
+ if (pt.y > maxY) {
12429
+ maxY = pt.y;
12430
+ }
12431
+ }
12432
+ const pad = width;
12433
+ minX -= pad;
12434
+ minY -= pad;
12435
+ maxX += pad;
12436
+ maxY += pad;
12437
+ const w = Math.max(maxX - minX, 1);
12438
+ const h = Math.max(maxY - minY, 1);
12439
+ const relPoints = points.map((pt) => ({ x: pt.x - minX, y: pt.y - minY }));
12440
+ if (tool === "freeform") {
12441
+ return {
12442
+ kind: "freeform",
12443
+ element: buildFreeformShape(relPoints, { x: minX, y: minY, w, h }, color, width)
12444
+ };
12445
+ }
12446
+ return {
12447
+ kind: "ink",
12448
+ element: buildInkElement(
12449
+ relPoints,
12450
+ { x: minX, y: minY, w, h },
12451
+ tool,
12452
+ { pressures, tiltX, tiltY },
12453
+ color,
12454
+ width
12455
+ )
12456
+ };
12457
+ }
12458
+ function buildFreeformShape(relPoints, box, color, width) {
12459
+ const COORD_SCALE = 100;
12460
+ const segments = [];
12461
+ for (let i = 0; i < relPoints.length; i++) {
12462
+ const scaledPt = {
12463
+ x: Math.round(relPoints[i].x * COORD_SCALE),
12464
+ y: Math.round(relPoints[i].y * COORD_SCALE)
12465
+ };
12466
+ segments.push(i === 0 ? { type: "moveTo", pt: scaledPt } : { type: "lineTo", pt: scaledPt });
12467
+ }
12468
+ if (segments.length > 2) {
12469
+ segments.push({ type: "close" });
12470
+ }
12471
+ return {
12472
+ id: `shape-${Date.now()}-${Math.random().toString(36).slice(2, 8)}`,
12473
+ type: "shape",
12474
+ x: box.x,
12475
+ y: box.y,
12476
+ width: box.w,
12477
+ height: box.h,
12478
+ shapeType: "custom",
12479
+ shapeStyle: { fillColor: "transparent", strokeColor: color, strokeWidth: width },
12480
+ customGeometryPaths: [
12481
+ { width: Math.round(box.w * COORD_SCALE), height: Math.round(box.h * COORD_SCALE), segments }
12482
+ ]
12483
+ };
12484
+ }
12485
+ function buildInkElement(relPoints, box, tool, channels, color, width) {
12486
+ const pathD = buildCanvasPathD(relPoints);
12487
+ const isHighlighter = tool === "highlighter";
12488
+ const { pressures, tiltX, tiltY } = channels;
12489
+ const hasPressure = pressures.length >= 2 && pressures.some((p) => Math.abs(p - pressures[0]) > 0.01);
12490
+ const hasTilt = hasTiltData(tiltX, tiltY);
12491
+ return {
12492
+ id: `ink-${Date.now()}-${Math.random().toString(36).slice(2, 8)}`,
12493
+ type: "ink",
12494
+ x: box.x,
12495
+ y: box.y,
12496
+ width: box.w,
12497
+ height: box.h,
12498
+ inkPaths: [pathD],
12499
+ inkColors: [color],
12500
+ inkWidths: [width],
12501
+ inkOpacities: [isHighlighter ? 0.4 : 1],
12502
+ inkTool: isHighlighter ? "highlighter" : "pen",
12503
+ ...hasPressure ? { inkPointPressures: [pressures] } : {},
12504
+ ...hasTilt ? { inkPointTiltX: [tiltX], inkPointTiltY: [tiltY] } : {}
12505
+ };
12506
+ }
12507
+ function useLiveInkPreview(isStrokeActive, activeTool, points, pressures, tiltX, tiltY, color, width) {
12508
+ const liveStrokeD = useMemo(
12509
+ () => isStrokeActive ? buildCanvasPathD(points) : "",
12510
+ [isStrokeActive, points]
12511
+ );
12512
+ const liveStrokeView = useMemo(() => {
12513
+ if (!isStrokeActive || activeTool === "select" || activeTool === "eraser") {
12514
+ return null;
12515
+ }
12516
+ const inkPoints = points.map((pt, i) => ({
12517
+ x: pt.x,
12518
+ y: pt.y,
12519
+ pressure: pressures[i],
12520
+ tiltX: tiltX[i],
12521
+ tiltY: tiltY[i]
12522
+ }));
12523
+ return buildLiveInkStrokeView({ points: inkPoints, color, width, tool: activeTool });
12524
+ }, [isStrokeActive, activeTool, points, pressures, tiltX, tiltY, color, width]);
12525
+ return { liveStrokeD, liveStrokeView };
12526
+ }
12527
+
12528
+ // src/viewer/components/canvas/useDrawingOverlay.ts
12148
12529
  function useDrawingOverlay({
12149
12530
  activeTool,
12150
12531
  activeSlide,
@@ -12161,6 +12542,8 @@ function useDrawingOverlay({
12161
12542
  []
12162
12543
  );
12163
12544
  const [currentStrokePressures, setCurrentStrokePressures] = useState([]);
12545
+ const [currentStrokeTiltX, setCurrentStrokeTiltX] = useState([]);
12546
+ const [currentStrokeTiltY, setCurrentStrokeTiltY] = useState([]);
12164
12547
  const [isStrokeActive, setIsStrokeActive] = useState(false);
12165
12548
  const pointerToCanvasCoords = useCallback(
12166
12549
  (e) => {
@@ -12177,16 +12560,6 @@ function useDrawingOverlay({
12177
12560
  },
12178
12561
  [zoom.canvasStageRef, zoom.editorScale]
12179
12562
  );
12180
- const buildPathD = useCallback((pts) => {
12181
- if (pts.length === 0) {
12182
- return "";
12183
- }
12184
- const parts = [`M ${pts[0].x} ${pts[0].y}`];
12185
- for (let i = 1; i < pts.length; i++) {
12186
- parts.push(`L ${pts[i].x} ${pts[i].y}`);
12187
- }
12188
- return parts.join(" ");
12189
- }, []);
12190
12563
  const handleDrawPointerDown = useCallback(
12191
12564
  (e) => {
12192
12565
  if (activeTool === "select") {
@@ -12211,6 +12584,8 @@ function useDrawingOverlay({
12211
12584
  e.target.setPointerCapture(e.pointerId);
12212
12585
  setCurrentStrokePoints([pt]);
12213
12586
  setCurrentStrokePressures([e.pressure]);
12587
+ setCurrentStrokeTiltX([e.tiltX ?? 0]);
12588
+ setCurrentStrokeTiltY([e.tiltY ?? 0]);
12214
12589
  setIsStrokeActive(true);
12215
12590
  if (isDrawingRef) {
12216
12591
  isDrawingRef.current = true;
@@ -12229,6 +12604,8 @@ function useDrawingOverlay({
12229
12604
  }
12230
12605
  setCurrentStrokePoints((prev) => [...prev, pt]);
12231
12606
  setCurrentStrokePressures((prev) => [...prev, e.pressure]);
12607
+ setCurrentStrokeTiltX((prev) => [...prev, e.tiltX ?? 0]);
12608
+ setCurrentStrokeTiltY((prev) => [...prev, e.tiltY ?? 0]);
12232
12609
  },
12233
12610
  [isStrokeActive, activeTool, pointerToCanvasCoords]
12234
12611
  );
@@ -12242,113 +12619,54 @@ function useDrawingOverlay({
12242
12619
  if (isDrawingRef) {
12243
12620
  isDrawingRef.current = false;
12244
12621
  }
12245
- if (currentStrokePoints.length < 2) {
12246
- setCurrentStrokePoints([]);
12247
- return;
12248
- }
12249
- let minX = Infinity, minY = Infinity, maxX = -Infinity, maxY = -Infinity;
12250
- for (const pt of currentStrokePoints) {
12251
- if (pt.x < minX) {
12252
- minX = pt.x;
12253
- }
12254
- if (pt.y < minY) {
12255
- minY = pt.y;
12256
- }
12257
- if (pt.x > maxX) {
12258
- maxX = pt.x;
12259
- }
12260
- if (pt.y > maxY) {
12261
- maxY = pt.y;
12262
- }
12263
- }
12264
- const PAD = drawingWidth;
12265
- minX -= PAD;
12266
- minY -= PAD;
12267
- maxX += PAD;
12268
- maxY += PAD;
12269
- const w = Math.max(maxX - minX, 1);
12270
- const h = Math.max(maxY - minY, 1);
12271
- const relPoints = currentStrokePoints.map((pt) => ({
12272
- x: pt.x - minX,
12273
- y: pt.y - minY
12274
- }));
12275
- if (activeTool === "freeform") {
12276
- const COORD_SCALE = 100;
12277
- const pathW = Math.round(w * COORD_SCALE);
12278
- const pathH = Math.round(h * COORD_SCALE);
12279
- const segments = [];
12280
- for (let i = 0; i < relPoints.length; i++) {
12281
- const scaledPt = {
12282
- x: Math.round(relPoints[i].x * COORD_SCALE),
12283
- y: Math.round(relPoints[i].y * COORD_SCALE)
12284
- };
12285
- segments.push(
12286
- i === 0 ? { type: "moveTo", pt: scaledPt } : { type: "lineTo", pt: scaledPt }
12287
- );
12288
- }
12289
- if (segments.length > 2) {
12290
- segments.push({ type: "close" });
12291
- }
12292
- const freeformShape = {
12293
- id: `shape-${Date.now()}-${Math.random().toString(36).slice(2, 8)}`,
12294
- type: "shape",
12295
- x: minX,
12296
- y: minY,
12297
- width: w,
12298
- height: h,
12299
- shapeType: "custom",
12300
- shapeStyle: {
12301
- fillColor: "transparent",
12302
- strokeColor: drawingColor,
12303
- strokeWidth: drawingWidth
12304
- },
12305
- customGeometryPaths: [{ width: pathW, height: pathH, segments }]
12306
- };
12307
- onAddFreeformShape?.(freeformShape);
12308
- } else {
12309
- const pathD = buildPathD(relPoints);
12310
- const isHighlighter = activeTool === "highlighter";
12311
- const hasPressure = currentStrokePressures.length >= 2 && currentStrokePressures.some((p) => Math.abs(p - currentStrokePressures[0]) > 0.01);
12312
- const ink = {
12313
- id: `ink-${Date.now()}-${Math.random().toString(36).slice(2, 8)}`,
12314
- type: "ink",
12315
- x: minX,
12316
- y: minY,
12317
- width: w,
12318
- height: h,
12319
- inkPaths: [pathD],
12320
- inkColors: [drawingColor],
12321
- inkWidths: [drawingWidth],
12322
- inkOpacities: [isHighlighter ? 0.4 : 1],
12323
- inkTool: isHighlighter ? "highlighter" : "pen",
12324
- ...hasPressure ? { inkPointPressures: [currentStrokePressures] } : {}
12325
- };
12326
- onAddInkElement?.(ink);
12622
+ const finished = finishDrawStroke({
12623
+ tool: activeTool,
12624
+ points: currentStrokePoints,
12625
+ pressures: currentStrokePressures,
12626
+ tiltX: currentStrokeTiltX,
12627
+ tiltY: currentStrokeTiltY,
12628
+ color: drawingColor,
12629
+ width: drawingWidth
12630
+ });
12631
+ if (finished?.kind === "freeform") {
12632
+ onAddFreeformShape?.(finished.element);
12633
+ } else if (finished?.kind === "ink") {
12634
+ onAddInkElement?.(finished.element);
12327
12635
  }
12328
12636
  setCurrentStrokePoints([]);
12329
12637
  setCurrentStrokePressures([]);
12638
+ setCurrentStrokeTiltX([]);
12639
+ setCurrentStrokeTiltY([]);
12330
12640
  },
12331
12641
  [
12332
12642
  isStrokeActive,
12333
12643
  activeTool,
12334
12644
  currentStrokePoints,
12645
+ currentStrokeTiltX,
12646
+ currentStrokeTiltY,
12335
12647
  drawingColor,
12336
12648
  drawingWidth,
12337
12649
  isDrawingRef,
12338
12650
  onAddInkElement,
12339
12651
  onAddFreeformShape,
12340
- buildPathD,
12341
12652
  currentStrokePressures
12342
12653
  ]
12343
12654
  );
12344
- const liveStrokeD = useMemo(
12345
- () => isStrokeActive ? buildPathD(currentStrokePoints) : "",
12346
- [isStrokeActive, currentStrokePoints, buildPathD]
12655
+ const { liveStrokeD, liveStrokeView } = useLiveInkPreview(
12656
+ isStrokeActive,
12657
+ activeTool,
12658
+ currentStrokePoints,
12659
+ currentStrokePressures,
12660
+ currentStrokeTiltX,
12661
+ currentStrokeTiltY,
12662
+ drawingColor,
12663
+ drawingWidth
12347
12664
  );
12348
12665
  return {
12349
12666
  isDrawing,
12350
12667
  isStrokeActive,
12351
12668
  liveStrokeD,
12669
+ liveStrokeView,
12352
12670
  currentStrokePoints,
12353
12671
  handleDrawPointerDown,
12354
12672
  handleDrawPointerMove,
@@ -12666,6 +12984,7 @@ function SlideCanvas({
12666
12984
  isDrawing,
12667
12985
  isStrokeActive,
12668
12986
  liveStrokeD,
12987
+ liveStrokeView,
12669
12988
  handleDrawPointerDown,
12670
12989
  handleDrawPointerMove,
12671
12990
  handleDrawPointerUp
@@ -12735,7 +13054,10 @@ function SlideCanvas({
12735
13054
  // pinch-zoom. View/present mode keeps the default so the slide can
12736
13055
  // still be scrolled and swipe-navigated.
12737
13056
  touchAction: isEditableCanvas ? "none" : void 0,
12738
- ...getReactSlideBackgroundStyle(activeSlide)
13057
+ ...getReactSlideBackgroundStyle(activeSlide, {
13058
+ widthPx: canvasSize.width,
13059
+ heightPx: canvasSize.height
13060
+ })
12739
13061
  },
12740
13062
  onClick: handleStageClick,
12741
13063
  onDoubleClick: handleStageDblClick,
@@ -12916,6 +13238,7 @@ function SlideCanvas({
12916
13238
  drawingWidth,
12917
13239
  isStrokeActive,
12918
13240
  liveStrokeD,
13241
+ liveStrokeView,
12919
13242
  onPointerDown: handleDrawPointerDown,
12920
13243
  onPointerMove: handleDrawPointerMove,
12921
13244
  onPointerUp: handleDrawPointerUp
@@ -13377,7 +13700,13 @@ function SlideThumbnailImpl({
13377
13700
  "div",
13378
13701
  {
13379
13702
  className: "relative w-full overflow-hidden rounded border border-border bg-white",
13380
- style: { height: previewHeight, ...getReactSlideBackgroundStyle(slide) },
13703
+ style: {
13704
+ height: previewHeight,
13705
+ ...getReactSlideBackgroundStyle(slide, {
13706
+ widthPx: safeCanvasWidth,
13707
+ heightPx: safeCanvasHeight
13708
+ })
13709
+ },
13381
13710
  children: /* @__PURE__ */ jsxs(
13382
13711
  "div",
13383
13712
  {
@@ -13455,7 +13784,7 @@ function arePropsEqual2(prev, next) {
13455
13784
  }
13456
13785
  return true;
13457
13786
  }
13458
- var SlideThumbnail = React19.memo(SlideThumbnailImpl, arePropsEqual2);
13787
+ var SlideThumbnail = React20.memo(SlideThumbnailImpl, arePropsEqual2);
13459
13788
 
13460
13789
  // src/viewer/components/context-menu-dispatch.ts
13461
13790
  function tableCell(props) {
@@ -14005,7 +14334,7 @@ function LazyThumbnailInner({
14005
14334
  }
14006
14335
  ) });
14007
14336
  }
14008
- var LazyThumbnail = React19.memo(LazyThumbnailInner);
14337
+ var LazyThumbnail = React20.memo(LazyThumbnailInner);
14009
14338
 
14010
14339
  // src/viewer/components/slides-pane/utils.ts
14011
14340
  function formatTimingMs(ms) {
@@ -14159,7 +14488,7 @@ function SlideItemInner({
14159
14488
  }
14160
14489
  );
14161
14490
  }
14162
- var SlideItem = React19.memo(SlideItemInner);
14491
+ var SlideItem = React20.memo(SlideItemInner);
14163
14492
  function useSlidePaneCallbacks(onMoveSlide, onRenameSection, onToggleSectionCollapse) {
14164
14493
  const [collapsedSections, setCollapsedSections] = useState({});
14165
14494
  const [renamingSectionId, setRenamingSectionId] = useState(null);
@@ -15480,7 +15809,7 @@ function arePropsEqual3(prev, next) {
15480
15809
  }
15481
15810
  return true;
15482
15811
  }
15483
- var SlideCard = React19.memo(SlideCardImpl, arePropsEqual3);
15812
+ var SlideCard = React20.memo(SlideCardImpl, arePropsEqual3);
15484
15813
  function SorterContextMenu({
15485
15814
  x,
15486
15815
  y,
@@ -18924,9 +19253,9 @@ function PresentationSubtitleBar({
18924
19253
  function renderNotesSegments(segments) {
18925
19254
  return notesSegmentsToSpans(segments).map((span) => {
18926
19255
  if (span.kind === "break") {
18927
- return React19.createElement("br", { key: span.key });
19256
+ return React20.createElement("br", { key: span.key });
18928
19257
  }
18929
- return React19.createElement(
19258
+ return React20.createElement(
18930
19259
  "span",
18931
19260
  { key: span.key, style: span.style },
18932
19261
  span.text
@@ -19155,7 +19484,7 @@ function arePropsEqual4(prev, next) {
19155
19484
  }
19156
19485
  return true;
19157
19486
  }
19158
- var ScaledSlidePreview = React19.memo(ScaledSlidePreviewImpl, arePropsEqual4);
19487
+ var ScaledSlidePreview = React20.memo(ScaledSlidePreviewImpl, arePropsEqual4);
19159
19488
  function PresenterNotesRail({
19160
19489
  slides,
19161
19490
  current,
@@ -20344,7 +20673,7 @@ function EffectSoundRow({
20344
20673
  onPick
20345
20674
  }) {
20346
20675
  const { t } = useTranslation();
20347
- const fileInputRef = React19.useRef(null);
20676
+ const fileInputRef = React20.useRef(null);
20348
20677
  const handleSelectChange = (event) => {
20349
20678
  if (event.target.value === "custom") {
20350
20679
  fileInputRef.current?.click();
@@ -22683,6 +23012,7 @@ function ChartTrendlineOptions({
22683
23012
  function ChartTypeSelector({
22684
23013
  title,
22685
23014
  chartType,
23015
+ chartData,
22686
23016
  grouping,
22687
23017
  seriesCount,
22688
23018
  categoryCount,
@@ -22692,6 +23022,7 @@ function ChartTypeSelector({
22692
23022
  }) {
22693
23023
  const { t } = useTranslation();
22694
23024
  const supportsGrouping = GROUPING_SUPPORTED_TYPES.has(chartType);
23025
+ const displayedType = resolveDisplayedChartType(chartData);
22695
23026
  return /* @__PURE__ */ jsxs("div", { className: CARD2, children: [
22696
23027
  /* @__PURE__ */ jsx("div", { className: HEADING2, children: t("pptx.chart.heading") }),
22697
23028
  /* @__PURE__ */ jsxs("div", { className: "text-[11px] text-muted-foreground mb-1", children: [
@@ -22724,7 +23055,7 @@ function ChartTypeSelector({
22724
23055
  "aria-label": t("pptx.chart.type"),
22725
23056
  disabled: !canEdit,
22726
23057
  className: INPUT2,
22727
- value: chartType,
23058
+ value: displayedType,
22728
23059
  onChange: (e) => onUpdateChartData({
22729
23060
  chartType: e.target.value
22730
23061
  }),
@@ -22750,6 +23081,208 @@ function ChartTypeSelector({
22750
23081
  ] })
22751
23082
  ] });
22752
23083
  }
23084
+ function NumberField({ value, canEdit, fraction, nonNegative, onChange }) {
23085
+ return /* @__PURE__ */ jsx(
23086
+ "input",
23087
+ {
23088
+ type: "number",
23089
+ step: fraction ? "0.01" : void 0,
23090
+ min: fraction || nonNegative ? 0 : void 0,
23091
+ max: fraction ? 1 : void 0,
23092
+ disabled: !canEdit,
23093
+ className: INPUT2,
23094
+ value,
23095
+ onChange: (e) => onChange(Number(e.target.value))
23096
+ }
23097
+ );
23098
+ }
23099
+ function RotationField({
23100
+ row,
23101
+ canEdit,
23102
+ onRotationPatch
23103
+ }) {
23104
+ const { t } = useTranslation();
23105
+ return /* @__PURE__ */ jsxs(Fragment, { children: [
23106
+ /* @__PURE__ */ jsx("span", { className: "text-muted-foreground", children: t("pptx.chart.userShapeRotation") }),
23107
+ /* @__PURE__ */ jsx(
23108
+ "input",
23109
+ {
23110
+ type: "number",
23111
+ step: "1",
23112
+ "aria-label": t("pptx.chart.userShapeRotation"),
23113
+ disabled: !canEdit,
23114
+ className: INPUT2,
23115
+ value: row.rotation ?? 0,
23116
+ onChange: (e) => onRotationPatch(row.path, Number(e.target.value) || void 0)
23117
+ }
23118
+ )
23119
+ ] });
23120
+ }
23121
+ function FlipFields({
23122
+ row,
23123
+ canEdit,
23124
+ onFlipPatch
23125
+ }) {
23126
+ const { t } = useTranslation();
23127
+ return /* @__PURE__ */ jsxs(Fragment, { children: [
23128
+ /* @__PURE__ */ jsxs("label", { className: "flex items-center gap-1 cursor-pointer", children: [
23129
+ /* @__PURE__ */ jsx(
23130
+ "input",
23131
+ {
23132
+ type: "checkbox",
23133
+ "aria-label": t("pptx.arrange.flipHorizontally"),
23134
+ disabled: !canEdit,
23135
+ className: "accent-primary",
23136
+ checked: row.flipH ?? false,
23137
+ onChange: (e) => onFlipPatch(row.path, { flipH: e.target.checked })
23138
+ }
23139
+ ),
23140
+ /* @__PURE__ */ jsx("span", { className: "text-muted-foreground", children: t("pptx.arrange.flipHorizontally") })
23141
+ ] }),
23142
+ /* @__PURE__ */ jsxs("label", { className: "flex items-center gap-1 cursor-pointer", children: [
23143
+ /* @__PURE__ */ jsx(
23144
+ "input",
23145
+ {
23146
+ type: "checkbox",
23147
+ "aria-label": t("pptx.arrange.flipVertically"),
23148
+ disabled: !canEdit,
23149
+ className: "accent-primary",
23150
+ checked: row.flipV ?? false,
23151
+ onChange: (e) => onFlipPatch(row.path, { flipV: e.target.checked })
23152
+ }
23153
+ ),
23154
+ /* @__PURE__ */ jsx("span", { className: "text-muted-foreground", children: t("pptx.arrange.flipVertically") })
23155
+ ] })
23156
+ ] });
23157
+ }
23158
+ function ChartUserShapePositionFields({
23159
+ row,
23160
+ userShapes,
23161
+ canEdit,
23162
+ onPatch,
23163
+ onBoxPatch,
23164
+ onRotationPatch,
23165
+ onFlipPatch
23166
+ }) {
23167
+ const { t } = useTranslation();
23168
+ const update = (patch) => onPatch(row.path, patch);
23169
+ if (row.depth === 0) {
23170
+ const from = row.from;
23171
+ return /* @__PURE__ */ jsxs("div", { className: "flex flex-wrap items-center gap-1 text-[11px]", children: [
23172
+ /* @__PURE__ */ jsx("span", { className: "text-muted-foreground", children: t("pptx.chart.userShapeFrom") }),
23173
+ /* @__PURE__ */ jsx(
23174
+ NumberField,
23175
+ {
23176
+ fraction: true,
23177
+ canEdit,
23178
+ value: from.x,
23179
+ onChange: (x) => update({ from: { ...from, x } })
23180
+ }
23181
+ ),
23182
+ /* @__PURE__ */ jsx(
23183
+ NumberField,
23184
+ {
23185
+ fraction: true,
23186
+ canEdit,
23187
+ value: from.y,
23188
+ onChange: (y) => update({ from: { ...from, y } })
23189
+ }
23190
+ ),
23191
+ row.anchor === "rel" && row.to ? /* @__PURE__ */ jsxs(Fragment, { children: [
23192
+ /* @__PURE__ */ jsx("span", { className: "text-muted-foreground", children: t("pptx.chart.userShapeTo") }),
23193
+ /* @__PURE__ */ jsx(
23194
+ NumberField,
23195
+ {
23196
+ fraction: true,
23197
+ canEdit,
23198
+ value: row.to.x,
23199
+ onChange: (x) => update({ to: { ...row.to, x } })
23200
+ }
23201
+ ),
23202
+ /* @__PURE__ */ jsx(
23203
+ NumberField,
23204
+ {
23205
+ fraction: true,
23206
+ canEdit,
23207
+ value: row.to.y,
23208
+ onChange: (y) => update({ to: { ...row.to, y } })
23209
+ }
23210
+ )
23211
+ ] }) : null,
23212
+ row.anchor === "abs" && row.ext ? /* @__PURE__ */ jsxs(Fragment, { children: [
23213
+ /* @__PURE__ */ jsx("span", { className: "text-muted-foreground", children: t("pptx.chart.userShapeSize") }),
23214
+ /* @__PURE__ */ jsx(
23215
+ NumberField,
23216
+ {
23217
+ nonNegative: true,
23218
+ canEdit,
23219
+ value: row.ext.cx,
23220
+ onChange: (cx) => update({ ext: { ...row.ext, cx } })
23221
+ }
23222
+ ),
23223
+ /* @__PURE__ */ jsx(
23224
+ NumberField,
23225
+ {
23226
+ nonNegative: true,
23227
+ canEdit,
23228
+ value: row.ext.cy,
23229
+ onChange: (cy) => update({ ext: { ...row.ext, cy } })
23230
+ }
23231
+ )
23232
+ ] }) : null,
23233
+ /* @__PURE__ */ jsx(RotationField, { row, canEdit, onRotationPatch }),
23234
+ /* @__PURE__ */ jsx(FlipFields, { row, canEdit, onFlipPatch })
23235
+ ] });
23236
+ }
23237
+ const box = getChartUserShapeRowChartBox(userShapes, row.path);
23238
+ if (!box) {
23239
+ return null;
23240
+ }
23241
+ const patchBox = (next) => onBoxPatch(row.path, { from: box.from, to: box.to, ...next });
23242
+ return /* @__PURE__ */ jsxs("div", { className: "flex flex-wrap items-center gap-1 text-[11px]", children: [
23243
+ /* @__PURE__ */ jsx("span", { className: "text-muted-foreground", children: t("pptx.chart.userShapeFrom") }),
23244
+ /* @__PURE__ */ jsx(
23245
+ NumberField,
23246
+ {
23247
+ fraction: true,
23248
+ canEdit,
23249
+ value: box.from.x,
23250
+ onChange: (x) => patchBox({ from: { ...box.from, x } })
23251
+ }
23252
+ ),
23253
+ /* @__PURE__ */ jsx(
23254
+ NumberField,
23255
+ {
23256
+ fraction: true,
23257
+ canEdit,
23258
+ value: box.from.y,
23259
+ onChange: (y) => patchBox({ from: { ...box.from, y } })
23260
+ }
23261
+ ),
23262
+ /* @__PURE__ */ jsx("span", { className: "text-muted-foreground", children: t("pptx.chart.userShapeTo") }),
23263
+ /* @__PURE__ */ jsx(
23264
+ NumberField,
23265
+ {
23266
+ fraction: true,
23267
+ canEdit,
23268
+ value: box.to.x,
23269
+ onChange: (x) => patchBox({ to: { ...box.to, x } })
23270
+ }
23271
+ ),
23272
+ /* @__PURE__ */ jsx(
23273
+ NumberField,
23274
+ {
23275
+ fraction: true,
23276
+ canEdit,
23277
+ value: box.to.y,
23278
+ onChange: (y) => patchBox({ to: { ...box.to, y } })
23279
+ }
23280
+ ),
23281
+ /* @__PURE__ */ jsx(RotationField, { row, canEdit, onRotationPatch }),
23282
+ /* @__PURE__ */ jsx(FlipFields, { row, canEdit, onFlipPatch })
23283
+ ] });
23284
+ }
23285
+ var PATH_KEY = (path) => path.join(",");
22753
23286
  function ChartUserShapeOptions({
22754
23287
  chartData,
22755
23288
  canEdit,
@@ -22757,11 +23290,28 @@ function ChartUserShapeOptions({
22757
23290
  }) {
22758
23291
  const { t } = useTranslation();
22759
23292
  const shapes = chartData.userShapes;
22760
- const descriptors = listChartUserShapeDescriptors(shapes);
23293
+ const rows = listChartUserShapeRows(shapes);
22761
23294
  const kindLabel = (kind) => {
22762
23295
  const key = `pptx.chart.userShapeKind${kind.charAt(0).toUpperCase()}${kind.slice(1)}`;
22763
23296
  return t(key);
22764
23297
  };
23298
+ const update = (path, patch) => onUpdateChartData({ userShapes: withChartUserShapeRowUpdated(shapes, path, patch) });
23299
+ const updateBox = (path, box) => onUpdateChartData({ userShapes: withChartUserShapeRowChartBoxUpdated(shapes, path, box) });
23300
+ const updateRotation = (path, rotation) => onUpdateChartData({ userShapes: withChartUserShapeRowRotationUpdated(shapes, path, rotation) });
23301
+ const updateFlip = (path, flip) => onUpdateChartData({ userShapes: withChartUserShapeRowFlipUpdated(shapes, path, flip) });
23302
+ const addIntoGroup = (path) => {
23303
+ const transform = getChartUserShapeGroupTransform(shapes, path);
23304
+ if (!transform) {
23305
+ return;
23306
+ }
23307
+ onUpdateChartData({
23308
+ userShapes: withChartUserShapeGroupChildAdded(
23309
+ shapes,
23310
+ path,
23311
+ createDefaultChartUserShapeGroupChild(transform)
23312
+ )
23313
+ });
23314
+ };
22765
23315
  return /* @__PURE__ */ jsxs("div", { className: CARD2, children: [
22766
23316
  /* @__PURE__ */ jsxs("div", { className: "flex items-center justify-between", children: [
22767
23317
  /* @__PURE__ */ jsx("div", { className: HEADING2, children: t("pptx.chart.userShapes") }),
@@ -22778,99 +23328,120 @@ function ChartUserShapeOptions({
22778
23328
  }
22779
23329
  )
22780
23330
  ] }),
22781
- descriptors.length === 0 ? /* @__PURE__ */ jsx("div", { className: "text-[11px] text-muted-foreground", children: t("pptx.chart.userShapesEmpty") }) : /* @__PURE__ */ jsx("div", { className: "space-y-2", children: descriptors.map((d) => /* @__PURE__ */ jsxs("div", { className: "space-y-1 rounded border border-border p-1.5", children: [
22782
- /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-2 text-[11px]", children: [
22783
- /* @__PURE__ */ jsxs("span", { className: "flex-1 truncate", children: [
22784
- kindLabel(d.kind),
22785
- d.text ? ` - ${d.text}` : ""
22786
- ] }),
22787
- /* @__PURE__ */ jsx(
22788
- "button",
22789
- {
22790
- type: "button",
22791
- disabled: !canEdit,
22792
- "aria-label": t("pptx.chart.userShapeDelete"),
22793
- className: BTN2,
22794
- onClick: () => onUpdateChartData({ userShapes: withChartUserShapeRemoved(shapes, d.index) }),
22795
- children: "\u2715"
22796
- }
22797
- )
22798
- ] }),
22799
- d.editable ? /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-1 text-[11px]", children: [
22800
- /* @__PURE__ */ jsx("span", { className: "text-muted-foreground", children: t("pptx.chart.userShapeFrom") }),
22801
- /* @__PURE__ */ jsx(
22802
- "input",
22803
- {
22804
- type: "number",
22805
- step: "0.01",
22806
- min: 0,
22807
- max: 1,
22808
- disabled: !canEdit,
22809
- className: INPUT2,
22810
- value: d.from.x,
22811
- onChange: (e) => onUpdateChartData({
22812
- userShapes: withChartUserShapeUpdated(shapes, d.index, {
22813
- from: { ...d.from, x: Number(e.target.value) }
22814
- })
22815
- })
22816
- }
22817
- ),
22818
- /* @__PURE__ */ jsx(
22819
- "input",
22820
- {
22821
- type: "number",
22822
- step: "0.01",
22823
- min: 0,
22824
- max: 1,
22825
- disabled: !canEdit,
22826
- className: INPUT2,
22827
- value: d.from.y,
22828
- onChange: (e) => onUpdateChartData({
22829
- userShapes: withChartUserShapeUpdated(shapes, d.index, {
22830
- from: { ...d.from, y: Number(e.target.value) }
22831
- })
22832
- })
22833
- }
22834
- ),
22835
- d.anchor === "rel" && d.to ? /* @__PURE__ */ jsxs(Fragment, { children: [
22836
- /* @__PURE__ */ jsx("span", { className: "text-muted-foreground", children: t("pptx.chart.userShapeTo") }),
22837
- /* @__PURE__ */ jsx(
22838
- "input",
22839
- {
22840
- type: "number",
22841
- step: "0.01",
22842
- min: 0,
22843
- max: 1,
22844
- disabled: !canEdit,
22845
- className: INPUT2,
22846
- value: d.to.x,
22847
- onChange: (e) => onUpdateChartData({
22848
- userShapes: withChartUserShapeUpdated(shapes, d.index, {
22849
- to: { ...d.to, x: Number(e.target.value) }
23331
+ rows.length === 0 ? /* @__PURE__ */ jsx("div", { className: "text-[11px] text-muted-foreground", children: t("pptx.chart.userShapesEmpty") }) : /* @__PURE__ */ jsx("div", { className: "space-y-2", children: rows.map((row) => /* @__PURE__ */ jsxs(
23332
+ "div",
23333
+ {
23334
+ "data-chart-user-shape-path": PATH_KEY(row.path),
23335
+ style: { marginLeft: row.depth * 12 },
23336
+ className: "space-y-1 rounded border border-border p-1.5",
23337
+ children: [
23338
+ /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-2 text-[11px]", children: [
23339
+ /* @__PURE__ */ jsxs("span", { className: "flex-1 truncate", children: [
23340
+ kindLabel(row.kind),
23341
+ row.text ? ` - ${row.text}` : ""
23342
+ ] }),
23343
+ row.isGroup ? /* @__PURE__ */ jsx(
23344
+ "button",
23345
+ {
23346
+ type: "button",
23347
+ disabled: !canEdit,
23348
+ className: BTN2,
23349
+ onClick: () => addIntoGroup(row.path),
23350
+ children: t("pptx.chart.userShapeAddIntoGroup")
23351
+ }
23352
+ ) : null,
23353
+ /* @__PURE__ */ jsx(
23354
+ "button",
23355
+ {
23356
+ type: "button",
23357
+ disabled: !canEdit,
23358
+ "aria-label": t("pptx.chart.userShapeDelete"),
23359
+ className: BTN2,
23360
+ onClick: () => onUpdateChartData({
23361
+ userShapes: withChartUserShapeRowRemoved(shapes, row.path)
23362
+ }),
23363
+ children: "\u2715"
23364
+ }
23365
+ )
23366
+ ] }),
23367
+ row.editableVisuals ? /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-1 text-[11px]", children: [
23368
+ /* @__PURE__ */ jsx("span", { className: "text-muted-foreground", children: t("pptx.chart.userShapeText") }),
23369
+ /* @__PURE__ */ jsx(
23370
+ "input",
23371
+ {
23372
+ type: "text",
23373
+ "aria-label": t("pptx.chart.userShapeText"),
23374
+ disabled: !canEdit,
23375
+ className: INPUT2,
23376
+ value: row.text ?? "",
23377
+ onChange: (e) => onUpdateChartData({
23378
+ userShapes: withChartUserShapeRowTextUpdated(
23379
+ shapes,
23380
+ row.path,
23381
+ e.target.value
23382
+ )
22850
23383
  })
22851
- })
22852
- }
22853
- ),
23384
+ }
23385
+ )
23386
+ ] }) : null,
23387
+ row.editableVisuals ? /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-3 text-[11px]", children: [
23388
+ /* @__PURE__ */ jsxs("label", { className: "flex items-center gap-1", children: [
23389
+ /* @__PURE__ */ jsx("span", { className: "text-muted-foreground", children: t("pptx.chart.userShapeFill") }),
23390
+ /* @__PURE__ */ jsx(
23391
+ "input",
23392
+ {
23393
+ type: "color",
23394
+ "aria-label": t("pptx.chart.userShapeFill"),
23395
+ disabled: !canEdit,
23396
+ value: row.fill ?? "#ffffff",
23397
+ onChange: (e) => update(row.path, { fill: e.target.value })
23398
+ }
23399
+ )
23400
+ ] }),
23401
+ /* @__PURE__ */ jsxs("label", { className: "flex items-center gap-1", children: [
23402
+ /* @__PURE__ */ jsx("span", { className: "text-muted-foreground", children: t("pptx.chart.userShapeStroke") }),
23403
+ /* @__PURE__ */ jsx(
23404
+ "input",
23405
+ {
23406
+ type: "color",
23407
+ "aria-label": t("pptx.chart.userShapeStroke"),
23408
+ disabled: !canEdit,
23409
+ value: row.stroke ?? "#000000",
23410
+ onChange: (e) => update(row.path, { stroke: e.target.value })
23411
+ }
23412
+ )
23413
+ ] })
23414
+ ] }) : null,
23415
+ row.editableAltText ? /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-1 text-[11px]", children: [
23416
+ /* @__PURE__ */ jsx("span", { className: "text-muted-foreground", children: t("pptx.chart.userShapeAltText") }),
23417
+ /* @__PURE__ */ jsx(
23418
+ "input",
23419
+ {
23420
+ type: "text",
23421
+ "aria-label": t("pptx.chart.userShapeAltText"),
23422
+ disabled: !canEdit,
23423
+ className: INPUT2,
23424
+ value: row.altText ?? "",
23425
+ onChange: (e) => update(row.path, { altText: e.target.value })
23426
+ }
23427
+ )
23428
+ ] }) : null,
22854
23429
  /* @__PURE__ */ jsx(
22855
- "input",
23430
+ ChartUserShapePositionFields,
22856
23431
  {
22857
- type: "number",
22858
- step: "0.01",
22859
- min: 0,
22860
- max: 1,
22861
- disabled: !canEdit,
22862
- className: INPUT2,
22863
- value: d.to.y,
22864
- onChange: (e) => onUpdateChartData({
22865
- userShapes: withChartUserShapeUpdated(shapes, d.index, {
22866
- to: { ...d.to, y: Number(e.target.value) }
22867
- })
22868
- })
23432
+ row,
23433
+ userShapes: shapes,
23434
+ canEdit,
23435
+ onPatch: update,
23436
+ onBoxPatch: updateBox,
23437
+ onRotationPatch: updateRotation,
23438
+ onFlipPatch: updateFlip
22869
23439
  }
22870
23440
  )
22871
- ] }) : null
22872
- ] }) : /* @__PURE__ */ jsx("div", { className: "text-[10px] italic text-muted-foreground", children: t("pptx.chart.userShapeNotEditable") })
22873
- ] }, d.index)) })
23441
+ ]
23442
+ },
23443
+ PATH_KEY(row.path)
23444
+ )) })
22874
23445
  ] });
22875
23446
  }
22876
23447
  function ChartDataPanel({ selectedElement, canEdit, onUpdateElement }) {
@@ -23106,6 +23677,7 @@ function ChartDataPanel({ selectedElement, canEdit, onUpdateElement }) {
23106
23677
  {
23107
23678
  title,
23108
23679
  chartType,
23680
+ chartData,
23109
23681
  grouping,
23110
23682
  seriesCount: series.length,
23111
23683
  categoryCount: categories.length,
@@ -23286,7 +23858,7 @@ function ConnectorArrowsSection({
23286
23858
  ["Start", "End"].map((end) => {
23287
23859
  const widthKey = end === "Start" ? "connectorStartArrowWidth" : "connectorEndArrowWidth";
23288
23860
  const lengthKey = end === "Start" ? "connectorStartArrowLength" : "connectorEndArrowLength";
23289
- return /* @__PURE__ */ jsxs(React19.Fragment, { children: [
23861
+ return /* @__PURE__ */ jsxs(React20.Fragment, { children: [
23290
23862
  /* @__PURE__ */ jsxs("label", { className: "flex flex-col gap-1", children: [
23291
23863
  /* @__PURE__ */ jsx("span", { className: "text-muted-foreground", children: t(END_LABEL_KEYS[end].width) }),
23292
23864
  /* @__PURE__ */ jsx(
@@ -26144,7 +26716,7 @@ function StrokeEffectsSection({
26144
26716
  ] }),
26145
26717
  EFFECT_CONFIGS.map((cfg) => {
26146
26718
  const on = cfg.isOn(style);
26147
- return /* @__PURE__ */ jsxs(React19.Fragment, { children: [
26719
+ return /* @__PURE__ */ jsxs(React20.Fragment, { children: [
26148
26720
  /* @__PURE__ */ jsxs("label", { className: `inline-flex items-center gap-2 text-foreground ${COL2}`, children: [
26149
26721
  /* @__PURE__ */ jsx(
26150
26722
  "input",
@@ -27012,7 +27584,7 @@ function TextWarpGallery({
27012
27584
  onUpdateTextStyle
27013
27585
  }) {
27014
27586
  const { t } = useTranslation();
27015
- const [expanded, setExpanded] = React19.useState(false);
27587
+ const [expanded, setExpanded] = React20.useState(false);
27016
27588
  const currentPreset = ts?.textWarpPreset || "textNoShape";
27017
27589
  return /* @__PURE__ */ jsxs("div", { className: "mt-2 rounded border border-border bg-card p-2 space-y-2", children: [
27018
27590
  /* @__PURE__ */ jsxs(
@@ -27215,7 +27787,7 @@ function ShapeTextPanels({
27215
27787
  onUpdateTextStyle
27216
27788
  }
27217
27789
  ),
27218
- (selectedElement.type === "text" || selectedElement.type === "shape" || selectedElement.type === "connector") && /* @__PURE__ */ jsx(
27790
+ shouldShowAccessibilitySection(selectedElement) && /* @__PURE__ */ jsx(
27219
27791
  AccessibilityTextSection,
27220
27792
  {
27221
27793
  selectedElement,
@@ -27663,7 +28235,7 @@ function SmartArtStyleControls({
27663
28235
  onChangeStyle
27664
28236
  }) {
27665
28237
  const { t } = useTranslation();
27666
- const translate = React19.useCallback((key) => t(key), [t]);
28238
+ const translate = React20.useCallback((key) => t(key), [t]);
27667
28239
  return /* @__PURE__ */ jsxs(Fragment, { children: [
27668
28240
  /* @__PURE__ */ jsxs("label", { className: "flex flex-col gap-1 text-[11px]", children: [
27669
28241
  /* @__PURE__ */ jsx("span", { className: "text-muted-foreground", children: t("pptx.smartart.colorScheme") }),
@@ -27718,9 +28290,9 @@ function SmartArtPropertiesPanel({
27718
28290
  const nodes = smartArtData.nodes ?? [];
27719
28291
  const layout = smartArtData.resolvedLayoutType;
27720
28292
  const topLevelCount = nodes.filter((n) => !n.parentId).length;
27721
- const inputRefs = React19.useRef(/* @__PURE__ */ new Map());
27722
- const pendingFocusId = React19.useRef(null);
27723
- React19.useEffect(() => {
28293
+ const inputRefs = React20.useRef(/* @__PURE__ */ new Map());
28294
+ const pendingFocusId = React20.useRef(null);
28295
+ React20.useEffect(() => {
27724
28296
  const id = pendingFocusId.current;
27725
28297
  if (id) {
27726
28298
  inputRefs.current.get(id)?.focus();
@@ -29299,7 +29871,7 @@ function CommentBody({ text, mentions, className }) {
29299
29871
  index
29300
29872
  ) : (
29301
29873
  // eslint-disable-next-line react/no-array-index-key -- segments are positional
29302
- /* @__PURE__ */ jsx(React19.Fragment, { children: segment.text }, index)
29874
+ /* @__PURE__ */ jsx(React20.Fragment, { children: segment.text }, index)
29303
29875
  )
29304
29876
  ) });
29305
29877
  }
@@ -30428,9 +31000,17 @@ function TransitionPreview({
30428
31000
  durationMs,
30429
31001
  transition.direction,
30430
31002
  transition.orient,
30431
- transition.spokes
31003
+ transition.spokes,
31004
+ transition.pattern
30432
31005
  ),
30433
- [transition.type, transition.direction, transition.orient, transition.spokes, durationMs]
31006
+ [
31007
+ transition.type,
31008
+ transition.direction,
31009
+ transition.orient,
31010
+ transition.spokes,
31011
+ transition.pattern,
31012
+ durationMs
31013
+ ]
30434
31014
  );
30435
31015
  const handlePlay = useCallback(() => {
30436
31016
  setPlaying(true);
@@ -30760,7 +31340,7 @@ function PresentationPropertiesPanel({
30760
31340
  onUpdateTagCollections
30761
31341
  }) {
30762
31342
  const { t } = useTranslation();
30763
- const handleTransitionChange = React19.useCallback(
31343
+ const handleTransitionChange = React20.useCallback(
30764
31344
  (updates) => {
30765
31345
  onUpdateSlide({
30766
31346
  transition: mergeSlideTransition(activeSlide?.transition, updates)
@@ -31940,9 +32520,17 @@ function PresentationTransitionOverlay({
31940
32520
  durationMs,
31941
32521
  transition.direction,
31942
32522
  transition.orient,
31943
- transition.spokes
32523
+ transition.spokes,
32524
+ transition.pattern
31944
32525
  ),
31945
- [transition.type, transition.direction, transition.orient, transition.spokes, durationMs]
32526
+ [
32527
+ transition.type,
32528
+ transition.direction,
32529
+ transition.orient,
32530
+ transition.spokes,
32531
+ transition.pattern,
32532
+ durationMs
32533
+ ]
31946
32534
  );
31947
32535
  const scale = useMemo(() => {
31948
32536
  if (resolvedStageScale !== null) {
@@ -34802,7 +35390,7 @@ function ViewerToolbarSection(props) {
34802
35390
  },
34803
35391
  [activeSlide, propertyHandlers]
34804
35392
  );
34805
- const scopedLayoutOptions = React19.useMemo(
35393
+ const scopedLayoutOptions = React20.useMemo(
34806
35394
  () => scopeLayoutOptionsToActiveSlide(s.layoutOptions, activeSlide),
34807
35395
  [s.layoutOptions, activeSlide]
34808
35396
  );
@@ -36005,7 +36593,10 @@ function PresentationStage({
36005
36593
  // the stage publishes its own size for those calc() offsets.
36006
36594
  "--pptx-slide-w": `${safeWidth}px`,
36007
36595
  "--pptx-slide-h": `${safeHeight}px`,
36008
- ...getReactSlideBackgroundStyle(activeSlide)
36596
+ ...getReactSlideBackgroundStyle(activeSlide, {
36597
+ widthPx: canvasSize.width,
36598
+ heightPx: canvasSize.height
36599
+ })
36009
36600
  },
36010
36601
  children: [
36011
36602
  /* @__PURE__ */ jsx(SlideBackgroundImageLayer, { slide: activeSlide }),
@@ -36654,7 +37245,7 @@ function useTableStyleMapHandlers(input) {
36654
37245
  var AiChatPanel = lazy(async () => {
36655
37246
  const [{ useChat }, { default: Panel }] = await Promise.all([
36656
37247
  import('@ai-sdk/react'),
36657
- import('./AiChatPanel-A5DCEHTO.mjs')
37248
+ import('./AiChatPanel-II6VOOAL.mjs')
36658
37249
  ]);
36659
37250
  function BoundAiChatPanel(props) {
36660
37251
  return /* @__PURE__ */ jsx(Panel, { ...props, useChat });
@@ -38449,8 +39040,24 @@ function MobileChromeOverlay(props) {
38449
39040
  )
38450
39041
  ] });
38451
39042
  }
38452
- function ReadOnlyBanner({ recommendation, onEditAnyway, onDismiss }) {
39043
+ function ReadOnlyBanner({
39044
+ recommendation,
39045
+ onEditAnyway,
39046
+ onDismiss,
39047
+ passwordPromptOpen = false,
39048
+ passwordError = null,
39049
+ checkingPassword = false,
39050
+ onSubmitPassword,
39051
+ onCancelPassword
39052
+ }) {
38453
39053
  const { t } = useTranslation();
39054
+ const [password, setPassword] = useState("");
39055
+ const inputId = useId();
39056
+ const errorId = useId();
39057
+ const handleSubmit = (event) => {
39058
+ event.preventDefault();
39059
+ onSubmitPassword?.(password);
39060
+ };
38454
39061
  return /* @__PURE__ */ jsxs(
38455
39062
  "div",
38456
39063
  {
@@ -38459,27 +39066,87 @@ function ReadOnlyBanner({ recommendation, onEditAnyway, onDismiss }) {
38459
39066
  className: "flex items-center gap-3 px-3 py-1.5 bg-amber-600/10 border-b border-amber-600/30 text-[12px] text-amber-900 dark:text-amber-200",
38460
39067
  children: [
38461
39068
  /* @__PURE__ */ jsx("span", { className: "flex-1 min-w-0", children: t(recommendation.messageKey) }),
38462
- /* @__PURE__ */ jsx(
38463
- "button",
38464
- {
38465
- type: "button",
38466
- "data-testid": "pptx-readonly-edit-anyway",
38467
- onClick: onEditAnyway,
38468
- className: "shrink-0 rounded-sm bg-amber-600/90 px-2 py-0.5 text-[11px] text-amber-50 transition-colors hover:bg-amber-600",
38469
- children: t("pptx.readOnly.editAnyway")
38470
- }
38471
- ),
38472
- /* @__PURE__ */ jsx(
38473
- "button",
39069
+ passwordPromptOpen ? /* @__PURE__ */ jsxs(
39070
+ "form",
38474
39071
  {
38475
- type: "button",
38476
- "data-testid": "pptx-readonly-dismiss",
38477
- onClick: onDismiss,
38478
- "aria-label": t("pptx.readOnly.dismiss"),
38479
- className: "shrink-0 rounded-sm px-1.5 py-0.5 text-[11px] text-amber-900/80 transition-colors hover:bg-amber-600/20 dark:text-amber-200/80",
38480
- children: t("pptx.readOnly.dismiss")
39072
+ "data-testid": "pptx-readonly-password-form",
39073
+ onSubmit: handleSubmit,
39074
+ className: "flex shrink-0 items-center gap-2",
39075
+ children: [
39076
+ /* @__PURE__ */ jsx("label", { htmlFor: inputId, className: "sr-only", children: t("pptx.readOnly.passwordLabel") }),
39077
+ /* @__PURE__ */ jsx(
39078
+ "input",
39079
+ {
39080
+ id: inputId,
39081
+ "data-testid": "pptx-readonly-password-input",
39082
+ type: "password",
39083
+ autoFocus: true,
39084
+ value: password,
39085
+ disabled: checkingPassword,
39086
+ onChange: (event) => setPassword(event.target.value),
39087
+ placeholder: t("pptx.readOnly.passwordPlaceholder"),
39088
+ "aria-invalid": passwordError !== null,
39089
+ "aria-describedby": passwordError !== null ? errorId : void 0,
39090
+ className: "rounded-sm border border-amber-600/40 bg-white/80 px-1.5 py-0.5 text-[11px] text-amber-950 dark:bg-black/20 dark:text-amber-100"
39091
+ }
39092
+ ),
39093
+ /* @__PURE__ */ jsx(
39094
+ "button",
39095
+ {
39096
+ type: "submit",
39097
+ "data-testid": "pptx-readonly-unlock",
39098
+ disabled: checkingPassword,
39099
+ className: "shrink-0 rounded-sm bg-amber-600/90 px-2 py-0.5 text-[11px] text-amber-50 transition-colors hover:bg-amber-600 disabled:opacity-60",
39100
+ children: t("pptx.readOnly.unlock")
39101
+ }
39102
+ ),
39103
+ /* @__PURE__ */ jsx(
39104
+ "button",
39105
+ {
39106
+ type: "button",
39107
+ "data-testid": "pptx-readonly-password-cancel",
39108
+ onClick: onCancelPassword,
39109
+ className: "shrink-0 rounded-sm px-1.5 py-0.5 text-[11px] text-amber-900/80 transition-colors hover:bg-amber-600/20 dark:text-amber-200/80",
39110
+ children: t("pptx.common.cancel")
39111
+ }
39112
+ ),
39113
+ passwordError !== null && /* @__PURE__ */ jsx(
39114
+ "span",
39115
+ {
39116
+ id: errorId,
39117
+ role: "alert",
39118
+ "data-testid": "pptx-readonly-password-error",
39119
+ className: "shrink-0 text-[11px] text-red-700 dark:text-red-300",
39120
+ children: t(
39121
+ passwordError === "wrong-password" ? "pptx.readOnly.wrongPassword" : "pptx.readOnly.unsupportedAlgorithm"
39122
+ )
39123
+ }
39124
+ )
39125
+ ]
38481
39126
  }
38482
- )
39127
+ ) : /* @__PURE__ */ jsxs(Fragment, { children: [
39128
+ /* @__PURE__ */ jsx(
39129
+ "button",
39130
+ {
39131
+ type: "button",
39132
+ "data-testid": "pptx-readonly-edit-anyway",
39133
+ onClick: onEditAnyway,
39134
+ className: "shrink-0 rounded-sm bg-amber-600/90 px-2 py-0.5 text-[11px] text-amber-50 transition-colors hover:bg-amber-600",
39135
+ children: t("pptx.readOnly.editAnyway")
39136
+ }
39137
+ ),
39138
+ /* @__PURE__ */ jsx(
39139
+ "button",
39140
+ {
39141
+ type: "button",
39142
+ "data-testid": "pptx-readonly-dismiss",
39143
+ onClick: onDismiss,
39144
+ "aria-label": t("pptx.readOnly.dismiss"),
39145
+ className: "shrink-0 rounded-sm px-1.5 py-0.5 text-[11px] text-amber-900/80 transition-colors hover:bg-amber-600/20 dark:text-amber-200/80",
39146
+ children: t("pptx.readOnly.dismiss")
39147
+ }
39148
+ )
39149
+ ] })
38483
39150
  ]
38484
39151
  }
38485
39152
  );
@@ -40274,6 +40941,7 @@ var PowerPointViewer = forwardRef(
40274
40941
  // http(s) image sources actually load.
40275
40942
  allowExternalImages: viewerOptions.trust.allowExternalContent,
40276
40943
  setReadOnlyRecommendation: readOnlyRec.setRecommendation,
40944
+ setModifyVerifier: readOnlyRec.setModifyVerifier,
40277
40945
  setCompatToasts: compatToastsState.setToasts,
40278
40946
  canEdit,
40279
40947
  promptKeepInkAnnotations: viewerOptions.advanced.slideShowPromptKeepInkAnnotations,
@@ -40503,7 +41171,12 @@ var PowerPointViewer = forwardRef(
40503
41171
  {
40504
41172
  recommendation: readOnlyRec.recommendation,
40505
41173
  onEditAnyway: readOnlyRec.editAnyway,
40506
- onDismiss: readOnlyRec.dismiss
41174
+ onDismiss: readOnlyRec.dismiss,
41175
+ passwordPromptOpen: readOnlyRec.passwordPromptOpen,
41176
+ passwordError: readOnlyRec.passwordError,
41177
+ checkingPassword: readOnlyRec.checkingPassword,
41178
+ onSubmitPassword: readOnlyRec.submitPassword,
41179
+ onCancelPassword: readOnlyRec.cancelPasswordPrompt
40507
41180
  }
40508
41181
  ),
40509
41182
  /* @__PURE__ */ jsx(